Options
All
  • Public
  • Public/Protected
  • All
Menu

@ankr.com/staking-sdk

Index

Namespaces

Enumerations

Classes

Interfaces

Type Aliases

Properties

Variables

Functions

Type Aliases

BigNumberish: string | number | BigNumber
IFetchTxReceiptData: TransactionReceipt | null

Transaction receipt

TBnbSyntToken: typeof AVAILABLE_BNB_SYNT_TOKENS[number]

Available tokens for BinanceSDK

TEthToken: "aETHb" | "aETHc"

Available tokens for EthereumSDK

TFtmSyntToken: "aFTMb" | "aFTMc"

Available tokens for FantomSDK

TMaticSyntToken: "aMATICc" | "aMATICb"

Available tokens for MaticSDK

TUnstakingStatsType: "bond" | "cert" | "all"

Unstaking type from API

Properties

AAVAXB_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AAVAXC_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
ABI_ABNBB: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
ABI_ABNBC: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
ABI_BINANCE_PARTERS: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string } | { anonymous: undefined; inputs: undefined; name: undefined; outputs: undefined; stateMutability: string; type: string })[]
ABI_BINANCE_POOL: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
ABI_ERC20: ({ anonymous: undefined; constant: boolean; inputs: { name: string; type: string }[]; name: string; outputs: { name: string; type: string }[]; payable: boolean; stateMutability: string; type: string } | { anonymous: undefined; constant: undefined; inputs: undefined; name: undefined; outputs: undefined; payable: boolean; stateMutability: string; type: string } | { anonymous: boolean; constant: undefined; inputs: { indexed: boolean; name: string; type: string }[]; name: string; outputs: undefined; payable: undefined; stateMutability: undefined; type: string })[]
AETHB_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AETHC_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AETHC_BSC_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AETH_BSC_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AFTMB_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AFTMC_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AMATICB_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AMATICC_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
ANKR_ABI: ({ anonymous: boolean; constant: undefined; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; constant: boolean; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string } | { anonymous: undefined; constant: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
AVALANCHE_POOL_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
ETHEREUM_POOL_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
FANTOM_POOL_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string } | { anonymous: undefined; inputs: undefined; name: undefined; outputs: undefined; stateMutability: string; type: string })[]
POLYGON_POOL_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string })[]
SWAP_POOL_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: undefined; name: undefined; outputs: undefined; stateMutability: string; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: { components: { internalType: string; name: string; type: string }[]; internalType: string; name: string; type: string }[]; stateMutability: string; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: undefined; outputs: undefined; stateMutability: string; type: string })[]
SYSTEM_PARAMETERS_ABI: ({ anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string }[]; name: string; outputs: undefined; stateMutability: undefined; type: string } | { anonymous: undefined; inputs: never[]; name: string; outputs: { internalType: string; name: string; type: string }[]; stateMutability: string; type: string } | { anonymous: undefined; inputs: { internalType: string; name: string; type: string }[]; name: string; outputs: never[]; stateMutability: string; type: string })[]

Variables

ALLOWANCE_RATE: 5 = 5

Multiplication factor for fee when approving funds

AVAILABLE_BNB_SYNT_TOKENS: readonly ["aBNBb", "aBNBc", "aETH", "aETHc"] = ...

List of supported tokens for BinanceSDK

AVALANCHE_READ_PROVIDER_ID: avalancheChain | avalancheChainTest = ...

Internal read provider id

AVALANCHE_WRITE_PROVIDER_ID: ethCompatible = AvailableWriteProviders.ethCompatible

Internal write provider id

AVAX_DECIMALS: 18 = 18

AVAX token decimals

AVAX_ESTIMATE_GAS_MULTIPLIER: 1.6 = 1.6

Even with this multiplier, the gas estimate is two times less than if we did not manage this value.

note

Magic number, 60%

AVAX_HISTORY_2_WEEKS_OFFSET: number = ...

Events block range for stake/unstake history

note

404_000 blocks = ~14 days

AVAX_MAX_BLOCK_RANGE: 3000 = 3_000

Max block range per request

AVAX_MAX_PARALLEL_REQ: 100 = 100

Max block parallel requests to rpc

AVAX_SCALE_FACTOR: 1000000000000000000 = 1e18

Scale factor fo AVAX token

BINANCE_HISTORY_2_WEEKS_BLOCK_OFFSET: number = ...

Block offset to get 14 days history events

BINANCE_PARTNERS_CONTRACT_START_BLOCK: 20956307 | 22056801 = ...

Start block to check events for BinancePartners

BINANCE_POOL_CONTRACT_START_BLOCK: 15336167 | 16716904 = ...

Start block to check events for BinancePool

BINANCE_READ_PROVIDER_ID: binanceChain | binanceChainTest = ...

Internal read provider id

BINANCE_WRITE_PROVIDER_ID: ethCompatible = AvailableWriteProviders.ethCompatible

Internal write provider id

BNB_ESTIMATE_GAS_MULTIPLIER: 1.4 = 1.4

Magic number to prevent metamask fee calculation issue

BNB_GAS_FEE_SAFE_LIMIT: 0.008 = 0.008

Magic number for preventing gas fee calculation issue in the MetaMask with a maximum amount

BNB_MAX_BLOCK_RANGE: 3000 | 2500 = ...

Events block range for stake/unstake history

note

~3h = 3_000 blocks for testnet, ~2.5h = 2_500 blocks for mainnet

BNB_STAKING_MAX_DECIMALS_LEN: 8 = 8

Maximum decimals length for the BNB Staking

BSC_NETWORK_BY_ENV: smartchain | smartchainTestnet = ...
CERT_STAKING_LOG_HASH: "0x0f0bc5b519ddefdd8e5f9e6423433aa2b869738de2ae34d58ebc796fc749fa0d" = '0x0f0bc5b519ddefdd8e5f9e6423433aa2b869738de2ae34d58ebc796fc749fa0d'

Staking topic hash. Used for fetching transaction amount from receipt.

DEFAULT_THEME: { background: string; border: string; hover: string; main: string; secondary: string } = ...

Need to get rid of theme from ProviderManager

deprecated

Type declaration

  • background: string
  • border: string
  • hover: string
  • main: string
  • secondary: string
ETH_BLOCK_2_WEEKS_OFFSET: 100800 | 80640 = ...

Block offset to get 14 days history events

ETH_DECIMALS: 18 = 18
ETH_GAS_LIMIT_MULTIPLIER: 1.5 = 1.5

Magic number to prevent metamask fee calculation issue

ETH_HISTORY_RANGE_STEP: 3000 = 3_000

Block step range for events

ETH_NETWORK_BY_ENV: mainnet | goerli = ...
ETH_POOL_START_BLOCK: 11225126 | 3829233 = ...

Start block to check events for Ethereum pool

ETH_SCALE_FACTOR: number = ...
ETH_STAKE_GAS_FEE_MULTIPLIER: 2.15 = 2.15

Magic number for preventing gas fee calculation issue in the MetaMask with a maximum amount

FANTOM_BLOCK_WEEK_OFFSET: 604800 | 120960 = ...

Block offset to get history events for 7 days

FANTOM_ESTIMATE_GAS_MULTIPLIER: 1.6 = 1.6

Gas limit increase by 60%

FANTOM_GAS_FEE_MULTIPLIER: 3.5 = 3.5

Magic number to avoid problems with max amount and fee calculation in the wallet

FANTOM_MAX_BLOCK_RANGE: 3000 | 2000 = ...

Max block range per request

FANTOM_POOL_START_BLOCK: 31218797 | 7729481 = ...

Start block to check events for Ethereum pool

FANTOM_PROVIDER_READ_ID: ftmOpera | ftmTestnet = ...

Internal read provider id

GAS_FEE_MULTIPLIER: 3 = 3

Magic number to avoid problems with max amount and fee calculation in the wallet

IS_ADVANCED_API_ACTIVE: boolean = isMainnet
MATIC_DECIMALS: 18 = 18

Decimals length for MATIC

MATIC_ETH_BLOCK_2_WEEKS_OFFSET: 100800 | 80640 = ...

Block offset to get 14 days history events

MATIC_ON_ETH_PROVIDER_READ_ID: ethMainnet | ethGoerli = ...

Internal read provider id for MATIC on Ethereum network

MATIC_ON_POLYGON_ESTIMATE_GAS_MULTIPLIER: 1.6 = 1.6

Magic number for preventing fee calculation issue in MetaMask

MATIC_ON_POLYGON_GAS_FEE_MULTIPLIER: 2 = 2

Magic number to avoid issues with max amount and fee calculation in the wallet

MATIC_ON_POLYGON_PROVIDER_READ_ID: mumbai | polygon = ...

Internal read provider id for MATIC on Polygon network

MATIC_SCALE_FACTOR: number = ...

Internal scale factor for MATIC on Polygon network

MAX_BLOCK_RANGE: 3000 | 2000 = ...

Events block range for stake/unstake history

MAX_UINT256: BigNumber = ...
METHOD_NAME_BY_SYMBOL: Record<TEthToken, { claim: string; claimable: string; stake: string }> = ...

Methods by token symbol

ONE_ETH: BigNumber = ...
POLYGON_NETWORK_BY_ENV: polygon | mumbai = ...
POLYGON_PROVIDER_ID: ethCompatible = AvailableWriteProviders.ethCompatible

Internal write provider id

POOL_CONTRACT_START_BLOCK: 13396826 | 5653297 = ...

Start block to check events for PolygonPool

TOKENS_CONFIG_BY_SYMBOL: Record<TEthToken, { address: string; chainId: number; decimals: number; symbol: string }> = ...

Tokens config for wallet

TOPIC_WITH_TOKEN_TYPE_INFO: "0x19e86fee7352f6a0c9bf1635ff7e554c083f9af69dff8d69c054f2ac5dba1a9c" = '0x19e86fee7352f6a0c9bf1635ff7e554c083f9af69dff8d69c054f2ac5dba1a9c'

Staking topic hash. Used for fetching transaction amount from receipt.

ZERO: BigNumber = ...
ZERO_ADDRESS: "0x0000000000000000000000000000000000000000" = '0x0000000000000000000000000000000000000000'
ZERO_EVENT_HASH: "0x0000000000000000000000000000000000000000000000000000000000000000" = '0x0000000000000000000000000000000000000000000000000000000000000000'
currentEnv: Env = ...

Current env dependes on env variable

isLocal: boolean = ...
isMainnet: boolean = ...

Functions

  • getFilteredContractEvents(events: EventData[]): IFilteredEvents

Generated using TypeDoc