@exodus/solana-api 3.4.2 → 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.
Files changed (2) hide show
  1. package/package.json +4 -3
  2. package/src/api.js +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "3.4.2",
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": "a780988c920ac32cfc7e367686bb165170641470"
48
+ "gitHead": "df4517e2015f23287167aaa7ff5a3bc037851294"
48
49
  }
package/src/api.js CHANGED
@@ -893,6 +893,15 @@ export class Api {
893
893
  return response && response.value ? response.value : []
894
894
  }
895
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
+
896
905
  /**
897
906
  * Broadcast a signed transaction
898
907
  */