Ethereum Client of Jasmine Project (Go Implementation)
The api documentation can be found at pkg.go.dev.
Usage
To sign a TFC claim message:
First instantiate a new SDK object.
sdk := NewSDK("ws://3.125.17.119:8546") // connect to the dev blockchain running on server 9523
Then instantiate an TFC Manager object using the Manager contract address
manager := sdk.Manager(managerAddress)
Retrieve admin account using private key:
admin := sdk.RetrieveAccount(privateKey)
Sign a TFC claim message which will mint a certain amount of TFC token for a recipient address;
nonce, err := manager.GetUnusedNonce()
signature := manager.SignTFCClaim(recipientAddress, amount, nonce, admin)
The signature string can be given to user to claim TFC tokens by themselves.
Get SDK version
Version()