viem
Version:
259 lines • 8.87 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.decorator = decorator;
const createClient_js_1 = require("../clients/createClient.js");
const accessKeyActions = require("./actions/accessKey.js");
const ammActions = require("./actions/amm.js");
const channelActions = require("./actions/channel.js");
const dexActions = require("./actions/dex.js");
const faucetActions = require("./actions/faucet.js");
const feeActions = require("./actions/fee.js");
const nonceActions = require("./actions/nonce.js");
const policyActions = require("./actions/policy.js");
const receivePolicyActions = require("./actions/receivePolicy.js");
const rewardActions = require("./actions/reward.js");
const simulateActions = require("./actions/simulate.js");
const tokenActions = require("./actions/token.js");
const validatorActions = require("./actions/validator.js");
const virtualAddressActions = require("./actions/virtualAddress.js");
const zoneActions = require("./actions/zone.js");
function bindActions(client, actions, keys) {
const bound = {};
for (const key of keys)
bound[key] = (0, createClient_js_1.bindActionDecorators)(client, actions[key]);
return bound;
}
function decorator() {
return (client) => {
return {
accessKey: bindActions(client, accessKeyActions, [
'authorize',
'authorizeSync',
'burnWitness',
'burnWitnessSync',
'getMetadata',
'getRemainingLimit',
'isAdmin',
'isWitnessBurned',
'revoke',
'revokeSync',
'signAuthorization',
'updateLimit',
'updateLimitSync',
'verifyHash',
'watchAdminAuthorized',
'watchWitness',
'watchWitnessBurned',
]),
amm: bindActions(client, ammActions, [
'getPool',
'getLiquidityBalance',
'burn',
'burnSync',
'mint',
'mintSync',
'rebalanceSwap',
'rebalanceSwapSync',
'watchBurn',
'watchMint',
'watchRebalanceSwap',
]),
channel: bindActions(client, channelActions, [
'close',
'closeSync',
'getStates',
'open',
'openSync',
'requestClose',
'requestCloseSync',
'settle',
'settleSync',
'signVoucher',
'topUp',
'topUpSync',
'withdraw',
'withdrawSync',
]),
dex: bindActions(client, dexActions, [
'buy',
'buySync',
'cancel',
'cancelSync',
'cancelStale',
'cancelStaleSync',
'createPair',
'createPairSync',
'getBalance',
'getBuyQuote',
'getOrder',
'getOrderbook',
'getTickLevel',
'getSellQuote',
'place',
'placeSync',
'placeFlip',
'placeFlipSync',
'sell',
'sellSync',
'withdraw',
'withdrawSync',
'watchFlipOrderPlaced',
'watchOrderCancelled',
'watchOrderFilled',
'watchOrderPlaced',
]),
faucet: bindActions(client, faucetActions, ['fund', 'fundSync']),
nonce: bindActions(client, nonceActions, [
'getNonce',
'watchNonceIncremented',
]),
fee: bindActions(client, feeActions, [
'validateToken',
'getUserToken',
'setUserToken',
'setUserTokenSync',
'getValidatorToken',
'setValidatorToken',
'setValidatorTokenSync',
'watchSetUserToken',
'watchSetValidatorToken',
]),
policy: bindActions(client, policyActions, [
'create',
'createSync',
'setAdmin',
'setAdminSync',
'modifyWhitelist',
'modifyWhitelistSync',
'modifyBlacklist',
'modifyBlacklistSync',
'getData',
'isAuthorized',
'watchCreate',
'watchAdminUpdated',
'watchWhitelistUpdated',
'watchBlacklistUpdated',
]),
receivePolicy: bindActions(client, receivePolicyActions, [
'burn',
'burnSync',
'claim',
'claimSync',
'get',
'getBlockedBalance',
'set',
'setSync',
'validate',
'watchBlocked',
'watchBurned',
'watchClaimed',
'watchUpdated',
]),
reward: bindActions(client, rewardActions, [
'claim',
'claimSync',
'distribute',
'distributeSync',
'getGlobalRewardPerToken',
'getPendingRewards',
'getUserRewardInfo',
'setRecipient',
'setRecipientSync',
'watchRewardDistributed',
'watchRewardRecipientSet',
]),
simulate: bindActions(client, simulateActions, [
'simulateBlocks',
'simulateCalls',
]),
token: bindActions(client, tokenActions, [
'approve',
'approveSync',
'burnBlocked',
'burnBlockedSync',
'burn',
'burnSync',
'changeTransferPolicy',
'changeTransferPolicySync',
'create',
'createSync',
'getAllowance',
'getBalance',
'getMetadata',
'getTotalSupply',
'getRoleAdmin',
'hasRole',
'grantRoles',
'grantRolesSync',
'mint',
'mintSync',
'pause',
'pauseSync',
'renounceRoles',
'renounceRolesSync',
'revokeRoles',
'revokeRolesSync',
'setSupplyCap',
'setSupplyCapSync',
'setRoleAdmin',
'setRoleAdminSync',
'transfer',
'transferSync',
'unpause',
'unpauseSync',
'prepareUpdateQuoteToken',
'prepareUpdateQuoteTokenSync',
'updateQuoteToken',
'updateQuoteTokenSync',
'watchApprove',
'watchBurn',
'watchCreate',
'watchMint',
'watchAdminRole',
'watchRole',
'watchTransfer',
'watchUpdateQuoteToken',
]),
validator: bindActions(client, validatorActions, [
'add',
'addSync',
'changeOwner',
'changeOwnerSync',
'changeStatus',
'changeStatusSync',
'get',
'getByIndex',
'getCount',
'getNextFullDkgCeremony',
'getOwner',
'list',
'setNextFullDkgCeremony',
'setNextFullDkgCeremonySync',
'update',
'updateSync',
]),
virtualAddress: bindActions(client, virtualAddressActions, [
'getMasterAddress',
'registerMaster',
'registerMasterSync',
'resolve',
]),
zone: bindActions(client, zoneActions, [
'deposit',
'depositSync',
'encryptedDeposit',
'encryptedDepositSync',
'getAuthorizationTokenInfo',
'getDepositStatus',
'getWithdrawalFee',
'getZoneInfo',
'requestWithdrawal',
'requestWithdrawalSync',
'requestVerifiableWithdrawal',
'requestVerifiableWithdrawalSync',
'signAuthorizationToken',
]),
};
};
}
//# sourceMappingURL=Decorator.js.map