@notabene/javascript-sdk 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1565 +0,0 @@
1
- /**
2
- * Address
3
- * Represents a physical address
4
- * @public
5
- */
6
- declare type Address = {
7
- /** Identifies the nature of the address. */
8
- addressType: AddressTypeCode;
9
- /** Identification of a division of a large organisation or building. */
10
- department?: string;
11
- /** Identification of a sub-division of a large organisation or building. */
12
- subDepartment?: string;
13
- /** Name of a street or thoroughfare. */
14
- streetName?: string;
15
- /** Number that identifies the position of a building on a street. */
16
- buildingNumber?: string;
17
- /** Name of the building or house. */
18
- buildingName?: string;
19
- /** Floor or storey within a building. */
20
- floor?: string;
21
- /** Numbered box in a post office. */
22
- postBox?: string;
23
- /** Building room number. */
24
- room?: string;
25
- /** Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail. */
26
- postcode?: string;
27
- /** Name of a built-up area, with defined boundaries, and a local government. */
28
- townName: string;
29
- /** Specific location name within the town. */
30
- townLocationName?: string;
31
- /** Identifies a subdivision within a country subdivision. */
32
- districtName?: string;
33
- /** Identifies a subdivision of a country such as state, region, province. */
34
- countrySubDivision?: string;
35
- /** Information that locates and identifies a specific address, presented in free format text. */
36
- addressLine?: string[];
37
- /** Nation with its own government. */
38
- country: ISOCountryCode;
39
- };
40
-
41
- /**
42
- * Address Type Code
43
- * Specifies the type of address
44
- * @public
45
- */
46
- declare type AddressTypeCode = 'HOME' | 'BIZZ' | 'GEOG';
47
-
48
- /**
49
- * Who is the agent acting on behalf of the counterparty
50
- * @public
51
- */
52
- export declare interface Agent {
53
- did: DID;
54
- type: AgentType;
55
- logo?: URI;
56
- url?: URI;
57
- name?: string;
58
- verified?: boolean;
59
- }
60
-
61
- /**
62
- * The type of Agent. Either a wallet or a VASP
63
- * @public
64
- */
65
- export declare enum AgentType {
66
- PRIVATE = "WALLET",
67
- VASP = "VASP"
68
- }
69
-
70
- /**
71
- * Beneficiary
72
- * Represents the receiver of the requested VA transfer
73
- * @public
74
- */
75
- declare type Beneficiary = {
76
- /** Array of persons associated with the beneficiary */
77
- beneficiaryPersons?: Person[];
78
- /** Array of account numbers, maximum 100 characters each */
79
- accountNumber?: string[];
80
- };
81
-
82
- /**
83
- * Fields specific to the beneficiary of a transaction
84
- * @public
85
- */
86
- declare type BeneficiaryFields = {
87
- destination?: Destination;
88
- };
89
-
90
- /**
91
- * Beneficiary VASP
92
- * Represents the VASP which receives the VA transfer
93
- * @public
94
- */
95
- declare type BeneficiaryVASP = {
96
- /** The beneficiary VASP information */
97
- beneficiaryVASP?: Person;
98
- };
99
-
100
- /**
101
- * A blockchain address
102
- * @public
103
- */
104
- /**
105
- * A native blockchain address string
106
- *
107
- * @remarks
108
- * Represents a blockchain address in the native format specific to a particular chain.
109
- * This could be an Ethereum address, Bitcoin address, or other chain-specific format.
110
- * The address format and validation rules depend on the underlying blockchain.
111
- *
112
- * @example "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" // Ethereum address
113
- * @example "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" // Bitcoin address
114
- * @example "cosmos1t2uflqwqe0fsj0shcfkrvpukewcw40yjj6hdc0" // Cosmos address
115
- * @public
116
- */
117
- export declare type BlockchainAddress = string;
118
-
119
- /**
120
- * Chain Agnostic Account Identifier (CAIP-10)
121
- * Represents an account/address on a specific blockchain following the CAIP-10 specification.
122
- * Extends CAIP-2 by adding the account address specific to that chain.
123
- *
124
- * Format: `{caip2}:{address}`
125
- * - caip2: The CAIP-2 chain identifier (e.g. 'eip155:1')
126
- * - address: Chain-specific account address format
127
- *
128
- * @example "eip155:1:0x742d35Cc6634C0532925a3b844Bc454e4438f44e" // Ethereum account on mainnet
129
- * @example "bip122:000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f:128Lkh3S7CkDTBZ8W7BbpsN3YYizJMp8p6" // Bitcoin account on mainnet
130
- * @example "cosmos:cosmoshub-3:cosmos1t2uflqwqe0fsj0shcfkrvpukewcw40yjj6hdc0" // Cosmos account
131
- * @see {@link https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md | CAIP-10 Specification}
132
- * @public
133
- */
134
- export declare type CAIP10 = `${CAIP2}:${string}`;
135
-
136
- /**
137
- * Chain Agnostic Asset Identifier (CAIP-19)
138
- * Represents an asset/token on a specific blockchain following the CAIP-19 specification.
139
- * Extends CAIP-2 by adding asset type and identifier information.
140
- *
141
- * Format: `{caip2}/{asset_namespace}:{asset_reference}`
142
- * - caip2: The CAIP-2 chain identifier (e.g. 'eip155:1')
143
- * - asset_namespace: The asset standard (e.g. 'erc20', 'erc721', 'slip44')
144
- * - asset_reference: Chain/standard-specific asset identifier
145
- *
146
- * @example "eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f" // DAI token on Ethereum mainnet
147
- * @example "eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d" // CryptoKitties NFT contract
148
- * @example "cosmos:cosmoshub-3/slip44:118" // ATOM token on Cosmos Hub
149
- * @see {@link https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md | CAIP-19 Specification}
150
- * @public
151
- */
152
- export declare type CAIP19 = `${CAIP2}/${string}:${string}`;
153
-
154
- /**
155
- * Chain Agnostic Blockchain Identifier (CAIP-2)
156
- * Represents a blockchain in a chain-agnostic way following the CAIP-2 specification.
157
- * The identifier consists of a namespace and reference separated by a colon.
158
- *
159
- * Format: `namespace:reference`
160
- * - namespace: Represents the blockchain namespace (e.g. 'eip155', 'bip122', 'cosmos')
161
- * - reference: Chain-specific identifier within that namespace
162
- *
163
- * @example "eip155:1" // Ethereum Mainnet
164
- * @example "bip122:000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" // Bitcoin Mainnet
165
- * @example "cosmos:cosmoshub-3" // Cosmos Hub Mainnet
166
- * @see {@link https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md | CAIP-2 Specification}
167
- * @public
168
- */
169
- export declare type CAIP2 = `${string}:${string}`;
170
-
171
- /**
172
- * Options for callback and redirect URIs
173
- * @public
174
- */
175
- export declare interface CallbackOptions {
176
- callback?: URI;
177
- redirectUri?: URI;
178
- }
179
-
180
- /**
181
- * Represents a cancel component message
182
- * @internal
183
- */
184
- export declare type Cancel = {
185
- type: CMType.CANCEL;
186
- };
187
-
188
- /**
189
- * Component Message Type enum representing different message types that can be sent
190
- * between the host and component.
191
- *
192
- * @remarks
193
- * - COMPLETE: Indicates a completed operation with response data
194
- * - RESIZE: Request to adjust component size/dimensions
195
- * - RESULT: Operation result notification
196
- * - READY: Component is initialized and ready
197
- * - INVALID: Validation failed with errors
198
- * - ERROR: Operation encountered an error
199
- * - CANCEL: Operation was cancelled
200
- * @public
201
- */
202
- export declare const enum CMType {
203
- COMPLETE = "complete",
204
- RESIZE = "resize",
205
- RESULT = "result",
206
- READY = "ready",
207
- INVALID = "invalid",
208
- ERROR = "error",
209
- CANCEL = "cancel"
210
- }
211
-
212
- /**
213
- * Represents a completed component message
214
- * @typeParam T - The overall Value type being returned
215
- * @param response - The Response object which wraps T
216
- * @public
217
- */
218
- export declare type Completed<T> = {
219
- type: CMType.COMPLETE;
220
- response: TransactionResponse<T>;
221
- };
222
-
223
- /**
224
- * Union type representing all possible messages that can be sent from a component
225
- *
226
- * @remarks
227
- * Components communicate their state and results back to the host application
228
- * through these message types:
229
- * - Completed: Operation finished successfully with response data
230
- * - Cancel: User cancelled the operation
231
- * - Error: Operation failed with error message
232
- * - Ready: Component initialized and ready for use
233
- * - ResizeRequest: Component needs to adjust its dimensions
234
- * - InvalidValue: Validation failed with current partial value
235
- *
236
- * @typeParam T - The value type that will be returned in Completed messages
237
- *
238
- * @see {@link Completed} For successful completion message format
239
- * @see {@link Cancel} For cancellation message format
240
- * @see {@link Error} For error message format
241
- * @see {@link Ready} For ready message format
242
- * @see {@link ResizeRequest} For resize message format
243
- * @see {@link InvalidValue} For validation failure message format
244
- * @public
245
- */
246
- export declare type ComponentMessage<T> = Completed<T> | Cancel | Error_2 | Ready | ResizeRequest | InvalidValue<T>;
247
-
248
- /**
249
- * Base interface for requests sent to SDK components
250
- *
251
- * @remarks
252
- * Defines core properties that all component requests share:
253
- * - Optional unique request ID for tracking/correlating requests and responses
254
- * - Optional customer detailsfor pre-filling component data
255
- *
256
- * This interface is extended by specific request types like:
257
- * - Transaction requests for sending/receiving assets
258
- * - Connection requests for establishing VASP to VASP communication
259
- *
260
- * @see {@link Transaction} For transaction-specific request properties
261
- * @see {@link ConnectionRequest} For connection-specific request properties
262
- * @public
263
- */
264
- declare interface ComponentRequest {
265
- requestId?: RequestID;
266
- customer?: Counterparty;
267
- }
268
-
269
- /**
270
- * Base response interface for all SDK component operations
271
- *
272
- * @remarks
273
- * Provides standardized response propertiesfor component interactions:
274
- * - requestID: Links response back to the originating request
275
- * - valid: Boolean indicating if the operation was valid/successful
276
- * - status: Current verification status of the operation
277
- * - errors: Array of validation errors if any occurred
278
- *
279
- * This interface is extended by specific response types like:
280
- * - TransResponse for transaction operations
281
- * - ConnectionResponse for VASP connection operations
282
- *
283
- * @see {@link Status} For possible status values
284
- * @see {@link ValidationError} For error structure
285
- * @see {@link TransactionResponse} For transaction-specific responses
286
- * @public
287
- */
288
- export declare interface ComponentResponse {
289
- requestID: RequestID;
290
- valid: boolean;
291
- status: Status;
292
- errors: ValidationError[];
293
- }
294
-
295
- /**
296
- * An object representing options for a Connection Request
297
- * @public
298
- */
299
- declare type ConnectionOptions = Omit<TransactionOptions, 'allowedAgentTypes' | 'allowedCounterpartyTypes' | 'vasps' | 'fields' | 'hide'>;
300
-
301
- /**
302
- * An object representing a connection request
303
- * @public
304
- */
305
- export declare interface ConnectionRequest extends ComponentRequest {
306
- asset: TransactionAsset;
307
- }
308
-
309
- /**
310
- * The counterparty of a transaction.
311
- * @public
312
- */
313
- /**
314
- * Interface representing a party involved in a transaction other than the initiator
315
- *
316
- * @remarks
317
- fines the core properties that identify and describe a counterparty:
318
- * - name: The display or legal name of the counterparty
319
- * - accountNumber: An account identifier/reference number
320
- * - did: Decentralized identifier for the counterparty
321
- * - type: Classification as natural person, legal entity, or self
322
- * - verified: Whether the counterparty's identity has been verified
323
- * - geographicAddress: Physical/mailing address information
324
- * - nationalIdentification: Government-issued ID details
325
- * - website: Official web presence
326
- * - phone: Contact phone number
327
- * - email: Contact email address
328
- *
329
- * This interface serves as the base for more specific counterparty types:
330
- * @see {@link NaturalPerson} For individual person properties
331
- * @see {@link LegalPerson} For organization/entity properties
332
- *
333
- * @public
334
- */
335
- export declare interface Counterparty {
336
- name?: string;
337
- accountNumber?: string;
338
- did?: DID;
339
- type?: PersonType;
340
- verified?: boolean;
341
- geographicAddress?: Address;
342
- nationalIdentification?: NationalIdentification;
343
- website?: URI;
344
- phone?: string;
345
- email?: string;
346
- }
347
-
348
- /**
349
- * A crypto credential
350
- * @public
351
- */ export declare type CryptoCredential = `${string}.${string}.mastercard`;
352
-
353
- /**
354
- * Date and Place of Birth
355
- * Represents the date and place of birth for a natural person
356
- * @public
357
- */
358
- declare type DateAndPlaceOfBirth = {
359
- /** Date of birth in ISO 8601 format (YYYY-MM-DD) */
360
- dateOfBirth?: ISODate;
361
- /** Place of birth (max 70 characters) */
362
- placeOfBirth?: string;
363
- };
364
-
365
- /**
366
- * Ownership Proof using Self Declaration
367
- * @public
368
- */
369
- export declare interface DeclarationProof extends OwnershipProof {
370
- type: ProofTypes.SelfDeclaration;
371
- attestation: string;
372
- confirmed: boolean;
373
- }
374
-
375
- /**
376
- * Decodes a URL fragment into an object
377
- *
378
- * @param fragment - The URL fragment to decode
379
- * @returns An object containing the decoded key-value pairs
380
- * @public
381
- */
382
- export declare function decodeFragmentToObject(fragment: string): Record<string, string>;
383
-
384
- /**
385
- * An object representing a deposit transaction
386
- * @public
387
- */
388
- export declare interface Deposit extends OriginatorFields, Transaction {
389
- }
390
-
391
- /**
392
- * An object representing a request for a deposit
393
- * @public
394
- */
395
- export declare interface DepositRequest extends DepositRequestFields, ComponentRequest {
396
- }
397
-
398
- /**
399
- * Fields specific to a deposit request
400
- * @public
401
- */
402
- declare type DepositRequestFields = {
403
- destination: BlockchainAddress | CAIP10;
404
- asset: TransactionAsset;
405
- amountDecimal?: number;
406
- travelAddress?: TravelAddress;
407
- cryptoCredential?: CryptoCredential;
408
- };
409
-
410
- /**
411
- * An object representing options for a Deposit Request
412
- * @public
413
- */
414
- declare interface DepositRequestOptions {
415
- showQrCode?: boolean;
416
- }
417
-
418
- /**
419
- * The destination of a transaction either a blockchain address, a CAIP-19 address, or a travel address.
420
- * @public
421
- */
422
- export declare type Destination = BlockchainAddress | CAIP10 | CryptoCredential | TravelAddress;
423
-
424
- /**
425
- * A Decentralized Identifier
426
- * @public
427
- */
428
- export declare type DID = `did:${string}:${string}`;
429
-
430
- /**
431
- * Digital Token Identifier (DTI) following ISO 24165 standard
432
- *
433
- * @remarks
434
- * A standardized identifier for digital assets and cryptocurrencies. The DTI system
435
- * provides unique and unambiguous identification of digital tokens, supporting interoperability
436
- * and clarity in financial markets.
437
- *
438
- * Format: `DTI[NNNNN]` where N is a digit
439
- *
440
- * @example "DTI00001" // Example DTI for Bitcoin
441
- * @example "DTI00002" // Example DTI for Ethereum
442
- *
443
- * @see {@link https://dtif.org/ | Digital Token Identifier Foundation}
444
- * @see {@link https://www.iso.org/standard/77895.html | ISO 24165}
445
- * @public
446
- */
447
- export declare type DTI = string;
448
-
449
- /**
450
- * An embedded Notabene component
451
- * @public
452
- */
453
- export declare class EmbeddedComponent<V, O> {
454
- private _url;
455
- private _value;
456
- private _options?;
457
- private _errors;
458
- private iframe?;
459
- private eventManager;
460
- private modal?;
461
- /**
462
- * Creates an instance of EmbeddedComponent.
463
- * @param url - The URL of the embedded component
464
- * @param value - The initial transaction value
465
- */
466
- constructor(url: string, value: Partial<V>, options?: O);
467
- /**
468
- * Gets the URL of the embedded component
469
- * @returns The URL of the embedded component
470
- */
471
- get url(): string;
472
- /**
473
- * Gets the current transaction value
474
- * @returns The current transaction value
475
- */
476
- get value(): Partial<V>;
477
- get options(): O | undefined;
478
- get errors(): ValidationError[];
479
- /**
480
- * Opens the component URL in the current window
481
- */
482
- open(): void;
483
- /**
484
- * Mounts the component to a parent element
485
- * @param parentId - The ID of the parent element
486
- * @throws Will throw an error if the parent element is not found
487
- */
488
- mount(parentId: string): void;
489
- /**
490
- * Embeds the component into a parent element
491
- * @param parent - The parent element to embed the component into
492
- */
493
- embed(parent: Element, modal?: boolean): void;
494
- removeEmbed(): void;
495
- /**
496
- * Sends a message to the embedded component
497
- * @param message - The message to send
498
- */
499
- send(message: HostMessage<V, O>): void;
500
- /**
501
- * Adds an event listener for a specific message type
502
- * @param messageType - The type of message to listen for
503
- * @param callback - The callback function to execute when the message is received
504
- */
505
- on(messageType: string, callback: MessageCallback<V>): () => void;
506
- /**
507
- * Removes an event listener for a specific message type
508
- * @param messageType - The type of message to stop listening for
509
- * @param callback - The callback function to remove
510
- */
511
- off(messageType: string, callback: MessageCallback<V>): void;
512
- /**
513
- * Updates the transaction value and sends an update message to the component
514
- * @param value - The new transaction value
515
- */
516
- update(value: Partial<V>, options?: O): void;
517
- /**
518
- * Waits for the component to complete and returns the transaction response
519
- * @returns A promise that resolves with the transaction response
520
- */
521
- completion(): Promise<TransactionResponse<V>>;
522
- /**
523
- * Opens the component in a modal dialog
524
- */
525
- openModal(): Promise<TransactionResponse<V>>;
526
- /**
527
- * Closes the modal dialog
528
- *
529
- */
530
- closeModal(): void;
531
- }
532
-
533
- /**
534
- * Represents an error component message
535
- * @param message - Error message
536
- * @public
537
- */
538
- declare type Error_2 = {
539
- type: CMType.ERROR;
540
- message: string;
541
- };
542
- export { Error_2 as Error }
543
-
544
- /**
545
- * Field properties
546
- * @public
547
- */
548
- declare type FieldOptions = boolean | {
549
- optional: boolean;
550
- transmit: boolean;
551
- };
552
-
553
- /**
554
- * Field type configuration
555
- * @public
556
- */
557
- export declare type FieldTypes = {
558
- naturalPerson?: NaturalPersonFields;
559
- legalPerson?: LegalPersonFields;
560
- };
561
-
562
- /**
563
- * Host Message Type enum representing different message types that can be sent
564
- * from the host application.
565
- *
566
- * @remarks
567
- * - UPDATE: Message to update component value/state
568
- * - REQUEST_RESPONSE: Message requesting a response from component
569
- * @public
570
- */
571
- export declare const enum HMType {
572
- UPDATE = "update",
573
- REQUEST_RESPONSE = "requestResponse"
574
- }
575
-
576
- /**
577
- * Union type representing all possible messages that can be sent from the host application
578
- * to a component
579
- *
580
- * @remarks
581
- * Currently only supports update messages which allow the host to modify component
582
- * and configuration. The host uses these messages to communicate changes to the component
583
- * without requiring full reinitialization.
584
- *
585
- * @typeParam T - The value type that components operate on
586
- * @typeParam O - The options type used to configure component behavior
587
- *
588
- * @see {@link UpdateValue} For the structure of update messages
589
- * @see {@link HMType} For message type constants
590
- * @public
591
- */
592
- export declare type HostMessage<T, O> = UpdateValue<T, O>;
593
-
594
- /**
595
- * Intermediary VASP
596
- * Represents an intermediary Virtual Asset Service Provider
597
- * @public
598
- */
599
- declare type IntermediaryVASP = {
600
- /** The intermediary VASP information */
601
- intermediaryVASP?: Person;
602
- /** The sequence number of this VASP in the transfer path */
603
- sequence?: number;
604
- };
605
-
606
- /**
607
- * Represents an invalid value component message
608
- * @typeParam T - The overall Value type being returned
609
- * @param value - The current Partial value
610
- * @param errors - Array of validation errors
611
- * @internal
612
- */
613
- export declare type InvalidValue<T> = {
614
- type: CMType.INVALID;
615
- value: Partial<T>;
616
- errors: ValidationError[];
617
- };
618
-
619
- /**
620
- * ISO-3166 Alpha-2 country code
621
- * @example "US" for United States, "GB" for United Kingdom
622
- * @public
623
- */
624
- declare type ISOCountryCode = string;
625
-
626
- /**
627
- * 3 letter ISO currency code
628
- * @public
629
- */
630
- declare type ISOCurrency = string;
631
-
632
- /**
633
- * A point in time, represented as a day within the calendar year. Compliant with ISO 8601.
634
- * Format: YYYY-MM-DD
635
- * @example "2023-05-15" for May 15, 2023
636
- * @public
637
- */
638
- declare type ISODate = `${number}-${number}-${number}`;
639
-
640
- /**
641
- * IVMS101 definition
642
- *
643
- * @public
644
- */
645
- export declare type IVMS101 = {
646
- originator?: Originator;
647
- beneficiary?: Beneficiary;
648
- originatingVASP?: OriginatingVASP;
649
- beneficiaryVASP?: BeneficiaryVASP;
650
- transferPath?: TransferPath;
651
- payloadMetadata?: PayloadMetadata;
652
- };
653
-
654
- /**
655
- * Interface representing a legal entity (organization/company) involved in a transaction
656
- *
657
- * @remarks
658
- * Extends the baseface to add properties specific to legal entities:
659
- * - type: MustPersonType.LEGAL to identify as an organization
660
- * - name: Required registered legal name of the entity
661
- * - lei: Optional Legal Entity Identifier for regulated entities
662
- * - logo: Optional URI to the organization's logo image
663
- * - countryOfRegistration: Optional ISO country code where entity is registered
664
- *
665
- * This interface captures the additional identifying information required for
666
- * legal persons under FATF Travel Rule requirements. The properties align with
667
- * standard business KYC (Know Your Businessta collection practices.
668
- *
669
- * @see {@link Counterparty} For base properties common to all counterparties
670
- * @see {@link PersonType} For person type classification
671
- * @see {@link LEI} For Legal Entity Identifier format
672
- * @public
673
- */
674
- export declare interface LegalPerson extends Counterparty {
675
- type: PersonType.LEGAL;
676
- name: string;
677
- lei?: LEI;
678
- logo?: URI;
679
- countryOfRegistration?: ISOCountryCode;
680
- }
681
-
682
- /**
683
- * Legal Person
684
- * Represents a legal person with all associated information
685
- * @public
686
- */
687
- declare type LegalPerson_2 = {
688
- /** The name of the legal person */
689
- name: LegalPersonName;
690
- /** The address of the legal person */
691
- geographicAddress?: Address[];
692
- /** A distinct identifier that uniquely identifies the person to the institution in context */
693
- customerNumber?: string;
694
- /** A distinct identifier used by governments to uniquely identify a legal person */
695
- nationalIdentification?: NationalIdentification;
696
- /** The country in which the legal person is registered */
697
- countryOfRegistration?: ISOCountryCode;
698
- };
699
-
700
- declare type LegalPersonFieldName = 'name' | 'lei' | 'website' | 'email' | 'phone' | 'geographicAddress' | 'nationalIdentification' | 'countryOfRegistration';
701
-
702
- /**
703
- * Field properties by field name
704
- * @public
705
- */
706
- declare type LegalPersonFields = {
707
- [name in LegalPersonFieldName]?: FieldOptions;
708
- };
709
-
710
- /**
711
- * Legal Person Name
712
- * Represents the full name structure for a legal person
713
- * @public
714
- */
715
- declare type LegalPersonName = {
716
- /** Array of name identifiers */
717
- nameIdentifier: LegalPersonNameID[];
718
- /** Array of local name identifiers */
719
- localNameIdentifier?: LocalLegalPersonNameID[];
720
- /** Array of phonetic name identifiers */
721
- phoneticNameIdentifier?: LocalLegalPersonNameID[];
722
- };
723
-
724
- /**
725
- * Legal Person Name ID
726
- * Represents a name identifier for a legal person
727
- * @public
728
- */
729
- declare type LegalPersonNameID = {
730
- /** Name by which the legal person is known */
731
- legalPersonName: string;
732
- /** The nature of the name specified */
733
- legalPersonNameIdentifierType: LegalPersonNameTypeCode;
734
- };
735
-
736
- /**
737
- * Legal Person Name Type Code
738
- * Specifies the type of name for a legal person
739
- * @public
740
- */
741
- declare type LegalPersonNameTypeCode = 'LEGL' | 'SHRT' | 'TRAD';
742
-
743
- /**
744
- * A LEI Legal Entity Identifier
745
- * @public
746
- */
747
- export declare type LEI = string;
748
-
749
- /**
750
- * Local Legal Person Name ID
751
- * Represents a local name identifier for a legal person
752
- * @public
753
- */
754
- declare type LocalLegalPersonNameID = {
755
- /** Name of the legal person, maximum 100 characters in local format */
756
- legalPersonName?: string;
757
- /** Type of legal person name identifier */
758
- legalPersonNameIdentifierType?: LegalPersonNameTypeCode;
759
- };
760
-
761
- /**
762
- * Local Natural Person Name ID
763
- * Represents a local name identifier for a natural person
764
- * @public
765
- */
766
- declare type LocalNaturalPersonNameID = {
767
- /** Primary identifier, maximum 100 characters in local format */
768
- primaryIdentifier?: string;
769
- /** Secondary identifier, maximum 100 characters in local format */
770
- secondaryIdentifier?: string;
771
- /** Type of name identifier */
772
- nameIdentifierType?: NaturalPersonNameTypeCode;
773
- };
774
-
775
- /**
776
- * Callback function for handling component messages.
777
- *
778
- * @typeParam T - The type of data contained in the component message
779
- * @param message - The message object containing the component data and type
780
- * @public
781
- */
782
- export declare type MessageCallback<T> = (message: ComponentMessage<T>) => void;
783
-
784
- /**
785
- * Ownership Proof using Micro Transfer
786
- * @public
787
- */
788
- export declare interface MicroTransferProof extends OwnershipProof {
789
- type: ProofTypes.MicroTransfer;
790
- proof: string;
791
- chain: CAIP2;
792
- asset: CAIP19;
793
- destination: BlockchainAddress;
794
- amountSubunits: string;
795
- }
796
-
797
- /**
798
- * National Identification
799
- * Represents a national identifier for a person or entity
800
- * @public
801
- */
802
- export declare type NationalIdentification = {
803
- /** National identifier (max 35 characters) */
804
- nationalIdentifier?: string;
805
- /** Type of national identifier */
806
- nationalIdentifierType?: NationalIdentifierTypeCode;
807
- /** Country that issued the national identifier */
808
- countryOfIssue?: ISOCountryCode;
809
- /** Registration authority (format: RA followed by 6 digits) */
810
- registrationAuthority?: string;
811
- };
812
-
813
- /**
814
- * National Identifier Type Code
815
- * Specifies the type of national identifier
816
- * @public
817
- */
818
- declare type NationalIdentifierTypeCode = 'ARNU' | 'CCPT' | 'RAID' | 'DRLC' | 'FIIN' | 'TXID' | 'SOCS' | 'IDCD' | 'LEIX' | 'MISC';
819
-
820
- /**
821
- * Interface representing a natural person (individual) involved in a transaction
822
- *
823
- * @remarks
824
- * Extends the baseinterface to add properties specific to individual persons:
825
- * - type: Must be PersonType.NATURAL to identify as an individual
826
- * - dateOfBirth: Optional ISO format birth date for identity verification
827
- * - placeOfBirth: Optional birth place for identity verification
828
- * - countryOfResidence: Optional ISO country code of current residence
829
- * - name: Required full legal name of the individual
830
- *
831
- * This interface captures the additional identifying information required for
832
- * natural persons under FATF Travel Rule requirements. The properties align
833
- * with standard KYC (Know Your Customer) data collection practices.
834
- *
835
- * @see {@link Counterparty} For base properties common to all counterparties
836
- * @see {@link PersonType} For person type classification
837
- * @public
838
- */
839
- export declare interface NaturalPerson extends Counterparty {
840
- type: PersonType.NATURAL;
841
- dateOfBirth?: ISODate;
842
- placeOfBirth?: string;
843
- countryOfResidence?: ISOCountryCode;
844
- name: string;
845
- }
846
-
847
- /**
848
- * Natural Person
849
- * Represents a natural person with all associated information
850
- * @public
851
- */
852
- declare type NaturalPerson_2 = {
853
- /** The distinct words used as identification for an individual */
854
- name: NaturalPersonName;
855
- /** The particulars of a location at which a person may be communicated with */
856
- geographicAddress?: Address[];
857
- /** A distinct identifier used by governments to uniquely identify a natural person */
858
- nationalIdentification?: NationalIdentification;
859
- /** A distinct identifier that uniquely identifies the person to the institution in context */
860
- customerIdentification?: string;
861
- /** Date and place of birth of a person */
862
- dateAndPlaceOfBirth?: DateAndPlaceOfBirth;
863
- /** Country in which a person resides (the place of a person's home) */
864
- countryOfResidence?: ISOCountryCode;
865
- };
866
-
867
- /**
868
- * Field names for NaturalPerson
869
- * @public
870
- */
871
- declare type NaturalPersonFieldName = 'name' | 'website' | 'email' | 'phone' | 'geographicAddress' | 'nationalIdentification' | 'dateOfBirth' | 'placeOfBirth' | 'countryOfResidence';
872
-
873
- /**
874
- * Field properties by field name for Natural persons
875
- * @public
876
- */
877
- declare type NaturalPersonFields = {
878
- [name in NaturalPersonFieldName]?: FieldOptions;
879
- };
880
-
881
- /**
882
- * Natural Person Name
883
- * Represents the full name structure for a natural person
884
- * @public
885
- */
886
- declare type NaturalPersonName = {
887
- /** Array of name identifiers */
888
- nameIdentifier?: NaturalPersonNameID[];
889
- /** Array of local name identifiers */
890
- localNameIdentifier?: LocalNaturalPersonNameID[];
891
- /** Array of phonetic name identifiers */
892
- phoneticNameIdentifier?: LocalNaturalPersonNameID[];
893
- };
894
-
895
- /**
896
- * Natural Person Name ID
897
- * Represents a name identifier for a natural person
898
- * @public
899
- */
900
- declare type NaturalPersonNameID = {
901
- /** Primary identifier, maximum 100 characters */
902
- primaryIdentifier?: string;
903
- /** Secondary identifier, maximum 100 characters */
904
- secondaryIdentifier?: string;
905
- /** Type of name identifier */
906
- nameIdentifierType?: NaturalPersonNameTypeCode;
907
- };
908
-
909
- /**
910
- * Natural Person Name Type Code
911
- * Specifies the type of name for a natural person
912
- *
913
- * @public
914
- */
915
- declare type NaturalPersonNameTypeCode = 'ALIA' | 'BIRT' | 'MAID' | 'LEGL' | 'MISC';
916
-
917
- /**
918
- * Primary constructor for Notabene UX elements
919
- *
920
- * This class provides methods to create and manage various Notabene components
921
- * such as withdrawal assist, deposit assist, connect, and deposit request.
922
- * It also handles URL generation and fragment decoding for these components.
923
- *
924
- * @public
925
- */
926
- declare class Notabene {
927
- private nodeUrl?;
928
- private authToken?;
929
- private uxUrl;
930
- private theme?;
931
- private locale?;
932
- /**
933
- * Creates a new instance of the Notabene SDK
934
- *
935
- * @param config - Configuration options for the Notabene SDK
936
- */
937
- constructor(config: NotabeneConfig);
938
- /**
939
- * Generates a URL for a Notabene component
940
- *
941
- * @param path - The path of the component
942
- * @param value - Transaction data
943
- * @param configuration - Optional transaction configuration
944
- * @param callbacks - Optional callback configuration
945
- * @returns component URL
946
- * @internal
947
- */
948
- componentUrl<V, O>(path: string, value: V, configuration?: O, callbacks?: CallbackOptions): string;
949
- /**
950
- * Creates a new embedded component
951
- *
952
- * @param path - The path of the component
953
- * @param value - Transaction data
954
- * @param options - Optional transaction options
955
- * @param callbacks - Optional callback configuration
956
- * @returns A new EmbeddedComponent instance
957
- * @internal
958
- */
959
- createComponent<V, O>(path: string, value: Partial<V>, options?: O, callbacks?: CallbackOptions): EmbeddedComponent<V, O>;
960
- /**
961
- * Creates a withdrawal assist component
962
- *
963
- * @param value - Withdrawal transaction data
964
- * @param options - Optional transaction options
965
- * @param callbacks - Optional callback configuration
966
- * @returns A new EmbeddedComponent instance for withdrawal assistance
967
- */
968
- createWithdrawalAssist(value: Partial<Withdrawal>, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<Withdrawal, TransactionOptions>;
969
- /**
970
- * Creates a connect component
971
- *
972
- * @param value - Connection request data
973
- * @param options - Optional transaction options
974
- * @param callbacks - Optional callback configuration
975
- * @returns A new EmbeddedComponent instance for connection
976
- * @alpha
977
- */
978
- createConnectWallet(value: ConnectionRequest, options?: ConnectionOptions, callbacks?: CallbackOptions): EmbeddedComponent<ConnectionRequest, ConnectionOptions>;
979
- /**
980
- * Creates a deposit request component
981
- *
982
- * @param value - Deposit request data
983
- * @param options - Optional transaction options
984
- * @param callbacks - Optional callback configuration
985
- * @returns A new EmbeddedComponent instance for deposit requests
986
- * @public
987
- */
988
- createDepositRequest(value: DepositRequest, options?: DepositRequestOptions, callbacks?: CallbackOptions): EmbeddedComponent<DepositRequest, DepositRequestOptions>;
989
- }
990
- export default Notabene;
991
-
992
- /**
993
- * Notabene Asset Identifier
994
- * @public
995
- */
996
- /**
997
- * Internal identifier for assets in the Notabene system
998
- *
999
- * @remarks
1000
- * A standardized string format used within Notabene to identify cryptocurrencies,
1001
- * tokens, and other digital assets. This is Notabene's legacy asset identification
1002
- * system that may be used alongside CAIP-19 and DTI identifiers.
1003
- *
1004
- * @example "ETH_USDT" // USDT token on Ethereum
1005
- * @example "BTC" // Bitcoin
1006
- * @see {@link CAIP19} For chain-agnostic asset identifiers
1007
- * @see {@link DTI} For ISO standardized identifiers
1008
- * @public
1009
- */
1010
- export declare type NotabeneAsset = string;
1011
-
1012
- /**
1013
- * Configuration for the Notabene SDK
1014
- *
1015
- * @public
1016
- */
1017
- export declare interface NotabeneConfig {
1018
- /**
1019
- * The URL of the Notabene API node
1020
- */
1021
- nodeUrl?: string;
1022
- /**
1023
- * The authentication token for the Notabene API
1024
- */
1025
- authToken?: string;
1026
- /**
1027
- * The URL of the Notabene UX components
1028
- */
1029
- uxUrl?: string;
1030
- /**
1031
- * Custom theme configuration for the UX components
1032
- */
1033
- theme?: Theme;
1034
- /**
1035
- * The locale to use for the UX components
1036
- */
1037
- locale?: string;
1038
- }
1039
-
1040
- /**
1041
- * Originating VASP
1042
- * Represents the VASP which initiates the VA transfer
1043
- * @public
1044
- */
1045
- declare type OriginatingVASP = {
1046
- /** The originating VASP information */
1047
- originatingVASP?: Person;
1048
- };
1049
-
1050
- /**
1051
- * Originator
1052
- * Represents the account holder who initiates the VA transfer
1053
- * @public
1054
- */
1055
- declare type Originator = {
1056
- /** Array of persons associated with the originator */
1057
- originatorPersons?: Person[];
1058
- /** Array of account numbers, maximum 100 characters each */
1059
- accountNumber?: string[];
1060
- };
1061
-
1062
- /**
1063
- * Fields specific to the originator of a transaction
1064
- * @public
1065
- */
1066
- declare type OriginatorFields = {
1067
- source?: Source;
1068
- };
1069
-
1070
- /**
1071
- * Base interface for proving ownership of an account or address
1072
- *
1073
- * @remarks
1074
- * TheOwnershipProof interface provides a common structure for different types of ownership verification:
1075
- * - All proofs must specify their type from the supported ProofTypes enum
1076
- * - Current verification status is tracked via ProofStatus
1077
- * - Links the proof to a decentralized identifier (DID)
1078
- * - Specifies the blockchain account/address being proven using CAIP-10 format
1079
- *
1080
- * This interface is extended by specific proof types like:
1081
- * - SignatureProof for cryptographic signatures
1082
- * - DeclarationProof for self-declarations
1083
- * - MicroTransferProof for transaction-based proof
1084
- * - ScreenshotProof for image-based verification
1085
- *
1086
- * @see {@link ProofTypes} For supported proof methods
1087
- * @see {@link ProofStatus} For possible verification states
1088
- * @see {@link CAIP10} For address format specification
1089
- * @public
1090
- */
1091
- export declare interface OwnershipProof {
1092
- type: ProofTypes;
1093
- status: ProofStatus;
1094
- did: DID;
1095
- address: CAIP10;
1096
- }
1097
-
1098
- /**
1099
- * 6.7
1100
- * Data describing the contents of the payload.
1101
- */
1102
- declare interface PayloadMetadata {
1103
- /** The method used to map from a national system of writing to Latin script. */
1104
- transliterationMethod?: TransliterationMethodCode[];
1105
- /** The version of IVMS 101 to which the payload complies. */
1106
- payloadVersion: PayloadVersionCode;
1107
- }
1108
-
1109
- /**
1110
- * The version of IVMS 101 to which the payload complies.
1111
- */
1112
- declare enum PayloadVersionCode {
1113
- /** Published May 2020 */
1114
- V101 = "101",
1115
- /** Published August 2023 */
1116
- V101_2023 = "101.2023"
1117
- }
1118
-
1119
- /**
1120
- * Person
1121
- * Represents either a natural person or a legal person
1122
- * @public
1123
- */
1124
- declare type Person = {
1125
- /** Natural person information */
1126
- naturalPerson?: NaturalPerson_2;
1127
- /** Legal person information */
1128
- legalPerson?: LegalPerson_2;
1129
- };
1130
-
1131
- /**
1132
- * 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.
1133
- * @public
1134
- */
1135
- /**
1136
- * Enum defining the types of persons/entities in a transaction
1137
- *
1138
- * @remarks
1139
- * This classification system aligns with FATF travel rule requirements and defines:
1140
- * - NATURAL: Individual human persons acting in their own capacity
1141
- * - LEGAL: Registered organizations, companies, or other legal entities
1142
- * - SELF: When the counterparty is the same as the customer (first party transaction)
1143
- *
1144
- * The type affects what information must be collected and transmitted as part of
1145
- * travel rule compliance. Different verification and due diligence requirements
1146
- * apply to each type.
1147
- *
1148
- * @see {@link NaturalPerson} For natural person data requirements
1149
- * @see {@link LegalPerson} For legal person data requirements
1150
- * @public
1151
- */
1152
- export declare enum PersonType {
1153
- NATURAL = "natural",
1154
- LEGAL = "legal",
1155
- SELF = "self"
1156
- }
1157
-
1158
- /**
1159
- * Status of the ownership proof verification process
1160
- *
1161
- * @remarks
1162
- * Represents the different states that an ownership proof can be in during and after verification:
1163
- * - PENDING: Initial state where verification is in progress or awaiting processing
1164
- * - FAILED: The proof was rejected due to failing verification checks
1165
- * - FLAGGED: The proof requires manual review due to suspicious or unclear verification results
1166
- * - VERIFIED: The proof has passed all verification checks successfully
1167
- *
1168
- * @public
1169
- */
1170
- export declare enum ProofStatus {
1171
- PENDING = "pending",// Verification is pending
1172
- FAILED = "rejected",// Rejected
1173
- FLAGGED = "flagged",// Flagged for manual review
1174
- VERIFIED = "verified"
1175
- }
1176
-
1177
- /**
1178
- * Types of ownership proofs supported by the system
1179
- *
1180
- * @remarks
1181
- * Supported proof types:
1182
- * - SelfDeclaration: User self-declares ownership without cryptographic proof
1183
- * - EIP191: Ethereum personal signature following EIP-191 standard
1184
- * - SIWE: Sign-In with Ethereum message signature (EIP-4361)
1185
- * - EIP712: Ethereum typed data signature following EIP-712 standard
1186
- * - BIP137: Bitcoin message signature following BIP-137
1187
- * - XPUB: Extended public key signature for HD wallets
1188
- * - MicroTransfer: Proof via small blockchain transaction
1189
- * - Screenshot: Image proof of ownership/access
1190
- *
1191
- * @see {@link SignatureProof} For signature-based proofs
1192
- * @see {@link DeclarationProof} For self-declaration proofs
1193
- * @see {@link MicroTransferProof} For transaction-based proofs
1194
- * @see {@link ScreenshotProof} For screenshot proofs
1195
- * @public
1196
- */
1197
- export declare enum ProofTypes {
1198
- SelfDeclaration = "self-declaration",
1199
- SIWE = "siwe",
1200
- SIWX = "siwx",
1201
- EIP191 = "eip-191",
1202
- EIP712 = "eip-712",
1203
- EIP1271 = "eip-1271",
1204
- BIP137 = "bip-137",
1205
- BIP137_XPUB = "xpub",
1206
- ED25519 = "ed25519",
1207
- MicroTransfer = "microtransfer",
1208
- Screenshot = "screenshot",
1209
- Connect = "connect"
1210
- }
1211
-
1212
- /**
1213
- * Represents a ready component message
1214
- * @public
1215
- */
1216
- export declare type Ready = {
1217
- type: CMType.READY;
1218
- };
1219
-
1220
- declare type RequestID = UUID;
1221
-
1222
- /**
1223
- * Represents a resize request component message. This is handled by the library.
1224
- * @internal
1225
- */
1226
- export declare type ResizeRequest = {
1227
- type: CMType.RESIZE;
1228
- height: number;
1229
- };
1230
-
1231
- /**
1232
- * Ownership Proof using Screenshot
1233
- * @public
1234
- */
1235
- export declare interface ScreenshotProof extends OwnershipProof {
1236
- type: ProofTypes.Screenshot;
1237
- url: string;
1238
- }
1239
-
1240
- /**
1241
- * Interface for signature-based ownership proofs that use cryptographic message signing
1242
- *
1243
- * @remarks
1244
- * Extends the base OwnershipProface to add signature-specific properties:
1245
- * - Supports multiple signature standards like EIP-191, EIP-712, BIP-137, SIWE
1246
- * - Includes the cryptographic proof signature string
1247
- * - Contains an attestation message that was signed
1248
- * - Records which wallet provider was used for signing
1249
- *
1250
- * The signature proves ownership by demonstrating control of the private keys
1251
- * associated with the claimed address.
1252
- *
1253
- * @see {@link ProofTypes} For supported signature types
1254
- * @see {@link OwnershipProof} For base proof properties
1255
- * @public
1256
- */
1257
- export declare interface SignatureProof extends OwnershipProof {
1258
- type: ProofTypes.EIP191 | ProofTypes.EIP712 | ProofTypes.EIP1271 | ProofTypes.BIP137 | ProofTypes.BIP137_XPUB | ProofTypes.ED25519 | ProofTypes.SIWX | ProofTypes.SIWE;
1259
- proof: string;
1260
- attestation: string;
1261
- wallet_provider: string;
1262
- }
1263
-
1264
- /**
1265
- * The source of a transaction
1266
- * @public
1267
- */
1268
- declare type Source = BlockchainAddress | CAIP10;
1269
-
1270
- /**
1271
- * The verification status of a transaction
1272
- * @public
1273
- */
1274
- export declare enum Status {
1275
- EMPTY = "empty",
1276
- VERIFY = "verify",
1277
- PENDING = "pending",
1278
- VERIFIED = "verified",
1279
- BANNED = "banned"
1280
- }
1281
-
1282
- /**
1283
- * The theme of the Notabene SDK
1284
- * @public
1285
- */
1286
- export declare type Theme = {
1287
- primaryColor: string;
1288
- secondaryColor: string;
1289
- fontFamily: string;
1290
- logo: string;
1291
- };
1292
-
1293
- /**
1294
- * Specify what to do under the provided threshold.
1295
- *
1296
- * Eg. to allow self-declaration for all transactions under 1000 EUR
1297
- *
1298
- * Note to support threshold you MUST include the Asset Price in the Transaction
1299
- *
1300
- * @see {@link Transaction} Transaction object
1301
- *
1302
- * @public
1303
- */
1304
- export declare interface ThresholdOptions {
1305
- threshold: number;
1306
- currency: ISOCurrency;
1307
- proofTypes?: ProofTypes[];
1308
- }
1309
-
1310
- /**
1311
- * Core transaction interface representing a crypto asset transfer between parties
1312
- *
1313
- * @remarks
1314
- * Extends ComponentRequest to add transaction-specific properties:
1315
- * - agent: The entity facilitating/executing the transaction
1316
- * - counterparty: The other party involved in the transaction
1317
- * - asset: The cryptocurrency or token being transferred
1318
- * - amountDecimal: The amount to transfer in decimal format
1319
- * - proof: Optional ownership proof verifying control of involved addresses
1320
- * - assetPrice: Optional price information in a fiat currency
1321
- *
1322
- * This interface serves as the base for specific transaction types like:
1323
- * - Withdrawals for sending assets out
1324
- * - Deposits for receiving assets
1325
- * - Deposit requests for requesting asset transfers
1326
- *
1327
- * @see {@link Withdrawal} For withdrawal-specific transaction properties
1328
- * @see {@link Deposit} For deposit-specific transaction properties
1329
- * @see {@link Agent} For agent details
1330
- * @see {@link Counterparty} For counterparty information
1331
- * @public
1332
- */
1333
- export declare interface Transaction extends ComponentRequest {
1334
- agent: Agent;
1335
- counterparty: Counterparty;
1336
- asset: TransactionAsset;
1337
- amountDecimal: number;
1338
- proof?: OwnershipProof;
1339
- assetPrice?: {
1340
- price: number;
1341
- currency: ISOCurrency;
1342
- };
1343
- }
1344
-
1345
- /**
1346
- * The asset of a transaction either a Notabene asset, a CAIP-19 asset, or a DTI.
1347
- * @public
1348
- */
1349
- export declare type TransactionAsset = NotabeneAsset | CAIP19 | DTI;
1350
-
1351
- /**
1352
- * Configuration options for Transaction components
1353
- * @public
1354
- */
1355
- export declare interface TransactionOptions {
1356
- proofs?: {
1357
- microTransfer?: {
1358
- destination: BlockchainAddress;
1359
- amountSubunits: string;
1360
- timeout?: number;
1361
- };
1362
- fallbacks?: ProofTypes[];
1363
- deminimis?: ThresholdOptions;
1364
- };
1365
- allowedAgentTypes?: AgentType[];
1366
- allowedCounterpartyTypes?: PersonType[];
1367
- fields?: FieldTypes;
1368
- vasps?: VASPOptions;
1369
- hide?: ValidationSections[];
1370
- }
1371
-
1372
- /**
1373
- * Response interface for transaction-related operations
1374
- *
1375
- * @remarks
1376
- * Extends ComponentResponse to add transaction-specific response data:
1377
- * - value: The resulting transaction value of generic type V
1378
- * - ivms101: IVMS 101 travel rule data for the transaction
1379
- * - proof: Optional ownership proof details if required
1380
- * - txCreate: Optional V1 transaction payload for legacy API compatibility
1381
- *
1382
- * @typeParam V - Type of the transaction value being returned
1383
- *
1384
- * @see {@link ComponentResponse} For base response properties
1385
- * @see {@link IVMS101} For travel rule data structure
1386
- * @see {@link OwnershipProof} For proof details
1387
- * @see {@link V1Transaction} For legacy transaction format
1388
- * @public
1389
- */
1390
- export declare interface TransactionResponse<V> extends ComponentResponse {
1391
- value: V;
1392
- ivms101: IVMS101;
1393
- proof?: OwnershipProof;
1394
- txCreate?: V1Transaction;
1395
- }
1396
-
1397
- /**
1398
- * Transfer Path
1399
- * Represents the path of intermediary VASPs in a transfer
1400
- * @public
1401
- */
1402
- declare type TransferPath = {
1403
- /** Array of intermediary VASPs involved in the transfer */
1404
- transferPath?: IntermediaryVASP[];
1405
- };
1406
-
1407
- /**
1408
- * Transliteration Method Code
1409
- * Specifies the method used to transliterate text
1410
- * @public
1411
- */
1412
- declare type TransliterationMethodCode = 'arab' | 'aran' | 'armn' | 'cyrl' | 'deva' | 'geor' | 'grek' | 'hani' | 'hebr' | 'kana' | 'kore' | 'thai' | 'othr';
1413
-
1414
- /**
1415
- * A travel address
1416
- * @public
1417
-
1418
- * A standardized travel rule address format
1419
- *
1420
- * @remarks
1421
- * Represents a special address format used for travel rule compliance. Travel addresses
1422
- * are prefixed with 'ta' and contain encoded information about the transaction
1423
- * and counterparty details required for travel rule reporting.
1424
- *
1425
- * The format ensures consistent handling of travel rule data across different
1426
- * VASPs and blockchain networks while maintaining privacy.
1427
- *
1428
- * @example "ta1234abcd..." // Example travel rule address
1429
- * @see {@link BlockchainAddress} For native chain addresses
1430
- * @see {@link CAIP10} For chain-agnostic addresses
1431
-
1432
- */ export declare type TravelAddress = `ta${string}`;
1433
-
1434
- /**
1435
- * Message type for updating component state and configuration from host application
1436
- *
1437
- * @remarks
1438
- * Defines the structure of update messages sent from host to component:
1439
- * - type: Identifies this as an update message
1440
- * - value: New partial state/data to update the component with
1441
- * - options: Optional configuration parameters to modify component behavior
1442
- *
1443
- * The host can use this to dynamically update both the component's data
1444
- * and its configuration without requiring a full reload/reinitialize.
1445
- *
1446
- * @typeParam T - The type of the value being updated
1447
- * @typeParam O - The type of the optional configuration parameters
1448
- *
1449
- * @see {@link HMType} For message type constants
1450
- * @see {@link HostMessage} For full host message type union
1451
- * @public
1452
- */
1453
- export declare type UpdateValue<T, O> = {
1454
- type: HMType.UPDATE;
1455
- value: Partial<T>;
1456
- options?: O;
1457
- };
1458
-
1459
- /**
1460
- * A Uniform Resource Identifier
1461
- * @public
1462
- */
1463
- declare type URI = string;
1464
-
1465
- /**
1466
- * UUID v4 string identifier
1467
- * A universally unique identifier that follows RFC 4122 format
1468
- * Format: 8-4-4-4-12 hexadecimal digits
1469
- * @example "550e8400-e29b-41d4-a716-446655440000"
1470
- * @see {@link https://tools.ietf.org/html/rfc4122 | RFC4122}
1471
- * @public
1472
- */
1473
- declare type UUID = string;
1474
-
1475
- /**
1476
- * Represents a legacy V1 API asset format supporting both Notabene and CAIP-19 identifiers
1477
- *
1478
- * @remarks
1479
- * Used for backwards compatibility with V1 API transaction payloads:
1480
- * - Can be either a simple Notabene asset string
1481
- * - Or an object containing a CAIP-19 identifier
1482
- *
1483
- * @example "ETH_USDT" // Notabene asset format
1484
- * @example \{ caip19: "eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f" \} // CAIP-19 format
1485
- * @see {@link NotabeneAsset} For Notabene asset format
1486
- * @see {@link CAIP19} For CAIP-19 asset format
1487
- * @public
1488
- */
1489
- declare type V1Asset = NotabeneAsset | {
1490
- caip19: CAIP19;
1491
- };
1492
-
1493
- /**
1494
- * Transaction payload suitable for calling Notabene v1 tx/create
1495
- * @public
1496
- */
1497
- export declare type V1Transaction = {
1498
- transactionAsset: V1Asset;
1499
- transactionAmount: string;
1500
- originatorEqualsBeneficiary?: boolean;
1501
- originatorVASPdid: DID;
1502
- beneficiaryVASPdid: DID;
1503
- beneficiaryProof?: OwnershipProof;
1504
- originator?: Originator;
1505
- beneficiary: Beneficiary;
1506
- };
1507
-
1508
- /**
1509
- * Validation error
1510
- * @public
1511
- */
1512
- export declare type ValidationError = {
1513
- attribute: string;
1514
- message: string;
1515
- };
1516
-
1517
- /**
1518
- * Sections in a WithdrawalAssist screen
1519
- *
1520
- * @alpha
1521
- */
1522
- export declare enum ValidationSections {
1523
- ASSET = "asset",
1524
- DESTINATION = "destination",
1525
- COUNTERPARTY = "counterparty",
1526
- AGENT = "agent"
1527
- }
1528
-
1529
- /**
1530
- * A VASP agent acting on behalf of the counterparty
1531
- * @public
1532
- */
1533
- export declare interface VASP extends Agent {
1534
- lei?: LEI;
1535
- logo?: URI;
1536
- website?: URI;
1537
- countryOfRegistration?: ISOCountryCode;
1538
- }
1539
-
1540
- /**
1541
- * Options for which VASPs to be searchable
1542
- * @public
1543
- */
1544
- export declare type VASPOptions = {
1545
- addUnknown?: boolean;
1546
- onlyActive?: boolean;
1547
- };
1548
-
1549
- /**
1550
- * A wallet agent acting on behalf of the counterparty
1551
- * @public
1552
- */
1553
- export declare interface Wallet extends Agent {
1554
- proof: OwnershipProof;
1555
- wallet_connect_id?: string;
1556
- }
1557
-
1558
- /**
1559
- * An object representing a withdrawal transaction
1560
- * @public
1561
- */
1562
- export declare interface Withdrawal extends BeneficiaryFields, Transaction {
1563
- }
1564
-
1565
- export { }