@notabene/javascript-sdk 2.0.0-next.17 → 2.0.0-next.19
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.
- package/LICENSE.md +21 -0
- package/README.md +19 -0
- package/dist/notabene.cjs +1 -1
- package/dist/notabene.d.ts +456 -76
- package/dist/notabene.js +62 -16
- package/package.json +1 -1
- package/src/components/EmbeddedComponent.ts +20 -8
- package/src/components/__tests__/EmbeddedComponent.test.ts +61 -16
- package/src/notabene.ts +88 -33
- package/src/types.ts +414 -40
- package/src/utils/MessageEventManager.ts +62 -3
- package/src/utils/__tests__/MessageEventManager.test.ts +12 -4
package/dist/notabene.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ declare type Beneficiary = {
|
|
|
84
84
|
* @public
|
|
85
85
|
*/
|
|
86
86
|
declare type BeneficiaryFields = {
|
|
87
|
-
destination?:
|
|
87
|
+
destination?: Destination;
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -101,34 +101,72 @@ declare type BeneficiaryVASP = {
|
|
|
101
101
|
* A blockchain address
|
|
102
102
|
* @public
|
|
103
103
|
*/
|
|
104
|
-
|
|
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;
|
|
105
118
|
|
|
106
119
|
/**
|
|
107
|
-
* Chain Agnostic Account Identifier
|
|
108
|
-
* Represents an account on a specific blockchain
|
|
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
|
+
*
|
|
109
124
|
* Format: `{caip2}:{address}`
|
|
110
|
-
*
|
|
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}
|
|
111
132
|
* @public
|
|
112
133
|
*/
|
|
113
|
-
declare type CAIP10 = `${CAIP2}:${string}`;
|
|
134
|
+
export declare type CAIP10 = `${CAIP2}:${string}`;
|
|
114
135
|
|
|
115
136
|
/**
|
|
116
|
-
* Chain Agnostic Asset Identifier
|
|
117
|
-
* Represents an asset on a specific blockchain
|
|
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
|
+
*
|
|
118
141
|
* Format: `{caip2}/{asset_namespace}:{asset_reference}`
|
|
119
|
-
*
|
|
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}
|
|
120
150
|
* @public
|
|
121
151
|
*/
|
|
122
|
-
declare type CAIP19 = `${CAIP2}/${string}:${string}`;
|
|
152
|
+
export declare type CAIP19 = `${CAIP2}/${string}:${string}`;
|
|
123
153
|
|
|
124
154
|
/**
|
|
125
|
-
* Chain Agnostic Blockchain Identifier
|
|
126
|
-
* Represents a blockchain in a chain-agnostic way
|
|
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
|
+
*
|
|
127
159
|
* Format: `namespace:reference`
|
|
128
|
-
*
|
|
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}
|
|
129
167
|
* @public
|
|
130
168
|
*/
|
|
131
|
-
declare type CAIP2 = `${string}:${string}`;
|
|
169
|
+
export declare type CAIP2 = `${string}:${string}`;
|
|
132
170
|
|
|
133
171
|
/**
|
|
134
172
|
* Options for callback and redirect URIs
|
|
@@ -143,12 +181,22 @@ export declare interface CallbackOptions {
|
|
|
143
181
|
* Represents a cancel component message
|
|
144
182
|
* @internal
|
|
145
183
|
*/
|
|
146
|
-
declare type Cancel = {
|
|
184
|
+
export declare type Cancel = {
|
|
147
185
|
type: CMType.CANCEL;
|
|
148
186
|
};
|
|
149
187
|
|
|
150
188
|
/**
|
|
151
|
-
* Component Message
|
|
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
|
|
152
200
|
* @public
|
|
153
201
|
*/
|
|
154
202
|
export declare const enum CMType {
|
|
@@ -167,19 +215,50 @@ export declare const enum CMType {
|
|
|
167
215
|
* @param response - The Response object which wraps T
|
|
168
216
|
* @public
|
|
169
217
|
*/
|
|
170
|
-
declare type Completed<T> = {
|
|
218
|
+
export declare type Completed<T> = {
|
|
171
219
|
type: CMType.COMPLETE;
|
|
172
220
|
response: TransactionResponse<T>;
|
|
173
221
|
};
|
|
174
222
|
|
|
175
223
|
/**
|
|
176
|
-
*
|
|
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
|
|
177
244
|
* @public
|
|
178
245
|
*/
|
|
179
246
|
export declare type ComponentMessage<T> = Completed<T> | Cancel | Error_2 | Ready | ResizeRequest | InvalidValue<T>;
|
|
180
247
|
|
|
181
248
|
/**
|
|
182
|
-
*
|
|
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
|
|
183
262
|
* @public
|
|
184
263
|
*/
|
|
185
264
|
declare interface ComponentRequest {
|
|
@@ -187,7 +266,26 @@ declare interface ComponentRequest {
|
|
|
187
266
|
customer?: Counterparty;
|
|
188
267
|
}
|
|
189
268
|
|
|
190
|
-
|
|
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 {
|
|
191
289
|
requestID: RequestID;
|
|
192
290
|
valid: boolean;
|
|
193
291
|
status: Status;
|
|
@@ -206,6 +304,28 @@ export declare interface ConnectionRequest extends ComponentRequest {
|
|
|
206
304
|
* The counterparty of a transaction.
|
|
207
305
|
* @public
|
|
208
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
|
+
*/
|
|
209
329
|
export declare interface Counterparty {
|
|
210
330
|
name?: string;
|
|
211
331
|
accountNumber?: string;
|
|
@@ -222,8 +342,7 @@ export declare interface Counterparty {
|
|
|
222
342
|
/**
|
|
223
343
|
* A crypto credential
|
|
224
344
|
* @public
|
|
225
|
-
*/
|
|
226
|
-
declare type CryptoCredential = `${string}.${string}.mastercard`;
|
|
345
|
+
*/ export declare type CryptoCredential = `${string}.${string}.mastercard`;
|
|
227
346
|
|
|
228
347
|
/**
|
|
229
348
|
* Date and Place of Birth
|
|
@@ -275,27 +394,41 @@ declare type DepositRequestFields = {
|
|
|
275
394
|
* The destination of a transaction either a blockchain address, a CAIP-19 address, or a travel address.
|
|
276
395
|
* @public
|
|
277
396
|
*/
|
|
278
|
-
export declare type
|
|
397
|
+
export declare type Destination = BlockchainAddress | CAIP10 | CryptoCredential | TravelAddress;
|
|
279
398
|
|
|
280
399
|
/**
|
|
281
400
|
* A Decentralized Identifier
|
|
282
401
|
* @public
|
|
283
402
|
*/
|
|
284
|
-
declare type DID = `did:${string}:${string}`;
|
|
403
|
+
export declare type DID = `did:${string}:${string}`;
|
|
285
404
|
|
|
286
405
|
/**
|
|
287
|
-
* Digital Token Identifier
|
|
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}
|
|
288
420
|
* @public
|
|
289
421
|
*/
|
|
290
|
-
declare type DTI = string;
|
|
422
|
+
export declare type DTI = string;
|
|
291
423
|
|
|
292
424
|
/**
|
|
293
425
|
* An embedded Notabene component
|
|
294
426
|
* @public
|
|
295
427
|
*/
|
|
296
|
-
export declare class EmbeddedComponent<V> {
|
|
428
|
+
export declare class EmbeddedComponent<V, O> {
|
|
297
429
|
private _url;
|
|
298
430
|
private _value;
|
|
431
|
+
private _options?;
|
|
299
432
|
private _errors;
|
|
300
433
|
private iframe?;
|
|
301
434
|
private eventManager;
|
|
@@ -305,7 +438,7 @@ export declare class EmbeddedComponent<V> {
|
|
|
305
438
|
* @param url - The URL of the embedded component
|
|
306
439
|
* @param value - The initial transaction value
|
|
307
440
|
*/
|
|
308
|
-
constructor(url: string, value: Partial<V
|
|
441
|
+
constructor(url: string, value: Partial<V>, options?: O);
|
|
309
442
|
/**
|
|
310
443
|
* Gets the URL of the embedded component
|
|
311
444
|
* @returns The URL of the embedded component
|
|
@@ -316,6 +449,7 @@ export declare class EmbeddedComponent<V> {
|
|
|
316
449
|
* @returns The current transaction value
|
|
317
450
|
*/
|
|
318
451
|
get value(): Partial<V>;
|
|
452
|
+
get options(): O | undefined;
|
|
319
453
|
get errors(): ValidationError[];
|
|
320
454
|
/**
|
|
321
455
|
* Opens the component URL in the current window
|
|
@@ -332,11 +466,12 @@ export declare class EmbeddedComponent<V> {
|
|
|
332
466
|
* @param parent - The parent element to embed the component into
|
|
333
467
|
*/
|
|
334
468
|
embed(parent: Element, modal?: boolean): void;
|
|
469
|
+
removeEmbed(): void;
|
|
335
470
|
/**
|
|
336
471
|
* Sends a message to the embedded component
|
|
337
472
|
* @param message - The message to send
|
|
338
473
|
*/
|
|
339
|
-
send(message: HostMessage<V>): void;
|
|
474
|
+
send(message: HostMessage<V, O>): void;
|
|
340
475
|
/**
|
|
341
476
|
* Adds an event listener for a specific message type
|
|
342
477
|
* @param messageType - The type of message to listen for
|
|
@@ -353,7 +488,7 @@ export declare class EmbeddedComponent<V> {
|
|
|
353
488
|
* Updates the transaction value and sends an update message to the component
|
|
354
489
|
* @param value - The new transaction value
|
|
355
490
|
*/
|
|
356
|
-
update(value: Partial<V
|
|
491
|
+
update(value: Partial<V>, options?: O): void;
|
|
357
492
|
/**
|
|
358
493
|
* Waits for the component to complete and returns the transaction response
|
|
359
494
|
* @returns A promise that resolves with the transaction response
|
|
@@ -379,6 +514,7 @@ declare type Error_2 = {
|
|
|
379
514
|
type: CMType.ERROR;
|
|
380
515
|
message: string;
|
|
381
516
|
};
|
|
517
|
+
export { Error_2 as Error }
|
|
382
518
|
|
|
383
519
|
/**
|
|
384
520
|
* Field properties
|
|
@@ -389,25 +525,46 @@ declare type FieldOptions = boolean | {
|
|
|
389
525
|
transmit: boolean;
|
|
390
526
|
};
|
|
391
527
|
|
|
392
|
-
|
|
528
|
+
/**
|
|
529
|
+
* Field type configuration
|
|
530
|
+
* @public
|
|
531
|
+
*/
|
|
532
|
+
export declare type FieldTypes = {
|
|
393
533
|
naturalPerson?: NaturalPersonFields;
|
|
394
534
|
legalPerson?: LegalPersonFields;
|
|
395
535
|
};
|
|
396
536
|
|
|
397
537
|
/**
|
|
398
|
-
* Host Message
|
|
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
|
|
399
544
|
* @public
|
|
400
545
|
*/
|
|
401
|
-
declare const enum HMType {
|
|
546
|
+
export declare const enum HMType {
|
|
402
547
|
UPDATE = "update",
|
|
403
548
|
REQUEST_RESPONSE = "requestResponse"
|
|
404
549
|
}
|
|
405
550
|
|
|
406
551
|
/**
|
|
407
|
-
*
|
|
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
|
|
408
565
|
* @public
|
|
409
566
|
*/
|
|
410
|
-
export declare type HostMessage<T> = UpdateValue<T>;
|
|
567
|
+
export declare type HostMessage<T, O> = UpdateValue<T, O>;
|
|
411
568
|
|
|
412
569
|
/**
|
|
413
570
|
* Intermediary VASP
|
|
@@ -428,7 +585,7 @@ declare type IntermediaryVASP = {
|
|
|
428
585
|
* @param errors - Array of validation errors
|
|
429
586
|
* @internal
|
|
430
587
|
*/
|
|
431
|
-
declare type InvalidValue<T> = {
|
|
588
|
+
export declare type InvalidValue<T> = {
|
|
432
589
|
type: CMType.INVALID;
|
|
433
590
|
value: Partial<T>;
|
|
434
591
|
errors: ValidationError[];
|
|
@@ -469,12 +626,40 @@ export declare type IVMS101 = {
|
|
|
469
626
|
payloadMetadata?: PayloadMetadata;
|
|
470
627
|
};
|
|
471
628
|
|
|
629
|
+
/**
|
|
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
|
+
|
|
472
657
|
/**
|
|
473
658
|
* Legal Person
|
|
474
659
|
* Represents a legal person with all associated information
|
|
475
660
|
* @public
|
|
476
661
|
*/
|
|
477
|
-
declare type
|
|
662
|
+
declare type LegalPerson_2 = {
|
|
478
663
|
/** The name of the legal person */
|
|
479
664
|
name: LegalPersonName;
|
|
480
665
|
/** The address of the legal person */
|
|
@@ -487,10 +672,6 @@ declare type LegalPerson = {
|
|
|
487
672
|
countryOfRegistration?: ISOCountryCode;
|
|
488
673
|
};
|
|
489
674
|
|
|
490
|
-
/**
|
|
491
|
-
* Field names for LegalPerson
|
|
492
|
-
* @public
|
|
493
|
-
*/
|
|
494
675
|
declare type LegalPersonFieldName = 'name' | 'lei' | 'website' | 'email' | 'phone' | 'geographicAddress' | 'nationalIdentification' | 'countryOfRegistration';
|
|
495
676
|
|
|
496
677
|
/**
|
|
@@ -538,7 +719,7 @@ declare type LegalPersonNameTypeCode = 'LEGL' | 'SHRT' | 'TRAD';
|
|
|
538
719
|
* A LEI Legal Entity Identifier
|
|
539
720
|
* @public
|
|
540
721
|
*/
|
|
541
|
-
declare type LEI = string;
|
|
722
|
+
export declare type LEI = string;
|
|
542
723
|
|
|
543
724
|
/**
|
|
544
725
|
* Local Legal Person Name ID
|
|
@@ -566,7 +747,14 @@ declare type LocalNaturalPersonNameID = {
|
|
|
566
747
|
nameIdentifierType?: NaturalPersonNameTypeCode;
|
|
567
748
|
};
|
|
568
749
|
|
|
569
|
-
|
|
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;
|
|
570
758
|
|
|
571
759
|
/**
|
|
572
760
|
* Ownership Proof using Micro Transfer
|
|
@@ -576,6 +764,7 @@ export declare interface MicroTransferProof extends OwnershipProof {
|
|
|
576
764
|
type: ProofTypes.MicroTransfer;
|
|
577
765
|
txhash: string;
|
|
578
766
|
chain: CAIP2;
|
|
767
|
+
destination: BlockchainAddress;
|
|
579
768
|
amountSubunits: string;
|
|
580
769
|
}
|
|
581
770
|
|
|
@@ -584,7 +773,7 @@ export declare interface MicroTransferProof extends OwnershipProof {
|
|
|
584
773
|
* Represents a national identifier for a person or entity
|
|
585
774
|
* @public
|
|
586
775
|
*/
|
|
587
|
-
declare type NationalIdentification = {
|
|
776
|
+
export declare type NationalIdentification = {
|
|
588
777
|
/** National identifier (max 35 characters) */
|
|
589
778
|
nationalIdentifier?: string;
|
|
590
779
|
/** Type of national identifier */
|
|
@@ -602,12 +791,39 @@ declare type NationalIdentification = {
|
|
|
602
791
|
*/
|
|
603
792
|
declare type NationalIdentifierTypeCode = 'ARNU' | 'CCPT' | 'RAID' | 'DRLC' | 'FIIN' | 'TXID' | 'SOCS' | 'IDCD' | 'LEIX' | 'MISC';
|
|
604
793
|
|
|
794
|
+
/**
|
|
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
|
+
|
|
605
821
|
/**
|
|
606
822
|
* Natural Person
|
|
607
823
|
* Represents a natural person with all associated information
|
|
608
824
|
* @public
|
|
609
825
|
*/
|
|
610
|
-
declare type
|
|
826
|
+
declare type NaturalPerson_2 = {
|
|
611
827
|
/** The distinct words used as identification for an individual */
|
|
612
828
|
name: NaturalPersonName;
|
|
613
829
|
/** The particulars of a location at which a person may be communicated with */
|
|
@@ -629,7 +845,7 @@ declare type NaturalPerson = {
|
|
|
629
845
|
declare type NaturalPersonFieldName = 'name' | 'website' | 'email' | 'phone' | 'geographicAddress' | 'nationalIdentification' | 'dateOfBirth' | 'placeOfBirth' | 'countryOfResidence';
|
|
630
846
|
|
|
631
847
|
/**
|
|
632
|
-
* Field properties by field name
|
|
848
|
+
* Field properties by field name for Natural persons
|
|
633
849
|
* @public
|
|
634
850
|
*/
|
|
635
851
|
declare type NaturalPersonFields = {
|
|
@@ -703,7 +919,7 @@ declare class Notabene {
|
|
|
703
919
|
* @returns component URL
|
|
704
920
|
* @internal
|
|
705
921
|
*/
|
|
706
|
-
componentUrl<V>(path: string, value: V, configuration?:
|
|
922
|
+
componentUrl<V, O>(path: string, value: V, configuration?: O, callbacks?: CallbackOptions): string;
|
|
707
923
|
/**
|
|
708
924
|
* Creates a new embedded component
|
|
709
925
|
*
|
|
@@ -714,7 +930,7 @@ declare class Notabene {
|
|
|
714
930
|
* @returns A new EmbeddedComponent instance
|
|
715
931
|
* @internal
|
|
716
932
|
*/
|
|
717
|
-
createComponent<V>(path: string, value: Partial<V>, options?:
|
|
933
|
+
createComponent<V, O>(path: string, value: Partial<V>, options?: O, callbacks?: CallbackOptions): EmbeddedComponent<V, O>;
|
|
718
934
|
/**
|
|
719
935
|
* Creates a withdrawal assist component
|
|
720
936
|
*
|
|
@@ -723,7 +939,7 @@ declare class Notabene {
|
|
|
723
939
|
* @param callbacks - Optional callback configuration
|
|
724
940
|
* @returns A new EmbeddedComponent instance for withdrawal assistance
|
|
725
941
|
*/
|
|
726
|
-
createWithdrawalAssist(value: Partial<Withdrawal>, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<Withdrawal>;
|
|
942
|
+
createWithdrawalAssist(value: Partial<Withdrawal>, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<Withdrawal, TransactionOptions>;
|
|
727
943
|
/**
|
|
728
944
|
* Creates a wallet assist component
|
|
729
945
|
*
|
|
@@ -733,7 +949,7 @@ declare class Notabene {
|
|
|
733
949
|
* @returns A new EmbeddedComponent instance for withdrawal assistance
|
|
734
950
|
* @alpha
|
|
735
951
|
*/
|
|
736
|
-
createWalletAssist(value: Partial<Withdrawal>, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<Withdrawal>;
|
|
952
|
+
createWalletAssist(value: Partial<Withdrawal>, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<Withdrawal, TransactionOptions>;
|
|
737
953
|
/**
|
|
738
954
|
* Creates a deposit assist component
|
|
739
955
|
*
|
|
@@ -743,7 +959,7 @@ declare class Notabene {
|
|
|
743
959
|
* @returns A new EmbeddedComponent instance for deposit assistance
|
|
744
960
|
* @alpha
|
|
745
961
|
*/
|
|
746
|
-
createDepositAssist(value: Partial<Deposit>, options?: any, callbacks?: CallbackOptions): EmbeddedComponent<Deposit>;
|
|
962
|
+
createDepositAssist(value: Partial<Deposit>, options?: any, callbacks?: CallbackOptions): EmbeddedComponent<Deposit, any>;
|
|
747
963
|
/**
|
|
748
964
|
* Creates a connect component
|
|
749
965
|
*
|
|
@@ -753,7 +969,7 @@ declare class Notabene {
|
|
|
753
969
|
* @returns A new EmbeddedComponent instance for connection
|
|
754
970
|
* @alpha
|
|
755
971
|
*/
|
|
756
|
-
createConnectWallet(value: ConnectionRequest, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<ConnectionRequest>;
|
|
972
|
+
createConnectWallet(value: ConnectionRequest, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<ConnectionRequest, TransactionOptions>;
|
|
757
973
|
/**
|
|
758
974
|
* Creates a deposit request component
|
|
759
975
|
*
|
|
@@ -763,7 +979,7 @@ declare class Notabene {
|
|
|
763
979
|
* @returns A new EmbeddedComponent instance for deposit requests
|
|
764
980
|
* @public
|
|
765
981
|
*/
|
|
766
|
-
createDepositRequest(value: DepositRequest, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<DepositRequest>;
|
|
982
|
+
createDepositRequest(value: DepositRequest, options?: TransactionOptions, callbacks?: CallbackOptions): EmbeddedComponent<DepositRequest, TransactionOptions>;
|
|
767
983
|
/**
|
|
768
984
|
* Decodes a URL fragment into an object
|
|
769
985
|
*
|
|
@@ -772,20 +988,28 @@ declare class Notabene {
|
|
|
772
988
|
*/
|
|
773
989
|
decodeFragmentToObject(fragment: string): Record<string, string>;
|
|
774
990
|
}
|
|
775
|
-
export { Notabene }
|
|
776
991
|
export default Notabene;
|
|
777
992
|
|
|
778
993
|
/**
|
|
779
994
|
* Notabene Asset Identifier
|
|
780
995
|
* @public
|
|
781
996
|
*/
|
|
782
|
-
declare type NotabeneAsset = string;
|
|
783
|
-
|
|
784
997
|
/**
|
|
785
|
-
*
|
|
998
|
+
* Internal identifier for assets in the Notabene system
|
|
999
|
+
*
|
|
1000
|
+
* @remarks
|
|
1001
|
+
* A standardized string format used within Notabene to identify cryptocurrencies,
|
|
1002
|
+
* tokens, and other digital assets. This is Notabene's legacy asset identification
|
|
1003
|
+
* system that may be used alongside CAIP-19 and DTI identifiers.
|
|
786
1004
|
*
|
|
1005
|
+
* @example "ETH_USDT" // USDT token on Ethereum
|
|
1006
|
+
* @example "BTC" // Bitcoin
|
|
1007
|
+
* @see {@link CAIP19} For chain-agnostic asset identifiers
|
|
1008
|
+
* @see {@link DTI} For ISO standardized identifiers
|
|
787
1009
|
* @public
|
|
788
1010
|
*/
|
|
1011
|
+
export declare type NotabeneAsset = string;
|
|
1012
|
+
|
|
789
1013
|
/**
|
|
790
1014
|
* Configuration for the Notabene SDK
|
|
791
1015
|
*
|
|
@@ -845,7 +1069,24 @@ declare type OriginatorFields = {
|
|
|
845
1069
|
};
|
|
846
1070
|
|
|
847
1071
|
/**
|
|
848
|
-
*
|
|
1072
|
+
* Base interface for proving ownership of an account or address
|
|
1073
|
+
*
|
|
1074
|
+
* @remarks
|
|
1075
|
+
* TheOwnershipProof interface provides a common structure for different types of ownership verification:
|
|
1076
|
+
* - All proofs must specify their type from the supported ProofTypes enum
|
|
1077
|
+
* - Current verification status is tracked via ProofStatus
|
|
1078
|
+
* - Links the proof to a decentralized identifier (DID)
|
|
1079
|
+
* - Specifies the blockchain account/address being proven using CAIP-10 format
|
|
1080
|
+
*
|
|
1081
|
+
* This interface is extended by specific proof types like:
|
|
1082
|
+
* - SignatureProof for cryptographic signatures
|
|
1083
|
+
* - DeclarationProof for self-declarations
|
|
1084
|
+
* - MicroTransferProof for transaction-based proof
|
|
1085
|
+
* - ScreenshotProof for image-based verification
|
|
1086
|
+
*
|
|
1087
|
+
* @see {@link ProofTypes} For supported proof methods
|
|
1088
|
+
* @see {@link ProofStatus} For possible verification states
|
|
1089
|
+
* @see {@link CAIP10} For address format specification
|
|
849
1090
|
* @public
|
|
850
1091
|
*/
|
|
851
1092
|
export declare interface OwnershipProof {
|
|
@@ -883,15 +1124,32 @@ declare enum PayloadVersionCode {
|
|
|
883
1124
|
*/
|
|
884
1125
|
declare type Person = {
|
|
885
1126
|
/** Natural person information */
|
|
886
|
-
naturalPerson?:
|
|
1127
|
+
naturalPerson?: NaturalPerson_2;
|
|
887
1128
|
/** Legal person information */
|
|
888
|
-
legalPerson?:
|
|
1129
|
+
legalPerson?: LegalPerson_2;
|
|
889
1130
|
};
|
|
890
1131
|
|
|
891
1132
|
/**
|
|
892
1133
|
* 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.
|
|
893
1134
|
* @public
|
|
894
1135
|
*/
|
|
1136
|
+
/**
|
|
1137
|
+
* Enum defining the types of persons/entities in a transaction
|
|
1138
|
+
*
|
|
1139
|
+
* @remarks
|
|
1140
|
+
* This classification system aligns with FATF travel rule requirements and defines:
|
|
1141
|
+
* - NATURAL: Individual human persons acting in their own capacity
|
|
1142
|
+
* - LEGAL: Registered organizations, companies, or other legal entities
|
|
1143
|
+
* - SELF: When the counterparty is the same as the customer (first party transaction)
|
|
1144
|
+
*
|
|
1145
|
+
* The type affects what information must be collected and transmitted as part of
|
|
1146
|
+
* travel rule compliance. Different verification and due diligence requirements
|
|
1147
|
+
* apply to each type.
|
|
1148
|
+
*
|
|
1149
|
+
* @see {@link NaturalPerson} For natural person data requirements
|
|
1150
|
+
* @see {@link LegalPerson} For legal person data requirements
|
|
1151
|
+
* @public
|
|
1152
|
+
*/
|
|
895
1153
|
export declare enum PersonType {
|
|
896
1154
|
NATURAL = "natural",
|
|
897
1155
|
LEGAL = "legal",
|
|
@@ -899,7 +1157,15 @@ export declare enum PersonType {
|
|
|
899
1157
|
}
|
|
900
1158
|
|
|
901
1159
|
/**
|
|
902
|
-
* Status of the proof
|
|
1160
|
+
* Status of the ownership proof verification process
|
|
1161
|
+
*
|
|
1162
|
+
* @remarks
|
|
1163
|
+
* Represents the different states that an ownership proof can be in during and after verification:
|
|
1164
|
+
* - PENDING: Initial state where verification is in progress or awaiting processing
|
|
1165
|
+
* - FAILED: The proof was rejected due to failing verification checks
|
|
1166
|
+
* - FLAGGED: The proof requires manual review due to suspicious or unclear verification results
|
|
1167
|
+
* - VERIFIED: The proof has passed all verification checks successfully
|
|
1168
|
+
*
|
|
903
1169
|
* @public
|
|
904
1170
|
*/
|
|
905
1171
|
export declare enum ProofStatus {
|
|
@@ -910,7 +1176,23 @@ export declare enum ProofStatus {
|
|
|
910
1176
|
}
|
|
911
1177
|
|
|
912
1178
|
/**
|
|
913
|
-
*
|
|
1179
|
+
* Types of ownership proofs supported by the system
|
|
1180
|
+
*
|
|
1181
|
+
* @remarks
|
|
1182
|
+
* Supported proof types:
|
|
1183
|
+
* - SelfDeclaration: User self-declares ownership without cryptographic proof
|
|
1184
|
+
* - PersonalSignEIP191: Ethereum personal signature following EIP-191 standard
|
|
1185
|
+
* - SIWE: Sign-In with Ethereum message signature (EIP-4361)
|
|
1186
|
+
* - PersonalSignEIP712: Ethereum typed data signature following EIP-712 standard
|
|
1187
|
+
* - PersonalSignBIP137: Bitcoin message signature following BIP-137
|
|
1188
|
+
* - PersonalSignXPUB: Extended public key signature for HD wallets
|
|
1189
|
+
* - MicroTransfer: Proof via small blockchain transaction
|
|
1190
|
+
* - Screenshot: Image proof of ownership/access
|
|
1191
|
+
*
|
|
1192
|
+
* @see {@link SignatureProof} For signature-based proofs
|
|
1193
|
+
* @see {@link DeclarationProof} For self-declaration proofs
|
|
1194
|
+
* @see {@link MicroTransferProof} For transaction-based proofs
|
|
1195
|
+
* @see {@link ScreenshotProof} For screenshot proofs
|
|
914
1196
|
* @public
|
|
915
1197
|
*/
|
|
916
1198
|
export declare enum ProofTypes {
|
|
@@ -928,7 +1210,7 @@ export declare enum ProofTypes {
|
|
|
928
1210
|
* Represents a ready component message
|
|
929
1211
|
* @public
|
|
930
1212
|
*/
|
|
931
|
-
declare type Ready = {
|
|
1213
|
+
export declare type Ready = {
|
|
932
1214
|
type: CMType.READY;
|
|
933
1215
|
};
|
|
934
1216
|
|
|
@@ -938,7 +1220,7 @@ declare type RequestID = UUID;
|
|
|
938
1220
|
* Represents a resize request component message. This is handled by the library.
|
|
939
1221
|
* @internal
|
|
940
1222
|
*/
|
|
941
|
-
declare type ResizeRequest = {
|
|
1223
|
+
export declare type ResizeRequest = {
|
|
942
1224
|
type: CMType.RESIZE;
|
|
943
1225
|
height: number;
|
|
944
1226
|
};
|
|
@@ -953,7 +1235,20 @@ export declare interface ScreenshotProof extends OwnershipProof {
|
|
|
953
1235
|
}
|
|
954
1236
|
|
|
955
1237
|
/**
|
|
956
|
-
*
|
|
1238
|
+
* Interface for signature-based ownership proofs that use cryptographic message signing
|
|
1239
|
+
*
|
|
1240
|
+
* @remarks
|
|
1241
|
+
* Extends the base OwnershipProface to add signature-specific properties:
|
|
1242
|
+
* - Supports multiple signature standards like EIP-191, EIP-712, BIP-137, SIWE
|
|
1243
|
+
* - Includes the cryptographic proof signature string
|
|
1244
|
+
* - Contains an attestation message that was signed
|
|
1245
|
+
* - Records which wallet provider was used for signing
|
|
1246
|
+
*
|
|
1247
|
+
* The signature proves ownership by demonstrating control of the private keys
|
|
1248
|
+
* associated with the claimed address.
|
|
1249
|
+
*
|
|
1250
|
+
* @see {@link ProofTypes} For supported signature types
|
|
1251
|
+
* @see {@link OwnershipProof} For base proof properties
|
|
957
1252
|
* @public
|
|
958
1253
|
*/
|
|
959
1254
|
export declare interface SignatureProof extends OwnershipProof {
|
|
@@ -993,7 +1288,26 @@ export declare type Theme = {
|
|
|
993
1288
|
};
|
|
994
1289
|
|
|
995
1290
|
/**
|
|
996
|
-
*
|
|
1291
|
+
* Core transaction interface representing a crypto asset transfer between parties
|
|
1292
|
+
*
|
|
1293
|
+
* @remarks
|
|
1294
|
+
* Extends ComponentRequest to add transaction-specific properties:
|
|
1295
|
+
* - agent: The entity facilitating/executing the transaction
|
|
1296
|
+
* - counterparty: The other party involved in the transaction
|
|
1297
|
+
* - asset: The cryptocurrency or token being transferred
|
|
1298
|
+
* - amountDecimal: The amount to transfer in decimal format
|
|
1299
|
+
* - proof: Optional ownership proof verifying control of involved addresses
|
|
1300
|
+
* - assetPrice: Optional price information in a fiat currency
|
|
1301
|
+
*
|
|
1302
|
+
* This interface serves as the base for specific transaction types like:
|
|
1303
|
+
* - Withdrawals for sending assets out
|
|
1304
|
+
* - Deposits for receiving assets
|
|
1305
|
+
* - Deposit requests for requesting asset transfers
|
|
1306
|
+
*
|
|
1307
|
+
* @see {@link Withdrawal} For withdrawal-specific transaction properties
|
|
1308
|
+
* @see {@link Deposit} For deposit-specific transaction properties
|
|
1309
|
+
* @see {@link Agent} For agent details
|
|
1310
|
+
* @see {@link Counterparty} For counterparty information
|
|
997
1311
|
* @public
|
|
998
1312
|
*/
|
|
999
1313
|
export declare interface Transaction extends ComponentRequest {
|
|
@@ -1034,12 +1348,26 @@ export declare interface TransactionOptions {
|
|
|
1034
1348
|
}
|
|
1035
1349
|
|
|
1036
1350
|
/**
|
|
1037
|
-
*
|
|
1351
|
+
* Response interface for transaction-related operations
|
|
1352
|
+
*
|
|
1353
|
+
* @remarks
|
|
1354
|
+
* Extends ComponentResponse to add transaction-specific response data:
|
|
1355
|
+
* - value: The resulting transaction value of generic type V
|
|
1356
|
+
* - ivms101: IVMS 101 travel rule data for the transaction
|
|
1357
|
+
* - proof: Optional ownership proof details if required
|
|
1358
|
+
* - txCreate: Optional V1 transaction payload for legacy API compatibility
|
|
1359
|
+
*
|
|
1360
|
+
* @typeParam V - Type of the transaction value being returned
|
|
1361
|
+
*
|
|
1362
|
+
* @see {@link ComponentResponse} For base response properties
|
|
1363
|
+
* @see {@link IVMS101} For travel rule data structure
|
|
1364
|
+
* @see {@link OwnershipProof} For proof details
|
|
1365
|
+
* @see {@link V1Transaction} For legacy transaction format
|
|
1038
1366
|
* @public
|
|
1039
1367
|
*/
|
|
1040
1368
|
export declare interface TransactionResponse<V> extends ComponentResponse {
|
|
1041
1369
|
value: V;
|
|
1042
|
-
|
|
1370
|
+
ivms101: IVMS101;
|
|
1043
1371
|
proof?: OwnershipProof;
|
|
1044
1372
|
txCreate?: V1Transaction;
|
|
1045
1373
|
}
|
|
@@ -1064,16 +1392,46 @@ declare type TransliterationMethodCode = 'arab' | 'aran' | 'armn' | 'cyrl' | 'de
|
|
|
1064
1392
|
/**
|
|
1065
1393
|
* A travel address
|
|
1066
1394
|
* @public
|
|
1067
|
-
|
|
1068
|
-
|
|
1395
|
+
|
|
1396
|
+
* A standardized travel rule address format
|
|
1397
|
+
*
|
|
1398
|
+
* @remarks
|
|
1399
|
+
* Represents a special address format used for travel rule compliance. Travel addresses
|
|
1400
|
+
* are prefixed with 'ta' and contain encoded information about the transaction
|
|
1401
|
+
* and counterparty details required for travel rule reporting.
|
|
1402
|
+
*
|
|
1403
|
+
* The format ensures consistent handling of travel rule data across different
|
|
1404
|
+
* VASPs and blockchain networks while maintaining privacy.
|
|
1405
|
+
*
|
|
1406
|
+
* @example "ta1234abcd..." // Example travel rule address
|
|
1407
|
+
* @see {@link BlockchainAddress} For native chain addresses
|
|
1408
|
+
* @see {@link CAIP10} For chain-agnostic addresses
|
|
1409
|
+
|
|
1410
|
+
*/ export declare type TravelAddress = `ta${string}`;
|
|
1069
1411
|
|
|
1070
1412
|
/**
|
|
1071
|
-
*
|
|
1413
|
+
* Message type for updating component state and configuration from host application
|
|
1414
|
+
*
|
|
1415
|
+
* @remarks
|
|
1416
|
+
* Defines the structure of update messages sent from host to component:
|
|
1417
|
+
* - type: Identifies this as an update message
|
|
1418
|
+
* - value: New partial state/data to update the component with
|
|
1419
|
+
* - options: Optional configuration parameters to modify component behavior
|
|
1420
|
+
*
|
|
1421
|
+
* The host can use this to dynamically update both the component's data
|
|
1422
|
+
* and its configuration without requiring a full reload/reinitialize.
|
|
1423
|
+
*
|
|
1424
|
+
* @typeParam T - The type of the value being updated
|
|
1425
|
+
* @typeParam O - The type of the optional configuration parameters
|
|
1426
|
+
*
|
|
1427
|
+
* @see {@link HMType} For message type constants
|
|
1428
|
+
* @see {@link HostMessage} For full host message type union
|
|
1072
1429
|
* @public
|
|
1073
1430
|
*/
|
|
1074
|
-
declare type UpdateValue<T> = {
|
|
1431
|
+
export declare type UpdateValue<T, O> = {
|
|
1075
1432
|
type: HMType.UPDATE;
|
|
1076
1433
|
value: Partial<T>;
|
|
1434
|
+
options?: O;
|
|
1077
1435
|
};
|
|
1078
1436
|
|
|
1079
1437
|
/**
|
|
@@ -1083,11 +1441,29 @@ declare type UpdateValue<T> = {
|
|
|
1083
1441
|
declare type URI = string;
|
|
1084
1442
|
|
|
1085
1443
|
/**
|
|
1086
|
-
* UUID v4
|
|
1444
|
+
* UUID v4 string identifier
|
|
1445
|
+
* A universally unique identifier that follows RFC 4122 format
|
|
1446
|
+
* Format: 8-4-4-4-12 hexadecimal digits
|
|
1447
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
1448
|
+
* @see {@link https://tools.ietf.org/html/rfc4122 | RFC4122}
|
|
1087
1449
|
* @public
|
|
1088
1450
|
*/
|
|
1089
1451
|
declare type UUID = string;
|
|
1090
1452
|
|
|
1453
|
+
/**
|
|
1454
|
+
* Represents a legacy V1 API asset format supporting both Notabene and CAIP-19 identifiers
|
|
1455
|
+
*
|
|
1456
|
+
* @remarks
|
|
1457
|
+
* Used for backwards compatibility with V1 API transaction payloads:
|
|
1458
|
+
* - Can be either a simple Notabene asset string
|
|
1459
|
+
* - Or an object containing a CAIP-19 identifier
|
|
1460
|
+
*
|
|
1461
|
+
* @example "ETH_USDT" // Notabene asset format
|
|
1462
|
+
* @example \{ caip19: "eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f" \} // CAIP-19 format
|
|
1463
|
+
* @see {@link NotabeneAsset} For Notabene asset format
|
|
1464
|
+
* @see {@link CAIP19} For CAIP-19 asset format
|
|
1465
|
+
* @public
|
|
1466
|
+
*/
|
|
1091
1467
|
declare type V1Asset = NotabeneAsset | {
|
|
1092
1468
|
caip19: CAIP19;
|
|
1093
1469
|
};
|
|
@@ -1096,7 +1472,7 @@ declare type V1Asset = NotabeneAsset | {
|
|
|
1096
1472
|
* Transaction payload suitable for calling Notabene v1 tx/create
|
|
1097
1473
|
* @public
|
|
1098
1474
|
*/
|
|
1099
|
-
declare type V1Transaction = {
|
|
1475
|
+
export declare type V1Transaction = {
|
|
1100
1476
|
transactionAsset: V1Asset;
|
|
1101
1477
|
transactionAmount: string;
|
|
1102
1478
|
originatorEqualsBeneficiary?: boolean;
|
|
@@ -1111,7 +1487,7 @@ declare type V1Transaction = {
|
|
|
1111
1487
|
* Validation error
|
|
1112
1488
|
* @public
|
|
1113
1489
|
*/
|
|
1114
|
-
declare type ValidationError = {
|
|
1490
|
+
export declare type ValidationError = {
|
|
1115
1491
|
attribute: string;
|
|
1116
1492
|
message: string;
|
|
1117
1493
|
};
|
|
@@ -1127,7 +1503,11 @@ export declare interface VASP extends Agent {
|
|
|
1127
1503
|
countryOfRegistration?: ISOCountryCode;
|
|
1128
1504
|
}
|
|
1129
1505
|
|
|
1130
|
-
|
|
1506
|
+
/**
|
|
1507
|
+
* Options for which VASPs to be searchable
|
|
1508
|
+
* @public
|
|
1509
|
+
*/
|
|
1510
|
+
export declare type VASPOptions = {
|
|
1131
1511
|
addUnknown?: boolean;
|
|
1132
1512
|
onlyActive?: boolean;
|
|
1133
1513
|
};
|