import { PopulatedTransaction } from '@ethersproject/contracts'; import { NonceManager } from '@ethersproject/experimental'; import { BigNumber } from 'ethers'; import * as TE from 'fp-ts/TaskEither'; import * as t from 'io-ts'; import { Stark, StarkV4 } from '../contracts'; import { Registration } from '../contracts/registration'; import { RegistrationV2 } from '../contracts/registrationV2'; import { EthAddress, FeeParams, ImmutableMethodParams, ImmutableMethodResults, PositiveBigNumber, RegistrationMethodParams, StarkMethodParams, Token, Transaction, TransferParams } from '../types'; export declare class ImmutableXController { private publicApiUrl; private signer; private accountMappingKey; private accountMapping; private activeKeyPair; private store; constructor(publicApiUrl: string, signer: NonceManager, accountMappingKey?: string); getAddress(): Promise; get starkPublicKey(): string | undefined; getStarkPublicKey(path?: string): Promise; getExchangeContract(contractAddress: string): Stark; getExchangeContractV4(contractAddress: string): StarkV4; getRegistrationContract(contractAddress: string): Registration; getRegistrationContractV2(contractAddress: string): RegistrationV2; sign(payload: any): Promise; signRaw(payload: string): Promise; signStark(payload: any): Promise; signRegistration(): Promise; account(layer: string, application: string, index: string): Promise; private getCurrentAccountPath; signUserRegistration({ etherKey, starkPublicKey, nonce, }: { etherKey: string; starkPublicKey: string; nonce: string; }): TE.TaskEither; private getPackedSignatureRegisterEthAddress; signRegisterEthAddress({ etherKey, starkPublicKey, contractAddress, }: { etherKey: string; starkPublicKey: string; contractAddress: string; }): Promise; signUserRegistrationVerifyEth({ etherKey, starkPublicKey, }: { etherKey: string; starkPublicKey: string; }): TE.TaskEither; signDeposit(starkPublicKey: string, vaultId: string, assetId: string, quantity: PositiveBigNumber, nonce: string): Promise; signWithdraw(starkPublicKey: string, vaultId: string, token: Token, assetId: string, quantity: PositiveBigNumber, nonce: string): TE.TaskEither; transfer(from: TransferParams, to: TransferParams, token: Token, assetId: string, quantity: PositiveBigNumber, nonce: string, expirationTimestamp: string): TE.TaskEither; transferAsync(from: TransferParams, to: TransferParams, token: Token, assetId: string, quantity: PositiveBigNumber, nonce: string, expirationTimestamp: string): Promise; transferV2(transfers: ImmutableMethodResults.ImmutableGetSignableTransferV2Result): TE.TaskEither; transferInWithdrawal(from: TransferParams, to: TransferParams, assetId: string, quantizedAmount: PositiveBigNumber, nonce: string, expirationTimestamp: string): TE.TaskEither; transferInWithdrawalAsync(from: TransferParams, to: TransferParams, assetId: string, quantizedAmount: PositiveBigNumber, nonce: string, expirationTimestamp: string): Promise; createOrderV3(starkPublicKey: string, sell_vault_id: t.Int, buy_vault_id: t.Int, sell_amount: BigNumber, buy_amount: BigNumber, sell_id: string, buy_id: string, nonce: t.Int, expirationTimestamp: t.Int): TE.TaskEither; createOrderWithFeeV3(starkPublicKey: string, sell_vault_id: t.Int, buy_vault_id: t.Int, sell_amount: BigNumber, buy_amount: BigNumber, sell_id: string, buy_id: string, nonce: t.Int, expirationTimestamp: t.Int, fee_info: FeeParams): TE.TaskEither; private getCancelOrderMsg; private signF; private serializeSignature; cancelOrder(orderId: string): TE.TaskEither; register({ contractAddress, etherKey, starkPublicKey, operatorSignature, }: StarkMethodParams.StarkRegisterParams): TE.TaskEither; depositF({ contractAddress, starkPublicKey, quantity, quantizedAmount, assetId, token, vaultId, }: StarkMethodParams.StarkDepositParams): TE.TaskEither; deposit(params: StarkMethodParams.StarkDepositParamsTS): Promise; registerAndDepositF({ registrationContractAddress, starkPublicKey, quantity, assetId, token, vaultId, etherKey, operatorSignature, }: RegistrationMethodParams.RegisterAndDepositParams): TE.TaskEither; depositCancel(contractAddress: string, starkPublicKey: string, token: Token, vaultId: string): Promise; depositReclaim(contractAddress: string, starkPublicKey: string, token: Token, vaultId: string): Promise; withdrawal(contractAddress: string, ownerKey: string, token: Token): TE.TaskEither; withdrawalV2(contractAddress: string, ownerKey: string, token: Token): TE.TaskEither; withdrawalAll(registrationContractAddress: string, starkPublicKey: string, etherKey: string, token: Token): TE.TaskEither; registerAndWithdrawalAll(registrationContractAddress: string, starkPublicKey: string, etherKey: string, token: Token): TE.TaskEither; registerAndWithdraw({ registrationContractAddress, starkPublicKey, token, etherKey, operatorSignature, }: RegistrationMethodParams.RegisterAndWithdrawParams): TE.TaskEither; fullWithdrawal(contractAddress: string, starkPublicKey: string, vaultId: string): Promise; freeze(contractAddress: string, starkPublicKey: string, vaultId: string): Promise; escape(contractAddress: string, starkPublicKey: string, vaultId: string, token: Token, quantity: PositiveBigNumber): Promise; mintNFT(tokenAddress: string): TE.TaskEither; approveNFT({ tokenAddress, contractAddress, tokenId, }: StarkMethodParams.StarkApproveNFTParams): TE.TaskEither; approveERC20({ tokenAddress, amount, contractAddress, }: StarkMethodParams.StarkApproveERC20Params): TE.TaskEither; private assertStarkPublicKey; private assertOwnerKey; private getActiveKeyPair; private setActiveKeyPair; private getKeyPairFromPath; private getAccountMapping; private isTokenERC20; private isTokenETH; private isTokenNFT; getAssetId(token: Token): Promise; getAssetTypeValue(token: Token): Promise; private getQuantumValue; }