Skip to content

Commit

Permalink
Merge pull request #692 from bvotteler/fix-add-interbtc-types-definit…
Browse files Browse the repository at this point in the history
…ions-to-lib

Fix: add interbtc types definitions to lib
  • Loading branch information
bvotteler authored Sep 12, 2023
2 parents 1c5db38 + 77e94ac commit 6999a55
Show file tree
Hide file tree
Showing 3 changed files with 581 additions and 8 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interlay/interbtc-api",
"version": "2.5.0",
"version": "2.5.1",
"description": "JavaScript library to interact with interBTC",
"main": "build/src/index.js",
"type": "module",
Expand Down Expand Up @@ -55,7 +55,6 @@
"engineStrict": true,
"dependencies": {
"@interlay/esplora-btc-api": "0.4.0",
"@interlay/interbtc-types": "1.13.0",
"@interlay/monetary-js": "0.7.3",
"@polkadot/api": "10.9.1",
"big.js": "6.1.1",
Expand Down
7 changes: 1 addition & 6 deletions src/interfaces/definitions.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { RpcFunctionDefinition } from "@interlay/interbtc-types";
import fs from "fs";

// hacky, but cannot import json "the old way" in esnext
const definitionsString = fs.readFileSync("./node_modules/@interlay/interbtc-types/definitions.json", "utf-8");
const definitions = JSON.parse(definitionsString);
import { definitions, RpcFunctionDefinition } from "./interbtc-types";

interface DecoratedRpcFunctionDefinition extends RpcFunctionDefinition {
aliasSection: string;
Expand Down
Loading

0 comments on commit 6999a55

Please sign in to comment.