Skip to main content

Query <TInstructions, TDescriptor>

Index

Constructors

constructor

  • new Query<TInstructions, TDescriptor>(instructions: TInstructions): Query<TInstructions, TDescriptor>
  • Type parameters

    • TInstructions: QueryInstruction<ChainDefinition>[] = QueryInstruction<ChainDefinition>[]
    • TDescriptor: ChainDefinition = ChainDefinition

    Parameters

    • instructions: TInstructions

    Returns Query<TInstructions, TDescriptor>

Accessors

instructions

  • get instructions(): Readonly<TInstructions>
  • Returns Readonly<TInstructions>

Methods

callApi

  • callApi<TPallet, TApi, TArguments>(pallet: TPallet, api: TApi, args: TArguments, options?: { at?: At }): Query<[...TInstructions[], { api: TApi; args: TArguments; at: At; instruction: call-api; pallet: TPallet }], TDescriptor>
  • Type parameters

    • TPallet: string | number | symbol
    • TApi: string | number | symbol
    • TArguments

    Parameters

    • pallet: TPallet
    • api: TApi
    • args: TArguments
    • optionaloptions: { at?: At }
      • optionalat: At

    Returns Query<[...TInstructions[], { api: TApi; args: TArguments; at: At; instruction: call-api; pallet: TPallet }], TDescriptor>

callApis

  • callApis<TPallet, TApi, TArguments>(pallet: TPallet, api: TApi, args: TArguments[], options?: { at?: At }): Query<[...TInstructions[], { api: TApi; args: TArguments[]; at: At; instruction: call-api; multi: true; pallet: TPallet }], TDescriptor>
  • Type parameters

    • TPallet: string | number | symbol
    • TApi: string | number | symbol
    • TArguments

    Parameters

    • pallet: TPallet
    • api: TApi
    • args: TArguments[]
    • optionaloptions: { at?: At }
      • optionalat: At

    Returns Query<[...TInstructions[], { api: TApi; args: TArguments[]; at: At; instruction: call-api; multi: true; pallet: TPallet }], TDescriptor>

getConstant

  • getConstant<TPallet, TConstant>(pallet: TPallet, constant: TConstant): Query<[...TInstructions[], { constant: TConstant; instruction: get-constant; pallet: TPallet }], TDescriptor>
  • Type parameters

    • TPallet: string | number | symbol
    • TConstant: string | number | symbol

    Parameters

    • pallet: TPallet
    • constant: TConstant

    Returns Query<[...TInstructions[], { constant: TConstant; instruction: get-constant; pallet: TPallet }], TDescriptor>

readStorage

  • readStorage<TPallet, TStorage, TArguments>(pallet: TPallet, storage: TStorage, args: TArguments, options?: { at?: At }): Query<[...TInstructions[], { args: TArguments; at: At; instruction: read-storage; pallet: TPallet; storage: TStorage }], TDescriptor>
  • Type parameters

    • TPallet: string | number | symbol
    • TStorage: string | number | symbol
    • TArguments

    Parameters

    • pallet: TPallet
    • storage: TStorage
    • args: TArguments
    • optionaloptions: { at?: At }
      • optionalat: At

    Returns Query<[...TInstructions[], { args: TArguments; at: At; instruction: read-storage; pallet: TPallet; storage: TStorage }], TDescriptor>

readStorageEntries

  • readStorageEntries<TPallet, TStorage, TArguments>(pallet: TPallet, storage: TStorage, args: TArguments, options?: { at?: At }): Query<[...TInstructions[], { args: TArguments; at: At; instruction: read-storage-entries; pallet: TPallet; storage: TStorage }], TDescriptor>
  • Type parameters

    • TPallet: string | number | symbol
    • TStorage: string | number | symbol
    • TArguments

    Parameters

    • pallet: TPallet
    • storage: TStorage
    • args: TArguments
    • optionaloptions: { at?: At }
      • optionalat: At

    Returns Query<[...TInstructions[], { args: TArguments; at: At; instruction: read-storage-entries; pallet: TPallet; storage: TStorage }], TDescriptor>

readStorages

  • readStorages<TPallet, TStorage, TArguments>(pallet: TPallet, storage: TStorage, args: TArguments[], options?: { at?: At }): Query<[...TInstructions[], { args: TArguments[]; at: At; instruction: read-storage; multi: true; pallet: TPallet; storage: TStorage }], TDescriptor>
  • Type parameters

    • TPallet: string | number | symbol
    • TStorage: string | number | symbol
    • TArguments

    Parameters

    • pallet: TPallet
    • storage: TStorage
    • args: TArguments[]
    • optionaloptions: { at?: At }
      • optionalat: At

    Returns Query<[...TInstructions[], { args: TArguments[]; at: At; instruction: read-storage; multi: true; pallet: TPallet; storage: TStorage }], TDescriptor>