@exodus/solana-plugin 1.0.9 → 1.0.10-alpha.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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.js +13 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-plugin",
3
- "version": "1.0.9",
3
+ "version": "1.0.10-alpha.0",
4
4
  "description": "Exodus internal Solana asset plugin",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@exodus/assets": "^9.0.1",
24
24
  "@exodus/bip44-constants": "^195.0.0",
25
- "@exodus/solana-api": "^2.5.30",
25
+ "@exodus/solana-api": "^2.5.31-alpha.0",
26
26
  "@exodus/solana-lib": "^1.7.5",
27
27
  "@exodus/solana-meta": "^1.0.7",
28
28
  "minimalistic-assert": "^1.0.1"
@@ -30,5 +30,5 @@
30
30
  "devDependencies": {
31
31
  "@exodus/assets-testing": "file:../../../__testing__"
32
32
  },
33
- "gitHead": "5270d4cf5f0a0ae9486533f237e6abe6f026ed16"
33
+ "gitHead": "659340c999fa86c132293643a7fb96f33963e6cd"
34
34
  }
package/src/index.js CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  isValidAddress,
8
8
  parseUnsignedTx,
9
9
  signUnsignedTx,
10
+ signHardware,
10
11
  } from '@exodus/solana-lib'
11
12
  import { solana as feeData } from '@exodus/solana-lib/src/fee-data'
12
13
  import assetList from '@exodus/solana-meta'
@@ -26,6 +27,8 @@ const createAsset = ({
26
27
  stakingFeatureAvailable = true,
27
28
  includeUnparsed = false,
28
29
  monitorInterval = ms('30s'),
30
+ ticksBetweenHistoryFetches,
31
+ ticksBetweenStakeFetches,
29
32
  } = {},
30
33
  overrideCallback = ({ asset }) => asset,
31
34
  } = {}) => {
@@ -95,7 +98,14 @@ const createAsset = ({
95
98
  createAccountState: () => SolanaAccountState,
96
99
  createFeeMonitor: (args) => new SolanaFeeMonitor({ ...args, api: serverApi }),
97
100
  createHistoryMonitor: (args) =>
98
- new SolanaMonitor({ interval: monitorInterval, includeUnparsed, api: serverApi, ...args }),
101
+ new SolanaMonitor({
102
+ interval: monitorInterval,
103
+ ticksBetweenHistoryFetches,
104
+ ticksBetweenStakeFetches,
105
+ includeUnparsed,
106
+ api: serverApi,
107
+ ...args,
108
+ }),
99
109
  createToken: (tokenDef) =>
100
110
  tokenDef.isBuiltIn ? createToken(tokenDef) : createCustomToken(tokenDef),
101
111
  defaultAddressPath: 'm/0/0',
@@ -104,11 +114,7 @@ const createAsset = ({
104
114
  getFee: () => feeData.fee,
105
115
  getFeeAsync: async () => feeData.fee,
106
116
  getFeeData: () => feeData,
107
- getKeyIdentifier: createGetKeyIdentifier({
108
- bip44,
109
- assetName: base.name,
110
- keyType: 'nacl',
111
- }),
117
+ getKeyIdentifier: createGetKeyIdentifier({ bip44 }),
112
118
  getTokens: () =>
113
119
  Object.values(assets)
114
120
  .filter((asset) => asset.name !== base.name)
@@ -120,6 +126,7 @@ const createAsset = ({
120
126
  sendTx,
121
127
  signTx: ({ unsignedTx, privateKey }) => signUnsignedTx(unsignedTx, privateKey),
122
128
  signUnsignedTx,
129
+ signHardware,
123
130
  staking: assetStakingApi,
124
131
  validateAssetId: isValidAddress,
125
132
  }