@pooflabs/web 0.0.78 → 0.0.79-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-6pNPzV1t.esm.js +6 -0
- package/dist/index-6pNPzV1t.esm.js.map +1 -0
- package/dist/{index-DE7k2G22.js → index-BHGEc97p.js} +883 -25
- package/dist/index-BHGEc97p.js.map +1 -0
- package/dist/{index-OAJ0rndN.esm.js → index-CiwYJvf8.esm.js} +882 -24
- package/dist/index-CiwYJvf8.esm.js.map +1 -0
- package/dist/{index-CwGoYY0Y.esm.js → index-CsIXFm8d.esm.js} +335 -517
- package/dist/index-CsIXFm8d.esm.js.map +1 -0
- package/dist/index-D9BY44i-.js +8 -0
- package/dist/index-D9BY44i-.js.map +1 -0
- package/dist/{index-Cp727oEW.js → index-DwU9hjtr.js} +334 -517
- package/dist/index-DwU9hjtr.js.map +1 -0
- package/dist/{index-Cmu0PVJD.esm.js → index-U-xlsKRI.esm.js} +881 -23
- package/dist/index-U-xlsKRI.esm.js.map +1 -0
- package/dist/{index-CKaaE12K.js → index-zS_Y-wbi.js} +882 -24
- package/dist/index-zS_Y-wbi.js.map +1 -0
- package/dist/{index.browser-DFeGGyO7.esm.js → index.browser-C9bFQZyQ.esm.js} +128 -5
- package/dist/index.browser-C9bFQZyQ.esm.js.map +1 -0
- package/dist/{index.browser-B4een3Gz.esm.js → index.browser-CMEwqnEe.esm.js} +2 -2
- package/dist/{index.browser-B4een3Gz.esm.js.map → index.browser-CMEwqnEe.esm.js.map} +1 -1
- package/dist/{index.browser-AZQ5TnZ4.js → index.browser-Cpi4W_1r.js} +2 -2
- package/dist/{index.browser-AZQ5TnZ4.js.map → index.browser-Cpi4W_1r.js.map} +1 -1
- package/dist/{index.browser-x87QUr4N.esm.js → index.browser-Dbq5Qf1G.esm.js} +128 -5
- package/dist/index.browser-Dbq5Qf1G.esm.js.map +1 -0
- package/dist/{index.browser-BMtEulGJ.js → index.browser-Df7yN8D5.js} +129 -6
- package/dist/index.browser-Df7yN8D5.js.map +1 -0
- package/dist/{index.browser-QPkAiPQp.js → index.browser-dszs5oe5.js} +129 -6
- package/dist/index.browser-dszs5oe5.js.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-CjEJXA9y.esm.js → index.native-CEf5PJ_g.esm.js} +2690 -550
- package/dist/index.native-CEf5PJ_g.esm.js.map +1 -0
- package/dist/{index.native-D7IrIMX1.js → index.native-DtxPWD00.js} +2690 -549
- package/dist/index.native-DtxPWD00.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-B1TleWsy.esm.js → phantom-wallet-provider-B0UmUtfB.esm.js} +51 -4
- package/dist/{phantom-wallet-provider-B1TleWsy.esm.js.map → phantom-wallet-provider-B0UmUtfB.esm.js.map} +1 -1
- package/dist/{phantom-wallet-provider-DwmdHVd-.js → phantom-wallet-provider-BbyQIlro.js} +51 -4
- package/dist/{phantom-wallet-provider-DwmdHVd-.js.map → phantom-wallet-provider-BbyQIlro.js.map} +1 -1
- package/dist/{privy-wallet-provider-Cf6WgpK1.js → privy-wallet-provider-CoQzq0F4.js} +3 -3
- package/dist/privy-wallet-provider-CoQzq0F4.js.map +1 -0
- package/dist/{privy-wallet-provider-CZgiUwUN.esm.js → privy-wallet-provider-DGjYglh7.esm.js} +3 -3
- package/dist/privy-wallet-provider-DGjYglh7.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-DZmpeNIS.js → solana-mobile-wallet-provider-BLoovRsJ.js} +4 -4
- package/dist/{solana-mobile-wallet-provider-DZmpeNIS.js.map → solana-mobile-wallet-provider-BLoovRsJ.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-C9j8O3mD.esm.js → solana-mobile-wallet-provider-DIyP-Az5.esm.js} +4 -4
- package/dist/{solana-mobile-wallet-provider-C9j8O3mD.esm.js.map → solana-mobile-wallet-provider-DIyP-Az5.esm.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-Bdcc5821.js +0 -2375
- package/dist/index-Bdcc5821.js.map +0 -1
- package/dist/index-CKaaE12K.js.map +0 -1
- package/dist/index-Cmu0PVJD.esm.js.map +0 -1
- package/dist/index-Cp727oEW.js.map +0 -1
- package/dist/index-CrOVJFX9.esm.js +0 -2373
- package/dist/index-CrOVJFX9.esm.js.map +0 -1
- package/dist/index-CwGoYY0Y.esm.js.map +0 -1
- package/dist/index-DE7k2G22.js.map +0 -1
- package/dist/index-OAJ0rndN.esm.js.map +0 -1
- package/dist/index.browser-BMtEulGJ.js.map +0 -1
- package/dist/index.browser-DFeGGyO7.esm.js.map +0 -1
- package/dist/index.browser-QPkAiPQp.js.map +0 -1
- package/dist/index.browser-x87QUr4N.esm.js.map +0 -1
- package/dist/index.native-CjEJXA9y.esm.js.map +0 -1
- package/dist/index.native-D7IrIMX1.js.map +0 -1
- package/dist/privy-wallet-provider-CZgiUwUN.esm.js.map +0 -1
- package/dist/privy-wallet-provider-Cf6WgpK1.js.map +0 -1
|
@@ -4,6 +4,21 @@ import * as anchor from '@coral-xyz/anchor';
|
|
|
4
4
|
import { Program } from '@coral-xyz/anchor';
|
|
5
5
|
import * as React$2 from 'react';
|
|
6
6
|
|
|
7
|
+
function _mergeNamespaces(n, m) {
|
|
8
|
+
m.forEach(function (e) {
|
|
9
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
10
|
+
if (k !== 'default' && !(k in n)) {
|
|
11
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return e[k]; }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
|
|
7
22
|
function getDefaultExportFromCjs$1 (x) {
|
|
8
23
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
9
24
|
}
|
|
@@ -6379,261 +6394,6 @@ var ReconnectingWebSocket = /** @class */ (function () {
|
|
|
6379
6394
|
return ReconnectingWebSocket;
|
|
6380
6395
|
}());
|
|
6381
6396
|
|
|
6382
|
-
function getDefaultExportFromCjs (x) {
|
|
6383
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
6384
|
-
}
|
|
6385
|
-
|
|
6386
|
-
var isRetryAllowed$1;
|
|
6387
|
-
var hasRequiredIsRetryAllowed;
|
|
6388
|
-
|
|
6389
|
-
function requireIsRetryAllowed () {
|
|
6390
|
-
if (hasRequiredIsRetryAllowed) return isRetryAllowed$1;
|
|
6391
|
-
hasRequiredIsRetryAllowed = 1;
|
|
6392
|
-
|
|
6393
|
-
const denyList = new Set([
|
|
6394
|
-
'ENOTFOUND',
|
|
6395
|
-
'ENETUNREACH',
|
|
6396
|
-
|
|
6397
|
-
// SSL errors from https://github.com/nodejs/node/blob/fc8e3e2cdc521978351de257030db0076d79e0ab/src/crypto/crypto_common.cc#L301-L328
|
|
6398
|
-
'UNABLE_TO_GET_ISSUER_CERT',
|
|
6399
|
-
'UNABLE_TO_GET_CRL',
|
|
6400
|
-
'UNABLE_TO_DECRYPT_CERT_SIGNATURE',
|
|
6401
|
-
'UNABLE_TO_DECRYPT_CRL_SIGNATURE',
|
|
6402
|
-
'UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY',
|
|
6403
|
-
'CERT_SIGNATURE_FAILURE',
|
|
6404
|
-
'CRL_SIGNATURE_FAILURE',
|
|
6405
|
-
'CERT_NOT_YET_VALID',
|
|
6406
|
-
'CERT_HAS_EXPIRED',
|
|
6407
|
-
'CRL_NOT_YET_VALID',
|
|
6408
|
-
'CRL_HAS_EXPIRED',
|
|
6409
|
-
'ERROR_IN_CERT_NOT_BEFORE_FIELD',
|
|
6410
|
-
'ERROR_IN_CERT_NOT_AFTER_FIELD',
|
|
6411
|
-
'ERROR_IN_CRL_LAST_UPDATE_FIELD',
|
|
6412
|
-
'ERROR_IN_CRL_NEXT_UPDATE_FIELD',
|
|
6413
|
-
'OUT_OF_MEM',
|
|
6414
|
-
'DEPTH_ZERO_SELF_SIGNED_CERT',
|
|
6415
|
-
'SELF_SIGNED_CERT_IN_CHAIN',
|
|
6416
|
-
'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
|
|
6417
|
-
'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
|
|
6418
|
-
'CERT_CHAIN_TOO_LONG',
|
|
6419
|
-
'CERT_REVOKED',
|
|
6420
|
-
'INVALID_CA',
|
|
6421
|
-
'PATH_LENGTH_EXCEEDED',
|
|
6422
|
-
'INVALID_PURPOSE',
|
|
6423
|
-
'CERT_UNTRUSTED',
|
|
6424
|
-
'CERT_REJECTED',
|
|
6425
|
-
'HOSTNAME_MISMATCH'
|
|
6426
|
-
]);
|
|
6427
|
-
|
|
6428
|
-
// TODO: Use `error?.code` when targeting Node.js 14
|
|
6429
|
-
isRetryAllowed$1 = error => !denyList.has(error && error.code);
|
|
6430
|
-
return isRetryAllowed$1;
|
|
6431
|
-
}
|
|
6432
|
-
|
|
6433
|
-
var isRetryAllowedExports = requireIsRetryAllowed();
|
|
6434
|
-
var isRetryAllowed = /*@__PURE__*/getDefaultExportFromCjs(isRetryAllowedExports);
|
|
6435
|
-
|
|
6436
|
-
const namespace = 'axios-retry';
|
|
6437
|
-
function isNetworkError(error) {
|
|
6438
|
-
const CODE_EXCLUDE_LIST = ['ERR_CANCELED', 'ECONNABORTED'];
|
|
6439
|
-
if (error.response) {
|
|
6440
|
-
return false;
|
|
6441
|
-
}
|
|
6442
|
-
if (!error.code) {
|
|
6443
|
-
return false;
|
|
6444
|
-
}
|
|
6445
|
-
// Prevents retrying timed out & cancelled requests
|
|
6446
|
-
if (CODE_EXCLUDE_LIST.includes(error.code)) {
|
|
6447
|
-
return false;
|
|
6448
|
-
}
|
|
6449
|
-
// Prevents retrying unsafe errors
|
|
6450
|
-
return isRetryAllowed(error);
|
|
6451
|
-
}
|
|
6452
|
-
const SAFE_HTTP_METHODS = ['get', 'head', 'options'];
|
|
6453
|
-
const IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);
|
|
6454
|
-
function isRetryableError(error) {
|
|
6455
|
-
return (error.code !== 'ECONNABORTED' &&
|
|
6456
|
-
(!error.response ||
|
|
6457
|
-
error.response.status === 429 ||
|
|
6458
|
-
(error.response.status >= 500 && error.response.status <= 599)));
|
|
6459
|
-
}
|
|
6460
|
-
function isSafeRequestError(error) {
|
|
6461
|
-
if (!error.config?.method) {
|
|
6462
|
-
// Cannot determine if the request can be retried
|
|
6463
|
-
return false;
|
|
6464
|
-
}
|
|
6465
|
-
return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;
|
|
6466
|
-
}
|
|
6467
|
-
function isIdempotentRequestError(error) {
|
|
6468
|
-
if (!error.config?.method) {
|
|
6469
|
-
// Cannot determine if the request can be retried
|
|
6470
|
-
return false;
|
|
6471
|
-
}
|
|
6472
|
-
return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;
|
|
6473
|
-
}
|
|
6474
|
-
function isNetworkOrIdempotentRequestError(error) {
|
|
6475
|
-
return isNetworkError(error) || isIdempotentRequestError(error);
|
|
6476
|
-
}
|
|
6477
|
-
function retryAfter(error = undefined) {
|
|
6478
|
-
const retryAfterHeader = error?.response?.headers['retry-after'];
|
|
6479
|
-
if (!retryAfterHeader) {
|
|
6480
|
-
return 0;
|
|
6481
|
-
}
|
|
6482
|
-
// if the retry after header is a number, convert it to milliseconds
|
|
6483
|
-
let retryAfterMs = (Number(retryAfterHeader) || 0) * 1000;
|
|
6484
|
-
// If the retry after header is a date, get the number of milliseconds until that date
|
|
6485
|
-
if (retryAfterMs === 0) {
|
|
6486
|
-
retryAfterMs = (new Date(retryAfterHeader).valueOf() || 0) - Date.now();
|
|
6487
|
-
}
|
|
6488
|
-
return Math.max(0, retryAfterMs);
|
|
6489
|
-
}
|
|
6490
|
-
function noDelay(_retryNumber = 0, error = undefined) {
|
|
6491
|
-
return Math.max(0, retryAfter(error));
|
|
6492
|
-
}
|
|
6493
|
-
function exponentialDelay(retryNumber = 0, error = undefined, delayFactor = 100) {
|
|
6494
|
-
const calculatedDelay = 2 ** retryNumber * delayFactor;
|
|
6495
|
-
const delay = Math.max(calculatedDelay, retryAfter(error));
|
|
6496
|
-
const randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay
|
|
6497
|
-
return delay + randomSum;
|
|
6498
|
-
}
|
|
6499
|
-
/**
|
|
6500
|
-
* Linear delay
|
|
6501
|
-
* @param {number | undefined} delayFactor - delay factor in milliseconds (default: 100)
|
|
6502
|
-
* @returns {function} (retryNumber: number, error: AxiosError | undefined) => number
|
|
6503
|
-
*/
|
|
6504
|
-
function linearDelay(delayFactor = 100) {
|
|
6505
|
-
return (retryNumber = 0, error = undefined) => {
|
|
6506
|
-
const delay = retryNumber * delayFactor;
|
|
6507
|
-
return Math.max(delay, retryAfter(error));
|
|
6508
|
-
};
|
|
6509
|
-
}
|
|
6510
|
-
const DEFAULT_OPTIONS = {
|
|
6511
|
-
retries: 3,
|
|
6512
|
-
retryCondition: isNetworkOrIdempotentRequestError,
|
|
6513
|
-
retryDelay: noDelay,
|
|
6514
|
-
shouldResetTimeout: false,
|
|
6515
|
-
onRetry: () => { },
|
|
6516
|
-
onMaxRetryTimesExceeded: () => { },
|
|
6517
|
-
validateResponse: null
|
|
6518
|
-
};
|
|
6519
|
-
function getRequestOptions(config, defaultOptions) {
|
|
6520
|
-
return { ...DEFAULT_OPTIONS, ...defaultOptions, ...config[namespace] };
|
|
6521
|
-
}
|
|
6522
|
-
function setCurrentState(config, defaultOptions, resetLastRequestTime = false) {
|
|
6523
|
-
const currentState = getRequestOptions(config, defaultOptions || {});
|
|
6524
|
-
currentState.retryCount = currentState.retryCount || 0;
|
|
6525
|
-
if (!currentState.lastRequestTime || resetLastRequestTime) {
|
|
6526
|
-
currentState.lastRequestTime = Date.now();
|
|
6527
|
-
}
|
|
6528
|
-
config[namespace] = currentState;
|
|
6529
|
-
return currentState;
|
|
6530
|
-
}
|
|
6531
|
-
function fixConfig(axiosInstance, config) {
|
|
6532
|
-
// @ts-ignore
|
|
6533
|
-
if (axiosInstance.defaults.agent === config.agent) {
|
|
6534
|
-
// @ts-ignore
|
|
6535
|
-
delete config.agent;
|
|
6536
|
-
}
|
|
6537
|
-
if (axiosInstance.defaults.httpAgent === config.httpAgent) {
|
|
6538
|
-
delete config.httpAgent;
|
|
6539
|
-
}
|
|
6540
|
-
if (axiosInstance.defaults.httpsAgent === config.httpsAgent) {
|
|
6541
|
-
delete config.httpsAgent;
|
|
6542
|
-
}
|
|
6543
|
-
}
|
|
6544
|
-
async function shouldRetry(currentState, error) {
|
|
6545
|
-
const { retries, retryCondition } = currentState;
|
|
6546
|
-
const shouldRetryOrPromise = (currentState.retryCount || 0) < retries && retryCondition(error);
|
|
6547
|
-
// This could be a promise
|
|
6548
|
-
if (typeof shouldRetryOrPromise === 'object') {
|
|
6549
|
-
try {
|
|
6550
|
-
const shouldRetryPromiseResult = await shouldRetryOrPromise;
|
|
6551
|
-
// keep return true unless shouldRetryPromiseResult return false for compatibility
|
|
6552
|
-
return shouldRetryPromiseResult !== false;
|
|
6553
|
-
}
|
|
6554
|
-
catch (_err) {
|
|
6555
|
-
return false;
|
|
6556
|
-
}
|
|
6557
|
-
}
|
|
6558
|
-
return shouldRetryOrPromise;
|
|
6559
|
-
}
|
|
6560
|
-
async function handleRetry(axiosInstance, currentState, error, config) {
|
|
6561
|
-
currentState.retryCount += 1;
|
|
6562
|
-
const { retryDelay, shouldResetTimeout, onRetry } = currentState;
|
|
6563
|
-
const delay = retryDelay(currentState.retryCount, error);
|
|
6564
|
-
// Axios fails merging this configuration to the default configuration because it has an issue
|
|
6565
|
-
// with circular structures: https://github.com/mzabriskie/axios/issues/370
|
|
6566
|
-
fixConfig(axiosInstance, config);
|
|
6567
|
-
if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {
|
|
6568
|
-
const lastRequestDuration = Date.now() - currentState.lastRequestTime;
|
|
6569
|
-
const timeout = config.timeout - lastRequestDuration - delay;
|
|
6570
|
-
if (timeout <= 0) {
|
|
6571
|
-
return Promise.reject(error);
|
|
6572
|
-
}
|
|
6573
|
-
config.timeout = timeout;
|
|
6574
|
-
}
|
|
6575
|
-
config.transformRequest = [(data) => data];
|
|
6576
|
-
await onRetry(currentState.retryCount, error, config);
|
|
6577
|
-
if (config.signal?.aborted) {
|
|
6578
|
-
return Promise.resolve(axiosInstance(config));
|
|
6579
|
-
}
|
|
6580
|
-
return new Promise((resolve) => {
|
|
6581
|
-
const abortListener = () => {
|
|
6582
|
-
clearTimeout(timeout);
|
|
6583
|
-
resolve(axiosInstance(config));
|
|
6584
|
-
};
|
|
6585
|
-
const timeout = setTimeout(() => {
|
|
6586
|
-
resolve(axiosInstance(config));
|
|
6587
|
-
if (config.signal?.removeEventListener) {
|
|
6588
|
-
config.signal.removeEventListener('abort', abortListener);
|
|
6589
|
-
}
|
|
6590
|
-
}, delay);
|
|
6591
|
-
if (config.signal?.addEventListener) {
|
|
6592
|
-
config.signal.addEventListener('abort', abortListener, { once: true });
|
|
6593
|
-
}
|
|
6594
|
-
});
|
|
6595
|
-
}
|
|
6596
|
-
async function handleMaxRetryTimesExceeded(currentState, error) {
|
|
6597
|
-
if (currentState.retryCount >= currentState.retries)
|
|
6598
|
-
await currentState.onMaxRetryTimesExceeded(error, currentState.retryCount);
|
|
6599
|
-
}
|
|
6600
|
-
const axiosRetry = (axiosInstance, defaultOptions) => {
|
|
6601
|
-
const requestInterceptorId = axiosInstance.interceptors.request.use((config) => {
|
|
6602
|
-
setCurrentState(config, defaultOptions, true);
|
|
6603
|
-
if (config[namespace]?.validateResponse) {
|
|
6604
|
-
// by setting this, all HTTP responses will be go through the error interceptor first
|
|
6605
|
-
config.validateStatus = () => false;
|
|
6606
|
-
}
|
|
6607
|
-
return config;
|
|
6608
|
-
});
|
|
6609
|
-
const responseInterceptorId = axiosInstance.interceptors.response.use(null, async (error) => {
|
|
6610
|
-
const { config } = error;
|
|
6611
|
-
// If we have no information to retry the request
|
|
6612
|
-
if (!config) {
|
|
6613
|
-
return Promise.reject(error);
|
|
6614
|
-
}
|
|
6615
|
-
const currentState = setCurrentState(config, defaultOptions);
|
|
6616
|
-
if (error.response && currentState.validateResponse?.(error.response)) {
|
|
6617
|
-
// no issue with response
|
|
6618
|
-
return error.response;
|
|
6619
|
-
}
|
|
6620
|
-
if (await shouldRetry(currentState, error)) {
|
|
6621
|
-
return handleRetry(axiosInstance, currentState, error, config);
|
|
6622
|
-
}
|
|
6623
|
-
await handleMaxRetryTimesExceeded(currentState, error);
|
|
6624
|
-
return Promise.reject(error);
|
|
6625
|
-
});
|
|
6626
|
-
return { requestInterceptorId, responseInterceptorId };
|
|
6627
|
-
};
|
|
6628
|
-
// Compatibility with CommonJS
|
|
6629
|
-
axiosRetry.isNetworkError = isNetworkError;
|
|
6630
|
-
axiosRetry.isSafeRequestError = isSafeRequestError;
|
|
6631
|
-
axiosRetry.isIdempotentRequestError = isIdempotentRequestError;
|
|
6632
|
-
axiosRetry.isNetworkOrIdempotentRequestError = isNetworkOrIdempotentRequestError;
|
|
6633
|
-
axiosRetry.exponentialDelay = exponentialDelay;
|
|
6634
|
-
axiosRetry.linearDelay = linearDelay;
|
|
6635
|
-
axiosRetry.isRetryableError = isRetryableError;
|
|
6636
|
-
|
|
6637
6397
|
let axiosClient;
|
|
6638
6398
|
async function getAxiosAuthClient() {
|
|
6639
6399
|
if (!axiosClient) {
|
|
@@ -6643,7 +6403,6 @@ async function getAxiosAuthClient() {
|
|
|
6643
6403
|
headers: {
|
|
6644
6404
|
'Content-Type': 'application/json',
|
|
6645
6405
|
},
|
|
6646
|
-
timeout: 30000, // 30s timeout, matching makeApiRequest
|
|
6647
6406
|
});
|
|
6648
6407
|
}
|
|
6649
6408
|
return axiosClient;
|
|
@@ -6690,41 +6449,15 @@ async function createSessionWithPrivy(authToken, address, privyIdToken) {
|
|
|
6690
6449
|
});
|
|
6691
6450
|
return response.data;
|
|
6692
6451
|
}
|
|
6693
|
-
// Deduplicate concurrent refreshSession calls to prevent multiple code paths
|
|
6694
|
-
// (WebSocket reconnection, periodic refresh, API 401 retry) from all hitting
|
|
6695
|
-
// /session/refresh simultaneously.
|
|
6696
|
-
// Note: module-level state is shared across requests in SSR/Node — acceptable
|
|
6697
|
-
// since there is only one active session per server instance (same pattern as
|
|
6698
|
-
// refreshInFlight in api.ts).
|
|
6699
|
-
let refreshInFlight$1 = null;
|
|
6700
|
-
let refreshInFlightToken = null;
|
|
6701
6452
|
async function refreshSession(refreshToken) {
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
const config = await getConfig();
|
|
6711
|
-
const appId = config.appId;
|
|
6712
|
-
const response = await client.post('/session/refresh', {
|
|
6713
|
-
refreshToken,
|
|
6714
|
-
appId
|
|
6715
|
-
});
|
|
6716
|
-
return response.data;
|
|
6717
|
-
}
|
|
6718
|
-
finally {
|
|
6719
|
-
// Only clear if we're still the active in-flight request.
|
|
6720
|
-
// A second call with a different token may have replaced us.
|
|
6721
|
-
if (refreshInFlight$1 === currentFlight) {
|
|
6722
|
-
refreshInFlight$1 = null;
|
|
6723
|
-
refreshInFlightToken = null;
|
|
6724
|
-
}
|
|
6725
|
-
}
|
|
6726
|
-
})();
|
|
6727
|
-
return refreshInFlight$1;
|
|
6453
|
+
const client = await getAxiosAuthClient();
|
|
6454
|
+
const config = await getConfig();
|
|
6455
|
+
const appId = config.appId;
|
|
6456
|
+
const response = await client.post('/session/refresh', {
|
|
6457
|
+
refreshToken,
|
|
6458
|
+
appId
|
|
6459
|
+
});
|
|
6460
|
+
return response.data;
|
|
6728
6461
|
}
|
|
6729
6462
|
async function signSessionCreateMessage(_signMessageFunction) {
|
|
6730
6463
|
}
|
|
@@ -6862,10 +6595,14 @@ class WebSessionManager {
|
|
|
6862
6595
|
WebSessionManager.TAROBASE_SESSION_STORAGE_KEY = "tarobase_session_storage";
|
|
6863
6596
|
|
|
6864
6597
|
var webSessionManager = /*#__PURE__*/Object.freeze({
|
|
6865
|
-
|
|
6866
|
-
|
|
6598
|
+
__proto__: null,
|
|
6599
|
+
WebSessionManager: WebSessionManager
|
|
6867
6600
|
});
|
|
6868
6601
|
|
|
6602
|
+
function getDefaultExportFromCjs (x) {
|
|
6603
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
6604
|
+
}
|
|
6605
|
+
|
|
6869
6606
|
var buffer$1 = {};
|
|
6870
6607
|
|
|
6871
6608
|
var base64Js$1 = {};
|
|
@@ -9237,15 +8974,15 @@ function requireBuffer$1 () {
|
|
|
9237
8974
|
|
|
9238
8975
|
var bufferExports$1 = requireBuffer$1();
|
|
9239
8976
|
|
|
9240
|
-
var safeBuffer = {exports: {}};
|
|
8977
|
+
var safeBuffer$1 = {exports: {}};
|
|
9241
8978
|
|
|
9242
8979
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9243
8980
|
|
|
9244
|
-
var hasRequiredSafeBuffer;
|
|
8981
|
+
var hasRequiredSafeBuffer$1;
|
|
9245
8982
|
|
|
9246
|
-
function requireSafeBuffer () {
|
|
9247
|
-
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
9248
|
-
hasRequiredSafeBuffer = 1;
|
|
8983
|
+
function requireSafeBuffer$1 () {
|
|
8984
|
+
if (hasRequiredSafeBuffer$1) return safeBuffer$1.exports;
|
|
8985
|
+
hasRequiredSafeBuffer$1 = 1;
|
|
9249
8986
|
(function (module, exports$1) {
|
|
9250
8987
|
/* eslint-disable node/no-deprecated-api */
|
|
9251
8988
|
var buffer = requireBuffer$1();
|
|
@@ -9311,23 +9048,23 @@ function requireSafeBuffer () {
|
|
|
9311
9048
|
}
|
|
9312
9049
|
return buffer.SlowBuffer(size)
|
|
9313
9050
|
};
|
|
9314
|
-
} (safeBuffer, safeBuffer.exports));
|
|
9315
|
-
return safeBuffer.exports;
|
|
9051
|
+
} (safeBuffer$1, safeBuffer$1.exports));
|
|
9052
|
+
return safeBuffer$1.exports;
|
|
9316
9053
|
}
|
|
9317
9054
|
|
|
9318
|
-
var src;
|
|
9319
|
-
var hasRequiredSrc;
|
|
9055
|
+
var src$1;
|
|
9056
|
+
var hasRequiredSrc$1;
|
|
9320
9057
|
|
|
9321
|
-
function requireSrc () {
|
|
9322
|
-
if (hasRequiredSrc) return src;
|
|
9323
|
-
hasRequiredSrc = 1;
|
|
9058
|
+
function requireSrc$1 () {
|
|
9059
|
+
if (hasRequiredSrc$1) return src$1;
|
|
9060
|
+
hasRequiredSrc$1 = 1;
|
|
9324
9061
|
// base-x encoding / decoding
|
|
9325
9062
|
// Copyright (c) 2018 base-x contributors
|
|
9326
9063
|
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
9327
9064
|
// Distributed under the MIT software license, see the accompanying
|
|
9328
9065
|
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
9329
9066
|
// @ts-ignore
|
|
9330
|
-
var _Buffer = requireSafeBuffer().Buffer;
|
|
9067
|
+
var _Buffer = requireSafeBuffer$1().Buffer;
|
|
9331
9068
|
function base (ALPHABET) {
|
|
9332
9069
|
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
9333
9070
|
var BASE_MAP = new Uint8Array(256);
|
|
@@ -9442,25 +9179,25 @@ function requireSrc () {
|
|
|
9442
9179
|
decode: decode
|
|
9443
9180
|
}
|
|
9444
9181
|
}
|
|
9445
|
-
src = base;
|
|
9446
|
-
return src;
|
|
9182
|
+
src$1 = base;
|
|
9183
|
+
return src$1;
|
|
9447
9184
|
}
|
|
9448
9185
|
|
|
9449
|
-
var bs58$1;
|
|
9450
|
-
var hasRequiredBs58;
|
|
9186
|
+
var bs58$1$1;
|
|
9187
|
+
var hasRequiredBs58$1;
|
|
9451
9188
|
|
|
9452
|
-
function requireBs58 () {
|
|
9453
|
-
if (hasRequiredBs58) return bs58$1;
|
|
9454
|
-
hasRequiredBs58 = 1;
|
|
9455
|
-
var basex = requireSrc();
|
|
9189
|
+
function requireBs58$1 () {
|
|
9190
|
+
if (hasRequiredBs58$1) return bs58$1$1;
|
|
9191
|
+
hasRequiredBs58$1 = 1;
|
|
9192
|
+
var basex = requireSrc$1();
|
|
9456
9193
|
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9457
9194
|
|
|
9458
|
-
bs58$1 = basex(ALPHABET);
|
|
9459
|
-
return bs58$1;
|
|
9195
|
+
bs58$1$1 = basex(ALPHABET);
|
|
9196
|
+
return bs58$1$1;
|
|
9460
9197
|
}
|
|
9461
9198
|
|
|
9462
|
-
var bs58Exports = requireBs58();
|
|
9463
|
-
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
|
|
9199
|
+
var bs58Exports$1 = requireBs58$1();
|
|
9200
|
+
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports$1);
|
|
9464
9201
|
|
|
9465
9202
|
// ─────────────────────────────────────────────────────────────
|
|
9466
9203
|
// Local implementation of getSimulationComputeUnits
|
|
@@ -9662,19 +9399,7 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
|
|
|
9662
9399
|
}
|
|
9663
9400
|
}
|
|
9664
9401
|
else if (lutKey != null) {
|
|
9665
|
-
|
|
9666
|
-
// may not have indexed it yet (load-balancer split). Retry with exponential
|
|
9667
|
-
// back-off; first retry at 100 ms almost always resolves it.
|
|
9668
|
-
let table = null;
|
|
9669
|
-
for (let attempt = 0; attempt < 5; attempt++) {
|
|
9670
|
-
const { value } = await connection.getAddressLookupTable(new PublicKey(lutKey));
|
|
9671
|
-
if (value) {
|
|
9672
|
-
table = value;
|
|
9673
|
-
break;
|
|
9674
|
-
}
|
|
9675
|
-
if (attempt < 4)
|
|
9676
|
-
await new Promise(r => setTimeout(r, 100 * Math.pow(2, attempt)));
|
|
9677
|
-
}
|
|
9402
|
+
const { value: table } = await connection.getAddressLookupTable(new PublicKey(lutKey));
|
|
9678
9403
|
if (!table)
|
|
9679
9404
|
throw new Error('LUT not found after creation/extend');
|
|
9680
9405
|
lookupTables.push(table);
|
|
@@ -9809,8 +9534,8 @@ class ServerSessionManager {
|
|
|
9809
9534
|
ServerSessionManager.instance = new ServerSessionManager();
|
|
9810
9535
|
|
|
9811
9536
|
var serverSessionManager = /*#__PURE__*/Object.freeze({
|
|
9812
|
-
|
|
9813
|
-
|
|
9537
|
+
__proto__: null,
|
|
9538
|
+
ServerSessionManager: ServerSessionManager
|
|
9814
9539
|
});
|
|
9815
9540
|
|
|
9816
9541
|
/**
|
|
@@ -9909,23 +9634,6 @@ async function updateIdTokenAndAccessToken(idToken, accessToken, isServer = fals
|
|
|
9909
9634
|
await WebSessionManager.updateIdTokenAndAccessToken(idToken, accessToken);
|
|
9910
9635
|
}
|
|
9911
9636
|
|
|
9912
|
-
const apiClient = globalAxios.create();
|
|
9913
|
-
axiosRetry(apiClient, {
|
|
9914
|
-
retries: 2,
|
|
9915
|
-
retryCondition: (error) => {
|
|
9916
|
-
var _a, _b;
|
|
9917
|
-
// Only retry GET requests on network errors (ECONNRESET, ETIMEDOUT, etc.)
|
|
9918
|
-
// Writes (POST/PUT) are not retried — the server may have processed
|
|
9919
|
-
// the request before the connection was reset.
|
|
9920
|
-
return axiosRetry.isNetworkError(error) && ((_b = (_a = error.config) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'get';
|
|
9921
|
-
},
|
|
9922
|
-
retryDelay: axiosRetry.exponentialDelay,
|
|
9923
|
-
shouldResetTimeout: true,
|
|
9924
|
-
onRetry: (retryCount, error, requestConfig) => {
|
|
9925
|
-
var _a;
|
|
9926
|
-
console.warn(`[tarobase-sdk] retry ${retryCount} for ${(_a = requestConfig.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()} ${requestConfig.url} — ${error.code || error.message}`);
|
|
9927
|
-
},
|
|
9928
|
-
});
|
|
9929
9637
|
const refreshInFlight = new Map();
|
|
9930
9638
|
async function refreshAuthSessionOnce(appId, isServer) {
|
|
9931
9639
|
const key = `${isServer ? "server" : "web"}:${appId}`;
|
|
@@ -9972,7 +9680,6 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
|
|
|
9972
9680
|
ServerSessionManager.instance.clearSession();
|
|
9973
9681
|
};
|
|
9974
9682
|
async function executeRequest() {
|
|
9975
|
-
var _a;
|
|
9976
9683
|
// When _getAuthHeaders is provided (wallet client), use it as the sole auth source.
|
|
9977
9684
|
// Otherwise use the global createAuthHeader (default path).
|
|
9978
9685
|
const authHeader = (_overrides === null || _overrides === void 0 ? void 0 : _overrides._getAuthHeaders)
|
|
@@ -9994,12 +9701,11 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
|
|
|
9994
9701
|
method,
|
|
9995
9702
|
url: `${config.apiUrl}${urlPath.startsWith("/") ? urlPath : `/${urlPath}`}`,
|
|
9996
9703
|
headers,
|
|
9997
|
-
timeout: (_a = _overrides === null || _overrides === void 0 ? void 0 : _overrides.timeout) !== null && _a !== void 0 ? _a : 30000,
|
|
9998
9704
|
};
|
|
9999
9705
|
if (method !== "GET" && method !== "get") {
|
|
10000
9706
|
requestConfig.data = data ? JSON.stringify(data) : {};
|
|
10001
9707
|
}
|
|
10002
|
-
const response = await
|
|
9708
|
+
const response = await globalAxios(requestConfig);
|
|
10003
9709
|
return { data: response.data, status: response.status, headers: response.headers };
|
|
10004
9710
|
}
|
|
10005
9711
|
try {
|
|
@@ -10935,7 +10641,6 @@ function scheduleTokenRefresh(connection, isServer) {
|
|
|
10935
10641
|
// This replaces the old single setTimeout approach which was unreliable for long
|
|
10936
10642
|
// delays (browsers throttle/suspend timers in background tabs).
|
|
10937
10643
|
connection.tokenRefreshTimer = setInterval(async () => {
|
|
10938
|
-
var _a, _b;
|
|
10939
10644
|
try {
|
|
10940
10645
|
const currentToken = await getIdToken$1(isServer);
|
|
10941
10646
|
if (!currentToken)
|
|
@@ -10966,17 +10671,6 @@ function scheduleTokenRefresh(connection, isServer) {
|
|
|
10966
10671
|
}
|
|
10967
10672
|
}
|
|
10968
10673
|
catch (refreshError) {
|
|
10969
|
-
// If the refresh token itself is invalid (401/403), stop retrying —
|
|
10970
|
-
// the token won't magically become valid next interval, and continuing
|
|
10971
|
-
// to hammer /session/refresh causes 429 rate-limit storms.
|
|
10972
|
-
if (((_a = refreshError === null || refreshError === void 0 ? void 0 : refreshError.response) === null || _a === void 0 ? void 0 : _a.status) === 401 || ((_b = refreshError === null || refreshError === void 0 ? void 0 : refreshError.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
|
|
10973
|
-
console.warn('[WS v2] Refresh token rejected (401/403), stopping periodic refresh');
|
|
10974
|
-
if (connection.tokenRefreshTimer) {
|
|
10975
|
-
clearInterval(connection.tokenRefreshTimer);
|
|
10976
|
-
connection.tokenRefreshTimer = null;
|
|
10977
|
-
}
|
|
10978
|
-
return;
|
|
10979
|
-
}
|
|
10980
10674
|
console.warn('[WS v2] Proactive token refresh failed, will retry next interval:', refreshError);
|
|
10981
10675
|
}
|
|
10982
10676
|
}
|
|
@@ -10987,7 +10681,6 @@ function scheduleTokenRefresh(connection, isServer) {
|
|
|
10987
10681
|
}, TOKEN_CHECK_INTERVAL);
|
|
10988
10682
|
}
|
|
10989
10683
|
async function getFreshAuthToken(isServer) {
|
|
10990
|
-
var _a, _b;
|
|
10991
10684
|
const currentToken = await getIdToken$1(isServer);
|
|
10992
10685
|
if (!currentToken) {
|
|
10993
10686
|
return null;
|
|
@@ -11010,17 +10703,6 @@ async function getFreshAuthToken(isServer) {
|
|
|
11010
10703
|
}
|
|
11011
10704
|
catch (error) {
|
|
11012
10705
|
console.error('[WS v2] Error refreshing token:', error);
|
|
11013
|
-
// If the refresh token is permanently invalid (401/403), clear the stale
|
|
11014
|
-
// session from storage so future attempts don't keep retrying with it.
|
|
11015
|
-
if (!isServer && (((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status) === 401 || ((_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.status) === 403)) {
|
|
11016
|
-
try {
|
|
11017
|
-
const { WebSessionManager } = await Promise.resolve().then(function () { return webSessionManager; });
|
|
11018
|
-
WebSessionManager.clearSession();
|
|
11019
|
-
}
|
|
11020
|
-
catch (clearError) {
|
|
11021
|
-
console.warn('[WS v2] Failed to clear stale session:', clearError);
|
|
11022
|
-
}
|
|
11023
|
-
}
|
|
11024
10706
|
}
|
|
11025
10707
|
// Return null instead of the expired token to prevent infinite 401 reconnect storms.
|
|
11026
10708
|
// The server accepts unauthenticated connections; auth-required subscriptions will
|
|
@@ -11141,16 +10823,7 @@ async function getOrCreateConnection(appId, isServer) {
|
|
|
11141
10823
|
ws.addEventListener('open', () => {
|
|
11142
10824
|
connection.isConnecting = false;
|
|
11143
10825
|
connection.isConnected = true;
|
|
11144
|
-
|
|
11145
|
-
// fresh auth token is actually obtained (in urlProvider, line ~389) or on
|
|
11146
|
-
// an explicit auth change (reconnectWithNewAuthV2, line ~854). Resetting
|
|
11147
|
-
// on every 'open' event created an infinite loop: auth fails 5x → connect
|
|
11148
|
-
// without auth → open resets counter → disconnect → auth fails 5x again →
|
|
11149
|
-
// repeat forever, hammering /session/refresh and causing 429s.
|
|
11150
|
-
//
|
|
11151
|
-
// An elevated counter is safe for anonymous/guest sessions: when there's no
|
|
11152
|
-
// token at all (getIdToken returns null), the counter is never checked —
|
|
11153
|
-
// urlProvider skips straight to unauthenticated connection.
|
|
10826
|
+
connection.consecutiveAuthFailures = 0;
|
|
11154
10827
|
// Schedule periodic token freshness checks
|
|
11155
10828
|
scheduleTokenRefresh(connection, isServer);
|
|
11156
10829
|
// Re-subscribe to all existing subscriptions after reconnect
|
|
@@ -15602,6 +15275,32 @@ async function confirmAndCheckTransaction(connection, signature) {
|
|
|
15602
15275
|
}
|
|
15603
15276
|
|
|
15604
15277
|
const VALID_PROVIDERS = ['injected', 'google', 'apple', 'deeplink', 'phantom'];
|
|
15278
|
+
// When the dApp runs inside an iframe whose parent origin is different from
|
|
15279
|
+
// (or can't inject into) the child frame — notably Phantom's Android in-app
|
|
15280
|
+
// browser, which injects window.phantom.solana only into the top frame —
|
|
15281
|
+
// the Phantom deeplink path tries to navigate phantom.app/ul/browse/... from
|
|
15282
|
+
// inside the iframe. Android App Links only hand off on top-level navigations,
|
|
15283
|
+
// and phantom.app refuses to be framed (X-Frame-Options: DENY), so the connect
|
|
15284
|
+
// fails. To get back to a working context we navigate the top window to the
|
|
15285
|
+
// dApp's own URL, dropping the iframe shell. Once top-level, the wallet
|
|
15286
|
+
// browser injects its provider and the normal injected flow succeeds.
|
|
15287
|
+
function isInIframe() {
|
|
15288
|
+
if (typeof window === 'undefined')
|
|
15289
|
+
return false;
|
|
15290
|
+
try {
|
|
15291
|
+
return window.top !== window.self;
|
|
15292
|
+
}
|
|
15293
|
+
catch (_a) {
|
|
15294
|
+
// Cross-origin access to window.top throws — if we can't read it, we're iframed.
|
|
15295
|
+
return true;
|
|
15296
|
+
}
|
|
15297
|
+
}
|
|
15298
|
+
function shouldBreakOutOfIframe(provider) {
|
|
15299
|
+
// Only break out when the user chose the deeplink provider. The modal only
|
|
15300
|
+
// offers deeplink on mobile when no injected Phantom is present, so this is
|
|
15301
|
+
// exactly the iframe-without-provider case we need to escape.
|
|
15302
|
+
return provider === 'deeplink' && isInIframe();
|
|
15303
|
+
}
|
|
15605
15304
|
// Dynamically import React and Phantom SDK - only when needed
|
|
15606
15305
|
let React$1;
|
|
15607
15306
|
let ReactDOM$1;
|
|
@@ -15622,7 +15321,7 @@ async function loadDependencies() {
|
|
|
15622
15321
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
15623
15322
|
import('react'),
|
|
15624
15323
|
import('react-dom/client'),
|
|
15625
|
-
import('./index-
|
|
15324
|
+
import('./index-U-xlsKRI.esm.js')
|
|
15626
15325
|
]);
|
|
15627
15326
|
// Extract default export from ESM module namespace
|
|
15628
15327
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -15970,6 +15669,27 @@ class PhantomWalletProvider {
|
|
|
15970
15669
|
const handleWalletClick = async (options) => {
|
|
15971
15670
|
walletClickedRef.current = true;
|
|
15972
15671
|
setShowWalletModal(false);
|
|
15672
|
+
// If we're in an iframe and the user chose deeplink, Phantom's SDK
|
|
15673
|
+
// will navigate *this* iframe to phantom.app/ul/browse/..., which
|
|
15674
|
+
// Android App Links won't intercept and phantom.app won't let be
|
|
15675
|
+
// framed. Escape to top-level first so the wallet browser can
|
|
15676
|
+
// inject its provider and the normal injected flow takes over
|
|
15677
|
+
// on the user's next connect tap.
|
|
15678
|
+
if (shouldBreakOutOfIframe(options === null || options === void 0 ? void 0 : options.provider)) {
|
|
15679
|
+
try {
|
|
15680
|
+
// Same-site navigation (*.poof.new → *.poof.new) plus the
|
|
15681
|
+
// iframe's allow-top-navigation-by-user-activation sandbox
|
|
15682
|
+
// token make this go through.
|
|
15683
|
+
window.top.location.href = window.location.href;
|
|
15684
|
+
return;
|
|
15685
|
+
}
|
|
15686
|
+
catch (_a) {
|
|
15687
|
+
// Top-nav blocked (no sandbox grant, cross-origin top, etc.).
|
|
15688
|
+
// Fall through to the normal deeplink path — at least the
|
|
15689
|
+
// user gets the original broken-ish behavior instead of a
|
|
15690
|
+
// silently-dead button.
|
|
15691
|
+
}
|
|
15692
|
+
}
|
|
15973
15693
|
try {
|
|
15974
15694
|
if (options === null || options === void 0 ? void 0 : options.walletId) {
|
|
15975
15695
|
await connect({ provider: 'injected', walletId: options.walletId });
|
|
@@ -19934,137 +19654,235 @@ function createSolanaRpcSubscriptionsFromTransport(transport) {
|
|
|
19934
19654
|
});
|
|
19935
19655
|
}
|
|
19936
19656
|
|
|
19937
|
-
|
|
19938
|
-
|
|
19939
|
-
|
|
19940
|
-
|
|
19941
|
-
|
|
19942
|
-
|
|
19943
|
-
|
|
19944
|
-
|
|
19945
|
-
|
|
19946
|
-
|
|
19947
|
-
|
|
19948
|
-
|
|
19949
|
-
|
|
19950
|
-
|
|
19951
|
-
|
|
19952
|
-
|
|
19953
|
-
|
|
19954
|
-
|
|
19955
|
-
|
|
19956
|
-
|
|
19957
|
-
|
|
19958
|
-
|
|
19959
|
-
|
|
19960
|
-
|
|
19961
|
-
|
|
19962
|
-
|
|
19963
|
-
|
|
19964
|
-
|
|
19965
|
-
|
|
19966
|
-
|
|
19967
|
-
|
|
19968
|
-
|
|
19969
|
-
|
|
19970
|
-
|
|
19971
|
-
|
|
19972
|
-
|
|
19973
|
-
|
|
19974
|
-
|
|
19975
|
-
|
|
19976
|
-
|
|
19977
|
-
|
|
19978
|
-
|
|
19979
|
-
|
|
19980
|
-
|
|
19981
|
-
|
|
19982
|
-
|
|
19983
|
-
|
|
19984
|
-
|
|
19985
|
-
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
|
|
19990
|
-
|
|
19991
|
-
|
|
19992
|
-
|
|
19993
|
-
|
|
19994
|
-
|
|
19995
|
-
|
|
19996
|
-
|
|
19997
|
-
|
|
19998
|
-
|
|
19999
|
-
|
|
20000
|
-
|
|
20001
|
-
|
|
20002
|
-
|
|
20003
|
-
|
|
20004
|
-
|
|
20005
|
-
|
|
20006
|
-
|
|
20007
|
-
|
|
20008
|
-
|
|
20009
|
-
|
|
20010
|
-
|
|
20011
|
-
|
|
20012
|
-
|
|
20013
|
-
|
|
20014
|
-
|
|
20015
|
-
|
|
20016
|
-
|
|
20017
|
-
|
|
20018
|
-
|
|
20019
|
-
|
|
20020
|
-
|
|
20021
|
-
|
|
20022
|
-
|
|
20023
|
-
|
|
20024
|
-
|
|
20025
|
-
|
|
20026
|
-
|
|
20027
|
-
|
|
20028
|
-
|
|
20029
|
-
|
|
20030
|
-
|
|
20031
|
-
|
|
20032
|
-
|
|
20033
|
-
|
|
20034
|
-
|
|
20035
|
-
|
|
20036
|
-
|
|
20037
|
-
|
|
20038
|
-
|
|
20039
|
-
|
|
20040
|
-
|
|
20041
|
-
|
|
20042
|
-
|
|
20043
|
-
|
|
20044
|
-
|
|
20045
|
-
|
|
20046
|
-
|
|
20047
|
-
|
|
20048
|
-
|
|
20049
|
-
|
|
20050
|
-
|
|
20051
|
-
|
|
20052
|
-
|
|
20053
|
-
|
|
20054
|
-
|
|
20055
|
-
|
|
20056
|
-
|
|
20057
|
-
|
|
20058
|
-
|
|
19657
|
+
var safeBuffer = {exports: {}};
|
|
19658
|
+
|
|
19659
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
19660
|
+
|
|
19661
|
+
var hasRequiredSafeBuffer;
|
|
19662
|
+
|
|
19663
|
+
function requireSafeBuffer () {
|
|
19664
|
+
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
19665
|
+
hasRequiredSafeBuffer = 1;
|
|
19666
|
+
(function (module, exports$1) {
|
|
19667
|
+
/* eslint-disable node/no-deprecated-api */
|
|
19668
|
+
var buffer = requireBuffer();
|
|
19669
|
+
var Buffer = buffer.Buffer;
|
|
19670
|
+
|
|
19671
|
+
// alternative to using Object.keys for old browsers
|
|
19672
|
+
function copyProps (src, dst) {
|
|
19673
|
+
for (var key in src) {
|
|
19674
|
+
dst[key] = src[key];
|
|
19675
|
+
}
|
|
19676
|
+
}
|
|
19677
|
+
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
|
|
19678
|
+
module.exports = buffer;
|
|
19679
|
+
} else {
|
|
19680
|
+
// Copy properties from require('buffer')
|
|
19681
|
+
copyProps(buffer, exports$1);
|
|
19682
|
+
exports$1.Buffer = SafeBuffer;
|
|
19683
|
+
}
|
|
19684
|
+
|
|
19685
|
+
function SafeBuffer (arg, encodingOrOffset, length) {
|
|
19686
|
+
return Buffer(arg, encodingOrOffset, length)
|
|
19687
|
+
}
|
|
19688
|
+
|
|
19689
|
+
SafeBuffer.prototype = Object.create(Buffer.prototype);
|
|
19690
|
+
|
|
19691
|
+
// Copy static methods from Buffer
|
|
19692
|
+
copyProps(Buffer, SafeBuffer);
|
|
19693
|
+
|
|
19694
|
+
SafeBuffer.from = function (arg, encodingOrOffset, length) {
|
|
19695
|
+
if (typeof arg === 'number') {
|
|
19696
|
+
throw new TypeError('Argument must not be a number')
|
|
19697
|
+
}
|
|
19698
|
+
return Buffer(arg, encodingOrOffset, length)
|
|
19699
|
+
};
|
|
19700
|
+
|
|
19701
|
+
SafeBuffer.alloc = function (size, fill, encoding) {
|
|
19702
|
+
if (typeof size !== 'number') {
|
|
19703
|
+
throw new TypeError('Argument must be a number')
|
|
19704
|
+
}
|
|
19705
|
+
var buf = Buffer(size);
|
|
19706
|
+
if (fill !== undefined) {
|
|
19707
|
+
if (typeof encoding === 'string') {
|
|
19708
|
+
buf.fill(fill, encoding);
|
|
19709
|
+
} else {
|
|
19710
|
+
buf.fill(fill);
|
|
19711
|
+
}
|
|
19712
|
+
} else {
|
|
19713
|
+
buf.fill(0);
|
|
19714
|
+
}
|
|
19715
|
+
return buf
|
|
19716
|
+
};
|
|
19717
|
+
|
|
19718
|
+
SafeBuffer.allocUnsafe = function (size) {
|
|
19719
|
+
if (typeof size !== 'number') {
|
|
19720
|
+
throw new TypeError('Argument must be a number')
|
|
19721
|
+
}
|
|
19722
|
+
return Buffer(size)
|
|
19723
|
+
};
|
|
19724
|
+
|
|
19725
|
+
SafeBuffer.allocUnsafeSlow = function (size) {
|
|
19726
|
+
if (typeof size !== 'number') {
|
|
19727
|
+
throw new TypeError('Argument must be a number')
|
|
19728
|
+
}
|
|
19729
|
+
return buffer.SlowBuffer(size)
|
|
19730
|
+
};
|
|
19731
|
+
} (safeBuffer, safeBuffer.exports));
|
|
19732
|
+
return safeBuffer.exports;
|
|
19733
|
+
}
|
|
19734
|
+
|
|
19735
|
+
var src;
|
|
19736
|
+
var hasRequiredSrc;
|
|
19737
|
+
|
|
19738
|
+
function requireSrc () {
|
|
19739
|
+
if (hasRequiredSrc) return src;
|
|
19740
|
+
hasRequiredSrc = 1;
|
|
19741
|
+
// base-x encoding / decoding
|
|
19742
|
+
// Copyright (c) 2018 base-x contributors
|
|
19743
|
+
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
19744
|
+
// Distributed under the MIT software license, see the accompanying
|
|
19745
|
+
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
19746
|
+
// @ts-ignore
|
|
19747
|
+
var _Buffer = requireSafeBuffer().Buffer;
|
|
19748
|
+
function base (ALPHABET) {
|
|
19749
|
+
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
19750
|
+
var BASE_MAP = new Uint8Array(256);
|
|
19751
|
+
for (var j = 0; j < BASE_MAP.length; j++) {
|
|
19752
|
+
BASE_MAP[j] = 255;
|
|
19753
|
+
}
|
|
19754
|
+
for (var i = 0; i < ALPHABET.length; i++) {
|
|
19755
|
+
var x = ALPHABET.charAt(i);
|
|
19756
|
+
var xc = x.charCodeAt(0);
|
|
19757
|
+
if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
|
|
19758
|
+
BASE_MAP[xc] = i;
|
|
19759
|
+
}
|
|
19760
|
+
var BASE = ALPHABET.length;
|
|
19761
|
+
var LEADER = ALPHABET.charAt(0);
|
|
19762
|
+
var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
|
|
19763
|
+
var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
|
|
19764
|
+
function encode (source) {
|
|
19765
|
+
if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source); }
|
|
19766
|
+
if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }
|
|
19767
|
+
if (source.length === 0) { return '' }
|
|
19768
|
+
// Skip & count leading zeroes.
|
|
19769
|
+
var zeroes = 0;
|
|
19770
|
+
var length = 0;
|
|
19771
|
+
var pbegin = 0;
|
|
19772
|
+
var pend = source.length;
|
|
19773
|
+
while (pbegin !== pend && source[pbegin] === 0) {
|
|
19774
|
+
pbegin++;
|
|
19775
|
+
zeroes++;
|
|
19776
|
+
}
|
|
19777
|
+
// Allocate enough space in big-endian base58 representation.
|
|
19778
|
+
var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
|
|
19779
|
+
var b58 = new Uint8Array(size);
|
|
19780
|
+
// Process the bytes.
|
|
19781
|
+
while (pbegin !== pend) {
|
|
19782
|
+
var carry = source[pbegin];
|
|
19783
|
+
// Apply "b58 = b58 * 256 + ch".
|
|
19784
|
+
var i = 0;
|
|
19785
|
+
for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
19786
|
+
carry += (256 * b58[it1]) >>> 0;
|
|
19787
|
+
b58[it1] = (carry % BASE) >>> 0;
|
|
19788
|
+
carry = (carry / BASE) >>> 0;
|
|
19789
|
+
}
|
|
19790
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
19791
|
+
length = i;
|
|
19792
|
+
pbegin++;
|
|
19793
|
+
}
|
|
19794
|
+
// Skip leading zeroes in base58 result.
|
|
19795
|
+
var it2 = size - length;
|
|
19796
|
+
while (it2 !== size && b58[it2] === 0) {
|
|
19797
|
+
it2++;
|
|
19798
|
+
}
|
|
19799
|
+
// Translate the result into a string.
|
|
19800
|
+
var str = LEADER.repeat(zeroes);
|
|
19801
|
+
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
19802
|
+
return str
|
|
19803
|
+
}
|
|
19804
|
+
function decodeUnsafe (source) {
|
|
19805
|
+
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
19806
|
+
if (source.length === 0) { return _Buffer.alloc(0) }
|
|
19807
|
+
var psz = 0;
|
|
19808
|
+
// Skip and count leading '1's.
|
|
19809
|
+
var zeroes = 0;
|
|
19810
|
+
var length = 0;
|
|
19811
|
+
while (source[psz] === LEADER) {
|
|
19812
|
+
zeroes++;
|
|
19813
|
+
psz++;
|
|
19814
|
+
}
|
|
19815
|
+
// Allocate enough space in big-endian base256 representation.
|
|
19816
|
+
var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
19817
|
+
var b256 = new Uint8Array(size);
|
|
19818
|
+
// Process the characters.
|
|
19819
|
+
while (psz < source.length) {
|
|
19820
|
+
// Find code of next character
|
|
19821
|
+
var charCode = source.charCodeAt(psz);
|
|
19822
|
+
// Base map can not be indexed using char code
|
|
19823
|
+
if (charCode > 255) { return }
|
|
19824
|
+
// Decode character
|
|
19825
|
+
var carry = BASE_MAP[charCode];
|
|
19826
|
+
// Invalid character
|
|
19827
|
+
if (carry === 255) { return }
|
|
19828
|
+
var i = 0;
|
|
19829
|
+
for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
19830
|
+
carry += (BASE * b256[it3]) >>> 0;
|
|
19831
|
+
b256[it3] = (carry % 256) >>> 0;
|
|
19832
|
+
carry = (carry / 256) >>> 0;
|
|
19833
|
+
}
|
|
19834
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
19835
|
+
length = i;
|
|
19836
|
+
psz++;
|
|
19837
|
+
}
|
|
19838
|
+
// Skip leading zeroes in b256.
|
|
19839
|
+
var it4 = size - length;
|
|
19840
|
+
while (it4 !== size && b256[it4] === 0) {
|
|
19841
|
+
it4++;
|
|
19842
|
+
}
|
|
19843
|
+
var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
|
|
19844
|
+
vch.fill(0x00, 0, zeroes);
|
|
19845
|
+
var j = zeroes;
|
|
19846
|
+
while (it4 !== size) {
|
|
19847
|
+
vch[j++] = b256[it4++];
|
|
19848
|
+
}
|
|
19849
|
+
return vch
|
|
19850
|
+
}
|
|
19851
|
+
function decode (string) {
|
|
19852
|
+
var buffer = decodeUnsafe(string);
|
|
19853
|
+
if (buffer) { return buffer }
|
|
19854
|
+
throw new Error('Non-base' + BASE + ' character')
|
|
19855
|
+
}
|
|
19856
|
+
return {
|
|
19857
|
+
encode: encode,
|
|
19858
|
+
decodeUnsafe: decodeUnsafe,
|
|
19859
|
+
decode: decode
|
|
19860
|
+
}
|
|
19861
|
+
}
|
|
19862
|
+
src = base;
|
|
19863
|
+
return src;
|
|
20059
19864
|
}
|
|
20060
19865
|
|
|
20061
|
-
var
|
|
20062
|
-
var
|
|
19866
|
+
var bs58$1;
|
|
19867
|
+
var hasRequiredBs58;
|
|
20063
19868
|
|
|
20064
|
-
|
|
19869
|
+
function requireBs58 () {
|
|
19870
|
+
if (hasRequiredBs58) return bs58$1;
|
|
19871
|
+
hasRequiredBs58 = 1;
|
|
19872
|
+
var basex = requireSrc();
|
|
19873
|
+
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
19874
|
+
|
|
19875
|
+
bs58$1 = basex(ALPHABET);
|
|
19876
|
+
return bs58$1;
|
|
19877
|
+
}
|
|
19878
|
+
|
|
19879
|
+
var bs58Exports = requireBs58();
|
|
19880
|
+
var bs58 = /*@__PURE__*/getDefaultExportFromCjs$1(bs58Exports);
|
|
19881
|
+
|
|
19882
|
+
var index = /*#__PURE__*/_mergeNamespaces({
|
|
20065
19883
|
__proto__: null,
|
|
20066
19884
|
default: bs58
|
|
20067
|
-
});
|
|
19885
|
+
}, [bs58Exports]);
|
|
20068
19886
|
|
|
20069
19887
|
const SURFNET_RPC_URL$1 = "https://surfpool.fly.dev";
|
|
20070
19888
|
let React;
|
|
@@ -20978,7 +20796,7 @@ async function loadMwaProtocol() {
|
|
|
20978
20796
|
return mwaProtocolLoadPromise;
|
|
20979
20797
|
mwaProtocolLoadPromise = (async () => {
|
|
20980
20798
|
try {
|
|
20981
|
-
mwaProtocolModule = await import('./index.browser-
|
|
20799
|
+
mwaProtocolModule = await import('./index.browser-Dbq5Qf1G.esm.js');
|
|
20982
20800
|
}
|
|
20983
20801
|
catch (e) {
|
|
20984
20802
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -21000,7 +20818,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
21000
20818
|
if (typeof window === 'undefined')
|
|
21001
20819
|
return;
|
|
21002
20820
|
try {
|
|
21003
|
-
const walletStandardMobile = await import('./index.browser-
|
|
20821
|
+
const walletStandardMobile = await import('./index.browser-CMEwqnEe.esm.js');
|
|
21004
20822
|
const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
|
|
21005
20823
|
if (!registerMwa) {
|
|
21006
20824
|
console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
|
|
@@ -21908,5 +21726,5 @@ class PrivyExpoProvider {
|
|
|
21908
21726
|
}
|
|
21909
21727
|
}
|
|
21910
21728
|
|
|
21911
|
-
export {
|
|
21912
|
-
//# sourceMappingURL=index-
|
|
21729
|
+
export { getMany as $, useAuth as A, deserializeTransaction as B, getIdToken as C, setPlatform as D, getPlatform as E, PrivyWalletProvider as F, DEFAULT_TEST_ADDRESS as G, isMobileWalletAvailable as H, registerMobileWalletAdapter as I, PrivyExpoProvider as J, InsufficientBalanceError as K, ServerSessionManager as L, MockAuthProvider as M, buildSetDocumentsTransaction as N, OffchainAuthProvider as O, PhantomWalletProvider as P, clearCache as Q, ReactNativeSessionManager as R, SolanaMobileWalletProvider as S, closeAllSubscriptions as T, convertRemainingAccounts as U, createSessionWithPrivy as V, WebSessionManager as W, createSessionWithSignature as X, genAuthNonce as Y, genSolanaMessage as Z, getCachedData as _, getCurrentUser as a, reconnectWithNewAuth as a0, refreshSession as a1, signSessionCreateMessage as a2, bufferExports as b, onAuthLoadingChanged as c, getAuthLoading as d, logout as e, getConfig as f, getDefaultExportFromCjs$1 as g, getAuthProvider as h, init as i, get as j, setMany as k, login as l, setFile as m, getFiles as n, onAuthStateChanged as o, runQueryMany as p, runExpression as q, runQuery as r, set as s, runExpressionMany as t, signMessage as u, signTransaction as v, signAndSubmitTransaction as w, count as x, aggregate as y, subscribe as z };
|
|
21730
|
+
//# sourceMappingURL=index-CsIXFm8d.esm.js.map
|