@dropsy/airdrop 0.2.6 → 0.3.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/dist/index.d.mts +486 -1028
- package/dist/index.d.ts +486 -1028
- package/dist/index.js +1537 -2709
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1699 -2911
- package/dist/index.mjs.map +1 -1
- package/package.json +66 -59
- package/readme.md +60 -153
- package/generate-md.js +0 -71
package/package.json
CHANGED
|
@@ -1,59 +1,66 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dropsy/airdrop",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"solana
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
"@solana/
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dropsy/airdrop",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"description": "Dropsy - The Token Distribution Layer on SOLANA - A powerful and flexible airdrop protocol for seamless token distribution on the Solana blockchain.",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://docs.dropsy.org/",
|
|
13
|
+
"repository": {
|
|
14
|
+
"url": "https://github.com/scoolmb/dropsy-airdrop"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "ts-node index.ts",
|
|
18
|
+
"build": "tsup"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"solana",
|
|
22
|
+
"solana airdrop",
|
|
23
|
+
"web3",
|
|
24
|
+
"create airdrop",
|
|
25
|
+
"solana web3",
|
|
26
|
+
"dropsy",
|
|
27
|
+
"solana devtools",
|
|
28
|
+
"token distribution",
|
|
29
|
+
"airdrop protocol",
|
|
30
|
+
"solana sdk",
|
|
31
|
+
"merkle airdrop",
|
|
32
|
+
"gasless airdrop",
|
|
33
|
+
"solana token launch",
|
|
34
|
+
"nft airdrop",
|
|
35
|
+
"decentralized distribution",
|
|
36
|
+
"solana-program-library",
|
|
37
|
+
"anchor program",
|
|
38
|
+
"spl token",
|
|
39
|
+
"solana crypto",
|
|
40
|
+
"airdrop automation",
|
|
41
|
+
"web3 rewards",
|
|
42
|
+
"solana developer tools",
|
|
43
|
+
"solana token distribution",
|
|
44
|
+
"solana airdrop protocol",
|
|
45
|
+
"solana token airdrop",
|
|
46
|
+
"solana token distribution protocol",
|
|
47
|
+
"solana token launchpad",
|
|
48
|
+
"solana token marketing",
|
|
49
|
+
"solana token rewards",
|
|
50
|
+
"solana token giveaway",
|
|
51
|
+
"solana token raffles"
|
|
52
|
+
],
|
|
53
|
+
"author": "MBK Official",
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@solana-program/token": "^0.13.0",
|
|
57
|
+
"@solana/kit": "^6.8.0",
|
|
58
|
+
"merkletreejs": "^0.6.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^25.6.0",
|
|
62
|
+
"tsup": "^8.5.1",
|
|
63
|
+
"tsx": "^4.21.0",
|
|
64
|
+
"typescript": "^5.9.3"
|
|
65
|
+
}
|
|
66
|
+
}
|
package/readme.md
CHANGED
|
@@ -1,153 +1,60 @@
|
|
|
1
|
-
# dropsy-airdrop
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
```
|
|
1
|
+
# dropsy-airdrop
|
|
2
|
+
|
|
3
|
+
## What is Dropsy ?
|
|
4
|
+
|
|
5
|
+
Dropsy Protocol is the token distribution layer for Solana, enabling creators, protocols, and teams to distribute tokens with zero friction.
|
|
6
|
+
|
|
7
|
+
With Airdrop Master, teams can create their own airdrop systems, customize fee models, and even build entire token-distribution products on top of Dropsy.
|
|
8
|
+
|
|
9
|
+
## What You Can Build ?
|
|
10
|
+
|
|
11
|
+
- Airdrop launchpads
|
|
12
|
+
- Claim portals
|
|
13
|
+
- Community reward apps
|
|
14
|
+
- Platform-level distribution tools (with your own fee model)
|
|
15
|
+
- Growth, referral, or engagement incentive systems
|
|
16
|
+
**Dropsy** is built to unlock a wild range of Web3 opportunities, empowering teams to launch incentives, boost growth, and create meaningful reward experiences with ease.
|
|
17
|
+
|
|
18
|
+
## 🚨 Important Notes
|
|
19
|
+
|
|
20
|
+
⚠️ This SDK is in active development
|
|
21
|
+
⚠️ All program addresses are temporary
|
|
22
|
+
⚠️ Instruction formats may change without warning
|
|
23
|
+
⚠️ Devnet only - no mainnet support yet
|
|
24
|
+
|
|
25
|
+
## 🔭 Current Status (v0.β)
|
|
26
|
+
|
|
27
|
+
- **Network**: Devnet only
|
|
28
|
+
- **Stability**: Experimental
|
|
29
|
+
- **Program ID**: Subject to change
|
|
30
|
+
|
|
31
|
+
> Full API documentation: [https://docs.dropsy.org/](https://docs.dropsy.org/)
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @dropsy/airdrop
|
|
37
|
+
# or
|
|
38
|
+
yarn add @dropsy/airdrop
|
|
39
|
+
# or
|
|
40
|
+
pnpm add @dropsy/airdrop
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The @solana/kit and @solana-program/token are required if not already installed:
|
|
44
|
+
|
|
45
|
+
# Using npm
|
|
46
|
+
|
|
47
|
+
npm install @solana/kit @solana-program/token
|
|
48
|
+
|
|
49
|
+
# Using yarn
|
|
50
|
+
|
|
51
|
+
yarn add @solana/kit @solana-program/token
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
**Examples** under update (coming soon)
|
|
56
|
+
|
|
57
|
+
## 📚 Documentation
|
|
58
|
+
|
|
59
|
+
Full documentation is available at
|
|
60
|
+
👉 [https://docs.dropsy.org/](https://docs.dropsy.org/)
|
package/generate-md.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// generate-instruction-mdx.js
|
|
2
|
-
const fs = require("fs");
|
|
3
|
-
const path = require("path");
|
|
4
|
-
|
|
5
|
-
const instructionsDir = path.join(__dirname, "src", "accounts");
|
|
6
|
-
|
|
7
|
-
function toTitle(name) {
|
|
8
|
-
return name
|
|
9
|
-
.replace(/\.mdx$/, "")
|
|
10
|
-
.replace(/\.ts$/, "")
|
|
11
|
-
.replace(/([A-Z])/g, " $1")
|
|
12
|
-
.replace(/^./, (str) => str.toUpperCase())
|
|
13
|
-
.trim();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function createMDXTemplate(name) {
|
|
17
|
-
const title = toTitle(name);
|
|
18
|
-
|
|
19
|
-
return `---
|
|
20
|
-
title: "${title}"
|
|
21
|
-
sidebar_position: 1
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
# ${title}
|
|
25
|
-
|
|
26
|
-
This page documents the **\`${name.replace(
|
|
27
|
-
".ts",
|
|
28
|
-
""
|
|
29
|
-
)}\`** instruction of the Dropsy protocol.
|
|
30
|
-
|
|
31
|
-
## Overview
|
|
32
|
-
|
|
33
|
-
Describe what this instruction does.
|
|
34
|
-
|
|
35
|
-
## Parameters
|
|
36
|
-
|
|
37
|
-
(Add a list of parameters extracted from the TypeScript file.)
|
|
38
|
-
|
|
39
|
-
## Example (TypeScript)
|
|
40
|
-
|
|
41
|
-
\`\`\`ts
|
|
42
|
-
import { ${name.replace(".ts", "")} } from "@dropsy/sdk";
|
|
43
|
-
|
|
44
|
-
// Example usage:
|
|
45
|
-
\`\`\`
|
|
46
|
-
|
|
47
|
-
## On-Chain Accounts
|
|
48
|
-
|
|
49
|
-
(Add the required accounts here.)
|
|
50
|
-
|
|
51
|
-
## Events
|
|
52
|
-
|
|
53
|
-
(Add emitted events if any.)
|
|
54
|
-
`;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
fs.readdirSync(instructionsDir).forEach((file) => {
|
|
58
|
-
if (!file.endsWith(".ts")) return;
|
|
59
|
-
if (file === "index.ts") return;
|
|
60
|
-
|
|
61
|
-
const mdxName = file.replace(".ts", ".mdx");
|
|
62
|
-
const mdxPath = path.join(instructionsDir, mdxName);
|
|
63
|
-
|
|
64
|
-
if (!fs.existsSync(mdxPath)) {
|
|
65
|
-
const content = createMDXTemplate(file);
|
|
66
|
-
fs.writeFileSync(mdxPath, content, "utf-8");
|
|
67
|
-
console.log("✅ Created:", mdxName);
|
|
68
|
-
} else {
|
|
69
|
-
console.log("⏩ Skipped (already exists):", mdxName);
|
|
70
|
-
}
|
|
71
|
-
});
|