@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.
- package/README.md +24 -0
- package/dist/notabene.cjs +1 -1
- package/dist/notabene.d.ts +7 -0
- package/dist/notabene.js +101 -70
- package/docs/README.md +24 -0
- 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 +39 -16
- 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/enumerations/AgentType.md +2 -2
- package/docs/types/enumerations/CMType.md +6 -6
- 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 +12 -12
- 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 +7 -7
- 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 +1 -1
- 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/ResizeRequest.md +1 -1
- package/docs/types/type-aliases/Source.md +1 -1
- package/docs/types/type-aliases/Theme.md +1 -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 +3 -4
- package/src/components/EmbeddedComponent.ts +49 -5
- package/src/components/__tests__/EmbeddedComponent.test.ts +0 -530
package/README.md
CHANGED
|
@@ -207,6 +207,30 @@ try {
|
|
|
207
207
|
}
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
+
### Popup
|
|
211
|
+
|
|
212
|
+
All components support being opened in a popup window using `popup()`, which returns a promise.
|
|
213
|
+
|
|
214
|
+
Many embedded wallets refuse to work in an iframe. In this case it is better to use a popup window.
|
|
215
|
+
|
|
216
|
+
Unfortunately there are also some restrictions on popup windows:
|
|
217
|
+
|
|
218
|
+
- [Popup window Restrictions](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#restrictions)
|
|
219
|
+
|
|
220
|
+
* [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy)
|
|
221
|
+
|
|
222
|
+
```js
|
|
223
|
+
const withdrawal = notabene.createWithdrawalAssist(tx, options);
|
|
224
|
+
try {
|
|
225
|
+
const { valid, value, txCreate, ivms101, proof } = await withdrawal.popup();
|
|
226
|
+
if (valid) {
|
|
227
|
+
// Submit result to your backend
|
|
228
|
+
}
|
|
229
|
+
} catch (e) {
|
|
230
|
+
console.error(e);
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
210
234
|
### Linked Component
|
|
211
235
|
|
|
212
236
|
In some cases, in particular institutional or mobile apps you may prefer to link your customers to the component through an email or redirect the user to it in a mobile app.
|
package/dist/notabene.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var w=Object.defineProperty;var I=(t,e,r)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var o=(t,e,r)=>I(t,typeof e!="symbol"?e+"":e,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var c=(t=>(t.PRIVATE="WALLET",t.VASP="VASP",t))(c||{}),m=(t=>(t.NATURAL="natural",t.LEGAL="legal",t.SELF="self",t))(m||{}),u=(t=>(t.EMPTY="empty",t.VERIFY="verify",t.PENDING="pending",t.VERIFIED="verified",t.BANNED="banned",t))(u||{}),E=(t=>(t.ALLOWED="allowed",t.PENDING="pending",t))(E||{}),f=(t=>(t.ASSET="asset",t.DESTINATION="destination",t.COUNTERPARTY="counterparty",t.AGENT="agent",t))(f||{}),a=(t=>(t.COMPLETE="complete",t.RESIZE="resize",t.RESULT="result",t.INVALID="invalid",t.ERROR="error",t.CANCEL="cancel",t))(a||{}),d=(t=>(t.UPDATE="update",t.REQUEST_RESPONSE="requestResponse",t))(d||{}),p=(t=>(t.PENDING="pending",t.FAILED="rejected",t.FLAGGED="flagged",t.VERIFIED="verified",t))(p||{}),v=(t=>(t.SelfDeclaration="self-declaration",t.SIWE="siwe",t.SIWX="siwx",t.EIP191="eip-191",t.EIP712="eip-712",t.EIP1271="eip-1271",t.BIP137="bip-137",t.BIP137_XPUB="xpub",t.ED25519="ed25519",t.MicroTransfer="microtransfer",t.Screenshot="screenshot",t.Connect="connect",t))(v||{});class C{constructor(){o(this,"listeners",new Map);o(this,"port");this.handleMessage=this.handleMessage.bind(this)}setPort(e){this.port=e,this.port.onmessage=this.handleMessage,this.port.start()}on(e,r){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(r),()=>this.off(e,r)}off(e,r){const i=this.listeners.get(e);i&&(i.delete(r),i.size===0&&this.listeners.delete(e))}handleMessage(e){const r=e.data;if(typeof r=="object"&&r!==null&&"type"in r){const i=r.type,s=this.listeners.get(i);s&&s.forEach(n=>n(r))}}send(e){this.port&&this.port.postMessage(e)}}class g{constructor(e,r,i){o(this,"_url");o(this,"_value");o(this,"_options");o(this,"_errors",[]);o(this,"iframe");o(this,"eventManager");o(this,"modal");this._url=e,this._value=r,this._options=i,this.eventManager=new C,this.on(a.INVALID,s=>{s.type===a.INVALID&&(this._errors=s.errors,this._value=s.value)}),this.on(a.RESIZE,s=>{s.type===a.RESIZE&&this.iframe&&(this.iframe.style.height=`${s.height}px`)})}get url(){return this._url}get value(){return this._value}get options(){return this._options}get errors(){return this._errors}open(){document.location.href=this.url}mount(e){const r=document.querySelector(e);if(!r)throw new Error(`parentID ${e} not found`);this.embed(r)}embed(e,r=!1){var i,s;this.removeEmbed(),this.iframe=document.createElement("iframe"),this.iframe.src=this.url+(r?"":"&embedded=true"),this.iframe.allow="web-share; clipboard-write; hid; bluetooth;",this.iframe.style.width="100%",this.iframe.style.height="0px",this.iframe.style.border="none",this.iframe.style.overflow="hidden",this.iframe.scrolling="no",e.appendChild(this.iframe),window.addEventListener("message",n=>{var l,h;n.source===((l=this.iframe)==null?void 0:l.contentWindow)&&((h=this.eventManager)==null||h.setPort(n.ports[0]))}),(s=(i=this.iframe)==null?void 0:i.contentWindow)==null||s.focus()}removeEmbed(){this.iframe&&this.iframe.remove()}send(e){this.eventManager.send(e)}on(e,r){return this.eventManager.on(e,r)}off(e,r){this.eventManager.off(e,r)}update(e,r){this._value=e,r&&(this._options=r),this.send({type:d.UPDATE,value:e,options:this._options})}completion(){return new Promise((e,r)=>{let i,s,n;function l(){i&&i(),s&&s(),n&&n()}i=this.on(a.COMPLETE,h=>{e(h.response),l()}),s=this.on(a.CANCEL,()=>{r(new Error("User cancelled")),l()}),n=this.on("error",h=>{r(new Error(h.message)),l()})})}async openModal(){this.modal&&this.closeModal(),this.modal=document.createElement("dialog"),this.modal.style.border="none",this.modal.style.backgroundColor="white",this.modal.style.maxWidth="100vw",this.modal.style.maxHeight="100vh",this.modal.style.width="600px",this.modal.style.height="600px",document.body.appendChild(this.modal),this.embed(this.modal,!0);const e=this.on(a.CANCEL,()=>{this.closeModal()}),r=this.on(a.COMPLETE,()=>{this.closeModal()});return this.modal.showModal(),this.modal.addEventListener("click",()=>{this.closeModal()}),this.completion().finally(()=>{e(),r()})}closeModal(){var e;this.modal&&((e=this.modal)==null||e.close(),this.modal.remove(),this.modal=void 0)}async popup(){const e=window.open(this.url,"_blank","popup=true,width=600,height=600");window.addEventListener("message",s=>{var n;s.source===e&&(console.log("received message from popup",s.data),(n=this.eventManager)==null||n.setPort(s.ports[0]))});const r=this.on(a.CANCEL,()=>{e==null||e.close()}),i=this.on(a.COMPLETE,()=>{e==null||e.close()});return this.completion().finally(()=>{r(),i()})}}function b(t){return Object.entries(t).map(([e,r])=>{if(r==null)return;const i=encodeURIComponent(e),s=encodeURIComponent(typeof r=="object"?JSON.stringify(r):String(r));return`${i}=${s}`}).filter(e=>e!==void 0).join("&")}function U(t){const e=t.slice(1);return e?e.split("&").filter(Boolean).reduce((i,s)=>{const[n,l]=s.split("=");return n&&(i[decodeURIComponent(n)]=l?decodeURIComponent(l):""),i},{}):{}}class L{constructor(e){o(this,"nodeUrl");o(this,"authToken");o(this,"uxUrl");o(this,"theme");o(this,"locale");this.uxUrl=e.uxUrl||"https://connect.notabene.id",this.nodeUrl=e.nodeUrl,this.authToken=e.authToken,this.theme=e.theme,this.locale=e.locale}componentUrl(e,r,i,s){const n=new URL(this.uxUrl);n.pathname=e;const l=b({authToken:this.authToken,value:r,configuration:i});return n.hash=l,this.nodeUrl&&n.searchParams.set("nodeUrl",this.nodeUrl),this.theme&&n.searchParams.set("theme",JSON.stringify(this.theme)),this.locale&&n.searchParams.set("locale",this.locale),s&&(s.callback&&n.searchParams.set("callback_url",s.callback),s.redirectUri&&n.searchParams.set("redirect_uri",s.redirectUri)),n.toString()}createComponent(e,r,i,s){return new g(this.componentUrl(e,r,i,s),r,i)}createWithdrawalAssist(e,r,i){return this.createComponent("withdrawal-assist",e,r,i)}createConnectWallet(e,r,i){return this.createComponent("connect",e,r,i)}createDepositRequest(e,r,i){return this.createComponent("deposit-request",e,r,i)}}exports.AgentType=c;exports.CMType=a;exports.EmbeddedComponent=g;exports.HMType=d;exports.PersonType=m;exports.ProofStatus=p;exports.ProofTypes=v;exports.Status=u;exports.VASPSearchControl=E;exports.ValidationSections=f;exports.decodeFragmentToObject=U;exports.default=L;
|
package/dist/notabene.d.ts
CHANGED
|
@@ -524,6 +524,13 @@ export declare class EmbeddedComponent<V, O> {
|
|
|
524
524
|
*
|
|
525
525
|
*/
|
|
526
526
|
closeModal(): void;
|
|
527
|
+
/**
|
|
528
|
+
* Opens the component in a popup window. This may be needed to support many self-hosted wallets
|
|
529
|
+
* @returns A promise that resolves with the transaction response
|
|
530
|
+
* @see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#restrictions)
|
|
531
|
+
* @see [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy)
|
|
532
|
+
*/
|
|
533
|
+
popup(): Promise<TransactionResponse<V>>;
|
|
527
534
|
}
|
|
528
535
|
|
|
529
536
|
/**
|
package/dist/notabene.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var c = Object.defineProperty;
|
|
2
|
-
var m = (
|
|
3
|
-
var o = (
|
|
4
|
-
var u = /* @__PURE__ */ ((
|
|
5
|
-
class
|
|
2
|
+
var m = (t, e, r) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var o = (t, e, r) => m(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
var u = /* @__PURE__ */ ((t) => (t.PRIVATE = "WALLET", t.VASP = "VASP", t))(u || {}), E = /* @__PURE__ */ ((t) => (t.NATURAL = "natural", t.LEGAL = "legal", t.SELF = "self", t))(E || {}), f = /* @__PURE__ */ ((t) => (t.EMPTY = "empty", t.VERIFY = "verify", t.PENDING = "pending", t.VERIFIED = "verified", t.BANNED = "banned", t))(f || {}), p = /* @__PURE__ */ ((t) => (t.ALLOWED = "allowed", t.PENDING = "pending", t))(p || {}), v = /* @__PURE__ */ ((t) => (t.ASSET = "asset", t.DESTINATION = "destination", t.COUNTERPARTY = "counterparty", t.AGENT = "agent", t))(v || {}), h = /* @__PURE__ */ ((t) => (t.COMPLETE = "complete", t.RESIZE = "resize", t.RESULT = "result", t.INVALID = "invalid", t.ERROR = "error", t.CANCEL = "cancel", t))(h || {}), d = /* @__PURE__ */ ((t) => (t.UPDATE = "update", t.REQUEST_RESPONSE = "requestResponse", t))(d || {}), g = /* @__PURE__ */ ((t) => (t.PENDING = "pending", t.FAILED = "rejected", t.FLAGGED = "flagged", t.VERIFIED = "verified", t))(g || {}), w = /* @__PURE__ */ ((t) => (t.SelfDeclaration = "self-declaration", t.SIWE = "siwe", t.SIWX = "siwx", t.EIP191 = "eip-191", t.EIP712 = "eip-712", t.EIP1271 = "eip-1271", t.BIP137 = "bip-137", t.BIP137_XPUB = "xpub", t.ED25519 = "ed25519", t.MicroTransfer = "microtransfer", t.Screenshot = "screenshot", t.Connect = "connect", t))(w || {});
|
|
5
|
+
class I {
|
|
6
6
|
constructor() {
|
|
7
7
|
o(this, "listeners", /* @__PURE__ */ new Map());
|
|
8
8
|
o(this, "port");
|
|
@@ -16,8 +16,8 @@ class w {
|
|
|
16
16
|
*
|
|
17
17
|
* @param port - The MessagePort instance to use for communication
|
|
18
18
|
*/
|
|
19
|
-
setPort(
|
|
20
|
-
this.port =
|
|
19
|
+
setPort(e) {
|
|
20
|
+
this.port = e, this.port.onmessage = this.handleMessage, this.port.start();
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Registers a callback for a specific message type.
|
|
@@ -29,8 +29,8 @@ class w {
|
|
|
29
29
|
* @param callback - The callback function to execute when matching messages are received
|
|
30
30
|
|
|
31
31
|
*/
|
|
32
|
-
on(
|
|
33
|
-
return this.listeners.has(
|
|
32
|
+
on(e, r) {
|
|
33
|
+
return this.listeners.has(e) || this.listeners.set(e, /* @__PURE__ */ new Set()), this.listeners.get(e).add(r), () => this.off(e, r);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Removes a callback for a specific message type.
|
|
@@ -41,9 +41,9 @@ class w {
|
|
|
41
41
|
* @param messageType - The type of message to remove listener from
|
|
42
42
|
* @param callback - The callback function to remove
|
|
43
43
|
*/
|
|
44
|
-
off(
|
|
45
|
-
const i = this.listeners.get(
|
|
46
|
-
i && (i.delete(r), i.size === 0 && this.listeners.delete(
|
|
44
|
+
off(e, r) {
|
|
45
|
+
const i = this.listeners.get(e);
|
|
46
|
+
i && (i.delete(r), i.size === 0 && this.listeners.delete(e));
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Internal message handler for processing received messages.
|
|
@@ -53,8 +53,8 @@ class w {
|
|
|
53
53
|
*
|
|
54
54
|
* @param event - The message event containing the component message
|
|
55
55
|
*/
|
|
56
|
-
handleMessage(
|
|
57
|
-
const r =
|
|
56
|
+
handleMessage(e) {
|
|
57
|
+
const r = e.data;
|
|
58
58
|
if (typeof r == "object" && r !== null && "type" in r) {
|
|
59
59
|
const i = r.type, s = this.listeners.get(i);
|
|
60
60
|
s && s.forEach((n) => n(r));
|
|
@@ -64,17 +64,17 @@ class w {
|
|
|
64
64
|
* Sends a message through the message port
|
|
65
65
|
* @param message The host message to send
|
|
66
66
|
*/
|
|
67
|
-
send(
|
|
68
|
-
this.port && this.port.postMessage(
|
|
67
|
+
send(e) {
|
|
68
|
+
this.port && this.port.postMessage(e);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
class
|
|
71
|
+
class C {
|
|
72
72
|
/**
|
|
73
73
|
* Creates an instance of EmbeddedComponent.
|
|
74
74
|
* @param url - The URL of the embedded component
|
|
75
75
|
* @param value - The initial transaction value
|
|
76
76
|
*/
|
|
77
|
-
constructor(
|
|
77
|
+
constructor(e, r, i) {
|
|
78
78
|
o(this, "_url");
|
|
79
79
|
o(this, "_value");
|
|
80
80
|
o(this, "_options");
|
|
@@ -82,7 +82,7 @@ class U {
|
|
|
82
82
|
o(this, "iframe");
|
|
83
83
|
o(this, "eventManager");
|
|
84
84
|
o(this, "modal");
|
|
85
|
-
this._url =
|
|
85
|
+
this._url = e, this._value = r, this._options = i, this.eventManager = new I(), this.on(h.INVALID, (s) => {
|
|
86
86
|
s.type === h.INVALID && (this._errors = s.errors, this._value = s.value);
|
|
87
87
|
}), this.on(h.RESIZE, (s) => {
|
|
88
88
|
s.type === h.RESIZE && this.iframe && (this.iframe.style.height = `${s.height}px`);
|
|
@@ -119,18 +119,18 @@ class U {
|
|
|
119
119
|
* @param parentId - The ID of the parent element
|
|
120
120
|
* @throws Will throw an error if the parent element is not found
|
|
121
121
|
*/
|
|
122
|
-
mount(
|
|
123
|
-
const r = document.querySelector(
|
|
124
|
-
if (!r) throw new Error(`parentID ${
|
|
122
|
+
mount(e) {
|
|
123
|
+
const r = document.querySelector(e);
|
|
124
|
+
if (!r) throw new Error(`parentID ${e} not found`);
|
|
125
125
|
this.embed(r);
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
128
|
* Embeds the component into a parent element
|
|
129
129
|
* @param parent - The parent element to embed the component into
|
|
130
130
|
*/
|
|
131
|
-
embed(
|
|
131
|
+
embed(e, r = !1) {
|
|
132
132
|
var i, s;
|
|
133
|
-
this.removeEmbed(), this.iframe = document.createElement("iframe"), this.iframe.src = this.url + (r ? "" : "&embedded=true"), this.iframe.allow = "web-share; clipboard-write", this.iframe.style.width = "100%", this.iframe.style.height = "0px", this.iframe.style.border = "none", this.iframe.style.overflow = "hidden", this.iframe.scrolling = "no",
|
|
133
|
+
this.removeEmbed(), this.iframe = document.createElement("iframe"), this.iframe.src = this.url + (r ? "" : "&embedded=true"), this.iframe.allow = "web-share; clipboard-write; hid; bluetooth;", this.iframe.style.width = "100%", this.iframe.style.height = "0px", this.iframe.style.border = "none", this.iframe.style.overflow = "hidden", this.iframe.scrolling = "no", e.appendChild(this.iframe), window.addEventListener("message", (n) => {
|
|
134
134
|
var a, l;
|
|
135
135
|
n.source === ((a = this.iframe) == null ? void 0 : a.contentWindow) && ((l = this.eventManager) == null || l.setPort(n.ports[0]));
|
|
136
136
|
}), (s = (i = this.iframe) == null ? void 0 : i.contentWindow) == null || s.focus();
|
|
@@ -142,83 +142,114 @@ class U {
|
|
|
142
142
|
* Sends a message to the embedded component
|
|
143
143
|
* @param message - The message to send
|
|
144
144
|
*/
|
|
145
|
-
send(
|
|
146
|
-
this.eventManager.send(
|
|
145
|
+
send(e) {
|
|
146
|
+
this.eventManager.send(e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Adds an event listener for a specific message type
|
|
150
150
|
* @param messageType - The type of message to listen for
|
|
151
151
|
* @param callback - The callback function to execute when the message is received
|
|
152
152
|
*/
|
|
153
|
-
on(
|
|
154
|
-
return this.eventManager.on(
|
|
153
|
+
on(e, r) {
|
|
154
|
+
return this.eventManager.on(e, r);
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
157
|
* Removes an event listener for a specific message type
|
|
158
158
|
* @param messageType - The type of message to stop listening for
|
|
159
159
|
* @param callback - The callback function to remove
|
|
160
160
|
*/
|
|
161
|
-
off(
|
|
162
|
-
this.eventManager.off(
|
|
161
|
+
off(e, r) {
|
|
162
|
+
this.eventManager.off(e, r);
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
165
|
* Updates the transaction value and sends an update message to the component
|
|
166
166
|
* @param value - The new transaction value
|
|
167
167
|
*/
|
|
168
|
-
update(
|
|
169
|
-
this._value =
|
|
168
|
+
update(e, r) {
|
|
169
|
+
this._value = e, r && (this._options = r), this.send({ type: d.UPDATE, value: e, options: this._options });
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
172
|
* Waits for the component to complete and returns the transaction response
|
|
173
173
|
* @returns A promise that resolves with the transaction response
|
|
174
174
|
*/
|
|
175
175
|
completion() {
|
|
176
|
-
return new Promise((
|
|
177
|
-
let i, s;
|
|
178
|
-
function
|
|
179
|
-
i && i(), s && s();
|
|
176
|
+
return new Promise((e, r) => {
|
|
177
|
+
let i, s, n;
|
|
178
|
+
function a() {
|
|
179
|
+
i && i(), s && s(), n && n();
|
|
180
180
|
}
|
|
181
|
-
i = this.on(h.COMPLETE, (
|
|
182
|
-
|
|
183
|
-
}), s = this.on(
|
|
184
|
-
r(new Error(
|
|
181
|
+
i = this.on(h.COMPLETE, (l) => {
|
|
182
|
+
e(l.response), a();
|
|
183
|
+
}), s = this.on(h.CANCEL, () => {
|
|
184
|
+
r(new Error("User cancelled")), a();
|
|
185
|
+
}), n = this.on("error", (l) => {
|
|
186
|
+
r(new Error(l.message)), a();
|
|
185
187
|
});
|
|
186
188
|
});
|
|
187
189
|
}
|
|
188
190
|
/**
|
|
189
191
|
* Opens the component in a modal dialog
|
|
190
192
|
*/
|
|
191
|
-
openModal() {
|
|
192
|
-
|
|
193
|
+
async openModal() {
|
|
194
|
+
this.modal && this.closeModal(), this.modal = document.createElement("dialog"), this.modal.style.border = "none", this.modal.style.backgroundColor = "white", this.modal.style.maxWidth = "100vw", this.modal.style.maxHeight = "100vh", this.modal.style.width = "600px", this.modal.style.height = "600px", document.body.appendChild(this.modal), this.embed(this.modal, !0);
|
|
195
|
+
const e = this.on(h.CANCEL, () => {
|
|
193
196
|
this.closeModal();
|
|
194
|
-
}), this.on(h.COMPLETE, () => {
|
|
197
|
+
}), r = this.on(h.COMPLETE, () => {
|
|
195
198
|
this.closeModal();
|
|
196
|
-
})
|
|
199
|
+
});
|
|
200
|
+
return this.modal.showModal(), this.modal.addEventListener("click", () => {
|
|
197
201
|
this.closeModal();
|
|
198
|
-
}), this.completion()
|
|
202
|
+
}), this.completion().finally(() => {
|
|
203
|
+
e(), r();
|
|
204
|
+
});
|
|
199
205
|
}
|
|
200
206
|
/**
|
|
201
207
|
* Closes the modal dialog
|
|
202
208
|
*
|
|
203
209
|
*/
|
|
204
210
|
closeModal() {
|
|
205
|
-
var
|
|
206
|
-
this.modal && ((
|
|
211
|
+
var e;
|
|
212
|
+
this.modal && ((e = this.modal) == null || e.close(), this.modal.remove(), this.modal = void 0);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Opens the component in a popup window. This may be needed to support many self-hosted wallets
|
|
216
|
+
* @returns A promise that resolves with the transaction response
|
|
217
|
+
* @see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#restrictions)
|
|
218
|
+
* @see [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy)
|
|
219
|
+
*/
|
|
220
|
+
async popup() {
|
|
221
|
+
const e = window.open(
|
|
222
|
+
this.url,
|
|
223
|
+
"_blank",
|
|
224
|
+
"popup=true,width=600,height=600"
|
|
225
|
+
);
|
|
226
|
+
window.addEventListener("message", (s) => {
|
|
227
|
+
var n;
|
|
228
|
+
s.source === e && (console.log("received message from popup", s.data), (n = this.eventManager) == null || n.setPort(s.ports[0]));
|
|
229
|
+
});
|
|
230
|
+
const r = this.on(h.CANCEL, () => {
|
|
231
|
+
e == null || e.close();
|
|
232
|
+
}), i = this.on(h.COMPLETE, () => {
|
|
233
|
+
e == null || e.close();
|
|
234
|
+
});
|
|
235
|
+
return this.completion().finally(() => {
|
|
236
|
+
r(), i();
|
|
237
|
+
});
|
|
207
238
|
}
|
|
208
239
|
}
|
|
209
|
-
function
|
|
210
|
-
return Object.entries(
|
|
240
|
+
function U(t) {
|
|
241
|
+
return Object.entries(t).map(([e, r]) => {
|
|
211
242
|
if (r == null) return;
|
|
212
|
-
const i = encodeURIComponent(
|
|
243
|
+
const i = encodeURIComponent(e), s = encodeURIComponent(
|
|
213
244
|
typeof r == "object" ? JSON.stringify(r) : String(r)
|
|
214
245
|
// Use String() to handle all primitive types
|
|
215
246
|
);
|
|
216
247
|
return `${i}=${s}`;
|
|
217
|
-
}).filter((
|
|
248
|
+
}).filter((e) => e !== void 0).join("&");
|
|
218
249
|
}
|
|
219
|
-
function
|
|
220
|
-
const
|
|
221
|
-
return
|
|
250
|
+
function b(t) {
|
|
251
|
+
const e = t.slice(1);
|
|
252
|
+
return e ? e.split("&").filter(Boolean).reduce(
|
|
222
253
|
(i, s) => {
|
|
223
254
|
const [n, a] = s.split("=");
|
|
224
255
|
return n && (i[decodeURIComponent(n)] = a ? decodeURIComponent(a) : ""), i;
|
|
@@ -232,13 +263,13 @@ class N {
|
|
|
232
263
|
*
|
|
233
264
|
* @param config - Configuration options for the Notabene SDK
|
|
234
265
|
*/
|
|
235
|
-
constructor(
|
|
266
|
+
constructor(e) {
|
|
236
267
|
o(this, "nodeUrl");
|
|
237
268
|
o(this, "authToken");
|
|
238
269
|
o(this, "uxUrl");
|
|
239
270
|
o(this, "theme");
|
|
240
271
|
o(this, "locale");
|
|
241
|
-
this.uxUrl =
|
|
272
|
+
this.uxUrl = e.uxUrl || "https://connect.notabene.id", this.nodeUrl = e.nodeUrl, this.authToken = e.authToken, this.theme = e.theme, this.locale = e.locale;
|
|
242
273
|
}
|
|
243
274
|
/**
|
|
244
275
|
* Generates a URL for a Notabene component
|
|
@@ -250,10 +281,10 @@ class N {
|
|
|
250
281
|
* @returns component URL
|
|
251
282
|
* @internal
|
|
252
283
|
*/
|
|
253
|
-
componentUrl(
|
|
284
|
+
componentUrl(e, r, i, s) {
|
|
254
285
|
const n = new URL(this.uxUrl);
|
|
255
|
-
n.pathname =
|
|
256
|
-
const a =
|
|
286
|
+
n.pathname = e;
|
|
287
|
+
const a = U({
|
|
257
288
|
authToken: this.authToken,
|
|
258
289
|
value: r,
|
|
259
290
|
configuration: i
|
|
@@ -270,9 +301,9 @@ class N {
|
|
|
270
301
|
* @returns A new EmbeddedComponent instance
|
|
271
302
|
* @internal
|
|
272
303
|
*/
|
|
273
|
-
createComponent(
|
|
274
|
-
return new
|
|
275
|
-
this.componentUrl(
|
|
304
|
+
createComponent(e, r, i, s) {
|
|
305
|
+
return new C(
|
|
306
|
+
this.componentUrl(e, r, i, s),
|
|
276
307
|
r,
|
|
277
308
|
i
|
|
278
309
|
);
|
|
@@ -285,10 +316,10 @@ class N {
|
|
|
285
316
|
* @param callbacks - Optional callback configuration
|
|
286
317
|
* @returns A new EmbeddedComponent instance for withdrawal assistance
|
|
287
318
|
*/
|
|
288
|
-
createWithdrawalAssist(
|
|
319
|
+
createWithdrawalAssist(e, r, i) {
|
|
289
320
|
return this.createComponent(
|
|
290
321
|
"withdrawal-assist",
|
|
291
|
-
|
|
322
|
+
e,
|
|
292
323
|
r,
|
|
293
324
|
i
|
|
294
325
|
);
|
|
@@ -302,10 +333,10 @@ class N {
|
|
|
302
333
|
* @returns A new EmbeddedComponent instance for connection
|
|
303
334
|
* @alpha
|
|
304
335
|
*/
|
|
305
|
-
createConnectWallet(
|
|
336
|
+
createConnectWallet(e, r, i) {
|
|
306
337
|
return this.createComponent(
|
|
307
338
|
"connect",
|
|
308
|
-
|
|
339
|
+
e,
|
|
309
340
|
r,
|
|
310
341
|
i
|
|
311
342
|
);
|
|
@@ -319,10 +350,10 @@ class N {
|
|
|
319
350
|
* @returns A new EmbeddedComponent instance for deposit requests
|
|
320
351
|
* @public
|
|
321
352
|
*/
|
|
322
|
-
createDepositRequest(
|
|
353
|
+
createDepositRequest(e, r, i) {
|
|
323
354
|
return this.createComponent(
|
|
324
355
|
"deposit-request",
|
|
325
|
-
|
|
356
|
+
e,
|
|
326
357
|
r,
|
|
327
358
|
i
|
|
328
359
|
);
|
|
@@ -331,14 +362,14 @@ class N {
|
|
|
331
362
|
export {
|
|
332
363
|
u as AgentType,
|
|
333
364
|
h as CMType,
|
|
334
|
-
|
|
365
|
+
C as EmbeddedComponent,
|
|
335
366
|
d as HMType,
|
|
336
367
|
E as PersonType,
|
|
337
368
|
g as ProofStatus,
|
|
338
|
-
|
|
369
|
+
w as ProofTypes,
|
|
339
370
|
f as Status,
|
|
340
371
|
p as VASPSearchControl,
|
|
341
372
|
v as ValidationSections,
|
|
342
|
-
|
|
373
|
+
b as decodeFragmentToObject,
|
|
343
374
|
N as default
|
|
344
375
|
};
|
package/docs/README.md
CHANGED
|
@@ -211,6 +211,30 @@ try {
|
|
|
211
211
|
}
|
|
212
212
|
```
|
|
213
213
|
|
|
214
|
+
### Popup
|
|
215
|
+
|
|
216
|
+
All components support being opened in a popup window using `popup()`, which returns a promise.
|
|
217
|
+
|
|
218
|
+
Many embedded wallets refuse to work in an iframe. In this case it is better to use a popup window.
|
|
219
|
+
|
|
220
|
+
Unfortunately there are also some restrictions on popup windows:
|
|
221
|
+
|
|
222
|
+
- [Popup window Restrictions](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#restrictions)
|
|
223
|
+
|
|
224
|
+
* [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy)
|
|
225
|
+
|
|
226
|
+
```js
|
|
227
|
+
const withdrawal = notabene.createWithdrawalAssist(tx, options);
|
|
228
|
+
try {
|
|
229
|
+
const { valid, value, txCreate, ivms101, proof } = await withdrawal.popup();
|
|
230
|
+
if (valid) {
|
|
231
|
+
// Submit result to your backend
|
|
232
|
+
}
|
|
233
|
+
} catch (e) {
|
|
234
|
+
console.error(e);
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
214
238
|
### Linked Component
|
|
215
239
|
|
|
216
240
|
In some cases, in particular institutional or mobile apps you may prefer to link your customers to the component through an email or redirect the user to it in a mobile app.
|
|
@@ -16,7 +16,7 @@ Configuration options for Transaction components
|
|
|
16
16
|
|
|
17
17
|
#### Defined in
|
|
18
18
|
|
|
19
|
-
[types.ts:768](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
19
|
+
[types.ts:768](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L768)
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ Configuration options for Transaction components
|
|
|
26
26
|
|
|
27
27
|
#### Defined in
|
|
28
28
|
|
|
29
|
-
[types.ts:769](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
29
|
+
[types.ts:769](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L769)
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ Configuration options for Transaction components
|
|
|
36
36
|
|
|
37
37
|
#### Defined in
|
|
38
38
|
|
|
39
|
-
[types.ts:770](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
39
|
+
[types.ts:770](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L770)
|
|
40
40
|
|
|
41
41
|
***
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ Configuration options for Transaction components
|
|
|
46
46
|
|
|
47
47
|
#### Defined in
|
|
48
48
|
|
|
49
|
-
[types.ts:772](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
49
|
+
[types.ts:772](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L772)
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
@@ -80,7 +80,7 @@ Configuration options for Transaction components
|
|
|
80
80
|
|
|
81
81
|
#### Defined in
|
|
82
82
|
|
|
83
|
-
[types.ts:759](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
83
|
+
[types.ts:759](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L759)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
@@ -90,4 +90,4 @@ Configuration options for Transaction components
|
|
|
90
90
|
|
|
91
91
|
#### Defined in
|
|
92
92
|
|
|
93
|
-
[types.ts:771](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
93
|
+
[types.ts:771](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/types.ts#L771)
|
|
@@ -18,7 +18,7 @@ Published May 2020
|
|
|
18
18
|
|
|
19
19
|
#### Defined in
|
|
20
20
|
|
|
21
|
-
[ivms/types.ts:365](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
21
|
+
[ivms/types.ts:365](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L365)
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
@@ -30,4 +30,4 @@ Published August 2023
|
|
|
30
30
|
|
|
31
31
|
#### Defined in
|
|
32
32
|
|
|
33
|
-
[ivms/types.ts:367](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
33
|
+
[ivms/types.ts:367](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L367)
|
|
@@ -19,7 +19,7 @@ The version of IVMS 101 to which the payload complies.
|
|
|
19
19
|
|
|
20
20
|
#### Defined in
|
|
21
21
|
|
|
22
|
-
[ivms/types.ts:358](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
22
|
+
[ivms/types.ts:358](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L358)
|
|
23
23
|
|
|
24
24
|
***
|
|
25
25
|
|
|
@@ -31,4 +31,4 @@ The method used to map from a national system of writing to Latin script.
|
|
|
31
31
|
|
|
32
32
|
#### Defined in
|
|
33
33
|
|
|
34
|
-
[ivms/types.ts:356](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
34
|
+
[ivms/types.ts:356](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L356)
|
|
@@ -111,4 +111,4 @@ Name of a built-up area, with defined boundaries, and a local government.
|
|
|
111
111
|
|
|
112
112
|
## Defined in
|
|
113
113
|
|
|
114
|
-
[ivms/types.ts:119](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
114
|
+
[ivms/types.ts:119](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L119)
|
|
@@ -13,4 +13,4 @@ Specifies the type of address
|
|
|
13
13
|
|
|
14
14
|
## Defined in
|
|
15
15
|
|
|
16
|
-
[ivms/types.ts:44](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
16
|
+
[ivms/types.ts:44](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L44)
|
|
@@ -27,4 +27,4 @@ Array of persons associated with the beneficiary
|
|
|
27
27
|
|
|
28
28
|
## Defined in
|
|
29
29
|
|
|
30
|
-
[ivms/types.ts:313](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
30
|
+
[ivms/types.ts:313](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L313)
|
|
@@ -21,4 +21,4 @@ The beneficiary VASP information
|
|
|
21
21
|
|
|
22
22
|
## Defined in
|
|
23
23
|
|
|
24
|
-
[ivms/types.ts:335](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
24
|
+
[ivms/types.ts:335](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L335)
|
|
@@ -27,4 +27,4 @@ Place of birth (max 70 characters)
|
|
|
27
27
|
|
|
28
28
|
## Defined in
|
|
29
29
|
|
|
30
|
-
[ivms/types.ts:107](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
30
|
+
[ivms/types.ts:107](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L107)
|
|
@@ -19,4 +19,4 @@ ISO-3166 Alpha-2 country code
|
|
|
19
19
|
|
|
20
20
|
## Defined in
|
|
21
21
|
|
|
22
|
-
[ivms/types.ts:6](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
22
|
+
[ivms/types.ts:6](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L6)
|
|
@@ -20,4 +20,4 @@ Format: YYYY-MM-DD
|
|
|
20
20
|
|
|
21
21
|
## Defined in
|
|
22
22
|
|
|
23
|
-
[ivms/types.ts:14](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
23
|
+
[ivms/types.ts:14](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L14)
|
|
@@ -38,4 +38,4 @@ IVMS101 definition
|
|
|
38
38
|
|
|
39
39
|
## Defined in
|
|
40
40
|
|
|
41
|
-
[ivms/types.ts:375](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
41
|
+
[ivms/types.ts:375](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L375)
|
|
@@ -27,4 +27,4 @@ The sequence number of this VASP in the transfer path
|
|
|
27
27
|
|
|
28
28
|
## Defined in
|
|
29
29
|
|
|
30
|
-
[ivms/types.ts:289](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
30
|
+
[ivms/types.ts:289](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L289)
|
|
@@ -45,4 +45,4 @@ A distinct identifier used by governments to uniquely identify a legal person
|
|
|
45
45
|
|
|
46
46
|
## Defined in
|
|
47
47
|
|
|
48
|
-
[ivms/types.ts:259](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/
|
|
48
|
+
[ivms/types.ts:259](https://gitlab.com/notabene/open-source/javascript-sdk/-/blob/b96e93a9ac6866b8a0b255ba13ff93325934bfae/src/ivms/types.ts#L259)
|