@nexus-cross/pop 1.3.10-beta.2 → 1.4.0-beta.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/AGENTS.md +35 -44
- package/README.md +54 -49
- package/dist/adapters/index.d.ts +375 -588
- package/dist/adapters/index.js +1 -1
- package/dist/chunk-SE2HF5WH.js +1 -0
- package/dist/{createSafeDrop-qoNG59jB.d.ts → createSafeDrop-CayUX4w_.d.ts} +266 -118
- package/dist/index.d.ts +10 -44
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/infrastructure/openapi.json +836 -116
- package/dist/chunk-KEW4FB4S.js +0 -1
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CryptoPort, g as Secret,
|
|
2
|
-
import { PublicClient, WalletClient, Chain, Transport } from 'viem';
|
|
1
|
+
import { C as CryptoPort, g as Secret, z as SecretHash, H as Hex, A as Address, d as ClaimSignerPort, S as SafeDropChainPort, r as OnePopDrop, I as Id, k as DropState, a as SafeDropApiPort, F as SocialIdentifier, O as OAuthProof, i as DropInbox, E as Envelope, p as LeaderboardPage, q as MyLeaderboardEntry, o as HistoryType, m as HistoryPage, X as XConnection, s as RecipientChangeSignature, t as RecipientSignature, h as BatchClaimSignature, u as SafeDrop } from '../createSafeDrop-CayUX4w_.js';
|
|
2
|
+
import { PublicClient, WalletClient, Chain, Transport, Abi } from 'viem';
|
|
3
3
|
import { X as XAuthPort, a as XTokenResult } from '../XAuthPort-BNJePosj.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -34,26 +34,30 @@ declare class ViemClaimSignerAdapter implements ClaimSignerPort {
|
|
|
34
34
|
}): Promise<Hex>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
interface SafeDropTransactionFees {
|
|
38
|
+
/** 단건 write gas limit. */
|
|
39
|
+
gas?: bigint;
|
|
40
|
+
/** batch 고정 비용. */
|
|
41
|
+
batchBaseGas?: bigint;
|
|
42
|
+
/** batch 항목 1개당 추가 gas. */
|
|
43
|
+
batchGasPerDrop?: bigint;
|
|
44
|
+
/** batch gas limit 안전 상한. 초과하면 전송 전에 INVALID_PARAM. */
|
|
45
|
+
maxBatchGas?: bigint;
|
|
46
|
+
maxFeePerGas?: bigint;
|
|
47
|
+
maxPriorityFeePerGas?: bigint;
|
|
48
|
+
}
|
|
37
49
|
interface ViemSafeDropChainAdapterOptions {
|
|
38
50
|
address: Address;
|
|
39
51
|
publicClient: PublicClient;
|
|
40
|
-
/**
|
|
52
|
+
/** deposit/refund 서명용 지갑(연결된 MetaMask 등). */
|
|
41
53
|
walletClient: WalletClient;
|
|
42
54
|
chain: Chain;
|
|
43
55
|
/** withdraw용 임시 지갑 client의 RPC transport. 기본 http()(chain.rpcUrls). */
|
|
44
56
|
transport?: Transport;
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
maxPriorityFeePerGas?: bigint;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* true면 EIP-2612 permit 예치를 쓴다(approve tx 없음, 서명 1회 + tx 1회).
|
|
53
|
-
* 배포본마다 deposit 시그니처가 다르므로 opt-in이다 — permit deposit이 없는
|
|
54
|
-
* 컨트랙트에 켜면 셀렉터가 없어 revert한다. 토큰도 permit을 지원해야 한다.
|
|
55
|
-
*/
|
|
56
|
-
permit?: boolean;
|
|
57
|
+
/** 모든 write의 EIP-1559/gas override. batch gas = base + perDrop × count. */
|
|
58
|
+
transactionFees?: SafeDropTransactionFees;
|
|
59
|
+
/** @deprecated Use transactionFees. */
|
|
60
|
+
withdrawFees?: SafeDropTransactionFees;
|
|
57
61
|
}
|
|
58
62
|
/**
|
|
59
63
|
* SafeDrop 컨트랙트 어댑터 (viem). ABI: src/infrastructure/safedrop_abi.json.
|
|
@@ -65,58 +69,75 @@ declare class ViemSafeDropChainAdapter implements SafeDropChainPort {
|
|
|
65
69
|
private readonly walletClient;
|
|
66
70
|
private readonly chain;
|
|
67
71
|
private readonly transport;
|
|
68
|
-
private readonly
|
|
69
|
-
|
|
70
|
-
* permit 옵션을 켠 경우에만 채워진다. DepositUseCase는 이 프로퍼티의 존재
|
|
71
|
-
* 여부로 approve tx를 건너뛸지 판단하므로, 미지원 배포본에서는 undefined여야 한다.
|
|
72
|
-
*/
|
|
73
|
-
readonly depositWithPermit?: SafeDropChainPort['depositWithPermit'];
|
|
72
|
+
private readonly transactionFees;
|
|
73
|
+
readonly depositWithPermit: SafeDropChainPort['depositWithPermit'];
|
|
74
74
|
constructor(options: ViemSafeDropChainAdapterOptions);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
getDropByKey(dropKey: Hex): Promise<OnePopDrop | null>;
|
|
76
|
+
getDropKeyByClaimAddress(claimAddress: Address, sponsor: Address): Promise<Hex | null>;
|
|
77
|
+
getPendingDropsById(params: {
|
|
78
|
+
id: Id;
|
|
79
|
+
}): Promise<readonly OnePopDrop[]>;
|
|
80
|
+
getPendingDropsByRecipient(params: {
|
|
81
|
+
recipient: Address;
|
|
82
|
+
}): Promise<readonly OnePopDrop[]>;
|
|
83
|
+
getPendingDropsBySponsor(params: {
|
|
84
|
+
sponsor: Address;
|
|
85
|
+
}): Promise<readonly OnePopDrop[]>;
|
|
86
|
+
getDrop(claimAddress: Address, sponsor: Address): Promise<DropState | null>;
|
|
83
87
|
private escrowToken;
|
|
84
88
|
getClaimDigest(params: {
|
|
85
89
|
recipient: Address;
|
|
86
90
|
id: Id;
|
|
87
|
-
|
|
88
|
-
}): Promise<Hex>;
|
|
89
|
-
approve(params: {
|
|
90
|
-
token: Address;
|
|
91
|
-
amount: bigint;
|
|
91
|
+
dropKey: Hex;
|
|
92
92
|
}): Promise<Hex>;
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
/**
|
|
94
|
+
* permit 예치. approve tx 없이 typed-data 서명 1회 + deposit tx 1회.
|
|
95
|
+
* 이 배포본의 deposit에는 token 인자가 없다 — 컨트랙트가 token()으로 고정한다.
|
|
96
|
+
*/
|
|
97
|
+
private permitDeposit;
|
|
98
|
+
depositMapped(params: {
|
|
95
99
|
token: Address;
|
|
96
100
|
amount: bigint;
|
|
97
101
|
id: Id;
|
|
98
|
-
|
|
102
|
+
onSubmitted?: (txHash: Hex) => void | Promise<void>;
|
|
99
103
|
}): Promise<{
|
|
100
104
|
txHash: Hex;
|
|
101
105
|
}>;
|
|
102
|
-
/**
|
|
103
|
-
* permit 예치. approve tx 없이 typed-data 서명 1회 + deposit tx 1회.
|
|
104
|
-
* 이 배포본의 deposit에는 token 인자가 없다 — 컨트랙트가 token()으로 고정한다.
|
|
105
|
-
*/
|
|
106
|
-
private permitDeposit;
|
|
107
106
|
/**
|
|
108
107
|
* permit 서명 도메인. EIP-5267 eip712Domain()이 있으면 그 값을 쓰고, 없으면
|
|
109
108
|
* name() + version '1'로 폴백한다. version을 상수로 박으면 다른 버전을 쓰는
|
|
110
109
|
* 토큰에서 ecrecover가 조용히 실패해 deposit 내부 revert로만 드러난다.
|
|
111
110
|
*/
|
|
112
111
|
private permitDomain;
|
|
113
|
-
|
|
112
|
+
withdrawUnmapped(params: {
|
|
114
113
|
claimKey: Hex;
|
|
115
114
|
recipient: Address;
|
|
116
115
|
id: Id;
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
dropKey: Hex;
|
|
117
|
+
secret: Secret;
|
|
118
|
+
signature?: Hex;
|
|
119
|
+
onSubmitted?: (txHash: Hex) => void | Promise<void>;
|
|
120
|
+
}): Promise<Hex>;
|
|
121
|
+
withdrawMapped(params: {
|
|
122
|
+
dropKey: Hex;
|
|
123
|
+
onSubmitted?: (txHash: Hex) => void | Promise<void>;
|
|
124
|
+
}): Promise<Hex>;
|
|
125
|
+
batchWithdrawMapped(params: {
|
|
126
|
+
count: number;
|
|
127
|
+
}): Promise<Hex>;
|
|
128
|
+
batchWithdrawMappedByKeys(params: {
|
|
129
|
+
dropKeys: readonly Hex[];
|
|
130
|
+
}): Promise<Hex>;
|
|
131
|
+
withdrawUnmappedBatchByKeys(params: {
|
|
132
|
+
claimKey: Hex;
|
|
133
|
+
recipient: Address;
|
|
134
|
+
id: Id;
|
|
135
|
+
anchorDropKey: Hex;
|
|
119
136
|
secret: Secret;
|
|
137
|
+
nonce: bigint;
|
|
138
|
+
deadline: bigint;
|
|
139
|
+
dropKeys: readonly Hex[];
|
|
140
|
+
validatorSignature: Hex;
|
|
120
141
|
}): Promise<Hex>;
|
|
121
142
|
/** validatorNonceById는 **bytes32(id 해시)** 로 키잉된다 — 원문 string이 아니다. */
|
|
122
143
|
getValidatorNonce(params: {
|
|
@@ -133,26 +154,37 @@ declare class ViemSafeDropChainAdapter implements SafeDropChainPort {
|
|
|
133
154
|
getClaimedRecipient(params: {
|
|
134
155
|
id: Id;
|
|
135
156
|
}): Promise<Address>;
|
|
136
|
-
|
|
157
|
+
refundByKey(params: {
|
|
158
|
+
dropKey: Hex;
|
|
159
|
+
}): Promise<Hex>;
|
|
160
|
+
getChangeNonce(params: {
|
|
137
161
|
id: Id;
|
|
138
162
|
}): Promise<bigint>;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
163
|
+
getPendingRecipientChange(params: {
|
|
164
|
+
id: Id;
|
|
165
|
+
}): Promise<Address>;
|
|
166
|
+
requestRecipientChange(params: {
|
|
167
|
+
id: Id;
|
|
168
|
+
newRecipient: Address;
|
|
169
|
+
}): Promise<Hex>;
|
|
170
|
+
completeRecipientChange(params: {
|
|
147
171
|
id: Id;
|
|
148
172
|
nonce: bigint;
|
|
149
173
|
deadline: bigint;
|
|
150
|
-
maxCount: number;
|
|
151
174
|
signature: Hex;
|
|
152
175
|
}): Promise<Hex>;
|
|
153
|
-
|
|
154
|
-
|
|
176
|
+
cancelRecipientChange(params: {
|
|
177
|
+
id: Id;
|
|
178
|
+
}): Promise<Hex>;
|
|
179
|
+
resetRecipient(params: {
|
|
180
|
+
id: Id;
|
|
181
|
+
nonce: bigint;
|
|
182
|
+
deadline: bigint;
|
|
183
|
+
signature: Hex;
|
|
155
184
|
}): Promise<Hex>;
|
|
185
|
+
private currentContractWrite;
|
|
186
|
+
private transactionOverrides;
|
|
187
|
+
private batchTransactionOverrides;
|
|
156
188
|
private sponsorWrite;
|
|
157
189
|
private confirm;
|
|
158
190
|
private recoverRevertName;
|
|
@@ -176,6 +208,8 @@ type PopEnvironment = 'dev' | 'stage' | 'production';
|
|
|
176
208
|
interface PopApiPaths {
|
|
177
209
|
/** POST — 임시 claim 지갑 생성 (Bearer JWT). */
|
|
178
210
|
createWallet: string;
|
|
211
|
+
/** POST — tx hash에 메시지/봉투 메타데이터 연결 (Bearer JWT). */
|
|
212
|
+
dropMetadata: string;
|
|
179
213
|
/** POST — pending 지갑 개인키 수령 (X OAuth 토큰). */
|
|
180
214
|
retrievePrivateKey: string;
|
|
181
215
|
/** GET — 수령 대기 인박스 (Bearer JWT + 활성 X 연결). */
|
|
@@ -184,12 +218,17 @@ interface PopApiPaths {
|
|
|
184
218
|
envelopes: string;
|
|
185
219
|
/** GET — 토큰별 pending 잔액 상위 (공개). */
|
|
186
220
|
leaderboards: string;
|
|
221
|
+
leaderboardMe: string;
|
|
187
222
|
/** GET — 내 온체인 이벤트 히스토리 (Bearer JWT). */
|
|
188
223
|
histories: string;
|
|
189
224
|
/** GET/POST/DELETE — X 연결 (Bearer JWT). */
|
|
190
225
|
xConnections: string;
|
|
191
226
|
/** POST — 일괄 수령 validator 서명 (Bearer JWT). */
|
|
192
227
|
batchClaimSignature: string;
|
|
228
|
+
feedbacks: string;
|
|
229
|
+
revealYou: string;
|
|
230
|
+
recipientChangeSignature: string;
|
|
231
|
+
recipientResetSignature: string;
|
|
193
232
|
/** GET — SSE 알림 스트림. pop은 구독하지 않는다(앱이 EventSource로 직접). */
|
|
194
233
|
eventsSubscribe: string;
|
|
195
234
|
}
|
|
@@ -232,15 +271,24 @@ declare class HttpSafeDropApiAdapter implements SafeDropApiPort {
|
|
|
232
271
|
createClaimWallet(params: {
|
|
233
272
|
sender: Address;
|
|
234
273
|
recipient: SocialIdentifier;
|
|
235
|
-
message?: string;
|
|
236
|
-
envelopeId?: string;
|
|
237
274
|
}): Promise<{
|
|
238
275
|
claimAddress: Address;
|
|
276
|
+
id: Id;
|
|
277
|
+
isMapped: boolean;
|
|
239
278
|
}>;
|
|
279
|
+
recordDropMetadata(params: {
|
|
280
|
+
txHash: Hex;
|
|
281
|
+
message?: string;
|
|
282
|
+
envelopeId?: string;
|
|
283
|
+
}): Promise<void>;
|
|
240
284
|
retrieveClaimKey(params: {
|
|
285
|
+
claimAddress: Address;
|
|
241
286
|
senderAddress: Address;
|
|
242
287
|
oauth: OAuthProof;
|
|
243
288
|
}): Promise<{
|
|
289
|
+
isMapped: true;
|
|
290
|
+
} | {
|
|
291
|
+
isMapped: false;
|
|
244
292
|
claimKey: Hex;
|
|
245
293
|
claimAddress: Address;
|
|
246
294
|
}>;
|
|
@@ -252,9 +300,16 @@ declare class HttpSafeDropApiAdapter implements SafeDropApiPort {
|
|
|
252
300
|
}): Promise<readonly Envelope[]>;
|
|
253
301
|
getLeaderboard(params: {
|
|
254
302
|
token: Address;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
303
|
+
page?: number;
|
|
304
|
+
pageSize?: number;
|
|
305
|
+
identifier?: string;
|
|
306
|
+
}): Promise<LeaderboardPage>;
|
|
307
|
+
getMyLeaderboardEntry(params: {
|
|
308
|
+
token: Address;
|
|
309
|
+
}): Promise<MyLeaderboardEntry>;
|
|
310
|
+
listHistories(params: {
|
|
311
|
+
type: HistoryType;
|
|
312
|
+
token?: Address;
|
|
258
313
|
page?: number;
|
|
259
314
|
pageSize?: number;
|
|
260
315
|
}): Promise<HistoryPage>;
|
|
@@ -263,6 +318,25 @@ declare class HttpSafeDropApiAdapter implements SafeDropApiPort {
|
|
|
263
318
|
oauth: OAuthProof;
|
|
264
319
|
}): Promise<XConnection>;
|
|
265
320
|
disconnectX(): Promise<void>;
|
|
321
|
+
submitFeedback(params: {
|
|
322
|
+
dropId: number;
|
|
323
|
+
message: string;
|
|
324
|
+
}): Promise<string>;
|
|
325
|
+
setRevealYou(params: {
|
|
326
|
+
revealYou: boolean;
|
|
327
|
+
}): Promise<boolean>;
|
|
328
|
+
requestRecipientChangeSignature(params: {
|
|
329
|
+
id: Id;
|
|
330
|
+
oauth: OAuthProof;
|
|
331
|
+
nonce: bigint;
|
|
332
|
+
deadline: bigint;
|
|
333
|
+
}): Promise<RecipientChangeSignature>;
|
|
334
|
+
requestRecipientResetSignature(params: {
|
|
335
|
+
id: Id;
|
|
336
|
+
oauth: OAuthProof;
|
|
337
|
+
nonce: bigint;
|
|
338
|
+
deadline: bigint;
|
|
339
|
+
}): Promise<RecipientSignature>;
|
|
266
340
|
requestBatchClaimSignature(params: {
|
|
267
341
|
id: Id;
|
|
268
342
|
oauth: OAuthProof;
|
|
@@ -272,683 +346,404 @@ declare class HttpSafeDropApiAdapter implements SafeDropApiPort {
|
|
|
272
346
|
private request;
|
|
273
347
|
}
|
|
274
348
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
349
|
+
/** Full current ONEpop ABI, sourced directly from the bundled artifact. */
|
|
350
|
+
declare const SAFEDROP_ABI: Abi;
|
|
351
|
+
|
|
352
|
+
/** Validator reads and errors used by the current batch flow. */
|
|
353
|
+
declare const SAFEDROP_VALIDATOR_ABI: readonly [{
|
|
354
|
+
readonly type: "function";
|
|
355
|
+
readonly name: "validator";
|
|
356
|
+
readonly stateMutability: "view";
|
|
357
|
+
readonly inputs: readonly [];
|
|
358
|
+
readonly outputs: readonly [{
|
|
359
|
+
readonly type: "address";
|
|
281
360
|
}];
|
|
282
|
-
readonly stateMutability: "nonpayable";
|
|
283
361
|
}, {
|
|
284
362
|
readonly type: "function";
|
|
285
|
-
readonly name: "
|
|
363
|
+
readonly name: "validatorClaimDigest";
|
|
364
|
+
readonly stateMutability: "view";
|
|
286
365
|
readonly inputs: readonly [{
|
|
287
366
|
readonly name: "recipient";
|
|
288
367
|
readonly type: "address";
|
|
289
|
-
readonly internalType: "address";
|
|
290
368
|
}, {
|
|
291
369
|
readonly name: "id";
|
|
292
370
|
readonly type: "string";
|
|
293
|
-
readonly internalType: "string";
|
|
294
371
|
}, {
|
|
295
|
-
readonly name: "
|
|
296
|
-
readonly type: "
|
|
297
|
-
|
|
372
|
+
readonly name: "nonce";
|
|
373
|
+
readonly type: "uint256";
|
|
374
|
+
}, {
|
|
375
|
+
readonly name: "deadline";
|
|
376
|
+
readonly type: "uint256";
|
|
298
377
|
}];
|
|
299
378
|
readonly outputs: readonly [{
|
|
300
|
-
readonly name: "";
|
|
301
379
|
readonly type: "bytes32";
|
|
302
|
-
readonly internalType: "bytes32";
|
|
303
380
|
}];
|
|
304
|
-
readonly stateMutability: "view";
|
|
305
381
|
}, {
|
|
306
382
|
readonly type: "function";
|
|
307
|
-
readonly name: "
|
|
308
|
-
readonly
|
|
383
|
+
readonly name: "validatorNonceById";
|
|
384
|
+
readonly stateMutability: "view";
|
|
385
|
+
readonly inputs: readonly [{
|
|
386
|
+
readonly name: "idHash";
|
|
387
|
+
readonly type: "bytes32";
|
|
388
|
+
}];
|
|
309
389
|
readonly outputs: readonly [{
|
|
310
|
-
readonly
|
|
311
|
-
readonly type: "uint64";
|
|
312
|
-
readonly internalType: "uint64";
|
|
390
|
+
readonly type: "uint256";
|
|
313
391
|
}];
|
|
314
|
-
readonly stateMutability: "view";
|
|
315
392
|
}, {
|
|
316
393
|
readonly type: "function";
|
|
317
394
|
readonly name: "claimedRecipientOf";
|
|
395
|
+
readonly stateMutability: "view";
|
|
318
396
|
readonly inputs: readonly [{
|
|
319
397
|
readonly name: "id";
|
|
320
398
|
readonly type: "string";
|
|
321
|
-
readonly internalType: "string";
|
|
322
399
|
}];
|
|
323
400
|
readonly outputs: readonly [{
|
|
324
|
-
readonly name: "";
|
|
325
401
|
readonly type: "address";
|
|
326
|
-
readonly internalType: "address";
|
|
327
402
|
}];
|
|
328
|
-
readonly stateMutability: "view";
|
|
329
403
|
}, {
|
|
330
|
-
readonly type: "
|
|
331
|
-
readonly name: "
|
|
332
|
-
readonly inputs: readonly [
|
|
333
|
-
readonly name: "claimAddr";
|
|
334
|
-
readonly type: "address";
|
|
335
|
-
readonly internalType: "address";
|
|
336
|
-
}, {
|
|
337
|
-
readonly name: "token";
|
|
338
|
-
readonly type: "address";
|
|
339
|
-
readonly internalType: "contract IERC20";
|
|
340
|
-
}, {
|
|
341
|
-
readonly name: "amount";
|
|
342
|
-
readonly type: "uint256";
|
|
343
|
-
readonly internalType: "uint256";
|
|
344
|
-
}, {
|
|
345
|
-
readonly name: "id";
|
|
346
|
-
readonly type: "string";
|
|
347
|
-
readonly internalType: "string";
|
|
348
|
-
}, {
|
|
349
|
-
readonly name: "secretHash";
|
|
350
|
-
readonly type: "bytes32";
|
|
351
|
-
readonly internalType: "bytes32";
|
|
352
|
-
}];
|
|
353
|
-
readonly outputs: readonly [];
|
|
354
|
-
readonly stateMutability: "nonpayable";
|
|
404
|
+
readonly type: "error";
|
|
405
|
+
readonly name: "ValidatorSigExpired";
|
|
406
|
+
readonly inputs: readonly [];
|
|
355
407
|
}, {
|
|
408
|
+
readonly type: "error";
|
|
409
|
+
readonly name: "InvalidValidatorNonce";
|
|
410
|
+
readonly inputs: readonly [];
|
|
411
|
+
}];
|
|
412
|
+
|
|
413
|
+
/** Current ONEpop mapped/unmapped deployment ABI used by the SDK. */
|
|
414
|
+
declare const ONEPOP_ABI: readonly [{
|
|
356
415
|
readonly type: "function";
|
|
357
|
-
readonly name: "
|
|
358
|
-
readonly inputs: readonly [{
|
|
359
|
-
readonly name: "sponsor";
|
|
360
|
-
readonly type: "address";
|
|
361
|
-
readonly internalType: "address";
|
|
362
|
-
}];
|
|
363
|
-
readonly outputs: readonly [{
|
|
364
|
-
readonly name: "";
|
|
365
|
-
readonly type: "uint256";
|
|
366
|
-
readonly internalType: "uint256";
|
|
367
|
-
}];
|
|
416
|
+
readonly name: "activeDropOf";
|
|
368
417
|
readonly stateMutability: "view";
|
|
369
|
-
}, {
|
|
370
|
-
readonly type: "function";
|
|
371
|
-
readonly name: "depositsBySponsor";
|
|
372
418
|
readonly inputs: readonly [{
|
|
373
419
|
readonly name: "sponsor";
|
|
374
420
|
readonly type: "address";
|
|
375
|
-
readonly internalType: "address";
|
|
376
421
|
}, {
|
|
377
|
-
readonly name: "";
|
|
378
|
-
readonly type: "uint256";
|
|
379
|
-
readonly internalType: "uint256";
|
|
380
|
-
}];
|
|
381
|
-
readonly outputs: readonly [{
|
|
382
422
|
readonly name: "claimAddr";
|
|
383
423
|
readonly type: "address";
|
|
384
|
-
readonly internalType: "address";
|
|
385
|
-
}, {
|
|
386
|
-
readonly name: "token";
|
|
387
|
-
readonly type: "address";
|
|
388
|
-
readonly internalType: "contract IERC20";
|
|
389
|
-
}, {
|
|
390
|
-
readonly name: "amount";
|
|
391
|
-
readonly type: "uint128";
|
|
392
|
-
readonly internalType: "uint128";
|
|
393
|
-
}, {
|
|
394
|
-
readonly name: "expiry";
|
|
395
|
-
readonly type: "uint64";
|
|
396
|
-
readonly internalType: "uint64";
|
|
397
|
-
}, {
|
|
398
|
-
readonly name: "secretHash";
|
|
399
|
-
readonly type: "bytes32";
|
|
400
|
-
readonly internalType: "bytes32";
|
|
401
|
-
}, {
|
|
402
|
-
readonly name: "id";
|
|
403
|
-
readonly type: "string";
|
|
404
|
-
readonly internalType: "string";
|
|
405
|
-
}];
|
|
406
|
-
readonly stateMutability: "view";
|
|
407
|
-
}, {
|
|
408
|
-
readonly type: "function";
|
|
409
|
-
readonly name: "depositsOf";
|
|
410
|
-
readonly inputs: readonly [{
|
|
411
|
-
readonly name: "sponsor";
|
|
412
|
-
readonly type: "address";
|
|
413
|
-
readonly internalType: "address";
|
|
414
424
|
}];
|
|
415
425
|
readonly outputs: readonly [{
|
|
416
|
-
readonly
|
|
417
|
-
readonly type: "tuple[]";
|
|
418
|
-
readonly internalType: "struct SafeDrop.DepositRecord[]";
|
|
419
|
-
readonly components: readonly [{
|
|
420
|
-
readonly name: "claimAddr";
|
|
421
|
-
readonly type: "address";
|
|
422
|
-
readonly internalType: "address";
|
|
423
|
-
}, {
|
|
424
|
-
readonly name: "token";
|
|
425
|
-
readonly type: "address";
|
|
426
|
-
readonly internalType: "contract IERC20";
|
|
427
|
-
}, {
|
|
428
|
-
readonly name: "amount";
|
|
429
|
-
readonly type: "uint128";
|
|
430
|
-
readonly internalType: "uint128";
|
|
431
|
-
}, {
|
|
432
|
-
readonly name: "expiry";
|
|
433
|
-
readonly type: "uint64";
|
|
434
|
-
readonly internalType: "uint64";
|
|
435
|
-
}, {
|
|
436
|
-
readonly name: "secretHash";
|
|
437
|
-
readonly type: "bytes32";
|
|
438
|
-
readonly internalType: "bytes32";
|
|
439
|
-
}, {
|
|
440
|
-
readonly name: "id";
|
|
441
|
-
readonly type: "string";
|
|
442
|
-
readonly internalType: "string";
|
|
443
|
-
}];
|
|
426
|
+
readonly type: "bytes32";
|
|
444
427
|
}];
|
|
445
|
-
readonly stateMutability: "view";
|
|
446
428
|
}, {
|
|
447
429
|
readonly type: "function";
|
|
448
430
|
readonly name: "drops";
|
|
431
|
+
readonly stateMutability: "view";
|
|
449
432
|
readonly inputs: readonly [{
|
|
450
|
-
readonly name: "
|
|
451
|
-
readonly type: "
|
|
452
|
-
readonly internalType: "address";
|
|
433
|
+
readonly name: "dropKey";
|
|
434
|
+
readonly type: "bytes32";
|
|
453
435
|
}];
|
|
454
436
|
readonly outputs: readonly [{
|
|
455
437
|
readonly name: "sponsor";
|
|
456
438
|
readonly type: "address";
|
|
457
|
-
readonly internalType: "address";
|
|
458
439
|
}, {
|
|
459
|
-
readonly name: "
|
|
440
|
+
readonly name: "amount";
|
|
460
441
|
readonly type: "uint96";
|
|
461
|
-
readonly internalType: "uint96";
|
|
462
442
|
}, {
|
|
463
|
-
readonly name: "
|
|
443
|
+
readonly name: "claimAddr";
|
|
464
444
|
readonly type: "address";
|
|
465
|
-
readonly internalType: "contract IERC20";
|
|
466
|
-
}, {
|
|
467
|
-
readonly name: "amount";
|
|
468
|
-
readonly type: "uint128";
|
|
469
|
-
readonly internalType: "uint128";
|
|
470
445
|
}, {
|
|
471
|
-
readonly name: "
|
|
472
|
-
readonly type: "
|
|
473
|
-
readonly internalType: "uint64";
|
|
446
|
+
readonly name: "recipient";
|
|
447
|
+
readonly type: "address";
|
|
474
448
|
}, {
|
|
475
449
|
readonly name: "secretHash";
|
|
476
450
|
readonly type: "bytes32";
|
|
477
|
-
readonly internalType: "bytes32";
|
|
478
|
-
}, {
|
|
479
|
-
readonly name: "salt";
|
|
480
|
-
readonly type: "bytes32";
|
|
481
|
-
readonly internalType: "bytes32";
|
|
482
451
|
}, {
|
|
483
452
|
readonly name: "id";
|
|
484
453
|
readonly type: "string";
|
|
485
|
-
readonly internalType: "string";
|
|
486
454
|
}];
|
|
487
|
-
readonly stateMutability: "view";
|
|
488
455
|
}, {
|
|
489
456
|
readonly type: "function";
|
|
490
|
-
readonly name: "
|
|
457
|
+
readonly name: "token";
|
|
458
|
+
readonly stateMutability: "view";
|
|
491
459
|
readonly inputs: readonly [];
|
|
492
460
|
readonly outputs: readonly [{
|
|
493
|
-
readonly name: "fields";
|
|
494
|
-
readonly type: "bytes1";
|
|
495
|
-
readonly internalType: "bytes1";
|
|
496
|
-
}, {
|
|
497
|
-
readonly name: "name";
|
|
498
|
-
readonly type: "string";
|
|
499
|
-
readonly internalType: "string";
|
|
500
|
-
}, {
|
|
501
|
-
readonly name: "version";
|
|
502
|
-
readonly type: "string";
|
|
503
|
-
readonly internalType: "string";
|
|
504
|
-
}, {
|
|
505
|
-
readonly name: "chainId";
|
|
506
|
-
readonly type: "uint256";
|
|
507
|
-
readonly internalType: "uint256";
|
|
508
|
-
}, {
|
|
509
|
-
readonly name: "verifyingContract";
|
|
510
461
|
readonly type: "address";
|
|
511
|
-
readonly internalType: "address";
|
|
512
|
-
}, {
|
|
513
|
-
readonly name: "salt";
|
|
514
|
-
readonly type: "bytes32";
|
|
515
|
-
readonly internalType: "bytes32";
|
|
516
|
-
}, {
|
|
517
|
-
readonly name: "extensions";
|
|
518
|
-
readonly type: "uint256[]";
|
|
519
|
-
readonly internalType: "uint256[]";
|
|
520
462
|
}];
|
|
521
|
-
readonly stateMutability: "view";
|
|
522
463
|
}, {
|
|
523
464
|
readonly type: "function";
|
|
524
|
-
readonly name: "
|
|
465
|
+
readonly name: "claimDigest";
|
|
466
|
+
readonly stateMutability: "view";
|
|
525
467
|
readonly inputs: readonly [{
|
|
468
|
+
readonly name: "recipient";
|
|
469
|
+
readonly type: "address";
|
|
470
|
+
}, {
|
|
526
471
|
readonly name: "id";
|
|
527
472
|
readonly type: "string";
|
|
528
|
-
|
|
473
|
+
}, {
|
|
474
|
+
readonly name: "dropKey";
|
|
475
|
+
readonly type: "bytes32";
|
|
529
476
|
}];
|
|
530
477
|
readonly outputs: readonly [{
|
|
531
|
-
readonly
|
|
532
|
-
readonly type: "address[]";
|
|
533
|
-
readonly internalType: "address[]";
|
|
478
|
+
readonly type: "bytes32";
|
|
534
479
|
}];
|
|
535
|
-
readonly stateMutability: "view";
|
|
536
480
|
}, {
|
|
537
481
|
readonly type: "function";
|
|
538
|
-
readonly name: "
|
|
482
|
+
readonly name: "claimedRecipientOf";
|
|
483
|
+
readonly stateMutability: "view";
|
|
539
484
|
readonly inputs: readonly [{
|
|
540
485
|
readonly name: "id";
|
|
541
486
|
readonly type: "string";
|
|
542
|
-
readonly internalType: "string";
|
|
543
487
|
}];
|
|
544
488
|
readonly outputs: readonly [{
|
|
545
|
-
readonly
|
|
546
|
-
readonly type: "uint256";
|
|
547
|
-
readonly internalType: "uint256";
|
|
489
|
+
readonly type: "address";
|
|
548
490
|
}];
|
|
549
|
-
readonly stateMutability: "view";
|
|
550
491
|
}, {
|
|
551
492
|
readonly type: "function";
|
|
552
|
-
readonly name: "
|
|
493
|
+
readonly name: "pendingDropsByXid";
|
|
494
|
+
readonly stateMutability: "view";
|
|
553
495
|
readonly inputs: readonly [{
|
|
554
496
|
readonly name: "id";
|
|
555
497
|
readonly type: "string";
|
|
556
|
-
readonly internalType: "string";
|
|
557
498
|
}];
|
|
558
499
|
readonly outputs: readonly [{
|
|
559
|
-
readonly name: "
|
|
560
|
-
readonly type: "
|
|
561
|
-
readonly internalType: "address[]";
|
|
500
|
+
readonly name: "dropKeys";
|
|
501
|
+
readonly type: "bytes32[]";
|
|
562
502
|
}, {
|
|
563
503
|
readonly name: "records";
|
|
564
504
|
readonly type: "tuple[]";
|
|
565
|
-
readonly internalType: "struct SafeDrop.Drop[]";
|
|
566
505
|
readonly components: readonly [{
|
|
567
506
|
readonly name: "sponsor";
|
|
568
507
|
readonly type: "address";
|
|
569
|
-
readonly internalType: "address";
|
|
570
508
|
}, {
|
|
571
|
-
readonly name: "
|
|
509
|
+
readonly name: "amount";
|
|
572
510
|
readonly type: "uint96";
|
|
573
|
-
readonly internalType: "uint96";
|
|
574
511
|
}, {
|
|
575
|
-
readonly name: "
|
|
512
|
+
readonly name: "claimAddr";
|
|
576
513
|
readonly type: "address";
|
|
577
|
-
readonly internalType: "contract IERC20";
|
|
578
|
-
}, {
|
|
579
|
-
readonly name: "amount";
|
|
580
|
-
readonly type: "uint128";
|
|
581
|
-
readonly internalType: "uint128";
|
|
582
514
|
}, {
|
|
583
|
-
readonly name: "
|
|
584
|
-
readonly type: "
|
|
585
|
-
readonly internalType: "uint64";
|
|
515
|
+
readonly name: "recipient";
|
|
516
|
+
readonly type: "address";
|
|
586
517
|
}, {
|
|
587
518
|
readonly name: "secretHash";
|
|
588
519
|
readonly type: "bytes32";
|
|
589
|
-
readonly internalType: "bytes32";
|
|
590
|
-
}, {
|
|
591
|
-
readonly name: "salt";
|
|
592
|
-
readonly type: "bytes32";
|
|
593
|
-
readonly internalType: "bytes32";
|
|
594
520
|
}, {
|
|
595
521
|
readonly name: "id";
|
|
596
522
|
readonly type: "string";
|
|
597
|
-
readonly internalType: "string";
|
|
598
523
|
}];
|
|
599
524
|
}];
|
|
600
|
-
readonly stateMutability: "view";
|
|
601
|
-
}, {
|
|
602
|
-
readonly type: "function";
|
|
603
|
-
readonly name: "refund";
|
|
604
|
-
readonly inputs: readonly [{
|
|
605
|
-
readonly name: "claimAddr";
|
|
606
|
-
readonly type: "address";
|
|
607
|
-
readonly internalType: "address";
|
|
608
|
-
}];
|
|
609
|
-
readonly outputs: readonly [];
|
|
610
|
-
readonly stateMutability: "nonpayable";
|
|
611
525
|
}, {
|
|
612
526
|
readonly type: "function";
|
|
613
|
-
readonly name: "
|
|
614
|
-
readonly inputs: readonly [{
|
|
615
|
-
readonly name: "sponsor";
|
|
616
|
-
readonly type: "address";
|
|
617
|
-
readonly internalType: "address";
|
|
618
|
-
}];
|
|
619
|
-
readonly outputs: readonly [{
|
|
620
|
-
readonly name: "";
|
|
621
|
-
readonly type: "uint256";
|
|
622
|
-
readonly internalType: "uint256";
|
|
623
|
-
}];
|
|
527
|
+
readonly name: "pendingDropsByRecipient";
|
|
624
528
|
readonly stateMutability: "view";
|
|
625
|
-
}, {
|
|
626
|
-
readonly type: "function";
|
|
627
|
-
readonly name: "unclaimedDepositsOf";
|
|
628
529
|
readonly inputs: readonly [{
|
|
629
|
-
readonly name: "
|
|
530
|
+
readonly name: "recipient";
|
|
630
531
|
readonly type: "address";
|
|
631
|
-
readonly internalType: "address";
|
|
632
532
|
}];
|
|
633
533
|
readonly outputs: readonly [{
|
|
534
|
+
readonly name: "dropKeys";
|
|
535
|
+
readonly type: "bytes32[]";
|
|
536
|
+
}, {
|
|
634
537
|
readonly name: "records";
|
|
635
538
|
readonly type: "tuple[]";
|
|
636
|
-
readonly internalType: "struct SafeDrop.DepositRecord[]";
|
|
637
539
|
readonly components: readonly [{
|
|
638
|
-
readonly name: "
|
|
639
|
-
readonly type: "address";
|
|
640
|
-
readonly internalType: "address";
|
|
641
|
-
}, {
|
|
642
|
-
readonly name: "token";
|
|
540
|
+
readonly name: "sponsor";
|
|
643
541
|
readonly type: "address";
|
|
644
|
-
readonly internalType: "contract IERC20";
|
|
645
542
|
}, {
|
|
646
543
|
readonly name: "amount";
|
|
647
|
-
readonly type: "
|
|
648
|
-
|
|
544
|
+
readonly type: "uint96";
|
|
545
|
+
}, {
|
|
546
|
+
readonly name: "claimAddr";
|
|
547
|
+
readonly type: "address";
|
|
649
548
|
}, {
|
|
650
|
-
readonly name: "
|
|
651
|
-
readonly type: "
|
|
652
|
-
readonly internalType: "uint64";
|
|
549
|
+
readonly name: "recipient";
|
|
550
|
+
readonly type: "address";
|
|
653
551
|
}, {
|
|
654
552
|
readonly name: "secretHash";
|
|
655
553
|
readonly type: "bytes32";
|
|
656
|
-
readonly internalType: "bytes32";
|
|
657
554
|
}, {
|
|
658
555
|
readonly name: "id";
|
|
659
556
|
readonly type: "string";
|
|
660
|
-
readonly internalType: "string";
|
|
661
557
|
}];
|
|
662
558
|
}];
|
|
663
|
-
readonly stateMutability: "view";
|
|
664
559
|
}, {
|
|
665
560
|
readonly type: "function";
|
|
666
|
-
readonly name: "
|
|
561
|
+
readonly name: "pendingDropsOf";
|
|
562
|
+
readonly stateMutability: "view";
|
|
667
563
|
readonly inputs: readonly [{
|
|
668
564
|
readonly name: "sponsor";
|
|
669
565
|
readonly type: "address";
|
|
670
|
-
readonly internalType: "address";
|
|
671
566
|
}];
|
|
672
567
|
readonly outputs: readonly [{
|
|
673
|
-
readonly name: "";
|
|
674
|
-
readonly type: "
|
|
675
|
-
|
|
568
|
+
readonly name: "dropKeys";
|
|
569
|
+
readonly type: "bytes32[]";
|
|
570
|
+
}, {
|
|
571
|
+
readonly name: "records";
|
|
572
|
+
readonly type: "tuple[]";
|
|
573
|
+
readonly components: readonly [{
|
|
574
|
+
readonly name: "sponsor";
|
|
575
|
+
readonly type: "address";
|
|
576
|
+
}, {
|
|
577
|
+
readonly name: "amount";
|
|
578
|
+
readonly type: "uint96";
|
|
579
|
+
}, {
|
|
580
|
+
readonly name: "claimAddr";
|
|
581
|
+
readonly type: "address";
|
|
582
|
+
}, {
|
|
583
|
+
readonly name: "recipient";
|
|
584
|
+
readonly type: "address";
|
|
585
|
+
}, {
|
|
586
|
+
readonly name: "secretHash";
|
|
587
|
+
readonly type: "bytes32";
|
|
588
|
+
}, {
|
|
589
|
+
readonly name: "id";
|
|
590
|
+
readonly type: "string";
|
|
591
|
+
}];
|
|
676
592
|
}];
|
|
677
|
-
readonly stateMutability: "view";
|
|
678
593
|
}, {
|
|
679
594
|
readonly type: "function";
|
|
680
|
-
readonly name: "
|
|
595
|
+
readonly name: "depositMapped";
|
|
596
|
+
readonly stateMutability: "nonpayable";
|
|
597
|
+
readonly inputs: readonly [{
|
|
598
|
+
readonly name: "amount";
|
|
599
|
+
readonly type: "uint256";
|
|
600
|
+
}, {
|
|
601
|
+
readonly name: "id";
|
|
602
|
+
readonly type: "string";
|
|
603
|
+
}, {
|
|
604
|
+
readonly name: "permitDeadline";
|
|
605
|
+
readonly type: "uint256";
|
|
606
|
+
}, {
|
|
607
|
+
readonly name: "v";
|
|
608
|
+
readonly type: "uint8";
|
|
609
|
+
}, {
|
|
610
|
+
readonly name: "r";
|
|
611
|
+
readonly type: "bytes32";
|
|
612
|
+
}, {
|
|
613
|
+
readonly name: "s";
|
|
614
|
+
readonly type: "bytes32";
|
|
615
|
+
}];
|
|
616
|
+
readonly outputs: readonly [];
|
|
617
|
+
}, {
|
|
618
|
+
readonly type: "function";
|
|
619
|
+
readonly name: "withdrawUnmapped";
|
|
620
|
+
readonly stateMutability: "nonpayable";
|
|
681
621
|
readonly inputs: readonly [{
|
|
682
622
|
readonly name: "recipient";
|
|
683
623
|
readonly type: "address";
|
|
684
|
-
readonly internalType: "address";
|
|
685
624
|
}, {
|
|
686
625
|
readonly name: "id";
|
|
687
626
|
readonly type: "string";
|
|
688
|
-
readonly internalType: "string";
|
|
689
627
|
}, {
|
|
690
|
-
readonly name: "
|
|
628
|
+
readonly name: "dropKey";
|
|
691
629
|
readonly type: "bytes32";
|
|
692
|
-
readonly internalType: "bytes32";
|
|
693
630
|
}, {
|
|
694
631
|
readonly name: "signature";
|
|
695
632
|
readonly type: "bytes";
|
|
696
|
-
readonly internalType: "bytes";
|
|
697
633
|
}, {
|
|
698
634
|
readonly name: "secret";
|
|
699
635
|
readonly type: "bytes";
|
|
700
|
-
readonly internalType: "bytes";
|
|
701
636
|
}];
|
|
702
637
|
readonly outputs: readonly [];
|
|
703
|
-
readonly stateMutability: "nonpayable";
|
|
704
638
|
}, {
|
|
705
|
-
readonly type: "
|
|
706
|
-
readonly name: "
|
|
639
|
+
readonly type: "function";
|
|
640
|
+
readonly name: "withdrawUnmappedBatchByKeys";
|
|
641
|
+
readonly stateMutability: "nonpayable";
|
|
707
642
|
readonly inputs: readonly [{
|
|
708
|
-
readonly name: "
|
|
709
|
-
readonly type: "address";
|
|
710
|
-
readonly indexed: true;
|
|
711
|
-
readonly internalType: "address";
|
|
712
|
-
}, {
|
|
713
|
-
readonly name: "sponsor";
|
|
714
|
-
readonly type: "address";
|
|
715
|
-
readonly indexed: true;
|
|
716
|
-
readonly internalType: "address";
|
|
717
|
-
}, {
|
|
718
|
-
readonly name: "token";
|
|
643
|
+
readonly name: "recipient";
|
|
719
644
|
readonly type: "address";
|
|
720
|
-
readonly indexed: true;
|
|
721
|
-
readonly internalType: "address";
|
|
722
|
-
}, {
|
|
723
|
-
readonly name: "amount";
|
|
724
|
-
readonly type: "uint256";
|
|
725
|
-
readonly indexed: false;
|
|
726
|
-
readonly internalType: "uint256";
|
|
727
645
|
}, {
|
|
728
646
|
readonly name: "id";
|
|
729
647
|
readonly type: "string";
|
|
730
|
-
readonly indexed: false;
|
|
731
|
-
readonly internalType: "string";
|
|
732
648
|
}, {
|
|
733
|
-
readonly name: "
|
|
734
|
-
readonly type: "uint64";
|
|
735
|
-
readonly indexed: false;
|
|
736
|
-
readonly internalType: "uint64";
|
|
737
|
-
}, {
|
|
738
|
-
readonly name: "secretHash";
|
|
649
|
+
readonly name: "anchorDropKey";
|
|
739
650
|
readonly type: "bytes32";
|
|
740
|
-
readonly indexed: false;
|
|
741
|
-
readonly internalType: "bytes32";
|
|
742
|
-
}];
|
|
743
|
-
readonly anonymous: false;
|
|
744
|
-
}, {
|
|
745
|
-
readonly type: "event";
|
|
746
|
-
readonly name: "EIP712DomainChanged";
|
|
747
|
-
readonly inputs: readonly [];
|
|
748
|
-
readonly anonymous: false;
|
|
749
|
-
}, {
|
|
750
|
-
readonly type: "event";
|
|
751
|
-
readonly name: "Refunded";
|
|
752
|
-
readonly inputs: readonly [{
|
|
753
|
-
readonly name: "claimAddr";
|
|
754
|
-
readonly type: "address";
|
|
755
|
-
readonly indexed: true;
|
|
756
|
-
readonly internalType: "address";
|
|
757
651
|
}, {
|
|
758
|
-
readonly name: "
|
|
759
|
-
readonly type: "
|
|
760
|
-
readonly indexed: true;
|
|
761
|
-
readonly internalType: "address";
|
|
652
|
+
readonly name: "signature";
|
|
653
|
+
readonly type: "bytes";
|
|
762
654
|
}, {
|
|
763
|
-
readonly name: "
|
|
764
|
-
readonly type: "
|
|
765
|
-
readonly indexed: false;
|
|
766
|
-
readonly internalType: "string";
|
|
655
|
+
readonly name: "secret";
|
|
656
|
+
readonly type: "bytes";
|
|
767
657
|
}, {
|
|
768
|
-
readonly name: "
|
|
658
|
+
readonly name: "nonce";
|
|
769
659
|
readonly type: "uint256";
|
|
770
|
-
readonly indexed: false;
|
|
771
|
-
readonly internalType: "uint256";
|
|
772
|
-
}];
|
|
773
|
-
readonly anonymous: false;
|
|
774
|
-
}, {
|
|
775
|
-
readonly type: "event";
|
|
776
|
-
readonly name: "Withdrawn";
|
|
777
|
-
readonly inputs: readonly [{
|
|
778
|
-
readonly name: "claimAddr";
|
|
779
|
-
readonly type: "address";
|
|
780
|
-
readonly indexed: true;
|
|
781
|
-
readonly internalType: "address";
|
|
782
|
-
}, {
|
|
783
|
-
readonly name: "recipient";
|
|
784
|
-
readonly type: "address";
|
|
785
|
-
readonly indexed: true;
|
|
786
|
-
readonly internalType: "address";
|
|
787
660
|
}, {
|
|
788
|
-
readonly name: "
|
|
789
|
-
readonly type: "
|
|
790
|
-
readonly indexed: true;
|
|
791
|
-
readonly internalType: "address";
|
|
661
|
+
readonly name: "deadline";
|
|
662
|
+
readonly type: "uint256";
|
|
792
663
|
}, {
|
|
793
|
-
readonly name: "
|
|
794
|
-
readonly type: "
|
|
795
|
-
readonly indexed: false;
|
|
796
|
-
readonly internalType: "string";
|
|
664
|
+
readonly name: "dropKeys";
|
|
665
|
+
readonly type: "bytes32[]";
|
|
797
666
|
}, {
|
|
798
|
-
readonly name: "
|
|
799
|
-
readonly type: "
|
|
800
|
-
readonly indexed: false;
|
|
801
|
-
readonly internalType: "uint256";
|
|
667
|
+
readonly name: "validatorSignature";
|
|
668
|
+
readonly type: "bytes";
|
|
802
669
|
}];
|
|
803
|
-
readonly
|
|
804
|
-
}, {
|
|
805
|
-
readonly type: "error";
|
|
806
|
-
readonly name: "AmountOverflow";
|
|
807
|
-
readonly inputs: readonly [];
|
|
808
|
-
}, {
|
|
809
|
-
readonly type: "error";
|
|
810
|
-
readonly name: "DropAlreadyExists";
|
|
811
|
-
readonly inputs: readonly [];
|
|
812
|
-
}, {
|
|
813
|
-
readonly type: "error";
|
|
814
|
-
readonly name: "DropExpired";
|
|
815
|
-
readonly inputs: readonly [];
|
|
816
|
-
}, {
|
|
817
|
-
readonly type: "error";
|
|
818
|
-
readonly name: "DropNotExpired";
|
|
819
|
-
readonly inputs: readonly [];
|
|
820
|
-
}, {
|
|
821
|
-
readonly type: "error";
|
|
822
|
-
readonly name: "DropNotFound";
|
|
823
|
-
readonly inputs: readonly [];
|
|
824
|
-
}, {
|
|
825
|
-
readonly type: "error";
|
|
826
|
-
readonly name: "DuplicateDropForId";
|
|
827
|
-
readonly inputs: readonly [];
|
|
670
|
+
readonly outputs: readonly [];
|
|
828
671
|
}, {
|
|
829
|
-
readonly type: "
|
|
830
|
-
readonly name: "
|
|
831
|
-
readonly
|
|
672
|
+
readonly type: "function";
|
|
673
|
+
readonly name: "withdrawMapped";
|
|
674
|
+
readonly stateMutability: "nonpayable";
|
|
675
|
+
readonly inputs: readonly [{
|
|
676
|
+
readonly name: "dropKey";
|
|
677
|
+
readonly type: "bytes32";
|
|
678
|
+
}];
|
|
679
|
+
readonly outputs: readonly [];
|
|
832
680
|
}, {
|
|
833
|
-
readonly type: "
|
|
834
|
-
readonly name: "
|
|
681
|
+
readonly type: "function";
|
|
682
|
+
readonly name: "batchWithdrawMapped";
|
|
683
|
+
readonly stateMutability: "nonpayable";
|
|
835
684
|
readonly inputs: readonly [{
|
|
836
|
-
readonly name: "
|
|
685
|
+
readonly name: "count";
|
|
837
686
|
readonly type: "uint256";
|
|
838
|
-
readonly internalType: "uint256";
|
|
839
687
|
}];
|
|
688
|
+
readonly outputs: readonly [];
|
|
840
689
|
}, {
|
|
841
|
-
readonly type: "
|
|
842
|
-
readonly name: "
|
|
690
|
+
readonly type: "function";
|
|
691
|
+
readonly name: "batchWithdrawMapped";
|
|
692
|
+
readonly stateMutability: "nonpayable";
|
|
843
693
|
readonly inputs: readonly [{
|
|
844
|
-
readonly name: "
|
|
845
|
-
readonly type: "bytes32";
|
|
846
|
-
readonly internalType: "bytes32";
|
|
694
|
+
readonly name: "dropKeys";
|
|
695
|
+
readonly type: "bytes32[]";
|
|
847
696
|
}];
|
|
697
|
+
readonly outputs: readonly [];
|
|
848
698
|
}, {
|
|
849
|
-
readonly type: "
|
|
850
|
-
readonly name: "
|
|
851
|
-
readonly
|
|
852
|
-
}, {
|
|
853
|
-
readonly type: "error";
|
|
854
|
-
readonly name: "IdMismatch";
|
|
855
|
-
readonly inputs: readonly [];
|
|
856
|
-
}, {
|
|
857
|
-
readonly type: "error";
|
|
858
|
-
readonly name: "InvalidShortString";
|
|
859
|
-
readonly inputs: readonly [];
|
|
860
|
-
}, {
|
|
861
|
-
readonly type: "error";
|
|
862
|
-
readonly name: "NotSponsor";
|
|
863
|
-
readonly inputs: readonly [];
|
|
864
|
-
}, {
|
|
865
|
-
readonly type: "error";
|
|
866
|
-
readonly name: "ReentrancyGuardReentrantCall";
|
|
867
|
-
readonly inputs: readonly [];
|
|
868
|
-
}, {
|
|
869
|
-
readonly type: "error";
|
|
870
|
-
readonly name: "SafeERC20FailedOperation";
|
|
699
|
+
readonly type: "function";
|
|
700
|
+
readonly name: "refund";
|
|
701
|
+
readonly stateMutability: "nonpayable";
|
|
871
702
|
readonly inputs: readonly [{
|
|
872
|
-
readonly name: "
|
|
873
|
-
readonly type: "
|
|
874
|
-
readonly internalType: "address";
|
|
703
|
+
readonly name: "dropKey";
|
|
704
|
+
readonly type: "bytes32";
|
|
875
705
|
}];
|
|
706
|
+
readonly outputs: readonly [];
|
|
876
707
|
}, {
|
|
877
|
-
readonly type: "
|
|
878
|
-
readonly name: "
|
|
879
|
-
readonly
|
|
880
|
-
}, {
|
|
881
|
-
readonly type: "error";
|
|
882
|
-
readonly name: "SecretMismatch";
|
|
883
|
-
readonly inputs: readonly [];
|
|
884
|
-
}, {
|
|
885
|
-
readonly type: "error";
|
|
886
|
-
readonly name: "StringTooLong";
|
|
708
|
+
readonly type: "function";
|
|
709
|
+
readonly name: "changeNonceById";
|
|
710
|
+
readonly stateMutability: "view";
|
|
887
711
|
readonly inputs: readonly [{
|
|
888
|
-
readonly name: "
|
|
889
|
-
readonly type: "
|
|
890
|
-
|
|
712
|
+
readonly name: "idKey";
|
|
713
|
+
readonly type: "bytes32";
|
|
714
|
+
}];
|
|
715
|
+
readonly outputs: readonly [{
|
|
716
|
+
readonly type: "uint256";
|
|
891
717
|
}];
|
|
892
718
|
}, {
|
|
893
|
-
readonly type: "error";
|
|
894
|
-
readonly name: "ZeroAmount";
|
|
895
|
-
readonly inputs: readonly [];
|
|
896
|
-
}, {
|
|
897
|
-
readonly type: "error";
|
|
898
|
-
readonly name: "ZeroClaimAddress";
|
|
899
|
-
readonly inputs: readonly [];
|
|
900
|
-
}, {
|
|
901
|
-
readonly type: "error";
|
|
902
|
-
readonly name: "ZeroRecipient";
|
|
903
|
-
readonly inputs: readonly [];
|
|
904
|
-
}, {
|
|
905
|
-
readonly type: "error";
|
|
906
|
-
readonly name: "ZeroToken";
|
|
907
|
-
readonly inputs: readonly [];
|
|
908
|
-
}];
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* 일괄 수령(batch claim) ABI — **배포 바이트코드에서 검증한** as-built 기록.
|
|
912
|
-
*
|
|
913
|
-
* `src/infrastructure/safedrop_abi.json`(Foundry 산출물)에는 이 함수들이 없다.
|
|
914
|
-
* 반대로 openapi.json 설명이 말하는 `validatorNonceById`는 **string이 아니라
|
|
915
|
-
* bytes32(=keccak256(utf8(id)))** 를 받는다. 그래서 자동 생성 ABI를 믿지 않고
|
|
916
|
-
* 배포본(CROSS testnet 612044 `0x50911242D9EA1554297ad11eb634230C56ae769c`)의
|
|
917
|
-
* dispatcher 셀렉터로 직접 확인한 시그니처만 여기 둔다 (2026-07-30 검증):
|
|
918
|
-
*
|
|
919
|
-
* 3a5381b5 validator()
|
|
920
|
-
* aee5b003 validatorClaimDigest(address,string,uint256,uint256)
|
|
921
|
-
* dc4d9bff validatorNonceById(bytes32) ← id는 **해시**로 키잉
|
|
922
|
-
* a730b8c5 withdrawByValidator(address,string,uint256,uint256,uint256,bytes)
|
|
923
|
-
* 0d14a67d ValidatorSigExpired()
|
|
924
|
-
* dcf5a899 InvalidValidatorNonce()
|
|
925
|
-
*
|
|
926
|
-
* eth_call로 확인한 검증 순서: deadline → nonce → 서명(ECDSA).
|
|
927
|
-
* `maxCount`는 **서명 대상이 아니다** — 그래서 서명 1건으로 페이지네이션을 계속
|
|
928
|
-
* 재사용할 수 있다(openapi 설명과 일치). 온체인 상한은 없고 가스가 한계다.
|
|
929
|
-
*
|
|
930
|
-
* EIP-712 (배포본 `eip712Domain()`으로 확인):
|
|
931
|
-
* domain = { name: 'ONEpop', version: '1', chainId, verifyingContract: SafeDrop }
|
|
932
|
-
* type = ValidatorClaim(address recipient,string id,uint256 nonce,uint256 deadline)
|
|
933
|
-
* → digest는 `validatorClaimDigest()`가 온체인에서 그대로 돌려주므로, 로컬에서
|
|
934
|
-
* 재조립하지 말고 그 값을 읽어 쓴다(백엔드와의 불일치를 가스 전에 잡는다).
|
|
935
|
-
*/
|
|
936
|
-
declare const SAFEDROP_VALIDATOR_ABI: readonly [{
|
|
937
719
|
readonly type: "function";
|
|
938
|
-
readonly name: "
|
|
720
|
+
readonly name: "pendingRecipientChange";
|
|
939
721
|
readonly stateMutability: "view";
|
|
940
|
-
readonly inputs: readonly [
|
|
722
|
+
readonly inputs: readonly [{
|
|
723
|
+
readonly name: "idKey";
|
|
724
|
+
readonly type: "bytes32";
|
|
725
|
+
}];
|
|
941
726
|
readonly outputs: readonly [{
|
|
727
|
+
readonly name: "newRecipient";
|
|
942
728
|
readonly type: "address";
|
|
943
729
|
}];
|
|
944
730
|
}, {
|
|
945
731
|
readonly type: "function";
|
|
946
|
-
readonly name: "
|
|
947
|
-
readonly stateMutability: "
|
|
732
|
+
readonly name: "requestRecipientChange";
|
|
733
|
+
readonly stateMutability: "nonpayable";
|
|
948
734
|
readonly inputs: readonly [{
|
|
949
|
-
readonly name: "
|
|
950
|
-
readonly type: "
|
|
735
|
+
readonly name: "id";
|
|
736
|
+
readonly type: "string";
|
|
951
737
|
}, {
|
|
738
|
+
readonly name: "newRecipient";
|
|
739
|
+
readonly type: "address";
|
|
740
|
+
}];
|
|
741
|
+
readonly outputs: readonly [];
|
|
742
|
+
}, {
|
|
743
|
+
readonly type: "function";
|
|
744
|
+
readonly name: "completeRecipientChange";
|
|
745
|
+
readonly stateMutability: "nonpayable";
|
|
746
|
+
readonly inputs: readonly [{
|
|
952
747
|
readonly name: "id";
|
|
953
748
|
readonly type: "string";
|
|
954
749
|
}, {
|
|
@@ -957,29 +752,25 @@ declare const SAFEDROP_VALIDATOR_ABI: readonly [{
|
|
|
957
752
|
}, {
|
|
958
753
|
readonly name: "deadline";
|
|
959
754
|
readonly type: "uint256";
|
|
755
|
+
}, {
|
|
756
|
+
readonly name: "validatorSignature";
|
|
757
|
+
readonly type: "bytes";
|
|
960
758
|
}];
|
|
961
|
-
readonly outputs: readonly [
|
|
962
|
-
readonly type: "bytes32";
|
|
963
|
-
}];
|
|
759
|
+
readonly outputs: readonly [];
|
|
964
760
|
}, {
|
|
965
761
|
readonly type: "function";
|
|
966
|
-
readonly name: "
|
|
967
|
-
readonly stateMutability: "
|
|
762
|
+
readonly name: "cancelRecipientChange";
|
|
763
|
+
readonly stateMutability: "nonpayable";
|
|
968
764
|
readonly inputs: readonly [{
|
|
969
|
-
readonly name: "
|
|
970
|
-
readonly type: "
|
|
971
|
-
}];
|
|
972
|
-
readonly outputs: readonly [{
|
|
973
|
-
readonly type: "uint256";
|
|
765
|
+
readonly name: "id";
|
|
766
|
+
readonly type: "string";
|
|
974
767
|
}];
|
|
768
|
+
readonly outputs: readonly [];
|
|
975
769
|
}, {
|
|
976
770
|
readonly type: "function";
|
|
977
|
-
readonly name: "
|
|
771
|
+
readonly name: "resetRecipient";
|
|
978
772
|
readonly stateMutability: "nonpayable";
|
|
979
773
|
readonly inputs: readonly [{
|
|
980
|
-
readonly name: "recipient";
|
|
981
|
-
readonly type: "address";
|
|
982
|
-
}, {
|
|
983
774
|
readonly name: "id";
|
|
984
775
|
readonly type: "string";
|
|
985
776
|
}, {
|
|
@@ -989,43 +780,42 @@ declare const SAFEDROP_VALIDATOR_ABI: readonly [{
|
|
|
989
780
|
readonly name: "deadline";
|
|
990
781
|
readonly type: "uint256";
|
|
991
782
|
}, {
|
|
992
|
-
readonly name: "
|
|
993
|
-
readonly type: "uint256";
|
|
994
|
-
}, {
|
|
995
|
-
readonly name: "signature";
|
|
783
|
+
readonly name: "validatorSignature";
|
|
996
784
|
readonly type: "bytes";
|
|
997
785
|
}];
|
|
998
786
|
readonly outputs: readonly [];
|
|
999
|
-
}, {
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
readonly
|
|
787
|
+
}, ...{
|
|
788
|
+
type: "error";
|
|
789
|
+
name: "AlreadyMapped" | "AmountOverflow" | "ChangeAlreadyRequested" | "ChangeInProgress" | "CountExceedsPending" | "DropAlreadyExists" | "DropNotFound" | "ECDSAInvalidSignature" | "EmptyId" | "IdMismatch" | "IdNotMapped" | "InvalidClaimSignature" | "InvalidShortString" | "InvalidValidatorNonce" | "InvalidValidatorSignature" | "NoPendingChange" | "NotRecipient" | "NotSponsor" | "PendingLimitExceeded" | "RecipientNotEmpty" | "ReentrancyGuardReentrantCall" | "SameRecipient" | "SecretMismatch" | "ValidatorSigExpired" | "ZeroAmount" | "ZeroClaimAddress" | "ZeroCount" | "ZeroRecipient" | "ZeroSbt" | "ZeroSecretHash" | "ZeroToken" | "ZeroValidator";
|
|
790
|
+
inputs: readonly [];
|
|
791
|
+
}[], {
|
|
792
|
+
readonly type: "error";
|
|
793
|
+
readonly name: "ECDSAInvalidSignatureLength";
|
|
1003
794
|
readonly inputs: readonly [{
|
|
1004
|
-
readonly name: "
|
|
1005
|
-
readonly type: "string";
|
|
1006
|
-
}];
|
|
1007
|
-
readonly outputs: readonly [{
|
|
795
|
+
readonly name: "length";
|
|
1008
796
|
readonly type: "uint256";
|
|
1009
797
|
}];
|
|
1010
798
|
}, {
|
|
1011
|
-
readonly type: "
|
|
1012
|
-
readonly name: "
|
|
1013
|
-
readonly stateMutability: "view";
|
|
799
|
+
readonly type: "error";
|
|
800
|
+
readonly name: "ECDSAInvalidSignatureS";
|
|
1014
801
|
readonly inputs: readonly [{
|
|
1015
|
-
readonly name: "
|
|
1016
|
-
readonly type: "
|
|
1017
|
-
}];
|
|
1018
|
-
readonly outputs: readonly [{
|
|
1019
|
-
readonly type: "address";
|
|
802
|
+
readonly name: "s";
|
|
803
|
+
readonly type: "bytes32";
|
|
1020
804
|
}];
|
|
1021
805
|
}, {
|
|
1022
806
|
readonly type: "error";
|
|
1023
|
-
readonly name: "
|
|
1024
|
-
readonly inputs: readonly [
|
|
807
|
+
readonly name: "SafeERC20FailedOperation";
|
|
808
|
+
readonly inputs: readonly [{
|
|
809
|
+
readonly name: "token";
|
|
810
|
+
readonly type: "address";
|
|
811
|
+
}];
|
|
1025
812
|
}, {
|
|
1026
813
|
readonly type: "error";
|
|
1027
|
-
readonly name: "
|
|
1028
|
-
readonly inputs: readonly [
|
|
814
|
+
readonly name: "StringTooLong";
|
|
815
|
+
readonly inputs: readonly [{
|
|
816
|
+
readonly name: "str";
|
|
817
|
+
readonly type: "string";
|
|
818
|
+
}];
|
|
1029
819
|
}];
|
|
1030
820
|
|
|
1031
821
|
/**
|
|
@@ -1066,18 +856,15 @@ interface CreateSafeDropClientOptions {
|
|
|
1066
856
|
/** SafeDrop 컨트랙트 주소. */
|
|
1067
857
|
contractAddress: Address;
|
|
1068
858
|
publicClient: PublicClient;
|
|
1069
|
-
/**
|
|
859
|
+
/** deposit/refund 서명용 연결 지갑. */
|
|
1070
860
|
walletClient: WalletClient;
|
|
1071
861
|
chain: Chain;
|
|
1072
862
|
/** withdraw 임시 지갑 client의 RPC transport. */
|
|
1073
863
|
transport?: Transport;
|
|
1074
|
-
/**
|
|
864
|
+
/** @deprecated Use transactionFees. */
|
|
1075
865
|
withdrawFees?: ViemSafeDropChainAdapterOptions['withdrawFees'];
|
|
1076
|
-
/**
|
|
1077
|
-
|
|
1078
|
-
* SafeDrop 배포본과 토큰 양쪽이 permit을 지원할 때만 켠다.
|
|
1079
|
-
*/
|
|
1080
|
-
permit?: boolean;
|
|
866
|
+
/** 모든 contract write의 EIP-1559/gas override. */
|
|
867
|
+
transactionFees?: ViemSafeDropChainAdapterOptions['transactionFees'];
|
|
1081
868
|
/** 수령 링크 base URL. */
|
|
1082
869
|
claimBaseUrl: string;
|
|
1083
870
|
/** one-pop-api 어댑터 옵션(baseUrl 미지정 시 환경변수). */
|
|
@@ -1172,4 +959,4 @@ declare class XAuthClient {
|
|
|
1172
959
|
}>;
|
|
1173
960
|
}
|
|
1174
961
|
|
|
1175
|
-
export { type CreateSafeDropClientOptions, CrossAuthClient, type CrossAuthClientOptions, DEFAULT_POP_API_PATHS, HttpSafeDropApiAdapter, type HttpSafeDropApiAdapterOptions, HttpXAuthAdapter, type HttpXAuthAdapterOptions, type Pkce, type PopApiPaths, type PopEnvironment, SAFEDROP_ABI, SAFEDROP_VALIDATOR_ABI, type SessionStore, ViemClaimSignerAdapter, ViemCryptoAdapter, ViemSafeDropChainAdapter, type ViemSafeDropChainAdapterOptions, XAuthClient, type XAuthClientOptions, createSafeDropClient, generatePkce, generateState, getCrossAuthBaseUrl, getOnePopApiBaseUrl };
|
|
962
|
+
export { type CreateSafeDropClientOptions, CrossAuthClient, type CrossAuthClientOptions, DEFAULT_POP_API_PATHS, HttpSafeDropApiAdapter, type HttpSafeDropApiAdapterOptions, HttpXAuthAdapter, type HttpXAuthAdapterOptions, ONEPOP_ABI, type Pkce, type PopApiPaths, type PopEnvironment, SAFEDROP_ABI, SAFEDROP_VALIDATOR_ABI, type SafeDropTransactionFees, type SessionStore, ViemClaimSignerAdapter, ViemCryptoAdapter, ViemSafeDropChainAdapter, type ViemSafeDropChainAdapterOptions, XAuthClient, type XAuthClientOptions, createSafeDropClient, generatePkce, generateState, getCrossAuthBaseUrl, getOnePopApiBaseUrl };
|