Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Latest commit

 

History

History
38 lines (25 loc) · 969 Bytes

File metadata and controls

38 lines (25 loc) · 969 Bytes

Express wrapper

  • The express wrapper is meant to be a temporary wrapper that can accept json objects and interact with the chain.

Running

  • Make sure to have the HPF Substrate chain running at port 9944 (docker-compose up will start a chain for you if not running)
  • yarn
  • yarn start (use yarn express for dev mode)

Config

  • in express/config/config.ts you can add a custom ws endpoint/ default is local host

Usage

examples

  • examples can be found in express.test.ts
const returned = await axios.post(url, {
  seed: "//Alice",
  manifest,
});
  • will return the escrow Id that was created
const returnedBalance = await axios.post(url, {
  escrowId,
});
  • will return the balance of the escrow Id