SDKConfig
SDKEnvironment
PoolConfig
SessionKeyConfig
ApprovalTransaction
Passed toonSignTransaction during session key setup:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
TypeScript types for SDK initialization and configuration.
interface SDKConfig {
apiKey: string;
apiUrl: string;
environment: SDKEnvironment;
merchantId?: string;
mode?: PaymentMode;
pool?: PoolConfig;
sessionKey?: SessionKeyConfig;
}
type SDKEnvironment = 'sandbox' | 'production';
interface PoolConfig {
customerId: string;
}
interface SessionKeyConfig {
walletAddress: string;
defaultDailyLimit: string;
autoRenew: boolean;
durationMs?: number;
onSignTransaction: (tx: ApprovalTransaction) => Promise<string>;
onSetupComplete?: () => void;
onSetupCancel?: () => void;
}
onSignTransaction during session key setup:
interface ApprovalTransaction {
to: string; // ERC-20 contract address
data: string; // Encoded calldata
value: string; // ETH value (typically "0" for ERC-20 approvals)
}
interface DeviceRegistrationRequest {
merchant_id: string;
device_key: string; // PEM-encoded ECDSA public key
metadata: {
model: string;
platform: string;
os_version: string;
app_version: string;
device_uuid: string;
};
}
interface DeviceRegistrationResponse {
success: boolean;
status: 'registered' | 'replaced';
}
