Query <TInstructions, TDescriptor>
Constructors
- 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
- get instructions(): Readonly<TInstructions>
Returns Readonly<TInstructions>
Methods
- 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 }
Returns Query<[...TInstructions[], { api: TApi; args: TArguments; at: At; instruction: call-api; pallet: TPallet }], TDescriptor>
- 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 }
Returns Query<[...TInstructions[], { api: TApi; args: TArguments[]; at: At; instruction: call-api; multi: true; pallet: TPallet }], TDescriptor>
- 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<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 }
Returns Query<[...TInstructions[], { args: TArguments; at: At; instruction: read-storage; pallet: TPallet; storage: TStorage }], TDescriptor>
- 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 }
Returns Query<[...TInstructions[], { args: TArguments; at: At; instruction: read-storage-entries; pallet: TPallet; storage: TStorage }], TDescriptor>
- 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 }
Returns Query<[...TInstructions[], { args: TArguments[]; at: At; instruction: read-storage; multi: true; pallet: TPallet; storage: TStorage }], TDescriptor>