Generic CosmWasm-enabled chain.

Hierarchy

Constructors

Properties

Agent: AgentClass<Agent> = ...

The Agent subclass to use for interacting with this chain.

api?: CosmWasmClient

Query-only API handle.

defaultDenom: string = ''

The default denomination of the chain's native token.

devnet?: DevnetHandle

If this is a devnet, this contains an interface to the devnet container.

id: string

The unique chain id.

log: Console = ...

Logger.

mode: ChainMode

Whether this is mainnet, public testnet, local devnet, or mocknet.

stopped: boolean = false

Whether this chain is stopped.

url: string = ''

The API URL to use.

The default Agent subclass to use for interacting with this chain.

Mode: typeof ChainMode = ChainMode

Shorthand for the ChainMode enum.

variants: ChainRegistry = ...

Async functions that return Chain instances in different modes. Values for FADROMA_CHAIN environment variable. Populated by @fadroma/connect.

Accessors

  • get devMode(): boolean
  • Whether this is a devnet or mocknet.

    Returns boolean

  • get height(): Promise<number>
  • Get the current block height.

    Returns Promise<number>

  • get isDevnet(): boolean
  • Whether this is a devnet.

    Returns boolean

  • get isMainnet(): boolean
  • Whether this is a mainnet.

    Returns boolean

  • get isMocknet(): boolean
  • Whether this is a mocknet.

    Returns boolean

  • get isTestnet(): boolean
  • Whether this is a testnet.

    Returns boolean

  • get nextBlock(): Promise<number>
  • Wait for the block height to increment.

    Returns Promise<number>

  • get ready(): Promise<this & {
        api: CosmWasmClient;
    }>
  • Async initialization. Populates the api property.

    Returns Promise<this & {
        api: CosmWasmClient;
    }>

Methods

  • Get the code hash of a smart contract.

    Parameters

    • address: string
    • Optional expectedCodeHash: string

    Returns Promise<string>

  • Get the native balance of an address.

    Parameters

    • denom: string
    • address: string

    Returns Promise<string>

  • Get the code id of a smart contract.

    Parameters

    • address: string

    Returns Promise<string>

  • Get the code hash of a smart contract.

    Parameters

    • address: string | number

    Returns Promise<string>

  • Get the label of a smart contract.

    Parameters

    • address: string

    Returns Promise<string>

Generated using TypeDoc