We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using golang, and upon posting a transaction the server is returning a 426. this is the code i am using as an example.
cfg := cl.ClientConfig{ Url: "http://192.168.100.10/api/v1/", } client, _ := cl.New(cfg) var data transaction.Asset data.Data = make(map[string]interface{}) data.Data["test"] = "hello world" metadata := make(map[string]interface{}) metadata["test"] = "hello world" var outputs []transaction.Output var issuers []ed25519.PublicKey var keyPairs []*transaction.KeyPair keyPair, err := transaction.NewKeyPair() fmt.Println(err) keyPairs = append(keyPairs, keyPair) for _, keyPair := range keyPairs { condition := transaction.NewEd25519Condition(keyPair.PublicKey) output, err := transaction.NewOutput(*condition, "1") if err != nil { fmt.Println("Cannot Create outputput!") } outputs = append(outputs, output) //Create Issuers issuers = append(issuers, keyPair.PublicKey) } txn, err := transaction.NewCreateTransaction(data, metadata, outputs, issuers) if err != nil { fmt.Println(err) } else { err = txn.Sign(keyPairs) if err != nil { fmt.Printf("Not Signed ! %s\n", err.Error()) } else { fmt.Println("*** SIGNED TXN:") fmt.Println(txn.String()) } } block1, err := client.GetBlock("0") if err != nil { fmt.Println("get block failed") fmt.Println(err) } else { fmt.Println(block1.Height) } err = client.PostTransaction(txn) if err != nil { fmt.Printf("Failed : %s\n", err.Error()) } else { }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am using golang, and upon posting a transaction the server is returning a 426.
this is the code i am using as an example.
The text was updated successfully, but these errors were encountered: