@notabene/javascript-sdk 1.32.0 → 2.0.0-next.2
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/.gitlab-ci.yml +12 -1
- package/.husky/commit-msg +0 -0
- package/.husky/pre-commit +0 -0
- package/.husky/pre-push +1 -1
- package/.vscode/extensions.json +1 -5
- package/.vscode/settings.json +4 -4
- package/.yarn/releases/yarn-berry.cjs +925 -0
- package/.yarnrc.yml +3 -0
- package/CODEOWNERS +1 -1
- package/README.md +128 -70
- package/api-extractor.json +434 -0
- package/dist/notabene.cjs +1 -0
- package/dist/notabene.d.ts +678 -0
- package/dist/notabene.js +187 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/eslint.config.js +24 -0
- package/etc/javascript-sdk.api.md +363 -0
- package/index.html +137 -0
- package/package.json +27 -53
- package/src/__tests__/notabene.test.ts +116 -0
- package/src/arbitraries.ts +13 -0
- package/src/components/EmbeddedComponent.ts +110 -0
- package/src/components/__tests__/EmbeddedComponent.test.ts +160 -0
- package/src/ivms/types.ts +2 -0
- package/src/notabene.ts +173 -279
- package/src/types.ts +381 -49
- package/src/utils/MessageEventManager.ts +55 -0
- package/src/utils/__tests__/MessageEventManager.test.ts +95 -0
- package/src/utils/arbitraries.ts +21 -0
- package/src/utils/caip.ts +16 -0
- package/src/utils/urls.ts +15 -0
- package/temp/javascript-sdk.api.json +3509 -0
- package/temp/javascript-sdk.api.md +363 -0
- package/ts-out/src/__tests__/notabene.test.d.ts +1 -0
- package/ts-out/src/__tests__/notabene.test.js +88 -0
- package/ts-out/src/arbitraries.d.ts +4 -0
- package/ts-out/src/arbitraries.js +8 -0
- package/ts-out/src/components/EmbeddedComponent.d.ts +25 -0
- package/ts-out/src/components/EmbeddedComponent.js +87 -0
- package/ts-out/src/components/__tests__/EmbeddedComponent.test.d.ts +1 -0
- package/ts-out/src/components/__tests__/EmbeddedComponent.test.js +132 -0
- package/ts-out/src/ivms/types.d.ts +252 -0
- package/ts-out/src/ivms/types.js +1 -0
- package/ts-out/src/notabene.d.ts +35 -0
- package/ts-out/src/notabene.js +59 -0
- package/ts-out/src/types.d.ts +357 -0
- package/ts-out/src/types.js +85 -0
- package/ts-out/src/utils/MessageEventManager.d.ts +12 -0
- package/ts-out/src/utils/MessageEventManager.js +45 -0
- package/ts-out/src/utils/__tests__/MessageEventManager.test.d.ts +1 -0
- package/ts-out/src/utils/__tests__/MessageEventManager.test.js +73 -0
- package/ts-out/src/utils/arbitraries.d.ts +6 -0
- package/ts-out/src/utils/arbitraries.js +7 -0
- package/ts-out/src/utils/caip.d.ts +13 -0
- package/ts-out/src/utils/caip.js +15 -0
- package/ts-out/src/utils/urls.d.ts +1 -0
- package/ts-out/src/utils/urls.js +14 -0
- package/ts-out/tsconfig.tsbuildinfo +1 -0
- package/tsconfig.json +15 -11
- package/tsconfig.tsbuildinfo +1 -0
- package/vite.config.js +13 -0
- package/.envrc.template +0 -1
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -13
- package/.nvmrc +0 -1
- package/.tool-versions +0 -3
- package/dist/es/index.js +0 -1
- package/dist/lib/index.js +0 -366
- package/jest.config.js +0 -5
- package/public/index.html +0 -93
- package/public/js/.gitkeep +0 -0
- package/src/lib/index.ts +0 -2
- package/src/module/index.ts +0 -10
- package/src/zoidComponentProps.ts +0 -81
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 5.2.6
|
|
3
|
+
* Address
|
|
4
|
+
*/
|
|
5
|
+
declare type Address = {
|
|
6
|
+
addressType?: AddressTypeCode;
|
|
7
|
+
department?: string;
|
|
8
|
+
subDepartment?: string;
|
|
9
|
+
streetName?: string;
|
|
10
|
+
buildingNumber?: string;
|
|
11
|
+
buildingName?: string;
|
|
12
|
+
floor?: string;
|
|
13
|
+
postBox?: string;
|
|
14
|
+
room?: string;
|
|
15
|
+
postCode?: string;
|
|
16
|
+
townName?: string;
|
|
17
|
+
townLocationName?: string;
|
|
18
|
+
districtName?: string;
|
|
19
|
+
countrySubDivision?: string;
|
|
20
|
+
addressLine?: string[];
|
|
21
|
+
country?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 5.3.11
|
|
26
|
+
* AddressTypeCode
|
|
27
|
+
*
|
|
28
|
+
* `HOME` Residential - Address is the home address.
|
|
29
|
+
* `BIZZ` Business - Address is the business address.
|
|
30
|
+
* `GEOG` Geographic - Address is the unspecified physical (geographical) address suitable for identification of the natural or legal person.
|
|
31
|
+
*/
|
|
32
|
+
declare type AddressTypeCode = 'HOME' | 'BIZZ' | 'GEOG';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Who is the agent acting on behalf of the counterparty
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export declare interface Agent {
|
|
39
|
+
did: DID;
|
|
40
|
+
type: AgentType;
|
|
41
|
+
logo?: string;
|
|
42
|
+
url?: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
verified?: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The type of Agent. Either a wallet or a VASP
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
export declare enum AgentType {
|
|
52
|
+
PRIVATE = "WALLET",
|
|
53
|
+
VASP = "VASP"
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 6.3
|
|
58
|
+
* The beneficiary is defined in Section 1.1 as the natural or legal person or legal arrangement who is identified by the originator as the receiver of the requested VA transfer.
|
|
59
|
+
*/
|
|
60
|
+
declare type Beneficiary = {
|
|
61
|
+
beneficiaryPersons?: Person[];
|
|
62
|
+
accountNumber?: string[];
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
declare type BeneficiaryFields = {
|
|
66
|
+
destination?: destination;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 6.5
|
|
71
|
+
* The originating VASP is defined in Section 1.1 as the VASP which initiates the VA transfer, and transfers the VA upon receiving the request for a VA transfer on behalf of the originator.
|
|
72
|
+
*/
|
|
73
|
+
declare type BeneficiaryVASP = {
|
|
74
|
+
beneficiaryVASP?: Person;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
declare type BlockchainAddress = string;
|
|
78
|
+
|
|
79
|
+
declare type CAIP10 = string;
|
|
80
|
+
|
|
81
|
+
declare type CAIP19 = string;
|
|
82
|
+
|
|
83
|
+
declare type CAIP2 = string;
|
|
84
|
+
|
|
85
|
+
declare interface CallbackOptions {
|
|
86
|
+
callback?: URI;
|
|
87
|
+
redirectUri?: URI;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare type Cancel = {
|
|
91
|
+
type: CMType.CANCEL;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
declare type CloseModal = {
|
|
95
|
+
type: CMType.CLOSE;
|
|
96
|
+
reqid: RequestID;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Component Message Types
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
export declare const enum CMType {
|
|
104
|
+
COMPLETE = "complete",
|
|
105
|
+
RESIZE = "resize",
|
|
106
|
+
RESULT = "result",
|
|
107
|
+
READY = "ready",
|
|
108
|
+
INVALID = "invalid",
|
|
109
|
+
MODAL = "openModal",
|
|
110
|
+
ERROR = "error",
|
|
111
|
+
CLOSE = "closeModal",
|
|
112
|
+
CANCEL = "cancel"
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
declare type Completed = {
|
|
116
|
+
type: CMType.COMPLETE;
|
|
117
|
+
response: TransactionResponse;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Component Message
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
export declare type ComponentMessage = Completed | Cancel | Error_2 | Result | Ready | ResizeRequest | ModalRequest | InvalidValue | CloseModal;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The counterparty of a transaction.
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
export declare interface Counterparty {
|
|
131
|
+
name?: string;
|
|
132
|
+
accountNumber?: string;
|
|
133
|
+
did?: string;
|
|
134
|
+
geographicAddress?: string;
|
|
135
|
+
type?: PersonType;
|
|
136
|
+
verified?: boolean;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* 5.2.7
|
|
141
|
+
* DateAndPlaceOfBirth
|
|
142
|
+
*/
|
|
143
|
+
declare type DateAndPlaceOfBirth = {
|
|
144
|
+
dateOfBirth?: string;
|
|
145
|
+
placeOfBirth?: string;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Ownership Proof using Self Declaration
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export declare interface DeclarationProof extends OwnershipProof {
|
|
153
|
+
type: ProofTypes.SelfDeclaration;
|
|
154
|
+
attestation: string;
|
|
155
|
+
confirmed: boolean;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The destination of a transaction either a blockchain address, a CAIP-19 address, or a travel address.
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
export declare type destination = BlockchainAddress | CAIP19 | TravelAddress;
|
|
163
|
+
|
|
164
|
+
declare type DID = string;
|
|
165
|
+
|
|
166
|
+
declare type DTI = string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* An embedded Notabene component
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
172
|
+
export declare class EmbeddedComponent {
|
|
173
|
+
private _url;
|
|
174
|
+
private _value;
|
|
175
|
+
private _errors;
|
|
176
|
+
private iframe?;
|
|
177
|
+
private eventManager;
|
|
178
|
+
private ready;
|
|
179
|
+
constructor(url: string, value: Partial<Transaction>);
|
|
180
|
+
get url(): string;
|
|
181
|
+
get value(): Partial<Transaction>;
|
|
182
|
+
get errors(): ValidationError[];
|
|
183
|
+
open(): void;
|
|
184
|
+
mount(parentId: string): void;
|
|
185
|
+
send(message: HostMessage): void;
|
|
186
|
+
on(messageType: string, callback: MessageCallback): void;
|
|
187
|
+
off(messageType: string, callback: MessageCallback): void;
|
|
188
|
+
update(value: Partial<Transaction>): void;
|
|
189
|
+
completion(): Promise<TransactionResponse>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare type Error_2 = {
|
|
193
|
+
type: CMType.ERROR;
|
|
194
|
+
message: string;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Host Message Types
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
declare const enum HMType {
|
|
202
|
+
UPDATE = "update",
|
|
203
|
+
REQUEST_RESPONSE = "requestResponse"
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Host Messages
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
210
|
+
export declare type HostMessage = UpdateValue | RequestResponse;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* 5.2.13
|
|
214
|
+
* IntermediaryVASP
|
|
215
|
+
*/
|
|
216
|
+
declare type IntermediaryVASP = {
|
|
217
|
+
intermediaryVASP?: Person;
|
|
218
|
+
sequence?: number;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
declare type InvalidValue = {
|
|
222
|
+
type: CMType.INVALID;
|
|
223
|
+
value: any;
|
|
224
|
+
errors: ValidationError[];
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* IVMS101 definition
|
|
229
|
+
*
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
export declare type IVMS101 = {
|
|
233
|
+
originator?: Originator;
|
|
234
|
+
beneficiary?: Beneficiary;
|
|
235
|
+
originatingVASP?: OriginatingVASP;
|
|
236
|
+
beneficiaryVASP?: BeneficiaryVASP;
|
|
237
|
+
transferPath?: TransferPath;
|
|
238
|
+
payloadMetadata?: PayloadMetadata;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* 5.2.9
|
|
243
|
+
* LegalPerson
|
|
244
|
+
*/
|
|
245
|
+
declare type LegalPerson = {
|
|
246
|
+
name?: LegalPersonName;
|
|
247
|
+
geographicAddress?: Address[];
|
|
248
|
+
customerNumber?: string;
|
|
249
|
+
nationalIdentification?: NationalIdentification;
|
|
250
|
+
countryOfRegistration?: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* 5.2.10
|
|
255
|
+
* LegalPersonName
|
|
256
|
+
*/
|
|
257
|
+
declare type LegalPersonName = {
|
|
258
|
+
nameIdentifier?: LegalPersonNameID[];
|
|
259
|
+
localNameIdentifier?: LocalLegalPersonNameID[];
|
|
260
|
+
phoneticNameIdentifier?: LocalLegalPersonNameID[];
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* 5.2.11
|
|
265
|
+
* LegalPersonNameID
|
|
266
|
+
*/
|
|
267
|
+
declare type LegalPersonNameID = {
|
|
268
|
+
legalPersonName?: string;
|
|
269
|
+
legalPersonNameIdentifierType?: LegalPersonNameTypeCode;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* 5.3.9
|
|
274
|
+
* LegalPersonNameTypeCode
|
|
275
|
+
*
|
|
276
|
+
* `LEGL` Legal name - Official name under which an organisation is registered.
|
|
277
|
+
* `SHRT` Short name - Specifies the short name of the organisation.
|
|
278
|
+
* `TRAD` Trading name - Name used by a business for commercial purposes, although its registered legal name, used for contracts and other formal situations, may be another.
|
|
279
|
+
*/
|
|
280
|
+
declare type LegalPersonNameTypeCode = 'LEGL' | 'SHRT' | 'TRAD';
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* 5.2.12
|
|
284
|
+
* LocalLegalPersonNameID
|
|
285
|
+
*/
|
|
286
|
+
declare type LocalLegalPersonNameID = {
|
|
287
|
+
legalPersonName?: string;
|
|
288
|
+
legalPersonNameIdentifierType?: LegalPersonNameTypeCode;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* 5.2.5
|
|
293
|
+
* LocalNaturalPersonNameID
|
|
294
|
+
*/
|
|
295
|
+
declare type LocalNaturalPersonNameID = {
|
|
296
|
+
primaryIdentifier?: string;
|
|
297
|
+
secondaryIdentifier?: string;
|
|
298
|
+
nameIdentifierType?: NaturalPersonNameTypeCode;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
declare type MessageCallback = (message: ComponentMessage) => void;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Ownership Proof using Micro Transfer
|
|
305
|
+
* @public
|
|
306
|
+
*/
|
|
307
|
+
export declare interface MicroTransferProof extends OwnershipProof {
|
|
308
|
+
type: ProofTypes.MicroTransfer;
|
|
309
|
+
txhash: string;
|
|
310
|
+
chain: CAIP2;
|
|
311
|
+
amount: number;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
declare type ModalRequest = {
|
|
315
|
+
type: CMType.MODAL;
|
|
316
|
+
url: string;
|
|
317
|
+
reqid: RequestID;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* 5.2.8
|
|
322
|
+
* NationalIdentification
|
|
323
|
+
*/
|
|
324
|
+
declare type NationalIdentification = {
|
|
325
|
+
nationalIdentifier?: string;
|
|
326
|
+
nationalIdentifierType?: NationalIdentifierTypeCode;
|
|
327
|
+
countryOfIssue?: string;
|
|
328
|
+
registrationAuthority?: string;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* 5.3.14
|
|
333
|
+
* NationalIdentifierTypeCode
|
|
334
|
+
*
|
|
335
|
+
* `ARNU` Alien registration number - Number assigned by a government agency to identify foreign nationals.
|
|
336
|
+
* `CCPT` Passport number - Number assigned by a passport authority.
|
|
337
|
+
* `RAID` Registration authority identifier - Identifier of a legal entity as maintained by a registration authority.
|
|
338
|
+
* `DRLC` Driver license number - Number assigned to a driver's license.
|
|
339
|
+
* `FIIN` Foreign investment identity number - Number assigned to a foreign investor (other than the alien number).
|
|
340
|
+
* `TXID` Tax identification number - Number assigned by a tax authority to an entity.
|
|
341
|
+
* `SOCS` Social security number - Number assigned by a social security agency.
|
|
342
|
+
* `IDCD` Identity card number - Number assigned by a national authority to an identity card.
|
|
343
|
+
* `LEIX` Legal Entity Identifier - Legal Entity Identifier (LEI) assigned in accordance with ISO 17442 11 .
|
|
344
|
+
* `MISC` Unspecified - A national identifier which may be known but which cannot otherwise be categorized or the category of which the sender is unable to determine.
|
|
345
|
+
*/
|
|
346
|
+
declare type NationalIdentifierTypeCode = 'ARNU' | 'CCPT' | 'RAID' | 'DRLC' | 'FIIN' | 'TXID' | 'SOCS' | 'IDCD' | 'LEIX' | 'MISC';
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* 5.2.2
|
|
350
|
+
* NaturalPerson
|
|
351
|
+
*/
|
|
352
|
+
declare type NaturalPerson = {
|
|
353
|
+
name?: NaturalPersonName[];
|
|
354
|
+
geographicAddress?: Address[];
|
|
355
|
+
nationalIdentification?: NationalIdentification;
|
|
356
|
+
customerIdentification?: string;
|
|
357
|
+
dateAndPlaceOfBirth?: DateAndPlaceOfBirth;
|
|
358
|
+
countryOfResidence?: string;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* 5.2.3
|
|
363
|
+
* NaturalPersonName
|
|
364
|
+
*/
|
|
365
|
+
declare type NaturalPersonName = {
|
|
366
|
+
nameIdentifier?: NaturalPersonNameID[];
|
|
367
|
+
localNameIdentifier?: LocalNaturalPersonNameID[];
|
|
368
|
+
phoneticNameIdentifier?: LocalNaturalPersonNameID[];
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* 5.2.4
|
|
373
|
+
* NaturalPersonNameID
|
|
374
|
+
*/
|
|
375
|
+
declare type NaturalPersonNameID = {
|
|
376
|
+
primaryIdentifier?: string;
|
|
377
|
+
secondaryIdentifier?: string;
|
|
378
|
+
nameIdentifierType?: NaturalPersonNameTypeCode;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* 5.3.8
|
|
383
|
+
* NaturalPersonNameTypeCode
|
|
384
|
+
*
|
|
385
|
+
* `ALIA` Alias name - A name other than the legal name by which a natural person is also known.
|
|
386
|
+
* `BIRT` Name at birth - The name given to a natural person at birth.
|
|
387
|
+
* `MAID` Maiden name - The original name of a natural person who has changed their name after marriage.
|
|
388
|
+
* `LEGL` Legal name - The name that identifies a natural person for legal, official or administrative purposes.
|
|
389
|
+
* `MISC` Unspecified - A name by which a natural person may be known but which cannot otherwise be categorized or the category of which the sender is unable to determine.
|
|
390
|
+
*/
|
|
391
|
+
declare type NaturalPersonNameTypeCode = 'ALIA' | 'BIRT' | 'MAID' | 'LEGL' | 'MISC';
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Primary constructor for Notabene UX elements
|
|
395
|
+
*
|
|
396
|
+
* @public
|
|
397
|
+
*/
|
|
398
|
+
declare class Notabene {
|
|
399
|
+
private nodeUrl;
|
|
400
|
+
private authToken;
|
|
401
|
+
private uxUrl;
|
|
402
|
+
private theme?;
|
|
403
|
+
private dictionary?;
|
|
404
|
+
constructor(config: NotabeneConfig);
|
|
405
|
+
componentUrl(path: string, value: Partial<Transaction>, configuration?: any, callbacks?: CallbackOptions): string;
|
|
406
|
+
createComponent(path: string, value: Partial<Transaction>, options?: any, callbacks?: CallbackOptions): EmbeddedComponent;
|
|
407
|
+
createWithdrawalAssist(value: Partial<Withdrawal>, options?: any, callbacks?: CallbackOptions): EmbeddedComponent;
|
|
408
|
+
decodeFragmentToObject(fragment: string): Record<string, string>;
|
|
409
|
+
}
|
|
410
|
+
export { Notabene }
|
|
411
|
+
export default Notabene;
|
|
412
|
+
|
|
413
|
+
declare type NotabeneAsset = string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Configuration for the Notabene SDK
|
|
417
|
+
*
|
|
418
|
+
* @public
|
|
419
|
+
*/
|
|
420
|
+
export declare interface NotabeneConfig {
|
|
421
|
+
nodeUrl: string;
|
|
422
|
+
authToken: string;
|
|
423
|
+
uxUrl?: string;
|
|
424
|
+
theme?: Theme;
|
|
425
|
+
dictionary?: {
|
|
426
|
+
[key: string]: string;
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* 6.4
|
|
432
|
+
* The originating VASP is defined in Section 1.1 as the VASP which initiates the VA transfer, and transfers the VA upon receiving the request for a VA transfer on behalf of the originator.
|
|
433
|
+
*/
|
|
434
|
+
declare type OriginatingVASP = {
|
|
435
|
+
originatingVASP?: Person;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* 6.2
|
|
440
|
+
* The originator is defined in Section 1.1 as the account holder who allows the VA transfer from that account or, where there is no account, the natural or legal person that places the order with the originating VASP to perform the VA transfer.
|
|
441
|
+
*/
|
|
442
|
+
declare type Originator = {
|
|
443
|
+
originatorPersons?: Person[];
|
|
444
|
+
accountNumber?: string[];
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Ownership Proof
|
|
449
|
+
* @public
|
|
450
|
+
*/
|
|
451
|
+
export declare interface OwnershipProof {
|
|
452
|
+
type: ProofTypes;
|
|
453
|
+
status: ProofStatus;
|
|
454
|
+
did: DID;
|
|
455
|
+
address: CAIP10;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* 6.7
|
|
460
|
+
* Data describing the contents of the payload.
|
|
461
|
+
*/
|
|
462
|
+
declare type PayloadMetadata = {
|
|
463
|
+
transferPath?: TransliterationMethodCode[];
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* 5.2.1
|
|
468
|
+
* Person
|
|
469
|
+
*/
|
|
470
|
+
declare type Person = {
|
|
471
|
+
naturalPerson?: NaturalPerson;
|
|
472
|
+
legalPerson?: LegalPerson;
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* 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
|
+
* @public
|
|
478
|
+
*/
|
|
479
|
+
export declare enum PersonType {
|
|
480
|
+
NATURAL = "natural",
|
|
481
|
+
LEGAL = "legal",
|
|
482
|
+
SELF = "self"
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Status of the proof
|
|
487
|
+
* @public
|
|
488
|
+
*/
|
|
489
|
+
export declare enum ProofStatus {
|
|
490
|
+
PENDING = "pending",// Verification is pending
|
|
491
|
+
FAILED = "rejected",// Rejected
|
|
492
|
+
FLAGGED = "flagged",// Flagged for manual review
|
|
493
|
+
VERIFIED = "verified"
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* The type of Proofs supported
|
|
498
|
+
* @public
|
|
499
|
+
**/
|
|
500
|
+
export declare enum ProofTypes {
|
|
501
|
+
SelfDeclaration = "self-declaration",
|
|
502
|
+
PersonalSignEIP191 = "eip-191",
|
|
503
|
+
PersonalSignEIP712 = "eip-712",
|
|
504
|
+
PersonalSignBIP137 = "bip-137",
|
|
505
|
+
PersonalSignXPUB = "xpub",
|
|
506
|
+
MicroTransfer = "microtransfer",
|
|
507
|
+
Screenshot = "screenshot"
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
declare type Ready = {
|
|
511
|
+
type: CMType.READY;
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
declare type RequestID = string;
|
|
515
|
+
|
|
516
|
+
declare type RequestResponse = {
|
|
517
|
+
type: HMType.REQUEST_RESPONSE;
|
|
518
|
+
reqid: RequestID;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
declare type ResizeRequest = {
|
|
522
|
+
type: CMType.RESIZE;
|
|
523
|
+
height: number;
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
declare type Result = {
|
|
527
|
+
type: CMType.RESULT;
|
|
528
|
+
reqid: RequestID;
|
|
529
|
+
response: TransactionResponse;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Ownership Proof using Screenshot
|
|
534
|
+
* @public
|
|
535
|
+
*/
|
|
536
|
+
export declare interface ScreenshotProof extends OwnershipProof {
|
|
537
|
+
type: ProofTypes.Screenshot;
|
|
538
|
+
url: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Ownership Proof using Message Signature
|
|
543
|
+
* @public
|
|
544
|
+
*/
|
|
545
|
+
export declare interface SignatureProof extends OwnershipProof {
|
|
546
|
+
type: ProofTypes.PersonalSignEIP191 | ProofTypes.PersonalSignEIP712 | ProofTypes.PersonalSignBIP137 | ProofTypes.PersonalSignXPUB;
|
|
547
|
+
proof: string;
|
|
548
|
+
attestation: string;
|
|
549
|
+
wallet_provider: string;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* The verification status of a transaction
|
|
554
|
+
* @public
|
|
555
|
+
*/
|
|
556
|
+
export declare enum Status {
|
|
557
|
+
EMPTY = "empty",
|
|
558
|
+
VERIFY = "verify",
|
|
559
|
+
PENDING = "pending",
|
|
560
|
+
VERIFIED = "verified",
|
|
561
|
+
BANNED = "banned"
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* The theme of the Notabene SDK
|
|
566
|
+
* @public
|
|
567
|
+
*/
|
|
568
|
+
export declare type Theme = {
|
|
569
|
+
primaryColor: string;
|
|
570
|
+
secondaryColor: string;
|
|
571
|
+
fontFamily: string;
|
|
572
|
+
logo: string;
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* An abstract transaction object
|
|
577
|
+
* @public
|
|
578
|
+
*/
|
|
579
|
+
export declare interface Transaction {
|
|
580
|
+
agent: Agent;
|
|
581
|
+
customer?: Counterparty;
|
|
582
|
+
counterparty: Counterparty;
|
|
583
|
+
asset: TransactionAsset;
|
|
584
|
+
amountDecimal: number;
|
|
585
|
+
customAssetPrice?: {
|
|
586
|
+
price: number;
|
|
587
|
+
currency: string;
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* The asset of a transaction either a Notabene asset, a CAIP-19 asset, or a DTI.
|
|
593
|
+
*
|
|
594
|
+
* @public
|
|
595
|
+
*/
|
|
596
|
+
export declare type TransactionAsset = NotabeneAsset | CAIP19 | DTI;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* The response of a transaction
|
|
600
|
+
* @public
|
|
601
|
+
*/
|
|
602
|
+
export declare type TransactionResponse = {
|
|
603
|
+
value: Transaction;
|
|
604
|
+
ivms: IVMS101;
|
|
605
|
+
proof?: OwnershipProof;
|
|
606
|
+
valid: boolean;
|
|
607
|
+
status: Status;
|
|
608
|
+
errors: ValidationError[];
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* 6.6
|
|
613
|
+
* The transfer path refers to the intermediary VASP(s) participating in a serial chain that receive(s) and retransmit(s) a VA transfer on behalf of the originating VASP and the beneficiary VASP, or another intermediary VASP, together with their corresponding sequence number.
|
|
614
|
+
*/
|
|
615
|
+
declare type TransferPath = {
|
|
616
|
+
transferPath?: IntermediaryVASP[];
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* 5.3.16
|
|
621
|
+
* TransliterationMethodCode
|
|
622
|
+
*
|
|
623
|
+
* `arab` Arabic (Arabic language) - ISO 233-2:1993
|
|
624
|
+
* `aran` Arabic (Persian language) - ISO 233-3:1999
|
|
625
|
+
* `armn` Armenian - ISO 9985:1996
|
|
626
|
+
* `cyrl` Cyrillic - ISO 9:1995
|
|
627
|
+
* `deva` Devanagari & related Indic - ISO 15919:2001
|
|
628
|
+
* `geor` Georgian - ISO 9984:1996
|
|
629
|
+
* `grek` Greek - ISO 843:1997
|
|
630
|
+
* `hani` Han (Hanzi, Kanji, Hanja) - ISO 7098:2015
|
|
631
|
+
* `hebr` Hebrew - ISO 259-2:1994
|
|
632
|
+
* `kana` Kana - ISO 3602:1989
|
|
633
|
+
* `kore` Korean - Revised Romanization of Korean
|
|
634
|
+
* `thai` Thai - ISO 11940-2:2007
|
|
635
|
+
* `othr` Script other than those listed above - Unspecified
|
|
636
|
+
*/
|
|
637
|
+
declare type TransliterationMethodCode = 'arab' | 'aran' | 'armn' | 'cyrl' | 'deva' | 'geor' | 'grek' | 'hani' | 'hebr' | 'kana' | 'kore' | 'thai' | 'othr';
|
|
638
|
+
|
|
639
|
+
declare type TravelAddress = string;
|
|
640
|
+
|
|
641
|
+
declare type UpdateValue = {
|
|
642
|
+
type: HMType.UPDATE;
|
|
643
|
+
value: Partial<Transaction>;
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
declare type URI = string;
|
|
647
|
+
|
|
648
|
+
declare type ValidationError = {
|
|
649
|
+
attribute: string;
|
|
650
|
+
message: string;
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* A VASP agent acting on behalf of the counterparty
|
|
655
|
+
* @public
|
|
656
|
+
*/
|
|
657
|
+
export declare interface VASP extends Agent {
|
|
658
|
+
url?: string;
|
|
659
|
+
name?: string;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* A wallet agent acting on behalf of the counterparty
|
|
664
|
+
* @public
|
|
665
|
+
*/
|
|
666
|
+
export declare interface Wallet extends Agent {
|
|
667
|
+
proof: OwnershipProof;
|
|
668
|
+
wallet_connect_id?: string;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* An object representing a withdrawal transaction
|
|
673
|
+
* @public
|
|
674
|
+
*/
|
|
675
|
+
export declare interface Withdrawal extends BeneficiaryFields, Transaction {
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export { }
|