@notabene/javascript-sdk 2.3.0 → 2.4.0
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/README.md +2 -0
- package/dist/notabene.d.ts +9 -1
- package/docs/_media/TransactionOptions.md +6 -6
- package/docs/ivms/types/enumerations/PayloadVersionCode.md +2 -2
- package/docs/ivms/types/interfaces/PayloadMetadata.md +2 -2
- package/docs/ivms/types/type-aliases/Address.md +1 -1
- package/docs/ivms/types/type-aliases/AddressTypeCode.md +1 -1
- package/docs/ivms/types/type-aliases/Beneficiary.md +1 -1
- package/docs/ivms/types/type-aliases/BeneficiaryVASP.md +1 -1
- package/docs/ivms/types/type-aliases/DateAndPlaceOfBirth.md +1 -1
- package/docs/ivms/types/type-aliases/ISOCountryCode.md +1 -1
- package/docs/ivms/types/type-aliases/ISODate.md +1 -1
- package/docs/ivms/types/type-aliases/IVMS101.md +1 -1
- package/docs/ivms/types/type-aliases/IntermediaryVASP.md +1 -1
- package/docs/ivms/types/type-aliases/LegalPerson.md +1 -1
- package/docs/ivms/types/type-aliases/LegalPersonName.md +1 -1
- package/docs/ivms/types/type-aliases/LegalPersonNameID.md +1 -1
- package/docs/ivms/types/type-aliases/LegalPersonNameTypeCode.md +1 -1
- package/docs/ivms/types/type-aliases/LocalLegalPersonNameID.md +1 -1
- package/docs/ivms/types/type-aliases/LocalNaturalPersonNameID.md +1 -1
- package/docs/ivms/types/type-aliases/NationalIdentification.md +1 -1
- package/docs/ivms/types/type-aliases/NationalIdentifierTypeCode.md +1 -1
- package/docs/ivms/types/type-aliases/NaturalPerson.md +1 -1
- package/docs/ivms/types/type-aliases/NaturalPersonName.md +1 -1
- package/docs/ivms/types/type-aliases/NaturalPersonNameID.md +1 -1
- package/docs/ivms/types/type-aliases/NaturalPersonNameTypeCode.md +1 -1
- package/docs/ivms/types/type-aliases/OriginatingVASP.md +1 -1
- package/docs/ivms/types/type-aliases/Originator.md +1 -1
- package/docs/ivms/types/type-aliases/Person.md +1 -1
- package/docs/ivms/types/type-aliases/TransferPath.md +1 -1
- package/docs/ivms/types/type-aliases/TransliterationMethodCode.md +1 -1
- package/docs/notabene/classes/EmbeddedComponent.md +17 -17
- package/docs/notabene/classes/default.md +6 -6
- package/docs/notabene/functions/decodeFragmentToObject.md +1 -1
- package/docs/notabene/interfaces/NotabeneConfig.md +5 -5
- package/docs/notabene/type-aliases/MessageCallback.md +1 -1
- package/docs/types/README.md +1 -0
- package/docs/types/enumerations/AgentType.md +2 -2
- package/docs/types/enumerations/CMType.md +7 -7
- package/docs/types/enumerations/ErrorIdentifierCode.md +47 -0
- package/docs/types/enumerations/HMType.md +2 -2
- package/docs/types/enumerations/PersonType.md +3 -3
- package/docs/types/enumerations/ProofStatus.md +4 -4
- package/docs/types/enumerations/ProofTypes.md +14 -14
- package/docs/types/enumerations/Status.md +5 -5
- package/docs/types/enumerations/VASPSearchControl.md +2 -2
- package/docs/types/enumerations/ValidationSections.md +4 -4
- package/docs/types/interfaces/Agent.md +6 -6
- package/docs/types/interfaces/CallbackOptions.md +2 -2
- package/docs/types/interfaces/ComponentRequest.md +2 -2
- package/docs/types/interfaces/ComponentResponse.md +4 -4
- package/docs/types/interfaces/ConnectionRecord.md +7 -7
- package/docs/types/interfaces/ConnectionRequest.md +3 -3
- package/docs/types/interfaces/Counterparty.md +10 -10
- package/docs/types/interfaces/DeclarationProof.md +6 -6
- package/docs/types/interfaces/Deposit.md +9 -9
- package/docs/types/interfaces/DepositRequest.md +7 -7
- package/docs/types/interfaces/DepositRequestOptions.md +1 -1
- package/docs/types/interfaces/LegalPerson.md +13 -13
- package/docs/types/interfaces/MicroTransferProof.md +9 -9
- package/docs/types/interfaces/NaturalPerson.md +13 -13
- package/docs/types/interfaces/OwnershipProof.md +4 -4
- package/docs/types/interfaces/ScreenshotProof.md +5 -5
- package/docs/types/interfaces/SignatureProof.md +8 -8
- package/docs/types/interfaces/ThresholdOptions.md +3 -3
- package/docs/types/interfaces/Transaction.md +8 -8
- package/docs/types/interfaces/TransactionOptions.md +6 -6
- package/docs/types/interfaces/TransactionResponse.md +8 -8
- package/docs/types/interfaces/VASP.md +9 -9
- package/docs/types/interfaces/Wallet.md +8 -8
- package/docs/types/interfaces/Withdrawal.md +9 -9
- package/docs/types/type-aliases/BlockchainAddress.md +1 -1
- package/docs/types/type-aliases/CAIP10.md +1 -1
- package/docs/types/type-aliases/CAIP19.md +1 -1
- package/docs/types/type-aliases/CAIP2.md +1 -1
- package/docs/types/type-aliases/CAIP220.md +1 -1
- package/docs/types/type-aliases/Cancel.md +1 -1
- package/docs/types/type-aliases/Completed.md +1 -1
- package/docs/types/type-aliases/ComponentMessage.md +1 -1
- package/docs/types/type-aliases/ConnectionOptions.md +1 -1
- package/docs/types/type-aliases/CryptoCredential.md +1 -1
- package/docs/types/type-aliases/DID.md +1 -1
- package/docs/types/type-aliases/DTI.md +1 -1
- package/docs/types/type-aliases/Destination.md +1 -1
- package/docs/types/type-aliases/Error.md +2 -2
- package/docs/types/type-aliases/FieldOptions.md +1 -1
- package/docs/types/type-aliases/FieldTypes.md +1 -1
- package/docs/types/type-aliases/HostMessage.md +1 -1
- package/docs/types/type-aliases/ISOCurrency.md +1 -1
- package/docs/types/type-aliases/InvalidValue.md +1 -1
- package/docs/types/type-aliases/LEI.md +1 -1
- package/docs/types/type-aliases/LegalPersonFieldName.md +1 -1
- package/docs/types/type-aliases/LegalPersonFields.md +1 -1
- package/docs/types/type-aliases/NaturalPersonFieldName.md +1 -1
- package/docs/types/type-aliases/NaturalPersonFields.md +1 -1
- package/docs/types/type-aliases/NotabeneAsset.md +1 -1
- package/docs/types/type-aliases/Ready.md +1 -1
- package/docs/types/type-aliases/ResizeRequest.md +1 -1
- package/docs/types/type-aliases/Source.md +1 -1
- package/docs/types/type-aliases/Theme.md +5 -1
- package/docs/types/type-aliases/TransactionAsset.md +1 -1
- package/docs/types/type-aliases/TravelAddress.md +1 -1
- package/docs/types/type-aliases/URI.md +1 -1
- package/docs/types/type-aliases/UUID.md +1 -1
- package/docs/types/type-aliases/UpdateValue.md +1 -1
- package/docs/types/type-aliases/V1Asset.md +1 -1
- package/docs/types/type-aliases/V1Transaction.md +1 -1
- package/docs/types/type-aliases/VASPOptions.md +1 -1
- package/docs/types/type-aliases/ValidationError.md +1 -1
- package/package.json +5 -5
- package/src/types.ts +9 -1
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[types.ts:231](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
15
|
+
[types.ts:231](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L231)
|
|
@@ -42,4 +42,4 @@ Array of validation errors
|
|
|
42
42
|
|
|
43
43
|
## Defined in
|
|
44
44
|
|
|
45
|
-
[types.ts:
|
|
45
|
+
[types.ts:863](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L863)
|
|
@@ -12,4 +12,4 @@ A LEI Legal Entity Identifier
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[types.ts:225](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
15
|
+
[types.ts:225](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L225)
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[types.ts:
|
|
13
|
+
[types.ts:430](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L430)
|
|
@@ -12,4 +12,4 @@ Field properties by field name
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[types.ts:
|
|
15
|
+
[types.ts:444](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L444)
|
|
@@ -12,4 +12,4 @@ Field names for NaturalPerson
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[types.ts:
|
|
15
|
+
[types.ts:383](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L383)
|
|
@@ -12,4 +12,4 @@ Field properties by field name for Natural persons
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[types.ts:
|
|
15
|
+
[types.ts:398](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L398)
|
|
@@ -33,4 +33,4 @@ system that may be used alongside CAIP-19 and DTI identifiers.
|
|
|
33
33
|
|
|
34
34
|
## Defined in
|
|
35
35
|
|
|
36
|
-
[types.ts:139](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
36
|
+
[types.ts:139](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L139)
|
|
@@ -18,4 +18,4 @@ Represents a ready component message
|
|
|
18
18
|
|
|
19
19
|
## Defined in
|
|
20
20
|
|
|
21
|
-
[types.ts:
|
|
21
|
+
[types.ts:814](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L814)
|
|
@@ -24,4 +24,4 @@ Represents a resize request component message. This is handled by the library.
|
|
|
24
24
|
|
|
25
25
|
## Defined in
|
|
26
26
|
|
|
27
|
-
[types.ts:
|
|
27
|
+
[types.ts:822](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L822)
|
|
@@ -12,4 +12,4 @@ The source of a transaction
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[types.ts:207](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
15
|
+
[types.ts:207](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L207)
|
|
@@ -20,6 +20,10 @@ The theme of the Notabene SDK
|
|
|
20
20
|
|
|
21
21
|
> `optional` **logo**: `string`
|
|
22
22
|
|
|
23
|
+
### mode
|
|
24
|
+
|
|
25
|
+
> **mode**: `"light"` \| `"dark"`
|
|
26
|
+
|
|
23
27
|
### primaryColor?
|
|
24
28
|
|
|
25
29
|
> `optional` **primaryColor**: `string`
|
|
@@ -30,4 +34,4 @@ The theme of the Notabene SDK
|
|
|
30
34
|
|
|
31
35
|
## Defined in
|
|
32
36
|
|
|
33
|
-
[types.ts:237](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
37
|
+
[types.ts:237](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L237)
|
|
@@ -12,4 +12,4 @@ The asset of a transaction either a Notabene asset, a CAIP-19 asset, or a DTI.
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[types.ts:145](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
15
|
+
[types.ts:145](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L145)
|
|
@@ -34,4 +34,4 @@ VASPs and blockchain networks while maintaining privacy.
|
|
|
34
34
|
|
|
35
35
|
## Defined in
|
|
36
36
|
|
|
37
|
-
[types.ts:186](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
37
|
+
[types.ts:186](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L186)
|
|
@@ -12,4 +12,4 @@ A Uniform Resource Identifier
|
|
|
12
12
|
|
|
13
13
|
## Defined in
|
|
14
14
|
|
|
15
|
-
[types.ts:213](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
15
|
+
[types.ts:213](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L213)
|
|
@@ -24,4 +24,4 @@ Format: 8-4-4-4-12 hexadecimal digits
|
|
|
24
24
|
|
|
25
25
|
## Defined in
|
|
26
26
|
|
|
27
|
-
[types.ts:39](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
27
|
+
[types.ts:39](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L39)
|
|
@@ -51,4 +51,4 @@ and its configuration without requiring a full reload/reinitialize.
|
|
|
51
51
|
|
|
52
52
|
## Defined in
|
|
53
53
|
|
|
54
|
-
[types.ts:
|
|
54
|
+
[types.ts:931](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L931)
|
|
@@ -33,4 +33,4 @@ Used for backwards compatibility with V1 API transaction payloads:
|
|
|
33
33
|
|
|
34
34
|
## Defined in
|
|
35
35
|
|
|
36
|
-
[types.ts:
|
|
36
|
+
[types.ts:606](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L606)
|
|
@@ -46,4 +46,4 @@ Transaction payload suitable for calling Notabene v1 tx/create
|
|
|
46
46
|
|
|
47
47
|
## Defined in
|
|
48
48
|
|
|
49
|
-
[types.ts:
|
|
49
|
+
[types.ts:612](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L612)
|
|
@@ -26,4 +26,4 @@ Options for which VASPs to be searchable
|
|
|
26
26
|
|
|
27
27
|
## Defined in
|
|
28
28
|
|
|
29
|
-
[types.ts:
|
|
29
|
+
[types.ts:721](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L721)
|
|
@@ -22,4 +22,4 @@ Validation error
|
|
|
22
22
|
|
|
23
23
|
## Defined in
|
|
24
24
|
|
|
25
|
-
[types.ts:
|
|
25
|
+
[types.ts:678](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/06342c6adf6f9cad152dcf6ecd0c80e7eb65778c/src/types.ts#L678)
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.
|
|
13
|
+
"version": "2.4.0",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/notabene.js",
|
|
16
16
|
"types": "dist/notabene.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"preview": "vite preview",
|
|
33
33
|
"build:dev": "yarn build && yarn dev",
|
|
34
34
|
"build:clean": "rimraf dist ts-out coverage temp",
|
|
35
|
-
"build": "
|
|
35
|
+
"build": "vite build && yarn typecheck && api-extractor run --local && yarn docs",
|
|
36
36
|
"lint": "eslint . --max-warnings 0",
|
|
37
37
|
"lint:fix": "yarn lint --fix --cache --no-warn-ignored",
|
|
38
38
|
"format": "prettier --write --cache .",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"@commitlint/config-conventional": "^19.5.0",
|
|
48
48
|
"@eslint/js": "^9.13.0",
|
|
49
49
|
"@fast-check/vitest": "^0.1.4",
|
|
50
|
-
"@microsoft/api-extractor": "^7.
|
|
50
|
+
"@microsoft/api-extractor": "^7.48.1",
|
|
51
51
|
"@semantic-release/git": "^10.0.1",
|
|
52
52
|
"@semantic-release/gitlab": "^13.2.1",
|
|
53
53
|
"@semantic-release/npm": "^12.0.1",
|
|
54
|
-
"@vitest/coverage-v8": "2.1.
|
|
54
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
55
55
|
"eslint": "^9.14.0",
|
|
56
56
|
"eslint-config-prettier": "^9.1.0",
|
|
57
57
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"*.ts": [
|
|
76
76
|
"yarn format:check",
|
|
77
77
|
"yarn lint:fix",
|
|
78
|
-
"yarn typecheck",
|
|
78
|
+
"yarn typecheck --noEmit",
|
|
79
79
|
"yarn test --run"
|
|
80
80
|
]
|
|
81
81
|
},
|
package/src/types.ts
CHANGED
|
@@ -235,6 +235,7 @@ export type ISOCurrency = string;
|
|
|
235
235
|
* @public
|
|
236
236
|
*/
|
|
237
237
|
export type Theme = {
|
|
238
|
+
mode: 'light' | 'dark'; // Defaults to 'light'
|
|
238
239
|
primaryColor?: string;
|
|
239
240
|
secondaryColor?: string;
|
|
240
241
|
fontFamily?: string;
|
|
@@ -823,6 +824,13 @@ export type ResizeRequest = {
|
|
|
823
824
|
height: number;
|
|
824
825
|
};
|
|
825
826
|
|
|
827
|
+
export enum ErrorIdentifierCode {
|
|
828
|
+
SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE',
|
|
829
|
+
WALLET_CONNECTION_FAILED = 'WALLET_CONNECTION_FAILED',
|
|
830
|
+
WALLET_NOT_SUPPORTED = 'WALLET_NOT_SUPPORTED',
|
|
831
|
+
TOKEN_INVALID = 'TOKEN_INVALID',
|
|
832
|
+
}
|
|
833
|
+
|
|
826
834
|
/**
|
|
827
835
|
* Represents an error component message
|
|
828
836
|
* @param message - Error message
|
|
@@ -834,7 +842,7 @@ export type Error = {
|
|
|
834
842
|
type: CMType.ERROR;
|
|
835
843
|
message: string;
|
|
836
844
|
description?: string;
|
|
837
|
-
identifier?:
|
|
845
|
+
identifier?: ErrorIdentifierCode;
|
|
838
846
|
};
|
|
839
847
|
|
|
840
848
|
/**
|