@bounded-sh/core 0.0.42 → 0.0.44
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/client/config.d.ts +20 -1
- package/dist/client/operations.d.ts +3 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +726 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +720 -41
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +29 -5
- package/dist/utils/auth-api.d.ts +10 -1
- package/dist/utils/evm/evm-transaction-validation.d.ts +46 -0
- package/dist/utils/evm/evm-utils.d.ts +40 -0
- package/dist/utils/server-session-manager.d.ts +7 -0
- package/dist/utils/utils.d.ts +3 -1
- package/package.json +3 -3
package/dist/client/config.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface ClientConfig {
|
|
|
8
8
|
* 'phantom' = connect a Solana wallet (Phantom), for crypto/onchain apps
|
|
9
9
|
* that need a real @user.address. Guests use signInAnonymously(), not
|
|
10
10
|
* authMethod. */
|
|
11
|
-
authMethod: 'none' | 'email' | 'guest' | 'wallet' | 'rainbowkit' | 'coinbase-smart-wallet' | 'onboard' | 'phantom' | 'mobile-wallet-adapter' | 'privy' | 'privy-expo';
|
|
11
|
+
authMethod: 'none' | 'email' | 'guest' | 'wallet' | 'evm-wallet' | 'rainbowkit' | 'coinbase-smart-wallet' | 'onboard' | 'phantom' | 'mobile-wallet-adapter' | 'privy' | 'privy-expo';
|
|
12
12
|
wsApiUrl: string;
|
|
13
13
|
apiUrl: string;
|
|
14
14
|
/**
|
|
@@ -100,6 +100,25 @@ export interface ClientConfig {
|
|
|
100
100
|
network?: string | null;
|
|
101
101
|
rpcUrl?: string | null;
|
|
102
102
|
};
|
|
103
|
+
/** EVM WALLET LOGIN provider configuration (authMethod:'evm-wallet'). The EVM
|
|
104
|
+
* twin of injectedWalletConfig: a slim, dependency-free "connect an Ethereum
|
|
105
|
+
* wallet" path that rides the EIP-1193 injected provider a browser wallet
|
|
106
|
+
* exposes (MetaMask / Rabby / Coinbase Wallet / any window.ethereum), discovered
|
|
107
|
+
* via EIP-6963. The user's REAL EVM wallet becomes @user.evmAddress; login =
|
|
108
|
+
* SIWE (EIP-4361). Selecting authMethod:'evm-wallet' enables it; pass getProvider
|
|
109
|
+
* to point at a specific wallet, chainId for the SIWE prompt + chain-switch
|
|
110
|
+
* guard, or domain/uri as same-origin assertions for the SIWE authority. */
|
|
111
|
+
evmWalletConfig?: {
|
|
112
|
+
getProvider?: () => any;
|
|
113
|
+
chainId?: number;
|
|
114
|
+
rpcUrl?: string | null;
|
|
115
|
+
domain?: string;
|
|
116
|
+
uri?: string;
|
|
117
|
+
/** Trusted BoundedRuntime for `chainId`; required before signing a 202 EVM write. */
|
|
118
|
+
runtimeAddress?: string;
|
|
119
|
+
/** Trusted per-chain BoundedRuntime allowlist for multi-chain clients. */
|
|
120
|
+
runtimeAddresses?: Record<string, string>;
|
|
121
|
+
};
|
|
103
122
|
}
|
|
104
123
|
export declare let clientConfig: ClientConfig;
|
|
105
124
|
type BoundedEndpoints = Pick<ClientConfig, 'wsApiUrl' | 'apiUrl' | 'authApiUrl' | 'humanAuthApiUrl' | 'functionsUrl'>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AuthProvider } from '../types';
|
|
2
2
|
import { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
3
|
+
import { type EvmTransactionPolicy } from '../utils/evm/evm-transaction-validation';
|
|
3
4
|
/** Internal overrides for per-request auth and headers. */
|
|
4
5
|
export type RequestOverrides = {
|
|
5
6
|
headers?: Record<string, string>;
|
|
@@ -8,6 +9,8 @@ export type RequestOverrides = {
|
|
|
8
9
|
_clearAuth?: () => Promise<void>;
|
|
9
10
|
_walletAddress?: string;
|
|
10
11
|
timeout?: number;
|
|
12
|
+
/** @internal trusted runtime/chain binding for an explicit wallet client. */
|
|
13
|
+
_evmTransactionPolicy?: EvmTransactionPolicy;
|
|
11
14
|
};
|
|
12
15
|
export type SetOptions = {
|
|
13
16
|
shouldSubmitTx?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export { createSessionWithSignature, refreshSession, revokeSession, signSessionC
|
|
|
22
22
|
export { Tarobase as Bounded6 } from './utils/sol/taro6CvKqwrYrDc16ufYgzQ2NZcyyVKStffbtudrhRuDevnet-program';
|
|
23
23
|
export { Tarobase as BoundedPoof } from './utils/sol/poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZpMainnet-program';
|
|
24
24
|
export { buildSetDocumentsTransaction, convertRemainingAccounts, RemainingAccount, genSolanaMessage } from './utils/sol/sol-utils';
|
|
25
|
+
export { genSiweMessage, normalizeEvmAddress, toLowerEvmAddress } from './utils/evm/evm-utils';
|
|
26
|
+
export { assertCanonicalBoundedRuntimeWriteCalldata, assertEvmTransactionMatchesWrite, BOUNDED_RUNTIME_SET_DOCUMENTS_SELECTOR, BOUNDED_RUNTIME_SET_DOCUMENTS_ATTESTED_SELECTOR, } from './utils/evm/evm-transaction-validation';
|
|
27
|
+
export type { EvmTransactionPolicy } from './utils/evm/evm-transaction-validation';
|
|
28
|
+
export type { SiweMessageOptions } from './utils/evm/evm-utils';
|
|
25
29
|
export { functions, invoke as invokeFunction, FunctionInvokeError } from './client/functions';
|
|
26
30
|
export type { InvokeOptions } from './client/functions';
|
|
27
31
|
export { live, intent as liveIntent, status as liveStatus, subscribeView as subscribeLiveView, LiveIntentError } from './client/live';
|