@notabene/javascript-sdk 2.8.0-next.2 → 2.8.0-next.4

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