@sonarwatch/portfolio-plugins 0.12.152 → 0.12.153
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/src/orphanPlatforms.d.ts +2 -14
- package/src/orphanPlatforms.js +1 -0
- package/src/orphanPlatforms.js.map +1 -1
- package/src/plugins/nxfinance/constants.d.ts +4 -0
- package/src/plugins/nxfinance/constants.js +14 -3
- package/src/plugins/nxfinance/constants.js.map +1 -1
- package/src/plugins/nxfinance/helpers.d.ts +13 -1
- package/src/plugins/nxfinance/helpers.js +66 -1
- package/src/plugins/nxfinance/helpers.js.map +1 -1
- package/src/plugins/nxfinance/index.js +4 -2
- package/src/plugins/nxfinance/index.js.map +1 -1
- package/src/plugins/nxfinance/lendIdl.d.ts +256 -0
- package/src/plugins/nxfinance/lendIdl.js +3387 -0
- package/src/plugins/nxfinance/lendIdl.js.map +1 -0
- package/src/plugins/nxfinance/lendPositionsFetcher.d.ts +3 -0
- package/src/plugins/nxfinance/lendPositionsFetcher.js +97 -0
- package/src/plugins/nxfinance/lendPositionsFetcher.js.map +1 -0
- package/src/plugins/nxfinance/lendingPoolsJob.d.ts +3 -0
- package/src/plugins/nxfinance/lendingPoolsJob.js +30 -0
- package/src/plugins/nxfinance/lendingPoolsJob.js.map +1 -0
- package/src/plugins/nxfinance/{idl.js → leverageIdl.js} +1 -1
- package/src/plugins/nxfinance/leverageIdl.js.map +1 -0
- package/src/plugins/nxfinance/positionsFetcher.js +1 -1
- package/src/plugins/nxfinance/types.d.ts +26 -0
- package/src/plugins/scallop/cnyAirdropFetcher.js +2 -2
- package/src/plugins/scallop/cnyAirdropFetcher.js.map +1 -1
- package/src/plugins/scallop/constants.d.ts +13 -0
- package/src/plugins/scallop/constants.js +64 -1
- package/src/plugins/scallop/constants.js.map +1 -1
- package/src/plugins/scallop/index.js +2 -1
- package/src/plugins/scallop/index.js.map +1 -1
- package/src/plugins/scallop/lendingsFetcher.js +58 -8
- package/src/plugins/scallop/lendingsFetcher.js.map +1 -1
- package/src/plugins/scallop/marketJob.js +1 -1
- package/src/plugins/scallop/marketJob.js.map +1 -1
- package/src/plugins/scallop/obligationsFetcher.js +2 -2
- package/src/plugins/scallop/obligationsFetcher.js.map +1 -1
- package/src/plugins/scallop/poolsJob.js +2 -2
- package/src/plugins/scallop/poolsJob.js.map +1 -1
- package/src/plugins/scallop/sCoinJob.d.ts +3 -0
- package/src/plugins/scallop/sCoinJob.js +43 -0
- package/src/plugins/scallop/sCoinJob.js.map +1 -0
- package/src/plugins/scallop/spoolsMarketJob.js +2 -2
- package/src/plugins/scallop/spoolsMarketJob.js.map +1 -1
- package/src/plugins/scallop/types/coin.d.ts +1 -3
- package/src/plugins/scallop/types/coin.js +1 -21
- package/src/plugins/scallop/types/coin.js.map +1 -1
- package/src/plugins/scallop/types/data.d.ts +4 -0
- package/src/plugins/scallop/veScaFetcher.js +1 -1
- package/src/plugins/scallop/veScaFetcher.js.map +1 -1
- package/src/plugins/stargate/constants.js +1 -1
- package/src/plugins/stargate/constants.js.map +1 -1
- package/src/plugins/nxfinance/idl.js.map +0 -1
- /package/src/plugins/nxfinance/{idl.d.ts → leverageIdl.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.12.153](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.152...plugins-0.12.153) (2024-08-26)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* add new scoin support ([ea4382d](https://github.com/sonarwatch/portfolio/commit/ea4382d314fc366273c7847164f1028f3e3fb585))
|
11
|
+
* update scallop lending fetcher ([0620dd9](https://github.com/sonarwatch/portfolio/commit/0620dd969814c7725e03a4ff7f0d0206cab37f42))
|
12
|
+
|
13
|
+
|
14
|
+
|
5
15
|
## [0.12.152](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.151...plugins-0.12.152) (2024-08-22)
|
6
16
|
|
7
17
|
|
package/package.json
CHANGED
package/src/orphanPlatforms.d.ts
CHANGED
@@ -1,17 +1,5 @@
|
|
1
1
|
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
-
export declare const stepfinancePlatform:
|
3
|
-
|
4
|
-
name: string;
|
5
|
-
image: string;
|
6
|
-
website: string;
|
7
|
-
twitter: string;
|
8
|
-
};
|
9
|
-
export declare const ligmaPlatform: {
|
10
|
-
id: string;
|
11
|
-
name: string;
|
12
|
-
image: string;
|
13
|
-
website: string;
|
14
|
-
twitter: string;
|
15
|
-
};
|
2
|
+
export declare const stepfinancePlatform: Platform;
|
3
|
+
export declare const ligmaPlatform: Platform;
|
16
4
|
declare const orphanPlatforms: Platform[];
|
17
5
|
export default orphanPlatforms;
|
package/src/orphanPlatforms.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"orphanPlatforms.js","sourceRoot":"","sources":["../../../../packages/plugins/src/orphanPlatforms.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,
|
1
|
+
{"version":3,"file":"orphanPlatforms.js","sourceRoot":"","sources":["../../../../packages/plugins/src/orphanPlatforms.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,oDAAoD;IAC3D,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,kCAAkC;IAC3C,WAAW,EAAE,cAAc;CAC5B,CAAC;AACW,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,+BAA+B;CACzC,CAAC;AAEF,MAAM,eAAe,GAAe;IAClC;QACE,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,SAAS,EAAE,sCAAsC;QAC9D,IAAI,EAAE,SAAS;QACf,KAAK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,7 @@ export declare const ID: PublicKey;
|
|
7
7
|
export declare const leverageFiProgramID: PublicKey;
|
8
8
|
export declare const leverageVaultsMints: string[];
|
9
9
|
export declare const nxfinanceLeverageIdlItem: IdlItem;
|
10
|
+
export declare const lendProgramId: PublicKey;
|
11
|
+
export declare const nxfinanceLendIdlItem: IdlItem;
|
12
|
+
export declare const lendingPoolKey = "lending-pools";
|
13
|
+
export declare const lendingPools: PublicKey[];
|
@@ -1,8 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.nxfinanceLeverageIdlItem = exports.leverageVaultsMints = exports.leverageFiProgramID = exports.ID = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.lendingPools = exports.lendingPoolKey = exports.nxfinanceLendIdlItem = exports.lendProgramId = exports.nxfinanceLeverageIdlItem = exports.leverageVaultsMints = exports.leverageFiProgramID = exports.ID = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
|
-
const
|
5
|
+
const leverageIdl_1 = require("./leverageIdl");
|
6
|
+
const lendIdl_1 = require("./lendIdl");
|
6
7
|
exports.platformId = 'nxfinance';
|
7
8
|
exports.platform = {
|
8
9
|
id: exports.platformId,
|
@@ -21,7 +22,17 @@ exports.leverageVaultsMints = [
|
|
21
22
|
];
|
22
23
|
exports.nxfinanceLeverageIdlItem = {
|
23
24
|
programId: exports.leverageFiProgramID.toString(),
|
24
|
-
idl:
|
25
|
+
idl: leverageIdl_1.NxfinanceLeverageIDL,
|
25
26
|
idlType: 'anchor',
|
26
27
|
};
|
28
|
+
exports.lendProgramId = new web3_js_1.PublicKey('NXFiKimQN3QSL3CDhCXddyVmLfrai8HK36bHKaAzK7g');
|
29
|
+
exports.nxfinanceLendIdlItem = {
|
30
|
+
programId: exports.lendProgramId.toString(),
|
31
|
+
idl: lendIdl_1.NxfinanceLendIdl,
|
32
|
+
idlType: 'anchor',
|
33
|
+
};
|
34
|
+
exports.lendingPoolKey = 'lending-pools';
|
35
|
+
exports.lendingPools = [
|
36
|
+
new web3_js_1.PublicKey('HVn3F2wq2Fvr8T5yX7VS9yWaNxX5PMgxTyHb4aKAX8z3'),
|
37
|
+
];
|
27
38
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+CAAqD;AACrD,uCAA6C;AAEhC,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,gCAAgC;IACzC,WAAW,EAAE,YAAY,EAAE,sCAAsC;CAClE,CAAC;AAEW,QAAA,EAAE,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AAElE,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,mBAAmB,GAAG;IACjC,8CAA8C,EAAE,MAAM;IACtD,6CAA6C,EAAE,SAAS;IACxD,6CAA6C,EAAE,OAAO;CACvD,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,SAAS,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACzC,GAAG,EAAE,kCAAoB;IACzB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,SAAS,EAAE,qBAAa,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,0BAAgB;IACrB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,cAAc,GAAG,eAAe,CAAC;AAEjC,QAAA,YAAY,GAAG;IAC1B,IAAI,mBAAS,CAAC,8CAA8C,CAAC;CAC9D,CAAC"}
|
@@ -1,4 +1,16 @@
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
2
|
-
import { MarginPool } from './types';
|
2
|
+
import { LendingPool, MarginPool } from './types';
|
3
3
|
export declare const getSupplyNoteRate: (marginPool: MarginPool) => BigNumber;
|
4
4
|
export declare const getBorrowNoteRate: (marginPool: MarginPool) => BigNumber;
|
5
|
+
export declare const formatLendingPool: (t: LendingPool, decimals: number) => {
|
6
|
+
APR: number;
|
7
|
+
borrowAPR: number;
|
8
|
+
depositNoteNum: BigNumber;
|
9
|
+
depositedTokenNum: BigNumber;
|
10
|
+
depositNoteRate: number;
|
11
|
+
borrowNoteNum: BigNumber;
|
12
|
+
borrowedTokenNum: BigNumber;
|
13
|
+
borrowNoteRate: number;
|
14
|
+
depositInterest: number;
|
15
|
+
borrowInterest: number;
|
16
|
+
};
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.getBorrowNoteRate = exports.getSupplyNoteRate = void 0;
|
6
|
+
exports.formatLendingPool = exports.getBorrowNoteRate = exports.getSupplyNoteRate = void 0;
|
7
7
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
8
8
|
const getBorrowApr = (utilization) => {
|
9
9
|
if (utilization.isLessThanOrEqualTo(0.8)) {
|
@@ -49,4 +49,69 @@ const getBorrowNoteRate = (marginPool) => {
|
|
49
49
|
return borrowedTokens.plus(loanInterest).dividedBy(loanNotes);
|
50
50
|
};
|
51
51
|
exports.getBorrowNoteRate = getBorrowNoteRate;
|
52
|
+
const formatLendingPool = (t, decimals) => {
|
53
|
+
const o = new bignumber_js_1.default(t.depositNotes);
|
54
|
+
const n = new bignumber_js_1.default(t.depositTokens);
|
55
|
+
const i = new bignumber_js_1.default(t.borrowNotes);
|
56
|
+
const r = new bignumber_js_1.default(t.borrowTokens);
|
57
|
+
const a = r.dividedBy(n || 1).toFixed(4, bignumber_js_1.default.ROUND_DOWN);
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow,func-names
|
59
|
+
const s = (function (e, t) {
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
61
|
+
const o = e.interestRateConfigs
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
63
|
+
.map((e) => ({
|
64
|
+
kValue: e.kValue / 1e5,
|
65
|
+
bValue: e.bValue / 1e5,
|
66
|
+
utilizationRate: e.utilizationRate / 100,
|
67
|
+
}))
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
69
|
+
.find((e) => t <= e.utilizationRate);
|
70
|
+
return o
|
71
|
+
? new bignumber_js_1.default(o.kValue)
|
72
|
+
.times(t)
|
73
|
+
.plus(o.bValue)
|
74
|
+
.toFixed(4, bignumber_js_1.default.ROUND_DOWN)
|
75
|
+
: '0';
|
76
|
+
})(t, parseFloat(a));
|
77
|
+
const c = new bignumber_js_1.default(s).times(a).toFixed(4, bignumber_js_1.default.ROUND_DOWN);
|
78
|
+
const u = new bignumber_js_1.default(t.depositInterest);
|
79
|
+
const l = new bignumber_js_1.default(t.borrowInterest);
|
80
|
+
const m = new bignumber_js_1.default(t.accruedUntil).toNumber();
|
81
|
+
const g = new bignumber_js_1.default(new Date().getTime() / 1e3).minus(m).toNumber();
|
82
|
+
const p = new bignumber_js_1.default(t.protocolFee).toNumber() / 1e5;
|
83
|
+
const M = decimals; // decimals de SOL
|
84
|
+
const h = new bignumber_js_1.default(r)
|
85
|
+
.times(s)
|
86
|
+
.times(g)
|
87
|
+
.div(31536e3)
|
88
|
+
.toFixed(M, bignumber_js_1.default.ROUND_DOWN);
|
89
|
+
const y = new bignumber_js_1.default(h).plus(l).toFixed(M, bignumber_js_1.default.ROUND_UP);
|
90
|
+
const k = new bignumber_js_1.default(1)
|
91
|
+
.minus(p)
|
92
|
+
.times(h)
|
93
|
+
.plus(u)
|
94
|
+
.toFixed(M, bignumber_js_1.default.ROUND_DOWN);
|
95
|
+
const P = new bignumber_js_1.default(r)
|
96
|
+
.plus(y)
|
97
|
+
.div(i || 1)
|
98
|
+
.toFixed(9, bignumber_js_1.default.ROUND_UP);
|
99
|
+
const w = new bignumber_js_1.default(n)
|
100
|
+
.plus(k)
|
101
|
+
.div(o || 1)
|
102
|
+
.toFixed(9, bignumber_js_1.default.ROUND_DOWN);
|
103
|
+
return {
|
104
|
+
APR: parseFloat(c),
|
105
|
+
borrowAPR: parseFloat(s),
|
106
|
+
depositNoteNum: o,
|
107
|
+
depositedTokenNum: n,
|
108
|
+
depositNoteRate: parseFloat(w),
|
109
|
+
borrowNoteNum: i,
|
110
|
+
borrowedTokenNum: r,
|
111
|
+
borrowNoteRate: parseFloat(P),
|
112
|
+
depositInterest: parseFloat(k),
|
113
|
+
borrowInterest: parseFloat(y),
|
114
|
+
};
|
115
|
+
};
|
116
|
+
exports.formatLendingPool = formatLendingPool;
|
52
117
|
//# sourceMappingURL=helpers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAGrC,MAAM,YAAY,GAAG,CAAC,WAAsB,EAAE,EAAE;IAC9C,IAAI,WAAW,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;QACzC,OAAO,UAAU,CACf,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,sBAAS,CAAC,UAAU,CAAC,CACpE,CAAC;IACJ,CAAC;IACD,OA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,CAAC,CAAC;IAClE,MAAM,CAAC,GAAG,IAAI,sBAAS,CAAC,CAAC,CAAC;SACvB,KAAK,CAAC,CAAC,CAAC;SACR,KAAK,CAAC,CAAC,CAAC;SACR,IAAI,CAAC,CAAC,CAAC;SACP,OAAO,CAAC,CAAC,EAAE,sBAAS,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,sBAAS,CAAC,CAAC,CAAC;SACvB,IAAI,CAAC,CAAC,CAAC;SACP,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;SACX,OAAO,CAAC,CAAC,EAAE,sBAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,CAAC,GAAG,IAAI,sBAAS,CAAC,CAAC,CAAC;SACvB,IAAI,CAAC,CAAC,CAAC;SACP,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;SACX,OAAO,CAAC,CAAC,EAAE,sBAAS,CAAC,UAAU,CAAC,CAAC;IAEpC,OAAO;QACL,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC;QAClB,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;QACxB,cAAc,EAAE,CAAC;QACjB,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;QAC9B,aAAa,EAAE,CAAC;QAChB,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;QAC7B,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;QAC9B,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;KAC9B,CAAC;AACJ,CAAC,CAAC;AAhEW,QAAA,iBAAiB,qBAgE5B"}
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const constants_1 = require("./constants");
|
8
8
|
const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
|
9
|
+
const lendPositionsFetcher_1 = __importDefault(require("./lendPositionsFetcher"));
|
10
|
+
const lendingPoolsJob_1 = __importDefault(require("./lendingPoolsJob"));
|
9
11
|
exports.platforms = [constants_1.platform];
|
10
|
-
exports.jobs = [];
|
11
|
-
exports.fetchers = [positionsFetcher_1.default];
|
12
|
+
exports.jobs = [lendingPoolsJob_1.default];
|
13
|
+
exports.fetchers = [positionsFetcher_1.default, lendPositionsFetcher_1.default];
|
12
14
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAClD,kFAA0D;AAC1D,wEAAgD;AAEnC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,yBAAe,CAAC,CAAC;AAChC,QAAA,QAAQ,GAAc,CAAC,0BAAgB,EAAE,8BAAoB,CAAC,CAAC"}
|
@@ -0,0 +1,256 @@
|
|
1
|
+
export declare const NxfinanceLendIdl: {
|
2
|
+
version: string;
|
3
|
+
name: string;
|
4
|
+
constants: ({
|
5
|
+
name: string;
|
6
|
+
type: string;
|
7
|
+
value: string;
|
8
|
+
} | {
|
9
|
+
name: string;
|
10
|
+
type: {
|
11
|
+
defined: string;
|
12
|
+
array?: undefined;
|
13
|
+
};
|
14
|
+
value: string;
|
15
|
+
} | {
|
16
|
+
name: string;
|
17
|
+
type: {
|
18
|
+
array: (number | {
|
19
|
+
defined: string;
|
20
|
+
})[];
|
21
|
+
defined?: undefined;
|
22
|
+
};
|
23
|
+
value: string;
|
24
|
+
})[];
|
25
|
+
instructions: ({
|
26
|
+
name: string;
|
27
|
+
accounts: {
|
28
|
+
name: string;
|
29
|
+
isMut: boolean;
|
30
|
+
isSigner: boolean;
|
31
|
+
}[];
|
32
|
+
args: {
|
33
|
+
name: string;
|
34
|
+
type: {
|
35
|
+
defined: string;
|
36
|
+
};
|
37
|
+
}[];
|
38
|
+
docs?: undefined;
|
39
|
+
} | {
|
40
|
+
name: string;
|
41
|
+
accounts: ({
|
42
|
+
name: string;
|
43
|
+
isMut: boolean;
|
44
|
+
isSigner: boolean;
|
45
|
+
docs?: undefined;
|
46
|
+
} | {
|
47
|
+
name: string;
|
48
|
+
isMut: boolean;
|
49
|
+
isSigner: boolean;
|
50
|
+
docs: string[];
|
51
|
+
})[];
|
52
|
+
args: {
|
53
|
+
name: string;
|
54
|
+
type: {
|
55
|
+
vec: {
|
56
|
+
defined: string;
|
57
|
+
};
|
58
|
+
};
|
59
|
+
}[];
|
60
|
+
docs?: undefined;
|
61
|
+
} | {
|
62
|
+
name: string;
|
63
|
+
accounts: ({
|
64
|
+
name: string;
|
65
|
+
isMut: boolean;
|
66
|
+
isSigner: boolean;
|
67
|
+
docs: string[];
|
68
|
+
} | {
|
69
|
+
name: string;
|
70
|
+
isMut: boolean;
|
71
|
+
isSigner: boolean;
|
72
|
+
docs?: undefined;
|
73
|
+
})[];
|
74
|
+
args: {
|
75
|
+
name: string;
|
76
|
+
type: string;
|
77
|
+
}[];
|
78
|
+
docs?: undefined;
|
79
|
+
} | {
|
80
|
+
name: string;
|
81
|
+
docs: string[];
|
82
|
+
accounts: ({
|
83
|
+
name: string;
|
84
|
+
isMut: boolean;
|
85
|
+
isSigner: boolean;
|
86
|
+
docs: string[];
|
87
|
+
} | {
|
88
|
+
name: string;
|
89
|
+
isMut: boolean;
|
90
|
+
isSigner: boolean;
|
91
|
+
docs?: undefined;
|
92
|
+
})[];
|
93
|
+
args: {
|
94
|
+
name: string;
|
95
|
+
type: string;
|
96
|
+
}[];
|
97
|
+
})[];
|
98
|
+
accounts: ({
|
99
|
+
name: string;
|
100
|
+
docs: string[];
|
101
|
+
type: {
|
102
|
+
kind: string;
|
103
|
+
fields: ({
|
104
|
+
name: string;
|
105
|
+
docs: string[];
|
106
|
+
type: string;
|
107
|
+
} | {
|
108
|
+
name: string;
|
109
|
+
type: string;
|
110
|
+
docs?: undefined;
|
111
|
+
})[];
|
112
|
+
};
|
113
|
+
} | {
|
114
|
+
name: string;
|
115
|
+
type: {
|
116
|
+
kind: string;
|
117
|
+
fields: ({
|
118
|
+
name: string;
|
119
|
+
docs: string[];
|
120
|
+
type: string;
|
121
|
+
} | {
|
122
|
+
name: string;
|
123
|
+
type: string;
|
124
|
+
docs?: undefined;
|
125
|
+
} | {
|
126
|
+
name: string;
|
127
|
+
type: {
|
128
|
+
vec: {
|
129
|
+
defined: string;
|
130
|
+
};
|
131
|
+
};
|
132
|
+
docs?: undefined;
|
133
|
+
})[];
|
134
|
+
};
|
135
|
+
docs?: undefined;
|
136
|
+
} | {
|
137
|
+
name: string;
|
138
|
+
type: {
|
139
|
+
kind: string;
|
140
|
+
fields: ({
|
141
|
+
name: string;
|
142
|
+
docs: string[];
|
143
|
+
type: string;
|
144
|
+
} | {
|
145
|
+
name: string;
|
146
|
+
docs: string[];
|
147
|
+
type: {
|
148
|
+
vec: {
|
149
|
+
defined: string;
|
150
|
+
};
|
151
|
+
};
|
152
|
+
})[];
|
153
|
+
};
|
154
|
+
docs?: undefined;
|
155
|
+
})[];
|
156
|
+
types: ({
|
157
|
+
name: string;
|
158
|
+
type: {
|
159
|
+
kind: string;
|
160
|
+
fields: ({
|
161
|
+
name: string;
|
162
|
+
docs: string[];
|
163
|
+
type: string;
|
164
|
+
} | {
|
165
|
+
name: string;
|
166
|
+
type: string;
|
167
|
+
docs?: undefined;
|
168
|
+
})[];
|
169
|
+
variants?: undefined;
|
170
|
+
};
|
171
|
+
docs?: undefined;
|
172
|
+
} | {
|
173
|
+
name: string;
|
174
|
+
docs: string[];
|
175
|
+
type: {
|
176
|
+
kind: string;
|
177
|
+
fields: ({
|
178
|
+
name: string;
|
179
|
+
type: {
|
180
|
+
defined: string;
|
181
|
+
};
|
182
|
+
} | {
|
183
|
+
name: string;
|
184
|
+
type: string;
|
185
|
+
})[];
|
186
|
+
variants?: undefined;
|
187
|
+
};
|
188
|
+
} | {
|
189
|
+
name: string;
|
190
|
+
type: {
|
191
|
+
kind: string;
|
192
|
+
fields: ({
|
193
|
+
name: string;
|
194
|
+
type: string;
|
195
|
+
} | {
|
196
|
+
name: string;
|
197
|
+
type: {
|
198
|
+
defined: string;
|
199
|
+
};
|
200
|
+
})[];
|
201
|
+
variants?: undefined;
|
202
|
+
};
|
203
|
+
docs?: undefined;
|
204
|
+
} | {
|
205
|
+
name: string;
|
206
|
+
type: {
|
207
|
+
kind: string;
|
208
|
+
fields: {
|
209
|
+
name: string;
|
210
|
+
docs: string[];
|
211
|
+
type: {
|
212
|
+
defined: string;
|
213
|
+
};
|
214
|
+
}[];
|
215
|
+
variants?: undefined;
|
216
|
+
};
|
217
|
+
docs?: undefined;
|
218
|
+
} | {
|
219
|
+
name: string;
|
220
|
+
docs: string[];
|
221
|
+
type: {
|
222
|
+
kind: string;
|
223
|
+
fields: {
|
224
|
+
name: string;
|
225
|
+
docs: string[];
|
226
|
+
type: string;
|
227
|
+
}[];
|
228
|
+
variants?: undefined;
|
229
|
+
};
|
230
|
+
} | {
|
231
|
+
name: string;
|
232
|
+
type: {
|
233
|
+
kind: string;
|
234
|
+
variants: {
|
235
|
+
name: string;
|
236
|
+
}[];
|
237
|
+
fields?: undefined;
|
238
|
+
};
|
239
|
+
docs?: undefined;
|
240
|
+
} | {
|
241
|
+
name: string;
|
242
|
+
docs: string[];
|
243
|
+
type: {
|
244
|
+
kind: string;
|
245
|
+
variants: {
|
246
|
+
name: string;
|
247
|
+
}[];
|
248
|
+
fields?: undefined;
|
249
|
+
};
|
250
|
+
})[];
|
251
|
+
errors: {
|
252
|
+
code: number;
|
253
|
+
name: string;
|
254
|
+
msg: string;
|
255
|
+
}[];
|
256
|
+
};
|