@sonarwatch/portfolio-plugins 0.12.36 → 0.12.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. package/CHANGELOG.md +1847 -1839
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/allbridge/constants.d.ts +0 -1
  5. package/src/plugins/allbridge/constants.js +1 -2
  6. package/src/plugins/allbridge/constants.js.map +1 -1
  7. package/src/plugins/allbridge/positionsFetcher.js +6 -2
  8. package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
  9. package/src/plugins/balancer/helpers/pools.js +21 -21
  10. package/src/plugins/banx/constants.d.ts +0 -1
  11. package/src/plugins/banx/constants.js +1 -2
  12. package/src/plugins/banx/constants.js.map +1 -1
  13. package/src/plugins/banx/idl.d.ts +15 -7
  14. package/src/plugins/banx/idl.js +199 -268
  15. package/src/plugins/banx/idl.js.map +1 -1
  16. package/src/plugins/banx/loansFetcher.js +19 -23
  17. package/src/plugins/banx/loansFetcher.js.map +1 -1
  18. package/src/plugins/banx/offersFetcher.js +10 -15
  19. package/src/plugins/banx/offersFetcher.js.map +1 -1
  20. package/src/plugins/citrus/collectionsJob.js.map +1 -1
  21. package/src/plugins/citrus/constants.d.ts +0 -1
  22. package/src/plugins/citrus/constants.js +1 -2
  23. package/src/plugins/citrus/constants.js.map +1 -1
  24. package/src/plugins/citrus/loansFetcher.js +14 -20
  25. package/src/plugins/citrus/loansFetcher.js.map +1 -1
  26. package/src/plugins/drift/constants.d.ts +1 -0
  27. package/src/plugins/drift/constants.js +2 -1
  28. package/src/plugins/drift/constants.js.map +1 -1
  29. package/src/plugins/drift/depositsFetcher.js +63 -1
  30. package/src/plugins/drift/depositsFetcher.js.map +1 -1
  31. package/src/plugins/drift/filters.d.ts +1 -0
  32. package/src/plugins/drift/filters.js +4 -1
  33. package/src/plugins/drift/filters.js.map +1 -1
  34. package/src/plugins/drift/index.js +2 -1
  35. package/src/plugins/drift/index.js.map +1 -1
  36. package/src/plugins/drift/perpHelpers/amm.d.ts +74 -0
  37. package/src/plugins/drift/perpHelpers/amm.js +567 -0
  38. package/src/plugins/drift/perpHelpers/amm.js.map +1 -0
  39. package/src/plugins/drift/perpHelpers/assert.d.ts +1 -0
  40. package/src/plugins/drift/perpHelpers/assert.js +10 -0
  41. package/src/plugins/drift/perpHelpers/assert.js.map +1 -0
  42. package/src/plugins/drift/perpHelpers/constants.d.ts +27 -0
  43. package/src/plugins/drift/perpHelpers/constants.js +35 -0
  44. package/src/plugins/drift/perpHelpers/constants.js.map +1 -0
  45. package/src/plugins/drift/perpHelpers/convert.d.ts +0 -0
  46. package/src/plugins/drift/perpHelpers/convert.js +2 -0
  47. package/src/plugins/drift/perpHelpers/convert.js.map +1 -0
  48. package/src/plugins/drift/perpHelpers/getOraclePrice.d.ts +4 -0
  49. package/src/plugins/drift/perpHelpers/getOraclePrice.js +61 -0
  50. package/src/plugins/drift/perpHelpers/getOraclePrice.js.map +1 -0
  51. package/src/plugins/drift/perpHelpers/getPerpMarket.d.ts +4 -0
  52. package/src/plugins/drift/perpHelpers/getPerpMarket.js +33 -0
  53. package/src/plugins/drift/perpHelpers/getPerpMarket.js.map +1 -0
  54. package/src/plugins/drift/perpHelpers/margin.d.ts +10 -0
  55. package/src/plugins/drift/perpHelpers/margin.js +82 -0
  56. package/src/plugins/drift/perpHelpers/margin.js.map +1 -0
  57. package/src/plugins/drift/perpHelpers/math.d.ts +4 -0
  58. package/src/plugins/drift/perpHelpers/math.js +29 -0
  59. package/src/plugins/drift/perpHelpers/math.js.map +1 -0
  60. package/src/plugins/drift/perpHelpers/oracle.d.ts +6 -0
  61. package/src/plugins/drift/perpHelpers/oracle.js +54 -0
  62. package/src/plugins/drift/perpHelpers/oracle.js.map +1 -0
  63. package/src/plugins/drift/perpHelpers/orders.d.ts +2 -0
  64. package/src/plugins/drift/perpHelpers/orders.js +9 -0
  65. package/src/plugins/drift/perpHelpers/orders.js.map +1 -0
  66. package/src/plugins/drift/perpHelpers/position.d.ts +44 -0
  67. package/src/plugins/drift/perpHelpers/position.js +184 -0
  68. package/src/plugins/drift/perpHelpers/position.js.map +1 -0
  69. package/src/plugins/drift/perpHelpers/prelaunchOracle.d.ts +3 -0
  70. package/src/plugins/drift/perpHelpers/prelaunchOracle.js +20 -0
  71. package/src/plugins/drift/perpHelpers/prelaunchOracle.js.map +1 -0
  72. package/src/plugins/drift/perpHelpers/pyth.d.ts +5 -0
  73. package/src/plugins/drift/perpHelpers/pyth.js +42 -0
  74. package/src/plugins/drift/perpHelpers/pyth.js.map +1 -0
  75. package/src/plugins/drift/perpHelpers/repeg.d.ts +14 -0
  76. package/src/plugins/drift/perpHelpers/repeg.js +162 -0
  77. package/src/plugins/drift/perpHelpers/repeg.js.map +1 -0
  78. package/src/plugins/drift/perpHelpers/switchboard.d.ts +3 -0
  79. package/src/plugins/drift/perpHelpers/switchboard.js +31 -0
  80. package/src/plugins/drift/perpHelpers/switchboard.js.map +1 -0
  81. package/src/plugins/drift/perpHelpers/types.d.ts +28 -0
  82. package/src/plugins/drift/perpHelpers/types.js +19 -0
  83. package/src/plugins/drift/perpHelpers/types.js.map +1 -0
  84. package/src/plugins/drift/prepMarketsJob.d.ts +3 -0
  85. package/src/plugins/drift/prepMarketsJob.js +38 -0
  86. package/src/plugins/drift/prepMarketsJob.js.map +1 -0
  87. package/src/plugins/drift/struct.d.ts +82 -76
  88. package/src/plugins/drift/struct.js +79 -74
  89. package/src/plugins/drift/struct.js.map +1 -1
  90. package/src/plugins/drift/types.d.ts +1 -0
  91. package/src/plugins/jupiter/exchange/constants.d.ts +1 -0
  92. package/src/plugins/jupiter/exchange/constants.js +2 -1
  93. package/src/plugins/jupiter/exchange/constants.js.map +1 -1
  94. package/src/plugins/jupiter/exchange/limitFetcher.js +9 -6
  95. package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
  96. package/src/plugins/jupiter/exchange/perpetualFetcher.js +3 -6
  97. package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
  98. package/src/plugins/jupiter/exchange/structs.d.ts +21 -0
  99. package/src/plugins/jupiter/exchange/structs.js +21 -1
  100. package/src/plugins/jupiter/exchange/structs.js.map +1 -1
  101. package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
  102. package/src/plugins/jupiter/helpers.d.ts +2 -2
  103. package/src/plugins/jupiter/helpers.js.map +1 -1
  104. package/src/plugins/rain/collectionsJob.js +6 -10
  105. package/src/plugins/rain/collectionsJob.js.map +1 -1
  106. package/src/plugins/rain/helpers.js +3 -1
  107. package/src/plugins/rain/helpers.js.map +1 -1
  108. package/src/plugins/rain/index.js +2 -1
  109. package/src/plugins/rain/index.js.map +1 -1
  110. package/src/plugins/rain/loansFetcher.js +60 -25
  111. package/src/plugins/rain/loansFetcher.js.map +1 -1
  112. package/src/plugins/rain/types.d.ts +3 -0
  113. package/src/plugins/sharky/constants.d.ts +0 -1
  114. package/src/plugins/sharky/constants.js +3 -4
  115. package/src/plugins/sharky/constants.js.map +1 -1
  116. package/src/plugins/sharky/loansFetcher.js +17 -20
  117. package/src/plugins/sharky/loansFetcher.js.map +1 -1
  118. package/src/plugins/sushiswap/helpers.js +24 -24
  119. package/src/plugins/uniswap-v2/helpers.js +22 -22
  120. package/src/plugins/zeta/airdropFetcher.js +14 -14
  121. package/src/utils/misc/MemoizedCache.d.ts +12 -0
  122. package/src/utils/misc/MemoizedCache.js +35 -0
  123. package/src/utils/misc/MemoizedCache.js.map +1 -0
  124. package/src/utils/misc/arrayToMap.d.ts +1 -0
  125. package/src/utils/misc/arrayToMap.js +12 -0
  126. package/src/utils/misc/arrayToMap.js.map +1 -0
  127. package/src/utils/misc/pick.d.ts +2 -0
  128. package/src/utils/misc/pick.js +16 -0
  129. package/src/utils/misc/pick.js.map +1 -0
  130. package/src/utils/sei/constants.js +8 -8
  131. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  132. package/src/utils/solana/getAutoParsedMultipleAccountsInfo.js +8 -3
  133. package/src/utils/solana/getAutoParsedMultipleAccountsInfo.js.map +1 -1
  134. package/src/plugins/allbridge/getPoolInfo.d.ts +0 -3
  135. package/src/plugins/allbridge/getPoolInfo.js +0 -28
  136. package/src/plugins/allbridge/getPoolInfo.js.map +0 -1
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @sonarwatch/portfolio-plugins
2
-
3
- This library is @sonarwatch/portfolio-plugins
1
+ # @sonarwatch/portfolio-plugins
2
+
3
+ This library is @sonarwatch/portfolio-plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.36",
3
+ "version": "0.12.38",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -6,7 +6,6 @@ export declare const platform: Platform;
6
6
  export declare const apiPoolInfoUrl = "https://core.api.allbridgecoreapi.net/token-info";
7
7
  export declare const poolsCacheKey = "allbridge-pools";
8
8
  export declare const cachePrefix = "allbridge";
9
- export declare const poolInfoRefreshInterval = 3600000;
10
9
  export declare const allbridgeProgram: PublicKey;
11
10
  export declare const SYSTEM_PRECISION = 3;
12
11
  export declare const allbridgeIdlItem: IdlItem;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.allbridgeIdlItem = exports.SYSTEM_PRECISION = exports.allbridgeProgram = exports.poolInfoRefreshInterval = exports.cachePrefix = exports.poolsCacheKey = exports.apiPoolInfoUrl = exports.platform = exports.platformId = void 0;
3
+ exports.allbridgeIdlItem = exports.SYSTEM_PRECISION = exports.allbridgeProgram = exports.cachePrefix = exports.poolsCacheKey = exports.apiPoolInfoUrl = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  const idl_1 = require("./idl");
6
6
  exports.platformId = 'allbridge';
@@ -15,7 +15,6 @@ exports.platform = {
15
15
  exports.apiPoolInfoUrl = `https://core.api.allbridgecoreapi.net/token-info`;
16
16
  exports.poolsCacheKey = `${exports.platformId}-pools`;
17
17
  exports.cachePrefix = `${exports.platformId}`;
18
- exports.poolInfoRefreshInterval = 3600000;
19
18
  exports.allbridgeProgram = new web3_js_1.PublicKey('BrdgN2RPzEMWF96ZbnnJaUtQDQx7VRXYaHHbYCBvceWB');
20
19
  exports.SYSTEM_PRECISION = 3;
21
20
  exports.allbridgeIdlItem = {
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/allbridge/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE5C,+BAAqC;AAExB,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,iCAAiC;IAC1C,OAAO,EAAE,kCAAkC;IAC3C,WAAW,EAAE,gBAAgB,EAAE,sCAAsC;CACtE,CAAC;AAEW,QAAA,cAAc,GAAG,kDAAkD,CAAC;AAEpE,QAAA,aAAa,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACtC,QAAA,WAAW,GAAG,GAAG,kBAAU,EAAE,CAAC;AAC9B,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAElC,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,gBAAgB,GAAG,CAAC,CAAC;AAErB,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IACtC,GAAG,EAAE,kBAAY;IACjB,OAAO,EAAE,QAAQ;CACP,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/allbridge/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE5C,+BAAqC;AAExB,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,iCAAiC;IAC1C,OAAO,EAAE,kCAAkC;IAC3C,WAAW,EAAE,gBAAgB,EAAE,sCAAsC;CACtE,CAAC;AAEW,QAAA,cAAc,GAAG,kDAAkD,CAAC;AAEpE,QAAA,aAAa,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACtC,QAAA,WAAW,GAAG,GAAG,kBAAU,EAAE,CAAC;AAE9B,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,gBAAgB,GAAG,CAAC,CAAC;AAErB,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IACtC,GAAG,EAAE,kBAAY;IACjB,OAAO,EAAE,QAAQ;CACP,CAAC"}
@@ -19,10 +19,14 @@ const clients_1 = require("../../utils/clients");
19
19
  const solana_1 = require("../../utils/solana");
20
20
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
21
21
  const helpers_1 = require("./helpers");
22
- const getPoolInfo_1 = require("./getPoolInfo");
22
+ const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
23
+ const poolInfoMemo = new MemoizedCache_1.MemoizedCache(constants_1.poolsCacheKey, {
24
+ prefix: constants_1.cachePrefix,
25
+ networkId: portfolio_core_1.NetworkId.solana,
26
+ });
23
27
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
24
28
  const connection = (0, clients_1.getClientSolana)();
25
- const poolInfo = yield (0, getPoolInfo_1.getPoolInfo)(cache);
29
+ const poolInfo = yield poolInfoMemo.getItem(cache);
26
30
  if (!poolInfo)
27
31
  return [];
28
32
  const userDepositPublicKeys = (0, helpers_1.getUserDepositPublicKeys)(poolInfo, owner);
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/allbrid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AE,CAAC,OAAO,CAAC;wBACjB,WAAW,EAAE,OAAO,CAAC,KAAK;wBAC1B,YAAY,EAAE,aAAa;wBAC3B,iBAAiB,EAAE,IAAA,+BAAc,EAC/B,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CACpC;wBACD,KAAK;wBACL,MAAM,EAAE;4BACN;gCACE,GAAG,EAAE,IAAA,yBAAQ,EAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gCACpC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;6BAC3B;yBACF;qBACF;iBACF;aACF;YACD,IAAI,EAAE,SAAS,CAAC,IAAI;SACrB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/allbridge/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAG4B;AAC5B,qGAA6E;AAE7E,uCAAgE;AAChE,kEAA+D;AAE/D,MAAM,YAAY,GAAG,IAAI,6BAAa,CAAQ,yBAAa,EAAE;IAC3D,MAAM,EAAE,uBAAW;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,OAAO,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,CAAC;gCACpC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;6BAC3B;yBACF;qBACF;iBACF;aACF;YACD,IAAI,EAAE,SAAS,CAAC,IAAI;SACrB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
36
36
  const graphql_request_1 = __importStar(require("graphql-request"));
37
37
  function getBalancerPoolsV2(url) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- const query = (0, graphql_request_1.gql) `
40
- query pools {
41
- pools(
42
- first: 1000
43
- orderBy: totalLiquidity
44
- orderDirection: desc
45
- where: { totalLiquidity_gt: "500" }
46
- ) {
47
- id
48
- address
49
- symbol
50
- totalLiquidity
51
- totalShares
52
- tokens {
53
- balance
54
- decimals
55
- symbol
56
- address
57
- }
58
- }
59
- }
39
+ const query = (0, graphql_request_1.gql) `
40
+ query pools {
41
+ pools(
42
+ first: 1000
43
+ orderBy: totalLiquidity
44
+ orderDirection: desc
45
+ where: { totalLiquidity_gt: "500" }
46
+ ) {
47
+ id
48
+ address
49
+ symbol
50
+ totalLiquidity
51
+ totalShares
52
+ tokens {
53
+ balance
54
+ decimals
55
+ symbol
56
+ address
57
+ }
58
+ }
59
+ }
60
60
  `;
61
61
  const res = yield (0, graphql_request_1.default)(url, query);
62
62
  const pools = res.pools;
@@ -12,5 +12,4 @@ export declare const collectionsCacheKey = "banx-collections";
12
12
  export declare const cachePrefix = "banx";
13
13
  export declare const bondOfferDataSize = 208;
14
14
  export declare const bondTradeTransactionV3DataSize = 336;
15
- export declare const collectionRefreshInterval = 3600000;
16
15
  export declare const banxIdlItem: IdlItem;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.banxIdlItem = exports.collectionRefreshInterval = exports.bondTradeTransactionV3DataSize = exports.bondOfferDataSize = exports.cachePrefix = exports.collectionsCacheKey = exports.banxApiCollectionsUrl = exports.banxApiUrl = exports.banxDecimals = exports.banxMint = exports.banxPid = exports.platform = exports.platformId = void 0;
3
+ exports.banxIdlItem = exports.bondTradeTransactionV3DataSize = exports.bondOfferDataSize = exports.cachePrefix = exports.collectionsCacheKey = exports.banxApiCollectionsUrl = exports.banxApiUrl = exports.banxDecimals = exports.banxMint = exports.banxPid = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  const idl_1 = require("./idl");
6
6
  exports.platformId = 'banx';
@@ -21,7 +21,6 @@ exports.collectionsCacheKey = `${exports.platformId}-collections`;
21
21
  exports.cachePrefix = `${exports.platformId}`;
22
22
  exports.bondOfferDataSize = 208;
23
23
  exports.bondTradeTransactionV3DataSize = 336;
24
- exports.collectionRefreshInterval = 3600000;
25
24
  exports.banxIdlItem = {
26
25
  programId: exports.banxPid.toString(),
27
26
  idl: idl_1.BanxIDL,
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,+BAAgC;AAEnB,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,MAAM,EAAE,sCAAsC;IAC3D,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,8CAA8C,CAAC;A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ErC,QAAA,WAAW,GAAG;IACzB,SAAS,EAAE,eAAO,CAAC,QAAQ,EAAE;IAC7B,GAAG,EAAE,aAAO;IACZ,OAAO,EAAE,QAAQ;CACP,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export declare const BanxIDL: {
2
2
  version: string;
3
3
  name: string;
4
- accounts: ({
4
+ accounts: {
5
5
  name: string;
6
6
  type: {
7
7
  kind: string;
@@ -9,28 +9,36 @@ export declare const BanxIDL: {
9
9
  name: string;
10
10
  type: {
11
11
  defined: string;
12
+ array?: undefined;
13
+ };
14
+ } | {
15
+ name: string;
16
+ type: {
17
+ array: (string | number)[];
18
+ defined?: undefined;
12
19
  };
13
20
  } | {
14
21
  name: string;
15
22
  type: string;
16
23
  })[];
17
24
  };
18
- } | {
25
+ }[];
26
+ types: ({
19
27
  name: string;
20
28
  type: {
21
29
  kind: string;
22
30
  fields: ({
23
- name: string;
24
- type: string;
25
- } | {
26
31
  name: string;
27
32
  type: {
28
33
  array: (string | number)[];
29
34
  };
35
+ } | {
36
+ name: string;
37
+ type: string;
30
38
  })[];
39
+ variants?: undefined;
31
40
  };
32
- })[];
33
- types: ({
41
+ } | {
34
42
  name: string;
35
43
  type: {
36
44
  kind: string;