Skip to content

Environments

The environment field in SDKConfig selects the target network and automatically configures all service endpoints.

Environments at a glance

EnvironmentNetworkAPI Key PrefixGas-FreeUse Case
TESTNET4Bitcoin Testnet4pk_test_Development and integration testing
REGTESTLocal regtestpk_test_Local/CI unit testing
MAINNETBitcoin Mainnetsk_live_Production

TESTNET4

typescript
import { Orbis1SDK, Environment } from 'orbis1-sdk-node';

const sdk = new Orbis1SDK({
  apiKey: 'pk_test_your_key',
  environment: Environment.TESTNET4,
  // ...
});
  • Network: Bitcoin Testnet4 (BIP-173 tbX addresses)
  • Indexer: ssl://electrum.iriswallet.com:50053
  • RGB Proxy: rpcs://proxy.iriswallet.com/0.2/json-rpc
  • Coins: Testnet4 BTC (worthless; acquire from a faucet)
  • Gas-Free service: Available

MAINNET

typescript
const sdk = new Orbis1SDK({
  apiKey: 'sk_live_your_key',
  environment: Environment.MAINNET,
  // ...
});
  • Network: Bitcoin Mainnet (BIP-173 bcX addresses)
  • Gas-Free service: Available
  • IFA schema: Not available on mainnet
  • Requires sk_live_ API keys

REGTEST

typescript
const sdk = new Orbis1SDK({
  apiKey: 'pk_test_your_key',
  environment: Environment.REGTEST,
  wallet: {
    enabled: true,
    keys,
  },
  // Gas-Free NOT available here
});
  • Network: Local Bitcoin regtest
  • Indexer URL: Set by your local regtest environment (not a public URL)
  • Gas-Free service: Not available (OrbisError thrown at initialization if enabled)
  • Use for local integration testing with a private bitcoind + RGB node

API key format

TypeFormatUsed with
Test keypk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTESTNET4, REGTEST
Live keysk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxMAINNET

Mismatching key type and environment causes a ConfigurationError at SDK construction time.

Public service endpoints (read-only reference)

ServiceTestnet4 URLMainnet URL
Electrum indexerssl://electrum.iriswallet.com:50053(contact team)
RGB proxyrpcs://proxy.iriswallet.com/0.2/json-rpc(contact team)
Gas-Free APIhttps://gasfree-dev.orbis1.iohttps://gasfree.orbis1.io

Gas-Free API endpoints

The SDK calls these endpoints automatically. Listed for reference and debugging:

EndpointMethodDescription
/api/v1/generate-fee-quotePOSTRequest a fee quote
/api/v1/sign-psbtPOSTSubmit PSBT for co-signing
/api/v1/verify-transferPOSTConfirm broadcast to service

Released under the MIT License.