@sonarwatch/portfolio-plugins 0.14.130 → 0.14.131
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.
- package/CHANGELOG.md +2132 -2128
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/debridge/airdropFetcher.js +7 -1
- package/src/plugins/debridge/airdropFetcher.js.map +1 -1
- package/src/plugins/debridge/dlmmVaultsFetcher.js +1 -16
- package/src/plugins/debridge/dlmmVaultsFetcher.js.map +1 -1
- package/src/plugins/lulo/depositsFetcher.js +0 -2
- package/src/plugins/lulo/depositsFetcher.js.map +1 -1
- package/src/plugins/meteora/dlmmPositionsFetcher.js +9 -3
- package/src/plugins/meteora/dlmmPositionsFetcher.js.map +1 -1
- package/src/plugins/meteora/filters.d.ts +0 -2
- package/src/plugins/meteora/filters.js +1 -21
- package/src/plugins/meteora/filters.js.map +1 -1
- package/src/plugins/nxfinance/stakingFetcher.js +2 -2
- package/src/plugins/nxfinance/stakingFetcher.js.map +1 -1
- package/src/plugins/solayer/airdropFetcher.js +8 -3
- package/src/plugins/solayer/airdropFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.js +16 -2
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/utils/solana/beets/ParsedGpa.d.ts +18 -0
- package/src/utils/solana/beets/ParsedGpa.js +49 -0
- package/src/utils/solana/beets/ParsedGpa.js.map +1 -0
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
function getQueryBalanceByOwner(owner) {
|
4
|
-
return JSON.parse(`{
|
5
|
-
"balance": {
|
6
|
-
"address": "${owner}"
|
7
|
-
}
|
4
|
+
return JSON.parse(`{
|
5
|
+
"balance": {
|
6
|
+
"address": "${owner}"
|
7
|
+
}
|
8
8
|
}`);
|
9
9
|
}
|
10
10
|
exports.default = getQueryBalanceByOwner;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
|
2
|
+
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
|
+
import { GpaBuilder } from '@metaplex-foundation/beet-solana';
|
4
|
+
import { Connection, PublicKey } from '@solana/web3.js';
|
5
|
+
import { GlobalBeetStruct, ParsedAccount } from '../types';
|
6
|
+
export declare class ParsedGpa<T> {
|
7
|
+
protected readonly connection: Connection;
|
8
|
+
protected programId: PublicKey;
|
9
|
+
protected beets: GlobalBeetStruct<T>;
|
10
|
+
protected gpaBuilder: GpaBuilder<T>;
|
11
|
+
static build<T>(connection: Connection, beets: GlobalBeetStruct<T>, programId: PublicKey): ParsedGpa<T>;
|
12
|
+
private constructor();
|
13
|
+
addInnerFilter(keys: string, val: T[keyof T] & NonNullable<unknown>): this;
|
14
|
+
addFilter(key: keyof T & string, val: T[keyof T]): this;
|
15
|
+
addDataSizeFilter(size?: number): this;
|
16
|
+
run(): Promise<ParsedAccount<T>[]>;
|
17
|
+
debug(): this;
|
18
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.ParsedGpa = void 0;
|
13
|
+
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
14
|
+
class ParsedGpa {
|
15
|
+
static build(connection, beets, programId) {
|
16
|
+
return new ParsedGpa(connection, programId, beets);
|
17
|
+
}
|
18
|
+
constructor(connection, programId, beets) {
|
19
|
+
this.connection = connection;
|
20
|
+
this.programId = programId;
|
21
|
+
this.beets = beets;
|
22
|
+
this.gpaBuilder = beet_solana_1.GpaBuilder.fromStruct(programId, beets);
|
23
|
+
}
|
24
|
+
addInnerFilter(keys, val) {
|
25
|
+
this.gpaBuilder.addInnerFilter(keys, val);
|
26
|
+
return this;
|
27
|
+
}
|
28
|
+
addFilter(key, val) {
|
29
|
+
this.gpaBuilder.addFilter(key, val);
|
30
|
+
return this;
|
31
|
+
}
|
32
|
+
addDataSizeFilter(size) {
|
33
|
+
this.gpaBuilder.dataSize(!size && 'byteSize' in this.beets ? this.beets.byteSize : size);
|
34
|
+
return this;
|
35
|
+
}
|
36
|
+
run() {
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
38
|
+
const accounts = yield this.gpaBuilder.run(this.connection);
|
39
|
+
return accounts.map((account) => (Object.assign({ pubkey: account.pubkey, lamports: account.account.lamports }, this.beets.deserialize(account.account.data)[0])));
|
40
|
+
});
|
41
|
+
}
|
42
|
+
debug() {
|
43
|
+
console.log(this.programId.toString());
|
44
|
+
console.log(this.gpaBuilder.config.filters);
|
45
|
+
return this;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
exports.ParsedGpa = ParsedGpa;
|
49
|
+
//# sourceMappingURL=ParsedGpa.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ParsedGpa.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/beets/ParsedGpa.ts"],"names":[],"mappings":";;;;;;;;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