ETHERspot docs

Index

Enumerations

Other Classes

Sdk Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AccountMemberNotification

AccountMemberNotification: BaseNotification<AccountMemberCreated | AccountMemberUpdated, { account: string; member: string }>

AccountNotification

AccountNotification: BaseNotification<AccountUpdated, { account: string }>

ContractAddresses

ContractAddresses: {} | string

ENSNodeNotification

ENSNodeNotification: BaseNotification<ENSNodeCreated | ENSNodeUpdated, { hash: string }>

EnvLike

EnvLike: EnvNames | Env

GatewayBatchNotification

GatewayBatchNotification: BaseNotification<GatewayBatchCreated | GatewayBatchUpdated, { hash: string }>

Notification

P2PPaymentChannelNotification

P2PPaymentChannelNotification: BaseNotification<P2PPaymentChannelCreated | P2PPaymentChannelUpdated, { hash: string }>

P2PPaymentDepositNotification

P2PPaymentDepositNotification: BaseNotification<P2PPaymentDepositCreated | P2PPaymentDepositUpdated, { hash: string }>

PaymentHubBridgeNotification

PaymentHubBridgeNotification: BaseNotification<PaymentHubBridgeCreated | PaymentHubBridgeUpdated, { acceptedChainId: number; acceptedToken: string; hub: string; token: string }>

PaymentHubDepositNotification

PaymentHubDepositNotification: BaseNotification<PaymentHubDepositCreated | PaymentHubDepositUpdated, { hub: string; owner: string; token: string }>

PaymentHubNotification

PaymentHubNotification: BaseNotification<PaymentHubCreated | PaymentHubUpdated, { hub: string; token: string }>

PaymentHubPaymentNotification

PaymentHubPaymentNotification: BaseNotification<PaymentHubPaymentCreated, { hash: string }>

StateStorageState

StateStorageState: Omit<State, "wallet" | "network" | "gatewayBatch">

WalletProviderLike

WalletProviderLike: string | WalletLike | WalletProvider

Variables

Const CHAIN_ID_TO_NETWORK_NAME

CHAIN_ID_TO_NETWORK_NAME: {} = Object.entries(NETWORK_NAME_TO_CHAIN_ID,).reduce((result, [networkName, chainId]) => ({...result,[chainId]: networkName,}),{},)

Type declaration

Const DEFAULT_PAYMENT_CHANNEL_UID_SALT

DEFAULT_PAYMENT_CHANNEL_UID_SALT: "default" = "default"

Const ENS_ADDR_REVERSE_TLD

ENS_ADDR_REVERSE_TLD: "addr.reverse" = "addr.reverse"

Const PAYMENT_HUB_P2P_CHANNEL_UID

PAYMENT_HUB_P2P_CHANNEL_UID: string = utils.id('PAYMENT_HUB_P2P_CHANNEL_ID')

Const TOKEN_LIST_MAX_NAME_LENGTH

TOKEN_LIST_MAX_NAME_LENGTH: 32 = 32

Const TOKEN_LIST_MIN_NAME_LENGTH

TOKEN_LIST_MIN_NAME_LENGTH: 3 = 3

Let currentNonce

currentNonce: number = Math.floor(Date.now() / 1000) - 1605000000

Const window

window: Window & { ethereum: { autoRefreshOnNetworkChange: boolean; isMetaMask: boolean; networkVersion: string; selectedAddress: string; enable: any; on: any; request: any } }

Functions

IsAddress

  • IsAddress(options?: ValidationOptions): (Anonymous function)
  • Parameters

    • Default value options: ValidationOptions = {}

    Returns (Anonymous function)

IsBigNumberish

  • IsBigNumberish(options?: { positive?: boolean }, validationOptions?: ValidationOptions): (Anonymous function)
  • Parameters

    • Default value options: { positive?: boolean } = {}
      • Optional positive?: boolean
    • Default value validationOptions: ValidationOptions = {}

    Returns (Anonymous function)

IsBytesLike

  • IsBytesLike(options?: ValidationOptions & { acceptText?: boolean }): (Anonymous function)
  • Parameters

    • Default value options: ValidationOptions & { acceptText?: boolean } = {}

    Returns (Anonymous function)

IsHex

  • IsHex(options?: { size?: number }, validationOptions?: ValidationOptions): (Anonymous function)
  • Parameters

    • Default value options: { size?: number } = {}
      • Optional size?: number
    • Default value validationOptions: ValidationOptions = {}

    Returns (Anonymous function)

IsHex32

  • IsHex32(options?: ValidationOptions): (Anonymous function)
  • Parameters

    • Default value options: ValidationOptions = {}

    Returns (Anonymous function)

IsUrl

  • IsUrl(validationOptions?: ValidationOptions): (Anonymous function)
  • Parameters

    • Default value validationOptions: ValidationOptions = {}

    Returns (Anonymous function)

addressesEqual

  • addressesEqual(address1: string, address2: string): boolean
  • Parameters

    • address1: string
    • address2: string

    Returns boolean

computePaymentChannelHash

  • computePaymentChannelHash(sender: string, recipient: string, token: string, uid: string): string
  • Parameters

    • sender: string
    • recipient: string
    • token: string
    • uid: string

    Returns string

createPaymentChannelUid

  • createPaymentChannelUid(salt?: string): string
  • Parameters

    • Default value salt: string = null

    Returns string

isWalletProvider

networkNameToChainId

parseENSName

prepareInputArg

  • prepareInputArg(type: string, arg: any): any
  • Parameters

    • type: string
    • arg: any

    Returns any

prepareNetworkName

  • prepareNetworkName(networkNameOrChainId: string | number): NetworkNames
  • Parameters

    • networkNameOrChainId: string | number

    Returns NetworkNames

randomPrivateKey

  • randomPrivateKey(): string
  • Returns string

Object literals

Const NETWORK_NAME_TO_CHAIN_ID

NETWORK_NAME_TO_CHAIN_ID: object

__computed

__computed: number = 3333

Const SUPPORTED_ENVS

SUPPORTED_ENVS: object

__computed

__computed: object

apiOptions

apiOptions: object

host

host: string = "localhost"

port

port: number = 4000

useSsl

useSsl: true = true

networkOptions

networkOptions: object

supportedNetworkNames

supportedNetworkNames: (LocalA | LocalB | LocalH)[] = [NetworkNames.LocalA, //NetworkNames.LocalB,NetworkNames.LocalH,]

Const SUPPORTED_FAUCET_NETWORKS

SUPPORTED_FAUCET_NETWORKS: object

__computed

__computed: true = true