@sign-global/tokentable-core 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +72 -0
- package/dist/index.d.mts +314 -224
- package/dist/index.d.ts +314 -224
- package/dist/index.js +489 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +486 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -3
- package/src/constants/chain-config.ts +20 -3
- package/src/constants/network.ts +53 -0
- package/src/contracts/evm/AirdropService.ts +18 -13
- package/src/contracts/index.ts +3 -0
- package/src/contracts/solana/AirdropSignatureClient.ts +2 -13
- package/src/contracts/solana/SignatureAirdropService.ts +2 -14
- package/src/contracts/solana/SolanaContractClient.ts +2 -2
- package/src/contracts/sui/BaseDistributorClient.ts +162 -0
- package/src/contracts/sui/DistributorWithFeeClient.ts +102 -0
- package/src/contracts/sui/SignatureAirdropService.ts +59 -0
- package/src/contracts/sui/SuiContractClient.ts +181 -0
- package/src/contracts/sui/__tests__/SignatureAirdropService.test.ts +71 -0
- package/src/services/airdrop/index.ts +4 -1
- package/src/types/index.ts +34 -6
- package/src/utils/api-client.ts +2 -2
- package/src/utils/utils.ts +8 -3
- package/vitest.config.ts +14 -0
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { TonConnectUI } from '@tonconnect/ui-react';
|
|
|
8
8
|
export { TonConnectUI as TonWalletClient } from '@tonconnect/ui-react';
|
|
9
9
|
import { WalletContextState } from '@solana/wallet-adapter-react';
|
|
10
10
|
export { WalletContextState as SolanaWalletState } from '@solana/wallet-adapter-react';
|
|
11
|
+
import { Wallet as Wallet$1 } from '@mysten/wallet-standard';
|
|
12
|
+
export { Wallet as SuiWalletClient } from '@mysten/wallet-standard';
|
|
11
13
|
import * as tonapi_sdk_js from 'tonapi-sdk-js';
|
|
12
14
|
import { Api, Event } from 'tonapi-sdk-js';
|
|
13
15
|
import * as _ton_core from '@ton/core';
|
|
@@ -17,28 +19,251 @@ import { Wallet } from '@coral-xyz/anchor';
|
|
|
17
19
|
import * as _solana_spl_token from '@solana/spl-token';
|
|
18
20
|
import { Connection, PublicKey, Commitment, Transaction, Cluster } from '@solana/web3.js';
|
|
19
21
|
|
|
22
|
+
declare const mevmDevNet: {
|
|
23
|
+
blockExplorers: {
|
|
24
|
+
readonly etherscan: {
|
|
25
|
+
readonly name: "Arbiscan";
|
|
26
|
+
readonly url: "https://explorer.devnet.imola.movementlabs.xyz/";
|
|
27
|
+
};
|
|
28
|
+
readonly default: {
|
|
29
|
+
readonly name: "Arbiscan";
|
|
30
|
+
readonly url: "https://explorer.devnet.imola.movementlabs.xyz/";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
contracts: {
|
|
34
|
+
readonly multicall3: {
|
|
35
|
+
readonly address: "0xD67Eca381AAbd0c049554f5714E7d8C21864c560";
|
|
36
|
+
readonly blockCreated: 500;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
id: 30732;
|
|
40
|
+
name: "Movement M1 Devnet";
|
|
41
|
+
nativeCurrency: {
|
|
42
|
+
readonly name: "Move";
|
|
43
|
+
readonly symbol: "MOVE";
|
|
44
|
+
readonly decimals: 18;
|
|
45
|
+
};
|
|
46
|
+
rpcUrls: {
|
|
47
|
+
readonly default: {
|
|
48
|
+
readonly http: readonly ["https://mevm.devnet.imola.movementlabs.xyz"];
|
|
49
|
+
};
|
|
50
|
+
readonly public: {
|
|
51
|
+
readonly http: readonly ["https://mevm.devnet.imola.movementlabs.xyz"];
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
sourceId?: number | undefined | undefined;
|
|
55
|
+
testnet?: boolean | undefined | undefined;
|
|
56
|
+
custom?: Record<string, unknown> | undefined;
|
|
57
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
58
|
+
formatters?: undefined;
|
|
59
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
60
|
+
readonly network: "mevm";
|
|
61
|
+
};
|
|
62
|
+
declare const tonTestNet: {
|
|
63
|
+
id: CHAIN;
|
|
64
|
+
name: string;
|
|
65
|
+
network: string;
|
|
66
|
+
nativeCurrency: {
|
|
67
|
+
decimals: number;
|
|
68
|
+
name: string;
|
|
69
|
+
symbol: string;
|
|
70
|
+
};
|
|
71
|
+
rpcUrls: {
|
|
72
|
+
public: {
|
|
73
|
+
http: never[];
|
|
74
|
+
};
|
|
75
|
+
default: {
|
|
76
|
+
http: never[];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
blockExplorers: {
|
|
80
|
+
default: {
|
|
81
|
+
name: string;
|
|
82
|
+
url: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
testnet: boolean;
|
|
86
|
+
};
|
|
87
|
+
declare const tonMainNet: {
|
|
88
|
+
id: CHAIN;
|
|
89
|
+
name: string;
|
|
90
|
+
network: string;
|
|
91
|
+
nativeCurrency: {
|
|
92
|
+
decimals: number;
|
|
93
|
+
name: string;
|
|
94
|
+
symbol: string;
|
|
95
|
+
};
|
|
96
|
+
rpcUrls: {
|
|
97
|
+
public: {
|
|
98
|
+
http: never[];
|
|
99
|
+
};
|
|
100
|
+
default: {
|
|
101
|
+
http: never[];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
blockExplorers: {
|
|
105
|
+
default: {
|
|
106
|
+
name: string;
|
|
107
|
+
url: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
declare const solanaDevNet: {
|
|
112
|
+
id: string;
|
|
113
|
+
name: string;
|
|
114
|
+
network: string;
|
|
115
|
+
nativeCurrency: {
|
|
116
|
+
decimals: number;
|
|
117
|
+
name: string;
|
|
118
|
+
symbol: string;
|
|
119
|
+
};
|
|
120
|
+
rpcUrls: {
|
|
121
|
+
public: {
|
|
122
|
+
http: string[];
|
|
123
|
+
};
|
|
124
|
+
default: {
|
|
125
|
+
http: string[];
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
blockExplorers: {
|
|
129
|
+
default: {
|
|
130
|
+
name: string;
|
|
131
|
+
url: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
testnet: boolean;
|
|
135
|
+
};
|
|
136
|
+
declare const solanaMainNet: {
|
|
137
|
+
id: string;
|
|
138
|
+
name: string;
|
|
139
|
+
network: string;
|
|
140
|
+
nativeCurrency: {
|
|
141
|
+
decimals: number;
|
|
142
|
+
name: string;
|
|
143
|
+
symbol: string;
|
|
144
|
+
};
|
|
145
|
+
rpcUrls: {
|
|
146
|
+
public: {
|
|
147
|
+
http: string[];
|
|
148
|
+
};
|
|
149
|
+
default: {
|
|
150
|
+
http: string[];
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
blockExplorers: {
|
|
154
|
+
default: {
|
|
155
|
+
name: string;
|
|
156
|
+
url: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
testnet: boolean;
|
|
160
|
+
};
|
|
161
|
+
declare const signBrBTestnet: {
|
|
162
|
+
blockExplorers: {
|
|
163
|
+
readonly default: {
|
|
164
|
+
readonly name: "Sign Brb Testnet Explorer";
|
|
165
|
+
readonly url: "http://3.85.129.93:8001/";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
contracts?: {
|
|
169
|
+
[x: string]: viem.ChainContract | {
|
|
170
|
+
[sourceId: number]: viem.ChainContract | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
ensRegistry?: viem.ChainContract | undefined;
|
|
173
|
+
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
174
|
+
multicall3?: viem.ChainContract | undefined;
|
|
175
|
+
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
176
|
+
} | undefined;
|
|
177
|
+
id: 74460001;
|
|
178
|
+
name: "Sign Brb Testnet";
|
|
179
|
+
nativeCurrency: {
|
|
180
|
+
readonly decimals: 18;
|
|
181
|
+
readonly name: "BNB Token";
|
|
182
|
+
readonly symbol: "BNB";
|
|
183
|
+
};
|
|
184
|
+
rpcUrls: {
|
|
185
|
+
readonly default: {
|
|
186
|
+
readonly http: readonly ["https://brb-testnet-rpc-0.bk.sign.global/"];
|
|
187
|
+
};
|
|
188
|
+
readonly public: {
|
|
189
|
+
readonly http: readonly ["https://brb-testnet-rpc-0.bk.sign.global/"];
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
sourceId?: number | undefined | undefined;
|
|
193
|
+
testnet: true;
|
|
194
|
+
custom?: Record<string, unknown> | undefined;
|
|
195
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
196
|
+
formatters?: undefined;
|
|
197
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
198
|
+
readonly network: "Sign Brb Testnet";
|
|
199
|
+
};
|
|
200
|
+
declare const suiTestNet: {
|
|
201
|
+
id: string;
|
|
202
|
+
name: string;
|
|
203
|
+
network: string;
|
|
204
|
+
nativeCurrency: {
|
|
205
|
+
decimals: number;
|
|
206
|
+
name: string;
|
|
207
|
+
symbol: string;
|
|
208
|
+
};
|
|
209
|
+
rpcUrls: {
|
|
210
|
+
public: {
|
|
211
|
+
http: ("https://fullnode.mainnet.sui.io:443" | "https://fullnode.testnet.sui.io:443" | "https://fullnode.devnet.sui.io:443" | "http://127.0.0.1:9000")[];
|
|
212
|
+
};
|
|
213
|
+
default: {
|
|
214
|
+
http: ("https://fullnode.mainnet.sui.io:443" | "https://fullnode.testnet.sui.io:443" | "https://fullnode.devnet.sui.io:443" | "http://127.0.0.1:9000")[];
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
blockExplorers: {
|
|
218
|
+
default: {
|
|
219
|
+
name: string;
|
|
220
|
+
url: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
testnet: boolean;
|
|
224
|
+
};
|
|
225
|
+
declare const suiMainNet: {
|
|
226
|
+
id: string;
|
|
227
|
+
name: string;
|
|
228
|
+
network: string;
|
|
229
|
+
nativeCurrency: {
|
|
230
|
+
decimals: number;
|
|
231
|
+
name: string;
|
|
232
|
+
symbol: string;
|
|
233
|
+
};
|
|
234
|
+
rpcUrls: {
|
|
235
|
+
public: {
|
|
236
|
+
http: ("https://fullnode.mainnet.sui.io:443" | "https://fullnode.testnet.sui.io:443" | "https://fullnode.devnet.sui.io:443" | "http://127.0.0.1:9000")[];
|
|
237
|
+
};
|
|
238
|
+
default: {
|
|
239
|
+
http: ("https://fullnode.mainnet.sui.io:443" | "https://fullnode.testnet.sui.io:443" | "https://fullnode.devnet.sui.io:443" | "http://127.0.0.1:9000")[];
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
blockExplorers: {
|
|
243
|
+
default: {
|
|
244
|
+
name: string;
|
|
245
|
+
url: string;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
testnet: boolean;
|
|
249
|
+
};
|
|
250
|
+
|
|
20
251
|
declare const ChainConfig: {
|
|
21
|
-
[
|
|
252
|
+
[solanaDevNet.id]: {
|
|
22
253
|
contractAddress: string;
|
|
23
254
|
rpcUrl: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
tonApiPrefix?: undefined;
|
|
27
|
-
blockExplorer?: undefined;
|
|
28
|
-
} | {
|
|
255
|
+
};
|
|
256
|
+
[solanaMainNet.id]: {
|
|
29
257
|
contractAddress: string;
|
|
30
258
|
rpcUrl: string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
tonApiPrefix?: undefined;
|
|
34
|
-
blockExplorer?: undefined;
|
|
35
|
-
} | {
|
|
36
|
-
name: string;
|
|
259
|
+
};
|
|
260
|
+
[suiTestNet.id]: {
|
|
37
261
|
contractAddress: string;
|
|
38
|
-
rpcUrl:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
262
|
+
rpcUrl: "https://fullnode.mainnet.sui.io:443" | "https://fullnode.testnet.sui.io:443" | "https://fullnode.devnet.sui.io:443" | "http://127.0.0.1:9000";
|
|
263
|
+
};
|
|
264
|
+
[suiMainNet.id]: {
|
|
265
|
+
contractAddress: string;
|
|
266
|
+
rpcUrl: "https://fullnode.mainnet.sui.io:443" | "https://fullnode.testnet.sui.io:443" | "https://fullnode.devnet.sui.io:443" | "http://127.0.0.1:9000";
|
|
42
267
|
};
|
|
43
268
|
1: {
|
|
44
269
|
contractAddress: string;
|
|
@@ -74,7 +299,7 @@ declare const ChainConfig: {
|
|
|
74
299
|
};
|
|
75
300
|
42161: {
|
|
76
301
|
contractAddress: string;
|
|
77
|
-
rpcUrl:
|
|
302
|
+
rpcUrl: string;
|
|
78
303
|
};
|
|
79
304
|
80085: {
|
|
80
305
|
contractAddress: string;
|
|
@@ -146,8 +371,8 @@ declare const SupportedChains: ({
|
|
|
146
371
|
readonly http: readonly ["https://mevm.devnet.imola.movementlabs.xyz"];
|
|
147
372
|
};
|
|
148
373
|
};
|
|
149
|
-
sourceId?: number | undefined;
|
|
150
|
-
testnet?: boolean | undefined;
|
|
374
|
+
sourceId?: number | undefined | undefined;
|
|
375
|
+
testnet?: boolean | undefined | undefined;
|
|
151
376
|
custom?: Record<string, unknown> | undefined;
|
|
152
377
|
fees?: viem.ChainFees<undefined> | undefined;
|
|
153
378
|
formatters?: undefined;
|
|
@@ -183,16 +408,15 @@ declare const SupportedChains: ({
|
|
|
183
408
|
readonly url: "http://3.85.129.93:8001/";
|
|
184
409
|
};
|
|
185
410
|
};
|
|
186
|
-
contracts?:
|
|
187
|
-
[
|
|
411
|
+
contracts?: {
|
|
412
|
+
[x: string]: viem.ChainContract | {
|
|
188
413
|
[sourceId: number]: viem.ChainContract | undefined;
|
|
189
414
|
} | undefined;
|
|
190
|
-
} & {
|
|
191
415
|
ensRegistry?: viem.ChainContract | undefined;
|
|
192
416
|
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
193
417
|
multicall3?: viem.ChainContract | undefined;
|
|
194
418
|
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
195
|
-
}
|
|
419
|
+
} | undefined;
|
|
196
420
|
id: 74460001;
|
|
197
421
|
name: "Sign Brb Testnet";
|
|
198
422
|
nativeCurrency: {
|
|
@@ -208,7 +432,7 @@ declare const SupportedChains: ({
|
|
|
208
432
|
readonly http: readonly ["https://brb-testnet-rpc-0.bk.sign.global/"];
|
|
209
433
|
};
|
|
210
434
|
};
|
|
211
|
-
sourceId?: number | undefined;
|
|
435
|
+
sourceId?: number | undefined | undefined;
|
|
212
436
|
testnet: true;
|
|
213
437
|
custom?: Record<string, unknown> | undefined;
|
|
214
438
|
fees?: viem.ChainFees<undefined> | undefined;
|
|
@@ -1161,186 +1385,6 @@ declare const SupportedChains: ({
|
|
|
1161
1385
|
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1162
1386
|
})[];
|
|
1163
1387
|
|
|
1164
|
-
declare const mevmDevNet: {
|
|
1165
|
-
blockExplorers: {
|
|
1166
|
-
readonly etherscan: {
|
|
1167
|
-
readonly name: "Arbiscan";
|
|
1168
|
-
readonly url: "https://explorer.devnet.imola.movementlabs.xyz/";
|
|
1169
|
-
};
|
|
1170
|
-
readonly default: {
|
|
1171
|
-
readonly name: "Arbiscan";
|
|
1172
|
-
readonly url: "https://explorer.devnet.imola.movementlabs.xyz/";
|
|
1173
|
-
};
|
|
1174
|
-
};
|
|
1175
|
-
contracts: {
|
|
1176
|
-
readonly multicall3: {
|
|
1177
|
-
readonly address: "0xD67Eca381AAbd0c049554f5714E7d8C21864c560";
|
|
1178
|
-
readonly blockCreated: 500;
|
|
1179
|
-
};
|
|
1180
|
-
};
|
|
1181
|
-
id: 30732;
|
|
1182
|
-
name: "Movement M1 Devnet";
|
|
1183
|
-
nativeCurrency: {
|
|
1184
|
-
readonly name: "Move";
|
|
1185
|
-
readonly symbol: "MOVE";
|
|
1186
|
-
readonly decimals: 18;
|
|
1187
|
-
};
|
|
1188
|
-
rpcUrls: {
|
|
1189
|
-
readonly default: {
|
|
1190
|
-
readonly http: readonly ["https://mevm.devnet.imola.movementlabs.xyz"];
|
|
1191
|
-
};
|
|
1192
|
-
readonly public: {
|
|
1193
|
-
readonly http: readonly ["https://mevm.devnet.imola.movementlabs.xyz"];
|
|
1194
|
-
};
|
|
1195
|
-
};
|
|
1196
|
-
sourceId?: number | undefined;
|
|
1197
|
-
testnet?: boolean | undefined;
|
|
1198
|
-
custom?: Record<string, unknown> | undefined;
|
|
1199
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1200
|
-
formatters?: undefined;
|
|
1201
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1202
|
-
readonly network: "mevm";
|
|
1203
|
-
};
|
|
1204
|
-
declare const tonTestNet: {
|
|
1205
|
-
id: CHAIN;
|
|
1206
|
-
name: string;
|
|
1207
|
-
network: string;
|
|
1208
|
-
nativeCurrency: {
|
|
1209
|
-
decimals: number;
|
|
1210
|
-
name: string;
|
|
1211
|
-
symbol: string;
|
|
1212
|
-
};
|
|
1213
|
-
rpcUrls: {
|
|
1214
|
-
public: {
|
|
1215
|
-
http: never[];
|
|
1216
|
-
};
|
|
1217
|
-
default: {
|
|
1218
|
-
http: never[];
|
|
1219
|
-
};
|
|
1220
|
-
};
|
|
1221
|
-
blockExplorers: {
|
|
1222
|
-
default: {
|
|
1223
|
-
name: string;
|
|
1224
|
-
url: string;
|
|
1225
|
-
};
|
|
1226
|
-
};
|
|
1227
|
-
testnet: boolean;
|
|
1228
|
-
};
|
|
1229
|
-
declare const tonMainNet: {
|
|
1230
|
-
id: CHAIN;
|
|
1231
|
-
name: string;
|
|
1232
|
-
network: string;
|
|
1233
|
-
nativeCurrency: {
|
|
1234
|
-
decimals: number;
|
|
1235
|
-
name: string;
|
|
1236
|
-
symbol: string;
|
|
1237
|
-
};
|
|
1238
|
-
rpcUrls: {
|
|
1239
|
-
public: {
|
|
1240
|
-
http: never[];
|
|
1241
|
-
};
|
|
1242
|
-
default: {
|
|
1243
|
-
http: never[];
|
|
1244
|
-
};
|
|
1245
|
-
};
|
|
1246
|
-
blockExplorers: {
|
|
1247
|
-
default: {
|
|
1248
|
-
name: string;
|
|
1249
|
-
url: string;
|
|
1250
|
-
};
|
|
1251
|
-
};
|
|
1252
|
-
};
|
|
1253
|
-
declare const solanaDevNet: {
|
|
1254
|
-
id: string;
|
|
1255
|
-
name: string;
|
|
1256
|
-
network: string;
|
|
1257
|
-
nativeCurrency: {
|
|
1258
|
-
decimals: number;
|
|
1259
|
-
name: string;
|
|
1260
|
-
symbol: string;
|
|
1261
|
-
};
|
|
1262
|
-
rpcUrls: {
|
|
1263
|
-
public: {
|
|
1264
|
-
http: string[];
|
|
1265
|
-
};
|
|
1266
|
-
default: {
|
|
1267
|
-
http: string[];
|
|
1268
|
-
};
|
|
1269
|
-
};
|
|
1270
|
-
blockExplorers: {
|
|
1271
|
-
default: {
|
|
1272
|
-
name: string;
|
|
1273
|
-
url: string;
|
|
1274
|
-
};
|
|
1275
|
-
};
|
|
1276
|
-
testnet: boolean;
|
|
1277
|
-
};
|
|
1278
|
-
declare const solanaMainNet: {
|
|
1279
|
-
id: string;
|
|
1280
|
-
name: string;
|
|
1281
|
-
network: string;
|
|
1282
|
-
nativeCurrency: {
|
|
1283
|
-
decimals: number;
|
|
1284
|
-
name: string;
|
|
1285
|
-
symbol: string;
|
|
1286
|
-
};
|
|
1287
|
-
rpcUrls: {
|
|
1288
|
-
public: {
|
|
1289
|
-
http: string[];
|
|
1290
|
-
};
|
|
1291
|
-
default: {
|
|
1292
|
-
http: string[];
|
|
1293
|
-
};
|
|
1294
|
-
};
|
|
1295
|
-
blockExplorers: {
|
|
1296
|
-
default: {
|
|
1297
|
-
name: string;
|
|
1298
|
-
url: string;
|
|
1299
|
-
};
|
|
1300
|
-
};
|
|
1301
|
-
testnet: boolean;
|
|
1302
|
-
};
|
|
1303
|
-
declare const signBrBTestnet: {
|
|
1304
|
-
blockExplorers: {
|
|
1305
|
-
readonly default: {
|
|
1306
|
-
readonly name: "Sign Brb Testnet Explorer";
|
|
1307
|
-
readonly url: "http://3.85.129.93:8001/";
|
|
1308
|
-
};
|
|
1309
|
-
};
|
|
1310
|
-
contracts?: viem.Prettify<{
|
|
1311
|
-
[key: string]: viem.ChainContract | {
|
|
1312
|
-
[sourceId: number]: viem.ChainContract | undefined;
|
|
1313
|
-
} | undefined;
|
|
1314
|
-
} & {
|
|
1315
|
-
ensRegistry?: viem.ChainContract | undefined;
|
|
1316
|
-
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
1317
|
-
multicall3?: viem.ChainContract | undefined;
|
|
1318
|
-
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
1319
|
-
}> | undefined;
|
|
1320
|
-
id: 74460001;
|
|
1321
|
-
name: "Sign Brb Testnet";
|
|
1322
|
-
nativeCurrency: {
|
|
1323
|
-
readonly decimals: 18;
|
|
1324
|
-
readonly name: "BNB Token";
|
|
1325
|
-
readonly symbol: "BNB";
|
|
1326
|
-
};
|
|
1327
|
-
rpcUrls: {
|
|
1328
|
-
readonly default: {
|
|
1329
|
-
readonly http: readonly ["https://brb-testnet-rpc-0.bk.sign.global/"];
|
|
1330
|
-
};
|
|
1331
|
-
readonly public: {
|
|
1332
|
-
readonly http: readonly ["https://brb-testnet-rpc-0.bk.sign.global/"];
|
|
1333
|
-
};
|
|
1334
|
-
};
|
|
1335
|
-
sourceId?: number | undefined;
|
|
1336
|
-
testnet: true;
|
|
1337
|
-
custom?: Record<string, unknown> | undefined;
|
|
1338
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1339
|
-
formatters?: undefined;
|
|
1340
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1341
|
-
readonly network: "Sign Brb Testnet";
|
|
1342
|
-
};
|
|
1343
|
-
|
|
1344
1388
|
declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
1345
1389
|
declare const CONST: {
|
|
1346
1390
|
readonly TWITTER_AUTH_SUCCESS: "twitter:auth:success";
|
|
@@ -1424,7 +1468,7 @@ declare class AirdropService$2 {
|
|
|
1424
1468
|
getKycThreshold(): Promise<bigint>;
|
|
1425
1469
|
}
|
|
1426
1470
|
|
|
1427
|
-
declare class SignatureAirdropService$
|
|
1471
|
+
declare class SignatureAirdropService$2 {
|
|
1428
1472
|
options: EvmContractClientOption;
|
|
1429
1473
|
constructor(options: Omit<EvmContractClientOption, 'chain'>);
|
|
1430
1474
|
private get airdropClient();
|
|
@@ -1473,7 +1517,7 @@ declare class AirdropService$1 {
|
|
|
1473
1517
|
claim(data: IAirdropClaimData): Promise<string>;
|
|
1474
1518
|
}
|
|
1475
1519
|
|
|
1476
|
-
declare class SignatureAirdropService {
|
|
1520
|
+
declare class SignatureAirdropService$1 {
|
|
1477
1521
|
options: SolanaContractInfo;
|
|
1478
1522
|
constructor(options: SolanaContractInfo);
|
|
1479
1523
|
private get airdropClient();
|
|
@@ -1481,17 +1525,7 @@ declare class SignatureAirdropService {
|
|
|
1481
1525
|
getClaimFee(address: string, amount: bigint): Promise<bigint>;
|
|
1482
1526
|
batchFetchClaimed(userClaimIds: string[]): Promise<boolean[]>;
|
|
1483
1527
|
getPaused(): Promise<boolean>;
|
|
1484
|
-
claim(data:
|
|
1485
|
-
recipient: string;
|
|
1486
|
-
claimId: string;
|
|
1487
|
-
data: string;
|
|
1488
|
-
signature: string;
|
|
1489
|
-
extraData?: string;
|
|
1490
|
-
unlockingAt: number;
|
|
1491
|
-
value: string;
|
|
1492
|
-
hash: string;
|
|
1493
|
-
fees: string;
|
|
1494
|
-
}[], recipient?: string): Promise<string>;
|
|
1528
|
+
claim(data: ISignatureClaimData[], recipient?: string): Promise<string>;
|
|
1495
1529
|
}
|
|
1496
1530
|
|
|
1497
1531
|
declare enum CodeType$2 {
|
|
@@ -1711,6 +1745,38 @@ declare class AirdropService {
|
|
|
1711
1745
|
getClaimFee(address: string, amount: bigint): Promise<string>;
|
|
1712
1746
|
}
|
|
1713
1747
|
|
|
1748
|
+
interface SuiContractInfo {
|
|
1749
|
+
packageId: string;
|
|
1750
|
+
chainId?: 'testnet' | 'mainnet';
|
|
1751
|
+
walletClient: Wallet$1;
|
|
1752
|
+
coinType: string;
|
|
1753
|
+
distributorId?: string;
|
|
1754
|
+
chainRpc?: string;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
declare class SignatureAirdropService {
|
|
1758
|
+
options: SuiContractInfo;
|
|
1759
|
+
constructor(options: Omit<SuiContractInfo, 'packageId'>);
|
|
1760
|
+
private get baseDistributorClient();
|
|
1761
|
+
private get feeDistributorClient();
|
|
1762
|
+
getVersion(): Promise<string | undefined>;
|
|
1763
|
+
getClaimFee(address: string, amount: bigint): Promise<bigint>;
|
|
1764
|
+
batchFetchClaimed(userClaimIds: string[]): Promise<boolean[]>;
|
|
1765
|
+
getPaused(): Promise<any>;
|
|
1766
|
+
getContractInfo(): Promise<{
|
|
1767
|
+
startTime: any;
|
|
1768
|
+
endTime: any;
|
|
1769
|
+
signer: any;
|
|
1770
|
+
ownerCapId: any;
|
|
1771
|
+
version: string | undefined;
|
|
1772
|
+
feeCollector: any;
|
|
1773
|
+
token: any;
|
|
1774
|
+
tokenBalance: any;
|
|
1775
|
+
paused: any;
|
|
1776
|
+
}>;
|
|
1777
|
+
claim(data: ISignatureClaimData[], recipient?: string): Promise<string>;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1714
1780
|
type ChainId = keyof typeof ChainConfig;
|
|
1715
1781
|
interface EvmContractClientOption {
|
|
1716
1782
|
chainId: ChainId;
|
|
@@ -1723,7 +1789,8 @@ interface EvmContractClientOption {
|
|
|
1723
1789
|
declare enum ChainType {
|
|
1724
1790
|
Evm = "evm",
|
|
1725
1791
|
Ton = "ton",
|
|
1726
|
-
Solana = "solana"
|
|
1792
|
+
Solana = "solana",
|
|
1793
|
+
Sui = "sui"
|
|
1727
1794
|
}
|
|
1728
1795
|
type ThemeConfig = {
|
|
1729
1796
|
logo?: string;
|
|
@@ -1803,6 +1870,7 @@ type IAirdropClaim = {
|
|
|
1803
1870
|
data: string;
|
|
1804
1871
|
leaf: string;
|
|
1805
1872
|
claimed?: boolean;
|
|
1873
|
+
fees: string;
|
|
1806
1874
|
claimId?: string;
|
|
1807
1875
|
claimable?: boolean;
|
|
1808
1876
|
proofHash: string;
|
|
@@ -1812,9 +1880,13 @@ type IAirdropClaim = {
|
|
|
1812
1880
|
expired?: boolean;
|
|
1813
1881
|
project: IProject;
|
|
1814
1882
|
};
|
|
1883
|
+
interface IExtraData {
|
|
1884
|
+
isLegacy: boolean;
|
|
1885
|
+
attestationId: bigint;
|
|
1886
|
+
}
|
|
1815
1887
|
interface IAirdropClaimData extends IAirdropClaim {
|
|
1816
|
-
extraData
|
|
1817
|
-
value
|
|
1888
|
+
extraData?: IExtraData;
|
|
1889
|
+
value?: bigint | string;
|
|
1818
1890
|
}
|
|
1819
1891
|
type IAirdropSignatureClaim = {
|
|
1820
1892
|
percent: number;
|
|
@@ -1824,12 +1896,29 @@ type IAirdropSignatureClaim = {
|
|
|
1824
1896
|
recipient: string;
|
|
1825
1897
|
recipientType: string;
|
|
1826
1898
|
claimId: string;
|
|
1827
|
-
data?:
|
|
1899
|
+
data?: {
|
|
1900
|
+
claimableTimestamp: string;
|
|
1901
|
+
claimableAmount: string;
|
|
1902
|
+
};
|
|
1828
1903
|
signature?: string;
|
|
1829
1904
|
claimed?: boolean;
|
|
1830
1905
|
note: string;
|
|
1831
1906
|
fees: string;
|
|
1832
1907
|
};
|
|
1908
|
+
interface ISignatureClaimData {
|
|
1909
|
+
recipient: string;
|
|
1910
|
+
data: string | {
|
|
1911
|
+
claimableTimestamp: string;
|
|
1912
|
+
claimableAmount: string;
|
|
1913
|
+
};
|
|
1914
|
+
claimId: string;
|
|
1915
|
+
signature: string;
|
|
1916
|
+
extraData?: string;
|
|
1917
|
+
unlockingAt: number;
|
|
1918
|
+
value: string;
|
|
1919
|
+
fees: string;
|
|
1920
|
+
hash: string;
|
|
1921
|
+
}
|
|
1833
1922
|
interface IAirdropSignatureIdentity {
|
|
1834
1923
|
type: AirdropSigIdentityTypeEnum;
|
|
1835
1924
|
value: string;
|
|
@@ -1860,7 +1949,7 @@ declare enum EvmAirdropVersionEnum {
|
|
|
1860
1949
|
V3 = "0.3.0",// zeta 收费
|
|
1861
1950
|
V4 = "0.4.0"
|
|
1862
1951
|
}
|
|
1863
|
-
type IWalletClient = TonConnectUI | WalletClient | WalletContextState;
|
|
1952
|
+
type IWalletClient = TonConnectUI | WalletClient | WalletContextState | Wallet$1;
|
|
1864
1953
|
|
|
1865
1954
|
type IAirdropService = AirdropService | AirdropService$2;
|
|
1866
1955
|
type BaseAirdropOptions = {
|
|
@@ -2001,6 +2090,7 @@ interface WalletBindParams {
|
|
|
2001
2090
|
timestamp: number;
|
|
2002
2091
|
recipientType: string;
|
|
2003
2092
|
address: string;
|
|
2093
|
+
encodedMessage?: string;
|
|
2004
2094
|
}
|
|
2005
2095
|
declare const connectTwitter: (data: SocialConnectParams, baseURL?: string) => Promise<SidResponse>;
|
|
2006
2096
|
declare const connectGoogleApi: (data: SocialConnectParams, baseURL?: string) => Promise<SidResponse>;
|
|
@@ -2052,7 +2142,7 @@ declare function fetchTokenVersion(tokenAddress: string, options: FetchTokenMeta
|
|
|
2052
2142
|
declare const clusterApiUrl: (cluster?: Cluster) => string;
|
|
2053
2143
|
|
|
2054
2144
|
declare const getCustomNaNoId: () => string;
|
|
2055
|
-
declare const safeParseJSON: (str: string) =>
|
|
2145
|
+
declare const safeParseJSON: <T = any>(str: string | null | undefined, defaultValue?: T) => T;
|
|
2056
2146
|
declare const isBeforeByUnix: (unix: number) => boolean;
|
|
2057
2147
|
declare const delay: (ms: number) => Promise<unknown>;
|
|
2058
2148
|
declare function retry<T>(fn: () => Promise<T>, options: {
|
|
@@ -2101,4 +2191,4 @@ declare const getAvailableClaimAmountForSignature: ({ contractAddress, chainId,
|
|
|
2101
2191
|
}[];
|
|
2102
2192
|
}) => Promise<string | 0>;
|
|
2103
2193
|
|
|
2104
|
-
export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$2 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$
|
|
2194
|
+
export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$2 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$1 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, isBeforeByUnix, isGreaterThan, isMobile, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
|