import { PolkadotClient, SS58String } from 'polkadot-api'; type BindingErrorKind = "dispatch_error" | "rpc_error" | "client_error" | "unknown"; declare class PersonalIdBindingError extends Error { readonly dispatchError?: unknown; readonly kind: BindingErrorKind; constructor(message: string, options?: ErrorOptions & { kind?: BindingErrorKind; dispatchError?: unknown; }); } type SignMember = (message: Uint8Array) => Uint8Array | Promise; interface BindPersonalIdToAccountParams { /** Untyped papi API for the People chain. */ typedApi: unknown; /** Polkadot client used to submit the unsigned extrinsic. */ client: PolkadotClient; /** Numeric PersonalId of the personhood being bound. */ personalId: bigint; /** SS58 address to bind to the PersonalId. */ account: SS58String; /** * Signs `blake2_256(implication)` with the personhood bandersnatch member * key. Must return a 96-byte signature. */ signMember: SignMember; /** * Override the `call_valid_at` block number. Defaults to the current best * block number queried from the chain. */ callValidAt?: number; progress?: BindingProgress; } interface BindPersonalIdToAccountResult { extrinsicHex: `0x${string}`; blockHash: string; } interface BindingProgress { onBestBlock?: (blockHash: string) => void; onBroadcasted?: () => void; } /** * Build the AsPerson extension value for a `set_personal_id_account` General * extrinsic. Exported so unit tests can assert that the Bandersnatch signature * is encoded as a hex string (papi 2.x `SizedBytes(96)` contract). * * @test-only — production callers use `bindPersonalIdToAccount` directly. */ declare function buildAsPersonExtensionValue(signature: Uint8Array, personalId: bigint): { type: string; value: [string, bigint]; }; declare const bindPersonalIdToAccount: ({ typedApi, client, personalId, account, signMember, callValidAt, progress, }: BindPersonalIdToAccountParams) => Promise; export { type BindPersonalIdToAccountParams, type BindPersonalIdToAccountResult, type BindingErrorKind, type BindingProgress, PersonalIdBindingError, type SignMember, bindPersonalIdToAccount, buildAsPersonExtensionValue };