[Deprecated] KardiaChain Golang SDK

Note: KardiaChain is now fully compatible with standard web3 client libraries. Developers are recommended to use the standard web3 libraries in previous page instead of this.

Initializing

func SetupKardiaClient() (Node, error){
	url := "https://dev-1.kardiachain.io"
	lgr, err := zap.NewProduction()
	if err != nil {
        return nil, err
    }
    node, err := NewNode(url, lgr)
    if err != nil {
    	return nil, err
    }
    return node, nil
}

API

Info

type IInfo interface {
    Url() string
    IsAlive() bool
    NodeInfo(ctx context.Context) (*NodeInfo, error)
    GetCirculatingSupply(ctx context.Context) (*big.Int, error)
    KardiaCall(ctx context.Context, args SMCCallArgs) ([]byte, error)
}

Blocks

Addresses

Transactions

Examples

Note: Examples can be found at ^_test.go

Create Wallet

Send SignedTx

Interact with SMC

Function Definition

Create Node Instance

Create Contract Instance

Build payload

Send payload

Get response

Subscribe NewHeader event

Subscribe log filters

Note: More filters args can be found at Kardia RPC API

Last updated

Was this helpful?