import ImmutableXWallet from "../../wallet"; import { Signer } from '@ethersproject/abstract-signer'; import { EthAddress, HexadecimalString, ImmutableMethodParams, ImmutableMethodResults, OrderParams, Token } from '@imtbl/imx-link-types'; import { AxiosRequestConfig } from 'axios'; import * as T from 'fp-ts/Task'; import * as TE from 'fp-ts/TaskEither'; export declare type ImmutableXClientParams = { publicApiUrl: string; signer?: Signer; gasLimit?: string; gasPrice?: string; starkContractAddress?: string; registrationContractAddress?: string; }; /** * Immutable X REST API Client */ export declare class ImmutableXClient { private publicApiUrl; private wallet; private contractAddress; private registrationContractAddress; private _address; private _starkPublicKey; private agent; constructor(publicApiUrl: string, wallet: ImmutableXWallet, contractAddress: EthAddress, registrationContractAddress: EthAddress, _address: EthAddress, _starkPublicKey: HexadecimalString); static buildF(params: ImmutableXClientParams): TE.TaskEither; getERC20Balance(owner: string, contractAddress: string): Promise; static build({ publicApiUrl, signer, starkContractAddress, registrationContractAddress, gasLimit, gasPrice, }: ImmutableXClientParams): Promise; get address(): import("io-ts").Branded; get starkPublicKey(): import("io-ts").Branded; buildOptions(): AxiosRequestConfig; private replaceApiVersion; private get; private post; private delete; registerImxF({ etherKey, starkPublicKey, }: ImmutableMethodParams.ImmutableRegisterParams): TE.TaskEither; getUserF(params: ImmutableMethodParams.ImmutableGetUserParams): TE.TaskEither; getUser(params: ImmutableMethodParams.ImmutableGetUserParamsTS): Promise<{ accounts: import("io-ts").Branded[]; }>; registerImx(params: ImmutableMethodParams.ImmutableRegisterParamsTS): Promise<{ tx_hash: string; }>; isRegisteredF(params: ImmutableMethodParams.ImmutableGetUserParams): TE.TaskEither; isRegistered(params: ImmutableMethodParams.ImmutableGetUserParamsTS): Promise; isRegisteredStarkF(starkPublicKey: string): T.Task; isRegisteredStark(starkPublicKey: string): Promise; registerF(params: ImmutableMethodParams.ImmutableRegisterParams): TE.TaskEither; register(params: ImmutableMethodParams.ImmutableRegisterParamsTS): Promise; registerStarkF({ etherKey, starkPublicKey, operatorSignature, }: ImmutableMethodParams.ImmutableStarkRegisterParams): TE.TaskEither; registerStark(params: ImmutableMethodParams.ImmutableStarkRegisterParamsTS): Promise; getSignableRegistrationF({ etherKey, starkPublicKey, }: ImmutableMethodParams.ImmutableGetSignableRegistrationParams): TE.TaskEither; getSignableRegistration(params: ImmutableMethodParams.ImmutableGetSignableRegistrationParamsTS): Promise<{ operator_signature: string; }>; mintNFTF({ tokenAddress }: ImmutableMethodParams.ImmutableMintNFTParams): TE.TaskEither; mintNFT(params: ImmutableMethodParams.ImmutableMintNFTParamsTS): Promise; approveNFTF(params: ImmutableMethodParams.ImmutableStarkApproveNFTParams): TE.TaskEither; approveNFT(params: ImmutableMethodParams.ImmutableStarkApproveNFTParamsTS): Promise; depositF({ user, token, quantity, }: ImmutableMethodParams.ImmutableGetSignableDepositParams): TE.TaskEither; deposit(params: ImmutableMethodParams.ImmutableGetSignableDepositParamsTS): Promise; depositCancel(starkPublicKey: string, token: Token, vaultId: string): Promise; depositReclaim(starkPublicKey: string, token: Token, vaultId: string): Promise; prepareWithdrawalF({ user, token, quantity, }: ImmutableMethodParams.ImmutablePrepareWithdrawalParams): TE.TaskEither; prepareWithdrawal(params: ImmutableMethodParams.ImmutablePrepareWithdrawalParamsTS): Promise; completeWithdrawalF({ starkPublicKey, token, }: ImmutableMethodParams.ImmutableCompleteWithdrawalParams): TE.TaskEither; completeWithdrawal(params: ImmutableMethodParams.ImmutableCompleteWithdrawalParamsTS): Promise; transferF({ sender, token, quantity, receiver, }: ImmutableMethodParams.ImmutableTransferParams): TE.TaskEither; transfer(params: ImmutableMethodParams.ImmutableTransferParamsTS): Promise; mintF(params: ImmutableMethodParams.ImmutableOffchainMintParams): TE.TaskEither; mint(params: ImmutableMethodParams.ImmutableOffchainMintParamsTS): Promise; mintV2F(params: ImmutableMethodParams.ImmutableOffchainMintV2Params): TE.TaskEither; mintV2(params: ImmutableMethodParams.ImmutableOffchainMintV2ParamsTS): Promise; createOrderRequestF({ user, tokenSell, tokenBuy, amountSell, amountBuy, }: ImmutableMethodParams.ImmutableGetSignableOrderParams): TE.TaskEither; createOrderF({ user, tokenSell, tokenBuy, amountSell, amountBuy, }: ImmutableMethodParams.ImmutableGetSignableOrderParams): TE.TaskEither; createOrder(params: ImmutableMethodParams.ImmutableGetSignableOrderParamsTS): Promise; cancelOrder(orderId: number): TE.TaskEither; createTradeF({ user, tokenSell, tokenBuy, amountSell, amountBuy, orderId, }: ImmutableMethodParams.ImmutableGetSignableTradeParams): TE.TaskEither; createTrade(params: ImmutableMethodParams.ImmutableGetSignableTradeParamsTS): Promise; getTokenF(params: ImmutableMethodParams.ImmutableGetTokenParams): TE.TaskEither; getToken(params: ImmutableMethodParams.ImmutableGetTokenParamsTS): Promise; listTokensF(params: ImmutableMethodParams.ImmutableListTokensParams): TE.TaskEither; listTokens(params: ImmutableMethodParams.ImmutableListTokensParamsTS): Promise; getBalancesF(params: ImmutableMethodParams.ImmutableGetBalancesParams): TE.TaskEither; getBalances(params: ImmutableMethodParams.ImmutableGetBalancesParams): Promise; getBalanceF(params: ImmutableMethodParams.ImmutableGetBalanceParams): TE.TaskEither; getBalance(params: ImmutableMethodParams.ImmutableGetBalanceParamsTS): Promise; listBalancesF({ user, symbols, cursor, }: ImmutableMethodParams.ImmutableListBalancesParams): TE.TaskEither; listBalances(params: ImmutableMethodParams.ImmutableListBalancesParamsTS): Promise; getMintableTokenF(params: ImmutableMethodParams.ImmutableGetMintableTokenParams): TE.TaskEither; getMintableToken(params: ImmutableMethodParams.ImmutableGetMintableTokenParamsTS): Promise; getVaults(starkPublicKey: string): Promise; getOrderF({ orderId, }: ImmutableMethodParams.ImmutableGetOrderParams): TE.TaskEither; getOrder(params: ImmutableMethodParams.ImmutableGetOrderParamsTS): Promise; getOrdersF(query?: ImmutableMethodParams.ImmutableGetOrdersParams): TE.TaskEither; getOrders(params?: ImmutableMethodParams.ImmutableGetOrdersParamsTS): Promise; getAssetsF(query: ImmutableMethodParams.ImmutableGetAssetsParams): TE.TaskEither; getAssets(params: ImmutableMethodParams.ImmutableGetAssetsParamsTS): Promise; getAssetF({ address, id, }: ImmutableMethodParams.ImmutableGetAssetParams): TE.TaskEither; getAsset(params: ImmutableMethodParams.ImmutableGetAssetParamsTS): Promise; getAssetV2F({ address, id, }: ImmutableMethodParams.ImmutableGetAssetParams): TE.TaskEither; getAssetV2(params: ImmutableMethodParams.ImmutableGetAssetParamsTS): Promise; listAssetsV2F(query: ImmutableMethodParams.ImmutableGetAssetsParams): TE.TaskEither; listAssetsV2(params: ImmutableMethodParams.ImmutableGetAssetsParamsTS): Promise; getApplicationsF(query?: ImmutableMethodParams.ImmutableGetApplicationsParams): TE.TaskEither; getApplications(params?: ImmutableMethodParams.ImmutableGetApplicationsParamsTS): Promise; getTradeF({ id, }: ImmutableMethodParams.ImmutableGetTradeParams): TE.TaskEither; getTrade(params: ImmutableMethodParams.ImmutableGetTradeParamsTS): Promise; getCollectionsF(query: ImmutableMethodParams.ImmutableGetCollectionsParams): TE.TaskEither; getCollections(params: ImmutableMethodParams.ImmutableGetCollectionsParamsTS): Promise; getCollectionF({ address, }: ImmutableMethodParams.ImmutableGetCollectionParams): TE.TaskEither; getCollection(params: ImmutableMethodParams.ImmutableGetCollectionParamsTS): Promise; getDepositsF(query?: ImmutableMethodParams.ImmutableGetDepositsParams): TE.TaskEither; getDeposits(params?: ImmutableMethodParams.ImmutableGetDepositsParamsTS): Promise; getDepositF({ id, }: ImmutableMethodParams.ImmutableGetDepositParams): TE.TaskEither; getDeposit(params: ImmutableMethodParams.ImmutableGetDepositParamsTS): Promise; getTransferF({ id, }: ImmutableMethodParams.ImmutableGetTransferParams): TE.TaskEither; getTransfer(params: ImmutableMethodParams.ImmutableGetTransferParamsTS): Promise; getWithdrawalF({ id, }: ImmutableMethodParams.ImmutableGetWithdrawalParams): TE.TaskEither; getWithdrawal(params: ImmutableMethodParams.ImmutableGetWithdrawalParamsTS): Promise; getWithdrawalsF(query?: ImmutableMethodParams.ImmutableGetWithdrawalsParams): TE.TaskEither; getWithdrawals(params?: ImmutableMethodParams.ImmutableGetWithdrawalsParamsTS): Promise; getTransfersF(query?: ImmutableMethodParams.ImmutableGetTransfersParams): TE.TaskEither; getTransfers(params?: ImmutableMethodParams.ImmutableGetTransfersParamsTS): Promise; getTradesF(query?: ImmutableMethodParams.ImmutableGetTradesParams): TE.TaskEither; getPaginatedResults(params: P, fn: (params: P) => TE.TaskEither): TE.TaskEither; getTrades(params?: ImmutableMethodParams.ImmutableGetTradesParamsTS): Promise; getLastAvailableNonce(starkPublicKey: string): Promise<{ Nonce: string; }>; getTokenBody(token: Token): any; private decodeForFunction; static isWalletL1Registered: (publicApiUrl: string, starkContractAddress: EthAddress, walletAddress: EthAddress, wallet: ImmutableXWallet) => TE.TaskEither; } export default ImmutableXClient; //# sourceMappingURL=index.d.ts.map