@keelcodes/sdk 2.7.0 → 2.7.2
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/wallet/types.d.ts +28 -0
- package/package.json +1 -1
package/dist/wallet/types.d.ts
CHANGED
|
@@ -90,17 +90,32 @@ export interface SessionCreated {
|
|
|
90
90
|
/** token paymaster 发现信息(不暴露私钥)。 */
|
|
91
91
|
export interface PaymasterInfo {
|
|
92
92
|
chainId: number;
|
|
93
|
+
/** 支持的链(多链部署时长度 > 1)。 */
|
|
94
|
+
chainIds?: number[];
|
|
93
95
|
paymaster: string;
|
|
94
96
|
/** voucher 签发地址(仅用于核对)。 */
|
|
95
97
|
signer: string;
|
|
96
98
|
voucher: {
|
|
97
99
|
maxCostWei: string;
|
|
100
|
+
/** 按链生效上限(已按调用方租户策略收敛)。 */
|
|
101
|
+
maxCostWeiByChain?: Record<string, string>;
|
|
98
102
|
ttlSec: number;
|
|
99
103
|
maxTtlSec: number;
|
|
100
104
|
perSenderPerDay: number;
|
|
105
|
+
/** 每链每日签发总额(wei),跨 sender 共享。 */
|
|
106
|
+
dailyBudgetWeiByChain?: Record<string, string>;
|
|
107
|
+
/** voucher 允许的 preVerificationGas + verificationGasLimit 上限。 */
|
|
108
|
+
maxPreVerifyPlusVerifyGas?: string;
|
|
109
|
+
/** maxFeePerGas ≤ 链上 gasPrice × 该倍数。 */
|
|
110
|
+
gasPriceMultiplier?: string;
|
|
101
111
|
/** 固定意图:只赞助 `approve(paymaster, amount)`。 */
|
|
102
112
|
intent: string;
|
|
103
113
|
};
|
|
114
|
+
/** 命中租户限额策略时返回;未命中为 null(走部署级默认)。 */
|
|
115
|
+
policy?: {
|
|
116
|
+
tenant: string;
|
|
117
|
+
label?: string;
|
|
118
|
+
} | null;
|
|
104
119
|
}
|
|
105
120
|
/** 首笔授权 voucher 申请(无需 native、无需已有 allowance)。 */
|
|
106
121
|
export interface PaymasterVoucherParams {
|
|
@@ -112,6 +127,19 @@ export interface PaymasterVoucherParams {
|
|
|
112
127
|
/** Unix 秒;缺省按服务端 TTL。 */
|
|
113
128
|
validUntil?: number;
|
|
114
129
|
chainId?: number;
|
|
130
|
+
/**
|
|
131
|
+
* 待赞助 UserOp 的 gas 字段(必填)。服务端据此校验
|
|
132
|
+
* preVerificationGas + verificationGasLimit 上限与 maxFeePerGas ≤ gasPrice×N。
|
|
133
|
+
*/
|
|
134
|
+
gas: PaymasterVoucherGas;
|
|
135
|
+
}
|
|
136
|
+
export interface PaymasterVoucherGas {
|
|
137
|
+
preVerificationGas: string | bigint;
|
|
138
|
+
verificationGasLimit: string | bigint;
|
|
139
|
+
callGasLimit: string | bigint;
|
|
140
|
+
paymasterVerificationGasLimit: string | bigint;
|
|
141
|
+
paymasterPostOpGasLimit: string | bigint;
|
|
142
|
+
maxFeePerGas: string | bigint;
|
|
115
143
|
}
|
|
116
144
|
export interface PaymasterVoucher {
|
|
117
145
|
chainId: number;
|
package/package.json
CHANGED