Constructors

Properties

constructorDefinition: EndpointDefinition
customTypes: CustomType[] = []
endpoints: EndpointDefinition[] = []
events: EventDefinition[] = []
name: string

Methods

  • Right after loading ABI definitions into a registry, the endpoints and the custom types (structs, enums) use raw types for their I/O parameters (in the case of endpoints), or for their fields (in the case of structs).

    A raw type is merely an instance of Type, with a given name and type parameters (if it's a generic type).

    Though, for most (development) purposes, we'd like to operate using known, specific types (e.g. List, U8Type etc.). This function increases the specificity of the types used by parameter / field definitions within a registry (on best-efforts basis). The result is an equivalent, more explicit ABI registry.

    Returns AbiRegistry

  • Parameters

    • options: {
          constructor?: any;
          endpoints?: any[];
          events?: any[];
          name?: string;
          types?: Record<string, any>;
      }
      • Optional constructor?: any
      • Optional endpoints?: any[]
      • Optional events?: any[]
      • Optional name?: string
      • Optional types?: Record<string, any>

    Returns AbiRegistry