@sonarwatch/portfolio-plugins 0.14.53 → 0.14.55
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 +1808 -1800
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/meteora/constants.d.ts +2 -0
- package/src/plugins/meteora/constants.js +3 -1
- package/src/plugins/meteora/constants.js.map +1 -1
- package/src/plugins/meteora/dlmmVaultsFetcher.js +1 -3
- package/src/plugins/meteora/dlmmVaultsFetcher.js.map +1 -1
- package/src/plugins/meteora/filters.d.ts +3 -0
- package/src/plugins/meteora/filters.js +31 -1
- package/src/plugins/meteora/filters.js.map +1 -1
- package/src/plugins/meteora/index.js +4 -0
- package/src/plugins/meteora/index.js.map +1 -1
- package/src/plugins/meteora/stakeForFeeFetcher.d.ts +3 -0
- package/src/plugins/meteora/stakeForFeeFetcher.js +71 -0
- package/src/plugins/meteora/stakeForFeeFetcher.js.map +1 -0
- package/src/plugins/meteora/stakeForFeeVaultsJob.d.ts +3 -0
- package/src/plugins/meteora/stakeForFeeVaultsJob.js +32 -0
- package/src/plugins/meteora/stakeForFeeVaultsJob.js.map +1 -0
- package/src/plugins/meteora/struct.d.ts +38 -0
- package/src/plugins/meteora/struct.js +36 -1
- package/src/plugins/meteora/struct.js.map +1 -1
- package/src/plugins/raydium/ammV2ApiJob.js +4 -5
- package/src/plugins/raydium/ammV2ApiJob.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/wormhole/airdropFetcher.js +11 -18
- package/src/plugins/wormhole/airdropFetcher.js.map +1 -1
- package/src/plugins/wormhole/constants.d.ts +2 -1
- package/src/plugins/wormhole/constants.js +4 -3
- package/src/plugins/wormhole/constants.js.map +1 -1
- package/src/plugins/wormhole/index.js +5 -1
- package/src/plugins/wormhole/index.js.map +1 -1
- package/src/plugins/wormhole/stakingFetcher.d.ts +3 -0
- package/src/plugins/wormhole/stakingFetcher.js +46 -0
- package/src/plugins/wormhole/stakingFetcher.js.map +1 -0
- package/src/plugins/wormhole/structs.d.ts +12 -0
- package/src/plugins/wormhole/structs.js +14 -0
- package/src/plugins/wormhole/structs.js.map +1 -0
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/bitcoin/getBalance.js +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -40,28 +40,28 @@ function getPairKey(version) {
|
|
40
40
|
exports.getPairKey = getPairKey;
|
41
41
|
function getPairsV2FromTheGraph(url, length = 300) {
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
43
|
-
const query = (0, graphql_request_1.gql) `
|
44
|
-
{
|
45
|
-
pairs(
|
46
|
-
orderBy: reserveUSD
|
47
|
-
first: ${length}
|
48
|
-
orderDirection: desc
|
49
|
-
where: { trackedReserveETH_not: "0" }
|
50
|
-
) {
|
51
|
-
id
|
52
|
-
reserve0
|
53
|
-
reserve1
|
54
|
-
totalSupply
|
55
|
-
token0 {
|
56
|
-
id
|
57
|
-
decimals
|
58
|
-
}
|
59
|
-
token1 {
|
60
|
-
id
|
61
|
-
decimals
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
43
|
+
const query = (0, graphql_request_1.gql) `
|
44
|
+
{
|
45
|
+
pairs(
|
46
|
+
orderBy: reserveUSD
|
47
|
+
first: ${length}
|
48
|
+
orderDirection: desc
|
49
|
+
where: { trackedReserveETH_not: "0" }
|
50
|
+
) {
|
51
|
+
id
|
52
|
+
reserve0
|
53
|
+
reserve1
|
54
|
+
totalSupply
|
55
|
+
token0 {
|
56
|
+
id
|
57
|
+
decimals
|
58
|
+
}
|
59
|
+
token1 {
|
60
|
+
id
|
61
|
+
decimals
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
65
|
`;
|
66
66
|
const res = yield (0, graphql_request_1.default)(url, query);
|
67
67
|
const pairs = res.pairs;
|
@@ -8,15 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
9
|
});
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
13
|
const constants_1 = require("./constants");
|
17
14
|
const clients_1 = require("../../utils/clients");
|
18
15
|
const helpers_1 = require("./helpers");
|
19
|
-
const
|
16
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
20
17
|
function getPositionsV2Fetcher(networkId) {
|
21
18
|
const executor = (owner, cache) => __awaiter(this, void 0, void 0, function* () {
|
22
19
|
const allocation = yield (0, helpers_1.getAllocation)(owner, networkId);
|
@@ -26,20 +23,16 @@ function getPositionsV2Fetcher(networkId) {
|
|
26
23
|
const account = yield client.getAccountInfo((0, helpers_1.getAccountPubkey)(owner));
|
27
24
|
if (account)
|
28
25
|
return [];
|
29
|
-
const
|
30
|
-
const
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
},
|
40
|
-
value: asset.value,
|
41
|
-
},
|
42
|
-
];
|
26
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
27
|
+
const element = elementRegistry.addElementMultiple({
|
28
|
+
label: 'Airdrop',
|
29
|
+
});
|
30
|
+
element.addAsset({
|
31
|
+
address: constants_1.wMint,
|
32
|
+
amount: allocation,
|
33
|
+
attributes: { isClaimable: true },
|
34
|
+
});
|
35
|
+
return elementRegistry.getElements(cache);
|
43
36
|
});
|
44
37
|
return {
|
45
38
|
id: `${constants_1.platformId}-airdrop`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/airdropFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAsE;AAGtE,2CAAgD;AAChD,iDAAsD;AACtD,uCAA4D;AAC5D,gFAA6E;AAE7E,SAAwB,qBAAqB,CAC3C,SAAwB;IAExB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;QACtE,MAAM,UAAU,GAAG,MAAM,IAAA,uBAAa,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACzD,IAAI,UAAU,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEhC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,IAAA,0BAAgB,EAAC,KAAK,CAAC,CAAC,CAAC;QAErE,IAAI,OAAO;YAAE,OAAO,EAAE,CAAC;QAEvB,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;QAE1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;YACjD,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QAEH,OAAO,CAAC,QAAQ,CAAC;YACf,OAAO,EAAE,iBAAK;YACd,MAAM,EAAE,UAAU;YAClB,UAAU,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;SAClC,CAAC,CAAC;QAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC,CAAA,CAAC;IAEF,OAAO;QACL,EAAE,EAAE,GAAG,sBAAU,UAAU;QAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,QAAQ;KACT,CAAC;AACJ,CAAC;AAhCD,wCAgCC"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
2
3
|
export declare const platformId = "wormhole";
|
3
4
|
export declare const platform: Platform;
|
4
5
|
export declare const apiUrl = "https://prod-flat-files-min.wormhole.com/";
|
5
6
|
export declare const wMint = "85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ";
|
6
|
-
export declare const
|
7
|
+
export declare const stakingProgramId: PublicKey;
|
@@ -1,15 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.stakingProgramId = exports.wMint = exports.apiUrl = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
4
5
|
exports.platformId = 'wormhole';
|
5
6
|
exports.platform = {
|
6
7
|
id: exports.platformId,
|
7
8
|
name: 'Wormhole',
|
8
9
|
image: 'https://sonar.watch/img/platforms/wormhole.webp',
|
9
|
-
website: 'https://
|
10
|
+
website: 'https://w.wormhole.com/',
|
10
11
|
twitter: 'https://twitter.com/wormhole',
|
11
12
|
};
|
12
13
|
exports.apiUrl = 'https://prod-flat-files-min.wormhole.com/';
|
13
14
|
exports.wMint = '85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ';
|
14
|
-
exports.
|
15
|
+
exports.stakingProgramId = new web3_js_1.PublicKey('sspu65omPW2zJGWDxmx8btqxudHezoQHSGZmnW8jbVz');
|
15
16
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/constants.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,MAAM,GAAG,2CAA2C,CAAC;AACrD,QAAA,KAAK,GAAG,8CAA8C,CAAC;AAEvD,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC"}
|
@@ -1,8 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
4
7
|
const constants_1 = require("./constants");
|
8
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
5
9
|
exports.platforms = [constants_1.platform];
|
6
10
|
exports.jobs = [];
|
7
|
-
exports.fetchers = [];
|
11
|
+
exports.fetchers = [stakingFetcher_1.default];
|
8
12
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
|
@@ -0,0 +1,46 @@
|
|
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
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
14
|
+
const constants_1 = require("./constants");
|
15
|
+
const clients_1 = require("../../utils/clients");
|
16
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
17
|
+
const solana_1 = require("../../utils/solana");
|
18
|
+
const structs_1 = require("./structs");
|
19
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
+
const client = (0, clients_1.getClientSolana)();
|
21
|
+
const tokenBalances = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, structs_1.tokenBalanceStruct, [
|
22
|
+
web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('token_balance'), new web3_js_1.PublicKey(owner).toBytes()], constants_1.stakingProgramId)[0],
|
23
|
+
]);
|
24
|
+
if (!tokenBalances.length)
|
25
|
+
return [];
|
26
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
27
|
+
const element = elementRegistry.addElementMultiple({
|
28
|
+
label: 'Staked',
|
29
|
+
});
|
30
|
+
tokenBalances.forEach((tokenBalance) => {
|
31
|
+
if (!tokenBalance)
|
32
|
+
return;
|
33
|
+
element.addAsset({
|
34
|
+
address: constants_1.wMint,
|
35
|
+
amount: tokenBalance === null || tokenBalance === void 0 ? void 0 : tokenBalance.balance,
|
36
|
+
});
|
37
|
+
});
|
38
|
+
return elementRegistry.getElements(cache);
|
39
|
+
});
|
40
|
+
const fetcher = {
|
41
|
+
id: `${constants_1.platformId}-staking`,
|
42
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
43
|
+
executor,
|
44
|
+
};
|
45
|
+
exports.default = fetcher;
|
46
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAkE;AAClE,iDAAsD;AACtD,gFAA6E;AAC7E,+CAAmE;AACnE,uCAA+C;AAE/C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACvD,MAAM,EACN,4BAAkB,EAClB;QACE,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,EAC9D,4BAAgB,CACjB,CAAC,CAAC,CAAC;KACL,CACF,CAAC;IAEF,IAAI,CAAC,aAAa,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,QAAQ;KAChB,CAAC,CAAC;IAEH,aAAa,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;QACrC,IAAI,CAAC,YAAY;YAAE,OAAO;QAC1B,OAAO,CAAC,QAAQ,CAAC;YACf,OAAO,EAAE,iBAAK;YACd,MAAM,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO;SAC9B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
3
|
+
import BigNumber from 'bignumber.js';
|
4
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
5
|
+
export type TokenBalance = {
|
6
|
+
buffer: Buffer;
|
7
|
+
init: boolean;
|
8
|
+
bump: number;
|
9
|
+
balance: BigNumber;
|
10
|
+
rentPayer: PublicKey;
|
11
|
+
};
|
12
|
+
export declare const tokenBalanceStruct: BeetStruct<TokenBalance, Partial<TokenBalance>>;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.tokenBalanceStruct = void 0;
|
4
|
+
const beet_1 = require("@metaplex-foundation/beet");
|
5
|
+
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
|
+
const solana_1 = require("../../utils/solana");
|
7
|
+
exports.tokenBalanceStruct = new beet_1.BeetStruct([
|
8
|
+
['buffer', (0, solana_1.blob)(8)],
|
9
|
+
['init', beet_1.bool],
|
10
|
+
['bump', beet_1.u8],
|
11
|
+
['balance', solana_1.u64],
|
12
|
+
['rentPayer', beet_solana_1.publicKey],
|
13
|
+
], (args) => args);
|
14
|
+
//# sourceMappingURL=structs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/structs.ts"],"names":[],"mappings":";;;AAEA,oDAAiE;AACjE,kEAA6D;AAC7D,+CAA+C;AAUlC,QAAA,kBAAkB,GAAG,IAAI,iBAAU,CAC9C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,MAAM,EAAE,WAAI,CAAC;IACd,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,WAAW,EAAE,uBAAS,CAAC;CACzB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAoB,CAC/B,CAAC"}
|
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
|
|
42
42
|
const clients_1 = require("../../utils/clients");
|
43
43
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
44
44
|
const helpers_1 = require("./helpers");
|
45
|
-
const query = (0, graphql_request_1.gql) `
|
46
|
-
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
-
getAirdropFinalFrontend(authority: $authority) {
|
48
|
-
authority
|
49
|
-
community_allocation
|
50
|
-
eligibility
|
51
|
-
main_allocation
|
52
|
-
og_allocation
|
53
|
-
s1_allocation
|
54
|
-
s2_allocation
|
55
|
-
total_allocation
|
56
|
-
__typename
|
57
|
-
}
|
58
|
-
}
|
45
|
+
const query = (0, graphql_request_1.gql) `
|
46
|
+
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
+
getAirdropFinalFrontend(authority: $authority) {
|
48
|
+
authority
|
49
|
+
community_allocation
|
50
|
+
eligibility
|
51
|
+
main_allocation
|
52
|
+
og_allocation
|
53
|
+
s1_allocation
|
54
|
+
s2_allocation
|
55
|
+
total_allocation
|
56
|
+
__typename
|
57
|
+
}
|
58
|
+
}
|
59
59
|
`;
|
60
60
|
const networkId = portfolio_core_1.NetworkId.solana;
|
61
61
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -28,7 +28,7 @@ function getBalance(rpcEndpoint, owner) {
|
|
28
28
|
const response = yield axios_1.default.get(`/address/${owner}`, {
|
29
29
|
baseURL: rpcEndpoint.url,
|
30
30
|
auth,
|
31
|
-
timeout:
|
31
|
+
timeout: 22000,
|
32
32
|
});
|
33
33
|
return new bignumber_js_1.default(response.data.chain_stats.funded_txo_sum)
|
34
34
|
.minus(response.data.chain_stats.spent_txo_sum)
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
|
4
|
-
exports.infoQueryMsg = JSON.parse(`{
|
5
|
-
"info": {}
|
4
|
+
exports.infoQueryMsg = JSON.parse(`{
|
5
|
+
"info": {}
|
6
6
|
}`);
|
7
|
-
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
-
"token_info": {}
|
7
|
+
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
+
"token_info": {}
|
9
9
|
}`);
|
10
|
-
exports.minterQueryMsg = JSON.parse(`{
|
11
|
-
"minter": {}
|
10
|
+
exports.minterQueryMsg = JSON.parse(`{
|
11
|
+
"minter": {}
|
12
12
|
}`);
|
13
|
-
exports.poolQueryMsg = JSON.parse(`{
|
14
|
-
"pool": {}
|
13
|
+
exports.poolQueryMsg = JSON.parse(`{
|
14
|
+
"pool": {}
|
15
15
|
}`);
|
16
16
|
//# sourceMappingURL=constants.js.map
|
@@ -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;
|