@exodus/solana-plugin 1.17.1 → 1.18.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/CHANGELOG.md +16 -0
- package/README.md +76 -2
- package/package.json +3 -3
- package/src/create-asset.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.18.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.17.1...@exodus/solana-plugin@1.18.0) (2025-03-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* feat: SOL internal sends in txLog (#5199)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* fix: increase SOL dust threshold amount (#5205)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.17.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.17.0...@exodus/solana-plugin@1.17.1) (2025-01-22)
|
|
7
23
|
|
|
8
24
|
|
package/README.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
-
# @exodus/solana-plugin
|
|
1
|
+
# @exodus/solana-plugin · [](https://www.npmjs.com/package/@exodus/solana-plugin)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**solana-plugin** is a standalone package that provides a unified public interface for integrating Solana assets into wallet applications. It consolidates blockchain communication, transaction handling, cryptographic operations, and asset metadata—into one cohesive API.
|
|
4
|
+
|
|
5
|
+
The `createAsset` factory function returns an object that integrates components from:
|
|
6
|
+
|
|
7
|
+
- **solana-api**: Blockchain communication, transaction monitoring, staking info and broadcasting.
|
|
8
|
+
- **solana-lib**: Transaction serialization, encoding/decoding, fee estimation, and cryptography.
|
|
9
|
+
- **solana-meta**: Asset metadata, including logos, color schemas, and block explorer links.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
Install the package via yarn:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
yarn add @exodus/solana-plugin
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
To use the `@exodus/solana-plugin`, you need to import the necessary modules and create an asset using the `createAsset` factory function. Below is an example of how to set up and use the plugin with the other solana packages:
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
import { createAsset } from '@exodus/solana-plugin'
|
|
27
|
+
import ms from 'ms'
|
|
28
|
+
|
|
29
|
+
const DEFAULT_ACCOUNT_RESERVE = 0.01
|
|
30
|
+
const DEFAULT_LOW_BALANCE = 0.01
|
|
31
|
+
const DEFAULT_MIN_STAKING_AMOUNT = 0.01
|
|
32
|
+
|
|
33
|
+
const asset = createAsset({
|
|
34
|
+
assetClientInterface,
|
|
35
|
+
config: {
|
|
36
|
+
stakingFeatureAvailable: true,
|
|
37
|
+
includeUnparsed: false,
|
|
38
|
+
monitorInterval: ms('30s'),
|
|
39
|
+
defaultAccountReserve: DEFAULT_ACCOUNT_RESERVE,
|
|
40
|
+
defaultLowBalance: DEFAULT_LOW_BALANCE,
|
|
41
|
+
defaultMinStakingAmount: DEFAULT_MIN_STAKING_AMOUNT,
|
|
42
|
+
ticksBetweenHistoryFetches,
|
|
43
|
+
ticksBetweenStakeFetches,
|
|
44
|
+
txsLimit,
|
|
45
|
+
signWithSigner: true,
|
|
46
|
+
},
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
console.log(asset)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## API
|
|
53
|
+
|
|
54
|
+
### `createAsset({ assetClientInterface, config })`
|
|
55
|
+
|
|
56
|
+
Creates a factory function for creating Solana assets.
|
|
57
|
+
|
|
58
|
+
#### Parameters
|
|
59
|
+
|
|
60
|
+
- `assetClientInterface` (Object): Interface for the asset client.
|
|
61
|
+
- `config` (Object): Configuration settings for the asset.
|
|
62
|
+
- `stakingFeatureAvailable` (Boolean): Indicates if staking feature is available.
|
|
63
|
+
- `includeUnparsed` (Boolean): Whether to include unparsed transactions.
|
|
64
|
+
- `monitorInterval` (String): Interval for monitoring transactions, e.g., '30s'.
|
|
65
|
+
- `defaultAccountReserve` (Number): Default reserve amount for accounts.
|
|
66
|
+
- `defaultLowBalance` (Number): Default low balance threshold.
|
|
67
|
+
- `defaultMinStakingAmount` (Number): Default minimum staking amount.
|
|
68
|
+
- `ticksBetweenHistoryFetches` (Number): Number of ticks between history fetches.
|
|
69
|
+
- `ticksBetweenStakeFetches` (Number): Number of ticks between stake fetches.
|
|
70
|
+
- `txsLimit` (Number): Limit for the number of transactions.
|
|
71
|
+
- `signWithSigner` (Boolean): Whether to sign transactions with a signer.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
This project is licensed under the MIT License.
|
|
76
|
+
You are free to use, modify, and distribute this software under the terms of the MIT License.
|
|
77
|
+
For more details, see the [LICENSE](LICENSE) file.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Solana plugin for Exodus SDK powered wallets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@exodus/assets": "^11.0.0",
|
|
25
25
|
"@exodus/bip44-constants": "^195.0.0",
|
|
26
|
-
"@exodus/solana-api": "^3.
|
|
26
|
+
"@exodus/solana-api": "^3.14.0",
|
|
27
27
|
"@exodus/solana-lib": "^3.9.4",
|
|
28
28
|
"@exodus/solana-meta": "^2.3.1",
|
|
29
29
|
"@exodus/web3-solana-utils": "^2.9.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"type": "git",
|
|
41
41
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "0ad4bff46edd70ed69c9351d682d36b3436dbd1f"
|
|
44
44
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -54,7 +54,7 @@ export const createSolanaAssetFactory =
|
|
|
54
54
|
const baseName = assetList.find((asset) => asset.baseAssetName === asset.name)
|
|
55
55
|
const base = assets[baseName]
|
|
56
56
|
|
|
57
|
-
const smallTxAmount = base.currency.defaultUnit('0.
|
|
57
|
+
const smallTxAmount = base.currency.defaultUnit('0.00005')
|
|
58
58
|
const accountReserve = base.currency.defaultUnit(
|
|
59
59
|
defaultAccountReserve ?? DEFAULT_ACCOUNT_RESERVE
|
|
60
60
|
)
|