ryt-tooling-sdk-go

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2026 License: BSD-3-Clause

README

Avalanche Tooling Go SDK

⚠️ Maintenance Mode Notice

As of December 2025, Avalanche Tooling Go SDK has entered maintenance mode. This means:

  • No new features will be developed by the Ava Labs team
  • GitHub issues are expected to be addressed by community members

External contributions are very much welcome! PRs will be reviewed but may not be prioritized. We encourage the community to continue building and improving this project.

Getting Started

Installing

Use go get to retrieve the SDK to add it to your project's Go module dependencies.

go get github.com/ryt-io/ryt-tooling-sdk-go

To update the SDK use go get -u to retrieve the latest version of the SDK.

go get -u github.com/ryt-io/ryt-tooling-sdk-go

Wallet Interface

The SDK provides a Wallet interface for interacting with Avalanche networks. local.LocalWallet is its main implementation.

// Create a wallet for Fuji testnet
w, err := local.NewLocalWallet(logger, network.FujiNetwork())

// Import an account from private key
acc, _ := account.ImportFromPrivateKey("myaccount", privateKey)
w.ImportAccount(acc)

// P-Chain operations (create subnet, add validators, etc.)
result, err := w.Primary().SubmitTx(ctx, types.SubmitTxParams{
    BuildTxInput: &pchainTxs.CreateSubnetTxParams{
        ControlKeys: []string{controlKeyAddress},
        Threshold:   1,
    },
})

// EVM operations on any chain
w.SetChain("https://my-l1.example.com/rpc")  // use "C" for C-Chain
balance, err := w.Balance()
method := wallet.Method("transfer(address,uint256)->(bool)", common.HexToAddress(to), amount)
tx, receipt, err := w.WriteContract(contractAddr, nil, method)

See wallet/wallet.go for the full interface definition.

Examples
P-Chain Operations
EVM Operations

Avalanchego Keychains

The SDK supports different keychain implementations for signing transactions:

  • Ledger - Hardware wallet integration for secure key management
  • CubeSigner - Cloud-based key management service
Examples
Ledger Integration
CubeSigner Integration

Directories

Path Synopsis
evm
// Copyright (C) 2025, Ava Labs, Inc.
// Copyright (C) 2025, Ava Labs, Inc.
icm
Package icm provides utilities for deploying and interacting with Interchain Messaging (ICM) contracts on Avalanche L1s.
Package icm provides utilities for deploying and interacting with Interchain Messaging (ICM) contracts on Avalanche L1s.
cubesigner/cubesignermock
Package cubesignermock is a generated GoMock package.
Package cubesignermock is a generated GoMock package.
ledger/ledgermock
Package ledgermock is a generated GoMock package.
Package ledgermock is a generated GoMock package.
mocks
ethclient
Package mock_ethclient is a generated GoMock package.
Package mock_ethclient is a generated GoMock package.
keychain
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL