joyid-sdk-go
The Go SDK of JoyID Lock Script Demo with dynamic link library joyid.so and the contract deployment can be seen in wiki-testnet-deployment
Install
go get github.com/nervina-labs/joyid-sdk-go
Quick Start
Some transfer examples with JoyID lock script are provided in example module.
JoyID native unlock
// example/main.go
func NativeTransferWithR1() error
// example/main.go
func NativeTransferWithK1() error
Add subkey with native unlock
Before adding subkey to JoyID account, the CoTA cell should be registered and the registry example may be helpful.
The community cota aggregator services may be helpful to develop and they can be seen on here
Add secp256r1 subkey to JoyID account with secp256r1 native unlock
// example/main.go
func AddSecp256r1SubkeyWithNativeUnlock() error
Add secp256k1 subkey to JoyID account with secp256k1 native unlock
// example/main.go
func AddSecp256k1SubkeyWithNativeUnlock() error
JoyID subkey unlock
Before using subkey to unlock transaction, the CoTA cell should be registered and the subkey should be added into CoTA SMT.
// example/main.go
func SubkeyTransferWithR1() error
// example/main.go
func SubkeyTransferWithK1() error