@reflectmoney/stable.ts 2.8.4 → 2.9.0
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/helpers/drift/accounts/index.d.ts +10 -0
- package/dist/helpers/drift/accounts/index.js +26 -0
- package/dist/helpers/drift/accounts/spotMarket.d.ts +541 -0
- package/dist/helpers/drift/accounts/spotMarket.js +213 -0
- package/dist/helpers/drift/accounts/user.d.ts +193 -0
- package/dist/helpers/drift/accounts/user.js +147 -0
- package/dist/helpers/drift/accounts/userStats.d.ts +165 -0
- package/dist/helpers/drift/accounts/userStats.js +137 -0
- package/dist/helpers/drift/index.d.ts +10 -0
- package/dist/helpers/drift/index.js +26 -0
- package/dist/helpers/drift/mappers.d.ts +14 -0
- package/dist/helpers/drift/mappers.js +137 -0
- package/dist/helpers/drift/types/aMM.d.ts +656 -0
- package/dist/helpers/drift/types/aMM.js +199 -0
- package/dist/helpers/drift/types/addAmmConstituentMappingDatum.d.ts +21 -0
- package/dist/helpers/drift/types/addAmmConstituentMappingDatum.js +30 -0
- package/dist/helpers/drift/types/ammCacheFixed.d.ts +17 -0
- package/dist/helpers/drift/types/ammCacheFixed.js +30 -0
- package/dist/helpers/drift/types/ammConstituentDatum.d.ts +27 -0
- package/dist/helpers/drift/types/ammConstituentDatum.js +34 -0
- package/dist/helpers/drift/types/ammConstituentMappingFixed.d.ts +18 -0
- package/dist/helpers/drift/types/ammConstituentMappingFixed.js +32 -0
- package/dist/helpers/drift/types/assetTier.d.ts +19 -0
- package/dist/helpers/drift/types/assetTier.js +31 -0
- package/dist/helpers/drift/types/assetType.d.ts +16 -0
- package/dist/helpers/drift/types/assetType.js +28 -0
- package/dist/helpers/drift/types/builderInfo.d.ts +17 -0
- package/dist/helpers/drift/types/builderInfo.js +30 -0
- package/dist/helpers/drift/types/cacheInfo.d.ts +59 -0
- package/dist/helpers/drift/types/cacheInfo.js +66 -0
- package/dist/helpers/drift/types/constituentCorrelationsFixed.d.ts +19 -0
- package/dist/helpers/drift/types/constituentCorrelationsFixed.js +32 -0
- package/dist/helpers/drift/types/constituentLpOperation.d.ts +17 -0
- package/dist/helpers/drift/types/constituentLpOperation.js +29 -0
- package/dist/helpers/drift/types/constituentSpotBalance.d.ts +48 -0
- package/dist/helpers/drift/types/constituentSpotBalance.js +35 -0
- package/dist/helpers/drift/types/constituentStatus.d.ts +16 -0
- package/dist/helpers/drift/types/constituentStatus.js +28 -0
- package/dist/helpers/drift/types/constituentTargetBaseFixed.d.ts +19 -0
- package/dist/helpers/drift/types/constituentTargetBaseFixed.js +32 -0
- package/dist/helpers/drift/types/contractTier.d.ts +20 -0
- package/dist/helpers/drift/types/contractTier.js +32 -0
- package/dist/helpers/drift/types/contractType.d.ts +17 -0
- package/dist/helpers/drift/types/contractType.js +29 -0
- package/dist/helpers/drift/types/depositDirection.d.ts +16 -0
- package/dist/helpers/drift/types/depositDirection.js +28 -0
- package/dist/helpers/drift/types/depositExplanation.d.ts +19 -0
- package/dist/helpers/drift/types/depositExplanation.js +31 -0
- package/dist/helpers/drift/types/driftAction.d.ts +29 -0
- package/dist/helpers/drift/types/driftAction.js +41 -0
- package/dist/helpers/drift/types/exchangeStatus.d.ts +22 -0
- package/dist/helpers/drift/types/exchangeStatus.js +34 -0
- package/dist/helpers/drift/types/featureBitFlags.d.ts +18 -0
- package/dist/helpers/drift/types/featureBitFlags.js +30 -0
- package/dist/helpers/drift/types/feeStructure.d.ts +24 -0
- package/dist/helpers/drift/types/feeStructure.js +33 -0
- package/dist/helpers/drift/types/feeTier.d.ts +22 -0
- package/dist/helpers/drift/types/feeTier.js +40 -0
- package/dist/helpers/drift/types/fillMode.d.ts +29 -0
- package/dist/helpers/drift/types/fillMode.js +52 -0
- package/dist/helpers/drift/types/fuelOverflowStatus.d.ts +15 -0
- package/dist/helpers/drift/types/fuelOverflowStatus.js +27 -0
- package/dist/helpers/drift/types/historicalIndexData.d.ts +35 -0
- package/dist/helpers/drift/types/historicalIndexData.js +34 -0
- package/dist/helpers/drift/types/historicalOracleData.d.ts +39 -0
- package/dist/helpers/drift/types/historicalOracleData.js +36 -0
- package/dist/helpers/drift/types/ifRebalanceConfigParams.d.ts +31 -0
- package/dist/helpers/drift/types/ifRebalanceConfigParams.js +40 -0
- package/dist/helpers/drift/types/index.d.ts +114 -0
- package/dist/helpers/drift/types/index.js +130 -0
- package/dist/helpers/drift/types/insuranceClaim.d.ts +63 -0
- package/dist/helpers/drift/types/insuranceClaim.js +34 -0
- package/dist/helpers/drift/types/insuranceFund.d.ts +33 -0
- package/dist/helpers/drift/types/insuranceFund.js +42 -0
- package/dist/helpers/drift/types/insuranceFundOperation.d.ts +18 -0
- package/dist/helpers/drift/types/insuranceFundOperation.js +30 -0
- package/dist/helpers/drift/types/lPAction.d.ts +18 -0
- package/dist/helpers/drift/types/lPAction.js +30 -0
- package/dist/helpers/drift/types/liquidateBorrowForPerpPnlRecord.d.ts +27 -0
- package/dist/helpers/drift/types/liquidateBorrowForPerpPnlRecord.js +36 -0
- package/dist/helpers/drift/types/liquidatePerpPnlForDepositRecord.d.ts +27 -0
- package/dist/helpers/drift/types/liquidatePerpPnlForDepositRecord.js +36 -0
- package/dist/helpers/drift/types/liquidatePerpRecord.d.ts +41 -0
- package/dist/helpers/drift/types/liquidatePerpRecord.js +44 -0
- package/dist/helpers/drift/types/liquidateSpotRecord.d.ts +33 -0
- package/dist/helpers/drift/types/liquidateSpotRecord.js +38 -0
- package/dist/helpers/drift/types/liquidationBitFlag.d.ts +15 -0
- package/dist/helpers/drift/types/liquidationBitFlag.js +27 -0
- package/dist/helpers/drift/types/liquidationMultiplierType.d.ts +16 -0
- package/dist/helpers/drift/types/liquidationMultiplierType.js +28 -0
- package/dist/helpers/drift/types/liquidationType.d.ts +20 -0
- package/dist/helpers/drift/types/liquidationType.js +32 -0
- package/dist/helpers/drift/types/logMode.d.ts +19 -0
- package/dist/helpers/drift/types/logMode.js +31 -0
- package/dist/helpers/drift/types/lpPoolFeatureBitFlags.d.ts +17 -0
- package/dist/helpers/drift/types/lpPoolFeatureBitFlags.js +29 -0
- package/dist/helpers/drift/types/lpStatus.d.ts +17 -0
- package/dist/helpers/drift/types/lpStatus.js +29 -0
- package/dist/helpers/drift/types/marginCalculationMode.d.ts +29 -0
- package/dist/helpers/drift/types/marginCalculationMode.js +55 -0
- package/dist/helpers/drift/types/marginMode.d.ts +17 -0
- package/dist/helpers/drift/types/marginMode.js +29 -0
- package/dist/helpers/drift/types/marginRequirementType.d.ts +17 -0
- package/dist/helpers/drift/types/marginRequirementType.js +29 -0
- package/dist/helpers/drift/types/marketIdentifier.d.ts +20 -0
- package/dist/helpers/drift/types/marketIdentifier.js +29 -0
- package/dist/helpers/drift/types/marketStatus.d.ts +23 -0
- package/dist/helpers/drift/types/marketStatus.js +35 -0
- package/dist/helpers/drift/types/marketType.d.ts +16 -0
- package/dist/helpers/drift/types/marketType.js +28 -0
- package/dist/helpers/drift/types/modifyOrderId.d.ts +24 -0
- package/dist/helpers/drift/types/modifyOrderId.js +50 -0
- package/dist/helpers/drift/types/modifyOrderParams.d.ts +44 -0
- package/dist/helpers/drift/types/modifyOrderParams.js +53 -0
- package/dist/helpers/drift/types/modifyOrderPolicy.d.ts +16 -0
- package/dist/helpers/drift/types/modifyOrderPolicy.js +28 -0
- package/dist/helpers/drift/types/oracleGuardRails.d.ts +20 -0
- package/dist/helpers/drift/types/oracleGuardRails.js +29 -0
- package/dist/helpers/drift/types/oracleSource.d.ts +30 -0
- package/dist/helpers/drift/types/oracleSource.js +42 -0
- package/dist/helpers/drift/types/oracleValidity.d.ts +39 -0
- package/dist/helpers/drift/types/oracleValidity.js +60 -0
- package/dist/helpers/drift/types/order.d.ts +178 -0
- package/dist/helpers/drift/types/order.js +77 -0
- package/dist/helpers/drift/types/orderAction.d.ts +19 -0
- package/dist/helpers/drift/types/orderAction.js +31 -0
- package/dist/helpers/drift/types/orderActionExplanation.d.ts +35 -0
- package/dist/helpers/drift/types/orderActionExplanation.js +47 -0
- package/dist/helpers/drift/types/orderBitFlag.d.ts +20 -0
- package/dist/helpers/drift/types/orderBitFlag.js +32 -0
- package/dist/helpers/drift/types/orderFillerRewardStructure.d.ts +21 -0
- package/dist/helpers/drift/types/orderFillerRewardStructure.js +30 -0
- package/dist/helpers/drift/types/orderParams.d.ts +50 -0
- package/dist/helpers/drift/types/orderParams.js +59 -0
- package/dist/helpers/drift/types/orderParamsBitFlag.d.ts +16 -0
- package/dist/helpers/drift/types/orderParamsBitFlag.js +28 -0
- package/dist/helpers/drift/types/orderStatus.d.ts +18 -0
- package/dist/helpers/drift/types/orderStatus.js +30 -0
- package/dist/helpers/drift/types/orderTriggerCondition.d.ts +18 -0
- package/dist/helpers/drift/types/orderTriggerCondition.js +30 -0
- package/dist/helpers/drift/types/orderType.d.ts +19 -0
- package/dist/helpers/drift/types/orderType.js +31 -0
- package/dist/helpers/drift/types/perpBankruptcyRecord.d.ts +27 -0
- package/dist/helpers/drift/types/perpBankruptcyRecord.js +36 -0
- package/dist/helpers/drift/types/perpFulfillmentMethod.d.ts +30 -0
- package/dist/helpers/drift/types/perpFulfillmentMethod.js +72 -0
- package/dist/helpers/drift/types/perpLpOperation.d.ts +16 -0
- package/dist/helpers/drift/types/perpLpOperation.js +28 -0
- package/dist/helpers/drift/types/perpOperation.d.ts +22 -0
- package/dist/helpers/drift/types/perpOperation.js +34 -0
- package/dist/helpers/drift/types/perpPosition.d.ts +149 -0
- package/dist/helpers/drift/types/perpPosition.js +56 -0
- package/dist/helpers/drift/types/placeAndTakeOrderSuccessCondition.d.ts +16 -0
- package/dist/helpers/drift/types/placeAndTakeOrderSuccessCondition.js +28 -0
- package/dist/helpers/drift/types/poolBalance.d.ts +33 -0
- package/dist/helpers/drift/types/poolBalance.js +30 -0
- package/dist/helpers/drift/types/positionDirection.d.ts +16 -0
- package/dist/helpers/drift/types/positionDirection.js +28 -0
- package/dist/helpers/drift/types/positionFlag.d.ts +17 -0
- package/dist/helpers/drift/types/positionFlag.js +29 -0
- package/dist/helpers/drift/types/positionUpdateType.d.ts +19 -0
- package/dist/helpers/drift/types/positionUpdateType.js +31 -0
- package/dist/helpers/drift/types/postOnlyParam.d.ts +18 -0
- package/dist/helpers/drift/types/postOnlyParam.js +30 -0
- package/dist/helpers/drift/types/prelaunchOracleParams.d.ts +21 -0
- package/dist/helpers/drift/types/prelaunchOracleParams.js +30 -0
- package/dist/helpers/drift/types/priceDivergenceGuardRails.d.ts +19 -0
- package/dist/helpers/drift/types/priceDivergenceGuardRails.js +28 -0
- package/dist/helpers/drift/types/referrerStatus.d.ts +17 -0
- package/dist/helpers/drift/types/referrerStatus.js +29 -0
- package/dist/helpers/drift/types/revenueShareEscrowFixed.d.ts +21 -0
- package/dist/helpers/drift/types/revenueShareEscrowFixed.js +38 -0
- package/dist/helpers/drift/types/revenueShareOrder.d.ts +80 -0
- package/dist/helpers/drift/types/revenueShareOrder.js +45 -0
- package/dist/helpers/drift/types/revenueShareOrderBitFlag.d.ts +18 -0
- package/dist/helpers/drift/types/revenueShareOrderBitFlag.js +30 -0
- package/dist/helpers/drift/types/settlePnlExplanation.d.ts +16 -0
- package/dist/helpers/drift/types/settlePnlExplanation.js +28 -0
- package/dist/helpers/drift/types/settlePnlMode.d.ts +16 -0
- package/dist/helpers/drift/types/settlePnlMode.js +28 -0
- package/dist/helpers/drift/types/settlementDirection.d.ts +17 -0
- package/dist/helpers/drift/types/settlementDirection.js +29 -0
- package/dist/helpers/drift/types/signatureVerificationError.d.ts +26 -0
- package/dist/helpers/drift/types/signatureVerificationError.js +38 -0
- package/dist/helpers/drift/types/signedMsgOrderId.d.ts +23 -0
- package/dist/helpers/drift/types/signedMsgOrderId.js +32 -0
- package/dist/helpers/drift/types/signedMsgOrderParamsDelegateMessage.d.ts +36 -0
- package/dist/helpers/drift/types/signedMsgOrderParamsDelegateMessage.js +57 -0
- package/dist/helpers/drift/types/signedMsgOrderParamsMessage.d.ts +36 -0
- package/dist/helpers/drift/types/signedMsgOrderParamsMessage.js +57 -0
- package/dist/helpers/drift/types/signedMsgTriggerOrderParams.d.ts +19 -0
- package/dist/helpers/drift/types/signedMsgTriggerOrderParams.js +28 -0
- package/dist/helpers/drift/types/signedMsgUserOrdersFixed.d.ts +17 -0
- package/dist/helpers/drift/types/signedMsgUserOrdersFixed.js +30 -0
- package/dist/helpers/drift/types/spotBalanceType.d.ts +16 -0
- package/dist/helpers/drift/types/spotBalanceType.js +28 -0
- package/dist/helpers/drift/types/spotBankruptcyRecord.d.ts +23 -0
- package/dist/helpers/drift/types/spotBankruptcyRecord.js +32 -0
- package/dist/helpers/drift/types/spotFulfillmentConfigStatus.d.ts +16 -0
- package/dist/helpers/drift/types/spotFulfillmentConfigStatus.js +28 -0
- package/dist/helpers/drift/types/spotFulfillmentMethod.d.ts +23 -0
- package/dist/helpers/drift/types/spotFulfillmentMethod.js +48 -0
- package/dist/helpers/drift/types/spotFulfillmentType.d.ts +18 -0
- package/dist/helpers/drift/types/spotFulfillmentType.js +30 -0
- package/dist/helpers/drift/types/spotOperation.d.ts +19 -0
- package/dist/helpers/drift/types/spotOperation.js +31 -0
- package/dist/helpers/drift/types/spotPosition.d.ts +72 -0
- package/dist/helpers/drift/types/spotPosition.js +41 -0
- package/dist/helpers/drift/types/stakeAction.d.ts +21 -0
- package/dist/helpers/drift/types/stakeAction.js +33 -0
- package/dist/helpers/drift/types/swapDirection.d.ts +16 -0
- package/dist/helpers/drift/types/swapDirection.js +28 -0
- package/dist/helpers/drift/types/swapReduceOnly.d.ts +16 -0
- package/dist/helpers/drift/types/swapReduceOnly.js +28 -0
- package/dist/helpers/drift/types/targetsDatum.d.ts +25 -0
- package/dist/helpers/drift/types/targetsDatum.js +34 -0
- package/dist/helpers/drift/types/tokenProgramFlag.d.ts +16 -0
- package/dist/helpers/drift/types/tokenProgramFlag.js +28 -0
- package/dist/helpers/drift/types/twapPeriod.d.ts +16 -0
- package/dist/helpers/drift/types/twapPeriod.js +28 -0
- package/dist/helpers/drift/types/userFees.d.ts +75 -0
- package/dist/helpers/drift/types/userFees.js +36 -0
- package/dist/helpers/drift/types/userStatsPausedOperations.d.ts +17 -0
- package/dist/helpers/drift/types/userStatsPausedOperations.js +29 -0
- package/dist/helpers/drift/types/userStatus.d.ts +19 -0
- package/dist/helpers/drift/types/userStatus.js +31 -0
- package/dist/helpers/drift/types/validityGuardRails.d.ts +23 -0
- package/dist/helpers/drift/types/validityGuardRails.js +32 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.js +17 -0
- package/dist/stablecoins/UsdcPlusStablecoin.d.ts +2 -1
- package/dist/stablecoins/UsdcPlusStablecoin.js +19 -23
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export type SpotBankruptcyRecord = {
|
|
10
|
+
marketIndex: number;
|
|
11
|
+
borrowAmount: bigint;
|
|
12
|
+
ifPayment: bigint;
|
|
13
|
+
cumulativeDepositInterestDelta: bigint;
|
|
14
|
+
};
|
|
15
|
+
export type SpotBankruptcyRecordArgs = {
|
|
16
|
+
marketIndex: number;
|
|
17
|
+
borrowAmount: number | bigint;
|
|
18
|
+
ifPayment: number | bigint;
|
|
19
|
+
cumulativeDepositInterestDelta: number | bigint;
|
|
20
|
+
};
|
|
21
|
+
export declare function getSpotBankruptcyRecordEncoder(): FixedSizeEncoder<SpotBankruptcyRecordArgs>;
|
|
22
|
+
export declare function getSpotBankruptcyRecordDecoder(): FixedSizeDecoder<SpotBankruptcyRecord>;
|
|
23
|
+
export declare function getSpotBankruptcyRecordCodec(): FixedSizeCodec<SpotBankruptcyRecordArgs, SpotBankruptcyRecord>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getSpotBankruptcyRecordEncoder = getSpotBankruptcyRecordEncoder;
|
|
11
|
+
exports.getSpotBankruptcyRecordDecoder = getSpotBankruptcyRecordDecoder;
|
|
12
|
+
exports.getSpotBankruptcyRecordCodec = getSpotBankruptcyRecordCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getSpotBankruptcyRecordEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
["marketIndex", (0, kit_1.getU16Encoder)()],
|
|
17
|
+
["borrowAmount", (0, kit_1.getU128Encoder)()],
|
|
18
|
+
["ifPayment", (0, kit_1.getU128Encoder)()],
|
|
19
|
+
["cumulativeDepositInterestDelta", (0, kit_1.getU128Encoder)()],
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
function getSpotBankruptcyRecordDecoder() {
|
|
23
|
+
return (0, kit_1.getStructDecoder)([
|
|
24
|
+
["marketIndex", (0, kit_1.getU16Decoder)()],
|
|
25
|
+
["borrowAmount", (0, kit_1.getU128Decoder)()],
|
|
26
|
+
["ifPayment", (0, kit_1.getU128Decoder)()],
|
|
27
|
+
["cumulativeDepositInterestDelta", (0, kit_1.getU128Decoder)()],
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
function getSpotBankruptcyRecordCodec() {
|
|
31
|
+
return (0, kit_1.combineCodec)(getSpotBankruptcyRecordEncoder(), getSpotBankruptcyRecordDecoder());
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export declare enum SpotFulfillmentConfigStatus {
|
|
10
|
+
Enabled = 0,
|
|
11
|
+
Disabled = 1
|
|
12
|
+
}
|
|
13
|
+
export type SpotFulfillmentConfigStatusArgs = SpotFulfillmentConfigStatus;
|
|
14
|
+
export declare function getSpotFulfillmentConfigStatusEncoder(): FixedSizeEncoder<SpotFulfillmentConfigStatusArgs>;
|
|
15
|
+
export declare function getSpotFulfillmentConfigStatusDecoder(): FixedSizeDecoder<SpotFulfillmentConfigStatus>;
|
|
16
|
+
export declare function getSpotFulfillmentConfigStatusCodec(): FixedSizeCodec<SpotFulfillmentConfigStatusArgs, SpotFulfillmentConfigStatus>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SpotFulfillmentConfigStatus = void 0;
|
|
11
|
+
exports.getSpotFulfillmentConfigStatusEncoder = getSpotFulfillmentConfigStatusEncoder;
|
|
12
|
+
exports.getSpotFulfillmentConfigStatusDecoder = getSpotFulfillmentConfigStatusDecoder;
|
|
13
|
+
exports.getSpotFulfillmentConfigStatusCodec = getSpotFulfillmentConfigStatusCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var SpotFulfillmentConfigStatus;
|
|
16
|
+
(function (SpotFulfillmentConfigStatus) {
|
|
17
|
+
SpotFulfillmentConfigStatus[SpotFulfillmentConfigStatus["Enabled"] = 0] = "Enabled";
|
|
18
|
+
SpotFulfillmentConfigStatus[SpotFulfillmentConfigStatus["Disabled"] = 1] = "Disabled";
|
|
19
|
+
})(SpotFulfillmentConfigStatus || (exports.SpotFulfillmentConfigStatus = SpotFulfillmentConfigStatus = {}));
|
|
20
|
+
function getSpotFulfillmentConfigStatusEncoder() {
|
|
21
|
+
return (0, kit_1.getEnumEncoder)(SpotFulfillmentConfigStatus);
|
|
22
|
+
}
|
|
23
|
+
function getSpotFulfillmentConfigStatusDecoder() {
|
|
24
|
+
return (0, kit_1.getEnumDecoder)(SpotFulfillmentConfigStatus);
|
|
25
|
+
}
|
|
26
|
+
function getSpotFulfillmentConfigStatusCodec() {
|
|
27
|
+
return (0, kit_1.combineCodec)(getSpotFulfillmentConfigStatusEncoder(), getSpotFulfillmentConfigStatusDecoder());
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type Address, type Codec, type Decoder, type Encoder, type GetDiscriminatedUnionVariant, type GetDiscriminatedUnionVariantContent } from "@solana/kit";
|
|
9
|
+
export type SpotFulfillmentMethod = {
|
|
10
|
+
__kind: "ExternalMarket";
|
|
11
|
+
} | {
|
|
12
|
+
__kind: "Match";
|
|
13
|
+
fields: readonly [Address, number];
|
|
14
|
+
};
|
|
15
|
+
export type SpotFulfillmentMethodArgs = SpotFulfillmentMethod;
|
|
16
|
+
export declare function getSpotFulfillmentMethodEncoder(): Encoder<SpotFulfillmentMethodArgs>;
|
|
17
|
+
export declare function getSpotFulfillmentMethodDecoder(): Decoder<SpotFulfillmentMethod>;
|
|
18
|
+
export declare function getSpotFulfillmentMethodCodec(): Codec<SpotFulfillmentMethodArgs, SpotFulfillmentMethod>;
|
|
19
|
+
export declare function spotFulfillmentMethod(kind: "ExternalMarket"): GetDiscriminatedUnionVariant<SpotFulfillmentMethodArgs, "__kind", "ExternalMarket">;
|
|
20
|
+
export declare function spotFulfillmentMethod(kind: "Match", data: GetDiscriminatedUnionVariantContent<SpotFulfillmentMethodArgs, "__kind", "Match">["fields"]): GetDiscriminatedUnionVariant<SpotFulfillmentMethodArgs, "__kind", "Match">;
|
|
21
|
+
export declare function isSpotFulfillmentMethod<K extends SpotFulfillmentMethod["__kind"]>(kind: K, value: SpotFulfillmentMethod): value is SpotFulfillmentMethod & {
|
|
22
|
+
__kind: K;
|
|
23
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getSpotFulfillmentMethodEncoder = getSpotFulfillmentMethodEncoder;
|
|
11
|
+
exports.getSpotFulfillmentMethodDecoder = getSpotFulfillmentMethodDecoder;
|
|
12
|
+
exports.getSpotFulfillmentMethodCodec = getSpotFulfillmentMethodCodec;
|
|
13
|
+
exports.spotFulfillmentMethod = spotFulfillmentMethod;
|
|
14
|
+
exports.isSpotFulfillmentMethod = isSpotFulfillmentMethod;
|
|
15
|
+
const kit_1 = require("@solana/kit");
|
|
16
|
+
function getSpotFulfillmentMethodEncoder() {
|
|
17
|
+
return (0, kit_1.getDiscriminatedUnionEncoder)([
|
|
18
|
+
["ExternalMarket", (0, kit_1.getUnitEncoder)()],
|
|
19
|
+
[
|
|
20
|
+
"Match",
|
|
21
|
+
(0, kit_1.getStructEncoder)([
|
|
22
|
+
["fields", (0, kit_1.getTupleEncoder)([(0, kit_1.getAddressEncoder)(), (0, kit_1.getU16Encoder)()])],
|
|
23
|
+
]),
|
|
24
|
+
],
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
function getSpotFulfillmentMethodDecoder() {
|
|
28
|
+
return (0, kit_1.getDiscriminatedUnionDecoder)([
|
|
29
|
+
["ExternalMarket", (0, kit_1.getUnitDecoder)()],
|
|
30
|
+
[
|
|
31
|
+
"Match",
|
|
32
|
+
(0, kit_1.getStructDecoder)([
|
|
33
|
+
["fields", (0, kit_1.getTupleDecoder)([(0, kit_1.getAddressDecoder)(), (0, kit_1.getU16Decoder)()])],
|
|
34
|
+
]),
|
|
35
|
+
],
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
function getSpotFulfillmentMethodCodec() {
|
|
39
|
+
return (0, kit_1.combineCodec)(getSpotFulfillmentMethodEncoder(), getSpotFulfillmentMethodDecoder());
|
|
40
|
+
}
|
|
41
|
+
function spotFulfillmentMethod(kind, data) {
|
|
42
|
+
return Array.isArray(data)
|
|
43
|
+
? { __kind: kind, fields: data }
|
|
44
|
+
: Object.assign({ __kind: kind }, (data !== null && data !== void 0 ? data : {}));
|
|
45
|
+
}
|
|
46
|
+
function isSpotFulfillmentMethod(kind, value) {
|
|
47
|
+
return value.__kind === kind;
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export declare enum SpotFulfillmentType {
|
|
10
|
+
SerumV3 = 0,
|
|
11
|
+
Match = 1,
|
|
12
|
+
PhoenixV1 = 2,
|
|
13
|
+
OpenbookV2 = 3
|
|
14
|
+
}
|
|
15
|
+
export type SpotFulfillmentTypeArgs = SpotFulfillmentType;
|
|
16
|
+
export declare function getSpotFulfillmentTypeEncoder(): FixedSizeEncoder<SpotFulfillmentTypeArgs>;
|
|
17
|
+
export declare function getSpotFulfillmentTypeDecoder(): FixedSizeDecoder<SpotFulfillmentType>;
|
|
18
|
+
export declare function getSpotFulfillmentTypeCodec(): FixedSizeCodec<SpotFulfillmentTypeArgs, SpotFulfillmentType>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SpotFulfillmentType = void 0;
|
|
11
|
+
exports.getSpotFulfillmentTypeEncoder = getSpotFulfillmentTypeEncoder;
|
|
12
|
+
exports.getSpotFulfillmentTypeDecoder = getSpotFulfillmentTypeDecoder;
|
|
13
|
+
exports.getSpotFulfillmentTypeCodec = getSpotFulfillmentTypeCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var SpotFulfillmentType;
|
|
16
|
+
(function (SpotFulfillmentType) {
|
|
17
|
+
SpotFulfillmentType[SpotFulfillmentType["SerumV3"] = 0] = "SerumV3";
|
|
18
|
+
SpotFulfillmentType[SpotFulfillmentType["Match"] = 1] = "Match";
|
|
19
|
+
SpotFulfillmentType[SpotFulfillmentType["PhoenixV1"] = 2] = "PhoenixV1";
|
|
20
|
+
SpotFulfillmentType[SpotFulfillmentType["OpenbookV2"] = 3] = "OpenbookV2";
|
|
21
|
+
})(SpotFulfillmentType || (exports.SpotFulfillmentType = SpotFulfillmentType = {}));
|
|
22
|
+
function getSpotFulfillmentTypeEncoder() {
|
|
23
|
+
return (0, kit_1.getEnumEncoder)(SpotFulfillmentType);
|
|
24
|
+
}
|
|
25
|
+
function getSpotFulfillmentTypeDecoder() {
|
|
26
|
+
return (0, kit_1.getEnumDecoder)(SpotFulfillmentType);
|
|
27
|
+
}
|
|
28
|
+
function getSpotFulfillmentTypeCodec() {
|
|
29
|
+
return (0, kit_1.combineCodec)(getSpotFulfillmentTypeEncoder(), getSpotFulfillmentTypeDecoder());
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export declare enum SpotOperation {
|
|
10
|
+
UpdateCumulativeInterest = 0,
|
|
11
|
+
Fill = 1,
|
|
12
|
+
Deposit = 2,
|
|
13
|
+
Withdraw = 3,
|
|
14
|
+
Liquidation = 4
|
|
15
|
+
}
|
|
16
|
+
export type SpotOperationArgs = SpotOperation;
|
|
17
|
+
export declare function getSpotOperationEncoder(): FixedSizeEncoder<SpotOperationArgs>;
|
|
18
|
+
export declare function getSpotOperationDecoder(): FixedSizeDecoder<SpotOperation>;
|
|
19
|
+
export declare function getSpotOperationCodec(): FixedSizeCodec<SpotOperationArgs, SpotOperation>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SpotOperation = void 0;
|
|
11
|
+
exports.getSpotOperationEncoder = getSpotOperationEncoder;
|
|
12
|
+
exports.getSpotOperationDecoder = getSpotOperationDecoder;
|
|
13
|
+
exports.getSpotOperationCodec = getSpotOperationCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var SpotOperation;
|
|
16
|
+
(function (SpotOperation) {
|
|
17
|
+
SpotOperation[SpotOperation["UpdateCumulativeInterest"] = 0] = "UpdateCumulativeInterest";
|
|
18
|
+
SpotOperation[SpotOperation["Fill"] = 1] = "Fill";
|
|
19
|
+
SpotOperation[SpotOperation["Deposit"] = 2] = "Deposit";
|
|
20
|
+
SpotOperation[SpotOperation["Withdraw"] = 3] = "Withdraw";
|
|
21
|
+
SpotOperation[SpotOperation["Liquidation"] = 4] = "Liquidation";
|
|
22
|
+
})(SpotOperation || (exports.SpotOperation = SpotOperation = {}));
|
|
23
|
+
function getSpotOperationEncoder() {
|
|
24
|
+
return (0, kit_1.getEnumEncoder)(SpotOperation);
|
|
25
|
+
}
|
|
26
|
+
function getSpotOperationDecoder() {
|
|
27
|
+
return (0, kit_1.getEnumDecoder)(SpotOperation);
|
|
28
|
+
}
|
|
29
|
+
function getSpotOperationCodec() {
|
|
30
|
+
return (0, kit_1.combineCodec)(getSpotOperationEncoder(), getSpotOperationDecoder());
|
|
31
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
import { type SpotBalanceType, type SpotBalanceTypeArgs } from ".";
|
|
10
|
+
export type SpotPosition = {
|
|
11
|
+
/**
|
|
12
|
+
* The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow
|
|
13
|
+
* interest of corresponding market.
|
|
14
|
+
* precision: SPOT_BALANCE_PRECISION
|
|
15
|
+
*/
|
|
16
|
+
scaledBalance: bigint;
|
|
17
|
+
/**
|
|
18
|
+
* How many spot non reduce only trigger orders the user has open
|
|
19
|
+
* precision: token mint precision
|
|
20
|
+
*/
|
|
21
|
+
openBids: bigint;
|
|
22
|
+
/**
|
|
23
|
+
* How many spot non reduce only trigger orders the user has open
|
|
24
|
+
* precision: token mint precision
|
|
25
|
+
*/
|
|
26
|
+
openAsks: bigint;
|
|
27
|
+
/**
|
|
28
|
+
* The cumulative deposits/borrows a user has made into a market
|
|
29
|
+
* precision: token mint precision
|
|
30
|
+
*/
|
|
31
|
+
cumulativeDeposits: bigint;
|
|
32
|
+
/** The market index of the corresponding spot market */
|
|
33
|
+
marketIndex: number;
|
|
34
|
+
/** Whether the position is deposit or borrow */
|
|
35
|
+
balanceType: SpotBalanceType;
|
|
36
|
+
/** Number of open orders */
|
|
37
|
+
openOrders: number;
|
|
38
|
+
padding: ReadonlyUint8Array;
|
|
39
|
+
};
|
|
40
|
+
export type SpotPositionArgs = {
|
|
41
|
+
/**
|
|
42
|
+
* The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow
|
|
43
|
+
* interest of corresponding market.
|
|
44
|
+
* precision: SPOT_BALANCE_PRECISION
|
|
45
|
+
*/
|
|
46
|
+
scaledBalance: number | bigint;
|
|
47
|
+
/**
|
|
48
|
+
* How many spot non reduce only trigger orders the user has open
|
|
49
|
+
* precision: token mint precision
|
|
50
|
+
*/
|
|
51
|
+
openBids: number | bigint;
|
|
52
|
+
/**
|
|
53
|
+
* How many spot non reduce only trigger orders the user has open
|
|
54
|
+
* precision: token mint precision
|
|
55
|
+
*/
|
|
56
|
+
openAsks: number | bigint;
|
|
57
|
+
/**
|
|
58
|
+
* The cumulative deposits/borrows a user has made into a market
|
|
59
|
+
* precision: token mint precision
|
|
60
|
+
*/
|
|
61
|
+
cumulativeDeposits: number | bigint;
|
|
62
|
+
/** The market index of the corresponding spot market */
|
|
63
|
+
marketIndex: number;
|
|
64
|
+
/** Whether the position is deposit or borrow */
|
|
65
|
+
balanceType: SpotBalanceTypeArgs;
|
|
66
|
+
/** Number of open orders */
|
|
67
|
+
openOrders: number;
|
|
68
|
+
padding: ReadonlyUint8Array;
|
|
69
|
+
};
|
|
70
|
+
export declare function getSpotPositionEncoder(): FixedSizeEncoder<SpotPositionArgs>;
|
|
71
|
+
export declare function getSpotPositionDecoder(): FixedSizeDecoder<SpotPosition>;
|
|
72
|
+
export declare function getSpotPositionCodec(): FixedSizeCodec<SpotPositionArgs, SpotPosition>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getSpotPositionEncoder = getSpotPositionEncoder;
|
|
11
|
+
exports.getSpotPositionDecoder = getSpotPositionDecoder;
|
|
12
|
+
exports.getSpotPositionCodec = getSpotPositionCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
const _1 = require(".");
|
|
15
|
+
function getSpotPositionEncoder() {
|
|
16
|
+
return (0, kit_1.getStructEncoder)([
|
|
17
|
+
["scaledBalance", (0, kit_1.getU64Encoder)()],
|
|
18
|
+
["openBids", (0, kit_1.getI64Encoder)()],
|
|
19
|
+
["openAsks", (0, kit_1.getI64Encoder)()],
|
|
20
|
+
["cumulativeDeposits", (0, kit_1.getI64Encoder)()],
|
|
21
|
+
["marketIndex", (0, kit_1.getU16Encoder)()],
|
|
22
|
+
["balanceType", (0, _1.getSpotBalanceTypeEncoder)()],
|
|
23
|
+
["openOrders", (0, kit_1.getU8Encoder)()],
|
|
24
|
+
["padding", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 4)],
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
function getSpotPositionDecoder() {
|
|
28
|
+
return (0, kit_1.getStructDecoder)([
|
|
29
|
+
["scaledBalance", (0, kit_1.getU64Decoder)()],
|
|
30
|
+
["openBids", (0, kit_1.getI64Decoder)()],
|
|
31
|
+
["openAsks", (0, kit_1.getI64Decoder)()],
|
|
32
|
+
["cumulativeDeposits", (0, kit_1.getI64Decoder)()],
|
|
33
|
+
["marketIndex", (0, kit_1.getU16Decoder)()],
|
|
34
|
+
["balanceType", (0, _1.getSpotBalanceTypeDecoder)()],
|
|
35
|
+
["openOrders", (0, kit_1.getU8Decoder)()],
|
|
36
|
+
["padding", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 4)],
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
39
|
+
function getSpotPositionCodec() {
|
|
40
|
+
return (0, kit_1.combineCodec)(getSpotPositionEncoder(), getSpotPositionDecoder());
|
|
41
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export declare enum StakeAction {
|
|
10
|
+
Stake = 0,
|
|
11
|
+
UnstakeRequest = 1,
|
|
12
|
+
UnstakeCancelRequest = 2,
|
|
13
|
+
Unstake = 3,
|
|
14
|
+
UnstakeTransfer = 4,
|
|
15
|
+
StakeTransfer = 5,
|
|
16
|
+
AdminDeposit = 6
|
|
17
|
+
}
|
|
18
|
+
export type StakeActionArgs = StakeAction;
|
|
19
|
+
export declare function getStakeActionEncoder(): FixedSizeEncoder<StakeActionArgs>;
|
|
20
|
+
export declare function getStakeActionDecoder(): FixedSizeDecoder<StakeAction>;
|
|
21
|
+
export declare function getStakeActionCodec(): FixedSizeCodec<StakeActionArgs, StakeAction>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.StakeAction = void 0;
|
|
11
|
+
exports.getStakeActionEncoder = getStakeActionEncoder;
|
|
12
|
+
exports.getStakeActionDecoder = getStakeActionDecoder;
|
|
13
|
+
exports.getStakeActionCodec = getStakeActionCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var StakeAction;
|
|
16
|
+
(function (StakeAction) {
|
|
17
|
+
StakeAction[StakeAction["Stake"] = 0] = "Stake";
|
|
18
|
+
StakeAction[StakeAction["UnstakeRequest"] = 1] = "UnstakeRequest";
|
|
19
|
+
StakeAction[StakeAction["UnstakeCancelRequest"] = 2] = "UnstakeCancelRequest";
|
|
20
|
+
StakeAction[StakeAction["Unstake"] = 3] = "Unstake";
|
|
21
|
+
StakeAction[StakeAction["UnstakeTransfer"] = 4] = "UnstakeTransfer";
|
|
22
|
+
StakeAction[StakeAction["StakeTransfer"] = 5] = "StakeTransfer";
|
|
23
|
+
StakeAction[StakeAction["AdminDeposit"] = 6] = "AdminDeposit";
|
|
24
|
+
})(StakeAction || (exports.StakeAction = StakeAction = {}));
|
|
25
|
+
function getStakeActionEncoder() {
|
|
26
|
+
return (0, kit_1.getEnumEncoder)(StakeAction);
|
|
27
|
+
}
|
|
28
|
+
function getStakeActionDecoder() {
|
|
29
|
+
return (0, kit_1.getEnumDecoder)(StakeAction);
|
|
30
|
+
}
|
|
31
|
+
function getStakeActionCodec() {
|
|
32
|
+
return (0, kit_1.combineCodec)(getStakeActionEncoder(), getStakeActionDecoder());
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export declare enum SwapDirection {
|
|
10
|
+
Add = 0,
|
|
11
|
+
Remove = 1
|
|
12
|
+
}
|
|
13
|
+
export type SwapDirectionArgs = SwapDirection;
|
|
14
|
+
export declare function getSwapDirectionEncoder(): FixedSizeEncoder<SwapDirectionArgs>;
|
|
15
|
+
export declare function getSwapDirectionDecoder(): FixedSizeDecoder<SwapDirection>;
|
|
16
|
+
export declare function getSwapDirectionCodec(): FixedSizeCodec<SwapDirectionArgs, SwapDirection>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SwapDirection = void 0;
|
|
11
|
+
exports.getSwapDirectionEncoder = getSwapDirectionEncoder;
|
|
12
|
+
exports.getSwapDirectionDecoder = getSwapDirectionDecoder;
|
|
13
|
+
exports.getSwapDirectionCodec = getSwapDirectionCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var SwapDirection;
|
|
16
|
+
(function (SwapDirection) {
|
|
17
|
+
SwapDirection[SwapDirection["Add"] = 0] = "Add";
|
|
18
|
+
SwapDirection[SwapDirection["Remove"] = 1] = "Remove";
|
|
19
|
+
})(SwapDirection || (exports.SwapDirection = SwapDirection = {}));
|
|
20
|
+
function getSwapDirectionEncoder() {
|
|
21
|
+
return (0, kit_1.getEnumEncoder)(SwapDirection);
|
|
22
|
+
}
|
|
23
|
+
function getSwapDirectionDecoder() {
|
|
24
|
+
return (0, kit_1.getEnumDecoder)(SwapDirection);
|
|
25
|
+
}
|
|
26
|
+
function getSwapDirectionCodec() {
|
|
27
|
+
return (0, kit_1.combineCodec)(getSwapDirectionEncoder(), getSwapDirectionDecoder());
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export declare enum SwapReduceOnly {
|
|
10
|
+
In = 0,
|
|
11
|
+
Out = 1
|
|
12
|
+
}
|
|
13
|
+
export type SwapReduceOnlyArgs = SwapReduceOnly;
|
|
14
|
+
export declare function getSwapReduceOnlyEncoder(): FixedSizeEncoder<SwapReduceOnlyArgs>;
|
|
15
|
+
export declare function getSwapReduceOnlyDecoder(): FixedSizeDecoder<SwapReduceOnly>;
|
|
16
|
+
export declare function getSwapReduceOnlyCodec(): FixedSizeCodec<SwapReduceOnlyArgs, SwapReduceOnly>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SwapReduceOnly = void 0;
|
|
11
|
+
exports.getSwapReduceOnlyEncoder = getSwapReduceOnlyEncoder;
|
|
12
|
+
exports.getSwapReduceOnlyDecoder = getSwapReduceOnlyDecoder;
|
|
13
|
+
exports.getSwapReduceOnlyCodec = getSwapReduceOnlyCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var SwapReduceOnly;
|
|
16
|
+
(function (SwapReduceOnly) {
|
|
17
|
+
SwapReduceOnly[SwapReduceOnly["In"] = 0] = "In";
|
|
18
|
+
SwapReduceOnly[SwapReduceOnly["Out"] = 1] = "Out";
|
|
19
|
+
})(SwapReduceOnly || (exports.SwapReduceOnly = SwapReduceOnly = {}));
|
|
20
|
+
function getSwapReduceOnlyEncoder() {
|
|
21
|
+
return (0, kit_1.getEnumEncoder)(SwapReduceOnly);
|
|
22
|
+
}
|
|
23
|
+
function getSwapReduceOnlyDecoder() {
|
|
24
|
+
return (0, kit_1.getEnumDecoder)(SwapReduceOnly);
|
|
25
|
+
}
|
|
26
|
+
function getSwapReduceOnlyCodec() {
|
|
27
|
+
return (0, kit_1.combineCodec)(getSwapReduceOnlyEncoder(), getSwapReduceOnlyDecoder());
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
export type TargetsDatum = {
|
|
10
|
+
costToTradeBps: number;
|
|
11
|
+
padding: ReadonlyUint8Array;
|
|
12
|
+
targetBase: bigint;
|
|
13
|
+
lastOracleSlot: bigint;
|
|
14
|
+
lastPositionSlot: bigint;
|
|
15
|
+
};
|
|
16
|
+
export type TargetsDatumArgs = {
|
|
17
|
+
costToTradeBps: number;
|
|
18
|
+
padding: ReadonlyUint8Array;
|
|
19
|
+
targetBase: number | bigint;
|
|
20
|
+
lastOracleSlot: number | bigint;
|
|
21
|
+
lastPositionSlot: number | bigint;
|
|
22
|
+
};
|
|
23
|
+
export declare function getTargetsDatumEncoder(): FixedSizeEncoder<TargetsDatumArgs>;
|
|
24
|
+
export declare function getTargetsDatumDecoder(): FixedSizeDecoder<TargetsDatum>;
|
|
25
|
+
export declare function getTargetsDatumCodec(): FixedSizeCodec<TargetsDatumArgs, TargetsDatum>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getTargetsDatumEncoder = getTargetsDatumEncoder;
|
|
11
|
+
exports.getTargetsDatumDecoder = getTargetsDatumDecoder;
|
|
12
|
+
exports.getTargetsDatumCodec = getTargetsDatumCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getTargetsDatumEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
["costToTradeBps", (0, kit_1.getI32Encoder)()],
|
|
17
|
+
["padding", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 4)],
|
|
18
|
+
["targetBase", (0, kit_1.getI64Encoder)()],
|
|
19
|
+
["lastOracleSlot", (0, kit_1.getU64Encoder)()],
|
|
20
|
+
["lastPositionSlot", (0, kit_1.getU64Encoder)()],
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
function getTargetsDatumDecoder() {
|
|
24
|
+
return (0, kit_1.getStructDecoder)([
|
|
25
|
+
["costToTradeBps", (0, kit_1.getI32Decoder)()],
|
|
26
|
+
["padding", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 4)],
|
|
27
|
+
["targetBase", (0, kit_1.getI64Decoder)()],
|
|
28
|
+
["lastOracleSlot", (0, kit_1.getU64Decoder)()],
|
|
29
|
+
["lastPositionSlot", (0, kit_1.getU64Decoder)()],
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
function getTargetsDatumCodec() {
|
|
33
|
+
return (0, kit_1.combineCodec)(getTargetsDatumEncoder(), getTargetsDatumDecoder());
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export declare enum TokenProgramFlag {
|
|
10
|
+
Token2022 = 0,
|
|
11
|
+
TransferHook = 1
|
|
12
|
+
}
|
|
13
|
+
export type TokenProgramFlagArgs = TokenProgramFlag;
|
|
14
|
+
export declare function getTokenProgramFlagEncoder(): FixedSizeEncoder<TokenProgramFlagArgs>;
|
|
15
|
+
export declare function getTokenProgramFlagDecoder(): FixedSizeDecoder<TokenProgramFlag>;
|
|
16
|
+
export declare function getTokenProgramFlagCodec(): FixedSizeCodec<TokenProgramFlagArgs, TokenProgramFlag>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun Codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.TokenProgramFlag = void 0;
|
|
11
|
+
exports.getTokenProgramFlagEncoder = getTokenProgramFlagEncoder;
|
|
12
|
+
exports.getTokenProgramFlagDecoder = getTokenProgramFlagDecoder;
|
|
13
|
+
exports.getTokenProgramFlagCodec = getTokenProgramFlagCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var TokenProgramFlag;
|
|
16
|
+
(function (TokenProgramFlag) {
|
|
17
|
+
TokenProgramFlag[TokenProgramFlag["Token2022"] = 0] = "Token2022";
|
|
18
|
+
TokenProgramFlag[TokenProgramFlag["TransferHook"] = 1] = "TransferHook";
|
|
19
|
+
})(TokenProgramFlag || (exports.TokenProgramFlag = TokenProgramFlag = {}));
|
|
20
|
+
function getTokenProgramFlagEncoder() {
|
|
21
|
+
return (0, kit_1.getEnumEncoder)(TokenProgramFlag);
|
|
22
|
+
}
|
|
23
|
+
function getTokenProgramFlagDecoder() {
|
|
24
|
+
return (0, kit_1.getEnumDecoder)(TokenProgramFlag);
|
|
25
|
+
}
|
|
26
|
+
function getTokenProgramFlagCodec() {
|
|
27
|
+
return (0, kit_1.combineCodec)(getTokenProgramFlagEncoder(), getTokenProgramFlagDecoder());
|
|
28
|
+
}
|