@verto/flex
@verto/flex
npm i @verto/flex
@verto/flex

@verto/flex

An embeddable, programmable order book framework

by useverto

0.1.1 (see all)License:https://github.com/useverto/flex/blob/main/LICENSETypeScript:Built-In
npm i @verto/flex
Readme

Verto logo (light version)

Verto Flex

An embeddable, programmable order book framework

Installation

npm install @verto/flex

or

yarn add @verto/flex

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 framework includes the core functions necessary to give SmartWeave contracts the ability to embed and manage a central limit order book.

Import

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

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

Add a pair

const { newState, result } = await AddPair(state, action);

Downloads/wk

25

GitHub Stars

0

LAST COMMIT

14d ago

MAINTAINERS

5

CONTRIBUTORS

1

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.1.1
latest
14d ago
No alternatives found
No tutorials found
Add a tutorial