@zebec-network/zebec-vault-sdk 5.2.0 → 5.2.1
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/dist/constants.d.ts +0 -4
- package/dist/constants.js +1 -11
- package/dist/errors.d.ts +0 -3
- package/dist/errors.js +3 -20
- package/dist/providers.d.ts +2 -2
- package/dist/service.d.ts +1 -1
- package/dist/service.js +19 -20
- package/package.json +50 -50
package/dist/constants.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
export type RpcNetwork = "mainnet-beta" | "devnet";
|
|
2
2
|
export declare const ZEBEC_VAULT_PROGRAM_ID: Record<RpcNetwork, string>;
|
|
3
|
-
export declare const JUPITER_AGGREGATOR_PROGRAM_ID = "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4";
|
|
4
|
-
export declare const CARD_LOOKUP_TABLE_ADDRESS: Record<RpcNetwork, string>;
|
|
5
|
-
export declare const JUPITER_SWAP_API = "https://lite-api.jup.ag/swap/v1/swap";
|
|
6
|
-
export declare const STAKE_LOOKUP_TABLE_ADDRESS: Record<RpcNetwork, string>;
|
package/dist/constants.js
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ZEBEC_VAULT_PROGRAM_ID = void 0;
|
|
4
4
|
exports.ZEBEC_VAULT_PROGRAM_ID = {
|
|
5
5
|
"mainnet-beta": "zVLTdc9GmsZ6zjS6bdSFWh7p3BdiPPyju9y82Cr7Vs3",
|
|
6
6
|
devnet: "zVLTdc9GmsZ6zjS6bdSFWh7p3BdiPPyju9y82Cr7Vs3",
|
|
7
7
|
};
|
|
8
|
-
exports.JUPITER_AGGREGATOR_PROGRAM_ID = "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4";
|
|
9
|
-
exports.CARD_LOOKUP_TABLE_ADDRESS = {
|
|
10
|
-
"mainnet-beta": "9BSK7XgPgAZJK6BEdiFDV8WKGye31uffvGjhQ1Zxob7F",
|
|
11
|
-
devnet: "CgPARkLEbygMJ8C9Z1u6MP57gvdnUERCxdhmR9bTFUSJ",
|
|
12
|
-
};
|
|
13
|
-
exports.JUPITER_SWAP_API = "https://lite-api.jup.ag/swap/v1/swap";
|
|
14
|
-
exports.STAKE_LOOKUP_TABLE_ADDRESS = {
|
|
15
|
-
"mainnet-beta": "EoKjJejKr4XsBdtUuYwzZcYd6tpGNijxCGgQocxtxQ8t",
|
|
16
|
-
devnet: "C4R2sL6yj7bzKfbdfwCfH68DZZ3QnzdmedE9wQqTfAAA",
|
|
17
|
-
};
|
package/dist/errors.d.ts
CHANGED
|
@@ -18,13 +18,10 @@ export declare class InvalidUsdcAddressError extends Error {
|
|
|
18
18
|
}
|
|
19
19
|
export declare class NotEnoughBalanceError extends Error {
|
|
20
20
|
name: string;
|
|
21
|
-
constructor(message: string);
|
|
22
21
|
}
|
|
23
22
|
export declare class QuoteResponseError extends Error {
|
|
24
23
|
name: string;
|
|
25
|
-
constructor(message: string);
|
|
26
24
|
}
|
|
27
25
|
export declare class AssociatedTokenAccountDoesNotExistsError extends Error {
|
|
28
26
|
name: string;
|
|
29
|
-
constructor(message: string);
|
|
30
27
|
}
|
package/dist/errors.js
CHANGED
|
@@ -7,12 +7,7 @@ class AmountOutOfRangeError extends Error {
|
|
|
7
7
|
value;
|
|
8
8
|
name = "AmountOutOfRangeError";
|
|
9
9
|
constructor(minRange, maxRange, value) {
|
|
10
|
-
super(
|
|
11
|
-
value +
|
|
12
|
-
"; Must be within " +
|
|
13
|
-
minRange +
|
|
14
|
-
"-" +
|
|
15
|
-
maxRange);
|
|
10
|
+
super(`Amount out of range: ${value}; Must be within ${minRange}-${maxRange}`);
|
|
16
11
|
this.minRange = minRange;
|
|
17
12
|
this.maxRange = maxRange;
|
|
18
13
|
this.value = value;
|
|
@@ -24,10 +19,7 @@ class DailyCardLimitReachedError extends Error {
|
|
|
24
19
|
requestedAmount;
|
|
25
20
|
name = "DailyCardLimitReachedError";
|
|
26
21
|
constructor(dailyCardLimit, requestedAmount) {
|
|
27
|
-
super(
|
|
28
|
-
dailyCardLimit +
|
|
29
|
-
" Requested: " +
|
|
30
|
-
requestedAmount);
|
|
22
|
+
super(`Daily card limit reached. Limit: ${dailyCardLimit} Requested: ${requestedAmount}`);
|
|
31
23
|
this.dailyCardLimit = dailyCardLimit;
|
|
32
24
|
this.requestedAmount = requestedAmount;
|
|
33
25
|
}
|
|
@@ -37,29 +29,20 @@ class InvalidUsdcAddressError extends Error {
|
|
|
37
29
|
mintAddress;
|
|
38
30
|
name = "InvalidUsdcAddressError";
|
|
39
31
|
constructor(mintAddress) {
|
|
40
|
-
super(
|
|
32
|
+
super(`Invalid USDC address: ${mintAddress}`);
|
|
41
33
|
this.mintAddress = mintAddress;
|
|
42
34
|
}
|
|
43
35
|
}
|
|
44
36
|
exports.InvalidUsdcAddressError = InvalidUsdcAddressError;
|
|
45
37
|
class NotEnoughBalanceError extends Error {
|
|
46
38
|
name = "NotEnoughBalanceError";
|
|
47
|
-
constructor(message) {
|
|
48
|
-
super(message);
|
|
49
|
-
}
|
|
50
39
|
}
|
|
51
40
|
exports.NotEnoughBalanceError = NotEnoughBalanceError;
|
|
52
41
|
class QuoteResponseError extends Error {
|
|
53
42
|
name = "QuoteResponseError";
|
|
54
|
-
constructor(message) {
|
|
55
|
-
super(message);
|
|
56
|
-
}
|
|
57
43
|
}
|
|
58
44
|
exports.QuoteResponseError = QuoteResponseError;
|
|
59
45
|
class AssociatedTokenAccountDoesNotExistsError extends Error {
|
|
60
46
|
name = "AssociatedTokenAccountDoesNotExistsError";
|
|
61
|
-
constructor(message) {
|
|
62
|
-
super(message);
|
|
63
|
-
}
|
|
64
47
|
}
|
|
65
48
|
exports.AssociatedTokenAccountDoesNotExistsError = AssociatedTokenAccountDoesNotExistsError;
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Address, AnchorProvider } from "@coral-xyz/anchor";
|
|
2
|
-
import { ConfirmOptions, Connection, PublicKey, Transaction, VersionedTransaction } from "@solana/web3.js";
|
|
1
|
+
import { type Address, AnchorProvider } from "@coral-xyz/anchor";
|
|
2
|
+
import type { ConfirmOptions, Connection, PublicKey, Transaction, VersionedTransaction } from "@solana/web3.js";
|
|
3
3
|
export declare class ReadonlyProvider {
|
|
4
4
|
readonly connection: Connection;
|
|
5
5
|
readonly walletAddress?: PublicKey;
|
package/dist/service.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { type ZebecCardV2Idl } from "@zebec-network/zebec-card-v2-sdk";
|
|
|
5
5
|
import { type ZebecStakeIdlV1 } from "@zebec-network/zebec-stake-sdk";
|
|
6
6
|
import { type ZebecStreamIdl } from "@zebec-network/zebec-stream-sdk";
|
|
7
7
|
import { type ZebecVaultV1Idl } from "./artifacts";
|
|
8
|
-
import {
|
|
8
|
+
import type { RpcNetwork } from "./constants";
|
|
9
9
|
import type { CancelStreamParams, ChangeStreamReceiverParams, CreateSilverCardInstructionData, CreateSilverCardParams, CreateStreamFromVaultParams, createMultipleStreamFromVaultParams, LoadCarbonCardInstructionData, LoadCarbonCardParams, Numeric, PauseResumeStreamParams, ProposalAction, ProposalInfo, StakeInstructionData, StakeUserNonceInfo, StreamMetadataInfo, SwapAndCreateSilverCardParams, SwapAndLoadCarbonCardParams, TokenFeeRecord, VaultInfo, WithdrawStreamParams } from "./types";
|
|
10
10
|
export declare class ZebecVaultService {
|
|
11
11
|
readonly provider: Provider;
|
package/dist/service.js
CHANGED
|
@@ -15,7 +15,6 @@ const zebec_stream_sdk_1 = require("@zebec-network/zebec-stream-sdk");
|
|
|
15
15
|
const assert_1 = __importDefault(require("assert"));
|
|
16
16
|
const bignumber_js_1 = require("bignumber.js");
|
|
17
17
|
const artifacts_1 = require("./artifacts");
|
|
18
|
-
const constants_1 = require("./constants");
|
|
19
18
|
const errors_1 = require("./errors");
|
|
20
19
|
const pda_1 = require("./pda");
|
|
21
20
|
const utils_1 = require("./utils");
|
|
@@ -652,7 +651,7 @@ class ZebecVaultService {
|
|
|
652
651
|
});
|
|
653
652
|
return acc;
|
|
654
653
|
}, []);
|
|
655
|
-
const lookupTables = await this.connection.getAddressLookupTable((0, anchor_1.translateAddress)(
|
|
654
|
+
const lookupTables = await this.connection.getAddressLookupTable((0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]));
|
|
656
655
|
const lookupTableAccount = lookupTables.value;
|
|
657
656
|
(0, assert_1.default)(lookupTableAccount, "Lookup table account not found");
|
|
658
657
|
const executeProposalDirectIx = await this.getExecuteProposalDirectInstruction(vaultOwner, actions, remainingAccounts);
|
|
@@ -706,7 +705,7 @@ class ZebecVaultService {
|
|
|
706
705
|
});
|
|
707
706
|
return acc;
|
|
708
707
|
}, []);
|
|
709
|
-
const lookupTables = await this.connection.getAddressLookupTable((0, anchor_1.translateAddress)(
|
|
708
|
+
const lookupTables = await this.connection.getAddressLookupTable((0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]));
|
|
710
709
|
const lookupTableAccount = lookupTables.value;
|
|
711
710
|
(0, assert_1.default)(lookupTableAccount, "Lookup table account not found");
|
|
712
711
|
const executeProposalDirectIx = await this.getExecuteProposalDirectInstruction(vaultOwner, actions, remainingAccounts);
|
|
@@ -765,7 +764,7 @@ class ZebecVaultService {
|
|
|
765
764
|
const amountAfterFeeDeduction = amount.minus(amount.times(swapFee.div(100)));
|
|
766
765
|
await this._checkAmountIsWithinProviderRange(cardConfigInfo, amountAfterFeeDeduction);
|
|
767
766
|
await this._checkAmountIsWithinDailyCardLimit(cardConfigInfo, userPurchaseRecord, amountAfterFeeDeduction);
|
|
768
|
-
const { swapTransaction } = await (await fetch(
|
|
767
|
+
const { swapTransaction } = await (await fetch(zebec_card_v2_sdk_1.JUPITER_SWAP_API, {
|
|
769
768
|
method: "POST",
|
|
770
769
|
headers: {
|
|
771
770
|
"Content-Type": "application/json",
|
|
@@ -790,7 +789,7 @@ class ZebecVaultService {
|
|
|
790
789
|
.getAccountInfo(lookup.accountKey)
|
|
791
790
|
.then((res) => {
|
|
792
791
|
if (!res) {
|
|
793
|
-
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(
|
|
792
|
+
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]).toString()}`);
|
|
794
793
|
}
|
|
795
794
|
return res.data;
|
|
796
795
|
});
|
|
@@ -800,15 +799,15 @@ class ZebecVaultService {
|
|
|
800
799
|
});
|
|
801
800
|
}));
|
|
802
801
|
const lookupTableData = await this.connection
|
|
803
|
-
.getAccountInfo((0, anchor_1.translateAddress)(
|
|
802
|
+
.getAccountInfo((0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]))
|
|
804
803
|
.then((res) => {
|
|
805
804
|
if (!res) {
|
|
806
|
-
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(
|
|
805
|
+
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]).toString()}`);
|
|
807
806
|
}
|
|
808
807
|
return res.data;
|
|
809
808
|
});
|
|
810
809
|
addressLookupTableAccounts.push(new web3_js_1.AddressLookupTableAccount({
|
|
811
|
-
key: (0, anchor_1.translateAddress)(
|
|
810
|
+
key: (0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]),
|
|
812
811
|
state: web3_js_1.AddressLookupTableAccount.deserialize(lookupTableData),
|
|
813
812
|
}));
|
|
814
813
|
// console.log("address lookup table:\n", addressLookupTableAccounts);
|
|
@@ -816,9 +815,9 @@ class ZebecVaultService {
|
|
|
816
815
|
const message = web3_js_1.TransactionMessage.decompile(transaction.message, {
|
|
817
816
|
addressLookupTableAccounts: addressLookupTableAccounts,
|
|
818
817
|
});
|
|
819
|
-
const swapInstruction = message.instructions.find((ix) => ix.programId.equals((0, anchor_1.translateAddress)(
|
|
818
|
+
const swapInstruction = message.instructions.find((ix) => ix.programId.equals((0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.JUPITER_AGGREGATOR_PROGRAM_ID)));
|
|
820
819
|
(0, assert_1.default)(swapInstruction, "Swap instruction not found in the transaction message");
|
|
821
|
-
const otherIxs = message.instructions.filter((ix) => !ix.programId.equals((0, anchor_1.translateAddress)(
|
|
820
|
+
const otherIxs = message.instructions.filter((ix) => !ix.programId.equals((0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.JUPITER_AGGREGATOR_PROGRAM_ID)) &&
|
|
822
821
|
!ix.programId.equals(web3_js_1.ComputeBudgetProgram.programId));
|
|
823
822
|
const index = new anchor_1.BN(params.nextCardCounter.toString());
|
|
824
823
|
const swapAndCreateSilverCardIx = await this.getSwapAndCreateSilverCardInstruction(vaultOwner, cardVault, cardVaultAta, revenueVault, revenueVaultAta, inputMint, usdc, vaultSigner, {
|
|
@@ -884,7 +883,7 @@ class ZebecVaultService {
|
|
|
884
883
|
const amountAfterFeeDeduction = amount.minus(amount.times(swapFee.div(100)));
|
|
885
884
|
await this._checkAmountIsWithinProviderRange(cardConfigInfo, amountAfterFeeDeduction);
|
|
886
885
|
await this._checkAmountIsWithinDailyCardLimit(cardConfigInfo, userPurchaseRecord, amountAfterFeeDeduction);
|
|
887
|
-
const { swapTransaction } = await (await fetch(
|
|
886
|
+
const { swapTransaction } = await (await fetch(zebec_card_v2_sdk_1.JUPITER_SWAP_API, {
|
|
888
887
|
method: "POST",
|
|
889
888
|
headers: {
|
|
890
889
|
"Content-Type": "application/json",
|
|
@@ -919,15 +918,15 @@ class ZebecVaultService {
|
|
|
919
918
|
});
|
|
920
919
|
}));
|
|
921
920
|
const lookupTableData = await this.connection
|
|
922
|
-
.getAccountInfo((0, anchor_1.translateAddress)(
|
|
921
|
+
.getAccountInfo((0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]))
|
|
923
922
|
.then((res) => {
|
|
924
923
|
if (!res) {
|
|
925
|
-
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(
|
|
924
|
+
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]).toString()}`);
|
|
926
925
|
}
|
|
927
926
|
return res.data;
|
|
928
927
|
});
|
|
929
928
|
addressLookupTableAccounts.push(new web3_js_1.AddressLookupTableAccount({
|
|
930
|
-
key: (0, anchor_1.translateAddress)(
|
|
929
|
+
key: (0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]),
|
|
931
930
|
state: web3_js_1.AddressLookupTableAccount.deserialize(lookupTableData),
|
|
932
931
|
}));
|
|
933
932
|
// console.log("address lookup table:\n", addressLookupTableAccounts);
|
|
@@ -935,9 +934,9 @@ class ZebecVaultService {
|
|
|
935
934
|
const message = web3_js_1.TransactionMessage.decompile(transaction.message, {
|
|
936
935
|
addressLookupTableAccounts: addressLookupTableAccounts,
|
|
937
936
|
});
|
|
938
|
-
const swapInstruction = message.instructions.find((ix) => ix.programId.equals((0, anchor_1.translateAddress)(
|
|
937
|
+
const swapInstruction = message.instructions.find((ix) => ix.programId.equals((0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.JUPITER_AGGREGATOR_PROGRAM_ID)));
|
|
939
938
|
(0, assert_1.default)(swapInstruction, "Swap instruction not found in the transaction message");
|
|
940
|
-
const otherIxs = message.instructions.filter((ix) => !ix.programId.equals((0, anchor_1.translateAddress)(
|
|
939
|
+
const otherIxs = message.instructions.filter((ix) => !ix.programId.equals((0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.JUPITER_AGGREGATOR_PROGRAM_ID)) &&
|
|
941
940
|
!ix.programId.equals(web3_js_1.ComputeBudgetProgram.programId));
|
|
942
941
|
const index = new anchor_1.BN(params.nextCardCounter.toString());
|
|
943
942
|
const swapAndLoadCarbonCardIx = await this.getSwapAndLoadCarbonCardInstruction(cardVault, cardVaultAta, inputMint, solana_common_1.TOKEN_PROGRAM_ID, usdc, revenueVault, revenueVaultAta, vaultOwner, {
|
|
@@ -1140,7 +1139,7 @@ class ZebecVaultService {
|
|
|
1140
1139
|
.getAccountInfo((0, anchor_1.translateAddress)(lookupTable))
|
|
1141
1140
|
.then((res) => {
|
|
1142
1141
|
if (!res) {
|
|
1143
|
-
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(
|
|
1142
|
+
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]).toString()}`);
|
|
1144
1143
|
}
|
|
1145
1144
|
return res.data;
|
|
1146
1145
|
});
|
|
@@ -1160,7 +1159,7 @@ class ZebecVaultService {
|
|
|
1160
1159
|
.getAccountInfo((0, anchor_1.translateAddress)(lookupTable))
|
|
1161
1160
|
.then((res) => {
|
|
1162
1161
|
if (!res) {
|
|
1163
|
-
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(
|
|
1162
|
+
throw new Error(`Lookup table account not found for key: ${(0, anchor_1.translateAddress)(zebec_card_v2_sdk_1.CARD_LOOKUP_TABLE_ADDRESS[this.network]).toString()}`);
|
|
1164
1163
|
}
|
|
1165
1164
|
return res.data;
|
|
1166
1165
|
});
|
|
@@ -1521,7 +1520,7 @@ class ZebecVaultService {
|
|
|
1521
1520
|
return acc;
|
|
1522
1521
|
}, []);
|
|
1523
1522
|
const ixFinal = await this.getExecuteProposalDirectInstruction(vaultOwner, actions, remainingAccounts);
|
|
1524
|
-
const lookupTables = await this.connection.getAddressLookupTable((0, anchor_1.translateAddress)(
|
|
1523
|
+
const lookupTables = await this.connection.getAddressLookupTable((0, anchor_1.translateAddress)(zebec_stake_sdk_1.STAKE_LOOKUP_TABLE_ADDRESS[this.network]));
|
|
1525
1524
|
const lookupTableAccount = lookupTables.value;
|
|
1526
1525
|
(0, assert_1.default)(lookupTableAccount, "Lookup table account not found");
|
|
1527
1526
|
return this._createTransactionPayload(vaultOwner, [ixFinal], [], [lookupTableAccount]);
|
|
@@ -1564,7 +1563,7 @@ class ZebecVaultService {
|
|
|
1564
1563
|
return acc;
|
|
1565
1564
|
}, []);
|
|
1566
1565
|
const ixFinal = await this.getExecuteProposalDirectInstruction(vaultOwner, actions, remainingAccounts);
|
|
1567
|
-
const lookupTables = await this.connection.getAddressLookupTable((0, anchor_1.translateAddress)(
|
|
1566
|
+
const lookupTables = await this.connection.getAddressLookupTable((0, anchor_1.translateAddress)(zebec_stake_sdk_1.STAKE_LOOKUP_TABLE_ADDRESS[this.network]));
|
|
1568
1567
|
const lookupTableAccount = lookupTables.value;
|
|
1569
1568
|
(0, assert_1.default)(lookupTableAccount, "Lookup table account not found");
|
|
1570
1569
|
return this._createTransactionPayload(vaultOwner, [ixFinal], [], [lookupTableAccount]);
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
2
|
+
"author": "Zebec Network | Ashish Sapkota",
|
|
3
|
+
"dependencies": {
|
|
4
|
+
"@coral-xyz/anchor": "^0.31.1",
|
|
5
|
+
"@solana/spl-token": "^0.4.14",
|
|
6
|
+
"@solana/web3.js": "^1.98.2",
|
|
7
|
+
"@types/bn.js": "^5.2.0",
|
|
8
|
+
"@zebec-network/core-utils": "^1.1.1",
|
|
9
|
+
"@zebec-network/solana-common": "^2.3.1",
|
|
10
|
+
"@zebec-network/zebec-card-v2-sdk": "^2.6.0",
|
|
11
|
+
"@zebec-network/zebec-stake-sdk": "^1.3.0",
|
|
12
|
+
"@zebec-network/zebec-stream-sdk": "^3.1.1",
|
|
13
|
+
"bignumber.js": "^9.3.1",
|
|
14
|
+
"buffer": "^6.0.3"
|
|
15
|
+
},
|
|
16
|
+
"description": "An SDK for zebec vault solana program",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/mocha": "^10.0.10",
|
|
19
|
+
"@types/node": "^24.3.1",
|
|
20
|
+
"dotenv": "^17.2.2",
|
|
21
|
+
"mocha": "^11.7.2",
|
|
22
|
+
"prettier": "^3.6.2",
|
|
23
|
+
"rimraf": "^6.0.1",
|
|
24
|
+
"ts-mocha": "^11.1.0",
|
|
25
|
+
"ts-node": "^10.9.2",
|
|
26
|
+
"typescript": "^5.9.2"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"assets"
|
|
31
|
+
],
|
|
32
|
+
"keywords": [
|
|
33
|
+
"solana",
|
|
34
|
+
"zebec",
|
|
35
|
+
"zebec network",
|
|
36
|
+
"vualt",
|
|
37
|
+
"zebec vault"
|
|
38
|
+
],
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"main": "dist/index.js",
|
|
41
|
+
"name": "@zebec-network/zebec-vault-sdk",
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "npm run clean && tsc",
|
|
44
|
+
"clean": "rimraf ./dist",
|
|
45
|
+
"format": "npx @biomejs/biome format --write ",
|
|
46
|
+
"test": "ts-mocha -p ./tsconfig.json -t 1000000000 test/**/*.test.ts",
|
|
47
|
+
"test:single": "ts-mocha -p ./tsconfig.json -t 1000000000"
|
|
48
|
+
},
|
|
49
|
+
"types": "dist/index.d.ts",
|
|
50
|
+
"version": "5.2.1"
|
|
51
|
+
}
|