UNPKG

@myria/airdrop-js

Version:

Airdrop in L1 with claim based approach

45 lines 2.25 kB
"use strict"; /** * Wallet module. * @module Wallet */ Object.defineProperty(exports, "__esModule", { value: true }); exports.privateKeyToAccount = exports.getWalletBalance = void 0; /** * Retrieves the balance of a token or native currency for a given wallet. * @function * @name getWalletBalance * @param options - The options for retrieving the token balance. * @param options.address - The address for which to retrieve the balance. * @param options.client - The Thirdweb client to use for the request. * @param options.chain - The chain for which to retrieve the balance. * @param options.tokenAddress - (Optional) The address of the token to retrieve the balance for. If not provided, the balance of the native token will be retrieved. * @returns A promise that resolves to the token balance result. * @example * ```ts * import { Wallet } from "@myria/airdrop-js"; * const balance = await Wallet.getWalletBalance({ account, client, chain, tokenAddress }); * ``` */ var wallets_1 = require("thirdweb/wallets"); Object.defineProperty(exports, "getWalletBalance", { enumerable: true, get: function () { return wallets_1.getWalletBalance; } }); /** * Get an `Account` object from a private key. * @function * @name privateKeyToAccount * @param options - The options for `privateKeyToAccount` * Refer to the type [`PrivateKeyToAccountOptions`](https://portal.thirdweb.com/references/typescript/v5/PrivateKeyToAccountOptions) * @returns The `Account` object that represents the private key * @example * ```ts * import { Wallet } from "@myria/airdrop-js" * * const wallet = Wallet.privateKeyToAccount({ * client, * privateKey: "...", * }); * ``` */ var wallets_2 = require("thirdweb/wallets"); Object.defineProperty(exports, "privateKeyToAccount", { enumerable: true, get: function () { return wallets_2.privateKeyToAccount; } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV2FsbGV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dhbGxldC9XYWxsZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7R0FHRzs7O0FBRUg7Ozs7Ozs7Ozs7Ozs7OztHQWVHO0FBQ0gsNENBQW9EO0FBQTNDLDJHQUFBLGdCQUFnQixPQUFBO0FBRXpCOzs7Ozs7Ozs7Ozs7Ozs7O0dBZ0JHO0FBQ0gsNENBQXVEO0FBQTlDLDhHQUFBLG1CQUFtQixPQUFBIn0=