import type { Address } from 'abitype' import type { Account } from '../accounts/types.js' import type { Client } from '../clients/createClient.js' import type { Transport } from '../clients/transports/createTransport.js' import type { Chain } from '../types/chain.js' import * as accessKeyActions from './actions/accessKey.js' import * as ammActions from './actions/amm.js' import * as dexActions from './actions/dex.js' import * as faucetActions from './actions/faucet.js' import * as feeActions from './actions/fee.js' import * as nonceActions from './actions/nonce.js' import * as policyActions from './actions/policy.js' import * as rewardActions from './actions/reward.js' import * as simulateActions from './actions/simulate.js' import * as tokenActions from './actions/token.js' import * as validatorActions from './actions/validator.js' import * as virtualAddressActions from './actions/virtualAddress.js' import * as zoneActions from './actions/zone.js' export type Decorator< chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, > = { accessKey: { /** * Authorizes an access key by signing a key authorization and sending a transaction. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions, Account } from 'viem/tempo' * import { generatePrivateKey } from 'viem/accounts' * * const account = Account.from({ privateKey: '0x...' }) * const client = createClient({ * account, * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const accessKey = Account.fromP256(generatePrivateKey(), { * access: account, * }) * * const hash = await client.accessKey.authorize({ * accessKey, * expiry: Math.floor((Date.now() + 30_000) / 1000), * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ authorize: ( parameters: accessKeyActions.authorize.Parameters, ) => Promise /** * Authorizes an access key and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions, Account } from 'viem/tempo' * import { generatePrivateKey } from 'viem/accounts' * * const account = Account.from({ privateKey: '0x...' }) * const client = createClient({ * account, * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const accessKey = Account.fromP256(generatePrivateKey(), { * access: account, * }) * * const { receipt, ...result } = await client.accessKey.authorizeSync({ * accessKey, * expiry: Math.floor((Date.now() + 30_000) / 1000), * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ authorizeSync: ( parameters: accessKeyActions.authorizeSync.Parameters, ) => Promise /** * Gets access key information. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const key = await client.accessKey.getMetadata({ * account: '0x...', * accessKey: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The key information. */ getMetadata: ( parameters: accessKeyActions.getMetadata.Parameters, ) => Promise /** * Gets the remaining spending limit for a key-token pair. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const { remaining, periodEnd } = await client.accessKey.getRemainingLimit({ * account: '0x...', * accessKey: '0x...', * token: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The remaining spending amount and period end timestamp. */ getRemainingLimit: ( parameters: accessKeyActions.getRemainingLimit.Parameters, ) => Promise /** * Revokes an authorized access key. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const hash = await client.accessKey.revoke({ * accessKey: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ revoke: ( parameters: accessKeyActions.revoke.Parameters, ) => Promise /** * Revokes an authorized access key and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const { receipt, ...result } = await client.accessKey.revokeSync({ * accessKey: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ revokeSync: ( parameters: accessKeyActions.revokeSync.Parameters, ) => Promise /** * Updates the spending limit for a specific token on an authorized access key. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const hash = await client.accessKey.updateLimit({ * accessKey: '0x...', * token: '0x...', * limit: 1000000000000000000n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ updateLimit: ( parameters: accessKeyActions.updateLimit.Parameters, ) => Promise /** * Updates the spending limit and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const { receipt, ...result } = await client.accessKey.updateLimitSync({ * accessKey: '0x...', * token: '0x...', * limit: 1000000000000000000n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ updateLimitSync: ( parameters: accessKeyActions.updateLimitSync.Parameters, ) => Promise } amm: { /** * Gets the reserves for a liquidity pool. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo.extend({ feeToken: '0x20c...001' }), * transport: http(), * }).extend(tempoActions()) * * const pool = await client.amm.getPool({ * userToken: '0x...', * validatorToken: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The pool reserves. */ getPool: ( parameters: ammActions.getPool.Parameters, ) => Promise /** * Gets the LP token balance for an account in a specific pool. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const poolId = await client.amm.getPoolId({ * userToken: '0x...', * validatorToken: '0x...', * }) * * const balance = await client.amm.getLiquidityBalance({ * poolId, * address: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The LP token balance. */ getLiquidityBalance: ( parameters: ammActions.getLiquidityBalance.Parameters, ) => Promise /** * Removes liquidity from a pool. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.amm.burn({ * userToken: '0x...', * validatorToken: '0x...', * liquidity: 50n, * to: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ burn: ( parameters: ammActions.burn.Parameters, ) => Promise /** * Removes liquidity from a pool and waits for confirmation. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { receipt, ...result } = await client.amm.burnSync({ * userToken: '0x...', * validatorToken: '0x...', * liquidity: 50n, * to: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ burnSync: ( parameters: ammActions.burnSync.Parameters, ) => Promise /** * Adds liquidity to a pool. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.amm.mint({ * userTokenAddress: '0x...', * validatorTokenAddress: '0x...', * validatorTokenAmount: 100n, * to: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ mint: ( parameters: ammActions.mint.Parameters, ) => Promise /** * Adds liquidity to a pool. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.amm.mintSync({ * userTokenAddress: '0x...', * validatorTokenAddress: '0x...', * validatorTokenAmount: 100n, * to: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ mintSync: ( parameters: ammActions.mintSync.Parameters, ) => Promise /** * Swaps tokens during a rebalance operation. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.amm.rebalanceSwap({ * userToken: '0x...', * validatorToken: '0x...', * amountOut: 100n, * to: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ rebalanceSwap: ( parameters: ammActions.rebalanceSwap.Parameters, ) => Promise /** * Swaps tokens during a rebalance operation and waits for confirmation. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { receipt, ...result } = await client.amm.rebalanceSwapSync({ * userToken: '0x...', * validatorToken: '0x...', * amountOut: 100n, * to: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ rebalanceSwapSync: ( parameters: ammActions.rebalanceSwapSync.Parameters, ) => Promise /** * Watches for burn (liquidity removal) events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.amm.watchBurn({ * onBurn: (args, log) => { * console.log('Liquidity removed:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchBurn: (parameters: ammActions.watchBurn.Parameters) => () => void /** * Watches for liquidity mint events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.amm.watchMint({ * onMint: (args, log) => { * console.log('Liquidity added:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchMint: (parameters: ammActions.watchMint.Parameters) => () => void /** * Watches for rebalance swap events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.amm.watchRebalanceSwap({ * onRebalanceSwap: (args, log) => { * console.log('Rebalance swap:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchRebalanceSwap: ( parameters: ammActions.watchRebalanceSwap.Parameters, ) => () => void } dex: { /** * Buys a specific amount of tokens. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.dex.buy({ * tokenIn: '0x20c...11', * tokenOut: '0x20c...20', * amountOut: 100n, * maxAmountIn: 105n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ buy: ( parameters: dexActions.buy.Parameters, ) => Promise /** * Buys a specific amount of tokens. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.dex.buySync({ * tokenIn: '0x20c...11', * tokenOut: '0x20c...20', * amountOut: 100n, * maxAmountIn: 105n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ buySync: ( parameters: dexActions.buySync.Parameters, ) => Promise /** * Cancels an order from the orderbook. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.dex.cancel({ * orderId: 123n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ cancel: ( parameters: dexActions.cancel.Parameters, ) => Promise /** * Cancels an order from the orderbook. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.dex.cancelSync({ * orderId: 123n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ cancelSync: ( parameters: dexActions.cancelSync.Parameters, ) => Promise /** * Cancels a stale order from the orderbook. * * A stale order is one where the maker has been blacklisted by a TIP-403 policy. * Anyone can cancel stale orders. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.dex.cancelStale({ * orderId: 123n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ cancelStale: ( parameters: dexActions.cancelStale.Parameters, ) => Promise /** * Cancels a stale order from the orderbook and waits for confirmation. * * A stale order is one where the maker has been blacklisted by a TIP-403 policy. * Anyone can cancel stale orders. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.dex.cancelStaleSync({ * orderId: 123n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ cancelStaleSync: ( parameters: dexActions.cancelStaleSync.Parameters, ) => Promise /** * Creates a new trading pair on the DEX. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.dex.createPair({ * base: '0x20c...11', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ createPair: ( parameters: dexActions.createPair.Parameters, ) => Promise /** * Creates a new trading pair on the DEX. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.dex.createPairSync({ * base: '0x20c...11', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ createPairSync: ( parameters: dexActions.createPairSync.Parameters, ) => Promise /** * Gets a user's token balance on the DEX. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const balance = await client.dex.getBalance({ * account: '0x...', * token: '0x20c...11', * }) * ``` * * @param parameters - Parameters. * @returns The user's token balance on the DEX. */ getBalance: ( parameters: dexActions.getBalance.Parameters, ) => Promise /** * Gets the quote for buying a specific amount of tokens. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const amountIn = await client.dex.getBuyQuote({ * tokenIn: '0x20c...11', * tokenOut: '0x20c...20', * amountOut: 100n, * }) * ``` * * @param parameters - Parameters. * @returns The amount of tokenIn needed to buy the specified amountOut. */ getBuyQuote: ( parameters: dexActions.getBuyQuote.Parameters, ) => Promise /** * Gets an order's details from the orderbook. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const order = await client.dex.getOrder({ * orderId: 123n, * }) * ``` * * @param parameters - Parameters. * @returns The order details. */ getOrder: ( parameters: dexActions.getOrder.Parameters, ) => Promise /** * Gets the price level information at a specific tick. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions, Tick } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const level = await client.dex.getTickLevel({ * base: '0x20c...11', * tick: Tick.fromPrice('1.001'), * isBid: true, * }) * ``` * * @param parameters - Parameters. * @returns The price level information. */ getTickLevel: ( parameters: dexActions.getTickLevel.Parameters, ) => Promise /** * Gets the quote for selling a specific amount of tokens. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const amountOut = await client.dex.getSellQuote({ * tokenIn: '0x20c...11', * tokenOut: '0x20c...20', * amountIn: 100n, * }) * ``` * * @param parameters - Parameters. * @returns The amount of tokenOut received for selling the specified amountIn. */ getSellQuote: ( parameters: dexActions.getSellQuote.Parameters, ) => Promise /** * Places a limit order on the orderbook. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions, Tick } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.dex.place({ * token: '0x20c...11', * amount: 100n, * type: 'buy', * tick: Tick.fromPrice('0.99'), * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ place: ( parameters: dexActions.place.Parameters, ) => Promise /** * Places a limit order on the orderbook. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions, Tick } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.dex.placeSync({ * token: '0x20c...11', * amount: 100n, * type: 'buy', * tick: Tick.fromPrice('0.99'), * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ placeSync: ( parameters: dexActions.placeSync.Parameters, ) => Promise /** * Places a flip order that automatically flips when filled. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions, Tick } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.dex.placeFlip({ * token: '0x20c...11', * amount: 100n, * type: 'buy', * tick: Tick.fromPrice('0.99'), * flipTick: Tick.fromPrice('1.01'), * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ placeFlip: ( parameters: dexActions.placeFlip.Parameters, ) => Promise /** * Places a flip order that automatically flips when filled. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions, Tick } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.dex.placeFlipSync({ * token: '0x20c...11', * amount: 100n, * type: 'buy', * tick: Tick.fromPrice('0.99'), * flipTick: Tick.fromPrice('1.01'), * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ placeFlipSync: ( parameters: dexActions.placeFlipSync.Parameters, ) => Promise /** * Sells a specific amount of tokens. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.dex.sell({ * tokenIn: '0x20c...11', * tokenOut: '0x20c...20', * amountIn: 100n, * minAmountOut: 95n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ sell: ( parameters: dexActions.sell.Parameters, ) => Promise /** * Sells a specific amount of tokens. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.dex.sellSync({ * tokenIn: '0x20c...11', * tokenOut: '0x20c...20', * amountIn: 100n, * minAmountOut: 95n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ sellSync: ( parameters: dexActions.sellSync.Parameters, ) => Promise /** * Withdraws tokens from the DEX to the caller's wallet. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.dex.withdraw({ * token: '0x20c...11', * amount: 100n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ withdraw: ( parameters: dexActions.withdraw.Parameters, ) => Promise /** * Withdraws tokens from the DEX to the caller's wallet. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.dex.withdrawSync({ * token: '0x20c...11', * amount: 100n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ withdrawSync: ( parameters: dexActions.withdrawSync.Parameters, ) => Promise /** * Watches for flip order placed events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.dex.watchFlipOrderPlaced({ * onFlipOrderPlaced: (args, log) => { * console.log('Flip order placed:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchFlipOrderPlaced: ( parameters: dexActions.watchFlipOrderPlaced.Parameters, ) => () => void /** * Watches for order cancelled events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.dex.watchOrderCancelled({ * onOrderCancelled: (args, log) => { * console.log('Order cancelled:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchOrderCancelled: ( parameters: dexActions.watchOrderCancelled.Parameters, ) => () => void /** * Watches for order filled events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.dex.watchOrderFilled({ * onOrderFilled: (args, log) => { * console.log('Order filled:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchOrderFilled: ( parameters: dexActions.watchOrderFilled.Parameters, ) => () => void /** * Watches for order placed events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.dex.watchOrderPlaced({ * onOrderPlaced: (args, log) => { * console.log('Order placed:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchOrderPlaced: ( parameters: dexActions.watchOrderPlaced.Parameters, ) => () => void } faucet: { /** * Funds an account with an initial amount of set token(s) * on Tempo's testnet. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hashes = await client.faucet.fund({ * account: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hashes. */ fund: ( parameters: faucetActions.fund.Parameters, ) => Promise /** * Funds an account with an initial amount of set token(s) * on Tempo's testnet. Waits for the transactions to be included * on a block before returning a response. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const receipts = await client.faucet.fundSync({ * account: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipts. */ fundSync: ( parameters: faucetActions.fundSync.Parameters, ) => Promise } nonce: { /** * Gets the nonce for an account and nonce key. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const nonce = await client.nonce.getNonce({ * account: '0x...', * nonceKey: 1n, * }) * ``` * * @param parameters - Parameters. * @returns The nonce value. */ getNonce: ( parameters: nonceActions.getNonce.Parameters, ) => Promise /** * Watches for nonce incremented events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.nonce.watchNonceIncremented({ * onNonceIncremented: (args, log) => { * console.log('Nonce incremented:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchNonceIncremented: ( parameters: nonceActions.watchNonceIncremented.Parameters, ) => () => void } fee: { /** * Gets the user's default fee token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { address, id } = await client.token.getUserToken() * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ getUserToken: ( ...parameters: account extends Account ? [feeActions.getUserToken.Parameters] | [] : [feeActions.getUserToken.Parameters] ) => Promise /** * Sets the user's default fee token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.setUserToken({ * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ setUserToken: ( parameters: feeActions.setUserToken.Parameters, ) => Promise /** * Sets the user's default fee token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.fee.setUserTokenSync({ * token: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ setUserTokenSync: ( parameters: feeActions.setUserTokenSync.Parameters, ) => Promise /** * Watches for user token set events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.token.watchSetUserToken({ * onUserTokenSet: (args, log) => { * console.log('User token set:', args) * }, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchSetUserToken: ( parameters: feeActions.watchSetUserToken.Parameters, ) => () => void } policy: { /** * Creates a new policy. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.policy.create({ * admin: '0x...', * type: 'whitelist', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ create: ( parameters: policyActions.create.Parameters, ) => Promise /** * Creates a new policy. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.policy.createSync({ * admin: '0x...', * type: 'whitelist', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ createSync: ( parameters: policyActions.createSync.Parameters, ) => Promise /** * Sets the admin for a policy. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.policy.setAdmin({ * policyId: 2n, * admin: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ setAdmin: ( parameters: policyActions.setAdmin.Parameters, ) => Promise /** * Sets the admin for a policy. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.policy.setAdminSync({ * policyId: 2n, * admin: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ setAdminSync: ( parameters: policyActions.setAdminSync.Parameters, ) => Promise /** * Modifies a policy whitelist. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.policy.modifyWhitelist({ * policyId: 2n, * address: '0x...', * allowed: true, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ modifyWhitelist: ( parameters: policyActions.modifyWhitelist.Parameters, ) => Promise /** * Modifies a policy whitelist. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.policy.modifyWhitelistSync({ * policyId: 2n, * address: '0x...', * allowed: true, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ modifyWhitelistSync: ( parameters: policyActions.modifyWhitelistSync.Parameters, ) => Promise /** * Modifies a policy blacklist. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.policy.modifyBlacklist({ * policyId: 2n, * address: '0x...', * restricted: true, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ modifyBlacklist: ( parameters: policyActions.modifyBlacklist.Parameters, ) => Promise /** * Modifies a policy blacklist. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.policy.modifyBlacklistSync({ * policyId: 2n, * address: '0x...', * restricted: true, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ modifyBlacklistSync: ( parameters: policyActions.modifyBlacklistSync.Parameters, ) => Promise /** * Gets policy data. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const data = await client.policy.getData({ * policyId: 2n, * }) * ``` * * @param parameters - Parameters. * @returns The policy data. */ getData: ( parameters: policyActions.getData.Parameters, ) => Promise /** * Checks if a user is authorized by a policy. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const authorized = await client.policy.isAuthorized({ * policyId: 2n, * user: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns Whether the user is authorized. */ isAuthorized: ( parameters: policyActions.isAuthorized.Parameters, ) => Promise /** * Watches for policy creation events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.policy.watchCreate({ * onPolicyCreated: (args, log) => { * console.log('Policy created:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchCreate: ( parameters: policyActions.watchCreate.Parameters, ) => () => void /** * Watches for policy admin update events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.policy.watchAdminUpdated({ * onAdminUpdated: (args, log) => { * console.log('Policy admin updated:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchAdminUpdated: ( parameters: policyActions.watchAdminUpdated.Parameters, ) => () => void /** * Watches for whitelist update events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.policy.watchWhitelistUpdated({ * onWhitelistUpdated: (args, log) => { * console.log('Whitelist updated:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchWhitelistUpdated: ( parameters: policyActions.watchWhitelistUpdated.Parameters, ) => () => void /** * Watches for blacklist update events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.policy.watchBlacklistUpdated({ * onBlacklistUpdated: (args, log) => { * console.log('Blacklist updated:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchBlacklistUpdated: ( parameters: policyActions.watchBlacklistUpdated.Parameters, ) => () => void } reward: { /** * Claims accumulated rewards for a recipient. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.reward.claim({ * token: '0x20c0000000000000000000000000000000000001', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ claim: ( parameters: rewardActions.claim.Parameters, ) => Promise /** * Claims accumulated rewards for a recipient and waits for confirmation. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.reward.claimSync({ * token: '0x20c0000000000000000000000000000000000001', * }) * ``` * * @param parameters - Parameters. * @returns The amount claimed and transaction receipt. */ claimSync: ( parameters: rewardActions.claimSync.Parameters, ) => Promise /** * Distributes rewards to opted-in token holders. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.reward.distribute({ * amount: 100000000000000000000n, * token: '0x20c0000000000000000000000000000000000001', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ distribute: ( parameters: rewardActions.distribute.Parameters, ) => Promise /** * Distributes rewards to opted-in token holders and waits for confirmation. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { funder, amount, receipt } = await client.reward.distributeSync({ * amount: 100000000000000000000n, * token: '0x20c0000000000000000000000000000000000001', * }) * ``` * * @param parameters - Parameters. * @returns The funder, amount, and transaction receipt. */ distributeSync: ( parameters: rewardActions.distributeSync.Parameters, ) => Promise /** * Gets the reward information for a specific account. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const info = await client.reward.getUserRewardInfo({ * token: '0x20c0000000000000000000000000000000000001', * account: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC', * }) * ``` * * @param parameters - Parameters. * @returns The user's reward information (recipient, rewardPerToken, rewardBalance). */ getUserRewardInfo: ( parameters: rewardActions.getUserRewardInfo.Parameters, ) => Promise /** * Sets or changes the reward recipient for a token holder. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.reward.setRecipient({ * recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC', * token: '0x20c0000000000000000000000000000000000001', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ setRecipient: ( parameters: rewardActions.setRecipient.Parameters, ) => Promise /** * Sets or changes the reward recipient for a token holder and waits for confirmation. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.reward.setRecipientSync({ * recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC', * token: '0x20c0000000000000000000000000000000000001', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ setRecipientSync: ( parameters: rewardActions.setRecipientSync.Parameters, ) => Promise /** * Watches for reward distributed events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.reward.watchRewardDistributed({ * token: '0x20c0000000000000000000000000000000000001', * onRewardDistributed: (args, log) => { * console.log('Reward distributed:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchRewardDistributed: ( parameters: rewardActions.watchRewardDistributed.Parameters, ) => () => void /** * Watches for reward recipient set events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.reward.watchRewardRecipientSet({ * token: '0x20c0000000000000000000000000000000000001', * onRewardRecipientSet: (args, log) => { * console.log('Reward recipient set:', args) * }, * }) * ``` * * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchRewardRecipientSet: ( parameters: rewardActions.watchRewardRecipientSet.Parameters, ) => () => void } simulate: { /** * Simulates a set of calls on block(s) via `tempo_simulateV1`. * * @example * ```ts * import { createClient, http, parseUnits } from 'viem' * import { tempo } from 'viem/chains' * import { Actions, tempoActions } from 'viem/tempo' * * const client = createClient({ * account: '0x...', * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const { blocks, tokenMetadata } = await client.simulate.simulateBlocks({ * blocks: [{ * calls: [ * Actions.token.transfer.call({ * token: '0x20c0...01', * to: '0x...', * amount: parseUnits('100', 6), * }), * ], * }], * traceTransfers: true, * }) * ``` * * @param parameters - Parameters. * @returns Simulated blocks and token metadata. */ simulateBlocks: ( parameters: simulateActions.simulateBlocks.Parameters, ) => Promise> /** * Simulates execution of a batch of calls via `tempo_simulateV1`. * * @example * ```ts * import { createClient, http, parseUnits } from 'viem' * import { tempo } from 'viem/chains' * import { Actions, Addresses, tempoActions } from 'viem/tempo' * * const client = createClient({ * account: '0x...', * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const { results, tokenMetadata } = await client.simulate.simulateCalls({ * calls: [ * Actions.token.approve.call({ * token: '0x20c0...01', * spender: Addresses.stablecoinDex, * amount: parseUnits('100', 6), * }), * Actions.dex.buy.call({ * tokenIn: '0x20c0...01', * tokenOut: '0x20c0...02', * amountOut: parseUnits('10', 6), * maxAmountIn: parseUnits('100', 6), * }), * Actions.token.transfer.call({ * token: '0x20c0...02', * to: '0x...', * amount: parseUnits('10', 6), * }), * ], * traceTransfers: true, * }) * ``` * * @param parameters - Parameters. * @returns Results, block, and token metadata. */ simulateCalls: < const calls extends readonly unknown[], account extends Account | Address | undefined = undefined, >( parameters: simulateActions.simulateCalls.Parameters, ) => Promise> } token: { /** * Approves a spender to transfer TIP20 tokens on behalf of the caller. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.approve({ * spender: '0x...', * amount: 100n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ approve: ( parameters: tokenActions.approve.Parameters, ) => Promise /** * Approves a spender to transfer TIP20 tokens on behalf of the caller. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.approveSync({ * spender: '0x...', * amount: 100n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ approveSync: ( parameters: tokenActions.approveSync.Parameters, ) => Promise /** * Burns TIP20 tokens from a blocked address. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.burnBlocked({ * from: '0x...', * amount: 100n, * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ burnBlocked: ( parameters: tokenActions.burnBlocked.Parameters, ) => Promise /** * Burns TIP20 tokens from a blocked address. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.burnBlockedSync({ * from: '0x...', * amount: 100n, * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ burnBlockedSync: ( parameters: tokenActions.burnBlockedSync.Parameters, ) => Promise /** * Burns TIP20 tokens from the caller's balance. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.burn({ * amount: 100n, * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ burn: ( parameters: tokenActions.burn.Parameters, ) => Promise /** * Burns TIP20 tokens from the caller's balance. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.burnSync({ * amount: 100n, * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ burnSync: ( parameters: tokenActions.burnSync.Parameters, ) => Promise /** * Changes the transfer policy ID for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.changeTransferPolicy({ * token: '0x...', * policyId: 1n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ changeTransferPolicy: ( parameters: tokenActions.changeTransferPolicy.Parameters, ) => Promise /** * Changes the transfer policy ID for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.changeTransferPolicySync({ * token: '0x...', * policyId: 1n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ changeTransferPolicySync: ( parameters: tokenActions.changeTransferPolicySync.Parameters< chain, account >, ) => Promise /** * Creates a new TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { hash, id, address } = await client.token.create({ * name: 'My Token', * symbol: 'MTK', * currency: 'USD', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ create: ( parameters: tokenActions.create.Parameters, ) => Promise /** * Creates a new TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.createSync({ * name: 'My Token', * symbol: 'MTK', * currency: 'USD', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ createSync: ( parameters: tokenActions.createSync.Parameters, ) => Promise /** * Gets TIP20 token allowance. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const allowance = await client.token.getAllowance({ * spender: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The token allowance. */ getAllowance: ( parameters: tokenActions.getAllowance.Parameters, ) => Promise /** * Gets TIP20 token balance for an address. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const balance = await client.token.getBalance() * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The token balance. */ getBalance: ( parameters: tokenActions.getBalance.Parameters, ) => Promise /** * Gets TIP20 token metadata including name, symbol, currency, decimals, and total supply. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const metadata = await client.token.getMetadata({ * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The token metadata. */ getMetadata: ( parameters: tokenActions.getMetadata.Parameters, ) => Promise /** * Gets the admin role for a specific role in a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const adminRole = await client.token.getRoleAdmin({ * role: 'issuer', * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The admin role hash. */ getRoleAdmin: ( parameters: tokenActions.getRoleAdmin.Parameters, ) => Promise /** * Checks if an account has a specific role for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hasRole = await client.token.hasRole({ * token: '0x...', * role: 'issuer', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns Whether the account has the role. */ hasRole: ( parameters: tokenActions.hasRole.Parameters, ) => Promise /** * Grants a role for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.grantRoles({ * token: '0x...', * to: '0x...', * roles: ['issuer'], * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ grantRoles: ( parameters: tokenActions.grantRoles.Parameters, ) => Promise /** * Grants a role for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.grantRolesSync({ * token: '0x...', * to: '0x...', * roles: ['issuer'], * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ grantRolesSync: ( parameters: tokenActions.grantRolesSync.Parameters, ) => Promise /** * Mints TIP20 tokens to an address. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.mint({ * to: '0x...', * amount: 100n, * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ mint: ( parameters: tokenActions.mint.Parameters, ) => Promise /** * Mints TIP20 tokens to an address. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.mintSync({ * to: '0x...', * amount: 100n, * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ mintSync: ( parameters: tokenActions.mintSync.Parameters, ) => Promise /** * Pauses a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.pause({ * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ pause: ( parameters: tokenActions.pause.Parameters, ) => Promise /** * Pauses a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.pauseSync({ * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ pauseSync: ( parameters: tokenActions.pauseSync.Parameters, ) => Promise /** * Renounces a role for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.renounceRoles({ * token: '0x...', * roles: ['issuer'], * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ renounceRoles: ( parameters: tokenActions.renounceRoles.Parameters, ) => Promise /** * Renounces a role for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.renounceRolesSync({ * token: '0x...', * roles: ['issuer'], * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ renounceRolesSync: ( parameters: tokenActions.renounceRolesSync.Parameters, ) => Promise /** * Revokes a role for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.revokeRoles({ * token: '0x...', * from: '0x...', * roles: ['issuer'], * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ revokeRoles: ( parameters: tokenActions.revokeRoles.Parameters, ) => Promise /** * Revokes a role for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.revokeRolesSync({ * token: '0x...', * from: '0x...', * roles: ['issuer'], * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ revokeRolesSync: ( parameters: tokenActions.revokeRolesSync.Parameters, ) => Promise /** * Sets the supply cap for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.setSupplyCap({ * token: '0x...', * supplyCap: 1000000n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ setSupplyCap: ( parameters: tokenActions.setSupplyCap.Parameters, ) => Promise /** * Sets the supply cap for a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.setSupplyCapSync({ * token: '0x...', * supplyCap: 1000000n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ setSupplyCapSync: ( parameters: tokenActions.setSupplyCapSync.Parameters, ) => Promise /** * Sets the admin role for a specific role in a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.setRoleAdmin({ * token: '0x...', * role: 'issuer', * adminRole: 'admin', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ setRoleAdmin: ( parameters: tokenActions.setRoleAdmin.Parameters, ) => Promise /** * Sets the admin role for a specific role in a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.setRoleAdminSync({ * token: '0x...', * role: 'issuer', * adminRole: 'admin', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ setRoleAdminSync: ( parameters: tokenActions.setRoleAdminSync.Parameters, ) => Promise /** * Transfers TIP20 tokens to another address. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.transfer({ * to: '0x...', * amount: 100n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ transfer: ( parameters: tokenActions.transfer.Parameters, ) => Promise /** * Transfers TIP20 tokens to another address. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.transferSync({ * to: '0x...', * amount: 100n, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ transferSync: ( parameters: tokenActions.transferSync.Parameters, ) => Promise /** * Unpauses a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.token.unpause({ * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction hash. */ unpause: ( parameters: tokenActions.unpause.Parameters, ) => Promise /** * Unpauses a TIP20 token. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const result = await client.token.unpauseSync({ * token: '0x...', * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns The transaction receipt and event data. */ unpauseSync: ( parameters: tokenActions.unpauseSync.Parameters, ) => Promise /** * Watches for TIP20 token approval events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.token.watchApprove({ * onApproval: (args, log) => { * console.log('Approval:', args) * }, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchApprove: ( parameters: tokenActions.watchApprove.Parameters, ) => () => void /** * Watches for TIP20 token burn events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.token.watchBurn({ * onBurn: (args, log) => { * console.log('Burn:', args) * }, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchBurn: (parameters: tokenActions.watchBurn.Parameters) => () => void /** * Watches for new TIP20 tokens created. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.token.watchCreate({ * onTokenCreated: (args, log) => { * console.log('Token created:', args) * }, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchCreate: (parameters: tokenActions.watchCreate.Parameters) => () => void /** * Watches for TIP20 token mint events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.token.watchMint({ * onMint: (args, log) => { * console.log('Mint:', args) * }, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchMint: (parameters: tokenActions.watchMint.Parameters) => () => void /** * Watches for TIP20 token role admin updates. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.token.watchAdminRole({ * onRoleAdminUpdated: (args, log) => { * console.log('Role admin updated:', args) * }, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchAdminRole: ( parameters: tokenActions.watchAdminRole.Parameters, ) => () => void /** * Watches for TIP20 token role membership updates. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.token.watchRole({ * onRoleUpdated: (args, log) => { * console.log('Role updated:', args) * }, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchRole: (parameters: tokenActions.watchRole.Parameters) => () => void /** * Watches for TIP20 token transfer events. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const unwatch = client.token.watchTransfer({ * onTransfer: (args, log) => { * console.log('Transfer:', args) * }, * }) * ``` * * @param client - Client. * @param parameters - Parameters. * @returns A function to unsubscribe from the event. */ watchTransfer: ( parameters: tokenActions.watchTransfer.Parameters, ) => () => void } validator: { /** * Adds a new validator (owner only). * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.validator.add({ * newValidatorAddress: '0x...', * publicKey: '0x...', * active: true, * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ add: ( parameters: validatorActions.add.Parameters, ) => Promise /** * Adds a new validator (owner only) and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { receipt } = await client.validator.addSync({ * newValidatorAddress: '0x...', * publicKey: '0x...', * active: true, * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ addSync: ( parameters: validatorActions.addSync.Parameters, ) => Promise /** * Changes the owner of the validator config precompile. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.validator.changeOwner({ * newOwner: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ changeOwner: ( parameters: validatorActions.changeOwner.Parameters, ) => Promise /** * Changes the owner of the validator config precompile and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { receipt } = await client.validator.changeOwnerSync({ * newOwner: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ changeOwnerSync: ( parameters: validatorActions.changeOwnerSync.Parameters, ) => Promise /** * Changes validator active status (owner only). * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.validator.changeStatus({ * validator: '0x...', * active: false, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ changeStatus: ( parameters: validatorActions.changeStatus.Parameters, ) => Promise /** * Changes validator active status and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { receipt } = await client.validator.changeStatusSync({ * validator: '0x...', * active: false, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ changeStatusSync: ( parameters: validatorActions.changeStatusSync.Parameters, ) => Promise /** * Gets validator information by address. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const validator = await client.validator.get({ * validator: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The validator information. */ get: ( parameters: validatorActions.get.Parameters, ) => Promise /** * Gets validator address by index. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const validatorAddress = await client.validator.getByIndex({ * index: 0n, * }) * ``` * * @param parameters - Parameters. * @returns The validator address at the given index. */ getByIndex: ( parameters: validatorActions.getByIndex.Parameters, ) => Promise /** * Gets the total number of validators. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const count = await client.validator.getCount() * ``` * * @param parameters - Parameters. * @returns The total number of validators. */ getCount: ( parameters?: validatorActions.getCount.Parameters, ) => Promise /** * Gets the next epoch for a full DKG ceremony. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const epoch = await client.validator.getNextFullDkgCeremony() * ``` * * @param parameters - Parameters. * @returns The epoch number for the next full DKG ceremony. */ getNextFullDkgCeremony: ( parameters?: validatorActions.getNextFullDkgCeremony.Parameters, ) => Promise /** * Gets the contract owner. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const owner = await client.validator.getOwner() * ``` * * @param parameters - Parameters. * @returns The owner address. */ getOwner: ( parameters?: validatorActions.getOwner.Parameters, ) => Promise /** * Gets the complete set of validators. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const validators = await client.validator.list() * ``` * * @param parameters - Parameters. * @returns Array of all validators with their information. */ list: ( parameters?: validatorActions.list.Parameters, ) => Promise /** * Sets the next epoch for a full DKG ceremony. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.validator.setNextFullDkgCeremony({ * epoch: 100n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ setNextFullDkgCeremony: ( parameters: validatorActions.setNextFullDkgCeremony.Parameters< chain, account >, ) => Promise /** * Sets the next epoch for a full DKG ceremony and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { receipt } = await client.validator.setNextFullDkgCeremonySync({ * epoch: 100n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ setNextFullDkgCeremonySync: ( parameters: validatorActions.setNextFullDkgCeremonySync.Parameters< chain, account >, ) => Promise /** * Updates validator information (only callable by the validator themselves). * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const hash = await client.validator.update({ * newValidatorAddress: '0x...', * publicKey: '0x...', * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ update: ( parameters: validatorActions.update.Parameters, ) => Promise /** * Updates validator information and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo * transport: http(), * }).extend(tempoActions()) * * const { receipt } = await client.validator.updateSync({ * newValidatorAddress: '0x...', * publicKey: '0x...', * inboundAddress: '192.168.1.1:8080', * outboundAddress: '192.168.1.1:8080', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ updateSync: ( parameters: validatorActions.updateSync.Parameters, ) => Promise } virtualAddress: { /** * Gets the registered master address for a given master ID. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const master = await client.virtualAddress.getMasterAddress({ * masterId: '0x58e21090', * }) * ``` * * @param parameters - Parameters. * @returns The master address, or null if unregistered. */ getMasterAddress: ( parameters: virtualAddressActions.getMasterAddress.Parameters, ) => Promise /** * Registers the caller as a virtual address master. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const hash = await client.virtualAddress.registerMaster({ * salt: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ registerMaster: ( parameters: virtualAddressActions.registerMaster.Parameters< chain, account >, ) => Promise /** * Registers the caller as a virtual address master and waits for confirmation. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const { receipt, masterId, masterAddress } = * await client.virtualAddress.registerMasterSync({ * salt: '0x...', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt and event data. */ registerMasterSync: ( parameters: virtualAddressActions.registerMasterSync.Parameters< chain, account >, ) => Promise /** * Resolves an address to its effective recipient. * * @example * ```ts * import { createClient, http } from 'viem' * import { tempo } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: tempo, * transport: http(), * }).extend(tempoActions()) * * const recipient = await client.virtualAddress.resolve({ * address: '0x58e21090fdfdfdfdfdfdfdfdfdfd010203040506', * }) * ``` * * @param parameters - Parameters. * @returns The resolved address, or null if virtual and unregistered. */ resolve: ( parameters: virtualAddressActions.resolve.Parameters, ) => Promise } zone: { /** * Deposits tokens into a zone. * Batches approve and deposit into a single transaction. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempoModerato } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempoModerato, * transport: http(), * }).extend(tempoActions()) * * const hash = await client.zone.deposit({ * token: '0x20c0...0001', * amount: 1_000_000n, * zoneId: 7, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ deposit: ( parameters: zoneActions.deposit.Parameters, ) => Promise /** * Deposits tokens into a zone and waits for the transaction receipt. * * @example * ```ts * import { createClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { tempoModerato } from 'viem/chains' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: tempoModerato, * transport: http(), * }).extend(tempoActions()) * * const { receipt } = await client.zone.depositSync({ * token: '0x20c0...0001', * amount: 1_000_000n, * zoneId: 7, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ depositSync: ( parameters: zoneActions.depositSync.Parameters, ) => Promise /** * Deposits tokens into a zone with encrypted recipient and memo. * * @example * ```ts * const hash = await client.zone.encryptedDeposit({ * token: '0x20c0...0001', * amount: 1_000_000n, * zoneId: 7, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ encryptedDeposit: ( parameters: zoneActions.encryptedDeposit.Parameters, ) => Promise /** * Deposits tokens into a zone with encrypted recipient and memo and * waits for the transaction receipt. * * @example * ```ts * const { receipt } = await client.zone.encryptedDepositSync({ * token: '0x20c0...0001', * amount: 1_000_000n, * zoneId: 7, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ encryptedDepositSync: ( parameters: zoneActions.encryptedDepositSync.Parameters, ) => Promise /** * Returns the authenticated account address and authorization token expiry. * * @example * ```ts * import { createClient } from 'viem' * import { http, zoneModerato } from 'viem/tempo/zones' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: zoneModerato(7), * transport: http(), * }).extend(tempoActions()) * * const info = await client.zone.getAuthorizationTokenInfo() * ``` * * @returns The account address and token expiry. */ getAuthorizationTokenInfo: () => Promise /** * Returns deposit processing status for a given Tempo block number. * * @example * ```ts * import { createClient } from 'viem' * import { http, zoneModerato } from 'viem/tempo/zones' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: zoneModerato(7), * transport: http(), * }).extend(tempoActions()) * * const status = await client.zone.getDepositStatus({ * tempoBlockNumber: 1n, * }) * ``` * * @param parameters - Parameters. * @returns The deposit status. */ getDepositStatus: ( parameters: zoneActions.getDepositStatus.Parameters, ) => Promise /** * Returns the withdrawal fee for a given gas limit. * * @example * ```ts * import { createClient } from 'viem' * import { http, zoneModerato } from 'viem/tempo/zones' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: zoneModerato(7), * transport: http(), * }).extend(tempoActions()) * * const fee = await client.zone.getWithdrawalFee() * ``` * * @param parameters - Parameters. * @returns The withdrawal fee. */ getWithdrawalFee: ( parameters?: zoneActions.getWithdrawalFee.Parameters, ) => Promise /** * Returns the current zone metadata. * * @example * ```ts * import { createClient } from 'viem' * import { http, zoneModerato } from 'viem/tempo/zones' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * chain: zoneModerato(7), * transport: http(), * }).extend(tempoActions()) * * const info = await client.zone.getZoneInfo() * ``` * * @returns The zone metadata. */ getZoneInfo: () => Promise /** * Requests a withdrawal from a zone to the parent Tempo chain. * Batches approve and withdrawal into a single transaction. * * @example * ```ts * import { createClient } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { http, zoneModerato } from 'viem/tempo/zones' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: zoneModerato(7), * transport: http(), * }).extend(tempoActions()) * * const hash = await client.zone.requestWithdrawal({ * token: '0x20c0...0001', * amount: 1_000_000n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ requestWithdrawal: ( parameters: zoneActions.requestWithdrawal.Parameters, ) => Promise /** * Requests a withdrawal and waits for the transaction receipt. * * @example * ```ts * import { createClient } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { http, zoneModerato } from 'viem/tempo/zones' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: zoneModerato(7), * transport: http(), * }).extend(tempoActions()) * * const { receipt } = await client.zone.requestWithdrawalSync({ * token: '0x20c0...0001', * amount: 1_000_000n, * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ requestWithdrawalSync: ( parameters: zoneActions.requestWithdrawalSync.Parameters, ) => Promise /** * Requests a verifiable withdrawal from a zone. * * @example * ```ts * const hash = await client.zone.requestVerifiableWithdrawal({ * token: '0x20c0...0001', * amount: 1_000_000n, * revealTo: '0x02abc...def', * }) * ``` * * @param parameters - Parameters. * @returns The transaction hash. */ requestVerifiableWithdrawal: ( parameters: zoneActions.requestVerifiableWithdrawal.Parameters< chain, account >, ) => Promise /** * Requests a verifiable withdrawal and waits for the transaction receipt. * * @example * ```ts * const { receipt } = await client.zone.requestVerifiableWithdrawalSync({ * token: '0x20c0...0001', * amount: 1_000_000n, * revealTo: '0x02abc...def', * }) * ``` * * @param parameters - Parameters. * @returns The transaction receipt. */ requestVerifiableWithdrawalSync: ( parameters: zoneActions.requestVerifiableWithdrawalSync.Parameters< chain, account >, ) => Promise /** * Signs and stores a zone authorization token. * * @example * ```ts * import { createClient } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { http, zoneModerato } from 'viem/tempo/zones' * import { tempoActions } from 'viem/tempo' * * const client = createClient({ * account: privateKeyToAccount('0x...'), * chain: zoneModerato(7), * transport: http(), * }).extend(tempoActions()) * * const result = await client.zone.signAuthorizationToken() * ``` * * @param parameters - Parameters. * @returns The authentication object and serialized token. */ signAuthorizationToken: ( parameters?: zoneActions.signAuthorizationToken.Parameters, ) => Promise } } export function decorator() { return < transport extends Transport, chain extends Chain | undefined, account extends Account | undefined, >( client: Client, ): Decorator => { return { accessKey: { authorize: (parameters) => accessKeyActions.authorize(client, parameters), authorizeSync: (parameters) => accessKeyActions.authorizeSync(client, parameters), getMetadata: (parameters) => accessKeyActions.getMetadata(client, parameters), getRemainingLimit: (parameters) => accessKeyActions.getRemainingLimit(client, parameters), revoke: (parameters) => accessKeyActions.revoke(client, parameters), revokeSync: (parameters) => accessKeyActions.revokeSync(client, parameters), updateLimit: (parameters) => accessKeyActions.updateLimit(client, parameters), updateLimitSync: (parameters) => accessKeyActions.updateLimitSync(client, parameters), }, amm: { getPool: (parameters) => ammActions.getPool(client, parameters), getLiquidityBalance: (parameters) => ammActions.getLiquidityBalance(client, parameters), burn: (parameters) => ammActions.burn(client, parameters), burnSync: (parameters) => ammActions.burnSync(client, parameters), mint: (parameters) => ammActions.mint(client, parameters), mintSync: (parameters) => ammActions.mintSync(client, parameters), rebalanceSwap: (parameters) => ammActions.rebalanceSwap(client, parameters), rebalanceSwapSync: (parameters) => ammActions.rebalanceSwapSync(client, parameters), watchBurn: (parameters) => ammActions.watchBurn(client, parameters), watchMint: (parameters) => ammActions.watchMint(client, parameters), watchRebalanceSwap: (parameters) => ammActions.watchRebalanceSwap(client, parameters), }, dex: { buy: (parameters) => dexActions.buy(client, parameters), buySync: (parameters) => dexActions.buySync(client, parameters), cancel: (parameters) => dexActions.cancel(client, parameters), cancelSync: (parameters) => dexActions.cancelSync(client, parameters), cancelStale: (parameters) => dexActions.cancelStale(client, parameters), cancelStaleSync: (parameters) => dexActions.cancelStaleSync(client, parameters), createPair: (parameters) => dexActions.createPair(client, parameters), createPairSync: (parameters) => dexActions.createPairSync(client, parameters), getBalance: (parameters) => dexActions.getBalance(client, parameters), getBuyQuote: (parameters) => dexActions.getBuyQuote(client, parameters), getOrder: (parameters) => dexActions.getOrder(client, parameters), getTickLevel: (parameters) => dexActions.getTickLevel(client, parameters), getSellQuote: (parameters) => dexActions.getSellQuote(client, parameters), place: (parameters) => dexActions.place(client, parameters), placeSync: (parameters) => dexActions.placeSync(client, parameters), placeFlip: (parameters) => dexActions.placeFlip(client, parameters), placeFlipSync: (parameters) => dexActions.placeFlipSync(client, parameters), sell: (parameters) => dexActions.sell(client, parameters), sellSync: (parameters) => dexActions.sellSync(client, parameters), withdraw: (parameters) => dexActions.withdraw(client, parameters), withdrawSync: (parameters) => dexActions.withdrawSync(client, parameters), watchFlipOrderPlaced: (parameters) => dexActions.watchFlipOrderPlaced(client, parameters), watchOrderCancelled: (parameters) => dexActions.watchOrderCancelled(client, parameters), watchOrderFilled: (parameters) => dexActions.watchOrderFilled(client, parameters), watchOrderPlaced: (parameters) => dexActions.watchOrderPlaced(client, parameters), }, faucet: { fund: (parameters) => faucetActions.fund(client, parameters), fundSync: (parameters) => faucetActions.fundSync(client, parameters), }, nonce: { getNonce: (parameters) => nonceActions.getNonce(client, parameters), watchNonceIncremented: (parameters) => nonceActions.watchNonceIncremented(client, parameters), }, fee: { // @ts-expect-error getUserToken: (parameters) => // @ts-expect-error feeActions.getUserToken(client, parameters), setUserToken: (parameters) => feeActions.setUserToken(client, parameters), setUserTokenSync: (parameters) => feeActions.setUserTokenSync(client, parameters), watchSetUserToken: (parameters) => feeActions.watchSetUserToken(client, parameters), }, policy: { create: (parameters) => policyActions.create(client, parameters), createSync: (parameters) => policyActions.createSync(client, parameters), setAdmin: (parameters) => policyActions.setAdmin(client, parameters), setAdminSync: (parameters) => policyActions.setAdminSync(client, parameters), modifyWhitelist: (parameters) => policyActions.modifyWhitelist(client, parameters), modifyWhitelistSync: (parameters) => policyActions.modifyWhitelistSync(client, parameters), modifyBlacklist: (parameters) => policyActions.modifyBlacklist(client, parameters), modifyBlacklistSync: (parameters) => policyActions.modifyBlacklistSync(client, parameters), getData: (parameters) => policyActions.getData(client, parameters), isAuthorized: (parameters) => policyActions.isAuthorized(client, parameters), watchCreate: (parameters) => policyActions.watchCreate(client, parameters), watchAdminUpdated: (parameters) => policyActions.watchAdminUpdated(client, parameters), watchWhitelistUpdated: (parameters) => policyActions.watchWhitelistUpdated(client, parameters), watchBlacklistUpdated: (parameters) => policyActions.watchBlacklistUpdated(client, parameters), }, reward: { claim: (parameters) => rewardActions.claim(client, parameters), claimSync: (parameters) => rewardActions.claimSync(client, parameters), distribute: (parameters) => rewardActions.distribute(client, parameters), distributeSync: (parameters) => rewardActions.distributeSync(client, parameters), getUserRewardInfo: (parameters) => rewardActions.getUserRewardInfo(client, parameters), setRecipient: (parameters) => rewardActions.setRecipient(client, parameters), setRecipientSync: (parameters) => rewardActions.setRecipientSync(client, parameters), watchRewardDistributed: (parameters) => rewardActions.watchRewardDistributed(client, parameters), watchRewardRecipientSet: (parameters) => rewardActions.watchRewardRecipientSet(client, parameters), }, simulate: { simulateBlocks: (parameters) => simulateActions.simulateBlocks(client, parameters), simulateCalls: (parameters) => simulateActions.simulateCalls(client, parameters), }, token: { approve: (parameters) => tokenActions.approve(client, parameters), approveSync: (parameters) => tokenActions.approveSync(client, parameters), burnBlocked: (parameters) => tokenActions.burnBlocked(client, parameters), burnBlockedSync: (parameters) => tokenActions.burnBlockedSync(client, parameters), burn: (parameters) => tokenActions.burn(client, parameters), burnSync: (parameters) => tokenActions.burnSync(client, parameters), changeTransferPolicy: (parameters) => tokenActions.changeTransferPolicy(client, parameters), changeTransferPolicySync: (parameters) => tokenActions.changeTransferPolicySync(client, parameters), create: (parameters) => tokenActions.create(client, parameters), createSync: (parameters) => tokenActions.createSync(client, parameters), getAllowance: (parameters) => tokenActions.getAllowance(client, parameters), getBalance: (parameters) => tokenActions.getBalance(client, parameters), getMetadata: (parameters) => tokenActions.getMetadata(client, parameters), getRoleAdmin: (parameters) => tokenActions.getRoleAdmin(client, parameters), hasRole: (parameters) => tokenActions.hasRole(client, parameters), grantRoles: (parameters) => tokenActions.grantRoles(client, parameters), grantRolesSync: (parameters) => tokenActions.grantRolesSync(client, parameters), mint: (parameters) => tokenActions.mint(client, parameters), mintSync: (parameters) => tokenActions.mintSync(client, parameters), pause: (parameters) => tokenActions.pause(client, parameters), pauseSync: (parameters) => tokenActions.pauseSync(client, parameters), renounceRoles: (parameters) => tokenActions.renounceRoles(client, parameters), renounceRolesSync: (parameters) => tokenActions.renounceRolesSync(client, parameters), revokeRoles: (parameters) => tokenActions.revokeRoles(client, parameters), revokeRolesSync: (parameters) => tokenActions.revokeRolesSync(client, parameters), setSupplyCap: (parameters) => tokenActions.setSupplyCap(client, parameters), setSupplyCapSync: (parameters) => tokenActions.setSupplyCapSync(client, parameters), setRoleAdmin: (parameters) => tokenActions.setRoleAdmin(client, parameters), setRoleAdminSync: (parameters) => tokenActions.setRoleAdminSync(client, parameters), transfer: (parameters) => tokenActions.transfer(client, parameters), transferSync: (parameters) => tokenActions.transferSync(client, parameters), unpause: (parameters) => tokenActions.unpause(client, parameters), unpauseSync: (parameters) => tokenActions.unpauseSync(client, parameters), watchApprove: (parameters) => tokenActions.watchApprove(client, parameters), watchBurn: (parameters) => tokenActions.watchBurn(client, parameters), watchCreate: (parameters) => tokenActions.watchCreate(client, parameters), watchMint: (parameters) => tokenActions.watchMint(client, parameters), watchAdminRole: (parameters) => tokenActions.watchAdminRole(client, parameters), watchRole: (parameters) => tokenActions.watchRole(client, parameters), watchTransfer: (parameters) => tokenActions.watchTransfer(client, parameters), }, validator: { add: (parameters) => validatorActions.add(client, parameters), addSync: (parameters) => validatorActions.addSync(client, parameters), changeOwner: (parameters) => validatorActions.changeOwner(client, parameters), changeOwnerSync: (parameters) => validatorActions.changeOwnerSync(client, parameters), changeStatus: (parameters) => validatorActions.changeStatus(client, parameters), changeStatusSync: (parameters) => validatorActions.changeStatusSync(client, parameters), get: (parameters) => validatorActions.get(client, parameters), getByIndex: (parameters) => validatorActions.getByIndex(client, parameters), getCount: (parameters) => validatorActions.getCount(client, parameters), getNextFullDkgCeremony: (parameters) => validatorActions.getNextFullDkgCeremony(client, parameters), getOwner: (parameters) => validatorActions.getOwner(client, parameters), list: (parameters) => validatorActions.list(client, parameters), setNextFullDkgCeremony: (parameters) => validatorActions.setNextFullDkgCeremony(client, parameters), setNextFullDkgCeremonySync: (parameters) => validatorActions.setNextFullDkgCeremonySync(client, parameters), update: (parameters) => validatorActions.update(client, parameters), updateSync: (parameters) => validatorActions.updateSync(client, parameters), }, virtualAddress: { getMasterAddress: (parameters) => virtualAddressActions.getMasterAddress(client, parameters), registerMaster: (parameters) => virtualAddressActions.registerMaster(client, parameters), registerMasterSync: (parameters) => virtualAddressActions.registerMasterSync(client, parameters), resolve: (parameters) => virtualAddressActions.resolve(client, parameters), }, zone: { deposit: (parameters) => zoneActions.deposit(client, parameters), depositSync: (parameters) => zoneActions.depositSync(client, parameters), encryptedDeposit: (parameters) => zoneActions.encryptedDeposit(client, parameters), encryptedDepositSync: (parameters) => zoneActions.encryptedDepositSync(client, parameters), getAuthorizationTokenInfo: () => zoneActions.getAuthorizationTokenInfo(client), getDepositStatus: (parameters) => zoneActions.getDepositStatus(client, parameters), getWithdrawalFee: (parameters) => zoneActions.getWithdrawalFee(client, parameters), getZoneInfo: () => zoneActions.getZoneInfo(client), requestWithdrawal: (parameters) => zoneActions.requestWithdrawal(client, parameters), requestWithdrawalSync: (parameters) => zoneActions.requestWithdrawalSync(client, parameters), requestVerifiableWithdrawal: (parameters) => zoneActions.requestVerifiableWithdrawal(client, parameters), requestVerifiableWithdrawalSync: (parameters) => zoneActions.requestVerifiableWithdrawalSync(client, parameters), signAuthorizationToken: (parameters) => zoneActions.signAuthorizationToken(client, parameters), }, } } }