@exodus/solana-api 2.0.10 → 2.0.12

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 -4
  2. package/src/api.js +19 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "Exodus internal Solana asset API wrapper",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -15,8 +15,8 @@
15
15
  "dependencies": {
16
16
  "@exodus/asset-json-rpc": "^1.0.0",
17
17
  "@exodus/asset-lib": "^3.6.0",
18
- "@exodus/assets": "^8.0.68",
19
- "@exodus/assets-base": "^8.0.139",
18
+ "@exodus/assets": "^8.0.71",
19
+ "@exodus/assets-base": "^8.0.150",
20
20
  "@exodus/models": "^8.7.2",
21
21
  "@exodus/nfts-core": "^0.5.0",
22
22
  "@exodus/solana-lib": "^1.3.14",
@@ -28,5 +28,5 @@
28
28
  "devDependencies": {
29
29
  "node-fetch": "~2.6.0"
30
30
  },
31
- "gitHead": "319f5292a7b3e06d230a571c109f6d7d40423ff8"
31
+ "gitHead": "41f7a0666330e4ab63c7d38247bbf2fb7f4267fb"
32
32
  }
package/src/api.js CHANGED
@@ -281,7 +281,7 @@ export class Api {
281
281
  owner,
282
282
  from,
283
283
  to,
284
- amount: amount.abs().toNumber(),
284
+ amount: amount.abs().toString(), // inconsistent with the rest, but it can and did overflow
285
285
  fee: 0,
286
286
  token: tokenAccount,
287
287
  data: {
@@ -768,6 +768,24 @@ export class Api {
768
768
  return minimumBalance
769
769
  }
770
770
 
771
+ async getProgramAccounts(programId: string, config) {
772
+ const response = await this.api.post({
773
+ method: 'getProgramAccounts',
774
+ params: [programId, config],
775
+ })
776
+
777
+ return response
778
+ }
779
+
780
+ async getMultipleAccounts(pubkeys: string[], config) {
781
+ const response = await this.api.post({
782
+ method: 'getMultipleAccounts',
783
+ params: [pubkeys, config],
784
+ })
785
+
786
+ return response && response.value ? response.value : []
787
+ }
788
+
771
789
  /**
772
790
  * Broadcast a signed transaction
773
791
  */