Skip to main content
2 of 2
added 26 characters in body
Synesso
  • 3.4k
  • 1
  • 11
  • 24

Setting Data with the Go SDK

I recently started using the Go SDK to interact with the horizon testnet.

I am able to read data from the account key/value store using the func (*Account) GetData method:

stellarAcc, err := client.LoadAccount(accountId)
if err != nil {
   log.Println("Stellar AccountId not found")
   return
}
res, _ := stellarAcc.GetData(key)
s := string(res[:5])
log.Printf("Value: %s", s)

I can't find in the documentation any method to set a new key/value pair. Is it possible with the current state of the SDK?