Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MetabackendClient

Client of a Getline metabackend service.

The Metabackend service is used to:

  • index loans and quickly retrieve them by ID, state or owner
  • keep metadata that would be expensive to keep on-chain
  • serve versioned smart contract information to clients

Hierarchy

  • MetabackendClient

Index

Constructors

constructor

Properties

Private contractDefinitions

contractDefinitions: Array<pb.Contract> | undefined

Private contractDefinitionsLock

contractDefinitionsLock: Mutex

Private metabackendHost

metabackendHost: string

Private network

network: string

Methods

getABI

  • getABI(name: string): Promise<Array<Web3.AbiDefinition>>
  • Returns a Web3 JSON ABI for a given contract name.

    Parameters

    • name: string

    Returns Promise<Array<Web3.AbiDefinition>>

getBytecode

  • getBytecode(name: string): Promise<string>
  • Gets the bytecode of a contract from the metabackend.

    Parameters

    • name: string

    Returns Promise<string>

Private getContractDefinitions

  • getContractDefinitions(): Promise<Array<pb.Contract>>
  • Loads all contract definitions for a given network from the metabackend.

    Returns Promise<Array<pb.Contract>>

invoke

  • invoke<TReq, TRes>(method: MethodDefinition<TReq, TRes>, req: TReq): Promise<TRes>
  • Invokes a gRPC method on the metabackend.

    Type parameters

    • TReq: jspb.Message

    • TRes: jspb.Message

    Parameters

    • method: MethodDefinition<TReq, TRes>
    • req: TReq

    Returns Promise<TRes>

Generated using TypeDoc