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