@notabene/javascript-sdk 2.14.0 → 2.14.1-next.1

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.
@@ -1,8 +1,8 @@
1
- var C = Object.defineProperty;
2
- var R = (e, t, n) => t in e ? C(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var c = (e, t, n) => R(e, typeof t != "symbol" ? t + "" : t, n);
4
- var S = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(S || {}), I = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(I || {}), _ = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(_ || {}), O = /* @__PURE__ */ ((e) => (e.ALLOWED = "allowed", e.PENDING = "pending", e))(O || {}), T = /* @__PURE__ */ ((e) => (e.SMS = "sms", e.EMAIL = "email", e))(T || {}), D = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.APPROVED = "approved", e.FAILED = "failed", e.EXPIRED = "expired", e.MAX_ATTEMPTS_REACHED = "max_attempts_reached", e.UNREACHABLE = "unreachable", e))(D || {}), U = /* @__PURE__ */ ((e) => (e.COINBASE = "coinbase", e))(U || {}), x = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(x || {}), l = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e.WARNING = "warning", e.INFO = "info", e))(l || {}), M = /* @__PURE__ */ ((e) => (e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", e.WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", e.TOKEN_INVALID = "TOKEN_INVALID", e))(M || {}), V = /* @__PURE__ */ ((e) => (e.WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", e.WALLET_LOCKED = "WALLET_LOCKED", e.WALLET_UNREACHABLE = "WALLET_UNREACHABLE", e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", e.IDV_UNAVAILABLE = "IDV_UNAVAILABLE", e))(V || {}), y = /* @__PURE__ */ ((e) => (e.UPDATE = "update", e.REQUEST_RESPONSE = "requestResponse", e))(y || {}), B = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.FAILED = "rejected", e.FLAGGED = "flagged", e.VERIFIED = "verified", e))(B || {}), W = /* @__PURE__ */ ((e) => (e.SelfDeclaration = "self-declaration", e.SIWE = "siwe", e.SIWX = "siwx", e.SOL_SIWX = "sol-siwx", e.EIP191 = "eip-191", e.EIP712 = "eip-712", e.EIP1271 = "eip-1271", e.BIP137 = "bip-137", e.BIP322 = "bip-322", e.BIP137_XPUB = "xpub", e.TIP191 = "tip-191", e.ED25519 = "ed25519", e.XRP_ED25519 = "xrp-ed25519", e.XLM_ED25519 = "xlm-ed25519", e.CIP8 = "cip-8", e.COSMOS = "cosmos-ecdsa", e.MicroTransfer = "microtransfer", e.Screenshot = "screenshot", e.Connect = "connect", e.CONCORDIUM = "concordium", e))(W || {});
5
- class k {
1
+ var D = Object.defineProperty;
2
+ var U = (e, t, r) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var c = (e, t, r) => U(e, typeof t != "symbol" ? t + "" : t, r);
4
+ var x = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(x || {}), p = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(p || {}), M = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(M || {}), V = /* @__PURE__ */ ((e) => (e.ALLOWED = "allowed", e.PENDING = "pending", e))(V || {}), W = /* @__PURE__ */ ((e) => (e.SMS = "sms", e.EMAIL = "email", e))(W || {}), k = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.APPROVED = "approved", e.FAILED = "failed", e.EXPIRED = "expired", e.MAX_ATTEMPTS_REACHED = "max_attempts_reached", e.UNREACHABLE = "unreachable", e))(k || {}), B = /* @__PURE__ */ ((e) => (e.COINBASE = "coinbase", e))(B || {}), F = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(F || {}), u = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e.WARNING = "warning", e.INFO = "info", e))(u || {}), J = /* @__PURE__ */ ((e) => (e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", e.WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", e.TOKEN_INVALID = "TOKEN_INVALID", e))(J || {}), $ = /* @__PURE__ */ ((e) => (e.WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", e.WALLET_LOCKED = "WALLET_LOCKED", e.WALLET_UNREACHABLE = "WALLET_UNREACHABLE", e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", e.IDV_UNAVAILABLE = "IDV_UNAVAILABLE", e))($ || {}), S = /* @__PURE__ */ ((e) => (e.UPDATE = "update", e.REQUEST_RESPONSE = "requestResponse", e))(S || {}), j = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.FAILED = "rejected", e.FLAGGED = "flagged", e.VERIFIED = "verified", e))(j || {}), G = /* @__PURE__ */ ((e) => (e.SelfDeclaration = "self-declaration", e.SIWE = "siwe", e.SIWX = "siwx", e.SOL_SIWX = "sol-siwx", e.EIP191 = "eip-191", e.EIP712 = "eip-712", e.EIP1271 = "eip-1271", e.BIP137 = "bip-137", e.BIP322 = "bip-322", e.TIP191 = "tip-191", e.ED25519 = "ed25519", e.XRP_ED25519 = "xrp-ed25519", e.XLM_ED25519 = "xlm-ed25519", e.CIP8 = "cip-8", e.COSMOS = "cosmos-ecdsa", e.MicroTransfer = "microtransfer", e.Screenshot = "screenshot", e.Connect = "connect", e.CONCORDIUM = "concordium", e))(G || {});
5
+ class q {
6
6
  constructor() {
7
7
  c(this, "listeners", /* @__PURE__ */ new Map());
8
8
  c(this, "port");
@@ -29,8 +29,8 @@ class k {
29
29
  * @param callback - The callback function to execute when matching messages are received
30
30
 
31
31
  */
32
- on(t, n) {
33
- return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(n), () => this.off(t, n);
32
+ on(t, r) {
33
+ return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(r), () => this.off(t, r);
34
34
  }
35
35
  /**
36
36
  * Removes a callback for a specific message type.
@@ -41,9 +41,9 @@ class k {
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(t, n) {
45
- const r = this.listeners.get(t);
46
- r && (r.delete(n), r.size === 0 && this.listeners.delete(t));
44
+ off(t, r) {
45
+ const n = this.listeners.get(t);
46
+ n && (n.delete(r), n.size === 0 && this.listeners.delete(t));
47
47
  }
48
48
  /**
49
49
  * Internal message handler for processing received messages.
@@ -54,10 +54,10 @@ class k {
54
54
  * @param event - The message event containing the component message
55
55
  */
56
56
  handleMessage(t) {
57
- const n = t.data;
58
- if (typeof n == "object" && n !== null && "type" in n) {
59
- const r = n.type, i = this.listeners.get(r);
60
- i && i.forEach((o) => o(n));
57
+ const r = t.data;
58
+ if (typeof r == "object" && r !== null && "type" in r) {
59
+ const n = r.type, i = this.listeners.get(n);
60
+ i && i.forEach((o) => o(r));
61
61
  }
62
62
  }
63
63
  /**
@@ -68,13 +68,13 @@ class k {
68
68
  this.port && this.port.postMessage(t);
69
69
  }
70
70
  }
71
- class J {
71
+ class K {
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(t, n, r) {
77
+ constructor(t, r, n) {
78
78
  c(this, "_url");
79
79
  c(this, "_value");
80
80
  c(this, "_options");
@@ -82,10 +82,10 @@ class J {
82
82
  c(this, "iframe");
83
83
  c(this, "eventManager");
84
84
  c(this, "modal");
85
- this._url = t, this._value = n, this._options = r, this.eventManager = new k(), this.on(l.INVALID, (i) => {
86
- i.type === l.INVALID && (this._errors = i.errors, this._value = i.value);
87
- }), this.on(l.RESIZE, (i) => {
88
- i.type === l.RESIZE && this.iframe && (this.iframe.style.height = `${i.height}px`);
85
+ this._url = t, this._value = r, this._options = n, this.eventManager = new q(), this.on(u.INVALID, (i) => {
86
+ i.type === u.INVALID && (this._errors = i.errors, this._value = i.value);
87
+ }), this.on(u.RESIZE, (i) => {
88
+ i.type === u.RESIZE && this.iframe && (this.iframe.style.height = `${i.height}px`);
89
89
  });
90
90
  }
91
91
  /**
@@ -120,20 +120,20 @@ class J {
120
120
  * @throws Will throw an error if the parent element is not found
121
121
  */
122
122
  mount(t) {
123
- const n = document.querySelector(t);
124
- if (!n) throw new Error(`parentID ${t} not found`);
125
- this.embed(n);
123
+ const r = document.querySelector(t);
124
+ if (!r) throw new Error(`parentID ${t} not found`);
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(t, n = !1) {
132
- var r, i;
133
- this.removeEmbed(), this.iframe = document.createElement("iframe"), this.iframe.src = this.url + (n ? "" : "&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", t.appendChild(this.iframe), window.addEventListener("message", (o) => {
131
+ embed(t, r = !1) {
132
+ var n, i;
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", t.appendChild(this.iframe), window.addEventListener("message", (o) => {
134
134
  var s, a;
135
135
  o.source === ((s = this.iframe) == null ? void 0 : s.contentWindow) && ((a = this.eventManager) == null || a.setPort(o.ports[0]));
136
- }), (i = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || i.focus();
136
+ }), (i = (n = this.iframe) == null ? void 0 : n.contentWindow) == null || i.focus();
137
137
  }
138
138
  removeEmbed() {
139
139
  this.iframe && this.iframe.remove();
@@ -150,40 +150,40 @@ class J {
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(t, n) {
154
- return this.eventManager.on(t, n);
153
+ on(t, r) {
154
+ return this.eventManager.on(t, 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(t, n) {
162
- this.eventManager.off(t, n);
161
+ off(t, r) {
162
+ this.eventManager.off(t, 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(t, n) {
169
- this._value = t, n && (this._options = n), this.send({ type: y.UPDATE, value: t, options: this._options });
168
+ update(t, r) {
169
+ this._value = t, r && (this._options = r), this.send({ type: S.UPDATE, value: t, 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((t, n) => {
177
- let r, i, o;
176
+ return new Promise((t, r) => {
177
+ let n, i, o;
178
178
  function s() {
179
- r && r(), i && i(), o && o();
179
+ n && n(), i && i(), o && o();
180
180
  }
181
- r = this.on(l.COMPLETE, (a) => {
181
+ n = this.on(u.COMPLETE, (a) => {
182
182
  t(a.response), s();
183
- }), i = this.on(l.CANCEL, () => {
184
- n(new Error("User cancelled")), s();
183
+ }), i = this.on(u.CANCEL, () => {
184
+ r(new Error("User cancelled")), s();
185
185
  }), o = this.on("error", (a) => {
186
- n(new Error(a.message)), s();
186
+ r(new Error(a.message)), s();
187
187
  });
188
188
  });
189
189
  }
@@ -192,15 +192,15 @@ class J {
192
192
  */
193
193
  async openModal() {
194
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 t = this.on(l.CANCEL, () => {
195
+ const t = this.on(u.CANCEL, () => {
196
196
  this.closeModal();
197
- }), n = this.on(l.COMPLETE, () => {
197
+ }), r = this.on(u.COMPLETE, () => {
198
198
  this.closeModal();
199
199
  });
200
200
  return this.modal.showModal(), this.modal.addEventListener("click", () => {
201
201
  this.closeModal();
202
202
  }), this.completion().finally(() => {
203
- t(), n();
203
+ t(), r();
204
204
  });
205
205
  }
206
206
  /**
@@ -227,80 +227,80 @@ class J {
227
227
  var o;
228
228
  i.source === t && (console.log("received message from popup", i.data), (o = this.eventManager) == null || o.setPort(i.ports[0]));
229
229
  });
230
- const n = this.on(l.CANCEL, () => {
230
+ const r = this.on(u.CANCEL, () => {
231
231
  t == null || t.close();
232
- }), r = this.on(l.COMPLETE, () => {
232
+ }), n = this.on(u.COMPLETE, () => {
233
233
  t == null || t.close();
234
234
  });
235
235
  return this.completion().finally(() => {
236
- n(), r();
236
+ r(), n();
237
237
  });
238
238
  }
239
239
  }
240
- function j(e) {
241
- return Object.entries(e).map(([t, n]) => {
242
- if (n == null) return;
243
- const r = encodeURIComponent(t), i = encodeURIComponent(
244
- typeof n == "object" ? JSON.stringify(n) : String(n)
240
+ function H(e) {
241
+ return Object.entries(e).map(([t, r]) => {
242
+ if (r == null) return;
243
+ const n = encodeURIComponent(t), i = encodeURIComponent(
244
+ typeof r == "object" ? JSON.stringify(r) : String(r)
245
245
  // Use String() to handle all primitive types
246
246
  );
247
- return `${r}=${i}`;
247
+ return `${n}=${i}`;
248
248
  }).filter((t) => t !== void 0).join("&");
249
249
  }
250
- function ie(e) {
250
+ function de(e) {
251
251
  const t = e.slice(1);
252
252
  return t ? t.split("&").filter(Boolean).reduce(
253
- (r, i) => {
253
+ (n, i) => {
254
254
  const [o, s] = i.split("=");
255
- return o && (r[decodeURIComponent(o)] = s ? decodeURIComponent(s) : ""), r;
255
+ return o && (n[decodeURIComponent(o)] = s ? decodeURIComponent(s) : ""), n;
256
256
  },
257
257
  {}
258
258
  ) : {};
259
259
  }
260
260
  new TextEncoder();
261
- const f = new TextDecoder();
262
- function F(e) {
261
+ const b = new TextDecoder();
262
+ function X(e) {
263
263
  if (Uint8Array.fromBase64)
264
264
  return Uint8Array.fromBase64(e);
265
- const t = atob(e), n = new Uint8Array(t.length);
266
- for (let r = 0; r < t.length; r++)
267
- n[r] = t.charCodeAt(r);
268
- return n;
265
+ const t = atob(e), r = new Uint8Array(t.length);
266
+ for (let n = 0; n < t.length; n++)
267
+ r[n] = t.charCodeAt(n);
268
+ return r;
269
269
  }
270
- function G(e) {
270
+ function z(e) {
271
271
  if (Uint8Array.fromBase64)
272
- return Uint8Array.fromBase64(typeof e == "string" ? e : f.decode(e), {
272
+ return Uint8Array.fromBase64(typeof e == "string" ? e : b.decode(e), {
273
273
  alphabet: "base64url"
274
274
  });
275
275
  let t = e;
276
- t instanceof Uint8Array && (t = f.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
276
+ t instanceof Uint8Array && (t = b.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
277
277
  try {
278
- return F(t);
278
+ return X(t);
279
279
  } catch {
280
280
  throw new TypeError("The input to be decoded is not correctly encoded.");
281
281
  }
282
282
  }
283
- class w extends Error {
284
- constructor(n, r) {
283
+ class R extends Error {
284
+ constructor(r, n) {
285
285
  var i;
286
- super(n, r);
286
+ super(r, n);
287
287
  c(this, "code", "ERR_JOSE_GENERIC");
288
288
  this.name = this.constructor.name, (i = Error.captureStackTrace) == null || i.call(Error, this, this.constructor);
289
289
  }
290
290
  }
291
- c(w, "code", "ERR_JOSE_GENERIC");
292
- class u extends w {
291
+ c(R, "code", "ERR_JOSE_GENERIC");
292
+ class h extends R {
293
293
  constructor() {
294
294
  super(...arguments);
295
295
  c(this, "code", "ERR_JWT_INVALID");
296
296
  }
297
297
  }
298
- c(u, "code", "ERR_JWT_INVALID");
299
- function $(e) {
298
+ c(h, "code", "ERR_JWT_INVALID");
299
+ function Y(e) {
300
300
  return typeof e == "object" && e !== null;
301
301
  }
302
- const q = (e) => {
303
- if (!$(e) || Object.prototype.toString.call(e) !== "[object Object]")
302
+ const Q = (e) => {
303
+ if (!Y(e) || Object.prototype.toString.call(e) !== "[object Object]")
304
304
  return !1;
305
305
  if (Object.getPrototypeOf(e) === null)
306
306
  return !0;
@@ -309,33 +309,39 @@ const q = (e) => {
309
309
  t = Object.getPrototypeOf(t);
310
310
  return Object.getPrototypeOf(e) === t;
311
311
  };
312
- function K(e) {
312
+ function Z(e) {
313
313
  if (typeof e != "string")
314
- throw new u("JWTs must use Compact JWS serialization, JWT must be a string");
315
- const { 1: t, length: n } = e.split(".");
316
- if (n === 5)
317
- throw new u("Only JWTs using Compact JWS serialization can be decoded");
318
- if (n !== 3)
319
- throw new u("Invalid JWT");
314
+ throw new h("JWTs must use Compact JWS serialization, JWT must be a string");
315
+ const { 1: t, length: r } = e.split(".");
316
+ if (r === 5)
317
+ throw new h("Only JWTs using Compact JWS serialization can be decoded");
318
+ if (r !== 3)
319
+ throw new h("Invalid JWT");
320
320
  if (!t)
321
- throw new u("JWTs must contain a payload");
322
- let r;
321
+ throw new h("JWTs must contain a payload");
322
+ let n;
323
323
  try {
324
- r = G(t);
324
+ n = z(t);
325
325
  } catch {
326
- throw new u("Failed to base64url decode the payload");
326
+ throw new h("Failed to base64url decode the payload");
327
327
  }
328
328
  let i;
329
329
  try {
330
- i = JSON.parse(f.decode(r));
330
+ i = JSON.parse(b.decode(n));
331
331
  } catch {
332
- throw new u("Failed to parse the decoded payload as JSON");
332
+ throw new h("Failed to parse the decoded payload as JSON");
333
333
  }
334
- if (!q(i))
335
- throw new u("Invalid JWT Claims Set");
334
+ if (!Q(i))
335
+ throw new h("Invalid JWT Claims Set");
336
336
  return i;
337
337
  }
338
- function E(e, t) {
338
+ function N(e) {
339
+ return "source" in e && e.source !== void 0;
340
+ }
341
+ function E(e) {
342
+ return !N(e);
343
+ }
344
+ function g(e, t) {
339
345
  if (t != null && t.email)
340
346
  return `did:email:${t.email}`;
341
347
  if (t != null && t.name)
@@ -344,27 +350,27 @@ function E(e, t) {
344
350
  `Unable to generate ${e} ID: missing required ${e} information`
345
351
  );
346
352
  }
347
- function H(e) {
348
- const { nameIdentifier: t, ...n } = e;
353
+ function ee(e) {
354
+ const { nameIdentifier: t, ...r } = e;
349
355
  return {
350
- ...n,
351
- nameIdentifier: t == null ? void 0 : t.map(({ nameIdentifierType: r, ...i }) => ({
356
+ ...r,
357
+ nameIdentifier: t == null ? void 0 : t.map(({ nameIdentifierType: n, ...i }) => ({
352
358
  ...i,
353
- naturalPersonNameIdentifierType: r
359
+ naturalPersonNameIdentifierType: n
354
360
  }))
355
361
  };
356
362
  }
357
- function X(e, t) {
363
+ function L(e, t) {
358
364
  return {
359
365
  naturalPerson: e.naturalPerson ? {
360
366
  ...e.naturalPerson,
361
- name: H(e.naturalPerson.name)
367
+ name: ee(e.naturalPerson.name)
362
368
  } : void 0,
363
369
  legalPerson: e.legalPerson,
364
370
  accountNumber: [t]
365
371
  };
366
372
  }
367
- const p = [
373
+ const I = [
368
374
  {
369
375
  addressType: "GEOG",
370
376
  addressLine: ["1234 Main Street"],
@@ -372,62 +378,62 @@ const p = [
372
378
  country: "US"
373
379
  }
374
380
  ];
375
- function z(e) {
381
+ function te(e) {
376
382
  const t = e.trim();
377
383
  if (!t)
378
384
  return { primaryIdentifier: "", secondaryIdentifier: "" };
379
- const n = t.split(/\s+/), r = n[n.length - 1], i = n.slice(0, -1), o = i.length > 0 ? i.join(" ") : r;
380
- return { primaryIdentifier: r, secondaryIdentifier: o };
385
+ const r = t.split(/\s+/), n = r[r.length - 1], i = r.slice(0, -1), o = i.length > 0 ? i.join(" ") : n;
386
+ return { primaryIdentifier: n, secondaryIdentifier: o };
381
387
  }
382
- function Y(e, t, n = ["1234567890"]) {
383
- const r = t == null ? void 0 : t.map((i) => {
388
+ function re(e, t, r = ["1234567890"]) {
389
+ const n = t == null ? void 0 : t.map((i) => {
384
390
  const o = { ...i };
385
391
  return o.naturalPerson && (o.naturalPerson = {
386
392
  ...o.naturalPerson,
387
- geographicAddress: p
393
+ geographicAddress: I
388
394
  }), o.legalPerson && (o.legalPerson = {
389
395
  ...o.legalPerson,
390
- geographicAddress: p
396
+ geographicAddress: I
391
397
  }), o;
392
398
  });
393
- return e === "originator" ? { originatorPersons: r, accountNumber: n } : { beneficiaryPersons: r, accountNumber: n };
399
+ return e === "originator" ? { originatorPersons: n, accountNumber: r } : { beneficiaryPersons: n, accountNumber: r };
394
400
  }
395
- function Q(e, t = "John Doe") {
396
- const { primaryIdentifier: n, secondaryIdentifier: r } = z(t), i = {
401
+ function ne(e, t = "John Doe") {
402
+ const { primaryIdentifier: r, secondaryIdentifier: n } = te(t), i = {
397
403
  naturalPerson: {
398
404
  name: [
399
405
  {
400
406
  nameIdentifier: [
401
407
  {
402
- primaryIdentifier: n,
403
- ...r ? { secondaryIdentifier: r } : {},
408
+ primaryIdentifier: r,
409
+ ...n ? { secondaryIdentifier: n } : {},
404
410
  nameIdentifierType: "LEGL"
405
411
  }
406
412
  ]
407
413
  }
408
414
  ],
409
- geographicAddress: p
415
+ geographicAddress: I
410
416
  }
411
417
  };
412
418
  return e === "originator" ? { originatorPersons: [i], accountNumber: ["1234567890"] } : { beneficiaryPersons: [i], accountNumber: ["1234567890"] };
413
419
  }
414
- const Z = (e) => ({
420
+ const ie = (e) => ({
415
421
  ...e,
416
422
  // @ts-expect-error Preserving the original logic
417
423
  name: e.name ? [e.name] : void 0
418
- }), ee = (e) => ({
424
+ }), oe = (e) => ({
419
425
  ...e,
420
- naturalPerson: e.naturalPerson ? Z(e.naturalPerson) : void 0
421
- }), te = ({ beneficiary: e, originator: t }, n, r, i, o) => {
426
+ naturalPerson: e.naturalPerson ? ie(e.naturalPerson) : void 0
427
+ }), se = ({ beneficiary: e, originator: t }, r, n, i, o) => {
422
428
  var s;
423
429
  {
424
430
  const a = e && {
425
431
  ...e,
426
432
  ...i && { accountNumber: [i] },
427
- beneficiaryPersons: (s = e.beneficiaryPersons) == null ? void 0 : s.map(ee)
433
+ beneficiaryPersons: (s = e.beneficiaryPersons) == null ? void 0 : s.map(oe)
428
434
  };
429
- if (r && (a != null && a.beneficiaryPersons)) {
430
- const d = Y(
435
+ if (n && (a != null && a.beneficiaryPersons)) {
436
+ const d = re(
431
437
  "originator",
432
438
  a == null ? void 0 : a.beneficiaryPersons
433
439
  );
@@ -441,14 +447,14 @@ const Z = (e) => ({
441
447
  }
442
448
  return {
443
449
  beneficiary: a,
444
- originator: Q("originator", n)
450
+ originator: ne("originator", r)
445
451
  };
446
452
  }
447
453
  };
448
- function ne(e, t, n) {
454
+ function ae(e, t, r) {
449
455
  var o, s;
450
- const { beneficiary: r, originator: i } = te(
451
- n,
456
+ const { beneficiary: n, originator: i } = se(
457
+ r,
452
458
  (o = e.customer) == null ? void 0 : o.name,
453
459
  t.originatorEqualsBeneficiary,
454
460
  e.destination
@@ -466,108 +472,136 @@ function ne(e, t, n) {
466
472
  ...t.beneficiaryProof && {
467
473
  beneficiaryProof: t.beneficiaryProof
468
474
  },
469
- ...r && { beneficiary: r },
475
+ ...n && { beneficiary: n },
470
476
  ...i && { originator: i },
471
477
  ...t.originatorEqualsBeneficiary && {
472
478
  originatorEqualsBeneficiary: t.originatorEqualsBeneficiary
473
479
  }
474
480
  };
475
481
  }
476
- function N(e, t, n = {}) {
477
- var a, d;
478
- const r = (n == null ? void 0 : n.originatorId) || E("originator", e.customer), i = (n == null ? void 0 : n.beneficiaryId) || E("beneficiary", e.counterparty), o = (n == null ? void 0 : n.referenceId) || Math.random().toString(36).substring(2, 15), s = [];
479
- return t.originatorVASPdid && s.push({
482
+ function C(e, t, r = {}) {
483
+ var m, f, A;
484
+ const n = E(e), i = n ? e.customer : e.counterparty, o = n ? e.counterparty : e.customer, s = (r == null ? void 0 : r.originatorId) || g("originator", i), a = (r == null ? void 0 : r.beneficiaryId) || g("beneficiary", o), d = (r == null ? void 0 : r.referenceId) || t.transactionId || Math.random().toString(36).substring(2, 15), l = [];
485
+ return t.originatorVASPdid && l.push({
480
486
  "@id": t.originatorVASPdid,
481
- for: r,
487
+ for: s,
482
488
  role: "VASP"
483
- }), t.beneficiaryVASPdid && s.push({
489
+ }), t.beneficiaryVASPdid && l.push({
484
490
  "@id": t.beneficiaryVASPdid,
485
- for: i,
491
+ for: a,
486
492
  role: "VASP"
487
- }), e.destination && ((a = e == null ? void 0 : e.account) != null && a.did) && s.push({
493
+ }), E(e) && e.destination && ((m = e == null ? void 0 : e.account) != null && m.did) && l.push({
488
494
  "@id": e.account.did,
489
- for: t.beneficiaryVASPdid || i,
495
+ for: t.beneficiaryVASPdid || a,
490
496
  role: "SettlementAddress"
497
+ }), N(e) && e.source && ((f = e.agent) != null && f.did) && l.push({
498
+ "@id": e.agent.did,
499
+ for: t.originatorVASPdid || s,
500
+ role: "SourceAddress"
491
501
  }), {
492
- originator: { "@id": r },
493
- beneficiary: { "@id": i },
502
+ originator: { "@id": s },
503
+ beneficiary: { "@id": a },
494
504
  asset: e.asset,
495
- amount: ((d = e.amountDecimal) == null ? void 0 : d.toString()) || t.transactionAmount,
496
- agents: s,
497
- ref: o
505
+ amount: ((A = e.amountDecimal) == null ? void 0 : A.toString()) || t.transactionAmount,
506
+ agents: l,
507
+ ref: d
498
508
  };
499
509
  }
500
- function L(e, t, n = {}) {
501
- var o, s;
502
- const r = n.beneficiaryId || E("beneficiary", e.counterparty), i = ((s = (o = t.beneficiary) == null ? void 0 : o.beneficiaryPersons) == null ? void 0 : s.map(
503
- (a) => X(a, r)
504
- )) || [];
510
+ function T(e, t, r = {}) {
511
+ var o, s, a, d, l, m;
512
+ if (E(e)) {
513
+ const f = r.beneficiaryId || g("beneficiary", e.counterparty), A = (
514
+ // If counterparty type is SELF, reuse originator data for beneficiary
515
+ ((o = e.counterparty) == null ? void 0 : o.type) === p.SELF && r.originator ? r.originator.originatorPerson : (
516
+ // Convert all beneficiary persons from V1 to V2 format
517
+ ((a = (s = t.beneficiary) == null ? void 0 : s.beneficiaryPersons) == null ? void 0 : a.map(
518
+ (O) => L(O, f)
519
+ )) || []
520
+ )
521
+ );
522
+ return {
523
+ ivms101: {
524
+ originator: r.originator,
525
+ beneficiary: {
526
+ beneficiaryPerson: A
527
+ }
528
+ }
529
+ };
530
+ }
531
+ const n = r.originatorId || g("originator", e.counterparty);
505
532
  return {
506
533
  ivms101: {
507
- originator: n.originator,
508
- beneficiary: {
509
- beneficiaryPerson: i
510
- }
534
+ originator: {
535
+ originatorPerson: ((d = e.counterparty) == null ? void 0 : d.type) === p.SELF && r.beneficiary ? r.beneficiary.beneficiaryPerson : (
536
+ // Convert all originator persons from V1 to V2 format
537
+ ((m = (l = t.originator) == null ? void 0 : l.originatorPersons) == null ? void 0 : m.map(
538
+ (f) => L(f, n)
539
+ )) || []
540
+ )
541
+ },
542
+ beneficiary: r.beneficiary
511
543
  }
512
544
  };
513
545
  }
514
- function g(e, t, n) {
515
- var i;
516
- const r = { ...e };
517
- if (!r.originatorId)
518
- try {
519
- const o = K(t);
520
- o != null && o.sub && (r.originatorId = o.sub);
521
- } catch {
522
- }
523
- return r.beneficiaryId || (((i = n.counterparty) == null ? void 0 : i.type) === I.SELF ? r.beneficiaryId = r.originatorId : n.destination && (r.beneficiaryId = `did:key:${n.destination}`)), r;
546
+ function P(e, t, r) {
547
+ var o, s;
548
+ const n = { ...e };
549
+ let i;
550
+ try {
551
+ const a = Z(t);
552
+ i = a == null ? void 0 : a.sub;
553
+ } catch {
554
+ }
555
+ return E(r) ? (!n.originatorId && i && (n.originatorId = i), n.beneficiaryId || (((o = r.counterparty) == null ? void 0 : o.type) === p.SELF ? n.beneficiaryId = n.originatorId : r.destination && (n.beneficiaryId = `did:key:${r.destination}`))) : N(r) && (!n.beneficiaryId && i && (n.beneficiaryId = i), n.originatorId || (((s = r.counterparty) == null ? void 0 : s.type) === p.SELF ? n.originatorId = n.beneficiaryId : r.source && (n.originatorId = `did:key:${r.source}`))), n;
524
556
  }
525
- function oe(e) {
557
+ function le(e) {
526
558
  var s;
527
559
  if (!e.txCreate || !e.ivms101)
528
560
  throw new Error(
529
561
  "Invalid response: missing required txCreate or ivms101 data"
530
562
  );
531
- const { value: t, ivms101: n, proof: r, txCreate: i } = e, o = {
563
+ const { value: t, ivms101: r, proof: n, txCreate: i } = e, o = {
532
564
  destination: (t == null ? void 0 : t.destination) || "",
533
565
  counterparty: (t == null ? void 0 : t.counterparty) || {},
534
566
  agent: t == null ? void 0 : t.agent,
535
567
  account: t == null ? void 0 : t.account,
536
- proof: r,
568
+ proof: n,
537
569
  asset: (t == null ? void 0 : t.asset) || (typeof i.transactionAsset == "string" ? i.transactionAsset : (s = i.transactionAsset) == null ? void 0 : s.caip19) || "",
538
570
  amountDecimal: (t == null ? void 0 : t.amountDecimal) || (i.transactionAmount ? parseFloat(i.transactionAmount) : 0),
539
571
  customer: t == null ? void 0 : t.customer
540
572
  };
541
- return ne(o, i, n);
573
+ return ae(o, i, r);
542
574
  }
543
- function se(e, t, n = {}) {
544
- if (!e.txCreate || !e.ivms101)
575
+ function ue(e, t, r = {}) {
576
+ const { value: n, txCreate: i, txUpdate: o, ivms101: s, proof: a } = e, d = E(n) ? i : o;
577
+ if (!d || !s)
545
578
  throw new Error(
546
- "Invalid response: missing required txCreate or ivms101 data"
579
+ "Invalid response: missing required txCreate/txUpdate or ivms101 data"
547
580
  );
548
- const { value: r, txCreate: i, ivms101: o, proof: s } = e, a = g(n, t, r);
581
+ const l = P(r, t, n);
549
582
  return {
550
- createTx: N(r, i, a),
551
- ivms101: L(r, o, a),
552
- ...s && { confirmRelationship: { proof: s } }
583
+ createTx: C(n, d, l),
584
+ ivms101: T(n, s, l),
585
+ ...a && { confirmRelationship: { proof: a } }
553
586
  };
554
587
  }
555
- function ae(e, t, n = {}) {
556
- if (!e.txCreate || !e.ivms101)
588
+ function he(e, t, r = {}) {
589
+ const { value: n, txCreate: i, txUpdate: o } = e, s = E(n) ? i : o;
590
+ if (!s || !e.ivms101)
557
591
  throw new Error(
558
- "Invalid response: missing required txCreate or ivms101 data"
592
+ "Invalid response: missing required txCreate/txUpdate or ivms101 data"
559
593
  );
560
- const { value: r, txCreate: i } = e, o = g(n, t, r);
561
- return N(r, i, o);
594
+ const a = P(r, t, n);
595
+ return C(n, s, a);
562
596
  }
563
- function ce(e, t, n = {}) {
597
+ function me(e, t, r = {}) {
564
598
  if (!e.ivms101)
565
599
  throw new Error("Invalid response: missing required ivms101 data");
566
- const { value: r, ivms101: i } = e, o = g(n, t, r);
567
- return L(r, i, o);
600
+ const { value: n, ivms101: i } = e, o = P(r, t, n);
601
+ return T(n, i, o);
568
602
  }
569
- async function b(e, t) {
570
- const n = JSON.stringify(e), r = new TextEncoder(), i = t ? A(t) : crypto.getRandomValues(new Uint8Array(32)), o = await crypto.subtle.importKey(
603
+ async function v(e, t) {
604
+ const r = JSON.stringify(e), n = new TextEncoder(), i = t ? w(t) : crypto.getRandomValues(new Uint8Array(32)), o = await crypto.subtle.importKey(
571
605
  "raw",
572
606
  i,
573
607
  { name: "AES-GCM" },
@@ -576,71 +610,71 @@ async function b(e, t) {
576
610
  ), s = crypto.getRandomValues(new Uint8Array(12)), a = await crypto.subtle.encrypt(
577
611
  { name: "AES-GCM", iv: s },
578
612
  o,
579
- r.encode(n)
613
+ n.encode(r)
580
614
  );
581
615
  return {
582
- ciphertext: `${m(s)}-${m(a)}`,
583
- key: m(i)
616
+ ciphertext: `${y(s)}-${y(a)}`,
617
+ key: y(i)
584
618
  };
585
619
  }
586
- async function P({ ciphertext: e, key: t }) {
587
- const [n, r] = e.split("-"), i = new Uint8Array(
588
- atob(t).split("").map((v) => v.charCodeAt(0))
589
- ), o = A(n), s = A(r), a = await crypto.subtle.importKey(
620
+ async function _({ ciphertext: e, key: t }) {
621
+ const [r, n] = e.split("-"), i = new Uint8Array(
622
+ atob(t).split("").map((m) => m.charCodeAt(0))
623
+ ), o = w(r), s = w(n), a = await crypto.subtle.importKey(
590
624
  "raw",
591
625
  i,
592
626
  { name: "AES-GCM" },
593
627
  !1,
594
628
  ["decrypt"]
595
- ), d = new TextDecoder(), h = await crypto.subtle.decrypt(
629
+ ), d = new TextDecoder(), l = await crypto.subtle.decrypt(
596
630
  { name: "AES-GCM", iv: new Uint8Array(o) },
597
631
  a,
598
632
  s
599
633
  );
600
- return JSON.parse(d.decode(h));
634
+ return JSON.parse(d.decode(l));
601
635
  }
602
- function m(e) {
636
+ function y(e) {
603
637
  const t = new Uint8Array(e);
604
- let n = "";
605
- for (let r = 0; r < t.length; r++)
606
- n += String.fromCharCode(t[r]);
607
- return btoa(n);
608
- }
609
- function A(e) {
610
- const t = atob(e), n = new Uint8Array(t.length);
611
- for (let r = 0; r < t.length; r++)
612
- n[r] = t.charCodeAt(r);
613
- return n;
614
- }
615
- async function de(e) {
638
+ let r = "";
639
+ for (let n = 0; n < t.length; n++)
640
+ r += String.fromCharCode(t[n]);
641
+ return btoa(r);
642
+ }
643
+ function w(e) {
644
+ const t = atob(e), r = new Uint8Array(t.length);
645
+ for (let n = 0; n < t.length; n++)
646
+ r[n] = t.charCodeAt(n);
647
+ return r;
648
+ }
649
+ async function fe(e) {
616
650
  const t = await fetch(e.url, {
617
651
  method: "GET"
618
652
  });
619
653
  if (!t.ok)
620
654
  throw new Error(`Failed to get connection: ${await t.text()}`);
621
- const n = await t.json();
622
- if (!n.id || !n.metadata || !n.status || !n.sealed)
655
+ const r = await t.json();
656
+ if (!r.id || !r.metadata || !r.status || !r.sealed)
623
657
  throw new Error("Data missing from server response");
624
- const r = {
625
- id: n.id,
626
- metadata: n.metadata,
627
- status: n.status
658
+ const n = {
659
+ id: r.id,
660
+ metadata: r.metadata,
661
+ status: r.status
628
662
  };
629
- if (n.status === "closed")
630
- return r;
631
- const i = n.sealed[n.sealed.length - 1], o = await P({
663
+ if (r.status === "closed")
664
+ return n;
665
+ const i = r.sealed[r.sealed.length - 1], o = await _({
632
666
  ciphertext: i,
633
667
  key: e.key
634
668
  });
635
- return n.status === "completed" ? {
636
- ...r,
669
+ return r.status === "completed" ? {
670
+ ...n,
637
671
  result: o.result
638
672
  } : {
639
- ...r,
673
+ ...n,
640
674
  tx: o.tx
641
675
  };
642
676
  }
643
- class le {
677
+ class Ee {
644
678
  constructor(t) {
645
679
  c(this, "endpoint");
646
680
  this.endpoint = t;
@@ -652,10 +686,10 @@ class le {
652
686
  * @param metadata Connection metadata including participants and transaction type
653
687
  * @returns Promise resolving to connection details including ID, version, and encryption key
654
688
  */
655
- async create(t, n) {
656
- const r = await b(t), i = {
657
- metadata: n,
658
- sealed: r.ciphertext
689
+ async create(t, r) {
690
+ const n = await v(t), i = {
691
+ metadata: r,
692
+ sealed: n.ciphertext
659
693
  }, o = await fetch(this.endpoint, {
660
694
  method: "POST",
661
695
  headers: {
@@ -670,9 +704,9 @@ class le {
670
704
  id: s.id,
671
705
  version: s.version,
672
706
  status: s.status,
673
- metadata: n,
707
+ metadata: r,
674
708
  data: t,
675
- key: r.key
709
+ key: n.key
676
710
  };
677
711
  }
678
712
  /**
@@ -685,10 +719,10 @@ class le {
685
719
  * @param key Current encryption key
686
720
  * @returns Promise resolving to updated connection details including new encryption key
687
721
  */
688
- async update(t, n, r, i, o) {
689
- const s = await b(n, o), a = {
722
+ async update(t, r, n, i, o) {
723
+ const s = await v(r, o), a = {
690
724
  sealed: s.ciphertext,
691
- version: r,
725
+ version: n,
692
726
  status: i
693
727
  }, d = await fetch(`${this.endpoint}/${t}`, {
694
728
  method: "PATCH",
@@ -699,13 +733,13 @@ class le {
699
733
  });
700
734
  if (!d.ok)
701
735
  throw new Error(`Failed to update connection: ${await d.text()}`);
702
- const h = await d.json();
736
+ const l = await d.json();
703
737
  return {
704
- id: h.id,
705
- metadata: h.metadata,
706
- version: h.version,
707
- status: h.status,
708
- data: n,
738
+ id: l.id,
739
+ metadata: l.metadata,
740
+ version: l.version,
741
+ status: l.status,
742
+ data: r,
709
743
  key: s.key
710
744
  };
711
745
  }
@@ -716,15 +750,15 @@ class le {
716
750
  * @param key Encryption key from previous create/update operation
717
751
  * @returns Promise resolving to connection details including decrypted data
718
752
  */
719
- async get(t, n) {
720
- const r = await fetch(`${this.endpoint}/${t}`, {
753
+ async get(t, r) {
754
+ const n = await fetch(`${this.endpoint}/${t}`, {
721
755
  method: "GET"
722
756
  });
723
- if (!r.ok)
724
- throw new Error(`Failed to get connection: ${await r.text()}`);
725
- const i = await r.json(), o = i.sealed[i.sealed.length - 1], s = await P({
757
+ if (!n.ok)
758
+ throw new Error(`Failed to get connection: ${await n.text()}`);
759
+ const i = await n.json(), o = i.sealed[i.sealed.length - 1], s = await _({
726
760
  ciphertext: o,
727
- key: n
761
+ key: r
728
762
  });
729
763
  return {
730
764
  id: i.id,
@@ -732,7 +766,7 @@ class le {
732
766
  version: i.version,
733
767
  metadata: i.metadata,
734
768
  data: s,
735
- key: n
769
+ key: r
736
770
  };
737
771
  }
738
772
  /**
@@ -741,14 +775,14 @@ class le {
741
775
  * @returns Promise resolving when the connection is closed
742
776
  */
743
777
  async close(t) {
744
- const n = await fetch(`${this.endpoint}/${t}`, {
778
+ const r = await fetch(`${this.endpoint}/${t}`, {
745
779
  method: "DELETE"
746
780
  });
747
- if (!n.ok)
748
- throw new Error(`Failed to close connection: ${await n.text()}`);
781
+ if (!r.ok)
782
+ throw new Error(`Failed to close connection: ${await r.text()}`);
749
783
  }
750
784
  }
751
- class ue {
785
+ class pe {
752
786
  /**
753
787
  * Creates a new instance of the Notabene SDK
754
788
  *
@@ -772,13 +806,13 @@ class ue {
772
806
  * @returns component URL
773
807
  * @internal
774
808
  */
775
- componentUrl(t, n, r, i) {
809
+ componentUrl(t, r, n, i) {
776
810
  const o = new URL(this.uxUrl);
777
811
  o.pathname = t;
778
- const s = j({
812
+ const s = H({
779
813
  authToken: this.authToken,
780
- value: n,
781
- configuration: r
814
+ value: r,
815
+ configuration: n
782
816
  });
783
817
  return o.hash = s, this.nodeUrl && o.searchParams.set("nodeUrl", this.nodeUrl), this.theme && o.searchParams.set("theme", JSON.stringify(this.theme)), this.locale && o.searchParams.set("locale", this.locale), i && (i.callback && o.searchParams.set("callback_url", i.callback), i.redirectUri && o.searchParams.set("redirect_uri", i.redirectUri)), o.toString();
784
818
  }
@@ -792,11 +826,11 @@ class ue {
792
826
  * @returns A new EmbeddedComponent instance
793
827
  * @internal
794
828
  */
795
- createComponent(t, n, r, i) {
796
- return new J(
797
- this.componentUrl(t, n, r, i),
798
- n,
799
- r
829
+ createComponent(t, r, n, i) {
830
+ return new K(
831
+ this.componentUrl(t, r, n, i),
832
+ r,
833
+ n
800
834
  );
801
835
  }
802
836
  /**
@@ -807,12 +841,12 @@ class ue {
807
841
  * @param callbacks - Optional callback configuration
808
842
  * @returns A new EmbeddedComponent instance for withdrawal assistance
809
843
  */
810
- createWithdrawalAssist(t, n, r) {
844
+ createWithdrawalAssist(t, r, n) {
811
845
  return this.createComponent(
812
846
  "withdrawal-assist",
813
847
  t,
814
- n,
815
- r
848
+ r,
849
+ n
816
850
  );
817
851
  }
818
852
  /**
@@ -824,12 +858,12 @@ class ue {
824
858
  * @returns A new EmbeddedComponent instance for connection
825
859
  * @alpha
826
860
  */
827
- createConnectWallet(t, n, r) {
861
+ createConnectWallet(t, r, n) {
828
862
  return this.createComponent(
829
863
  "connect",
830
864
  t,
831
- n,
832
- r
865
+ r,
866
+ n
833
867
  );
834
868
  }
835
869
  /**
@@ -841,12 +875,12 @@ class ue {
841
875
  * @returns A new EmbeddedComponent instance for deposit requests
842
876
  * @public
843
877
  */
844
- createDepositRequest(t, n, r) {
878
+ createDepositRequest(t, r, n) {
845
879
  return this.createComponent(
846
880
  "deposit-request",
847
881
  t,
848
- n,
849
- r
882
+ r,
883
+ n
850
884
  );
851
885
  }
852
886
  /**
@@ -858,37 +892,37 @@ class ue {
858
892
  * @returns A new EmbeddedComponent instance for deposit assistance
859
893
  * @public
860
894
  */
861
- createDepositAssist(t, n, r) {
895
+ createDepositAssist(t, r, n) {
862
896
  return this.createComponent(
863
897
  "deposit-assist",
864
898
  t,
865
- n,
866
- r
899
+ r,
900
+ n
867
901
  );
868
902
  }
869
903
  }
870
904
  export {
871
- S as AgentType,
872
- l as CMType,
873
- D as CodeVerificationStatus,
874
- le as ConnectionManager,
875
- J as EmbeddedComponent,
876
- M as ErrorIdentifierCode,
877
- y as HMType,
878
- T as IdentityVerificationMethod,
879
- U as OAuthProvider,
880
- I as PersonType,
881
- B as ProofStatus,
882
- W as ProofTypes,
883
- _ as Status,
884
- O as VASPSearchControl,
885
- x as ValidationSections,
886
- V as WarningIdentifierCode,
887
- ce as componentResponseToIVMS101,
888
- ae as componentResponseToTxCreateRequest,
889
- se as componentResponseToTxRequests,
890
- oe as componentResponseToV1TxCreateRequest,
891
- ie as decodeFragmentToObject,
892
- ue as default,
893
- de as getRefreshResult
905
+ x as AgentType,
906
+ u as CMType,
907
+ k as CodeVerificationStatus,
908
+ Ee as ConnectionManager,
909
+ K as EmbeddedComponent,
910
+ J as ErrorIdentifierCode,
911
+ S as HMType,
912
+ W as IdentityVerificationMethod,
913
+ B as OAuthProvider,
914
+ p as PersonType,
915
+ j as ProofStatus,
916
+ G as ProofTypes,
917
+ M as Status,
918
+ V as VASPSearchControl,
919
+ F as ValidationSections,
920
+ $ as WarningIdentifierCode,
921
+ me as componentResponseToIVMS101,
922
+ he as componentResponseToTxCreateRequest,
923
+ ue as componentResponseToTxRequests,
924
+ le as componentResponseToV1TxCreateRequest,
925
+ de as decodeFragmentToObject,
926
+ pe as default,
927
+ fe as getRefreshResult
894
928
  };