Options
All
  • Public
  • Public/Protected
  • All
Menu

@iov/ethereum Documentation

Index

Type aliases

Eip155ChainId

Eip155ChainId: object | object

Information attached to a signature about its state in a block

Erc20TokensMap

Erc20TokensMap: ReadonlyMap<TokenTicker, Erc20Options>

Variables

Const ethereumCodec

ethereumCodec: EthereumCodec = new EthereumCodec({})

An unconfigured EthereumCodec for backwards compatibility

Functions

createEthereumConnector

decodeHexQuantity

  • decodeHexQuantity(hexString: string): number
  • Parameters

    • hexString: string

    Returns number

decodeHexQuantityNonce

  • decodeHexQuantityNonce(hexString: string): Nonce
  • Parameters

    • hexString: string

    Returns Nonce

decodeHexQuantityString

  • decodeHexQuantityString(hexString: string): string
  • Parameters

    • hexString: string

    Returns string

eip155V

encodeQuantity

  • encodeQuantity(value: number): string
  • Parameters

    • value: number

    Returns string

encodeQuantityString

  • encodeQuantityString(value: string): string
  • Parameters

    • value: string

    Returns string

fromBcpChainId

  • fromBcpChainId(chainId: ChainId): number
  • Parameters

    • chainId: ChainId

    Returns number

getRecoveryParam

isErc20ApproveTransaction

  • isErc20ApproveTransaction(transaction: LightTransaction): boolean
  • Parameters

    • transaction: LightTransaction

    Returns boolean

isValidAddress

  • isValidAddress(address: string): boolean
  • Parameters

    • address: string

    Returns boolean

normalizeHex

  • normalizeHex(input: string): string
  • Takes a hex representation optionally prefixed with 0x and returns a normalized representation: unprefixed, padded to even characters count, lower case.

    Parameters

    • input: string

    Returns string

pubkeyToAddress

  • pubkeyToAddress(pubkey: PubkeyBundle): Address
  • Parameters

    • pubkey: PubkeyBundle

    Returns Address

toBcpChainId

  • toBcpChainId(numericChainId: number): ChainId
  • Parameters

    • numericChainId: number

    Returns ChainId

toChecksummedAddress

  • toChecksummedAddress(address: string | Uint8Array): Address

toEthereumHex

  • toEthereumHex(input: string | Uint8Array): string
  • Takes a hex representation optionally prefixed with 0x and returns an Ethereum-friendly representation with a prefix.

    Parameters

    • input: string | Uint8Array

    Returns string

toRlp

  • toRlp(data: rlp.Input): Uint8Array
  • Encode as RLP (Recursive Length Prefix)

    Parameters

    • data: rlp.Input

    Returns Uint8Array

Object literals

Const constants

constants: object

primaryTokenFractionalDigits

primaryTokenFractionalDigits: number = 18

primaryTokenName

primaryTokenName: string = "Ether"

primaryTokenTicker

primaryTokenTicker: string & As<"token-ticker"> = "ETH" as TokenTicker

Generated using TypeDoc