import { Registration } from "../../contracts/registration"; import { PopulatedTransaction } from '@ethersproject/contracts'; import { NonceManager } from '@ethersproject/experimental'; import { EthAddress, OrderParams, PositiveBigNumber, RegistrationMethodParams, StarkMethodParams, Token, Transaction, TransferParams } from '@imtbl/imx-link-types'; import { Stark } from "../../contracts"; import * as TE from 'fp-ts/TaskEither'; import * as t from 'io-ts'; /** * Immutable X Controller */ export declare class ImmutableXController { private signer; private accountMappingKey; private accountMapping; private activeKeyPair; private publicApiUrl; private store; constructor(signer: NonceManager, accountMappingKey?: string); getAddress(): Promise; get starkPublicKey(): string | undefined; getStarkPublicKey(path?: string): Promise; getExchangeContract(contractAddress: string): Stark; getRegistrationContract(contractAddress: string): Registration; sign(payload: any): Promise; signStark(payload: any): Promise; signRegistration(): Promise; /** * StarkWare JSON-RPC Spec */ account(layer: string, application: string, index: string): Promise; signUserRegistration({ etherKey, starkPublicKey, nonce, }: { etherKey: string; starkPublicKey: string; nonce: 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, publicApiUrl?: string): TE.TaskEither; createOrder(starkPublicKey: string, sell: OrderParams, buy: OrderParams, sell_id: string, buy_id: string, nonce: t.Int, expirationTimestamp: t.Int): 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, quantizedAmount, 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, starkPublicKey: string, token: Token, publicApiUrl?: string): 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; private assertStarkPublicKey; private getActiveKeyPair; private setActiveKeyPair; private getKeyPairFromPath; private getAccountMapping; private isTokenERC20; private isTokenETH; private isTokenNFT; private getAssetTypeValue; private getQuantumValue; } export default ImmutableXController; //# sourceMappingURL=index.d.ts.map