@streamflow/distributor 7.0.0-alpha.2 → 7.0.0-alpha.5
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/cjs/index.js +1 -1
- package/dist/cjs/solana/client.js +176 -350
- package/dist/cjs/solana/constants.js +7 -8
- package/dist/cjs/solana/generated/accounts/ClaimStatus.js +47 -105
- package/dist/cjs/solana/generated/accounts/MerkleDistributor.js +58 -116
- package/dist/cjs/solana/generated/errors/anchor.js +540 -717
- package/dist/cjs/solana/generated/errors/custom.js +171 -243
- package/dist/cjs/solana/generated/errors/index.js +12 -51
- package/dist/cjs/solana/generated/instructions/claimLocked.js +7 -8
- package/dist/cjs/solana/generated/instructions/clawback.js +8 -9
- package/dist/cjs/solana/generated/instructions/closeClaim.js +8 -9
- package/dist/cjs/solana/generated/instructions/newClaim.js +10 -11
- package/dist/cjs/solana/generated/instructions/newDistributor.js +11 -12
- package/dist/cjs/solana/generated/instructions/setAdmin.js +8 -9
- package/dist/cjs/solana/generated/instructions/setClawbackReceiver.js +8 -9
- package/dist/cjs/solana/generated/programId.js +1 -1
- package/dist/cjs/solana/index.js +6 -6
- package/dist/cjs/solana/utils.js +38 -92
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/solana/index.d.ts +6 -6
- package/dist/esm/solana/index.js +6 -6
- package/dist/esm/solana/types.d.ts +4 -3
- package/package.json +4 -4
|
@@ -22,54 +22,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
27
|
};
|
|
64
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
29
|
exports.ClaimStatus = void 0;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
30
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
31
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
32
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
33
|
+
const programId_1 = require("../programId");
|
|
70
34
|
/** Holds whether or not a claimant has claimed tokens. */
|
|
71
|
-
|
|
72
|
-
|
|
35
|
+
class ClaimStatus {
|
|
36
|
+
constructor(fields) {
|
|
73
37
|
this.claimant = fields.claimant;
|
|
74
38
|
this.lockedAmount = fields.lockedAmount;
|
|
75
39
|
this.lockedAmountWithdrawn = fields.lockedAmountWithdrawn;
|
|
@@ -80,54 +44,33 @@ var ClaimStatus = /** @class */ (function () {
|
|
|
80
44
|
this.buffer1 = fields.buffer1;
|
|
81
45
|
this.buffer2 = fields.buffer2;
|
|
82
46
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
ClaimStatus.fetchMultiple = function (c, addresses, programId) {
|
|
104
|
-
if (programId === void 0) { programId = programId_1.PROGRAM_ID; }
|
|
105
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
-
var infos;
|
|
107
|
-
var _this = this;
|
|
108
|
-
return __generator(this, function (_a) {
|
|
109
|
-
switch (_a.label) {
|
|
110
|
-
case 0: return [4 /*yield*/, c.getMultipleAccountsInfo(addresses)];
|
|
111
|
-
case 1:
|
|
112
|
-
infos = _a.sent();
|
|
113
|
-
return [2 /*return*/, infos.map(function (info) {
|
|
114
|
-
if (info === null) {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
if (!info.owner.equals(programId)) {
|
|
118
|
-
throw new Error("account doesn't belong to this program");
|
|
119
|
-
}
|
|
120
|
-
return _this.decode(info.data);
|
|
121
|
-
})];
|
|
122
|
-
}
|
|
123
|
-
});
|
|
47
|
+
static async fetch(c, address, programId = programId_1.PROGRAM_ID) {
|
|
48
|
+
const info = await c.getAccountInfo(address);
|
|
49
|
+
if (info === null) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
if (!info.owner.equals(programId)) {
|
|
53
|
+
throw new Error("account doesn't belong to this program");
|
|
54
|
+
}
|
|
55
|
+
return this.decode(info.data);
|
|
56
|
+
}
|
|
57
|
+
static async fetchMultiple(c, addresses, programId = programId_1.PROGRAM_ID) {
|
|
58
|
+
const infos = await c.getMultipleAccountsInfo(addresses);
|
|
59
|
+
return infos.map((info) => {
|
|
60
|
+
if (info === null) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
if (!info.owner.equals(programId)) {
|
|
64
|
+
throw new Error("account doesn't belong to this program");
|
|
65
|
+
}
|
|
66
|
+
return this.decode(info.data);
|
|
124
67
|
});
|
|
125
|
-
}
|
|
126
|
-
|
|
68
|
+
}
|
|
69
|
+
static decode(data) {
|
|
127
70
|
if (!data.slice(0, 8).equals(ClaimStatus.discriminator)) {
|
|
128
71
|
throw new Error("invalid account discriminator");
|
|
129
72
|
}
|
|
130
|
-
|
|
73
|
+
const dec = ClaimStatus.layout.decode(data.slice(8));
|
|
131
74
|
return new ClaimStatus({
|
|
132
75
|
claimant: dec.claimant,
|
|
133
76
|
lockedAmount: dec.lockedAmount,
|
|
@@ -139,8 +82,8 @@ var ClaimStatus = /** @class */ (function () {
|
|
|
139
82
|
buffer1: dec.buffer1,
|
|
140
83
|
buffer2: dec.buffer2,
|
|
141
84
|
});
|
|
142
|
-
}
|
|
143
|
-
|
|
85
|
+
}
|
|
86
|
+
toJSON() {
|
|
144
87
|
return {
|
|
145
88
|
claimant: this.claimant.toString(),
|
|
146
89
|
lockedAmount: this.lockedAmount.toString(),
|
|
@@ -152,8 +95,8 @@ var ClaimStatus = /** @class */ (function () {
|
|
|
152
95
|
buffer1: this.buffer1,
|
|
153
96
|
buffer2: this.buffer2,
|
|
154
97
|
};
|
|
155
|
-
}
|
|
156
|
-
|
|
98
|
+
}
|
|
99
|
+
static fromJSON(obj) {
|
|
157
100
|
return new ClaimStatus({
|
|
158
101
|
claimant: new web3_js_1.PublicKey(obj.claimant),
|
|
159
102
|
lockedAmount: (0, bignumber_js_1.default)(obj.lockedAmount),
|
|
@@ -165,19 +108,18 @@ var ClaimStatus = /** @class */ (function () {
|
|
|
165
108
|
buffer1: obj.buffer1,
|
|
166
109
|
buffer2: obj.buffer2,
|
|
167
110
|
});
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
ClaimStatus.layout = borsh.struct([
|
|
171
|
-
borsh.publicKey("claimant"),
|
|
172
|
-
borsh.u64("lockedAmount"),
|
|
173
|
-
borsh.u64("lockedAmountWithdrawn"),
|
|
174
|
-
borsh.u64("unlockedAmount"),
|
|
175
|
-
borsh.u64("lastClaimTs"),
|
|
176
|
-
borsh.u64("lastAmountPerUnlock"),
|
|
177
|
-
borsh.bool("closed"),
|
|
178
|
-
borsh.array(borsh.u8(), 32, "buffer1"),
|
|
179
|
-
borsh.array(borsh.u8(), 32, "buffer2"),
|
|
180
|
-
]);
|
|
181
|
-
return ClaimStatus;
|
|
182
|
-
}());
|
|
111
|
+
}
|
|
112
|
+
}
|
|
183
113
|
exports.ClaimStatus = ClaimStatus;
|
|
114
|
+
ClaimStatus.discriminator = Buffer.from([22, 183, 249, 157, 247, 95, 150, 96]);
|
|
115
|
+
ClaimStatus.layout = borsh.struct([
|
|
116
|
+
borsh.publicKey("claimant"),
|
|
117
|
+
borsh.u64("lockedAmount"),
|
|
118
|
+
borsh.u64("lockedAmountWithdrawn"),
|
|
119
|
+
borsh.u64("unlockedAmount"),
|
|
120
|
+
borsh.u64("lastClaimTs"),
|
|
121
|
+
borsh.u64("lastAmountPerUnlock"),
|
|
122
|
+
borsh.bool("closed"),
|
|
123
|
+
borsh.array(borsh.u8(), 32, "buffer1"),
|
|
124
|
+
borsh.array(borsh.u8(), 32, "buffer2"),
|
|
125
|
+
]);
|
|
@@ -22,54 +22,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
27
|
};
|
|
64
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
29
|
exports.MerkleDistributor = void 0;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
30
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
31
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
32
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
33
|
+
const programId_1 = require("../programId");
|
|
70
34
|
/** State for the account which distributes tokens. */
|
|
71
|
-
|
|
72
|
-
|
|
35
|
+
class MerkleDistributor {
|
|
36
|
+
constructor(fields) {
|
|
73
37
|
this.bump = fields.bump;
|
|
74
38
|
this.version = fields.version;
|
|
75
39
|
this.root = fields.root;
|
|
@@ -91,54 +55,33 @@ var MerkleDistributor = /** @class */ (function () {
|
|
|
91
55
|
this.buffer2 = fields.buffer2;
|
|
92
56
|
this.buffer3 = fields.buffer3;
|
|
93
57
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
MerkleDistributor.fetchMultiple = function (c, addresses, programId) {
|
|
115
|
-
if (programId === void 0) { programId = programId_1.PROGRAM_ID; }
|
|
116
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
117
|
-
var infos;
|
|
118
|
-
var _this = this;
|
|
119
|
-
return __generator(this, function (_a) {
|
|
120
|
-
switch (_a.label) {
|
|
121
|
-
case 0: return [4 /*yield*/, c.getMultipleAccountsInfo(addresses)];
|
|
122
|
-
case 1:
|
|
123
|
-
infos = _a.sent();
|
|
124
|
-
return [2 /*return*/, infos.map(function (info) {
|
|
125
|
-
if (info === null) {
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
if (!info.owner.equals(programId)) {
|
|
129
|
-
throw new Error("account doesn't belong to this program");
|
|
130
|
-
}
|
|
131
|
-
return _this.decode(info.data);
|
|
132
|
-
})];
|
|
133
|
-
}
|
|
134
|
-
});
|
|
58
|
+
static async fetch(c, address, programId = programId_1.PROGRAM_ID) {
|
|
59
|
+
const info = await c.getAccountInfo(address);
|
|
60
|
+
if (info === null) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
if (!info.owner.equals(programId)) {
|
|
64
|
+
throw new Error("account doesn't belong to this program");
|
|
65
|
+
}
|
|
66
|
+
return this.decode(info.data);
|
|
67
|
+
}
|
|
68
|
+
static async fetchMultiple(c, addresses, programId = programId_1.PROGRAM_ID) {
|
|
69
|
+
const infos = await c.getMultipleAccountsInfo(addresses);
|
|
70
|
+
return infos.map((info) => {
|
|
71
|
+
if (info === null) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
if (!info.owner.equals(programId)) {
|
|
75
|
+
throw new Error("account doesn't belong to this program");
|
|
76
|
+
}
|
|
77
|
+
return this.decode(info.data);
|
|
135
78
|
});
|
|
136
|
-
}
|
|
137
|
-
|
|
79
|
+
}
|
|
80
|
+
static decode(data) {
|
|
138
81
|
if (!data.slice(0, 8).equals(MerkleDistributor.discriminator)) {
|
|
139
82
|
throw new Error("invalid account discriminator");
|
|
140
83
|
}
|
|
141
|
-
|
|
84
|
+
const dec = MerkleDistributor.layout.decode(data.slice(8));
|
|
142
85
|
return new MerkleDistributor({
|
|
143
86
|
bump: dec.bump,
|
|
144
87
|
version: dec.version,
|
|
@@ -161,8 +104,8 @@ var MerkleDistributor = /** @class */ (function () {
|
|
|
161
104
|
buffer2: dec.buffer2,
|
|
162
105
|
buffer3: dec.buffer3,
|
|
163
106
|
});
|
|
164
|
-
}
|
|
165
|
-
|
|
107
|
+
}
|
|
108
|
+
toJSON() {
|
|
166
109
|
return {
|
|
167
110
|
bump: this.bump,
|
|
168
111
|
version: this.version.toString(),
|
|
@@ -185,8 +128,8 @@ var MerkleDistributor = /** @class */ (function () {
|
|
|
185
128
|
buffer2: this.buffer2,
|
|
186
129
|
buffer3: this.buffer3,
|
|
187
130
|
};
|
|
188
|
-
}
|
|
189
|
-
|
|
131
|
+
}
|
|
132
|
+
static fromJSON(obj) {
|
|
190
133
|
return new MerkleDistributor({
|
|
191
134
|
bump: obj.bump,
|
|
192
135
|
version: (0, bignumber_js_1.default)(obj.version),
|
|
@@ -209,30 +152,29 @@ var MerkleDistributor = /** @class */ (function () {
|
|
|
209
152
|
buffer2: obj.buffer2,
|
|
210
153
|
buffer3: obj.buffer3,
|
|
211
154
|
});
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
MerkleDistributor.layout = borsh.struct([
|
|
215
|
-
borsh.u8("bump"),
|
|
216
|
-
borsh.u64("version"),
|
|
217
|
-
borsh.array(borsh.u8(), 32, "root"),
|
|
218
|
-
borsh.publicKey("mint"),
|
|
219
|
-
borsh.publicKey("tokenVault"),
|
|
220
|
-
borsh.u64("maxTotalClaim"),
|
|
221
|
-
borsh.u64("maxNumNodes"),
|
|
222
|
-
borsh.u64("unlockPeriod"),
|
|
223
|
-
borsh.u64("totalAmountClaimed"),
|
|
224
|
-
borsh.u64("numNodesClaimed"),
|
|
225
|
-
borsh.u64("startTs"),
|
|
226
|
-
borsh.u64("endTs"),
|
|
227
|
-
borsh.u64("clawbackStartTs"),
|
|
228
|
-
borsh.publicKey("clawbackReceiver"),
|
|
229
|
-
borsh.publicKey("admin"),
|
|
230
|
-
borsh.bool("clawedBack"),
|
|
231
|
-
borsh.bool("claimsClosable"),
|
|
232
|
-
borsh.array(borsh.u8(), 32, "buffer1"),
|
|
233
|
-
borsh.array(borsh.u8(), 32, "buffer2"),
|
|
234
|
-
borsh.array(borsh.u8(), 32, "buffer3"),
|
|
235
|
-
]);
|
|
236
|
-
return MerkleDistributor;
|
|
237
|
-
}());
|
|
155
|
+
}
|
|
156
|
+
}
|
|
238
157
|
exports.MerkleDistributor = MerkleDistributor;
|
|
158
|
+
MerkleDistributor.discriminator = Buffer.from([77, 119, 139, 70, 84, 247, 12, 26]);
|
|
159
|
+
MerkleDistributor.layout = borsh.struct([
|
|
160
|
+
borsh.u8("bump"),
|
|
161
|
+
borsh.u64("version"),
|
|
162
|
+
borsh.array(borsh.u8(), 32, "root"),
|
|
163
|
+
borsh.publicKey("mint"),
|
|
164
|
+
borsh.publicKey("tokenVault"),
|
|
165
|
+
borsh.u64("maxTotalClaim"),
|
|
166
|
+
borsh.u64("maxNumNodes"),
|
|
167
|
+
borsh.u64("unlockPeriod"),
|
|
168
|
+
borsh.u64("totalAmountClaimed"),
|
|
169
|
+
borsh.u64("numNodesClaimed"),
|
|
170
|
+
borsh.u64("startTs"),
|
|
171
|
+
borsh.u64("endTs"),
|
|
172
|
+
borsh.u64("clawbackStartTs"),
|
|
173
|
+
borsh.publicKey("clawbackReceiver"),
|
|
174
|
+
borsh.publicKey("admin"),
|
|
175
|
+
borsh.bool("clawedBack"),
|
|
176
|
+
borsh.bool("claimsClosable"),
|
|
177
|
+
borsh.array(borsh.u8(), 32, "buffer1"),
|
|
178
|
+
borsh.array(borsh.u8(), 32, "buffer2"),
|
|
179
|
+
borsh.array(borsh.u8(), 32, "buffer3"),
|
|
180
|
+
]);
|