@pooflabs/web 0.0.80 → 0.0.81-rc1

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-BhfNMrC0.js → index-BSL3D7PC.js} +25 -883
  3. package/dist/index-BSL3D7PC.js.map +1 -0
  4. package/dist/{index-BNyxZ82q.js → index-BU6puWaY.js} +279 -275
  5. package/dist/index-BU6puWaY.js.map +1 -0
  6. package/dist/index-Bdcc5821.js +2375 -0
  7. package/dist/index-Bdcc5821.js.map +1 -0
  8. package/dist/{index-Db0NqU8R.esm.js → index-Cpw11-0x.esm.js} +279 -276
  9. package/dist/index-Cpw11-0x.esm.js.map +1 -0
  10. package/dist/index-CrOVJFX9.esm.js +2373 -0
  11. package/dist/index-CrOVJFX9.esm.js.map +1 -0
  12. package/dist/{index-COIUWugk.esm.js → index-CtwdL0-L.esm.js} +23 -881
  13. package/dist/index-CtwdL0-L.esm.js.map +1 -0
  14. package/dist/{index-BbtYb8sE.esm.js → index-DLfRKZI7.esm.js} +24 -882
  15. package/dist/index-DLfRKZI7.esm.js.map +1 -0
  16. package/dist/{index-BVi7fTm2.js → index-Fo9o33oZ.js} +24 -882
  17. package/dist/index-Fo9o33oZ.js.map +1 -0
  18. package/dist/index.browser-9JJy5Y7o.esm.js +119 -0
  19. package/dist/index.browser-9JJy5Y7o.esm.js.map +1 -0
  20. package/dist/index.browser-B4RzFwu2.js +1253 -0
  21. package/dist/index.browser-B4RzFwu2.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-CGfTdDXe.js} +1367 -1697
  25. package/dist/index.browser-CGfTdDXe.js.map +1 -0
  26. package/dist/index.browser-CQUvzkLr.js +122 -0
  27. package/dist/index.browser-CQUvzkLr.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-Dzo4A2XB.esm.js +1250 -0
  31. package/dist/index.browser-Dzo4A2XB.esm.js.map +1 -0
  32. package/dist/{index.browser-BuHl80dp.esm.js → index.browser-HEDpODB5.esm.js} +1367 -1697
  33. package/dist/index.browser-HEDpODB5.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-DYI4vw0X.js} +186 -2669
  37. package/dist/index.native-DYI4vw0X.js.map +1 -0
  38. package/dist/{index.native-DuKhZcus.esm.js → index.native-UxpBL0TA.esm.js} +187 -2669
  39. package/dist/index.native-UxpBL0TA.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-BPSAXPZ6.js} +127 -11
  43. package/dist/{phantom-wallet-provider-Cg-srwP4.js.map → phantom-wallet-provider-BPSAXPZ6.js.map} +1 -1
  44. package/dist/{phantom-wallet-provider--BJjVUA1.esm.js → phantom-wallet-provider-DcMJW18_.esm.js} +127 -11
  45. package/dist/{phantom-wallet-provider--BJjVUA1.esm.js.map → phantom-wallet-provider-DcMJW18_.esm.js.map} +1 -1
  46. package/dist/{privy-wallet-provider-BLcur3Ue.esm.js → privy-wallet-provider-CtIl8FgH.esm.js} +3 -3
  47. package/dist/privy-wallet-provider-CtIl8FgH.esm.js.map +1 -0
  48. package/dist/{privy-wallet-provider-DpNVyaXa.js → privy-wallet-provider-Zu5K_vNN.js} +3 -3
  49. package/dist/privy-wallet-provider-Zu5K_vNN.js.map +1 -0
  50. package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js → solana-mobile-wallet-provider-C31APzEp.esm.js} +4 -4
  51. package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js.map → solana-mobile-wallet-provider-C31APzEp.esm.js.map} +1 -1
  52. package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js → solana-mobile-wallet-provider-Dg9_h3QI.js} +4 -4
  53. package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js.map → solana-mobile-wallet-provider-Dg9_h3QI.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
@@ -2,8 +2,8 @@
2
2
 
3
3
  var React = require('react');
4
4
  var globalAxios = require('axios');
5
- var index = require('./index-CSraUgD6.js');
6
- var index_native = require('./index.native-DUnE51Mx.js');
5
+ var index = require('./index-Bdcc5821.js');
6
+ var index_native = require('./index.native-DYI4vw0X.js');
7
7
  var web3_js = require('@solana/web3.js');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
  require('@coral-xyz/anchor');
@@ -1151,17 +1151,17 @@ function requireSrc () {
1151
1151
  return src;
1152
1152
  }
1153
1153
 
1154
- var bs58$3;
1154
+ var bs58;
1155
1155
  var hasRequiredBs58;
1156
1156
 
1157
1157
  function requireBs58 () {
1158
- if (hasRequiredBs58) return bs58$3;
1158
+ if (hasRequiredBs58) return bs58;
1159
1159
  hasRequiredBs58 = 1;
1160
1160
  const basex = requireSrc();
1161
1161
  const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
1162
1162
 
1163
- bs58$3 = basex(ALPHABET);
1164
- return bs58$3;
1163
+ bs58 = basex(ALPHABET);
1164
+ return bs58;
1165
1165
  }
1166
1166
 
1167
1167
  requireBs58();
@@ -3121,13 +3121,13 @@ function createAutoConfirmPlugin() {
3121
3121
  };
3122
3122
  }
3123
3123
 
3124
- var eventemitter3$1 = {exports: {}};
3124
+ var eventemitter3 = {exports: {}};
3125
3125
 
3126
- var hasRequiredEventemitter3$1;
3126
+ var hasRequiredEventemitter3;
3127
3127
 
3128
- function requireEventemitter3$1 () {
3129
- if (hasRequiredEventemitter3$1) return eventemitter3$1.exports;
3130
- hasRequiredEventemitter3$1 = 1;
3128
+ function requireEventemitter3 () {
3129
+ if (hasRequiredEventemitter3) return eventemitter3.exports;
3130
+ hasRequiredEventemitter3 = 1;
3131
3131
  (function (module) {
3132
3132
 
3133
3133
  var has = Object.prototype.hasOwnProperty
@@ -3464,12 +3464,12 @@ function requireEventemitter3$1 () {
3464
3464
  {
3465
3465
  module.exports = EventEmitter;
3466
3466
  }
3467
- } (eventemitter3$1));
3468
- return eventemitter3$1.exports;
3467
+ } (eventemitter3));
3468
+ return eventemitter3.exports;
3469
3469
  }
3470
3470
 
3471
- var eventemitter3Exports$1 = requireEventemitter3$1();
3472
- var EventEmitter3 = /*@__PURE__*/index_native.getDefaultExportFromCjs(eventemitter3Exports$1);
3471
+ var eventemitter3Exports = requireEventemitter3();
3472
+ var EventEmitter3 = /*@__PURE__*/index_native.getDefaultExportFromCjs(eventemitter3Exports);
3473
3473
 
3474
3474
  // src/index.ts
3475
3475
  var isBrowser = typeof window !== "undefined" && typeof window.btoa !== "undefined";
@@ -8798,133 +8798,6 @@ class Transaction {
8798
8798
  }
8799
8799
  }
8800
8800
 
8801
- // base-x encoding / decoding
8802
- // Copyright (c) 2018 base-x contributors
8803
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
8804
- // Distributed under the MIT software license, see the accompanying
8805
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
8806
- function base$3 (ALPHABET) {
8807
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
8808
- const BASE_MAP = new Uint8Array(256);
8809
- for (let j = 0; j < BASE_MAP.length; j++) {
8810
- BASE_MAP[j] = 255;
8811
- }
8812
- for (let i = 0; i < ALPHABET.length; i++) {
8813
- const x = ALPHABET.charAt(i);
8814
- const xc = x.charCodeAt(0);
8815
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
8816
- BASE_MAP[xc] = i;
8817
- }
8818
- const BASE = ALPHABET.length;
8819
- const LEADER = ALPHABET.charAt(0);
8820
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
8821
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
8822
- function encode (source) {
8823
- // eslint-disable-next-line no-empty
8824
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
8825
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
8826
- } else if (Array.isArray(source)) {
8827
- source = Uint8Array.from(source);
8828
- }
8829
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
8830
- if (source.length === 0) { return '' }
8831
- // Skip & count leading zeroes.
8832
- let zeroes = 0;
8833
- let length = 0;
8834
- let pbegin = 0;
8835
- const pend = source.length;
8836
- while (pbegin !== pend && source[pbegin] === 0) {
8837
- pbegin++;
8838
- zeroes++;
8839
- }
8840
- // Allocate enough space in big-endian base58 representation.
8841
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
8842
- const b58 = new Uint8Array(size);
8843
- // Process the bytes.
8844
- while (pbegin !== pend) {
8845
- let carry = source[pbegin];
8846
- // Apply "b58 = b58 * 256 + ch".
8847
- let i = 0;
8848
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
8849
- carry += (256 * b58[it1]) >>> 0;
8850
- b58[it1] = (carry % BASE) >>> 0;
8851
- carry = (carry / BASE) >>> 0;
8852
- }
8853
- if (carry !== 0) { throw new Error('Non-zero carry') }
8854
- length = i;
8855
- pbegin++;
8856
- }
8857
- // Skip leading zeroes in base58 result.
8858
- let it2 = size - length;
8859
- while (it2 !== size && b58[it2] === 0) {
8860
- it2++;
8861
- }
8862
- // Translate the result into a string.
8863
- let str = LEADER.repeat(zeroes);
8864
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
8865
- return str
8866
- }
8867
- function decodeUnsafe (source) {
8868
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
8869
- if (source.length === 0) { return new Uint8Array() }
8870
- let psz = 0;
8871
- // Skip and count leading '1's.
8872
- let zeroes = 0;
8873
- let length = 0;
8874
- while (source[psz] === LEADER) {
8875
- zeroes++;
8876
- psz++;
8877
- }
8878
- // Allocate enough space in big-endian base256 representation.
8879
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
8880
- const b256 = new Uint8Array(size);
8881
- // Process the characters.
8882
- while (psz < source.length) {
8883
- // Find code of next character
8884
- const charCode = source.charCodeAt(psz);
8885
- // Base map can not be indexed using char code
8886
- if (charCode > 255) { return }
8887
- // Decode character
8888
- let carry = BASE_MAP[charCode];
8889
- // Invalid character
8890
- if (carry === 255) { return }
8891
- let i = 0;
8892
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
8893
- carry += (BASE * b256[it3]) >>> 0;
8894
- b256[it3] = (carry % 256) >>> 0;
8895
- carry = (carry / 256) >>> 0;
8896
- }
8897
- if (carry !== 0) { throw new Error('Non-zero carry') }
8898
- length = i;
8899
- psz++;
8900
- }
8901
- // Skip leading zeroes in b256.
8902
- let it4 = size - length;
8903
- while (it4 !== size && b256[it4] === 0) {
8904
- it4++;
8905
- }
8906
- const vch = new Uint8Array(zeroes + (size - it4));
8907
- let j = zeroes;
8908
- while (it4 !== size) {
8909
- vch[j++] = b256[it4++];
8910
- }
8911
- return vch
8912
- }
8913
- function decode (string) {
8914
- const buffer = decodeUnsafe(string);
8915
- if (buffer) { return buffer }
8916
- throw new Error('Non-base' + BASE + ' character')
8917
- }
8918
- return {
8919
- encode,
8920
- decodeUnsafe,
8921
- decode
8922
- }
8923
- }
8924
-
8925
- var ALPHABET$3 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
8926
- var bs58$2 = base$3(ALPHABET$3);
8927
-
8928
8801
  // src/index.ts
8929
8802
  function parseSignMessageResponse(base64Response, networkId) {
8930
8803
  const networkPrefix = networkId.split(":")[0].toLowerCase();
@@ -8971,7 +8844,7 @@ function parseTransactionResponse(base64RawTransaction, networkId, hash) {
8971
8844
  function parseSolanaSignatureResponse(base64Response) {
8972
8845
  try {
8973
8846
  const signatureBytes = base64urlDecode(base64Response);
8974
- const signature = bs58$2.encode(signatureBytes);
8847
+ const signature = index_native.bs58.encode(signatureBytes);
8975
8848
  return {
8976
8849
  signature,
8977
8850
  rawSignature: base64Response
@@ -9211,610 +9084,6 @@ function parseBitcoinTransactionToBase64Url(transaction) {
9211
9084
  throw new Error("Unsupported Bitcoin transaction format");
9212
9085
  }
9213
9086
 
9214
- // base-x encoding / decoding
9215
- // Copyright (c) 2018 base-x contributors
9216
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
9217
- // Distributed under the MIT software license, see the accompanying
9218
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
9219
- function base$2 (ALPHABET) {
9220
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
9221
- const BASE_MAP = new Uint8Array(256);
9222
- for (let j = 0; j < BASE_MAP.length; j++) {
9223
- BASE_MAP[j] = 255;
9224
- }
9225
- for (let i = 0; i < ALPHABET.length; i++) {
9226
- const x = ALPHABET.charAt(i);
9227
- const xc = x.charCodeAt(0);
9228
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
9229
- BASE_MAP[xc] = i;
9230
- }
9231
- const BASE = ALPHABET.length;
9232
- const LEADER = ALPHABET.charAt(0);
9233
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
9234
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
9235
- function encode (source) {
9236
- // eslint-disable-next-line no-empty
9237
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
9238
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
9239
- } else if (Array.isArray(source)) {
9240
- source = Uint8Array.from(source);
9241
- }
9242
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
9243
- if (source.length === 0) { return '' }
9244
- // Skip & count leading zeroes.
9245
- let zeroes = 0;
9246
- let length = 0;
9247
- let pbegin = 0;
9248
- const pend = source.length;
9249
- while (pbegin !== pend && source[pbegin] === 0) {
9250
- pbegin++;
9251
- zeroes++;
9252
- }
9253
- // Allocate enough space in big-endian base58 representation.
9254
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
9255
- const b58 = new Uint8Array(size);
9256
- // Process the bytes.
9257
- while (pbegin !== pend) {
9258
- let carry = source[pbegin];
9259
- // Apply "b58 = b58 * 256 + ch".
9260
- let i = 0;
9261
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
9262
- carry += (256 * b58[it1]) >>> 0;
9263
- b58[it1] = (carry % BASE) >>> 0;
9264
- carry = (carry / BASE) >>> 0;
9265
- }
9266
- if (carry !== 0) { throw new Error('Non-zero carry') }
9267
- length = i;
9268
- pbegin++;
9269
- }
9270
- // Skip leading zeroes in base58 result.
9271
- let it2 = size - length;
9272
- while (it2 !== size && b58[it2] === 0) {
9273
- it2++;
9274
- }
9275
- // Translate the result into a string.
9276
- let str = LEADER.repeat(zeroes);
9277
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
9278
- return str
9279
- }
9280
- function decodeUnsafe (source) {
9281
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
9282
- if (source.length === 0) { return new Uint8Array() }
9283
- let psz = 0;
9284
- // Skip and count leading '1's.
9285
- let zeroes = 0;
9286
- let length = 0;
9287
- while (source[psz] === LEADER) {
9288
- zeroes++;
9289
- psz++;
9290
- }
9291
- // Allocate enough space in big-endian base256 representation.
9292
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
9293
- const b256 = new Uint8Array(size);
9294
- // Process the characters.
9295
- while (psz < source.length) {
9296
- // Find code of next character
9297
- const charCode = source.charCodeAt(psz);
9298
- // Base map can not be indexed using char code
9299
- if (charCode > 255) { return }
9300
- // Decode character
9301
- let carry = BASE_MAP[charCode];
9302
- // Invalid character
9303
- if (carry === 255) { return }
9304
- let i = 0;
9305
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
9306
- carry += (BASE * b256[it3]) >>> 0;
9307
- b256[it3] = (carry % 256) >>> 0;
9308
- carry = (carry / 256) >>> 0;
9309
- }
9310
- if (carry !== 0) { throw new Error('Non-zero carry') }
9311
- length = i;
9312
- psz++;
9313
- }
9314
- // Skip leading zeroes in b256.
9315
- let it4 = size - length;
9316
- while (it4 !== size && b256[it4] === 0) {
9317
- it4++;
9318
- }
9319
- const vch = new Uint8Array(zeroes + (size - it4));
9320
- let j = zeroes;
9321
- while (it4 !== size) {
9322
- vch[j++] = b256[it4++];
9323
- }
9324
- return vch
9325
- }
9326
- function decode (string) {
9327
- const buffer = decodeUnsafe(string);
9328
- if (buffer) { return buffer }
9329
- throw new Error('Non-base' + BASE + ' character')
9330
- }
9331
- return {
9332
- encode,
9333
- decodeUnsafe,
9334
- decode
9335
- }
9336
- }
9337
-
9338
- var ALPHABET$2 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9339
- var bs58$1 = base$2(ALPHABET$2);
9340
-
9341
- // base-x encoding / decoding
9342
- // Copyright (c) 2018 base-x contributors
9343
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
9344
- // Distributed under the MIT software license, see the accompanying
9345
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
9346
- function base$1 (ALPHABET) {
9347
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
9348
- const BASE_MAP = new Uint8Array(256);
9349
- for (let j = 0; j < BASE_MAP.length; j++) {
9350
- BASE_MAP[j] = 255;
9351
- }
9352
- for (let i = 0; i < ALPHABET.length; i++) {
9353
- const x = ALPHABET.charAt(i);
9354
- const xc = x.charCodeAt(0);
9355
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
9356
- BASE_MAP[xc] = i;
9357
- }
9358
- const BASE = ALPHABET.length;
9359
- const LEADER = ALPHABET.charAt(0);
9360
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
9361
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
9362
- function encode (source) {
9363
- // eslint-disable-next-line no-empty
9364
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
9365
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
9366
- } else if (Array.isArray(source)) {
9367
- source = Uint8Array.from(source);
9368
- }
9369
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
9370
- if (source.length === 0) { return '' }
9371
- // Skip & count leading zeroes.
9372
- let zeroes = 0;
9373
- let length = 0;
9374
- let pbegin = 0;
9375
- const pend = source.length;
9376
- while (pbegin !== pend && source[pbegin] === 0) {
9377
- pbegin++;
9378
- zeroes++;
9379
- }
9380
- // Allocate enough space in big-endian base58 representation.
9381
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
9382
- const b58 = new Uint8Array(size);
9383
- // Process the bytes.
9384
- while (pbegin !== pend) {
9385
- let carry = source[pbegin];
9386
- // Apply "b58 = b58 * 256 + ch".
9387
- let i = 0;
9388
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
9389
- carry += (256 * b58[it1]) >>> 0;
9390
- b58[it1] = (carry % BASE) >>> 0;
9391
- carry = (carry / BASE) >>> 0;
9392
- }
9393
- if (carry !== 0) { throw new Error('Non-zero carry') }
9394
- length = i;
9395
- pbegin++;
9396
- }
9397
- // Skip leading zeroes in base58 result.
9398
- let it2 = size - length;
9399
- while (it2 !== size && b58[it2] === 0) {
9400
- it2++;
9401
- }
9402
- // Translate the result into a string.
9403
- let str = LEADER.repeat(zeroes);
9404
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
9405
- return str
9406
- }
9407
- function decodeUnsafe (source) {
9408
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
9409
- if (source.length === 0) { return new Uint8Array() }
9410
- let psz = 0;
9411
- // Skip and count leading '1's.
9412
- let zeroes = 0;
9413
- let length = 0;
9414
- while (source[psz] === LEADER) {
9415
- zeroes++;
9416
- psz++;
9417
- }
9418
- // Allocate enough space in big-endian base256 representation.
9419
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
9420
- const b256 = new Uint8Array(size);
9421
- // Process the characters.
9422
- while (psz < source.length) {
9423
- // Find code of next character
9424
- const charCode = source.charCodeAt(psz);
9425
- // Base map can not be indexed using char code
9426
- if (charCode > 255) { return }
9427
- // Decode character
9428
- let carry = BASE_MAP[charCode];
9429
- // Invalid character
9430
- if (carry === 255) { return }
9431
- let i = 0;
9432
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
9433
- carry += (BASE * b256[it3]) >>> 0;
9434
- b256[it3] = (carry % 256) >>> 0;
9435
- carry = (carry / 256) >>> 0;
9436
- }
9437
- if (carry !== 0) { throw new Error('Non-zero carry') }
9438
- length = i;
9439
- psz++;
9440
- }
9441
- // Skip leading zeroes in b256.
9442
- let it4 = size - length;
9443
- while (it4 !== size && b256[it4] === 0) {
9444
- it4++;
9445
- }
9446
- const vch = new Uint8Array(zeroes + (size - it4));
9447
- let j = zeroes;
9448
- while (it4 !== size) {
9449
- vch[j++] = b256[it4++];
9450
- }
9451
- return vch
9452
- }
9453
- function decode (string) {
9454
- const buffer = decodeUnsafe(string);
9455
- if (buffer) { return buffer }
9456
- throw new Error('Non-base' + BASE + ' character')
9457
- }
9458
- return {
9459
- encode,
9460
- decodeUnsafe,
9461
- decode
9462
- }
9463
- }
9464
-
9465
- var ALPHABET$1 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9466
- var bs582 = base$1(ALPHABET$1);
9467
-
9468
- var eventemitter3 = {exports: {}};
9469
-
9470
- var hasRequiredEventemitter3;
9471
-
9472
- function requireEventemitter3 () {
9473
- if (hasRequiredEventemitter3) return eventemitter3.exports;
9474
- hasRequiredEventemitter3 = 1;
9475
- (function (module) {
9476
-
9477
- var has = Object.prototype.hasOwnProperty
9478
- , prefix = '~';
9479
-
9480
- /**
9481
- * Constructor to create a storage for our `EE` objects.
9482
- * An `Events` instance is a plain object whose properties are event names.
9483
- *
9484
- * @constructor
9485
- * @private
9486
- */
9487
- function Events() {}
9488
-
9489
- //
9490
- // We try to not inherit from `Object.prototype`. In some engines creating an
9491
- // instance in this way is faster than calling `Object.create(null)` directly.
9492
- // If `Object.create(null)` is not supported we prefix the event names with a
9493
- // character to make sure that the built-in object properties are not
9494
- // overridden or used as an attack vector.
9495
- //
9496
- if (Object.create) {
9497
- Events.prototype = Object.create(null);
9498
-
9499
- //
9500
- // This hack is needed because the `__proto__` property is still inherited in
9501
- // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
9502
- //
9503
- if (!new Events().__proto__) prefix = false;
9504
- }
9505
-
9506
- /**
9507
- * Representation of a single event listener.
9508
- *
9509
- * @param {Function} fn The listener function.
9510
- * @param {*} context The context to invoke the listener with.
9511
- * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
9512
- * @constructor
9513
- * @private
9514
- */
9515
- function EE(fn, context, once) {
9516
- this.fn = fn;
9517
- this.context = context;
9518
- this.once = once || false;
9519
- }
9520
-
9521
- /**
9522
- * Add a listener for a given event.
9523
- *
9524
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
9525
- * @param {(String|Symbol)} event The event name.
9526
- * @param {Function} fn The listener function.
9527
- * @param {*} context The context to invoke the listener with.
9528
- * @param {Boolean} once Specify if the listener is a one-time listener.
9529
- * @returns {EventEmitter}
9530
- * @private
9531
- */
9532
- function addListener(emitter, event, fn, context, once) {
9533
- if (typeof fn !== 'function') {
9534
- throw new TypeError('The listener must be a function');
9535
- }
9536
-
9537
- var listener = new EE(fn, context || emitter, once)
9538
- , evt = prefix ? prefix + event : event;
9539
-
9540
- if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
9541
- else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
9542
- else emitter._events[evt] = [emitter._events[evt], listener];
9543
-
9544
- return emitter;
9545
- }
9546
-
9547
- /**
9548
- * Clear event by name.
9549
- *
9550
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
9551
- * @param {(String|Symbol)} evt The Event name.
9552
- * @private
9553
- */
9554
- function clearEvent(emitter, evt) {
9555
- if (--emitter._eventsCount === 0) emitter._events = new Events();
9556
- else delete emitter._events[evt];
9557
- }
9558
-
9559
- /**
9560
- * Minimal `EventEmitter` interface that is molded against the Node.js
9561
- * `EventEmitter` interface.
9562
- *
9563
- * @constructor
9564
- * @public
9565
- */
9566
- function EventEmitter() {
9567
- this._events = new Events();
9568
- this._eventsCount = 0;
9569
- }
9570
-
9571
- /**
9572
- * Return an array listing the events for which the emitter has registered
9573
- * listeners.
9574
- *
9575
- * @returns {Array}
9576
- * @public
9577
- */
9578
- EventEmitter.prototype.eventNames = function eventNames() {
9579
- var names = []
9580
- , events
9581
- , name;
9582
-
9583
- if (this._eventsCount === 0) return names;
9584
-
9585
- for (name in (events = this._events)) {
9586
- if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
9587
- }
9588
-
9589
- if (Object.getOwnPropertySymbols) {
9590
- return names.concat(Object.getOwnPropertySymbols(events));
9591
- }
9592
-
9593
- return names;
9594
- };
9595
-
9596
- /**
9597
- * Return the listeners registered for a given event.
9598
- *
9599
- * @param {(String|Symbol)} event The event name.
9600
- * @returns {Array} The registered listeners.
9601
- * @public
9602
- */
9603
- EventEmitter.prototype.listeners = function listeners(event) {
9604
- var evt = prefix ? prefix + event : event
9605
- , handlers = this._events[evt];
9606
-
9607
- if (!handlers) return [];
9608
- if (handlers.fn) return [handlers.fn];
9609
-
9610
- for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
9611
- ee[i] = handlers[i].fn;
9612
- }
9613
-
9614
- return ee;
9615
- };
9616
-
9617
- /**
9618
- * Return the number of listeners listening to a given event.
9619
- *
9620
- * @param {(String|Symbol)} event The event name.
9621
- * @returns {Number} The number of listeners.
9622
- * @public
9623
- */
9624
- EventEmitter.prototype.listenerCount = function listenerCount(event) {
9625
- var evt = prefix ? prefix + event : event
9626
- , listeners = this._events[evt];
9627
-
9628
- if (!listeners) return 0;
9629
- if (listeners.fn) return 1;
9630
- return listeners.length;
9631
- };
9632
-
9633
- /**
9634
- * Calls each of the listeners registered for a given event.
9635
- *
9636
- * @param {(String|Symbol)} event The event name.
9637
- * @returns {Boolean} `true` if the event had listeners, else `false`.
9638
- * @public
9639
- */
9640
- EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
9641
- var evt = prefix ? prefix + event : event;
9642
-
9643
- if (!this._events[evt]) return false;
9644
-
9645
- var listeners = this._events[evt]
9646
- , len = arguments.length
9647
- , args
9648
- , i;
9649
-
9650
- if (listeners.fn) {
9651
- if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
9652
-
9653
- switch (len) {
9654
- case 1: return listeners.fn.call(listeners.context), true;
9655
- case 2: return listeners.fn.call(listeners.context, a1), true;
9656
- case 3: return listeners.fn.call(listeners.context, a1, a2), true;
9657
- case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
9658
- case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
9659
- case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
9660
- }
9661
-
9662
- for (i = 1, args = new Array(len -1); i < len; i++) {
9663
- args[i - 1] = arguments[i];
9664
- }
9665
-
9666
- listeners.fn.apply(listeners.context, args);
9667
- } else {
9668
- var length = listeners.length
9669
- , j;
9670
-
9671
- for (i = 0; i < length; i++) {
9672
- if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
9673
-
9674
- switch (len) {
9675
- case 1: listeners[i].fn.call(listeners[i].context); break;
9676
- case 2: listeners[i].fn.call(listeners[i].context, a1); break;
9677
- case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
9678
- case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
9679
- default:
9680
- if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
9681
- args[j - 1] = arguments[j];
9682
- }
9683
-
9684
- listeners[i].fn.apply(listeners[i].context, args);
9685
- }
9686
- }
9687
- }
9688
-
9689
- return true;
9690
- };
9691
-
9692
- /**
9693
- * Add a listener for a given event.
9694
- *
9695
- * @param {(String|Symbol)} event The event name.
9696
- * @param {Function} fn The listener function.
9697
- * @param {*} [context=this] The context to invoke the listener with.
9698
- * @returns {EventEmitter} `this`.
9699
- * @public
9700
- */
9701
- EventEmitter.prototype.on = function on(event, fn, context) {
9702
- return addListener(this, event, fn, context, false);
9703
- };
9704
-
9705
- /**
9706
- * Add a one-time listener for a given event.
9707
- *
9708
- * @param {(String|Symbol)} event The event name.
9709
- * @param {Function} fn The listener function.
9710
- * @param {*} [context=this] The context to invoke the listener with.
9711
- * @returns {EventEmitter} `this`.
9712
- * @public
9713
- */
9714
- EventEmitter.prototype.once = function once(event, fn, context) {
9715
- return addListener(this, event, fn, context, true);
9716
- };
9717
-
9718
- /**
9719
- * Remove the listeners of a given event.
9720
- *
9721
- * @param {(String|Symbol)} event The event name.
9722
- * @param {Function} fn Only remove the listeners that match this function.
9723
- * @param {*} context Only remove the listeners that have this context.
9724
- * @param {Boolean} once Only remove one-time listeners.
9725
- * @returns {EventEmitter} `this`.
9726
- * @public
9727
- */
9728
- EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
9729
- var evt = prefix ? prefix + event : event;
9730
-
9731
- if (!this._events[evt]) return this;
9732
- if (!fn) {
9733
- clearEvent(this, evt);
9734
- return this;
9735
- }
9736
-
9737
- var listeners = this._events[evt];
9738
-
9739
- if (listeners.fn) {
9740
- if (
9741
- listeners.fn === fn &&
9742
- (!once || listeners.once) &&
9743
- (!context || listeners.context === context)
9744
- ) {
9745
- clearEvent(this, evt);
9746
- }
9747
- } else {
9748
- for (var i = 0, events = [], length = listeners.length; i < length; i++) {
9749
- if (
9750
- listeners[i].fn !== fn ||
9751
- (once && !listeners[i].once) ||
9752
- (context && listeners[i].context !== context)
9753
- ) {
9754
- events.push(listeners[i]);
9755
- }
9756
- }
9757
-
9758
- //
9759
- // Reset the array, or remove it completely if we have no more listeners.
9760
- //
9761
- if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
9762
- else clearEvent(this, evt);
9763
- }
9764
-
9765
- return this;
9766
- };
9767
-
9768
- /**
9769
- * Remove all listeners, or those of the specified event.
9770
- *
9771
- * @param {(String|Symbol)} [event] The event name.
9772
- * @returns {EventEmitter} `this`.
9773
- * @public
9774
- */
9775
- EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
9776
- var evt;
9777
-
9778
- if (event) {
9779
- evt = prefix ? prefix + event : event;
9780
- if (this._events[evt]) clearEvent(this, evt);
9781
- } else {
9782
- this._events = new Events();
9783
- this._eventsCount = 0;
9784
- }
9785
-
9786
- return this;
9787
- };
9788
-
9789
- //
9790
- // Alias methods names because people roll like that.
9791
- //
9792
- EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
9793
- EventEmitter.prototype.addListener = EventEmitter.prototype.on;
9794
-
9795
- //
9796
- // Expose the prefix.
9797
- //
9798
- EventEmitter.prefixed = prefix;
9799
-
9800
- //
9801
- // Allow `EventEmitter` to be imported as module namespace.
9802
- //
9803
- EventEmitter.EventEmitter = EventEmitter;
9804
-
9805
- //
9806
- // Expose the module.
9807
- //
9808
- {
9809
- module.exports = EventEmitter;
9810
- }
9811
- } (eventemitter3));
9812
- return eventemitter3.exports;
9813
- }
9814
-
9815
- var eventemitter3Exports = requireEventemitter3();
9816
- var EventEmitter2 = /*@__PURE__*/index_native.getDefaultExportFromCjs(eventemitter3Exports);
9817
-
9818
9087
  // src/embedded-provider.ts
9819
9088
 
9820
9089
  // src/constants.ts
@@ -9826,7 +9095,7 @@ var EmbeddedSolanaChain = class {
9826
9095
  this.currentNetworkId = NetworkId.SOLANA_MAINNET;
9827
9096
  this._connected = false;
9828
9097
  this._publicKey = null;
9829
- this.eventEmitter = new EventEmitter2();
9098
+ this.eventEmitter = new EventEmitter3();
9830
9099
  this.setupEventListeners();
9831
9100
  this.syncInitialState();
9832
9101
  }
@@ -9850,7 +9119,7 @@ var EmbeddedSolanaChain = class {
9850
9119
  message: messageStr,
9851
9120
  networkId: this.currentNetworkId
9852
9121
  });
9853
- const signature = typeof result.signature === "string" ? new Uint8Array(bs582.decode(result.signature)) : result.signature;
9122
+ const signature = typeof result.signature === "string" ? new Uint8Array(index_native.bs58.decode(result.signature)) : result.signature;
9854
9123
  return {
9855
9124
  signature,
9856
9125
  publicKey: this._publicKey || ""
@@ -9956,7 +9225,7 @@ var EmbeddedEthereumChain = class {
9956
9225
  this.currentNetworkId = NetworkId.ETHEREUM_MAINNET;
9957
9226
  this._connected = false;
9958
9227
  this._accounts = [];
9959
- this.eventEmitter = new EventEmitter2();
9228
+ this.eventEmitter = new EventEmitter3();
9960
9229
  this.setupEventListeners();
9961
9230
  this.syncInitialState();
9962
9231
  }
@@ -10533,7 +9802,7 @@ var EmbeddedProvider$1 = class EmbeddedProvider {
10533
9802
  publicKey: stamperInfo.publicKey,
10534
9803
  platform: platformName
10535
9804
  });
10536
- const base64urlPublicKey = base64urlEncode(bs582.decode(stamperInfo.publicKey));
9805
+ const base64urlPublicKey = base64urlEncode(index_native.bs58.decode(stamperInfo.publicKey));
10537
9806
  const username = `user-${randomUUID()}`;
10538
9807
  const { organizationId } = await tempClient.createOrganization(organizationName, [
10539
9808
  {
@@ -11122,133 +10391,6 @@ var EmbeddedProvider$1 = class EmbeddedProvider {
11122
10391
  }
11123
10392
  };
11124
10393
 
11125
- // base-x encoding / decoding
11126
- // Copyright (c) 2018 base-x contributors
11127
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
11128
- // Distributed under the MIT software license, see the accompanying
11129
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
11130
- function base (ALPHABET) {
11131
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
11132
- const BASE_MAP = new Uint8Array(256);
11133
- for (let j = 0; j < BASE_MAP.length; j++) {
11134
- BASE_MAP[j] = 255;
11135
- }
11136
- for (let i = 0; i < ALPHABET.length; i++) {
11137
- const x = ALPHABET.charAt(i);
11138
- const xc = x.charCodeAt(0);
11139
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
11140
- BASE_MAP[xc] = i;
11141
- }
11142
- const BASE = ALPHABET.length;
11143
- const LEADER = ALPHABET.charAt(0);
11144
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
11145
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
11146
- function encode (source) {
11147
- // eslint-disable-next-line no-empty
11148
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
11149
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
11150
- } else if (Array.isArray(source)) {
11151
- source = Uint8Array.from(source);
11152
- }
11153
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
11154
- if (source.length === 0) { return '' }
11155
- // Skip & count leading zeroes.
11156
- let zeroes = 0;
11157
- let length = 0;
11158
- let pbegin = 0;
11159
- const pend = source.length;
11160
- while (pbegin !== pend && source[pbegin] === 0) {
11161
- pbegin++;
11162
- zeroes++;
11163
- }
11164
- // Allocate enough space in big-endian base58 representation.
11165
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
11166
- const b58 = new Uint8Array(size);
11167
- // Process the bytes.
11168
- while (pbegin !== pend) {
11169
- let carry = source[pbegin];
11170
- // Apply "b58 = b58 * 256 + ch".
11171
- let i = 0;
11172
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
11173
- carry += (256 * b58[it1]) >>> 0;
11174
- b58[it1] = (carry % BASE) >>> 0;
11175
- carry = (carry / BASE) >>> 0;
11176
- }
11177
- if (carry !== 0) { throw new Error('Non-zero carry') }
11178
- length = i;
11179
- pbegin++;
11180
- }
11181
- // Skip leading zeroes in base58 result.
11182
- let it2 = size - length;
11183
- while (it2 !== size && b58[it2] === 0) {
11184
- it2++;
11185
- }
11186
- // Translate the result into a string.
11187
- let str = LEADER.repeat(zeroes);
11188
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
11189
- return str
11190
- }
11191
- function decodeUnsafe (source) {
11192
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
11193
- if (source.length === 0) { return new Uint8Array() }
11194
- let psz = 0;
11195
- // Skip and count leading '1's.
11196
- let zeroes = 0;
11197
- let length = 0;
11198
- while (source[psz] === LEADER) {
11199
- zeroes++;
11200
- psz++;
11201
- }
11202
- // Allocate enough space in big-endian base256 representation.
11203
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
11204
- const b256 = new Uint8Array(size);
11205
- // Process the characters.
11206
- while (psz < source.length) {
11207
- // Find code of next character
11208
- const charCode = source.charCodeAt(psz);
11209
- // Base map can not be indexed using char code
11210
- if (charCode > 255) { return }
11211
- // Decode character
11212
- let carry = BASE_MAP[charCode];
11213
- // Invalid character
11214
- if (carry === 255) { return }
11215
- let i = 0;
11216
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
11217
- carry += (BASE * b256[it3]) >>> 0;
11218
- b256[it3] = (carry % 256) >>> 0;
11219
- carry = (carry / 256) >>> 0;
11220
- }
11221
- if (carry !== 0) { throw new Error('Non-zero carry') }
11222
- length = i;
11223
- psz++;
11224
- }
11225
- // Skip leading zeroes in b256.
11226
- let it4 = size - length;
11227
- while (it4 !== size && b256[it4] === 0) {
11228
- it4++;
11229
- }
11230
- const vch = new Uint8Array(zeroes + (size - it4));
11231
- let j = zeroes;
11232
- while (it4 !== size) {
11233
- vch[j++] = b256[it4++];
11234
- }
11235
- return vch
11236
- }
11237
- function decode (string) {
11238
- const buffer = decodeUnsafe(string);
11239
- if (buffer) { return buffer }
11240
- throw new Error('Non-base' + BASE + ' character')
11241
- }
11242
- return {
11243
- encode,
11244
- decodeUnsafe,
11245
- decode
11246
- }
11247
- }
11248
-
11249
- var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
11250
- var bs58 = base(ALPHABET);
11251
-
11252
10394
  // src/index.ts
11253
10395
  var IndexedDbStamper = class {
11254
10396
  // Optional for PKI, required for OIDC
@@ -11322,14 +10464,14 @@ var IndexedDbStamper = class {
11322
10464
  const salt = params.type === "OIDC" ? params.salt : this.salt;
11323
10465
  const stampData = stampType === "PKI" ? {
11324
10466
  // Decode base58 public key to bytes, then encode as base64url (consistent with ApiKeyStamper)
11325
- publicKey: base64urlEncode(bs58.decode(this.activeKeyPairRecord.keyInfo.publicKey)),
10467
+ publicKey: base64urlEncode(index_native.bs58.decode(this.activeKeyPairRecord.keyInfo.publicKey)),
11326
10468
  signature: signatureBase64url,
11327
10469
  kind: "PKI",
11328
10470
  algorithm: this.algorithm
11329
10471
  } : {
11330
10472
  kind: "OIDC",
11331
10473
  idToken,
11332
- publicKey: base64urlEncode(bs58.decode(this.activeKeyPairRecord.keyInfo.publicKey)),
10474
+ publicKey: base64urlEncode(index_native.bs58.decode(this.activeKeyPairRecord.keyInfo.publicKey)),
11333
10475
  salt,
11334
10476
  algorithm: this.algorithm,
11335
10477
  signature: signatureBase64url
@@ -11432,7 +10574,7 @@ var IndexedDbStamper = class {
11432
10574
  ["sign", "verify"]
11433
10575
  );
11434
10576
  const rawPublicKeyBuffer = await crypto.subtle.exportKey("raw", keyPair.publicKey);
11435
- const publicKeyBase58 = bs58.encode(new Uint8Array(rawPublicKeyBuffer));
10577
+ const publicKeyBase58 = index_native.bs58.encode(new Uint8Array(rawPublicKeyBuffer));
11436
10578
  const keyIdBuffer = await crypto.subtle.digest("SHA-256", rawPublicKeyBuffer);
11437
10579
  const keyId = base64urlEncode(new Uint8Array(keyIdBuffer)).substring(0, 16);
11438
10580
  const now = Date.now();
@@ -12351,7 +11493,7 @@ var WalletStandardSolanaAdapter = class {
12351
11493
  throw new Error("No signature found in signAndSendTransaction result");
12352
11494
  }
12353
11495
  const signatureBytes = this.parseUint8Array(signatureOutput.signature);
12354
- const signature = bs58$1.encode(signatureBytes);
11496
+ const signature = index_native.bs58.encode(signatureBytes);
12355
11497
  return { signature };
12356
11498
  } catch (error) {
12357
11499
  debug.error(DebugCategory.INJECTED_PROVIDER, "Wallet Standard Solana signAndSendTransaction failed", {
@@ -16783,4 +15925,4 @@ exports.useModal = useModal;
16783
15925
  exports.usePhantom = usePhantom;
16784
15926
  exports.useSolana = useSolana;
16785
15927
  exports.useTheme = useTheme;
16786
- //# sourceMappingURL=index-BhfNMrC0.js.map
15928
+ //# sourceMappingURL=index-BSL3D7PC.js.map