@dropsy/airdrop 0.0.3 → 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/dist/index.d.mts +535 -152
- package/dist/index.d.ts +535 -152
- package/dist/index.js +1470 -570
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1610 -665
- package/dist/index.mjs.map +1 -0
- package/package.json +57 -52
- package/readme.md +153 -0
- package/README.md +0 -30
package/package.json
CHANGED
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dropsy/airdrop",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"module": "./dist/index.mjs",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"publishConfig": {
|
|
9
|
-
"access": "public"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://
|
|
12
|
-
"repository": {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"build": "tsup"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"solana",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"solana
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"solana
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@dropsy/airdrop",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Dropsy - The On-Chain Airdrop Protocol for Solana",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://docs.dropsy.xyz/",
|
|
12
|
+
"repository": {
|
|
13
|
+
"url": "https://github.com/scoolmb/dropsy-airdrop"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "ts-node index.ts",
|
|
17
|
+
"build": "tsup"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"solana",
|
|
21
|
+
"solana airdrop",
|
|
22
|
+
"web3",
|
|
23
|
+
"create airdrop",
|
|
24
|
+
"solana web3",
|
|
25
|
+
"dropsy",
|
|
26
|
+
"solana devtools",
|
|
27
|
+
"token distribution",
|
|
28
|
+
"airdrop protocol",
|
|
29
|
+
"solana sdk",
|
|
30
|
+
"merkle airdrop",
|
|
31
|
+
"gasless airdrop",
|
|
32
|
+
"solana token launch",
|
|
33
|
+
"nft airdrop",
|
|
34
|
+
"decentralized distribution",
|
|
35
|
+
"solana-program-library",
|
|
36
|
+
"anchor program",
|
|
37
|
+
"spl token",
|
|
38
|
+
"solana crypto",
|
|
39
|
+
"airdrop automation",
|
|
40
|
+
"web3 rewards",
|
|
41
|
+
"solana developer tools"
|
|
42
|
+
],
|
|
43
|
+
"author": "MBK Official",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/node": "^22.15.29",
|
|
47
|
+
"tsup": "^8.5.0",
|
|
48
|
+
"typedoc": "^0.28.5",
|
|
49
|
+
"typescript": "^5.8.3"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@solana-program/compute-budget": "^0.8.0",
|
|
53
|
+
"@solana-program/token": "^0.5.1",
|
|
54
|
+
"@solana/kit": "^2.1.1",
|
|
55
|
+
"merkletreejs": "^0.5.2"
|
|
56
|
+
}
|
|
57
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# dropsy-airdrop beta
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@dropsy/airdrop)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://scoolmb.github.io/dropsy-airdrop/)
|
|
6
|
+
|
|
7
|
+
A modern client SDK for interacting with the **Dropsy Airdrop Protocol** on Solana, built with:
|
|
8
|
+
|
|
9
|
+
- ✅ TypeScript
|
|
10
|
+
- ⚙️ [tsup](https://github.com/egoist/tsup) for fast bundling
|
|
11
|
+
- 🔀 Dual CJS (`require`) and ESM (`import`) support
|
|
12
|
+
- 📦 Auto-generated type declarations
|
|
13
|
+
|
|
14
|
+
## 🚨 Important Notes
|
|
15
|
+
|
|
16
|
+
⚠️ This SDK is in active development
|
|
17
|
+
⚠️ All program addresses are temporary
|
|
18
|
+
⚠️ Instruction formats may change without warning
|
|
19
|
+
⚠️ Devnet only - no mainnet support yet
|
|
20
|
+
|
|
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
|
+
};
|
|
48
|
+
|
|
49
|
+
**📖 Interactive Documentation**
|
|
50
|
+
Full API docs with live examples
|
|
51
|
+
|
|
52
|
+
**🧪 Testnet Sandbox**
|
|
53
|
+
Try before you integrate
|
|
54
|
+
|
|
55
|
+
**🎮 CLI Interface**
|
|
56
|
+
Command-line airdrop management
|
|
57
|
+
|
|
58
|
+
## 🔭 Current Status (v0.β)
|
|
59
|
+
|
|
60
|
+
- **Network**: Devnet only
|
|
61
|
+
- **Stability**: Experimental
|
|
62
|
+
- **Program ID**: Subject to change
|
|
63
|
+
- **Roadmap**: Mainnet launch
|
|
64
|
+
|
|
65
|
+
> Full API documentation: [https://docs.dropsy.xyz/](https://docs.dropsy.xyz/)
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm install @dropsy/airdrop
|
|
71
|
+
# or
|
|
72
|
+
yarn add @dropsy/airdrop
|
|
73
|
+
# or
|
|
74
|
+
pnpm add @dropsy/airdrop
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The @solana/kit is required if not already installed:
|
|
78
|
+
|
|
79
|
+
# Using npm
|
|
80
|
+
|
|
81
|
+
npm install @solana/kit
|
|
82
|
+
|
|
83
|
+
# Using yarn
|
|
84
|
+
|
|
85
|
+
yarn add @solana/kit
|
|
86
|
+
|
|
87
|
+
## Examples
|
|
88
|
+
|
|
89
|
+
Examples are available in the [examples](./examples) folder.
|
|
90
|
+
Feel free to explore, modify, and use them as a starting point for your own work.
|
|
91
|
+
|
|
92
|
+
## Features
|
|
93
|
+
|
|
94
|
+
🚀 Controller – The Heart of Your Airdrop Platform
|
|
95
|
+
One of the most exciting parts of our protocol is the Controller.
|
|
96
|
+
|
|
97
|
+
A Controller acts as the foundation for creating and managing airdrops. By initializing your own controller, you can build a fully self-managed airdrop platform — and alse earn protocol fees from all the airdrops created using it.
|
|
98
|
+
|
|
99
|
+
What is a Controller?
|
|
100
|
+
A Controller is a special on-chain account that:
|
|
101
|
+
|
|
102
|
+
Registers ownership over a set of airdrops.
|
|
103
|
+
|
|
104
|
+
Collects protocol-level fees.
|
|
105
|
+
|
|
106
|
+
Allows anyone to create token airdrops under your control.
|
|
107
|
+
|
|
108
|
+
Why Use a Controller?
|
|
109
|
+
|
|
110
|
+
💸 Monetize: Earn fees from every airdrop created using your controller.
|
|
111
|
+
|
|
112
|
+
🛠️ Customize: Tailor your airdrop platform around it.
|
|
113
|
+
|
|
114
|
+
🌐 Permissionless: Anyone can initialize a controller and start building.
|
|
115
|
+
|
|
116
|
+
How to Initialize a Controller :
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
import * as dropsy from "@dropsy/airdrop";
|
|
120
|
+
|
|
121
|
+
// Create the instruction to initialize your controller
|
|
122
|
+
const ix = await dropsy.getInitializeControllerInstructionAsync({
|
|
123
|
+
authority: wallet, // the owner of the controller (the signer )
|
|
124
|
+
feeLamports: BigInt(5000), // The fee lamports others will pay when c using your controller
|
|
125
|
+
});
|
|
126
|
+
```
|
|
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
|
+
|
|
146
|
+
## 📚 Documentation
|
|
147
|
+
|
|
148
|
+
Full API documentation is available at
|
|
149
|
+
👉 [https://docs.dropsy.xyz/](https://docs.dropsy.xyz/)
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```
|
package/README.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# dropsy-airdrop beta
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@dropsy/airdrop)
|
|
4
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://scoolmb.github.io/dropsy-airdrop/)
|
|
6
|
-
|
|
7
|
-
A modern client SDK for interacting with the **Dropsy Airdrop Protocol** on Solana, built with:
|
|
8
|
-
|
|
9
|
-
- ✅ TypeScript
|
|
10
|
-
- ⚙️ [tsup](https://github.com/egoist/tsup) for fast bundling
|
|
11
|
-
- 🔀 Dual CJS (`require`) and ESM (`import`) support
|
|
12
|
-
- 📦 Auto-generated type declarations
|
|
13
|
-
- 🌐 Web3-ready & optimized for dApp integration
|
|
14
|
-
|
|
15
|
-
> Full API documentation: [https://scoolmb.github.io/dropsy-airdrop](https://scoolmb.github.io/dropsy-airdrop)
|
|
16
|
-
|
|
17
|
-
## Installation
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install @dropsy/airdrop
|
|
21
|
-
# ora
|
|
22
|
-
yarn add @dropsy/airdrop
|
|
23
|
-
# or
|
|
24
|
-
pnpm add @dropsy/airdrop
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## 📚 Documentation
|
|
28
|
-
|
|
29
|
-
Full API documentation is available at
|
|
30
|
-
👉 [https://scoolmb.github.io/dropsy-airdrop/](https://scoolmb.github.io/dropsy-airdrop/)
|