@spritz-finance/service-client 0.8.1 → 0.8.3
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.
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
export * as CheckbookClient from "./checkbookServiceClient";
|
|
2
2
|
import { RunBatchConfig } from "./types";
|
|
3
|
+
export type CheckbookBatchBalances = {
|
|
4
|
+
totalBatchBalance: number;
|
|
5
|
+
instantBatchBalance: number;
|
|
6
|
+
achBatchBalance: number;
|
|
7
|
+
rtpBatchBalance: number;
|
|
8
|
+
delayedRtpBatchBalance: number;
|
|
9
|
+
};
|
|
3
10
|
export declare function triggerBatch({ config, configs, reserve, currency, }: {
|
|
4
11
|
config?: RunBatchConfig;
|
|
5
12
|
configs?: RunBatchConfig[];
|
|
6
13
|
reserve?: number;
|
|
7
14
|
currency: string;
|
|
8
15
|
}): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<boolean>>;
|
|
9
|
-
export declare function getBatchBalances(): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<
|
|
10
|
-
|
|
11
|
-
instantBatchBalance: number;
|
|
12
|
-
achBatchBalance: number;
|
|
13
|
-
rtpBatchBalance: number;
|
|
14
|
-
delayedRtpBatchBalance: number;
|
|
15
|
-
}>>;
|
|
16
|
+
export declare function getBatchBalances(): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<CheckbookBatchBalances>>;
|
|
17
|
+
export declare function getFundingBatchBalances(): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<CheckbookBatchBalances>>;
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.CheckbookClient = void 0;
|
|
37
37
|
exports.triggerBatch = triggerBatch;
|
|
38
38
|
exports.getBatchBalances = getBatchBalances;
|
|
39
|
+
exports.getFundingBatchBalances = getFundingBatchBalances;
|
|
39
40
|
exports.CheckbookClient = __importStar(require("./checkbookServiceClient"));
|
|
40
41
|
const serviceClient_1 = require("../serviceClient");
|
|
41
42
|
const CHECKBOOK_ENDPOINT = "/liabilities";
|
|
@@ -54,3 +55,8 @@ async function getBatchBalances() {
|
|
|
54
55
|
.get(`${CHECKBOOK_ENDPOINT}/checkbook/batch/balances`)
|
|
55
56
|
.then((res) => res.data);
|
|
56
57
|
}
|
|
58
|
+
async function getFundingBatchBalances() {
|
|
59
|
+
return serviceClient_1.baseClient
|
|
60
|
+
.get(`${CHECKBOOK_ENDPOINT}/checkbook/batch/funding-balances`)
|
|
61
|
+
.then((res) => res.data);
|
|
62
|
+
}
|
package/lib/web3/types.d.ts
CHANGED
|
@@ -106,6 +106,13 @@ export type SolanaPaymentBuildResult = {
|
|
|
106
106
|
addressLookupTableAccounts: SolanaAddressLookupTableAccountData[];
|
|
107
107
|
summary: SolanaPaymentBuildSummary;
|
|
108
108
|
};
|
|
109
|
+
export type KaminoYieldAsset = "USDC";
|
|
110
|
+
export type ListListedKaminoVaultIdsInput = {
|
|
111
|
+
asset?: KaminoYieldAsset;
|
|
112
|
+
};
|
|
113
|
+
export type ListListedKaminoVaultIdsResponse = {
|
|
114
|
+
ids: string[];
|
|
115
|
+
};
|
|
109
116
|
export type UserOpsSigner = {
|
|
110
117
|
id: string;
|
|
111
118
|
userId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * as Web3Client from "./web3ServiceClient";
|
|
2
|
-
import { ExactInQuoteInput, ExactInQuoteResponse, OpsSignerType, Portfolio, SignerUsageType, SolanaPaymentBuildInput, SolanaPaymentBuildResult, TokenBalance, UserOpsSigner, WalletTokenBalanceInput } from "./types";
|
|
2
|
+
import { ExactInQuoteInput, ExactInQuoteResponse, ListListedKaminoVaultIdsInput, ListListedKaminoVaultIdsResponse, OpsSignerType, Portfolio, SignerUsageType, SolanaPaymentBuildInput, SolanaPaymentBuildResult, TokenBalance, UserOpsSigner, WalletTokenBalanceInput } from "./types";
|
|
3
3
|
export declare function getExactInQuote(input: ExactInQuoteInput): Promise<ExactInQuoteResponse>;
|
|
4
4
|
export declare function getTokenBalances(input: WalletTokenBalanceInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<TokenBalance[]>>;
|
|
5
5
|
export declare function getPortfolio(address: string): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<Portfolio>>;
|
|
@@ -18,3 +18,4 @@ export declare function createUserOpsSigner(input: {
|
|
|
18
18
|
userId: string;
|
|
19
19
|
}): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<boolean>>;
|
|
20
20
|
export declare function buildSolanaPayment(input: SolanaPaymentBuildInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<SolanaPaymentBuildResult>>;
|
|
21
|
+
export declare function listListedKaminoVaultIds(input?: ListListedKaminoVaultIdsInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<ListListedKaminoVaultIdsResponse>>;
|
|
@@ -42,6 +42,7 @@ exports.getUserOpsSignerByAddress = getUserOpsSignerByAddress;
|
|
|
42
42
|
exports.getSmartAccountAddress = getSmartAccountAddress;
|
|
43
43
|
exports.createUserOpsSigner = createUserOpsSigner;
|
|
44
44
|
exports.buildSolanaPayment = buildSolanaPayment;
|
|
45
|
+
exports.listListedKaminoVaultIds = listListedKaminoVaultIds;
|
|
45
46
|
exports.Web3Client = __importStar(require("./web3ServiceClient"));
|
|
46
47
|
const serviceClient_1 = require("../serviceClient");
|
|
47
48
|
const WEB3_ENDPOINT = "/web3";
|
|
@@ -86,3 +87,10 @@ async function buildSolanaPayment(input) {
|
|
|
86
87
|
.post(`${WEB3_V2_ENDPOINT}/solana-payment/build`, input)
|
|
87
88
|
.then((res) => res.data);
|
|
88
89
|
}
|
|
90
|
+
async function listListedKaminoVaultIds(input = {}) {
|
|
91
|
+
var _a;
|
|
92
|
+
const asset = (_a = input.asset) !== null && _a !== void 0 ? _a : "USDC";
|
|
93
|
+
return serviceClient_1.baseClient
|
|
94
|
+
.get(`${WEB3_V2_ENDPOINT}/yield/solana/kamino/listed-vault-ids?asset=${asset}`)
|
|
95
|
+
.then((res) => res.data);
|
|
96
|
+
}
|