@notabene/javascript-sdk 2.0.0-next.2 → 2.0.0-next.20

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