cedra-go-kit
The community Go SDK for the Cedra blockchain. Feature-parity with the official TypeScript SDK.
Install
go get github.com/celerfi/cedra-go-kit
Requires Go 1.25+.
Quick start
package main
import (
"context"
"fmt"
cedra "github.com/celerfi/cedra-go-kit"
"github.com/celerfi/cedra-go-kit/account"
"github.com/celerfi/cedra-go-kit/client"
)
func main() {
c := cedra.New(client.Testnet)
// Generate a new Ed25519 account
acct, _ := account.NewEd25519Account()
addr := acct.Address().Hex()
// Fund from faucet
c.Faucet.FundAccount(context.Background(), addr, 100_000_000)
// Check balance
bal, _ := c.Account.GetAccountCEDRABalance(context.Background(), addr)
fmt.Printf("balance: %d\n", bal)
}
Networks
| Constant | Node URL |
|---|---|
client.Testnet | https://testnet.cedra.dev/v1 |
client.Devnet | https://devnet.cedra.dev/v1 |
Packages
| Package | Purpose |
|---|---|
account | Key generation, address derivation |
api | Node REST API calls |
transaction | Build, sign, simulate, submit |
client | HTTP client, network config |
bcs | Binary Canonical Serialization |
crypto | Ed25519 and Secp256k1 primitives |