Skip to main content

Installation

The Artha Chain SDK is available for multiple programming languages. Choose the one that best fits your needs.

JavaScript/TypeScript

Install using npm:

npm install @arthachain/sdk

Or using yarn:

yarn add @arthachain/sdk

Python

Install using pip:

pip install arthachain-sdk

Go

go get github.com/arthachain/sdk

Rust

Add to your Cargo.toml:

[dependencies]
artha-chain = "1.0.0"

Configuration

After installation, you'll need to configure the SDK with your API key:

JavaScript/TypeScript

import { ArthaChain } from '@arthachain/sdk';

const client = new ArthaChain({
apiKey: 'your-api-key',
network: 'mainnet', // or 'testnet'
});

Python

from arthachain import ArthaChain

client = ArthaChain(
api_key='your-api-key',
network='mainnet' # or 'testnet'
)

Go

import "github.com/arthachain/sdk"

client := arthachain.NewClient(
arthachain.WithAPIKey("your-api-key"),
arthachain.WithNetwork("mainnet"), // or "testnet"
)

Rust

use artha_chain::Client;

let client = Client::new()
.with_api_key("your-api-key")
.with_network("mainnet") // or "testnet"
.build()?;

Environment Variables

You can also configure the SDK using environment variables:

ARTHA_CHAIN_API_KEY=your-api-key
ARTHA_CHAIN_NETWORK=mainnet

Next Steps