@shapeshiftoss/unchained-client 9.4.0 → 9.6.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/dist/evm/avalanche/parser/index.js +1 -5
- package/dist/evm/ethereum/parser/index.js +1 -5
- package/dist/generated/avalanche/api.d.ts +1 -1
- package/dist/generated/avalanche/api.js +1 -1
- 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 +201 -201
- package/dist/generated/bitcoin/api.js +26 -26
- 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/bitcoincash/api.d.ts +1010 -0
- package/dist/generated/bitcoincash/api.js +521 -0
- package/dist/generated/bitcoincash/base.d.ts +55 -0
- package/dist/generated/bitcoincash/base.js +64 -0
- package/dist/generated/bitcoincash/common.d.ts +65 -0
- package/dist/generated/bitcoincash/common.js +137 -0
- package/dist/generated/bitcoincash/configuration.d.ts +83 -0
- package/dist/generated/bitcoincash/configuration.js +42 -0
- package/dist/generated/bitcoincash/index.d.ts +13 -0
- package/dist/generated/bitcoincash/index.js +31 -0
- package/dist/generated/dogecoin/api.d.ts +201 -201
- package/dist/generated/dogecoin/api.js +26 -26
- package/dist/generated/dogecoin/base.d.ts +1 -1
- package/dist/generated/dogecoin/base.js +1 -1
- package/dist/generated/dogecoin/common.d.ts +1 -1
- package/dist/generated/dogecoin/common.js +1 -1
- package/dist/generated/dogecoin/configuration.d.ts +1 -1
- package/dist/generated/dogecoin/configuration.js +1 -1
- package/dist/generated/dogecoin/index.d.ts +1 -1
- package/dist/generated/dogecoin/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/generated/litecoin/api.d.ts +1010 -0
- package/dist/generated/litecoin/api.js +521 -0
- package/dist/generated/litecoin/base.d.ts +55 -0
- package/dist/generated/litecoin/base.js +64 -0
- package/dist/generated/litecoin/common.d.ts +65 -0
- package/dist/generated/litecoin/common.js +137 -0
- package/dist/generated/litecoin/configuration.d.ts +83 -0
- package/dist/generated/litecoin/configuration.js +42 -0
- package/dist/generated/litecoin/index.d.ts +13 -0
- package/dist/generated/litecoin/index.js +31 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +6 -3
- package/dist/types.d.ts +1 -1
- package/dist/utxo/bitcoin/index.d.ts +2 -0
- package/dist/{bitcoin → utxo/bitcoin}/index.js +1 -2
- package/dist/utxo/bitcoin/parser/index.d.ts +6 -0
- package/dist/utxo/bitcoin/parser/index.js +12 -0
- package/dist/utxo/bitcoincash/index.d.ts +2 -0
- package/dist/{dogecoin → utxo/bitcoincash}/index.js +2 -3
- package/dist/utxo/bitcoincash/parser/index.d.ts +6 -0
- package/dist/utxo/bitcoincash/parser/index.js +12 -0
- package/dist/utxo/dogecoin/index.d.ts +2 -0
- package/dist/utxo/dogecoin/index.js +18 -0
- package/dist/utxo/dogecoin/parser/index.d.ts +6 -0
- package/dist/utxo/dogecoin/parser/index.js +12 -0
- package/dist/utxo/index.d.ts +6 -0
- package/dist/utxo/index.js +32 -0
- package/dist/utxo/litecoin/index.d.ts +2 -0
- package/dist/utxo/litecoin/index.js +18 -0
- package/dist/utxo/litecoin/parser/index.d.ts +6 -0
- package/dist/utxo/litecoin/parser/index.js +12 -0
- package/dist/utxo/parser/index.d.ts +12 -0
- package/dist/{bitcoin → utxo}/parser/index.js +3 -10
- package/package.json +6 -6
- package/dist/bitcoin/index.d.ts +0 -3
- package/dist/bitcoin/parser/index.d.ts +0 -13
- package/dist/bitcoin/types.d.ts +0 -1
- package/dist/bitcoin/types.js +0 -2
- package/dist/dogecoin/index.d.ts +0 -3
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const caip_1 = require("@shapeshiftoss/caip");
|
|
3
|
+
exports.BaseTransactionParser = void 0;
|
|
5
4
|
const bignumber_js_1 = require("bignumber.js");
|
|
6
5
|
const types_1 = require("../../types");
|
|
7
6
|
const utils_1 = require("../../utils");
|
|
8
|
-
class
|
|
7
|
+
class BaseTransactionParser {
|
|
9
8
|
constructor(args) {
|
|
10
9
|
this.chainId = args.chainId;
|
|
11
|
-
const assetReference = args.assetReference || caip_1.ASSET_REFERENCE.Bitcoin;
|
|
12
|
-
this.assetId = (0, caip_1.toAssetId)({
|
|
13
|
-
...(0, caip_1.fromChainId)(this.chainId),
|
|
14
|
-
assetNamespace: 'slip44',
|
|
15
|
-
assetReference
|
|
16
|
-
});
|
|
17
10
|
}
|
|
18
11
|
async parse(tx, address) {
|
|
19
12
|
const parsedTx = {
|
|
@@ -55,4 +48,4 @@ class TransactionParser {
|
|
|
55
48
|
return parsedTx;
|
|
56
49
|
}
|
|
57
50
|
}
|
|
58
|
-
exports.
|
|
51
|
+
exports.BaseTransactionParser = BaseTransactionParser;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshiftoss/unchained-client",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"ws": "^8.3.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@shapeshiftoss/caip": "^6.
|
|
32
|
+
"@shapeshiftoss/caip": "^6.7.0",
|
|
33
33
|
"@shapeshiftoss/logger": "^1.1.2",
|
|
34
|
-
"@shapeshiftoss/types": "^8.
|
|
34
|
+
"@shapeshiftoss/types": "^8.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@openapitools/openapi-generator-cli": "^2.5.1",
|
|
38
|
-
"@shapeshiftoss/caip": "^6.
|
|
39
|
-
"@shapeshiftoss/common-api": "^
|
|
38
|
+
"@shapeshiftoss/caip": "^6.7.0",
|
|
39
|
+
"@shapeshiftoss/common-api": "^8.0.0",
|
|
40
40
|
"@shapeshiftoss/logger": "^1.1.2",
|
|
41
|
-
"@shapeshiftoss/types": "^8.
|
|
41
|
+
"@shapeshiftoss/types": "^8.1.0",
|
|
42
42
|
"@types/ws": "^8.2.1"
|
|
43
43
|
}
|
|
44
44
|
}
|
package/dist/bitcoin/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AssetId, ChainId } from '@shapeshiftoss/caip';
|
|
2
|
-
import { BitcoinTx } from '../../generated/bitcoin';
|
|
3
|
-
import { Tx as ParsedTx } from '../../types';
|
|
4
|
-
export interface TransactionParserArgs {
|
|
5
|
-
chainId: ChainId;
|
|
6
|
-
assetReference?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class TransactionParser {
|
|
9
|
-
chainId: ChainId;
|
|
10
|
-
assetId: AssetId;
|
|
11
|
-
constructor(args: TransactionParserArgs);
|
|
12
|
-
parse(tx: BitcoinTx, address: string): Promise<ParsedTx>;
|
|
13
|
-
}
|
package/dist/bitcoin/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type Network = 'mainnet' | 'testnet';
|
package/dist/bitcoin/types.js
DELETED
package/dist/dogecoin/index.d.ts
DELETED