README

License: GPL v3arrow-up-right Documentationarrow-up-right Build Statusarrow-up-right GitHub go.mod Go version GitHub release (latest by date)

Conflux Golang API

The Conflux Golang API allows any Golang client to interact with a local or remote Conflux node based on JSON-RPC 2.0 protocol. With Conflux Golang API, users can easily manage accounts, send transactions, deploy smart contracts, and query blockchain information.

Please read the documentationarrow-up-right for more.

And read the API documentation from herearrow-up-right.

Install go-conflux-sdk

go get github.com/Conflux-Chain/go-conflux-sdk

You can also add the Conflux Golang API into the vendor folder.

govendor fetch github.com/Conflux-Chain/go-conflux-sdk

Use go-conflux-sdk

Create Client

usd sdk.NewClient to creat a client for interact with conflux-rust node, the sdk.ClientOption is for setting Account Manager keystore folder path and retry options.

client, err := sdk.NewClient("https://test.confluxrpc.com", sdk.ClientOption{
    KeystorePath: "../context/keystore",
})

Query RPC

Send Transaction

Interact With Smart Contract

The most simple way to interact with contract is generator contract binding by conflux-abigen, see details from here

Last updated

Was this helpful?