airgap-coin-lib
Version:
The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.
36 lines (35 loc) • 2.15 kB
TypeScript
import { KeyPair } from '../../../data/KeyPair';
import BigNumber from '../../../dependencies/src/bignumber.js-9.0.0/bignumber';
import { SubstrateNetwork } from '../SubstrateNetwork';
import { SubstrateAccountId } from './data/account/SubstrateAddress';
import { SubstrateNominatorDetails } from './data/staking/SubstrateNominatorDetails';
import { SubstrateValidatorDetails } from './data/staking/SubstrateValidatorDetails';
import { SubstrateNodeClient } from './node/SubstrateNodeClient';
export declare class SubstrateAccountController {
readonly network: SubstrateNetwork;
readonly nodeClient: SubstrateNodeClient;
constructor(network: SubstrateNetwork, nodeClient: SubstrateNodeClient);
createKeyPairFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<KeyPair>;
createKeyPairFromHexSecret(secret: string, derivationPath: string): Promise<KeyPair>;
createAddressFromPublicKey(publicKey: string): Promise<string>;
getBalance(accountId: SubstrateAccountId): Promise<BigNumber>;
getTransferableBalance(accountId: SubstrateAccountId, excludeExistentialDeposit?: boolean, excludeLocks?: boolean): Promise<BigNumber>;
getUnlockingBalance(accountId: SubstrateAccountId): Promise<BigNumber>;
isBonded(accountId: SubstrateAccountId): Promise<boolean>;
isNominating(accountId: SubstrateAccountId): Promise<boolean>;
getCurrentValidators(accountId: SubstrateAccountId): Promise<string[]>;
getValidatorDetails(accountId: SubstrateAccountId): Promise<SubstrateValidatorDetails>;
getNominatorDetails(accountId: SubstrateAccountId, validatorIds?: SubstrateAccountId[]): Promise<SubstrateNominatorDetails>;
getSlashingSpansNumber(accountId: SubstrateAccountId): Promise<number>;
private getStakingDetails;
private getUnlockingDetails;
private getStakingStatus;
private getEraValidatorReward;
private getNominatorRewards;
private calculateEraNominatorReward;
private calculateValidatorReward;
private calculateNominatorReward;
private getAvailableStakingActions;
private getAccountIdentityInfo;
private partitionArray;
}