@notabene/javascript-sdk 2.0.0-next.5 → 2.0.0-next.6

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.
@@ -76,11 +76,11 @@ declare type BeneficiaryVASP = {
76
76
 
77
77
  declare type BlockchainAddress = string;
78
78
 
79
- declare type CAIP10 = string;
79
+ declare type CAIP10 = `${CAIP2}:${string}`;
80
80
 
81
- declare type CAIP19 = string;
81
+ declare type CAIP19 = `${CAIP2}/${string}:${string}`;
82
82
 
83
- declare type CAIP2 = string;
83
+ declare type CAIP2 = `${string}:${string}`;
84
84
 
85
85
  declare interface CallbackOptions {
86
86
  callback?: URI;
@@ -159,9 +159,9 @@ export declare interface DeclarationProof extends OwnershipProof {
159
159
  * The destination of a transaction either a blockchain address, a CAIP-19 address, or a travel address.
160
160
  * @public
161
161
  */
162
- export declare type destination = BlockchainAddress | CAIP19 | TravelAddress;
162
+ export declare type destination = BlockchainAddress | CAIP10 | TravelAddress;
163
163
 
164
- declare type DID = string;
164
+ declare type DID = `did:${string}:${string}`;
165
165
 
166
166
  declare type DTI = string;
167
167
 
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "author": "Notabene <developers@notabene.id>",
11
11
  "license": "MIT",
12
- "version": "2.0.0-next.5",
12
+ "version": "2.0.0-next.6",
13
13
  "source": "src/notabene.ts",
14
14
  "main": "dist/notabene.js",
15
15
  "types": "dist/notabene.d.ts",
package/src/types.ts CHANGED
@@ -6,9 +6,9 @@ import {
6
6
 
7
7
  export type { IVMS101 };
8
8
 
9
- export type CAIP2 = string;
10
- export type CAIP10 = string;
11
- export type CAIP19 = string;
9
+ export type CAIP2 = `${string}:${string}`;
10
+ export type CAIP10 = `${CAIP2}:${string}`;
11
+ export type CAIP19 = `${CAIP2}/${string}:${string}`;
12
12
  export type CAIP220 = string;
13
13
 
14
14
  export type DTI = string;
@@ -29,10 +29,10 @@ export type TravelAddress = string;
29
29
  * The destination of a transaction either a blockchain address, a CAIP-19 address, or a travel address.
30
30
  * @public
31
31
  */
32
- export type Destination = BlockchainAddress | CAIP19 | TravelAddress;
33
- export type Source = BlockchainAddress | CAIP19;
32
+ export type Destination = BlockchainAddress | CAIP10 | TravelAddress;
33
+ export type Source = BlockchainAddress | CAIP10;
34
34
  export type URI = string;
35
- export type DID = string;
35
+ export type DID = `did:${string}:${string}`;
36
36
 
37
37
  /**
38
38
  * The theme of the Notabene SDK
@@ -49,17 +49,17 @@ export enum ComponentTypes {
49
49
  WITHDRAW_ASSIST = 'WITHDRAW_ASSIST',
50
50
  }
51
51
 
52
- export type TransactionType = 'VASP_2_VASP' | 'SELF_HOSTED';
52
+ // export type TransactionType = 'VASP_2_VASP' | 'SELF_HOSTED';
53
53
 
54
- export type TransactionTypeAllowed =
55
- | 'ALL'
56
- | 'VASP_2_VASP_ONLY'
57
- | 'FIRST_PARTY_ONLY';
54
+ // export type TransactionTypeAllowed =
55
+ // | 'ALL'
56
+ // | 'VASP_2_VASP_ONLY'
57
+ // | 'FIRST_PARTY_ONLY';
58
58
 
59
- export type NonCustodialDeclarationType =
60
- | 'SIGNATURE'
61
- | 'DECLARATION'
62
- | 'SIGNATURE_AND_DECLARATION';
59
+ // export type NonCustodialDeclarationType =
60
+ // | 'SIGNATURE'
61
+ // | 'DECLARATION'
62
+ // | 'SIGNATURE_AND_DECLARATION';
63
63
 
64
64
  /**
65
65
  * The type of Agent. Either a wallet or a VASP
@@ -9,13 +9,13 @@ import {
9
9
 
10
10
  // Arbitraries
11
11
  export const arbitraryCAIP10 = (): fc.Arbitrary<CAIP10> =>
12
- fc.stringMatching(CAIP10_MATCHER);
12
+ fc.stringMatching(CAIP10_MATCHER) as fc.Arbitrary<CAIP10>;
13
13
 
14
14
  export const arbitraryCAIP2 = (): fc.Arbitrary<CAIP2> =>
15
- fc.stringMatching(CAIP2_MATCHER);
15
+ fc.stringMatching(CAIP2_MATCHER) as fc.Arbitrary<CAIP2>;
16
16
 
17
17
  export const arbitraryCAIP19 = (): fc.Arbitrary<CAIP19> =>
18
- fc.stringMatching(CAIP19_MATCHER);
18
+ fc.stringMatching(CAIP19_MATCHER) as fc.Arbitrary<CAIP19>;
19
19
 
20
20
  export const arbitraryCAIP220 = (): fc.Arbitrary<CAIP220> =>
21
- fc.stringMatching(CAIP220_MATCHER);
21
+ fc.stringMatching(CAIP220_MATCHER) as fc.Arbitrary<CAIP220>;