@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,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.PlaceAndTakeOrderSuccessCondition = void 0;
|
|
11
|
+
exports.getPlaceAndTakeOrderSuccessConditionEncoder = getPlaceAndTakeOrderSuccessConditionEncoder;
|
|
12
|
+
exports.getPlaceAndTakeOrderSuccessConditionDecoder = getPlaceAndTakeOrderSuccessConditionDecoder;
|
|
13
|
+
exports.getPlaceAndTakeOrderSuccessConditionCodec = getPlaceAndTakeOrderSuccessConditionCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var PlaceAndTakeOrderSuccessCondition;
|
|
16
|
+
(function (PlaceAndTakeOrderSuccessCondition) {
|
|
17
|
+
PlaceAndTakeOrderSuccessCondition[PlaceAndTakeOrderSuccessCondition["PartialFill"] = 0] = "PartialFill";
|
|
18
|
+
PlaceAndTakeOrderSuccessCondition[PlaceAndTakeOrderSuccessCondition["FullFill"] = 1] = "FullFill";
|
|
19
|
+
})(PlaceAndTakeOrderSuccessCondition || (exports.PlaceAndTakeOrderSuccessCondition = PlaceAndTakeOrderSuccessCondition = {}));
|
|
20
|
+
function getPlaceAndTakeOrderSuccessConditionEncoder() {
|
|
21
|
+
return (0, kit_1.getEnumEncoder)(PlaceAndTakeOrderSuccessCondition);
|
|
22
|
+
}
|
|
23
|
+
function getPlaceAndTakeOrderSuccessConditionDecoder() {
|
|
24
|
+
return (0, kit_1.getEnumDecoder)(PlaceAndTakeOrderSuccessCondition);
|
|
25
|
+
}
|
|
26
|
+
function getPlaceAndTakeOrderSuccessConditionCodec() {
|
|
27
|
+
return (0, kit_1.combineCodec)(getPlaceAndTakeOrderSuccessConditionEncoder(), getPlaceAndTakeOrderSuccessConditionDecoder());
|
|
28
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 PoolBalance = {
|
|
10
|
+
/**
|
|
11
|
+
* To get the pool's token amount, you must multiply the scaled balance by the market's cumulative
|
|
12
|
+
* deposit interest
|
|
13
|
+
* precision: SPOT_BALANCE_PRECISION
|
|
14
|
+
*/
|
|
15
|
+
scaledBalance: bigint;
|
|
16
|
+
/** The spot market the pool is for */
|
|
17
|
+
marketIndex: number;
|
|
18
|
+
padding: ReadonlyUint8Array;
|
|
19
|
+
};
|
|
20
|
+
export type PoolBalanceArgs = {
|
|
21
|
+
/**
|
|
22
|
+
* To get the pool's token amount, you must multiply the scaled balance by the market's cumulative
|
|
23
|
+
* deposit interest
|
|
24
|
+
* precision: SPOT_BALANCE_PRECISION
|
|
25
|
+
*/
|
|
26
|
+
scaledBalance: number | bigint;
|
|
27
|
+
/** The spot market the pool is for */
|
|
28
|
+
marketIndex: number;
|
|
29
|
+
padding: ReadonlyUint8Array;
|
|
30
|
+
};
|
|
31
|
+
export declare function getPoolBalanceEncoder(): FixedSizeEncoder<PoolBalanceArgs>;
|
|
32
|
+
export declare function getPoolBalanceDecoder(): FixedSizeDecoder<PoolBalance>;
|
|
33
|
+
export declare function getPoolBalanceCodec(): FixedSizeCodec<PoolBalanceArgs, PoolBalance>;
|
|
@@ -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.getPoolBalanceEncoder = getPoolBalanceEncoder;
|
|
11
|
+
exports.getPoolBalanceDecoder = getPoolBalanceDecoder;
|
|
12
|
+
exports.getPoolBalanceCodec = getPoolBalanceCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getPoolBalanceEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
["scaledBalance", (0, kit_1.getU128Encoder)()],
|
|
17
|
+
["marketIndex", (0, kit_1.getU16Encoder)()],
|
|
18
|
+
["padding", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 6)],
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
function getPoolBalanceDecoder() {
|
|
22
|
+
return (0, kit_1.getStructDecoder)([
|
|
23
|
+
["scaledBalance", (0, kit_1.getU128Decoder)()],
|
|
24
|
+
["marketIndex", (0, kit_1.getU16Decoder)()],
|
|
25
|
+
["padding", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 6)],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
function getPoolBalanceCodec() {
|
|
29
|
+
return (0, kit_1.combineCodec)(getPoolBalanceEncoder(), getPoolBalanceDecoder());
|
|
30
|
+
}
|
|
@@ -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 PositionDirection {
|
|
10
|
+
Long = 0,
|
|
11
|
+
Short = 1
|
|
12
|
+
}
|
|
13
|
+
export type PositionDirectionArgs = PositionDirection;
|
|
14
|
+
export declare function getPositionDirectionEncoder(): FixedSizeEncoder<PositionDirectionArgs>;
|
|
15
|
+
export declare function getPositionDirectionDecoder(): FixedSizeDecoder<PositionDirection>;
|
|
16
|
+
export declare function getPositionDirectionCodec(): FixedSizeCodec<PositionDirectionArgs, PositionDirection>;
|
|
@@ -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.PositionDirection = void 0;
|
|
11
|
+
exports.getPositionDirectionEncoder = getPositionDirectionEncoder;
|
|
12
|
+
exports.getPositionDirectionDecoder = getPositionDirectionDecoder;
|
|
13
|
+
exports.getPositionDirectionCodec = getPositionDirectionCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var PositionDirection;
|
|
16
|
+
(function (PositionDirection) {
|
|
17
|
+
PositionDirection[PositionDirection["Long"] = 0] = "Long";
|
|
18
|
+
PositionDirection[PositionDirection["Short"] = 1] = "Short";
|
|
19
|
+
})(PositionDirection || (exports.PositionDirection = PositionDirection = {}));
|
|
20
|
+
function getPositionDirectionEncoder() {
|
|
21
|
+
return (0, kit_1.getEnumEncoder)(PositionDirection);
|
|
22
|
+
}
|
|
23
|
+
function getPositionDirectionDecoder() {
|
|
24
|
+
return (0, kit_1.getEnumDecoder)(PositionDirection);
|
|
25
|
+
}
|
|
26
|
+
function getPositionDirectionCodec() {
|
|
27
|
+
return (0, kit_1.combineCodec)(getPositionDirectionEncoder(), getPositionDirectionDecoder());
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 PositionFlag {
|
|
10
|
+
IsolatedPosition = 0,
|
|
11
|
+
BeingLiquidated = 1,
|
|
12
|
+
Bankrupt = 2
|
|
13
|
+
}
|
|
14
|
+
export type PositionFlagArgs = PositionFlag;
|
|
15
|
+
export declare function getPositionFlagEncoder(): FixedSizeEncoder<PositionFlagArgs>;
|
|
16
|
+
export declare function getPositionFlagDecoder(): FixedSizeDecoder<PositionFlag>;
|
|
17
|
+
export declare function getPositionFlagCodec(): FixedSizeCodec<PositionFlagArgs, PositionFlag>;
|
|
@@ -0,0 +1,29 @@
|
|
|
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.PositionFlag = void 0;
|
|
11
|
+
exports.getPositionFlagEncoder = getPositionFlagEncoder;
|
|
12
|
+
exports.getPositionFlagDecoder = getPositionFlagDecoder;
|
|
13
|
+
exports.getPositionFlagCodec = getPositionFlagCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var PositionFlag;
|
|
16
|
+
(function (PositionFlag) {
|
|
17
|
+
PositionFlag[PositionFlag["IsolatedPosition"] = 0] = "IsolatedPosition";
|
|
18
|
+
PositionFlag[PositionFlag["BeingLiquidated"] = 1] = "BeingLiquidated";
|
|
19
|
+
PositionFlag[PositionFlag["Bankrupt"] = 2] = "Bankrupt";
|
|
20
|
+
})(PositionFlag || (exports.PositionFlag = PositionFlag = {}));
|
|
21
|
+
function getPositionFlagEncoder() {
|
|
22
|
+
return (0, kit_1.getEnumEncoder)(PositionFlag);
|
|
23
|
+
}
|
|
24
|
+
function getPositionFlagDecoder() {
|
|
25
|
+
return (0, kit_1.getEnumDecoder)(PositionFlag);
|
|
26
|
+
}
|
|
27
|
+
function getPositionFlagCodec() {
|
|
28
|
+
return (0, kit_1.combineCodec)(getPositionFlagEncoder(), getPositionFlagDecoder());
|
|
29
|
+
}
|
|
@@ -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 PositionUpdateType {
|
|
10
|
+
Open = 0,
|
|
11
|
+
Increase = 1,
|
|
12
|
+
Reduce = 2,
|
|
13
|
+
Close = 3,
|
|
14
|
+
Flip = 4
|
|
15
|
+
}
|
|
16
|
+
export type PositionUpdateTypeArgs = PositionUpdateType;
|
|
17
|
+
export declare function getPositionUpdateTypeEncoder(): FixedSizeEncoder<PositionUpdateTypeArgs>;
|
|
18
|
+
export declare function getPositionUpdateTypeDecoder(): FixedSizeDecoder<PositionUpdateType>;
|
|
19
|
+
export declare function getPositionUpdateTypeCodec(): FixedSizeCodec<PositionUpdateTypeArgs, PositionUpdateType>;
|
|
@@ -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.PositionUpdateType = void 0;
|
|
11
|
+
exports.getPositionUpdateTypeEncoder = getPositionUpdateTypeEncoder;
|
|
12
|
+
exports.getPositionUpdateTypeDecoder = getPositionUpdateTypeDecoder;
|
|
13
|
+
exports.getPositionUpdateTypeCodec = getPositionUpdateTypeCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var PositionUpdateType;
|
|
16
|
+
(function (PositionUpdateType) {
|
|
17
|
+
PositionUpdateType[PositionUpdateType["Open"] = 0] = "Open";
|
|
18
|
+
PositionUpdateType[PositionUpdateType["Increase"] = 1] = "Increase";
|
|
19
|
+
PositionUpdateType[PositionUpdateType["Reduce"] = 2] = "Reduce";
|
|
20
|
+
PositionUpdateType[PositionUpdateType["Close"] = 3] = "Close";
|
|
21
|
+
PositionUpdateType[PositionUpdateType["Flip"] = 4] = "Flip";
|
|
22
|
+
})(PositionUpdateType || (exports.PositionUpdateType = PositionUpdateType = {}));
|
|
23
|
+
function getPositionUpdateTypeEncoder() {
|
|
24
|
+
return (0, kit_1.getEnumEncoder)(PositionUpdateType);
|
|
25
|
+
}
|
|
26
|
+
function getPositionUpdateTypeDecoder() {
|
|
27
|
+
return (0, kit_1.getEnumDecoder)(PositionUpdateType);
|
|
28
|
+
}
|
|
29
|
+
function getPositionUpdateTypeCodec() {
|
|
30
|
+
return (0, kit_1.combineCodec)(getPositionUpdateTypeEncoder(), getPositionUpdateTypeDecoder());
|
|
31
|
+
}
|
|
@@ -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 PostOnlyParam {
|
|
10
|
+
None = 0,
|
|
11
|
+
MustPostOnly = 1,
|
|
12
|
+
TryPostOnly = 2,
|
|
13
|
+
Slide = 3
|
|
14
|
+
}
|
|
15
|
+
export type PostOnlyParamArgs = PostOnlyParam;
|
|
16
|
+
export declare function getPostOnlyParamEncoder(): FixedSizeEncoder<PostOnlyParamArgs>;
|
|
17
|
+
export declare function getPostOnlyParamDecoder(): FixedSizeDecoder<PostOnlyParam>;
|
|
18
|
+
export declare function getPostOnlyParamCodec(): FixedSizeCodec<PostOnlyParamArgs, PostOnlyParam>;
|
|
@@ -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.PostOnlyParam = void 0;
|
|
11
|
+
exports.getPostOnlyParamEncoder = getPostOnlyParamEncoder;
|
|
12
|
+
exports.getPostOnlyParamDecoder = getPostOnlyParamDecoder;
|
|
13
|
+
exports.getPostOnlyParamCodec = getPostOnlyParamCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var PostOnlyParam;
|
|
16
|
+
(function (PostOnlyParam) {
|
|
17
|
+
PostOnlyParam[PostOnlyParam["None"] = 0] = "None";
|
|
18
|
+
PostOnlyParam[PostOnlyParam["MustPostOnly"] = 1] = "MustPostOnly";
|
|
19
|
+
PostOnlyParam[PostOnlyParam["TryPostOnly"] = 2] = "TryPostOnly";
|
|
20
|
+
PostOnlyParam[PostOnlyParam["Slide"] = 3] = "Slide";
|
|
21
|
+
})(PostOnlyParam || (exports.PostOnlyParam = PostOnlyParam = {}));
|
|
22
|
+
function getPostOnlyParamEncoder() {
|
|
23
|
+
return (0, kit_1.getEnumEncoder)(PostOnlyParam);
|
|
24
|
+
}
|
|
25
|
+
function getPostOnlyParamDecoder() {
|
|
26
|
+
return (0, kit_1.getEnumDecoder)(PostOnlyParam);
|
|
27
|
+
}
|
|
28
|
+
function getPostOnlyParamCodec() {
|
|
29
|
+
return (0, kit_1.combineCodec)(getPostOnlyParamEncoder(), getPostOnlyParamDecoder());
|
|
30
|
+
}
|
|
@@ -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 Codec, type Decoder, type Encoder, type Option, type OptionOrNullable } from "@solana/kit";
|
|
9
|
+
export type PrelaunchOracleParams = {
|
|
10
|
+
perpMarketIndex: number;
|
|
11
|
+
price: Option<bigint>;
|
|
12
|
+
maxPrice: Option<bigint>;
|
|
13
|
+
};
|
|
14
|
+
export type PrelaunchOracleParamsArgs = {
|
|
15
|
+
perpMarketIndex: number;
|
|
16
|
+
price: OptionOrNullable<number | bigint>;
|
|
17
|
+
maxPrice: OptionOrNullable<number | bigint>;
|
|
18
|
+
};
|
|
19
|
+
export declare function getPrelaunchOracleParamsEncoder(): Encoder<PrelaunchOracleParamsArgs>;
|
|
20
|
+
export declare function getPrelaunchOracleParamsDecoder(): Decoder<PrelaunchOracleParams>;
|
|
21
|
+
export declare function getPrelaunchOracleParamsCodec(): Codec<PrelaunchOracleParamsArgs, PrelaunchOracleParams>;
|
|
@@ -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.getPrelaunchOracleParamsEncoder = getPrelaunchOracleParamsEncoder;
|
|
11
|
+
exports.getPrelaunchOracleParamsDecoder = getPrelaunchOracleParamsDecoder;
|
|
12
|
+
exports.getPrelaunchOracleParamsCodec = getPrelaunchOracleParamsCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getPrelaunchOracleParamsEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
["perpMarketIndex", (0, kit_1.getU16Encoder)()],
|
|
17
|
+
["price", (0, kit_1.getOptionEncoder)((0, kit_1.getI64Encoder)())],
|
|
18
|
+
["maxPrice", (0, kit_1.getOptionEncoder)((0, kit_1.getI64Encoder)())],
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
function getPrelaunchOracleParamsDecoder() {
|
|
22
|
+
return (0, kit_1.getStructDecoder)([
|
|
23
|
+
["perpMarketIndex", (0, kit_1.getU16Decoder)()],
|
|
24
|
+
["price", (0, kit_1.getOptionDecoder)((0, kit_1.getI64Decoder)())],
|
|
25
|
+
["maxPrice", (0, kit_1.getOptionDecoder)((0, kit_1.getI64Decoder)())],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
function getPrelaunchOracleParamsCodec() {
|
|
29
|
+
return (0, kit_1.combineCodec)(getPrelaunchOracleParamsEncoder(), getPrelaunchOracleParamsDecoder());
|
|
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 type PriceDivergenceGuardRails = {
|
|
10
|
+
markOraclePercentDivergence: bigint;
|
|
11
|
+
oracleTwap5minPercentDivergence: bigint;
|
|
12
|
+
};
|
|
13
|
+
export type PriceDivergenceGuardRailsArgs = {
|
|
14
|
+
markOraclePercentDivergence: number | bigint;
|
|
15
|
+
oracleTwap5minPercentDivergence: number | bigint;
|
|
16
|
+
};
|
|
17
|
+
export declare function getPriceDivergenceGuardRailsEncoder(): FixedSizeEncoder<PriceDivergenceGuardRailsArgs>;
|
|
18
|
+
export declare function getPriceDivergenceGuardRailsDecoder(): FixedSizeDecoder<PriceDivergenceGuardRails>;
|
|
19
|
+
export declare function getPriceDivergenceGuardRailsCodec(): FixedSizeCodec<PriceDivergenceGuardRailsArgs, PriceDivergenceGuardRails>;
|
|
@@ -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.getPriceDivergenceGuardRailsEncoder = getPriceDivergenceGuardRailsEncoder;
|
|
11
|
+
exports.getPriceDivergenceGuardRailsDecoder = getPriceDivergenceGuardRailsDecoder;
|
|
12
|
+
exports.getPriceDivergenceGuardRailsCodec = getPriceDivergenceGuardRailsCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getPriceDivergenceGuardRailsEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
["markOraclePercentDivergence", (0, kit_1.getU64Encoder)()],
|
|
17
|
+
["oracleTwap5minPercentDivergence", (0, kit_1.getU64Encoder)()],
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
function getPriceDivergenceGuardRailsDecoder() {
|
|
21
|
+
return (0, kit_1.getStructDecoder)([
|
|
22
|
+
["markOraclePercentDivergence", (0, kit_1.getU64Decoder)()],
|
|
23
|
+
["oracleTwap5minPercentDivergence", (0, kit_1.getU64Decoder)()],
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
function getPriceDivergenceGuardRailsCodec() {
|
|
27
|
+
return (0, kit_1.combineCodec)(getPriceDivergenceGuardRailsEncoder(), getPriceDivergenceGuardRailsDecoder());
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 ReferrerStatus {
|
|
10
|
+
IsReferrer = 0,
|
|
11
|
+
IsReferred = 1,
|
|
12
|
+
BuilderReferral = 2
|
|
13
|
+
}
|
|
14
|
+
export type ReferrerStatusArgs = ReferrerStatus;
|
|
15
|
+
export declare function getReferrerStatusEncoder(): FixedSizeEncoder<ReferrerStatusArgs>;
|
|
16
|
+
export declare function getReferrerStatusDecoder(): FixedSizeDecoder<ReferrerStatus>;
|
|
17
|
+
export declare function getReferrerStatusCodec(): FixedSizeCodec<ReferrerStatusArgs, ReferrerStatus>;
|
|
@@ -0,0 +1,29 @@
|
|
|
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.ReferrerStatus = void 0;
|
|
11
|
+
exports.getReferrerStatusEncoder = getReferrerStatusEncoder;
|
|
12
|
+
exports.getReferrerStatusDecoder = getReferrerStatusDecoder;
|
|
13
|
+
exports.getReferrerStatusCodec = getReferrerStatusCodec;
|
|
14
|
+
const kit_1 = require("@solana/kit");
|
|
15
|
+
var ReferrerStatus;
|
|
16
|
+
(function (ReferrerStatus) {
|
|
17
|
+
ReferrerStatus[ReferrerStatus["IsReferrer"] = 0] = "IsReferrer";
|
|
18
|
+
ReferrerStatus[ReferrerStatus["IsReferred"] = 1] = "IsReferred";
|
|
19
|
+
ReferrerStatus[ReferrerStatus["BuilderReferral"] = 2] = "BuilderReferral";
|
|
20
|
+
})(ReferrerStatus || (exports.ReferrerStatus = ReferrerStatus = {}));
|
|
21
|
+
function getReferrerStatusEncoder() {
|
|
22
|
+
return (0, kit_1.getEnumEncoder)(ReferrerStatus);
|
|
23
|
+
}
|
|
24
|
+
function getReferrerStatusDecoder() {
|
|
25
|
+
return (0, kit_1.getEnumDecoder)(ReferrerStatus);
|
|
26
|
+
}
|
|
27
|
+
function getReferrerStatusCodec() {
|
|
28
|
+
return (0, kit_1.combineCodec)(getReferrerStatusEncoder(), getReferrerStatusDecoder());
|
|
29
|
+
}
|
|
@@ -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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
export type RevenueShareEscrowFixed = {
|
|
10
|
+
authority: Address;
|
|
11
|
+
referrer: Address;
|
|
12
|
+
referrerBoostExpireTs: number;
|
|
13
|
+
referrerRewardOffset: number;
|
|
14
|
+
refereeFeeNumeratorOffset: number;
|
|
15
|
+
referrerBoostNumerator: number;
|
|
16
|
+
reservedFixed: ReadonlyUint8Array;
|
|
17
|
+
};
|
|
18
|
+
export type RevenueShareEscrowFixedArgs = RevenueShareEscrowFixed;
|
|
19
|
+
export declare function getRevenueShareEscrowFixedEncoder(): FixedSizeEncoder<RevenueShareEscrowFixedArgs>;
|
|
20
|
+
export declare function getRevenueShareEscrowFixedDecoder(): FixedSizeDecoder<RevenueShareEscrowFixed>;
|
|
21
|
+
export declare function getRevenueShareEscrowFixedCodec(): FixedSizeCodec<RevenueShareEscrowFixedArgs, RevenueShareEscrowFixed>;
|
|
@@ -0,0 +1,38 @@
|
|
|
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.getRevenueShareEscrowFixedEncoder = getRevenueShareEscrowFixedEncoder;
|
|
11
|
+
exports.getRevenueShareEscrowFixedDecoder = getRevenueShareEscrowFixedDecoder;
|
|
12
|
+
exports.getRevenueShareEscrowFixedCodec = getRevenueShareEscrowFixedCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getRevenueShareEscrowFixedEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
["authority", (0, kit_1.getAddressEncoder)()],
|
|
17
|
+
["referrer", (0, kit_1.getAddressEncoder)()],
|
|
18
|
+
["referrerBoostExpireTs", (0, kit_1.getU32Encoder)()],
|
|
19
|
+
["referrerRewardOffset", (0, kit_1.getI8Encoder)()],
|
|
20
|
+
["refereeFeeNumeratorOffset", (0, kit_1.getI8Encoder)()],
|
|
21
|
+
["referrerBoostNumerator", (0, kit_1.getI8Encoder)()],
|
|
22
|
+
["reservedFixed", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 17)],
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
25
|
+
function getRevenueShareEscrowFixedDecoder() {
|
|
26
|
+
return (0, kit_1.getStructDecoder)([
|
|
27
|
+
["authority", (0, kit_1.getAddressDecoder)()],
|
|
28
|
+
["referrer", (0, kit_1.getAddressDecoder)()],
|
|
29
|
+
["referrerBoostExpireTs", (0, kit_1.getU32Decoder)()],
|
|
30
|
+
["referrerRewardOffset", (0, kit_1.getI8Decoder)()],
|
|
31
|
+
["refereeFeeNumeratorOffset", (0, kit_1.getI8Decoder)()],
|
|
32
|
+
["referrerBoostNumerator", (0, kit_1.getI8Decoder)()],
|
|
33
|
+
["reservedFixed", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 17)],
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
function getRevenueShareEscrowFixedCodec() {
|
|
37
|
+
return (0, kit_1.combineCodec)(getRevenueShareEscrowFixedEncoder(), getRevenueShareEscrowFixedDecoder());
|
|
38
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 MarketType, type MarketTypeArgs } from ".";
|
|
10
|
+
export type RevenueShareOrder = {
|
|
11
|
+
/**
|
|
12
|
+
* fees accrued so far for this order slot. This is not exclusively fees from this order_id
|
|
13
|
+
* and may include fees from other orders in the same market. This may be swept to the
|
|
14
|
+
* builder's SpotPosition during settle_pnl.
|
|
15
|
+
*/
|
|
16
|
+
feesAccrued: bigint;
|
|
17
|
+
/** the order_id of the current active order in this slot. It's only relevant while bit_flag = Open */
|
|
18
|
+
orderId: number;
|
|
19
|
+
/** the builder fee on this order, in tenths of a bps, e.g. 100 = 0.01% */
|
|
20
|
+
feeTenthBps: number;
|
|
21
|
+
marketIndex: number;
|
|
22
|
+
/** the subaccount_id of the user who created this order. It's only relevant while bit_flag = Open */
|
|
23
|
+
subAccountId: number;
|
|
24
|
+
/**
|
|
25
|
+
* the index of the RevenueShareEscrow.approved_builders list, that this order's fee will settle to. Ignored
|
|
26
|
+
* if bit_flag = Referral.
|
|
27
|
+
*/
|
|
28
|
+
builderIdx: number;
|
|
29
|
+
/**
|
|
30
|
+
* bitflags that describe the state of the order.
|
|
31
|
+
* [`RevenueShareOrderBitFlag::Init`]: this order slot is available for use.
|
|
32
|
+
* [`RevenueShareOrderBitFlag::Open`]: this order slot is occupied, `order_id` is the `sub_account_id`'s active order.
|
|
33
|
+
* [`RevenueShareOrderBitFlag::Completed`]: this order has been filled or canceled, and is waiting to be settled into.
|
|
34
|
+
* the builder's account order_id and sub_account_id are no longer relevant, it may be merged with other orders.
|
|
35
|
+
* [`RevenueShareOrderBitFlag::Referral`]: this order stores referral rewards waiting to be settled for this market.
|
|
36
|
+
* If it is set, no other bitflag should be set.
|
|
37
|
+
*/
|
|
38
|
+
bitFlags: number;
|
|
39
|
+
/** the index into the User's orders list when this RevenueShareOrder was created, make sure to verify that order_id matches. */
|
|
40
|
+
userOrderIndex: number;
|
|
41
|
+
marketType: MarketType;
|
|
42
|
+
padding: ReadonlyUint8Array;
|
|
43
|
+
};
|
|
44
|
+
export type RevenueShareOrderArgs = {
|
|
45
|
+
/**
|
|
46
|
+
* fees accrued so far for this order slot. This is not exclusively fees from this order_id
|
|
47
|
+
* and may include fees from other orders in the same market. This may be swept to the
|
|
48
|
+
* builder's SpotPosition during settle_pnl.
|
|
49
|
+
*/
|
|
50
|
+
feesAccrued: number | bigint;
|
|
51
|
+
/** the order_id of the current active order in this slot. It's only relevant while bit_flag = Open */
|
|
52
|
+
orderId: number;
|
|
53
|
+
/** the builder fee on this order, in tenths of a bps, e.g. 100 = 0.01% */
|
|
54
|
+
feeTenthBps: number;
|
|
55
|
+
marketIndex: number;
|
|
56
|
+
/** the subaccount_id of the user who created this order. It's only relevant while bit_flag = Open */
|
|
57
|
+
subAccountId: number;
|
|
58
|
+
/**
|
|
59
|
+
* the index of the RevenueShareEscrow.approved_builders list, that this order's fee will settle to. Ignored
|
|
60
|
+
* if bit_flag = Referral.
|
|
61
|
+
*/
|
|
62
|
+
builderIdx: number;
|
|
63
|
+
/**
|
|
64
|
+
* bitflags that describe the state of the order.
|
|
65
|
+
* [`RevenueShareOrderBitFlag::Init`]: this order slot is available for use.
|
|
66
|
+
* [`RevenueShareOrderBitFlag::Open`]: this order slot is occupied, `order_id` is the `sub_account_id`'s active order.
|
|
67
|
+
* [`RevenueShareOrderBitFlag::Completed`]: this order has been filled or canceled, and is waiting to be settled into.
|
|
68
|
+
* the builder's account order_id and sub_account_id are no longer relevant, it may be merged with other orders.
|
|
69
|
+
* [`RevenueShareOrderBitFlag::Referral`]: this order stores referral rewards waiting to be settled for this market.
|
|
70
|
+
* If it is set, no other bitflag should be set.
|
|
71
|
+
*/
|
|
72
|
+
bitFlags: number;
|
|
73
|
+
/** the index into the User's orders list when this RevenueShareOrder was created, make sure to verify that order_id matches. */
|
|
74
|
+
userOrderIndex: number;
|
|
75
|
+
marketType: MarketTypeArgs;
|
|
76
|
+
padding: ReadonlyUint8Array;
|
|
77
|
+
};
|
|
78
|
+
export declare function getRevenueShareOrderEncoder(): FixedSizeEncoder<RevenueShareOrderArgs>;
|
|
79
|
+
export declare function getRevenueShareOrderDecoder(): FixedSizeDecoder<RevenueShareOrder>;
|
|
80
|
+
export declare function getRevenueShareOrderCodec(): FixedSizeCodec<RevenueShareOrderArgs, RevenueShareOrder>;
|
|
@@ -0,0 +1,45 @@
|
|
|
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.getRevenueShareOrderEncoder = getRevenueShareOrderEncoder;
|
|
11
|
+
exports.getRevenueShareOrderDecoder = getRevenueShareOrderDecoder;
|
|
12
|
+
exports.getRevenueShareOrderCodec = getRevenueShareOrderCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
const _1 = require(".");
|
|
15
|
+
function getRevenueShareOrderEncoder() {
|
|
16
|
+
return (0, kit_1.getStructEncoder)([
|
|
17
|
+
["feesAccrued", (0, kit_1.getU64Encoder)()],
|
|
18
|
+
["orderId", (0, kit_1.getU32Encoder)()],
|
|
19
|
+
["feeTenthBps", (0, kit_1.getU16Encoder)()],
|
|
20
|
+
["marketIndex", (0, kit_1.getU16Encoder)()],
|
|
21
|
+
["subAccountId", (0, kit_1.getU16Encoder)()],
|
|
22
|
+
["builderIdx", (0, kit_1.getU8Encoder)()],
|
|
23
|
+
["bitFlags", (0, kit_1.getU8Encoder)()],
|
|
24
|
+
["userOrderIndex", (0, kit_1.getU8Encoder)()],
|
|
25
|
+
["marketType", (0, _1.getMarketTypeEncoder)()],
|
|
26
|
+
["padding", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 10)],
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
function getRevenueShareOrderDecoder() {
|
|
30
|
+
return (0, kit_1.getStructDecoder)([
|
|
31
|
+
["feesAccrued", (0, kit_1.getU64Decoder)()],
|
|
32
|
+
["orderId", (0, kit_1.getU32Decoder)()],
|
|
33
|
+
["feeTenthBps", (0, kit_1.getU16Decoder)()],
|
|
34
|
+
["marketIndex", (0, kit_1.getU16Decoder)()],
|
|
35
|
+
["subAccountId", (0, kit_1.getU16Decoder)()],
|
|
36
|
+
["builderIdx", (0, kit_1.getU8Decoder)()],
|
|
37
|
+
["bitFlags", (0, kit_1.getU8Decoder)()],
|
|
38
|
+
["userOrderIndex", (0, kit_1.getU8Decoder)()],
|
|
39
|
+
["marketType", (0, _1.getMarketTypeDecoder)()],
|
|
40
|
+
["padding", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 10)],
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
function getRevenueShareOrderCodec() {
|
|
44
|
+
return (0, kit_1.combineCodec)(getRevenueShareOrderEncoder(), getRevenueShareOrderDecoder());
|
|
45
|
+
}
|
|
@@ -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 RevenueShareOrderBitFlag {
|
|
10
|
+
Init = 0,
|
|
11
|
+
Open = 1,
|
|
12
|
+
Completed = 2,
|
|
13
|
+
Referral = 3
|
|
14
|
+
}
|
|
15
|
+
export type RevenueShareOrderBitFlagArgs = RevenueShareOrderBitFlag;
|
|
16
|
+
export declare function getRevenueShareOrderBitFlagEncoder(): FixedSizeEncoder<RevenueShareOrderBitFlagArgs>;
|
|
17
|
+
export declare function getRevenueShareOrderBitFlagDecoder(): FixedSizeDecoder<RevenueShareOrderBitFlag>;
|
|
18
|
+
export declare function getRevenueShareOrderBitFlagCodec(): FixedSizeCodec<RevenueShareOrderBitFlagArgs, RevenueShareOrderBitFlag>;
|