@xchainjs/xchain-solana 1.0.3 → 1.0.5
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/lib/index.esm.js +2 -2
- package/lib/index.js +3 -2
- package/package.json +8 -8
package/lib/index.esm.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ExplorerProvider, Network, BaseXChainClient, TxType, FeeType, FeeOption
|
|
|
8
8
|
import { getSeed } from '@xchainjs/xchain-crypto';
|
|
9
9
|
import { AssetType, baseAmount, assetToBase, assetAmount, assetFromStringEx, eqAsset, getContractAddressFromAsset } from '@xchainjs/xchain-util';
|
|
10
10
|
import bs58 from 'bs58';
|
|
11
|
-
import
|
|
11
|
+
import slip10 from 'micro-key-producer/slip10.js';
|
|
12
12
|
|
|
13
13
|
/******************************************************************************
|
|
14
14
|
Copyright (c) Microsoft Corporation.
|
|
@@ -316,7 +316,7 @@ class Client extends BaseXChainClient {
|
|
|
316
316
|
if (!this.phrase)
|
|
317
317
|
throw new Error('Phrase must be provided');
|
|
318
318
|
const seed = getSeed(this.phrase);
|
|
319
|
-
const hd =
|
|
319
|
+
const hd = slip10.fromMasterSeed(seed);
|
|
320
320
|
return Keypair.fromSeed(hd.derive(this.getFullDerivationPath(index)).privateKey);
|
|
321
321
|
}
|
|
322
322
|
parseTransaction(tx) {
|
package/lib/index.js
CHANGED
|
@@ -10,11 +10,12 @@ var xchainClient = require('@xchainjs/xchain-client');
|
|
|
10
10
|
var xchainCrypto = require('@xchainjs/xchain-crypto');
|
|
11
11
|
var xchainUtil = require('@xchainjs/xchain-util');
|
|
12
12
|
var bs58 = require('bs58');
|
|
13
|
-
var
|
|
13
|
+
var slip10 = require('micro-key-producer/slip10.js');
|
|
14
14
|
|
|
15
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
|
|
17
17
|
var bs58__default = /*#__PURE__*/_interopDefault(bs58);
|
|
18
|
+
var slip10__default = /*#__PURE__*/_interopDefault(slip10);
|
|
18
19
|
|
|
19
20
|
/******************************************************************************
|
|
20
21
|
Copyright (c) Microsoft Corporation.
|
|
@@ -322,7 +323,7 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
322
323
|
if (!this.phrase)
|
|
323
324
|
throw new Error('Phrase must be provided');
|
|
324
325
|
const seed = xchainCrypto.getSeed(this.phrase);
|
|
325
|
-
const hd =
|
|
326
|
+
const hd = slip10__default.default.fromMasterSeed(seed);
|
|
326
327
|
return web3_js.Keypair.fromSeed(hd.derive(this.getFullDerivationPath(index)).privateKey);
|
|
327
328
|
}
|
|
328
329
|
parseTransaction(tx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-solana",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Solana client for XChainJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Solana",
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"build": "yarn clean && rollup -c --bundleConfigAsCjs",
|
|
29
29
|
"build:release": "yarn exec rm -rf release && yarn pack && yarn exec \"mkdir release && tar zxvf package.tgz --directory release && rm package.tgz\"",
|
|
30
30
|
"test": "jest",
|
|
31
|
-
"e2e": "jest --config jest.config.e2e.
|
|
31
|
+
"e2e": "jest --config jest.config.e2e.mjs",
|
|
32
32
|
"lint": "eslint \"{src,__tests__}/**/*.ts\" --fix --max-warnings 0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@metaplex-foundation/mpl-token-metadata": "3.2.1",
|
|
35
|
+
"@metaplex-foundation/mpl-token-metadata": "^3.2.1",
|
|
36
36
|
"@metaplex-foundation/umi": "0.9.2",
|
|
37
37
|
"@metaplex-foundation/umi-bundle-defaults": "0.9.2",
|
|
38
38
|
"@solana/addresses": "^2.1.1",
|
|
39
39
|
"@solana/spl-token": "^0.4.13",
|
|
40
40
|
"@solana/web3.js": "^1.98.2",
|
|
41
|
-
"@xchainjs/xchain-client": "2.0.
|
|
42
|
-
"@xchainjs/xchain-crypto": "1.0.
|
|
43
|
-
"@xchainjs/xchain-util": "2.0.
|
|
44
|
-
"bs58": "6.0.0",
|
|
45
|
-
"micro-
|
|
41
|
+
"@xchainjs/xchain-client": "2.0.5",
|
|
42
|
+
"@xchainjs/xchain-crypto": "1.0.3",
|
|
43
|
+
"@xchainjs/xchain-util": "2.0.3",
|
|
44
|
+
"bs58": "^6.0.0",
|
|
45
|
+
"micro-key-producer": "^0.7.6"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public",
|