/** * Type declarations for orbis1-rgb-lib * * This provides TypeScript type definitions for the native RGB library bindings. * Updated to match wrapper.js from orbis1-rgb-lib package. */ declare module 'orbis1-rgb-lib' { export const AssetSchema: { Nia: 'Nia'; Uda: 'Uda'; Cfa: 'Cfa'; Ifa: 'Ifa'; }; export const BitcoinNetwork: { Mainnet: 'Mainnet'; Testnet: 'Testnet'; Testnet4: 'Testnet4'; Regtest: 'Regtest'; Signet: 'Signet'; }; export const DatabaseType: { Sqlite: 'Sqlite'; }; /** Opaque handle returned by Wallet.goOnline(); do not construct manually. */ export interface Online {} export function dropOnline(online: Online): void; export function generateKeys( bitcoinNetwork: 'Mainnet' | 'Testnet' | 'Testnet4' | 'Regtest' | 'Signet' ): { mnemonic: string; xpub: string; accountXpubVanilla: string; accountXpubColored: string; masterFingerprint: string; }; export function restoreKeys( bitcoinNetwork: 'Mainnet' | 'Testnet' | 'Testnet4' | 'Regtest' | 'Signet', mnemonic: string ): { mnemonic: string; xpub: string; accountXpubVanilla: string; accountXpubColored: string; masterFingerprint: string; }; export function restoreBackup( backupPath: string, password: string, targetDir: string ): Promise; export interface WalletDataParams { dataDir: string; bitcoinNetwork: 'Mainnet' | 'Testnet' | 'Testnet4' | 'Regtest' | 'Signet'; databaseType: 'Sqlite'; accountXpubVanilla: string; accountXpubColored: string; maxAllocationsPerUtxo: string; // u32 as string vanillaKeychain?: string; // u8 as string, optional mnemonic?: string; masterFingerprint?: string; supportedSchemas?: Array<'Nia' | 'Uda' | 'Cfa'>; } export class WalletData { constructor(params: WalletDataParams); } export class Wallet { constructor(walletData: WalletData); drop(): void; backup(backupPath: string, password: string): void; backupInfo(): boolean; blindReceive( assetId: string | null, assignment: string, // JSON string of assignment object durationSeconds: string | null, // u32 as string transportEndpoints: string[], minConfirmations: string // u8 as string ): any; createUtxos( online: Online, upTo: boolean, num: string | null, // u8 as string size: string | null, // u32 as string feeRate: string, // u64 as string skipSync: boolean ): number; createUtxosBegin( online: Online, upTo: boolean, num: string | null, // u8 as string size: string | null, // u32 as string feeRate: string, // u64 as string skipSync: boolean ): string; createUtxosEnd(online: Online, signedPsbt: string, skipSync: boolean): number; deleteTransfers(batchTransferIdx: number | null, noAssetOnly: boolean): any; failTransfers( online: Online, batchTransferIdx: number | null, noAssetOnly: boolean, skipSync: boolean ): any; getAddress(): string; getAssetBalance(assetId: string): any; getAssetMetadata(assetId: string): any; getBtcBalance(online: Online, skipSync: boolean): any; getFeeEstimation(online: Online, blocks: string): number; // u16 as string goOnline(skipConsistencyCheck: boolean, electrumUrl: string): any; issueAssetCFA( name: string, details: string | null, precision: string, // u8 as string amounts: string[], // array of u64 as strings filePath: string | null ): any; issueAssetNIA( ticker: string, name: string, precision: string, // u8 as string amounts: string[] // array of u64 as strings ): any; issueAssetUDA( ticker: string, name: string, details: string | null, precision: string, // u8 as string mediaFilePath: string | null, attachmentsFilePaths: string[] ): any; listAssets(filterAssetSchemas: string[]): any; listTransactions(online: Online, skipSync: boolean): any[]; listTransfers(assetId: string | null): any; listUnspents(online: Online, settledOnly: boolean, skipSync: boolean): any; refresh(online: Online, assetId: string | null, filter: string[], skipSync: boolean): any; send( online: Online, recipientMap: any, donation: boolean, feeRate: string, // u64 as string minConfirmations: string, // u8 as string skipSync: boolean ): any; sendBegin( online: Online, recipientMap: any, donation: boolean, feeRate: string, // u64 as string minConfirmations: string, // u8 as string externalInputs?: any | null, externalOutputs?: any | null ): string; sendEnd(online: Online, signedPsbt: string, skipSync: boolean): any; verifyConsignmentAmount( consignmentPath: string, recipientId: string, expectedAmount: string // u64 as string ): boolean; sendBtc( online: Online, address: string, amount: string, // u64 as string feeRate: string, // u64 as string skipSync: boolean ): string; signPsbt(psbt: string): string; sync(online: Online): void; witnessReceive( assetId: string | null, assignment: string, // JSON string of assignment object durationSeconds: string | null, // u32 as string transportEndpoints: string[], minConfirmations: string // u8 as string ): any; } export function invoiceData(invoice: string): any; }