Crate may_cpi

Crate may_cpi 

Source

Modules§

accounts
An Anchor generated module, providing a set of structs mirroring the structs deriving Accounts, where each field is a Pubkey. This is useful for specifying accounts for a client.
instruction
An Anchor generated module containing the program’s set of instructions, where each method handler in the #[program] mod is associated with a struct defining the input arguments to the method. These should be used directly, when one wants to serialize Anchor instruction data, for example, when speciying instructions on a client.
mayflower
program
Module representing the program.

Structs§

BorrowAccounts
Borrow main tokens against deposited collateral.
BorrowAccountsBumps
BorrowEvent
BuyEvent
BuyWithExactCashInAccounts
Buy market tokens using exact amount of main tokens.
BuyWithExactCashInAccountsBumps
BuyWithExactCashInAndDepositAccounts
Buy market tokens and immediately deposit as collateral.
BuyWithExactCashInAndDepositAccountsBumps
BuyWithExactCashInAndDepositEvent
BuyWithExactCashInAndDepositMultiAccounts
Buy from multi-curve market and deposit as collateral.
BuyWithExactCashInAndDepositMultiAccountsBumps
BuyWithExactCashInAndDepositWithDebtAccounts
Buy market tokens and immediately deposit as collateral with debt.
BuyWithExactCashInAndDepositWithDebtAccountsBumps
BuyWithExactCashInAndDepositWithDebtArgs
BuyWithExactCashInAndDepositWithDebtEvent
BuyWithExactCashInMultiAccounts
Buy tokens from a multi-curve market.
BuyWithExactCashInMultiAccountsBumps
DecimalSerialized
Wrapper for serializing and deserializing high-precision decimal values.
DepositAccounts
Deposit market tokens as collateral into personal position.
DepositAccountsBumps
DepositEvent
DonateLiquidity2Accounts
Donate backing liquidity to the market.
DonateLiquidity2AccountsBumps
DonateLiquidityAccounts
DEPRECATED: use donate_liquidity2 instead, as v2 gets logged by the indexer
DonateLiquidityAccountsBumps
DonateLiquidityEvent
DutchConfigSerialized
Configuration for Dutch auction fee boost mechanism.
ExerciseOptionsAccounts
Exercise option tokens to purchase market tokens at floor price.
ExerciseOptionsAccountsBumps
ExerciseOptionsEvent
ExerciseOptionsMultiAccounts
Exercise options in a multi-curve market.
ExerciseOptionsMultiAccountsBumps
Fees
Fee configuration structure for market operations within a market group.
InitLogAccountAccounts
InitLogAccountAccountsBumps
LinearPriceCurveSerialized
Serialized representation of a linear bonding curve with shoulder configuration.
LogAccount
MarketFlagsChangeAccounts
Update market permissions and feature flags.
MarketFlagsChangeAccountsBumps
MarketFlagsChangeEvent
MarketGroup
Market group account managing a collection of related markets with shared fee structures.
MarketGroupAcceptNewAdminAccounts
Accept admin ownership of a market group.
MarketGroupAcceptNewAdminAccountsBumps
MarketGroupAcceptNewAdminEvent
MarketGroupChangeFeesAccounts
Update fee structure for all markets in a group.
MarketGroupChangeFeesAccountsBumps
MarketGroupChangeFeesEvent
MarketGroupCollectRevAccounts
Collect accumulated trading fees from a market group.
MarketGroupCollectRevAccountsBumps
MarketGroupCollectRevEvent
MarketGroupInitAccounts
Initialize a market group under a tenant.
MarketGroupInitAccountsBumps
MarketGroupInitArgs
MarketGroupInitialized
MarketGroupProposeAdminAccounts
Propose a new admin for the market group.
MarketGroupProposeAdminAccountsBumps
MarketGroupProposeAdminEvent
MarketLinear
Market implementation using a linear bonding curve with shoulder configuration.
MarketLinearArgs
MarketLinearInitAccounts
Initialize a linear market with a simple price curve.
MarketLinearInitAccountsBumps
MarketLinearInitEvent
MarketLinearInitWithDutchAccounts
Initialize a linear market with Dutch auction price boost.
MarketLinearInitWithDutchAccountsBumps
MarketLinearInitWithDutchArgs
MarketMeta
Market metadata account containing configuration shared across all market implementations.
MarketMultiCurve
Market implementation using a multi-segment bonding curve with dynamic complexity.
MarketPermissions
Bitfield structure managing market operation permissions.
MarketSimpleInitV2Accounts
Initialize a linear market with Dutch auction and token unit scaling.
MarketSimpleInitV2AccountsBumps
MarketSimpleInitV2Args
Arguments for initializing a market with Dutch auction and token scaling support.
MarketSnapshotEvent
MarketState
Dynamic state tracking for market operations and accounting.
MarketStateSnapshot
Snapshot of the complete state of a market at a specific point in time. This struct captures all relevant market data for off-chain analysis and record-keeping.
MintOptionsAccounts
Mint option tokens by depositing market tokens.
MintOptionsAccountsBumps
MintOptionsEvent
ModifyCurveArgs
ModifyCurveMultiAccounts
Modify the price curve’s sensitivity to supply changes at the current token supply level.
ModifyCurveMultiAccountsBumps
MultiMarketInitWithDutchAccounts
Initialize a multi-curve market with Dutch auction configuration.
MultiMarketInitWithDutchAccountsBumps
MultiMarketInitWithDutchArgs
MultiPriceCurveSerialized
Serialized representation of a multi-segment bonding curve with adaptive complexity.
PdaMeta
Metadata for Program Derived Address (PDA) accounts.
PersonalPosition
Personal position account tracking an individual user’s collateral and debt in a market.
PersonalPositionInitAccounts
Initialize a personal position account for market interaction.
PersonalPositionInitAccountsBumps
PersonalPositionInitEvent
RaiseFloorFromExcessLiquidity2Event
RaiseFloorFromExcessLiquidityAccounts
DEPRECATED: use raise_floor_from_excess_liquidity2 instead, as it is more secure
RaiseFloorFromExcessLiquidityAccountsBumps
RaiseFloorFromExcessLiquidityCheckedAccounts
Raise the floor price using excess market liquidity.
RaiseFloorFromExcessLiquidityCheckedAccountsBumps
RaiseFloorFromExcessLiquidityCheckedArgs
RaiseFloorFromExcessLiquidityEvent
RaiseFloorFromTriggerEvent
RaiseFloorPreserveAreaAccounts
DEPRECATED: use raise_floor_preserve_area_checked2 instead, as it is more secure
RaiseFloorPreserveAreaAccountsBumps
RaiseFloorPreserveAreaChecked2Accounts
Raise the floor and preserve the area of the market This instruction takes in constraints
RaiseFloorPreserveAreaChecked2AccountsBumps
RaiseFloorPreserveAreaChecked2Event
RaiseFloorPreserveAreaCheckedAccounts
DEPRECATED: use raise_floor_preserve_area_checked2 instead, as it is more secure
RaiseFloorPreserveAreaCheckedAccountsBumps
RaiseFloorPreserveAreaCheckedArgs
RaiseFloorPreserveAreaCheckedArgs2
RaiseFloorPreserveAreaCheckedEvent
RaiseFloorPreserveAreaCheckedMultiAccounts
Raise floor price for multi-curve markets with validation.
RaiseFloorPreserveAreaCheckedMultiAccountsBumps
RaiseFloorPreserveAreaCheckedMultiArgs
ReceiveLogAccounts
ReceiveLogAccountsBumps
RedeemAtFloorAccounts
Redeem market tokens at the guaranteed floor price.
RedeemAtFloorAccountsBumps
RedeemAtFloorEvent
RedeemAtFloorMultiAccounts
Redeem tokens at floor price in multi-curve market.
RedeemAtFloorMultiAccountsBumps
RepayAccounts
Repay borrowed main tokens to reduce debt.
RepayAccountsBumps
RepayEvent
RepayMultiAccounts
Repay debt in a multi-curve market.
RepayMultiAccountsBumps
SegmentSerialized
Serialized representation of a single linear segment in a multi-segment curve.
SellWithExactTokenInAccounts
Sell exact amount of market tokens for main tokens.
SellWithExactTokenInAccountsBumps
SellWithExactTokenInAfterWithdrawAccounts
Withdraw collateral and sell tokens in one transaction.
SellWithExactTokenInAfterWithdrawAccountsBumps
SellWithExactTokenInAfterWithdrawEvent
SellWithExactTokenInEvent
SellWithExactTokenInMultiAccounts
Sell tokens to a multi-curve market.
SellWithExactTokenInMultiAccountsBumps
Tenant
Tenant account representing a platform operator or protocol administrator.
TenantAcceptNewAdminAccounts
Accept admin ownership of a tenant.
TenantAcceptNewAdminAccountsBumps
TenantAcceptNewAdminEvent
TenantChangeFeeMbpsAccounts
Change the fee rate for a tenant.
TenantChangeFeeMbpsAccountsBumps
TenantChangeFeeMbpsEvent
TenantCollectRevAccounts
Collect accumulated platform fees from a tenant.
TenantCollectRevAccountsBumps
TenantCollectRevEvent
TenantInitAccounts
Initialize a platform tenant.
TenantInitAccountsBumps
TenantInitWithAdminAccounts
Initialize a platform tenant with an admin.
TenantInitWithAdminAccountsBumps
TenantInitialized
TenantProposeAdminAccounts
Propose a new admin for the tenant.
TenantProposeAdminAccountsBumps
TenantProposeAdminEvent
TestLogAccounts
TestLogAccountsBumps
TestLogEvent
VersionAccounts
VersionAccountsBumps
WithdrawAccounts
Withdraw collateral from personal position.
WithdrawAccountsBumps
WithdrawEvent
WithdrawSellAndRepayAccounts
Withdraw collateral, sell it, and optionally repay debt from proceeds.
WithdrawSellAndRepayAccountsBumps
WithdrawSellAndRepayArgs
WithdrawSellAndRepayEvent

Enums§

DutchConfigValidationError
FeeBoundsError
FullOrPartialU64
MarketLinearInitValidationError
MultiMarketInitValidationError
SetFeeError

Statics§

ID
The static program ID

Functions§

check_id
Confirms that a given pubkey is equivalent to the program ID
entry
The Anchor codegen exposes a programming model where a user defines a set of methods inside of a #[program] module in a way similar to writing RPC request handlers. The macro then generates a bunch of code wrapping these user defined methods into something that can be executed on Solana.
entrypoint
Safety
id
Returns the program ID

Type Aliases§

MicroBasisPoints