@sonarwatch/portfolio-plugins 0.12.127 → 0.12.128

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.12.128](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.127...plugins-0.12.128) (2024-08-09)
6
+
7
+
8
+
9
+ ## [0.12.127](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.126...plugins-0.12.127) (2024-08-09)
10
+
11
+
12
+
5
13
  ## [0.12.127](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.126...plugins-0.12.127) (2024-08-08)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.127",
3
+ "version": "0.12.128",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -0,0 +1,3 @@
1
+ import { MergeMiner, Miner, Position, Rewarder } from './types';
2
+ import { ParsedAccount } from '../../utils/solana';
3
+ export declare const calculatePositions: (mergeMinerAccounts: ParsedAccount<MergeMiner>[], minerAccounts: ParsedAccount<Miner>[], replicaMinerAccounts: ParsedAccount<Miner>[][], allRewarders: Rewarder[], owner: string) => Position[];
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculatePositions = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ const helpers_1 = require("./helpers");
6
+ const calculatePositions = (mergeMinerAccounts, minerAccounts, replicaMinerAccounts, allRewarders, owner) => {
7
+ const positions = [];
8
+ const quarryPDAS = (0, helpers_1.getQuarryPDAs)(allRewarders, new web3_js_1.PublicKey(owner));
9
+ [...mergeMinerAccounts, ...minerAccounts].forEach((account, i) => {
10
+ var _a;
11
+ if (!account)
12
+ return;
13
+ const quarryPDA = quarryPDAS.find((q) => (0, helpers_1.isMinerAccount)(account)
14
+ ? q.ownerMiner.toString() === account.pubkey.toString()
15
+ : q.mm.toString() === account.pubkey.toString());
16
+ if (!quarryPDA)
17
+ return;
18
+ const primaryRewarder = allRewarders.find((r) => r.rewarder === quarryPDA.rewarder.toString());
19
+ if (!primaryRewarder)
20
+ return;
21
+ const primaryQuarry = primaryRewarder.quarries.find((q) => quarryPDA.primaryQuarry.toString() === q.quarry);
22
+ if (!primaryQuarry)
23
+ return;
24
+ const rewardsToken = [
25
+ quarryPDA.rewardsToken.toString(),
26
+ ...quarryPDA.replicas.map((r) => r.rewardsMint.toString()),
27
+ ];
28
+ const rewardsBalance = (0, helpers_1.isMinerAccount)(account)
29
+ ? [account.rewardsEarned]
30
+ : replicaMinerAccounts[i].map((acc) => acc.rewardsEarned);
31
+ positions.push({
32
+ primaryRewarder: {
33
+ slug: primaryRewarder.slug,
34
+ name: (_a = primaryRewarder.info) === null || _a === void 0 ? void 0 : _a.name,
35
+ },
36
+ stakedBalance: (0, helpers_1.isMinerAccount)(account)
37
+ ? account.balance
38
+ : account.primaryBalance,
39
+ stakedTokenInfo: primaryQuarry.primaryTokenInfo,
40
+ rewardsToken,
41
+ rewardsBalance,
42
+ });
43
+ });
44
+ return positions;
45
+ };
46
+ exports.calculatePositions = calculatePositions;
47
+ //# sourceMappingURL=calculatePositions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculatePositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/calculatePositions.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,uCAA0D;AAEnD,MAAM,kBAAkB,GAAG,CAChC,kBAA+C,EAC/C,aAAqC,EACrC,oBAA8C,EAC9C,YAAwB,EACxB,KAAa,EACb,EAAE;IACF,MAAM,SAAS,GAAe,EAAE,CAAC;IAEjC,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,YAAY,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAErE,CAA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AAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAE5D,SAAS,CAAC,IAAI,CAAC;YACb,eAAe,EAAE;gBACf,IAAI,EAAE,eAAe,CAAC,IAAI;gBAC1B,IAAI,EAAE,MAAA,eAAe,CAAC,IAAI,0CAAE,IAAI;aACjC;YACD,aAAa,EAAE,IAAA,wBAAc,EAAC,OAAO,CAAC;gBACpC,CAAC,CAAC,OAAO,CAAC,OAAO;gBACjB,CAAC,CAAC,OAAO,CAAC,cAAc;YAC1B,eAAe,EAAE,aAAa,CAAC,gBAAgB;YAC/C,YAAY;YACZ,cAAc;SACf,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAvDW,QAAA,kBAAkB,sBAuD7B"}
@@ -3,8 +3,12 @@ import { PublicKey } from '@solana/web3.js';
3
3
  import { IdlItem } from '@solanafm/explorer-kit-idls';
4
4
  export declare const platformId = "quarry";
5
5
  export declare const platform: Platform;
6
+ export declare const IOUTokensElementName = "IOU Tokens";
6
7
  export declare const rewardersCacheKey = "rewarders";
7
8
  export declare const rewardersUrl = "https://cdn.jsdelivr.net/gh/QuarryProtocol/rewarder-list-build@master/mainnet-beta/all-rewarders-with-info.json";
8
9
  export declare const mergeMineProgramId: PublicKey;
9
10
  export declare const mineProgramId: PublicKey;
11
+ export declare const redeemerProgramId: PublicKey;
10
12
  export declare const mineIdlItem: IdlItem;
13
+ export declare const mergeMineIdlItem: IdlItem;
14
+ export declare const redeemerIdlItem: IdlItem;
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mineIdlItem = exports.mineProgramId = exports.mergeMineProgramId = exports.rewardersUrl = exports.rewardersCacheKey = exports.platform = exports.platformId = void 0;
3
+ exports.redeemerIdlItem = exports.mergeMineIdlItem = exports.mineIdlItem = exports.redeemerProgramId = exports.mineProgramId = exports.mergeMineProgramId = exports.rewardersUrl = exports.rewardersCacheKey = exports.IOUTokensElementName = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  const mineIdl_1 = require("./mineIdl");
6
+ const mergeMineIdl_1 = require("./mergeMineIdl");
7
+ const redeemerIdl_1 = require("./redeemerIdl");
6
8
  exports.platformId = 'quarry';
7
9
  exports.platform = {
8
10
  id: exports.platformId,
@@ -12,13 +14,25 @@ exports.platform = {
12
14
  // twitter: 'https://x.com/QuarryProtocol',
13
15
  defiLlamaId: 'quarry', // from https://defillama.com/docs/api
14
16
  };
17
+ exports.IOUTokensElementName = 'IOU Tokens';
15
18
  exports.rewardersCacheKey = `rewarders`;
16
19
  exports.rewardersUrl = `https://cdn.jsdelivr.net/gh/QuarryProtocol/rewarder-list-build@master/mainnet-beta/all-rewarders-with-info.json`;
17
20
  exports.mergeMineProgramId = new web3_js_1.PublicKey('QMMD16kjauP5knBwxNUJRZ1Z5o3deBuFrqVjBVmmqto');
18
21
  exports.mineProgramId = new web3_js_1.PublicKey('QMNeHCGYnLVDn1icRAfQZpjPLBNkfGbSKRB83G5d8KB');
22
+ exports.redeemerProgramId = new web3_js_1.PublicKey('QRDxhMw1P2NEfiw5mYXG79bwfgHTdasY2xNP76XSea9');
19
23
  exports.mineIdlItem = {
20
24
  programId: exports.mineProgramId.toString(),
21
25
  idl: mineIdl_1.mineIdl,
22
26
  idlType: 'anchor',
23
27
  };
28
+ exports.mergeMineIdlItem = {
29
+ programId: exports.mergeMineProgramId.toString(),
30
+ idl: mergeMineIdl_1.mergeMineIdl,
31
+ idlType: 'anchor',
32
+ };
33
+ exports.redeemerIdlItem = {
34
+ programId: exports.redeemerProgramId.toString(),
35
+ idl: redeemerIdl_1.redeemerIdl,
36
+ idlType: 'anchor',
37
+ };
24
38
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE5C,uCAAoC;AAEvB,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,wBAAwB;IACjC,2CAA2C;IAC3C,WAAW,EAAE,QAAQ,EAAE,sCAAsC;CAC9D,CAAC;AACW,QAAA,iBAAiB,GAAG,WAAW,CAAC;AAChC,QAAA,YAAY,GAAG,iHAAiH,CAAC;AACjI,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,6CAA6C,CAC9C,CAAC;AACW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,WAAW,GAAG;IACzB,SAAS,EAAE,qBAAa,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,iBAAO;IACZ,OAAO,EAAE,QAAQ;CACP,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE5C,uCAAoC;AACpC,iDAA8C;AAC9C,+CAA4C;AAE/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,wBAAwB;IACjC,2CAA2C;IAC3C,WAAW,EAAE,QAAQ,EAAE,sCAAsC;CAC9D,CAAC;AAEW,QAAA,oBAAoB,GAAG,YAAY,CAAC;AAEpC,QAAA,iBAAiB,GAAG,WAAW,CAAC;AAChC,QAAA,YAAY,GAAG,iHAAiH,CAAC;AACjI,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,6CAA6C,CAC9C,CAAC;AACW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,6CAA6C,CAC9C,CAAC;AAEW,QAAA,WAAW,GAAG;IACzB,SAAS,EAAE,qBAAa,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,iBAAO;IACZ,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,0BAAkB,CAAC,QAAQ,EAAE;IACxC,GAAG,EAAE,2BAAY;IACjB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,eAAe,GAAG;IAC7B,SAAS,EAAE,yBAAiB,CAAC,QAAQ,EAAE;IACvC,GAAG,EAAE,yBAAW;IAChB,OAAO,EAAE,QAAQ;CACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { GetProgramAccountsFilter } from '@solana/web3.js';
2
+ export declare const minerFilters: (authority: string) => GetProgramAccountsFilter[];
3
+ export declare const mergeMinerFilters: (owner: string) => GetProgramAccountsFilter[];
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mergeMinerFilters = exports.minerFilters = void 0;
4
+ const minerFilters = (authority) => [
5
+ {
6
+ memcmp: {
7
+ offset: 40,
8
+ bytes: authority,
9
+ },
10
+ },
11
+ { dataSize: 145 },
12
+ ];
13
+ exports.minerFilters = minerFilters;
14
+ const mergeMinerFilters = (owner) => [
15
+ {
16
+ memcmp: {
17
+ offset: 40,
18
+ bytes: owner,
19
+ },
20
+ },
21
+ { dataSize: 97 },
22
+ ];
23
+ exports.mergeMinerFilters = mergeMinerFilters;
24
+ //# sourceMappingURL=filters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,YAAY,GAAG,CAAC,SAAiB,EAA8B,EAAE,CAAC;IAC7E;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,SAAS;SACjB;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,YAAY,gBAQvB;AAEK,MAAM,iBAAiB,GAAG,CAC/B,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,EAAE,EAAE;CACjB,CAAC;AAVW,QAAA,iBAAiB,qBAU5B"}
@@ -1,17 +1,5 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
- import { Rewarder } from './types';
3
- export declare const getQuarryData: (rewarders: Rewarder[], owner: PublicKey) => {
4
- primaryQuarry: PublicKey;
5
- mm: PublicKey;
6
- mmMiner: PublicKey;
7
- ownerMiner: PublicKey;
8
- rewarder: PublicKey;
9
- stakedToken: PublicKey;
10
- rewardsToken: PublicKey;
11
- replicas: {
12
- replicaQuarry: PublicKey;
13
- replicaMMMiner: PublicKey;
14
- rewardsMint: PublicKey;
15
- rewarder: PublicKey;
16
- }[];
17
- }[];
2
+ import { MergeMiner, Miner, QuarryPDA, Rewarder } from './types';
3
+ import { ParsedAccount } from '../../utils/solana';
4
+ export declare const getQuarryPDAs: (rewarders: Rewarder[], owner: PublicKey) => QuarryPDA[];
5
+ export declare const isMinerAccount: (account: ParsedAccount<Miner> | ParsedAccount<MergeMiner>) => account is ParsedAccount<Miner>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getQuarryData = void 0;
3
+ exports.isMinerAccount = exports.getQuarryPDAs = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  const constants_1 = require("./constants");
6
6
  const getQuarryPDA = (t, e) => web3_js_1.PublicKey.findProgramAddressSync([Uint8Array.from(Buffer.from('Quarry', 'utf-8')), t.toBytes(), e.toBytes()], constants_1.mineProgramId);
@@ -11,7 +11,7 @@ const getReplicaMintPDA = (primaryMint) => {
11
11
  };
12
12
  const getMergeMinerPDA = (pool, owner) => web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('MergeMiner', 'utf-8'), pool.toBuffer(), owner.toBuffer()], constants_1.mergeMineProgramId);
13
13
  const getMinerPDA = (t, e) => web3_js_1.PublicKey.findProgramAddressSync([Uint8Array.from(Buffer.from('Miner', 'utf-8')), t.toBytes(), e.toBytes()], constants_1.mineProgramId);
14
- const getQuarryData = (rewarders, owner) => {
14
+ const getQuarryPDAs = (rewarders, owner) => {
15
15
  const quarryAndMintsByTokenMint = {};
16
16
  const e = rewarders.flatMap((rewarder) => {
17
17
  const n = new web3_js_1.PublicKey(rewarder.rewarder);
@@ -53,11 +53,12 @@ const getQuarryData = (rewarders, owner) => {
53
53
  mmMiner: l,
54
54
  ownerMiner: d,
55
55
  rewarder,
56
- stakedToken: primaryMint,
57
56
  rewardsToken: rewardsMint,
58
57
  replicas: f,
59
58
  };
60
59
  });
61
60
  };
62
- exports.getQuarryData = getQuarryData;
61
+ exports.getQuarryPDAs = getQuarryPDAs;
62
+ const isMinerAccount = (account) => account.quarry !== undefined;
63
+ exports.isMinerAccount = isMinerAccount;
63
64
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAAgE;AAGhE,MAAM,YAAY,GAAG,CAAC,CAAY,EAAE,CAAY,EAAE,EAAE,CAClD,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,EAC3E,yBAAa,CACd,CAAC;AAEJ,MAAM,eAAe,GAAG,CAAC,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,WAAW,CAAC,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACjD,MAAM,CAAC,GAAG,yBAAyB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;QACxD,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACpB,MAAM,CAAC,aAAa,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAC/C,MAAM,CAAC,cAAc,CAAC,GAAG,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;YACvD,OAAO;gBACL,aAAa;gBACb,cAAc;gBACd,WAAW,EAAE,CAAC,CAAC,WAAW;gBAC1B,QAAQ,EAAE,CAAC,CAAC,GAAG;aAChB,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO;YACL,aAAa,EAAE,CAAC;YAChB,EAAE,EAAE,CAAC;YACL,OAAO,EAAE,CAAC;YACV,UAAU,EAAE,CAAC;YACb,QAAQ;YACR,YAAY,EAAE,WAAW;YACzB,QAAQ,EAAE,CAAC;SACZ,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAlDW,QAAA,aAAa,iBAkDxB;AAEK,MAAM,cAAc,GAAG,CAC5B,OAAyD,EACxB,EAAE,CAClC,OAAgC,CAAC,MAAM,KAAK,SAAS,CAAC;AAH5C,QAAA,cAAc,kBAG8B"}
@@ -7,7 +7,8 @@ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
8
  const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
9
9
  const rewardersJob_1 = __importDefault(require("./rewardersJob"));
10
+ const redeemersJob_1 = __importDefault(require("./redeemersJob"));
10
11
  exports.platforms = [constants_1.platform];
11
- exports.jobs = [rewardersJob_1.default];
12
+ exports.jobs = [rewardersJob_1.default, redeemersJob_1.default];
12
13
  exports.fetchers = [positionsFetcher_1.default];
13
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAClD,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,sBAAY,CAAC,CAAC;AAC7B,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAClD,kEAA0C;AAC1C,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,sBAAY,EAAE,sBAAY,CAAC,CAAC;AAC3C,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
@@ -0,0 +1,91 @@
1
+ export declare const mergeMineIdl: {
2
+ version: string;
3
+ name: string;
4
+ instructions: ({
5
+ name: string;
6
+ accounts: ({
7
+ name: string;
8
+ isMut: boolean;
9
+ isSigner: boolean;
10
+ pda?: undefined;
11
+ } | {
12
+ name: string;
13
+ isMut: boolean;
14
+ isSigner: boolean;
15
+ pda: {
16
+ seeds: ({
17
+ kind: string;
18
+ type: string;
19
+ value: string;
20
+ account?: undefined;
21
+ path?: undefined;
22
+ } | {
23
+ kind: string;
24
+ type: string;
25
+ account: string;
26
+ path: string;
27
+ value?: undefined;
28
+ } | {
29
+ kind: string;
30
+ type: string;
31
+ path: string;
32
+ value?: undefined;
33
+ account?: undefined;
34
+ })[];
35
+ };
36
+ })[];
37
+ args: {
38
+ name: string;
39
+ type: string;
40
+ }[];
41
+ } | {
42
+ name: string;
43
+ accounts: ({
44
+ name: string;
45
+ isMut: boolean;
46
+ isSigner: boolean;
47
+ accounts?: undefined;
48
+ } | {
49
+ name: string;
50
+ accounts: {
51
+ name: string;
52
+ isMut: boolean;
53
+ isSigner: boolean;
54
+ }[];
55
+ isMut?: undefined;
56
+ isSigner?: undefined;
57
+ })[];
58
+ args: {
59
+ name: string;
60
+ type: string;
61
+ }[];
62
+ })[];
63
+ accounts: {
64
+ name: string;
65
+ type: {
66
+ kind: string;
67
+ fields: ({
68
+ name: string;
69
+ type: string;
70
+ } | {
71
+ name: string;
72
+ type: {
73
+ array: (string | number)[];
74
+ };
75
+ })[];
76
+ };
77
+ }[];
78
+ events: {
79
+ name: string;
80
+ fields: {
81
+ name: string;
82
+ type: string;
83
+ index: boolean;
84
+ }[];
85
+ }[];
86
+ errors: {
87
+ code: number;
88
+ name: string;
89
+ msg: string;
90
+ }[];
91
+ };