@protonsale/sdk
Version:
Proton Sale SDK
33 lines • 1.43 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const aptos_1 = require("aptos");
const proton_sale_client_1 = require("./proton_sale_client");
async function start() {
// eslint-disable-next-line import/no-extraneous-dependencies, global-require
await require("dotenv").config();
// const clientMain = new ProtonSaleClient("MAINNET");
const clientTest = new proton_sale_client_1.ProtonSaleClient("TESTNET");
const privateKey = process.env.KEY;
const privateKeyUint8 = Uint8Array.from((privateKey
.match(/.{1,2}/g) ?? [""])
.map((byte) => parseInt(byte, 16)));
const account = new aptos_1.AptosAccount(privateKeyUint8);
console.log(account.address());
// await clientTest.initAirdrop(account, undefined);
// const txn1 = await clientTest.createAirdropHasWhitelist(
// account,
// "0x8acd6f336c29d34c11b81f5e62cd41004afaaf7ec2a247766778768dab221446::proton_2ab::PROTON_B3E",
// "new",
// "100",
// [account.address().hex()],
// undefined,
// );
// console.log(txn1)
const txn2 = await clientTest.claimAirdropHasWhitelist(account, "0x8acd6f336c29d34c11b81f5e62cd41004afaaf7ec2a247766778768dab221446::proton_2ab::PROTON_B3E", account.address().hex(), "new", undefined);
console.log(txn2);
}
start().catch((e) => {
console.error(e);
process.exit(1);
});
//# sourceMappingURL=airdrop.js.map