Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Operation

import { Operation } from "https://raw.githubusercontent.com/marigold-dev/tzstamp/0.3.4/proof/mod.ts";
abstract

Proof operation

abstract class Operation {
abstract commit(input: Uint8Array): Uint8Array;
abstract toJSON(): OperationTemplate;
abstract toString(): string;
 
static from(template: unknown): Operation;
}

§Methods

§
commit(input: Uint8Array): Uint8Array abstract
[src]

Commits the operation to the input.

§
toJSON(): OperationTemplate abstract
[src]

Converts the operation to a JSON-serializable template.

§
toString(): string abstract
[src]

Represents the operation as a human friendly string.

§Static Methods

§
from(template: unknown): Operation
[src]

Creates a subclassed operation from a template object. Throws InvalidTemplateError if the template is invalid. Throws UnsupportedOperationError if operation is not supported.

Operation.from({
  type: "sha256",
});
// Sha256Operation {}
@param template

Template object