@bounded-sh/client 0.0.52 → 0.0.53-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/providers/injected-wallet-types.d.ts +1 -1
- package/dist/auth/providers/phantom-wallet-provider.d.ts +0 -2
- package/dist/auth/providers/privy-wallet-provider.d.ts +3 -5
- package/dist/auth/solana-rpc.d.ts +1 -2
- package/dist/{email-auth-provider-6seVxrWq.js → email-auth-provider-BQ-DTX3z.js} +2 -2
- package/dist/{email-auth-provider-6seVxrWq.js.map → email-auth-provider-BQ-DTX3z.js.map} +1 -1
- package/dist/{email-auth-provider-D22p_2xV.mjs → email-auth-provider-CR7B2pob.mjs} +2 -2
- package/dist/{email-auth-provider-D22p_2xV.mjs.map → email-auth-provider-CR7B2pob.mjs.map} +1 -1
- package/dist/{email-auth-provider-uZbdT_Bx.mjs → email-auth-provider-CRFJd5Rp.mjs} +2 -2
- package/dist/{email-auth-provider-uZbdT_Bx.mjs.map → email-auth-provider-CRFJd5Rp.mjs.map} +1 -1
- package/dist/{email-auth-provider-BCI1_WLA.js → email-auth-provider-CyEhOnGQ.js} +2 -2
- package/dist/{email-auth-provider-BCI1_WLA.js.map → email-auth-provider-CyEhOnGQ.js.map} +1 -1
- package/dist/{guest-auth-provider-B_9cVFL1.mjs → guest-auth-provider-1GGM1eWA.mjs} +2 -2
- package/dist/{guest-auth-provider-B_9cVFL1.mjs.map → guest-auth-provider-1GGM1eWA.mjs.map} +1 -1
- package/dist/{guest-auth-provider-BrSO-CUp.js → guest-auth-provider-3cWfAi5V.js} +2 -2
- package/dist/{guest-auth-provider-BrSO-CUp.js.map → guest-auth-provider-3cWfAi5V.js.map} +1 -1
- package/dist/{guest-auth-provider-ShmskrcH.mjs → guest-auth-provider-BLzLLs7u.mjs} +2 -2
- package/dist/{guest-auth-provider-ShmskrcH.mjs.map → guest-auth-provider-BLzLLs7u.mjs.map} +1 -1
- package/dist/{guest-auth-provider-DY-u2wpK.js → guest-auth-provider-DkUngKob.js} +2 -2
- package/dist/{guest-auth-provider-DY-u2wpK.js.map → guest-auth-provider-DkUngKob.js.map} +1 -1
- package/dist/{index-D4jNluH9.js → index-C6p_-77w.js} +19 -29
- package/dist/index-C6p_-77w.js.map +1 -0
- package/dist/{index-BvUrIsky.mjs → index-Co7IqxVo.mjs} +20 -29
- package/dist/index-Co7IqxVo.mjs.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{index.native-2Mmuh7RB.js → index.native-BTPOnWux.js} +19 -29
- package/dist/index.native-BTPOnWux.js.map +1 -0
- package/dist/{index.native-gU1kSEmQ.mjs → index.native-BoKkzObx.mjs} +20 -29
- package/dist/index.native-BoKkzObx.mjs.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{injected-evm-wallet-provider-COM5BPuY.mjs → injected-evm-wallet-provider-Bsh00akg.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-COM5BPuY.mjs.map → injected-evm-wallet-provider-Bsh00akg.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-CNnMBwAY.mjs → injected-evm-wallet-provider-CA9ENSN4.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-CNnMBwAY.mjs.map → injected-evm-wallet-provider-CA9ENSN4.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-DoB2BLir.js → injected-evm-wallet-provider-Cjs3K7fU.js} +2 -2
- package/dist/{injected-evm-wallet-provider-DoB2BLir.js.map → injected-evm-wallet-provider-Cjs3K7fU.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BEGvuTUU.js → injected-evm-wallet-provider-DCqeV702.js} +2 -2
- package/dist/{injected-evm-wallet-provider-BEGvuTUU.js.map → injected-evm-wallet-provider-DCqeV702.js.map} +1 -1
- package/dist/{injected-wallet-provider-CLeRnTLu.mjs → injected-wallet-provider-BwHOxPAR.mjs} +6 -8
- package/dist/injected-wallet-provider-BwHOxPAR.mjs.map +1 -0
- package/dist/{injected-wallet-provider-CyCGjf2G.js → injected-wallet-provider-CfzCTdM5.js} +6 -8
- package/dist/injected-wallet-provider-CfzCTdM5.js.map +1 -0
- package/dist/{injected-wallet-provider-g0md2vEj.js → injected-wallet-provider-CmhZtf9E.js} +6 -8
- package/dist/injected-wallet-provider-CmhZtf9E.js.map +1 -0
- package/dist/{injected-wallet-provider-CGoMdKhp.mjs → injected-wallet-provider-uF4yZt8l.mjs} +6 -8
- package/dist/injected-wallet-provider-uF4yZt8l.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/index-BvUrIsky.mjs.map +0 -1
- package/dist/index-D4jNluH9.js.map +0 -1
- package/dist/index.native-2Mmuh7RB.js.map +0 -1
- package/dist/index.native-gU1kSEmQ.mjs.map +0 -1
- package/dist/injected-wallet-provider-CGoMdKhp.mjs.map +0 -1
- package/dist/injected-wallet-provider-CLeRnTLu.mjs.map +0 -1
- package/dist/injected-wallet-provider-CyCGjf2G.js.map +0 -1
- package/dist/injected-wallet-provider-g0md2vEj.js.map +0 -1
|
@@ -819,11 +819,9 @@ class OffchainAuthProvider {
|
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
|
|
822
|
-
const SURFNET_RPC_URL = "https://surfpool.fly.dev";
|
|
823
822
|
const SUPPORTED_SOLANA_NETWORKS = new Set([
|
|
824
823
|
"solana_devnet",
|
|
825
824
|
"solana_mainnet",
|
|
826
|
-
"surfnet",
|
|
827
825
|
]);
|
|
828
826
|
function normalizeSolanaRpcUrl(rpcUrl) {
|
|
829
827
|
if (typeof rpcUrl !== "string")
|
|
@@ -837,7 +835,7 @@ function isSupportedSolanaRpcNetwork(network) {
|
|
|
837
835
|
function resolveSolanaRpcUrl(explicitRpcUrl, network, context) {
|
|
838
836
|
if (network != null && network !== "" && !isSupportedSolanaRpcNetwork(network)) {
|
|
839
837
|
throw new Error(`${context} does not support Solana network "${network}". ` +
|
|
840
|
-
`Expected one of: solana_devnet, solana_mainnet
|
|
838
|
+
`Expected one of: solana_devnet, solana_mainnet.`);
|
|
841
839
|
}
|
|
842
840
|
const rpcUrl = normalizeSolanaRpcUrl(explicitRpcUrl);
|
|
843
841
|
if (rpcUrl)
|
|
@@ -4445,7 +4443,7 @@ async function getAuthProvider(config) {
|
|
|
4445
4443
|
// manager as legacy email sessions. Human login should be started
|
|
4446
4444
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
4447
4445
|
// logout surface for those sessions.
|
|
4448
|
-
currentAuthProvider = new (await import('./email-auth-provider-
|
|
4446
|
+
currentAuthProvider = new (await import('./email-auth-provider-CR7B2pob.mjs')).EmailAuthProvider();
|
|
4449
4447
|
break;
|
|
4450
4448
|
case "wallet":
|
|
4451
4449
|
case "phantom": {
|
|
@@ -4464,7 +4462,7 @@ async function getAuthProvider(config) {
|
|
|
4464
4462
|
if (!isWalletLoginEnabled(config)) {
|
|
4465
4463
|
throw walletLoginNotEnabledError(authMethod);
|
|
4466
4464
|
}
|
|
4467
|
-
const { InjectedWalletProvider } = await import('./injected-wallet-provider-
|
|
4465
|
+
const { InjectedWalletProvider } = await import('./injected-wallet-provider-BwHOxPAR.mjs');
|
|
4468
4466
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
4469
4467
|
break;
|
|
4470
4468
|
}
|
|
@@ -4477,7 +4475,7 @@ async function getAuthProvider(config) {
|
|
|
4477
4475
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
4478
4476
|
// to point at a specific wallet or set chainId/domain.
|
|
4479
4477
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
4480
|
-
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-
|
|
4478
|
+
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-CA9ENSN4.mjs');
|
|
4481
4479
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
4482
4480
|
break;
|
|
4483
4481
|
}
|
|
@@ -4505,7 +4503,7 @@ async function getAuthProvider(config) {
|
|
|
4505
4503
|
break;
|
|
4506
4504
|
case "guest":
|
|
4507
4505
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
4508
|
-
currentAuthProvider = new (await import('./guest-auth-provider-
|
|
4506
|
+
currentAuthProvider = new (await import('./guest-auth-provider-1GGM1eWA.mjs')).GuestAuthProvider();
|
|
4509
4507
|
break;
|
|
4510
4508
|
}
|
|
4511
4509
|
if (!currentAuthProvider) {
|
|
@@ -4561,7 +4559,7 @@ async function signInAnonymously() {
|
|
|
4561
4559
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
4562
4560
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
4563
4561
|
// so bundle-splitting can see it.
|
|
4564
|
-
const provider = new (await import('./guest-auth-provider-
|
|
4562
|
+
const provider = new (await import('./guest-auth-provider-1GGM1eWA.mjs')).GuestAuthProvider();
|
|
4565
4563
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
4566
4564
|
const commit = (user) => {
|
|
4567
4565
|
// No await/interleaving inside this block: provider/method/config/marker
|
|
@@ -4804,7 +4802,12 @@ async function logout$1(options) {
|
|
|
4804
4802
|
// Hosted sessions ('email' covers the whole hosted surface: email OTP +
|
|
4805
4803
|
// social + the OIDC redirect/popup flows) are the ones with an issuer
|
|
4806
4804
|
// cookie; wallet and guest sessions have nothing hosted to end.
|
|
4807
|
-
|
|
4805
|
+
// Check the STORED marker as well as the in-memory method: the hosted
|
|
4806
|
+
// OIDC flows (loginWithPopup / completeLoginFromRedirect) write the
|
|
4807
|
+
// 'email' marker via exchangeCode() but never touch currentAuthMethod,
|
|
4808
|
+
// which stays 'guest'/explicit even after a hosted upgrade. Worst case of
|
|
4809
|
+
// a false positive is a harmless idempotent issuer bounce.
|
|
4810
|
+
const wasHosted = currentAuthMethod === 'email' || getStoredAuthMethod() === 'email';
|
|
4808
4811
|
await currentAuthProvider.logout();
|
|
4809
4812
|
setStoredAuthMethod(null);
|
|
4810
4813
|
currentAuthProvider = null;
|
|
@@ -5871,7 +5874,7 @@ class PrivyExpoProvider {
|
|
|
5871
5874
|
};
|
|
5872
5875
|
}
|
|
5873
5876
|
// Sign and submit
|
|
5874
|
-
const { signature, txInfo } = await this.signAndSubmitInternal(tx, wallet,
|
|
5877
|
+
const { signature, txInfo } = await this.signAndSubmitInternal(tx, wallet, connection);
|
|
5875
5878
|
return {
|
|
5876
5879
|
transactionSignature: signature,
|
|
5877
5880
|
blockNumber: (txInfo === null || txInfo === void 0 ? void 0 : txInfo.slot) || 0,
|
|
@@ -5951,7 +5954,7 @@ class PrivyExpoProvider {
|
|
|
5951
5954
|
const { blockhash } = await connection.getLatestBlockhash('confirmed');
|
|
5952
5955
|
versionedTx.message.recentBlockhash = blockhash;
|
|
5953
5956
|
}
|
|
5954
|
-
const { signature } = await this.signAndSubmitInternal(transaction, wallet,
|
|
5957
|
+
const { signature } = await this.signAndSubmitInternal(transaction, wallet, connection);
|
|
5955
5958
|
return signature;
|
|
5956
5959
|
}
|
|
5957
5960
|
async restoreSession() {
|
|
@@ -6003,22 +6006,10 @@ class PrivyExpoProvider {
|
|
|
6003
6006
|
}
|
|
6004
6007
|
return wallet;
|
|
6005
6008
|
}
|
|
6006
|
-
async signAndSubmitInternal(transaction, wallet,
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
const signed = await wallet.signTransaction(transaction);
|
|
6011
|
-
const txSig = await connection.sendRawTransaction(signed.signedTransaction, {
|
|
6012
|
-
skipPreflight: true,
|
|
6013
|
-
maxRetries: 3,
|
|
6014
|
-
});
|
|
6015
|
-
signature = txSig;
|
|
6016
|
-
}
|
|
6017
|
-
else {
|
|
6018
|
-
// Non-Surfnet: use Privy's combined sign+send
|
|
6019
|
-
const result = await wallet.signAndSendTransaction(transaction, connection);
|
|
6020
|
-
signature = result.signature;
|
|
6021
|
-
}
|
|
6009
|
+
async signAndSubmitInternal(transaction, wallet, connection) {
|
|
6010
|
+
// Use Privy's combined sign+send
|
|
6011
|
+
const result = await wallet.signAndSendTransaction(transaction, connection);
|
|
6012
|
+
const signature = result.signature;
|
|
6022
6013
|
const txInfo = await confirmAndCheckTransaction(connection, signature);
|
|
6023
6014
|
return { signature, txInfo };
|
|
6024
6015
|
}
|
|
@@ -6051,5 +6042,5 @@ class PrivyExpoProvider {
|
|
|
6051
6042
|
}
|
|
6052
6043
|
}
|
|
6053
6044
|
|
|
6054
|
-
export { useAuth as A, useBuildRun as B, apps as C, deserializeTransaction as D, EMBEDDED_WALLET_UNSUPPORTED as E, getIdToken as F, setPlatform as G, builds as H, BuildsApiError as I, PARK_REASONS as J, FAILURE_REASONS as K, BUILD_REVIEW_CAPABILITY_SCHEMA as L, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as M, NON_TERMINAL_STATES as N, OffchainAuthProvider as O, PrivyExpoProvider as P, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as Q, RUN_STATES as R,
|
|
6055
|
-
//# sourceMappingURL=index.native-
|
|
6045
|
+
export { useAuth as A, useBuildRun as B, apps as C, deserializeTransaction as D, EMBEDDED_WALLET_UNSUPPORTED as E, getIdToken as F, setPlatform as G, builds as H, BuildsApiError as I, PARK_REASONS as J, FAILURE_REASONS as K, BUILD_REVIEW_CAPABILITY_SCHEMA as L, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as M, NON_TERMINAL_STATES as N, OffchainAuthProvider as O, PrivyExpoProvider as P, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as Q, RUN_STATES as R, TERMINAL_STATES as T, hasEmbeddedEvmWallet as a, embeddedSignAndSubmit as b, setAuthLoading as c, bufferExports as d, embeddedRunEvmTransaction as e, bs58 as f, getPlatform as g, hasEmbeddedWallet as h, confirmAndCheckTransaction as i, init as j, getCurrentUser as k, onAuthLoadingChanged as l, getAuthLoading as m, normalizeSolanaRpcUrl as n, onAuthStateChanged as o, login as p, logout as q, resolveSolanaRpcUrl as r, setCurrentUser as s, getAuthProvider as t, signInAnonymously as u, loginWithPrivy as v, loginWithRedirect as w, completeLoginFromRedirect as x, loginWithPopup as y, completeLoginInPopup as z };
|
|
6046
|
+
//# sourceMappingURL=index.native-BoKkzObx.mjs.map
|