What is the string encoding being used for manageData operation?
I write "test1" as the value to account's data.
The data I read back is: "dGVzdDE="
I can't figure out what string encoding is being used to get "dGVzdDE=" from "test1". Anyone has any idea?
Thank you very much.
As an example, the code I'm using is as follows (javascript):
server.loadAccount(sourceKeys.publicKey())
.catch(StellarSdk.NotFoundError, function (error) {
throw new Error('The source account does not exist!');
})
// If there was no error, load up-to-date information on your account.
.then(function() {
return server.loadAccount(sourceKeys.publicKey());
})
.then(function(sourceAccount) {
var transaction = new StellarSdk.TransactionBuilder(sourceAccount)
.addOperation(StellarSdk.Operation.manageData({
name: "data1",
value: "test1",
}))
.build();
// Sign the transaction to prove you are actually the person sending it.
transaction.sign(sourceKeys);
// And finally, send it off to Stellar!
return server.submitTransaction(transaction);
})