Batch.ts
This module interfaces with the indexer via the GraphQL protocol.
Added in v2.0.0
Signature
export interface Batch extends Inspectable.Inspectable, Pipeable, Iterable<ZkgmInstruction.ZkgmInstruction> { // ZkgmInstruction.Encodeable<ParseError, never> readonly [TypeId]: TypeId readonly _tag: "Batch" readonly instructions: NonEmptyReadonlyArray<ZkgmInstruction.ZkgmInstruction> readonly opcode: 2 readonly version: 0}
Source: src/Batch.ts:35
Added in v2.0.0
Signature
export declare const TypeId: typeof TypeId
Source: src/Batch.ts:23
Added in v2.0.0
Signature
export type TypeId = typeof TypeId
Source: src/Batch.ts:29
Added in v2.0.0
Signature
export declare const make: <A extends ZkgmInstruction.ZkgmInstruction>(iterable: Iterable<A>) => Batch
Source: src/Batch.ts:98
Added in v2.0.0
Optimizes a given Batch
into a ZkgmInstruction
such that the following rules are applied:
TokenOrder
s with zero base amount are removed.- TODO: A
Batch
with a singularTokenOrder
is reduced to the givenTokenOrder
.
Signature
export declare const optimize: (self: Batch) => Batch
Source: src/Batch.ts:120
Added in v2.0.0