@crypticdot/defituna-client 2.0.17 → 2.0.19
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/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -2
- package/dist/index.mjs +20 -16
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -2115,12 +2115,14 @@ type CreateVaultInstructionData = {
|
|
|
2115
2115
|
supplyLimit: bigint;
|
|
2116
2116
|
pythOraclePriceUpdate: Address;
|
|
2117
2117
|
pythOracleFeedId: Address;
|
|
2118
|
+
allowUnsafeTokenExtensions: boolean;
|
|
2118
2119
|
};
|
|
2119
2120
|
type CreateVaultInstructionDataArgs = {
|
|
2120
2121
|
interestRate: number | bigint;
|
|
2121
2122
|
supplyLimit: number | bigint;
|
|
2122
2123
|
pythOraclePriceUpdate: Address;
|
|
2123
2124
|
pythOracleFeedId: Address;
|
|
2125
|
+
allowUnsafeTokenExtensions: boolean;
|
|
2124
2126
|
};
|
|
2125
2127
|
declare function getCreateVaultInstructionDataEncoder(): Encoder<CreateVaultInstructionDataArgs>;
|
|
2126
2128
|
declare function getCreateVaultInstructionDataDecoder(): Decoder<CreateVaultInstructionData>;
|
|
@@ -2137,6 +2139,7 @@ type CreateVaultInput<TAccountAuthority extends string = string, TAccountMint ex
|
|
|
2137
2139
|
supplyLimit: CreateVaultInstructionDataArgs['supplyLimit'];
|
|
2138
2140
|
pythOraclePriceUpdate: CreateVaultInstructionDataArgs['pythOraclePriceUpdate'];
|
|
2139
2141
|
pythOracleFeedId: CreateVaultInstructionDataArgs['pythOracleFeedId'];
|
|
2142
|
+
allowUnsafeTokenExtensions: CreateVaultInstructionDataArgs['allowUnsafeTokenExtensions'];
|
|
2140
2143
|
};
|
|
2141
2144
|
declare function getCreateVaultInstruction<TAccountAuthority extends string, TAccountMint extends string, TAccountTunaConfig extends string, TAccountVault extends string, TAccountVaultAta extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof TUNA_PROGRAM_ADDRESS>(input: CreateVaultInput<TAccountAuthority, TAccountMint, TAccountTunaConfig, TAccountVault, TAccountVaultAta, TAccountTokenProgram, TAccountSystemProgram>, config?: {
|
|
2142
2145
|
programAddress?: TProgramAddress;
|
package/dist/index.d.ts
CHANGED
|
@@ -2115,12 +2115,14 @@ type CreateVaultInstructionData = {
|
|
|
2115
2115
|
supplyLimit: bigint;
|
|
2116
2116
|
pythOraclePriceUpdate: Address;
|
|
2117
2117
|
pythOracleFeedId: Address;
|
|
2118
|
+
allowUnsafeTokenExtensions: boolean;
|
|
2118
2119
|
};
|
|
2119
2120
|
type CreateVaultInstructionDataArgs = {
|
|
2120
2121
|
interestRate: number | bigint;
|
|
2121
2122
|
supplyLimit: number | bigint;
|
|
2122
2123
|
pythOraclePriceUpdate: Address;
|
|
2123
2124
|
pythOracleFeedId: Address;
|
|
2125
|
+
allowUnsafeTokenExtensions: boolean;
|
|
2124
2126
|
};
|
|
2125
2127
|
declare function getCreateVaultInstructionDataEncoder(): Encoder<CreateVaultInstructionDataArgs>;
|
|
2126
2128
|
declare function getCreateVaultInstructionDataDecoder(): Decoder<CreateVaultInstructionData>;
|
|
@@ -2137,6 +2139,7 @@ type CreateVaultInput<TAccountAuthority extends string = string, TAccountMint ex
|
|
|
2137
2139
|
supplyLimit: CreateVaultInstructionDataArgs['supplyLimit'];
|
|
2138
2140
|
pythOraclePriceUpdate: CreateVaultInstructionDataArgs['pythOraclePriceUpdate'];
|
|
2139
2141
|
pythOracleFeedId: CreateVaultInstructionDataArgs['pythOracleFeedId'];
|
|
2142
|
+
allowUnsafeTokenExtensions: CreateVaultInstructionDataArgs['allowUnsafeTokenExtensions'];
|
|
2140
2143
|
};
|
|
2141
2144
|
declare function getCreateVaultInstruction<TAccountAuthority extends string, TAccountMint extends string, TAccountTunaConfig extends string, TAccountVault extends string, TAccountVaultAta extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof TUNA_PROGRAM_ADDRESS>(input: CreateVaultInput<TAccountAuthority, TAccountMint, TAccountTunaConfig, TAccountVault, TAccountVaultAta, TAccountTokenProgram, TAccountSystemProgram>, config?: {
|
|
2142
2145
|
programAddress?: TProgramAddress;
|
package/dist/index.js
CHANGED
|
@@ -3377,7 +3377,8 @@ function getCreateVaultInstructionDataEncoder() {
|
|
|
3377
3377
|
["interestRate", (0, import_kit25.getU64Encoder)()],
|
|
3378
3378
|
["supplyLimit", (0, import_kit25.getU64Encoder)()],
|
|
3379
3379
|
["pythOraclePriceUpdate", (0, import_kit25.getAddressEncoder)()],
|
|
3380
|
-
["pythOracleFeedId", (0, import_kit25.getAddressEncoder)()]
|
|
3380
|
+
["pythOracleFeedId", (0, import_kit25.getAddressEncoder)()],
|
|
3381
|
+
["allowUnsafeTokenExtensions", (0, import_kit25.getBooleanEncoder)()]
|
|
3381
3382
|
]),
|
|
3382
3383
|
(value) => ({ ...value, discriminator: CREATE_VAULT_DISCRIMINATOR })
|
|
3383
3384
|
);
|
|
@@ -3388,7 +3389,8 @@ function getCreateVaultInstructionDataDecoder() {
|
|
|
3388
3389
|
["interestRate", (0, import_kit25.getU64Decoder)()],
|
|
3389
3390
|
["supplyLimit", (0, import_kit25.getU64Decoder)()],
|
|
3390
3391
|
["pythOraclePriceUpdate", (0, import_kit25.getAddressDecoder)()],
|
|
3391
|
-
["pythOracleFeedId", (0, import_kit25.getAddressDecoder)()]
|
|
3392
|
+
["pythOracleFeedId", (0, import_kit25.getAddressDecoder)()],
|
|
3393
|
+
["allowUnsafeTokenExtensions", (0, import_kit25.getBooleanDecoder)()]
|
|
3392
3394
|
]);
|
|
3393
3395
|
}
|
|
3394
3396
|
function getCreateVaultInstructionDataCodec() {
|
package/dist/index.mjs
CHANGED
|
@@ -3091,6 +3091,8 @@ import {
|
|
|
3091
3091
|
fixEncoderSize as fixEncoderSize18,
|
|
3092
3092
|
getAddressDecoder as getAddressDecoder8,
|
|
3093
3093
|
getAddressEncoder as getAddressEncoder8,
|
|
3094
|
+
getBooleanDecoder as getBooleanDecoder6,
|
|
3095
|
+
getBooleanEncoder as getBooleanEncoder6,
|
|
3094
3096
|
getBytesDecoder as getBytesDecoder17,
|
|
3095
3097
|
getBytesEncoder as getBytesEncoder18,
|
|
3096
3098
|
getStructDecoder as getStructDecoder19,
|
|
@@ -3121,7 +3123,8 @@ function getCreateVaultInstructionDataEncoder() {
|
|
|
3121
3123
|
["interestRate", getU64Encoder8()],
|
|
3122
3124
|
["supplyLimit", getU64Encoder8()],
|
|
3123
3125
|
["pythOraclePriceUpdate", getAddressEncoder8()],
|
|
3124
|
-
["pythOracleFeedId", getAddressEncoder8()]
|
|
3126
|
+
["pythOracleFeedId", getAddressEncoder8()],
|
|
3127
|
+
["allowUnsafeTokenExtensions", getBooleanEncoder6()]
|
|
3125
3128
|
]),
|
|
3126
3129
|
(value) => ({ ...value, discriminator: CREATE_VAULT_DISCRIMINATOR })
|
|
3127
3130
|
);
|
|
@@ -3132,7 +3135,8 @@ function getCreateVaultInstructionDataDecoder() {
|
|
|
3132
3135
|
["interestRate", getU64Decoder8()],
|
|
3133
3136
|
["supplyLimit", getU64Decoder8()],
|
|
3134
3137
|
["pythOraclePriceUpdate", getAddressDecoder8()],
|
|
3135
|
-
["pythOracleFeedId", getAddressDecoder8()]
|
|
3138
|
+
["pythOracleFeedId", getAddressDecoder8()],
|
|
3139
|
+
["allowUnsafeTokenExtensions", getBooleanDecoder6()]
|
|
3136
3140
|
]);
|
|
3137
3141
|
}
|
|
3138
3142
|
function getCreateVaultInstructionDataCodec() {
|
|
@@ -6339,8 +6343,8 @@ import {
|
|
|
6339
6343
|
combineCodec as combineCodec45,
|
|
6340
6344
|
fixDecoderSize as fixDecoderSize40,
|
|
6341
6345
|
fixEncoderSize as fixEncoderSize41,
|
|
6342
|
-
getBooleanDecoder as
|
|
6343
|
-
getBooleanEncoder as
|
|
6346
|
+
getBooleanDecoder as getBooleanDecoder7,
|
|
6347
|
+
getBooleanEncoder as getBooleanEncoder7,
|
|
6344
6348
|
getBytesDecoder as getBytesDecoder40,
|
|
6345
6349
|
getBytesEncoder as getBytesEncoder41,
|
|
6346
6350
|
getStructDecoder as getStructDecoder42,
|
|
@@ -6366,10 +6370,10 @@ function getSetSuspendedStateInstructionDataEncoder() {
|
|
|
6366
6370
|
return transformEncoder40(
|
|
6367
6371
|
getStructEncoder42([
|
|
6368
6372
|
["discriminator", fixEncoderSize41(getBytesEncoder41(), 8)],
|
|
6369
|
-
["suspendLendingDeposits",
|
|
6370
|
-
["suspendLendingWithdrawals",
|
|
6371
|
-
["suspendAddLiquidity",
|
|
6372
|
-
["suspendRemoveLiquidity",
|
|
6373
|
+
["suspendLendingDeposits", getBooleanEncoder7()],
|
|
6374
|
+
["suspendLendingWithdrawals", getBooleanEncoder7()],
|
|
6375
|
+
["suspendAddLiquidity", getBooleanEncoder7()],
|
|
6376
|
+
["suspendRemoveLiquidity", getBooleanEncoder7()]
|
|
6373
6377
|
]),
|
|
6374
6378
|
(value) => ({ ...value, discriminator: SET_SUSPENDED_STATE_DISCRIMINATOR })
|
|
6375
6379
|
);
|
|
@@ -6377,10 +6381,10 @@ function getSetSuspendedStateInstructionDataEncoder() {
|
|
|
6377
6381
|
function getSetSuspendedStateInstructionDataDecoder() {
|
|
6378
6382
|
return getStructDecoder42([
|
|
6379
6383
|
["discriminator", fixDecoderSize40(getBytesDecoder40(), 8)],
|
|
6380
|
-
["suspendLendingDeposits",
|
|
6381
|
-
["suspendLendingWithdrawals",
|
|
6382
|
-
["suspendAddLiquidity",
|
|
6383
|
-
["suspendRemoveLiquidity",
|
|
6384
|
+
["suspendLendingDeposits", getBooleanDecoder7()],
|
|
6385
|
+
["suspendLendingWithdrawals", getBooleanDecoder7()],
|
|
6386
|
+
["suspendAddLiquidity", getBooleanDecoder7()],
|
|
6387
|
+
["suspendRemoveLiquidity", getBooleanDecoder7()]
|
|
6384
6388
|
]);
|
|
6385
6389
|
}
|
|
6386
6390
|
function getSetSuspendedStateInstructionDataCodec() {
|
|
@@ -6618,8 +6622,8 @@ import {
|
|
|
6618
6622
|
fixEncoderSize as fixEncoderSize44,
|
|
6619
6623
|
getAddressDecoder as getAddressDecoder13,
|
|
6620
6624
|
getAddressEncoder as getAddressEncoder13,
|
|
6621
|
-
getBooleanDecoder as
|
|
6622
|
-
getBooleanEncoder as
|
|
6625
|
+
getBooleanDecoder as getBooleanDecoder8,
|
|
6626
|
+
getBooleanEncoder as getBooleanEncoder8,
|
|
6623
6627
|
getBytesDecoder as getBytesDecoder43,
|
|
6624
6628
|
getBytesEncoder as getBytesEncoder44,
|
|
6625
6629
|
getStructDecoder as getStructDecoder45,
|
|
@@ -6659,7 +6663,7 @@ function getUpdateMarketInstructionDataEncoder() {
|
|
|
6659
6663
|
["liquidationThreshold", getU32Encoder20()],
|
|
6660
6664
|
["limitOrderExecutionFee", getU32Encoder20()],
|
|
6661
6665
|
["oraclePriceDeviationThreshold", getU32Encoder20()],
|
|
6662
|
-
["disabled",
|
|
6666
|
+
["disabled", getBooleanEncoder8()],
|
|
6663
6667
|
["borrowLimitA", getU64Encoder16()],
|
|
6664
6668
|
["borrowLimitB", getU64Encoder16()],
|
|
6665
6669
|
["maxSwapSlippage", getU32Encoder20()],
|
|
@@ -6679,7 +6683,7 @@ function getUpdateMarketInstructionDataDecoder() {
|
|
|
6679
6683
|
["liquidationThreshold", getU32Decoder20()],
|
|
6680
6684
|
["limitOrderExecutionFee", getU32Decoder20()],
|
|
6681
6685
|
["oraclePriceDeviationThreshold", getU32Decoder20()],
|
|
6682
|
-
["disabled",
|
|
6686
|
+
["disabled", getBooleanDecoder8()],
|
|
6683
6687
|
["borrowLimitA", getU64Decoder16()],
|
|
6684
6688
|
["borrowLimitB", getU64Decoder16()],
|
|
6685
6689
|
["maxSwapSlippage", getU32Decoder20()],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crypticdot/defituna-client",
|
|
3
3
|
"description": "Typescript client to interact with DefiTuna's on-chain program.",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.19",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@solana-program/compute-budget": "^0.7.0",
|
|
28
28
|
"@solana-program/system": "^0.7.0",
|
|
29
29
|
"@solana-program/token": "^0.5.1",
|
|
30
|
-
"@solana-program/token-2022": "^0.4.
|
|
30
|
+
"@solana-program/token-2022": "^0.4.2",
|
|
31
31
|
"@solana-program/memo": "^0.7.0",
|
|
32
32
|
"@solana-program/address-lookup-table": "^0.7.0"
|
|
33
33
|
},
|