@pooflabs/web 0.0.80 → 0.0.81-rc2

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 (82) hide show
  1. package/dist/auth/providers/phantom-wallet-provider.d.ts +20 -0
  2. package/dist/index-Bdcc5821.js +2375 -0
  3. package/dist/index-Bdcc5821.js.map +1 -0
  4. package/dist/{index-BhfNMrC0.js → index-BjlCinic.js} +25 -883
  5. package/dist/index-BjlCinic.js.map +1 -0
  6. package/dist/{index-Db0NqU8R.esm.js → index-Bx_lLXRT.esm.js} +342 -277
  7. package/dist/index-Bx_lLXRT.esm.js.map +1 -0
  8. package/dist/{index-COIUWugk.esm.js → index-CHqM9n4K.esm.js} +24 -881
  9. package/dist/index-CHqM9n4K.esm.js.map +1 -0
  10. package/dist/{index-BVi7fTm2.js → index-CL4JIAAR.js} +24 -882
  11. package/dist/index-CL4JIAAR.js.map +1 -0
  12. package/dist/index-CrOVJFX9.esm.js +2373 -0
  13. package/dist/index-CrOVJFX9.esm.js.map +1 -0
  14. package/dist/{index-BbtYb8sE.esm.js → index-DCo85UGg.esm.js} +23 -882
  15. package/dist/index-DCo85UGg.esm.js.map +1 -0
  16. package/dist/{index-BNyxZ82q.js → index-DHm4usay.js} +342 -276
  17. package/dist/index-DHm4usay.js.map +1 -0
  18. package/dist/{index.browser-BuHl80dp.esm.js → index.browser-7dDfRU5G.esm.js} +1367 -1697
  19. package/dist/index.browser-7dDfRU5G.esm.js.map +1 -0
  20. package/dist/index.browser-Bg_-PAgT.esm.js +1250 -0
  21. package/dist/index.browser-Bg_-PAgT.esm.js.map +1 -0
  22. package/dist/index.browser-C-_FEr5M.esm.js +1134 -0
  23. package/dist/index.browser-C-_FEr5M.esm.js.map +1 -0
  24. package/dist/{index.browser-8hyi2LOX.js → index.browser-CmlqbyPr.js} +1367 -1697
  25. package/dist/index.browser-CmlqbyPr.js.map +1 -0
  26. package/dist/index.browser-CxXQ2RhF.js +122 -0
  27. package/dist/index.browser-CxXQ2RhF.js.map +1 -0
  28. package/dist/index.browser-DjEZSiqI.js +1137 -0
  29. package/dist/index.browser-DjEZSiqI.js.map +1 -0
  30. package/dist/index.browser-DuVkpEzB.js +1253 -0
  31. package/dist/index.browser-DuVkpEzB.js.map +1 -0
  32. package/dist/index.browser-xJkO73vw.esm.js +119 -0
  33. package/dist/index.browser-xJkO73vw.esm.js.map +1 -0
  34. package/dist/index.esm.js +1 -1
  35. package/dist/index.js +1 -1
  36. package/dist/{index.native-DUnE51Mx.js → index.native-DJA9_K3i.js} +186 -2669
  37. package/dist/index.native-DJA9_K3i.js.map +1 -0
  38. package/dist/{index.native-DuKhZcus.esm.js → index.native-TLhfXfe6.esm.js} +187 -2669
  39. package/dist/index.native-TLhfXfe6.esm.js.map +1 -0
  40. package/dist/index.native.esm.js +1 -1
  41. package/dist/index.native.js +1 -1
  42. package/dist/{phantom-wallet-provider-Cg-srwP4.js → phantom-wallet-provider-BegJFoWW.js} +141 -12
  43. package/dist/{phantom-wallet-provider-Cg-srwP4.js.map → phantom-wallet-provider-BegJFoWW.js.map} +1 -1
  44. package/dist/{phantom-wallet-provider--BJjVUA1.esm.js → phantom-wallet-provider-DzUAMhbm.esm.js} +141 -12
  45. package/dist/{phantom-wallet-provider--BJjVUA1.esm.js.map → phantom-wallet-provider-DzUAMhbm.esm.js.map} +1 -1
  46. package/dist/{privy-wallet-provider-BLcur3Ue.esm.js → privy-wallet-provider-BspbiyOr.esm.js} +3 -3
  47. package/dist/privy-wallet-provider-BspbiyOr.esm.js.map +1 -0
  48. package/dist/{privy-wallet-provider-DpNVyaXa.js → privy-wallet-provider-Du-QHaaG.js} +3 -3
  49. package/dist/privy-wallet-provider-Du-QHaaG.js.map +1 -0
  50. package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js → solana-mobile-wallet-provider-Bh7SBFpQ.esm.js} +53 -4
  51. package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js.map → solana-mobile-wallet-provider-Bh7SBFpQ.esm.js.map} +1 -1
  52. package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js → solana-mobile-wallet-provider-DPp4SYem.js} +53 -4
  53. package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js.map → solana-mobile-wallet-provider-DPp4SYem.js.map} +1 -1
  54. package/package.json +1 -1
  55. package/dist/index-BNyxZ82q.js.map +0 -1
  56. package/dist/index-BVi7fTm2.js.map +0 -1
  57. package/dist/index-BbtYb8sE.esm.js.map +0 -1
  58. package/dist/index-BhfNMrC0.js.map +0 -1
  59. package/dist/index-CKIoDkjJ.esm.js +0 -6
  60. package/dist/index-CKIoDkjJ.esm.js.map +0 -1
  61. package/dist/index-COIUWugk.esm.js.map +0 -1
  62. package/dist/index-CSraUgD6.js +0 -8
  63. package/dist/index-CSraUgD6.js.map +0 -1
  64. package/dist/index-Db0NqU8R.esm.js.map +0 -1
  65. package/dist/index.browser-8hyi2LOX.js.map +0 -1
  66. package/dist/index.browser-B4zXnffD.esm.js +0 -225
  67. package/dist/index.browser-B4zXnffD.esm.js.map +0 -1
  68. package/dist/index.browser-BJ_TdUVA.js +0 -228
  69. package/dist/index.browser-BJ_TdUVA.js.map +0 -1
  70. package/dist/index.browser-BkNaRRVe.js +0 -1222
  71. package/dist/index.browser-BkNaRRVe.js.map +0 -1
  72. package/dist/index.browser-BuHl80dp.esm.js.map +0 -1
  73. package/dist/index.browser-CnbxBj3-.esm.js +0 -1219
  74. package/dist/index.browser-CnbxBj3-.esm.js.map +0 -1
  75. package/dist/index.browser-OvGNsMPu.esm.js +0 -1002
  76. package/dist/index.browser-OvGNsMPu.esm.js.map +0 -1
  77. package/dist/index.browser-vuTr40so.js +0 -1008
  78. package/dist/index.browser-vuTr40so.js.map +0 -1
  79. package/dist/index.native-DUnE51Mx.js.map +0 -1
  80. package/dist/index.native-DuKhZcus.esm.js.map +0 -1
  81. package/dist/privy-wallet-provider-BLcur3Ue.esm.js.map +0 -1
  82. package/dist/privy-wallet-provider-DpNVyaXa.js.map +0 -1
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useContext, createContext, useState, useMemo, useRef, useEffect, useCallback } from 'react';
3
3
  import globalAxios, { isAxiosError } from 'axios';
4
- import { b as bufferExports } from './index-CKIoDkjJ.esm.js';
5
- import { p as getDefaultExportFromCjs } from './index.native-DuKhZcus.esm.js';
4
+ import { b as bufferExports, g as getDefaultExportFromCjs, a as bs58$1 } from './index-Bx_lLXRT.esm.js';
6
5
  import { Transaction as Transaction$1, VersionedTransaction } from '@solana/web3.js';
7
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
7
  import '@coral-xyz/anchor';
@@ -1131,17 +1130,17 @@ function requireSrc () {
1131
1130
  return src;
1132
1131
  }
1133
1132
 
1134
- var bs58$3;
1133
+ var bs58;
1135
1134
  var hasRequiredBs58;
1136
1135
 
1137
1136
  function requireBs58 () {
1138
- if (hasRequiredBs58) return bs58$3;
1137
+ if (hasRequiredBs58) return bs58;
1139
1138
  hasRequiredBs58 = 1;
1140
1139
  const basex = requireSrc();
1141
1140
  const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
1142
1141
 
1143
- bs58$3 = basex(ALPHABET);
1144
- return bs58$3;
1142
+ bs58 = basex(ALPHABET);
1143
+ return bs58;
1145
1144
  }
1146
1145
 
1147
1146
  requireBs58();
@@ -3101,13 +3100,13 @@ function createAutoConfirmPlugin() {
3101
3100
  };
3102
3101
  }
3103
3102
 
3104
- var eventemitter3$1 = {exports: {}};
3103
+ var eventemitter3 = {exports: {}};
3105
3104
 
3106
- var hasRequiredEventemitter3$1;
3105
+ var hasRequiredEventemitter3;
3107
3106
 
3108
- function requireEventemitter3$1 () {
3109
- if (hasRequiredEventemitter3$1) return eventemitter3$1.exports;
3110
- hasRequiredEventemitter3$1 = 1;
3107
+ function requireEventemitter3 () {
3108
+ if (hasRequiredEventemitter3) return eventemitter3.exports;
3109
+ hasRequiredEventemitter3 = 1;
3111
3110
  (function (module) {
3112
3111
 
3113
3112
  var has = Object.prototype.hasOwnProperty
@@ -3444,12 +3443,12 @@ function requireEventemitter3$1 () {
3444
3443
  {
3445
3444
  module.exports = EventEmitter;
3446
3445
  }
3447
- } (eventemitter3$1));
3448
- return eventemitter3$1.exports;
3446
+ } (eventemitter3));
3447
+ return eventemitter3.exports;
3449
3448
  }
3450
3449
 
3451
- var eventemitter3Exports$1 = requireEventemitter3$1();
3452
- var EventEmitter3 = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports$1);
3450
+ var eventemitter3Exports = requireEventemitter3();
3451
+ var EventEmitter3 = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
3453
3452
 
3454
3453
  // src/index.ts
3455
3454
  var isBrowser = typeof window !== "undefined" && typeof window.btoa !== "undefined";
@@ -8778,133 +8777,6 @@ class Transaction {
8778
8777
  }
8779
8778
  }
8780
8779
 
8781
- // base-x encoding / decoding
8782
- // Copyright (c) 2018 base-x contributors
8783
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
8784
- // Distributed under the MIT software license, see the accompanying
8785
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
8786
- function base$3 (ALPHABET) {
8787
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
8788
- const BASE_MAP = new Uint8Array(256);
8789
- for (let j = 0; j < BASE_MAP.length; j++) {
8790
- BASE_MAP[j] = 255;
8791
- }
8792
- for (let i = 0; i < ALPHABET.length; i++) {
8793
- const x = ALPHABET.charAt(i);
8794
- const xc = x.charCodeAt(0);
8795
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
8796
- BASE_MAP[xc] = i;
8797
- }
8798
- const BASE = ALPHABET.length;
8799
- const LEADER = ALPHABET.charAt(0);
8800
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
8801
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
8802
- function encode (source) {
8803
- // eslint-disable-next-line no-empty
8804
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
8805
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
8806
- } else if (Array.isArray(source)) {
8807
- source = Uint8Array.from(source);
8808
- }
8809
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
8810
- if (source.length === 0) { return '' }
8811
- // Skip & count leading zeroes.
8812
- let zeroes = 0;
8813
- let length = 0;
8814
- let pbegin = 0;
8815
- const pend = source.length;
8816
- while (pbegin !== pend && source[pbegin] === 0) {
8817
- pbegin++;
8818
- zeroes++;
8819
- }
8820
- // Allocate enough space in big-endian base58 representation.
8821
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
8822
- const b58 = new Uint8Array(size);
8823
- // Process the bytes.
8824
- while (pbegin !== pend) {
8825
- let carry = source[pbegin];
8826
- // Apply "b58 = b58 * 256 + ch".
8827
- let i = 0;
8828
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
8829
- carry += (256 * b58[it1]) >>> 0;
8830
- b58[it1] = (carry % BASE) >>> 0;
8831
- carry = (carry / BASE) >>> 0;
8832
- }
8833
- if (carry !== 0) { throw new Error('Non-zero carry') }
8834
- length = i;
8835
- pbegin++;
8836
- }
8837
- // Skip leading zeroes in base58 result.
8838
- let it2 = size - length;
8839
- while (it2 !== size && b58[it2] === 0) {
8840
- it2++;
8841
- }
8842
- // Translate the result into a string.
8843
- let str = LEADER.repeat(zeroes);
8844
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
8845
- return str
8846
- }
8847
- function decodeUnsafe (source) {
8848
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
8849
- if (source.length === 0) { return new Uint8Array() }
8850
- let psz = 0;
8851
- // Skip and count leading '1's.
8852
- let zeroes = 0;
8853
- let length = 0;
8854
- while (source[psz] === LEADER) {
8855
- zeroes++;
8856
- psz++;
8857
- }
8858
- // Allocate enough space in big-endian base256 representation.
8859
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
8860
- const b256 = new Uint8Array(size);
8861
- // Process the characters.
8862
- while (psz < source.length) {
8863
- // Find code of next character
8864
- const charCode = source.charCodeAt(psz);
8865
- // Base map can not be indexed using char code
8866
- if (charCode > 255) { return }
8867
- // Decode character
8868
- let carry = BASE_MAP[charCode];
8869
- // Invalid character
8870
- if (carry === 255) { return }
8871
- let i = 0;
8872
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
8873
- carry += (BASE * b256[it3]) >>> 0;
8874
- b256[it3] = (carry % 256) >>> 0;
8875
- carry = (carry / 256) >>> 0;
8876
- }
8877
- if (carry !== 0) { throw new Error('Non-zero carry') }
8878
- length = i;
8879
- psz++;
8880
- }
8881
- // Skip leading zeroes in b256.
8882
- let it4 = size - length;
8883
- while (it4 !== size && b256[it4] === 0) {
8884
- it4++;
8885
- }
8886
- const vch = new Uint8Array(zeroes + (size - it4));
8887
- let j = zeroes;
8888
- while (it4 !== size) {
8889
- vch[j++] = b256[it4++];
8890
- }
8891
- return vch
8892
- }
8893
- function decode (string) {
8894
- const buffer = decodeUnsafe(string);
8895
- if (buffer) { return buffer }
8896
- throw new Error('Non-base' + BASE + ' character')
8897
- }
8898
- return {
8899
- encode,
8900
- decodeUnsafe,
8901
- decode
8902
- }
8903
- }
8904
-
8905
- var ALPHABET$3 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
8906
- var bs58$2 = base$3(ALPHABET$3);
8907
-
8908
8780
  // src/index.ts
8909
8781
  function parseSignMessageResponse(base64Response, networkId) {
8910
8782
  const networkPrefix = networkId.split(":")[0].toLowerCase();
@@ -8951,7 +8823,7 @@ function parseTransactionResponse(base64RawTransaction, networkId, hash) {
8951
8823
  function parseSolanaSignatureResponse(base64Response) {
8952
8824
  try {
8953
8825
  const signatureBytes = base64urlDecode(base64Response);
8954
- const signature = bs58$2.encode(signatureBytes);
8826
+ const signature = bs58$1.encode(signatureBytes);
8955
8827
  return {
8956
8828
  signature,
8957
8829
  rawSignature: base64Response
@@ -9191,610 +9063,6 @@ function parseBitcoinTransactionToBase64Url(transaction) {
9191
9063
  throw new Error("Unsupported Bitcoin transaction format");
9192
9064
  }
9193
9065
 
9194
- // base-x encoding / decoding
9195
- // Copyright (c) 2018 base-x contributors
9196
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
9197
- // Distributed under the MIT software license, see the accompanying
9198
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
9199
- function base$2 (ALPHABET) {
9200
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
9201
- const BASE_MAP = new Uint8Array(256);
9202
- for (let j = 0; j < BASE_MAP.length; j++) {
9203
- BASE_MAP[j] = 255;
9204
- }
9205
- for (let i = 0; i < ALPHABET.length; i++) {
9206
- const x = ALPHABET.charAt(i);
9207
- const xc = x.charCodeAt(0);
9208
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
9209
- BASE_MAP[xc] = i;
9210
- }
9211
- const BASE = ALPHABET.length;
9212
- const LEADER = ALPHABET.charAt(0);
9213
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
9214
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
9215
- function encode (source) {
9216
- // eslint-disable-next-line no-empty
9217
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
9218
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
9219
- } else if (Array.isArray(source)) {
9220
- source = Uint8Array.from(source);
9221
- }
9222
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
9223
- if (source.length === 0) { return '' }
9224
- // Skip & count leading zeroes.
9225
- let zeroes = 0;
9226
- let length = 0;
9227
- let pbegin = 0;
9228
- const pend = source.length;
9229
- while (pbegin !== pend && source[pbegin] === 0) {
9230
- pbegin++;
9231
- zeroes++;
9232
- }
9233
- // Allocate enough space in big-endian base58 representation.
9234
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
9235
- const b58 = new Uint8Array(size);
9236
- // Process the bytes.
9237
- while (pbegin !== pend) {
9238
- let carry = source[pbegin];
9239
- // Apply "b58 = b58 * 256 + ch".
9240
- let i = 0;
9241
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
9242
- carry += (256 * b58[it1]) >>> 0;
9243
- b58[it1] = (carry % BASE) >>> 0;
9244
- carry = (carry / BASE) >>> 0;
9245
- }
9246
- if (carry !== 0) { throw new Error('Non-zero carry') }
9247
- length = i;
9248
- pbegin++;
9249
- }
9250
- // Skip leading zeroes in base58 result.
9251
- let it2 = size - length;
9252
- while (it2 !== size && b58[it2] === 0) {
9253
- it2++;
9254
- }
9255
- // Translate the result into a string.
9256
- let str = LEADER.repeat(zeroes);
9257
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
9258
- return str
9259
- }
9260
- function decodeUnsafe (source) {
9261
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
9262
- if (source.length === 0) { return new Uint8Array() }
9263
- let psz = 0;
9264
- // Skip and count leading '1's.
9265
- let zeroes = 0;
9266
- let length = 0;
9267
- while (source[psz] === LEADER) {
9268
- zeroes++;
9269
- psz++;
9270
- }
9271
- // Allocate enough space in big-endian base256 representation.
9272
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
9273
- const b256 = new Uint8Array(size);
9274
- // Process the characters.
9275
- while (psz < source.length) {
9276
- // Find code of next character
9277
- const charCode = source.charCodeAt(psz);
9278
- // Base map can not be indexed using char code
9279
- if (charCode > 255) { return }
9280
- // Decode character
9281
- let carry = BASE_MAP[charCode];
9282
- // Invalid character
9283
- if (carry === 255) { return }
9284
- let i = 0;
9285
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
9286
- carry += (BASE * b256[it3]) >>> 0;
9287
- b256[it3] = (carry % 256) >>> 0;
9288
- carry = (carry / 256) >>> 0;
9289
- }
9290
- if (carry !== 0) { throw new Error('Non-zero carry') }
9291
- length = i;
9292
- psz++;
9293
- }
9294
- // Skip leading zeroes in b256.
9295
- let it4 = size - length;
9296
- while (it4 !== size && b256[it4] === 0) {
9297
- it4++;
9298
- }
9299
- const vch = new Uint8Array(zeroes + (size - it4));
9300
- let j = zeroes;
9301
- while (it4 !== size) {
9302
- vch[j++] = b256[it4++];
9303
- }
9304
- return vch
9305
- }
9306
- function decode (string) {
9307
- const buffer = decodeUnsafe(string);
9308
- if (buffer) { return buffer }
9309
- throw new Error('Non-base' + BASE + ' character')
9310
- }
9311
- return {
9312
- encode,
9313
- decodeUnsafe,
9314
- decode
9315
- }
9316
- }
9317
-
9318
- var ALPHABET$2 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9319
- var bs58$1 = base$2(ALPHABET$2);
9320
-
9321
- // base-x encoding / decoding
9322
- // Copyright (c) 2018 base-x contributors
9323
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
9324
- // Distributed under the MIT software license, see the accompanying
9325
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
9326
- function base$1 (ALPHABET) {
9327
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
9328
- const BASE_MAP = new Uint8Array(256);
9329
- for (let j = 0; j < BASE_MAP.length; j++) {
9330
- BASE_MAP[j] = 255;
9331
- }
9332
- for (let i = 0; i < ALPHABET.length; i++) {
9333
- const x = ALPHABET.charAt(i);
9334
- const xc = x.charCodeAt(0);
9335
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
9336
- BASE_MAP[xc] = i;
9337
- }
9338
- const BASE = ALPHABET.length;
9339
- const LEADER = ALPHABET.charAt(0);
9340
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
9341
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
9342
- function encode (source) {
9343
- // eslint-disable-next-line no-empty
9344
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
9345
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
9346
- } else if (Array.isArray(source)) {
9347
- source = Uint8Array.from(source);
9348
- }
9349
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
9350
- if (source.length === 0) { return '' }
9351
- // Skip & count leading zeroes.
9352
- let zeroes = 0;
9353
- let length = 0;
9354
- let pbegin = 0;
9355
- const pend = source.length;
9356
- while (pbegin !== pend && source[pbegin] === 0) {
9357
- pbegin++;
9358
- zeroes++;
9359
- }
9360
- // Allocate enough space in big-endian base58 representation.
9361
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
9362
- const b58 = new Uint8Array(size);
9363
- // Process the bytes.
9364
- while (pbegin !== pend) {
9365
- let carry = source[pbegin];
9366
- // Apply "b58 = b58 * 256 + ch".
9367
- let i = 0;
9368
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
9369
- carry += (256 * b58[it1]) >>> 0;
9370
- b58[it1] = (carry % BASE) >>> 0;
9371
- carry = (carry / BASE) >>> 0;
9372
- }
9373
- if (carry !== 0) { throw new Error('Non-zero carry') }
9374
- length = i;
9375
- pbegin++;
9376
- }
9377
- // Skip leading zeroes in base58 result.
9378
- let it2 = size - length;
9379
- while (it2 !== size && b58[it2] === 0) {
9380
- it2++;
9381
- }
9382
- // Translate the result into a string.
9383
- let str = LEADER.repeat(zeroes);
9384
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
9385
- return str
9386
- }
9387
- function decodeUnsafe (source) {
9388
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
9389
- if (source.length === 0) { return new Uint8Array() }
9390
- let psz = 0;
9391
- // Skip and count leading '1's.
9392
- let zeroes = 0;
9393
- let length = 0;
9394
- while (source[psz] === LEADER) {
9395
- zeroes++;
9396
- psz++;
9397
- }
9398
- // Allocate enough space in big-endian base256 representation.
9399
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
9400
- const b256 = new Uint8Array(size);
9401
- // Process the characters.
9402
- while (psz < source.length) {
9403
- // Find code of next character
9404
- const charCode = source.charCodeAt(psz);
9405
- // Base map can not be indexed using char code
9406
- if (charCode > 255) { return }
9407
- // Decode character
9408
- let carry = BASE_MAP[charCode];
9409
- // Invalid character
9410
- if (carry === 255) { return }
9411
- let i = 0;
9412
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
9413
- carry += (BASE * b256[it3]) >>> 0;
9414
- b256[it3] = (carry % 256) >>> 0;
9415
- carry = (carry / 256) >>> 0;
9416
- }
9417
- if (carry !== 0) { throw new Error('Non-zero carry') }
9418
- length = i;
9419
- psz++;
9420
- }
9421
- // Skip leading zeroes in b256.
9422
- let it4 = size - length;
9423
- while (it4 !== size && b256[it4] === 0) {
9424
- it4++;
9425
- }
9426
- const vch = new Uint8Array(zeroes + (size - it4));
9427
- let j = zeroes;
9428
- while (it4 !== size) {
9429
- vch[j++] = b256[it4++];
9430
- }
9431
- return vch
9432
- }
9433
- function decode (string) {
9434
- const buffer = decodeUnsafe(string);
9435
- if (buffer) { return buffer }
9436
- throw new Error('Non-base' + BASE + ' character')
9437
- }
9438
- return {
9439
- encode,
9440
- decodeUnsafe,
9441
- decode
9442
- }
9443
- }
9444
-
9445
- var ALPHABET$1 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9446
- var bs582 = base$1(ALPHABET$1);
9447
-
9448
- var eventemitter3 = {exports: {}};
9449
-
9450
- var hasRequiredEventemitter3;
9451
-
9452
- function requireEventemitter3 () {
9453
- if (hasRequiredEventemitter3) return eventemitter3.exports;
9454
- hasRequiredEventemitter3 = 1;
9455
- (function (module) {
9456
-
9457
- var has = Object.prototype.hasOwnProperty
9458
- , prefix = '~';
9459
-
9460
- /**
9461
- * Constructor to create a storage for our `EE` objects.
9462
- * An `Events` instance is a plain object whose properties are event names.
9463
- *
9464
- * @constructor
9465
- * @private
9466
- */
9467
- function Events() {}
9468
-
9469
- //
9470
- // We try to not inherit from `Object.prototype`. In some engines creating an
9471
- // instance in this way is faster than calling `Object.create(null)` directly.
9472
- // If `Object.create(null)` is not supported we prefix the event names with a
9473
- // character to make sure that the built-in object properties are not
9474
- // overridden or used as an attack vector.
9475
- //
9476
- if (Object.create) {
9477
- Events.prototype = Object.create(null);
9478
-
9479
- //
9480
- // This hack is needed because the `__proto__` property is still inherited in
9481
- // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
9482
- //
9483
- if (!new Events().__proto__) prefix = false;
9484
- }
9485
-
9486
- /**
9487
- * Representation of a single event listener.
9488
- *
9489
- * @param {Function} fn The listener function.
9490
- * @param {*} context The context to invoke the listener with.
9491
- * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
9492
- * @constructor
9493
- * @private
9494
- */
9495
- function EE(fn, context, once) {
9496
- this.fn = fn;
9497
- this.context = context;
9498
- this.once = once || false;
9499
- }
9500
-
9501
- /**
9502
- * Add a listener for a given event.
9503
- *
9504
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
9505
- * @param {(String|Symbol)} event The event name.
9506
- * @param {Function} fn The listener function.
9507
- * @param {*} context The context to invoke the listener with.
9508
- * @param {Boolean} once Specify if the listener is a one-time listener.
9509
- * @returns {EventEmitter}
9510
- * @private
9511
- */
9512
- function addListener(emitter, event, fn, context, once) {
9513
- if (typeof fn !== 'function') {
9514
- throw new TypeError('The listener must be a function');
9515
- }
9516
-
9517
- var listener = new EE(fn, context || emitter, once)
9518
- , evt = prefix ? prefix + event : event;
9519
-
9520
- if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
9521
- else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
9522
- else emitter._events[evt] = [emitter._events[evt], listener];
9523
-
9524
- return emitter;
9525
- }
9526
-
9527
- /**
9528
- * Clear event by name.
9529
- *
9530
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
9531
- * @param {(String|Symbol)} evt The Event name.
9532
- * @private
9533
- */
9534
- function clearEvent(emitter, evt) {
9535
- if (--emitter._eventsCount === 0) emitter._events = new Events();
9536
- else delete emitter._events[evt];
9537
- }
9538
-
9539
- /**
9540
- * Minimal `EventEmitter` interface that is molded against the Node.js
9541
- * `EventEmitter` interface.
9542
- *
9543
- * @constructor
9544
- * @public
9545
- */
9546
- function EventEmitter() {
9547
- this._events = new Events();
9548
- this._eventsCount = 0;
9549
- }
9550
-
9551
- /**
9552
- * Return an array listing the events for which the emitter has registered
9553
- * listeners.
9554
- *
9555
- * @returns {Array}
9556
- * @public
9557
- */
9558
- EventEmitter.prototype.eventNames = function eventNames() {
9559
- var names = []
9560
- , events
9561
- , name;
9562
-
9563
- if (this._eventsCount === 0) return names;
9564
-
9565
- for (name in (events = this._events)) {
9566
- if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
9567
- }
9568
-
9569
- if (Object.getOwnPropertySymbols) {
9570
- return names.concat(Object.getOwnPropertySymbols(events));
9571
- }
9572
-
9573
- return names;
9574
- };
9575
-
9576
- /**
9577
- * Return the listeners registered for a given event.
9578
- *
9579
- * @param {(String|Symbol)} event The event name.
9580
- * @returns {Array} The registered listeners.
9581
- * @public
9582
- */
9583
- EventEmitter.prototype.listeners = function listeners(event) {
9584
- var evt = prefix ? prefix + event : event
9585
- , handlers = this._events[evt];
9586
-
9587
- if (!handlers) return [];
9588
- if (handlers.fn) return [handlers.fn];
9589
-
9590
- for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
9591
- ee[i] = handlers[i].fn;
9592
- }
9593
-
9594
- return ee;
9595
- };
9596
-
9597
- /**
9598
- * Return the number of listeners listening to a given event.
9599
- *
9600
- * @param {(String|Symbol)} event The event name.
9601
- * @returns {Number} The number of listeners.
9602
- * @public
9603
- */
9604
- EventEmitter.prototype.listenerCount = function listenerCount(event) {
9605
- var evt = prefix ? prefix + event : event
9606
- , listeners = this._events[evt];
9607
-
9608
- if (!listeners) return 0;
9609
- if (listeners.fn) return 1;
9610
- return listeners.length;
9611
- };
9612
-
9613
- /**
9614
- * Calls each of the listeners registered for a given event.
9615
- *
9616
- * @param {(String|Symbol)} event The event name.
9617
- * @returns {Boolean} `true` if the event had listeners, else `false`.
9618
- * @public
9619
- */
9620
- EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
9621
- var evt = prefix ? prefix + event : event;
9622
-
9623
- if (!this._events[evt]) return false;
9624
-
9625
- var listeners = this._events[evt]
9626
- , len = arguments.length
9627
- , args
9628
- , i;
9629
-
9630
- if (listeners.fn) {
9631
- if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
9632
-
9633
- switch (len) {
9634
- case 1: return listeners.fn.call(listeners.context), true;
9635
- case 2: return listeners.fn.call(listeners.context, a1), true;
9636
- case 3: return listeners.fn.call(listeners.context, a1, a2), true;
9637
- case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
9638
- case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
9639
- case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
9640
- }
9641
-
9642
- for (i = 1, args = new Array(len -1); i < len; i++) {
9643
- args[i - 1] = arguments[i];
9644
- }
9645
-
9646
- listeners.fn.apply(listeners.context, args);
9647
- } else {
9648
- var length = listeners.length
9649
- , j;
9650
-
9651
- for (i = 0; i < length; i++) {
9652
- if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
9653
-
9654
- switch (len) {
9655
- case 1: listeners[i].fn.call(listeners[i].context); break;
9656
- case 2: listeners[i].fn.call(listeners[i].context, a1); break;
9657
- case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
9658
- case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
9659
- default:
9660
- if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
9661
- args[j - 1] = arguments[j];
9662
- }
9663
-
9664
- listeners[i].fn.apply(listeners[i].context, args);
9665
- }
9666
- }
9667
- }
9668
-
9669
- return true;
9670
- };
9671
-
9672
- /**
9673
- * Add a listener for a given event.
9674
- *
9675
- * @param {(String|Symbol)} event The event name.
9676
- * @param {Function} fn The listener function.
9677
- * @param {*} [context=this] The context to invoke the listener with.
9678
- * @returns {EventEmitter} `this`.
9679
- * @public
9680
- */
9681
- EventEmitter.prototype.on = function on(event, fn, context) {
9682
- return addListener(this, event, fn, context, false);
9683
- };
9684
-
9685
- /**
9686
- * Add a one-time listener for a given event.
9687
- *
9688
- * @param {(String|Symbol)} event The event name.
9689
- * @param {Function} fn The listener function.
9690
- * @param {*} [context=this] The context to invoke the listener with.
9691
- * @returns {EventEmitter} `this`.
9692
- * @public
9693
- */
9694
- EventEmitter.prototype.once = function once(event, fn, context) {
9695
- return addListener(this, event, fn, context, true);
9696
- };
9697
-
9698
- /**
9699
- * Remove the listeners of a given event.
9700
- *
9701
- * @param {(String|Symbol)} event The event name.
9702
- * @param {Function} fn Only remove the listeners that match this function.
9703
- * @param {*} context Only remove the listeners that have this context.
9704
- * @param {Boolean} once Only remove one-time listeners.
9705
- * @returns {EventEmitter} `this`.
9706
- * @public
9707
- */
9708
- EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
9709
- var evt = prefix ? prefix + event : event;
9710
-
9711
- if (!this._events[evt]) return this;
9712
- if (!fn) {
9713
- clearEvent(this, evt);
9714
- return this;
9715
- }
9716
-
9717
- var listeners = this._events[evt];
9718
-
9719
- if (listeners.fn) {
9720
- if (
9721
- listeners.fn === fn &&
9722
- (!once || listeners.once) &&
9723
- (!context || listeners.context === context)
9724
- ) {
9725
- clearEvent(this, evt);
9726
- }
9727
- } else {
9728
- for (var i = 0, events = [], length = listeners.length; i < length; i++) {
9729
- if (
9730
- listeners[i].fn !== fn ||
9731
- (once && !listeners[i].once) ||
9732
- (context && listeners[i].context !== context)
9733
- ) {
9734
- events.push(listeners[i]);
9735
- }
9736
- }
9737
-
9738
- //
9739
- // Reset the array, or remove it completely if we have no more listeners.
9740
- //
9741
- if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
9742
- else clearEvent(this, evt);
9743
- }
9744
-
9745
- return this;
9746
- };
9747
-
9748
- /**
9749
- * Remove all listeners, or those of the specified event.
9750
- *
9751
- * @param {(String|Symbol)} [event] The event name.
9752
- * @returns {EventEmitter} `this`.
9753
- * @public
9754
- */
9755
- EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
9756
- var evt;
9757
-
9758
- if (event) {
9759
- evt = prefix ? prefix + event : event;
9760
- if (this._events[evt]) clearEvent(this, evt);
9761
- } else {
9762
- this._events = new Events();
9763
- this._eventsCount = 0;
9764
- }
9765
-
9766
- return this;
9767
- };
9768
-
9769
- //
9770
- // Alias methods names because people roll like that.
9771
- //
9772
- EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
9773
- EventEmitter.prototype.addListener = EventEmitter.prototype.on;
9774
-
9775
- //
9776
- // Expose the prefix.
9777
- //
9778
- EventEmitter.prefixed = prefix;
9779
-
9780
- //
9781
- // Allow `EventEmitter` to be imported as module namespace.
9782
- //
9783
- EventEmitter.EventEmitter = EventEmitter;
9784
-
9785
- //
9786
- // Expose the module.
9787
- //
9788
- {
9789
- module.exports = EventEmitter;
9790
- }
9791
- } (eventemitter3));
9792
- return eventemitter3.exports;
9793
- }
9794
-
9795
- var eventemitter3Exports = requireEventemitter3();
9796
- var EventEmitter2 = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
9797
-
9798
9066
  // src/embedded-provider.ts
9799
9067
 
9800
9068
  // src/constants.ts
@@ -9806,7 +9074,7 @@ var EmbeddedSolanaChain = class {
9806
9074
  this.currentNetworkId = NetworkId.SOLANA_MAINNET;
9807
9075
  this._connected = false;
9808
9076
  this._publicKey = null;
9809
- this.eventEmitter = new EventEmitter2();
9077
+ this.eventEmitter = new EventEmitter3();
9810
9078
  this.setupEventListeners();
9811
9079
  this.syncInitialState();
9812
9080
  }
@@ -9830,7 +9098,7 @@ var EmbeddedSolanaChain = class {
9830
9098
  message: messageStr,
9831
9099
  networkId: this.currentNetworkId
9832
9100
  });
9833
- const signature = typeof result.signature === "string" ? new Uint8Array(bs582.decode(result.signature)) : result.signature;
9101
+ const signature = typeof result.signature === "string" ? new Uint8Array(bs58$1.decode(result.signature)) : result.signature;
9834
9102
  return {
9835
9103
  signature,
9836
9104
  publicKey: this._publicKey || ""
@@ -9936,7 +9204,7 @@ var EmbeddedEthereumChain = class {
9936
9204
  this.currentNetworkId = NetworkId.ETHEREUM_MAINNET;
9937
9205
  this._connected = false;
9938
9206
  this._accounts = [];
9939
- this.eventEmitter = new EventEmitter2();
9207
+ this.eventEmitter = new EventEmitter3();
9940
9208
  this.setupEventListeners();
9941
9209
  this.syncInitialState();
9942
9210
  }
@@ -10513,7 +9781,7 @@ var EmbeddedProvider$1 = class EmbeddedProvider {
10513
9781
  publicKey: stamperInfo.publicKey,
10514
9782
  platform: platformName
10515
9783
  });
10516
- const base64urlPublicKey = base64urlEncode(bs582.decode(stamperInfo.publicKey));
9784
+ const base64urlPublicKey = base64urlEncode(bs58$1.decode(stamperInfo.publicKey));
10517
9785
  const username = `user-${randomUUID()}`;
10518
9786
  const { organizationId } = await tempClient.createOrganization(organizationName, [
10519
9787
  {
@@ -11102,133 +10370,6 @@ var EmbeddedProvider$1 = class EmbeddedProvider {
11102
10370
  }
11103
10371
  };
11104
10372
 
11105
- // base-x encoding / decoding
11106
- // Copyright (c) 2018 base-x contributors
11107
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
11108
- // Distributed under the MIT software license, see the accompanying
11109
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
11110
- function base (ALPHABET) {
11111
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
11112
- const BASE_MAP = new Uint8Array(256);
11113
- for (let j = 0; j < BASE_MAP.length; j++) {
11114
- BASE_MAP[j] = 255;
11115
- }
11116
- for (let i = 0; i < ALPHABET.length; i++) {
11117
- const x = ALPHABET.charAt(i);
11118
- const xc = x.charCodeAt(0);
11119
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
11120
- BASE_MAP[xc] = i;
11121
- }
11122
- const BASE = ALPHABET.length;
11123
- const LEADER = ALPHABET.charAt(0);
11124
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
11125
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
11126
- function encode (source) {
11127
- // eslint-disable-next-line no-empty
11128
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
11129
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
11130
- } else if (Array.isArray(source)) {
11131
- source = Uint8Array.from(source);
11132
- }
11133
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
11134
- if (source.length === 0) { return '' }
11135
- // Skip & count leading zeroes.
11136
- let zeroes = 0;
11137
- let length = 0;
11138
- let pbegin = 0;
11139
- const pend = source.length;
11140
- while (pbegin !== pend && source[pbegin] === 0) {
11141
- pbegin++;
11142
- zeroes++;
11143
- }
11144
- // Allocate enough space in big-endian base58 representation.
11145
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
11146
- const b58 = new Uint8Array(size);
11147
- // Process the bytes.
11148
- while (pbegin !== pend) {
11149
- let carry = source[pbegin];
11150
- // Apply "b58 = b58 * 256 + ch".
11151
- let i = 0;
11152
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
11153
- carry += (256 * b58[it1]) >>> 0;
11154
- b58[it1] = (carry % BASE) >>> 0;
11155
- carry = (carry / BASE) >>> 0;
11156
- }
11157
- if (carry !== 0) { throw new Error('Non-zero carry') }
11158
- length = i;
11159
- pbegin++;
11160
- }
11161
- // Skip leading zeroes in base58 result.
11162
- let it2 = size - length;
11163
- while (it2 !== size && b58[it2] === 0) {
11164
- it2++;
11165
- }
11166
- // Translate the result into a string.
11167
- let str = LEADER.repeat(zeroes);
11168
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
11169
- return str
11170
- }
11171
- function decodeUnsafe (source) {
11172
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
11173
- if (source.length === 0) { return new Uint8Array() }
11174
- let psz = 0;
11175
- // Skip and count leading '1's.
11176
- let zeroes = 0;
11177
- let length = 0;
11178
- while (source[psz] === LEADER) {
11179
- zeroes++;
11180
- psz++;
11181
- }
11182
- // Allocate enough space in big-endian base256 representation.
11183
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
11184
- const b256 = new Uint8Array(size);
11185
- // Process the characters.
11186
- while (psz < source.length) {
11187
- // Find code of next character
11188
- const charCode = source.charCodeAt(psz);
11189
- // Base map can not be indexed using char code
11190
- if (charCode > 255) { return }
11191
- // Decode character
11192
- let carry = BASE_MAP[charCode];
11193
- // Invalid character
11194
- if (carry === 255) { return }
11195
- let i = 0;
11196
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
11197
- carry += (BASE * b256[it3]) >>> 0;
11198
- b256[it3] = (carry % 256) >>> 0;
11199
- carry = (carry / 256) >>> 0;
11200
- }
11201
- if (carry !== 0) { throw new Error('Non-zero carry') }
11202
- length = i;
11203
- psz++;
11204
- }
11205
- // Skip leading zeroes in b256.
11206
- let it4 = size - length;
11207
- while (it4 !== size && b256[it4] === 0) {
11208
- it4++;
11209
- }
11210
- const vch = new Uint8Array(zeroes + (size - it4));
11211
- let j = zeroes;
11212
- while (it4 !== size) {
11213
- vch[j++] = b256[it4++];
11214
- }
11215
- return vch
11216
- }
11217
- function decode (string) {
11218
- const buffer = decodeUnsafe(string);
11219
- if (buffer) { return buffer }
11220
- throw new Error('Non-base' + BASE + ' character')
11221
- }
11222
- return {
11223
- encode,
11224
- decodeUnsafe,
11225
- decode
11226
- }
11227
- }
11228
-
11229
- var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
11230
- var bs58 = base(ALPHABET);
11231
-
11232
10373
  // src/index.ts
11233
10374
  var IndexedDbStamper = class {
11234
10375
  // Optional for PKI, required for OIDC
@@ -11302,14 +10443,14 @@ var IndexedDbStamper = class {
11302
10443
  const salt = params.type === "OIDC" ? params.salt : this.salt;
11303
10444
  const stampData = stampType === "PKI" ? {
11304
10445
  // Decode base58 public key to bytes, then encode as base64url (consistent with ApiKeyStamper)
11305
- publicKey: base64urlEncode(bs58.decode(this.activeKeyPairRecord.keyInfo.publicKey)),
10446
+ publicKey: base64urlEncode(bs58$1.decode(this.activeKeyPairRecord.keyInfo.publicKey)),
11306
10447
  signature: signatureBase64url,
11307
10448
  kind: "PKI",
11308
10449
  algorithm: this.algorithm
11309
10450
  } : {
11310
10451
  kind: "OIDC",
11311
10452
  idToken,
11312
- publicKey: base64urlEncode(bs58.decode(this.activeKeyPairRecord.keyInfo.publicKey)),
10453
+ publicKey: base64urlEncode(bs58$1.decode(this.activeKeyPairRecord.keyInfo.publicKey)),
11313
10454
  salt,
11314
10455
  algorithm: this.algorithm,
11315
10456
  signature: signatureBase64url
@@ -11412,7 +10553,7 @@ var IndexedDbStamper = class {
11412
10553
  ["sign", "verify"]
11413
10554
  );
11414
10555
  const rawPublicKeyBuffer = await crypto.subtle.exportKey("raw", keyPair.publicKey);
11415
- const publicKeyBase58 = bs58.encode(new Uint8Array(rawPublicKeyBuffer));
10556
+ const publicKeyBase58 = bs58$1.encode(new Uint8Array(rawPublicKeyBuffer));
11416
10557
  const keyIdBuffer = await crypto.subtle.digest("SHA-256", rawPublicKeyBuffer);
11417
10558
  const keyId = base64urlEncode(new Uint8Array(keyIdBuffer)).substring(0, 16);
11418
10559
  const now = Date.now();
@@ -16742,4 +15883,4 @@ function ConnectBox({ maxWidth = "350px", transparent = false, appIcon, appName
16742
15883
  }
16743
15884
 
16744
15885
  export { DerivationInfoAddressFormatEnum as AddressType, ConnectBox, ConnectButton, DebugLevel, NetworkId, PhantomProvider, darkTheme, debug, isMobileDevice, lightTheme, mergeTheme, useAccounts, useAutoConfirm, useConnect, useDisconnect, useDiscoveredWallets, useEthereum, useIsExtensionInstalled, useIsPhantomLoginAvailable, useModal, usePhantom, useSolana, useTheme };
16745
- //# sourceMappingURL=index-BbtYb8sE.esm.js.map
15886
+ //# sourceMappingURL=index-DCo85UGg.esm.js.map