/** * A blockchain account * @public */ declare interface Account { did?: DID; blockchainAddress?: BlockchainAddress; chain?: CAIP2; caip10?: CAIP10; identifier?: string; } /** * Address * Represents a physical address * @public */ declare type Address = { /** Identifies the nature of the address. */ addressType: AddressTypeCode; /** Identification of a division of a large organisation or building. */ department?: string; /** Identification of a sub-division of a large organisation or building. */ subDepartment?: string; /** Name of a street or thoroughfare. */ streetName?: string; /** Number that identifies the position of a building on a street. */ buildingNumber?: string; /** Name of the building or house. */ buildingName?: string; /** Floor or storey within a building. */ floor?: string; /** Numbered box in a post office. */ postBox?: string; /** Building room number. */ room?: string; /** Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail. */ postcode?: string; /** Name of a built-up area, with defined boundaries, and a local government. */ townName: string; /** Specific location name within the town. */ townLocationName?: string; /** Identifies a subdivision within a country subdivision. */ districtName?: string; /** Identifies a subdivision of a country such as state, region, province. */ countrySubDivision?: string; /** Information that locates and identifies a specific address, presented in free format text. */ addressLine?: string[]; /** Nation with its own government. */ country: ISOCountryCode; }; /** * Address Type Code * Specifies the type of address * @public */ declare type AddressTypeCode = 'HOME' | 'BIZZ' | 'GEOG'; /** * Who is the agent acting on behalf of the counterparty * @public */ declare interface Agent { /** * Absent on a self-hosted agent chosen for a deposit without a `source`, * where there is no address to derive it from. */ did?: DID; type: AgentType; logo?: URI; url?: URI; name?: string; verified?: boolean; } /** * Explicit layout configuration for the agent selection step. * * @remarks * Controls which options appear in the main selection area vs. behind the * "Can't find what you're looking for?" fallback toggle. * * When the main section has no options (empty or all filtered out), fallback options * are promoted and shown inline. When the main section has only one option, a dedicated * single-option layout is used. * * @public */ declare interface AgentSections { /** Options shown in the main selection area (always visible) */ main?: SectionOption[]; /** Options shown behind the "Can't find what you're looking for?" fallback toggle */ fallback?: SectionOption[]; } /** * The type of Agent. Either a wallet or a VASP * @public */ declare enum AgentType { PRIVATE = "WALLET", VASP = "VASP" } /** * Beneficiary * Represents the receiver of the requested VA transfer * @public */ declare type Beneficiary = { /** Array of persons associated with the beneficiary */ beneficiaryPersons?: Person[]; /** Array of account numbers, maximum 100 characters each */ accountNumber?: string[]; }; /** * Fields specific to the beneficiary of a transaction * @public */ declare type BeneficiaryFields = { destination: Destination; }; /** * Beneficiary VASP * Represents the VASP which receives the VA transfer * @public */ declare type BeneficiaryVASP = { /** The beneficiary VASP information */ beneficiaryVASP?: Person; }; /** * A blockchain address * @public */ /** * A native blockchain address string * * @remarks * Represents a blockchain address in the native format specific to a particular chain. * This could be an Ethereum address, Bitcoin address, or other chain-specific format. * The address format and validation rules depend on the underlying blockchain. * * @example "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" // Ethereum address * @example "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" // Bitcoin address * @example "cosmos1t2uflqwqe0fsj0shcfkrvpukewcw40yjj6hdc0" // Cosmos address * @public */ declare type BlockchainAddress = string; /** * Chain Agnostic Account Identifier (CAIP-10) * Represents an account/address on a specific blockchain following the CAIP-10 specification. * Extends CAIP-2 by adding the account address specific to that chain. * * Format: `{caip2}:{address}` * - caip2: The CAIP-2 chain identifier (e.g. 'eip155:1') * - address: Chain-specific account address format * * @example "eip155:1:0x742d35Cc6634C0532925a3b844Bc454e4438f44e" // Ethereum account on mainnet * @example "bip122:000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f:128Lkh3S7CkDTBZ8W7BbpsN3YYizJMp8p6" // Bitcoin account on mainnet * @example "cosmos:cosmoshub-3:cosmos1t2uflqwqe0fsj0shcfkrvpukewcw40yjj6hdc0" // Cosmos account * @see {@link https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md | CAIP-10 Specification} * @public */ export declare type CAIP10 = `${CAIP2}:${string}`; /** * Chain Agnostic Asset Identifier (CAIP-19) * Represents an asset/token on a specific blockchain following the CAIP-19 specification. * Extends CAIP-2 by adding asset type and identifier information. * * Format: `{caip2}/{asset_namespace}:{asset_reference}` * - caip2: The CAIP-2 chain identifier (e.g. 'eip155:1') * - asset_namespace: The asset standard (e.g. 'erc20', 'erc721', 'slip44') * - asset_reference: Chain/standard-specific asset identifier * * @example "eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f" // DAI token on Ethereum mainnet * @example "eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d" // CryptoKitties NFT contract * @example "cosmos:cosmoshub-3/slip44:118" // ATOM token on Cosmos Hub * @see {@link https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md | CAIP-19 Specification} * @public */ declare type CAIP19 = `${CAIP2}/${string}:${string}`; /** * Chain Agnostic Blockchain Identifier (CAIP-2) * Represents a blockchain in a chain-agnostic way following the CAIP-2 specification. * The identifier consists of a namespace and reference separated by a colon. * * Format: `namespace:reference` * - namespace: Represents the blockchain namespace (e.g. 'eip155', 'bip122', 'cosmos') * - reference: Chain-specific identifier within that namespace * * @example "eip155:1" // Ethereum Mainnet * @example "bip122:000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" // Bitcoin Mainnet * @example "cosmos:cosmoshub-3" // Cosmos Hub Mainnet * @see {@link https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md | CAIP-2 Specification} * @public */ declare type CAIP2 = `${string}:${string}`; /** * Options for callback and redirect URIs * @public */ export declare interface CallbackOptions { callback?: URI; redirectUri?: URI; } /** * Represents a cancel component message * @internal */ declare type Cancel = { type: CMType.CANCEL; }; /** * Component Message Type enum representing different message types that can be sent * between the host and component. * * @remarks * - COMPLETE: Indicates a completed operation with response data * - RESIZE: Request to adjust component size/dimensions * - RESULT: Operation result notification * - READY: Component is initialized and ready * - INVALID: Validation failed with errors * - ERROR: Operation encountered an error * - CANCEL: Operation was cancelled * @public */ declare enum CMType { COMPLETE = "complete", RESIZE = "resize", RESULT = "result", READY = "ready", INVALID = "invalid", ERROR = "error", CANCEL = "cancel", WARNING = "warning", INFO = "info" } /** * Represents a completed component message * @typeParam T - The overall Value type being returned * @typeParam R - The response type; defaults to `TransactionResponse` * @param response - The Response object which wraps T * @public */ declare type Completed> = { type: CMType.COMPLETE; response: R; }; /** * Union type representing all possible messages that can be sent from a component * * @remarks * Components communicate their state and results back to the host application * through these message types: * - Completed: Operation finished successfully with response data * - Cancel: User cancelled the operation * - Error: Operation failed with error message * - ResizeRequest: Component needs to adjust its dimensions * - InvalidValue: Validation failed with current partial value * * @typeParam T - The value type that will be returned in Completed messages * @typeParam R - The response type carried by Completed messages * * @see {@link Completed} For successful completion message format * @see {@link Cancel} For cancellation message format * @see {@link Error} For error message format * @see {@link Ready} For ready message format * @see {@link ResizeRequest} For resize message format * @see {@link InvalidValue} For validation failure message format * @see {@link Warning} For warning message format * @see {@link Info} For info message format * @public */ declare type ComponentMessage> = Completed | Cancel | Error_2 | Ready | ResizeRequest | InvalidValue | Warning | Info; /** * Base interface for requests sent to SDK components * * @remarks * Defines core properties that all component requests share: * - Optional unique request ID for tracking/correlating requests and responses * - Optional customer detailsfor pre-filling component data * * This interface is extended by specific request types like: * - Transaction requests for sending/receiving assets * - Connection requests for establishing VASP to VASP communication * * @see {@link Transaction} For transaction-specific request properties * @see {@link ConnectionRequest} For connection-specific request properties * @public */ declare interface ComponentRequest { requestId?: RequestID; customer?: Counterparty; } /** * Base response interface for all SDK component operations * * @remarks * Provides standardized response propertiesfor component interactions: * - requestID: Links response back to the originating request * - valid: Boolean indicating if the operation was valid/successful * - status: Current verification status of the operation * - errors: Array of validation errors if any occurred * * This interface is extended by specific response types like: * - TransResponse for transaction operations * - ConnectionResponse for VASP connection operations * * @see {@link Status} For possible status values * @see {@link ValidationError} For error structure * @see {@link TransactionResponse} For transaction-specific responses * @public */ declare interface ComponentResponse { requestID: RequestID; valid: boolean; status: Status; errors: ValidationError[]; } /** * What the host passes to a v2.1 connect component * @public */ export declare type ConnectionInput = Pick; /** * Metadata of a Counterparty Assist connection on v2.1 * @public */ export declare type ConnectionMetadata = ConnectionMetadata_2 & { /** * Who acts on the counterparty's result, for a host reading a webhook. `host`: * the result is the `{ transfer }` to submit. `component`: ignore it, the * component that shared the link completes with it. Unset means `component`. * @alpha */ readonly audience?: 'host' | 'component'; /** * The jti of the counterparty-assist token sealed into this link (v2.1). Revoke * it with `POST /api/v1/entities/{entityDID}/delegate-token/{jti}/revoke` once * the connection is completed or closed. * @alpha */ readonly tokenId?: string; }; declare interface ConnectionMetadata_2 { readonly nodeUrl?: string; readonly participants: readonly string[]; readonly transactionType: TransactionType; readonly locale?: string; /** * Delivery target for Counterparty Assist completion/closure webhooks. * Sent and stored as plaintext so the connection can route the event, so do not * embed secrets (e.g. `?token=`) in this URL. Webhook payloads carry the encrypted * `sealed` blob, whose successful decryption is itself an authenticity check; * signed delivery is provided by the future Svix-backed pipeline. */ readonly webhookUrl?: string; } /** * An object representing options for a Connection Request * @public */ export declare type ConnectionOptions = Omit; /** * An object representing a connection request * @public */ declare interface ConnectionRequest extends ComponentRequest { asset: TransactionAsset; /** * The account to collect a proof for. * * @remarks * When set, the component narrows the connected wallet to this account and * only offers to verify that one, instead of letting the user pick any * address the wallet reports. Connecting fails if the wallet does not hold * it. When omitted, the user chooses which of their addresses to prove. * * A bare blockchain address is resolved against the chain of {@link ConnectionRequest.asset}. * * @see {@link OwnershipProof.address} For the proved account on the response */ address?: BlockchainAddress | CAIP10; } /** * Configuration for the terms and conditions consent checkbox. * * @remarks * - `undefined` or `true`: show default T&C (current behavior) * - `false`: hide T&C entirely * - `{ label?, description? }`: show with custom text (translations are the customer's responsibility) * * @public */ declare type ConsentConfig = boolean | { /** Custom label text. Replaces the default "Accept terms and conditions". */ label?: string; /** Custom description text. Replaces the default sharing-info description. */ description?: string; }; /** * Configuration for the contact support action. * * @remarks * Contact support is **enabled** by including `'contact-support'` in * `agentSections.main` or `agentSections.fallback`. This object only * configures the behaviour when the feature is enabled. * * - With `contactSupport: { supportUrl: "..." }` — clicking sends an info * message to the host **and** attempts to open the URL as a fallback. * - Without `contactSupport` — clicking only sends an info message; the * host decides what to do. * * @public */ declare interface ContactSupportConfig { /** URL to open when the user clicks the support button */ supportUrl: string; } /** * Converts NaturalPersonName from V1 format to V2 format * Changes the nameIdentifierType field name to naturalPersonNameIdentifierType */ export declare function convertNaturalPersonNameToV2(name: NaturalPersonName): NaturalPersonNameV2; /** * The counterparty of a transaction. * @public */ /** * Interface representing a party involved in a transaction other than the initiator * * @remarks fines the core properties that identify and describe a counterparty: * - name: The display or legal name of the counterparty * - accountNumber: An account identifier/reference number * - did: Decentralized identifier for the counterparty * - type: Classification as natural person, legal entity, or self * - verified: Whether the counterparty's identity has been verified * - geographicAddress: Physical/mailing address information * - nationalIdentification: Government-issued ID details * - website: Official web presence * - phone: Contact phone number * - email: Contact email address * * This interface serves as the base for more specific counterparty types: * @see {@link NaturalPerson} For individual person properties * @see {@link LegalPerson} For organization/entity properties * * @public */ declare interface Counterparty { name?: string; accountNumber?: string; did?: DID; type?: PersonType; verified?: boolean; geographicAddress?: Address; nationalIdentification?: NationalIdentification; website?: URI; phone?: string; email?: string; } /** * Message types for the counterparty-assist token exchange. Kept out of * {@link CMType} and {@link HMType} so adding them cannot break a host's * exhaustive switch over those enums. * @internal */ export declare const COUNTERPARTY_ASSIST_MESSAGES: { readonly REQUEST_TOKEN: "requestCounterpartyAssistToken"; readonly TOKEN: "counterpartyAssistToken"; }; /** * Counterparty Assist Configuration options for recipient selection * * @remarks * Controls for each person type, whether to show the share feature or not. * * @public */ declare type CounterpartyAssistConfig = boolean | { counterpartyTypes: PersonType[]; /** @remarks Requires a transactionId to be passed in. */ identityVerification?: IdentityVerificationConfig; /** * Optional URL that receives an `EC.counterpartyAssist*` webhook when the * counterparty completes or closes their part. MVP-only per-link override; * superseded by Portal-managed subscriptions post-migration. * * Transmitted and stored as plaintext, so do not embed secrets (e.g. `?token=`) * in this URL. Payloads carry the encrypted `sealed` blob (a successful decrypt * is itself an authenticity check); signed delivery is provided by the future * Svix-backed pipeline. */ webhookUrl?: string; }; /** * The state of a shared Counterparty Assist link on v2.1, from {@link getRefreshResult} * or the webhook * * @remarks * A completed link shared with `audience: 'host'` carries the `{ transfer }` to submit. * `metadata.tokenId` is the jti of the link's counterparty-assist token. * @public */ export declare type CounterpartyAssistResult = { readonly id: UUID; readonly metadata: ConnectionMetadata; readonly status: 'active' | 'closed'; } | { readonly id: UUID; readonly metadata: ConnectionMetadata; readonly status: 'completed'; readonly result: TransferResponse; }; /** * What a withdrawal or deposit component completes with when the user shares the * transaction with a third-party Counterparty Assist instead of finishing it * * @remarks * The counterparty finishes later. Read their result with {@link getRefreshResult} * on `refreshSource`, or from the webhook. Narrow with `'refreshSource' in result`. * @public */ export declare type CounterpartyAssistShared = { refreshSource: RefreshSource; }; /** * The host's reply to a {@link RequestCounterpartyAssistToken}: the minted token and its * jti, or an `error` instead of both. * @internal */ export declare type CounterpartyAssistToken = { type: typeof COUNTERPARTY_ASSIST_MESSAGES.TOKEN; reqid: string; token: string; jti: string; } | { type: typeof COUNTERPARTY_ASSIST_MESSAGES.TOKEN; reqid: string; error: string; }; /** * The fields of the v2.1 node's `POST /api/v1/transfers` body that a component fills in * * @remarks * The host posts it unchanged with its own token, adding `ref` (a UUID) and, for a deposit, * `settlement_id`. Amounts are in whole units of the asset. * @public */ export declare interface CreateTransferFields { asset: string; amount: string; fiat_amount_usd?: string; originator_id?: string; originator?: PartyProfile; originator_entity_did?: DID; originator_proof_of_ownership?: WalletProof; beneficiary_id?: string; beneficiary?: PartyProfile; beneficiary_entity_did?: DID; beneficiary_proof_of_ownership?: WalletProof; source_address?: string; settlement_address?: string; } /** * A crypto credential * @public */ declare type CryptoCredential = `${string}.${string}.mastercard`; /** * Date and Place of Birth * Represents the date and place of birth for a natural person * @public */ declare type DateAndPlaceOfBirth = { /** Date of birth in ISO 8601 format (YYYY-MM-DD) */ dateOfBirth?: ISODate; /** Place of birth (max 70 characters) */ placeOfBirth?: string; }; /** * An object representing a deposit transaction * @public */ declare interface Deposit extends OriginatorFields, Transaction, Refreshable { } /** * What the host passes to a v2.1 deposit component * @public */ export declare type DepositInput = Partial>; /** * The destination of a transaction either a blockchain address, a CAIP-19 address, or a travel address. * @public */ declare type Destination = BlockchainAddress | CAIP10 | CryptoCredential | TravelAddress; /** * A Decentralized Identifier * @public */ export declare type DID = `did:${string}:${string}`; /** * Digital Token Identifier (DTI) following ISO 24165 standard * * @remarks * A standardized identifier for digital assets and cryptocurrencies. The DTI system * provides unique and unambiguous identification of digital tokens, supporting interoperability * and clarity in financial markets. * * Format: `DTI[NNNNN]` where N is a digit * * @example "DTI00001" // Example DTI for Bitcoin * @example "DTI00002" // Example DTI for Ethereum * * @see {@link https://dtif.org/ | Digital Token Identifier Foundation} * @see {@link https://www.iso.org/standard/77895.html | ISO 24165} * @public */ declare type DTI = string; /** * An embedded Notabene component * * @typeParam V - The transaction value type * @typeParam O - The options type * @typeParam R - The response type that `completion()` resolves with * @public */ export declare class EmbeddedComponent> { private _url; private _value; private _options?; private _errors; private iframe?; private eventManager; private modal?; private messageHandler?; private tokenRefresher?; private authToken?; /** * Creates an instance of EmbeddedComponent. * @param url - The URL of the embedded component * @param value - The initial transaction value * @param fetchToken - Supplies the auth token, and refreshes it before it expires * @internal */ constructor(url: string, value: Partial, options?: O, fetchToken?: () => Promise); /** * Gets the URL of the embedded component. With `fetchToken` configured the URL * carries no token, since it is fetched when the component is shown. * @returns The URL of the embedded component */ get url(): string; /** * Gets the current transaction value * @returns The current transaction value */ get value(): Partial; get options(): O | undefined; get errors(): ValidationError[]; private urlWithToken; private tokenError; /** * Opens the component URL in the current window */ open(): void; /** * Mounts the component to a parent element * @param parentId - The ID of the parent element * @throws Will throw an error if the parent element is not found */ mount(parentId: string): void; /** * Embeds the component into a parent element * @param parent - The parent element to embed the component into */ embed(parent: Element, modal?: boolean): void; private connectPort; /** * Fetches the first token and navigates with it, then posts each refreshed * token to the component until the target is gone. */ private startRefresh; removeEmbed(): void; /** * Sends a message to the embedded component * @param message - The message to send */ send(message: HostMessage): void; /** * Adds an event listener for a specific message type * @param messageType - The type of message to listen for * @param callback - The callback function to execute when the message is received */ on(messageType: string, callback: MessageCallback): () => void; /** * Removes an event listener for a specific message type * @param messageType - The type of message to stop listening for * @param callback - The callback function to remove */ off(messageType: string, callback: MessageCallback): void; /** * Updates the transaction value and sends an update message to the component * @param value - The new transaction value */ update(value: Partial, options?: O): void; /** * Waits for the component to complete and returns the transaction response * @returns A promise that resolves with the transaction response */ completion(): Promise; /** * Opens the component in a modal dialog */ openModal(): Promise; /** * Closes the modal dialog * */ closeModal(): void; /** * Opens the component in a popup window. This may be needed to support many self-hosted wallets * @returns A promise that resolves with the transaction response * @see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#restrictions) * @see [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy) */ popup(): Promise; } /** * Represents an error component message * @param message - Error message * @param description - Description of the error message * @param identifier - Identifier code of the error message * @public */ declare type Error_2 = { type: CMType.ERROR; message: string; description?: string; identifier?: ErrorIdentifierCode; }; /** * Represents an error identifier code * @public */ declare enum ErrorIdentifierCode { SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", TOKEN_INVALID = "TOKEN_INVALID" } /** * Field properties * @public */ declare type FieldOptions = boolean | string[] | { optional: boolean; }; /** * Field type configuration * @public */ declare type FieldTypes = { naturalPerson?: NaturalPersonFields; legalPerson?: LegalPersonFields; }; /** * Reads the result of a shared Counterparty Assist link on v2.1 * * @param refreshSource - The `refreshSource` from {@link CounterpartyAssistShared} * @returns The connection result; a completed `host` result carries the `{ transfer }` to submit * @public */ export declare function getRefreshResult(refreshSource: RefreshSource): Promise; /** * A section of a WithdrawalAssist or DepositAssist screen that can be left out, * via {@link TransactionOptions.hide}. * * `'header'` is the card header — its status icon, title, description and * participant logo. The card body and footer are unaffected, so the Notabene * attribution in the footer still shows. * * @public */ declare type HideSection = 'asset' | 'destination' | 'counterparty' | 'agent' | 'header'; /** * Host Message Type enum representing different message types that can be sent * from the host application. * * @remarks * - UPDATE: Message to update component value/state * - REQUEST_RESPONSE: Message requesting a response from component * - TOKEN: Message delivering a refreshed delegate token to the component * @public */ declare enum HMType { UPDATE = "update", REQUEST_RESPONSE = "requestResponse", TOKEN = "token" } /** * Union type representing all possible messages that can be sent from the host application * to a component * * @remarks * Supports update messages, which allow the host to modify component state and * configuration without requiring full reinitialization, and token messages, which * deliver a refreshed delegate token. * * @typeParam T - The value type that components operate on * @typeParam O - The options type used to configure component behavior * * @see {@link UpdateValue} For the structure of update messages * @see {@link RefreshToken} For the structure of token messages * @see {@link HMType} For message type constants * @public */ declare type HostMessage = UpdateValue | RefreshToken; /** * Configuration options for identity verification * @public */ declare type IdentityVerificationConfig = { /** The required verification method. If not specified, none will be used */ requiredMethod?: IdentityVerificationMethod; }; /** * Available methods for identity verification * @public */ declare enum IdentityVerificationMethod { SMS = "sms" } /** * Represents an info component message * @param message - Info message * @param description - Description of the info message * @param identifier - Identifier code of the info message * @public */ declare type Info = { type: CMType.INFO; message: string; description?: string; identifier?: InfoIdentifierCode; }; /** * Identifier codes for info messages * @public */ declare enum InfoIdentifierCode { CONTACT_SUPPORT = "CONTACT_SUPPORT" } /** * Intermediary VASP * Represents an intermediary Virtual Asset Service Provider * @public */ declare type IntermediaryVASP = { /** The intermediary VASP information */ intermediaryVASP?: Person; /** The sequence number of this VASP in the transfer path */ sequence?: number; }; /** * Represents an invalid value component message * @typeParam T - The overall Value type being returned * @param value - The current Partial value * @param errors - Array of validation errors * @internal */ declare type InvalidValue = { type: CMType.INVALID; value: Partial; errors: ValidationError[]; }; /** * ISO-3166 Alpha-2 country code * @example "US" for United States, "GB" for United Kingdom * @public */ declare type ISOCountryCode = string; /** * 3 letter ISO currency code * @public */ declare type ISOCurrency = string; /** * A point in time, represented as a day within the calendar year. Compliant with ISO 8601. * Format: YYYY-MM-DD * @example "2023-05-15" for May 15, 2023 * @public */ declare type ISODate = `${number}-${number}-${number}`; /** * IVMS101 definition * * @public */ declare type IVMS101 = { originator?: Originator; beneficiary?: Beneficiary; originatingVASP?: OriginatingVASP; beneficiaryVASP?: BeneficiaryVASP; transferPath?: TransferPath; payloadMetadata?: PayloadMetadata; }; /** * Ids of the wallets the embedded component always offers under a fixed id. * * `'ledger-usb-wallet'` and `'ledger-bluetooth-wallet'` are the two Ledger transports, * `'trezor'` is Trezor over Trezor Connect, and `'wallet-connect'` is the WalletConnect * (Reown AppKit) card that lists mobile wallets. * * @public */ declare type KnownWalletId = 'ledger-usb-wallet' | 'ledger-bluetooth-wallet' | 'trezor' | 'wallet-connect'; /** * Legal Person * Represents a legal person with all associated information * @public */ declare type LegalPerson = { /** The name of the legal person */ name: LegalPersonName; /** The address of the legal person */ geographicAddress?: Address[]; /** A distinct identifier that uniquely identifies the person to the institution in context */ customerNumber?: string; /** A distinct identifier used by governments to uniquely identify a legal person */ nationalIdentification?: NationalIdentification; /** The country in which the legal person is registered */ countryOfRegistration?: ISOCountryCode; }; /** * Field properties for legal person fields * @public */ declare type LegalPersonFields = Partial<{ name: FieldOptions; lei: FieldOptions; website: FieldOptions; email: FieldOptions; phone: FieldOptions; geographicAddress: FieldOptions; nationalIdentification: FieldOptions & { nationalIdentifierType: NationalIdentifierTypeFieldOptions; }; countryOfRegistration: FieldOptions; }>; /** * Legal Person Name * Represents the full name structure for a legal person * @public */ declare type LegalPersonName = { /** Array of name identifiers */ nameIdentifier: LegalPersonNameID[]; /** Array of local name identifiers */ localNameIdentifier?: LocalLegalPersonNameID[]; /** Array of phonetic name identifiers */ phoneticNameIdentifier?: LocalLegalPersonNameID[]; }; /** * Legal Person Name ID * Represents a name identifier for a legal person * @public */ declare type LegalPersonNameID = { /** Name by which the legal person is known */ legalPersonName: string; /** The nature of the name specified */ legalPersonNameIdentifierType: LegalPersonNameTypeCode; }; /** * Legal Person Name Type Code * Specifies the type of name for a legal person * @public */ declare type LegalPersonNameTypeCode = 'LEGL' | 'SHRT' | 'TRAD'; /** * Local Legal Person Name ID * Represents a local name identifier for a legal person * @public */ declare type LocalLegalPersonNameID = { /** Name of the legal person, maximum 100 characters in local format */ legalPersonName?: string; /** Type of legal person name identifier */ legalPersonNameIdentifierType?: LegalPersonNameTypeCode; }; /** * Local Natural Person Name ID * Represents a local name identifier for a natural person * @public */ declare type LocalNaturalPersonNameID = { /** Primary identifier, maximum 100 characters in local format */ primaryIdentifier?: string; /** Secondary identifier, maximum 100 characters in local format */ secondaryIdentifier?: string; /** Type of name identifier */ nameIdentifierType?: NaturalPersonNameTypeCode; }; /** * Callback function for handling component messages. * * @typeParam T - The type of data contained in the component message * @typeParam R - The response type carried by completion messages * @param message - The message object containing the component data and type * @public */ declare type MessageCallback> = (message: ComponentMessage) => void; /** * National Identification * Represents a national identifier for a person or entity * @public */ declare type NationalIdentification = { /** National identifier (max 35 characters) */ nationalIdentifier?: string; /** Type of national identifier */ nationalIdentifierType?: NationalIdentifierTypeCode; /** Country that issued the national identifier */ countryOfIssue?: ISOCountryCode; /** Registration authority (format: RA followed by 6 digits) */ registrationAuthority?: string; }; /** * National Identifier Type Code * Specifies the type of national identifier * @public */ declare type NationalIdentifierTypeCode = 'ARNU' | 'CCPT' | 'RAID' | 'DRLC' | 'FIIN' | 'TXID' | 'SOCS' | 'IDCD' | 'LEIX' | 'MISC'; /** * Field properties for national identifier type selection * @public */ declare type NationalIdentifierTypeFieldOptions = { values?: NationalIdentifierTypeCode[]; }; /** * Natural Person * Represents a natural person with all associated information * @public */ declare type NaturalPerson = { /** The distinct words used as identification for an individual */ name: NaturalPersonName; /** The particulars of a location at which a person may be communicated with */ geographicAddress?: Address[]; /** A distinct identifier used by governments to uniquely identify a natural person */ nationalIdentification?: NationalIdentification; /** A distinct identifier that uniquely identifies the person to the institution in context */ customerIdentification?: string; /** Date and place of birth of a person */ dateAndPlaceOfBirth?: DateAndPlaceOfBirth; /** Country in which a person resides (the place of a person's home) */ countryOfResidence?: ISOCountryCode; }; /** * Field properties for natural person fields * @public */ declare type NaturalPersonFields = Partial<{ name: FieldOptions; website: FieldOptions; email: FieldOptions; phone: FieldOptions; geographicAddress: FieldOptions; nationalIdentification: FieldOptions & { nationalIdentifierType: NationalIdentifierTypeFieldOptions; }; dateOfBirth: FieldOptions; placeOfBirth: FieldOptions; countryOfResidence: FieldOptions; }>; /** * Natural Person Name * Represents the full name structure for a natural person * @public */ declare type NaturalPersonName = { /** Array of name identifiers */ nameIdentifier?: NaturalPersonNameID[]; /** Array of local name identifiers */ localNameIdentifier?: LocalNaturalPersonNameID[]; /** Array of phonetic name identifiers */ phoneticNameIdentifier?: LocalNaturalPersonNameID[]; }; /** * Natural Person Name ID * Represents a name identifier for a natural person * @public */ declare type NaturalPersonNameID = { /** Primary identifier, maximum 100 characters */ primaryIdentifier?: string; /** Secondary identifier, maximum 100 characters */ secondaryIdentifier?: string; /** Type of name identifier */ nameIdentifierType?: NaturalPersonNameTypeCode; }; export declare type NaturalPersonNameIDV2 = { primaryIdentifier?: string; secondaryIdentifier?: string; naturalPersonNameIdentifierType?: NaturalPersonNameTypeCode; }; /** * Natural Person Name Type Code * Specifies the type of name for a natural person * * @public */ declare type NaturalPersonNameTypeCode = 'ALIA' | 'BIRT' | 'MAID' | 'LEGL' | 'MISC'; export declare type NaturalPersonNameV2 = Omit & { nameIdentifier?: NaturalPersonNameIDV2[]; }; export declare type NaturalPersonV2 = Omit & { name: NaturalPersonNameV2; customerIdentification?: string; }; /** * Notabene UX elements for v2.1 hosts * * Authenticates with `fetchToken` instead of a static token, and completes with * the v2.1 node's transfer or wallet body. * * @public */ export declare class Notabene { private root; private fetchToken; private fetchCounterpartyAssistToken?; constructor({ fetchToken, fetchCounterpartyAssistToken, ...config }: NotabeneConfig); private warnIfCounterpartyAssistUnavailable; private createComponent; /** * Creates a withdrawal assist component */ createWithdrawalAssist(value: WithdrawalInput, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent>, TransactionOptions, TransferResponse | CounterpartyAssistShared>; /** * Creates a deposit assist component */ createDepositAssist(value: DepositInput, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent>, TransactionOptions, TransferResponse | CounterpartyAssistShared>; /** * Creates a connect component */ createConnectWallet(value: ConnectionInput, options?: ConnectionOptions, callbacks?: CallbackOptions): EmbeddedComponent; } /** * Notabene Asset Identifier * @public */ /** * Internal identifier for assets in the Notabene system * * @remarks * A standardized string format used within Notabene to identify cryptocurrencies, * tokens, and other digital assets. This is Notabene's legacy asset identification * system that may be used alongside CAIP-19 and DTI identifiers. * * @example "ETH_USDT" // USDT token on Ethereum * @example "BTC" // Bitcoin * @see {@link CAIP19} For chain-agnostic asset identifiers * @see {@link DTI} For ISO standardized identifiers * @public */ declare type NotabeneAsset = string; /** * Configuration for the v2.1 Notabene SDK * @public */ export declare type NotabeneConfig = Omit & { /** * The URL of the Notabene API node */ nodeUrl: string; /** * Called by the SDK to get a token, and again shortly before that token * expires. Must return a delegated token minted by your backend, never M2M * credentials; any other token is rejected. */ fetchToken: () => Promise; /** * Called once per Counterparty Assist link the user shares. Your backend mints a * counterparty-assist token with * `POST /api/v1/entities/{entityDID}/counterparty-assist-token` for the same * `customer_ref` as `fetchToken` (the component rejects another customer's token), * and this returns `{ token: access_token, jti }`. The token must be a delegated * token and differ from the `fetchToken` token, or the share fails. * * @remarks * The component waits up to 30 seconds. The `jti` is exposed as * `ConnectionMetadata.tokenId`; revoke the token with it once the connection is * completed or closed. Without this callback, components don't offer Counterparty * Assist on a v2.1 node. */ fetchCounterpartyAssistToken?: () => Promise<{ token: string; jti: string; }>; }; /** * Configuration for the Notabene SDK * * @public */ declare interface NotabeneConfig_2 { /** * The URL of the Notabene API node */ nodeUrl?: string; /** * The authentication token for the Notabene API */ authToken?: string; /** * The URL of the Notabene UX components */ uxUrl?: string; /** * Custom theme configuration for the UX components */ theme?: Theme; /** * The locale to use for the UX components */ locale?: string; } /** * Originating VASP * Represents the VASP which initiates the VA transfer * @public */ declare type OriginatingVASP = { /** The originating VASP information */ originatingVASP?: Person; }; /** * Originator * Represents the account holder who initiates the VA transfer * @public */ declare type Originator = { /** Array of persons associated with the originator */ originatorPersons?: Person[]; /** Array of account numbers, maximum 100 characters each */ accountNumber?: string[]; }; /** * Fields specific to the originator of a transaction * @public */ declare type OriginatorFields = { /** * Originator address. Optional because some assets have no knowable sender * (Lightning, Monero, shielded Zcash, batched exchange withdrawals). */ source?: Source | Source[]; }; /** * Base interface for proving ownership of an account or address * * @remarks * TheOwnershipProof interface provides a common structure for different types of ownership verification: * - All proofs must specify their type from the supported ProofTypes enum * - Current verification status is tracked via ProofStatus * - Links the proof to a decentralized identifier (DID) * - Specifies the blockchain account/address being proven using CAIP-10 format * * This interface is extended by specific proof types like: * - SignatureProof for cryptographic signatures * - DeclarationProof for self-declarations * - MicroTransferProof for transaction-based proof * - ScreenshotProof for image-based verification * * @see {@link ProofTypes} For supported proof methods * @see {@link ProofStatus} For possible verification states * @see {@link CAIP10} For address format specification * @public */ declare interface OwnershipProof { type: ProofTypes; status: ProofStatus; /** * DID of the proven wallet. Absent on a screenshot or self-declaration proof * collected for a deposit without a `source`; the host attaches it if its * API requires one. */ did?: DID; /** * CAIP-10 address of the proven wallet. Absent in the same case as `did`. */ address?: CAIP10; } /** * A party's travel rule data on a v2.1 transfer, in the IVMS-101 2023 shape the node validates * * @remarks * Mirrors the node's `PartyProfile` schema. The node also accepts `ivms_encrypted` and * `ivms_encrypted_fields` here, which components don't send. * @public */ export declare interface PartyProfile { ivms: PersonV2; } /** * 6.7 * Data describing the contents of the payload. */ declare interface PayloadMetadata { /** The method used to map from a national system of writing to Latin script. */ transliterationMethod?: TransliterationMethodCode[]; /** The version of IVMS 101 to which the payload complies. */ payloadVersion: PayloadVersionCode; } /** * The version of IVMS 101 to which the payload complies. */ declare enum PayloadVersionCode { /** Published May 2020 */ V101 = "101", /** Published August 2023 */ V101_2023 = "101.2023" } /** * Person * Represents either a natural person or a legal person * @public */ declare type Person = { /** Natural person information */ naturalPerson?: NaturalPerson; /** Legal person information */ legalPerson?: LegalPerson; }; /** * The type of counterparty. Either a natural person or a legal person. If the customer is the same as the counterparty then the counterparty is a self. * @public */ /** * Enum defining the types of persons/entities in a transaction * * @remarks * This classification system aligns with FATF travel rule requirements and defines: * - NATURAL: Individual human persons acting in their own capacity * - LEGAL: Registered organizations, companies, or other legal entities * - SELF: When the counterparty is the same as the customer (first party transaction) * * The type affects what information must be collected and transmitted as part of * travel rule compliance. Different verification and due diligence requirements * apply to each type. * * @see {@link NaturalPerson} For natural person data requirements * @see {@link LegalPerson} For legal person data requirements * @public */ declare enum PersonType { NATURAL = "natural", LEGAL = "legal", SELF = "self" } export declare type PersonV2 = Omit & { naturalPerson?: NaturalPersonV2; accountNumber?: string[]; }; /** * Status of the ownership proof verification process * * @remarks * Represents the different states that an ownership proof can be in during and after verification: * - PENDING: Initial state where verification is in progress or awaiting processing * - FAILED: The proof was rejected due to failing verification checks * - FLAGGED: The proof requires manual review due to suspicious or unclear verification results * - VERIFIED: The proof has passed all verification checks successfully * * @public */ declare enum ProofStatus { PENDING = "pending",// Verification is pending FAILED = "rejected",// Rejected FLAGGED = "flagged",// Flagged for manual review VERIFIED = "verified" } /** * Types of ownership proofs supported by the system * * @remarks * Supported proof types: * - SelfDeclaration: User self-declares ownership without cryptographic proof * - EIP191: Ethereum personal signature following EIP-191 standard * - SIWE: Sign-In with Ethereum message signature (EIP-4361) * - SIWX: Sign-In with X message signature * - SOL_SIWX: Sign-In with Solana message signature (SIWE for Solana) * - EIP712: Ethereum typed data signature following EIP-712 standard * - BIP137: Bitcoin message signature following BIP-137 * - BIP322: Bitcoin message signature following BIP-322 * - TIP191: Tron message signing * - ED25519: Ed25519 signature (used in Solana) * - XRP_ED25519: Ed25519 signature (used in XRP) * - XLM_ED25519: Ed25519 signature (used in Stellar) * - MicroTransfer: Proof via small blockchain transaction * - Screenshot: Image proof of ownership/access * - CIP8: Cardano message signing standard (CIP-8) * * @see {@link SignatureProof} For signature-based proofs * @see {@link DeclarationProof} For self-declaration proofs * @see {@link MicroTransferProof} For transaction-based proofs * @see {@link ScreenshotProof} For screenshot proofs * @public */ declare enum ProofTypes { SelfDeclaration = "self-declaration", SIWE = "siwe", SIWX = "siwx", SOL_SIWX = "sol-siwx", EIP191 = "eip-191", EIP712 = "eip-712", EIP1271 = "eip-1271", BIP137 = "bip-137", BIP322 = "bip-322", TIP191 = "tip-191", ED25519 = "ed25519", XRP_ED25519 = "xrp-ed25519", XLM_ED25519 = "xlm-ed25519", CIP8 = "cip-8", COSMOS = "cosmos-ecdsa", MicroTransfer = "microtransfer", Screenshot = "screenshot", Connect = "connect", CONCORDIUM = "concordium" } /** * Represents a ready component message * @public */ declare type Ready = { type: CMType.READY; }; declare interface Refreshable { refreshSource?: RefreshSource; } export declare interface RefreshSource { url: URI; key: string; /** * The connection id (also embedded in `url`). Exposed directly so consumers can * correlate a Counterparty Assist webhook event (whose `payload.id` is this id) * without parsing it out of the url. */ id: string; } /** * Message type for delivering a refreshed delegate token to a component * * @remarks * Sent from host to component when the SDK has fetched a new token, so the * component can keep operating without being reloaded. * * @see {@link HMType} For message type constants * @see {@link HostMessage} For full host message type union * @public */ declare type RefreshToken = { type: HMType.TOKEN; token: string; }; /** * A component asking the host for a counterparty-assist token; `reqid` correlates the reply. * @internal */ export declare type RequestCounterpartyAssistToken = { type: typeof COUNTERPARTY_ASSIST_MESSAGES.REQUEST_TOKEN; reqid: string; }; declare type RequestID = UUID; /** * Represents a resize request component message. This is handled by the library. * @internal */ declare type ResizeRequest = { type: CMType.RESIZE; height: number; }; /** * Options that can be placed in either the main or fallback sections of the agent selection step. * * @remarks * Combines proof types from {@link ProofTypes} with additional UI-specific options: * - `ProofTypes.SelfDeclaration` — ownership proof via self-declaration * - `ProofTypes.Screenshot` — ownership proof via screenshot upload * - `ProofTypes.MicroTransfer` — ownership proof via micro-transfer * - `'signature'` — wallet connection for ownership proof via signature * - `'manual-signing'` — ownership proof via manual message signing * - `'add-vasp'` — manually add an unlisted exchange/VASP (hosted flow) * - `'contact-support'` — show a contact support button * * Options are automatically filtered by flow (e.g. `add-vasp` is ignored in self-hosted). * Including an option implicitly enables that capability. * * @public */ declare type SectionOption = 'self-declaration' | 'screenshot' | 'microtransfer' | 'signature' | 'manual-signing' | 'add-vasp' | 'contact-support'; /** * The source of a transaction * @public */ declare type Source = BlockchainAddress | CAIP10; /** * The verification status of a transaction * @public */ declare enum Status { EMPTY = "empty", VERIFY = "verify", PENDING = "pending", VERIFIED = "verified", BANNED = "banned" } /** * The theme of the Notabene SDK * @public */ declare type Theme = { mode: 'light' | 'dark'; backgroundColor?: string; primaryColor?: string; primaryForeground?: string; secondaryColor?: string; secondaryForeground?: string; fontFamily?: string; logo?: string; }; /** * Specify what to do under the provided threshold. * * Eg. to allow self-declaration for all transactions under 1000 EUR * * Note to support threshold you MUST include the Asset Price in the Transaction * * @see {@link Transaction} Transaction object * * @public */ declare interface ThresholdOptions { threshold: number; currency: ISOCurrency; proofTypes?: ProofTypes[]; } /** * Core transaction interface representing a crypto asset transfer between parties * * @remarks * Extends ComponentRequest to add transaction-specific properties: * - agent: The entity facilitating/executing the transaction * - counterparty: The other party involved in the transaction * - asset: The cryptocurrency or token being transferred * - amountDecimal: The amount to transfer in decimal format * - proof: Optional ownership proof verifying control of involved addresses * - assetPrice: Optional price information in a fiat currency * * This interface serves as the base for specific transaction types like: * - Withdrawals for sending assets out * - Deposits for receiving assets * - Deposit requests for requesting asset transfers * * @see {@link Withdrawal} For withdrawal-specific transaction properties * @see {@link Deposit} For deposit-specific transaction properties * @see {@link Agent} For agent details * @see {@link Counterparty} For counterparty information * @public */ declare interface Transaction extends ComponentRequest { transactionId?: string; agent: Agent; counterparty: Counterparty; asset: TransactionAsset; amountDecimal: string | number; proof?: OwnershipProof; assetPrice?: { price: number; currency: ISOCurrency; }; account?: Account; } /** * The asset of a transaction either a Notabene asset, a CAIP-19 asset, or a DTI. * @public */ declare type TransactionAsset = NotabeneAsset | CAIP19 | DTI; /** * Configuration options for Transaction components * @public */ export declare interface TransactionOptions { /** * Explicit layout configuration for the agent selection step. * When provided, takes precedence over legacy fields (`proofs.fallbacks`, `vasps.addUnknown`). */ agentSections?: AgentSections; proofs?: { reuseProof?: boolean; microTransfer?: { destination: BlockchainAddress; amountSubunits: string; requireHash?: boolean; }; fallbacks?: ProofTypes[]; deminimis?: ThresholdOptions; }; jurisdiction?: string; allowedAgentTypes?: AgentType[]; allowedCounterpartyTypes?: PersonType[]; fields?: FieldTypes; vasps?: VASPOptions; /** * Sections of the component to leave out. Hiding `'header'` is useful when the * surrounding page already states what the user is being asked to do, so ours * would repeat or contradict it. */ hide?: HideSection[]; counterpartyAssist?: CounterpartyAssistConfig; contactSupport?: ContactSupportConfig; consent?: ConsentConfig; autoSubmit?: boolean; /** * Wallet connection behaviour. */ wallets?: { /** * EXPERIMENTAL. No stability guarantee; may change or be removed in a minor release. * * Prefer a wallet's `https://` universal link over its custom scheme (for example * `metamask://`) when connecting a mobile wallet. Useful when embedding inside a mobile * in-app webview, which cannot launch another app on its own and so needs the host app * to handle every custom scheme it might encounter. * * Off by default. Has no effect for wallets whose registry entry declares no universal * link, which is most of them today. Where a wallet does declare one, this also changes * behaviour in an ordinary mobile browser, and a universal link can be worse there if * the wallet's Android app links are not verified. * * Behaviour therefore depends on the wallet and on your host app. Verify against the * wallets your users actually use before enabling this in production. * * @defaultValue false */ experimentalPreferUniversalLinks?: boolean; /** * Restrict the mobile wallets offered over WalletConnect to this list. * * Useful when you only support a fixed set of wallets, for example because your app * allowlists their deep links, or because your compliance policy approves specific * wallets. * * Entries are WalletConnect Explorer wallet ids, 64-character hex strings. Wallet names * are not accepted, because the Explorer registry keys on these ids. Look them up in * Reown's Wallets List (https://docs.reown.com/cloud/wallets/wallet-list) or WalletGuide * (https://walletguide.walletconnect.network/). * * A wallet can have more than one id. Coinbase, Binance, OKX and Talisman each have two * Explorer listings, so list every id for a wallet or one of its listings will still be * offered. * * This restricts WalletConnect's own wallet list only. It does not restrict browser * extension wallets, does not affect hardware wallets, and does not control whether * WalletConnect is offered at all. * * Absent or empty means no restriction. * * @example * ```ts * // MetaMask and both Coinbase listings * allowedWalletConnectIds: [ * 'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', * 'fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa', * 'd0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8' * ] * ``` */ allowedWalletConnectIds?: string[]; /** * Never offer these wallets in the component's wallet picker, whatever the user's * browser has installed. * * Useful when you don't want to present specific wallets, for example hardware wallets. * This only controls which connectors the component offers. It isn't a policy on * addresses: a user can still reach the same device another way, such as Ledger Live * over WalletConnect, or prove an address with a non-wallet proof type where you allow * one. * * Entries are {@link WalletId}s and are matched case-insensitively. Hardware wallets and * the WalletConnect card have fixed ids, listed in {@link KnownWalletId}. Browser extension * wallets are matched by the id the component discovers them under. * * Hiding `'wallet-connect'` removes the WalletConnect card entirely; to offer some * mobile wallets but not others, use `allowedWalletConnectIds` instead. * * Absent or empty means every discovered wallet is offered. * * @example * ```ts * // No hardware wallets * hidden: ['ledger-usb-wallet', 'ledger-bluetooth-wallet', 'trezor'] * ``` */ hidden?: WalletId[]; }; } /** * Response interface for transaction-related operations * * @remarks * Extends ComponentResponse to add transaction-specific response data: * - value: The resulting transaction value of generic type V * - ivms101: IVMS 101 travel rule data for the transaction * - proof: Optional ownership proof details if required * - txCreate: Optional V1 transaction payload for legacy API compatibility * - txUpdate: Optional V1 transaction payload for legacy API compatibility * * @typeParam V - Type of the transaction value being returned * * @see {@link ComponentResponse} For base response properties * @see {@link IVMS101} For travel rule data structure * @see {@link OwnershipProof} For proof details * @see {@link V1Transaction} For legacy transaction format * @public */ declare interface TransactionResponse extends ComponentResponse { value: V; ivms101: IVMS101; proof?: OwnershipProof; txCreate?: V1Transaction; txUpdate?: V1Transaction; } declare type TransactionType = 'withdraw' | 'deposit'; /** * Transfer Path * Represents the path of intermediary VASPs in a transfer * @public */ declare type TransferPath = { /** Array of intermediary VASPs involved in the transfer */ transferPath?: IntermediaryVASP[]; }; /** * What a withdrawal or deposit component completes with on v2.1 * @public */ export declare interface TransferResponse { transfer: CreateTransferFields; } /** * Transliteration Method Code * Specifies the method used to transliterate text * @public */ declare type TransliterationMethodCode = 'arab' | 'aran' | 'armn' | 'cyrl' | 'deva' | 'geor' | 'grek' | 'hani' | 'hebr' | 'kana' | 'kore' | 'thai' | 'othr'; /** * A travel address * @public * A standardized travel rule address format * * @remarks * Represents a special address format used for travel rule compliance. Travel addresses * are prefixed with 'ta' and contain encoded information about the transaction * and counterparty details required for travel rule reporting. * * The format ensures consistent handling of travel rule data across different * VASPs and blockchain networks while maintaining privacy. * * @example "ta1234abcd..." // Example travel rule address * @see {@link BlockchainAddress} For native chain addresses * @see {@link CAIP10} For chain-agnostic addresses */ declare type TravelAddress = `ta${string}`; /** * Message type for updating component state and configuration from host application * * @remarks * Defines the structure of update messages sent from host to component: * - type: Identifies this as an update message * - value: New partial state/data to update the component with * - options: Optional configuration parameters to modify component behavior * * The host can use this to dynamically update both the component's data * and its configuration without requiring a full reload/reinitialize. * * @typeParam T - The type of the value being updated * @typeParam O - The type of the optional configuration parameters * * @see {@link HMType} For message type constants * @see {@link HostMessage} For full host message type union * @public */ declare type UpdateValue = { type: HMType.UPDATE; value: Partial; options?: O; }; /** * A Uniform Resource Identifier * @remarks This type will be narrowed to `` `${string}:${string}` `` in the next major release. * @public */ declare type URI = string; /** * UUID v4 string identifier * A universally unique identifier that follows RFC 4122 format * Format: 8-4-4-4-12 hexadecimal digits * @example "550e8400-e29b-41d4-a716-446655440000" * @see {@link https://tools.ietf.org/html/rfc4122 | RFC4122} * @public */ declare type UUID = string; /** * Represents a legacy V1 API asset format supporting both Notabene and CAIP-19 identifiers * * @remarks * Used for backwards compatibility with V1 API transaction payloads: * - Can be either a simple Notabene asset string * - Or an object containing a CAIP-19 identifier * * @example "ETH_USDT" // Notabene asset format * @example \{ caip19: "eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f" \} // CAIP-19 format * @see {@link NotabeneAsset} For Notabene asset format * @see {@link CAIP19} For CAIP-19 asset format * @public */ declare type V1Asset = NotabeneAsset | { caip19: CAIP19; }; /** * Transaction payload suitable for calling Notabene v1 tx/create * @public */ declare type V1Transaction = { transactionAsset: V1Asset; transactionAmount: string; originatorEqualsBeneficiary?: boolean; originatorVASPdid: DID; beneficiaryVASPdid: DID; beneficiaryProof?: OwnershipProof; originatorProof?: OwnershipProof; originator?: Originator; beneficiary: Beneficiary; transactionId?: string; }; /** * Validation error * @public */ export declare type ValidationError = { attribute: string; message: string; }; /** * Options controlling which VASPs are listed and searchable in the picker. * * Two mutually exclusive variants: * * - **V1** — `addUnknown`, `onlyActive`, `searchable` (filters by {@link VASPSearchControl} status). * - **V2** — `addUnknown`, `onlyActive`, `showTrustStatus` (filters by {@link VASPTrustStatus}). * * `searchable` (V1-only) cannot be combined with `showTrustStatus` (V2-only); * TypeScript will reject the mix at compile time. `addUnknown` and `onlyActive` are valid in both variants. * * @example V1 * ```ts * { addUnknown: true, onlyActive: true, searchable: [VASPSearchControl.ALLOWED] } * ``` * * @example V2 * ```ts * { addUnknown: true, onlyActive: true, showTrustStatus: ['TRUSTED', 'NEW'] } * ``` * * @public */ declare type VASPOptions = { addUnknown?: boolean; onlyActive?: boolean; searchable?: VASPSearchControl[]; } | { searchable?: undefined; addUnknown?: boolean; onlyActive?: boolean; showTrustStatus?: VASPTrustStatus[]; }; /** * VASP Visibility Control representing allow/deny behaviour for VASP visibility * * @remarks * - ALLOWED: Include VASPs you have explicitly allowed in the Notabene Network * - PENDING: Include VASPs neither allowed nor denied * @public */ declare enum VASPSearchControl { ALLOWED = "allowed", PENDING = "pending" } /** * Trust status assigned to a VASP in the Notabene network. * * Used by {@link VASPOptions.showTrustStatus} to filter which VASPs are listed in the picker. * * @public */ declare type VASPTrustStatus = 'TRUSTED' | 'NEW' | 'FLAGGED' | 'BANNED'; /** * A wallet id as the embedded component reports it, for use in * {@link TransactionOptions.wallets}. * * A {@link KnownWalletId}, or any id of a wallet the component discovers in the user's * browser. Browser extension wallets on EVM chains use their EIP-6963 reverse domain * name, for example `'io.metamask'` or `'com.coinbase.wallet'`. Wallets on other chains * use the chain namespace followed by the wallet's name in lower case, for example * `'solana-phantom'`, `'bitcoin-xverse'`, `'tron-tronlink'`, `'cardano-nami'`, * `'ripple-gemwallet'` or `'concordium-browser'`. * * @public */ declare type WalletId = KnownWalletId | (string & {}); /** * Wallet ownership proof in the v2.1 node's shape * * @remarks * The same body is accepted inline on a transfer, where the address and owner come from the * transfer leg, and by `POST /customers/{customer}/wallets/{address}/proofs`. * - Signature proofs: `signature`, and the signed message as `attestation` * - Screenshot: `attestation` is `{ url }` * - Self-declaration: `attestation` is the declaration text * @public */ export declare interface WalletProof { type: string; signature?: string; attestation?: string | { url: string; }; wallet_provider?: string; xpub?: string; chain_data?: Record; } /** * A wallet the customer connected, returned by Connect on v2.1 * @public */ export declare interface WalletRecord { address: CAIP10; proof?: WalletProof; } /** * What the connect component completes with on v2.1 * @public */ export declare interface WalletResponse { wallet: WalletRecord; } /** * Represents a warning component message * @param message - Warning message * @param description - Description of the warning message * @param identifier - Identifier code of the warning message * @public */ declare type Warning = { type: CMType.WARNING; message: string; description?: string; identifier?: WarningIdentifierCode; }; /** * Identifier codes for warning messages * @public */ declare enum WarningIdentifierCode { WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", WALLET_LOCKED = "WALLET_LOCKED", WALLET_UNREACHABLE = "WALLET_UNREACHABLE", JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", IDV_UNAVAILABLE = "IDV_UNAVAILABLE", ASSET_NOT_FOUND = "ASSET_NOT_FOUND" } /** * An object representing a withdrawal transaction * @public */ declare interface Withdrawal extends BeneficiaryFields, Transaction, Refreshable { } /** * What the host passes to a v2.1 withdrawal component. The token identifies the * customer, so there is no `customer`; every field is optional and the component * asks the user for what is missing. * @public */ export declare type WithdrawalInput = Partial>; export { }