@crypticdot/defituna-client 3.3.3 → 3.3.4
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.js +32 -4
- package/dist/index.mjs +32 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10845,9 +10845,23 @@ async function modifyTunaSpotPositionOrcaInstructions(rpc, authority, poolAddres
|
|
|
10845
10845
|
hasDirectlyTransferredTokensA = tunaPositionAtaA.data.amount > (tunaPosition.data.positionToken == 0 /* A */ ? tunaPosition.data.amount : 0n);
|
|
10846
10846
|
hasDirectlyTransferredTokensB = tunaPositionAtaB.data.amount > (tunaPosition.data.positionToken == 1 /* B */ ? tunaPosition.data.amount : 0n);
|
|
10847
10847
|
}
|
|
10848
|
-
const createUserAtaAInstructions = collateralToken == 0 /* A */ || hasDirectlyTransferredTokensA ? await getCreateAtaInstructions(
|
|
10848
|
+
const createUserAtaAInstructions = collateralToken == 0 /* A */ || hasDirectlyTransferredTokensA ? await getCreateAtaInstructions(
|
|
10849
|
+
rpc,
|
|
10850
|
+
authority,
|
|
10851
|
+
mintA.address,
|
|
10852
|
+
authority.address,
|
|
10853
|
+
mintA.programAddress,
|
|
10854
|
+
args.collateralAmount
|
|
10855
|
+
) : void 0;
|
|
10849
10856
|
if (createUserAtaAInstructions) createInstructions.push(...createUserAtaAInstructions.init);
|
|
10850
|
-
const createUserAtaBInstructions = collateralToken == 1 /* B */ || hasDirectlyTransferredTokensB ? await getCreateAtaInstructions(
|
|
10857
|
+
const createUserAtaBInstructions = collateralToken == 1 /* B */ || hasDirectlyTransferredTokensB ? await getCreateAtaInstructions(
|
|
10858
|
+
rpc,
|
|
10859
|
+
authority,
|
|
10860
|
+
mintB.address,
|
|
10861
|
+
authority.address,
|
|
10862
|
+
mintB.programAddress,
|
|
10863
|
+
args.collateralAmount
|
|
10864
|
+
) : void 0;
|
|
10851
10865
|
if (createUserAtaBInstructions) createInstructions.push(...createUserAtaBInstructions.init);
|
|
10852
10866
|
const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
|
|
10853
10867
|
rpc,
|
|
@@ -11022,9 +11036,23 @@ async function modifyTunaSpotPositionFusionInstructions(rpc, authority, poolAddr
|
|
|
11022
11036
|
hasDirectlyTransferredTokensA = tunaPositionAtaA.data.amount > (tunaPosition.data.positionToken == 0 /* A */ ? tunaPosition.data.amount : 0n);
|
|
11023
11037
|
hasDirectlyTransferredTokensB = tunaPositionAtaB.data.amount > (tunaPosition.data.positionToken == 1 /* B */ ? tunaPosition.data.amount : 0n);
|
|
11024
11038
|
}
|
|
11025
|
-
const createUserAtaAInstructions = collateralToken == 0 /* A */ || hasDirectlyTransferredTokensA ? await getCreateAtaInstructions(
|
|
11039
|
+
const createUserAtaAInstructions = collateralToken == 0 /* A */ || hasDirectlyTransferredTokensA ? await getCreateAtaInstructions(
|
|
11040
|
+
rpc,
|
|
11041
|
+
authority,
|
|
11042
|
+
mintA.address,
|
|
11043
|
+
authority.address,
|
|
11044
|
+
mintA.programAddress,
|
|
11045
|
+
args.collateralAmount
|
|
11046
|
+
) : void 0;
|
|
11026
11047
|
if (createUserAtaAInstructions) createInstructions.push(...createUserAtaAInstructions.init);
|
|
11027
|
-
const createUserAtaBInstructions = collateralToken == 1 /* B */ || hasDirectlyTransferredTokensB ? await getCreateAtaInstructions(
|
|
11048
|
+
const createUserAtaBInstructions = collateralToken == 1 /* B */ || hasDirectlyTransferredTokensB ? await getCreateAtaInstructions(
|
|
11049
|
+
rpc,
|
|
11050
|
+
authority,
|
|
11051
|
+
mintB.address,
|
|
11052
|
+
authority.address,
|
|
11053
|
+
mintB.programAddress,
|
|
11054
|
+
args.collateralAmount
|
|
11055
|
+
) : void 0;
|
|
11028
11056
|
if (createUserAtaBInstructions) createInstructions.push(...createUserAtaBInstructions.init);
|
|
11029
11057
|
const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
|
|
11030
11058
|
rpc,
|
package/dist/index.mjs
CHANGED
|
@@ -11067,9 +11067,23 @@ async function modifyTunaSpotPositionOrcaInstructions(rpc, authority, poolAddres
|
|
|
11067
11067
|
hasDirectlyTransferredTokensA = tunaPositionAtaA.data.amount > (tunaPosition.data.positionToken == 0 /* A */ ? tunaPosition.data.amount : 0n);
|
|
11068
11068
|
hasDirectlyTransferredTokensB = tunaPositionAtaB.data.amount > (tunaPosition.data.positionToken == 1 /* B */ ? tunaPosition.data.amount : 0n);
|
|
11069
11069
|
}
|
|
11070
|
-
const createUserAtaAInstructions = collateralToken == 0 /* A */ || hasDirectlyTransferredTokensA ? await getCreateAtaInstructions(
|
|
11070
|
+
const createUserAtaAInstructions = collateralToken == 0 /* A */ || hasDirectlyTransferredTokensA ? await getCreateAtaInstructions(
|
|
11071
|
+
rpc,
|
|
11072
|
+
authority,
|
|
11073
|
+
mintA.address,
|
|
11074
|
+
authority.address,
|
|
11075
|
+
mintA.programAddress,
|
|
11076
|
+
args.collateralAmount
|
|
11077
|
+
) : void 0;
|
|
11071
11078
|
if (createUserAtaAInstructions) createInstructions.push(...createUserAtaAInstructions.init);
|
|
11072
|
-
const createUserAtaBInstructions = collateralToken == 1 /* B */ || hasDirectlyTransferredTokensB ? await getCreateAtaInstructions(
|
|
11079
|
+
const createUserAtaBInstructions = collateralToken == 1 /* B */ || hasDirectlyTransferredTokensB ? await getCreateAtaInstructions(
|
|
11080
|
+
rpc,
|
|
11081
|
+
authority,
|
|
11082
|
+
mintB.address,
|
|
11083
|
+
authority.address,
|
|
11084
|
+
mintB.programAddress,
|
|
11085
|
+
args.collateralAmount
|
|
11086
|
+
) : void 0;
|
|
11073
11087
|
if (createUserAtaBInstructions) createInstructions.push(...createUserAtaBInstructions.init);
|
|
11074
11088
|
const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
|
|
11075
11089
|
rpc,
|
|
@@ -11246,9 +11260,23 @@ async function modifyTunaSpotPositionFusionInstructions(rpc, authority, poolAddr
|
|
|
11246
11260
|
hasDirectlyTransferredTokensA = tunaPositionAtaA.data.amount > (tunaPosition.data.positionToken == 0 /* A */ ? tunaPosition.data.amount : 0n);
|
|
11247
11261
|
hasDirectlyTransferredTokensB = tunaPositionAtaB.data.amount > (tunaPosition.data.positionToken == 1 /* B */ ? tunaPosition.data.amount : 0n);
|
|
11248
11262
|
}
|
|
11249
|
-
const createUserAtaAInstructions = collateralToken == 0 /* A */ || hasDirectlyTransferredTokensA ? await getCreateAtaInstructions(
|
|
11263
|
+
const createUserAtaAInstructions = collateralToken == 0 /* A */ || hasDirectlyTransferredTokensA ? await getCreateAtaInstructions(
|
|
11264
|
+
rpc,
|
|
11265
|
+
authority,
|
|
11266
|
+
mintA.address,
|
|
11267
|
+
authority.address,
|
|
11268
|
+
mintA.programAddress,
|
|
11269
|
+
args.collateralAmount
|
|
11270
|
+
) : void 0;
|
|
11250
11271
|
if (createUserAtaAInstructions) createInstructions.push(...createUserAtaAInstructions.init);
|
|
11251
|
-
const createUserAtaBInstructions = collateralToken == 1 /* B */ || hasDirectlyTransferredTokensB ? await getCreateAtaInstructions(
|
|
11272
|
+
const createUserAtaBInstructions = collateralToken == 1 /* B */ || hasDirectlyTransferredTokensB ? await getCreateAtaInstructions(
|
|
11273
|
+
rpc,
|
|
11274
|
+
authority,
|
|
11275
|
+
mintB.address,
|
|
11276
|
+
authority.address,
|
|
11277
|
+
mintB.programAddress,
|
|
11278
|
+
args.collateralAmount
|
|
11279
|
+
) : void 0;
|
|
11252
11280
|
if (createUserAtaBInstructions) createInstructions.push(...createUserAtaBInstructions.init);
|
|
11253
11281
|
const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
|
|
11254
11282
|
rpc,
|
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": "3.3.
|
|
4
|
+
"version": "3.3.4",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
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
|
-
"@crypticdot/defituna-core": "3.3.
|
|
33
|
+
"@crypticdot/defituna-core": "3.3.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@crypticdot/jupiter-solana-client": "^1.0.0",
|