@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
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { W as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, V as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, U as BUILD_REVIEW_CAPABILITY_SCHEMA, M as BuildsApiError, S as FAILURE_REASONS, N as NON_TERMINAL_STATES, O as OffchainAuthProvider, Q as PARK_REASONS, P as PrivyExpoProvider, R as RUN_STATES, T as TERMINAL_STATES, G as apps, L as builds, z as completeLoginFromRedirect, B as completeLoginInPopup, k as defaultInjectedEvmProvider, d as defaultInjectedProvider, H as deserializeTransaction, q as getAuthLoading, v as getAuthProvider, m as getCurrentUser, I as getIdToken, g as getPlatform, l as init, t as login, A as loginWithPopup, x as loginWithPrivy, y as loginWithRedirect, u as logout, p as onAuthLoadingChanged, o as onAuthStateChanged, K as requestEip6963Providers, J as setPlatform, w as signInAnonymously, C as useAuth, F as useBuildRun, D as useQuery } from './index-Co7IqxVo.mjs';
|
|
2
2
|
export * from '@bounded-sh/core';
|
|
3
3
|
export { BoundedDeclineError, DECLINE_EVENT_NAME, RATE_LIMIT_EVENT_NAME, aggregate, count, deriveDecline, dispatchDeclineEvent, dispatchRateLimitEvent, docId, get, getConfig, getFiles, getMany, queryAggregate, runExpression, runExpressionMany, runQuery, runQueryMany, search, set, setFile, setMany, signAndSubmitTransaction, signMessage, signTransaction, subscribe } from '@bounded-sh/core';
|
|
4
4
|
import 'react';
|
|
@@ -840,11 +840,9 @@ class OffchainAuthProvider {
|
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
842
|
|
|
843
|
-
const SURFNET_RPC_URL = "https://surfpool.fly.dev";
|
|
844
843
|
const SUPPORTED_SOLANA_NETWORKS = new Set([
|
|
845
844
|
"solana_devnet",
|
|
846
845
|
"solana_mainnet",
|
|
847
|
-
"surfnet",
|
|
848
846
|
]);
|
|
849
847
|
function normalizeSolanaRpcUrl(rpcUrl) {
|
|
850
848
|
if (typeof rpcUrl !== "string")
|
|
@@ -858,7 +856,7 @@ function isSupportedSolanaRpcNetwork(network) {
|
|
|
858
856
|
function resolveSolanaRpcUrl(explicitRpcUrl, network, context) {
|
|
859
857
|
if (network != null && network !== "" && !isSupportedSolanaRpcNetwork(network)) {
|
|
860
858
|
throw new Error(`${context} does not support Solana network "${network}". ` +
|
|
861
|
-
`Expected one of: solana_devnet, solana_mainnet
|
|
859
|
+
`Expected one of: solana_devnet, solana_mainnet.`);
|
|
862
860
|
}
|
|
863
861
|
const rpcUrl = normalizeSolanaRpcUrl(explicitRpcUrl);
|
|
864
862
|
if (rpcUrl)
|
|
@@ -4466,7 +4464,7 @@ async function getAuthProvider(config) {
|
|
|
4466
4464
|
// manager as legacy email sessions. Human login should be started
|
|
4467
4465
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
4468
4466
|
// logout surface for those sessions.
|
|
4469
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-
|
|
4467
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-CyEhOnGQ.js'); })).EmailAuthProvider();
|
|
4470
4468
|
break;
|
|
4471
4469
|
case "wallet":
|
|
4472
4470
|
case "phantom": {
|
|
@@ -4485,7 +4483,7 @@ async function getAuthProvider(config) {
|
|
|
4485
4483
|
if (!isWalletLoginEnabled(config)) {
|
|
4486
4484
|
throw walletLoginNotEnabledError(authMethod);
|
|
4487
4485
|
}
|
|
4488
|
-
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-
|
|
4486
|
+
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-CmhZtf9E.js'); });
|
|
4489
4487
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
4490
4488
|
break;
|
|
4491
4489
|
}
|
|
@@ -4498,7 +4496,7 @@ async function getAuthProvider(config) {
|
|
|
4498
4496
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
4499
4497
|
// to point at a specific wallet or set chainId/domain.
|
|
4500
4498
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
4501
|
-
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-
|
|
4499
|
+
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-Cjs3K7fU.js'); });
|
|
4502
4500
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
4503
4501
|
break;
|
|
4504
4502
|
}
|
|
@@ -4526,7 +4524,7 @@ async function getAuthProvider(config) {
|
|
|
4526
4524
|
break;
|
|
4527
4525
|
case "guest":
|
|
4528
4526
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
4529
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
4527
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-DkUngKob.js'); })).GuestAuthProvider();
|
|
4530
4528
|
break;
|
|
4531
4529
|
}
|
|
4532
4530
|
if (!currentAuthProvider) {
|
|
@@ -4582,7 +4580,7 @@ async function signInAnonymously() {
|
|
|
4582
4580
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
4583
4581
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
4584
4582
|
// so bundle-splitting can see it.
|
|
4585
|
-
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
4583
|
+
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-DkUngKob.js'); })).GuestAuthProvider();
|
|
4586
4584
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
4587
4585
|
const commit = (user) => {
|
|
4588
4586
|
// No await/interleaving inside this block: provider/method/config/marker
|
|
@@ -4825,7 +4823,12 @@ async function logout$1(options) {
|
|
|
4825
4823
|
// Hosted sessions ('email' covers the whole hosted surface: email OTP +
|
|
4826
4824
|
// social + the OIDC redirect/popup flows) are the ones with an issuer
|
|
4827
4825
|
// cookie; wallet and guest sessions have nothing hosted to end.
|
|
4828
|
-
|
|
4826
|
+
// Check the STORED marker as well as the in-memory method: the hosted
|
|
4827
|
+
// OIDC flows (loginWithPopup / completeLoginFromRedirect) write the
|
|
4828
|
+
// 'email' marker via exchangeCode() but never touch currentAuthMethod,
|
|
4829
|
+
// which stays 'guest'/explicit even after a hosted upgrade. Worst case of
|
|
4830
|
+
// a false positive is a harmless idempotent issuer bounce.
|
|
4831
|
+
const wasHosted = currentAuthMethod === 'email' || getStoredAuthMethod() === 'email';
|
|
4829
4832
|
await currentAuthProvider.logout();
|
|
4830
4833
|
setStoredAuthMethod(null);
|
|
4831
4834
|
currentAuthProvider = null;
|
|
@@ -5892,7 +5895,7 @@ class PrivyExpoProvider {
|
|
|
5892
5895
|
};
|
|
5893
5896
|
}
|
|
5894
5897
|
// Sign and submit
|
|
5895
|
-
const { signature, txInfo } = await this.signAndSubmitInternal(tx, wallet,
|
|
5898
|
+
const { signature, txInfo } = await this.signAndSubmitInternal(tx, wallet, connection);
|
|
5896
5899
|
return {
|
|
5897
5900
|
transactionSignature: signature,
|
|
5898
5901
|
blockNumber: (txInfo === null || txInfo === void 0 ? void 0 : txInfo.slot) || 0,
|
|
@@ -5972,7 +5975,7 @@ class PrivyExpoProvider {
|
|
|
5972
5975
|
const { blockhash } = await connection.getLatestBlockhash('confirmed');
|
|
5973
5976
|
versionedTx.message.recentBlockhash = blockhash;
|
|
5974
5977
|
}
|
|
5975
|
-
const { signature } = await this.signAndSubmitInternal(transaction, wallet,
|
|
5978
|
+
const { signature } = await this.signAndSubmitInternal(transaction, wallet, connection);
|
|
5976
5979
|
return signature;
|
|
5977
5980
|
}
|
|
5978
5981
|
async restoreSession() {
|
|
@@ -6024,22 +6027,10 @@ class PrivyExpoProvider {
|
|
|
6024
6027
|
}
|
|
6025
6028
|
return wallet;
|
|
6026
6029
|
}
|
|
6027
|
-
async signAndSubmitInternal(transaction, wallet,
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
const signed = await wallet.signTransaction(transaction);
|
|
6032
|
-
const txSig = await connection.sendRawTransaction(signed.signedTransaction, {
|
|
6033
|
-
skipPreflight: true,
|
|
6034
|
-
maxRetries: 3,
|
|
6035
|
-
});
|
|
6036
|
-
signature = txSig;
|
|
6037
|
-
}
|
|
6038
|
-
else {
|
|
6039
|
-
// Non-Surfnet: use Privy's combined sign+send
|
|
6040
|
-
const result = await wallet.signAndSendTransaction(transaction, connection);
|
|
6041
|
-
signature = result.signature;
|
|
6042
|
-
}
|
|
6030
|
+
async signAndSubmitInternal(transaction, wallet, connection) {
|
|
6031
|
+
// Use Privy's combined sign+send
|
|
6032
|
+
const result = await wallet.signAndSendTransaction(transaction, connection);
|
|
6033
|
+
const signature = result.signature;
|
|
6043
6034
|
const txInfo = await confirmAndCheckTransaction(connection, signature);
|
|
6044
6035
|
return { signature, txInfo };
|
|
6045
6036
|
}
|
|
@@ -6083,7 +6074,6 @@ exports.OffchainAuthProvider = OffchainAuthProvider;
|
|
|
6083
6074
|
exports.PARK_REASONS = PARK_REASONS;
|
|
6084
6075
|
exports.PrivyExpoProvider = PrivyExpoProvider;
|
|
6085
6076
|
exports.RUN_STATES = RUN_STATES;
|
|
6086
|
-
exports.SURFNET_RPC_URL = SURFNET_RPC_URL;
|
|
6087
6077
|
exports.TERMINAL_STATES = TERMINAL_STATES;
|
|
6088
6078
|
exports.apps = apps;
|
|
6089
6079
|
exports.bs58 = bs58;
|
|
@@ -6118,4 +6108,4 @@ exports.setPlatform = setPlatform;
|
|
|
6118
6108
|
exports.signInAnonymously = signInAnonymously;
|
|
6119
6109
|
exports.useAuth = useAuth;
|
|
6120
6110
|
exports.useBuildRun = useBuildRun;
|
|
6121
|
-
//# sourceMappingURL=index.native-
|
|
6111
|
+
//# sourceMappingURL=index.native-BTPOnWux.js.map
|