@bounded-sh/core 0.0.67 → 0.0.69

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.
Files changed (31) hide show
  1. package/README.md +0 -1
  2. package/dist/client/config.d.ts +4 -8
  3. package/dist/client/operations.d.ts +0 -3
  4. package/dist/client/reconcile.d.ts +7 -16
  5. package/dist/client/subscribe-query.d.ts +12 -1
  6. package/dist/{index-TyXiW4Uf.mjs → index-B3aNfGi6.mjs} +80 -634
  7. package/dist/index-B3aNfGi6.mjs.map +1 -0
  8. package/dist/{index-DNZifL5j.js → index-DlJKTmRv.js} +81 -637
  9. package/dist/index-DlJKTmRv.js.map +1 -0
  10. package/dist/index.d.ts +2 -4
  11. package/dist/index.js +3 -5
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +1 -1
  14. package/dist/{realtime-store-CINyAkPw.js → realtime-store-CkgpUOrE.js} +2 -2
  15. package/dist/{realtime-store-CINyAkPw.js.map → realtime-store-CkgpUOrE.js.map} +1 -1
  16. package/dist/{realtime-store-CpbnXM7q.mjs → realtime-store-i8pxSuZE.mjs} +2 -2
  17. package/dist/{realtime-store-CpbnXM7q.mjs.map → realtime-store-i8pxSuZE.mjs.map} +1 -1
  18. package/dist/{solana-message-DXXwC95Z.mjs → solana-message-AXfv2U1S.mjs} +2 -2
  19. package/dist/{solana-message-DXXwC95Z.mjs.map → solana-message-AXfv2U1S.mjs.map} +1 -1
  20. package/dist/{solana-message-Bycv-L5n.js → solana-message-DnV4FQ__.js} +2 -2
  21. package/dist/{solana-message-Bycv-L5n.js.map → solana-message-DnV4FQ__.js.map} +1 -1
  22. package/dist/{solana-operations-ChHG25O0.mjs → solana-operations-Bte92rmq.mjs} +2 -2
  23. package/dist/{solana-operations-ChHG25O0.mjs.map → solana-operations-Bte92rmq.mjs.map} +1 -1
  24. package/dist/{solana-operations-Dm_4VnlB.js → solana-operations-DPul1dWo.js} +2 -2
  25. package/dist/{solana-operations-Dm_4VnlB.js.map → solana-operations-DPul1dWo.js.map} +1 -1
  26. package/dist/types.d.ts +21 -186
  27. package/dist/utils/session-events.d.ts +2 -2
  28. package/package.json +2 -2
  29. package/dist/index-DNZifL5j.js.map +0 -1
  30. package/dist/index-TyXiW4Uf.mjs.map +0 -1
  31. package/dist/utils/evm/evm-transaction-validation.d.ts +0 -46
package/README.md CHANGED
@@ -28,7 +28,6 @@ export interface ClientConfig {
28
28
 
29
29
  export interface AuthProvider {
30
30
  login(): Promise<User | null>;
31
- runTransaction(evmTransactionData?: EVMTransaction, solTransactionData?: SolTransaction, options?: SetOptions): Promise<TransactionResult>;
32
31
  signMessage(message: string): Promise<string>;
33
32
  restoreSession(): Promise<User | null>;
34
33
  logout(): Promise<void>;
@@ -130,19 +130,15 @@ export interface ClientConfig {
130
130
  * wallet" path that rides the EIP-1193 injected provider a browser wallet
131
131
  * exposes (MetaMask / Rabby / Coinbase Wallet / any window.ethereum), discovered
132
132
  * via EIP-6963. The user's REAL EVM wallet becomes @user.evmAddress; login =
133
- * SIWE (EIP-4361). Selecting authMethod:'evm-wallet' enables it; pass getProvider
134
- * to point at a specific wallet, chainId for the SIWE prompt + chain-switch
135
- * guard, or domain/uri as same-origin assertions for the SIWE authority. */
133
+ * SIWE (EIP-4361). LOGIN-ONLY: EVM onchain apps were removed, so this
134
+ * configures no write surface. Selecting authMethod:'evm-wallet' enables it;
135
+ * pass getProvider to point at a specific wallet, chainId for the SIWE prompt,
136
+ * or domain/uri as same-origin assertions for the SIWE authority. */
136
137
  evmWalletConfig?: {
137
138
  getProvider?: () => any;
138
139
  chainId?: number;
139
- rpcUrl?: string | null;
140
140
  domain?: string;
141
141
  uri?: string;
142
- /** Trusted BoundedRuntime for `chainId`; required before signing a 202 EVM write. */
143
- runtimeAddress?: string;
144
- /** Trusted per-chain BoundedRuntime allowlist for multi-chain clients. */
145
- runtimeAddresses?: Record<string, string>;
146
142
  };
147
143
  }
148
144
  export declare const DEFAULT_CLIENT_CONFIG: ClientConfig;
@@ -1,7 +1,6 @@
1
1
  import type { AuthProvider, MirrorSync, SetResult, SolanaWriteRpc } from '../types';
2
2
  import { type ClientConfig } from './config';
3
3
  import type { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
4
- import { type EvmTransactionPolicy } from '../utils/evm/evm-transaction-validation';
5
4
  /** Internal overrides for per-request auth and headers. */
6
5
  export type RequestOverrides = {
7
6
  headers?: Record<string, string>;
@@ -12,8 +11,6 @@ export type RequestOverrides = {
12
11
  timeout?: number;
13
12
  /** Cancel the underlying HTTP request when the caller no longer needs it. */
14
13
  signal?: AbortSignal;
15
- /** @internal trusted runtime/chain binding for an explicit wallet client. */
16
- _evmTransactionPolicy?: EvmTransactionPolicy;
17
14
  /**
18
15
  * @internal Fully-resolved config for a scoped `createClient()` instance. When
19
16
  * present, the request targets THIS config's endpoints + appId instead of the
@@ -7,13 +7,6 @@ export type ReconcileSetResultOptions = {
7
7
  * client's app binding and provider rather than the process-global one.
8
8
  */
9
9
  _overrides?: RequestOverrides;
10
- /**
11
- * Whether a server-keypair EVM receipt may rebroadcast its byte-identical
12
- * fenced transaction while the nonce is unused. Defaults to `true`. It is
13
- * always refused for an injected-wallet receipt, whose signed bytes live
14
- * inside the wallet.
15
- */
16
- allowRebroadcast?: boolean;
17
10
  };
18
11
  export type WaitForSetResultOptions = ReconcileSetResultOptions & {
19
12
  /** Total wall-clock bound. Default 60s. */
@@ -22,19 +15,17 @@ export type WaitForSetResultOptions = ReconcileSetResultOptions & {
22
15
  maxAttempts?: number;
23
16
  /** Delay between attempts. Default 3s. */
24
17
  pollIntervalMs?: number;
25
- /** Minimum spacing between permitted rebroadcasts. Default 15s. */
26
- minRebroadcastIntervalMs?: number;
27
18
  /** Cancels the wait. The latest `submitted` receipt is returned, never discarded. */
28
19
  signal?: AbortSignal;
29
20
  };
30
21
  /**
31
- * Poll the SAME signature/hash a `submitted` receipt carries and return the
22
+ * Poll the SAME signature a `submitted` receipt carries and return the
32
23
  * resulting `SetResult`.
33
24
  *
34
25
  * - Terminal receipts (`committed`, `confirmed`, `expired_not_landed`,
35
26
  * `signed`) are returned unchanged; nothing was left open.
36
- * - An irreconcilable injected-wallet receipt (`transactionId: null`) is
37
- * rejected immediately: no identifier exists to poll.
27
+ * - A `submitted` receipt with no transaction identifier (`transactionId:
28
+ * null`) is rejected immediately: no identifier exists to poll.
38
29
  * - A transaction that landed and FAILED throws, exactly as it would have on
39
30
  * the original write.
40
31
  */
@@ -43,9 +34,9 @@ export declare function reconcileSetResult(receipt: SetResult, options?: Reconci
43
34
  * Reconcile repeatedly until the receipt leaves `submitted` or the bound is hit.
44
35
  *
45
36
  * The bound is mandatory, because some states are permanently non-terminal by
46
- * design: an unidentified nonce consumer or a permanently underpriced EVM
47
- * transaction never resolves. On exhaustion (or abort) this returns the LATEST
48
- * `submitted` receipt with its identifier intact rather than hanging or
49
- * throwing the identifier away.
37
+ * design: an RPC that can never observe the signature or the expiry never
38
+ * resolves. On exhaustion (or abort) this returns the LATEST `submitted`
39
+ * receipt with its identifier intact rather than hanging or throwing the
40
+ * identifier away.
50
41
  */
51
42
  export declare function waitForSetResult(receipt: SetResult, options?: WaitForSetResultOptions): Promise<SetResult>;
@@ -45,7 +45,18 @@ type ResolvedIdentity = {
45
45
  bucket: string;
46
46
  token: string | null;
47
47
  };
48
- /** Deterministic key-sorted serialization of query args. */
48
+ /**
49
+ * Deterministic key-sorted serialization of query args, canonicalizing the EXACT
50
+ * JSON wire representation the request serializer sends. Args are first projected
51
+ * through `JSON.parse(JSON.stringify(...))` so `toJSON` runs (a `Date` becomes its
52
+ * ISO string, not `{}`) and functions/`undefined` are dropped exactly as the wire
53
+ * does, then key-sorted with null-prototype objects so an own `__proto__` key
54
+ * round-trips as a property. This makes the dedupe key match what the server
55
+ * actually receives, so two subscriptions can share a poller only when their wire
56
+ * inputs are identical. Cyclic structures and other values the wire cannot
57
+ * serialize (e.g. `BigInt`) are rejected by `JSON.stringify` here, exactly as they
58
+ * would be on the wire.
59
+ */
49
60
  export declare function canonicalizeArgs(args: any): string;
50
61
  /**
51
62
  * Deterministic key-sorted serialization of a query RESULT for change detection.