import { SigningKeyT, AccountAddressT, DeriveNextInput, Signing, Encrypting, Decrypting, SwitchToIndex, AddSigningKeyByPrivateKeyInput, DeriveHWSigningKeyInput } from "../account/index"; import { PublicKeyT, HDPathRadixT, MnemomicT, KeystoreT } from "../crypto/index"; import { Network } from "../primitives/index"; import { Observable } from "rxjs"; import { BuiltTransaction, ExecutedTransaction, SimpleExecutedTransaction, StakePositions, StatusOfTransaction, TokenBalances, TransactionHistory, TransactionHistoryActiveAccountRequestInput, TransactionIdentifierT, UnstakePositions } from "./dto/index"; import { StakeTokensInput, TransferTokensInput, UnstakeTokensInput } from "./actions/index"; import { Option } from "prelude-ts"; import { SigningKeychainT, SigningKeyTypeT } from "../account/index"; import { NodeT, RadixAPI, RadixCoreAPI } from "./api/index"; import { ErrorT } from "./errors"; import { LogLevel } from "../util/index"; import { SendTxOutput } from "./transaction/_types"; export declare type TxMessage = { raw: string; encrypted: boolean; }; export declare type MakeTransactionOptions = { userConfirmation?: (confirm: () => void, reject: () => void, tx: BuiltTransaction) => Promise; pollTXStatusTrigger?: Observable; }; export declare type TransferTokensOptions = MakeTransactionOptions & Readonly<{ message?: TxMessage; transferInput: TransferTokensInput; }>; export declare type StakeOptions = MakeTransactionOptions & Readonly<{ stakeInput: StakeTokensInput; }>; export declare type UnstakeOptions = MakeTransactionOptions & Readonly<{ unstakeInput: UnstakeTokensInput; }>; export declare type AccountT = Signing & Encrypting & Decrypting & Readonly<{ equals: (other: AccountT) => boolean; signingKey: SigningKeyT; address: AccountAddressT; publicKey: PublicKeyT; network: Network; type: SigningKeyTypeT; hdPath?: HDPathRadixT; }>; export declare type AccountsT = Readonly<{ getAccountWithHDSigningKeyByHDPath: (hdPath: HDPathRadixT) => Option; getAnyAccountByPublicKey: (publicKey: PublicKeyT) => Option; all: AccountT[]; accountsWithNonHDSigningKeys: () => AccountT[]; accountsWithLocalHDSigningKeys: () => AccountT[]; accountsWithHardwareHDSigningKeys: () => AccountT[]; accountsWithHDSigningKeys: () => AccountT[]; size: () => number; }>; export declare type SwitchToAccount = Readonly<{ toAccount: AccountT; }>; export declare type SwitchAccountInput = "first" | "last" | SwitchToAccount | SwitchToIndex; export declare type WalletT = Readonly<{ revealMnemonic: () => MnemomicT; restoreLocalHDAccountsToIndex: (index: number) => Observable; deriveNextLocalHDAccount: (input?: DeriveNextInput) => Observable; deriveHWAccount: (input: DeriveHWSigningKeyInput) => Observable; displayAddressForActiveHWAccountOnHWDeviceForVerification: () => Observable; addAccountFromPrivateKey: (input: AddAccountByPrivateKeyInput) => Observable; switchAccount: (input: SwitchAccountInput) => AccountT; observeActiveAccount: () => Observable; observeAccounts: () => Observable; }>; export declare type AddAccountByPrivateKeyInput = AddSigningKeyByPrivateKeyInput; export declare type RadixT = Readonly<{ ledger: RadixAPI; connect: (url: string) => Promise; __withAPI: (radixCoreAPI$: Observable) => RadixT; __withNodeConnection: (node$: Observable) => RadixT; __withWallet: (wallet: WalletT) => RadixT; login: (password: string, loadKeystore: () => Promise) => RadixT; /** * Restores accounts in wallet up to and excluding `targetIndex`. * * @param {number} targetIndex - The index to restore account up to, this method will restore accounts from index 0 up to but excluding this index. */ restoreLocalHDAccountsToIndex: (index: number) => Observable; deriveNextAccount: (input?: DeriveNextInput) => RadixT; deriveHWAccount: (input: DeriveHWSigningKeyInput) => Observable; displayAddressForActiveHWAccountOnHWDeviceForVerification: () => Observable; addAccountFromPrivateKey: (input: AddAccountByPrivateKeyInput) => RadixT; switchAccount: (input: SwitchAccountInput) => RadixT; revealMnemonic: () => Observable; activeAddress: Observable; activeAccount: Observable; accounts: Observable; tokenBalances: Observable; stakingPositions: Observable; unstakingPositions: Observable; logLevel: (level: LogLevel) => RadixT; /** * Specify a trigger for when to fetch the token balances for the active address. * * @param {Observable} trigger - An observable that signals when to fetch. */ withTokenBalanceFetchTrigger: (trigger: Observable) => RadixT; /** * Specify a trigger for when to fetch the stakes and unstakes for the active address. * * @param {Observable} trigger - An observable that signals when to fetch. */ withStakingFetchTrigger: (trigger: Observable) => RadixT; /** * Transaction history of active signingKey. * * @param {TransactionHistoryActiveAccountRequestInput} input - Pagination input, size and cursor. * @returns {TransactionHistory} A page from the transaction history. */ transactionHistory: (input: TransactionHistoryActiveAccountRequestInput) => Observable; /** * A decorated variant of RadixApi's lookupTransaction, this decorated variant returns * `ExecutedTransaction` instead of `SimpleExecutedTransaction` which includes `transctionType`. */ lookupTransaction: (txID: TransactionIdentifierT) => Observable; transferTokens: (input: TransferTokensOptions) => SendTxOutput; transactionStatus: (txID: TransactionIdentifierT, trigger: Observable) => Observable; stakeTokens: (input: StakeOptions) => SendTxOutput; unstakeTokens: (input: UnstakeOptions) => SendTxOutput; decryptTransaction: (input: SimpleExecutedTransaction) => Observable; errors: Observable>; __wallet: Observable; __node: Observable; __reset: () => void; __withKeychain: (signingKeychain: SigningKeychainT) => RadixT; }>; export declare type PrimitiveFrom = { [Property in keyof Complex]: Complex[Property] extends { toPrimitive: () => unknown; } ? ReturnType : Complex[Property]; }; //# sourceMappingURL=_types.d.ts.map