@bounded-sh/server 0.0.40 → 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.
@@ -1,10 +1,11 @@
1
1
  import { Transaction, VersionedTransaction, PublicKey } from '@solana/web3.js';
2
2
  import { ServerSessionManager } from '@bounded-sh/core';
3
- import type { AuthProvider, SetOptions, GetOptions, SearchOptions, GetManyResult, RunQueryOptions, RunExpressionOptions, RunExpressionResult, CountOptions, AggregateOptions, AggregateOperation, AggregateResult, AggregateSpec, AggregateRow, QueryAggregateOptions, RequestOverrides, SubscriptionOptions, InvokeOptions, LiveIntentOptions, LiveStatus, LiveStatusOptions } from '@bounded-sh/core';
3
+ import type { AuthProvider, SetOptions, GetOptions, SearchOptions, GetManyResult, RunQueryOptions, RunExpressionOptions, RunExpressionResult, CountOptions, AggregateOptions, AggregateOperation, AggregateResult, AggregateSpec, AggregateRow, QueryAggregateOptions, RequestOverrides, EvmTransactionPolicy, SubscriptionOptions, InvokeOptions, LiveIntentOptions, LiveStatus, LiveStatusOptions } from '@bounded-sh/core';
4
4
  export declare class WalletClient {
5
5
  private readonly provider;
6
6
  private readonly sessionManager;
7
7
  readonly address: string;
8
+ private readonly evmTransactionPolicy?;
8
9
  readonly live: {
9
10
  intent: (roomPath: string, intent: unknown, opts?: LiveIntentOptions) => Promise<{
10
11
  ok: true;
@@ -16,7 +17,7 @@ export declare class WalletClient {
16
17
  onError?: (error: any) => void;
17
18
  }) => Promise<() => Promise<void>>;
18
19
  };
19
- constructor(provider: AuthProvider, sessionManager: ServerSessionManager, address: string);
20
+ constructor(provider: AuthProvider, sessionManager: ServerSessionManager, address: string, evmTransactionPolicy?: EvmTransactionPolicy);
20
21
  private buildOverrides;
21
22
  /** Strip Authorization from caller headers to prevent overriding wallet token */
22
23
  private sanitizeHeaders;
@@ -74,18 +75,41 @@ export declare class WalletClient {
74
75
  signTransaction(transaction: Transaction | VersionedTransaction): Promise<Transaction | VersionedTransaction>;
75
76
  signAndSubmitTransaction(transaction: Transaction | VersionedTransaction, feePayer?: PublicKey): Promise<string>;
76
77
  }
77
- export interface CreateWalletClientOptions {
78
- /** Base58 or JSON array secret key */
78
+ export type CreateWalletClientOptions = {
79
+ /** Base58 or JSON-array Solana secret key. */
79
80
  keypair: string;
80
- }
81
+ evmPrivateKey?: never;
82
+ } | {
83
+ /** 32-byte 0x-prefixed EVM private key. */
84
+ evmPrivateKey: string;
85
+ keypair?: never;
86
+ /** Default SIWE/signing chain; must exist in `chains` or the single-chain fields. */
87
+ chainId: number;
88
+ /** Single-chain shorthand. */
89
+ rpcUrl?: string;
90
+ runtimeAddress?: string;
91
+ /** Explicit chain-switch allowlist. A response can select only these ids. */
92
+ chains?: Record<string, {
93
+ rpcUrl: string;
94
+ runtimeAddress: string;
95
+ name?: string;
96
+ }>;
97
+ };
81
98
  /**
82
- * Create a self-contained wallet client bound to a specific keypair.
99
+ * Create a self-contained wallet client bound to one Solana or EVM keypair.
83
100
  * Each client has its own auth session — no global state is mutated.
84
101
  *
85
102
  * @example
86
103
  * ```ts
87
104
  * const vault = await createWalletClient({ keypair: process.env.VAULT_KEY });
88
105
  * await vault.set('markets/123', data);
106
+ *
107
+ * const evmVault = await createWalletClient({
108
+ * evmPrivateKey: process.env.EVM_PRIVATE_KEY,
109
+ * chainId: 8453,
110
+ * rpcUrl: process.env.BASE_RPC_URL,
111
+ * runtimeAddress: process.env.BOUNDED_RUNTIME,
112
+ * });
89
113
  * ```
90
114
  */
91
115
  export declare function createWalletClient(opts: CreateWalletClientOptions): Promise<WalletClient>;
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@bounded-sh/server",
3
- "version": "0.0.40",
4
- "description": "Server SDK for Poof API - Node.js/Backend implementation",
3
+ "version": "0.0.44",
4
+ "description": "Node and server SDK for Bounded, the full-stack app builder and runtime for AI-built apps: keypair-authenticated data, files and search, functions, realtime, webhook verification, and atomic writes.",
5
+ "homepage": "https://bounded.sh/docs/sdk",
5
6
  "main": "./dist/index.js",
6
7
  "module": "./dist/index.mjs",
7
8
  "types": "./dist/index.d.ts",
@@ -14,7 +15,7 @@
14
15
  },
15
16
  "scripts": {
16
17
  "build": "rm -rf ./dist ./.rollup-tmp && tsc -p tsconfig.build.json --outDir .rollup-tmp --declarationDir .rollup-tmp --emitDeclarationOnly false && rollup -c && tsc -p tsconfig.build.json --emitDeclarationOnly --declarationDir dist && rm -rf ./.rollup-tmp",
17
- "test": "node src/auth/providers/run-solana-keypair-blockhash-test.mjs && node src/run-server-global-provider-test.mjs",
18
+ "test": "node src/auth/providers/run-solana-keypair-blockhash-test.mjs && node src/auth/providers/evm-keypair-provider.source.test.mjs && node src/run-server-global-provider-test.mjs",
18
19
  "watch": "rollup -c -w",
19
20
  "prepare": "npm run build"
20
21
  },
@@ -22,19 +23,22 @@
22
23
  "dist"
23
24
  ],
24
25
  "keywords": [
25
- "sdk",
26
- "api",
27
- "poof",
28
- "web3",
29
- "onchain",
30
- "blockchain",
31
- "solana",
32
- "ai",
26
+ "bounded",
27
+ "full-stack",
28
+ "app-builder",
29
+ "app-runtime",
30
+ "ai-app-builder",
31
+ "realtime-backend",
32
+ "ai-apps",
33
+ "policy",
34
+ "webhooks",
35
+ "atomic-writes",
33
36
  "server",
34
37
  "node",
38
+ "sdk",
35
39
  "typescript"
36
40
  ],
37
- "author": "Poof.new",
41
+ "author": "Bounded",
38
42
  "license": "MIT",
39
43
  "devDependencies": {
40
44
  "@rollup/plugin-commonjs": "28.0.9",
@@ -46,7 +50,7 @@
46
50
  "typescript": "5.9.3"
47
51
  },
48
52
  "dependencies": {
49
- "@bounded-sh/core": "0.0.40",
53
+ "@bounded-sh/core": "0.0.44",
50
54
  "@coral-xyz/anchor": "0.31.1",
51
55
  "@solana/web3.js": "1.98.4",
52
56
  "axios": "1.18.1",
@@ -56,12 +60,13 @@
56
60
  "lodash": "4.18.1",
57
61
  "reconnecting-websocket": "4.4.0",
58
62
  "rpc-websockets": "9.3.9",
59
- "tweetnacl": "1.0.3"
63
+ "tweetnacl": "1.0.3",
64
+ "viem": "2.53.1"
60
65
  },
61
66
  "resolutions": {
62
67
  "picomatch": "4.0.3"
63
68
  },
64
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
69
+ "packageManager": "yarn@4.17.1+sha512.ccbfabf7d7b6b32075088be9386fb9a2e00bb6887ef07fa56effabc890a56d53da1ccc4128d62db245fcbd3961b236d75335bdf7d5320ed6eafb7588b7ad4697",
65
70
  "publishConfig": {
66
71
  "access": "public"
67
72
  }