@notabene/javascript-sdk 2.0.0-next.3 → 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.
Files changed (50) hide show
  1. package/dist/notabene.d.ts +5 -5
  2. package/package.json +12 -8
  3. package/src/types.ts +15 -15
  4. package/src/utils/arbitraries.ts +4 -4
  5. package/.editorconfig +0 -10
  6. package/.gitlab-ci.yml +0 -85
  7. package/.husky/commit-msg +0 -4
  8. package/.husky/pre-commit +0 -4
  9. package/.husky/pre-push +0 -4
  10. package/.prettierrc +0 -4
  11. package/.releaserc.json +0 -16
  12. package/.vscode/extensions.json +0 -3
  13. package/.vscode/settings.json +0 -11
  14. package/.yarn/releases/yarn-berry.cjs +0 -925
  15. package/.yarnrc.yml +0 -3
  16. package/CODEOWNERS +0 -1
  17. package/api-extractor.json +0 -434
  18. package/eslint.config.js +0 -24
  19. package/etc/javascript-sdk.api.md +0 -363
  20. package/index.html +0 -135
  21. package/temp/javascript-sdk.api.json +0 -3509
  22. package/temp/javascript-sdk.api.md +0 -363
  23. package/ts-out/src/__tests__/notabene.test.d.ts +0 -1
  24. package/ts-out/src/__tests__/notabene.test.js +0 -97
  25. package/ts-out/src/arbitraries.d.ts +0 -4
  26. package/ts-out/src/arbitraries.js +0 -8
  27. package/ts-out/src/components/EmbeddedComponent.d.ts +0 -25
  28. package/ts-out/src/components/EmbeddedComponent.js +0 -87
  29. package/ts-out/src/components/__tests__/EmbeddedComponent.test.d.ts +0 -1
  30. package/ts-out/src/components/__tests__/EmbeddedComponent.test.js +0 -132
  31. package/ts-out/src/ivms/types.d.ts +0 -252
  32. package/ts-out/src/ivms/types.js +0 -1
  33. package/ts-out/src/notabene.d.ts +0 -35
  34. package/ts-out/src/notabene.js +0 -60
  35. package/ts-out/src/types.d.ts +0 -357
  36. package/ts-out/src/types.js +0 -85
  37. package/ts-out/src/utils/MessageEventManager.d.ts +0 -12
  38. package/ts-out/src/utils/MessageEventManager.js +0 -45
  39. package/ts-out/src/utils/__tests__/MessageEventManager.test.d.ts +0 -1
  40. package/ts-out/src/utils/__tests__/MessageEventManager.test.js +0 -73
  41. package/ts-out/src/utils/arbitraries.d.ts +0 -6
  42. package/ts-out/src/utils/arbitraries.js +0 -7
  43. package/ts-out/src/utils/caip.d.ts +0 -13
  44. package/ts-out/src/utils/caip.js +0 -15
  45. package/ts-out/src/utils/urls.d.ts +0 -1
  46. package/ts-out/src/utils/urls.js +0 -14
  47. package/ts-out/tsconfig.tsbuildinfo +0 -1
  48. package/tsconfig.json +0 -22
  49. package/tsconfig.tsbuildinfo +0 -1
  50. package/vite.config.js +0 -13
@@ -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,11 +9,17 @@
9
9
  },
10
10
  "author": "Notabene <developers@notabene.id>",
11
11
  "license": "MIT",
12
- "version": "2.0.0-next.3",
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",
16
16
  "browserslist": "> 0.5%, last 2 versions, not dead",
17
+ "files": [
18
+ "dist",
19
+ "src",
20
+ "package.json",
21
+ "README.md"
22
+ ],
17
23
  "scripts": {
18
24
  "prepare": "husky install",
19
25
  "dev": "vite",
@@ -25,11 +31,11 @@
25
31
  "lint": "eslint .",
26
32
  "test": "vitest",
27
33
  "release": "semantic-release",
28
- "publish": "yarn build && yarn semantic-release && npm publish --tag next"
34
+ "publish": "yarn build && npm publish --tag next"
29
35
  },
30
36
  "devDependencies": {
31
- "@commitlint/cli": "^16.2.1",
32
- "@commitlint/config-conventional": "^16.2.1",
37
+ "@commitlint/cli": "^19.4.0",
38
+ "@commitlint/config-conventional": "^19.2.2",
33
39
  "@eslint/js": "^9.7.0",
34
40
  "@fast-check/vitest": "^0.1.2",
35
41
  "@microsoft/api-extractor": "^7.47.7",
@@ -40,9 +46,6 @@
40
46
  "@typescript-eslint/parser": "^8.2.0",
41
47
  "eslint": "^9.9.0",
42
48
  "eslint-config-prettier": "^9.1.0",
43
- "eslint-config-standard": "^17.1.0",
44
- "eslint-plugin-import": "^2.25.4",
45
- "eslint-plugin-node": "^11.1.0",
46
49
  "eslint-plugin-prettier": "^5.2.1",
47
50
  "fast-check": "^3.20.0",
48
51
  "globals": "^15.8.0",
@@ -50,7 +53,8 @@
50
53
  "lint-staged": "^12.3.4",
51
54
  "organize-imports-cli": "^0.9.0",
52
55
  "prettier": "^3.3.3",
53
- "semantic-release": "^19.0.2",
56
+ "rimraf": "^6.0.1",
57
+ "semantic-release": "^24.1.0",
54
58
  "typescript": "^5.5.4",
55
59
  "typescript-eslint": "^8.2.0",
56
60
  "vite": "^5.4.2",
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>;
package/.editorconfig DELETED
@@ -1,10 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- end_of_line = lf
5
- insert_final_newline = true
6
-
7
- [*.{js,json,yml}]
8
- charset = utf-8
9
- indent_style = space
10
- indent_size = 2
package/.gitlab-ci.yml DELETED
@@ -1,85 +0,0 @@
1
- image: registry.gitlab.com/notabene/devops/build-node-18-image:latest
2
-
3
- variables:
4
- NPM_TOKEN: ${CI_JOB_TOKEN}
5
-
6
- stages:
7
- - install
8
- - lint
9
- - test
10
- - build
11
- - release
12
-
13
- install:
14
- stage: install
15
- artifacts:
16
- paths:
17
- - .yarn
18
- - .pnp.cjs
19
- - .pnp.loader.mjs
20
- script:
21
- - yarn
22
-
23
- lint:
24
- stage: lint
25
- needs:
26
- - install
27
- script:
28
- - yarn lint
29
-
30
- test:
31
- stage: test
32
- needs:
33
- - install
34
- script:
35
- - yarn test
36
-
37
- build:
38
- stage: build
39
- needs:
40
- - install
41
- script:
42
- - yarn build
43
- artifacts:
44
- paths:
45
- - dist
46
-
47
- publish-gitlab:
48
- stage: release
49
- needs:
50
- - install
51
- - build
52
- variables:
53
- GITLAB_USER_NAME: 'gitlab-ci'
54
- GITLAB_USER_EMAIL: 'gitlab-ci@example.com'
55
- before_script:
56
- - git config --global user.email "$GITLAB_USER_EMAIL"
57
- - git config --global user.name "$GITLAB_USER_NAME"
58
- - |
59
- {
60
- echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
61
- echo "${CI_API_V4_URL#https?}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
62
- } | tee -a .npmrc
63
- script:
64
- - yarn semantic-release
65
- only:
66
- - master
67
-
68
- publish-npm:
69
- stage: release
70
- when: manual
71
- script:
72
- - yarn npm publish
73
- only:
74
- - tags
75
-
76
- publish-npm-next:
77
- stage: release
78
- needs:
79
- - install
80
- - build
81
- script:
82
- - yarn npm version prerelease
83
- - yarn npm publish --tag next
84
- only:
85
- - v2
package/.husky/commit-msg DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn commitlint -e "${1}"
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn lint-staged
package/.husky/pre-push DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn test --run
package/.prettierrc DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": true
4
- }
package/.releaserc.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "branches": ["master"],
3
- "plugins": [
4
- "@semantic-release/commit-analyzer",
5
- "@semantic-release/release-notes-generator",
6
- "@semantic-release/gitlab",
7
- "@semantic-release/npm",
8
- [
9
- "@semantic-release/git",
10
- {
11
- "assets": ["package.json"],
12
- "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
13
- }
14
- ]
15
- ]
16
- }
@@ -1,3 +0,0 @@
1
- {
2
- "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
3
- }
@@ -1,11 +0,0 @@
1
- {
2
- "search.exclude": {
3
- "**/.yarn": true,
4
- "**/.pnp.*": true
5
- },
6
- "typescript.enablePromptUseWorkspaceTsdk": true,
7
- "editor.defaultFormatter": "esbenp.prettier-vscode",
8
- "editor.codeActionsOnSave": {
9
- "source.fixAll.eslint": "explicit"
10
- }
11
- }