@exodus/solana-api 3.4.1 → 3.5.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/package.json +4 -3
- package/src/api.js +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-api",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Exodus internal Solana asset API wrapper",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"wretch": "^1.5.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@exodus/assets-testing": "^1.0.0"
|
|
45
|
+
"@exodus/assets-testing": "^1.0.0",
|
|
46
|
+
"@solana/web3.js": "^1.91.8"
|
|
46
47
|
},
|
|
47
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "df4517e2015f23287167aaa7ff5a3bc037851294"
|
|
48
49
|
}
|
package/src/api.js
CHANGED
|
@@ -151,7 +151,9 @@ export class Api {
|
|
|
151
151
|
|
|
152
152
|
async getPriorityFee(transaction) {
|
|
153
153
|
// https://docs.helius.dev/solana-rpc-nodes/alpha-priority-fee-api
|
|
154
|
-
const result = await this.rpcCall('getPriorityFeeEstimate', [
|
|
154
|
+
const result = await this.rpcCall('getPriorityFeeEstimate', [
|
|
155
|
+
{ transaction, options: { recommended: true } },
|
|
156
|
+
])
|
|
155
157
|
return result.priorityFeeEstimate
|
|
156
158
|
}
|
|
157
159
|
|
|
@@ -891,6 +893,15 @@ export class Api {
|
|
|
891
893
|
return response && response.value ? response.value : []
|
|
892
894
|
}
|
|
893
895
|
|
|
896
|
+
async getFeeForMessage(message, commitment) {
|
|
897
|
+
const response = await this.rpcCall('getFeeForMessage', [
|
|
898
|
+
Buffer.from(message.serialize()).toString('base64'),
|
|
899
|
+
{ commitment },
|
|
900
|
+
])
|
|
901
|
+
|
|
902
|
+
return lodash.get(response, 'value')
|
|
903
|
+
}
|
|
904
|
+
|
|
894
905
|
/**
|
|
895
906
|
* Broadcast a signed transaction
|
|
896
907
|
*/
|