@keelcodes/sdk 1.0.0 → 2.0.0

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/http.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { KeelConfig } from './types';
2
- /** SDK 版本(契约 §5,基线 1.0.0,随包版本同步)。 */
3
- export declare const SDK_VERSION = "1.0.0";
2
+ /** SDK 版本(契约 §5,基线 2.0.0,随包版本同步)。 */
3
+ export declare const SDK_VERSION = "2.0.0";
4
4
  export declare class HttpClient {
5
5
  private baseUrl;
6
6
  private headers;
package/dist/http.js CHANGED
@@ -5,8 +5,8 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.HttpClient = exports.SDK_VERSION = void 0;
7
7
  const errors_1 = require("./errors");
8
- /** SDK 版本(契约 §5,基线 1.0.0,随包版本同步)。 */
9
- exports.SDK_VERSION = '1.0.0';
8
+ /** SDK 版本(契约 §5,基线 2.0.0,随包版本同步)。 */
9
+ exports.SDK_VERSION = '2.0.0';
10
10
  /**
11
11
  * 钱包签名的复用时长(ms):首次签名后在该窗口内复用,避免每个请求都触发钱包弹窗。
12
12
  * 服务端会话 TTL 为 24h,此处取 1h 留足余量。
package/dist/payment.d.ts CHANGED
@@ -4,19 +4,14 @@ export interface ChargeParams {
4
4
  payer: string;
5
5
  amountWei: string;
6
6
  /** 收费 rail(内部路由,对外仅暴露语义)。 */
7
- method: 'fiat' | 'x402' | 'a2a' | 'batch' | 'invite';
7
+ method: 'x402' | 'a2a' | 'batch' | 'invite';
8
8
  asset?: string;
9
9
  chain?: string;
10
10
  reference: Reference;
11
11
  metadata?: Record<string, unknown>;
12
12
  }
13
- /** fiat 走 sessionUrl;链上走 payTo/priceWei。 */
13
+ /** 链上收费返回收款地址 / 价格 / 网络。 */
14
14
  export type ChargeResult = {
15
- reference: string;
16
- sessionUrl: string;
17
- paymentId: string;
18
- redirect: true;
19
- } | {
20
15
  reference: string;
21
16
  payTo: string;
22
17
  priceWei: string;
@@ -106,7 +101,7 @@ export interface PaymentRequiredBody {
106
101
  export declare class PaymentAPI {
107
102
  private http;
108
103
  constructor(http: HttpClient);
109
- /** 发起收费(内部路由 fiat/x402/a2a/batch/invite)。 */
104
+ /** 发起收费(内部路由 x402/a2a/batch/invite)。 */
110
105
  charge(params: ChargeParams): Promise<ChargeResult>;
111
106
  /** 主动付费。 */
112
107
  pay(params: PayParams): Promise<PayResult>;
@@ -132,29 +127,22 @@ export declare class PaymentAPI {
132
127
  }): Promise<Record<string, unknown>>;
133
128
  /** 支付通道发现:启用的 rail、各链收款钱包 / 价格 / 托管、各链可接受的稳定币。 */
134
129
  info(chain?: string): Promise<Record<string, unknown>>;
135
- /** fiat 结账(Stripe):返回 sessionUrl。mode=payment 为一次性扣款(默认订阅)。 */
136
- checkout(params: {
137
- subscriber: string;
138
- amountCents?: number;
139
- planId?: number;
140
- period?: string;
141
- currency?: string;
142
- chain?: string;
143
- mode?: 'subscription' | 'payment';
144
- metadata?: Record<string, unknown>;
145
- clientReference?: string;
146
- }): Promise<Record<string, unknown>>;
147
130
  /** 读取链上订阅详情(active / payToken / amountPaid / 周期 / 试用)。 */
148
131
  subscriptionDetail(chain: string, subscriber: string, resourceId: number): Promise<Record<string, unknown>>;
149
132
  /** 读取链上套餐定价(price / period / active)。 */
150
133
  price(planId: number, chain?: string): Promise<Record<string, unknown>>;
151
- /** 创建 a2a 链上支付意图(phase 1)。 */
134
+ /**
135
+ * 创建 a2a 支付意图(phase 1)。
136
+ * `settlementMode: 'direct'` 时 `payee` 必填,settle 只核验 payer → payee 的链上转账。
137
+ */
152
138
  a2aCreate(params: {
153
139
  subscriber: string;
154
140
  valueWei: string;
155
141
  asset?: string;
156
142
  chain?: string;
157
143
  payee?: string;
144
+ settlementMode?: 'collector' | 'direct';
145
+ expiresIn?: number;
158
146
  metadata?: Record<string, unknown>;
159
147
  }): Promise<Record<string, unknown>>;
160
148
  /** 确认 a2a 支付意图(phase 2):mode=tx 校验链上交易;mode=balance 走账本扣减。 */
@@ -168,6 +156,10 @@ export declare class PaymentAPI {
168
156
  asset?: string;
169
157
  ref?: string;
170
158
  }): Promise<Record<string, unknown>>;
159
+ /** 结算 direct 意图(phase 2):按 intent 绑定的 payee/asset/精确金额核验,并按链确认数判定终局。 */
160
+ a2aDirectSettle(paymentId: string, txHash: string): Promise<Record<string, unknown>>;
161
+ /** 取消未结算的 direct 意图(幂等)。 */
162
+ a2aCancel(paymentId: string): Promise<Record<string, unknown>>;
171
163
  /** 创建批量收款意图(一付款人对多收款人)。 */
172
164
  batchCreate(params: {
173
165
  subscriber: string;
@@ -235,31 +227,4 @@ export declare class PaymentAPI {
235
227
  transferConfirm(transferId: string): Promise<Record<string, unknown>>;
236
228
  /** 取消未执行的转账。 */
237
229
  transferCancel(transferId: string): Promise<Record<string, unknown>>;
238
- /** 打开 MPP 支付通道(校验充值交易)。 */
239
- mppOpen(params: {
240
- payer: string;
241
- depositWei: string;
242
- salt: string;
243
- txHash: string;
244
- chain?: string;
245
- metadata?: Record<string, unknown>;
246
- }): Promise<Record<string, unknown>>;
247
- /** 提交 MPP 累计凭证(EIP-712 签名)。 */
248
- mppVoucher(params: {
249
- channelId: string;
250
- cumulativeAmount: string;
251
- signature: string;
252
- }): Promise<Record<string, unknown>>;
253
- /** 为 MPP 通道追加充值。 */
254
- mppTopup(params: {
255
- channelId: string;
256
- txHash: string;
257
- additionalWei: string;
258
- }): Promise<Record<string, unknown>>;
259
- /** 批量结算 MPP 通道未结消费。 */
260
- mppSettle(channelId: string): Promise<Record<string, unknown>>;
261
- /** 关闭 MPP 通道(先结算尾部)。 */
262
- mppClose(channelId: string): Promise<Record<string, unknown>>;
263
- /** 读取 MPP 通道当前状态。 */
264
- mppSession(channelId: string): Promise<Record<string, unknown>>;
265
230
  }
package/dist/payment.js CHANGED
@@ -8,7 +8,7 @@ class PaymentAPI {
8
8
  constructor(http) {
9
9
  this.http = http;
10
10
  }
11
- /** 发起收费(内部路由 fiat/x402/a2a/batch/invite)。 */
11
+ /** 发起收费(内部路由 x402/a2a/batch/invite)。 */
12
12
  charge(params) {
13
13
  return this.http.post('/v1/payment/charge', params);
14
14
  }
@@ -61,15 +61,11 @@ class PaymentAPI {
61
61
  ledgerBalance(params) {
62
62
  return this.http.post('/v1/payment/ledger-balance', params);
63
63
  }
64
- // ── 旧 index MCP 能力补齐:通道发现 / 链上意图 / 批量 / 邀请 / 转账 / MPP ──
64
+ // ── 旧 index MCP 能力补齐:通道发现 / 链上意图 / 批量 / 邀请 / 转账 ──
65
65
  /** 支付通道发现:启用的 rail、各链收款钱包 / 价格 / 托管、各链可接受的稳定币。 */
66
66
  info(chain) {
67
67
  return this.http.get('/v1/payment/info' + (chain ? '?chain=' + encodeURIComponent(chain) : ''));
68
68
  }
69
- /** fiat 结账(Stripe):返回 sessionUrl。mode=payment 为一次性扣款(默认订阅)。 */
70
- checkout(params) {
71
- return this.http.post('/v1/payment/checkout', params);
72
- }
73
69
  /** 读取链上订阅详情(active / payToken / amountPaid / 周期 / 试用)。 */
74
70
  subscriptionDetail(chain, subscriber, resourceId) {
75
71
  return this.http.get('/v1/payment/subscription-detail/' + encodeURIComponent(chain) + '/' + encodeURIComponent(subscriber) + '/' + encodeURIComponent(String(resourceId)));
@@ -78,7 +74,10 @@ class PaymentAPI {
78
74
  price(planId, chain) {
79
75
  return this.http.get('/v1/payment/price?chain=' + encodeURIComponent(chain || 'bsc') + '&planId=' + encodeURIComponent(String(planId)));
80
76
  }
81
- /** 创建 a2a 链上支付意图(phase 1)。 */
77
+ /**
78
+ * 创建 a2a 支付意图(phase 1)。
79
+ * `settlementMode: 'direct'` 时 `payee` 必填,settle 只核验 payer → payee 的链上转账。
80
+ */
82
81
  a2aCreate(params) {
83
82
  return this.http.post('/v1/payment/a2a', params);
84
83
  }
@@ -86,6 +85,14 @@ class PaymentAPI {
86
85
  a2aSettle(params) {
87
86
  return this.http.post('/v1/payment/a2a/settle', params);
88
87
  }
88
+ /** 结算 direct 意图(phase 2):按 intent 绑定的 payee/asset/精确金额核验,并按链确认数判定终局。 */
89
+ a2aDirectSettle(paymentId, txHash) {
90
+ return this.http.post('/v1/payment/a2a/' + encodeURIComponent(paymentId) + '/settle', { txHash });
91
+ }
92
+ /** 取消未结算的 direct 意图(幂等)。 */
93
+ a2aCancel(paymentId) {
94
+ return this.http.post('/v1/payment/a2a/' + encodeURIComponent(paymentId) + '/cancel', {});
95
+ }
89
96
  /** 创建批量收款意图(一付款人对多收款人)。 */
90
97
  batchCreate(params) {
91
98
  return this.http.post('/v1/payment/batch', params);
@@ -149,29 +156,5 @@ class PaymentAPI {
149
156
  transferCancel(transferId) {
150
157
  return this.http.post('/v1/payment/transfers/' + encodeURIComponent(transferId) + '/cancel');
151
158
  }
152
- /** 打开 MPP 支付通道(校验充值交易)。 */
153
- mppOpen(params) {
154
- return this.http.post('/v1/payment/mpp/open', params);
155
- }
156
- /** 提交 MPP 累计凭证(EIP-712 签名)。 */
157
- mppVoucher(params) {
158
- return this.http.post('/v1/payment/mpp/voucher', params);
159
- }
160
- /** 为 MPP 通道追加充值。 */
161
- mppTopup(params) {
162
- return this.http.post('/v1/payment/mpp/topup', params);
163
- }
164
- /** 批量结算 MPP 通道未结消费。 */
165
- mppSettle(channelId) {
166
- return this.http.post('/v1/payment/mpp/settle', { channelId });
167
- }
168
- /** 关闭 MPP 通道(先结算尾部)。 */
169
- mppClose(channelId) {
170
- return this.http.post('/v1/payment/mpp/close', { channelId });
171
- }
172
- /** 读取 MPP 通道当前状态。 */
173
- mppSession(channelId) {
174
- return this.http.get('/v1/payment/mpp/session?channelId=' + encodeURIComponent(channelId));
175
- }
176
159
  }
177
160
  exports.PaymentAPI = PaymentAPI;
package/dist/wallet.d.ts CHANGED
@@ -54,8 +54,232 @@ export interface WalletBalanceParams {
54
54
  chain?: string;
55
55
  token?: string;
56
56
  }
57
+ export interface WalletChainBalance {
58
+ chain: string;
59
+ address: string;
60
+ balances: Array<{
61
+ token: string;
62
+ token_address: string;
63
+ /** 人类可读金额:EVM 为原生币小数(18 位),Solana 为 SOL 小数(9 位) */
64
+ balance: string;
65
+ /** 仅 Solana:原始 lamports(十进制字符串) */
66
+ balance_lamports?: string;
67
+ usd_value: string;
68
+ }>;
69
+ usdTotal: string;
70
+ error?: string;
71
+ }
57
72
  export interface WalletBalanceResult {
58
- balance: string;
73
+ chainBalances: WalletChainBalance[];
74
+ totalUsd: string;
75
+ }
76
+ export interface SolanaDeriveAccountParams {
77
+ chain: string;
78
+ accountIndex: string | number;
79
+ smartAccountIndex?: string | number;
80
+ }
81
+ export interface SolanaDerivedAccount {
82
+ chain: string;
83
+ accountIndex: string;
84
+ smartAccountIndex: number;
85
+ settingsPda: string;
86
+ smartAccountPda: string;
87
+ }
88
+ export interface SolanaCreateAccountParams {
89
+ chain: string;
90
+ blockhash: string;
91
+ treasury: string;
92
+ creator: string;
93
+ settingsPda: string;
94
+ signers: Array<Record<string, unknown>>;
95
+ settingsAuthority?: string;
96
+ threshold?: number;
97
+ timeLock?: number;
98
+ rentCollector?: string;
99
+ memo?: string;
100
+ }
101
+ export interface SolanaInstallPolicyParams {
102
+ chain: string;
103
+ blockhash: string;
104
+ feePayer: string;
105
+ creator: string;
106
+ settingsPda: string;
107
+ transactionIndex: string | number;
108
+ signer: Record<string, unknown>;
109
+ /** 旧口径 `SettingsAction::AddSpendingLimit`(已 deprecated) */
110
+ spendingLimit?: Record<string, unknown>;
111
+ /** 新口径 `SettingsAction::PolicyCreate`(spending limit policy) */
112
+ spendingLimitPolicy?: SolanaSpendingLimitPolicy;
113
+ }
114
+ /** 新口径 spending limit policy(`PolicyCreate`;金额/seed 为十进制整数,可用字符串)。 */
115
+ export interface SolanaSpendingLimitPolicy {
116
+ seed: string | number;
117
+ mint: string;
118
+ sourceAccountIndex?: number;
119
+ amount: string | number;
120
+ maxPerUse?: string | number;
121
+ /** 旧 `Period` 枚举值(0=OneTime / 1=Day / 2=Week / 3=Month) */
122
+ period?: number;
123
+ start?: string | number;
124
+ expiration?: string | number;
125
+ accumulateUnused?: boolean;
126
+ enforceExactQuantity?: boolean;
127
+ destinations?: string[];
128
+ signers: Array<Record<string, unknown>>;
129
+ threshold?: number;
130
+ timeLock?: number;
131
+ }
132
+ export interface SolanaCreatePolicyTransactionParams {
133
+ chain: string;
134
+ blockhash: string;
135
+ feePayer: string;
136
+ /** policy PDA */
137
+ policy: string;
138
+ transactionIndex: string | number;
139
+ creator: string;
140
+ rentPayer?: string;
141
+ accountIndex?: number;
142
+ amount: string | number;
143
+ destination: string;
144
+ decimals: number;
145
+ }
146
+ export interface SolanaCreateProposalParams {
147
+ chain: string;
148
+ blockhash: string;
149
+ feePayer: string;
150
+ /** 共识账户:settings PDA(settings 交易)或 policy PDA(policy 交易) */
151
+ settingsPda: string;
152
+ transactionIndex: string | number;
153
+ creator: string;
154
+ rentPayer?: string;
155
+ isDraft?: boolean;
156
+ }
157
+ export interface SolanaApproveProposalParams {
158
+ chain: string;
159
+ blockhash: string;
160
+ feePayer: string;
161
+ /** 共识账户:settings PDA(settings 交易)或 policy PDA(policy 交易) */
162
+ settingsPda: string;
163
+ transactionIndex: string | number;
164
+ signer: string;
165
+ memo?: string;
166
+ }
167
+ export interface SolanaExecutePolicyTransactionParams {
168
+ chain: string;
169
+ blockhash: string;
170
+ feePayer: string;
171
+ /** policy PDA */
172
+ policy: string;
173
+ transactionIndex: string | number;
174
+ signer: string;
175
+ /** 策略执行所需的剩余账户(native SOL: [source, destination, systemProgram]) */
176
+ anchorRemainingAccounts: Array<{
177
+ pubkey: string;
178
+ isWritable?: boolean;
179
+ isSigner?: boolean;
180
+ }>;
181
+ }
182
+ export interface SolanaRemovePolicyParams {
183
+ chain: string;
184
+ blockhash: string;
185
+ feePayer: string;
186
+ creator: string;
187
+ settingsPda: string;
188
+ transactionIndex: string | number;
189
+ /** 待删除的 policy PDA(同时需在 execute 时作为 remaining account 传入) */
190
+ policy: string;
191
+ rentPayer?: string;
192
+ memo?: string;
193
+ }
194
+ export interface SolanaCloseTransactionParams {
195
+ chain: string;
196
+ blockhash: string;
197
+ feePayer: string;
198
+ /** 共识账户:policy PDA(policy 交易)或 settings PDA(settings 交易) */
199
+ settingsPda: string;
200
+ transactionIndex: string | number;
201
+ /** transaction 账户 rent 回收地址;缺省 feePayer */
202
+ transactionRentCollector?: string;
203
+ /** proposal 账户 rent 回收地址;缺省 transactionRentCollector */
204
+ proposalRentCollector?: string;
205
+ }
206
+ export interface SolanaExecutePolicyPayloadParams {
207
+ chain: string;
208
+ blockhash: string;
209
+ feePayer: string;
210
+ /** policy PDA */
211
+ policy: string;
212
+ accountIndex?: number;
213
+ numSigners: number;
214
+ amount: string | number;
215
+ destination: string;
216
+ decimals: number;
217
+ instructionAccounts: Array<{
218
+ pubkey: string;
219
+ isWritable?: boolean;
220
+ isSigner?: boolean;
221
+ }>;
222
+ }
223
+ export interface SolanaCloseSettingsParams {
224
+ chain: string;
225
+ blockhash: string;
226
+ feePayer: string;
227
+ settingsPda: string;
228
+ transactionIndex: string | number;
229
+ transactionRentCollector?: string;
230
+ proposalRentCollector?: string;
231
+ }
232
+ export interface SolanaExecutePolicyParams {
233
+ chain: string;
234
+ blockhash: string;
235
+ feePayer: string;
236
+ settingsPda: string;
237
+ transactionIndex: string | number;
238
+ signer: string;
239
+ rentPayer?: string;
240
+ spendingLimits?: Array<Record<string, unknown>>;
241
+ /** `PolicyCreate` / `PolicyRemove` 的 policy PDA 列表(remaining accounts) */
242
+ policies?: string[];
243
+ }
244
+ export interface SolanaExecuteParams {
245
+ chain: string;
246
+ blockhash: string;
247
+ feePayer: string;
248
+ settingsPda: string;
249
+ signer: string;
250
+ spendingLimit: string;
251
+ mint?: string;
252
+ accountIndex: number;
253
+ amount: string | number;
254
+ decimals: number;
255
+ destination: string;
256
+ tokenProgram?: string;
257
+ memo?: string;
258
+ }
259
+ export interface SolanaRemoveSignerParams {
260
+ chain: string;
261
+ blockhash: string;
262
+ feePayer: string;
263
+ settingsPda: string;
264
+ settingsAuthority: string;
265
+ oldSigner: string;
266
+ memo?: string;
267
+ }
268
+ export interface SolanaSubmitParams {
269
+ chain: string;
270
+ transaction: string;
271
+ }
272
+ /** 构建端点返回的未签名交易(base64)。 */
273
+ export interface SolanaUnsignedTransaction {
274
+ chain: string;
275
+ transaction: string;
276
+ feePayer?: string;
277
+ instructionCount?: number;
278
+ }
279
+ export interface SolanaSubmitResult {
280
+ chain: string;
281
+ signature: string;
282
+ feePayer?: string;
59
283
  }
60
284
  export interface MpcSendCodeParams {
61
285
  email: string;
@@ -216,6 +440,32 @@ export declare class WalletAPI {
216
440
  create: (p: Record<string, unknown>) => Promise<unknown>;
217
441
  revoke: (sessionId: string) => Promise<unknown>;
218
442
  execute: (p: Record<string, unknown>) => Promise<unknown>;
443
+ /** Solana(Squads Smart Account):构建未签名交易 + 广播已签名交易。 */
444
+ solana: {
445
+ deriveAccount: (p: SolanaDeriveAccountParams) => Promise<SolanaDerivedAccount>;
446
+ createAccount: (p: SolanaCreateAccountParams) => Promise<SolanaUnsignedTransaction>;
447
+ installPolicy: (p: SolanaInstallPolicyParams) => Promise<SolanaUnsignedTransaction>;
448
+ executePolicy: (p: SolanaExecutePolicyParams) => Promise<SolanaUnsignedTransaction>;
449
+ /** 新口径:创建 spending limit policy 交易(待多签审批)。 */
450
+ createPolicyTransaction: (p: SolanaCreatePolicyTransactionParams) => Promise<SolanaUnsignedTransaction>;
451
+ /** settings / policy 交易提案:创建。 */
452
+ createProposal: (p: SolanaCreateProposalParams) => Promise<SolanaUnsignedTransaction>;
453
+ /** settings / policy 交易提案:审批(threshold 达成即 Approved)。 */
454
+ approveProposal: (p: SolanaApproveProposalParams) => Promise<SolanaUnsignedTransaction>;
455
+ /** 新口径:异步执行已批准的 policy 交易。 */
456
+ executePolicyTransaction: (p: SolanaExecutePolicyTransactionParams) => Promise<SolanaUnsignedTransaction>;
457
+ /** 新口径:删除 policy(PolicyRemove)并回收其 rent。 */
458
+ removePolicy: (p: SolanaRemovePolicyParams) => Promise<SolanaUnsignedTransaction>;
459
+ /** 新口径:同步执行 spending limit policy。 */
460
+ executePolicyPayload: (p: SolanaExecutePolicyPayloadParams) => Promise<SolanaUnsignedTransaction>;
461
+ /** 关闭废弃 settings 交易并回收 rent。 */
462
+ closeSettings: (p: SolanaCloseSettingsParams) => Promise<SolanaUnsignedTransaction>;
463
+ /** 关闭 policy 交易并回收 transaction/proposal rent。 */
464
+ closeTransaction: (p: SolanaCloseTransactionParams) => Promise<SolanaUnsignedTransaction>;
465
+ execute: (p: SolanaExecuteParams) => Promise<SolanaUnsignedTransaction>;
466
+ removeSigner: (p: SolanaRemoveSignerParams) => Promise<SolanaUnsignedTransaction>;
467
+ submit: (p: SolanaSubmitParams) => Promise<SolanaSubmitResult>;
468
+ };
219
469
  };
220
470
  /** MPC(email 分片钱包)子域:canonical `/v1/wallet/mpc/*`。 */
221
471
  mpc: {
package/dist/wallet.js CHANGED
@@ -56,6 +56,32 @@ class WalletAPI {
56
56
  create: (p) => this.http.post('/v1/wallet/session/create', p),
57
57
  revoke: (sessionId) => this.http.post('/v1/wallet/session/revoke', { sessionId }),
58
58
  execute: (p) => this.http.post('/v1/wallet/session/execute', p),
59
+ /** Solana(Squads Smart Account):构建未签名交易 + 广播已签名交易。 */
60
+ solana: {
61
+ deriveAccount: (p) => this.http.post('/v1/wallet/session/solana/account/derive', p),
62
+ createAccount: (p) => this.http.post('/v1/wallet/session/solana/account/create', p),
63
+ installPolicy: (p) => this.http.post('/v1/wallet/session/solana/session/policy', p),
64
+ executePolicy: (p) => this.http.post('/v1/wallet/session/solana/session/policy/execute', p),
65
+ /** 新口径:创建 spending limit policy 交易(待多签审批)。 */
66
+ createPolicyTransaction: (p) => this.http.post('/v1/wallet/session/solana/session/policy/create-transaction', p),
67
+ /** settings / policy 交易提案:创建。 */
68
+ createProposal: (p) => this.http.post('/v1/wallet/session/solana/session/proposal', p),
69
+ /** settings / policy 交易提案:审批(threshold 达成即 Approved)。 */
70
+ approveProposal: (p) => this.http.post('/v1/wallet/session/solana/session/proposal/approve', p),
71
+ /** 新口径:异步执行已批准的 policy 交易。 */
72
+ executePolicyTransaction: (p) => this.http.post('/v1/wallet/session/solana/session/policy/execute-transaction', p),
73
+ /** 新口径:删除 policy(PolicyRemove)并回收其 rent。 */
74
+ removePolicy: (p) => this.http.post('/v1/wallet/session/solana/session/policy/remove', p),
75
+ /** 新口径:同步执行 spending limit policy。 */
76
+ executePolicyPayload: (p) => this.http.post('/v1/wallet/session/solana/session/policy/execute-payload', p),
77
+ /** 关闭废弃 settings 交易并回收 rent。 */
78
+ closeSettings: (p) => this.http.post('/v1/wallet/session/solana/settings/close', p),
79
+ /** 关闭 policy 交易并回收 transaction/proposal rent。 */
80
+ closeTransaction: (p) => this.http.post('/v1/wallet/session/solana/session/policy/close-transaction', p),
81
+ execute: (p) => this.http.post('/v1/wallet/session/solana/session/execute', p),
82
+ removeSigner: (p) => this.http.post('/v1/wallet/session/solana/session/remove-signer', p),
83
+ submit: (p) => this.http.post('/v1/wallet/session/solana/submit', p),
84
+ },
59
85
  };
60
86
  /** MPC(email 分片钱包)子域:canonical `/v1/wallet/mpc/*`。 */
61
87
  this.mpc = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keelcodes/sdk",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "Keel SDK — unified access to payment / wallet / data / account modules over https://keel.codes",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",