UNPKG

@wagmi/core

Version:

VanillaJS library for Ethereum

64 lines 1.74 kB
import { Actions } from 'viem/tempo'; /** * Funds an account with an initial amount of set token(s) * on Tempo's testnet. * * @example * ```ts * import { createConfig, http } from '@wagmi/core' * import { tempo } from '@wagmi/core/chains' * import { Actions } from '@wagmi/core/tempo' * * const config = createConfig({ * chains: [tempoModerato], * transports: { * [tempo.id]: http(), * }, * }) * * const hashes = await Actions.faucet.fund(config, { * account: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef', * }) * ``` * * @param config - Config. * @param parameters - Parameters. * @returns The transaction hashes. */ export async function fund(config, parameters) { const { chainId, ...rest } = parameters; const client = config.getClient({ chainId }); return Actions.faucet.fund(client, rest); } /** * Funds an account with an initial amount of set token(s) * on Tempo's testnet. Returns with the transaction receipts. * * @example * ```ts * import { createConfig, http } from '@wagmi/core' * import { tempo } from '@wagmi/core/chains' * import { Actions } from '@wagmi/core/tempo' * * const config = createConfig({ * chains: [tempoModerato], * transports: { * [tempo.id]: http(), * }, * }) * * const receipts = await Actions.faucet.fundSync(config, { * account: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef', * }) * ``` * * @param config - Config. * @param parameters - Parameters. * @returns The transaction hashes. */ export async function fundSync(config, parameters) { const { chainId, ...rest } = parameters; const client = config.getClient({ chainId }); return Actions.faucet.fundSync(client, rest); } //# sourceMappingURL=faucet.js.map