UNPKG

@btc-vision/transaction

Version:

OPNet transaction library allows you to create and sign transactions for the OPNet network.

47 lines 2.01 kB
import { RotationSignerBase } from './IRotationSigner.js'; import { UnisatSigner } from '../transaction/browser/extensions/UnisatSigner.js'; /** * Supported signer types for address rotation (includes browser signers) */ export type RotationSigner = RotationSignerBase | UnisatSigner; /** * Map of addresses to their respective signers for address rotation mode. * Each UTXO address can have its own dedicated signer. */ export type SignerMap = Map<string, RotationSigner>; /** * Configuration for address rotation mode. * When enabled, each UTXO can be signed by a different signer based on its address. */ export interface AddressRotationConfig { /** * Whether address rotation mode is enabled. * When true, the signerMap will be used to find the appropriate signer for each UTXO. * When false, the default single signer will be used for all inputs. */ readonly enabled: boolean; /** * Map of addresses to their respective signers. * The key is the address (from UTXO.scriptPubKey.address). * The value is the signer that controls that address. */ readonly signerMap: SignerMap; } /** * Creates a new SignerMap from an array of address-signer pairs. * @param pairs - Array of [address, signer] tuples * @returns A SignerMap ready for use with address rotation */ export declare function createSignerMap(pairs: ReadonlyArray<readonly [string, RotationSigner]>): SignerMap; /** * Creates an AddressRotationConfig with the given signers. * @param signers - Map or array of address-signer pairs * @returns AddressRotationConfig ready for use */ export declare function createAddressRotation(signers: SignerMap | ReadonlyArray<readonly [string, RotationSigner]>): AddressRotationConfig; /** * Creates a disabled address rotation config (single signer mode). * @returns AddressRotationConfig with rotation disabled */ export declare function disabledAddressRotation(): AddressRotationConfig; //# sourceMappingURL=AddressRotation.d.ts.map