Batch.ts
This module provides a high-level API for UCS03 Batch instruction construction.
Added in v2.0.0
Signature
export interface Batch extends Inspectable.Inspectable, Pipeable, Iterable<ZkgmInstruction.ZkgmInstruction> { readonly [TypeId]: TypeId readonly _tag: "Batch" readonly instructions: NonEmptyReadonlyArray<ZkgmInstruction.ZkgmInstruction> readonly opcode: 2 readonly version: 0}Source: src/Batch.ts:31
Added in v2.0.0
Signature
export declare const TypeId: typeof TypeIdSource: src/Batch.ts:19
Added in v2.0.0
Signature
export type TypeId = typeof TypeIdSource: src/Batch.ts:25
Added in v2.0.0
Signature
export declare const make: <A extends ZkgmInstruction.ZkgmInstruction>(iterable: Iterable<A>) => BatchSource: src/Batch.ts:63
Added in v2.0.0
Optimizes a given Batch into a ZkgmInstruction such that the following rules are applied:
TokenOrders with zero base amount are removed.- TODO: A
Batchwith a singularTokenOrderis reduced to the givenTokenOrder.
Signature
export declare const optimize: (self: Batch) => BatchSource: src/Batch.ts:84
Added in v2.0.0