@sign-global/tokentable 0.2.1 → 0.4.0-beta.1
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/.github/workflows/beta.yml +28 -0
- package/dist/cjs/airdrop/AirdropClient.d.ts +46 -0
- package/dist/cjs/airdrop/AirdropClient.js +244 -0
- package/dist/cjs/airdrop/AirdropClient.js.map +1 -0
- package/dist/cjs/airdrop/SignatureAirdropClient.d.ts +26 -0
- package/dist/cjs/airdrop/SignatureAirdropClient.js +109 -0
- package/dist/cjs/airdrop/SignatureAirdropClient.js.map +1 -0
- package/dist/cjs/airdrop/common/index.d.ts +1 -1
- package/dist/cjs/airdrop/constants/chain-config.js +1 -1
- package/dist/cjs/airdrop/constants/index.d.ts +4 -0
- package/dist/cjs/airdrop/constants/index.js +5 -1
- package/dist/cjs/airdrop/constants/index.js.map +1 -1
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/WalletBase.d.ts +32 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/WalletBase.js +71 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/WalletBase.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/WalletFactory.d.ts +8 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/WalletFactory.js +38 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/WalletFactory.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/index.d.ts +2 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/index.js +21 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/index.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/evm/EvmWallet.d.ts +26 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/evm/EvmWallet.js +70 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/evm/EvmWallet.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/evm/index.d.ts +9 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/evm/index.js +35 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/evm/index.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/index.d.ts +3 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/index.js +14 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/index.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/solana/index.d.ts +27 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/solana/index.js +119 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/solana/index.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/ton/TonWallet.d.ts +23 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/ton/TonWallet.js +117 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/ton/TonWallet.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/ton/index.d.ts +9 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/ton/index.js +29 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/providers/ton/index.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/types.d.ts +38 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/types.js +30 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/types.js.map +1 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/utils/index.d.ts +8 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/utils/index.js +41 -0
- package/dist/cjs/airdrop/core/useWeb3ConnectWallet/utils/index.js.map +1 -0
- package/dist/cjs/airdrop/index.d.ts +4 -46
- package/dist/cjs/airdrop/index.js +22 -244
- package/dist/cjs/airdrop/index.js.map +1 -1
- package/dist/cjs/airdrop/services/index.d.ts +15 -0
- package/dist/cjs/airdrop/services/index.js +16 -1
- package/dist/cjs/airdrop/services/index.js.map +1 -1
- package/dist/cjs/airdrop/types/index.d.ts +18 -6
- package/dist/cjs/airdrop/types/index.js +7 -1
- package/dist/cjs/airdrop/types/index.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +7 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/utils.d.ts +1 -0
- package/dist/cjs/utils/utils.js +2 -1
- package/dist/cjs/utils/utils.js.map +1 -1
- package/dist/esm/airdrop/AirdropClient.d.ts +46 -0
- package/dist/esm/airdrop/AirdropClient.js +240 -0
- package/dist/esm/airdrop/AirdropClient.js.map +1 -0
- package/dist/esm/airdrop/SignatureAirdropClient.d.ts +26 -0
- package/dist/esm/airdrop/SignatureAirdropClient.js +105 -0
- package/dist/esm/airdrop/SignatureAirdropClient.js.map +1 -0
- package/dist/esm/airdrop/common/index.d.ts +1 -1
- package/dist/esm/airdrop/constants/chain-config.js +1 -1
- package/dist/esm/airdrop/constants/index.d.ts +4 -0
- package/dist/esm/airdrop/constants/index.js +4 -0
- package/dist/esm/airdrop/constants/index.js.map +1 -1
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/WalletBase.d.ts +32 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/WalletBase.js +67 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/WalletBase.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/WalletFactory.d.ts +8 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/WalletFactory.js +34 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/WalletFactory.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/index.d.ts +2 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/index.js +3 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/index.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/evm/EvmWallet.d.ts +26 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/evm/EvmWallet.js +65 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/evm/EvmWallet.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/evm/index.d.ts +9 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/evm/index.js +29 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/evm/index.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/index.d.ts +3 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/index.js +5 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/index.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/solana/index.d.ts +27 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/solana/index.js +109 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/solana/index.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/ton/TonWallet.d.ts +23 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/ton/TonWallet.js +112 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/ton/TonWallet.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/ton/index.d.ts +9 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/ton/index.js +24 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/providers/ton/index.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/types.d.ts +38 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/types.js +27 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/types.js.map +1 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/utils/index.d.ts +8 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/utils/index.js +35 -0
- package/dist/esm/airdrop/core/useWeb3ConnectWallet/utils/index.js.map +1 -0
- package/dist/esm/airdrop/index.d.ts +4 -46
- package/dist/esm/airdrop/index.js +4 -242
- package/dist/esm/airdrop/index.js.map +1 -1
- package/dist/esm/airdrop/services/index.d.ts +15 -0
- package/dist/esm/airdrop/services/index.js +12 -0
- package/dist/esm/airdrop/services/index.js.map +1 -1
- package/dist/esm/airdrop/types/index.d.ts +18 -6
- package/dist/esm/airdrop/types/index.js +6 -0
- package/dist/esm/airdrop/types/index.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/utils.d.ts +1 -0
- package/dist/esm/utils/utils.js +1 -0
- package/dist/esm/utils/utils.js.map +1 -1
- package/package.json +15 -3
- package/src/airdrop/AirdropClient.ts +301 -0
- package/src/airdrop/SignatureAirdropClient.ts +120 -0
- package/src/airdrop/constants/chain-config.ts +1 -1
- package/src/airdrop/constants/index.ts +5 -0
- package/src/airdrop/core/useWeb3ConnectWallet/WalletBase.ts +92 -0
- package/src/airdrop/core/useWeb3ConnectWallet/WalletFactory.tsx +35 -0
- package/src/airdrop/core/useWeb3ConnectWallet/index.ts +3 -0
- package/src/airdrop/core/useWeb3ConnectWallet/providers/evm/EvmWallet.ts +90 -0
- package/src/airdrop/core/useWeb3ConnectWallet/providers/evm/index.tsx +43 -0
- package/src/airdrop/core/useWeb3ConnectWallet/providers/index.ts +4 -0
- package/src/airdrop/core/useWeb3ConnectWallet/providers/solana/index.tsx +141 -0
- package/src/airdrop/core/useWeb3ConnectWallet/providers/ton/TonWallet.ts +149 -0
- package/src/airdrop/core/useWeb3ConnectWallet/providers/ton/index.tsx +41 -0
- package/src/airdrop/core/useWeb3ConnectWallet/types.ts +45 -0
- package/src/airdrop/core/useWeb3ConnectWallet/utils/index.ts +61 -0
- package/src/airdrop/index.ts +4 -309
- package/src/airdrop/services/index.ts +29 -1
- package/src/airdrop/tests/index.test.ts +5 -8
- package/src/airdrop/types/index.ts +22 -6
- package/src/index.ts +9 -1
- package/src/utils/utils.ts +2 -0
- package/tsconfig.json +2 -2
|
@@ -1,46 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
private tonClient?;
|
|
6
|
-
private slug?;
|
|
7
|
-
private projectId?;
|
|
8
|
-
private endpoint?;
|
|
9
|
-
private project;
|
|
10
|
-
protected claims?: IAirdropClaim[];
|
|
11
|
-
private projectPromise;
|
|
12
|
-
private claimHook;
|
|
13
|
-
private contractConfig;
|
|
14
|
-
constructor(params: IAirdropOptions);
|
|
15
|
-
setTonClient(tonClient: TonClient): void;
|
|
16
|
-
private getTonClient;
|
|
17
|
-
private fetchProjectFromSlug;
|
|
18
|
-
private fetchProjectDetails;
|
|
19
|
-
protected initializeProjects(address?: string): Promise<void>;
|
|
20
|
-
getProjectInfo(): Promise<IProject>;
|
|
21
|
-
getAirdropClaims(data: {
|
|
22
|
-
address: string;
|
|
23
|
-
}): Promise<IAirdropClaim[]>;
|
|
24
|
-
getStrategy(walletClient?: IWalletClient): Promise<IAirdropStrategy>;
|
|
25
|
-
private getClaimDataById;
|
|
26
|
-
setClaimHook(fn: (v: any) => any): void;
|
|
27
|
-
private getDefaultExtraData;
|
|
28
|
-
private calculateClaimFee;
|
|
29
|
-
claimAirdrop({ claimId, walletClient }: {
|
|
30
|
-
claimId: string;
|
|
31
|
-
walletClient: IWalletClient;
|
|
32
|
-
}, options?: {
|
|
33
|
-
onLoading?: () => void;
|
|
34
|
-
}): Promise<any>;
|
|
35
|
-
checkClaimed(claimId: string): Promise<boolean>;
|
|
36
|
-
private getContractConfig;
|
|
37
|
-
getVersion(): Promise<string>;
|
|
38
|
-
getPaused(): Promise<boolean>;
|
|
39
|
-
getClaimFee(amount?: bigint): Promise<string | bigint>;
|
|
40
|
-
batchCheckClaimed(): Promise<{
|
|
41
|
-
result: boolean;
|
|
42
|
-
status: string;
|
|
43
|
-
}[]>;
|
|
44
|
-
getNFT(): Promise<string>;
|
|
45
|
-
getKycThreshold(): Promise<bigint>;
|
|
46
|
-
}
|
|
1
|
+
export { AirdropClient } from './AirdropClient';
|
|
2
|
+
export { SignatureAirdropClient } from './SignatureAirdropClient';
|
|
3
|
+
export { CONST } from './constants';
|
|
4
|
+
export * from './core/useWeb3ConnectWallet';
|
|
@@ -1,243 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export class AirdropClient {
|
|
6
|
-
tonClient;
|
|
7
|
-
slug;
|
|
8
|
-
projectId;
|
|
9
|
-
endpoint;
|
|
10
|
-
project;
|
|
11
|
-
claims;
|
|
12
|
-
projectPromise;
|
|
13
|
-
claimHook;
|
|
14
|
-
contractConfig = null;
|
|
15
|
-
constructor(params) {
|
|
16
|
-
if ('slug' in params) {
|
|
17
|
-
this.slug = params.slug;
|
|
18
|
-
}
|
|
19
|
-
this.projectId = params.projectId;
|
|
20
|
-
this.endpoint = params.endpoint;
|
|
21
|
-
this.projectPromise = this.initializeProjects();
|
|
22
|
-
}
|
|
23
|
-
setTonClient(tonClient) {
|
|
24
|
-
this.tonClient = tonClient;
|
|
25
|
-
}
|
|
26
|
-
getTonClient() {
|
|
27
|
-
if (!this.tonClient) {
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
return this.tonClient;
|
|
31
|
-
}
|
|
32
|
-
// move
|
|
33
|
-
async fetchProjectFromSlug(address) {
|
|
34
|
-
if (!this.slug)
|
|
35
|
-
return undefined;
|
|
36
|
-
const res = await getAirdropProjectId({ recipient: address, slug: this.slug }, this.endpoint);
|
|
37
|
-
if (!res.projectIds?.length)
|
|
38
|
-
return undefined;
|
|
39
|
-
return res?.projectIds?.[0];
|
|
40
|
-
// const projectMap = res?.childProjectMapping || {};
|
|
41
|
-
// return getTonProjectIdByAddress({
|
|
42
|
-
// address,
|
|
43
|
-
// slug: this.slug,
|
|
44
|
-
// data: projectMap
|
|
45
|
-
// });
|
|
46
|
-
}
|
|
47
|
-
async fetchProjectDetails(projectId) {
|
|
48
|
-
this.project = await getAirdropProject(projectId, this.endpoint);
|
|
49
|
-
}
|
|
50
|
-
async initializeProjects(address) {
|
|
51
|
-
try {
|
|
52
|
-
let projectId = this.projectId;
|
|
53
|
-
// If slug is provided, try to fetch project ID from slug
|
|
54
|
-
if (!projectId && address) {
|
|
55
|
-
projectId = await this.fetchProjectFromSlug(address);
|
|
56
|
-
}
|
|
57
|
-
if (!projectId) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
// Fetch project details
|
|
61
|
-
await this.fetchProjectDetails(projectId);
|
|
62
|
-
}
|
|
63
|
-
catch (error) {
|
|
64
|
-
throw new Error(`Failed to initialize project: ${error.message}`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
async getProjectInfo() {
|
|
68
|
-
await this.projectPromise;
|
|
69
|
-
if (!this.project)
|
|
70
|
-
throw new Error('Project not found');
|
|
71
|
-
return this.project;
|
|
72
|
-
}
|
|
73
|
-
async getAirdropClaims(data) {
|
|
74
|
-
if (this.slug) {
|
|
75
|
-
await this.initializeProjects(data.address); // 根据地址
|
|
76
|
-
}
|
|
77
|
-
const project = await this.getProjectInfo();
|
|
78
|
-
const res = await getAirdropQuery({
|
|
79
|
-
recipient: data.address,
|
|
80
|
-
projectId: project.id,
|
|
81
|
-
recipientType: project.recipientType
|
|
82
|
-
}, this.endpoint);
|
|
83
|
-
const claimsRes = res.claims?.map((it) => ({
|
|
84
|
-
...it,
|
|
85
|
-
project: project,
|
|
86
|
-
claimId: project.chainType === ChainType.Evm ? `${project.id}:${it.leaf}` : `${project.id}:${it.index}`
|
|
87
|
-
}));
|
|
88
|
-
this.claims = claimsRes;
|
|
89
|
-
return this.claims;
|
|
90
|
-
}
|
|
91
|
-
async getStrategy(walletClient) {
|
|
92
|
-
const project = await this.getProjectInfo();
|
|
93
|
-
const version = this.contractConfig?.version || undefined;
|
|
94
|
-
const hasWallet = !!walletClient;
|
|
95
|
-
// Try to get cached strategy
|
|
96
|
-
let strategy = strategyCache.getStrategy(project.contractAddress, project.chainId, project.chainType, hasWallet);
|
|
97
|
-
if (!strategy) {
|
|
98
|
-
// Create new strategy if not cached
|
|
99
|
-
strategy = AirdropStrategyFactory.createStrategy({
|
|
100
|
-
chainType: project.chainType,
|
|
101
|
-
contractAddress: project.contractAddress,
|
|
102
|
-
chainId: project.chainId,
|
|
103
|
-
walletClient,
|
|
104
|
-
tonClient: this.getTonClient(),
|
|
105
|
-
version
|
|
106
|
-
});
|
|
107
|
-
// Initialize the strategy
|
|
108
|
-
await strategy.initialize(walletClient);
|
|
109
|
-
// Cache the initialized strategy
|
|
110
|
-
strategyCache.setStrategy(project.contractAddress, project.chainId, project.chainType, strategy, hasWallet);
|
|
111
|
-
}
|
|
112
|
-
else if (hasWallet) {
|
|
113
|
-
// If we have a wallet and the strategy exists, just initialize with the new wallet
|
|
114
|
-
await strategy.initialize(walletClient);
|
|
115
|
-
}
|
|
116
|
-
return strategy;
|
|
117
|
-
}
|
|
118
|
-
getClaimDataById(claimId) {
|
|
119
|
-
const claimData = this.claims?.find((it) => it.claimId === claimId);
|
|
120
|
-
if (!claimData)
|
|
121
|
-
throw new Error('Claim data not found');
|
|
122
|
-
return claimData;
|
|
123
|
-
}
|
|
124
|
-
setClaimHook(fn) {
|
|
125
|
-
this.claimHook = fn;
|
|
126
|
-
}
|
|
127
|
-
getDefaultExtraData() {
|
|
128
|
-
return {
|
|
129
|
-
isLegacy: true,
|
|
130
|
-
attestationId: BigInt(1)
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
async calculateClaimFee(project, claimAmount) {
|
|
134
|
-
if (project.chainType === ChainType.Evm) {
|
|
135
|
-
const version = await this.getVersion();
|
|
136
|
-
const isNativeFreeVersion = project.tokenType === ETokenType.Native &&
|
|
137
|
-
[EvmAirdropVersionEnum.V3, EvmAirdropVersionEnum.V4].includes(version);
|
|
138
|
-
return isNativeFreeVersion ? undefined : await this.getClaimFee(BigInt(claimAmount));
|
|
139
|
-
}
|
|
140
|
-
if (project.chainType === ChainType.Ton) {
|
|
141
|
-
return await this.getClaimFee(BigInt(claimAmount));
|
|
142
|
-
}
|
|
143
|
-
return undefined;
|
|
144
|
-
}
|
|
145
|
-
async claimAirdrop({ claimId, walletClient }, options) {
|
|
146
|
-
// Get claim data and initialize strategy
|
|
147
|
-
const claimData = this.getClaimDataById(claimId);
|
|
148
|
-
const strategy = await this.getStrategy(walletClient);
|
|
149
|
-
const project = await this.getProjectInfo();
|
|
150
|
-
// Process extra data
|
|
151
|
-
const extraData = project.chainType === ChainType.Ton
|
|
152
|
-
? undefined
|
|
153
|
-
: this.claimHook
|
|
154
|
-
? this.claimHook(claimData)
|
|
155
|
-
: this.getDefaultExtraData();
|
|
156
|
-
// Calculate claim value based on project type
|
|
157
|
-
const value = await this.calculateClaimFee(project, claimData.amount);
|
|
158
|
-
// Execute claim with processed data
|
|
159
|
-
return strategy.claim({
|
|
160
|
-
...claimData,
|
|
161
|
-
extraData,
|
|
162
|
-
value
|
|
163
|
-
}, options);
|
|
164
|
-
}
|
|
165
|
-
async checkClaimed(claimId) {
|
|
166
|
-
const claimData = this.getClaimDataById(claimId);
|
|
167
|
-
const strategy = await this.getStrategy();
|
|
168
|
-
return strategy.checkClaimed(claimData);
|
|
169
|
-
}
|
|
170
|
-
async getContractConfig() {
|
|
171
|
-
try {
|
|
172
|
-
const project = await this.getProjectInfo();
|
|
173
|
-
if (!this.contractConfig) {
|
|
174
|
-
this.contractConfig = await getAirdropContractConfig({
|
|
175
|
-
chainId: project.chainId,
|
|
176
|
-
chainType: project.chainType,
|
|
177
|
-
contractAddress: project.contractAddress
|
|
178
|
-
}, this.endpoint);
|
|
179
|
-
}
|
|
180
|
-
return this.contractConfig;
|
|
181
|
-
}
|
|
182
|
-
catch (error) {
|
|
183
|
-
console.error('Error fetching contract config:', error);
|
|
184
|
-
return null;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
async getVersion() {
|
|
188
|
-
const config = await this.getContractConfig();
|
|
189
|
-
if (config?.version) {
|
|
190
|
-
return config.version;
|
|
191
|
-
}
|
|
192
|
-
const strategy = await this.getStrategy();
|
|
193
|
-
return strategy.getVersion();
|
|
194
|
-
}
|
|
195
|
-
async getPaused() {
|
|
196
|
-
const config = await this.getContractConfig();
|
|
197
|
-
if (config && config?.paused !== null) {
|
|
198
|
-
return config.paused;
|
|
199
|
-
}
|
|
200
|
-
const strategy = await this.getStrategy();
|
|
201
|
-
if (!strategy.getPaused) {
|
|
202
|
-
throw new Error('getPaused is not supported for this chain');
|
|
203
|
-
}
|
|
204
|
-
return strategy.getPaused();
|
|
205
|
-
}
|
|
206
|
-
async getClaimFee(amount) {
|
|
207
|
-
const config = await this.getContractConfig();
|
|
208
|
-
if (config?.claimFee) {
|
|
209
|
-
return config.claimFee;
|
|
210
|
-
}
|
|
211
|
-
const strategy = await this.getStrategy();
|
|
212
|
-
if (!strategy.getClaimFee) {
|
|
213
|
-
throw new Error('getClaimFee is not supported for this chain');
|
|
214
|
-
}
|
|
215
|
-
return strategy.getClaimFee(this.project?.contractAddress || '', amount || BigInt(0));
|
|
216
|
-
}
|
|
217
|
-
// params claimId[]
|
|
218
|
-
async batchCheckClaimed() {
|
|
219
|
-
const strategy = await this.getStrategy();
|
|
220
|
-
if (!strategy.batchCheckClaimed) {
|
|
221
|
-
throw new Error('batchCheckClaimed is not supported for this chain');
|
|
222
|
-
}
|
|
223
|
-
const leafs = this.claims?.map((it) => it.leaf);
|
|
224
|
-
if (!leafs)
|
|
225
|
-
return [];
|
|
226
|
-
return strategy.batchCheckClaimed(leafs);
|
|
227
|
-
}
|
|
228
|
-
async getNFT() {
|
|
229
|
-
const strategy = await this.getStrategy();
|
|
230
|
-
if (!strategy.getNFT) {
|
|
231
|
-
throw new Error('getNFT is not supported for this chain');
|
|
232
|
-
}
|
|
233
|
-
return strategy.getNFT();
|
|
234
|
-
}
|
|
235
|
-
async getKycThreshold() {
|
|
236
|
-
const strategy = await this.getStrategy();
|
|
237
|
-
if (!strategy.getKycThreshold) {
|
|
238
|
-
throw new Error('getKycThreshold is not supported for this chain');
|
|
239
|
-
}
|
|
240
|
-
return strategy.getKycThreshold();
|
|
241
|
-
}
|
|
242
|
-
}
|
|
1
|
+
export { AirdropClient } from './AirdropClient';
|
|
2
|
+
export { SignatureAirdropClient } from './SignatureAirdropClient';
|
|
3
|
+
export { CONST } from './constants';
|
|
4
|
+
export * from './core/useWeb3ConnectWallet';
|
|
243
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/airdrop/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/airdrop/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,cAAc,6BAA6B,CAAC"}
|
|
@@ -26,3 +26,18 @@ export declare const getJettonInfo: (data: {
|
|
|
26
26
|
address: string;
|
|
27
27
|
isTestnet: "true" | "false";
|
|
28
28
|
}, baseURL?: string) => Promise<any>;
|
|
29
|
+
export declare const connectTwitter: (data: {
|
|
30
|
+
code: string;
|
|
31
|
+
redirectUri: string;
|
|
32
|
+
}, baseURL?: string) => Promise<unknown>;
|
|
33
|
+
export declare const checkEligibility: (data: {
|
|
34
|
+
projectId: string;
|
|
35
|
+
}, baseURL?: string) => Promise<unknown>;
|
|
36
|
+
export declare const bindWallet: (data: {
|
|
37
|
+
projectId: string;
|
|
38
|
+
key: string;
|
|
39
|
+
signature: string;
|
|
40
|
+
message: string;
|
|
41
|
+
timestamp: number;
|
|
42
|
+
recipientType: string;
|
|
43
|
+
}, baseURL?: string) => Promise<unknown>;
|
|
@@ -36,4 +36,16 @@ export const getJettonInfo = async (data, baseURL) => {
|
|
|
36
36
|
const client = createApiClient(baseURL);
|
|
37
37
|
return client.get(`/airdrop-open/jetton/${data.address}?isTestnet=${data.isTestnet}`);
|
|
38
38
|
};
|
|
39
|
+
export const connectTwitter = async (data, baseURL) => {
|
|
40
|
+
const client = createApiClient(baseURL);
|
|
41
|
+
return client.post('/airdrop-open/connect-twitter', data);
|
|
42
|
+
};
|
|
43
|
+
export const checkEligibility = async (data, baseURL) => {
|
|
44
|
+
const client = createApiClient(baseURL);
|
|
45
|
+
return client.post('/airdrop-open/check-eligibility', data);
|
|
46
|
+
};
|
|
47
|
+
export const bindWallet = async (data, baseURL) => {
|
|
48
|
+
const client = createApiClient(baseURL);
|
|
49
|
+
return client.post('/airdrop-open/connect-wallet', data);
|
|
50
|
+
};
|
|
39
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/airdrop/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC3C,OAAO,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,SAAiB,EAAE,OAAgB,EAAqB,EAAE;IAChG,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAM,0BAA0B,SAAS,EAAE,CAAC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ConnectUI } from '@tonconnect/ui-react';
|
|
2
2
|
import { AirdropService as TonAirdropService } from '../core/ton/AirdropService';
|
|
3
3
|
import { AirdropService as EvmAirdropService } from '../core/evm/AirdropService';
|
|
4
|
-
import { TonClient } from '@ton/ton';
|
|
5
4
|
import { ChainConfig } from '../constants';
|
|
6
5
|
import { WalletClient as ViemWalletClient } from 'viem';
|
|
7
6
|
export type ChainId = keyof typeof ChainConfig;
|
|
@@ -56,10 +55,24 @@ export interface IProject {
|
|
|
56
55
|
blockCountries: Record<string, string>;
|
|
57
56
|
themeConf: ThemeConfig | null;
|
|
58
57
|
version: string;
|
|
59
|
-
extra?:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
extra?: IProjectExtra;
|
|
59
|
+
identities: Identity[];
|
|
60
|
+
}
|
|
61
|
+
export interface Identity {
|
|
62
|
+
identityType: string;
|
|
63
|
+
authorizeUrl?: string;
|
|
64
|
+
}
|
|
65
|
+
export declare enum AirdropSigIdentityTypeEnum {
|
|
66
|
+
Twitter = "X Account",
|
|
67
|
+
SolanaWallet = "Solana Wallet",
|
|
68
|
+
EVMWallet = "EVM Wallet"
|
|
69
|
+
}
|
|
70
|
+
export interface IProjectExtra {
|
|
71
|
+
kyc: boolean;
|
|
72
|
+
tag: string;
|
|
73
|
+
seed: number;
|
|
74
|
+
signer: string;
|
|
75
|
+
identities: string[];
|
|
63
76
|
}
|
|
64
77
|
export declare enum ETokenType {
|
|
65
78
|
Erc20 = "ERC20",
|
|
@@ -103,7 +116,6 @@ export type IWalletClient = TonConnectUI | ViemWalletClient;
|
|
|
103
116
|
export type IAirdropService = TonAirdropService | EvmAirdropService;
|
|
104
117
|
type BaseAirdropOptions = {
|
|
105
118
|
endpoint?: string;
|
|
106
|
-
tonClient?: TonClient;
|
|
107
119
|
};
|
|
108
120
|
type ProjectIdOptions = BaseAirdropOptions & {
|
|
109
121
|
projectId: string;
|
|
@@ -3,6 +3,12 @@ export var ChainType;
|
|
|
3
3
|
ChainType["Evm"] = "evm";
|
|
4
4
|
ChainType["Ton"] = "ton";
|
|
5
5
|
})(ChainType || (ChainType = {}));
|
|
6
|
+
export var AirdropSigIdentityTypeEnum;
|
|
7
|
+
(function (AirdropSigIdentityTypeEnum) {
|
|
8
|
+
AirdropSigIdentityTypeEnum["Twitter"] = "X Account";
|
|
9
|
+
AirdropSigIdentityTypeEnum["SolanaWallet"] = "Solana Wallet";
|
|
10
|
+
AirdropSigIdentityTypeEnum["EVMWallet"] = "EVM Wallet";
|
|
11
|
+
})(AirdropSigIdentityTypeEnum || (AirdropSigIdentityTypeEnum = {}));
|
|
6
12
|
export var ETokenType;
|
|
7
13
|
(function (ETokenType) {
|
|
8
14
|
ETokenType["Erc20"] = "ERC20";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/airdrop/types/index.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,wBAAW,CAAA;AACb,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/airdrop/types/index.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,wBAAW,CAAA;AACb,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAqDD,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,mDAAqB,CAAA;IACrB,4DAA8B,CAAA;IAC9B,sDAAwB,CAAA;AAC1B,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAUD,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,6BAAe,CAAA;IACf,qCAAuB,CAAA;IACvB,4BAAc,CAAA;AAChB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AA6BD,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,qCAAY,CAAA;IACZ,qCAAY,CAAA;IACZ,0CAAiB,CAAA;IACjB,4CAAmB,CAAA;AACrB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,qCAAY,CAAA;IACZ,qCAAY,CAAA;IACZ,qCAAY,CAAA,CAAC,yBAAyB;AACxC,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AirdropClient } from './airdrop';
|
|
1
|
+
export { AirdropClient, SignatureAirdropClient, CONST, WalletFactory, EvmProvider, SolanaProvider, TonProvider } from './airdrop';
|
|
2
2
|
export * from './airdrop/types';
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,KAAK,EACL,aAAa,EACb,WAAW,EACX,cAAc,EACd,WAAW,EACZ,MAAM,WAAW,CAAC;AACnB,cAAc,iBAAiB,CAAC"}
|
package/dist/esm/utils/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAO,EAAE;IAChD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,C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": "0.4.0-beta.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -17,14 +17,25 @@
|
|
|
17
17
|
"author": "Evan",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@ethsign/utils-web": "^0.8.9",
|
|
20
21
|
"@orbs-network/ton-access": "^2.3.3",
|
|
22
|
+
"@rainbow-me/rainbowkit": "^2.2.3",
|
|
23
|
+
"@solana/wallet-adapter-react": "^0.15.35",
|
|
24
|
+
"@solana/wallet-adapter-react-ui": "^0.9.35",
|
|
25
|
+
"@solana/wallet-adapter-wallets": "^0.19.32",
|
|
26
|
+
"@solana/web3.js": "^1.98.0",
|
|
21
27
|
"@ton/core": "^0.59.0",
|
|
22
28
|
"@ton/ton": "^15.1.0",
|
|
23
|
-
"@tonconnect/ui
|
|
29
|
+
"@tonconnect/ui": "^2.0.11",
|
|
30
|
+
"@tonconnect/ui-react": "^2.0.11",
|
|
24
31
|
"@types/jest": "^29.5.14",
|
|
25
32
|
"bignumber.js": "^9.1.2",
|
|
33
|
+
"bs58": "^6.0.0",
|
|
26
34
|
"dayjs": "^1.11.13",
|
|
27
35
|
"jest": "^29.7.0",
|
|
36
|
+
"nanoid": "^5.0.9",
|
|
37
|
+
"react": "^19.0.0",
|
|
38
|
+
"ton-core": "^0.53.0",
|
|
28
39
|
"tonapi-sdk-js": "^2.0.3",
|
|
29
40
|
"tonweb": "^0.0.66",
|
|
30
41
|
"ts-jest": "^29.2.5",
|
|
@@ -32,7 +43,8 @@
|
|
|
32
43
|
"wagmi": "^2.13.0"
|
|
33
44
|
},
|
|
34
45
|
"devDependencies": {
|
|
46
|
+
"@types/react": "^19.0.8",
|
|
35
47
|
"bun-types": "latest",
|
|
36
48
|
"typescript": "^5.6.3"
|
|
37
49
|
}
|
|
38
|
-
}
|
|
50
|
+
}
|