Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

References

Namespaces

Enumerations

Classes Chain Grpc API

Classes Chain Grpc Transformer

Classes Chain Rest API

Classes Contract Exec Arguments

Classes Crypto Utility Classes

Classes Indexer Chronos API

Classes Indexer Grpc API

Classes Indexer Grpc Stream

Classes Indexer Grpc Transformer

Classes Indexer Rest API

Classes Indexer Rest Transformer

Classes Indexer Stream Transformer

Classes Messages

Classes Other

Classes Utility Classes

Interfaces

Type Aliases Messages

Type Aliases Other

Variables

Functions

References

Renames and re-exports Transaction
Renames and re-exports ProposalStatus
Renames and re-exports TxGrpcClient
Renames and re-exports TxRestClient

Messages Type Aliases

Other Type Aliases

AccountPortfolioStreamCallback: ((response: ReturnType<typeof accountPortfolioStreamCallback>) => void)

Type declaration

AllChronosDerivativeMarketSummary: { change: number; high: number; low: number; marketId: string; open: number; price: number; volume: number }

Type declaration

  • change: number
  • high: number
  • low: number
  • marketId: string
  • open: number
  • price: number
  • volume: number
AllChronosMarketHistory: { c: number[]; h: number[]; l: number[]; marketID: string; o: number[]; resolution: string; t: number[]; v: number[] }

Type declaration

  • c: number[]
  • h: number[]
  • l: number[]
  • marketID: string
  • o: number[]
  • resolution: string
  • t: number[]
  • v: number[]
AllChronosSpotMarketSummary: { change: number; high: number; low: number; marketId: string; open: number; price: number; volume: number }

Type declaration

  • change: number
  • high: number
  • low: number
  • marketId: string
  • open: number
  • price: number
  • volume: number
BalanceStreamCallback: ((response: ReturnType<typeof balanceStreamCallback>) => void)

Type declaration

BidsStreamCallback: ((response: ReturnType<typeof bidsStreamCallback>) => void)

Type declaration

BlocksStreamCallback: ((response: ReturnType<typeof blocksStreamCallback>) => void)

Type declaration

BlocksWithTxsStreamCallback: ((response: ReturnType<typeof blocksWithTxsStreamCallback>) => void)

Type declaration

ChronosDerivativeMarketSummary: { change: number; high: number; low: number; open: number; price: number; volume: number }

Type declaration

  • change: number
  • high: number
  • low: number
  • open: number
  • price: number
  • volume: number
ChronosLeaderboard: { entries: ChronosLeaderboardEntry[]; resolution: string; updatedAt: number }

Type declaration

ChronosLeaderboardEntry: { accountID: string; perc: string; volume: string }

Type declaration

  • accountID: string
  • perc: string
  • volume: string
ChronosSpotMarketSummary: { change: number; high: number; low: number; open: number; price: number; volume: number }

Type declaration

  • change: number
  • high: number
  • low: number
  • open: number
  • price: number
  • volume: number
ContractCodeHistoryOperationType: ContractCodeHistoryOperationType
DerivativeMarketWithoutBinaryOptions: PerpetualMarket | ExpiryFuturesMarket
DerivativeOrderHistoryStreamCallback: ((response: ReturnType<typeof orderHistoryStreamCallback>) => void)

Type declaration

DerivativeOrderbookStreamCallback: ((response: ReturnType<typeof orderbookStreamCallback>) => void)

Type declaration

DerivativeOrderbookUpdateStreamCallback: ((response: ReturnType<typeof orderbookUpdateStreamCallback>) => void)

Type declaration

DerivativeOrderbookV2StreamCallback: ((response: ReturnType<typeof orderbookV2StreamCallback>) => void)

Type declaration

DerivativeOrdersStreamCallback: ((response: ReturnType<typeof ordersStreamCallback>) => void)

Type declaration

DerivativeTradesStreamCallback: ((response: ReturnType<typeof tradesStreamCallback>) => void)

Type declaration

Eip712ConvertFeeArgs: { amount?: { amount: string; denom: string }[]; feePayer?: string; gas?: string }

Type declaration

  • Optional amount?: { amount: string; denom: string }[]
  • Optional feePayer?: string
  • Optional gas?: string
Eip712ConvertTxArgs: { accountNumber: string; chainId: string; memo?: string; sequence: string; timeoutHeight: string }

Type declaration

  • accountNumber: string
  • chainId: string
  • Optional memo?: string
  • sequence: string
  • timeoutHeight: string
GrpcAbsoluteTxPosition: AbsoluteTxPosition
GrpcAccountPortfolio: AccountPortfolio
GrpcAccountPortfolioV2: InjectivePortfolioRpc.Portfolio
GrpcAuction: InjectiveAuctionRpc.Auction
GrpcAuctionParams: InjectiveAuctionV1Beta1Auction.Params
GrpcBankParams: CosmosBankV1Beta1Bank.Params
GrpcBid: internal.Bid
GrpcBinaryOptionsMarketInfo: internal.BinaryOptionsMarketInfo
GrpcCampaignRewardPool: CampaignRewardPool
GrpcChainDerivativePosition: internal.DerivativePosition
GrpcChainPosition: Position
GrpcCodeInfoResponse: CodeInfoResponse
GrpcCoin: CosmosBaseV1Beta1Coin.Coin
GrpcContractCodeHistoryEntry: ContractCodeHistoryEntry
GrpcContractInfo: ContractInfo
GrpcDelegation: Delegation
GrpcDelegationDelegatorReward: internal.DelegationDelegatorReward
GrpcDelegationResponse: internal.DelegationResponse
GrpcDerivativeLimitOrder: DerivativeLimitOrder
GrpcDerivativeMarketInfo: internal.DerivativeMarketInfo
GrpcDerivativeOrderHistory: DerivativeOrderHistory
GrpcDerivativePosition: InjectiveDerivativeExchangeRpc.DerivativePosition
GrpcDerivativeTrade: DerivativeTrade
GrpcDistributionParams: CosmosDistributionV1Beta1Distribution.Params
GrpcEventAuctionResult: internal.EventAuctionResult
GrpcEventBid: internal.EventBid
GrpcExchangeParams: InjectiveExchangeV1Beta1Exchange.Params
GrpcExpiryFuturesMarketInfo: ExpiryFuturesMarketInfo
GrpcFeeDiscountAccountInfo: internal.QueryFeeDiscountAccountInfoResponse
GrpcFeeDiscountSchedule: FeeDiscountSchedule
GrpcFeeDiscountTierInfo: FeeDiscountTierInfo
GrpcFeeDiscountTierTTL: FeeDiscountTierTTL
GrpcFundingPayment: FundingPayment
GrpcFundingRate: FundingRate
GrpcGasFee: GasFee
GrpcGovernanceDepositParams: internal.DepositParams
GrpcGovernanceTallyParams: internal.TallyParams
GrpcGovernanceVotingParams: internal.VotingParams
GrpcIBCTransferTx: IBCTransferTx
GrpcIndexerBid: InjectiveAuctionRpc.Bid
GrpcIndexerInsuranceFund: InjectiveInsuranceRpc.InsuranceFund
GrpcIndexerRedemptionSchedule: InjectiveInsuranceRpc.RedemptionSchedule
GrpcIndexerValidatorDescription: ValidatorDescription
GrpcInsuranceFund: InjectiveInsuranceV1Beta1Insurance.InsuranceFund
GrpcInsuranceParams: InjectiveInsuranceV1Beta1Insurance.Params
GrpcMarketStatus: MarketStatus
GrpcMintParams: CosmosMintV1Beta1Mint.Params
GrpcMitoDenomBalance: DenomBalance
GrpcMitoHolders: internal.Holders
GrpcMitoLeaderboardEntry: internal.LeaderboardEntry
GrpcMitoPagination: Pagination
GrpcMitoPriceSnapshot: internal.PriceSnapshot
GrpcMitoProfits: internal.Profits
GrpcMitoSubaccountBalance: SubaccountBalance
GrpcMitoSubscription: internal.Subscription
GrpcMitoVault: internal.Vault
GrpcOracle: InjectiveOracleRpc.Oracle
GrpcOracleParams: InjectiveOracleV1Beta1Oracle.Params
GrpcOrderInfo: internal.OrderInfo
GrpcOrderType: OrderType
GrpcPeggyDepositTx: PeggyDepositTx
GrpcPeggyParams: InjectivePeggyV1Beta1Genesis.Params
GrpcPeggyWithdrawalTx: PeggyWithdrawalTx
GrpcPerpetualMarketFunding: PerpetualMarketFunding
GrpcPerpetualMarketInfo: PerpetualMarketInfo
GrpcPointsMultiplier: PointsMultiplier
GrpcPool: Pool
GrpcPortfolioSubaccountBalanceV2: internal.SubaccountBalanceV2
GrpcPositionDelta: PositionDelta
GrpcPositionV2: InjectivePortfolioRpc.DerivativePosition
GrpcPositionsWithUPNL: PositionsWithUPNL
GrpcPriceLevel: PriceLevel
GrpcProposal: Proposal
GrpcProposalDeposit: CosmosGovV1Beta1Gov.Deposit
GrpcQueryCurrentAuctionBasketResponse: internal.QueryCurrentAuctionBasketResponse
GrpcReDelegation: internal.Redelegation
GrpcReDelegationResponse: internal.RedelegationResponse
GrpcRedemptionSchedule: internal.RedemptionSchedule
GrpcSpotLimitOrder: SpotLimitOrder
GrpcSpotMarket: SpotMarket
GrpcSpotMarketInfo: internal.SpotMarketInfo
GrpcSpotMarketOrder: internal.SpotMarketOrder
GrpcSpotOrder: internal.SpotOrder
GrpcSpotOrderHistory: SpotOrderHistory
GrpcSpotTrade: SpotTrade
GrpcStakingParams: CosmosStakingV1Beta1Staking.Params
GrpcSubaccountBalance: SubaccountBalance
GrpcSubaccountBalanceTransfer: internal.SubaccountBalanceTransfer
GrpcSubaccountDeposit: SubaccountDeposit
GrpcSubaccountDepositV2: SubaccountDeposit
GrpcSubaccountPortfolio: SubaccountPortfolio
GrpcSupply: internal.Supply
GrpcTallyResult: TallyResult
GrpcTokenMeta: internal.TokenMeta
GrpcTradingReward: internal.Reward
GrpcTradingRewardCampaignBoostInfo: TradingRewardCampaignBoostInfo
GrpcTradingRewardCampaignInfo: TradingRewardCampaignInfo
GrpcUnbondingDelegation: internal.UnbondingDelegation
GrpcValidator: Validator
GrpcValidatorCommission: internal.Commission
GrpcValidatorCommissionRates: internal.CommissionRates
GrpcValidatorDescription: internal.Description
GrpcValidatorSlashingEvent: internal.SlashingEvent
GrpcValidatorUptime: ValidatorUptime
GrpcVote: Vote
MapOfTypedDataField: internal.Map<string, TypedDataField[]>
MarketStreamCallback: ((response: internal.StreamMarketResponse) => void)

Type declaration

MarketsStreamCallback: ((response: internal.StreamMarketsResponse) => void)

Type declaration

MsgArg: { message: any; type: string }

Type declaration

  • message: any
  • type: string
OraclePriceStreamCallback: ((response: ReturnType<typeof pricesStreamCallback>) => void)

Type declaration

OraclePricesByMarketsStreamCallback: ((response: ReturnType<typeof pricesByMarketsCallback>) => void)

Type declaration

OracleType: OracleType
OrderMask: OrderMask
OrderType: OrderType
PositionsStreamCallback: ((response: ReturnType<typeof positionStreamCallback>) => void)

Type declaration

ProposalDeposit: { amounts: Coin[]; depositor: string }

Type declaration

  • amounts: Coin[]
  • depositor: string
ProposalStatus: ProposalStatus
SendEnabled: SendEnabled
SpotOrderHistoryStreamCallback: ((response: ReturnType<typeof orderHistoryStreamCallback>) => void)

Type declaration

SpotOrderbookStreamCallback: ((response: ReturnType<typeof orderbookStreamCallback>) => void)

Type declaration

SpotOrderbookUpdateStreamCallback: ((response: ReturnType<typeof orderbookUpdateStreamCallback>) => void)

Type declaration

SpotOrderbookV2StreamCallback: ((response: ReturnType<typeof orderbookV2StreamCallback>) => void)

Type declaration

SpotOrdersStreamCallback: ((response: ReturnType<typeof ordersStreamCallback>) => void)

Type declaration

SpotTradesStreamCallback: ((response: ReturnType<typeof tradesStreamCallback>) => void)

Type declaration

StreamBidsResponse: StreamBidsResponse
TallyResult: { abstain: string; no: string; noWithVeto: string; yes: string }

Type declaration

  • abstain: string
  • no: string
  • noWithVeto: string
  • yes: string
TransactionsStreamCallback: ((response: ReturnType<typeof transactionsStreamCallback>) => void)

Type declaration

TxRaw: TxRaw
VaultAMMConfig: { base: VaultBaseConfig; baseDecimals: number; maxInvariantSensitivity: string; priceTickSize: string; quoteDecimals: number }

Type declaration

  • base: VaultBaseConfig
  • baseDecimals: number
  • maxInvariantSensitivity: string
  • priceTickSize: string
  • quoteDecimals: number
VaultBaseConfig: { feeRecipient: string; marketId: string; masterAddress: string; notionalValueCap: string; orderDensity: number; owner: string; subaccountId: string }

Type declaration

  • feeRecipient: string
  • marketId: string
  • masterAddress: string
  • notionalValueCap: string
  • orderDensity: number
  • owner: string
  • subaccountId: string
VaultDerivativeConfig: { allowedRedemptionTypes: number; base: VaultBaseConfig; emergencyOracleVolatilitySampleSize: number; lastValidMarkPrice: string; leverage: string; marketMaking: VaultMarketMakingConfig; minOracleVolatilitySampleSize: number; minProximityToLiquidation: string; oracleVolatilityGroupSec: number; positionPnlPenalty: string; postReductionPercOfMaxPosition: string; quoteDecimals: number }

Type declaration

  • allowedRedemptionTypes: number
  • base: VaultBaseConfig
  • emergencyOracleVolatilitySampleSize: number
  • lastValidMarkPrice: string
  • leverage: string
  • marketMaking: VaultMarketMakingConfig
  • minOracleVolatilitySampleSize: number
  • minProximityToLiquidation: string
  • oracleVolatilityGroupSec: number
  • positionPnlPenalty: string
  • postReductionPercOfMaxPosition: string
  • quoteDecimals: number
VaultMarketMakingConfig: { defaultMidPriceVolatilityRatio: string; headChangeToleranceRatio: string; maxActiveCapitalUtilizationRatio: string; minHeadToTailDeviationRatio: string; minTradeVolatilitySampleSize: number; minVolatilityRatio: string; reservationPriceSensitivityRatio: string; reservationSpreadSensitivityRatio: string; signedMinHeadToFairPriceDeviationRatio: string; signedMinHeadToTobDeviationRatio: string; tradeVolatilityGroupSec: number }

Type declaration

  • defaultMidPriceVolatilityRatio: string
  • headChangeToleranceRatio: string
  • maxActiveCapitalUtilizationRatio: string
  • minHeadToTailDeviationRatio: string
  • minTradeVolatilitySampleSize: number
  • minVolatilityRatio: string
  • reservationPriceSensitivityRatio: string
  • reservationSpreadSensitivityRatio: string
  • signedMinHeadToFairPriceDeviationRatio: string
  • signedMinHeadToTobDeviationRatio: string
  • tradeVolatilityGroupSec: number
VaultSpotConfig: { allowedRedemptionTypes: number; base: VaultBaseConfig; baseDecimals: number; baseOracleSymbol: string; fairPriceTailDeviationRatio: string; imbalanceAdjustmentExponent: string; marketMaking: VaultMarketMakingConfig; oracleType: number; quoteDecimals: number; quoteOracleSymbol: string; rewardDiminishingFactor: string; targetBaseWeight: string }

Type declaration

  • allowedRedemptionTypes: number
  • base: VaultBaseConfig
  • baseDecimals: number
  • baseOracleSymbol: string
  • fairPriceTailDeviationRatio: string
  • imbalanceAdjustmentExponent: string
  • marketMaking: VaultMarketMakingConfig
  • oracleType: number
  • quoteDecimals: number
  • quoteOracleSymbol: string
  • rewardDiminishingFactor: string
  • targetBaseWeight: string
Vote: { option: VoteOption; proposalId: number; voter: string }

Type declaration

VoteOption: VoteOption
grpcContractInfo: ContractInfo

Variables

BECH32_ADDR_ACC_PREFIX: "inj" = 'inj'
BECH32_ADDR_CONS_PREFIX: "injvalcons" = 'injvalcons'
BECH32_ADDR_VAL_PREFIX: "injvaloper" = 'injvaloper'
BECH32_PUBKEY_ACC_PREFIX: "injpub" = 'injpub'
BECH32_PUBKEY_CONS_PREFIX: "injvalconspub" = 'injvalconspub'
BECH32_PUBKEY_VAL_PREFIX: "injvaloperpub" = 'injvaloperpub'
CW20_ADAPTER_CONTRACT_BY_NETWORK: { devnet: string; devnet1: string; devnet2: string; local: string; mainnet: string; mainnetK8s: string; mainnetLB: string; public: string; staging: string; testnet: string; testnetK8s: string; testnetOld: string } = ...

Type declaration

  • devnet: string
  • devnet1: string
  • devnet2: string
  • local: string
  • mainnet: string
  • mainnetK8s: string
  • mainnetLB: string
  • public: string
  • staging: string
  • testnet: string
  • testnetK8s: string
  • testnetOld: string
ChainModule: { Auction: Auction; Auth: Auth; Bank: Bank; Distribution: Distribution; Exchange: Exchange; Gov: Gov; Ibc: Ibc; InsuranceFund: InsuranceFund; Mint: Mint; Oracle: Oracle; Peggy: Peggy; Staking: Staking; Tendermint: Tendermint; Wasm: Wasm; WasmX: WasmX } = ...

Type declaration

  • Auction: Auction
  • Auth: Auth
  • Bank: Bank
  • Distribution: Distribution
  • Exchange: Exchange
  • Gov: Gov
  • Ibc: Ibc
  • InsuranceFund: InsuranceFund
  • Mint: Mint
  • Oracle: Oracle
  • Peggy: Peggy
  • Staking: Staking
  • Tendermint: Tendermint
  • Wasm: Wasm
  • WasmX: WasmX
ContractCodeHistoryOperationTypeMap: typeof ContractCodeHistoryOperationType = CosmwasmWasmV1Types.ContractCodeHistoryOperationType
DEFAULT_DERIVATION_PATH: "m/44'/60'/0'/0/0" = "m/44'/60'/0'/0/0"
DEFAULT_PAGINATION_TOTAL_COUNT: number = 1000000
DEFAULT_STD_FEE: { amount: { amount: string; denom: string }[]; gas: string }

Type declaration

  • amount: { amount: string; denom: string }[]
  • gas: string
DUST_AMOUNT: 0.0001 = 0.0001
GrpcMarketStatusMap: typeof MarketStatus = InjectiveExchangeV1Beta1Exchange.MarketStatus
GrpcOrderTypeMap: typeof OrderType = InjectiveExchangeV1Beta1Exchange.OrderType
IndexerModule: { Account: Account; Auction: Auction; ChronosDerivative: ChronosDerivative; ChronosMarkets: ChronosMarkets; ChronosSpot: ChronosSpot; Derivatives: Derivatives; Explorer: Explorer; InsuranceFund: InsuranceFund; Meta: Meta; Mito: Mito; Oracle: Oracle; Portfolio: Portfolio; Spot: Spot; Transaction: Transaction } = ...

Type declaration

  • Account: Account
  • Auction: Auction
  • ChronosDerivative: ChronosDerivative
  • ChronosMarkets: ChronosMarkets
  • ChronosSpot: ChronosSpot
  • Derivatives: Derivatives
  • Explorer: Explorer
  • InsuranceFund: InsuranceFund
  • Meta: Meta
  • Mito: Mito
  • Oracle: Oracle
  • Portfolio: Portfolio
  • Spot: Spot
  • Transaction: Transaction
OracleTypeMap: typeof OracleType = InjectiveOracleV1Beta1Oracle.OracleType
OrderMaskMap: typeof OrderMask = InjectiveExchangeV1Beta1Exchange.OrderMask
OrderTypeMap: typeof OrderType = InjectiveExchangeV1Beta1Exchange.OrderType
PAGINATION_TOTAL_PAGE_LIMIT: number = 10000
ProposalStatusMap: typeof ProposalStatus = CosmosGovV1Beta1Gov.ProposalStatus
SIGN_AMINO: SIGN_MODE_LEGACY_AMINO_JSON = CosmosTxSigningV1Beta1Signing.SignMode.SIGN_MODE_LEGACY_AMINO_JSON
SIGN_DIRECT: SIGN_MODE_DIRECT = CosmosTxSigningV1Beta1Signing.SignMode.SIGN_MODE_DIRECT
USER_BRIDGE_DEPOSITS: DocumentNode = ...
VoteOptionMap: typeof VoteOption = CosmosGovV1Beta1Gov.VoteOption

Functions

  • DEFAULT_STD_FEE_BY_DENOM(denom?: string): { amount: { amount: string; denom: string }[]; gas: string }
  • Parameters

    • Optional denom: string

    Returns { amount: { amount: string; denom: string }[]; gas: string }

    • amount: { amount: string; denom: string }[]
    • gas: string
  • On chain amounts (based on the cosmosSdk.Dec type) broadcasted to a sentry directly using the gRPC API should be passed with an extra decimal point 18 places from the beginning (i.e multiplied by 1e18), so we need to add it to get a workable amount

    Parameters

    Returns BigNumber

  • createBody(__namedParameters: { memo?: string; message: Msgs | Msgs[]; timeoutHeight?: number }): internal.TxBody
  • createFee(__namedParameters: { fee: { amount: string; denom: string }; gasLimit: number; payer?: string }): Fee
  • Parameters

    • __namedParameters: { fee: { amount: string; denom: string }; gasLimit: number; payer?: string }
      • fee: { amount: string; denom: string }
        • amount: string
        • denom: string
      • gasLimit: number
      • Optional payer?: string

    Returns Fee

  • createSignDocFromTransaction(args: { accountNumber: number; chainId: string; txRaw: TxRaw }): internal.SignDoc
  • property

    {MsgArg | MsgArg[]} message - the Cosmos messages to wrap them in a transaction

    property

    {string} memo - the memo to attach to the transaction

    property

    {StdFee} fee - the fee to attach to the transaction

    property

    {string} sequence - the account sequence to attach to the transaction

    property

    {number} number - the account number to attach to the transaction

    property

    {number} chainId - the chain-id to attach to the transaction

    property

    {string} pubKey - the account pubKey to attach to the transaction (in base64)

    property

    {TxRaw} txRaw // the Tx raw that was created

    property

    {SignDoc} signDoc // the SignDoc that was created - used for signing of the transaction

    property

    {number} accountNumber // the account number of the signer of the transaction

    property

    {Uint8Array} bodyBytes // the body bytes of the transaction

    property

    {Uint8Array} authInfoBytes // the auth info bytes of the transaction

    property

    {Uint8Array} signBytes // the sign bytes of the transaction (SignDoc serialized to binary)

    property

    {Uint8Array} signHashedBytes // the sign bytes of the transaction (SignDoc serialized to binary) and hashed using keccak256

    Parameters

    Returns CreateTransactionResult

    result

  • property

    {Msg | Msg[]} message - the Cosmos messages to wrap them in a transaction

    property

    {string} memo - the memo to attach to the transaction

    property

    {StdFee} fee - the fee to attach to the transaction

    property

    {SignerDetails} signers - the signers of the transaction

    property

    {number} number - the account number to attach to the transaction

    property

    {number} chainId - the chain-id to attach to the transaction

    property

    {string} pubKey - the account pubKey to attach to the transaction (in base64)

    property

    {TxRaw} txRaw - the Tx raw that was created

    property

    {SignDoc} signDoc - the SignDoc that was created - used for signing of the transaction

    property

    {SignerDetails} signers - the signers of the transaction

    property

    {Uint8Array} bodyBytes - the body bytes of the transaction

    property

    {Uint8Array} authInfoBytes - the auth info bytes of the transaction

    property

    {Uint8Array} signBytes - the sign bytes of the transaction (SignDoc serialized to binary)

    property

    {Uint8Array} signHashedBytes - the sign bytes of the transaction (SignDoc serialized to binary) and hashed using keccak256

    Parameters

    Returns CreateTransactionResult

    result

  • Used when we get a DirectSignResponse from Cosmos native wallets like Keplr, Leap, etc after the TxRaw has been signed.

    The reason why we need to create a new TxRaw and not use the one that we passed to signing is that the users can change the gas fees and that will alter the original TxRaw which will cause signature miss match if we broadcast that transaction on chain

    Parameters

    Returns TxRaw

    TxRaw

  • denomAmountFromChainDenomAmount(__namedParameters: { decimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain returns is in the x * 10^(quoteDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { decimals?: string | number; value: string | number | BigNumber }
      • Optional decimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • denomAmountFromChainDenomAmountToFixed(__namedParameters: { decimalPlaces?: number; decimals?: string | number; roundingMode?: RoundingMode; value: string | number | BigNumber }): string
  • Amount that the chain returns is in the x * 10^(quoteDecimals) format where x is a human readable number stringified

    Parameters

    • __namedParameters: { decimalPlaces?: number; decimals?: string | number; roundingMode?: RoundingMode; value: string | number | BigNumber }
      • Optional decimalPlaces?: number
      • Optional decimals?: string | number
      • Optional roundingMode?: RoundingMode
      • value: string | number | BigNumber

    Returns string

  • On chain amounts queried from a sentry using the gRPC API are returned with an extra decimal point 18 places from the beginning, so we need to remove it to get a workable amount

    Parameters

    Returns BigNumber

  • denomAmountToChainDenomAmount(__namedParameters: { decimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain requires is in the x * 10^(quoteDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { decimals?: string | number; value: string | number | BigNumber }
      • Optional decimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • denomAmountToChainDenomAmountToFixed(__namedParameters: { decimalPlaces?: number; decimals?: string | number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }): string
  • Amount that the chain returns is in the x * 10^(quoteDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { decimalPlaces?: number; decimals?: string | number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }
      • Optional decimalPlaces?: number
      • Optional decimals?: string | number
      • Optional roundingMode?: RoundingMode
      • Optional tensMultiplier?: number
      • value: string | number | BigNumber

    Returns string

  • On chain amounts broadcasted to a sentry directly using the gRPC API should be passed with an extra decimal point 18 places from the beginning, so we need to add it to get a workable amount

    Parameters

    Returns BigNumber

  • derivativeMarginFromChainMargin(__namedParameters: { quoteDecimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain returns is in the x * 10^(quoteDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { quoteDecimals?: string | number; value: string | number | BigNumber }
      • Optional quoteDecimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • derivativeMarginFromChainMarginToFixed(__namedParameters: { decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; value: string | number | BigNumber }): string
  • Amount that the chain returns is in the x * 10^(quoteDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; value: string | number | BigNumber }
      • Optional decimalPlaces?: number
      • Optional quoteDecimals?: string | number
      • Optional roundingMode?: RoundingMode
      • value: string | number | BigNumber

    Returns string

  • derivativeMarginToChainMargin(__namedParameters: { quoteDecimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain requires is in the x * 10^(quoteDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { quoteDecimals?: string | number; value: string | number | BigNumber }
      • Optional quoteDecimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • derivativeMarginToChainMarginToFixed(__namedParameters: { decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }): string
  • Amount that the chain requires is in the x * 10^(quoteDecimals) format where x is a human readable number stringified

    Parameters

    • __namedParameters: { decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }
      • Optional decimalPlaces?: number
      • Optional quoteDecimals?: string | number
      • Optional roundingMode?: RoundingMode
      • Optional tensMultiplier?: number
      • value: string | number | BigNumber

    Returns string

  • derivativePriceFromChainPrice(__namedParameters: { quoteDecimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain returns is in the x * 10^(quoteDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { quoteDecimals?: string | number; value: string | number | BigNumber }
      • Optional quoteDecimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • derivativePriceFromChainPriceToFixed(__namedParameters: { decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; value: string | number | BigNumber }): string
  • Amount that the chain returns is in the x * 10^(quoteDecimals) format where x is a human readable number stringified

    Parameters

    • __namedParameters: { decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; value: string | number | BigNumber }
      • Optional decimalPlaces?: number
      • Optional quoteDecimals?: string | number
      • Optional roundingMode?: RoundingMode
      • value: string | number | BigNumber

    Returns string

  • derivativePriceToChainPrice(__namedParameters: { quoteDecimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain requires is in the x * 10^(quoteDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { quoteDecimals?: string | number; value: string | number | BigNumber }
      • Optional quoteDecimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • derivativePriceToChainPriceToFixed(__namedParameters: { decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }): string
  • Amount that the chain requires is in the x * 10^(quoteDecimals) format where x is a human readable number stringified

    Parameters

    • __namedParameters: { decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }
      • Optional decimalPlaces?: number
      • Optional quoteDecimals?: string | number
      • Optional roundingMode?: RoundingMode
      • Optional tensMultiplier?: number
      • value: string | number | BigNumber

    Returns string

  • derivativeQuantityFromChainQuantity(__namedParameters: { value: string | number | BigNumber }): BigNumber
  • derivativeQuantityFromChainQuantityToFixed(__namedParameters: { decimalPlaces?: number; roundingMode?: RoundingMode; value: string | number | BigNumber }): string
  • derivativeQuantityToChainQuantity(__namedParameters: { value: string | number | BigNumber }): BigNumber
  • derivativeQuantityToChainQuantityToFixed(__namedParameters: { decimalPlaces?: number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }): string
  • Amount that the chain requires is in the x format where x is a human readable number stringified

    Parameters

    • __namedParameters: { decimalPlaces?: number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }
      • Optional decimalPlaces?: number
      • Optional roundingMode?: RoundingMode
      • Optional tensMultiplier?: number
      • value: string | number | BigNumber

    Returns string

  • errorToErrorMessage(error: any): any
  • formatAmountToAllowableAmount(value: string | number, tensMultiplier: number): string
  • formatAmountToAllowableDecimals(value: string | number, allowableDecimals: number): string
  • formatNumberToAllowableDecimals(value: string | number, allowableDecimals: number, roundingMode?: RoundingMode): string
  • formatNumberToAllowableTensMultiplier(value: string | number, tensMultiplier: number, roundingMode?: RoundingMode): string
  • formatPriceToAllowableDecimals(value: string | number, allowableDecimals: number): string
  • formatPriceToAllowablePrice(value: string | number, tensMultiplier: number): string
  • fromBase64(payload: string): Record<string, any>
  • getAddressFromInjectiveAddress(address: string): string
  • getChecksumAddress(ethAddress: string): string
  • getDefaultEip712Types(): { types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } }
  • Returns { types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } }

    • types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] }
      • Coin: { name: string; type: string }[]
      • EIP712Domain: { name: string; type: string }[]
      • Fee: { name: string; type: string }[]
      • Msg: { name: string; type: string }[]
      • Tx: { name: string; type: string }[]
  • getDefaultSubaccountId(injectiveAddress: string): string
  • getDerivativeMarketDecimals(__namedParameters: { minPriceTickSize: string | number; minQuantityTickSize: string | number; quoteDecimals: number }): { priceDecimals: number; quantityDecimals: number }
  • Parameters

    • __namedParameters: { minPriceTickSize: string | number; minQuantityTickSize: string | number; quoteDecimals: number }
      • minPriceTickSize: string | number
      • minQuantityTickSize: string | number
      • quoteDecimals: number

    Returns { priceDecimals: number; quantityDecimals: number }

    • priceDecimals: number
    • quantityDecimals: number
  • getDerivativeMarketTensMultiplier(__namedParameters: { minPriceTickSize: string | number; minQuantityTickSize: string | number; quoteDecimals: number }): { priceTensMultiplier: number; quantityTensMultiplier: number }
  • Parameters

    • __namedParameters: { minPriceTickSize: string | number; minQuantityTickSize: string | number; quoteDecimals: number }
      • minPriceTickSize: string | number
      • minQuantityTickSize: string | number
      • quoteDecimals: number

    Returns { priceTensMultiplier: number; quantityTensMultiplier: number }

    • priceTensMultiplier: number
    • quantityTensMultiplier: number
  • getEip712Domain(ethereumChainId: EthereumChainId): { domain: { chainId: string; name: string; salt: string; verifyingContract: string; version: string } }
  • Parameters

    Returns { domain: { chainId: string; name: string; salt: string; verifyingContract: string; version: string } }

    • domain: { chainId: string; name: string; salt: string; verifyingContract: string; version: string }
      • chainId: string
      • name: string
      • salt: string
      • verifyingContract: string
      • version: string
  • getEip712Fee(params?: Eip712ConvertFeeArgs): { fee: { amount: { amount: string; denom: string }[]; feePayer?: string; gas: string } }
  • Parameters

    Returns { fee: { amount: { amount: string; denom: string }[]; feePayer?: string; gas: string } }

    • fee: { amount: { amount: string; denom: string }[]; feePayer?: string; gas: string }
      • amount: { amount: string; denom: string }[]
      • Optional feePayer?: string
      • gas: string
  • getEip712TypedData(__namedParameters: { ethereumChainId: EthereumChainId; fee?: Eip712ConvertFeeArgs; msgs: Msgs | Msgs[]; tx: Eip712ConvertTxArgs }): { domain: { chainId: string; name: string; salt: string; verifyingContract: string; version: string }; message: { account_number: string; chain_id: string; fee: { amount: { amount: string; denom: string }[]; feePayer?: string; gas: string }; memo: string; msgs: { type: string; value: Record<string, unknown> }[]; sequence: string; timeout_height: string }; primaryType: string; types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } }
  • Parameters

    Returns { domain: { chainId: string; name: string; salt: string; verifyingContract: string; version: string }; message: { account_number: string; chain_id: string; fee: { amount: { amount: string; denom: string }[]; feePayer?: string; gas: string }; memo: string; msgs: { type: string; value: Record<string, unknown> }[]; sequence: string; timeout_height: string }; primaryType: string; types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } }

    • domain: { chainId: string; name: string; salt: string; verifyingContract: string; version: string }
      • chainId: string
      • name: string
      • salt: string
      • verifyingContract: string
      • version: string
    • message: { account_number: string; chain_id: string; fee: { amount: { amount: string; denom: string }[]; feePayer?: string; gas: string }; memo: string; msgs: { type: string; value: Record<string, unknown> }[]; sequence: string; timeout_height: string }
      • account_number: string
      • chain_id: string
      • fee: { amount: { amount: string; denom: string }[]; feePayer?: string; gas: string }
        • amount: { amount: string; denom: string }[]
        • Optional feePayer?: string
        • gas: string
      • memo: string
      • msgs: { type: string; value: Record<string, unknown> }[]
      • sequence: string
      • timeout_height: string
    • primaryType: string
    • types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] }
      • Coin: { name: string; type: string }[]
      • EIP712Domain: { name: string; type: string }[]
      • Fee: { name: string; type: string }[]
      • Msg: { name: string; type: string }[]
      • Tx: { name: string; type: string }[]
  • getEipTxDetails(__namedParameters: Eip712ConvertTxArgs): { account_number: string; chain_id: string; memo: string; sequence: string; timeout_height: string }
  • getErrorMessage(error: any, endpoint: string): string
  • getEthereumAddress(injectiveAddress: string): string
  • getEthereumSignerAddress(address: undefined | string): string
  • getExactDecimalsFromNumber(number: string | number): number
  • Parameters

    • number: string | number

    Returns number

  • getGasPriceBasedOnMessage(msgs: Msgs[]): number
  • getInjectiveAddress(ethAddress: string): string
  • getInjectiveSignerAddress(address: undefined | string): string
  • getObjectEip712PropertyType(__namedParameters: { messageType?: string; parentProperty: string; property: string }): string
  • getSignificantDecimalsFromNumber(number: string | number | BigNumber): number
  • Parameters

    Returns number

  • getSpotMarketDecimals(__namedParameters: { baseDecimals: number; minPriceTickSize: string | number; minQuantityTickSize: string | number; quoteDecimals: number }): { priceDecimals: number; quantityDecimals: number }
  • Parameters

    • __namedParameters: { baseDecimals: number; minPriceTickSize: string | number; minQuantityTickSize: string | number; quoteDecimals: number }
      • baseDecimals: number
      • minPriceTickSize: string | number
      • minQuantityTickSize: string | number
      • quoteDecimals: number

    Returns { priceDecimals: number; quantityDecimals: number }

    • priceDecimals: number
    • quantityDecimals: number
  • getSpotMarketTensMultiplier(__namedParameters: { baseDecimals: number; minPriceTickSize: string | number; minQuantityTickSize: string | number; quoteDecimals: number }): { priceTensMultiplier: number; quantityTensMultiplier: number }
  • Parameters

    • __namedParameters: { baseDecimals: number; minPriceTickSize: string | number; minQuantityTickSize: string | number; quoteDecimals: number }
      • baseDecimals: number
      • minPriceTickSize: string | number
      • minQuantityTickSize: string | number
      • quoteDecimals: number

    Returns { priceTensMultiplier: number; quantityTensMultiplier: number }

    • priceTensMultiplier: number
    • quantityTensMultiplier: number
  • getTensMultiplier(number: string | number): number
  • This function returns a multiplier of 10 based on the input. There are two cases:

    1. If the number is less than 1, it returns a NEGATIVE number which is the number of decimals the number has

    2. If the number is higher than 1, it returns a POSITIVE number which is the number of 10 multiplier the number has

    Parameters

    • number: string | number

    Returns number

  • getTriggerPrice(triggerPrice?: string | number): string
  • getTypesIncludingFeePayer(__namedParameters: { fee?: Eip712ConvertFeeArgs; types: { types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } } }): { types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } }
  • Parameters

    • __namedParameters: { fee?: Eip712ConvertFeeArgs; types: { types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } } }
      • Optional fee?: Eip712ConvertFeeArgs
      • types: { types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } }
        • types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] }
          • Coin: { name: string; type: string }[]
          • EIP712Domain: { name: string; type: string }[]
          • Fee: { name: string; type: string }[]
          • Msg: { name: string; type: string }[]
          • Tx: { name: string; type: string }[]

    Returns { types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] } }

    • types: { Coin: { name: string; type: string }[]; EIP712Domain: { name: string; type: string }[]; Fee: { name: string; type: string }[]; Msg: { name: string; type: string }[]; Tx: { name: string; type: string }[] }
      • Coin: { name: string; type: string }[]
      • EIP712Domain: { name: string; type: string }[]
      • Fee: { name: string; type: string }[]
      • Msg: { name: string; type: string }[]
      • Tx: { name: string; type: string }[]
  • grpcCoinToUiCoin(coin: Coin): Coin
  • hashToHex(data: string): string
  • hexToBase64(hex: string): string
  • injectiveAccountParser(ethAccount: any): Account
  • isBrowser(): boolean
  • isNode(): boolean
  • isNumber(number: string | number): boolean
  • isReactNative(): boolean
  • isServerSide(): boolean
  • isTxNotFoundError(error: any): boolean
  • makeTimeoutTimestamp(timeoutInMs?: number): number
  • Returns a timeout timestamp in milliseconds so its compatible with the way Cosmos handles transactions

    Parameters

    • timeoutInMs: number = DEFAULT_TIMESTAMP_TIMEOUT_MS

    Returns number

  • makeTimeoutTimestampInNs(timeoutInMs?: number): number
  • Returns a timeout timestamp in nanoseconds so its compatible with the way Cosmos handles transactions

    Parameters

    • timeoutInMs: number = DEFAULT_TIMESTAMP_TIMEOUT_MS

    Returns number

  • mapValuesToProperValueType<T>(object: T, messageTypeUrl?: string): T
  • We need to represent some of the values in a proper format acceptable by the chain.

    1. We need to represent some values from a number to string This needs to be done for every number value except for maps (ex: vote option)

    2. We need to convert every sdk.Dec value from a raw value to shifted by 1e18 value ex: 0.01 -> 0.01000000000000000000, 1 -> 1.000000000000000000

    3. For some fields, like 'amount' in the 'MsgIncreasePositionMargin' we have to also specify the Message type to apply the sdk.Dec conversion because there are other amount fields in other messages as well and we don't want to affect them

    Type Parameters

    • T extends Record<string, unknown>

    Parameters

    • object: T
    • Optional messageTypeUrl: string

    Returns T

  • numberToCosmosSdkDecString(value: string | number | BigNumber): string
  • numberTypeToReflectionNumberType(property?: string): "int32" | "uint64" | "int64"
  • JavaScript doesn't know the exact number types that we represent these fields on chain so we have to map them in their chain representation from the number value that is available in JavaScript

    Parameters

    • Optional property: string

    Returns "int32" | "uint64" | "int64"

  • objectKeysToEip712Types(__namedParameters: { messageType?: string; object: Record<string, any>; primaryType?: string }): internal.Map<string, TypedDataField[]>
  • objectToJson(object: Record<string, any>, params?: { indentation?: number; replacer?: any }): string
  • paginationUint8ArrayToString(key: any): string
  • privateKeyHashToPublicKeyBase64(privateKeyHash: string): string
  • protoObjectToJson(object: any, params?: { indentation?: number; replacer?: any }): string
  • protoTypeToAminoType(type: string): string
  • recoverTypedSignaturePubKey(data: any, signature: string): string
  • snakeToPascal(str: string): string
  • sortObjectByKeys<T>(obj: T): T
  • sortObjectByKeysWithReduce<T>(obj: T): T
  • spotPriceFromChainPrice(__namedParameters: { baseDecimals?: string | number; quoteDecimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { baseDecimals?: string | number; quoteDecimals?: string | number; value: string | number | BigNumber }
      • Optional baseDecimals?: string | number
      • Optional quoteDecimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • spotPriceFromChainPriceToFixed(__namedParameters: { baseDecimals?: string | number; decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; value: string | number | BigNumber }): string
  • Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format where x is a human readable number stringified

    Parameters

    • __namedParameters: { baseDecimals?: string | number; decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; value: string | number | BigNumber }
      • Optional baseDecimals?: string | number
      • Optional decimalPlaces?: number
      • Optional quoteDecimals?: string | number
      • Optional roundingMode?: RoundingMode
      • value: string | number | BigNumber

    Returns string

  • spotPriceToChainPrice(__namedParameters: { baseDecimals?: string | number; quoteDecimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { baseDecimals?: string | number; quoteDecimals?: string | number; value: string | number | BigNumber }
      • Optional baseDecimals?: string | number
      • Optional quoteDecimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • spotPriceToChainPriceToFixed(__namedParameters: { baseDecimals?: string | number; decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }): string
  • Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format where x is a human readable number stringified

    Parameters

    • __namedParameters: { baseDecimals?: string | number; decimalPlaces?: number; quoteDecimals?: string | number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }
      • Optional baseDecimals?: string | number
      • Optional decimalPlaces?: number
      • Optional quoteDecimals?: string | number
      • Optional roundingMode?: RoundingMode
      • Optional tensMultiplier?: number
      • value: string | number | BigNumber

    Returns string

  • spotQuantityFromChainQuantity(__namedParameters: { baseDecimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain returns is in the x * 10^(baseDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { baseDecimals?: string | number; value: string | number | BigNumber }
      • Optional baseDecimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • spotQuantityFromChainQuantityToFixed(__namedParameters: { baseDecimals?: string | number; decimalPlaces?: number; roundingMode?: RoundingMode; value: string | number | BigNumber }): string
  • Amount that the chain returns is in the x * 10^(baseDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { baseDecimals?: string | number; decimalPlaces?: number; roundingMode?: RoundingMode; value: string | number | BigNumber }
      • Optional baseDecimals?: string | number
      • Optional decimalPlaces?: number
      • Optional roundingMode?: RoundingMode
      • value: string | number | BigNumber

    Returns string

  • spotQuantityToChainQuantity(__namedParameters: { baseDecimals?: string | number; value: string | number | BigNumber }): BigNumber
  • Amount that the chain requires is in the x * 10^(baseDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { baseDecimals?: string | number; value: string | number | BigNumber }
      • Optional baseDecimals?: string | number
      • value: string | number | BigNumber

    Returns BigNumber

  • spotQuantityToChainQuantityToFixed(__namedParameters: { baseDecimals?: string | number; decimalPlaces?: number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }): string
  • Amount that the chain requires is in the x * 10^(baseDecimals) format where x is a human readable number

    Parameters

    • __namedParameters: { baseDecimals?: string | number; decimalPlaces?: number; roundingMode?: RoundingMode; tensMultiplier?: number; value: string | number | BigNumber }
      • Optional baseDecimals?: string | number
      • Optional decimalPlaces?: number
      • Optional roundingMode?: RoundingMode
      • Optional tensMultiplier?: number
      • value: string | number | BigNumber

    Returns string

  • toBase64(data: Record<string, any>): string
  • toPascalCase(str: string): string

Generated using TypeDoc