@invisi-labs/payer 1.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.
@@ -0,0 +1,314 @@
1
+ import { Address, Hex } from 'viem';
2
+ import { IPPRequest } from '@invisi-labs/ipp';
3
+
4
+ interface PayOpenParams {
5
+ chainId: bigint;
6
+ identityCommitment: `0x${string}`;
7
+ tokenAddress: `0x${string}`;
8
+ amount: bigint;
9
+ treeId: bigint;
10
+ refundLink?: bigint | undefined;
11
+ /** 外部提供的 nonce(如 propose 响应)。不传则内部随机生成 */
12
+ nonce?: bigint | undefined;
13
+ }
14
+ interface PayOpenCalldata {
15
+ paymentCommitment: `0x${string}`;
16
+ nonce: `0x${string}`;
17
+ data: `0x${string}`;
18
+ approveAmount: bigint;
19
+ value?: bigint;
20
+ }
21
+ declare function buildPayOpenCalldata(params: PayOpenParams): Promise<PayOpenCalldata>;
22
+ interface PayBlindParams {
23
+ proof: `0x${string}`;
24
+ paymentCommitment: `0x${string}`;
25
+ changeCommitment: `0x${string}`;
26
+ inputAmount: bigint;
27
+ tokenAddress: `0x${string}`;
28
+ treeId: bigint;
29
+ refundLink?: bigint;
30
+ }
31
+ interface PayBlindCalldata {
32
+ data: `0x${string}`;
33
+ approveAmount: bigint;
34
+ }
35
+ declare function buildPayBlindCalldata(params: PayBlindParams): Promise<PayBlindCalldata>;
36
+ /** Payer's local record of change from a shielded payment, for later recovery via withdraw */
37
+ interface ChangeRecord {
38
+ treeId: bigint;
39
+ leafIndex: number;
40
+ nullifierKey: bigint;
41
+ receivingAddress: `0x${string}`;
42
+ tokenAddress: `0x${string}`;
43
+ amount: bigint;
44
+ nonce: bigint;
45
+ }
46
+ interface SettleChangeParams {
47
+ chainId: bigint;
48
+ nullifierKey: bigint;
49
+ receivingAddress: `0x${string}`;
50
+ tokenAddress: `0x${string}`;
51
+ amount: bigint;
52
+ nonce: bigint;
53
+ merkleRoot: `0x${string}`;
54
+ proof: `0x${string}`;
55
+ treeId: bigint;
56
+ }
57
+ interface SettleChangeCalldata {
58
+ nullifier: `0x${string}`;
59
+ data: `0x${string}`;
60
+ }
61
+ declare function buildSettleChangeCalldata(params: SettleChangeParams): Promise<SettleChangeCalldata>;
62
+
63
+ interface CreditAuthorization {
64
+ creditId: bigint;
65
+ identityCommitment: `0x${string}`;
66
+ payerCommitment: `0x${string}`;
67
+ creditNullifierKey: bigint;
68
+ nullifierKeyHash: `0x${string}`;
69
+ tokenAddress: `0x${string}`;
70
+ amount: bigint;
71
+ nonce: bigint;
72
+ expiry: bigint;
73
+ treeId: bigint;
74
+ chainId: bigint;
75
+ }
76
+ interface CreateCreditParams {
77
+ payerMasterKey: bigint;
78
+ creditId: bigint;
79
+ identityCommitment: `0x${string}`;
80
+ payerAddress: bigint;
81
+ tokenAddress: `0x${string}`;
82
+ amount: bigint;
83
+ expiry: bigint;
84
+ treeId: bigint;
85
+ chainId: bigint;
86
+ }
87
+ interface CreateCreditResult {
88
+ authorization: CreditAuthorization;
89
+ data: `0x${string}`;
90
+ approveAmount: bigint;
91
+ }
92
+ declare function createCredit(params: CreateCreditParams): Promise<CreateCreditResult>;
93
+ interface BuildReclaimCalldataParams {
94
+ nullifier: `0x${string}`;
95
+ amount: bigint;
96
+ receivingAddress: `0x${string}`;
97
+ tokenAddress: `0x${string}`;
98
+ merkleRoot: `0x${string}`;
99
+ proof: `0x${string}`;
100
+ treeId: bigint;
101
+ expiry: bigint;
102
+ }
103
+ interface ReclaimCalldata {
104
+ data: `0x${string}`;
105
+ nullifier: `0x${string}`;
106
+ }
107
+ declare function buildReclaimCalldata(params: BuildReclaimCalldataParams): Promise<ReclaimCalldata>;
108
+
109
+ interface EIP712DomainParams {
110
+ chainId: bigint;
111
+ verifyingContract: Address;
112
+ }
113
+ declare function getEIP712Domain(params: EIP712DomainParams): {
114
+ readonly name: "InvisibleProtocol";
115
+ readonly version: "1";
116
+ readonly chainId: bigint;
117
+ readonly verifyingContract: `0x${string}`;
118
+ };
119
+ interface TokenPermit {
120
+ deadline: bigint;
121
+ v: number;
122
+ r: Hex;
123
+ s: Hex;
124
+ }
125
+ declare const EMPTY_PERMIT: TokenPermit;
126
+ declare const payOpenWithSigTypes: {
127
+ readonly Asset: readonly [{
128
+ readonly name: "addr";
129
+ readonly type: "address";
130
+ }, {
131
+ readonly name: "amount";
132
+ readonly type: "uint256";
133
+ }];
134
+ readonly PayOpenWithSig: readonly [{
135
+ readonly name: "identityCommitment";
136
+ readonly type: "bytes32";
137
+ }, {
138
+ readonly name: "asset";
139
+ readonly type: "Asset";
140
+ }, {
141
+ readonly name: "nonce";
142
+ readonly type: "bytes32";
143
+ }, {
144
+ readonly name: "treeId";
145
+ readonly type: "uint256";
146
+ }, {
147
+ readonly name: "refundLink";
148
+ readonly type: "bytes32";
149
+ }, {
150
+ readonly name: "sigNonce";
151
+ readonly type: "uint256";
152
+ }, {
153
+ readonly name: "deadline";
154
+ readonly type: "uint256";
155
+ }];
156
+ };
157
+ declare const payBlindWithSigTypes: {
158
+ readonly PayBlindWithSig: readonly [{
159
+ readonly name: "proof";
160
+ readonly type: "bytes";
161
+ }, {
162
+ readonly name: "paymentCommitment";
163
+ readonly type: "bytes32";
164
+ }, {
165
+ readonly name: "changeCommitment";
166
+ readonly type: "bytes32";
167
+ }, {
168
+ readonly name: "inputAmount";
169
+ readonly type: "uint256";
170
+ }, {
171
+ readonly name: "tokenAddress";
172
+ readonly type: "address";
173
+ }, {
174
+ readonly name: "treeId";
175
+ readonly type: "uint256";
176
+ }, {
177
+ readonly name: "refundLink";
178
+ readonly type: "bytes32";
179
+ }, {
180
+ readonly name: "sigNonce";
181
+ readonly type: "uint256";
182
+ }, {
183
+ readonly name: "deadline";
184
+ readonly type: "uint256";
185
+ }];
186
+ };
187
+ declare const depositCreditWithSigTypes: {
188
+ readonly Asset: readonly [{
189
+ readonly name: "addr";
190
+ readonly type: "address";
191
+ }, {
192
+ readonly name: "amount";
193
+ readonly type: "uint256";
194
+ }];
195
+ readonly DepositCreditWithSig: readonly [{
196
+ readonly name: "identityCommitment";
197
+ readonly type: "bytes32";
198
+ }, {
199
+ readonly name: "payerCommitment";
200
+ readonly type: "bytes32";
201
+ }, {
202
+ readonly name: "asset";
203
+ readonly type: "Asset";
204
+ }, {
205
+ readonly name: "nonce";
206
+ readonly type: "bytes32";
207
+ }, {
208
+ readonly name: "expiry";
209
+ readonly type: "uint256";
210
+ }, {
211
+ readonly name: "nullifierKeyHash";
212
+ readonly type: "bytes32";
213
+ }, {
214
+ readonly name: "treeId";
215
+ readonly type: "uint256";
216
+ }, {
217
+ readonly name: "sigNonce";
218
+ readonly type: "uint256";
219
+ }, {
220
+ readonly name: "deadline";
221
+ readonly type: "uint256";
222
+ }];
223
+ };
224
+ interface SignPayOpenResult {
225
+ paymentCommitment: Hex;
226
+ nonce: Hex;
227
+ typedData: {
228
+ domain: ReturnType<typeof getEIP712Domain>;
229
+ types: typeof payOpenWithSigTypes;
230
+ primaryType: "PayOpenWithSig";
231
+ message: Record<string, unknown>;
232
+ };
233
+ }
234
+ interface SignPayBlindResult {
235
+ typedData: {
236
+ domain: ReturnType<typeof getEIP712Domain>;
237
+ types: typeof payBlindWithSigTypes;
238
+ primaryType: "PayBlindWithSig";
239
+ message: Record<string, unknown>;
240
+ };
241
+ }
242
+ interface SignDepositCreditResult {
243
+ typedData: {
244
+ domain: ReturnType<typeof getEIP712Domain>;
245
+ types: typeof depositCreditWithSigTypes;
246
+ primaryType: "DepositCreditWithSig";
247
+ message: Record<string, unknown>;
248
+ };
249
+ }
250
+ interface SignPayOpenParams {
251
+ chainId: bigint;
252
+ verifyingContract: Address;
253
+ identityCommitment: Hex;
254
+ tokenAddress: Address;
255
+ amount: bigint;
256
+ treeId: bigint;
257
+ refundLink?: Hex;
258
+ sigNonce: bigint;
259
+ deadline: bigint;
260
+ }
261
+ declare function buildSignPayOpenTypedData(params: SignPayOpenParams): Promise<SignPayOpenResult>;
262
+ interface SignPayBlindParams {
263
+ chainId: bigint;
264
+ verifyingContract: Address;
265
+ proof: Hex;
266
+ paymentCommitment: Hex;
267
+ changeCommitment: Hex;
268
+ inputAmount: bigint;
269
+ tokenAddress: Address;
270
+ treeId: bigint;
271
+ refundLink?: Hex;
272
+ sigNonce: bigint;
273
+ deadline: bigint;
274
+ }
275
+ declare function buildSignPayBlindTypedData(params: SignPayBlindParams): SignPayBlindResult;
276
+ interface SignDepositCreditParams {
277
+ chainId: bigint;
278
+ verifyingContract: Address;
279
+ identityCommitment: Hex;
280
+ payerCommitment: Hex;
281
+ tokenAddress: Address;
282
+ amount: bigint;
283
+ nonce: Hex;
284
+ expiry: bigint;
285
+ nullifierKeyHash: Hex;
286
+ treeId: bigint;
287
+ sigNonce: bigint;
288
+ deadline: bigint;
289
+ }
290
+ declare function buildSignDepositCreditTypedData(params: SignDepositCreditParams): SignDepositCreditResult;
291
+
292
+ interface VerifyPaymentCommitmentParams {
293
+ identityCommitment: `0x${string}`;
294
+ tokenAddress: `0x${string}`;
295
+ amount: bigint;
296
+ nonce: `0x${string}`;
297
+ paymentCommitment: `0x${string}`;
298
+ chainId: bigint;
299
+ }
300
+ declare function verifyPaymentCommitment(params: VerifyPaymentCommitmentParams): Promise<boolean>;
301
+
302
+ interface BuildPaymentFromRequestParams {
303
+ request: IPPRequest;
304
+ nonce: `0x${string}`;
305
+ paymentCommitment: `0x${string}`;
306
+ amount: bigint;
307
+ }
308
+ interface BuildPaymentFromRequestResult {
309
+ calldata: `0x${string}`;
310
+ approveAmount: bigint;
311
+ }
312
+ declare function buildPaymentFromRequest(params: BuildPaymentFromRequestParams): Promise<BuildPaymentFromRequestResult>;
313
+
314
+ export { type BuildPaymentFromRequestParams, type BuildPaymentFromRequestResult, type BuildReclaimCalldataParams, type ChangeRecord, type CreateCreditParams, type CreateCreditResult, type CreditAuthorization, type EIP712DomainParams, EMPTY_PERMIT, type PayBlindCalldata, type PayBlindParams, type PayOpenCalldata, type PayOpenParams, type ReclaimCalldata, type SettleChangeCalldata, type SettleChangeParams, type SignDepositCreditParams, type SignDepositCreditResult, type SignPayBlindParams, type SignPayBlindResult, type SignPayOpenParams, type SignPayOpenResult, type TokenPermit, type VerifyPaymentCommitmentParams, buildPayBlindCalldata, buildPayOpenCalldata, buildPaymentFromRequest, buildReclaimCalldata, buildSettleChangeCalldata, buildSignDepositCreditTypedData, buildSignPayBlindTypedData, buildSignPayOpenTypedData, createCredit, getEIP712Domain, verifyPaymentCommitment };
@@ -0,0 +1,314 @@
1
+ import { Address, Hex } from 'viem';
2
+ import { IPPRequest } from '@invisi-labs/ipp';
3
+
4
+ interface PayOpenParams {
5
+ chainId: bigint;
6
+ identityCommitment: `0x${string}`;
7
+ tokenAddress: `0x${string}`;
8
+ amount: bigint;
9
+ treeId: bigint;
10
+ refundLink?: bigint | undefined;
11
+ /** 外部提供的 nonce(如 propose 响应)。不传则内部随机生成 */
12
+ nonce?: bigint | undefined;
13
+ }
14
+ interface PayOpenCalldata {
15
+ paymentCommitment: `0x${string}`;
16
+ nonce: `0x${string}`;
17
+ data: `0x${string}`;
18
+ approveAmount: bigint;
19
+ value?: bigint;
20
+ }
21
+ declare function buildPayOpenCalldata(params: PayOpenParams): Promise<PayOpenCalldata>;
22
+ interface PayBlindParams {
23
+ proof: `0x${string}`;
24
+ paymentCommitment: `0x${string}`;
25
+ changeCommitment: `0x${string}`;
26
+ inputAmount: bigint;
27
+ tokenAddress: `0x${string}`;
28
+ treeId: bigint;
29
+ refundLink?: bigint;
30
+ }
31
+ interface PayBlindCalldata {
32
+ data: `0x${string}`;
33
+ approveAmount: bigint;
34
+ }
35
+ declare function buildPayBlindCalldata(params: PayBlindParams): Promise<PayBlindCalldata>;
36
+ /** Payer's local record of change from a shielded payment, for later recovery via withdraw */
37
+ interface ChangeRecord {
38
+ treeId: bigint;
39
+ leafIndex: number;
40
+ nullifierKey: bigint;
41
+ receivingAddress: `0x${string}`;
42
+ tokenAddress: `0x${string}`;
43
+ amount: bigint;
44
+ nonce: bigint;
45
+ }
46
+ interface SettleChangeParams {
47
+ chainId: bigint;
48
+ nullifierKey: bigint;
49
+ receivingAddress: `0x${string}`;
50
+ tokenAddress: `0x${string}`;
51
+ amount: bigint;
52
+ nonce: bigint;
53
+ merkleRoot: `0x${string}`;
54
+ proof: `0x${string}`;
55
+ treeId: bigint;
56
+ }
57
+ interface SettleChangeCalldata {
58
+ nullifier: `0x${string}`;
59
+ data: `0x${string}`;
60
+ }
61
+ declare function buildSettleChangeCalldata(params: SettleChangeParams): Promise<SettleChangeCalldata>;
62
+
63
+ interface CreditAuthorization {
64
+ creditId: bigint;
65
+ identityCommitment: `0x${string}`;
66
+ payerCommitment: `0x${string}`;
67
+ creditNullifierKey: bigint;
68
+ nullifierKeyHash: `0x${string}`;
69
+ tokenAddress: `0x${string}`;
70
+ amount: bigint;
71
+ nonce: bigint;
72
+ expiry: bigint;
73
+ treeId: bigint;
74
+ chainId: bigint;
75
+ }
76
+ interface CreateCreditParams {
77
+ payerMasterKey: bigint;
78
+ creditId: bigint;
79
+ identityCommitment: `0x${string}`;
80
+ payerAddress: bigint;
81
+ tokenAddress: `0x${string}`;
82
+ amount: bigint;
83
+ expiry: bigint;
84
+ treeId: bigint;
85
+ chainId: bigint;
86
+ }
87
+ interface CreateCreditResult {
88
+ authorization: CreditAuthorization;
89
+ data: `0x${string}`;
90
+ approveAmount: bigint;
91
+ }
92
+ declare function createCredit(params: CreateCreditParams): Promise<CreateCreditResult>;
93
+ interface BuildReclaimCalldataParams {
94
+ nullifier: `0x${string}`;
95
+ amount: bigint;
96
+ receivingAddress: `0x${string}`;
97
+ tokenAddress: `0x${string}`;
98
+ merkleRoot: `0x${string}`;
99
+ proof: `0x${string}`;
100
+ treeId: bigint;
101
+ expiry: bigint;
102
+ }
103
+ interface ReclaimCalldata {
104
+ data: `0x${string}`;
105
+ nullifier: `0x${string}`;
106
+ }
107
+ declare function buildReclaimCalldata(params: BuildReclaimCalldataParams): Promise<ReclaimCalldata>;
108
+
109
+ interface EIP712DomainParams {
110
+ chainId: bigint;
111
+ verifyingContract: Address;
112
+ }
113
+ declare function getEIP712Domain(params: EIP712DomainParams): {
114
+ readonly name: "InvisibleProtocol";
115
+ readonly version: "1";
116
+ readonly chainId: bigint;
117
+ readonly verifyingContract: `0x${string}`;
118
+ };
119
+ interface TokenPermit {
120
+ deadline: bigint;
121
+ v: number;
122
+ r: Hex;
123
+ s: Hex;
124
+ }
125
+ declare const EMPTY_PERMIT: TokenPermit;
126
+ declare const payOpenWithSigTypes: {
127
+ readonly Asset: readonly [{
128
+ readonly name: "addr";
129
+ readonly type: "address";
130
+ }, {
131
+ readonly name: "amount";
132
+ readonly type: "uint256";
133
+ }];
134
+ readonly PayOpenWithSig: readonly [{
135
+ readonly name: "identityCommitment";
136
+ readonly type: "bytes32";
137
+ }, {
138
+ readonly name: "asset";
139
+ readonly type: "Asset";
140
+ }, {
141
+ readonly name: "nonce";
142
+ readonly type: "bytes32";
143
+ }, {
144
+ readonly name: "treeId";
145
+ readonly type: "uint256";
146
+ }, {
147
+ readonly name: "refundLink";
148
+ readonly type: "bytes32";
149
+ }, {
150
+ readonly name: "sigNonce";
151
+ readonly type: "uint256";
152
+ }, {
153
+ readonly name: "deadline";
154
+ readonly type: "uint256";
155
+ }];
156
+ };
157
+ declare const payBlindWithSigTypes: {
158
+ readonly PayBlindWithSig: readonly [{
159
+ readonly name: "proof";
160
+ readonly type: "bytes";
161
+ }, {
162
+ readonly name: "paymentCommitment";
163
+ readonly type: "bytes32";
164
+ }, {
165
+ readonly name: "changeCommitment";
166
+ readonly type: "bytes32";
167
+ }, {
168
+ readonly name: "inputAmount";
169
+ readonly type: "uint256";
170
+ }, {
171
+ readonly name: "tokenAddress";
172
+ readonly type: "address";
173
+ }, {
174
+ readonly name: "treeId";
175
+ readonly type: "uint256";
176
+ }, {
177
+ readonly name: "refundLink";
178
+ readonly type: "bytes32";
179
+ }, {
180
+ readonly name: "sigNonce";
181
+ readonly type: "uint256";
182
+ }, {
183
+ readonly name: "deadline";
184
+ readonly type: "uint256";
185
+ }];
186
+ };
187
+ declare const depositCreditWithSigTypes: {
188
+ readonly Asset: readonly [{
189
+ readonly name: "addr";
190
+ readonly type: "address";
191
+ }, {
192
+ readonly name: "amount";
193
+ readonly type: "uint256";
194
+ }];
195
+ readonly DepositCreditWithSig: readonly [{
196
+ readonly name: "identityCommitment";
197
+ readonly type: "bytes32";
198
+ }, {
199
+ readonly name: "payerCommitment";
200
+ readonly type: "bytes32";
201
+ }, {
202
+ readonly name: "asset";
203
+ readonly type: "Asset";
204
+ }, {
205
+ readonly name: "nonce";
206
+ readonly type: "bytes32";
207
+ }, {
208
+ readonly name: "expiry";
209
+ readonly type: "uint256";
210
+ }, {
211
+ readonly name: "nullifierKeyHash";
212
+ readonly type: "bytes32";
213
+ }, {
214
+ readonly name: "treeId";
215
+ readonly type: "uint256";
216
+ }, {
217
+ readonly name: "sigNonce";
218
+ readonly type: "uint256";
219
+ }, {
220
+ readonly name: "deadline";
221
+ readonly type: "uint256";
222
+ }];
223
+ };
224
+ interface SignPayOpenResult {
225
+ paymentCommitment: Hex;
226
+ nonce: Hex;
227
+ typedData: {
228
+ domain: ReturnType<typeof getEIP712Domain>;
229
+ types: typeof payOpenWithSigTypes;
230
+ primaryType: "PayOpenWithSig";
231
+ message: Record<string, unknown>;
232
+ };
233
+ }
234
+ interface SignPayBlindResult {
235
+ typedData: {
236
+ domain: ReturnType<typeof getEIP712Domain>;
237
+ types: typeof payBlindWithSigTypes;
238
+ primaryType: "PayBlindWithSig";
239
+ message: Record<string, unknown>;
240
+ };
241
+ }
242
+ interface SignDepositCreditResult {
243
+ typedData: {
244
+ domain: ReturnType<typeof getEIP712Domain>;
245
+ types: typeof depositCreditWithSigTypes;
246
+ primaryType: "DepositCreditWithSig";
247
+ message: Record<string, unknown>;
248
+ };
249
+ }
250
+ interface SignPayOpenParams {
251
+ chainId: bigint;
252
+ verifyingContract: Address;
253
+ identityCommitment: Hex;
254
+ tokenAddress: Address;
255
+ amount: bigint;
256
+ treeId: bigint;
257
+ refundLink?: Hex;
258
+ sigNonce: bigint;
259
+ deadline: bigint;
260
+ }
261
+ declare function buildSignPayOpenTypedData(params: SignPayOpenParams): Promise<SignPayOpenResult>;
262
+ interface SignPayBlindParams {
263
+ chainId: bigint;
264
+ verifyingContract: Address;
265
+ proof: Hex;
266
+ paymentCommitment: Hex;
267
+ changeCommitment: Hex;
268
+ inputAmount: bigint;
269
+ tokenAddress: Address;
270
+ treeId: bigint;
271
+ refundLink?: Hex;
272
+ sigNonce: bigint;
273
+ deadline: bigint;
274
+ }
275
+ declare function buildSignPayBlindTypedData(params: SignPayBlindParams): SignPayBlindResult;
276
+ interface SignDepositCreditParams {
277
+ chainId: bigint;
278
+ verifyingContract: Address;
279
+ identityCommitment: Hex;
280
+ payerCommitment: Hex;
281
+ tokenAddress: Address;
282
+ amount: bigint;
283
+ nonce: Hex;
284
+ expiry: bigint;
285
+ nullifierKeyHash: Hex;
286
+ treeId: bigint;
287
+ sigNonce: bigint;
288
+ deadline: bigint;
289
+ }
290
+ declare function buildSignDepositCreditTypedData(params: SignDepositCreditParams): SignDepositCreditResult;
291
+
292
+ interface VerifyPaymentCommitmentParams {
293
+ identityCommitment: `0x${string}`;
294
+ tokenAddress: `0x${string}`;
295
+ amount: bigint;
296
+ nonce: `0x${string}`;
297
+ paymentCommitment: `0x${string}`;
298
+ chainId: bigint;
299
+ }
300
+ declare function verifyPaymentCommitment(params: VerifyPaymentCommitmentParams): Promise<boolean>;
301
+
302
+ interface BuildPaymentFromRequestParams {
303
+ request: IPPRequest;
304
+ nonce: `0x${string}`;
305
+ paymentCommitment: `0x${string}`;
306
+ amount: bigint;
307
+ }
308
+ interface BuildPaymentFromRequestResult {
309
+ calldata: `0x${string}`;
310
+ approveAmount: bigint;
311
+ }
312
+ declare function buildPaymentFromRequest(params: BuildPaymentFromRequestParams): Promise<BuildPaymentFromRequestResult>;
313
+
314
+ export { type BuildPaymentFromRequestParams, type BuildPaymentFromRequestResult, type BuildReclaimCalldataParams, type ChangeRecord, type CreateCreditParams, type CreateCreditResult, type CreditAuthorization, type EIP712DomainParams, EMPTY_PERMIT, type PayBlindCalldata, type PayBlindParams, type PayOpenCalldata, type PayOpenParams, type ReclaimCalldata, type SettleChangeCalldata, type SettleChangeParams, type SignDepositCreditParams, type SignDepositCreditResult, type SignPayBlindParams, type SignPayBlindResult, type SignPayOpenParams, type SignPayOpenResult, type TokenPermit, type VerifyPaymentCommitmentParams, buildPayBlindCalldata, buildPayOpenCalldata, buildPaymentFromRequest, buildReclaimCalldata, buildSettleChangeCalldata, buildSignDepositCreditTypedData, buildSignPayBlindTypedData, buildSignPayOpenTypedData, createCredit, getEIP712Domain, verifyPaymentCommitment };