@shapeshiftoss/unchained-client 9.1.1 → 9.3.1
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/dist/bitcoin/parser/index.d.ts +1 -0
- package/dist/bitcoin/parser/index.js +2 -1
- package/dist/dogecoin/index.d.ts +3 -0
- package/dist/dogecoin/index.js +19 -0
- package/dist/evm/avalanche/parser/index.d.ts +2 -2
- package/dist/evm/ethereum/parser/foxy.d.ts +3 -3
- package/dist/evm/ethereum/parser/index.d.ts +2 -2
- package/dist/evm/ethereum/parser/thor.d.ts +3 -3
- package/dist/evm/ethereum/parser/uniV2.d.ts +5 -5
- package/dist/evm/ethereum/parser/weth.d.ts +3 -3
- package/dist/evm/ethereum/parser/yearn.d.ts +3 -3
- package/dist/evm/ethereum/parser/zrx.d.ts +3 -3
- package/dist/evm/index.d.ts +2 -0
- package/dist/evm/index.js +3 -1
- package/dist/evm/parser/types.d.ts +2 -3
- package/dist/generated/avalanche/api.d.ts +121 -152
- package/dist/generated/avalanche/api.js +5 -5
- package/dist/generated/avalanche/base.d.ts +1 -1
- package/dist/generated/avalanche/base.js +1 -1
- package/dist/generated/avalanche/common.d.ts +1 -1
- package/dist/generated/avalanche/common.js +1 -1
- package/dist/generated/avalanche/configuration.d.ts +1 -1
- package/dist/generated/avalanche/configuration.js +1 -1
- package/dist/generated/avalanche/index.d.ts +1 -1
- package/dist/generated/avalanche/index.js +1 -1
- package/dist/generated/bitcoin/api.d.ts +45 -76
- 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/dogecoin/api.d.ts +1010 -0
- package/dist/generated/dogecoin/api.js +521 -0
- package/dist/generated/dogecoin/base.d.ts +55 -0
- package/dist/generated/dogecoin/base.js +64 -0
- package/dist/generated/dogecoin/common.d.ts +65 -0
- package/dist/generated/dogecoin/common.js +137 -0
- package/dist/generated/dogecoin/configuration.d.ts +83 -0
- package/dist/generated/dogecoin/configuration.js +42 -0
- package/dist/generated/dogecoin/index.d.ts +13 -0
- package/dist/generated/dogecoin/index.js +31 -0
- package/dist/generated/ethereum/api.d.ts +117 -148
- 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 +4 -1
- package/dist/index.js +5 -2
- package/dist/websocket.d.ts +11 -3
- package/dist/websocket.js +124 -97
- package/package.json +2 -2
|
@@ -8,10 +8,11 @@ const utils_1 = require("../../utils");
|
|
|
8
8
|
class TransactionParser {
|
|
9
9
|
constructor(args) {
|
|
10
10
|
this.chainId = args.chainId;
|
|
11
|
+
const assetReference = args.assetReference || caip_1.ASSET_REFERENCE.Bitcoin;
|
|
11
12
|
this.assetId = (0, caip_1.toAssetId)({
|
|
12
13
|
...(0, caip_1.fromChainId)(this.chainId),
|
|
13
14
|
assetNamespace: 'slip44',
|
|
14
|
-
assetReference
|
|
15
|
+
assetReference
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
18
|
async parse(tx, address) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../generated/dogecoin"), exports);
|
|
18
|
+
__exportStar(require("../bitcoin/parser"), exports);
|
|
19
|
+
__exportStar(require("../bitcoin/types"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Tx } from '../../../generated/avalanche';
|
|
2
2
|
import { BaseTransactionParser, TransactionParserArgs } from '../../parser';
|
|
3
|
-
export declare class TransactionParser extends BaseTransactionParser<
|
|
3
|
+
export declare class TransactionParser extends BaseTransactionParser<Tx> {
|
|
4
4
|
constructor(args: TransactionParserArgs);
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
import {
|
|
2
|
+
import { Tx } from '../../../generated/ethereum';
|
|
3
3
|
import { SubParser, TxSpecific } from '../../parser';
|
|
4
|
-
export declare class Parser implements SubParser<
|
|
4
|
+
export declare class Parser implements SubParser<Tx> {
|
|
5
5
|
readonly abiInterface: ethers.utils.Interface;
|
|
6
6
|
readonly supportedFunctions: {
|
|
7
7
|
stakeSigHash: string;
|
|
@@ -9,5 +9,5 @@ export declare class Parser implements SubParser<EthereumTx> {
|
|
|
9
9
|
instantUnstakeSigHash: string;
|
|
10
10
|
claimWithdrawSigHash: string;
|
|
11
11
|
};
|
|
12
|
-
parse(tx:
|
|
12
|
+
parse(tx: Tx): Promise<TxSpecific | undefined>;
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Tx } from '../../../generated/ethereum';
|
|
2
2
|
import { BaseTransactionParser, TransactionParserArgs } from '../../parser';
|
|
3
|
-
export declare class TransactionParser extends BaseTransactionParser<
|
|
3
|
+
export declare class TransactionParser extends BaseTransactionParser<Tx> {
|
|
4
4
|
constructor(args: TransactionParserArgs);
|
|
5
5
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
|
-
import {
|
|
3
|
+
import { Tx } from '../../../generated/ethereum';
|
|
4
4
|
import { SubParser, TxSpecific } from '../../parser';
|
|
5
5
|
export interface ParserArgs {
|
|
6
6
|
chainId: ChainId;
|
|
7
7
|
rpcUrl: string;
|
|
8
8
|
}
|
|
9
|
-
export declare class Parser implements SubParser<
|
|
9
|
+
export declare class Parser implements SubParser<Tx> {
|
|
10
10
|
readonly routerContract: string;
|
|
11
11
|
readonly abiInterface: ethers.utils.Interface;
|
|
12
12
|
readonly supportedFunctions: {
|
|
@@ -14,5 +14,5 @@ export declare class Parser implements SubParser<EthereumTx> {
|
|
|
14
14
|
transferOutSigHash: string;
|
|
15
15
|
};
|
|
16
16
|
constructor(args: ParserArgs);
|
|
17
|
-
parse(tx:
|
|
17
|
+
parse(tx: Tx): Promise<TxSpecific | undefined>;
|
|
18
18
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
|
-
import {
|
|
3
|
+
import { Tx } from '../../../generated/ethereum';
|
|
4
4
|
import { SubParser, TxSpecific } from '../../parser';
|
|
5
5
|
export interface ParserArgs {
|
|
6
6
|
chainId: ChainId;
|
|
7
7
|
provider: ethers.providers.JsonRpcProvider;
|
|
8
8
|
}
|
|
9
|
-
export declare class Parser implements SubParser<
|
|
9
|
+
export declare class Parser implements SubParser<Tx> {
|
|
10
10
|
provider: ethers.providers.JsonRpcProvider;
|
|
11
11
|
readonly chainId: ChainId;
|
|
12
12
|
readonly wethContract: string;
|
|
@@ -21,8 +21,8 @@ export declare class Parser implements SubParser<EthereumTx> {
|
|
|
21
21
|
exitSigHash: string;
|
|
22
22
|
};
|
|
23
23
|
constructor(args: ParserArgs);
|
|
24
|
-
parseUniV2(tx:
|
|
25
|
-
parseStakingRewards(tx:
|
|
26
|
-
parse(tx:
|
|
24
|
+
parseUniV2(tx: Tx): Promise<TxSpecific | undefined>;
|
|
25
|
+
parseStakingRewards(tx: Tx): Promise<TxSpecific | undefined>;
|
|
26
|
+
parse(tx: Tx): Promise<TxSpecific | undefined>;
|
|
27
27
|
private static pairFor;
|
|
28
28
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
|
-
import {
|
|
3
|
+
import { Tx } from '../../../generated/ethereum';
|
|
4
4
|
import { SubParser, TxSpecific } from '../../parser';
|
|
5
5
|
export interface ParserArgs {
|
|
6
6
|
chainId: ChainId;
|
|
7
7
|
provider: ethers.providers.JsonRpcProvider;
|
|
8
8
|
}
|
|
9
|
-
export declare class Parser implements SubParser<
|
|
9
|
+
export declare class Parser implements SubParser<Tx> {
|
|
10
10
|
provider: ethers.providers.JsonRpcProvider;
|
|
11
11
|
readonly chainId: ChainId;
|
|
12
12
|
readonly wethContract: string;
|
|
@@ -16,5 +16,5 @@ export declare class Parser implements SubParser<EthereumTx> {
|
|
|
16
16
|
withdrawalSigHash: string;
|
|
17
17
|
};
|
|
18
18
|
constructor(args: ParserArgs);
|
|
19
|
-
parse(tx:
|
|
19
|
+
parse(tx: Tx): Promise<TxSpecific | undefined>;
|
|
20
20
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import { ChainId as YearnChainId, Yearn } from '@yfi/sdk';
|
|
3
3
|
import { ethers } from 'ethers';
|
|
4
|
-
import {
|
|
4
|
+
import { Tx } from '../../../generated/ethereum';
|
|
5
5
|
import { SubParser, TxSpecific } from '../../parser';
|
|
6
6
|
interface ParserArgs {
|
|
7
7
|
chainId: ChainId;
|
|
8
8
|
provider: ethers.providers.JsonRpcProvider;
|
|
9
9
|
}
|
|
10
|
-
export declare class Parser implements SubParser<
|
|
10
|
+
export declare class Parser implements SubParser<Tx> {
|
|
11
11
|
provider: ethers.providers.JsonRpcProvider;
|
|
12
12
|
yearnSdk: Yearn<YearnChainId> | undefined;
|
|
13
13
|
yearnTokenVaultAddresses: string[] | undefined;
|
|
@@ -24,7 +24,7 @@ export declare class Parser implements SubParser<EthereumTx> {
|
|
|
24
24
|
depositSigHash: string;
|
|
25
25
|
};
|
|
26
26
|
constructor(args: ParserArgs);
|
|
27
|
-
parse(tx:
|
|
27
|
+
parse(tx: Tx): Promise<TxSpecific | undefined>;
|
|
28
28
|
getAbiInterface(txSigHash: string | undefined): ethers.utils.Interface | undefined;
|
|
29
29
|
}
|
|
30
30
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Tx } from '../../../generated/ethereum';
|
|
2
2
|
import { SubParser, TxSpecific } from '../../parser';
|
|
3
|
-
export declare class Parser implements SubParser<
|
|
4
|
-
parse(tx:
|
|
3
|
+
export declare class Parser implements SubParser<Tx> {
|
|
4
|
+
parse(tx: Tx): Promise<TxSpecific | undefined>;
|
|
5
5
|
}
|
package/dist/evm/index.d.ts
CHANGED
package/dist/evm/index.js
CHANGED
|
@@ -23,6 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.avalanche = exports.ethereum = void 0;
|
|
26
|
+
exports.avalanche = exports.ethereum = exports.BaseTransactionParser = void 0;
|
|
27
|
+
var parser_1 = require("./parser");
|
|
28
|
+
Object.defineProperty(exports, "BaseTransactionParser", { enumerable: true, get: function () { return parser_1.BaseTransactionParser; } });
|
|
27
29
|
exports.ethereum = __importStar(require("./ethereum"));
|
|
28
30
|
exports.avalanche = __importStar(require("./avalanche"));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EthereumTx } from '../../generated/ethereum';
|
|
1
|
+
import type { evm } from '@shapeshiftoss/common-api';
|
|
3
2
|
import { BaseTxMetadata, StandardTx, StandardTxMetadata } from '../../types';
|
|
4
|
-
export declare type Tx =
|
|
3
|
+
export declare type Tx = evm.Tx;
|
|
5
4
|
export declare enum TxParser {
|
|
6
5
|
ERC20 = "erc20"
|
|
7
6
|
}
|