Configuration object passed to the OnboardingBridgeSDK constructor.

import { OnboardingBridgeSDK } from '@stellar/c-address-onboarding-bridge-sdk';
import { Networks } from '@stellar/stellar-sdk';

const sdk = new OnboardingBridgeSDK({
contractId: 'CA...deployed_contract_address',
rpcUrl: 'https://soroban-testnet.stellar.org',
networkPassphrase: Networks.TESTNET,
});
interface BridgeConfig {
    baseReserveStroops?: string | number;
    contractId: string;
    hooks?: ObservabilityHooks;
    networkPassphrase: string;
    retry?: RpcRetryOptions;
    rpcUrl: string;
    timeout?: number;
}

Properties

baseReserveStroops?: string | number

Network base reserve in stroops, used by OnboardingBridgeSDK.estimateCost to compute the minimum account balance.

Both the public and test networks currently use 0.5 XLM (5,000,000 stroops), which is the default. Override it if you run against a network configured with a different reserve.

contractId: string

C-address (contract ID) of the deployed OnboardingBridge Soroban contract. Must start with C and be a valid Stellar contract address.

Optional observability hooks for instrumenting SDK method calls and RPC round-trips. Supply any subset of the four callbacks to integrate with your metrics, logging, or tracing infrastructure.

Two ready-made implementations are provided:

import { ConsoleLogger } from '@stellar/c-address-onboarding-bridge-sdk';

const sdk = new OnboardingBridgeSDK({
contractId: 'CA...',
rpcUrl: 'https://soroban-testnet.stellar.org',
networkPassphrase: Networks.TESTNET,
hooks: ConsoleLogger,
});
import { trace } from '@opentelemetry/api';
import { createOpenTelemetryHooks } from '@stellar/c-address-onboarding-bridge-sdk';

const sdk = new OnboardingBridgeSDK({
// ...
hooks: createOpenTelemetryHooks(trace.getTracer('bridge-sdk')),
});
networkPassphrase: string

Network passphrase matching the RPC node. Use Networks.PUBLIC for mainnet and Networks.TESTNET for testnet. Mismatched passphrases cause all transactions to be rejected.

Optional retry configuration for automatic exponential-backoff retries on transient RPC failures (network errors, timeouts, rate limits, 502/503/504).

Read-only calls (simulation, getAccount, etc.) use up to maxRetries attempts. State-changing calls (sendTransaction) use at most 1 retry to avoid double-submission.

Omit to use the defaults (3 retries for reads). Set maxRetries: 0 to disable automatic retries entirely.

const sdk = new OnboardingBridgeSDK({
// ...
retry: {
maxRetries: 5,
baseDelayMs: 500,
onRetry: ({ attempt, delayMs, error }) =>
console.warn(`RPC retry ${attempt} in ${delayMs}ms`, error),
},
});
rpcUrl: string

Soroban-compatible RPC endpoint URL.

'https://soroban-testnet.stellar.org'
'https://mainnet.sorobanrpc.com'
timeout?: number

Optional timeout in seconds for Soroban operations (simulation and send). Defaults to 30 seconds when omitted.