@verto/component
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Verto logo (light version)

Verto Component

Build Verto functionality into your own SmartWeave contract

Installation

npm install @verto/component

or

yarn add @verto/component

Prerequisites

Your SmartWeave contract state MUST contain the following variables in order for the Verto Components to function properly:

{
  emergencyHaltWallet: "",
  halted: false,
  pairs: [],
  usedTransfers: [],
  invocations: [],
  foreignCalls: []
}

Usage

This library implements the core functions necessary to give SmartWeave contracts the ability to manage a central limit order book.

Import

To use the library, you'll need to import its functions

import * as verto from "@verto/component";

OR

import {
  AddPair,
  CancelOrder,
  CreateOrder,
  Halt,
  ReadOutbox,
} from "@verto/component";

Add a pair

const newState = await AddPair(state, action);

Readme

Keywords

none

Package Sidebar

Install

npm i @verto/component

Weekly Downloads

1

Version

0.1.1

License

none

Unpacked Size

35.6 kB

Total Files

5

Last publish

Collaborators

  • andreespirela
  • codingknite
  • martondev
  • tbaumer22
  • divy-work