@saberhq/merkle-distributor
Advanced tools
Comparing version 0.3.0 to 0.3.1
export declare type MerkleDistributorIDL = { | ||
version: "0.3.0"; | ||
version: "0.3.1"; | ||
name: "merkle_distributor"; | ||
@@ -4,0 +4,0 @@ instructions: [ |
@@ -6,3 +6,3 @@ "use strict"; | ||
exports.MerkleDistributorJSON = { | ||
version: "0.3.0", | ||
version: "0.3.1", | ||
name: "merkle_distributor", | ||
@@ -9,0 +9,0 @@ instructions: [ |
@@ -5,9 +5,9 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
(0, tslib_1.__exportStar)(require("./constants"), exports); | ||
(0, tslib_1.__exportStar)(require("./idls/merkle_distributor"), exports); | ||
(0, tslib_1.__exportStar)(require("./pda"), exports); | ||
(0, tslib_1.__exportStar)(require("./sdk"), exports); | ||
(0, tslib_1.__exportStar)(require("./types"), exports); | ||
exports.utils = (0, tslib_1.__importStar)(require("./utils")); | ||
(0, tslib_1.__exportStar)(require("./wrapper"), exports); | ||
tslib_1.__exportStar(require("./constants"), exports); | ||
tslib_1.__exportStar(require("./idls/merkle_distributor"), exports); | ||
tslib_1.__exportStar(require("./pda"), exports); | ||
tslib_1.__exportStar(require("./sdk"), exports); | ||
tslib_1.__exportStar(require("./types"), exports); | ||
exports.utils = tslib_1.__importStar(require("./utils")); | ||
tslib_1.__exportStar(require("./wrapper"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -8,7 +8,7 @@ "use strict"; | ||
const constants_1 = require("./constants"); | ||
const findDistributorKey = (base) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { | ||
const findDistributorKey = (base) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { | ||
return yield web3_js_1.PublicKey.findProgramAddress([anchor_1.utils.bytes.utf8.encode("MerkleDistributor"), base.toBytes()], constants_1.PROGRAM_ID); | ||
}); | ||
exports.findDistributorKey = findDistributorKey; | ||
const findClaimStatusKey = (index, distributor) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () { | ||
const findClaimStatusKey = (index, distributor) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { | ||
return yield web3_js_1.PublicKey.findProgramAddress([ | ||
@@ -15,0 +15,0 @@ anchor_1.utils.bytes.utf8.encode("ClaimStatus"), |
@@ -33,3 +33,3 @@ "use strict"; | ||
loadDistributor(key) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
return yield wrapper_1.MerkleDistributorWrapper.load(this, key); | ||
@@ -43,3 +43,3 @@ }); | ||
createDistributor(args) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
return yield wrapper_1.MerkleDistributorWrapper.createDistributor(Object.assign({ sdk: this }, args)); | ||
@@ -46,0 +46,0 @@ }); |
@@ -5,3 +5,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const tiny_invariant_1 = (0, tslib_1.__importDefault)(require("tiny-invariant")); | ||
const tiny_invariant_1 = tslib_1.__importDefault(require("tiny-invariant")); | ||
const toBytes32Array = (b) => { | ||
@@ -8,0 +8,0 @@ (0, tiny_invariant_1.default)(b.length <= 32, `invalid length ${b.length}`); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
(0, tslib_1.__exportStar)(require("./balance-tree"), exports); | ||
(0, tslib_1.__exportStar)(require("./bytes32"), exports); | ||
(0, tslib_1.__exportStar)(require("./merkle-tree"), exports); | ||
(0, tslib_1.__exportStar)(require("./parse-balance-map"), exports); | ||
tslib_1.__exportStar(require("./balance-tree"), exports); | ||
tslib_1.__exportStar(require("./bytes32"), exports); | ||
tslib_1.__exportStar(require("./merkle-tree"), exports); | ||
tslib_1.__exportStar(require("./parse-balance-map"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
const js_sha3_1 = require("js-sha3"); | ||
const tiny_invariant_1 = (0, tslib_1.__importDefault)(require("tiny-invariant")); | ||
const tiny_invariant_1 = tslib_1.__importDefault(require("tiny-invariant")); | ||
function getPairElement(idx, layer) { | ||
@@ -9,0 +9,0 @@ const pairIdx = idx % 2 === 0 ? idx + 1 : idx - 1; |
@@ -7,4 +7,4 @@ "use strict"; | ||
const web3_js_1 = require("@solana/web3.js"); | ||
const bn_js_1 = (0, tslib_1.__importDefault)(require("bn.js")); | ||
const tiny_invariant_1 = (0, tslib_1.__importDefault)(require("tiny-invariant")); | ||
const bn_js_1 = tslib_1.__importDefault(require("bn.js")); | ||
const tiny_invariant_1 = tslib_1.__importDefault(require("tiny-invariant")); | ||
const balance_tree_1 = require("./balance-tree"); | ||
@@ -11,0 +11,0 @@ function parseBalanceMap(balances) { |
@@ -19,3 +19,3 @@ "use strict"; | ||
static load(sdk, key) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const data = yield sdk.program.account.merkleDistributor.fetch(key); | ||
@@ -27,3 +27,3 @@ return new MerkleDistributorWrapper(sdk, key, yield (0, token_utils_1.getATAAddress)({ mint: data.mint, owner: key }), data); | ||
var _a; | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const { root, tokenMint } = args; | ||
@@ -62,3 +62,3 @@ const { sdk } = args; | ||
claimIX(args, payer) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const { amount, claimant, index, proof } = args; | ||
@@ -81,3 +81,3 @@ const [claimStatus, bump] = yield (0, pda_1.findClaimStatusKey)(index, this.key); | ||
claim(args) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const { provider } = this.sdk; | ||
@@ -99,3 +99,3 @@ const tx = new solana_contrib_1.TransactionEnvelope(provider, [ | ||
getClaimStatus(index) { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const [key] = yield (0, pda_1.findClaimStatusKey)(index, this.key); | ||
@@ -106,3 +106,3 @@ return this.program.account.claimStatus.fetch(key); | ||
reload() { | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
this.data = yield this.program.account.merkleDistributor.fetch(this.key); | ||
@@ -109,0 +109,0 @@ }); |
export declare type MerkleDistributorIDL = { | ||
version: "0.3.0"; | ||
version: "0.3.1"; | ||
name: "merkle_distributor"; | ||
@@ -4,0 +4,0 @@ instructions: [ |
import { generateErrorMap } from "@saberhq/anchor-contrib"; | ||
export const MerkleDistributorJSON = { | ||
version: "0.3.0", | ||
version: "0.3.1", | ||
name: "merkle_distributor", | ||
@@ -5,0 +5,0 @@ instructions: [ |
{ | ||
"name": "@saberhq/merkle-distributor", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "TypeScript SDK for a Solana program for distributing tokens according to a Merkle root.", | ||
@@ -28,27 +28,27 @@ "main": "dist/cjs/index.js", | ||
"devDependencies": { | ||
"@project-serum/anchor": "^0.22.0", | ||
"@rushstack/eslint-patch": "^1.1.0", | ||
"@saberhq/anchor-contrib": "^1.12.47", | ||
"@saberhq/chai-solana": "^1.12.47", | ||
"@saberhq/eslint-config": "^1.12.47", | ||
"@saberhq/solana-contrib": "^1.12.47", | ||
"@saberhq/token-utils": "^1.12.47", | ||
"@saberhq/tsconfig": "^1.12.47", | ||
"@solana/web3.js": "^1.35.1", | ||
"@project-serum/anchor": "^0.24.2", | ||
"@rushstack/eslint-patch": "^1.1.3", | ||
"@saberhq/anchor-contrib": "^1.12.61", | ||
"@saberhq/chai-solana": "^1.12.61", | ||
"@saberhq/eslint-config": "^1.12.61", | ||
"@saberhq/solana-contrib": "^1.12.61", | ||
"@saberhq/token-utils": "^1.12.61", | ||
"@saberhq/tsconfig": "^1.12.61", | ||
"@solana/web3.js": "^1.39.1", | ||
"@types/bn.js": "^5.1.0", | ||
"@types/chai": "^4.3.0", | ||
"@types/chai": "^4.3.1", | ||
"@types/mocha": "^9.1.0", | ||
"@types/node": "^17.0.21", | ||
"@types/node": "^17.0.24", | ||
"bn.js": "^5.2.0", | ||
"chai": "^4.3.4", | ||
"eslint": "^8.10.0", | ||
"eslint": "^8.13.0", | ||
"eslint-import-resolver-node": "^0.3.6", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-import": "^2.26.0", | ||
"husky": "^7.0.4", | ||
"jsbi": "^4.1.0", | ||
"lint-staged": "^12.3.4", | ||
"mocha": "^9.2.1", | ||
"prettier": "^2.5.1", | ||
"ts-node": "^10.5.0", | ||
"typescript": "^4.5.5" | ||
"jsbi": "^4.2.1", | ||
"lint-staged": "^12.3.8", | ||
"mocha": "^9.2.2", | ||
"prettier": "^2.6.2", | ||
"ts-node": "^10.7.0", | ||
"typescript": "^4.6.3" | ||
}, | ||
@@ -58,3 +58,3 @@ "lint-staged": { | ||
"*.{js,jsx,json,html,css,md}": "prettier --write", | ||
"*.nix": "nixfmt" | ||
"*.nix": "nixpkgs-fmt" | ||
}, | ||
@@ -72,2 +72,3 @@ "scripts": { | ||
"js-sha3": "^0.8.0", | ||
"superstruct": "^0.15.4", | ||
"tiny-invariant": "^1.2.0", | ||
@@ -88,3 +89,3 @@ "tslib": "^2.3.1" | ||
}, | ||
"packageManager": "yarn@3.1.1", | ||
"packageManager": "yarn@3.2.0", | ||
"files": [ | ||
@@ -91,0 +92,0 @@ "dist/", |
import { generateErrorMap } from "@saberhq/anchor-contrib"; | ||
export type MerkleDistributorIDL = { | ||
version: "0.3.0"; | ||
version: "0.3.1"; | ||
name: "merkle_distributor"; | ||
@@ -249,3 +249,3 @@ instructions: [ | ||
export const MerkleDistributorJSON: MerkleDistributorIDL = { | ||
version: "0.3.0", | ||
version: "0.3.1", | ||
name: "merkle_distributor", | ||
@@ -252,0 +252,0 @@ instructions: [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
251814
11
+ Addedsuperstruct@^0.15.4
+ Addedsuperstruct@0.15.5(transitive)