Update README.md

Update README.md
This commit is contained in:
jiang
2023-01-18 16:29:49 +08:00
parent 0ecf4f72b8
commit 1fc8cf6f4c

View File

@@ -56,20 +56,22 @@ import (
func main() { func main() {
// configure your endpoint here // configure your endpoint here
cli := sui.NewSuiClient("https://fullnode.devnet.sui.io:443") cli := sui.NewSuiClient("https://fullnode.devnet.sui.io:443")
resp, err := cli.GetRecentTransactions(context.Background(), models.GetRecentTransactionRequest{ resp, err := cli.SuiCall(context.Background(), "sui_getTransactionAuthSigners", "Ar9FigfQcR52tAGDPwt2DtKyp4oNDgRCc85yzeCuFU1L")
Count: 5, if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println("resp result:", resp)
resp2, err := cli.GetTransactionAuthSigners(context.Background(), models.GetTransactionAuthSignersRequest{
Digest: "Ar9FigfQcR52tAGDPwt2DtKyp4oNDgRCc85yzeCuFU1L",
}) })
if err != nil { if err != nil {
fmt.Println(err.Error()) fmt.Println(err.Error())
return
} }
fmt.Println(resp) fmt.Printf("%+v\n", resp2)
//If you want to request for original json response, you can use SuiCall().
rsp, err := cli.SuiCall(context.Background(), "sui_getRecentTransactions", 5)
if err != nil {
fmt.Println(err.Error())
}
fmt.Println(rsp)
keystoreCli, err := sui.SetAccountKeyStore("../sui.keystore.fortest") keystoreCli, err := sui.SetAccountKeyStore("../sui.keystore.fortest")
if err != nil { if err != nil {