@pooflabs/web 0.0.83-rc2 → 0.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BycoUXcq.js → index-BM6hgCdH.js} +2 -149
- package/dist/index-BM6hgCdH.js.map +1 -0
- package/dist/{index-HSa4FZ9y.js → index-BPlF6-PQ.js} +279 -159
- package/dist/index-BPlF6-PQ.js.map +1 -0
- package/dist/index-Bp4b5LXs.js +8 -0
- package/dist/index-Bp4b5LXs.js.map +1 -0
- package/dist/index-C80kRxWk.esm.js +6 -0
- package/dist/index-C80kRxWk.esm.js.map +1 -0
- package/dist/{index-dyXVIGCy.esm.js → index-CH2G5Y9i.esm.js} +2 -149
- package/dist/index-CH2G5Y9i.esm.js.map +1 -0
- package/dist/{index-DQLduP63.js → index-CSeN3jbG.js} +3 -150
- package/dist/index-CSeN3jbG.js.map +1 -0
- package/dist/{index-p1LvAs78.esm.js → index-XHbmzFFO.esm.js} +279 -159
- package/dist/index-XHbmzFFO.esm.js.map +1 -0
- package/dist/{index-DEwS-N9F.esm.js → index-ep10Sw82.esm.js} +3 -150
- package/dist/index-ep10Sw82.esm.js.map +1 -0
- package/dist/{index.browser-DEfS865o.js → index.browser-BvNsUWjt.js} +2 -2
- package/dist/{index.browser-DEfS865o.js.map → index.browser-BvNsUWjt.js.map} +1 -1
- package/dist/{index.browser-jwJFPtjK.js → index.browser-BwIqqM4U.js} +2 -2
- package/dist/{index.browser-jwJFPtjK.js.map → index.browser-BwIqqM4U.js.map} +1 -1
- package/dist/{index.browser-DQvFxLjk.js → index.browser-C1QL04xM.js} +2 -2
- package/dist/{index.browser-DQvFxLjk.js.map → index.browser-C1QL04xM.js.map} +1 -1
- package/dist/{index.browser-Dekybe_E.esm.js → index.browser-Cgj7Hs6n.esm.js} +2 -2
- package/dist/{index.browser-Dekybe_E.esm.js.map → index.browser-Cgj7Hs6n.esm.js.map} +1 -1
- package/dist/{index.browser-zXADedzh.esm.js → index.browser-CifFI7Ju.esm.js} +2 -2
- package/dist/{index.browser-zXADedzh.esm.js.map → index.browser-CifFI7Ju.esm.js.map} +1 -1
- package/dist/{index.browser-CbVXUCv0.esm.js → index.browser-D8VWPXTZ.esm.js} +2 -2
- package/dist/{index.browser-CbVXUCv0.esm.js.map → index.browser-D8VWPXTZ.esm.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-CawD5H6H.js → index.native-BmtuyGXs.js} +2677 -187
- package/dist/index.native-BmtuyGXs.js.map +1 -0
- package/dist/{index.native-Brt4NkkH.esm.js → index.native-X01vlukI.esm.js} +2677 -188
- package/dist/index.native-X01vlukI.esm.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-CjI_IIr9.js → phantom-wallet-provider-C_LPU6Ns.js} +4 -4
- package/dist/{phantom-wallet-provider-CjI_IIr9.js.map → phantom-wallet-provider-C_LPU6Ns.js.map} +1 -1
- package/dist/{phantom-wallet-provider-BR5R3OAI.esm.js → phantom-wallet-provider-DRvhBbbR.esm.js} +4 -4
- package/dist/{phantom-wallet-provider-BR5R3OAI.esm.js.map → phantom-wallet-provider-DRvhBbbR.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-wN23XtR8.js → privy-wallet-provider-DQM8xO38.js} +3 -3
- package/dist/{privy-wallet-provider-wN23XtR8.js.map → privy-wallet-provider-DQM8xO38.js.map} +1 -1
- package/dist/{privy-wallet-provider-ZQ4fLg4f.esm.js → privy-wallet-provider-ZGu8q5T5.esm.js} +3 -3
- package/dist/{privy-wallet-provider-ZQ4fLg4f.esm.js.map → privy-wallet-provider-ZGu8q5T5.esm.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-Dt8K5Ils.js → solana-mobile-wallet-provider-6gNw2_bX.js} +4 -4
- package/dist/{solana-mobile-wallet-provider-Dt8K5Ils.js.map → solana-mobile-wallet-provider-6gNw2_bX.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-DhtoJcqW.esm.js → solana-mobile-wallet-provider-B65A7abd.esm.js} +4 -4
- package/dist/{solana-mobile-wallet-provider-DhtoJcqW.esm.js.map → solana-mobile-wallet-provider-B65A7abd.esm.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-Bdcc5821.js +0 -2375
- package/dist/index-Bdcc5821.js.map +0 -1
- package/dist/index-BycoUXcq.js.map +0 -1
- package/dist/index-CrOVJFX9.esm.js +0 -2373
- package/dist/index-CrOVJFX9.esm.js.map +0 -1
- package/dist/index-DEwS-N9F.esm.js.map +0 -1
- package/dist/index-DQLduP63.js.map +0 -1
- package/dist/index-HSa4FZ9y.js.map +0 -1
- package/dist/index-dyXVIGCy.esm.js.map +0 -1
- package/dist/index-p1LvAs78.esm.js.map +0 -1
- package/dist/index.native-Brt4NkkH.esm.js.map +0 -1
- package/dist/index.native-CawD5H6H.js.map +0 -1
|
@@ -9259,15 +9259,15 @@ function requireBuffer$1 () {
|
|
|
9259
9259
|
|
|
9260
9260
|
var bufferExports$1 = requireBuffer$1();
|
|
9261
9261
|
|
|
9262
|
-
var safeBuffer = {exports: {}};
|
|
9262
|
+
var safeBuffer$1 = {exports: {}};
|
|
9263
9263
|
|
|
9264
9264
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9265
9265
|
|
|
9266
|
-
var hasRequiredSafeBuffer;
|
|
9266
|
+
var hasRequiredSafeBuffer$1;
|
|
9267
9267
|
|
|
9268
|
-
function requireSafeBuffer () {
|
|
9269
|
-
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
9270
|
-
hasRequiredSafeBuffer = 1;
|
|
9268
|
+
function requireSafeBuffer$1 () {
|
|
9269
|
+
if (hasRequiredSafeBuffer$1) return safeBuffer$1.exports;
|
|
9270
|
+
hasRequiredSafeBuffer$1 = 1;
|
|
9271
9271
|
(function (module, exports$1) {
|
|
9272
9272
|
/* eslint-disable node/no-deprecated-api */
|
|
9273
9273
|
var buffer = requireBuffer$1();
|
|
@@ -9333,23 +9333,23 @@ function requireSafeBuffer () {
|
|
|
9333
9333
|
}
|
|
9334
9334
|
return buffer.SlowBuffer(size)
|
|
9335
9335
|
};
|
|
9336
|
-
} (safeBuffer, safeBuffer.exports));
|
|
9337
|
-
return safeBuffer.exports;
|
|
9336
|
+
} (safeBuffer$1, safeBuffer$1.exports));
|
|
9337
|
+
return safeBuffer$1.exports;
|
|
9338
9338
|
}
|
|
9339
9339
|
|
|
9340
|
-
var src;
|
|
9341
|
-
var hasRequiredSrc;
|
|
9340
|
+
var src$1;
|
|
9341
|
+
var hasRequiredSrc$1;
|
|
9342
9342
|
|
|
9343
|
-
function requireSrc () {
|
|
9344
|
-
if (hasRequiredSrc) return src;
|
|
9345
|
-
hasRequiredSrc = 1;
|
|
9343
|
+
function requireSrc$1 () {
|
|
9344
|
+
if (hasRequiredSrc$1) return src$1;
|
|
9345
|
+
hasRequiredSrc$1 = 1;
|
|
9346
9346
|
// base-x encoding / decoding
|
|
9347
9347
|
// Copyright (c) 2018 base-x contributors
|
|
9348
9348
|
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
9349
9349
|
// Distributed under the MIT software license, see the accompanying
|
|
9350
9350
|
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
9351
9351
|
// @ts-ignore
|
|
9352
|
-
var _Buffer = requireSafeBuffer().Buffer;
|
|
9352
|
+
var _Buffer = requireSafeBuffer$1().Buffer;
|
|
9353
9353
|
function base (ALPHABET) {
|
|
9354
9354
|
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
9355
9355
|
var BASE_MAP = new Uint8Array(256);
|
|
@@ -9464,8 +9464,8 @@ function requireSrc () {
|
|
|
9464
9464
|
decode: decode
|
|
9465
9465
|
}
|
|
9466
9466
|
}
|
|
9467
|
-
src = base;
|
|
9468
|
-
return src;
|
|
9467
|
+
src$1 = base;
|
|
9468
|
+
return src$1;
|
|
9469
9469
|
}
|
|
9470
9470
|
|
|
9471
9471
|
var bs58$1;
|
|
@@ -9474,7 +9474,7 @@ var hasRequiredBs58;
|
|
|
9474
9474
|
function requireBs58 () {
|
|
9475
9475
|
if (hasRequiredBs58) return bs58$1;
|
|
9476
9476
|
hasRequiredBs58 = 1;
|
|
9477
|
-
var basex = requireSrc();
|
|
9477
|
+
var basex = requireSrc$1();
|
|
9478
9478
|
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9479
9479
|
|
|
9480
9480
|
bs58$1 = basex(ALPHABET);
|
|
@@ -9561,6 +9561,12 @@ async function genSolanaMessage(address, nonce) {
|
|
|
9561
9561
|
// Serialization Helpers
|
|
9562
9562
|
// ─────────────────────────────────────────────────────────────
|
|
9563
9563
|
function isHexString(value) {
|
|
9564
|
+
// Only strings can be hex-encoded. Numbers, BNs, and other shapes coming back
|
|
9565
|
+
// from the API for u64Val/i64Val should fall through to `new BN(value)` which
|
|
9566
|
+
// accepts those shapes natively. Without this guard, calling .startsWith on a
|
|
9567
|
+
// non-string blows up with TypeError.
|
|
9568
|
+
if (typeof value !== "string")
|
|
9569
|
+
return false;
|
|
9564
9570
|
// Matches strings containing only 0-9, a-f, or A-F (optionally prefixed with 0x)
|
|
9565
9571
|
let testValue = value;
|
|
9566
9572
|
// Handle negative values
|
|
@@ -9656,8 +9662,11 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
|
|
|
9656
9662
|
}
|
|
9657
9663
|
else if (idl.address === "poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZp") {
|
|
9658
9664
|
const program = new Program(idl, anchorProvider);
|
|
9665
|
+
// Targets `set_documents_v2` (Vec<u8> ra_indices). The on-chain program
|
|
9666
|
+
// also exposes the legacy `set_documents` (Vec<u64>) so SDKs already on npm
|
|
9667
|
+
// continue to work — but new releases of this SDK speak v2 only.
|
|
9659
9668
|
tx = await program.methods
|
|
9660
|
-
.
|
|
9669
|
+
.setDocumentsV2(args.app_id, prepareAnchorArgs(args.documents), args.delete_paths, args.txData, simulate)
|
|
9661
9670
|
.preInstructions(instructions)
|
|
9662
9671
|
.accounts({
|
|
9663
9672
|
payer: payerPublicKey
|
|
@@ -10012,11 +10021,17 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
|
|
|
10012
10021
|
if (_overrides === null || _overrides === void 0 ? void 0 : _overrides.headers) {
|
|
10013
10022
|
Object.assign(headers, _overrides.headers);
|
|
10014
10023
|
}
|
|
10024
|
+
// Writes (PUT/POST/DELETE) can take significantly longer than reads —
|
|
10025
|
+
// server-side they may trigger ad-hoc LUT creation (create + extend +
|
|
10026
|
+
// wait-for-finalization, ~15-30s on mainnet). Use a larger default for
|
|
10027
|
+
// non-GET so the SDK doesn't time out before client-api responds.
|
|
10028
|
+
const isRead = method.toUpperCase() === "GET";
|
|
10029
|
+
const defaultTimeout = isRead ? 30000 : 90000;
|
|
10015
10030
|
const requestConfig = {
|
|
10016
10031
|
method,
|
|
10017
10032
|
url: `${config.apiUrl}${urlPath.startsWith("/") ? urlPath : `/${urlPath}`}`,
|
|
10018
10033
|
headers,
|
|
10019
|
-
timeout: (_a = _overrides === null || _overrides === void 0 ? void 0 : _overrides.timeout) !== null && _a !== void 0 ? _a :
|
|
10034
|
+
timeout: (_a = _overrides === null || _overrides === void 0 ? void 0 : _overrides.timeout) !== null && _a !== void 0 ? _a : defaultTimeout,
|
|
10020
10035
|
};
|
|
10021
10036
|
if (method !== "GET" && method !== "get") {
|
|
10022
10037
|
requestConfig.data = data ? JSON.stringify(data) : {};
|
|
@@ -10661,21 +10676,38 @@ async function setMany(many, options) {
|
|
|
10661
10676
|
setDocumentData: tx.transactionArgs.setDocumentData,
|
|
10662
10677
|
deletePaths: tx.transactionArgs.deletePaths,
|
|
10663
10678
|
idl: tx.idl,
|
|
10664
|
-
txData: (_b = (_a = tx.txData) === null || _a === void 0 ? void 0 : _a.map((txData) => {
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10679
|
+
txData: (_b = (_a = tx.txData) === null || _a === void 0 ? void 0 : _a.map((txData) => ({
|
|
10680
|
+
pluginFunctionKey: txData.pluginFunctionKey,
|
|
10681
|
+
txData: bufferExports$1.Buffer.from(txData.txData),
|
|
10682
|
+
// raIndices is Vec<u8> on-chain (serialized as Buffer/bytes). The server may send
|
|
10683
|
+
// it as a Buffer, a number[], a Uint8Array, or — over JSON — as Node's serialized
|
|
10684
|
+
// Buffer shape {type: "Buffer", data: number[]} (the default `JSON.stringify(buf)`
|
|
10685
|
+
// output). Normalise all of those to Buffer here. Each value must fit in u8 (matches
|
|
10686
|
+
// Solana's instruction-level account indexing); throw clearly if anything is out of range.
|
|
10687
|
+
raIndices: (() => {
|
|
10688
|
+
const raw = txData.raIndices;
|
|
10689
|
+
if (raw == null)
|
|
10690
|
+
return bufferExports$1.Buffer.alloc(0);
|
|
10691
|
+
if (bufferExports$1.Buffer.isBuffer(raw))
|
|
10692
|
+
return raw;
|
|
10693
|
+
if (raw instanceof Uint8Array)
|
|
10694
|
+
return bufferExports$1.Buffer.from(raw);
|
|
10695
|
+
// Node's JSON-serialised Buffer: {type: "Buffer", data: number[]}
|
|
10696
|
+
const arrayLike = Array.isArray(raw)
|
|
10697
|
+
? raw
|
|
10698
|
+
: (raw && typeof raw === 'object' && Array.isArray(raw.data))
|
|
10699
|
+
? raw.data
|
|
10700
|
+
: (() => { throw new Error(`raIndices has unexpected shape: ${typeof raw}`); })();
|
|
10701
|
+
const bytes = arrayLike.map((raIndex) => {
|
|
10702
|
+
const n = isHexString(raIndex) ? parseInt(raIndex, 16) : Number(raIndex);
|
|
10703
|
+
if (!Number.isInteger(n) || n < 0 || n > 255) {
|
|
10704
|
+
throw new Error(`raIndex ${raIndex} is not a valid u8 (must be integer in 0..255)`);
|
|
10675
10705
|
}
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10706
|
+
return n;
|
|
10707
|
+
});
|
|
10708
|
+
return bufferExports$1.Buffer.from(bytes);
|
|
10709
|
+
})(),
|
|
10710
|
+
}))) !== null && _b !== void 0 ? _b : [],
|
|
10679
10711
|
};
|
|
10680
10712
|
const config = await getConfig();
|
|
10681
10713
|
const solTransaction = {
|
|
@@ -15677,7 +15709,7 @@ async function loadDependencies() {
|
|
|
15677
15709
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
15678
15710
|
import('react'),
|
|
15679
15711
|
import('react-dom/client'),
|
|
15680
|
-
import('./index-
|
|
15712
|
+
import('./index-CH2G5Y9i.esm.js')
|
|
15681
15713
|
]);
|
|
15682
15714
|
// Extract default export from ESM module namespace
|
|
15683
15715
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -20126,132 +20158,220 @@ function createSolanaRpcSubscriptionsFromTransport(transport) {
|
|
|
20126
20158
|
});
|
|
20127
20159
|
}
|
|
20128
20160
|
|
|
20129
|
-
|
|
20130
|
-
|
|
20131
|
-
|
|
20132
|
-
|
|
20133
|
-
|
|
20134
|
-
|
|
20135
|
-
|
|
20136
|
-
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
|
|
20143
|
-
|
|
20144
|
-
|
|
20145
|
-
|
|
20146
|
-
|
|
20147
|
-
|
|
20148
|
-
|
|
20149
|
-
|
|
20150
|
-
|
|
20151
|
-
|
|
20152
|
-
|
|
20153
|
-
|
|
20154
|
-
|
|
20155
|
-
|
|
20156
|
-
|
|
20157
|
-
|
|
20158
|
-
|
|
20159
|
-
|
|
20160
|
-
|
|
20161
|
-
|
|
20162
|
-
|
|
20163
|
-
|
|
20164
|
-
|
|
20165
|
-
|
|
20166
|
-
|
|
20167
|
-
|
|
20168
|
-
|
|
20169
|
-
|
|
20170
|
-
|
|
20171
|
-
|
|
20172
|
-
|
|
20173
|
-
|
|
20174
|
-
|
|
20175
|
-
|
|
20176
|
-
|
|
20177
|
-
|
|
20178
|
-
|
|
20179
|
-
|
|
20180
|
-
|
|
20181
|
-
|
|
20182
|
-
|
|
20183
|
-
|
|
20184
|
-
|
|
20185
|
-
|
|
20186
|
-
|
|
20187
|
-
|
|
20188
|
-
|
|
20189
|
-
|
|
20190
|
-
|
|
20191
|
-
|
|
20192
|
-
|
|
20193
|
-
|
|
20194
|
-
|
|
20195
|
-
|
|
20196
|
-
|
|
20197
|
-
|
|
20198
|
-
|
|
20199
|
-
|
|
20200
|
-
|
|
20201
|
-
|
|
20202
|
-
|
|
20203
|
-
|
|
20204
|
-
|
|
20205
|
-
|
|
20206
|
-
|
|
20207
|
-
|
|
20208
|
-
|
|
20209
|
-
|
|
20210
|
-
|
|
20211
|
-
|
|
20212
|
-
|
|
20213
|
-
|
|
20214
|
-
|
|
20215
|
-
|
|
20216
|
-
|
|
20217
|
-
|
|
20218
|
-
|
|
20219
|
-
|
|
20220
|
-
|
|
20221
|
-
|
|
20222
|
-
|
|
20223
|
-
|
|
20224
|
-
|
|
20225
|
-
|
|
20226
|
-
|
|
20227
|
-
|
|
20228
|
-
|
|
20229
|
-
|
|
20230
|
-
|
|
20231
|
-
|
|
20232
|
-
|
|
20233
|
-
|
|
20234
|
-
|
|
20235
|
-
|
|
20236
|
-
|
|
20237
|
-
|
|
20238
|
-
|
|
20239
|
-
|
|
20240
|
-
|
|
20241
|
-
|
|
20242
|
-
|
|
20243
|
-
|
|
20244
|
-
|
|
20245
|
-
|
|
20246
|
-
|
|
20247
|
-
|
|
20248
|
-
|
|
20249
|
-
|
|
20250
|
-
|
|
20161
|
+
var safeBuffer = {exports: {}};
|
|
20162
|
+
|
|
20163
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
20164
|
+
|
|
20165
|
+
var hasRequiredSafeBuffer;
|
|
20166
|
+
|
|
20167
|
+
function requireSafeBuffer () {
|
|
20168
|
+
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
20169
|
+
hasRequiredSafeBuffer = 1;
|
|
20170
|
+
(function (module, exports$1) {
|
|
20171
|
+
/* eslint-disable node/no-deprecated-api */
|
|
20172
|
+
var buffer = requireBuffer();
|
|
20173
|
+
var Buffer = buffer.Buffer;
|
|
20174
|
+
|
|
20175
|
+
// alternative to using Object.keys for old browsers
|
|
20176
|
+
function copyProps (src, dst) {
|
|
20177
|
+
for (var key in src) {
|
|
20178
|
+
dst[key] = src[key];
|
|
20179
|
+
}
|
|
20180
|
+
}
|
|
20181
|
+
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
|
|
20182
|
+
module.exports = buffer;
|
|
20183
|
+
} else {
|
|
20184
|
+
// Copy properties from require('buffer')
|
|
20185
|
+
copyProps(buffer, exports$1);
|
|
20186
|
+
exports$1.Buffer = SafeBuffer;
|
|
20187
|
+
}
|
|
20188
|
+
|
|
20189
|
+
function SafeBuffer (arg, encodingOrOffset, length) {
|
|
20190
|
+
return Buffer(arg, encodingOrOffset, length)
|
|
20191
|
+
}
|
|
20192
|
+
|
|
20193
|
+
SafeBuffer.prototype = Object.create(Buffer.prototype);
|
|
20194
|
+
|
|
20195
|
+
// Copy static methods from Buffer
|
|
20196
|
+
copyProps(Buffer, SafeBuffer);
|
|
20197
|
+
|
|
20198
|
+
SafeBuffer.from = function (arg, encodingOrOffset, length) {
|
|
20199
|
+
if (typeof arg === 'number') {
|
|
20200
|
+
throw new TypeError('Argument must not be a number')
|
|
20201
|
+
}
|
|
20202
|
+
return Buffer(arg, encodingOrOffset, length)
|
|
20203
|
+
};
|
|
20204
|
+
|
|
20205
|
+
SafeBuffer.alloc = function (size, fill, encoding) {
|
|
20206
|
+
if (typeof size !== 'number') {
|
|
20207
|
+
throw new TypeError('Argument must be a number')
|
|
20208
|
+
}
|
|
20209
|
+
var buf = Buffer(size);
|
|
20210
|
+
if (fill !== undefined) {
|
|
20211
|
+
if (typeof encoding === 'string') {
|
|
20212
|
+
buf.fill(fill, encoding);
|
|
20213
|
+
} else {
|
|
20214
|
+
buf.fill(fill);
|
|
20215
|
+
}
|
|
20216
|
+
} else {
|
|
20217
|
+
buf.fill(0);
|
|
20218
|
+
}
|
|
20219
|
+
return buf
|
|
20220
|
+
};
|
|
20221
|
+
|
|
20222
|
+
SafeBuffer.allocUnsafe = function (size) {
|
|
20223
|
+
if (typeof size !== 'number') {
|
|
20224
|
+
throw new TypeError('Argument must be a number')
|
|
20225
|
+
}
|
|
20226
|
+
return Buffer(size)
|
|
20227
|
+
};
|
|
20228
|
+
|
|
20229
|
+
SafeBuffer.allocUnsafeSlow = function (size) {
|
|
20230
|
+
if (typeof size !== 'number') {
|
|
20231
|
+
throw new TypeError('Argument must be a number')
|
|
20232
|
+
}
|
|
20233
|
+
return buffer.SlowBuffer(size)
|
|
20234
|
+
};
|
|
20235
|
+
} (safeBuffer, safeBuffer.exports));
|
|
20236
|
+
return safeBuffer.exports;
|
|
20237
|
+
}
|
|
20238
|
+
|
|
20239
|
+
var src;
|
|
20240
|
+
var hasRequiredSrc;
|
|
20241
|
+
|
|
20242
|
+
function requireSrc () {
|
|
20243
|
+
if (hasRequiredSrc) return src;
|
|
20244
|
+
hasRequiredSrc = 1;
|
|
20245
|
+
// base-x encoding / decoding
|
|
20246
|
+
// Copyright (c) 2018 base-x contributors
|
|
20247
|
+
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
20248
|
+
// Distributed under the MIT software license, see the accompanying
|
|
20249
|
+
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
20250
|
+
// @ts-ignore
|
|
20251
|
+
var _Buffer = requireSafeBuffer().Buffer;
|
|
20252
|
+
function base (ALPHABET) {
|
|
20253
|
+
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
20254
|
+
var BASE_MAP = new Uint8Array(256);
|
|
20255
|
+
for (var j = 0; j < BASE_MAP.length; j++) {
|
|
20256
|
+
BASE_MAP[j] = 255;
|
|
20257
|
+
}
|
|
20258
|
+
for (var i = 0; i < ALPHABET.length; i++) {
|
|
20259
|
+
var x = ALPHABET.charAt(i);
|
|
20260
|
+
var xc = x.charCodeAt(0);
|
|
20261
|
+
if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
|
|
20262
|
+
BASE_MAP[xc] = i;
|
|
20263
|
+
}
|
|
20264
|
+
var BASE = ALPHABET.length;
|
|
20265
|
+
var LEADER = ALPHABET.charAt(0);
|
|
20266
|
+
var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
|
|
20267
|
+
var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
|
|
20268
|
+
function encode (source) {
|
|
20269
|
+
if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source); }
|
|
20270
|
+
if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }
|
|
20271
|
+
if (source.length === 0) { return '' }
|
|
20272
|
+
// Skip & count leading zeroes.
|
|
20273
|
+
var zeroes = 0;
|
|
20274
|
+
var length = 0;
|
|
20275
|
+
var pbegin = 0;
|
|
20276
|
+
var pend = source.length;
|
|
20277
|
+
while (pbegin !== pend && source[pbegin] === 0) {
|
|
20278
|
+
pbegin++;
|
|
20279
|
+
zeroes++;
|
|
20280
|
+
}
|
|
20281
|
+
// Allocate enough space in big-endian base58 representation.
|
|
20282
|
+
var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
|
|
20283
|
+
var b58 = new Uint8Array(size);
|
|
20284
|
+
// Process the bytes.
|
|
20285
|
+
while (pbegin !== pend) {
|
|
20286
|
+
var carry = source[pbegin];
|
|
20287
|
+
// Apply "b58 = b58 * 256 + ch".
|
|
20288
|
+
var i = 0;
|
|
20289
|
+
for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
20290
|
+
carry += (256 * b58[it1]) >>> 0;
|
|
20291
|
+
b58[it1] = (carry % BASE) >>> 0;
|
|
20292
|
+
carry = (carry / BASE) >>> 0;
|
|
20293
|
+
}
|
|
20294
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20295
|
+
length = i;
|
|
20296
|
+
pbegin++;
|
|
20297
|
+
}
|
|
20298
|
+
// Skip leading zeroes in base58 result.
|
|
20299
|
+
var it2 = size - length;
|
|
20300
|
+
while (it2 !== size && b58[it2] === 0) {
|
|
20301
|
+
it2++;
|
|
20302
|
+
}
|
|
20303
|
+
// Translate the result into a string.
|
|
20304
|
+
var str = LEADER.repeat(zeroes);
|
|
20305
|
+
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
20306
|
+
return str
|
|
20307
|
+
}
|
|
20308
|
+
function decodeUnsafe (source) {
|
|
20309
|
+
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
20310
|
+
if (source.length === 0) { return _Buffer.alloc(0) }
|
|
20311
|
+
var psz = 0;
|
|
20312
|
+
// Skip and count leading '1's.
|
|
20313
|
+
var zeroes = 0;
|
|
20314
|
+
var length = 0;
|
|
20315
|
+
while (source[psz] === LEADER) {
|
|
20316
|
+
zeroes++;
|
|
20317
|
+
psz++;
|
|
20318
|
+
}
|
|
20319
|
+
// Allocate enough space in big-endian base256 representation.
|
|
20320
|
+
var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
20321
|
+
var b256 = new Uint8Array(size);
|
|
20322
|
+
// Process the characters.
|
|
20323
|
+
while (psz < source.length) {
|
|
20324
|
+
// Find code of next character
|
|
20325
|
+
var charCode = source.charCodeAt(psz);
|
|
20326
|
+
// Base map can not be indexed using char code
|
|
20327
|
+
if (charCode > 255) { return }
|
|
20328
|
+
// Decode character
|
|
20329
|
+
var carry = BASE_MAP[charCode];
|
|
20330
|
+
// Invalid character
|
|
20331
|
+
if (carry === 255) { return }
|
|
20332
|
+
var i = 0;
|
|
20333
|
+
for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
20334
|
+
carry += (BASE * b256[it3]) >>> 0;
|
|
20335
|
+
b256[it3] = (carry % 256) >>> 0;
|
|
20336
|
+
carry = (carry / 256) >>> 0;
|
|
20337
|
+
}
|
|
20338
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20339
|
+
length = i;
|
|
20340
|
+
psz++;
|
|
20341
|
+
}
|
|
20342
|
+
// Skip leading zeroes in b256.
|
|
20343
|
+
var it4 = size - length;
|
|
20344
|
+
while (it4 !== size && b256[it4] === 0) {
|
|
20345
|
+
it4++;
|
|
20346
|
+
}
|
|
20347
|
+
var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
|
|
20348
|
+
vch.fill(0x00, 0, zeroes);
|
|
20349
|
+
var j = zeroes;
|
|
20350
|
+
while (it4 !== size) {
|
|
20351
|
+
vch[j++] = b256[it4++];
|
|
20352
|
+
}
|
|
20353
|
+
return vch
|
|
20354
|
+
}
|
|
20355
|
+
function decode (string) {
|
|
20356
|
+
var buffer = decodeUnsafe(string);
|
|
20357
|
+
if (buffer) { return buffer }
|
|
20358
|
+
throw new Error('Non-base' + BASE + ' character')
|
|
20359
|
+
}
|
|
20360
|
+
return {
|
|
20361
|
+
encode: encode,
|
|
20362
|
+
decodeUnsafe: decodeUnsafe,
|
|
20363
|
+
decode: decode
|
|
20364
|
+
}
|
|
20365
|
+
}
|
|
20366
|
+
src = base;
|
|
20367
|
+
return src;
|
|
20251
20368
|
}
|
|
20252
20369
|
|
|
20370
|
+
var srcExports = requireSrc();
|
|
20371
|
+
var basex = /*@__PURE__*/getDefaultExportFromCjs$1(srcExports);
|
|
20372
|
+
|
|
20253
20373
|
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
20254
|
-
var base58 =
|
|
20374
|
+
var base58 = basex(ALPHABET);
|
|
20255
20375
|
|
|
20256
20376
|
var index = /*#__PURE__*/Object.freeze({
|
|
20257
20377
|
__proto__: null,
|
|
@@ -21170,7 +21290,7 @@ async function loadMwaProtocol() {
|
|
|
21170
21290
|
return mwaProtocolLoadPromise;
|
|
21171
21291
|
mwaProtocolLoadPromise = (async () => {
|
|
21172
21292
|
try {
|
|
21173
|
-
mwaProtocolModule = await import('./index.browser-
|
|
21293
|
+
mwaProtocolModule = await import('./index.browser-D8VWPXTZ.esm.js');
|
|
21174
21294
|
}
|
|
21175
21295
|
catch (e) {
|
|
21176
21296
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -21192,7 +21312,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
21192
21312
|
if (typeof window === 'undefined')
|
|
21193
21313
|
return;
|
|
21194
21314
|
try {
|
|
21195
|
-
const walletStandardMobile = await import('./index.browser-
|
|
21315
|
+
const walletStandardMobile = await import('./index.browser-Cgj7Hs6n.esm.js');
|
|
21196
21316
|
const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
|
|
21197
21317
|
if (!registerMwa) {
|
|
21198
21318
|
console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
|
|
@@ -22130,4 +22250,4 @@ class PrivyExpoProvider {
|
|
|
22130
22250
|
}
|
|
22131
22251
|
|
|
22132
22252
|
export { getCachedData as $, subscribe as A, useAuth as B, deserializeTransaction as C, getIdToken as D, setPlatform as E, getPlatform as F, PrivyWalletProvider as G, DEFAULT_TEST_ADDRESS as H, isMobileWalletAvailable as I, registerMobileWalletAdapter as J, PrivyExpoProvider as K, InsufficientBalanceError as L, MockAuthProvider as M, ServerSessionManager as N, OffchainAuthProvider as O, PhantomWalletProvider as P, buildSetDocumentsTransaction as Q, ReactNativeSessionManager as R, SolanaMobileWalletProvider as S, clearCache as T, closeAllSubscriptions as U, convertRemainingAccounts as V, WebSessionManager as W, createSessionWithPrivy as X, createSessionWithSignature as Y, genAuthNonce as Z, genSolanaMessage as _, base58 as a, getMany as a0, reconnectWithNewAuth as a1, refreshSession as a2, signSessionCreateMessage as a3, bufferExports as b, getCurrentUser as c, onAuthLoadingChanged as d, getAuthLoading as e, logout as f, getDefaultExportFromCjs$1 as g, getConfig as h, init as i, getAuthProvider as j, get as k, login as l, setMany as m, setFile as n, onAuthStateChanged as o, getFiles as p, runQueryMany as q, runQuery as r, set as s, runExpression as t, runExpressionMany as u, signMessage as v, signTransaction as w, signAndSubmitTransaction as x, count as y, aggregate as z };
|
|
22133
|
-
//# sourceMappingURL=index-
|
|
22253
|
+
//# sourceMappingURL=index-XHbmzFFO.esm.js.map
|