@shapeshiftoss/unchained-client 5.4.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -4
- package/dist/bitcoin/index.d.ts +3 -2
- package/dist/bitcoin/index.d.ts.map +1 -1
- package/dist/bitcoin/index.js +5 -14
- package/dist/bitcoin/index.js.map +1 -1
- package/dist/bitcoin/parser/index.d.ts +13 -0
- package/dist/bitcoin/parser/index.d.ts.map +1 -0
- package/dist/bitcoin/parser/index.js +74 -0
- package/dist/bitcoin/parser/index.js.map +1 -0
- package/dist/bitcoin/parser/utils.d.ts +4 -0
- package/dist/bitcoin/parser/utils.d.ts.map +1 -0
- package/dist/bitcoin/parser/utils.js +16 -0
- package/dist/bitcoin/parser/utils.js.map +1 -0
- package/dist/bitcoin/types.d.ts +2 -0
- package/dist/bitcoin/types.d.ts.map +1 -0
- package/dist/bitcoin/types.js +3 -0
- package/dist/bitcoin/types.js.map +1 -0
- package/dist/cosmos/index.d.ts +2 -1
- package/dist/cosmos/index.d.ts.map +1 -1
- package/dist/cosmos/index.js +4 -13
- package/dist/cosmos/index.js.map +1 -1
- package/dist/cosmos/parser/index.d.ts +13 -0
- package/dist/cosmos/parser/index.d.ts.map +1 -0
- package/dist/cosmos/parser/index.js +67 -0
- package/dist/cosmos/parser/index.js.map +1 -0
- package/dist/ethereum/index.d.ts +3 -2
- package/dist/ethereum/index.d.ts.map +1 -1
- package/dist/ethereum/index.js +5 -14
- package/dist/ethereum/index.js.map +1 -1
- package/dist/ethereum/parser/abi/erc20.d.ts +4 -0
- package/dist/ethereum/parser/abi/erc20.d.ts.map +1 -0
- package/dist/ethereum/parser/abi/erc20.js +292 -0
- package/dist/ethereum/parser/abi/erc20.js.map +1 -0
- package/dist/ethereum/parser/abi/multiSig.d.ts +4 -0
- package/dist/ethereum/parser/abi/multiSig.d.ts.map +1 -0
- package/dist/ethereum/parser/abi/multiSig.js +369 -0
- package/dist/ethereum/parser/abi/multiSig.js.map +1 -0
- package/dist/ethereum/parser/abi/shapeShiftRouter.d.ts +4 -0
- package/dist/ethereum/parser/abi/shapeShiftRouter.d.ts.map +1 -0
- package/dist/ethereum/parser/abi/shapeShiftRouter.js +495 -0
- package/dist/ethereum/parser/abi/shapeShiftRouter.js.map +1 -0
- package/dist/ethereum/parser/abi/thor.d.ts +4 -0
- package/dist/ethereum/parser/abi/thor.d.ts.map +1 -0
- package/dist/ethereum/parser/abi/thor.js +155 -0
- package/dist/ethereum/parser/abi/thor.js.map +1 -0
- package/dist/ethereum/parser/abi/uniV2.d.ts +4 -0
- package/dist/ethereum/parser/abi/uniV2.d.ts.map +1 -0
- package/dist/ethereum/parser/abi/uniV2.js +344 -0
- package/dist/ethereum/parser/abi/uniV2.js.map +1 -0
- package/dist/ethereum/parser/abi/yearnVault.d.ts +4 -0
- package/dist/ethereum/parser/abi/yearnVault.d.ts.map +1 -0
- package/dist/ethereum/parser/abi/yearnVault.js +648 -0
- package/dist/ethereum/parser/abi/yearnVault.js.map +1 -0
- package/dist/ethereum/parser/constants.d.ts +6 -0
- package/dist/ethereum/parser/constants.d.ts.map +1 -0
- package/dist/ethereum/parser/constants.js +9 -0
- package/dist/ethereum/parser/constants.js.map +1 -0
- package/dist/ethereum/parser/index.d.ts +21 -0
- package/dist/ethereum/parser/index.d.ts.map +1 -0
- package/dist/ethereum/parser/index.js +185 -0
- package/dist/ethereum/parser/index.js.map +1 -0
- package/dist/ethereum/parser/thor.d.ts +18 -0
- package/dist/ethereum/parser/thor.d.ts.map +1 -0
- package/dist/ethereum/parser/thor.js +81 -0
- package/dist/ethereum/parser/thor.js.map +1 -0
- package/dist/ethereum/parser/uniV2.d.ts +21 -0
- package/dist/ethereum/parser/uniV2.d.ts.map +1 -0
- package/dist/ethereum/parser/uniV2.js +130 -0
- package/dist/ethereum/parser/uniV2.js.map +1 -0
- package/dist/ethereum/parser/utils.d.ts +9 -0
- package/dist/ethereum/parser/utils.d.ts.map +1 -0
- package/dist/ethereum/parser/utils.js +47 -0
- package/dist/ethereum/parser/utils.js.map +1 -0
- package/dist/ethereum/parser/yearn.d.ts +24 -0
- package/dist/ethereum/parser/yearn.d.ts.map +1 -0
- package/dist/ethereum/parser/yearn.js +84 -0
- package/dist/ethereum/parser/yearn.js.map +1 -0
- package/dist/ethereum/parser/zrx.d.ts +7 -0
- package/dist/ethereum/parser/zrx.d.ts.map +1 -0
- package/dist/ethereum/parser/zrx.js +39 -0
- package/dist/ethereum/parser/zrx.js.map +1 -0
- package/dist/ethereum/types.d.ts +31 -0
- package/dist/ethereum/types.d.ts.map +1 -0
- package/dist/ethereum/types.js +3 -0
- package/dist/ethereum/types.js.map +1 -0
- package/dist/generated/bitcoin/api.d.ts +1 -1
- package/dist/generated/bitcoin/api.js +1 -1
- package/dist/generated/bitcoin/base.d.ts +1 -1
- package/dist/generated/bitcoin/base.js +1 -1
- package/dist/generated/bitcoin/common.d.ts +1 -1
- package/dist/generated/bitcoin/common.js +1 -1
- package/dist/generated/bitcoin/configuration.d.ts +1 -1
- package/dist/generated/bitcoin/configuration.js +1 -1
- package/dist/generated/bitcoin/index.d.ts +1 -1
- package/dist/generated/bitcoin/index.js +1 -1
- package/dist/generated/ethereum/api.d.ts +1 -1
- package/dist/generated/ethereum/api.js +1 -1
- package/dist/generated/ethereum/base.d.ts +1 -1
- package/dist/generated/ethereum/base.js +1 -1
- package/dist/generated/ethereum/common.d.ts +1 -1
- package/dist/generated/ethereum/common.js +1 -1
- package/dist/generated/ethereum/configuration.d.ts +1 -1
- package/dist/generated/ethereum/configuration.js +1 -1
- package/dist/generated/ethereum/index.d.ts +1 -1
- package/dist/generated/ethereum/index.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +2998 -325
- package/dist/types.d.ts +74 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +26 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +43 -0
- package/dist/utils.js.map +1 -0
- package/dist/{bitcoin/websocket.d.ts → websocket.d.ts} +8 -7
- package/dist/websocket.d.ts.map +1 -0
- package/dist/{ethereum/websocket.js → websocket.js} +9 -8
- package/dist/websocket.js.map +1 -0
- package/package.json +10 -6
- package/dist/bitcoin/websocket.d.ts.map +0 -1
- package/dist/bitcoin/websocket.js +0 -177
- package/dist/bitcoin/websocket.js.map +0 -1
- package/dist/ethereum/websocket.d.ts +0 -61
- package/dist/ethereum/websocket.d.ts.map +0 -1
- package/dist/ethereum/websocket.js.map +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Parser = void 0;
|
|
16
|
+
const sdk_1 = require("@yfi/sdk");
|
|
17
|
+
const ethers_1 = require("ethers");
|
|
18
|
+
const constants_1 = require("./constants");
|
|
19
|
+
const utils_1 = require("./utils");
|
|
20
|
+
const shapeShiftRouter_1 = __importDefault(require("./abi/shapeShiftRouter"));
|
|
21
|
+
const yearnVault_1 = __importDefault(require("./abi/yearnVault"));
|
|
22
|
+
class Parser {
|
|
23
|
+
constructor(args) {
|
|
24
|
+
this.shapeShiftInterface = new ethers_1.ethers.utils.Interface(shapeShiftRouter_1.default);
|
|
25
|
+
this.yearnInterface = new ethers_1.ethers.utils.Interface(yearnVault_1.default);
|
|
26
|
+
this.approvalSigHash = this.yearnInterface.getSighash('approve');
|
|
27
|
+
// TODO - work out how to use shapeShiftInterface.getSighash('deposit(address,address,uint256,uint256)')
|
|
28
|
+
this.depositSigHash = '0x20e8c565';
|
|
29
|
+
this.withdrawSigHash = '0x00f714ce';
|
|
30
|
+
this.provider = args.provider;
|
|
31
|
+
// The only Yearn-supported chain we currently support is mainnet
|
|
32
|
+
if (args.network == 'mainnet') {
|
|
33
|
+
// 1 for EthMain (@yfi/sdk/dist/chain.d.ts)
|
|
34
|
+
this.yearnSdk = new sdk_1.Yearn(1, { provider: this.provider, disableAllowlist: true });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
parse(tx) {
|
|
38
|
+
var _a, _b, _c, _d, _e;
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const data = (_a = tx.ethereumSpecific) === null || _a === void 0 ? void 0 : _a.data;
|
|
41
|
+
if (!data)
|
|
42
|
+
return;
|
|
43
|
+
const txSigHash = utils_1.getSigHash(data);
|
|
44
|
+
const abiInterface = this.getAbiInterface(txSigHash);
|
|
45
|
+
if (!abiInterface)
|
|
46
|
+
return;
|
|
47
|
+
const decoded = abiInterface.parseTransaction({ data });
|
|
48
|
+
const receiveAddress = (_c = (_b = tx.vout) === null || _b === void 0 ? void 0 : _b[0].addresses) === null || _c === void 0 ? void 0 : _c[0];
|
|
49
|
+
if (!this.yearnTokenVaultAddresses) {
|
|
50
|
+
const vaults = yield ((_d = this.yearnSdk) === null || _d === void 0 ? void 0 : _d.vaults.get());
|
|
51
|
+
this.yearnTokenVaultAddresses = vaults === null || vaults === void 0 ? void 0 : vaults.map((vault) => vault.address);
|
|
52
|
+
}
|
|
53
|
+
if (txSigHash === this.approvalSigHash && (decoded === null || decoded === void 0 ? void 0 : decoded.args._spender) !== constants_1.SHAPE_SHIFT_ROUTER_CONTRACT)
|
|
54
|
+
return;
|
|
55
|
+
if (txSigHash === this.depositSigHash && receiveAddress !== constants_1.SHAPE_SHIFT_ROUTER_CONTRACT)
|
|
56
|
+
return;
|
|
57
|
+
if (txSigHash === this.withdrawSigHash &&
|
|
58
|
+
receiveAddress &&
|
|
59
|
+
!((_e = this.yearnTokenVaultAddresses) === null || _e === void 0 ? void 0 : _e.includes(receiveAddress)))
|
|
60
|
+
return;
|
|
61
|
+
return {
|
|
62
|
+
data: {
|
|
63
|
+
method: decoded === null || decoded === void 0 ? void 0 : decoded.name,
|
|
64
|
+
parser: 'yearn',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
getAbiInterface(txSigHash) {
|
|
70
|
+
return (() => {
|
|
71
|
+
switch (txSigHash) {
|
|
72
|
+
case this.approvalSigHash:
|
|
73
|
+
case this.withdrawSigHash:
|
|
74
|
+
return this.yearnInterface;
|
|
75
|
+
case this.depositSigHash:
|
|
76
|
+
return this.shapeShiftInterface;
|
|
77
|
+
default:
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.Parser = Parser;
|
|
84
|
+
//# sourceMappingURL=yearn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yearn.js","sourceRoot":"","sources":["../../../src/ethereum/parser/yearn.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tx as BlockbookTx } from '@shapeshiftoss/blockbook';
|
|
2
|
+
import { GenericParser, TxSpecific } from '../../types';
|
|
3
|
+
import { ZrxTx } from '../types';
|
|
4
|
+
export declare class Parser implements GenericParser<BlockbookTx> {
|
|
5
|
+
parse(tx: BlockbookTx): Promise<TxSpecific<ZrxTx> | undefined>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=zrx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zrx.d.ts","sourceRoot":"","sources":["../../../src/ethereum/parser/zrx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAO,aAAa,EAAa,UAAU,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAIhC,qBAAa,MAAO,YAAW,aAAa,CAAC,WAAW,CAAC;IACjD,KAAK,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;CAmBrE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Parser = void 0;
|
|
13
|
+
const types_1 = require("../../types");
|
|
14
|
+
const utils_1 = require("./utils");
|
|
15
|
+
const constants_1 = require("./constants");
|
|
16
|
+
class Parser {
|
|
17
|
+
parse(tx) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
if (!utils_1.txInteractsWithContract(tx, constants_1.ZRX_PROXY_CONTRACT))
|
|
20
|
+
return;
|
|
21
|
+
if (!(tx.tokenTransfers && tx.tokenTransfers.length))
|
|
22
|
+
return;
|
|
23
|
+
const trade = {
|
|
24
|
+
dexName: types_1.Dex.Zrx,
|
|
25
|
+
type: types_1.TradeType.Trade,
|
|
26
|
+
};
|
|
27
|
+
const data = {
|
|
28
|
+
method: undefined,
|
|
29
|
+
parser: 'zrx',
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
trade,
|
|
33
|
+
data,
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.Parser = Parser;
|
|
39
|
+
//# sourceMappingURL=zrx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zrx.js","sourceRoot":"","sources":["../../../src/ethereum/parser/zrx.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uCAAuE;AAEvE,mCAAiD;AACjD,2CAAgD;AAEhD,MAAa,MAAM;IACX,KAAK,CAAC,EAAe;;YACzB,IAAI,CAAC,+BAAuB,CAAC,EAAE,EAAE,8BAAkB,CAAC;gBAAE,OAAM;YAC5D,IAAI,CAAC,CAAC,EAAE,CAAC,cAAc,IAAI,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC;gBAAE,OAAM;YAE5D,MAAM,KAAK,GAAG;gBACZ,OAAO,EAAE,WAAG,CAAC,GAAG;gBAChB,IAAI,EAAE,iBAAS,CAAC,KAAK;aACtB,CAAA;YAED,MAAM,IAAI,GAAG;gBACX,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,KAAK;aACd,CAAA;YAED,OAAO;gBACL,KAAK;gBACL,IAAI;aACL,CAAA;QACH,CAAC;KAAA;CACF;AApBD,wBAoBC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StandardTx, TxMetadata } from '../types';
|
|
2
|
+
export interface InternalTx {
|
|
3
|
+
blockNumber: string;
|
|
4
|
+
timeStamp: string;
|
|
5
|
+
hash: string;
|
|
6
|
+
from: string;
|
|
7
|
+
to: string;
|
|
8
|
+
value: string;
|
|
9
|
+
contractAddress: string;
|
|
10
|
+
input: string;
|
|
11
|
+
type: string;
|
|
12
|
+
gas: string;
|
|
13
|
+
gasUsed: string;
|
|
14
|
+
traceId: string;
|
|
15
|
+
isError: string;
|
|
16
|
+
errCode: string;
|
|
17
|
+
}
|
|
18
|
+
export declare type Network = 'mainnet' | 'ropsten';
|
|
19
|
+
export interface UniV2Tx extends StandardTx {
|
|
20
|
+
data?: TxMetadata;
|
|
21
|
+
}
|
|
22
|
+
export interface ZrxTx extends StandardTx {
|
|
23
|
+
data?: TxMetadata;
|
|
24
|
+
}
|
|
25
|
+
export interface ThorTx extends StandardTx {
|
|
26
|
+
data?: TxMetadata;
|
|
27
|
+
}
|
|
28
|
+
export interface YearnTx extends StandardTx {
|
|
29
|
+
data?: TxMetadata;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ethereum/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEjD,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,oBAAY,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAE3C,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAED,MAAM,WAAW,KAAM,SAAQ,UAAU;IACvC,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAED,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAED,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ethereum/types.ts"],"names":[],"mappings":""}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/bitcoin-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/bitcoin-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/bitcoin-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/bitcoin-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/bitcoin-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/bitcoin-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/bitcoin-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/bitcoin-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/bitcoin-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/bitcoin-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @shapeshiftoss/ethereum-api
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 6.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @shapeshiftoss/ethereum-api
|
|
6
6
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document:
|
|
8
|
+
* The version of the OpenAPI document: 6.0.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,OAAO,KAAK,EAAE,MAAM,aAAa,CAAA;AACjC,cAAc,SAAS,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -18,9 +18,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
18
18
|
__setModuleDefault(result, mod);
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
+
};
|
|
21
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.cosmos = exports.ethereum = exports.bitcoin = void 0;
|
|
25
|
+
exports.ws = exports.cosmos = exports.ethereum = exports.bitcoin = void 0;
|
|
23
26
|
exports.bitcoin = __importStar(require("./bitcoin"));
|
|
24
27
|
exports.ethereum = __importStar(require("./ethereum"));
|
|
25
28
|
exports.cosmos = __importStar(require("./cosmos"));
|
|
29
|
+
exports.ws = __importStar(require("./websocket"));
|
|
30
|
+
__exportStar(require("./types"), exports);
|
|
26
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAoC;AACpC,uDAAsC;AACtC,mDAAkC;AAElC,kDAAiC;AACjC,0CAAuB"}
|