@dropsy/airdrop 0.1.0 → 0.1.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/package.json +4 -3
- package/readme.md +52 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dropsy/airdrop",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Dropsy - The On-Chain Airdrop Protocol for Solana",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://
|
|
11
|
+
"homepage": "https://docs.dropsy.xyz/",
|
|
12
12
|
"repository": {
|
|
13
|
-
"url": "https://github.com/dropsy
|
|
13
|
+
"url": "https://github.com/scoolmb/dropsy-airdrop"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"test": "ts-node index.ts",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"typescript": "^5.8.3"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
+
"@solana-program/compute-budget": "^0.8.0",
|
|
52
53
|
"@solana-program/token": "^0.5.1",
|
|
53
54
|
"@solana/kit": "^2.1.1",
|
|
54
55
|
"merkletreejs": "^0.5.2"
|
package/readme.md
CHANGED
|
@@ -18,7 +18,33 @@ A modern client SDK for interacting with the **Dropsy Airdrop Protocol** on Sola
|
|
|
18
18
|
⚠️ Instruction formats may change without warning
|
|
19
19
|
⚠️ Devnet only - no mainnet support yet
|
|
20
20
|
|
|
21
|
-
## 🛠
|
|
21
|
+
## 🛠 What's New ??
|
|
22
|
+
|
|
23
|
+
New instructions :
|
|
24
|
+
|
|
25
|
+
1 - delegate_airdrop
|
|
26
|
+
This instruction allows a designated authority to manage airdrop allocations on behalf of the original distributor. It is particularly useful for delegating airdrop responsibilities to trusted parties or third-party services, enabling decentralized management of token distributions.
|
|
27
|
+
|
|
28
|
+
2 - update_airdrop
|
|
29
|
+
The update_airdrop instruction enables the modification of existing airdrop configurations. This includes updating the list of eligible recipients (via the Merkle root) and adjusting the timing (start/end dates).
|
|
30
|
+
This provides flexibility for creating Quest-based airdrops on top of Snapshot-based airdrops, delegated by third parties such as Quest platforms or NFT platforms.
|
|
31
|
+
|
|
32
|
+
update on airdrop Account :
|
|
33
|
+
Airdrop = {
|
|
34
|
+
discriminator: ReadonlyUint8Array;
|
|
35
|
+
authority: Address;
|
|
36
|
+
mint: Address;
|
|
37
|
+
controller: Address;
|
|
38
|
+
delegateAuthority: Address; // recently adedd
|
|
39
|
+
merkleRoot: Array<number>;
|
|
40
|
+
supply: bigint;
|
|
41
|
+
startsAt: bigint;
|
|
42
|
+
endsAt: bigint;
|
|
43
|
+
bitmapCount: number;
|
|
44
|
+
delegatePermissions: number; // recently adedd
|
|
45
|
+
version: number;
|
|
46
|
+
bump: number;
|
|
47
|
+
};
|
|
22
48
|
|
|
23
49
|
**📖 Interactive Documentation**
|
|
24
50
|
Full API docs with live examples
|
|
@@ -36,7 +62,7 @@ Command-line airdrop management
|
|
|
36
62
|
- **Program ID**: Subject to change
|
|
37
63
|
- **Roadmap**: Mainnet launch
|
|
38
64
|
|
|
39
|
-
> Full API documentation: [https://
|
|
65
|
+
> Full API documentation: [https://docs.dropsy.xyz/](https://docs.dropsy.xyz/)
|
|
40
66
|
|
|
41
67
|
## Installation
|
|
42
68
|
|
|
@@ -99,7 +125,29 @@ feeLamports: BigInt(5000), // The fee lamports others will pay when c using your
|
|
|
99
125
|
});
|
|
100
126
|
```
|
|
101
127
|
|
|
128
|
+
Get initialize airdrop instruction :
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
import * as dropsy from "@dropsy/airdrop";
|
|
132
|
+
|
|
133
|
+
// Create the instruction to initialize your controller
|
|
134
|
+
const ix = dropsy.getInitializeAirdropInstructionAsync({
|
|
135
|
+
authority: wallet, // signer (airdrop creator)
|
|
136
|
+
mint: mint, // token mint address
|
|
137
|
+
controller: controller, // controller ( fee collector )
|
|
138
|
+
merkleRoot: merkleRootArray, // merkle root as an array where all eligible wallets with amount
|
|
139
|
+
startsTime: null, // BigInt(.....) // time when the airdrop will start (default is now )
|
|
140
|
+
endTime: null, // BigInt(.....) // time when the airdrop will end (default is after 60 days )
|
|
141
|
+
});
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
checkout the init-airdrop.ts in the examples folder to discover how to create merkleRoot
|
|
145
|
+
|
|
102
146
|
## 📚 Documentation
|
|
103
147
|
|
|
104
|
-
Full API documentation is available at
|
|
105
|
-
👉 [https://
|
|
148
|
+
Full API documentation is available at
|
|
149
|
+
👉 [https://docs.dropsy.xyz/](https://docs.dropsy.xyz/)
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```
|