@nexus-cross/pop 1.4.0-beta.1 → 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 +317 -869
- package/dist/adapters/index.js +1 -1
- package/dist/chunk-SE2HF5WH.js +1 -0
- package/dist/{createSafeDrop-BSO9RQBD.d.ts → createSafeDrop-CayUX4w_.d.ts} +193 -126
- package/dist/index.d.ts +8 -43
- 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-RS7SBR7A.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,15 +69,11 @@ 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
75
|
getDropByKey(dropKey: Hex): Promise<OnePopDrop | null>;
|
|
76
|
-
getDropKeyByClaimAddress(claimAddress: Address, sponsor
|
|
76
|
+
getDropKeyByClaimAddress(claimAddress: Address, sponsor: Address): Promise<Hex | null>;
|
|
77
77
|
getPendingDropsById(params: {
|
|
78
78
|
id: Id;
|
|
79
79
|
}): Promise<readonly OnePopDrop[]>;
|
|
@@ -83,33 +83,13 @@ declare class ViemSafeDropChainAdapter implements SafeDropChainPort {
|
|
|
83
83
|
getPendingDropsBySponsor(params: {
|
|
84
84
|
sponsor: Address;
|
|
85
85
|
}): Promise<readonly OnePopDrop[]>;
|
|
86
|
-
|
|
87
|
-
* drops(claimAddr). 배포본에 따라 반환 필드가 8개(Foundry ABI) 또는 5개(permit
|
|
88
|
-
* 배포본)다 — 셀렉터가 같으므로 raw call 1회 후 디코딩만 나눈다. 8필드를 먼저
|
|
89
|
-
* 시도하는 이유: 짧은 데이터(5필드=192B)를 8필드로 읽으면 **에러가 나서** 안전하게
|
|
90
|
-
* 폴백되지만, 반대 순서면 8필드 데이터를 5필드로 조용히 오독한다.
|
|
91
|
-
*/
|
|
92
|
-
getDrop(claimAddress: Address): Promise<DropState | null>;
|
|
93
|
-
/** 에스크로가 고정한 단일 ERC20. 5필드 배포본에서 drop.token을 채운다. */
|
|
86
|
+
getDrop(claimAddress: Address, sponsor: Address): Promise<DropState | null>;
|
|
94
87
|
private escrowToken;
|
|
95
88
|
getClaimDigest(params: {
|
|
96
89
|
recipient: Address;
|
|
97
90
|
id: Id;
|
|
98
|
-
|
|
99
|
-
}): Promise<Hex>;
|
|
100
|
-
approve(params: {
|
|
101
|
-
token: Address;
|
|
102
|
-
amount: bigint;
|
|
91
|
+
dropKey: Hex;
|
|
103
92
|
}): Promise<Hex>;
|
|
104
|
-
deposit(params: {
|
|
105
|
-
claimAddress: Address;
|
|
106
|
-
token: Address;
|
|
107
|
-
amount: bigint;
|
|
108
|
-
id: Id;
|
|
109
|
-
secretHash: SecretHash;
|
|
110
|
-
}): Promise<{
|
|
111
|
-
txHash: Hex;
|
|
112
|
-
}>;
|
|
113
93
|
/**
|
|
114
94
|
* permit 예치. approve tx 없이 typed-data 서명 1회 + deposit tx 1회.
|
|
115
95
|
* 이 배포본의 deposit에는 token 인자가 없다 — 컨트랙트가 token()으로 고정한다.
|
|
@@ -129,20 +109,13 @@ declare class ViemSafeDropChainAdapter implements SafeDropChainPort {
|
|
|
129
109
|
* 토큰에서 ecrecover가 조용히 실패해 deposit 내부 revert로만 드러난다.
|
|
130
110
|
*/
|
|
131
111
|
private permitDomain;
|
|
132
|
-
withdraw(params: {
|
|
133
|
-
claimKey: Hex;
|
|
134
|
-
recipient: Address;
|
|
135
|
-
id: Id;
|
|
136
|
-
salt: Hex;
|
|
137
|
-
signature: Hex;
|
|
138
|
-
secret: Secret;
|
|
139
|
-
}): Promise<Hex>;
|
|
140
112
|
withdrawUnmapped(params: {
|
|
141
113
|
claimKey: Hex;
|
|
142
114
|
recipient: Address;
|
|
143
115
|
id: Id;
|
|
144
116
|
dropKey: Hex;
|
|
145
117
|
secret: Secret;
|
|
118
|
+
signature?: Hex;
|
|
146
119
|
onSubmitted?: (txHash: Hex) => void | Promise<void>;
|
|
147
120
|
}): Promise<Hex>;
|
|
148
121
|
withdrawMapped(params: {
|
|
@@ -152,6 +125,20 @@ declare class ViemSafeDropChainAdapter implements SafeDropChainPort {
|
|
|
152
125
|
batchWithdrawMapped(params: {
|
|
153
126
|
count: number;
|
|
154
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;
|
|
136
|
+
secret: Secret;
|
|
137
|
+
nonce: bigint;
|
|
138
|
+
deadline: bigint;
|
|
139
|
+
dropKeys: readonly Hex[];
|
|
140
|
+
validatorSignature: Hex;
|
|
141
|
+
}): Promise<Hex>;
|
|
155
142
|
/** validatorNonceById는 **bytes32(id 해시)** 로 키잉된다 — 원문 string이 아니다. */
|
|
156
143
|
getValidatorNonce(params: {
|
|
157
144
|
id: Id;
|
|
@@ -167,38 +154,37 @@ declare class ViemSafeDropChainAdapter implements SafeDropChainPort {
|
|
|
167
154
|
getClaimedRecipient(params: {
|
|
168
155
|
id: Id;
|
|
169
156
|
}): Promise<Address>;
|
|
170
|
-
|
|
157
|
+
refundByKey(params: {
|
|
158
|
+
dropKey: Hex;
|
|
159
|
+
}): Promise<Hex>;
|
|
160
|
+
getChangeNonce(params: {
|
|
171
161
|
id: Id;
|
|
172
162
|
}): Promise<bigint>;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
163
|
+
getPendingRecipientChange(params: {
|
|
164
|
+
id: Id;
|
|
165
|
+
}): Promise<Address>;
|
|
166
|
+
requestRecipientChange(params: {
|
|
167
|
+
id: Id;
|
|
168
|
+
newRecipient: Address;
|
|
169
|
+
}): Promise<Hex>;
|
|
170
|
+
completeRecipientChange(params: {
|
|
181
171
|
id: Id;
|
|
182
172
|
nonce: bigint;
|
|
183
173
|
deadline: bigint;
|
|
184
|
-
maxCount: number;
|
|
185
174
|
signature: Hex;
|
|
186
175
|
}): Promise<Hex>;
|
|
187
|
-
|
|
188
|
-
claimAddress: Address;
|
|
189
|
-
}): Promise<Hex>;
|
|
190
|
-
refundByKey(params: {
|
|
191
|
-
dropKey: Hex;
|
|
192
|
-
}): Promise<Hex>;
|
|
193
|
-
getChangeNonce(params: {
|
|
176
|
+
cancelRecipientChange(params: {
|
|
194
177
|
id: Id;
|
|
195
|
-
}): Promise<
|
|
178
|
+
}): Promise<Hex>;
|
|
196
179
|
resetRecipient(params: {
|
|
197
180
|
id: Id;
|
|
198
181
|
nonce: bigint;
|
|
199
182
|
deadline: bigint;
|
|
200
183
|
signature: Hex;
|
|
201
184
|
}): Promise<Hex>;
|
|
185
|
+
private currentContractWrite;
|
|
186
|
+
private transactionOverrides;
|
|
187
|
+
private batchTransactionOverrides;
|
|
202
188
|
private sponsorWrite;
|
|
203
189
|
private confirm;
|
|
204
190
|
private recoverRevertName;
|
|
@@ -232,766 +218,138 @@ interface PopApiPaths {
|
|
|
232
218
|
envelopes: string;
|
|
233
219
|
/** GET — 토큰별 pending 잔액 상위 (공개). */
|
|
234
220
|
leaderboards: string;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
* GET /drops (Bearer JWT) → 수령 인박스
|
|
255
|
-
* GET /envelopes (공개) → 카드 디자인
|
|
256
|
-
* GET /leaderboards?token= (공개) → pending 상위
|
|
257
|
-
* GET /histories (Bearer JWT) → 온체인 이벤트
|
|
258
|
-
* GET|POST|DELETE /x-connections (Bearer JWT) → X 연결
|
|
259
|
-
* POST /batch-claim-signature (Bearer JWT) → ValidatorClaim 서명
|
|
260
|
-
*
|
|
261
|
-
* base URL은 미지정 시 환경변수로 결정(getOnePopApiBaseUrl).
|
|
262
|
-
* wei-scale 값은 응답의 10진 문자열 → BigInt로 변환해 내보낸다(CLAUDE.md §4).
|
|
263
|
-
*/
|
|
264
|
-
interface HttpSafeDropApiAdapterOptions {
|
|
265
|
-
/** 미지정 시 환경변수(VITE_/NEXT_PUBLIC_ONE_POP_*)로 결정. */
|
|
266
|
-
baseUrl?: string;
|
|
267
|
-
/** SIWE JWT 공급자. Bearer 인증이 필요한 모든 호출이 사용한다. */
|
|
268
|
-
getJwt?: () => string | undefined | Promise<string | undefined>;
|
|
269
|
-
/** 테스트/SSR용 fetch 주입. 기본 globalThis.fetch. */
|
|
270
|
-
fetchImpl?: typeof fetch;
|
|
271
|
-
/** 엔드포인트 경로 override. 기본 DEFAULT_POP_API_PATHS. */
|
|
272
|
-
paths?: Partial<PopApiPaths>;
|
|
273
|
-
}
|
|
274
|
-
declare class HttpSafeDropApiAdapter implements SafeDropApiPort {
|
|
275
|
-
private readonly baseUrl;
|
|
276
|
-
private readonly fetchImpl;
|
|
277
|
-
private readonly getJwt?;
|
|
278
|
-
private readonly paths;
|
|
279
|
-
constructor(options?: HttpSafeDropApiAdapterOptions);
|
|
280
|
-
createClaimWallet(params: {
|
|
281
|
-
sender: Address;
|
|
282
|
-
recipient: SocialIdentifier;
|
|
283
|
-
message?: string;
|
|
284
|
-
envelopeId?: string;
|
|
285
|
-
}): Promise<{
|
|
286
|
-
claimAddress: Address;
|
|
287
|
-
id: Id;
|
|
288
|
-
isMapped: boolean;
|
|
289
|
-
}>;
|
|
290
|
-
recordDropMetadata(params: {
|
|
291
|
-
txHash: Hex;
|
|
292
|
-
message?: string;
|
|
293
|
-
envelopeId?: string;
|
|
294
|
-
}): Promise<void>;
|
|
295
|
-
retrieveClaimKey(params: {
|
|
296
|
-
claimAddress: Address;
|
|
297
|
-
senderAddress: Address;
|
|
298
|
-
oauth: OAuthProof;
|
|
299
|
-
}): Promise<{
|
|
300
|
-
isMapped: true;
|
|
301
|
-
} | {
|
|
302
|
-
isMapped: false;
|
|
303
|
-
claimKey: Hex;
|
|
304
|
-
claimAddress: Address;
|
|
305
|
-
}>;
|
|
306
|
-
listDrops(params?: {
|
|
307
|
-
token?: Address;
|
|
308
|
-
}): Promise<DropInbox>;
|
|
309
|
-
listEnvelopes(params?: {
|
|
310
|
-
locale?: string;
|
|
311
|
-
}): Promise<readonly Envelope[]>;
|
|
312
|
-
getLeaderboard(params: {
|
|
313
|
-
token: Address;
|
|
314
|
-
}): Promise<readonly LeaderboardEntry[]>;
|
|
315
|
-
listHistories(params?: {
|
|
316
|
-
event?: PopEventName;
|
|
317
|
-
page?: number;
|
|
318
|
-
pageSize?: number;
|
|
319
|
-
}): Promise<HistoryPage>;
|
|
320
|
-
getXConnection(): Promise<XConnection | null>;
|
|
321
|
-
connectX(params: {
|
|
322
|
-
oauth: OAuthProof;
|
|
323
|
-
}): Promise<XConnection>;
|
|
324
|
-
disconnectX(): Promise<void>;
|
|
325
|
-
requestBatchClaimSignature(params: {
|
|
326
|
-
id: Id;
|
|
327
|
-
oauth: OAuthProof;
|
|
328
|
-
nonce: bigint;
|
|
329
|
-
deadline: bigint;
|
|
330
|
-
}): Promise<BatchClaimSignature>;
|
|
331
|
-
private request;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
declare const SAFEDROP_ABI: readonly [{
|
|
335
|
-
readonly type: "constructor";
|
|
336
|
-
readonly inputs: readonly [{
|
|
337
|
-
readonly name: "claimPeriod_";
|
|
338
|
-
readonly type: "uint64";
|
|
339
|
-
readonly internalType: "uint64";
|
|
340
|
-
}];
|
|
341
|
-
readonly stateMutability: "nonpayable";
|
|
342
|
-
}, {
|
|
343
|
-
readonly type: "function";
|
|
344
|
-
readonly name: "claimDigest";
|
|
345
|
-
readonly inputs: readonly [{
|
|
346
|
-
readonly name: "recipient";
|
|
347
|
-
readonly type: "address";
|
|
348
|
-
readonly internalType: "address";
|
|
349
|
-
}, {
|
|
350
|
-
readonly name: "id";
|
|
351
|
-
readonly type: "string";
|
|
352
|
-
readonly internalType: "string";
|
|
353
|
-
}, {
|
|
354
|
-
readonly name: "salt";
|
|
355
|
-
readonly type: "bytes32";
|
|
356
|
-
readonly internalType: "bytes32";
|
|
357
|
-
}];
|
|
358
|
-
readonly outputs: readonly [{
|
|
359
|
-
readonly name: "";
|
|
360
|
-
readonly type: "bytes32";
|
|
361
|
-
readonly internalType: "bytes32";
|
|
362
|
-
}];
|
|
363
|
-
readonly stateMutability: "view";
|
|
364
|
-
}, {
|
|
365
|
-
readonly type: "function";
|
|
366
|
-
readonly name: "claimPeriod";
|
|
367
|
-
readonly inputs: readonly [];
|
|
368
|
-
readonly outputs: readonly [{
|
|
369
|
-
readonly name: "";
|
|
370
|
-
readonly type: "uint64";
|
|
371
|
-
readonly internalType: "uint64";
|
|
372
|
-
}];
|
|
373
|
-
readonly stateMutability: "view";
|
|
374
|
-
}, {
|
|
375
|
-
readonly type: "function";
|
|
376
|
-
readonly name: "claimedRecipientOf";
|
|
377
|
-
readonly inputs: readonly [{
|
|
378
|
-
readonly name: "id";
|
|
379
|
-
readonly type: "string";
|
|
380
|
-
readonly internalType: "string";
|
|
381
|
-
}];
|
|
382
|
-
readonly outputs: readonly [{
|
|
383
|
-
readonly name: "";
|
|
384
|
-
readonly type: "address";
|
|
385
|
-
readonly internalType: "address";
|
|
386
|
-
}];
|
|
387
|
-
readonly stateMutability: "view";
|
|
388
|
-
}, {
|
|
389
|
-
readonly type: "function";
|
|
390
|
-
readonly name: "deposit";
|
|
391
|
-
readonly inputs: readonly [{
|
|
392
|
-
readonly name: "claimAddr";
|
|
393
|
-
readonly type: "address";
|
|
394
|
-
readonly internalType: "address";
|
|
395
|
-
}, {
|
|
396
|
-
readonly name: "token";
|
|
397
|
-
readonly type: "address";
|
|
398
|
-
readonly internalType: "contract IERC20";
|
|
399
|
-
}, {
|
|
400
|
-
readonly name: "amount";
|
|
401
|
-
readonly type: "uint256";
|
|
402
|
-
readonly internalType: "uint256";
|
|
403
|
-
}, {
|
|
404
|
-
readonly name: "id";
|
|
405
|
-
readonly type: "string";
|
|
406
|
-
readonly internalType: "string";
|
|
407
|
-
}, {
|
|
408
|
-
readonly name: "secretHash";
|
|
409
|
-
readonly type: "bytes32";
|
|
410
|
-
readonly internalType: "bytes32";
|
|
411
|
-
}];
|
|
412
|
-
readonly outputs: readonly [];
|
|
413
|
-
readonly stateMutability: "nonpayable";
|
|
414
|
-
}, {
|
|
415
|
-
readonly type: "function";
|
|
416
|
-
readonly name: "depositCountOf";
|
|
417
|
-
readonly inputs: readonly [{
|
|
418
|
-
readonly name: "sponsor";
|
|
419
|
-
readonly type: "address";
|
|
420
|
-
readonly internalType: "address";
|
|
421
|
-
}];
|
|
422
|
-
readonly outputs: readonly [{
|
|
423
|
-
readonly name: "";
|
|
424
|
-
readonly type: "uint256";
|
|
425
|
-
readonly internalType: "uint256";
|
|
426
|
-
}];
|
|
427
|
-
readonly stateMutability: "view";
|
|
428
|
-
}, {
|
|
429
|
-
readonly type: "function";
|
|
430
|
-
readonly name: "depositsBySponsor";
|
|
431
|
-
readonly inputs: readonly [{
|
|
432
|
-
readonly name: "sponsor";
|
|
433
|
-
readonly type: "address";
|
|
434
|
-
readonly internalType: "address";
|
|
435
|
-
}, {
|
|
436
|
-
readonly name: "";
|
|
437
|
-
readonly type: "uint256";
|
|
438
|
-
readonly internalType: "uint256";
|
|
439
|
-
}];
|
|
440
|
-
readonly outputs: readonly [{
|
|
441
|
-
readonly name: "claimAddr";
|
|
442
|
-
readonly type: "address";
|
|
443
|
-
readonly internalType: "address";
|
|
444
|
-
}, {
|
|
445
|
-
readonly name: "token";
|
|
446
|
-
readonly type: "address";
|
|
447
|
-
readonly internalType: "contract IERC20";
|
|
448
|
-
}, {
|
|
449
|
-
readonly name: "amount";
|
|
450
|
-
readonly type: "uint128";
|
|
451
|
-
readonly internalType: "uint128";
|
|
452
|
-
}, {
|
|
453
|
-
readonly name: "expiry";
|
|
454
|
-
readonly type: "uint64";
|
|
455
|
-
readonly internalType: "uint64";
|
|
456
|
-
}, {
|
|
457
|
-
readonly name: "secretHash";
|
|
458
|
-
readonly type: "bytes32";
|
|
459
|
-
readonly internalType: "bytes32";
|
|
460
|
-
}, {
|
|
461
|
-
readonly name: "id";
|
|
462
|
-
readonly type: "string";
|
|
463
|
-
readonly internalType: "string";
|
|
464
|
-
}];
|
|
465
|
-
readonly stateMutability: "view";
|
|
466
|
-
}, {
|
|
467
|
-
readonly type: "function";
|
|
468
|
-
readonly name: "depositsOf";
|
|
469
|
-
readonly inputs: readonly [{
|
|
470
|
-
readonly name: "sponsor";
|
|
471
|
-
readonly type: "address";
|
|
472
|
-
readonly internalType: "address";
|
|
473
|
-
}];
|
|
474
|
-
readonly outputs: readonly [{
|
|
475
|
-
readonly name: "";
|
|
476
|
-
readonly type: "tuple[]";
|
|
477
|
-
readonly internalType: "struct SafeDrop.DepositRecord[]";
|
|
478
|
-
readonly components: readonly [{
|
|
479
|
-
readonly name: "claimAddr";
|
|
480
|
-
readonly type: "address";
|
|
481
|
-
readonly internalType: "address";
|
|
482
|
-
}, {
|
|
483
|
-
readonly name: "token";
|
|
484
|
-
readonly type: "address";
|
|
485
|
-
readonly internalType: "contract IERC20";
|
|
486
|
-
}, {
|
|
487
|
-
readonly name: "amount";
|
|
488
|
-
readonly type: "uint128";
|
|
489
|
-
readonly internalType: "uint128";
|
|
490
|
-
}, {
|
|
491
|
-
readonly name: "expiry";
|
|
492
|
-
readonly type: "uint64";
|
|
493
|
-
readonly internalType: "uint64";
|
|
494
|
-
}, {
|
|
495
|
-
readonly name: "secretHash";
|
|
496
|
-
readonly type: "bytes32";
|
|
497
|
-
readonly internalType: "bytes32";
|
|
498
|
-
}, {
|
|
499
|
-
readonly name: "id";
|
|
500
|
-
readonly type: "string";
|
|
501
|
-
readonly internalType: "string";
|
|
502
|
-
}];
|
|
503
|
-
}];
|
|
504
|
-
readonly stateMutability: "view";
|
|
505
|
-
}, {
|
|
506
|
-
readonly type: "function";
|
|
507
|
-
readonly name: "drops";
|
|
508
|
-
readonly inputs: readonly [{
|
|
509
|
-
readonly name: "claimAddr";
|
|
510
|
-
readonly type: "address";
|
|
511
|
-
readonly internalType: "address";
|
|
512
|
-
}];
|
|
513
|
-
readonly outputs: readonly [{
|
|
514
|
-
readonly name: "sponsor";
|
|
515
|
-
readonly type: "address";
|
|
516
|
-
readonly internalType: "address";
|
|
517
|
-
}, {
|
|
518
|
-
readonly name: "recordIndex";
|
|
519
|
-
readonly type: "uint96";
|
|
520
|
-
readonly internalType: "uint96";
|
|
521
|
-
}, {
|
|
522
|
-
readonly name: "token";
|
|
523
|
-
readonly type: "address";
|
|
524
|
-
readonly internalType: "contract IERC20";
|
|
525
|
-
}, {
|
|
526
|
-
readonly name: "amount";
|
|
527
|
-
readonly type: "uint128";
|
|
528
|
-
readonly internalType: "uint128";
|
|
529
|
-
}, {
|
|
530
|
-
readonly name: "expiry";
|
|
531
|
-
readonly type: "uint64";
|
|
532
|
-
readonly internalType: "uint64";
|
|
533
|
-
}, {
|
|
534
|
-
readonly name: "secretHash";
|
|
535
|
-
readonly type: "bytes32";
|
|
536
|
-
readonly internalType: "bytes32";
|
|
537
|
-
}, {
|
|
538
|
-
readonly name: "salt";
|
|
539
|
-
readonly type: "bytes32";
|
|
540
|
-
readonly internalType: "bytes32";
|
|
541
|
-
}, {
|
|
542
|
-
readonly name: "id";
|
|
543
|
-
readonly type: "string";
|
|
544
|
-
readonly internalType: "string";
|
|
545
|
-
}];
|
|
546
|
-
readonly stateMutability: "view";
|
|
547
|
-
}, {
|
|
548
|
-
readonly type: "function";
|
|
549
|
-
readonly name: "eip712Domain";
|
|
550
|
-
readonly inputs: readonly [];
|
|
551
|
-
readonly outputs: readonly [{
|
|
552
|
-
readonly name: "fields";
|
|
553
|
-
readonly type: "bytes1";
|
|
554
|
-
readonly internalType: "bytes1";
|
|
555
|
-
}, {
|
|
556
|
-
readonly name: "name";
|
|
557
|
-
readonly type: "string";
|
|
558
|
-
readonly internalType: "string";
|
|
559
|
-
}, {
|
|
560
|
-
readonly name: "version";
|
|
561
|
-
readonly type: "string";
|
|
562
|
-
readonly internalType: "string";
|
|
563
|
-
}, {
|
|
564
|
-
readonly name: "chainId";
|
|
565
|
-
readonly type: "uint256";
|
|
566
|
-
readonly internalType: "uint256";
|
|
567
|
-
}, {
|
|
568
|
-
readonly name: "verifyingContract";
|
|
569
|
-
readonly type: "address";
|
|
570
|
-
readonly internalType: "address";
|
|
571
|
-
}, {
|
|
572
|
-
readonly name: "salt";
|
|
573
|
-
readonly type: "bytes32";
|
|
574
|
-
readonly internalType: "bytes32";
|
|
575
|
-
}, {
|
|
576
|
-
readonly name: "extensions";
|
|
577
|
-
readonly type: "uint256[]";
|
|
578
|
-
readonly internalType: "uint256[]";
|
|
579
|
-
}];
|
|
580
|
-
readonly stateMutability: "view";
|
|
581
|
-
}, {
|
|
582
|
-
readonly type: "function";
|
|
583
|
-
readonly name: "liveClaimAddrsById";
|
|
584
|
-
readonly inputs: readonly [{
|
|
585
|
-
readonly name: "id";
|
|
586
|
-
readonly type: "string";
|
|
587
|
-
readonly internalType: "string";
|
|
588
|
-
}];
|
|
589
|
-
readonly outputs: readonly [{
|
|
590
|
-
readonly name: "";
|
|
591
|
-
readonly type: "address[]";
|
|
592
|
-
readonly internalType: "address[]";
|
|
593
|
-
}];
|
|
594
|
-
readonly stateMutability: "view";
|
|
595
|
-
}, {
|
|
596
|
-
readonly type: "function";
|
|
597
|
-
readonly name: "liveDropCountById";
|
|
598
|
-
readonly inputs: readonly [{
|
|
599
|
-
readonly name: "id";
|
|
600
|
-
readonly type: "string";
|
|
601
|
-
readonly internalType: "string";
|
|
602
|
-
}];
|
|
603
|
-
readonly outputs: readonly [{
|
|
604
|
-
readonly name: "";
|
|
605
|
-
readonly type: "uint256";
|
|
606
|
-
readonly internalType: "uint256";
|
|
607
|
-
}];
|
|
608
|
-
readonly stateMutability: "view";
|
|
609
|
-
}, {
|
|
610
|
-
readonly type: "function";
|
|
611
|
-
readonly name: "liveDropsById";
|
|
612
|
-
readonly inputs: readonly [{
|
|
613
|
-
readonly name: "id";
|
|
614
|
-
readonly type: "string";
|
|
615
|
-
readonly internalType: "string";
|
|
616
|
-
}];
|
|
617
|
-
readonly outputs: readonly [{
|
|
618
|
-
readonly name: "claimAddrs";
|
|
619
|
-
readonly type: "address[]";
|
|
620
|
-
readonly internalType: "address[]";
|
|
621
|
-
}, {
|
|
622
|
-
readonly name: "records";
|
|
623
|
-
readonly type: "tuple[]";
|
|
624
|
-
readonly internalType: "struct SafeDrop.Drop[]";
|
|
625
|
-
readonly components: readonly [{
|
|
626
|
-
readonly name: "sponsor";
|
|
627
|
-
readonly type: "address";
|
|
628
|
-
readonly internalType: "address";
|
|
629
|
-
}, {
|
|
630
|
-
readonly name: "recordIndex";
|
|
631
|
-
readonly type: "uint96";
|
|
632
|
-
readonly internalType: "uint96";
|
|
633
|
-
}, {
|
|
634
|
-
readonly name: "token";
|
|
635
|
-
readonly type: "address";
|
|
636
|
-
readonly internalType: "contract IERC20";
|
|
637
|
-
}, {
|
|
638
|
-
readonly name: "amount";
|
|
639
|
-
readonly type: "uint128";
|
|
640
|
-
readonly internalType: "uint128";
|
|
641
|
-
}, {
|
|
642
|
-
readonly name: "expiry";
|
|
643
|
-
readonly type: "uint64";
|
|
644
|
-
readonly internalType: "uint64";
|
|
645
|
-
}, {
|
|
646
|
-
readonly name: "secretHash";
|
|
647
|
-
readonly type: "bytes32";
|
|
648
|
-
readonly internalType: "bytes32";
|
|
649
|
-
}, {
|
|
650
|
-
readonly name: "salt";
|
|
651
|
-
readonly type: "bytes32";
|
|
652
|
-
readonly internalType: "bytes32";
|
|
653
|
-
}, {
|
|
654
|
-
readonly name: "id";
|
|
655
|
-
readonly type: "string";
|
|
656
|
-
readonly internalType: "string";
|
|
657
|
-
}];
|
|
658
|
-
}];
|
|
659
|
-
readonly stateMutability: "view";
|
|
660
|
-
}, {
|
|
661
|
-
readonly type: "function";
|
|
662
|
-
readonly name: "refund";
|
|
663
|
-
readonly inputs: readonly [{
|
|
664
|
-
readonly name: "claimAddr";
|
|
665
|
-
readonly type: "address";
|
|
666
|
-
readonly internalType: "address";
|
|
667
|
-
}];
|
|
668
|
-
readonly outputs: readonly [];
|
|
669
|
-
readonly stateMutability: "nonpayable";
|
|
670
|
-
}, {
|
|
671
|
-
readonly type: "function";
|
|
672
|
-
readonly name: "unclaimedCountOf";
|
|
673
|
-
readonly inputs: readonly [{
|
|
674
|
-
readonly name: "sponsor";
|
|
675
|
-
readonly type: "address";
|
|
676
|
-
readonly internalType: "address";
|
|
677
|
-
}];
|
|
678
|
-
readonly outputs: readonly [{
|
|
679
|
-
readonly name: "";
|
|
680
|
-
readonly type: "uint256";
|
|
681
|
-
readonly internalType: "uint256";
|
|
682
|
-
}];
|
|
683
|
-
readonly stateMutability: "view";
|
|
684
|
-
}, {
|
|
685
|
-
readonly type: "function";
|
|
686
|
-
readonly name: "unclaimedDepositsOf";
|
|
687
|
-
readonly inputs: readonly [{
|
|
688
|
-
readonly name: "sponsor";
|
|
689
|
-
readonly type: "address";
|
|
690
|
-
readonly internalType: "address";
|
|
691
|
-
}];
|
|
692
|
-
readonly outputs: readonly [{
|
|
693
|
-
readonly name: "records";
|
|
694
|
-
readonly type: "tuple[]";
|
|
695
|
-
readonly internalType: "struct SafeDrop.DepositRecord[]";
|
|
696
|
-
readonly components: readonly [{
|
|
697
|
-
readonly name: "claimAddr";
|
|
698
|
-
readonly type: "address";
|
|
699
|
-
readonly internalType: "address";
|
|
700
|
-
}, {
|
|
701
|
-
readonly name: "token";
|
|
702
|
-
readonly type: "address";
|
|
703
|
-
readonly internalType: "contract IERC20";
|
|
704
|
-
}, {
|
|
705
|
-
readonly name: "amount";
|
|
706
|
-
readonly type: "uint128";
|
|
707
|
-
readonly internalType: "uint128";
|
|
708
|
-
}, {
|
|
709
|
-
readonly name: "expiry";
|
|
710
|
-
readonly type: "uint64";
|
|
711
|
-
readonly internalType: "uint64";
|
|
712
|
-
}, {
|
|
713
|
-
readonly name: "secretHash";
|
|
714
|
-
readonly type: "bytes32";
|
|
715
|
-
readonly internalType: "bytes32";
|
|
716
|
-
}, {
|
|
717
|
-
readonly name: "id";
|
|
718
|
-
readonly type: "string";
|
|
719
|
-
readonly internalType: "string";
|
|
720
|
-
}];
|
|
721
|
-
}];
|
|
722
|
-
readonly stateMutability: "view";
|
|
723
|
-
}, {
|
|
724
|
-
readonly type: "function";
|
|
725
|
-
readonly name: "unclaimedIndexesOf";
|
|
726
|
-
readonly inputs: readonly [{
|
|
727
|
-
readonly name: "sponsor";
|
|
728
|
-
readonly type: "address";
|
|
729
|
-
readonly internalType: "address";
|
|
730
|
-
}];
|
|
731
|
-
readonly outputs: readonly [{
|
|
732
|
-
readonly name: "";
|
|
733
|
-
readonly type: "uint256[]";
|
|
734
|
-
readonly internalType: "uint256[]";
|
|
735
|
-
}];
|
|
736
|
-
readonly stateMutability: "view";
|
|
737
|
-
}, {
|
|
738
|
-
readonly type: "function";
|
|
739
|
-
readonly name: "withdraw";
|
|
740
|
-
readonly inputs: readonly [{
|
|
741
|
-
readonly name: "recipient";
|
|
742
|
-
readonly type: "address";
|
|
743
|
-
readonly internalType: "address";
|
|
744
|
-
}, {
|
|
745
|
-
readonly name: "id";
|
|
746
|
-
readonly type: "string";
|
|
747
|
-
readonly internalType: "string";
|
|
748
|
-
}, {
|
|
749
|
-
readonly name: "salt";
|
|
750
|
-
readonly type: "bytes32";
|
|
751
|
-
readonly internalType: "bytes32";
|
|
752
|
-
}, {
|
|
753
|
-
readonly name: "signature";
|
|
754
|
-
readonly type: "bytes";
|
|
755
|
-
readonly internalType: "bytes";
|
|
756
|
-
}, {
|
|
757
|
-
readonly name: "secret";
|
|
758
|
-
readonly type: "bytes";
|
|
759
|
-
readonly internalType: "bytes";
|
|
760
|
-
}];
|
|
761
|
-
readonly outputs: readonly [];
|
|
762
|
-
readonly stateMutability: "nonpayable";
|
|
763
|
-
}, {
|
|
764
|
-
readonly type: "event";
|
|
765
|
-
readonly name: "Deposited";
|
|
766
|
-
readonly inputs: readonly [{
|
|
767
|
-
readonly name: "claimAddr";
|
|
768
|
-
readonly type: "address";
|
|
769
|
-
readonly indexed: true;
|
|
770
|
-
readonly internalType: "address";
|
|
771
|
-
}, {
|
|
772
|
-
readonly name: "sponsor";
|
|
773
|
-
readonly type: "address";
|
|
774
|
-
readonly indexed: true;
|
|
775
|
-
readonly internalType: "address";
|
|
776
|
-
}, {
|
|
777
|
-
readonly name: "token";
|
|
778
|
-
readonly type: "address";
|
|
779
|
-
readonly indexed: true;
|
|
780
|
-
readonly internalType: "address";
|
|
781
|
-
}, {
|
|
782
|
-
readonly name: "amount";
|
|
783
|
-
readonly type: "uint256";
|
|
784
|
-
readonly indexed: false;
|
|
785
|
-
readonly internalType: "uint256";
|
|
786
|
-
}, {
|
|
787
|
-
readonly name: "id";
|
|
788
|
-
readonly type: "string";
|
|
789
|
-
readonly indexed: false;
|
|
790
|
-
readonly internalType: "string";
|
|
791
|
-
}, {
|
|
792
|
-
readonly name: "expiry";
|
|
793
|
-
readonly type: "uint64";
|
|
794
|
-
readonly indexed: false;
|
|
795
|
-
readonly internalType: "uint64";
|
|
796
|
-
}, {
|
|
797
|
-
readonly name: "secretHash";
|
|
798
|
-
readonly type: "bytes32";
|
|
799
|
-
readonly indexed: false;
|
|
800
|
-
readonly internalType: "bytes32";
|
|
801
|
-
}];
|
|
802
|
-
readonly anonymous: false;
|
|
803
|
-
}, {
|
|
804
|
-
readonly type: "event";
|
|
805
|
-
readonly name: "EIP712DomainChanged";
|
|
806
|
-
readonly inputs: readonly [];
|
|
807
|
-
readonly anonymous: false;
|
|
808
|
-
}, {
|
|
809
|
-
readonly type: "event";
|
|
810
|
-
readonly name: "Refunded";
|
|
811
|
-
readonly inputs: readonly [{
|
|
812
|
-
readonly name: "claimAddr";
|
|
813
|
-
readonly type: "address";
|
|
814
|
-
readonly indexed: true;
|
|
815
|
-
readonly internalType: "address";
|
|
816
|
-
}, {
|
|
817
|
-
readonly name: "sponsor";
|
|
818
|
-
readonly type: "address";
|
|
819
|
-
readonly indexed: true;
|
|
820
|
-
readonly internalType: "address";
|
|
821
|
-
}, {
|
|
822
|
-
readonly name: "id";
|
|
823
|
-
readonly type: "string";
|
|
824
|
-
readonly indexed: false;
|
|
825
|
-
readonly internalType: "string";
|
|
826
|
-
}, {
|
|
827
|
-
readonly name: "amount";
|
|
828
|
-
readonly type: "uint256";
|
|
829
|
-
readonly indexed: false;
|
|
830
|
-
readonly internalType: "uint256";
|
|
831
|
-
}];
|
|
832
|
-
readonly anonymous: false;
|
|
833
|
-
}, {
|
|
834
|
-
readonly type: "event";
|
|
835
|
-
readonly name: "Withdrawn";
|
|
836
|
-
readonly inputs: readonly [{
|
|
837
|
-
readonly name: "claimAddr";
|
|
838
|
-
readonly type: "address";
|
|
839
|
-
readonly indexed: true;
|
|
840
|
-
readonly internalType: "address";
|
|
841
|
-
}, {
|
|
842
|
-
readonly name: "recipient";
|
|
843
|
-
readonly type: "address";
|
|
844
|
-
readonly indexed: true;
|
|
845
|
-
readonly internalType: "address";
|
|
846
|
-
}, {
|
|
847
|
-
readonly name: "sponsor";
|
|
848
|
-
readonly type: "address";
|
|
849
|
-
readonly indexed: true;
|
|
850
|
-
readonly internalType: "address";
|
|
851
|
-
}, {
|
|
852
|
-
readonly name: "id";
|
|
853
|
-
readonly type: "string";
|
|
854
|
-
readonly indexed: false;
|
|
855
|
-
readonly internalType: "string";
|
|
856
|
-
}, {
|
|
857
|
-
readonly name: "amount";
|
|
858
|
-
readonly type: "uint256";
|
|
859
|
-
readonly indexed: false;
|
|
860
|
-
readonly internalType: "uint256";
|
|
861
|
-
}];
|
|
862
|
-
readonly anonymous: false;
|
|
863
|
-
}, {
|
|
864
|
-
readonly type: "error";
|
|
865
|
-
readonly name: "AmountOverflow";
|
|
866
|
-
readonly inputs: readonly [];
|
|
867
|
-
}, {
|
|
868
|
-
readonly type: "error";
|
|
869
|
-
readonly name: "DropAlreadyExists";
|
|
870
|
-
readonly inputs: readonly [];
|
|
871
|
-
}, {
|
|
872
|
-
readonly type: "error";
|
|
873
|
-
readonly name: "DropExpired";
|
|
874
|
-
readonly inputs: readonly [];
|
|
875
|
-
}, {
|
|
876
|
-
readonly type: "error";
|
|
877
|
-
readonly name: "DropNotExpired";
|
|
878
|
-
readonly inputs: readonly [];
|
|
879
|
-
}, {
|
|
880
|
-
readonly type: "error";
|
|
881
|
-
readonly name: "DropNotFound";
|
|
882
|
-
readonly inputs: readonly [];
|
|
883
|
-
}, {
|
|
884
|
-
readonly type: "error";
|
|
885
|
-
readonly name: "DuplicateDropForId";
|
|
886
|
-
readonly inputs: readonly [];
|
|
887
|
-
}, {
|
|
888
|
-
readonly type: "error";
|
|
889
|
-
readonly name: "ECDSAInvalidSignature";
|
|
890
|
-
readonly inputs: readonly [];
|
|
891
|
-
}, {
|
|
892
|
-
readonly type: "error";
|
|
893
|
-
readonly name: "ECDSAInvalidSignatureLength";
|
|
894
|
-
readonly inputs: readonly [{
|
|
895
|
-
readonly name: "length";
|
|
896
|
-
readonly type: "uint256";
|
|
897
|
-
readonly internalType: "uint256";
|
|
898
|
-
}];
|
|
899
|
-
}, {
|
|
900
|
-
readonly type: "error";
|
|
901
|
-
readonly name: "ECDSAInvalidSignatureS";
|
|
902
|
-
readonly inputs: readonly [{
|
|
903
|
-
readonly name: "s";
|
|
904
|
-
readonly type: "bytes32";
|
|
905
|
-
readonly internalType: "bytes32";
|
|
906
|
-
}];
|
|
907
|
-
}, {
|
|
908
|
-
readonly type: "error";
|
|
909
|
-
readonly name: "EmptyId";
|
|
910
|
-
readonly inputs: readonly [];
|
|
911
|
-
}, {
|
|
912
|
-
readonly type: "error";
|
|
913
|
-
readonly name: "IdMismatch";
|
|
914
|
-
readonly inputs: readonly [];
|
|
915
|
-
}, {
|
|
916
|
-
readonly type: "error";
|
|
917
|
-
readonly name: "InvalidShortString";
|
|
918
|
-
readonly inputs: readonly [];
|
|
919
|
-
}, {
|
|
920
|
-
readonly type: "error";
|
|
921
|
-
readonly name: "NotSponsor";
|
|
922
|
-
readonly inputs: readonly [];
|
|
923
|
-
}, {
|
|
924
|
-
readonly type: "error";
|
|
925
|
-
readonly name: "ReentrancyGuardReentrantCall";
|
|
926
|
-
readonly inputs: readonly [];
|
|
927
|
-
}, {
|
|
928
|
-
readonly type: "error";
|
|
929
|
-
readonly name: "SafeERC20FailedOperation";
|
|
930
|
-
readonly inputs: readonly [{
|
|
931
|
-
readonly name: "token";
|
|
932
|
-
readonly type: "address";
|
|
933
|
-
readonly internalType: "address";
|
|
934
|
-
}];
|
|
935
|
-
}, {
|
|
936
|
-
readonly type: "error";
|
|
937
|
-
readonly name: "SaltMismatch";
|
|
938
|
-
readonly inputs: readonly [];
|
|
939
|
-
}, {
|
|
940
|
-
readonly type: "error";
|
|
941
|
-
readonly name: "SecretMismatch";
|
|
942
|
-
readonly inputs: readonly [];
|
|
943
|
-
}, {
|
|
944
|
-
readonly type: "error";
|
|
945
|
-
readonly name: "StringTooLong";
|
|
946
|
-
readonly inputs: readonly [{
|
|
947
|
-
readonly name: "str";
|
|
948
|
-
readonly type: "string";
|
|
949
|
-
readonly internalType: "string";
|
|
950
|
-
}];
|
|
951
|
-
}, {
|
|
952
|
-
readonly type: "error";
|
|
953
|
-
readonly name: "ZeroAmount";
|
|
954
|
-
readonly inputs: readonly [];
|
|
955
|
-
}, {
|
|
956
|
-
readonly type: "error";
|
|
957
|
-
readonly name: "ZeroClaimAddress";
|
|
958
|
-
readonly inputs: readonly [];
|
|
959
|
-
}, {
|
|
960
|
-
readonly type: "error";
|
|
961
|
-
readonly name: "ZeroRecipient";
|
|
962
|
-
readonly inputs: readonly [];
|
|
963
|
-
}, {
|
|
964
|
-
readonly type: "error";
|
|
965
|
-
readonly name: "ZeroToken";
|
|
966
|
-
readonly inputs: readonly [];
|
|
967
|
-
}];
|
|
221
|
+
leaderboardMe: string;
|
|
222
|
+
/** GET — 내 온체인 이벤트 히스토리 (Bearer JWT). */
|
|
223
|
+
histories: string;
|
|
224
|
+
/** GET/POST/DELETE — X 연결 (Bearer JWT). */
|
|
225
|
+
xConnections: string;
|
|
226
|
+
/** POST — 일괄 수령 validator 서명 (Bearer JWT). */
|
|
227
|
+
batchClaimSignature: string;
|
|
228
|
+
feedbacks: string;
|
|
229
|
+
revealYou: string;
|
|
230
|
+
recipientChangeSignature: string;
|
|
231
|
+
recipientResetSignature: string;
|
|
232
|
+
/** GET — SSE 알림 스트림. pop은 구독하지 않는다(앱이 EventSource로 직접). */
|
|
233
|
+
eventsSubscribe: string;
|
|
234
|
+
}
|
|
235
|
+
declare const DEFAULT_POP_API_PATHS: PopApiPaths;
|
|
236
|
+
/** 환경변수(override → 환경 식별)로 one-pop-api base URL을 결정한다. */
|
|
237
|
+
declare function getOnePopApiBaseUrl(): string;
|
|
238
|
+
/** 환경변수(override → 기본)로 cross-auth base URL을 결정한다. */
|
|
239
|
+
declare function getCrossAuthBaseUrl(): string;
|
|
968
240
|
|
|
969
241
|
/**
|
|
970
|
-
*
|
|
971
|
-
*
|
|
972
|
-
*
|
|
973
|
-
*
|
|
974
|
-
*
|
|
975
|
-
*
|
|
976
|
-
*
|
|
977
|
-
*
|
|
978
|
-
*
|
|
979
|
-
* aee5b003 validatorClaimDigest(address,string,uint256,uint256)
|
|
980
|
-
* dc4d9bff validatorNonceById(bytes32) ← id는 **해시**로 키잉
|
|
981
|
-
* a730b8c5 withdrawByValidator(address,string,uint256,uint256,uint256,bytes)
|
|
982
|
-
* 0d14a67d ValidatorSigExpired()
|
|
983
|
-
* dcf5a899 InvalidValidatorNonce()
|
|
984
|
-
*
|
|
985
|
-
* eth_call로 확인한 검증 순서: deadline → nonce → 서명(ECDSA).
|
|
986
|
-
* `maxCount`는 **서명 대상이 아니다** — 그래서 서명 1건으로 페이지네이션을 계속
|
|
987
|
-
* 재사용할 수 있다(openapi 설명과 일치). 온체인 상한은 없고 가스가 한계다.
|
|
242
|
+
* one-pop-api HTTP 어댑터. 스키마: packages/pop/src/infrastructure/openapi.json
|
|
243
|
+
* POST /wallets (Bearer JWT) → {address}
|
|
244
|
+
* POST /wallets/private-key (oauth_token 본문) → {address,private_key}
|
|
245
|
+
* GET /drops (Bearer JWT) → 수령 인박스
|
|
246
|
+
* GET /envelopes (공개) → 카드 디자인
|
|
247
|
+
* GET /leaderboards?token= (공개) → pending 상위
|
|
248
|
+
* GET /histories (Bearer JWT) → 온체인 이벤트
|
|
249
|
+
* GET|POST|DELETE /x-connections (Bearer JWT) → X 연결
|
|
250
|
+
* POST /batch-claim-signature (Bearer JWT) → ValidatorClaim 서명
|
|
988
251
|
*
|
|
989
|
-
*
|
|
990
|
-
*
|
|
991
|
-
* type = ValidatorClaim(address recipient,string id,uint256 nonce,uint256 deadline)
|
|
992
|
-
* → digest는 `validatorClaimDigest()`가 온체인에서 그대로 돌려주므로, 로컬에서
|
|
993
|
-
* 재조립하지 말고 그 값을 읽어 쓴다(백엔드와의 불일치를 가스 전에 잡는다).
|
|
252
|
+
* base URL은 미지정 시 환경변수로 결정(getOnePopApiBaseUrl).
|
|
253
|
+
* wei-scale 값은 응답의 10진 문자열 → BigInt로 변환해 내보낸다(CLAUDE.md §4).
|
|
994
254
|
*/
|
|
255
|
+
interface HttpSafeDropApiAdapterOptions {
|
|
256
|
+
/** 미지정 시 환경변수(VITE_/NEXT_PUBLIC_ONE_POP_*)로 결정. */
|
|
257
|
+
baseUrl?: string;
|
|
258
|
+
/** SIWE JWT 공급자. Bearer 인증이 필요한 모든 호출이 사용한다. */
|
|
259
|
+
getJwt?: () => string | undefined | Promise<string | undefined>;
|
|
260
|
+
/** 테스트/SSR용 fetch 주입. 기본 globalThis.fetch. */
|
|
261
|
+
fetchImpl?: typeof fetch;
|
|
262
|
+
/** 엔드포인트 경로 override. 기본 DEFAULT_POP_API_PATHS. */
|
|
263
|
+
paths?: Partial<PopApiPaths>;
|
|
264
|
+
}
|
|
265
|
+
declare class HttpSafeDropApiAdapter implements SafeDropApiPort {
|
|
266
|
+
private readonly baseUrl;
|
|
267
|
+
private readonly fetchImpl;
|
|
268
|
+
private readonly getJwt?;
|
|
269
|
+
private readonly paths;
|
|
270
|
+
constructor(options?: HttpSafeDropApiAdapterOptions);
|
|
271
|
+
createClaimWallet(params: {
|
|
272
|
+
sender: Address;
|
|
273
|
+
recipient: SocialIdentifier;
|
|
274
|
+
}): Promise<{
|
|
275
|
+
claimAddress: Address;
|
|
276
|
+
id: Id;
|
|
277
|
+
isMapped: boolean;
|
|
278
|
+
}>;
|
|
279
|
+
recordDropMetadata(params: {
|
|
280
|
+
txHash: Hex;
|
|
281
|
+
message?: string;
|
|
282
|
+
envelopeId?: string;
|
|
283
|
+
}): Promise<void>;
|
|
284
|
+
retrieveClaimKey(params: {
|
|
285
|
+
claimAddress: Address;
|
|
286
|
+
senderAddress: Address;
|
|
287
|
+
oauth: OAuthProof;
|
|
288
|
+
}): Promise<{
|
|
289
|
+
isMapped: true;
|
|
290
|
+
} | {
|
|
291
|
+
isMapped: false;
|
|
292
|
+
claimKey: Hex;
|
|
293
|
+
claimAddress: Address;
|
|
294
|
+
}>;
|
|
295
|
+
listDrops(params?: {
|
|
296
|
+
token?: Address;
|
|
297
|
+
}): Promise<DropInbox>;
|
|
298
|
+
listEnvelopes(params?: {
|
|
299
|
+
locale?: string;
|
|
300
|
+
}): Promise<readonly Envelope[]>;
|
|
301
|
+
getLeaderboard(params: {
|
|
302
|
+
token: Address;
|
|
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;
|
|
313
|
+
page?: number;
|
|
314
|
+
pageSize?: number;
|
|
315
|
+
}): Promise<HistoryPage>;
|
|
316
|
+
getXConnection(): Promise<XConnection | null>;
|
|
317
|
+
connectX(params: {
|
|
318
|
+
oauth: OAuthProof;
|
|
319
|
+
}): Promise<XConnection>;
|
|
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>;
|
|
340
|
+
requestBatchClaimSignature(params: {
|
|
341
|
+
id: Id;
|
|
342
|
+
oauth: OAuthProof;
|
|
343
|
+
nonce: bigint;
|
|
344
|
+
deadline: bigint;
|
|
345
|
+
}): Promise<BatchClaimSignature>;
|
|
346
|
+
private request;
|
|
347
|
+
}
|
|
348
|
+
|
|
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. */
|
|
995
353
|
declare const SAFEDROP_VALIDATOR_ABI: readonly [{
|
|
996
354
|
readonly type: "function";
|
|
997
355
|
readonly name: "validator";
|
|
@@ -1031,41 +389,6 @@ declare const SAFEDROP_VALIDATOR_ABI: readonly [{
|
|
|
1031
389
|
readonly outputs: readonly [{
|
|
1032
390
|
readonly type: "uint256";
|
|
1033
391
|
}];
|
|
1034
|
-
}, {
|
|
1035
|
-
readonly type: "function";
|
|
1036
|
-
readonly name: "withdrawByValidator";
|
|
1037
|
-
readonly stateMutability: "nonpayable";
|
|
1038
|
-
readonly inputs: readonly [{
|
|
1039
|
-
readonly name: "recipient";
|
|
1040
|
-
readonly type: "address";
|
|
1041
|
-
}, {
|
|
1042
|
-
readonly name: "id";
|
|
1043
|
-
readonly type: "string";
|
|
1044
|
-
}, {
|
|
1045
|
-
readonly name: "nonce";
|
|
1046
|
-
readonly type: "uint256";
|
|
1047
|
-
}, {
|
|
1048
|
-
readonly name: "deadline";
|
|
1049
|
-
readonly type: "uint256";
|
|
1050
|
-
}, {
|
|
1051
|
-
readonly name: "maxCount";
|
|
1052
|
-
readonly type: "uint256";
|
|
1053
|
-
}, {
|
|
1054
|
-
readonly name: "signature";
|
|
1055
|
-
readonly type: "bytes";
|
|
1056
|
-
}];
|
|
1057
|
-
readonly outputs: readonly [];
|
|
1058
|
-
}, {
|
|
1059
|
-
readonly type: "function";
|
|
1060
|
-
readonly name: "liveDropCountById";
|
|
1061
|
-
readonly stateMutability: "view";
|
|
1062
|
-
readonly inputs: readonly [{
|
|
1063
|
-
readonly name: "id";
|
|
1064
|
-
readonly type: "string";
|
|
1065
|
-
}];
|
|
1066
|
-
readonly outputs: readonly [{
|
|
1067
|
-
readonly type: "uint256";
|
|
1068
|
-
}];
|
|
1069
392
|
}, {
|
|
1070
393
|
readonly type: "function";
|
|
1071
394
|
readonly name: "claimedRecipientOf";
|
|
@@ -1093,6 +416,9 @@ declare const ONEPOP_ABI: readonly [{
|
|
|
1093
416
|
readonly name: "activeDropOf";
|
|
1094
417
|
readonly stateMutability: "view";
|
|
1095
418
|
readonly inputs: readonly [{
|
|
419
|
+
readonly name: "sponsor";
|
|
420
|
+
readonly type: "address";
|
|
421
|
+
}, {
|
|
1096
422
|
readonly name: "claimAddr";
|
|
1097
423
|
readonly type: "address";
|
|
1098
424
|
}];
|
|
@@ -1309,6 +635,39 @@ declare const ONEPOP_ABI: readonly [{
|
|
|
1309
635
|
readonly type: "bytes";
|
|
1310
636
|
}];
|
|
1311
637
|
readonly outputs: readonly [];
|
|
638
|
+
}, {
|
|
639
|
+
readonly type: "function";
|
|
640
|
+
readonly name: "withdrawUnmappedBatchByKeys";
|
|
641
|
+
readonly stateMutability: "nonpayable";
|
|
642
|
+
readonly inputs: readonly [{
|
|
643
|
+
readonly name: "recipient";
|
|
644
|
+
readonly type: "address";
|
|
645
|
+
}, {
|
|
646
|
+
readonly name: "id";
|
|
647
|
+
readonly type: "string";
|
|
648
|
+
}, {
|
|
649
|
+
readonly name: "anchorDropKey";
|
|
650
|
+
readonly type: "bytes32";
|
|
651
|
+
}, {
|
|
652
|
+
readonly name: "signature";
|
|
653
|
+
readonly type: "bytes";
|
|
654
|
+
}, {
|
|
655
|
+
readonly name: "secret";
|
|
656
|
+
readonly type: "bytes";
|
|
657
|
+
}, {
|
|
658
|
+
readonly name: "nonce";
|
|
659
|
+
readonly type: "uint256";
|
|
660
|
+
}, {
|
|
661
|
+
readonly name: "deadline";
|
|
662
|
+
readonly type: "uint256";
|
|
663
|
+
}, {
|
|
664
|
+
readonly name: "dropKeys";
|
|
665
|
+
readonly type: "bytes32[]";
|
|
666
|
+
}, {
|
|
667
|
+
readonly name: "validatorSignature";
|
|
668
|
+
readonly type: "bytes";
|
|
669
|
+
}];
|
|
670
|
+
readonly outputs: readonly [];
|
|
1312
671
|
}, {
|
|
1313
672
|
readonly type: "function";
|
|
1314
673
|
readonly name: "withdrawMapped";
|
|
@@ -1327,6 +686,15 @@ declare const ONEPOP_ABI: readonly [{
|
|
|
1327
686
|
readonly type: "uint256";
|
|
1328
687
|
}];
|
|
1329
688
|
readonly outputs: readonly [];
|
|
689
|
+
}, {
|
|
690
|
+
readonly type: "function";
|
|
691
|
+
readonly name: "batchWithdrawMapped";
|
|
692
|
+
readonly stateMutability: "nonpayable";
|
|
693
|
+
readonly inputs: readonly [{
|
|
694
|
+
readonly name: "dropKeys";
|
|
695
|
+
readonly type: "bytes32[]";
|
|
696
|
+
}];
|
|
697
|
+
readonly outputs: readonly [];
|
|
1330
698
|
}, {
|
|
1331
699
|
readonly type: "function";
|
|
1332
700
|
readonly name: "refund";
|
|
@@ -1347,6 +715,57 @@ declare const ONEPOP_ABI: readonly [{
|
|
|
1347
715
|
readonly outputs: readonly [{
|
|
1348
716
|
readonly type: "uint256";
|
|
1349
717
|
}];
|
|
718
|
+
}, {
|
|
719
|
+
readonly type: "function";
|
|
720
|
+
readonly name: "pendingRecipientChange";
|
|
721
|
+
readonly stateMutability: "view";
|
|
722
|
+
readonly inputs: readonly [{
|
|
723
|
+
readonly name: "idKey";
|
|
724
|
+
readonly type: "bytes32";
|
|
725
|
+
}];
|
|
726
|
+
readonly outputs: readonly [{
|
|
727
|
+
readonly name: "newRecipient";
|
|
728
|
+
readonly type: "address";
|
|
729
|
+
}];
|
|
730
|
+
}, {
|
|
731
|
+
readonly type: "function";
|
|
732
|
+
readonly name: "requestRecipientChange";
|
|
733
|
+
readonly stateMutability: "nonpayable";
|
|
734
|
+
readonly inputs: readonly [{
|
|
735
|
+
readonly name: "id";
|
|
736
|
+
readonly type: "string";
|
|
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 [{
|
|
747
|
+
readonly name: "id";
|
|
748
|
+
readonly type: "string";
|
|
749
|
+
}, {
|
|
750
|
+
readonly name: "nonce";
|
|
751
|
+
readonly type: "uint256";
|
|
752
|
+
}, {
|
|
753
|
+
readonly name: "deadline";
|
|
754
|
+
readonly type: "uint256";
|
|
755
|
+
}, {
|
|
756
|
+
readonly name: "validatorSignature";
|
|
757
|
+
readonly type: "bytes";
|
|
758
|
+
}];
|
|
759
|
+
readonly outputs: readonly [];
|
|
760
|
+
}, {
|
|
761
|
+
readonly type: "function";
|
|
762
|
+
readonly name: "cancelRecipientChange";
|
|
763
|
+
readonly stateMutability: "nonpayable";
|
|
764
|
+
readonly inputs: readonly [{
|
|
765
|
+
readonly name: "id";
|
|
766
|
+
readonly type: "string";
|
|
767
|
+
}];
|
|
768
|
+
readonly outputs: readonly [];
|
|
1350
769
|
}, {
|
|
1351
770
|
readonly type: "function";
|
|
1352
771
|
readonly name: "resetRecipient";
|
|
@@ -1365,6 +784,38 @@ declare const ONEPOP_ABI: readonly [{
|
|
|
1365
784
|
readonly type: "bytes";
|
|
1366
785
|
}];
|
|
1367
786
|
readonly outputs: 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";
|
|
794
|
+
readonly inputs: readonly [{
|
|
795
|
+
readonly name: "length";
|
|
796
|
+
readonly type: "uint256";
|
|
797
|
+
}];
|
|
798
|
+
}, {
|
|
799
|
+
readonly type: "error";
|
|
800
|
+
readonly name: "ECDSAInvalidSignatureS";
|
|
801
|
+
readonly inputs: readonly [{
|
|
802
|
+
readonly name: "s";
|
|
803
|
+
readonly type: "bytes32";
|
|
804
|
+
}];
|
|
805
|
+
}, {
|
|
806
|
+
readonly type: "error";
|
|
807
|
+
readonly name: "SafeERC20FailedOperation";
|
|
808
|
+
readonly inputs: readonly [{
|
|
809
|
+
readonly name: "token";
|
|
810
|
+
readonly type: "address";
|
|
811
|
+
}];
|
|
812
|
+
}, {
|
|
813
|
+
readonly type: "error";
|
|
814
|
+
readonly name: "StringTooLong";
|
|
815
|
+
readonly inputs: readonly [{
|
|
816
|
+
readonly name: "str";
|
|
817
|
+
readonly type: "string";
|
|
818
|
+
}];
|
|
1368
819
|
}];
|
|
1369
820
|
|
|
1370
821
|
/**
|
|
@@ -1405,18 +856,15 @@ interface CreateSafeDropClientOptions {
|
|
|
1405
856
|
/** SafeDrop 컨트랙트 주소. */
|
|
1406
857
|
contractAddress: Address;
|
|
1407
858
|
publicClient: PublicClient;
|
|
1408
|
-
/**
|
|
859
|
+
/** deposit/refund 서명용 연결 지갑. */
|
|
1409
860
|
walletClient: WalletClient;
|
|
1410
861
|
chain: Chain;
|
|
1411
862
|
/** withdraw 임시 지갑 client의 RPC transport. */
|
|
1412
863
|
transport?: Transport;
|
|
1413
|
-
/**
|
|
864
|
+
/** @deprecated Use transactionFees. */
|
|
1414
865
|
withdrawFees?: ViemSafeDropChainAdapterOptions['withdrawFees'];
|
|
1415
|
-
/**
|
|
1416
|
-
|
|
1417
|
-
* SafeDrop 배포본과 토큰 양쪽이 permit을 지원할 때만 켠다.
|
|
1418
|
-
*/
|
|
1419
|
-
permit?: boolean;
|
|
866
|
+
/** 모든 contract write의 EIP-1559/gas override. */
|
|
867
|
+
transactionFees?: ViemSafeDropChainAdapterOptions['transactionFees'];
|
|
1420
868
|
/** 수령 링크 base URL. */
|
|
1421
869
|
claimBaseUrl: string;
|
|
1422
870
|
/** one-pop-api 어댑터 옵션(baseUrl 미지정 시 환경변수). */
|
|
@@ -1511,4 +959,4 @@ declare class XAuthClient {
|
|
|
1511
959
|
}>;
|
|
1512
960
|
}
|
|
1513
961
|
|
|
1514
|
-
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 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 };
|