@notabene/javascript-sdk 2.1.0 → 2.2.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.
Files changed (112) hide show
  1. package/README.md +24 -0
  2. package/dist/notabene.cjs +1 -1
  3. package/dist/notabene.d.ts +7 -0
  4. package/dist/notabene.js +101 -70
  5. package/docs/README.md +24 -0
  6. package/docs/_media/TransactionOptions.md +6 -6
  7. package/docs/ivms/types/enumerations/PayloadVersionCode.md +2 -2
  8. package/docs/ivms/types/interfaces/PayloadMetadata.md +2 -2
  9. package/docs/ivms/types/type-aliases/Address.md +1 -1
  10. package/docs/ivms/types/type-aliases/AddressTypeCode.md +1 -1
  11. package/docs/ivms/types/type-aliases/Beneficiary.md +1 -1
  12. package/docs/ivms/types/type-aliases/BeneficiaryVASP.md +1 -1
  13. package/docs/ivms/types/type-aliases/DateAndPlaceOfBirth.md +1 -1
  14. package/docs/ivms/types/type-aliases/ISOCountryCode.md +1 -1
  15. package/docs/ivms/types/type-aliases/ISODate.md +1 -1
  16. package/docs/ivms/types/type-aliases/IVMS101.md +1 -1
  17. package/docs/ivms/types/type-aliases/IntermediaryVASP.md +1 -1
  18. package/docs/ivms/types/type-aliases/LegalPerson.md +1 -1
  19. package/docs/ivms/types/type-aliases/LegalPersonName.md +1 -1
  20. package/docs/ivms/types/type-aliases/LegalPersonNameID.md +1 -1
  21. package/docs/ivms/types/type-aliases/LegalPersonNameTypeCode.md +1 -1
  22. package/docs/ivms/types/type-aliases/LocalLegalPersonNameID.md +1 -1
  23. package/docs/ivms/types/type-aliases/LocalNaturalPersonNameID.md +1 -1
  24. package/docs/ivms/types/type-aliases/NationalIdentification.md +1 -1
  25. package/docs/ivms/types/type-aliases/NationalIdentifierTypeCode.md +1 -1
  26. package/docs/ivms/types/type-aliases/NaturalPerson.md +1 -1
  27. package/docs/ivms/types/type-aliases/NaturalPersonName.md +1 -1
  28. package/docs/ivms/types/type-aliases/NaturalPersonNameID.md +1 -1
  29. package/docs/ivms/types/type-aliases/NaturalPersonNameTypeCode.md +1 -1
  30. package/docs/ivms/types/type-aliases/OriginatingVASP.md +1 -1
  31. package/docs/ivms/types/type-aliases/Originator.md +1 -1
  32. package/docs/ivms/types/type-aliases/Person.md +1 -1
  33. package/docs/ivms/types/type-aliases/TransferPath.md +1 -1
  34. package/docs/ivms/types/type-aliases/TransliterationMethodCode.md +1 -1
  35. package/docs/notabene/classes/EmbeddedComponent.md +39 -16
  36. package/docs/notabene/classes/default.md +6 -6
  37. package/docs/notabene/functions/decodeFragmentToObject.md +1 -1
  38. package/docs/notabene/interfaces/NotabeneConfig.md +5 -5
  39. package/docs/notabene/type-aliases/MessageCallback.md +1 -1
  40. package/docs/types/enumerations/AgentType.md +2 -2
  41. package/docs/types/enumerations/CMType.md +6 -6
  42. package/docs/types/enumerations/HMType.md +2 -2
  43. package/docs/types/enumerations/PersonType.md +3 -3
  44. package/docs/types/enumerations/ProofStatus.md +4 -4
  45. package/docs/types/enumerations/ProofTypes.md +12 -12
  46. package/docs/types/enumerations/Status.md +5 -5
  47. package/docs/types/enumerations/VASPSearchControl.md +2 -2
  48. package/docs/types/enumerations/ValidationSections.md +4 -4
  49. package/docs/types/interfaces/Agent.md +6 -6
  50. package/docs/types/interfaces/CallbackOptions.md +2 -2
  51. package/docs/types/interfaces/ComponentRequest.md +2 -2
  52. package/docs/types/interfaces/ComponentResponse.md +4 -4
  53. package/docs/types/interfaces/ConnectionRecord.md +7 -7
  54. package/docs/types/interfaces/ConnectionRequest.md +3 -3
  55. package/docs/types/interfaces/Counterparty.md +10 -10
  56. package/docs/types/interfaces/DeclarationProof.md +6 -6
  57. package/docs/types/interfaces/Deposit.md +9 -9
  58. package/docs/types/interfaces/DepositRequest.md +7 -7
  59. package/docs/types/interfaces/DepositRequestOptions.md +1 -1
  60. package/docs/types/interfaces/LegalPerson.md +13 -13
  61. package/docs/types/interfaces/MicroTransferProof.md +9 -9
  62. package/docs/types/interfaces/NaturalPerson.md +13 -13
  63. package/docs/types/interfaces/OwnershipProof.md +4 -4
  64. package/docs/types/interfaces/ScreenshotProof.md +5 -5
  65. package/docs/types/interfaces/SignatureProof.md +7 -7
  66. package/docs/types/interfaces/ThresholdOptions.md +3 -3
  67. package/docs/types/interfaces/Transaction.md +8 -8
  68. package/docs/types/interfaces/TransactionOptions.md +6 -6
  69. package/docs/types/interfaces/TransactionResponse.md +8 -8
  70. package/docs/types/interfaces/VASP.md +9 -9
  71. package/docs/types/interfaces/Wallet.md +8 -8
  72. package/docs/types/interfaces/Withdrawal.md +9 -9
  73. package/docs/types/type-aliases/BlockchainAddress.md +1 -1
  74. package/docs/types/type-aliases/CAIP10.md +1 -1
  75. package/docs/types/type-aliases/CAIP19.md +1 -1
  76. package/docs/types/type-aliases/CAIP2.md +1 -1
  77. package/docs/types/type-aliases/CAIP220.md +1 -1
  78. package/docs/types/type-aliases/Cancel.md +1 -1
  79. package/docs/types/type-aliases/Completed.md +1 -1
  80. package/docs/types/type-aliases/ComponentMessage.md +1 -1
  81. package/docs/types/type-aliases/ConnectionOptions.md +1 -1
  82. package/docs/types/type-aliases/CryptoCredential.md +1 -1
  83. package/docs/types/type-aliases/DID.md +1 -1
  84. package/docs/types/type-aliases/DTI.md +1 -1
  85. package/docs/types/type-aliases/Destination.md +1 -1
  86. package/docs/types/type-aliases/Error.md +1 -1
  87. package/docs/types/type-aliases/FieldOptions.md +1 -1
  88. package/docs/types/type-aliases/FieldTypes.md +1 -1
  89. package/docs/types/type-aliases/HostMessage.md +1 -1
  90. package/docs/types/type-aliases/ISOCurrency.md +1 -1
  91. package/docs/types/type-aliases/InvalidValue.md +1 -1
  92. package/docs/types/type-aliases/LEI.md +1 -1
  93. package/docs/types/type-aliases/LegalPersonFieldName.md +1 -1
  94. package/docs/types/type-aliases/LegalPersonFields.md +1 -1
  95. package/docs/types/type-aliases/NaturalPersonFieldName.md +1 -1
  96. package/docs/types/type-aliases/NaturalPersonFields.md +1 -1
  97. package/docs/types/type-aliases/NotabeneAsset.md +1 -1
  98. package/docs/types/type-aliases/ResizeRequest.md +1 -1
  99. package/docs/types/type-aliases/Source.md +1 -1
  100. package/docs/types/type-aliases/Theme.md +1 -1
  101. package/docs/types/type-aliases/TransactionAsset.md +1 -1
  102. package/docs/types/type-aliases/TravelAddress.md +1 -1
  103. package/docs/types/type-aliases/URI.md +1 -1
  104. package/docs/types/type-aliases/UUID.md +1 -1
  105. package/docs/types/type-aliases/UpdateValue.md +1 -1
  106. package/docs/types/type-aliases/V1Asset.md +1 -1
  107. package/docs/types/type-aliases/V1Transaction.md +1 -1
  108. package/docs/types/type-aliases/VASPOptions.md +1 -1
  109. package/docs/types/type-aliases/ValidationError.md +1 -1
  110. package/package.json +3 -4
  111. package/src/components/EmbeddedComponent.ts +49 -5
  112. package/src/components/__tests__/EmbeddedComponent.test.ts +0 -530
@@ -20,7 +20,7 @@ A VASP agent acting on behalf of the counterparty
20
20
 
21
21
  #### Defined in
22
22
 
23
- [types.ts:301](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L301)
23
+ [types.ts:301](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L301)
24
24
 
25
25
  ***
26
26
 
@@ -34,7 +34,7 @@ A VASP agent acting on behalf of the counterparty
34
34
 
35
35
  #### Defined in
36
36
 
37
- [types.ts:258](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L258)
37
+ [types.ts:258](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L258)
38
38
 
39
39
  ***
40
40
 
@@ -44,7 +44,7 @@ A VASP agent acting on behalf of the counterparty
44
44
 
45
45
  #### Defined in
46
46
 
47
- [types.ts:298](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L298)
47
+ [types.ts:298](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L298)
48
48
 
49
49
  ***
50
50
 
@@ -58,7 +58,7 @@ A VASP agent acting on behalf of the counterparty
58
58
 
59
59
  #### Defined in
60
60
 
61
- [types.ts:299](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L299)
61
+ [types.ts:299](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L299)
62
62
 
63
63
  ***
64
64
 
@@ -72,7 +72,7 @@ A VASP agent acting on behalf of the counterparty
72
72
 
73
73
  #### Defined in
74
74
 
75
- [types.ts:262](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L262)
75
+ [types.ts:262](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L262)
76
76
 
77
77
  ***
78
78
 
@@ -86,7 +86,7 @@ A VASP agent acting on behalf of the counterparty
86
86
 
87
87
  #### Defined in
88
88
 
89
- [types.ts:259](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L259)
89
+ [types.ts:259](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L259)
90
90
 
91
91
  ***
92
92
 
@@ -100,7 +100,7 @@ A VASP agent acting on behalf of the counterparty
100
100
 
101
101
  #### Defined in
102
102
 
103
- [types.ts:261](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L261)
103
+ [types.ts:261](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L261)
104
104
 
105
105
  ***
106
106
 
@@ -114,7 +114,7 @@ A VASP agent acting on behalf of the counterparty
114
114
 
115
115
  #### Defined in
116
116
 
117
- [types.ts:263](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L263)
117
+ [types.ts:263](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L263)
118
118
 
119
119
  ***
120
120
 
@@ -124,4 +124,4 @@ A VASP agent acting on behalf of the counterparty
124
124
 
125
125
  #### Defined in
126
126
 
127
- [types.ts:300](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L300)
127
+ [types.ts:300](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L300)
@@ -24,7 +24,7 @@ A wallet agent acting on behalf of the counterparty
24
24
 
25
25
  #### Defined in
26
26
 
27
- [types.ts:258](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L258)
27
+ [types.ts:258](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L258)
28
28
 
29
29
  ***
30
30
 
@@ -38,7 +38,7 @@ A wallet agent acting on behalf of the counterparty
38
38
 
39
39
  #### Defined in
40
40
 
41
- [types.ts:260](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L260)
41
+ [types.ts:260](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L260)
42
42
 
43
43
  ***
44
44
 
@@ -52,7 +52,7 @@ A wallet agent acting on behalf of the counterparty
52
52
 
53
53
  #### Defined in
54
54
 
55
- [types.ts:262](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L262)
55
+ [types.ts:262](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L262)
56
56
 
57
57
  ***
58
58
 
@@ -62,7 +62,7 @@ A wallet agent acting on behalf of the counterparty
62
62
 
63
63
  #### Defined in
64
64
 
65
- [types.ts:309](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L309)
65
+ [types.ts:309](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L309)
66
66
 
67
67
  ***
68
68
 
@@ -76,7 +76,7 @@ A wallet agent acting on behalf of the counterparty
76
76
 
77
77
  #### Defined in
78
78
 
79
- [types.ts:259](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L259)
79
+ [types.ts:259](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L259)
80
80
 
81
81
  ***
82
82
 
@@ -90,7 +90,7 @@ A wallet agent acting on behalf of the counterparty
90
90
 
91
91
  #### Defined in
92
92
 
93
- [types.ts:261](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L261)
93
+ [types.ts:261](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L261)
94
94
 
95
95
  ***
96
96
 
@@ -104,7 +104,7 @@ A wallet agent acting on behalf of the counterparty
104
104
 
105
105
  #### Defined in
106
106
 
107
- [types.ts:263](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L263)
107
+ [types.ts:263](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L263)
108
108
 
109
109
  ***
110
110
 
@@ -114,4 +114,4 @@ A wallet agent acting on behalf of the counterparty
114
114
 
115
115
  #### Defined in
116
116
 
117
- [types.ts:310](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L310)
117
+ [types.ts:310](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L310)
@@ -24,7 +24,7 @@ An object representing a withdrawal transaction
24
24
 
25
25
  #### Defined in
26
26
 
27
- [types.ts:522](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L522)
27
+ [types.ts:522](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L522)
28
28
 
29
29
  ***
30
30
 
@@ -38,7 +38,7 @@ An object representing a withdrawal transaction
38
38
 
39
39
  #### Defined in
40
40
 
41
- [types.ts:525](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L525)
41
+ [types.ts:525](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L525)
42
42
 
43
43
  ***
44
44
 
@@ -52,7 +52,7 @@ An object representing a withdrawal transaction
52
52
 
53
53
  #### Defined in
54
54
 
55
- [types.ts:524](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L524)
55
+ [types.ts:524](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L524)
56
56
 
57
57
  ***
58
58
 
@@ -74,7 +74,7 @@ An object representing a withdrawal transaction
74
74
 
75
75
  #### Defined in
76
76
 
77
- [types.ts:527](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L527)
77
+ [types.ts:527](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L527)
78
78
 
79
79
  ***
80
80
 
@@ -88,7 +88,7 @@ An object representing a withdrawal transaction
88
88
 
89
89
  #### Defined in
90
90
 
91
- [types.ts:523](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L523)
91
+ [types.ts:523](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L523)
92
92
 
93
93
  ***
94
94
 
@@ -102,7 +102,7 @@ An object representing a withdrawal transaction
102
102
 
103
103
  #### Defined in
104
104
 
105
- [types.ts:495](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L495)
105
+ [types.ts:495](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L495)
106
106
 
107
107
  ***
108
108
 
@@ -116,7 +116,7 @@ An object representing a withdrawal transaction
116
116
 
117
117
  #### Defined in
118
118
 
119
- [types.ts:460](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L460)
119
+ [types.ts:460](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L460)
120
120
 
121
121
  ***
122
122
 
@@ -130,7 +130,7 @@ An object representing a withdrawal transaction
130
130
 
131
131
  #### Defined in
132
132
 
133
- [types.ts:526](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L526)
133
+ [types.ts:526](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L526)
134
134
 
135
135
  ***
136
136
 
@@ -144,4 +144,4 @@ An object representing a withdrawal transaction
144
144
 
145
145
  #### Defined in
146
146
 
147
- [types.ts:494](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L494)
147
+ [types.ts:494](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L494)
@@ -33,4 +33,4 @@ The address format and validation rules depend on the underlying blockchain.
33
33
 
34
34
  ## Defined in
35
35
 
36
- [types.ts:166](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L166)
36
+ [types.ts:166](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L166)
@@ -36,4 +36,4 @@ Format: `{caip2}:{address}`
36
36
 
37
37
  ## Defined in
38
38
 
39
- [types.ts:73](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L73)
39
+ [types.ts:73](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L73)
@@ -37,4 +37,4 @@ Format: `{caip2}/{asset_namespace}:{asset_reference}`
37
37
 
38
38
  ## Defined in
39
39
 
40
- [types.ts:91](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L91)
40
+ [types.ts:91](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L91)
@@ -36,4 +36,4 @@ Format: `namespace:reference`
36
36
 
37
37
  ## Defined in
38
38
 
39
- [types.ts:56](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L56)
39
+ [types.ts:56](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L56)
@@ -12,4 +12,4 @@ Chain Agnostic Payload Identifier
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:97](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L97)
15
+ [types.ts:97](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L97)
@@ -20,4 +20,4 @@ Represents a cancel component message
20
20
 
21
21
  ## Defined in
22
22
 
23
- [types.ts:834](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L834)
23
+ [types.ts:834](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L834)
@@ -32,4 +32,4 @@ The Response object which wraps T
32
32
 
33
33
  ## Defined in
34
34
 
35
- [types.ts:802](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L802)
35
+ [types.ts:802](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L802)
@@ -36,4 +36,4 @@ through these message types:
36
36
 
37
37
  ## Defined in
38
38
 
39
- [types.ts:872](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L872)
39
+ [types.ts:872](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L872)
@@ -12,4 +12,4 @@ An object representing options for a Connection Request
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:574](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L574)
15
+ [types.ts:574](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L574)
@@ -12,4 +12,4 @@ A crypto credential
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:191](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L191)
15
+ [types.ts:191](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L191)
@@ -12,4 +12,4 @@ A Decentralized Identifier
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:219](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L219)
15
+ [types.ts:219](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L219)
@@ -35,4 +35,4 @@ Format: `DTI[NNNNN]` where N is a digit
35
35
 
36
36
  ## Defined in
37
37
 
38
- [types.ts:117](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L117)
38
+ [types.ts:117](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L117)
@@ -12,4 +12,4 @@ The destination of a transaction either a blockchain address, a CAIP-19 address,
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:197](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L197)
15
+ [types.ts:197](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L197)
@@ -42,4 +42,4 @@ Identifier code of the error message
42
42
 
43
43
  ## Defined in
44
44
 
45
- [types.ts:823](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L823)
45
+ [types.ts:823](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L823)
@@ -12,4 +12,4 @@ Field properties
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:686](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L686)
15
+ [types.ts:686](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L686)
@@ -22,4 +22,4 @@ Field type configuration
22
22
 
23
23
  ## Defined in
24
24
 
25
- [types.ts:698](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L698)
25
+ [types.ts:698](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L698)
@@ -34,4 +34,4 @@ without requiring full reinitialization.
34
34
 
35
35
  ## Defined in
36
36
 
37
- [types.ts:934](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L934)
37
+ [types.ts:934](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L934)
@@ -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/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L231)
15
+ [types.ts:231](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L231)
@@ -42,4 +42,4 @@ Array of validation errors
42
42
 
43
43
  ## Defined in
44
44
 
45
- [types.ts:845](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L845)
45
+ [types.ts:845](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L845)
@@ -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/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L225)
15
+ [types.ts:225](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L225)
@@ -10,4 +10,4 @@
10
10
 
11
11
  ## Defined in
12
12
 
13
- [types.ts:429](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L429)
13
+ [types.ts:429](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L429)
@@ -12,4 +12,4 @@ Field properties by field name
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:443](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L443)
15
+ [types.ts:443](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L443)
@@ -12,4 +12,4 @@ Field names for NaturalPerson
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:382](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L382)
15
+ [types.ts:382](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L382)
@@ -12,4 +12,4 @@ Field properties by field name for Natural persons
12
12
 
13
13
  ## Defined in
14
14
 
15
- [types.ts:397](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L397)
15
+ [types.ts:397](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L397)
@@ -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/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L139)
36
+ [types.ts:139](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L139)
@@ -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:811](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L811)
27
+ [types.ts:811](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L811)
@@ -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/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L207)
15
+ [types.ts:207](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L207)
@@ -30,4 +30,4 @@ The theme of the Notabene SDK
30
30
 
31
31
  ## Defined in
32
32
 
33
- [types.ts:237](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L237)
33
+ [types.ts:237](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/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/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L145)
15
+ [types.ts:145](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/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/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L186)
37
+ [types.ts:186](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/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/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L213)
15
+ [types.ts:213](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/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/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L39)
27
+ [types.ts:39](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/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:912](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L912)
54
+ [types.ts:912](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L912)
@@ -33,4 +33,4 @@ Used for backwards compatibility with V1 API transaction payloads:
33
33
 
34
34
  ## Defined in
35
35
 
36
- [types.ts:605](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L605)
36
+ [types.ts:605](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L605)
@@ -46,4 +46,4 @@ Transaction payload suitable for calling Notabene v1 tx/create
46
46
 
47
47
  ## Defined in
48
48
 
49
- [types.ts:611](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L611)
49
+ [types.ts:611](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L611)
@@ -26,4 +26,4 @@ Options for which VASPs to be searchable
26
26
 
27
27
  ## Defined in
28
28
 
29
- [types.ts:720](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L720)
29
+ [types.ts:720](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L720)
@@ -22,4 +22,4 @@ Validation error
22
22
 
23
23
  ## Defined in
24
24
 
25
- [types.ts:677](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/9a4530da9029429ae25456217bc5ecba197bd4fc/src/types.ts#L677)
25
+ [types.ts:677](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L677)
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.1.0",
13
+ "version": "2.2.0",
14
14
  "source": "src/notabene.ts",
15
15
  "main": "dist/notabene.js",
16
16
  "types": "dist/notabene.d.ts",
@@ -37,8 +37,7 @@
37
37
  "test": "vitest",
38
38
  "typecheck": "tsc --skipLibCheck",
39
39
  "coverage": "vitest run --coverage --coverage.extension=.ts",
40
- "release": "semantic-release",
41
- "publish": "yarn build && npm publish"
40
+ "release": "semantic-release"
42
41
  },
43
42
  "devDependencies": {
44
43
  "@commitlint/cli": "^19.5.0",
@@ -70,7 +69,7 @@
70
69
  "vitest": "^2.1.3"
71
70
  },
72
71
  "lint-staged": {
73
- "*.{ts}": [
72
+ "*.ts": [
74
73
  "yarn format:check",
75
74
  "yarn lint:fix",
76
75
  "yarn typecheck",
@@ -102,7 +102,7 @@ export default class EmbeddedComponent<V, O> {
102
102
  this.removeEmbed();
103
103
  this.iframe = document.createElement('iframe');
104
104
  this.iframe.src = this.url + (!modal ? '&embedded=true' : '');
105
- this.iframe.allow = 'web-share; clipboard-write';
105
+ this.iframe.allow = 'web-share; clipboard-write; hid; bluetooth;';
106
106
  this.iframe.style.width = '100%';
107
107
  this.iframe.style.height = '0px';
108
108
  this.iframe.style.border = 'none';
@@ -173,15 +173,21 @@ export default class EmbeddedComponent<V, O> {
173
173
  completion(): Promise<TransactionResponse<V>> {
174
174
  return new Promise((resolve, reject) => {
175
175
  let removeComplete: undefined | (() => void) = undefined;
176
+ let removeCancel: undefined | (() => void) = undefined;
176
177
  let removeError: undefined | (() => void) = undefined;
177
178
  function cleanup() {
178
179
  if (removeComplete) removeComplete();
180
+ if (removeCancel) removeCancel();
179
181
  if (removeError) removeError();
180
182
  }
181
183
  removeComplete = this.on(CMType.COMPLETE, (message) => {
182
184
  resolve((message as any).response);
183
185
  cleanup();
184
186
  });
187
+ removeCancel = this.on(CMType.CANCEL, () => {
188
+ reject(new Error('User cancelled'));
189
+ cleanup();
190
+ });
185
191
  removeError = this.on('error', (message) => {
186
192
  reject(new Error((message as any).message));
187
193
  cleanup();
@@ -193,7 +199,7 @@ export default class EmbeddedComponent<V, O> {
193
199
  * Opens the component in a modal dialog
194
200
  */
195
201
 
196
- openModal(): Promise<TransactionResponse<V>> {
202
+ async openModal(): Promise<TransactionResponse<V>> {
197
203
  if (this.modal) {
198
204
  this.closeModal();
199
205
  }
@@ -207,11 +213,11 @@ export default class EmbeddedComponent<V, O> {
207
213
 
208
214
  document.body.appendChild(this.modal);
209
215
  this.embed(this.modal, true);
210
- this.on(CMType.CANCEL, () => {
216
+ const removeCancel = this.on(CMType.CANCEL, () => {
211
217
  this.closeModal();
212
218
  });
213
219
 
214
- this.on(CMType.COMPLETE, () => {
220
+ const removeComplete = this.on(CMType.COMPLETE, () => {
215
221
  this.closeModal();
216
222
  });
217
223
 
@@ -220,8 +226,12 @@ export default class EmbeddedComponent<V, O> {
220
226
  // console.log('click');
221
227
  this.closeModal();
222
228
  });
223
- return this.completion();
229
+ return this.completion().finally(() => {
230
+ removeCancel();
231
+ removeComplete();
232
+ });
224
233
  }
234
+
225
235
  /**
226
236
  * Closes the modal dialog
227
237
  *
@@ -235,4 +245,38 @@ export default class EmbeddedComponent<V, O> {
235
245
  this.modal = undefined;
236
246
  }
237
247
  }
248
+
249
+ /**
250
+ * Opens the component in a popup window. This may be needed to support many self-hosted wallets
251
+ * @returns A promise that resolves with the transaction response
252
+ * @see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#restrictions)
253
+ * @see [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy)
254
+ */
255
+ async popup(): Promise<TransactionResponse<V>> {
256
+ const popup = window.open(
257
+ this.url,
258
+ '_blank',
259
+ 'popup=true,width=600,height=600',
260
+ );
261
+ window.addEventListener('message', (event: MessageEvent) => {
262
+ if (event.source !== popup) {
263
+ return;
264
+ }
265
+ console.log('received message from popup', event.data);
266
+ this.eventManager?.setPort(event.ports[0]);
267
+ });
268
+
269
+ const removeCancel = this.on(CMType.CANCEL, () => {
270
+ popup?.close();
271
+ });
272
+
273
+ const removeComplete = this.on(CMType.COMPLETE, () => {
274
+ popup?.close();
275
+ });
276
+
277
+ return this.completion().finally(() => {
278
+ removeCancel();
279
+ removeComplete();
280
+ });
281
+ }
238
282
  }