Documentation
¶
Index ¶
- type AavePosition
- func (a *AavePosition) GetApy() optionalnullable.OptionalNullable[string]
- func (a *AavePosition) GetBalance() *string
- func (a *AavePosition) GetDeposits() []DepositEvent
- func (a *AavePosition) GetPnl() optionalnullable.OptionalNullable[PositionPnL]
- func (a *AavePosition) GetReserveAddress() string
- func (a *AavePosition) GetReserveSymbol() string
- func (a *AavePosition) GetType() string
- func (a *AavePosition) GetUsdValue() optionalnullable.OptionalNullable[string]
- func (a *AavePosition) GetWithdrawals() []WithdrawalEvent
- func (a AavePosition) MarshalJSON() ([]byte, error)
- func (a *AavePosition) UnmarshalJSON(data []byte) error
- type AaveVenue
- type AccountSummary
- func (a *AccountSummary) GetAvailableBorrowsUsd() string
- func (a *AccountSummary) GetEmodeCategoryID() *int64
- func (a *AccountSummary) GetEmodeLabel() optionalnullable.OptionalNullable[string]
- func (a *AccountSummary) GetHealthFactor() string
- func (a *AccountSummary) GetLtv() string
- func (a *AccountSummary) GetTotalCollateralUsd() string
- func (a *AccountSummary) GetTotalDebtUsd() string
- type ApproveTransferRequest
- type ApproveTransferResponse
- func (a *ApproveTransferResponse) GetEip712() optionalnullable.OptionalNullable[PermitTypedDataResponseOutput]
- func (a *ApproveTransferResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (a ApproveTransferResponse) MarshalJSON() ([]byte, error)
- func (a *ApproveTransferResponse) UnmarshalJSON(data []byte) error
- type BatchedSafeOperationsResponseInput
- func (b *BatchedSafeOperationsResponseInput) GetDomain() CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain
- func (b *BatchedSafeOperationsResponseInput) GetMessage() SafeTxMessage
- func (b *BatchedSafeOperationsResponseInput) GetPrimaryType() string
- func (b *BatchedSafeOperationsResponseInput) GetTypes() CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types
- func (b BatchedSafeOperationsResponseInput) MarshalJSON() ([]byte, error)
- func (b *BatchedSafeOperationsResponseInput) UnmarshalJSON(data []byte) error
- type BatchedSafeOperationsResponseOutput
- func (b *BatchedSafeOperationsResponseOutput) GetDomain() CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain
- func (b *BatchedSafeOperationsResponseOutput) GetMessage() SafeTxMessage
- func (b *BatchedSafeOperationsResponseOutput) GetPrimaryType() string
- func (b *BatchedSafeOperationsResponseOutput) GetTypes() CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types
- func (b BatchedSafeOperationsResponseOutput) MarshalJSON() ([]byte, error)
- func (b *BatchedSafeOperationsResponseOutput) UnmarshalJSON(data []byte) error
- type BorrowAmount
- type BorrowAmountType
- type BorrowableToken
- type Chain
- type ChainMarketInfo
- func (c *ChainMarketInfo) GetATokenAddress() string
- func (c *ChainMarketInfo) GetAddress() string
- func (c *ChainMarketInfo) GetAvailableLiquidity() string
- func (c *ChainMarketInfo) GetBorrowApy() string
- func (c *ChainMarketInfo) GetSupplyApy() string
- func (c *ChainMarketInfo) GetTotalBorrowed() string
- func (c *ChainMarketInfo) GetUtilizationRate() string
- type CollateralPosition
- func (c *CollateralPosition) GetAmountSupplied() *string
- func (c *CollateralPosition) GetEvents() []CreditEvent
- func (c *CollateralPosition) GetInterestEarned() optionalnullable.OptionalNullable[string]
- func (c *CollateralPosition) GetMaxLtv() optionalnullable.OptionalNullable[string]
- func (c *CollateralPosition) GetSupplyApy() optionalnullable.OptionalNullable[string]
- func (c *CollateralPosition) GetSymbol() string
- func (c *CollateralPosition) GetToken() string
- func (c *CollateralPosition) GetTotalDeposited() optionalnullable.OptionalNullable[string]
- func (c *CollateralPosition) GetTotalWithdrawn() optionalnullable.OptionalNullable[string]
- func (c *CollateralPosition) GetUsdValue() optionalnullable.OptionalNullable[string]
- func (c CollateralPosition) MarshalJSON() ([]byte, error)
- func (c *CollateralPosition) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsBalancesTokenBalance
- func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetBalance() string
- func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetBalanceFormatted() string
- func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenAddress() string
- func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenDecimals() int64
- func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenSymbol() string
- func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetTransfers() []TokenTransfer
- func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetUsdValue() optionalnullable.OptionalNullable[string]
- func (c CompassAPIBackendV2ModelsBalancesTokenBalance) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetApy7d() optionalnullable.OptionalNullable[string]
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetApy30d() optionalnullable.OptionalNullable[string]
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetApy90d() optionalnullable.OptionalNullable[string]
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetBalance() *string
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetDeposits() []DepositEvent
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetPnl() optionalnullable.OptionalNullable[PositionPnL]
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetType() string
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUnderlyingAddress() string
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUnderlyingSymbol() string
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUsdValue() optionalnullable.OptionalNullable[string]
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetVaultAddress() string
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetVaultName() string
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetWithdrawals() []WithdrawalEvent
- func (c CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetChainID() int64
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetName() *string
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetVerifyingContract() string
- func (c CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetEip712Domain() []Eip712Field
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetPermitTransferFrom() []Eip712Field
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetTokenPermissions() []Eip712Field
- func (c CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetChainID() int64
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetName() string
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetVerifyingContract() string
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetVersion() string
- func (c CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) GetEip712Domain() []Eip712DomainField
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) GetPermit() []PermitField
- func (c CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain
- func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) GetChainID() int64
- func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) GetVerifyingContract() string
- func (c CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types
- func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) GetEip712Domain() []Eip712DomainField
- func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) GetSafeTx() []SafeTxField
- func (c CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetChain() *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetChange24hPct() optionalnullable.OptionalNullable[string]
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetChange24hUsd() optionalnullable.OptionalNullable[string]
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetContractAddress() string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetCurrentPriceUsd() string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetDecimals() int64
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetName() string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetRegionExposure() []string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetSectors() []string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetSymbol() string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetUnderlyingTicker() string
- func (c CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) MarshalJSON() ([]byte, error)
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) UnmarshalJSON(data []byte) error
- type CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain
- type CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetBalance() string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetBalanceUsd() optionalnullable.OptionalNullable[string]
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetContractAddress() string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetCurrentPriceUsd() optionalnullable.OptionalNullable[string]
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetDecimals() int64
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetName() string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetSymbol() string
- func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetUnderlyingTicker() string
- type CreateAccountRequest
- type CreateAccountRequestChain
- type CreateAccountResponse
- type CreateCreditAccountRequest
- type CreateCreditAccountRequestChain
- type CreateCreditAccountResponse
- type CreateTokenizedAssetsAccountRequest
- type CreateTokenizedAssetsAccountRequestChain
- type CreateTokenizedAssetsAccountResponse
- type CreditBalancesResponse
- func (c *CreditBalancesResponse) GetBalances() map[string]CompassAPIBackendV2ModelsBalancesTokenBalance
- func (c *CreditBalancesResponse) GetCreditAccountAddress() string
- func (c *CreditBalancesResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
- func (c CreditBalancesResponse) MarshalJSON() ([]byte, error)
- func (c *CreditBalancesResponse) UnmarshalJSON(data []byte) error
- type CreditBorrowParams
- func (c *CreditBorrowParams) GetActionType() *string
- func (c *CreditBorrowParams) GetAmount() CreditBorrowParamsAmount
- func (c *CreditBorrowParams) GetFee() optionalnullable.OptionalNullable[CreditFee]
- func (c *CreditBorrowParams) GetInterestRateMode() *InterestRateMode
- func (c *CreditBorrowParams) GetToken() string
- func (c CreditBorrowParams) MarshalJSON() ([]byte, error)
- func (c *CreditBorrowParams) UnmarshalJSON(data []byte) error
- type CreditBorrowParamsAmount
- type CreditBorrowParamsAmountType
- type CreditBorrowRequest
- func (c *CreditBorrowRequest) GetAmountIn() optionalnullable.OptionalNullable[CreditBorrowRequestAmountIn]
- func (c *CreditBorrowRequest) GetBorrowAmount() BorrowAmount
- func (c *CreditBorrowRequest) GetBorrowToken() string
- func (c *CreditBorrowRequest) GetChain() Chain
- func (c *CreditBorrowRequest) GetCollateralToken() optionalnullable.OptionalNullable[string]
- func (c *CreditBorrowRequest) GetFee() optionalnullable.OptionalNullable[CreditFee]
- func (c *CreditBorrowRequest) GetGasSponsorship() *bool
- func (c *CreditBorrowRequest) GetInterestRateMode() *InterestRateMode
- func (c *CreditBorrowRequest) GetOwner() string
- func (c *CreditBorrowRequest) GetPermit2Deadline() optionalnullable.OptionalNullable[int64]
- func (c *CreditBorrowRequest) GetPermit2Nonce() optionalnullable.OptionalNullable[int64]
- func (c *CreditBorrowRequest) GetPermit2Signature() optionalnullable.OptionalNullable[string]
- func (c *CreditBorrowRequest) GetSlippage() *CreditBorrowRequestSlippage
- func (c *CreditBorrowRequest) GetTokenIn() optionalnullable.OptionalNullable[string]
- func (c CreditBorrowRequest) MarshalJSON() ([]byte, error)
- func (c *CreditBorrowRequest) UnmarshalJSON(data []byte) error
- type CreditBorrowRequestAmountIn
- type CreditBorrowRequestAmountInType
- type CreditBorrowRequestSlippage
- type CreditBorrowRequestSlippageType
- type CreditBorrowResponse
- func (c *CreditBorrowResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
- func (c *CreditBorrowResponse) GetEstimatedCollateralAmount() optionalnullable.OptionalNullable[string]
- func (c *CreditBorrowResponse) GetFeeAmount() optionalnullable.OptionalNullable[string]
- func (c *CreditBorrowResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (c CreditBorrowResponse) MarshalJSON() ([]byte, error)
- func (c *CreditBorrowResponse) UnmarshalJSON(data []byte) error
- type CreditBundleRequest
- type CreditBundleResponse
- func (c *CreditBundleResponse) GetActionsCount() int64
- func (c *CreditBundleResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
- func (c *CreditBundleResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (c CreditBundleResponse) MarshalJSON() ([]byte, error)
- func (c *CreditBundleResponse) UnmarshalJSON(data []byte) error
- type CreditEnableCollateralParams
- type CreditEvent
- func (c *CreditEvent) GetAmount() string
- func (c *CreditEvent) GetBlockNumber() int64
- func (c *CreditEvent) GetBlockTimestamp() time.Time
- func (c *CreditEvent) GetEventType() EventType
- func (c *CreditEvent) GetSymbol() string
- func (c *CreditEvent) GetTransactionHash() string
- func (c CreditEvent) MarshalJSON() ([]byte, error)
- func (c *CreditEvent) UnmarshalJSON(data []byte) error
- type CreditFee
- type CreditFeeAmount
- type CreditFeeAmountType
- type CreditFeeDenomination
- type CreditPositionsResponse
- func (c *CreditPositionsResponse) GetAccountSummary() AccountSummary
- func (c *CreditPositionsResponse) GetBorrowableTokens() []BorrowableToken
- func (c *CreditPositionsResponse) GetCollateralPositions() []CollateralPosition
- func (c *CreditPositionsResponse) GetDebtPositions() []DebtPosition
- func (c *CreditPositionsResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
- func (c CreditPositionsResponse) MarshalJSON() ([]byte, error)
- func (c *CreditPositionsResponse) UnmarshalJSON(data []byte) error
- type CreditRepayParams
- func (c *CreditRepayParams) GetActionType() *string
- func (c *CreditRepayParams) GetAmount() CreditRepayParamsAmount
- func (c *CreditRepayParams) GetInterestRateMode() *InterestRateMode
- func (c *CreditRepayParams) GetToken() string
- func (c CreditRepayParams) MarshalJSON() ([]byte, error)
- func (c *CreditRepayParams) UnmarshalJSON(data []byte) error
- type CreditRepayParamsAmount
- type CreditRepayParamsAmountType
- type CreditRepayRequest
- func (c *CreditRepayRequest) GetChain() Chain
- func (c *CreditRepayRequest) GetGasSponsorship() *bool
- func (c *CreditRepayRequest) GetInterestRateMode() *InterestRateMode
- func (c *CreditRepayRequest) GetOwner() string
- func (c *CreditRepayRequest) GetPermit2Deadline() optionalnullable.OptionalNullable[int64]
- func (c *CreditRepayRequest) GetPermit2Nonce() optionalnullable.OptionalNullable[int64]
- func (c *CreditRepayRequest) GetPermit2Signature() optionalnullable.OptionalNullable[string]
- func (c *CreditRepayRequest) GetRepayAmount() RepayAmount
- func (c *CreditRepayRequest) GetRepayToken() string
- func (c *CreditRepayRequest) GetSlippage() *CreditRepayRequestSlippage
- func (c *CreditRepayRequest) GetTokenOut() optionalnullable.OptionalNullable[string]
- func (c *CreditRepayRequest) GetWithdrawAmount() optionalnullable.OptionalNullable[WithdrawAmount]
- func (c *CreditRepayRequest) GetWithdrawToken() optionalnullable.OptionalNullable[string]
- type CreditRepayRequestSlippage
- type CreditRepayRequestSlippageType
- type CreditRepayResponse
- func (c *CreditRepayResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
- func (c *CreditRepayResponse) GetEstimatedTokenOutAmount() optionalnullable.OptionalNullable[string]
- func (c *CreditRepayResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (c CreditRepayResponse) MarshalJSON() ([]byte, error)
- func (c *CreditRepayResponse) UnmarshalJSON(data []byte) error
- type CreditSupplyParams
- type CreditSupplyParamsAmount
- type CreditSupplyParamsAmountType
- type CreditTransferRequest
- func (c *CreditTransferRequest) GetAction() CreditTransferRequestAction
- func (c *CreditTransferRequest) GetAmount() CreditTransferRequestAmount
- func (c *CreditTransferRequest) GetChain() Chain
- func (c *CreditTransferRequest) GetGasSponsorship() *bool
- func (c *CreditTransferRequest) GetOwner() string
- func (c *CreditTransferRequest) GetSpender() optionalnullable.OptionalNullable[string]
- func (c *CreditTransferRequest) GetToken() string
- type CreditTransferRequestAction
- type CreditTransferRequestAmount
- type CreditTransferRequestAmountType
- type CreditTransferResponse
- func (c *CreditTransferResponse) GetEip712() optionalnullable.OptionalNullable[CreditTransferResponseEip712]
- func (c *CreditTransferResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (c CreditTransferResponse) MarshalJSON() ([]byte, error)
- func (c *CreditTransferResponse) UnmarshalJSON(data []byte) error
- type CreditTransferResponseEip712
- func CreateCreditTransferResponseEip712BatchedSafeOperationsResponseOutput(batchedSafeOperationsResponseOutput BatchedSafeOperationsResponseOutput) CreditTransferResponseEip712
- func CreateCreditTransferResponseEip712Permit2TypedDataOutput(permit2TypedDataOutput Permit2TypedDataOutput) CreditTransferResponseEip712
- func CreateCreditTransferResponseEip712Unknown(raw json.RawMessage) CreditTransferResponseEip712
- type CreditTransferResponseEip712Type
- type CreditTransferToAddressParams
- func (c *CreditTransferToAddressParams) GetActionType() *string
- func (c *CreditTransferToAddressParams) GetAmount() CreditTransferToAddressParamsAmount
- func (c *CreditTransferToAddressParams) GetRecipient() string
- func (c *CreditTransferToAddressParams) GetToken() string
- func (c CreditTransferToAddressParams) MarshalJSON() ([]byte, error)
- func (c *CreditTransferToAddressParams) UnmarshalJSON(data []byte) error
- type CreditTransferToAddressParamsAmount
- type CreditTransferToAddressParamsAmountType
- type CreditUserOperation
- func (c *CreditUserOperation) GetBody() CreditUserOperationBody
- func (c *CreditUserOperation) GetBodyCreditBorrow() *CreditBorrowParams
- func (c *CreditUserOperation) GetBodyCreditEnableCollateral() *CreditEnableCollateralParams
- func (c *CreditUserOperation) GetBodyCreditRepay() *CreditRepayParams
- func (c *CreditUserOperation) GetBodyCreditSupply() *CreditSupplyParams
- func (c *CreditUserOperation) GetBodyCreditTransferToAddress() *CreditTransferToAddressParams
- func (c *CreditUserOperation) GetBodyCreditWithdraw() *CreditWithdrawParams
- func (c *CreditUserOperation) GetBodyV2Swap() *EarnSwapParams
- func (c *CreditUserOperation) GetBodyV2TransferFromEoa() *EarnTransferFromEOAParams
- func (c *CreditUserOperation) GetBodyV2TransferToEoa() *EarnTransferToEOAParams
- type CreditUserOperationBody
- func CreateCreditUserOperationBodyCreditBorrow(creditBorrow CreditBorrowParams) CreditUserOperationBody
- func CreateCreditUserOperationBodyCreditEnableCollateral(creditEnableCollateral CreditEnableCollateralParams) CreditUserOperationBody
- func CreateCreditUserOperationBodyCreditRepay(creditRepay CreditRepayParams) CreditUserOperationBody
- func CreateCreditUserOperationBodyCreditSupply(creditSupply CreditSupplyParams) CreditUserOperationBody
- func CreateCreditUserOperationBodyCreditTransferToAddress(creditTransferToAddress CreditTransferToAddressParams) CreditUserOperationBody
- func CreateCreditUserOperationBodyCreditWithdraw(creditWithdraw CreditWithdrawParams) CreditUserOperationBody
- func CreateCreditUserOperationBodyV2Swap(v2Swap EarnSwapParams) CreditUserOperationBody
- func CreateCreditUserOperationBodyV2TransferFromEoa(v2TransferFromEoa EarnTransferFromEOAParams) CreditUserOperationBody
- func CreateCreditUserOperationBodyV2TransferToEoa(v2TransferToEoa EarnTransferToEOAParams) CreditUserOperationBody
- type CreditUserOperationBodyType
- type CreditWithdrawParams
- type CreditWithdrawParamsAmount
- type CreditWithdrawParamsAmountType
- type DebtPosition
- func (d *DebtPosition) GetAmountBorrowed() *string
- func (d *DebtPosition) GetBorrowApy() optionalnullable.OptionalNullable[string]
- func (d *DebtPosition) GetEvents() []CreditEvent
- func (d *DebtPosition) GetInterestPaid() optionalnullable.OptionalNullable[string]
- func (d *DebtPosition) GetSymbol() string
- func (d *DebtPosition) GetToken() string
- func (d *DebtPosition) GetTotalBorrowed() optionalnullable.OptionalNullable[string]
- func (d *DebtPosition) GetTotalRepaid() optionalnullable.OptionalNullable[string]
- func (d *DebtPosition) GetUsdValue() optionalnullable.OptionalNullable[string]
- func (d DebtPosition) MarshalJSON() ([]byte, error)
- func (d *DebtPosition) UnmarshalJSON(data []byte) error
- type DepositEvent
- func (d *DepositEvent) GetBlockNumber() int64
- func (d *DepositEvent) GetBlockTimestamp() time.Time
- func (d *DepositEvent) GetCostPerUnit() string
- func (d *DepositEvent) GetInputAmount() string
- func (d *DepositEvent) GetInputSymbol() string
- func (d *DepositEvent) GetOutputAmount() string
- func (d *DepositEvent) GetOutputSymbol() string
- func (d *DepositEvent) GetTransactionHash() string
- func (d DepositEvent) MarshalJSON() ([]byte, error)
- func (d *DepositEvent) UnmarshalJSON(data []byte) error
- type Direction
- type EarnBalancesResponse
- func (e *EarnBalancesResponse) GetBalances() map[string]CompassAPIBackendV2ModelsBalancesTokenBalance
- func (e *EarnBalancesResponse) GetEarnAccountAddress() string
- func (e *EarnBalancesResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
- func (e EarnBalancesResponse) MarshalJSON() ([]byte, error)
- func (e *EarnBalancesResponse) UnmarshalJSON(data []byte) error
- type EarnManageParams
- func (e *EarnManageParams) GetAction() EarnManageParamsAction
- func (e *EarnManageParams) GetActionType() *string
- func (e *EarnManageParams) GetAmount() EarnManageParamsAmount
- func (e *EarnManageParams) GetFee() optionalnullable.OptionalNullable[Fee]
- func (e *EarnManageParams) GetVenue() EarnManageParamsVenue
- func (e *EarnManageParams) GetVenueAave() *AaveVenue
- func (e *EarnManageParams) GetVenuePendlePt() *PendlePTVenue
- func (e *EarnManageParams) GetVenueVault() *VaultVenue
- func (e EarnManageParams) MarshalJSON() ([]byte, error)
- func (e *EarnManageParams) UnmarshalJSON(data []byte) error
- type EarnManageParamsAction
- type EarnManageParamsAmount
- type EarnManageParamsAmountType
- type EarnManageParamsVenue
- type EarnManageParamsVenueType
- type EarnManageRequest
- func (e *EarnManageRequest) GetAction() EarnManageRequestAction
- func (e *EarnManageRequest) GetActionType() *string
- func (e *EarnManageRequest) GetAmount() EarnManageRequestAmount
- func (e *EarnManageRequest) GetChain() Chain
- func (e *EarnManageRequest) GetFee() optionalnullable.OptionalNullable[Fee]
- func (e *EarnManageRequest) GetGasSponsorship() *bool
- func (e *EarnManageRequest) GetOwner() string
- func (e *EarnManageRequest) GetVenue() EarnManageRequestVenue
- func (e *EarnManageRequest) GetVenueAave() *AaveVenue
- func (e *EarnManageRequest) GetVenuePendlePt() *PendlePTVenue
- func (e *EarnManageRequest) GetVenueVault() *VaultVenue
- func (e EarnManageRequest) MarshalJSON() ([]byte, error)
- func (e *EarnManageRequest) UnmarshalJSON(data []byte) error
- type EarnManageRequestAction
- type EarnManageRequestAmount
- type EarnManageRequestAmountType
- type EarnManageRequestVenue
- type EarnManageRequestVenueType
- type EarnManageResponse
- func (e *EarnManageResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
- func (e *EarnManageResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (e EarnManageResponse) MarshalJSON() ([]byte, error)
- func (e *EarnManageResponse) UnmarshalJSON(data []byte) error
- type EarnPositionsAllResponse
- type EarnPositionsResponse
- func (e *EarnPositionsResponse) GetAave() []AavePosition
- func (e *EarnPositionsResponse) GetPendlePt() []PendlePTPosition
- func (e *EarnPositionsResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
- func (e *EarnPositionsResponse) GetVaults() []CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition
- func (e EarnPositionsResponse) MarshalJSON() ([]byte, error)
- func (e *EarnPositionsResponse) UnmarshalJSON(data []byte) error
- type EarnSwapParams
- func (e *EarnSwapParams) GetActionType() *string
- func (e *EarnSwapParams) GetAmountIn() EarnSwapParamsAmountIn
- func (e *EarnSwapParams) GetSlippage() *EarnSwapParamsSlippage
- func (e *EarnSwapParams) GetTokenIn() string
- func (e *EarnSwapParams) GetTokenOut() string
- func (e EarnSwapParams) MarshalJSON() ([]byte, error)
- func (e *EarnSwapParams) UnmarshalJSON(data []byte) error
- type EarnSwapParamsAmountIn
- type EarnSwapParamsAmountInType
- type EarnSwapParamsSlippage
- type EarnSwapParamsSlippageType
- type EarnSwapRequest
- func (e *EarnSwapRequest) GetActionType() *string
- func (e *EarnSwapRequest) GetAmountIn() EarnSwapRequestAmountIn
- func (e *EarnSwapRequest) GetChain() Chain
- func (e *EarnSwapRequest) GetGasSponsorship() *bool
- func (e *EarnSwapRequest) GetOwner() string
- func (e *EarnSwapRequest) GetSlippage() *EarnSwapRequestSlippage
- func (e *EarnSwapRequest) GetTokenIn() string
- func (e *EarnSwapRequest) GetTokenOut() string
- func (e EarnSwapRequest) MarshalJSON() ([]byte, error)
- func (e *EarnSwapRequest) UnmarshalJSON(data []byte) error
- type EarnSwapRequestAmountIn
- type EarnSwapRequestAmountInType
- type EarnSwapRequestSlippage
- type EarnSwapRequestSlippageType
- type EarnSwapResponse
- func (e *EarnSwapResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
- func (e *EarnSwapResponse) GetEstimatedAmountOut() string
- func (e *EarnSwapResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (e EarnSwapResponse) MarshalJSON() ([]byte, error)
- func (e *EarnSwapResponse) UnmarshalJSON(data []byte) error
- type EarnTransferFromEOAParams
- func (e *EarnTransferFromEOAParams) GetActionType() *string
- func (e *EarnTransferFromEOAParams) GetAmount() EarnTransferFromEOAParamsAmount
- func (e *EarnTransferFromEOAParams) GetPermit2Deadline() int64
- func (e *EarnTransferFromEOAParams) GetPermit2Nonce() int64
- func (e *EarnTransferFromEOAParams) GetPermit2Signature() string
- func (e *EarnTransferFromEOAParams) GetToken() string
- func (e EarnTransferFromEOAParams) MarshalJSON() ([]byte, error)
- func (e *EarnTransferFromEOAParams) UnmarshalJSON(data []byte) error
- type EarnTransferFromEOAParamsAmount
- type EarnTransferFromEOAParamsAmountType
- type EarnTransferRequest
- func (e *EarnTransferRequest) GetAction() EarnTransferRequestAction
- func (e *EarnTransferRequest) GetAmount() EarnTransferRequestAmount
- func (e *EarnTransferRequest) GetChain() Chain
- func (e *EarnTransferRequest) GetGasSponsorship() *bool
- func (e *EarnTransferRequest) GetOwner() string
- func (e *EarnTransferRequest) GetRecipient() optionalnullable.OptionalNullable[string]
- func (e *EarnTransferRequest) GetSpender() optionalnullable.OptionalNullable[string]
- func (e *EarnTransferRequest) GetToken() string
- type EarnTransferRequestAction
- type EarnTransferRequestAmount
- type EarnTransferRequestAmountType
- type EarnTransferResponse
- func (e *EarnTransferResponse) GetEip712() optionalnullable.OptionalNullable[EarnTransferResponseEip712]
- func (e *EarnTransferResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (e EarnTransferResponse) MarshalJSON() ([]byte, error)
- func (e *EarnTransferResponse) UnmarshalJSON(data []byte) error
- type EarnTransferResponseEip712
- func CreateEarnTransferResponseEip712BatchedSafeOperationsResponseOutput(batchedSafeOperationsResponseOutput BatchedSafeOperationsResponseOutput) EarnTransferResponseEip712
- func CreateEarnTransferResponseEip712Permit2TypedDataOutput(permit2TypedDataOutput Permit2TypedDataOutput) EarnTransferResponseEip712
- func CreateEarnTransferResponseEip712Unknown(raw json.RawMessage) EarnTransferResponseEip712
- type EarnTransferResponseEip712Type
- type EarnTransferToAddressParams
- func (e *EarnTransferToAddressParams) GetActionType() *string
- func (e *EarnTransferToAddressParams) GetAmount() EarnTransferToAddressParamsAmount
- func (e *EarnTransferToAddressParams) GetRecipient() string
- func (e *EarnTransferToAddressParams) GetToken() string
- func (e EarnTransferToAddressParams) MarshalJSON() ([]byte, error)
- func (e *EarnTransferToAddressParams) UnmarshalJSON(data []byte) error
- type EarnTransferToAddressParamsAmount
- type EarnTransferToAddressParamsAmountType
- type EarnTransferToEOAParams
- func (e *EarnTransferToEOAParams) GetActionType() *string
- func (e *EarnTransferToEOAParams) GetAmount() EarnTransferToEOAParamsAmount
- func (e *EarnTransferToEOAParams) GetToken() string
- func (e EarnTransferToEOAParams) MarshalJSON() ([]byte, error)
- func (e *EarnTransferToEOAParams) UnmarshalJSON(data []byte) error
- type EarnTransferToEOAParamsAmount
- type EarnTransferToEOAParamsAmountType
- type Eip712DomainField
- type Eip712Field
- type EventType
- type Fee
- type FeeAmount
- type FeeAmountType
- type FeeDenomination
- type GlobalMarketsPerpsApproveBuilderFeeRequest
- type GlobalMarketsPerpsCancelOrderRequest
- func (g *GlobalMarketsPerpsCancelOrderRequest) GetAsset() string
- func (g *GlobalMarketsPerpsCancelOrderRequest) GetClientOrderID() optionalnullable.OptionalNullable[int64]
- func (g *GlobalMarketsPerpsCancelOrderRequest) GetOrderID() optionalnullable.OptionalNullable[int64]
- func (g *GlobalMarketsPerpsCancelOrderRequest) GetOwner() string
- type GlobalMarketsPerpsCategory
- type GlobalMarketsPerpsDepositRequest
- type GlobalMarketsPerpsDepositResponse
- type GlobalMarketsPerpsEnableUnifiedAccountRequest
- type GlobalMarketsPerpsEnableUnifiedAccountResponse
- func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) GetAction() optionalnullable.OptionalNullable[map[string]any]
- func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) GetMode() string
- func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) GetNonce() optionalnullable.OptionalNullable[int64]
- func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) GetTypedData() optionalnullable.OptionalNullable[map[string]any]
- func (g GlobalMarketsPerpsEnableUnifiedAccountResponse) MarshalJSON() ([]byte, error)
- func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) UnmarshalJSON(data []byte) error
- type GlobalMarketsPerpsEnsureLeverageRequest
- type GlobalMarketsPerpsEnsureLeverageResponse
- func (g *GlobalMarketsPerpsEnsureLeverageResponse) GetAction() optionalnullable.OptionalNullable[map[string]any]
- func (g *GlobalMarketsPerpsEnsureLeverageResponse) GetLeverageOk() bool
- func (g *GlobalMarketsPerpsEnsureLeverageResponse) GetNonce() optionalnullable.OptionalNullable[int64]
- func (g *GlobalMarketsPerpsEnsureLeverageResponse) GetTypedData() optionalnullable.OptionalNullable[map[string]any]
- func (g GlobalMarketsPerpsEnsureLeverageResponse) MarshalJSON() ([]byte, error)
- func (g *GlobalMarketsPerpsEnsureLeverageResponse) UnmarshalJSON(data []byte) error
- type GlobalMarketsPerpsExecuteRequest
- type GlobalMarketsPerpsExecuteResponse
- type GlobalMarketsPerpsLimitOrderRequest
- func (g *GlobalMarketsPerpsLimitOrderRequest) GetAsset() string
- func (g *GlobalMarketsPerpsLimitOrderRequest) GetClientOrderID() optionalnullable.OptionalNullable[int64]
- func (g *GlobalMarketsPerpsLimitOrderRequest) GetOwner() string
- func (g *GlobalMarketsPerpsLimitOrderRequest) GetPrice() string
- func (g *GlobalMarketsPerpsLimitOrderRequest) GetReduceOnly() *bool
- func (g *GlobalMarketsPerpsLimitOrderRequest) GetSide() string
- func (g *GlobalMarketsPerpsLimitOrderRequest) GetSize() string
- func (g *GlobalMarketsPerpsLimitOrderRequest) GetTimeInForce() *string
- type GlobalMarketsPerpsMarketOrderRequest
- func (g *GlobalMarketsPerpsMarketOrderRequest) GetAsset() string
- func (g *GlobalMarketsPerpsMarketOrderRequest) GetOwner() string
- func (g *GlobalMarketsPerpsMarketOrderRequest) GetReduceOnly() *bool
- func (g *GlobalMarketsPerpsMarketOrderRequest) GetSide() string
- func (g *GlobalMarketsPerpsMarketOrderRequest) GetSize() string
- func (g *GlobalMarketsPerpsMarketOrderRequest) GetSlippagePercent() *float64
- type GlobalMarketsPerpsOpportunitiesResponse
- type GlobalMarketsPerpsOpportunity
- func (g *GlobalMarketsPerpsOpportunity) GetAsset() string
- func (g *GlobalMarketsPerpsOpportunity) GetAssetID() int64
- func (g *GlobalMarketsPerpsOpportunity) GetCategory() string
- func (g *GlobalMarketsPerpsOpportunity) GetFundingRate() string
- func (g *GlobalMarketsPerpsOpportunity) GetMarkPrice() string
- func (g *GlobalMarketsPerpsOpportunity) GetMaxLeverage() int64
- func (g *GlobalMarketsPerpsOpportunity) GetOpenInterest() string
- func (g *GlobalMarketsPerpsOpportunity) GetOraclePrice() string
- func (g *GlobalMarketsPerpsOpportunity) GetSzDecimals() int64
- func (g *GlobalMarketsPerpsOpportunity) GetVolume24h() string
- type GlobalMarketsPerpsPosition
- func (g *GlobalMarketsPerpsPosition) GetAsset() string
- func (g *GlobalMarketsPerpsPosition) GetAssetID() int64
- func (g *GlobalMarketsPerpsPosition) GetEntryPrice() string
- func (g *GlobalMarketsPerpsPosition) GetFundingAccrued() string
- func (g *GlobalMarketsPerpsPosition) GetLeverage() string
- func (g *GlobalMarketsPerpsPosition) GetLiquidationPrice() optionalnullable.OptionalNullable[string]
- func (g *GlobalMarketsPerpsPosition) GetMarginUsed() string
- func (g *GlobalMarketsPerpsPosition) GetMarkPrice() string
- func (g *GlobalMarketsPerpsPosition) GetSide() Side
- func (g *GlobalMarketsPerpsPosition) GetSize() string
- func (g *GlobalMarketsPerpsPosition) GetUnrealizedPnl() string
- type GlobalMarketsPerpsPositionsResponse
- type GlobalMarketsPerpsSignableActionResponse
- type GlobalMarketsPerpsWithdrawRequest
- type HTTPMetadata
- type InterestRateMode
- type ListAaveMarketsResponse
- type Loc
- type LocType
- type MarketAllocation
- func (m *MarketAllocation) GetAllocationPct() optionalnullable.OptionalNullable[float64]
- func (m *MarketAllocation) GetCollateralToken() string
- func (m *MarketAllocation) GetCollateralTokenSymbol() optionalnullable.OptionalNullable[string]
- func (m *MarketAllocation) GetLltv() string
- func (m *MarketAllocation) GetLoanToken() string
- func (m *MarketAllocation) GetLoanTokenSymbol() optionalnullable.OptionalNullable[string]
- func (m *MarketAllocation) GetMarketID() string
- func (m *MarketAllocation) GetSupplyAssets() optionalnullable.OptionalNullable[string]
- func (m *MarketAllocation) GetSupplyCap() optionalnullable.OptionalNullable[string]
- type MarketDetail
- func (m *MarketDetail) GetAverageVolume() optionalnullable.OptionalNullable[string]
- func (m *MarketDetail) GetCandles() optionalnullable.OptionalNullable[[]OhlcCandle]
- func (m *MarketDetail) GetChain() *MarketDetailChain
- func (m *MarketDetail) GetChange24hPct() optionalnullable.OptionalNullable[string]
- func (m *MarketDetail) GetChange24hUsd() optionalnullable.OptionalNullable[string]
- func (m *MarketDetail) GetContractAddress() string
- func (m *MarketDetail) GetCurrentPriceUsd() string
- func (m *MarketDetail) GetDecimals() int64
- func (m *MarketDetail) GetMarketCap() optionalnullable.OptionalNullable[string]
- func (m *MarketDetail) GetName() string
- func (m *MarketDetail) GetPriceHigh52w() optionalnullable.OptionalNullable[string]
- func (m *MarketDetail) GetPriceHistory24h() []PricePoint
- func (m *MarketDetail) GetPriceLow52w() optionalnullable.OptionalNullable[string]
- func (m *MarketDetail) GetRegionExposure() []string
- func (m *MarketDetail) GetSectors() []string
- func (m *MarketDetail) GetSharesMultiplier() optionalnullable.OptionalNullable[string]
- func (m *MarketDetail) GetSharesOutstanding() optionalnullable.OptionalNullable[string]
- func (m *MarketDetail) GetSymbol() string
- func (m *MarketDetail) GetTotalHolders() optionalnullable.OptionalNullable[int64]
- func (m *MarketDetail) GetTradableSessions() []string
- func (m *MarketDetail) GetUnderlyingTicker() string
- func (m *MarketDetail) GetVolume24h() optionalnullable.OptionalNullable[string]
- func (m MarketDetail) MarshalJSON() ([]byte, error)
- func (m *MarketDetail) UnmarshalJSON(data []byte) error
- type MarketDetailChain
- type MaxSupplyApyInfo
- type OhlcCandle
- type OperationType
- type OrderStatus
- func (o *OrderStatus) GetFillPriceUsd() optionalnullable.OptionalNullable[string]
- func (o *OrderStatus) GetFillTxHash() optionalnullable.OptionalNullable[string]
- func (o *OrderStatus) GetFilledAmount() optionalnullable.OptionalNullable[string]
- func (o *OrderStatus) GetOrderHash() string
- func (o *OrderStatus) GetStatus() Status
- func (o *OrderStatus) GetSubmittedAt() optionalnullable.OptionalNullable[string]
- func (o *OrderStatus) GetUpdatedAt() string
- type OrderToSign
- type PendleDepositEvent
- func (p *PendleDepositEvent) GetBlockNumber() int64
- func (p *PendleDepositEvent) GetBlockTimestamp() time.Time
- func (p *PendleDepositEvent) GetCostPerUnit() string
- func (p *PendleDepositEvent) GetInputAmount() string
- func (p *PendleDepositEvent) GetInputSymbol() string
- func (p *PendleDepositEvent) GetOutputAmount() string
- func (p *PendleDepositEvent) GetOutputSymbol() string
- func (p *PendleDepositEvent) GetTransactionHash() string
- func (p PendleDepositEvent) MarshalJSON() ([]byte, error)
- func (p *PendleDepositEvent) UnmarshalJSON(data []byte) error
- type PendleMarketInfo
- func (p *PendleMarketInfo) GetChain() string
- func (p *PendleMarketInfo) GetExpiry() optionalnullable.OptionalNullable[int64]
- func (p *PendleMarketInfo) GetImpliedApy() optionalnullable.OptionalNullable[string]
- func (p *PendleMarketInfo) GetMarketAddress() string
- func (p *PendleMarketInfo) GetPtAddress() string
- func (p *PendleMarketInfo) GetPtName() optionalnullable.OptionalNullable[string]
- func (p *PendleMarketInfo) GetPtSymbol() optionalnullable.OptionalNullable[string]
- func (p *PendleMarketInfo) GetSyAddress() optionalnullable.OptionalNullable[string]
- func (p *PendleMarketInfo) GetTvlUsd() optionalnullable.OptionalNullable[string]
- func (p *PendleMarketInfo) GetUnderlyingAsset() optionalnullable.OptionalNullable[string]
- func (p *PendleMarketInfo) GetUnderlyingName() optionalnullable.OptionalNullable[string]
- func (p *PendleMarketInfo) GetUnderlyingSymbol() optionalnullable.OptionalNullable[string]
- func (p *PendleMarketInfo) GetYtAddress() optionalnullable.OptionalNullable[string]
- type PendleMarketsResponse
- type PendlePTPosition
- func (p *PendlePTPosition) GetCurrentPtToSyRate() *string
- func (p *PendlePTPosition) GetDeposits() []PendleDepositEvent
- func (p *PendlePTPosition) GetExpiry() int64
- func (p *PendlePTPosition) GetImpliedApy() optionalnullable.OptionalNullable[string]
- func (p *PendlePTPosition) GetMarketAddress() string
- func (p *PendlePTPosition) GetPnl() optionalnullable.OptionalNullable[PositionPnL]
- func (p *PendlePTPosition) GetPtAddress() string
- func (p *PendlePTPosition) GetPtBalance() *string
- func (p *PendlePTPosition) GetType() string
- func (p *PendlePTPosition) GetUnderlyingAddress() string
- func (p *PendlePTPosition) GetUnderlyingSymbol() string
- func (p *PendlePTPosition) GetUsdValue() optionalnullable.OptionalNullable[string]
- func (p *PendlePTPosition) GetWithdrawals() []PendleWithdrawalEvent
- func (p *PendlePTPosition) GetYieldTokenAddress() string
- func (p PendlePTPosition) MarshalJSON() ([]byte, error)
- func (p *PendlePTPosition) UnmarshalJSON(data []byte) error
- type PendlePTVenue
- func (p *PendlePTVenue) GetMarketAddress() string
- func (p *PendlePTVenue) GetMaxSlippagePercent() *float64
- func (p *PendlePTVenue) GetToken() optionalnullable.OptionalNullable[string]
- func (p *PendlePTVenue) GetType() string
- func (p PendlePTVenue) MarshalJSON() ([]byte, error)
- func (p *PendlePTVenue) UnmarshalJSON(data []byte) error
- type PendleWithdrawalEvent
- func (p *PendleWithdrawalEvent) GetBlockNumber() int64
- func (p *PendleWithdrawalEvent) GetBlockTimestamp() time.Time
- func (p *PendleWithdrawalEvent) GetCostPerUnit() string
- func (p *PendleWithdrawalEvent) GetInputAmount() string
- func (p *PendleWithdrawalEvent) GetInputSymbol() string
- func (p *PendleWithdrawalEvent) GetOutputAmount() string
- func (p *PendleWithdrawalEvent) GetOutputSymbol() string
- func (p *PendleWithdrawalEvent) GetRealizedPnl() string
- func (p *PendleWithdrawalEvent) GetTransactionHash() string
- func (p PendleWithdrawalEvent) MarshalJSON() ([]byte, error)
- func (p *PendleWithdrawalEvent) UnmarshalJSON(data []byte) error
- type Permit2TypedDataInput
- func (p *Permit2TypedDataInput) GetDomain() CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain
- func (p *Permit2TypedDataInput) GetMessage() PermitTransferFromMessage
- func (p *Permit2TypedDataInput) GetPrimaryType() *string
- func (p *Permit2TypedDataInput) GetTypes() CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types
- func (p Permit2TypedDataInput) MarshalJSON() ([]byte, error)
- func (p *Permit2TypedDataInput) UnmarshalJSON(data []byte) error
- type Permit2TypedDataOutput
- func (p *Permit2TypedDataOutput) GetDomain() CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain
- func (p *Permit2TypedDataOutput) GetMessage() PermitTransferFromMessage
- func (p *Permit2TypedDataOutput) GetPrimaryType() *string
- func (p *Permit2TypedDataOutput) GetTypes() CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types
- func (p Permit2TypedDataOutput) MarshalJSON() ([]byte, error)
- func (p *Permit2TypedDataOutput) UnmarshalJSON(data []byte) error
- type PermitField
- type PermitMessage
- func (p *PermitMessage) GetDeadline() string
- func (p *PermitMessage) GetNonce() string
- func (p *PermitMessage) GetOwner() string
- func (p *PermitMessage) GetSpender() string
- func (p *PermitMessage) GetValue() string
- func (p PermitMessage) MarshalJSON() ([]byte, error)
- func (p *PermitMessage) UnmarshalJSON(data []byte) error
- type PermitTransferFromMessage
- func (p *PermitTransferFromMessage) GetDeadline() int64
- func (p *PermitTransferFromMessage) GetNonce() int64
- func (p *PermitTransferFromMessage) GetPermitted() TokenPermissions
- func (p *PermitTransferFromMessage) GetSpender() string
- func (p PermitTransferFromMessage) MarshalJSON() ([]byte, error)
- func (p *PermitTransferFromMessage) UnmarshalJSON(data []byte) error
- type PermitTypedDataResponseInput
- func (p *PermitTypedDataResponseInput) GetDomain() CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain
- func (p *PermitTypedDataResponseInput) GetMessage() PermitMessage
- func (p *PermitTypedDataResponseInput) GetPrimaryType() string
- func (p *PermitTypedDataResponseInput) GetTypes() CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types
- func (p PermitTypedDataResponseInput) MarshalJSON() ([]byte, error)
- func (p *PermitTypedDataResponseInput) UnmarshalJSON(data []byte) error
- type PermitTypedDataResponseOutput
- func (p *PermitTypedDataResponseOutput) GetDomain() CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain
- func (p *PermitTypedDataResponseOutput) GetMessage() PermitMessage
- func (p *PermitTypedDataResponseOutput) GetPrimaryType() string
- func (p *PermitTypedDataResponseOutput) GetTypes() CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types
- func (p PermitTypedDataResponseOutput) MarshalJSON() ([]byte, error)
- func (p *PermitTypedDataResponseOutput) UnmarshalJSON(data []byte) error
- type PositionPnL
- type PricePoint
- type Product
- type Quote
- type QuoteFee
- type RepayAmount
- type RepayAmountType
- type SafeMessageEip712Response
- func (s *SafeMessageEip712Response) GetDomain() CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain
- func (s *SafeMessageEip712Response) GetMessage() SafeMessageMessage
- func (s *SafeMessageEip712Response) GetPrimaryType() string
- func (s *SafeMessageEip712Response) GetTypes() SafeMessageEip712Types
- func (s SafeMessageEip712Response) MarshalJSON() ([]byte, error)
- func (s *SafeMessageEip712Response) UnmarshalJSON(data []byte) error
- type SafeMessageEip712Types
- type SafeMessageField
- type SafeMessageMessage
- type SafeTxField
- type SafeTxMessage
- func (s *SafeTxMessage) GetBaseGas() string
- func (s *SafeTxMessage) GetData() string
- func (s *SafeTxMessage) GetGasPrice() string
- func (s *SafeTxMessage) GetGasToken() string
- func (s *SafeTxMessage) GetNonce() string
- func (s *SafeTxMessage) GetOperation() OperationType
- func (s *SafeTxMessage) GetRefundReceiver() string
- func (s *SafeTxMessage) GetSafeTxGas() string
- func (s *SafeTxMessage) GetTo() string
- func (s *SafeTxMessage) GetValue() string
- func (s SafeTxMessage) MarshalJSON() ([]byte, error)
- func (s *SafeTxMessage) UnmarshalJSON(data []byte) error
- type Security
- type Side
- type SponsorGasRequest
- func (s *SponsorGasRequest) GetChain() Chain
- func (s *SponsorGasRequest) GetEip712() SponsorGasRequestEip712
- func (s *SponsorGasRequest) GetOwner() string
- func (s *SponsorGasRequest) GetProduct() *Product
- func (s *SponsorGasRequest) GetSender() string
- func (s *SponsorGasRequest) GetSignature() string
- type SponsorGasRequestEip712
- func CreateSponsorGasRequestEip712BatchedSafeOperationsResponseInput(batchedSafeOperationsResponseInput BatchedSafeOperationsResponseInput) SponsorGasRequestEip712
- func CreateSponsorGasRequestEip712Permit2TypedDataInput(permit2TypedDataInput Permit2TypedDataInput) SponsorGasRequestEip712
- func CreateSponsorGasRequestEip712PermitTypedDataResponseInput(permitTypedDataResponseInput PermitTypedDataResponseInput) SponsorGasRequestEip712
- type SponsorGasRequestEip712Type
- type SponsorGasResponse
- type Status
- type TokenAmount
- type TokenMarketData
- type TokenPermissions
- type TokenTransfer
- func (t *TokenTransfer) GetAmount() string
- func (t *TokenTransfer) GetAmountFormatted() string
- func (t *TokenTransfer) GetBlockNumber() int64
- func (t *TokenTransfer) GetBlockTimestamp() time.Time
- func (t *TokenTransfer) GetDirection() Direction
- func (t *TokenTransfer) GetFromAddress() string
- func (t *TokenTransfer) GetToAddress() string
- func (t *TokenTransfer) GetTransactionHash() string
- func (t TokenTransfer) MarshalJSON() ([]byte, error)
- func (t *TokenTransfer) UnmarshalJSON(data []byte) error
- type TokenizedAssetsBuildOrderRequest
- func (t *TokenizedAssetsBuildOrderRequest) GetAmount() string
- func (t *TokenizedAssetsBuildOrderRequest) GetChain() Chain
- func (t *TokenizedAssetsBuildOrderRequest) GetFromToken() string
- func (t *TokenizedAssetsBuildOrderRequest) GetOwner() string
- func (t *TokenizedAssetsBuildOrderRequest) GetSlippageBps() *int64
- func (t *TokenizedAssetsBuildOrderRequest) GetToToken() string
- type TokenizedAssetsBuildOrderResponse
- func (t *TokenizedAssetsBuildOrderResponse) GetApprovalSafeTxEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
- func (t *TokenizedAssetsBuildOrderResponse) GetOrder() OrderToSign
- func (t *TokenizedAssetsBuildOrderResponse) GetQuote() Quote
- func (t TokenizedAssetsBuildOrderResponse) MarshalJSON() ([]byte, error)
- func (t *TokenizedAssetsBuildOrderResponse) UnmarshalJSON(data []byte) error
- type TokenizedAssetsCancelOrderRequest
- type TokenizedAssetsCancelOrderResponse
- type TokenizedAssetsMarketsListResponse
- type TokenizedAssetsOhlcInterval
- type TokenizedAssetsOhlcRange
- type TokenizedAssetsPositionsResponse
- func (t *TokenizedAssetsPositionsResponse) GetChain() *TokenizedAssetsPositionsResponseChain
- func (t *TokenizedAssetsPositionsResponse) GetPositions() []CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition
- func (t *TokenizedAssetsPositionsResponse) GetTotalUsd() string
- func (t *TokenizedAssetsPositionsResponse) GetWallet() string
- func (t TokenizedAssetsPositionsResponse) MarshalJSON() ([]byte, error)
- func (t *TokenizedAssetsPositionsResponse) UnmarshalJSON(data []byte) error
- type TokenizedAssetsPositionsResponseChain
- type TokenizedAssetsQuoteRequest
- type TokenizedAssetsQuoteResponse
- type TokenizedAssetsSubmitOrderRequest
- func (t *TokenizedAssetsSubmitOrderRequest) GetExtension() string
- func (t *TokenizedAssetsSubmitOrderRequest) GetOrderHash() optionalnullable.OptionalNullable[string]
- func (t *TokenizedAssetsSubmitOrderRequest) GetQuoteID() string
- func (t *TokenizedAssetsSubmitOrderRequest) GetSignature() string
- func (t *TokenizedAssetsSubmitOrderRequest) GetSignedOrder() map[string]any
- type TokenizedAssetsSubmitOrderResponse
- type UnsignedTransaction
- func (u *UnsignedTransaction) GetChainID() string
- func (u *UnsignedTransaction) GetData() string
- func (u *UnsignedTransaction) GetFrom() string
- func (u *UnsignedTransaction) GetGas() *string
- func (u *UnsignedTransaction) GetMaxFeePerGas() string
- func (u *UnsignedTransaction) GetMaxPriorityFeePerGas() string
- func (u *UnsignedTransaction) GetNonce() string
- func (u *UnsignedTransaction) GetTo() string
- func (u *UnsignedTransaction) GetValue() string
- type V2BundleRequest
- type V2BundleResponse
- func (v *V2BundleResponse) GetActionsCount() int64
- func (v *V2BundleResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
- func (v *V2BundleResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
- func (v V2BundleResponse) MarshalJSON() ([]byte, error)
- func (v *V2BundleResponse) UnmarshalJSON(data []byte) error
- type V2UserOperation
- func (v *V2UserOperation) GetBody() V2UserOperationBody
- func (v *V2UserOperation) GetBodyV2Manage() *EarnManageParams
- func (v *V2UserOperation) GetBodyV2Swap() *EarnSwapParams
- func (v *V2UserOperation) GetBodyV2TransferFromEoa() *EarnTransferFromEOAParams
- func (v *V2UserOperation) GetBodyV2TransferToAddress() *EarnTransferToAddressParams
- func (v *V2UserOperation) GetBodyV2TransferToEoa() *EarnTransferToEOAParams
- type V2UserOperationBody
- func CreateV2UserOperationBodyV2Manage(v2Manage EarnManageParams) V2UserOperationBody
- func CreateV2UserOperationBodyV2Swap(v2Swap EarnSwapParams) V2UserOperationBody
- func CreateV2UserOperationBodyV2TransferFromEoa(v2TransferFromEoa EarnTransferFromEOAParams) V2UserOperationBody
- func CreateV2UserOperationBodyV2TransferToAddress(v2TransferToAddress EarnTransferToAddressParams) V2UserOperationBody
- func CreateV2UserOperationBodyV2TransferToEoa(v2TransferToEoa EarnTransferToEOAParams) V2UserOperationBody
- type V2UserOperationBodyType
- type ValidationError
- type VaultInfo
- func (v *VaultInfo) GetApy7d() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetApy30d() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetApy90d() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetAsset() string
- func (v *VaultInfo) GetAssetName() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetAssetSymbol() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetChain() string
- func (v *VaultInfo) GetDepositCap() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetDepositCapUsd() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetFactoryVersion() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetLiquidityUsd() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetMarkets() []MarketAllocation
- func (v *VaultInfo) GetName() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetOwner() string
- func (v *VaultInfo) GetSymbol() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetTvlUsd() optionalnullable.OptionalNullable[string]
- func (v *VaultInfo) GetVaultAddress() string
- func (v VaultInfo) MarshalJSON() ([]byte, error)
- func (v *VaultInfo) UnmarshalJSON(data []byte) error
- type VaultVenue
- type VaultsResponse
- type WithdrawAmount
- type WithdrawAmountType
- type WithdrawalEvent
- func (w *WithdrawalEvent) GetBlockNumber() int64
- func (w *WithdrawalEvent) GetBlockTimestamp() time.Time
- func (w *WithdrawalEvent) GetInputAmount() string
- func (w *WithdrawalEvent) GetInputSymbol() string
- func (w *WithdrawalEvent) GetOutputAmount() string
- func (w *WithdrawalEvent) GetOutputSymbol() string
- func (w *WithdrawalEvent) GetRealizedPnl() string
- func (w *WithdrawalEvent) GetTransactionHash() string
- func (w WithdrawalEvent) MarshalJSON() ([]byte, error)
- func (w *WithdrawalEvent) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AavePosition ¶
type AavePosition struct {
// The reserve (underlying token) address.
ReserveAddress string `json:"reserve_address"`
// Symbol of the reserve asset (e.g., USDC).
ReserveSymbol string `json:"reserve_symbol"`
// The user's position value (aToken balance).
Balance *string `json:"balance"`
// Position value in USD (null if price unavailable).
UsdValue optionalnullable.OptionalNullable[string] `json:"usd_value,omitzero"`
// PnL metrics for this position.
Pnl optionalnullable.OptionalNullable[PositionPnL] `json:"pnl,omitzero"`
// All deposit events for this position.
Deposits []DepositEvent `json:"deposits,omitzero"`
// All withdrawal events for this position.
Withdrawals []WithdrawalEvent `json:"withdrawals,omitzero"`
// Current supply APY (percentage).
Apy optionalnullable.OptionalNullable[string] `json:"apy,omitzero"`
// contains filtered or unexported fields
}
AavePosition - Aave V3 lending position.
Note: Unlike the old model, this no longer has vault_address/vault_name fields as they were nonsensical for Aave positions.
func (*AavePosition) GetApy ¶
func (a *AavePosition) GetApy() optionalnullable.OptionalNullable[string]
func (*AavePosition) GetBalance ¶
func (a *AavePosition) GetBalance() *string
func (*AavePosition) GetDeposits ¶
func (a *AavePosition) GetDeposits() []DepositEvent
func (*AavePosition) GetPnl ¶
func (a *AavePosition) GetPnl() optionalnullable.OptionalNullable[PositionPnL]
func (*AavePosition) GetReserveAddress ¶
func (a *AavePosition) GetReserveAddress() string
func (*AavePosition) GetReserveSymbol ¶
func (a *AavePosition) GetReserveSymbol() string
func (*AavePosition) GetType ¶
func (a *AavePosition) GetType() string
func (*AavePosition) GetUsdValue ¶
func (a *AavePosition) GetUsdValue() optionalnullable.OptionalNullable[string]
func (*AavePosition) GetWithdrawals ¶
func (a *AavePosition) GetWithdrawals() []WithdrawalEvent
func (AavePosition) MarshalJSON ¶
func (a AavePosition) MarshalJSON() ([]byte, error)
func (*AavePosition) UnmarshalJSON ¶
func (a *AavePosition) UnmarshalJSON(data []byte) error
type AaveVenue ¶
type AaveVenue struct {
// The reserve token for the Aave pool you are interacting with.
Token string `json:"token"`
// contains filtered or unexported fields
}
func (AaveVenue) MarshalJSON ¶
func (*AaveVenue) UnmarshalJSON ¶
type AccountSummary ¶
type AccountSummary struct {
// Health factor. Above 1 is safe; below 1 risks liquidation.
HealthFactor string `json:"health_factor"`
// Total collateral value in USD.
TotalCollateralUsd string `json:"total_collateral_usd"`
// Total debt value in USD.
TotalDebtUsd string `json:"total_debt_usd"`
// Available borrow capacity in USD.
AvailableBorrowsUsd string `json:"available_borrows_usd"`
// Current loan-to-value ratio.
Ltv string `json:"ltv"`
// E-Mode category ID. 0 = disabled. E-Mode gives higher LTV when collateral and debt are price-correlated (e.g. stablecoin-to-stablecoin or ETH-to-ETH-derivative).
EmodeCategoryID *int64 `json:"emode_category_id,omitzero"`
// Human-readable E-Mode category name (e.g. 'Stablecoins', 'ETH correlated'). Null when E-Mode is disabled (category 0).
EmodeLabel optionalnullable.OptionalNullable[string] `json:"emode_label,omitzero"`
}
AccountSummary - Aave account-level summary from getUserAccountData().
func (*AccountSummary) GetAvailableBorrowsUsd ¶
func (a *AccountSummary) GetAvailableBorrowsUsd() string
func (*AccountSummary) GetEmodeCategoryID ¶
func (a *AccountSummary) GetEmodeCategoryID() *int64
func (*AccountSummary) GetEmodeLabel ¶
func (a *AccountSummary) GetEmodeLabel() optionalnullable.OptionalNullable[string]
func (*AccountSummary) GetHealthFactor ¶
func (a *AccountSummary) GetHealthFactor() string
func (*AccountSummary) GetLtv ¶
func (a *AccountSummary) GetLtv() string
func (*AccountSummary) GetTotalCollateralUsd ¶
func (a *AccountSummary) GetTotalCollateralUsd() string
func (*AccountSummary) GetTotalDebtUsd ¶
func (a *AccountSummary) GetTotalDebtUsd() string
type ApproveTransferRequest ¶
type ApproveTransferRequest struct {
// The wallet address that owns the Earn Account.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// The token you would like to transfer with gas sponsorship.
Token string `json:"token"`
// Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint.
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
}
func (*ApproveTransferRequest) GetChain ¶
func (a *ApproveTransferRequest) GetChain() Chain
func (*ApproveTransferRequest) GetGasSponsorship ¶
func (a *ApproveTransferRequest) GetGasSponsorship() *bool
func (*ApproveTransferRequest) GetOwner ¶
func (a *ApproveTransferRequest) GetOwner() string
func (*ApproveTransferRequest) GetToken ¶
func (a *ApproveTransferRequest) GetToken() string
type ApproveTransferResponse ¶
type ApproveTransferResponse struct {
// Unsigned approval transaction. Present when gas_sponsorship=false.
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
// EIP-712 typed data for off-chain permit signing. Present when gas_sponsorship=true.
Eip712 optionalnullable.OptionalNullable[PermitTypedDataResponseOutput] `json:"eip_712,omitzero"`
}
func (*ApproveTransferResponse) GetEip712 ¶
func (a *ApproveTransferResponse) GetEip712() optionalnullable.OptionalNullable[PermitTypedDataResponseOutput]
func (*ApproveTransferResponse) GetTransaction ¶
func (a *ApproveTransferResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (ApproveTransferResponse) MarshalJSON ¶
func (a ApproveTransferResponse) MarshalJSON() ([]byte, error)
func (*ApproveTransferResponse) UnmarshalJSON ¶
func (a *ApproveTransferResponse) UnmarshalJSON(data []byte) error
type BatchedSafeOperationsResponseInput ¶
type BatchedSafeOperationsResponseInput struct {
// The EIP-712 domain separator.
Domain CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain `json:"domain"`
// The type definitions for EIP-712 structured data.
Types CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types `json:"types"`
// The message data for the transaction.
Message SafeTxMessage `json:"message"`
// contains filtered or unexported fields
}
BatchedSafeOperationsResponseInput - Response containing EIP-712 typed data for Safe transaction signing.
func (*BatchedSafeOperationsResponseInput) GetMessage ¶
func (b *BatchedSafeOperationsResponseInput) GetMessage() SafeTxMessage
func (*BatchedSafeOperationsResponseInput) GetPrimaryType ¶
func (b *BatchedSafeOperationsResponseInput) GetPrimaryType() string
func (BatchedSafeOperationsResponseInput) MarshalJSON ¶
func (b BatchedSafeOperationsResponseInput) MarshalJSON() ([]byte, error)
func (*BatchedSafeOperationsResponseInput) UnmarshalJSON ¶
func (b *BatchedSafeOperationsResponseInput) UnmarshalJSON(data []byte) error
type BatchedSafeOperationsResponseOutput ¶
type BatchedSafeOperationsResponseOutput struct {
// The EIP-712 domain separator.
Domain CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain `json:"domain"`
// The type definitions for EIP-712 structured data.
Types CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types `json:"types"`
// The message data for the transaction.
Message SafeTxMessage `json:"message"`
// contains filtered or unexported fields
}
BatchedSafeOperationsResponseOutput - Response containing EIP-712 typed data for Safe transaction signing.
func (*BatchedSafeOperationsResponseOutput) GetMessage ¶
func (b *BatchedSafeOperationsResponseOutput) GetMessage() SafeTxMessage
func (*BatchedSafeOperationsResponseOutput) GetPrimaryType ¶
func (b *BatchedSafeOperationsResponseOutput) GetPrimaryType() string
func (BatchedSafeOperationsResponseOutput) MarshalJSON ¶
func (b BatchedSafeOperationsResponseOutput) MarshalJSON() ([]byte, error)
func (*BatchedSafeOperationsResponseOutput) UnmarshalJSON ¶
func (b *BatchedSafeOperationsResponseOutput) UnmarshalJSON(data []byte) error
type BorrowAmount ¶
type BorrowAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type BorrowAmountType
}
BorrowAmount - Amount to borrow (in token units, not wei).
func CreateBorrowAmountNumber ¶
func CreateBorrowAmountNumber(number float64) BorrowAmount
func CreateBorrowAmountStr ¶
func CreateBorrowAmountStr(str string) BorrowAmount
func (BorrowAmount) MarshalJSON ¶
func (u BorrowAmount) MarshalJSON() ([]byte, error)
func (*BorrowAmount) UnmarshalJSON ¶
func (u *BorrowAmount) UnmarshalJSON(data []byte) error
type BorrowAmountType ¶
type BorrowAmountType string
const ( BorrowAmountTypeNumber BorrowAmountType = "number" BorrowAmountTypeStr BorrowAmountType = "str" )
type BorrowableToken ¶
type BorrowableToken struct {
// Address of the borrowable token.
Token string `json:"token"`
// Symbol of the borrowable token (e.g. WETH).
Symbol string `json:"symbol"`
// Maximum amount that can be borrowed based on available borrow capacity and token price.
MaxBorrowableAmount string `json:"max_borrowable_amount"`
// Current variable borrow APY in percentage (e.g. 4.5 means 4.5%).
BorrowApy string `json:"borrow_apy"`
}
BorrowableToken - A token available for borrowing with the maximum borrowable amount.
func (*BorrowableToken) GetBorrowApy ¶
func (b *BorrowableToken) GetBorrowApy() string
func (*BorrowableToken) GetMaxBorrowableAmount ¶
func (b *BorrowableToken) GetMaxBorrowableAmount() string
func (*BorrowableToken) GetSymbol ¶
func (b *BorrowableToken) GetSymbol() string
func (*BorrowableToken) GetToken ¶
func (b *BorrowableToken) GetToken() string
type ChainMarketInfo ¶
type ChainMarketInfo struct {
// Token contract address on this chain.
Address string `json:"address"`
// Aave aToken contract address on this chain. This is the interest-bearing token that represents the supply position.
ATokenAddress string `json:"a_token_address"`
// Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%).
SupplyApy string `json:"supply_apy"`
// Variable rate APY for loans, in percentage (e.g., 6.2 means 6.2%).
BorrowApy string `json:"borrow_apy"`
// Total amount currently borrowed from this market, in token units (e.g., 1234567.89 USDC).
TotalBorrowed string `json:"total_borrowed"`
// Amount of tokens available to borrow, in token units. Equals total supplied minus total borrowed.
AvailableLiquidity string `json:"available_liquidity"`
// Percentage of supplied tokens that are currently borrowed (e.g., 85.0 means 85%).
UtilizationRate string `json:"utilization_rate"`
}
ChainMarketInfo - Rate information for a token on a specific chain.
func (*ChainMarketInfo) GetATokenAddress ¶
func (c *ChainMarketInfo) GetATokenAddress() string
func (*ChainMarketInfo) GetAddress ¶
func (c *ChainMarketInfo) GetAddress() string
func (*ChainMarketInfo) GetAvailableLiquidity ¶
func (c *ChainMarketInfo) GetAvailableLiquidity() string
func (*ChainMarketInfo) GetBorrowApy ¶
func (c *ChainMarketInfo) GetBorrowApy() string
func (*ChainMarketInfo) GetSupplyApy ¶
func (c *ChainMarketInfo) GetSupplyApy() string
func (*ChainMarketInfo) GetTotalBorrowed ¶
func (c *ChainMarketInfo) GetTotalBorrowed() string
func (*ChainMarketInfo) GetUtilizationRate ¶
func (c *ChainMarketInfo) GetUtilizationRate() string
type CollateralPosition ¶
type CollateralPosition struct {
// Address of the collateral token.
Token string `json:"token"`
// Symbol of the collateral token (e.g. USDC).
Symbol string `json:"symbol"`
// Current on-chain aToken balance for the collateral.
AmountSupplied *string `json:"amount_supplied"`
// Collateral value in USD.
UsdValue optionalnullable.OptionalNullable[string] `json:"usd_value,omitzero"`
// Current supply APY in percentage (e.g. 4.5 means 4.5%).
SupplyApy optionalnullable.OptionalNullable[string] `json:"supply_apy,omitzero"`
// Total collateral deposited over all time.
TotalDeposited optionalnullable.OptionalNullable[string] `json:"total_deposited,omitzero"`
// Total collateral withdrawn over all time.
TotalWithdrawn optionalnullable.OptionalNullable[string] `json:"total_withdrawn,omitzero"`
// Interest earned on collateral: on_chain_balance + total_withdrawn - total_deposited.
InterestEarned optionalnullable.OptionalNullable[string] `json:"interest_earned,omitzero"`
// Maximum loan-to-value ratio for this collateral in percentage (e.g. 80 means 80%).
MaxLtv optionalnullable.OptionalNullable[string] `json:"max_ltv,omitzero"`
// All historical events for this collateral reserve.
Events []CreditEvent `json:"events,omitzero"`
}
CollateralPosition - A per-reserve collateral position.
func (*CollateralPosition) GetAmountSupplied ¶
func (c *CollateralPosition) GetAmountSupplied() *string
func (*CollateralPosition) GetEvents ¶
func (c *CollateralPosition) GetEvents() []CreditEvent
func (*CollateralPosition) GetInterestEarned ¶
func (c *CollateralPosition) GetInterestEarned() optionalnullable.OptionalNullable[string]
func (*CollateralPosition) GetMaxLtv ¶
func (c *CollateralPosition) GetMaxLtv() optionalnullable.OptionalNullable[string]
func (*CollateralPosition) GetSupplyApy ¶
func (c *CollateralPosition) GetSupplyApy() optionalnullable.OptionalNullable[string]
func (*CollateralPosition) GetSymbol ¶
func (c *CollateralPosition) GetSymbol() string
func (*CollateralPosition) GetToken ¶
func (c *CollateralPosition) GetToken() string
func (*CollateralPosition) GetTotalDeposited ¶
func (c *CollateralPosition) GetTotalDeposited() optionalnullable.OptionalNullable[string]
func (*CollateralPosition) GetTotalWithdrawn ¶
func (c *CollateralPosition) GetTotalWithdrawn() optionalnullable.OptionalNullable[string]
func (*CollateralPosition) GetUsdValue ¶
func (c *CollateralPosition) GetUsdValue() optionalnullable.OptionalNullable[string]
func (CollateralPosition) MarshalJSON ¶
func (c CollateralPosition) MarshalJSON() ([]byte, error)
func (*CollateralPosition) UnmarshalJSON ¶
func (c *CollateralPosition) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsBalancesTokenBalance ¶
type CompassAPIBackendV2ModelsBalancesTokenBalance struct {
// The token contract address.
TokenAddress string `json:"token_address"`
// The token symbol (e.g., 'USDC').
TokenSymbol string `json:"token_symbol"`
// The token's decimal places.
TokenDecimals int64 `json:"token_decimals"`
// The current on-chain balance (raw).
Balance string `json:"balance"`
// The human-readable balance.
BalanceFormatted string `json:"balance_formatted"`
// Balance value in USD (null if price unavailable).
UsdValue optionalnullable.OptionalNullable[string] `json:"usd_value,omitzero"`
// List of all transfers involving this token.
Transfers []TokenTransfer `json:"transfers,omitzero"`
}
CompassAPIBackendV2ModelsBalancesTokenBalance - Balance and transfer history for a single token.
func (*CompassAPIBackendV2ModelsBalancesTokenBalance) GetBalance ¶
func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetBalance() string
func (*CompassAPIBackendV2ModelsBalancesTokenBalance) GetBalanceFormatted ¶
func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetBalanceFormatted() string
func (*CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenAddress ¶
func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenAddress() string
func (*CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenDecimals ¶
func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenDecimals() int64
func (*CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenSymbol ¶
func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetTokenSymbol() string
func (*CompassAPIBackendV2ModelsBalancesTokenBalance) GetTransfers ¶
func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetTransfers() []TokenTransfer
func (*CompassAPIBackendV2ModelsBalancesTokenBalance) GetUsdValue ¶
func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) GetUsdValue() optionalnullable.OptionalNullable[string]
func (CompassAPIBackendV2ModelsBalancesTokenBalance) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsBalancesTokenBalance) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsBalancesTokenBalance) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsBalancesTokenBalance) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition ¶
type CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition struct {
// The vault address.
VaultAddress string `json:"vault_address"`
// Name of the vault token (share token).
VaultName string `json:"vault_name"`
// Symbol of the underlying token (e.g., USDC).
UnderlyingSymbol string `json:"underlying_symbol"`
// Address of the underlying token.
UnderlyingAddress string `json:"underlying_address"`
// The user's position value in underlying token.
Balance *string `json:"balance"`
// Position value in USD (null if price unavailable).
UsdValue optionalnullable.OptionalNullable[string] `json:"usd_value,omitzero"`
// PnL metrics for this position.
Pnl optionalnullable.OptionalNullable[PositionPnL] `json:"pnl,omitzero"`
// All deposit events for this position.
Deposits []DepositEvent `json:"deposits,omitzero"`
// All withdrawal events for this position.
Withdrawals []WithdrawalEvent `json:"withdrawals,omitzero"`
// 7-day annualized APY (percentage).
Apy7d optionalnullable.OptionalNullable[string] `json:"apy_7d,omitzero"`
// 30-day annualized APY (percentage).
Apy30d optionalnullable.OptionalNullable[string] `json:"apy_30d,omitzero"`
// 90-day annualized APY (percentage).
Apy90d optionalnullable.OptionalNullable[string] `json:"apy_90d,omitzero"`
// contains filtered or unexported fields
}
CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition - ERC-4626 vault position.
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetApy30d ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetApy30d() optionalnullable.OptionalNullable[string]
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetApy90d ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetApy90d() optionalnullable.OptionalNullable[string]
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetBalance ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetBalance() *string
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetDeposits ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetDeposits() []DepositEvent
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetType ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetType() string
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUnderlyingAddress ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUnderlyingAddress() string
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUnderlyingSymbol ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUnderlyingSymbol() string
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUsdValue ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetUsdValue() optionalnullable.OptionalNullable[string]
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetVaultAddress ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetVaultAddress() string
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetVaultName ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetVaultName() string
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetWithdrawals ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) GetWithdrawals() []WithdrawalEvent
func (CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain ¶
type CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain struct {
// EVM chain ID
ChainID int64 `json:"chainId"`
// Permit2 contract address
VerifyingContract string `json:"verifyingContract"`
// contains filtered or unexported fields
}
func (*CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetChainID ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetChainID() int64
func (*CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetName ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetName() *string
func (*CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetVerifyingContract ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) GetVerifyingContract() string
func (CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types ¶
type CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types struct {
// Standard EIP-712 domain type
Eip712Domain []Eip712Field `json:"EIP712Domain,omitzero"`
// TokenPermissions struct
TokenPermissions []Eip712Field `json:"TokenPermissions,omitzero"`
// Main permit message type
PermitTransferFrom []Eip712Field `json:"PermitTransferFrom,omitzero"`
}
func (*CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetEip712Domain ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetEip712Domain() []Eip712Field
func (*CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetPermitTransferFrom ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetPermitTransferFrom() []Eip712Field
func (*CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetTokenPermissions ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) GetTokenPermissions() []Eip712Field
func (CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain ¶
type CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain struct {
// Token name
Name string `json:"name"`
// Token version (usually '1' or '2')
Version string `json:"version"`
// Chain ID
ChainID int64 `json:"chainId"`
// Token contract address
VerifyingContract string `json:"verifyingContract"`
}
CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain - The EIP-712 domain separator for ERC-20 Permit.
func (*CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetChainID ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetChainID() int64
func (*CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetName ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetName() string
func (*CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetVerifyingContract ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetVerifyingContract() string
func (*CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetVersion ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) GetVersion() string
func (CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types ¶
type CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types struct {
// EIP712Domain type definition
Eip712Domain []Eip712DomainField `json:"EIP712Domain"`
// Permit type definition
Permit []PermitField `json:"Permit"`
}
CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types - The type definitions for EIP-712 structured data (ERC-20 Permit).
func (*CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) GetEip712Domain ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) GetEip712Domain() []Eip712DomainField
func (*CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) GetPermit ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) GetPermit() []PermitField
func (CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain ¶
type CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain struct {
// Chain ID
ChainID int64 `json:"chainId"`
// Address of the Product Account
VerifyingContract string `json:"verifyingContract"`
}
CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain - The EIP-712 domain separator.
func (*CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) GetChainID ¶
func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) GetChainID() int64
func (*CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) GetVerifyingContract ¶
func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) GetVerifyingContract() string
func (CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types ¶
type CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types struct {
// EIP712Domain type definition
Eip712Domain []Eip712DomainField `json:"EIP712Domain"`
// SafeTx type definition
SafeTx []SafeTxField `json:"SafeTx"`
}
CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types - The type definitions for EIP-712 structured data.
func (*CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) GetEip712Domain ¶
func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) GetEip712Domain() []Eip712DomainField
func (*CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) GetSafeTx ¶
func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) GetSafeTx() []SafeTxField
func (CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Types) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket ¶
type CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket struct {
// On-chain token symbol (e.g. 'TSLAon').
Symbol string `json:"symbol"`
// Underlying equity ticker (e.g. 'TSLA').
UnderlyingTicker string `json:"underlying_ticker"`
// Underlying equity full name (e.g. 'Tesla, Inc. Common Stock').
Name string `json:"name"`
// Chain on which the contract is deployed.
Chain *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain `json:"chain,omitzero"`
// Ethereum mainnet ERC-20 address for this token.
ContractAddress string `json:"contract_address"`
// ERC-20 decimals for this token.
Decimals int64 `json:"decimals"`
// Latest price in USD as a decimal string.
CurrentPriceUsd string `json:"current_price_usd"`
// Absolute USD price change vs 24h ago (decimal string).
Change24hUsd optionalnullable.OptionalNullable[string] `json:"change_24h_usd,omitzero"`
// Percent price change vs 24h ago (decimal string).
Change24hPct optionalnullable.OptionalNullable[string] `json:"change_24h_pct,omitzero"`
// Sector / industry tags from the issuer (e.g. ['Technology']).
Sectors []string `json:"sectors,omitzero"`
// Regional market exposure tags (e.g. ['US']).
RegionExposure []string `json:"region_exposure,omitzero"`
}
CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket - Compact market entry returned in list responses.
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetChange24hPct ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetChange24hPct() optionalnullable.OptionalNullable[string]
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetChange24hUsd ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetChange24hUsd() optionalnullable.OptionalNullable[string]
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetContractAddress ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetContractAddress() string
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetCurrentPriceUsd ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetCurrentPriceUsd() string
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetDecimals ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetDecimals() int64
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetName ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetName() string
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetRegionExposure ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetRegionExposure() []string
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetSectors ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetSectors() []string
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetSymbol ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetSymbol() string
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetUnderlyingTicker ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) GetUnderlyingTicker() string
func (CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) MarshalJSON ¶
func (c CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) MarshalJSON() ([]byte, error)
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) UnmarshalJSON ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain ¶
type CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain string
CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain - Chain on which the contract is deployed.
const (
CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChainEthereum CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain = "ethereum"
)
func (*CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain) UnmarshalJSON ¶
func (e *CompassAPIBackendV2ModelsTokenizedAssetsMarketMarketChain) UnmarshalJSON(data []byte) error
type CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition ¶
type CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition struct {
// On-chain Ondo symbol (e.g. `TSLAon`).
Symbol string `json:"symbol"`
// Underlying equity ticker.
UnderlyingTicker string `json:"underlying_ticker"`
// Underlying equity name (or ticker fallback).
Name string `json:"name"`
// Ethereum mainnet ERC-20 address.
ContractAddress string `json:"contract_address"`
// ERC-20 decimals.
Decimals int64 `json:"decimals"`
// Human-readable balance (already scaled by `decimals`).
Balance string `json:"balance"`
// USD spot price at read time (decimal string).
CurrentPriceUsd optionalnullable.OptionalNullable[string] `json:"current_price_usd,omitzero"`
// `balance * current_price_usd` when the price is available.
BalanceUsd optionalnullable.OptionalNullable[string] `json:"balance_usd,omitzero"`
}
CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition - One non-zero on-chain position in a tokenized asset.
func (*CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetBalance ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetBalance() string
func (*CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetBalanceUsd ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetBalanceUsd() optionalnullable.OptionalNullable[string]
func (*CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetContractAddress ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetContractAddress() string
func (*CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetCurrentPriceUsd ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetCurrentPriceUsd() optionalnullable.OptionalNullable[string]
func (*CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetDecimals ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetDecimals() int64
func (*CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetName ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetName() string
func (*CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetSymbol ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetSymbol() string
func (*CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetUnderlyingTicker ¶
func (c *CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition) GetUnderlyingTicker() string
type CreateAccountRequest ¶
type CreateAccountRequest struct {
Chain CreateAccountRequestChain `json:"chain"`
// The address of the transaction sender.
Sender string `json:"sender"`
// Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
EstimateGas *bool `json:"estimate_gas,omitzero"`
// The address that will own and control the compass account
Owner string `json:"owner"`
}
CreateAccountRequest - Request to create a compass account.
func (*CreateAccountRequest) GetChain ¶
func (c *CreateAccountRequest) GetChain() CreateAccountRequestChain
func (*CreateAccountRequest) GetEstimateGas ¶
func (c *CreateAccountRequest) GetEstimateGas() *bool
func (*CreateAccountRequest) GetOwner ¶
func (c *CreateAccountRequest) GetOwner() string
func (*CreateAccountRequest) GetSender ¶
func (c *CreateAccountRequest) GetSender() string
type CreateAccountRequestChain ¶
type CreateAccountRequestChain string
const ( CreateAccountRequestChainArbitrum CreateAccountRequestChain = "arbitrum" CreateAccountRequestChainBase CreateAccountRequestChain = "base" CreateAccountRequestChainEthereum CreateAccountRequestChain = "ethereum" )
func (CreateAccountRequestChain) ToPointer ¶
func (e CreateAccountRequestChain) ToPointer() *CreateAccountRequestChain
func (*CreateAccountRequestChain) UnmarshalJSON ¶
func (e *CreateAccountRequestChain) UnmarshalJSON(data []byte) error
type CreateAccountResponse ¶
type CreateAccountResponse struct {
// Transaction to create compass account
Transaction *UnsignedTransaction `json:"transaction"`
// Predicted address of the compass earn account that will be deployed
EarnAccountAddress string `json:"earn_account_address"`
}
CreateAccountResponse - Response containing unsigned transaction to create compass Earn account.
func (*CreateAccountResponse) GetEarnAccountAddress ¶
func (c *CreateAccountResponse) GetEarnAccountAddress() string
func (*CreateAccountResponse) GetTransaction ¶
func (c *CreateAccountResponse) GetTransaction() *UnsignedTransaction
type CreateCreditAccountRequest ¶
type CreateCreditAccountRequest struct {
Chain CreateCreditAccountRequestChain `json:"chain"`
// The address of the transaction sender.
Sender string `json:"sender"`
// Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
EstimateGas *bool `json:"estimate_gas,omitzero"`
// The address that will own and control the compass credit account
Owner string `json:"owner"`
}
CreateCreditAccountRequest - Request to create a compass credit account.
func (*CreateCreditAccountRequest) GetChain ¶
func (c *CreateCreditAccountRequest) GetChain() CreateCreditAccountRequestChain
func (*CreateCreditAccountRequest) GetEstimateGas ¶
func (c *CreateCreditAccountRequest) GetEstimateGas() *bool
func (*CreateCreditAccountRequest) GetOwner ¶
func (c *CreateCreditAccountRequest) GetOwner() string
func (*CreateCreditAccountRequest) GetSender ¶
func (c *CreateCreditAccountRequest) GetSender() string
type CreateCreditAccountRequestChain ¶
type CreateCreditAccountRequestChain string
const ( CreateCreditAccountRequestChainArbitrum CreateCreditAccountRequestChain = "arbitrum" CreateCreditAccountRequestChainBase CreateCreditAccountRequestChain = "base" CreateCreditAccountRequestChainEthereum CreateCreditAccountRequestChain = "ethereum" )
func (CreateCreditAccountRequestChain) ToPointer ¶
func (e CreateCreditAccountRequestChain) ToPointer() *CreateCreditAccountRequestChain
func (*CreateCreditAccountRequestChain) UnmarshalJSON ¶
func (e *CreateCreditAccountRequestChain) UnmarshalJSON(data []byte) error
type CreateCreditAccountResponse ¶
type CreateCreditAccountResponse struct {
// Transaction to create compass credit account
Transaction *UnsignedTransaction `json:"transaction"`
// Predicted address of the compass credit account that will be deployed
CreditAccountAddress string `json:"credit_account_address"`
}
CreateCreditAccountResponse - Response containing unsigned transaction to create compass Credit account.
func (*CreateCreditAccountResponse) GetCreditAccountAddress ¶
func (c *CreateCreditAccountResponse) GetCreditAccountAddress() string
func (*CreateCreditAccountResponse) GetTransaction ¶
func (c *CreateCreditAccountResponse) GetTransaction() *UnsignedTransaction
type CreateTokenizedAssetsAccountRequest ¶
type CreateTokenizedAssetsAccountRequest struct {
Chain CreateTokenizedAssetsAccountRequestChain `json:"chain"`
// The address of the transaction sender.
Sender string `json:"sender"`
// Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
EstimateGas *bool `json:"estimate_gas,omitzero"`
// The address that will own and control the compass tokenized assets account
Owner string `json:"owner"`
}
CreateTokenizedAssetsAccountRequest - Request to create a compass tokenized assets account.
func (*CreateTokenizedAssetsAccountRequest) GetChain ¶
func (c *CreateTokenizedAssetsAccountRequest) GetChain() CreateTokenizedAssetsAccountRequestChain
func (*CreateTokenizedAssetsAccountRequest) GetEstimateGas ¶
func (c *CreateTokenizedAssetsAccountRequest) GetEstimateGas() *bool
func (*CreateTokenizedAssetsAccountRequest) GetOwner ¶
func (c *CreateTokenizedAssetsAccountRequest) GetOwner() string
func (*CreateTokenizedAssetsAccountRequest) GetSender ¶
func (c *CreateTokenizedAssetsAccountRequest) GetSender() string
type CreateTokenizedAssetsAccountRequestChain ¶
type CreateTokenizedAssetsAccountRequestChain string
const (
CreateTokenizedAssetsAccountRequestChainEthereum CreateTokenizedAssetsAccountRequestChain = "ethereum"
)
func (CreateTokenizedAssetsAccountRequestChain) ToPointer ¶
func (e CreateTokenizedAssetsAccountRequestChain) ToPointer() *CreateTokenizedAssetsAccountRequestChain
func (*CreateTokenizedAssetsAccountRequestChain) UnmarshalJSON ¶
func (e *CreateTokenizedAssetsAccountRequestChain) UnmarshalJSON(data []byte) error
type CreateTokenizedAssetsAccountResponse ¶
type CreateTokenizedAssetsAccountResponse struct {
// Transaction to create compass tokenized assets account
Transaction *UnsignedTransaction `json:"transaction"`
// Predicted address of the compass tokenized assets account that will be deployed
TokenizedAssetsAccountAddress string `json:"tokenized_assets_account_address"`
}
CreateTokenizedAssetsAccountResponse - Response containing unsigned transaction to create compass tokenized assets account.
func (*CreateTokenizedAssetsAccountResponse) GetTokenizedAssetsAccountAddress ¶
func (c *CreateTokenizedAssetsAccountResponse) GetTokenizedAssetsAccountAddress() string
func (*CreateTokenizedAssetsAccountResponse) GetTransaction ¶
func (c *CreateTokenizedAssetsAccountResponse) GetTransaction() *UnsignedTransaction
type CreditBalancesResponse ¶
type CreditBalancesResponse struct {
// The derived credit account address.
CreditAccountAddress string `json:"credit_account_address"`
// Token balances keyed by token symbol.
Balances map[string]CompassAPIBackendV2ModelsBalancesTokenBalance `json:"balances,omitzero"`
// Total USD value of all balances (sum of available values).
TotalUsdValue optionalnullable.OptionalNullable[string] `json:"total_usd_value,omitzero"`
}
CreditBalancesResponse - Response containing credit account balances and transfer history.
func (*CreditBalancesResponse) GetBalances ¶
func (c *CreditBalancesResponse) GetBalances() map[string]CompassAPIBackendV2ModelsBalancesTokenBalance
func (*CreditBalancesResponse) GetCreditAccountAddress ¶
func (c *CreditBalancesResponse) GetCreditAccountAddress() string
func (*CreditBalancesResponse) GetTotalUsdValue ¶
func (c *CreditBalancesResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
func (CreditBalancesResponse) MarshalJSON ¶
func (c CreditBalancesResponse) MarshalJSON() ([]byte, error)
func (*CreditBalancesResponse) UnmarshalJSON ¶
func (c *CreditBalancesResponse) UnmarshalJSON(data []byte) error
type CreditBorrowParams ¶
type CreditBorrowParams struct {
// Token to borrow from Aave.
Token string `json:"token"`
// Amount in token units to borrow.
Amount CreditBorrowParamsAmount `json:"amount"`
// On AAVE there are 2 different interest modes.
//
// A stable (but typically higher rate), or a variable rate.
InterestRateMode *InterestRateMode `json:"interest_rate_mode,omitzero"`
// Optional fee on the borrowed amount.
Fee optionalnullable.OptionalNullable[CreditFee] `json:"fee,omitzero"`
// contains filtered or unexported fields
}
CreditBorrowParams - Borrow from Aave via Credit Account.
func (*CreditBorrowParams) GetActionType ¶
func (c *CreditBorrowParams) GetActionType() *string
func (*CreditBorrowParams) GetAmount ¶
func (c *CreditBorrowParams) GetAmount() CreditBorrowParamsAmount
func (*CreditBorrowParams) GetFee ¶
func (c *CreditBorrowParams) GetFee() optionalnullable.OptionalNullable[CreditFee]
func (*CreditBorrowParams) GetInterestRateMode ¶
func (c *CreditBorrowParams) GetInterestRateMode() *InterestRateMode
func (*CreditBorrowParams) GetToken ¶
func (c *CreditBorrowParams) GetToken() string
func (CreditBorrowParams) MarshalJSON ¶
func (c CreditBorrowParams) MarshalJSON() ([]byte, error)
func (*CreditBorrowParams) UnmarshalJSON ¶
func (c *CreditBorrowParams) UnmarshalJSON(data []byte) error
type CreditBorrowParamsAmount ¶
type CreditBorrowParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditBorrowParamsAmountType
}
CreditBorrowParamsAmount - Amount in token units to borrow.
func CreateCreditBorrowParamsAmountNumber ¶
func CreateCreditBorrowParamsAmountNumber(number float64) CreditBorrowParamsAmount
func CreateCreditBorrowParamsAmountStr ¶
func CreateCreditBorrowParamsAmountStr(str string) CreditBorrowParamsAmount
func (CreditBorrowParamsAmount) MarshalJSON ¶
func (u CreditBorrowParamsAmount) MarshalJSON() ([]byte, error)
func (*CreditBorrowParamsAmount) UnmarshalJSON ¶
func (u *CreditBorrowParamsAmount) UnmarshalJSON(data []byte) error
type CreditBorrowParamsAmountType ¶
type CreditBorrowParamsAmountType string
const ( CreditBorrowParamsAmountTypeNumber CreditBorrowParamsAmountType = "number" CreditBorrowParamsAmountTypeStr CreditBorrowParamsAmountType = "str" )
type CreditBorrowRequest ¶
type CreditBorrowRequest struct {
// The address that owns the Credit Account.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// Token currently held in the Credit Account to use as input. If the same as collateral_token, no swap is performed. Omit together with amount_in and collateral_token to borrow against existing collateral.
TokenIn optionalnullable.OptionalNullable[string] `json:"token_in,omitzero"`
// Amount of token_in to use (in token units, not wei). Omit together with token_in and collateral_token for borrow-only mode.
AmountIn optionalnullable.OptionalNullable[CreditBorrowRequestAmountIn] `json:"amount_in,omitzero"`
// Aave reserve token to supply as collateral. Omit together with token_in and amount_in for borrow-only mode.
CollateralToken optionalnullable.OptionalNullable[string] `json:"collateral_token,omitzero"`
// Asset to borrow from Aave.
BorrowToken string `json:"borrow_token"`
// Amount to borrow (in token units, not wei).
BorrowAmount BorrowAmount `json:"borrow_amount"`
// On AAVE there are 2 different interest modes.
//
// A stable (but typically higher rate), or a variable rate.
InterestRateMode *InterestRateMode `json:"interest_rate_mode,omitzero"`
// Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed.
Slippage *CreditBorrowRequestSlippage `json:"slippage,omitzero"`
// If true, returns EIP-712 signature data instead of an unsigned transaction.
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
// Optional fee configuration. If provided, a fee will be deducted from the borrowed amount and sent to the specified recipient address.
Fee optionalnullable.OptionalNullable[CreditFee] `json:"fee,omitzero"`
// The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the borrow bundle will first pull token_in from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data.
Permit2Signature optionalnullable.OptionalNullable[string] `json:"permit2_signature,omitzero"`
// The nonce used in the Permit2 signature (from the signed typed data).
Permit2Nonce optionalnullable.OptionalNullable[int64] `json:"permit2_nonce,omitzero"`
// The deadline timestamp used in the Permit2 signature (from the signed typed data).
Permit2Deadline optionalnullable.OptionalNullable[int64] `json:"permit2_deadline,omitzero"`
}
func (*CreditBorrowRequest) GetAmountIn ¶
func (c *CreditBorrowRequest) GetAmountIn() optionalnullable.OptionalNullable[CreditBorrowRequestAmountIn]
func (*CreditBorrowRequest) GetBorrowAmount ¶
func (c *CreditBorrowRequest) GetBorrowAmount() BorrowAmount
func (*CreditBorrowRequest) GetBorrowToken ¶
func (c *CreditBorrowRequest) GetBorrowToken() string
func (*CreditBorrowRequest) GetChain ¶
func (c *CreditBorrowRequest) GetChain() Chain
func (*CreditBorrowRequest) GetCollateralToken ¶
func (c *CreditBorrowRequest) GetCollateralToken() optionalnullable.OptionalNullable[string]
func (*CreditBorrowRequest) GetFee ¶
func (c *CreditBorrowRequest) GetFee() optionalnullable.OptionalNullable[CreditFee]
func (*CreditBorrowRequest) GetGasSponsorship ¶
func (c *CreditBorrowRequest) GetGasSponsorship() *bool
func (*CreditBorrowRequest) GetInterestRateMode ¶
func (c *CreditBorrowRequest) GetInterestRateMode() *InterestRateMode
func (*CreditBorrowRequest) GetOwner ¶
func (c *CreditBorrowRequest) GetOwner() string
func (*CreditBorrowRequest) GetPermit2Deadline ¶
func (c *CreditBorrowRequest) GetPermit2Deadline() optionalnullable.OptionalNullable[int64]
func (*CreditBorrowRequest) GetPermit2Nonce ¶
func (c *CreditBorrowRequest) GetPermit2Nonce() optionalnullable.OptionalNullable[int64]
func (*CreditBorrowRequest) GetPermit2Signature ¶
func (c *CreditBorrowRequest) GetPermit2Signature() optionalnullable.OptionalNullable[string]
func (*CreditBorrowRequest) GetSlippage ¶
func (c *CreditBorrowRequest) GetSlippage() *CreditBorrowRequestSlippage
func (*CreditBorrowRequest) GetTokenIn ¶
func (c *CreditBorrowRequest) GetTokenIn() optionalnullable.OptionalNullable[string]
func (CreditBorrowRequest) MarshalJSON ¶
func (c CreditBorrowRequest) MarshalJSON() ([]byte, error)
func (*CreditBorrowRequest) UnmarshalJSON ¶
func (c *CreditBorrowRequest) UnmarshalJSON(data []byte) error
type CreditBorrowRequestAmountIn ¶
type CreditBorrowRequestAmountIn struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditBorrowRequestAmountInType
}
CreditBorrowRequestAmountIn - Amount of token_in to use (in token units, not wei). Omit together with token_in and collateral_token for borrow-only mode.
func CreateCreditBorrowRequestAmountInNumber ¶
func CreateCreditBorrowRequestAmountInNumber(number float64) CreditBorrowRequestAmountIn
func CreateCreditBorrowRequestAmountInStr ¶
func CreateCreditBorrowRequestAmountInStr(str string) CreditBorrowRequestAmountIn
func (CreditBorrowRequestAmountIn) MarshalJSON ¶
func (u CreditBorrowRequestAmountIn) MarshalJSON() ([]byte, error)
func (*CreditBorrowRequestAmountIn) UnmarshalJSON ¶
func (u *CreditBorrowRequestAmountIn) UnmarshalJSON(data []byte) error
type CreditBorrowRequestAmountInType ¶
type CreditBorrowRequestAmountInType string
const ( CreditBorrowRequestAmountInTypeNumber CreditBorrowRequestAmountInType = "number" CreditBorrowRequestAmountInTypeStr CreditBorrowRequestAmountInType = "str" )
type CreditBorrowRequestSlippage ¶
type CreditBorrowRequestSlippage struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditBorrowRequestSlippageType
}
CreditBorrowRequestSlippage - Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed.
func CreateCreditBorrowRequestSlippageNumber ¶
func CreateCreditBorrowRequestSlippageNumber(number float64) CreditBorrowRequestSlippage
func CreateCreditBorrowRequestSlippageStr ¶
func CreateCreditBorrowRequestSlippageStr(str string) CreditBorrowRequestSlippage
func (CreditBorrowRequestSlippage) MarshalJSON ¶
func (u CreditBorrowRequestSlippage) MarshalJSON() ([]byte, error)
func (*CreditBorrowRequestSlippage) UnmarshalJSON ¶
func (u *CreditBorrowRequestSlippage) UnmarshalJSON(data []byte) error
type CreditBorrowRequestSlippageType ¶
type CreditBorrowRequestSlippageType string
const ( CreditBorrowRequestSlippageTypeNumber CreditBorrowRequestSlippageType = "number" CreditBorrowRequestSlippageTypeStr CreditBorrowRequestSlippageType = "str" )
type CreditBorrowResponse ¶
type CreditBorrowResponse struct {
// Unsigned transaction to execute the borrow bundle. Present when gas_sponsorship is false.
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
// EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship is true.
Eip712 optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput] `json:"eip_712,omitzero"`
// Estimated amount of collateral token received from swap. Only present when token_in differs from collateral_token.
EstimatedCollateralAmount optionalnullable.OptionalNullable[string] `json:"estimated_collateral_amount,omitzero"`
// The fee amount charged on the borrow, in borrow token units. Present when a fee was applied.
FeeAmount optionalnullable.OptionalNullable[string] `json:"fee_amount,omitzero"`
}
func (*CreditBorrowResponse) GetEip712 ¶
func (c *CreditBorrowResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
func (*CreditBorrowResponse) GetEstimatedCollateralAmount ¶
func (c *CreditBorrowResponse) GetEstimatedCollateralAmount() optionalnullable.OptionalNullable[string]
func (*CreditBorrowResponse) GetFeeAmount ¶
func (c *CreditBorrowResponse) GetFeeAmount() optionalnullable.OptionalNullable[string]
func (*CreditBorrowResponse) GetTransaction ¶
func (c *CreditBorrowResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (CreditBorrowResponse) MarshalJSON ¶
func (c CreditBorrowResponse) MarshalJSON() ([]byte, error)
func (*CreditBorrowResponse) UnmarshalJSON ¶
func (c *CreditBorrowResponse) UnmarshalJSON(data []byte) error
type CreditBundleRequest ¶
type CreditBundleRequest struct {
// The owner's wallet address that controls the Credit Account.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// List of actions to bundle. Actions are executed in order.
Actions []CreditUserOperation `json:"actions"`
// If true, returns EIP-712 typed data for gas-sponsored execution.
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
}
CreditBundleRequest - Request to execute multiple credit actions in a single atomic transaction.
func (*CreditBundleRequest) GetActions ¶
func (c *CreditBundleRequest) GetActions() []CreditUserOperation
func (*CreditBundleRequest) GetChain ¶
func (c *CreditBundleRequest) GetChain() Chain
func (*CreditBundleRequest) GetGasSponsorship ¶
func (c *CreditBundleRequest) GetGasSponsorship() *bool
func (*CreditBundleRequest) GetOwner ¶
func (c *CreditBundleRequest) GetOwner() string
type CreditBundleResponse ¶
type CreditBundleResponse struct {
// Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false.
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
// EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. Owner must sign and submit to /gas_sponsorship/prepare.
Eip712 optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput] `json:"eip_712,omitzero"`
// Number of individual transactions bundled in this execution.
ActionsCount int64 `json:"actions_count"`
}
func (*CreditBundleResponse) GetActionsCount ¶
func (c *CreditBundleResponse) GetActionsCount() int64
func (*CreditBundleResponse) GetEip712 ¶
func (c *CreditBundleResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
func (*CreditBundleResponse) GetTransaction ¶
func (c *CreditBundleResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (CreditBundleResponse) MarshalJSON ¶
func (c CreditBundleResponse) MarshalJSON() ([]byte, error)
func (*CreditBundleResponse) UnmarshalJSON ¶
func (c *CreditBundleResponse) UnmarshalJSON(data []byte) error
type CreditEnableCollateralParams ¶
type CreditEnableCollateralParams struct {
// The underlying reserve token to enable as collateral (e.g. USDC, not aUSDC).
Token string `json:"token"`
// contains filtered or unexported fields
}
CreditEnableCollateralParams - Enable a reserve asset as collateral in Aave via Credit Account.
Required after receiving aTokens via direct ERC-20 transfer (not via Pool.supply()), since Aave V3 does not auto-enable collateral for transferred aTokens.
func (*CreditEnableCollateralParams) GetActionType ¶
func (c *CreditEnableCollateralParams) GetActionType() *string
func (*CreditEnableCollateralParams) GetToken ¶
func (c *CreditEnableCollateralParams) GetToken() string
func (CreditEnableCollateralParams) MarshalJSON ¶
func (c CreditEnableCollateralParams) MarshalJSON() ([]byte, error)
func (*CreditEnableCollateralParams) UnmarshalJSON ¶
func (c *CreditEnableCollateralParams) UnmarshalJSON(data []byte) error
type CreditEvent ¶
type CreditEvent struct {
// Type of credit event.
EventType EventType `json:"event_type"`
// Block number when the event occurred
BlockNumber int64 `json:"block_number"`
// Timestamp when the event occurred
BlockTimestamp time.Time `json:"block_timestamp"`
// Transaction hash of the event
TransactionHash string `json:"transaction_hash"`
// Amount involved in the event
Amount string `json:"amount"`
// Symbol of the token
Symbol string `json:"symbol"`
}
CreditEvent - A single historical event in a credit position.
func (*CreditEvent) GetAmount ¶
func (c *CreditEvent) GetAmount() string
func (*CreditEvent) GetBlockNumber ¶
func (c *CreditEvent) GetBlockNumber() int64
func (*CreditEvent) GetBlockTimestamp ¶
func (c *CreditEvent) GetBlockTimestamp() time.Time
func (*CreditEvent) GetEventType ¶
func (c *CreditEvent) GetEventType() EventType
func (*CreditEvent) GetSymbol ¶
func (c *CreditEvent) GetSymbol() string
func (*CreditEvent) GetTransactionHash ¶
func (c *CreditEvent) GetTransactionHash() string
func (CreditEvent) MarshalJSON ¶
func (c CreditEvent) MarshalJSON() ([]byte, error)
func (*CreditEvent) UnmarshalJSON ¶
func (c *CreditEvent) UnmarshalJSON(data []byte) error
type CreditFee ¶
type CreditFee struct {
// The wallet address that will receive the fee.
Recipient string `json:"recipient"`
// The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
Amount CreditFeeAmount `json:"amount"`
// The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the borrow amount), or 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens).
Denomination *CreditFeeDenomination `json:"denomination,omitzero"`
}
CreditFee - Fee configuration for credit-product actions.
Same shape as `Fee`, but narrows `denomination` to the values supported by credit borrows. PERFORMANCE is not supported because realized-profit fees are not meaningful for debt positions.
func (*CreditFee) GetAmount ¶
func (c *CreditFee) GetAmount() CreditFeeAmount
func (*CreditFee) GetDenomination ¶
func (c *CreditFee) GetDenomination() *CreditFeeDenomination
func (*CreditFee) GetRecipient ¶
func (CreditFee) MarshalJSON ¶
func (*CreditFee) UnmarshalJSON ¶
type CreditFeeAmount ¶
type CreditFeeAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditFeeAmountType
}
CreditFeeAmount - The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
func CreateCreditFeeAmountNumber ¶
func CreateCreditFeeAmountNumber(number float64) CreditFeeAmount
func CreateCreditFeeAmountStr ¶
func CreateCreditFeeAmountStr(str string) CreditFeeAmount
func (CreditFeeAmount) MarshalJSON ¶
func (u CreditFeeAmount) MarshalJSON() ([]byte, error)
func (*CreditFeeAmount) UnmarshalJSON ¶
func (u *CreditFeeAmount) UnmarshalJSON(data []byte) error
type CreditFeeAmountType ¶
type CreditFeeAmountType string
const ( CreditFeeAmountTypeNumber CreditFeeAmountType = "number" CreditFeeAmountTypeStr CreditFeeAmountType = "str" )
type CreditFeeDenomination ¶
type CreditFeeDenomination string
CreditFeeDenomination - The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the borrow amount), or 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens).
const ( CreditFeeDenominationPercentage CreditFeeDenomination = "PERCENTAGE" CreditFeeDenominationFixed CreditFeeDenomination = "FIXED" )
func (CreditFeeDenomination) ToPointer ¶
func (e CreditFeeDenomination) ToPointer() *CreditFeeDenomination
func (*CreditFeeDenomination) UnmarshalJSON ¶
func (e *CreditFeeDenomination) UnmarshalJSON(data []byte) error
type CreditPositionsResponse ¶
type CreditPositionsResponse struct {
// All collateral positions, one per reserve.
CollateralPositions []CollateralPosition `json:"collateral_positions,omitzero"`
// All debt positions, one per reserve.
DebtPositions []DebtPosition `json:"debt_positions,omitzero"`
// Aave account-level summary from getUserAccountData().
AccountSummary AccountSummary `json:"account_summary"`
// All tokens available for borrowing with max amounts based on current collateral.
BorrowableTokens []BorrowableToken `json:"borrowable_tokens,omitzero"`
// Net position value in USD (total collateral - total debt). Null if prices unavailable.
TotalUsdValue optionalnullable.OptionalNullable[string] `json:"total_usd_value,omitzero"`
}
CreditPositionsResponse - Credit account positions response with per-reserve positions and account summary.
func (*CreditPositionsResponse) GetAccountSummary ¶
func (c *CreditPositionsResponse) GetAccountSummary() AccountSummary
func (*CreditPositionsResponse) GetBorrowableTokens ¶
func (c *CreditPositionsResponse) GetBorrowableTokens() []BorrowableToken
func (*CreditPositionsResponse) GetCollateralPositions ¶
func (c *CreditPositionsResponse) GetCollateralPositions() []CollateralPosition
func (*CreditPositionsResponse) GetDebtPositions ¶
func (c *CreditPositionsResponse) GetDebtPositions() []DebtPosition
func (*CreditPositionsResponse) GetTotalUsdValue ¶
func (c *CreditPositionsResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
func (CreditPositionsResponse) MarshalJSON ¶
func (c CreditPositionsResponse) MarshalJSON() ([]byte, error)
func (*CreditPositionsResponse) UnmarshalJSON ¶
func (c *CreditPositionsResponse) UnmarshalJSON(data []byte) error
type CreditRepayParams ¶
type CreditRepayParams struct {
// Token to repay to Aave.
Token string `json:"token"`
// Amount in token units to repay.
Amount CreditRepayParamsAmount `json:"amount"`
// On AAVE there are 2 different interest modes.
//
// A stable (but typically higher rate), or a variable rate.
InterestRateMode *InterestRateMode `json:"interest_rate_mode,omitzero"`
// contains filtered or unexported fields
}
CreditRepayParams - Repay debt to Aave via Credit Account.
func (*CreditRepayParams) GetActionType ¶
func (c *CreditRepayParams) GetActionType() *string
func (*CreditRepayParams) GetAmount ¶
func (c *CreditRepayParams) GetAmount() CreditRepayParamsAmount
func (*CreditRepayParams) GetInterestRateMode ¶
func (c *CreditRepayParams) GetInterestRateMode() *InterestRateMode
func (*CreditRepayParams) GetToken ¶
func (c *CreditRepayParams) GetToken() string
func (CreditRepayParams) MarshalJSON ¶
func (c CreditRepayParams) MarshalJSON() ([]byte, error)
func (*CreditRepayParams) UnmarshalJSON ¶
func (c *CreditRepayParams) UnmarshalJSON(data []byte) error
type CreditRepayParamsAmount ¶
type CreditRepayParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditRepayParamsAmountType
}
CreditRepayParamsAmount - Amount in token units to repay.
func CreateCreditRepayParamsAmountNumber ¶
func CreateCreditRepayParamsAmountNumber(number float64) CreditRepayParamsAmount
func CreateCreditRepayParamsAmountStr ¶
func CreateCreditRepayParamsAmountStr(str string) CreditRepayParamsAmount
func (CreditRepayParamsAmount) MarshalJSON ¶
func (u CreditRepayParamsAmount) MarshalJSON() ([]byte, error)
func (*CreditRepayParamsAmount) UnmarshalJSON ¶
func (u *CreditRepayParamsAmount) UnmarshalJSON(data []byte) error
type CreditRepayParamsAmountType ¶
type CreditRepayParamsAmountType string
const ( CreditRepayParamsAmountTypeNumber CreditRepayParamsAmountType = "number" CreditRepayParamsAmountTypeStr CreditRepayParamsAmountType = "str" )
type CreditRepayRequest ¶
type CreditRepayRequest struct {
// The address that owns the Credit Account.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// The borrowed asset to repay (e.g. WETH). Must match the debt position's token.
RepayToken string `json:"repay_token"`
// Amount of repay_token to repay (in token units, not wei).
RepayAmount RepayAmount `json:"repay_amount"`
// On AAVE there are 2 different interest modes.
//
// A stable (but typically higher rate), or a variable rate.
InterestRateMode *InterestRateMode `json:"interest_rate_mode,omitzero"`
// Collateral token to withdraw from Aave after repaying debt. Omit together with withdraw_amount for repay-only mode.
WithdrawToken optionalnullable.OptionalNullable[string] `json:"withdraw_token,omitzero"`
// Amount of collateral to withdraw (in token units, not wei). Omit together with withdraw_token for repay-only mode.
WithdrawAmount optionalnullable.OptionalNullable[WithdrawAmount] `json:"withdraw_amount,omitzero"`
// Desired output token. If different from withdraw_token, a swap is performed after withdrawal. If None, the withdrawn collateral is kept as-is.
TokenOut optionalnullable.OptionalNullable[string] `json:"token_out,omitzero"`
// Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed.
Slippage *CreditRepayRequestSlippage `json:"slippage,omitzero"`
// If true, returns EIP-712 signature data instead of an unsigned transaction.
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
// The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the repay bundle will first pull repay_token from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data.
Permit2Signature optionalnullable.OptionalNullable[string] `json:"permit2_signature,omitzero"`
// The nonce used in the Permit2 signature (from the signed typed data).
Permit2Nonce optionalnullable.OptionalNullable[int64] `json:"permit2_nonce,omitzero"`
// The deadline timestamp used in the Permit2 signature (from the signed typed data).
Permit2Deadline optionalnullable.OptionalNullable[int64] `json:"permit2_deadline,omitzero"`
}
func (*CreditRepayRequest) GetChain ¶
func (c *CreditRepayRequest) GetChain() Chain
func (*CreditRepayRequest) GetGasSponsorship ¶
func (c *CreditRepayRequest) GetGasSponsorship() *bool
func (*CreditRepayRequest) GetInterestRateMode ¶
func (c *CreditRepayRequest) GetInterestRateMode() *InterestRateMode
func (*CreditRepayRequest) GetOwner ¶
func (c *CreditRepayRequest) GetOwner() string
func (*CreditRepayRequest) GetPermit2Deadline ¶
func (c *CreditRepayRequest) GetPermit2Deadline() optionalnullable.OptionalNullable[int64]
func (*CreditRepayRequest) GetPermit2Nonce ¶
func (c *CreditRepayRequest) GetPermit2Nonce() optionalnullable.OptionalNullable[int64]
func (*CreditRepayRequest) GetPermit2Signature ¶
func (c *CreditRepayRequest) GetPermit2Signature() optionalnullable.OptionalNullable[string]
func (*CreditRepayRequest) GetRepayAmount ¶
func (c *CreditRepayRequest) GetRepayAmount() RepayAmount
func (*CreditRepayRequest) GetRepayToken ¶
func (c *CreditRepayRequest) GetRepayToken() string
func (*CreditRepayRequest) GetSlippage ¶
func (c *CreditRepayRequest) GetSlippage() *CreditRepayRequestSlippage
func (*CreditRepayRequest) GetTokenOut ¶
func (c *CreditRepayRequest) GetTokenOut() optionalnullable.OptionalNullable[string]
func (*CreditRepayRequest) GetWithdrawAmount ¶
func (c *CreditRepayRequest) GetWithdrawAmount() optionalnullable.OptionalNullable[WithdrawAmount]
func (*CreditRepayRequest) GetWithdrawToken ¶
func (c *CreditRepayRequest) GetWithdrawToken() optionalnullable.OptionalNullable[string]
type CreditRepayRequestSlippage ¶
type CreditRepayRequestSlippage struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditRepayRequestSlippageType
}
CreditRepayRequestSlippage - Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed.
func CreateCreditRepayRequestSlippageNumber ¶
func CreateCreditRepayRequestSlippageNumber(number float64) CreditRepayRequestSlippage
func CreateCreditRepayRequestSlippageStr ¶
func CreateCreditRepayRequestSlippageStr(str string) CreditRepayRequestSlippage
func (CreditRepayRequestSlippage) MarshalJSON ¶
func (u CreditRepayRequestSlippage) MarshalJSON() ([]byte, error)
func (*CreditRepayRequestSlippage) UnmarshalJSON ¶
func (u *CreditRepayRequestSlippage) UnmarshalJSON(data []byte) error
type CreditRepayRequestSlippageType ¶
type CreditRepayRequestSlippageType string
const ( CreditRepayRequestSlippageTypeNumber CreditRepayRequestSlippageType = "number" CreditRepayRequestSlippageTypeStr CreditRepayRequestSlippageType = "str" )
type CreditRepayResponse ¶
type CreditRepayResponse struct {
// Unsigned transaction to execute the repay bundle. Present when gas_sponsorship is false.
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
// EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship is true.
Eip712 optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput] `json:"eip_712,omitzero"`
// Estimated amount of token_out received from swap. Only present when token_out differs from withdraw_token.
EstimatedTokenOutAmount optionalnullable.OptionalNullable[string] `json:"estimated_token_out_amount,omitzero"`
}
func (*CreditRepayResponse) GetEip712 ¶
func (c *CreditRepayResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
func (*CreditRepayResponse) GetEstimatedTokenOutAmount ¶
func (c *CreditRepayResponse) GetEstimatedTokenOutAmount() optionalnullable.OptionalNullable[string]
func (*CreditRepayResponse) GetTransaction ¶
func (c *CreditRepayResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (CreditRepayResponse) MarshalJSON ¶
func (c CreditRepayResponse) MarshalJSON() ([]byte, error)
func (*CreditRepayResponse) UnmarshalJSON ¶
func (c *CreditRepayResponse) UnmarshalJSON(data []byte) error
type CreditSupplyParams ¶
type CreditSupplyParams struct {
// Collateral token to supply to Aave.
Token string `json:"token"`
// Amount in token units to supply.
Amount CreditSupplyParamsAmount `json:"amount"`
// contains filtered or unexported fields
}
CreditSupplyParams - Supply collateral to Aave via Credit Account.
func (*CreditSupplyParams) GetActionType ¶
func (c *CreditSupplyParams) GetActionType() *string
func (*CreditSupplyParams) GetAmount ¶
func (c *CreditSupplyParams) GetAmount() CreditSupplyParamsAmount
func (*CreditSupplyParams) GetToken ¶
func (c *CreditSupplyParams) GetToken() string
func (CreditSupplyParams) MarshalJSON ¶
func (c CreditSupplyParams) MarshalJSON() ([]byte, error)
func (*CreditSupplyParams) UnmarshalJSON ¶
func (c *CreditSupplyParams) UnmarshalJSON(data []byte) error
type CreditSupplyParamsAmount ¶
type CreditSupplyParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditSupplyParamsAmountType
}
CreditSupplyParamsAmount - Amount in token units to supply.
func CreateCreditSupplyParamsAmountNumber ¶
func CreateCreditSupplyParamsAmountNumber(number float64) CreditSupplyParamsAmount
func CreateCreditSupplyParamsAmountStr ¶
func CreateCreditSupplyParamsAmountStr(str string) CreditSupplyParamsAmount
func (CreditSupplyParamsAmount) MarshalJSON ¶
func (u CreditSupplyParamsAmount) MarshalJSON() ([]byte, error)
func (*CreditSupplyParamsAmount) UnmarshalJSON ¶
func (u *CreditSupplyParamsAmount) UnmarshalJSON(data []byte) error
type CreditSupplyParamsAmountType ¶
type CreditSupplyParamsAmountType string
const ( CreditSupplyParamsAmountTypeNumber CreditSupplyParamsAmountType = "number" CreditSupplyParamsAmountTypeStr CreditSupplyParamsAmountType = "str" )
type CreditTransferRequest ¶
type CreditTransferRequest struct {
// The owner's wallet address (EOA).
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// The token to transfer.
Token string `json:"token"`
// The amount of tokens to transfer (in token units, not wei).
Amount CreditTransferRequestAmount `json:"amount"`
// Whether you are depositing to or withdrawing from your credit account.
Action CreditTransferRequestAction `json:"action"`
// Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint.
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
// The address that will call Permit2's permitTransferFrom to execute the transfer. When `action` is 'DEPOSIT' and `gas_sponsorship` is `true`: - If provided, the signature will authorize this address (typically a gas sponsor) to pull tokens. - If not provided, defaults to the Credit Account (Safe) address, allowing the transfer to be included in a bundle transaction where the Safe pulls the tokens itself.
Spender optionalnullable.OptionalNullable[string] `json:"spender,omitzero"`
}
func (*CreditTransferRequest) GetAction ¶
func (c *CreditTransferRequest) GetAction() CreditTransferRequestAction
func (*CreditTransferRequest) GetAmount ¶
func (c *CreditTransferRequest) GetAmount() CreditTransferRequestAmount
func (*CreditTransferRequest) GetChain ¶
func (c *CreditTransferRequest) GetChain() Chain
func (*CreditTransferRequest) GetGasSponsorship ¶
func (c *CreditTransferRequest) GetGasSponsorship() *bool
func (*CreditTransferRequest) GetOwner ¶
func (c *CreditTransferRequest) GetOwner() string
func (*CreditTransferRequest) GetSpender ¶
func (c *CreditTransferRequest) GetSpender() optionalnullable.OptionalNullable[string]
func (*CreditTransferRequest) GetToken ¶
func (c *CreditTransferRequest) GetToken() string
type CreditTransferRequestAction ¶
type CreditTransferRequestAction string
CreditTransferRequestAction - Whether you are depositing to or withdrawing from your credit account.
const ( CreditTransferRequestActionDeposit CreditTransferRequestAction = "DEPOSIT" CreditTransferRequestActionWithdraw CreditTransferRequestAction = "WITHDRAW" )
func (CreditTransferRequestAction) ToPointer ¶
func (e CreditTransferRequestAction) ToPointer() *CreditTransferRequestAction
func (*CreditTransferRequestAction) UnmarshalJSON ¶
func (e *CreditTransferRequestAction) UnmarshalJSON(data []byte) error
type CreditTransferRequestAmount ¶
type CreditTransferRequestAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditTransferRequestAmountType
}
CreditTransferRequestAmount - The amount of tokens to transfer (in token units, not wei).
func CreateCreditTransferRequestAmountNumber ¶
func CreateCreditTransferRequestAmountNumber(number float64) CreditTransferRequestAmount
func CreateCreditTransferRequestAmountStr ¶
func CreateCreditTransferRequestAmountStr(str string) CreditTransferRequestAmount
func (CreditTransferRequestAmount) MarshalJSON ¶
func (u CreditTransferRequestAmount) MarshalJSON() ([]byte, error)
func (*CreditTransferRequestAmount) UnmarshalJSON ¶
func (u *CreditTransferRequestAmount) UnmarshalJSON(data []byte) error
type CreditTransferRequestAmountType ¶
type CreditTransferRequestAmountType string
const ( CreditTransferRequestAmountTypeNumber CreditTransferRequestAmountType = "number" CreditTransferRequestAmountTypeStr CreditTransferRequestAmountType = "str" )
type CreditTransferResponse ¶
type CreditTransferResponse struct {
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
Eip712 optionalnullable.OptionalNullable[CreditTransferResponseEip712] `json:"eip_712,omitzero"`
}
func (*CreditTransferResponse) GetEip712 ¶
func (c *CreditTransferResponse) GetEip712() optionalnullable.OptionalNullable[CreditTransferResponseEip712]
func (*CreditTransferResponse) GetTransaction ¶
func (c *CreditTransferResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (CreditTransferResponse) MarshalJSON ¶
func (c CreditTransferResponse) MarshalJSON() ([]byte, error)
func (*CreditTransferResponse) UnmarshalJSON ¶
func (c *CreditTransferResponse) UnmarshalJSON(data []byte) error
type CreditTransferResponseEip712 ¶
type CreditTransferResponseEip712 struct {
BatchedSafeOperationsResponseOutput *BatchedSafeOperationsResponseOutput `queryParam:"inline" union:"member"`
Permit2TypedDataOutput *Permit2TypedDataOutput `queryParam:"inline" union:"member"`
UnknownRaw json.RawMessage `json:"-" union:"unknown"`
Type CreditTransferResponseEip712Type
}
func CreateCreditTransferResponseEip712BatchedSafeOperationsResponseOutput ¶
func CreateCreditTransferResponseEip712BatchedSafeOperationsResponseOutput(batchedSafeOperationsResponseOutput BatchedSafeOperationsResponseOutput) CreditTransferResponseEip712
func CreateCreditTransferResponseEip712Permit2TypedDataOutput ¶
func CreateCreditTransferResponseEip712Permit2TypedDataOutput(permit2TypedDataOutput Permit2TypedDataOutput) CreditTransferResponseEip712
func CreateCreditTransferResponseEip712Unknown ¶
func CreateCreditTransferResponseEip712Unknown(raw json.RawMessage) CreditTransferResponseEip712
func (CreditTransferResponseEip712) GetUnknownRaw ¶
func (u CreditTransferResponseEip712) GetUnknownRaw() json.RawMessage
func (CreditTransferResponseEip712) IsUnknown ¶
func (u CreditTransferResponseEip712) IsUnknown() bool
func (CreditTransferResponseEip712) MarshalJSON ¶
func (u CreditTransferResponseEip712) MarshalJSON() ([]byte, error)
func (*CreditTransferResponseEip712) UnmarshalJSON ¶
func (u *CreditTransferResponseEip712) UnmarshalJSON(data []byte) error
type CreditTransferResponseEip712Type ¶
type CreditTransferResponseEip712Type string
const ( CreditTransferResponseEip712TypeBatchedSafeOperationsResponseOutput CreditTransferResponseEip712Type = "BatchedSafeOperationsResponse-Output" CreditTransferResponseEip712TypePermit2TypedDataOutput CreditTransferResponseEip712Type = "Permit2TypedData-Output" CreditTransferResponseEip712TypeUnknown CreditTransferResponseEip712Type = "Unknown" )
type CreditTransferToAddressParams ¶
type CreditTransferToAddressParams struct {
// The ERC20 token to transfer from the Credit Account.
Token string `json:"token"`
// The amount of tokens to transfer (in token units, not wei).
Amount CreditTransferToAddressParamsAmount `json:"amount"`
// The destination address to receive the tokens.
Recipient string `json:"recipient"`
// contains filtered or unexported fields
}
CreditTransferToAddressParams - Transfer tokens from Credit Account to an arbitrary address.
Requires all debt positions to be fully repaid (totalDebtBase == 0) before the transfer is allowed.
func (*CreditTransferToAddressParams) GetActionType ¶
func (c *CreditTransferToAddressParams) GetActionType() *string
func (*CreditTransferToAddressParams) GetAmount ¶
func (c *CreditTransferToAddressParams) GetAmount() CreditTransferToAddressParamsAmount
func (*CreditTransferToAddressParams) GetRecipient ¶
func (c *CreditTransferToAddressParams) GetRecipient() string
func (*CreditTransferToAddressParams) GetToken ¶
func (c *CreditTransferToAddressParams) GetToken() string
func (CreditTransferToAddressParams) MarshalJSON ¶
func (c CreditTransferToAddressParams) MarshalJSON() ([]byte, error)
func (*CreditTransferToAddressParams) UnmarshalJSON ¶
func (c *CreditTransferToAddressParams) UnmarshalJSON(data []byte) error
type CreditTransferToAddressParamsAmount ¶
type CreditTransferToAddressParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditTransferToAddressParamsAmountType
}
CreditTransferToAddressParamsAmount - The amount of tokens to transfer (in token units, not wei).
func CreateCreditTransferToAddressParamsAmountNumber ¶
func CreateCreditTransferToAddressParamsAmountNumber(number float64) CreditTransferToAddressParamsAmount
func CreateCreditTransferToAddressParamsAmountStr ¶
func CreateCreditTransferToAddressParamsAmountStr(str string) CreditTransferToAddressParamsAmount
func (CreditTransferToAddressParamsAmount) MarshalJSON ¶
func (u CreditTransferToAddressParamsAmount) MarshalJSON() ([]byte, error)
func (*CreditTransferToAddressParamsAmount) UnmarshalJSON ¶
func (u *CreditTransferToAddressParamsAmount) UnmarshalJSON(data []byte) error
type CreditTransferToAddressParamsAmountType ¶
type CreditTransferToAddressParamsAmountType string
const ( CreditTransferToAddressParamsAmountTypeNumber CreditTransferToAddressParamsAmountType = "number" CreditTransferToAddressParamsAmountTypeStr CreditTransferToAddressParamsAmountType = "str" )
type CreditUserOperation ¶
type CreditUserOperation struct {
Body CreditUserOperationBody `json:"body"`
}
CreditUserOperation - A single operation in a credit bundle.
func (*CreditUserOperation) GetBody ¶
func (c *CreditUserOperation) GetBody() CreditUserOperationBody
func (*CreditUserOperation) GetBodyCreditBorrow ¶
func (c *CreditUserOperation) GetBodyCreditBorrow() *CreditBorrowParams
func (*CreditUserOperation) GetBodyCreditEnableCollateral ¶
func (c *CreditUserOperation) GetBodyCreditEnableCollateral() *CreditEnableCollateralParams
func (*CreditUserOperation) GetBodyCreditRepay ¶
func (c *CreditUserOperation) GetBodyCreditRepay() *CreditRepayParams
func (*CreditUserOperation) GetBodyCreditSupply ¶
func (c *CreditUserOperation) GetBodyCreditSupply() *CreditSupplyParams
func (*CreditUserOperation) GetBodyCreditTransferToAddress ¶
func (c *CreditUserOperation) GetBodyCreditTransferToAddress() *CreditTransferToAddressParams
func (*CreditUserOperation) GetBodyCreditWithdraw ¶
func (c *CreditUserOperation) GetBodyCreditWithdraw() *CreditWithdrawParams
func (*CreditUserOperation) GetBodyV2Swap ¶
func (c *CreditUserOperation) GetBodyV2Swap() *EarnSwapParams
func (*CreditUserOperation) GetBodyV2TransferFromEoa ¶
func (c *CreditUserOperation) GetBodyV2TransferFromEoa() *EarnTransferFromEOAParams
func (*CreditUserOperation) GetBodyV2TransferToEoa ¶
func (c *CreditUserOperation) GetBodyV2TransferToEoa() *EarnTransferToEOAParams
type CreditUserOperationBody ¶
type CreditUserOperationBody struct {
EarnSwapParams *EarnSwapParams `queryParam:"inline" union:"member"`
EarnTransferFromEOAParams *EarnTransferFromEOAParams `queryParam:"inline" union:"member"`
EarnTransferToEOAParams *EarnTransferToEOAParams `queryParam:"inline" union:"member"`
CreditSupplyParams *CreditSupplyParams `queryParam:"inline" union:"member"`
CreditWithdrawParams *CreditWithdrawParams `queryParam:"inline" union:"member"`
CreditBorrowParams *CreditBorrowParams `queryParam:"inline" union:"member"`
CreditRepayParams *CreditRepayParams `queryParam:"inline" union:"member"`
CreditEnableCollateralParams *CreditEnableCollateralParams `queryParam:"inline" union:"member"`
CreditTransferToAddressParams *CreditTransferToAddressParams `queryParam:"inline" union:"member"`
Type CreditUserOperationBodyType
}
func CreateCreditUserOperationBodyCreditBorrow ¶
func CreateCreditUserOperationBodyCreditBorrow(creditBorrow CreditBorrowParams) CreditUserOperationBody
func CreateCreditUserOperationBodyCreditEnableCollateral ¶
func CreateCreditUserOperationBodyCreditEnableCollateral(creditEnableCollateral CreditEnableCollateralParams) CreditUserOperationBody
func CreateCreditUserOperationBodyCreditRepay ¶
func CreateCreditUserOperationBodyCreditRepay(creditRepay CreditRepayParams) CreditUserOperationBody
func CreateCreditUserOperationBodyCreditSupply ¶
func CreateCreditUserOperationBodyCreditSupply(creditSupply CreditSupplyParams) CreditUserOperationBody
func CreateCreditUserOperationBodyCreditTransferToAddress ¶
func CreateCreditUserOperationBodyCreditTransferToAddress(creditTransferToAddress CreditTransferToAddressParams) CreditUserOperationBody
func CreateCreditUserOperationBodyCreditWithdraw ¶
func CreateCreditUserOperationBodyCreditWithdraw(creditWithdraw CreditWithdrawParams) CreditUserOperationBody
func CreateCreditUserOperationBodyV2Swap ¶
func CreateCreditUserOperationBodyV2Swap(v2Swap EarnSwapParams) CreditUserOperationBody
func CreateCreditUserOperationBodyV2TransferFromEoa ¶
func CreateCreditUserOperationBodyV2TransferFromEoa(v2TransferFromEoa EarnTransferFromEOAParams) CreditUserOperationBody
func CreateCreditUserOperationBodyV2TransferToEoa ¶
func CreateCreditUserOperationBodyV2TransferToEoa(v2TransferToEoa EarnTransferToEOAParams) CreditUserOperationBody
func (CreditUserOperationBody) MarshalJSON ¶
func (u CreditUserOperationBody) MarshalJSON() ([]byte, error)
func (*CreditUserOperationBody) UnmarshalJSON ¶
func (u *CreditUserOperationBody) UnmarshalJSON(data []byte) error
type CreditUserOperationBodyType ¶
type CreditUserOperationBodyType string
const ( CreditUserOperationBodyTypeCreditBorrow CreditUserOperationBodyType = "CREDIT_BORROW" CreditUserOperationBodyTypeCreditEnableCollateral CreditUserOperationBodyType = "CREDIT_ENABLE_COLLATERAL" CreditUserOperationBodyTypeCreditRepay CreditUserOperationBodyType = "CREDIT_REPAY" CreditUserOperationBodyTypeCreditSupply CreditUserOperationBodyType = "CREDIT_SUPPLY" CreditUserOperationBodyTypeCreditTransferToAddress CreditUserOperationBodyType = "CREDIT_TRANSFER_TO_ADDRESS" CreditUserOperationBodyTypeCreditWithdraw CreditUserOperationBodyType = "CREDIT_WITHDRAW" CreditUserOperationBodyTypeV2Swap CreditUserOperationBodyType = "V2_SWAP" CreditUserOperationBodyTypeV2TransferFromEoa CreditUserOperationBodyType = "V2_TRANSFER_FROM_EOA" CreditUserOperationBodyTypeV2TransferToEoa CreditUserOperationBodyType = "V2_TRANSFER_TO_EOA" )
type CreditWithdrawParams ¶
type CreditWithdrawParams struct {
// Collateral token to withdraw from Aave.
Token string `json:"token"`
// Amount in token units to withdraw.
Amount CreditWithdrawParamsAmount `json:"amount"`
// contains filtered or unexported fields
}
CreditWithdrawParams - Withdraw collateral from Aave via Credit Account.
func (*CreditWithdrawParams) GetActionType ¶
func (c *CreditWithdrawParams) GetActionType() *string
func (*CreditWithdrawParams) GetAmount ¶
func (c *CreditWithdrawParams) GetAmount() CreditWithdrawParamsAmount
func (*CreditWithdrawParams) GetToken ¶
func (c *CreditWithdrawParams) GetToken() string
func (CreditWithdrawParams) MarshalJSON ¶
func (c CreditWithdrawParams) MarshalJSON() ([]byte, error)
func (*CreditWithdrawParams) UnmarshalJSON ¶
func (c *CreditWithdrawParams) UnmarshalJSON(data []byte) error
type CreditWithdrawParamsAmount ¶
type CreditWithdrawParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreditWithdrawParamsAmountType
}
CreditWithdrawParamsAmount - Amount in token units to withdraw.
func CreateCreditWithdrawParamsAmountNumber ¶
func CreateCreditWithdrawParamsAmountNumber(number float64) CreditWithdrawParamsAmount
func CreateCreditWithdrawParamsAmountStr ¶
func CreateCreditWithdrawParamsAmountStr(str string) CreditWithdrawParamsAmount
func (CreditWithdrawParamsAmount) MarshalJSON ¶
func (u CreditWithdrawParamsAmount) MarshalJSON() ([]byte, error)
func (*CreditWithdrawParamsAmount) UnmarshalJSON ¶
func (u *CreditWithdrawParamsAmount) UnmarshalJSON(data []byte) error
type CreditWithdrawParamsAmountType ¶
type CreditWithdrawParamsAmountType string
const ( CreditWithdrawParamsAmountTypeNumber CreditWithdrawParamsAmountType = "number" CreditWithdrawParamsAmountTypeStr CreditWithdrawParamsAmountType = "str" )
type DebtPosition ¶
type DebtPosition struct {
// Address of the borrow token.
Token string `json:"token"`
// Symbol of the borrow token (e.g. WETH).
Symbol string `json:"symbol"`
// Current on-chain variable debt balance.
AmountBorrowed *string `json:"amount_borrowed"`
// Debt value in USD.
UsdValue optionalnullable.OptionalNullable[string] `json:"usd_value,omitzero"`
// Current borrow APY in percentage (e.g. 4.5 means 4.5%).
BorrowApy optionalnullable.OptionalNullable[string] `json:"borrow_apy,omitzero"`
// Total amount borrowed across all borrow events.
TotalBorrowed optionalnullable.OptionalNullable[string] `json:"total_borrowed,omitzero"`
// Total amount repaid across all repay events.
TotalRepaid optionalnullable.OptionalNullable[string] `json:"total_repaid,omitzero"`
// Interest paid on debt: on_chain_balance + total_repaid - total_borrowed.
InterestPaid optionalnullable.OptionalNullable[string] `json:"interest_paid,omitzero"`
// All historical events for this debt reserve.
Events []CreditEvent `json:"events,omitzero"`
}
DebtPosition - A per-reserve debt position.
func (*DebtPosition) GetAmountBorrowed ¶
func (d *DebtPosition) GetAmountBorrowed() *string
func (*DebtPosition) GetBorrowApy ¶
func (d *DebtPosition) GetBorrowApy() optionalnullable.OptionalNullable[string]
func (*DebtPosition) GetEvents ¶
func (d *DebtPosition) GetEvents() []CreditEvent
func (*DebtPosition) GetInterestPaid ¶
func (d *DebtPosition) GetInterestPaid() optionalnullable.OptionalNullable[string]
func (*DebtPosition) GetSymbol ¶
func (d *DebtPosition) GetSymbol() string
func (*DebtPosition) GetToken ¶
func (d *DebtPosition) GetToken() string
func (*DebtPosition) GetTotalBorrowed ¶
func (d *DebtPosition) GetTotalBorrowed() optionalnullable.OptionalNullable[string]
func (*DebtPosition) GetTotalRepaid ¶
func (d *DebtPosition) GetTotalRepaid() optionalnullable.OptionalNullable[string]
func (*DebtPosition) GetUsdValue ¶
func (d *DebtPosition) GetUsdValue() optionalnullable.OptionalNullable[string]
func (DebtPosition) MarshalJSON ¶
func (d DebtPosition) MarshalJSON() ([]byte, error)
func (*DebtPosition) UnmarshalJSON ¶
func (d *DebtPosition) UnmarshalJSON(data []byte) error
type DepositEvent ¶
type DepositEvent struct {
// Block number when deposit occurred
BlockNumber int64 `json:"block_number"`
// Timestamp when deposit occurred
BlockTimestamp time.Time `json:"block_timestamp"`
// Transaction hash of the deposit
TransactionHash string `json:"transaction_hash"`
// Amount deposited (underlying asset or swap token)
InputAmount string `json:"input_amount"`
// Symbol of token deposited
InputSymbol string `json:"input_symbol"`
// Units received (shares, aTokens, or PT)
OutputAmount string `json:"output_amount"`
// Symbol of units received
OutputSymbol string `json:"output_symbol"`
// Cost basis per unit at time of deposit
CostPerUnit string `json:"cost_per_unit"`
}
DepositEvent - Historical deposit event for position transparency.
Uses generic input/output format that works across all protocols: - Vault: input=underlying, output=shares - Aave: input=underlying, output=aTokens - Pendle: input=token (varies), output=PT
func (*DepositEvent) GetBlockNumber ¶
func (d *DepositEvent) GetBlockNumber() int64
func (*DepositEvent) GetBlockTimestamp ¶
func (d *DepositEvent) GetBlockTimestamp() time.Time
func (*DepositEvent) GetCostPerUnit ¶
func (d *DepositEvent) GetCostPerUnit() string
func (*DepositEvent) GetInputAmount ¶
func (d *DepositEvent) GetInputAmount() string
func (*DepositEvent) GetInputSymbol ¶
func (d *DepositEvent) GetInputSymbol() string
func (*DepositEvent) GetOutputAmount ¶
func (d *DepositEvent) GetOutputAmount() string
func (*DepositEvent) GetOutputSymbol ¶
func (d *DepositEvent) GetOutputSymbol() string
func (*DepositEvent) GetTransactionHash ¶
func (d *DepositEvent) GetTransactionHash() string
func (DepositEvent) MarshalJSON ¶
func (d DepositEvent) MarshalJSON() ([]byte, error)
func (*DepositEvent) UnmarshalJSON ¶
func (d *DepositEvent) UnmarshalJSON(data []byte) error
type Direction ¶
type Direction string
Direction relative to the product account: 'in' for received, 'out' for sent.
type EarnBalancesResponse ¶
type EarnBalancesResponse struct {
// The derived earn account address.
EarnAccountAddress string `json:"earn_account_address"`
// Token balances keyed by token symbol.
Balances map[string]CompassAPIBackendV2ModelsBalancesTokenBalance `json:"balances,omitzero"`
// Total USD value of all balances (sum of available values).
TotalUsdValue optionalnullable.OptionalNullable[string] `json:"total_usd_value,omitzero"`
}
EarnBalancesResponse - Response containing earn account balances and transfer history.
func (*EarnBalancesResponse) GetBalances ¶
func (e *EarnBalancesResponse) GetBalances() map[string]CompassAPIBackendV2ModelsBalancesTokenBalance
func (*EarnBalancesResponse) GetEarnAccountAddress ¶
func (e *EarnBalancesResponse) GetEarnAccountAddress() string
func (*EarnBalancesResponse) GetTotalUsdValue ¶
func (e *EarnBalancesResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
func (EarnBalancesResponse) MarshalJSON ¶
func (e EarnBalancesResponse) MarshalJSON() ([]byte, error)
func (*EarnBalancesResponse) UnmarshalJSON ¶
func (e *EarnBalancesResponse) UnmarshalJSON(data []byte) error
type EarnManageParams ¶
type EarnManageParams struct {
// The earn venue.
Venue EarnManageParamsVenue `json:"venue"`
// Whether you are depositing into or withdrawing from the given Earn `venue`.
Action EarnManageParamsAction `json:"action"`
// Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0.
Amount EarnManageParamsAmount `json:"amount"`
// Optional fee configuration. If provided, a fee will be applied to the transaction amount and sent to the specified recipient address. The fee can be specified as a percentage of the transaction amount, as a fixed token amount, or as a percentage of realized profit (PERFORMANCE).
Fee optionalnullable.OptionalNullable[Fee] `json:"fee,omitzero"`
// contains filtered or unexported fields
}
EarnManageParams - Parameters for earn manage operations (deposit/withdraw to vault/Aave/Pendle PT).
Used by multicall/bundle endpoint to specify manage actions. EarnManageRequest inherits from this class.
func (*EarnManageParams) GetAction ¶
func (e *EarnManageParams) GetAction() EarnManageParamsAction
func (*EarnManageParams) GetActionType ¶
func (e *EarnManageParams) GetActionType() *string
func (*EarnManageParams) GetAmount ¶
func (e *EarnManageParams) GetAmount() EarnManageParamsAmount
func (*EarnManageParams) GetFee ¶
func (e *EarnManageParams) GetFee() optionalnullable.OptionalNullable[Fee]
func (*EarnManageParams) GetVenue ¶
func (e *EarnManageParams) GetVenue() EarnManageParamsVenue
func (*EarnManageParams) GetVenueAave ¶
func (e *EarnManageParams) GetVenueAave() *AaveVenue
func (*EarnManageParams) GetVenuePendlePt ¶
func (e *EarnManageParams) GetVenuePendlePt() *PendlePTVenue
func (*EarnManageParams) GetVenueVault ¶
func (e *EarnManageParams) GetVenueVault() *VaultVenue
func (EarnManageParams) MarshalJSON ¶
func (e EarnManageParams) MarshalJSON() ([]byte, error)
func (*EarnManageParams) UnmarshalJSON ¶
func (e *EarnManageParams) UnmarshalJSON(data []byte) error
type EarnManageParamsAction ¶
type EarnManageParamsAction string
EarnManageParamsAction - Whether you are depositing into or withdrawing from the given Earn `venue`.
const ( EarnManageParamsActionDeposit EarnManageParamsAction = "DEPOSIT" EarnManageParamsActionWithdraw EarnManageParamsAction = "WITHDRAW" )
func (EarnManageParamsAction) ToPointer ¶
func (e EarnManageParamsAction) ToPointer() *EarnManageParamsAction
func (*EarnManageParamsAction) UnmarshalJSON ¶
func (e *EarnManageParamsAction) UnmarshalJSON(data []byte) error
type EarnManageParamsAmount ¶
type EarnManageParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnManageParamsAmountType
}
EarnManageParamsAmount - Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0.
func CreateEarnManageParamsAmountNumber ¶
func CreateEarnManageParamsAmountNumber(number float64) EarnManageParamsAmount
func CreateEarnManageParamsAmountStr ¶
func CreateEarnManageParamsAmountStr(str string) EarnManageParamsAmount
func (EarnManageParamsAmount) MarshalJSON ¶
func (u EarnManageParamsAmount) MarshalJSON() ([]byte, error)
func (*EarnManageParamsAmount) UnmarshalJSON ¶
func (u *EarnManageParamsAmount) UnmarshalJSON(data []byte) error
type EarnManageParamsAmountType ¶
type EarnManageParamsAmountType string
const ( EarnManageParamsAmountTypeNumber EarnManageParamsAmountType = "number" EarnManageParamsAmountTypeStr EarnManageParamsAmountType = "str" )
type EarnManageParamsVenue ¶
type EarnManageParamsVenue struct {
VaultVenue *VaultVenue `queryParam:"inline" union:"member"`
AaveVenue *AaveVenue `queryParam:"inline" union:"member"`
PendlePTVenue *PendlePTVenue `queryParam:"inline" union:"member"`
Type EarnManageParamsVenueType
}
EarnManageParamsVenue - The earn venue.
func CreateEarnManageParamsVenueAave ¶
func CreateEarnManageParamsVenueAave(aave AaveVenue) EarnManageParamsVenue
func CreateEarnManageParamsVenuePendlePt ¶
func CreateEarnManageParamsVenuePendlePt(pendlePt PendlePTVenue) EarnManageParamsVenue
func CreateEarnManageParamsVenueVault ¶
func CreateEarnManageParamsVenueVault(vault VaultVenue) EarnManageParamsVenue
func (EarnManageParamsVenue) MarshalJSON ¶
func (u EarnManageParamsVenue) MarshalJSON() ([]byte, error)
func (*EarnManageParamsVenue) UnmarshalJSON ¶
func (u *EarnManageParamsVenue) UnmarshalJSON(data []byte) error
type EarnManageParamsVenueType ¶
type EarnManageParamsVenueType string
const ( EarnManageParamsVenueTypeAave EarnManageParamsVenueType = "AAVE" EarnManageParamsVenueTypePendlePt EarnManageParamsVenueType = "PENDLE_PT" EarnManageParamsVenueTypeVault EarnManageParamsVenueType = "VAULT" )
type EarnManageRequest ¶
type EarnManageRequest struct {
// The earn venue.
Venue EarnManageRequestVenue `json:"venue"`
// Whether you are depositing into or withdrawing from the given Earn `venue`.
Action EarnManageRequestAction `json:"action"`
// Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0.
Amount EarnManageRequestAmount `json:"amount"`
// Optional fee configuration. If provided, a fee will be applied to the transaction amount and sent to the specified recipient address. The fee can be specified as a percentage of the transaction amount, as a fixed token amount, or as a percentage of realized profit (PERFORMANCE).
Fee optionalnullable.OptionalNullable[Fee] `json:"fee,omitzero"`
// The primary wallet address that owns and controls the Earn Account.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
// contains filtered or unexported fields
}
EarnManageRequest - Request model for the unified manage endpoint.
Inherits from EarnManageParams and adds context fields (owner, chain, etc).
func (*EarnManageRequest) GetAction ¶
func (e *EarnManageRequest) GetAction() EarnManageRequestAction
func (*EarnManageRequest) GetActionType ¶
func (e *EarnManageRequest) GetActionType() *string
func (*EarnManageRequest) GetAmount ¶
func (e *EarnManageRequest) GetAmount() EarnManageRequestAmount
func (*EarnManageRequest) GetChain ¶
func (e *EarnManageRequest) GetChain() Chain
func (*EarnManageRequest) GetFee ¶
func (e *EarnManageRequest) GetFee() optionalnullable.OptionalNullable[Fee]
func (*EarnManageRequest) GetGasSponsorship ¶
func (e *EarnManageRequest) GetGasSponsorship() *bool
func (*EarnManageRequest) GetOwner ¶
func (e *EarnManageRequest) GetOwner() string
func (*EarnManageRequest) GetVenue ¶
func (e *EarnManageRequest) GetVenue() EarnManageRequestVenue
func (*EarnManageRequest) GetVenueAave ¶
func (e *EarnManageRequest) GetVenueAave() *AaveVenue
func (*EarnManageRequest) GetVenuePendlePt ¶
func (e *EarnManageRequest) GetVenuePendlePt() *PendlePTVenue
func (*EarnManageRequest) GetVenueVault ¶
func (e *EarnManageRequest) GetVenueVault() *VaultVenue
func (EarnManageRequest) MarshalJSON ¶
func (e EarnManageRequest) MarshalJSON() ([]byte, error)
func (*EarnManageRequest) UnmarshalJSON ¶
func (e *EarnManageRequest) UnmarshalJSON(data []byte) error
type EarnManageRequestAction ¶
type EarnManageRequestAction string
EarnManageRequestAction - Whether you are depositing into or withdrawing from the given Earn `venue`.
const ( EarnManageRequestActionDeposit EarnManageRequestAction = "DEPOSIT" EarnManageRequestActionWithdraw EarnManageRequestAction = "WITHDRAW" )
func (EarnManageRequestAction) ToPointer ¶
func (e EarnManageRequestAction) ToPointer() *EarnManageRequestAction
func (*EarnManageRequestAction) UnmarshalJSON ¶
func (e *EarnManageRequestAction) UnmarshalJSON(data []byte) error
type EarnManageRequestAmount ¶
type EarnManageRequestAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnManageRequestAmountType
}
EarnManageRequestAmount - Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0.
func CreateEarnManageRequestAmountNumber ¶
func CreateEarnManageRequestAmountNumber(number float64) EarnManageRequestAmount
func CreateEarnManageRequestAmountStr ¶
func CreateEarnManageRequestAmountStr(str string) EarnManageRequestAmount
func (EarnManageRequestAmount) MarshalJSON ¶
func (u EarnManageRequestAmount) MarshalJSON() ([]byte, error)
func (*EarnManageRequestAmount) UnmarshalJSON ¶
func (u *EarnManageRequestAmount) UnmarshalJSON(data []byte) error
type EarnManageRequestAmountType ¶
type EarnManageRequestAmountType string
const ( EarnManageRequestAmountTypeNumber EarnManageRequestAmountType = "number" EarnManageRequestAmountTypeStr EarnManageRequestAmountType = "str" )
type EarnManageRequestVenue ¶
type EarnManageRequestVenue struct {
VaultVenue *VaultVenue `queryParam:"inline" union:"member"`
AaveVenue *AaveVenue `queryParam:"inline" union:"member"`
PendlePTVenue *PendlePTVenue `queryParam:"inline" union:"member"`
Type EarnManageRequestVenueType
}
EarnManageRequestVenue - The earn venue.
func CreateEarnManageRequestVenueAave ¶
func CreateEarnManageRequestVenueAave(aave AaveVenue) EarnManageRequestVenue
func CreateEarnManageRequestVenuePendlePt ¶
func CreateEarnManageRequestVenuePendlePt(pendlePt PendlePTVenue) EarnManageRequestVenue
func CreateEarnManageRequestVenueVault ¶
func CreateEarnManageRequestVenueVault(vault VaultVenue) EarnManageRequestVenue
func (EarnManageRequestVenue) MarshalJSON ¶
func (u EarnManageRequestVenue) MarshalJSON() ([]byte, error)
func (*EarnManageRequestVenue) UnmarshalJSON ¶
func (u *EarnManageRequestVenue) UnmarshalJSON(data []byte) error
type EarnManageRequestVenueType ¶
type EarnManageRequestVenueType string
const ( EarnManageRequestVenueTypeAave EarnManageRequestVenueType = "AAVE" EarnManageRequestVenueTypePendlePt EarnManageRequestVenueType = "PENDLE_PT" EarnManageRequestVenueTypeVault EarnManageRequestVenueType = "VAULT" )
type EarnManageResponse ¶
type EarnManageResponse struct {
// Unsigned transaction for direct execution. Present when gas_sponsorship=false.
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
// EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
Eip712 optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput] `json:"eip_712,omitzero"`
}
func (*EarnManageResponse) GetEip712 ¶
func (e *EarnManageResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
func (*EarnManageResponse) GetTransaction ¶
func (e *EarnManageResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (EarnManageResponse) MarshalJSON ¶
func (e EarnManageResponse) MarshalJSON() ([]byte, error)
func (*EarnManageResponse) UnmarshalJSON ¶
func (e *EarnManageResponse) UnmarshalJSON(data []byte) error
type EarnPositionsAllResponse ¶
type EarnPositionsAllResponse struct {
// Positions grouped by chain. Keys: 'ethereum', 'base', 'arbitrum'.
Chains map[string]EarnPositionsResponse `json:"chains"`
// Total USD value of all positions across all chains.
TotalUsdValue optionalnullable.OptionalNullable[string] `json:"total_usd_value,omitzero"`
}
EarnPositionsAllResponse - Positions across all chains, grouped by chain name.
Each chain key maps to an EarnPositionsResponse containing that chain's aave, vaults, and pendle_pt positions with per-chain total_usd_value.
func (*EarnPositionsAllResponse) GetChains ¶
func (e *EarnPositionsAllResponse) GetChains() map[string]EarnPositionsResponse
func (*EarnPositionsAllResponse) GetTotalUsdValue ¶
func (e *EarnPositionsAllResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
type EarnPositionsResponse ¶
type EarnPositionsResponse struct {
// Aave V3 lending positions.
Aave []AavePosition `json:"aave,omitzero"`
// ERC-4626 vault positions.
Vaults []CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition `json:"vaults,omitzero"`
// Pendle Principal Token positions.
PendlePt []PendlePTPosition `json:"pendle_pt,omitzero"`
// Total USD value of all positions (sum of available values).
TotalUsdValue optionalnullable.OptionalNullable[string] `json:"total_usd_value,omitzero"`
}
EarnPositionsResponse - Grouped positions by protocol.
This new structure groups positions by protocol type for better organization and removes the need for a discriminated union in SDK consumers.
func (*EarnPositionsResponse) GetAave ¶
func (e *EarnPositionsResponse) GetAave() []AavePosition
func (*EarnPositionsResponse) GetPendlePt ¶
func (e *EarnPositionsResponse) GetPendlePt() []PendlePTPosition
func (*EarnPositionsResponse) GetTotalUsdValue ¶
func (e *EarnPositionsResponse) GetTotalUsdValue() optionalnullable.OptionalNullable[string]
func (*EarnPositionsResponse) GetVaults ¶
func (e *EarnPositionsResponse) GetVaults() []CompassAPIBackendV2ModelsEarnReadResponsePositionsVaultPosition
func (EarnPositionsResponse) MarshalJSON ¶
func (e EarnPositionsResponse) MarshalJSON() ([]byte, error)
func (*EarnPositionsResponse) UnmarshalJSON ¶
func (e *EarnPositionsResponse) UnmarshalJSON(data []byte) error
type EarnSwapParams ¶
type EarnSwapParams struct {
// Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address.
TokenIn string `json:"token_in"`
// Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address.
TokenOut string `json:"token_out"`
// Human-readable amount of `token_in` to swap (token units, not wei).
AmountIn EarnSwapParamsAmountIn `json:"amount_in"`
// Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%).
Slippage *EarnSwapParamsSlippage `json:"slippage,omitzero"`
// contains filtered or unexported fields
}
EarnSwapParams - Parameters for swap operations (without context like owner/chain).
Used by multicall/bundle endpoint to specify swap actions.
func (*EarnSwapParams) GetActionType ¶
func (e *EarnSwapParams) GetActionType() *string
func (*EarnSwapParams) GetAmountIn ¶
func (e *EarnSwapParams) GetAmountIn() EarnSwapParamsAmountIn
func (*EarnSwapParams) GetSlippage ¶
func (e *EarnSwapParams) GetSlippage() *EarnSwapParamsSlippage
func (*EarnSwapParams) GetTokenIn ¶
func (e *EarnSwapParams) GetTokenIn() string
func (*EarnSwapParams) GetTokenOut ¶
func (e *EarnSwapParams) GetTokenOut() string
func (EarnSwapParams) MarshalJSON ¶
func (e EarnSwapParams) MarshalJSON() ([]byte, error)
func (*EarnSwapParams) UnmarshalJSON ¶
func (e *EarnSwapParams) UnmarshalJSON(data []byte) error
type EarnSwapParamsAmountIn ¶
type EarnSwapParamsAmountIn struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnSwapParamsAmountInType
}
EarnSwapParamsAmountIn - Human-readable amount of `token_in` to swap (token units, not wei).
func CreateEarnSwapParamsAmountInNumber ¶
func CreateEarnSwapParamsAmountInNumber(number float64) EarnSwapParamsAmountIn
func CreateEarnSwapParamsAmountInStr ¶
func CreateEarnSwapParamsAmountInStr(str string) EarnSwapParamsAmountIn
func (EarnSwapParamsAmountIn) MarshalJSON ¶
func (u EarnSwapParamsAmountIn) MarshalJSON() ([]byte, error)
func (*EarnSwapParamsAmountIn) UnmarshalJSON ¶
func (u *EarnSwapParamsAmountIn) UnmarshalJSON(data []byte) error
type EarnSwapParamsAmountInType ¶
type EarnSwapParamsAmountInType string
const ( EarnSwapParamsAmountInTypeNumber EarnSwapParamsAmountInType = "number" EarnSwapParamsAmountInTypeStr EarnSwapParamsAmountInType = "str" )
type EarnSwapParamsSlippage ¶
type EarnSwapParamsSlippage struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnSwapParamsSlippageType
}
EarnSwapParamsSlippage - Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%).
func CreateEarnSwapParamsSlippageNumber ¶
func CreateEarnSwapParamsSlippageNumber(number float64) EarnSwapParamsSlippage
func CreateEarnSwapParamsSlippageStr ¶
func CreateEarnSwapParamsSlippageStr(str string) EarnSwapParamsSlippage
func (EarnSwapParamsSlippage) MarshalJSON ¶
func (u EarnSwapParamsSlippage) MarshalJSON() ([]byte, error)
func (*EarnSwapParamsSlippage) UnmarshalJSON ¶
func (u *EarnSwapParamsSlippage) UnmarshalJSON(data []byte) error
type EarnSwapParamsSlippageType ¶
type EarnSwapParamsSlippageType string
const ( EarnSwapParamsSlippageTypeNumber EarnSwapParamsSlippageType = "number" EarnSwapParamsSlippageTypeStr EarnSwapParamsSlippageType = "str" )
type EarnSwapRequest ¶
type EarnSwapRequest struct {
// Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address.
TokenIn string `json:"token_in"`
// Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address.
TokenOut string `json:"token_out"`
// Human-readable amount of `token_in` to swap (token units, not wei).
AmountIn EarnSwapRequestAmountIn `json:"amount_in"`
// Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%).
Slippage *EarnSwapRequestSlippage `json:"slippage,omitzero"`
// The owner's wallet address.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
// contains filtered or unexported fields
}
EarnSwapRequest - Request model for swap endpoint.
Inherits swap params and adds context fields (owner, chain, gas_sponsorship).
func (*EarnSwapRequest) GetActionType ¶
func (e *EarnSwapRequest) GetActionType() *string
func (*EarnSwapRequest) GetAmountIn ¶
func (e *EarnSwapRequest) GetAmountIn() EarnSwapRequestAmountIn
func (*EarnSwapRequest) GetChain ¶
func (e *EarnSwapRequest) GetChain() Chain
func (*EarnSwapRequest) GetGasSponsorship ¶
func (e *EarnSwapRequest) GetGasSponsorship() *bool
func (*EarnSwapRequest) GetOwner ¶
func (e *EarnSwapRequest) GetOwner() string
func (*EarnSwapRequest) GetSlippage ¶
func (e *EarnSwapRequest) GetSlippage() *EarnSwapRequestSlippage
func (*EarnSwapRequest) GetTokenIn ¶
func (e *EarnSwapRequest) GetTokenIn() string
func (*EarnSwapRequest) GetTokenOut ¶
func (e *EarnSwapRequest) GetTokenOut() string
func (EarnSwapRequest) MarshalJSON ¶
func (e EarnSwapRequest) MarshalJSON() ([]byte, error)
func (*EarnSwapRequest) UnmarshalJSON ¶
func (e *EarnSwapRequest) UnmarshalJSON(data []byte) error
type EarnSwapRequestAmountIn ¶
type EarnSwapRequestAmountIn struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnSwapRequestAmountInType
}
EarnSwapRequestAmountIn - Human-readable amount of `token_in` to swap (token units, not wei).
func CreateEarnSwapRequestAmountInNumber ¶
func CreateEarnSwapRequestAmountInNumber(number float64) EarnSwapRequestAmountIn
func CreateEarnSwapRequestAmountInStr ¶
func CreateEarnSwapRequestAmountInStr(str string) EarnSwapRequestAmountIn
func (EarnSwapRequestAmountIn) MarshalJSON ¶
func (u EarnSwapRequestAmountIn) MarshalJSON() ([]byte, error)
func (*EarnSwapRequestAmountIn) UnmarshalJSON ¶
func (u *EarnSwapRequestAmountIn) UnmarshalJSON(data []byte) error
type EarnSwapRequestAmountInType ¶
type EarnSwapRequestAmountInType string
const ( EarnSwapRequestAmountInTypeNumber EarnSwapRequestAmountInType = "number" EarnSwapRequestAmountInTypeStr EarnSwapRequestAmountInType = "str" )
type EarnSwapRequestSlippage ¶
type EarnSwapRequestSlippage struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnSwapRequestSlippageType
}
EarnSwapRequestSlippage - Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%).
func CreateEarnSwapRequestSlippageNumber ¶
func CreateEarnSwapRequestSlippageNumber(number float64) EarnSwapRequestSlippage
func CreateEarnSwapRequestSlippageStr ¶
func CreateEarnSwapRequestSlippageStr(str string) EarnSwapRequestSlippage
func (EarnSwapRequestSlippage) MarshalJSON ¶
func (u EarnSwapRequestSlippage) MarshalJSON() ([]byte, error)
func (*EarnSwapRequestSlippage) UnmarshalJSON ¶
func (u *EarnSwapRequestSlippage) UnmarshalJSON(data []byte) error
type EarnSwapRequestSlippageType ¶
type EarnSwapRequestSlippageType string
const ( EarnSwapRequestSlippageTypeNumber EarnSwapRequestSlippageType = "number" EarnSwapRequestSlippageTypeStr EarnSwapRequestSlippageType = "str" )
type EarnSwapResponse ¶
type EarnSwapResponse struct {
// Unsigned transaction for direct execution. Present when gas_sponsorship=false.
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
// EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
Eip712 optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput] `json:"eip_712,omitzero"`
// Estimated amount of output token received from the swap.
EstimatedAmountOut string `json:"estimated_amount_out"`
}
func (*EarnSwapResponse) GetEip712 ¶
func (e *EarnSwapResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
func (*EarnSwapResponse) GetEstimatedAmountOut ¶
func (e *EarnSwapResponse) GetEstimatedAmountOut() string
func (*EarnSwapResponse) GetTransaction ¶
func (e *EarnSwapResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (EarnSwapResponse) MarshalJSON ¶
func (e EarnSwapResponse) MarshalJSON() ([]byte, error)
func (*EarnSwapResponse) UnmarshalJSON ¶
func (e *EarnSwapResponse) UnmarshalJSON(data []byte) error
type EarnTransferFromEOAParams ¶
type EarnTransferFromEOAParams struct {
// The token to transfer from EOA to Earn Account.
Token string `json:"token"`
// The amount of tokens to transfer (in token units, not wei).
Amount EarnTransferFromEOAParamsAmount `json:"amount"`
// The EOA owner's signature of the Permit2 PermitTransferFrom typed data. Obtain this by calling /v2/earn/transfer with action=DEPOSIT and gas_sponsorship=True, then signing the returned EIP-712 data with the owner's wallet.
Permit2Signature string `json:"permit2_signature"`
// The nonce used in the Permit2 signature (from the signed typed data).
Permit2Nonce int64 `json:"permit2_nonce"`
// The deadline timestamp used in the Permit2 signature (from the signed typed data).
Permit2Deadline int64 `json:"permit2_deadline"`
// contains filtered or unexported fields
}
EarnTransferFromEOAParams - Parameters for transferring tokens from EOA to Earn Account via Permit2.
Used by multicall/bundle endpoint to pull tokens from the owner's EOA into their Earn Account (Safe) as part of an atomic bundle transaction.
The owner must have: 1. Previously approved Permit2 for the token (one-time setup via /gas_sponsorship/approve_transfer) 2. Signed a Permit2 message with spender = Earn Account address
The signature is obtained by first calling /v2/earn/transfer with action=DEPOSIT and gas_sponsorship=True, then signing the returned EIP-712 typed data.
func (*EarnTransferFromEOAParams) GetActionType ¶
func (e *EarnTransferFromEOAParams) GetActionType() *string
func (*EarnTransferFromEOAParams) GetAmount ¶
func (e *EarnTransferFromEOAParams) GetAmount() EarnTransferFromEOAParamsAmount
func (*EarnTransferFromEOAParams) GetPermit2Deadline ¶
func (e *EarnTransferFromEOAParams) GetPermit2Deadline() int64
func (*EarnTransferFromEOAParams) GetPermit2Nonce ¶
func (e *EarnTransferFromEOAParams) GetPermit2Nonce() int64
func (*EarnTransferFromEOAParams) GetPermit2Signature ¶
func (e *EarnTransferFromEOAParams) GetPermit2Signature() string
func (*EarnTransferFromEOAParams) GetToken ¶
func (e *EarnTransferFromEOAParams) GetToken() string
func (EarnTransferFromEOAParams) MarshalJSON ¶
func (e EarnTransferFromEOAParams) MarshalJSON() ([]byte, error)
func (*EarnTransferFromEOAParams) UnmarshalJSON ¶
func (e *EarnTransferFromEOAParams) UnmarshalJSON(data []byte) error
type EarnTransferFromEOAParamsAmount ¶
type EarnTransferFromEOAParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnTransferFromEOAParamsAmountType
}
EarnTransferFromEOAParamsAmount - The amount of tokens to transfer (in token units, not wei).
func CreateEarnTransferFromEOAParamsAmountNumber ¶
func CreateEarnTransferFromEOAParamsAmountNumber(number float64) EarnTransferFromEOAParamsAmount
func CreateEarnTransferFromEOAParamsAmountStr ¶
func CreateEarnTransferFromEOAParamsAmountStr(str string) EarnTransferFromEOAParamsAmount
func (EarnTransferFromEOAParamsAmount) MarshalJSON ¶
func (u EarnTransferFromEOAParamsAmount) MarshalJSON() ([]byte, error)
func (*EarnTransferFromEOAParamsAmount) UnmarshalJSON ¶
func (u *EarnTransferFromEOAParamsAmount) UnmarshalJSON(data []byte) error
type EarnTransferFromEOAParamsAmountType ¶
type EarnTransferFromEOAParamsAmountType string
const ( EarnTransferFromEOAParamsAmountTypeNumber EarnTransferFromEOAParamsAmountType = "number" EarnTransferFromEOAParamsAmountTypeStr EarnTransferFromEOAParamsAmountType = "str" )
type EarnTransferRequest ¶
type EarnTransferRequest struct {
// The owner's wallet address.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// The token you would like to transfer.
Token string `json:"token"`
// The amount of 'token' to transfer.
Amount EarnTransferRequestAmount `json:"amount"`
// Whether you are depositing to or withdrawing from your earn account.
Action EarnTransferRequestAction `json:"action"`
// Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint.
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
// The address that will call Permit2's permitTransferFrom to execute the transfer. When `action` is 'DEPOSIT' and `gas_sponsorship` is `true`: - If provided, the signature will authorize this address (typically a gas sponsor) to pull tokens. - If not provided, defaults to the Earn Account (Safe) address, allowing the transfer to be included in a bundle transaction where the Safe pulls the tokens itself.
Spender optionalnullable.OptionalNullable[string] `json:"spender,omitzero"`
// Optional recipient address for withdrawals. When `action` is 'WITHDRAW': - If provided, tokens will be sent to this address instead of the owner. - If not provided, defaults to the owner's address.
Recipient optionalnullable.OptionalNullable[string] `json:"recipient,omitzero"`
}
func (*EarnTransferRequest) GetAction ¶
func (e *EarnTransferRequest) GetAction() EarnTransferRequestAction
func (*EarnTransferRequest) GetAmount ¶
func (e *EarnTransferRequest) GetAmount() EarnTransferRequestAmount
func (*EarnTransferRequest) GetChain ¶
func (e *EarnTransferRequest) GetChain() Chain
func (*EarnTransferRequest) GetGasSponsorship ¶
func (e *EarnTransferRequest) GetGasSponsorship() *bool
func (*EarnTransferRequest) GetOwner ¶
func (e *EarnTransferRequest) GetOwner() string
func (*EarnTransferRequest) GetRecipient ¶
func (e *EarnTransferRequest) GetRecipient() optionalnullable.OptionalNullable[string]
func (*EarnTransferRequest) GetSpender ¶
func (e *EarnTransferRequest) GetSpender() optionalnullable.OptionalNullable[string]
func (*EarnTransferRequest) GetToken ¶
func (e *EarnTransferRequest) GetToken() string
type EarnTransferRequestAction ¶
type EarnTransferRequestAction string
EarnTransferRequestAction - Whether you are depositing to or withdrawing from your earn account.
const ( EarnTransferRequestActionDeposit EarnTransferRequestAction = "DEPOSIT" EarnTransferRequestActionWithdraw EarnTransferRequestAction = "WITHDRAW" )
func (EarnTransferRequestAction) ToPointer ¶
func (e EarnTransferRequestAction) ToPointer() *EarnTransferRequestAction
func (*EarnTransferRequestAction) UnmarshalJSON ¶
func (e *EarnTransferRequestAction) UnmarshalJSON(data []byte) error
type EarnTransferRequestAmount ¶
type EarnTransferRequestAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnTransferRequestAmountType
}
EarnTransferRequestAmount - The amount of 'token' to transfer.
func CreateEarnTransferRequestAmountNumber ¶
func CreateEarnTransferRequestAmountNumber(number float64) EarnTransferRequestAmount
func CreateEarnTransferRequestAmountStr ¶
func CreateEarnTransferRequestAmountStr(str string) EarnTransferRequestAmount
func (EarnTransferRequestAmount) MarshalJSON ¶
func (u EarnTransferRequestAmount) MarshalJSON() ([]byte, error)
func (*EarnTransferRequestAmount) UnmarshalJSON ¶
func (u *EarnTransferRequestAmount) UnmarshalJSON(data []byte) error
type EarnTransferRequestAmountType ¶
type EarnTransferRequestAmountType string
const ( EarnTransferRequestAmountTypeNumber EarnTransferRequestAmountType = "number" EarnTransferRequestAmountTypeStr EarnTransferRequestAmountType = "str" )
type EarnTransferResponse ¶
type EarnTransferResponse struct {
// Unsigned transaction for direct execution. Present when gas_sponsorship=false.
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
// EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
Eip712 optionalnullable.OptionalNullable[EarnTransferResponseEip712] `json:"eip_712,omitzero"`
}
func (*EarnTransferResponse) GetEip712 ¶
func (e *EarnTransferResponse) GetEip712() optionalnullable.OptionalNullable[EarnTransferResponseEip712]
func (*EarnTransferResponse) GetTransaction ¶
func (e *EarnTransferResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (EarnTransferResponse) MarshalJSON ¶
func (e EarnTransferResponse) MarshalJSON() ([]byte, error)
func (*EarnTransferResponse) UnmarshalJSON ¶
func (e *EarnTransferResponse) UnmarshalJSON(data []byte) error
type EarnTransferResponseEip712 ¶
type EarnTransferResponseEip712 struct {
BatchedSafeOperationsResponseOutput *BatchedSafeOperationsResponseOutput `queryParam:"inline" union:"member"`
Permit2TypedDataOutput *Permit2TypedDataOutput `queryParam:"inline" union:"member"`
UnknownRaw json.RawMessage `json:"-" union:"unknown"`
Type EarnTransferResponseEip712Type
}
EarnTransferResponseEip712 - EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
func CreateEarnTransferResponseEip712BatchedSafeOperationsResponseOutput ¶
func CreateEarnTransferResponseEip712BatchedSafeOperationsResponseOutput(batchedSafeOperationsResponseOutput BatchedSafeOperationsResponseOutput) EarnTransferResponseEip712
func CreateEarnTransferResponseEip712Permit2TypedDataOutput ¶
func CreateEarnTransferResponseEip712Permit2TypedDataOutput(permit2TypedDataOutput Permit2TypedDataOutput) EarnTransferResponseEip712
func CreateEarnTransferResponseEip712Unknown ¶
func CreateEarnTransferResponseEip712Unknown(raw json.RawMessage) EarnTransferResponseEip712
func (EarnTransferResponseEip712) GetUnknownRaw ¶
func (u EarnTransferResponseEip712) GetUnknownRaw() json.RawMessage
func (EarnTransferResponseEip712) IsUnknown ¶
func (u EarnTransferResponseEip712) IsUnknown() bool
func (EarnTransferResponseEip712) MarshalJSON ¶
func (u EarnTransferResponseEip712) MarshalJSON() ([]byte, error)
func (*EarnTransferResponseEip712) UnmarshalJSON ¶
func (u *EarnTransferResponseEip712) UnmarshalJSON(data []byte) error
type EarnTransferResponseEip712Type ¶
type EarnTransferResponseEip712Type string
const ( EarnTransferResponseEip712TypeBatchedSafeOperationsResponseOutput EarnTransferResponseEip712Type = "BatchedSafeOperationsResponse-Output" EarnTransferResponseEip712TypePermit2TypedDataOutput EarnTransferResponseEip712Type = "Permit2TypedData-Output" EarnTransferResponseEip712TypeUnknown EarnTransferResponseEip712Type = "Unknown" )
type EarnTransferToAddressParams ¶
type EarnTransferToAddressParams struct {
// The ERC20 token to transfer from the product account.
Token string `json:"token"`
// The amount of tokens to transfer (in token units, not wei).
Amount EarnTransferToAddressParamsAmount `json:"amount"`
// The destination address to receive the tokens.
Recipient string `json:"recipient"`
// contains filtered or unexported fields
}
EarnTransferToAddressParams - Parameters for transferring tokens from product account to an arbitrary address.
Used by multicall/bundle endpoint to send ERC20 tokens from the product account to any specified recipient address as part of an atomic bundle transaction.
No signature is required for this action since the product account already owns the tokens and is executing the transfer as part of its own transaction.
func (*EarnTransferToAddressParams) GetActionType ¶
func (e *EarnTransferToAddressParams) GetActionType() *string
func (*EarnTransferToAddressParams) GetAmount ¶
func (e *EarnTransferToAddressParams) GetAmount() EarnTransferToAddressParamsAmount
func (*EarnTransferToAddressParams) GetRecipient ¶
func (e *EarnTransferToAddressParams) GetRecipient() string
func (*EarnTransferToAddressParams) GetToken ¶
func (e *EarnTransferToAddressParams) GetToken() string
func (EarnTransferToAddressParams) MarshalJSON ¶
func (e EarnTransferToAddressParams) MarshalJSON() ([]byte, error)
func (*EarnTransferToAddressParams) UnmarshalJSON ¶
func (e *EarnTransferToAddressParams) UnmarshalJSON(data []byte) error
type EarnTransferToAddressParamsAmount ¶
type EarnTransferToAddressParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnTransferToAddressParamsAmountType
}
EarnTransferToAddressParamsAmount - The amount of tokens to transfer (in token units, not wei).
func CreateEarnTransferToAddressParamsAmountNumber ¶
func CreateEarnTransferToAddressParamsAmountNumber(number float64) EarnTransferToAddressParamsAmount
func CreateEarnTransferToAddressParamsAmountStr ¶
func CreateEarnTransferToAddressParamsAmountStr(str string) EarnTransferToAddressParamsAmount
func (EarnTransferToAddressParamsAmount) MarshalJSON ¶
func (u EarnTransferToAddressParamsAmount) MarshalJSON() ([]byte, error)
func (*EarnTransferToAddressParamsAmount) UnmarshalJSON ¶
func (u *EarnTransferToAddressParamsAmount) UnmarshalJSON(data []byte) error
type EarnTransferToAddressParamsAmountType ¶
type EarnTransferToAddressParamsAmountType string
const ( EarnTransferToAddressParamsAmountTypeNumber EarnTransferToAddressParamsAmountType = "number" EarnTransferToAddressParamsAmountTypeStr EarnTransferToAddressParamsAmountType = "str" )
type EarnTransferToEOAParams ¶
type EarnTransferToEOAParams struct {
// The token to transfer from Earn Account to EOA.
Token string `json:"token"`
// The amount of tokens to transfer (in token units, not wei).
Amount EarnTransferToEOAParamsAmount `json:"amount"`
// contains filtered or unexported fields
}
EarnTransferToEOAParams - Parameters for transferring tokens from Earn Account to EOA (withdrawal).
Used by multicall/bundle endpoint to send tokens from the Earn Account (Safe) back to the owner's EOA as part of an atomic bundle transaction.
No signature is required for this action since the Safe already owns the tokens and is executing the transfer as part of its own transaction.
func (*EarnTransferToEOAParams) GetActionType ¶
func (e *EarnTransferToEOAParams) GetActionType() *string
func (*EarnTransferToEOAParams) GetAmount ¶
func (e *EarnTransferToEOAParams) GetAmount() EarnTransferToEOAParamsAmount
func (*EarnTransferToEOAParams) GetToken ¶
func (e *EarnTransferToEOAParams) GetToken() string
func (EarnTransferToEOAParams) MarshalJSON ¶
func (e EarnTransferToEOAParams) MarshalJSON() ([]byte, error)
func (*EarnTransferToEOAParams) UnmarshalJSON ¶
func (e *EarnTransferToEOAParams) UnmarshalJSON(data []byte) error
type EarnTransferToEOAParamsAmount ¶
type EarnTransferToEOAParamsAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EarnTransferToEOAParamsAmountType
}
EarnTransferToEOAParamsAmount - The amount of tokens to transfer (in token units, not wei).
func CreateEarnTransferToEOAParamsAmountNumber ¶
func CreateEarnTransferToEOAParamsAmountNumber(number float64) EarnTransferToEOAParamsAmount
func CreateEarnTransferToEOAParamsAmountStr ¶
func CreateEarnTransferToEOAParamsAmountStr(str string) EarnTransferToEOAParamsAmount
func (EarnTransferToEOAParamsAmount) MarshalJSON ¶
func (u EarnTransferToEOAParamsAmount) MarshalJSON() ([]byte, error)
func (*EarnTransferToEOAParamsAmount) UnmarshalJSON ¶
func (u *EarnTransferToEOAParamsAmount) UnmarshalJSON(data []byte) error
type EarnTransferToEOAParamsAmountType ¶
type EarnTransferToEOAParamsAmountType string
const ( EarnTransferToEOAParamsAmountTypeNumber EarnTransferToEOAParamsAmountType = "number" EarnTransferToEOAParamsAmountTypeStr EarnTransferToEOAParamsAmountType = "str" )
type Eip712DomainField ¶
Eip712DomainField - A field in the EIP712Domain type definition.
func (*Eip712DomainField) GetName ¶
func (e *Eip712DomainField) GetName() string
func (*Eip712DomainField) GetType ¶
func (e *Eip712DomainField) GetType() string
func (Eip712DomainField) MarshalJSON ¶
func (e Eip712DomainField) MarshalJSON() ([]byte, error)
func (*Eip712DomainField) UnmarshalJSON ¶
func (e *Eip712DomainField) UnmarshalJSON(data []byte) error
type Eip712Field ¶
type Eip712Field struct {
// Field name in the struct
Name string `json:"name"`
// EVM type (e.g., address, uint256, TokenPermissions)
Type string `json:"type"`
}
func (*Eip712Field) GetName ¶
func (e *Eip712Field) GetName() string
func (*Eip712Field) GetType ¶
func (e *Eip712Field) GetType() string
func (Eip712Field) MarshalJSON ¶
func (e Eip712Field) MarshalJSON() ([]byte, error)
func (*Eip712Field) UnmarshalJSON ¶
func (e *Eip712Field) UnmarshalJSON(data []byte) error
type EventType ¶
type EventType string
EventType - Type of credit event.
const ( EventTypeSupply EventType = "supply" EventTypeWithdraw EventType = "withdraw" EventTypeBorrow EventType = "borrow" EventTypeRepay EventType = "repay" EventTypeLiquidation EventType = "liquidation" EventTypeTransferIn EventType = "transfer_in" EventTypeTransferOut EventType = "transfer_out" )
type Fee ¶
type Fee struct {
// The wallet address that will receive the fee.
Recipient string `json:"recipient"`
// The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
Amount FeeAmount `json:"amount"`
// The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
Denomination *FeeDenomination `json:"denomination,omitzero"`
}
func (*Fee) GetDenomination ¶
func (f *Fee) GetDenomination() *FeeDenomination
func (*Fee) GetRecipient ¶
func (Fee) MarshalJSON ¶
func (*Fee) UnmarshalJSON ¶
type FeeAmount ¶
type FeeAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type FeeAmountType
}
FeeAmount - The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
func CreateFeeAmountNumber ¶
func CreateFeeAmountStr ¶
func (FeeAmount) MarshalJSON ¶
func (*FeeAmount) UnmarshalJSON ¶
type FeeAmountType ¶
type FeeAmountType string
const ( FeeAmountTypeNumber FeeAmountType = "number" FeeAmountTypeStr FeeAmountType = "str" )
type FeeDenomination ¶
type FeeDenomination string
FeeDenomination - The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
const ( FeeDenominationPercentage FeeDenomination = "PERCENTAGE" FeeDenominationFixed FeeDenomination = "FIXED" FeeDenominationPerformance FeeDenomination = "PERFORMANCE" )
func (FeeDenomination) ToPointer ¶
func (e FeeDenomination) ToPointer() *FeeDenomination
func (*FeeDenomination) UnmarshalJSON ¶
func (e *FeeDenomination) UnmarshalJSON(data []byte) error
type GlobalMarketsPerpsApproveBuilderFeeRequest ¶ added in v0.1.1
type GlobalMarketsPerpsApproveBuilderFeeRequest struct {
// User's EOA address
Owner string `json:"owner"`
}
GlobalMarketsPerpsApproveBuilderFeeRequest - Request to approve builder fees before trading on the global markets perps DEX.
func (*GlobalMarketsPerpsApproveBuilderFeeRequest) GetOwner ¶ added in v0.1.1
func (g *GlobalMarketsPerpsApproveBuilderFeeRequest) GetOwner() string
type GlobalMarketsPerpsCancelOrderRequest ¶ added in v0.1.1
type GlobalMarketsPerpsCancelOrderRequest struct {
// Owner of the global markets perps product account
Owner string `json:"owner"`
// Asset ticker symbol (e.g. AAPL, GOLD, EUR)
Asset string `json:"asset"`
// Hyperliquid order ID to cancel
OrderID optionalnullable.OptionalNullable[int64] `json:"order_id,omitzero"`
// Client order ID to cancel (alternative to order_id)
ClientOrderID optionalnullable.OptionalNullable[int64] `json:"client_order_id,omitzero"`
}
GlobalMarketsPerpsCancelOrderRequest - Request to cancel an open order on a global markets perps market.
func (*GlobalMarketsPerpsCancelOrderRequest) GetAsset ¶ added in v0.1.1
func (g *GlobalMarketsPerpsCancelOrderRequest) GetAsset() string
func (*GlobalMarketsPerpsCancelOrderRequest) GetClientOrderID ¶ added in v0.1.1
func (g *GlobalMarketsPerpsCancelOrderRequest) GetClientOrderID() optionalnullable.OptionalNullable[int64]
func (*GlobalMarketsPerpsCancelOrderRequest) GetOrderID ¶ added in v0.1.1
func (g *GlobalMarketsPerpsCancelOrderRequest) GetOrderID() optionalnullable.OptionalNullable[int64]
func (*GlobalMarketsPerpsCancelOrderRequest) GetOwner ¶ added in v0.1.1
func (g *GlobalMarketsPerpsCancelOrderRequest) GetOwner() string
type GlobalMarketsPerpsCategory ¶ added in v0.1.1
type GlobalMarketsPerpsCategory string
const ( GlobalMarketsPerpsCategoryStock GlobalMarketsPerpsCategory = "stock" GlobalMarketsPerpsCategoryCommodity GlobalMarketsPerpsCategory = "commodity" GlobalMarketsPerpsCategoryForex GlobalMarketsPerpsCategory = "forex" )
func (GlobalMarketsPerpsCategory) ToPointer ¶ added in v0.1.1
func (e GlobalMarketsPerpsCategory) ToPointer() *GlobalMarketsPerpsCategory
func (*GlobalMarketsPerpsCategory) UnmarshalJSON ¶ added in v0.1.1
func (e *GlobalMarketsPerpsCategory) UnmarshalJSON(data []byte) error
type GlobalMarketsPerpsDepositRequest ¶ added in v0.1.1
type GlobalMarketsPerpsDepositRequest struct {
// The user's EOA address on Arbitrum
Owner string `json:"owner"`
// USDC amount to deposit (human-readable, e.g. '1000.0')
Amount string `json:"amount"`
}
GlobalMarketsPerpsDepositRequest - Request to deposit USDC from Arbitrum into the user's global markets perps account.
func (*GlobalMarketsPerpsDepositRequest) GetAmount ¶ added in v0.1.1
func (g *GlobalMarketsPerpsDepositRequest) GetAmount() string
func (*GlobalMarketsPerpsDepositRequest) GetOwner ¶ added in v0.1.1
func (g *GlobalMarketsPerpsDepositRequest) GetOwner() string
type GlobalMarketsPerpsDepositResponse ¶ added in v0.1.1
type GlobalMarketsPerpsDepositResponse struct {
// Response containing EIP-712 typed data for ERC-20 Permit signing.
Permit PermitTypedDataResponseOutput `json:"permit"`
// USDC amount in raw units (6 decimals)
AmountRaw int64 `json:"amount_raw"`
// Global Markets Perps Safe address on HyperEVM that receives the deposit on HyperCore
Destination string `json:"destination"`
}
GlobalMarketsPerpsDepositResponse - EIP-2612 permit data for the user to sign, plus deposit metadata.
After the user signs the permit, the gas sponsor calls batchedDepositWithPermit on the Hyperliquid Bridge2 contract.
func (*GlobalMarketsPerpsDepositResponse) GetAmountRaw ¶ added in v0.1.1
func (g *GlobalMarketsPerpsDepositResponse) GetAmountRaw() int64
func (*GlobalMarketsPerpsDepositResponse) GetDestination ¶ added in v0.1.1
func (g *GlobalMarketsPerpsDepositResponse) GetDestination() string
func (*GlobalMarketsPerpsDepositResponse) GetPermit ¶ added in v0.1.1
func (g *GlobalMarketsPerpsDepositResponse) GetPermit() PermitTypedDataResponseOutput
type GlobalMarketsPerpsEnableUnifiedAccountRequest ¶ added in v0.1.1
type GlobalMarketsPerpsEnableUnifiedAccountRequest struct {
// User's EOA address
Owner string `json:"owner"`
}
GlobalMarketsPerpsEnableUnifiedAccountRequest - Request to enable unified account mode on Hyperliquid.
func (*GlobalMarketsPerpsEnableUnifiedAccountRequest) GetOwner ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnableUnifiedAccountRequest) GetOwner() string
type GlobalMarketsPerpsEnableUnifiedAccountResponse ¶ added in v0.1.1
type GlobalMarketsPerpsEnableUnifiedAccountResponse struct {
// Current account abstraction mode (e.g. 'default', 'unifiedAccount')
Mode string `json:"mode"`
// EIP-712 typed data for wallet signing, or null if already unified
TypedData optionalnullable.OptionalNullable[map[string]any] `json:"typed_data,omitzero"`
// Raw Hyperliquid action (passed back to the execute endpoint), or null
Action optionalnullable.OptionalNullable[map[string]any] `json:"action,omitzero"`
// Timestamp-based nonce, or null if no action needed
Nonce optionalnullable.OptionalNullable[int64] `json:"nonce,omitzero"`
}
GlobalMarketsPerpsEnableUnifiedAccountResponse - Returned by the enable_unified_account endpoint.
If the account is already in unified mode, typed_data/action/nonce are null. If not, they contain the EIP-712 payload the user must sign.
func (*GlobalMarketsPerpsEnableUnifiedAccountResponse) GetAction ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) GetAction() optionalnullable.OptionalNullable[map[string]any]
func (*GlobalMarketsPerpsEnableUnifiedAccountResponse) GetMode ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) GetMode() string
func (*GlobalMarketsPerpsEnableUnifiedAccountResponse) GetNonce ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) GetNonce() optionalnullable.OptionalNullable[int64]
func (*GlobalMarketsPerpsEnableUnifiedAccountResponse) GetTypedData ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) GetTypedData() optionalnullable.OptionalNullable[map[string]any]
func (GlobalMarketsPerpsEnableUnifiedAccountResponse) MarshalJSON ¶ added in v0.1.1
func (g GlobalMarketsPerpsEnableUnifiedAccountResponse) MarshalJSON() ([]byte, error)
func (*GlobalMarketsPerpsEnableUnifiedAccountResponse) UnmarshalJSON ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnableUnifiedAccountResponse) UnmarshalJSON(data []byte) error
type GlobalMarketsPerpsEnsureLeverageRequest ¶ added in v0.1.1
type GlobalMarketsPerpsEnsureLeverageRequest struct {
// User's EOA address
Owner string `json:"owner"`
// Asset ticker (e.g. 'AAPL', 'CL')
Asset string `json:"asset"`
}
GlobalMarketsPerpsEnsureLeverageRequest - Request to check and set leverage to 1x cross on a global markets perps asset.
func (*GlobalMarketsPerpsEnsureLeverageRequest) GetAsset ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnsureLeverageRequest) GetAsset() string
func (*GlobalMarketsPerpsEnsureLeverageRequest) GetOwner ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnsureLeverageRequest) GetOwner() string
type GlobalMarketsPerpsEnsureLeverageResponse ¶ added in v0.1.1
type GlobalMarketsPerpsEnsureLeverageResponse struct {
// True if leverage is already 1x cross, false if update needed
LeverageOk bool `json:"leverage_ok"`
// EIP-712 typed data for wallet signing, or null if already 1x cross
TypedData optionalnullable.OptionalNullable[map[string]any] `json:"typed_data,omitzero"`
// Raw Hyperliquid action (passed back to the execute endpoint), or null
Action optionalnullable.OptionalNullable[map[string]any] `json:"action,omitzero"`
// Timestamp-based nonce, or null if no action needed
Nonce optionalnullable.OptionalNullable[int64] `json:"nonce,omitzero"`
}
GlobalMarketsPerpsEnsureLeverageResponse - Returned by the ensure_leverage endpoint.
If the asset is already at 1x cross leverage, typed_data/action/nonce are null. If not (or no position exists), they contain the EIP-712 payload the user must sign.
func (*GlobalMarketsPerpsEnsureLeverageResponse) GetAction ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnsureLeverageResponse) GetAction() optionalnullable.OptionalNullable[map[string]any]
func (*GlobalMarketsPerpsEnsureLeverageResponse) GetLeverageOk ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnsureLeverageResponse) GetLeverageOk() bool
func (*GlobalMarketsPerpsEnsureLeverageResponse) GetNonce ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnsureLeverageResponse) GetNonce() optionalnullable.OptionalNullable[int64]
func (*GlobalMarketsPerpsEnsureLeverageResponse) GetTypedData ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnsureLeverageResponse) GetTypedData() optionalnullable.OptionalNullable[map[string]any]
func (GlobalMarketsPerpsEnsureLeverageResponse) MarshalJSON ¶ added in v0.1.1
func (g GlobalMarketsPerpsEnsureLeverageResponse) MarshalJSON() ([]byte, error)
func (*GlobalMarketsPerpsEnsureLeverageResponse) UnmarshalJSON ¶ added in v0.1.1
func (g *GlobalMarketsPerpsEnsureLeverageResponse) UnmarshalJSON(data []byte) error
type GlobalMarketsPerpsExecuteRequest ¶ added in v0.1.1
type GlobalMarketsPerpsExecuteRequest struct {
// Raw Hyperliquid action from the prepare step
Action map[string]any `json:"action"`
// Nonce from the prepare step
Nonce int64 `json:"nonce"`
// User's EIP-712 signature (hex, 65 bytes)
Signature string `json:"signature"`
// Optional vault address
VaultAddress optionalnullable.OptionalNullable[string] `json:"vault_address,omitzero"`
}
GlobalMarketsPerpsExecuteRequest - Submit a signed Hyperliquid action for execution.
func (*GlobalMarketsPerpsExecuteRequest) GetAction ¶ added in v0.1.1
func (g *GlobalMarketsPerpsExecuteRequest) GetAction() map[string]any
func (*GlobalMarketsPerpsExecuteRequest) GetNonce ¶ added in v0.1.1
func (g *GlobalMarketsPerpsExecuteRequest) GetNonce() int64
func (*GlobalMarketsPerpsExecuteRequest) GetSignature ¶ added in v0.1.1
func (g *GlobalMarketsPerpsExecuteRequest) GetSignature() string
func (*GlobalMarketsPerpsExecuteRequest) GetVaultAddress ¶ added in v0.1.1
func (g *GlobalMarketsPerpsExecuteRequest) GetVaultAddress() optionalnullable.OptionalNullable[string]
type GlobalMarketsPerpsExecuteResponse ¶ added in v0.1.1
type GlobalMarketsPerpsExecuteResponse struct {
// 'ok' or 'error'
Status string `json:"status"`
// Hyperliquid response data (order statuses, etc.)
Response map[string]any `json:"response,omitzero"`
}
GlobalMarketsPerpsExecuteResponse - Returned after submitting a signed action to the Hyperliquid exchange.
func (*GlobalMarketsPerpsExecuteResponse) GetResponse ¶ added in v0.1.1
func (g *GlobalMarketsPerpsExecuteResponse) GetResponse() map[string]any
func (*GlobalMarketsPerpsExecuteResponse) GetStatus ¶ added in v0.1.1
func (g *GlobalMarketsPerpsExecuteResponse) GetStatus() string
func (GlobalMarketsPerpsExecuteResponse) MarshalJSON ¶ added in v0.1.1
func (g GlobalMarketsPerpsExecuteResponse) MarshalJSON() ([]byte, error)
func (*GlobalMarketsPerpsExecuteResponse) UnmarshalJSON ¶ added in v0.1.1
func (g *GlobalMarketsPerpsExecuteResponse) UnmarshalJSON(data []byte) error
type GlobalMarketsPerpsLimitOrderRequest ¶ added in v0.1.1
type GlobalMarketsPerpsLimitOrderRequest struct {
// Owner of the global markets perps product account
Owner string `json:"owner"`
// Asset ticker symbol (e.g. AAPL, GOLD, EUR)
Asset string `json:"asset"`
// Order side: 'buy' or 'sell'
Side string `json:"side"`
// Number of contracts (human-readable)
Size string `json:"size"`
// Limit price (human-readable)
Price string `json:"price"`
// Time-in-force: 'gtc' (good til cancel) or 'alo' (add liquidity only)
TimeInForce *string `json:"time_in_force,omitzero"`
// If true, order can only reduce an existing position
ReduceOnly *bool `json:"reduce_only,omitzero"`
// Optional client order ID for idempotency (uint128)
ClientOrderID optionalnullable.OptionalNullable[int64] `json:"client_order_id,omitzero"`
}
GlobalMarketsPerpsLimitOrderRequest - Request to place a limit order on a global markets perps market.
func (*GlobalMarketsPerpsLimitOrderRequest) GetAsset ¶ added in v0.1.1
func (g *GlobalMarketsPerpsLimitOrderRequest) GetAsset() string
func (*GlobalMarketsPerpsLimitOrderRequest) GetClientOrderID ¶ added in v0.1.1
func (g *GlobalMarketsPerpsLimitOrderRequest) GetClientOrderID() optionalnullable.OptionalNullable[int64]
func (*GlobalMarketsPerpsLimitOrderRequest) GetOwner ¶ added in v0.1.1
func (g *GlobalMarketsPerpsLimitOrderRequest) GetOwner() string
func (*GlobalMarketsPerpsLimitOrderRequest) GetPrice ¶ added in v0.1.1
func (g *GlobalMarketsPerpsLimitOrderRequest) GetPrice() string
func (*GlobalMarketsPerpsLimitOrderRequest) GetReduceOnly ¶ added in v0.1.1
func (g *GlobalMarketsPerpsLimitOrderRequest) GetReduceOnly() *bool
func (*GlobalMarketsPerpsLimitOrderRequest) GetSide ¶ added in v0.1.1
func (g *GlobalMarketsPerpsLimitOrderRequest) GetSide() string
func (*GlobalMarketsPerpsLimitOrderRequest) GetSize ¶ added in v0.1.1
func (g *GlobalMarketsPerpsLimitOrderRequest) GetSize() string
func (*GlobalMarketsPerpsLimitOrderRequest) GetTimeInForce ¶ added in v0.1.1
func (g *GlobalMarketsPerpsLimitOrderRequest) GetTimeInForce() *string
type GlobalMarketsPerpsMarketOrderRequest ¶ added in v0.1.1
type GlobalMarketsPerpsMarketOrderRequest struct {
// Owner of the global markets perps product account
Owner string `json:"owner"`
// Asset ticker symbol (e.g. AAPL, GOLD, EUR)
Asset string `json:"asset"`
// Order side: 'buy' or 'sell'
Side string `json:"side"`
// Number of contracts (human-readable)
Size string `json:"size"`
// Max slippage percentage for price protection
SlippagePercent *float64 `json:"slippage_percent,omitzero"`
// If true, order can only reduce an existing position
ReduceOnly *bool `json:"reduce_only,omitzero"`
}
GlobalMarketsPerpsMarketOrderRequest - Request to place a market order on a global markets perps market.
func (*GlobalMarketsPerpsMarketOrderRequest) GetAsset ¶ added in v0.1.1
func (g *GlobalMarketsPerpsMarketOrderRequest) GetAsset() string
func (*GlobalMarketsPerpsMarketOrderRequest) GetOwner ¶ added in v0.1.1
func (g *GlobalMarketsPerpsMarketOrderRequest) GetOwner() string
func (*GlobalMarketsPerpsMarketOrderRequest) GetReduceOnly ¶ added in v0.1.1
func (g *GlobalMarketsPerpsMarketOrderRequest) GetReduceOnly() *bool
func (*GlobalMarketsPerpsMarketOrderRequest) GetSide ¶ added in v0.1.1
func (g *GlobalMarketsPerpsMarketOrderRequest) GetSide() string
func (*GlobalMarketsPerpsMarketOrderRequest) GetSize ¶ added in v0.1.1
func (g *GlobalMarketsPerpsMarketOrderRequest) GetSize() string
func (*GlobalMarketsPerpsMarketOrderRequest) GetSlippagePercent ¶ added in v0.1.1
func (g *GlobalMarketsPerpsMarketOrderRequest) GetSlippagePercent() *float64
type GlobalMarketsPerpsOpportunitiesResponse ¶ added in v0.1.1
type GlobalMarketsPerpsOpportunitiesResponse struct {
// Available global markets perps markets
Opportunities []GlobalMarketsPerpsOpportunity `json:"opportunities"`
}
GlobalMarketsPerpsOpportunitiesResponse - List of available global markets perps markets.
func (*GlobalMarketsPerpsOpportunitiesResponse) GetOpportunities ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunitiesResponse) GetOpportunities() []GlobalMarketsPerpsOpportunity
type GlobalMarketsPerpsOpportunity ¶ added in v0.1.1
type GlobalMarketsPerpsOpportunity struct {
// Asset ticker symbol (e.g. AAPL, GOLD, EUR)
Asset string `json:"asset"`
// Hyperliquid asset index
AssetID int64 `json:"asset_id"`
// Asset category: stock, commodity, forex
Category string `json:"category"`
// Current mark price
MarkPrice string `json:"mark_price"`
// Oracle reference price
OraclePrice string `json:"oracle_price"`
// Open interest in USD
OpenInterest string `json:"open_interest"`
// 24-hour trading volume in USD
Volume24h string `json:"volume_24h"`
// Current hourly funding rate
FundingRate string `json:"funding_rate"`
// Maximum allowed leverage
MaxLeverage int64 `json:"max_leverage"`
// Size decimal places for order quantities
SzDecimals int64 `json:"sz_decimals"`
}
GlobalMarketsPerpsOpportunity - A single global markets perps market.
func (*GlobalMarketsPerpsOpportunity) GetAsset ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetAsset() string
func (*GlobalMarketsPerpsOpportunity) GetAssetID ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetAssetID() int64
func (*GlobalMarketsPerpsOpportunity) GetCategory ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetCategory() string
func (*GlobalMarketsPerpsOpportunity) GetFundingRate ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetFundingRate() string
func (*GlobalMarketsPerpsOpportunity) GetMarkPrice ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetMarkPrice() string
func (*GlobalMarketsPerpsOpportunity) GetMaxLeverage ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetMaxLeverage() int64
func (*GlobalMarketsPerpsOpportunity) GetOpenInterest ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetOpenInterest() string
func (*GlobalMarketsPerpsOpportunity) GetOraclePrice ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetOraclePrice() string
func (*GlobalMarketsPerpsOpportunity) GetSzDecimals ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetSzDecimals() int64
func (*GlobalMarketsPerpsOpportunity) GetVolume24h ¶ added in v0.1.1
func (g *GlobalMarketsPerpsOpportunity) GetVolume24h() string
type GlobalMarketsPerpsPosition ¶ added in v0.1.1
type GlobalMarketsPerpsPosition struct {
// Asset ticker symbol
Asset string `json:"asset"`
// Hyperliquid asset index
AssetID int64 `json:"asset_id"`
// Position side: 'long' or 'short'
Side Side `json:"side"`
// Position size in contracts
Size string `json:"size"`
// Average entry price
EntryPrice string `json:"entry_price"`
// Current mark price
MarkPrice string `json:"mark_price"`
// Estimated liquidation price
LiquidationPrice optionalnullable.OptionalNullable[string] `json:"liquidation_price,omitzero"`
// Unrealized PnL in USD
UnrealizedPnl string `json:"unrealized_pnl"`
// Current leverage
Leverage string `json:"leverage"`
// Margin used for this position in USD
MarginUsed string `json:"margin_used"`
// Cumulative funding payments (negative = paid)
FundingAccrued string `json:"funding_accrued"`
}
GlobalMarketsPerpsPosition - A single open perpetual futures position.
func (*GlobalMarketsPerpsPosition) GetAsset ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetAsset() string
func (*GlobalMarketsPerpsPosition) GetAssetID ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetAssetID() int64
func (*GlobalMarketsPerpsPosition) GetEntryPrice ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetEntryPrice() string
func (*GlobalMarketsPerpsPosition) GetFundingAccrued ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetFundingAccrued() string
func (*GlobalMarketsPerpsPosition) GetLeverage ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetLeverage() string
func (*GlobalMarketsPerpsPosition) GetLiquidationPrice ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetLiquidationPrice() optionalnullable.OptionalNullable[string]
func (*GlobalMarketsPerpsPosition) GetMarginUsed ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetMarginUsed() string
func (*GlobalMarketsPerpsPosition) GetMarkPrice ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetMarkPrice() string
func (*GlobalMarketsPerpsPosition) GetSide ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetSide() Side
func (*GlobalMarketsPerpsPosition) GetSize ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetSize() string
func (*GlobalMarketsPerpsPosition) GetUnrealizedPnl ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPosition) GetUnrealizedPnl() string
type GlobalMarketsPerpsPositionsResponse ¶ added in v0.1.1
type GlobalMarketsPerpsPositionsResponse struct {
// Open perpetual futures positions
Positions []GlobalMarketsPerpsPosition `json:"positions"`
// Total account value in USD (margin + unrealized PnL)
AccountValue *string `json:"account_value,omitzero"`
// Available USDC balance (withdrawable margin)
Withdrawable *string `json:"withdrawable,omitzero"`
}
GlobalMarketsPerpsPositionsResponse - List of open global markets perps positions with account balance.
func (*GlobalMarketsPerpsPositionsResponse) GetAccountValue ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPositionsResponse) GetAccountValue() *string
func (*GlobalMarketsPerpsPositionsResponse) GetPositions ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPositionsResponse) GetPositions() []GlobalMarketsPerpsPosition
func (*GlobalMarketsPerpsPositionsResponse) GetWithdrawable ¶ added in v0.1.1
func (g *GlobalMarketsPerpsPositionsResponse) GetWithdrawable() *string
type GlobalMarketsPerpsSignableActionResponse ¶ added in v0.1.1
type GlobalMarketsPerpsSignableActionResponse struct {
// EIP-712 typed data for wallet signing (domain, types, primaryType, message)
TypedData map[string]any `json:"typed_data"`
// Raw Hyperliquid action (passed back to the execute endpoint)
Action map[string]any `json:"action"`
// Timestamp-based nonce used during signing
Nonce int64 `json:"nonce"`
}
GlobalMarketsPerpsSignableActionResponse - Returned by prepare endpoints — contains EIP-712 typed data for the user to sign.
func (*GlobalMarketsPerpsSignableActionResponse) GetAction ¶ added in v0.1.1
func (g *GlobalMarketsPerpsSignableActionResponse) GetAction() map[string]any
func (*GlobalMarketsPerpsSignableActionResponse) GetNonce ¶ added in v0.1.1
func (g *GlobalMarketsPerpsSignableActionResponse) GetNonce() int64
func (*GlobalMarketsPerpsSignableActionResponse) GetTypedData ¶ added in v0.1.1
func (g *GlobalMarketsPerpsSignableActionResponse) GetTypedData() map[string]any
type GlobalMarketsPerpsWithdrawRequest ¶ added in v0.1.1
type GlobalMarketsPerpsWithdrawRequest struct {
// The user's EOA address (owner of the global markets perps account)
Owner string `json:"owner"`
// USDC amount to withdraw (human-readable, e.g. '500.0')
Amount string `json:"amount"`
// Arbitrum destination address (defaults to owner if not specified)
Destination optionalnullable.OptionalNullable[string] `json:"destination,omitzero"`
}
GlobalMarketsPerpsWithdrawRequest - Request to withdraw USDC from HyperEVM global markets perps account to Arbitrum.
func (*GlobalMarketsPerpsWithdrawRequest) GetAmount ¶ added in v0.1.1
func (g *GlobalMarketsPerpsWithdrawRequest) GetAmount() string
func (*GlobalMarketsPerpsWithdrawRequest) GetDestination ¶ added in v0.1.1
func (g *GlobalMarketsPerpsWithdrawRequest) GetDestination() optionalnullable.OptionalNullable[string]
func (*GlobalMarketsPerpsWithdrawRequest) GetOwner ¶ added in v0.1.1
func (g *GlobalMarketsPerpsWithdrawRequest) GetOwner() string
type HTTPMetadata ¶
type HTTPMetadata struct {
// Raw HTTP response; suitable for custom response parsing
Response *http.Response `json:"-"`
// Raw HTTP request; suitable for debugging
Request *http.Request `json:"-"`
}
func (*HTTPMetadata) GetRequest ¶
func (h *HTTPMetadata) GetRequest() *http.Request
func (*HTTPMetadata) GetResponse ¶
func (h *HTTPMetadata) GetResponse() *http.Response
type InterestRateMode ¶
type InterestRateMode string
InterestRateMode - On AAVE there are 2 different interest modes.
A stable (but typically higher rate), or a variable rate.
const ( InterestRateModeStable InterestRateMode = "stable" InterestRateModeVariable InterestRateMode = "variable" )
func (InterestRateMode) ToPointer ¶
func (e InterestRateMode) ToPointer() *InterestRateMode
func (*InterestRateMode) UnmarshalJSON ¶
func (e *InterestRateMode) UnmarshalJSON(data []byte) error
type ListAaveMarketsResponse ¶
type ListAaveMarketsResponse struct {
// Market data keyed by token symbol. Each token contains chain-specific data and information about which chain has the highest supply APY.
Markets map[string]TokenMarketData `json:"markets"`
}
ListAaveMarketsResponse - Response containing Aave market rates organized by token symbol.
func (*ListAaveMarketsResponse) GetMarkets ¶
func (l *ListAaveMarketsResponse) GetMarkets() map[string]TokenMarketData
type Loc ¶
type Loc struct {
Str *string `queryParam:"inline" union:"member"`
Integer *int64 `queryParam:"inline" union:"member"`
UnknownRaw json.RawMessage `json:"-" union:"unknown"`
Type LocType
}
func CreateLocInteger ¶
func CreateLocStr ¶
func CreateLocUnknown ¶
func CreateLocUnknown(raw json.RawMessage) Loc
func (Loc) GetUnknownRaw ¶
func (u Loc) GetUnknownRaw() json.RawMessage
func (Loc) MarshalJSON ¶
func (*Loc) UnmarshalJSON ¶
type MarketAllocation ¶
type MarketAllocation struct {
// Morpho Blue market unique identifier (bytes32 hex string).
MarketID string `json:"market_id"`
// Address of the token being lent in this market.
LoanToken string `json:"loan_token"`
// Symbol of the loan token (e.g., 'USDC').
LoanTokenSymbol optionalnullable.OptionalNullable[string] `json:"loan_token_symbol,omitzero"`
// Address of the collateral token accepted by this market.
CollateralToken string `json:"collateral_token"`
// Symbol of the collateral token (e.g., 'WETH').
CollateralTokenSymbol optionalnullable.OptionalNullable[string] `json:"collateral_token_symbol,omitzero"`
// Liquidation Loan-To-Value ratio as a raw uint256 string. Divide by 1e18 to get the decimal ratio (e.g., '860000000000000000' = 86%).
Lltv string `json:"lltv"`
// Maximum amount the vault is allowed to supply to this market, as a raw uint184 string in the smallest token unit.
SupplyCap optionalnullable.OptionalNullable[string] `json:"supply_cap,omitzero"`
// Amount currently supplied by the vault to this market, in the smallest token unit (converted from shares).
SupplyAssets optionalnullable.OptionalNullable[string] `json:"supply_assets,omitzero"`
// Percentage of the vault's total supplied capital allocated to this market (e.g., 45.5 means 45.5%).
AllocationPct optionalnullable.OptionalNullable[float64] `json:"allocation_pct,omitzero"`
}
MarketAllocation - A Morpho Blue market that a vault allocates capital to.
func (*MarketAllocation) GetAllocationPct ¶
func (m *MarketAllocation) GetAllocationPct() optionalnullable.OptionalNullable[float64]
func (*MarketAllocation) GetCollateralToken ¶
func (m *MarketAllocation) GetCollateralToken() string
func (*MarketAllocation) GetCollateralTokenSymbol ¶
func (m *MarketAllocation) GetCollateralTokenSymbol() optionalnullable.OptionalNullable[string]
func (*MarketAllocation) GetLltv ¶
func (m *MarketAllocation) GetLltv() string
func (*MarketAllocation) GetLoanToken ¶
func (m *MarketAllocation) GetLoanToken() string
func (*MarketAllocation) GetLoanTokenSymbol ¶
func (m *MarketAllocation) GetLoanTokenSymbol() optionalnullable.OptionalNullable[string]
func (*MarketAllocation) GetMarketID ¶
func (m *MarketAllocation) GetMarketID() string
func (*MarketAllocation) GetSupplyAssets ¶
func (m *MarketAllocation) GetSupplyAssets() optionalnullable.OptionalNullable[string]
func (*MarketAllocation) GetSupplyCap ¶
func (m *MarketAllocation) GetSupplyCap() optionalnullable.OptionalNullable[string]
type MarketDetail ¶
type MarketDetail struct {
// On-chain token symbol (e.g. 'TSLAon').
Symbol string `json:"symbol"`
// Underlying equity ticker (e.g. 'TSLA').
UnderlyingTicker string `json:"underlying_ticker"`
// Underlying equity full name (e.g. 'Tesla, Inc. Common Stock').
Name string `json:"name"`
// Chain on which the contract is deployed.
Chain *MarketDetailChain `json:"chain,omitzero"`
// Ethereum mainnet ERC-20 address for this token.
ContractAddress string `json:"contract_address"`
// ERC-20 decimals for this token.
Decimals int64 `json:"decimals"`
// Latest price in USD as a decimal string.
CurrentPriceUsd string `json:"current_price_usd"`
// Absolute USD price change vs 24h ago (decimal string).
Change24hUsd optionalnullable.OptionalNullable[string] `json:"change_24h_usd,omitzero"`
// Percent price change vs 24h ago (decimal string).
Change24hPct optionalnullable.OptionalNullable[string] `json:"change_24h_pct,omitzero"`
// Sector / industry tags from the issuer (e.g. ['Technology']).
Sectors []string `json:"sectors,omitzero"`
// Regional market exposure tags (e.g. ['US']).
RegionExposure []string `json:"region_exposure,omitzero"`
// 24h price sparkline as `(timestamp, price)` samples in chronological order.
PriceHistory24h []PricePoint `json:"price_history_24h,omitzero"`
// 52-week high of the underlying equity (USD).
PriceHigh52w optionalnullable.OptionalNullable[string] `json:"price_high_52w,omitzero"`
// 52-week low of the underlying equity (USD).
PriceLow52w optionalnullable.OptionalNullable[string] `json:"price_low_52w,omitzero"`
// 24h trading volume of the underlying equity.
Volume24h optionalnullable.OptionalNullable[string] `json:"volume_24h,omitzero"`
// Average trading volume of the underlying equity.
AverageVolume optionalnullable.OptionalNullable[string] `json:"average_volume,omitzero"`
SharesOutstanding optionalnullable.OptionalNullable[string] `json:"shares_outstanding,omitzero"`
// Market cap of the underlying equity (USD).
MarketCap optionalnullable.OptionalNullable[string] `json:"market_cap,omitzero"`
// On-chain holder count for the tokenized asset.
TotalHolders optionalnullable.OptionalNullable[int64] `json:"total_holders,omitzero"`
// Sessions in which the token can be traded (e.g. 'regular', 'premarket').
TradableSessions []string `json:"tradable_sessions,omitzero"`
SharesMultiplier optionalnullable.OptionalNullable[string] `json:"shares_multiplier,omitzero"`
// OHLC candles. Present only when both `interval` and `range` query params are provided and form a valid pair; omitted otherwise.
Candles optionalnullable.OptionalNullable[[]OhlcCandle] `json:"candles,omitzero"`
}
MarketDetail - Extended market view returned when fetching a single market.
func (*MarketDetail) GetAverageVolume ¶
func (m *MarketDetail) GetAverageVolume() optionalnullable.OptionalNullable[string]
func (*MarketDetail) GetCandles ¶
func (m *MarketDetail) GetCandles() optionalnullable.OptionalNullable[[]OhlcCandle]
func (*MarketDetail) GetChain ¶
func (m *MarketDetail) GetChain() *MarketDetailChain
func (*MarketDetail) GetChange24hPct ¶
func (m *MarketDetail) GetChange24hPct() optionalnullable.OptionalNullable[string]
func (*MarketDetail) GetChange24hUsd ¶
func (m *MarketDetail) GetChange24hUsd() optionalnullable.OptionalNullable[string]
func (*MarketDetail) GetContractAddress ¶
func (m *MarketDetail) GetContractAddress() string
func (*MarketDetail) GetCurrentPriceUsd ¶
func (m *MarketDetail) GetCurrentPriceUsd() string
func (*MarketDetail) GetDecimals ¶
func (m *MarketDetail) GetDecimals() int64
func (*MarketDetail) GetMarketCap ¶
func (m *MarketDetail) GetMarketCap() optionalnullable.OptionalNullable[string]
func (*MarketDetail) GetName ¶
func (m *MarketDetail) GetName() string
func (*MarketDetail) GetPriceHigh52w ¶
func (m *MarketDetail) GetPriceHigh52w() optionalnullable.OptionalNullable[string]
func (*MarketDetail) GetPriceHistory24h ¶
func (m *MarketDetail) GetPriceHistory24h() []PricePoint
func (*MarketDetail) GetPriceLow52w ¶
func (m *MarketDetail) GetPriceLow52w() optionalnullable.OptionalNullable[string]
func (*MarketDetail) GetRegionExposure ¶
func (m *MarketDetail) GetRegionExposure() []string
func (*MarketDetail) GetSectors ¶
func (m *MarketDetail) GetSectors() []string
func (*MarketDetail) GetSharesMultiplier ¶
func (m *MarketDetail) GetSharesMultiplier() optionalnullable.OptionalNullable[string]
func (*MarketDetail) GetSharesOutstanding ¶
func (m *MarketDetail) GetSharesOutstanding() optionalnullable.OptionalNullable[string]
func (*MarketDetail) GetSymbol ¶
func (m *MarketDetail) GetSymbol() string
func (*MarketDetail) GetTotalHolders ¶
func (m *MarketDetail) GetTotalHolders() optionalnullable.OptionalNullable[int64]
func (*MarketDetail) GetTradableSessions ¶
func (m *MarketDetail) GetTradableSessions() []string
func (*MarketDetail) GetUnderlyingTicker ¶
func (m *MarketDetail) GetUnderlyingTicker() string
func (*MarketDetail) GetVolume24h ¶
func (m *MarketDetail) GetVolume24h() optionalnullable.OptionalNullable[string]
func (MarketDetail) MarshalJSON ¶
func (m MarketDetail) MarshalJSON() ([]byte, error)
func (*MarketDetail) UnmarshalJSON ¶
func (m *MarketDetail) UnmarshalJSON(data []byte) error
type MarketDetailChain ¶
type MarketDetailChain string
MarketDetailChain - Chain on which the contract is deployed.
const (
MarketDetailChainEthereum MarketDetailChain = "ethereum"
)
func (MarketDetailChain) ToPointer ¶
func (e MarketDetailChain) ToPointer() *MarketDetailChain
func (*MarketDetailChain) UnmarshalJSON ¶
func (e *MarketDetailChain) UnmarshalJSON(data []byte) error
type MaxSupplyApyInfo ¶
type MaxSupplyApyInfo struct {
// Chain name with the highest supply APY for this token.
Chain string `json:"chain"`
// Token contract address on the chain with highest supply APY.
Address string `json:"address"`
// Aave aToken contract address on the chain with highest supply APY.
ATokenAddress string `json:"a_token_address"`
// The highest supply APY for this token across all chains, in percentage.
SupplyApy string `json:"supply_apy"`
// Borrow APY on the chain with the highest supply APY, in percentage.
BorrowApy string `json:"borrow_apy"`
}
MaxSupplyApyInfo - Information about the chain with the highest supply APY for a token.
func (*MaxSupplyApyInfo) GetATokenAddress ¶
func (m *MaxSupplyApyInfo) GetATokenAddress() string
func (*MaxSupplyApyInfo) GetAddress ¶
func (m *MaxSupplyApyInfo) GetAddress() string
func (*MaxSupplyApyInfo) GetBorrowApy ¶
func (m *MaxSupplyApyInfo) GetBorrowApy() string
func (*MaxSupplyApyInfo) GetChain ¶
func (m *MaxSupplyApyInfo) GetChain() string
func (*MaxSupplyApyInfo) GetSupplyApy ¶
func (m *MaxSupplyApyInfo) GetSupplyApy() string
type OhlcCandle ¶
type OhlcCandle struct {
// ISO 8601 UTC timestamp at candle open.
Timestamp string `json:"timestamp"`
// Open price (decimal string).
Open string `json:"open"`
// High price (decimal string).
High string `json:"high"`
// Low price (decimal string).
Low string `json:"low"`
// Close price (decimal string).
Close string `json:"close"`
}
OhlcCandle - A single OHLC candle. Per-candle volume is not provided.
func (*OhlcCandle) GetClose ¶
func (o *OhlcCandle) GetClose() string
func (*OhlcCandle) GetHigh ¶
func (o *OhlcCandle) GetHigh() string
func (*OhlcCandle) GetLow ¶
func (o *OhlcCandle) GetLow() string
func (*OhlcCandle) GetOpen ¶
func (o *OhlcCandle) GetOpen() string
func (*OhlcCandle) GetTimestamp ¶
func (o *OhlcCandle) GetTimestamp() string
type OperationType ¶
type OperationType int64
OperationType - Safe operation types.
const ( OperationTypeZero OperationType = 0 OperationTypeOne OperationType = 1 )
func (*OperationType) IsExact ¶
func (e *OperationType) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (OperationType) ToPointer ¶
func (e OperationType) ToPointer() *OperationType
type OrderStatus ¶
type OrderStatus struct {
// On-chain order hash.
OrderHash string `json:"order_hash"`
// Order lifecycle state. One of `pending`, `filled`, `expired`, or `cancelled`. Upstream protocol states beyond these four (e.g. `partially-filled`, `refunded`) are mapped onto this set.
Status Status `json:"status"`
// Transaction hash of the most recent fill. Populated for fully filled orders and for partial fills while `status` is still `pending`.
FillTxHash optionalnullable.OptionalNullable[string] `json:"fill_tx_hash,omitzero"`
// Implied USD execution rate per unit of the received token, derived from filled amounts and the input token's USD price. For USDC → equity buys, this is the USD paid per equity unit. Omitted when token decimals or pricing are not available.
FillPriceUsd optionalnullable.OptionalNullable[string] `json:"fill_price_usd,omitzero"`
// Total amount filled so far, expressed as a raw integer in the input token's decimals. Populated for partial fills while `status` is still `pending`, and for fully filled orders.
FilledAmount optionalnullable.OptionalNullable[string] `json:"filled_amount,omitzero"`
// ISO 8601 UTC timestamp at which the order was submitted.
SubmittedAt optionalnullable.OptionalNullable[string] `json:"submitted_at,omitzero"`
// ISO 8601 UTC timestamp at which this status was read.
UpdatedAt string `json:"updated_at"`
}
OrderStatus - Returned from `GET /order/{hash}` — current state of a relayed order.
func (*OrderStatus) GetFillPriceUsd ¶
func (o *OrderStatus) GetFillPriceUsd() optionalnullable.OptionalNullable[string]
func (*OrderStatus) GetFillTxHash ¶
func (o *OrderStatus) GetFillTxHash() optionalnullable.OptionalNullable[string]
func (*OrderStatus) GetFilledAmount ¶
func (o *OrderStatus) GetFilledAmount() optionalnullable.OptionalNullable[string]
func (*OrderStatus) GetOrderHash ¶
func (o *OrderStatus) GetOrderHash() string
func (*OrderStatus) GetStatus ¶
func (o *OrderStatus) GetStatus() Status
func (*OrderStatus) GetSubmittedAt ¶
func (o *OrderStatus) GetSubmittedAt() optionalnullable.OptionalNullable[string]
func (*OrderStatus) GetUpdatedAt ¶
func (o *OrderStatus) GetUpdatedAt() string
type OrderToSign ¶
type OrderToSign struct {
// The on-chain order hash. Wrapped inside `safe_message_eip712.message.message` for the owner to sign; also passed back to `/order/submit` so the API can return a usable handle even if the upstream submit response omits the hash.
OrderHash string `json:"order_hash"`
// Opaque hex blob from the upstream quote — pass back to `/order/submit` unchanged.
Extension string `json:"extension"`
// Upstream quote identifier — must be echoed back at `/order/submit`.
QuoteID string `json:"quote_id"`
// Order struct (maker, makerAsset, makingAmount, etc.) — pass back to `/order/submit` unchanged. The maker is the Tokenized Assets Account, not the owner's wallet.
OrderMessage map[string]any `json:"order_message"`
// “signTypedData“ payload for “SafeMessage(bytes message)“.
SafeMessageEip712 SafeMessageEip712Response `json:"safe_message_eip712"`
}
OrderToSign - Order metadata plus the EIP-712 payload the owner signs to authorize it.
The owner signs “safe_message_eip712“ off-chain. At submit time the signature is sent back to “/order/submit“ together with “order_message“, “extension“, and “quote_id“; resolvers validate the signature against the Tokenized Assets Account at fill time.
func (*OrderToSign) GetExtension ¶
func (o *OrderToSign) GetExtension() string
func (*OrderToSign) GetOrderHash ¶
func (o *OrderToSign) GetOrderHash() string
func (*OrderToSign) GetOrderMessage ¶
func (o *OrderToSign) GetOrderMessage() map[string]any
func (*OrderToSign) GetQuoteID ¶
func (o *OrderToSign) GetQuoteID() string
func (*OrderToSign) GetSafeMessageEip712 ¶
func (o *OrderToSign) GetSafeMessageEip712() SafeMessageEip712Response
type PendleDepositEvent ¶
type PendleDepositEvent struct {
// Block number when deposit occurred
BlockNumber int64 `json:"block_number"`
// Timestamp when deposit occurred
BlockTimestamp time.Time `json:"block_timestamp"`
// Transaction hash of the deposit
TransactionHash string `json:"transaction_hash"`
// Amount deposited (token spent)
InputAmount string `json:"input_amount"`
// Symbol of token deposited
InputSymbol string `json:"input_symbol"`
// PT tokens received
OutputAmount string `json:"output_amount"`
// Symbol (PT)
OutputSymbol string `json:"output_symbol"`
// Cost basis per PT at deposit (SY spent per PT acquired)
CostPerUnit string `json:"cost_per_unit"`
}
PendleDepositEvent - Pendle PT deposit event with cost basis at time of deposit.
func (*PendleDepositEvent) GetBlockNumber ¶
func (p *PendleDepositEvent) GetBlockNumber() int64
func (*PendleDepositEvent) GetBlockTimestamp ¶
func (p *PendleDepositEvent) GetBlockTimestamp() time.Time
func (*PendleDepositEvent) GetCostPerUnit ¶
func (p *PendleDepositEvent) GetCostPerUnit() string
func (*PendleDepositEvent) GetInputAmount ¶
func (p *PendleDepositEvent) GetInputAmount() string
func (*PendleDepositEvent) GetInputSymbol ¶
func (p *PendleDepositEvent) GetInputSymbol() string
func (*PendleDepositEvent) GetOutputAmount ¶
func (p *PendleDepositEvent) GetOutputAmount() string
func (*PendleDepositEvent) GetOutputSymbol ¶
func (p *PendleDepositEvent) GetOutputSymbol() string
func (*PendleDepositEvent) GetTransactionHash ¶
func (p *PendleDepositEvent) GetTransactionHash() string
func (PendleDepositEvent) MarshalJSON ¶
func (p PendleDepositEvent) MarshalJSON() ([]byte, error)
func (*PendleDepositEvent) UnmarshalJSON ¶
func (p *PendleDepositEvent) UnmarshalJSON(data []byte) error
type PendleMarketInfo ¶
type PendleMarketInfo struct {
// The Pendle market contract address.
MarketAddress string `json:"market_address"`
// Blockchain name (e.g., 'ethereum', 'arbitrum').
Chain string `json:"chain"`
// The Principal Token (PT) address.
PtAddress string `json:"pt_address"`
// The Standardized Yield (SY) token address.
SyAddress optionalnullable.OptionalNullable[string] `json:"sy_address,omitzero"`
// The Yield Token (YT) address.
YtAddress optionalnullable.OptionalNullable[string] `json:"yt_address,omitzero"`
// The market maturity timestamp (Unix epoch seconds).
Expiry optionalnullable.OptionalNullable[int64] `json:"expiry,omitzero"`
// The underlying asset contract address.
UnderlyingAsset optionalnullable.OptionalNullable[string] `json:"underlying_asset,omitzero"`
// The name of the underlying asset.
UnderlyingName optionalnullable.OptionalNullable[string] `json:"underlying_name,omitzero"`
// The symbol of the underlying asset (e.g., 'USDC').
UnderlyingSymbol optionalnullable.OptionalNullable[string] `json:"underlying_symbol,omitzero"`
// The name of the Principal Token.
PtName optionalnullable.OptionalNullable[string] `json:"pt_name,omitzero"`
// The symbol of the Principal Token.
PtSymbol optionalnullable.OptionalNullable[string] `json:"pt_symbol,omitzero"`
// Total Value Locked in USD.
TvlUsd optionalnullable.OptionalNullable[string] `json:"tvl_usd,omitzero"`
// Implied APY as a percentage (e.g., 5.25 = 5.25%).
ImpliedApy optionalnullable.OptionalNullable[string] `json:"implied_apy,omitzero"`
}
PendleMarketInfo - Information about a single Pendle market from the database.
func (*PendleMarketInfo) GetChain ¶
func (p *PendleMarketInfo) GetChain() string
func (*PendleMarketInfo) GetExpiry ¶
func (p *PendleMarketInfo) GetExpiry() optionalnullable.OptionalNullable[int64]
func (*PendleMarketInfo) GetImpliedApy ¶
func (p *PendleMarketInfo) GetImpliedApy() optionalnullable.OptionalNullable[string]
func (*PendleMarketInfo) GetMarketAddress ¶
func (p *PendleMarketInfo) GetMarketAddress() string
func (*PendleMarketInfo) GetPtAddress ¶
func (p *PendleMarketInfo) GetPtAddress() string
func (*PendleMarketInfo) GetPtName ¶
func (p *PendleMarketInfo) GetPtName() optionalnullable.OptionalNullable[string]
func (*PendleMarketInfo) GetPtSymbol ¶
func (p *PendleMarketInfo) GetPtSymbol() optionalnullable.OptionalNullable[string]
func (*PendleMarketInfo) GetSyAddress ¶
func (p *PendleMarketInfo) GetSyAddress() optionalnullable.OptionalNullable[string]
func (*PendleMarketInfo) GetTvlUsd ¶
func (p *PendleMarketInfo) GetTvlUsd() optionalnullable.OptionalNullable[string]
func (*PendleMarketInfo) GetUnderlyingAsset ¶
func (p *PendleMarketInfo) GetUnderlyingAsset() optionalnullable.OptionalNullable[string]
func (*PendleMarketInfo) GetUnderlyingName ¶
func (p *PendleMarketInfo) GetUnderlyingName() optionalnullable.OptionalNullable[string]
func (*PendleMarketInfo) GetUnderlyingSymbol ¶
func (p *PendleMarketInfo) GetUnderlyingSymbol() optionalnullable.OptionalNullable[string]
func (*PendleMarketInfo) GetYtAddress ¶
func (p *PendleMarketInfo) GetYtAddress() optionalnullable.OptionalNullable[string]
type PendleMarketsResponse ¶
type PendleMarketsResponse struct {
Total int64 `json:"total"`
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
// A list of Pendle market information objects.
Markets []PendleMarketInfo `json:"markets"`
}
PendleMarketsResponse - Response model for a paginated list of Pendle markets.
func (*PendleMarketsResponse) GetLimit ¶
func (p *PendleMarketsResponse) GetLimit() int64
func (*PendleMarketsResponse) GetMarkets ¶
func (p *PendleMarketsResponse) GetMarkets() []PendleMarketInfo
func (*PendleMarketsResponse) GetOffset ¶
func (p *PendleMarketsResponse) GetOffset() int64
func (*PendleMarketsResponse) GetTotal ¶
func (p *PendleMarketsResponse) GetTotal() int64
type PendlePTPosition ¶
type PendlePTPosition struct {
// The Pendle market address.
MarketAddress string `json:"market_address"`
// The PT (Principal Token) contract address.
PtAddress string `json:"pt_address"`
// Symbol of the underlying asset (e.g., rsETH, weETH).
UnderlyingSymbol string `json:"underlying_symbol"`
// Address of the underlying asset (base asset from SY).
UnderlyingAddress string `json:"underlying_address"`
// Address of the yield token (e.g., weETH) used for USD pricing.
YieldTokenAddress string `json:"yield_token_address"`
// The user's PT token balance.
PtBalance *string `json:"pt_balance"`
// Market expiry timestamp (Unix seconds).
Expiry int64 `json:"expiry"`
// Current PT-to-SY exchange rate (SY received per PT if sold now).
CurrentPtToSyRate *string `json:"current_pt_to_sy_rate"`
// Position value in USD (null if price unavailable).
UsdValue optionalnullable.OptionalNullable[string] `json:"usd_value,omitzero"`
// PnL metrics (in SY terms) for this position.
Pnl optionalnullable.OptionalNullable[PositionPnL] `json:"pnl,omitzero"`
// All buy PT events for this position.
Deposits []PendleDepositEvent `json:"deposits,omitzero"`
// All sell/redeem PT events for this position.
Withdrawals []PendleWithdrawalEvent `json:"withdrawals,omitzero"`
// Implied APY (percentage).
ImpliedApy optionalnullable.OptionalNullable[string] `json:"implied_apy,omitzero"`
// contains filtered or unexported fields
}
PendlePTPosition - Pendle Principal Token position.
func (*PendlePTPosition) GetCurrentPtToSyRate ¶
func (p *PendlePTPosition) GetCurrentPtToSyRate() *string
func (*PendlePTPosition) GetDeposits ¶
func (p *PendlePTPosition) GetDeposits() []PendleDepositEvent
func (*PendlePTPosition) GetExpiry ¶
func (p *PendlePTPosition) GetExpiry() int64
func (*PendlePTPosition) GetImpliedApy ¶
func (p *PendlePTPosition) GetImpliedApy() optionalnullable.OptionalNullable[string]
func (*PendlePTPosition) GetMarketAddress ¶
func (p *PendlePTPosition) GetMarketAddress() string
func (*PendlePTPosition) GetPnl ¶
func (p *PendlePTPosition) GetPnl() optionalnullable.OptionalNullable[PositionPnL]
func (*PendlePTPosition) GetPtAddress ¶
func (p *PendlePTPosition) GetPtAddress() string
func (*PendlePTPosition) GetPtBalance ¶
func (p *PendlePTPosition) GetPtBalance() *string
func (*PendlePTPosition) GetType ¶
func (p *PendlePTPosition) GetType() string
func (*PendlePTPosition) GetUnderlyingAddress ¶
func (p *PendlePTPosition) GetUnderlyingAddress() string
func (*PendlePTPosition) GetUnderlyingSymbol ¶
func (p *PendlePTPosition) GetUnderlyingSymbol() string
func (*PendlePTPosition) GetUsdValue ¶
func (p *PendlePTPosition) GetUsdValue() optionalnullable.OptionalNullable[string]
func (*PendlePTPosition) GetWithdrawals ¶
func (p *PendlePTPosition) GetWithdrawals() []PendleWithdrawalEvent
func (*PendlePTPosition) GetYieldTokenAddress ¶
func (p *PendlePTPosition) GetYieldTokenAddress() string
func (PendlePTPosition) MarshalJSON ¶
func (p PendlePTPosition) MarshalJSON() ([]byte, error)
func (*PendlePTPosition) UnmarshalJSON ¶
func (p *PendlePTPosition) UnmarshalJSON(data []byte) error
type PendlePTVenue ¶
type PendlePTVenue struct {
// The Pendle market address identifying which PT to trade.
MarketAddress string `json:"market_address"`
// The token to exchange for PT (only used for DEPOSIT/buy). For WITHDRAW/sell, this field must not be provided - withdrawals always return the underlying asset to ensure accurate yield fee calculation.
Token optionalnullable.OptionalNullable[string] `json:"token,omitzero"`
// Maximum slippage allowed in percent (e.g., 1 means 1% slippage).
MaxSlippagePercent *float64 `json:"max_slippage_percent,omitzero"`
// contains filtered or unexported fields
}
PendlePTVenue - Venue for Pendle Principal Token (PT) positions.
func (*PendlePTVenue) GetMarketAddress ¶
func (p *PendlePTVenue) GetMarketAddress() string
func (*PendlePTVenue) GetMaxSlippagePercent ¶
func (p *PendlePTVenue) GetMaxSlippagePercent() *float64
func (*PendlePTVenue) GetToken ¶
func (p *PendlePTVenue) GetToken() optionalnullable.OptionalNullable[string]
func (*PendlePTVenue) GetType ¶
func (p *PendlePTVenue) GetType() string
func (PendlePTVenue) MarshalJSON ¶
func (p PendlePTVenue) MarshalJSON() ([]byte, error)
func (*PendlePTVenue) UnmarshalJSON ¶
func (p *PendlePTVenue) UnmarshalJSON(data []byte) error
type PendleWithdrawalEvent ¶
type PendleWithdrawalEvent struct {
// Block number when withdrawal occurred
BlockNumber int64 `json:"block_number"`
// Timestamp when withdrawal occurred
BlockTimestamp time.Time `json:"block_timestamp"`
// Transaction hash of the withdrawal
TransactionHash string `json:"transaction_hash"`
// PT tokens sold/redeemed
InputAmount string `json:"input_amount"`
// Symbol (PT)
InputSymbol string `json:"input_symbol"`
// Amount received (SY or token)
OutputAmount string `json:"output_amount"`
// Symbol of token received
OutputSymbol string `json:"output_symbol"`
// Profit/loss: output value - cost basis consumed
RealizedPnl string `json:"realized_pnl"`
// Cost basis per PT at withdrawal (SY received per PT sold)
CostPerUnit string `json:"cost_per_unit"`
}
PendleWithdrawalEvent - Pendle PT withdrawal event with cost basis at time of withdrawal.
func (*PendleWithdrawalEvent) GetBlockNumber ¶
func (p *PendleWithdrawalEvent) GetBlockNumber() int64
func (*PendleWithdrawalEvent) GetBlockTimestamp ¶
func (p *PendleWithdrawalEvent) GetBlockTimestamp() time.Time
func (*PendleWithdrawalEvent) GetCostPerUnit ¶
func (p *PendleWithdrawalEvent) GetCostPerUnit() string
func (*PendleWithdrawalEvent) GetInputAmount ¶
func (p *PendleWithdrawalEvent) GetInputAmount() string
func (*PendleWithdrawalEvent) GetInputSymbol ¶
func (p *PendleWithdrawalEvent) GetInputSymbol() string
func (*PendleWithdrawalEvent) GetOutputAmount ¶
func (p *PendleWithdrawalEvent) GetOutputAmount() string
func (*PendleWithdrawalEvent) GetOutputSymbol ¶
func (p *PendleWithdrawalEvent) GetOutputSymbol() string
func (*PendleWithdrawalEvent) GetRealizedPnl ¶
func (p *PendleWithdrawalEvent) GetRealizedPnl() string
func (*PendleWithdrawalEvent) GetTransactionHash ¶
func (p *PendleWithdrawalEvent) GetTransactionHash() string
func (PendleWithdrawalEvent) MarshalJSON ¶
func (p PendleWithdrawalEvent) MarshalJSON() ([]byte, error)
func (*PendleWithdrawalEvent) UnmarshalJSON ¶
func (p *PendleWithdrawalEvent) UnmarshalJSON(data []byte) error
type Permit2TypedDataInput ¶
type Permit2TypedDataInput struct {
Types CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types `json:"types"`
Domain CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain `json:"domain"`
Message PermitTransferFromMessage `json:"message"`
// contains filtered or unexported fields
}
func (*Permit2TypedDataInput) GetDomain ¶
func (p *Permit2TypedDataInput) GetDomain() CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain
func (*Permit2TypedDataInput) GetMessage ¶
func (p *Permit2TypedDataInput) GetMessage() PermitTransferFromMessage
func (*Permit2TypedDataInput) GetPrimaryType ¶
func (p *Permit2TypedDataInput) GetPrimaryType() *string
func (*Permit2TypedDataInput) GetTypes ¶
func (p *Permit2TypedDataInput) GetTypes() CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types
func (Permit2TypedDataInput) MarshalJSON ¶
func (p Permit2TypedDataInput) MarshalJSON() ([]byte, error)
func (*Permit2TypedDataInput) UnmarshalJSON ¶
func (p *Permit2TypedDataInput) UnmarshalJSON(data []byte) error
type Permit2TypedDataOutput ¶
type Permit2TypedDataOutput struct {
Types CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types `json:"types"`
Domain CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain `json:"domain"`
Message PermitTransferFromMessage `json:"message"`
// contains filtered or unexported fields
}
func (*Permit2TypedDataOutput) GetDomain ¶
func (p *Permit2TypedDataOutput) GetDomain() CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Domain
func (*Permit2TypedDataOutput) GetMessage ¶
func (p *Permit2TypedDataOutput) GetMessage() PermitTransferFromMessage
func (*Permit2TypedDataOutput) GetPrimaryType ¶
func (p *Permit2TypedDataOutput) GetPrimaryType() *string
func (*Permit2TypedDataOutput) GetTypes ¶
func (p *Permit2TypedDataOutput) GetTypes() CompassAPIBackendV2ModelsGasSponsorshipPermit2TypedDataEip712Types
func (Permit2TypedDataOutput) MarshalJSON ¶
func (p Permit2TypedDataOutput) MarshalJSON() ([]byte, error)
func (*Permit2TypedDataOutput) UnmarshalJSON ¶
func (p *Permit2TypedDataOutput) UnmarshalJSON(data []byte) error
type PermitField ¶
PermitField - A field in the Permit type definition.
func (*PermitField) GetName ¶
func (p *PermitField) GetName() string
func (*PermitField) GetType ¶
func (p *PermitField) GetType() string
func (PermitField) MarshalJSON ¶
func (p PermitField) MarshalJSON() ([]byte, error)
func (*PermitField) UnmarshalJSON ¶
func (p *PermitField) UnmarshalJSON(data []byte) error
type PermitMessage ¶
type PermitMessage struct {
// Token owner address
Owner string `json:"owner"`
// Address authorized to spend tokens
Spender string `json:"spender"`
// Amount to approve (as string)
Value string `json:"value"`
// Current permit nonce for the owner
Nonce string `json:"nonce"`
// Permit expiry timestamp
Deadline string `json:"deadline"`
}
PermitMessage - The message data for an ERC-20 Permit.
func (*PermitMessage) GetDeadline ¶
func (p *PermitMessage) GetDeadline() string
func (*PermitMessage) GetNonce ¶
func (p *PermitMessage) GetNonce() string
func (*PermitMessage) GetOwner ¶
func (p *PermitMessage) GetOwner() string
func (*PermitMessage) GetSpender ¶
func (p *PermitMessage) GetSpender() string
func (*PermitMessage) GetValue ¶
func (p *PermitMessage) GetValue() string
func (PermitMessage) MarshalJSON ¶
func (p PermitMessage) MarshalJSON() ([]byte, error)
func (*PermitMessage) UnmarshalJSON ¶
func (p *PermitMessage) UnmarshalJSON(data []byte) error
type PermitTransferFromMessage ¶
type PermitTransferFromMessage struct {
Permitted TokenPermissions `json:"permitted"`
// Address allowed to transfer (caller of permitTransferFrom)
Spender string `json:"spender"`
// Unique nonce to prevent replay
Nonce int64 `json:"nonce"`
// Unix timestamp after which signature expires
Deadline int64 `json:"deadline"`
}
func (*PermitTransferFromMessage) GetDeadline ¶
func (p *PermitTransferFromMessage) GetDeadline() int64
func (*PermitTransferFromMessage) GetNonce ¶
func (p *PermitTransferFromMessage) GetNonce() int64
func (*PermitTransferFromMessage) GetPermitted ¶
func (p *PermitTransferFromMessage) GetPermitted() TokenPermissions
func (*PermitTransferFromMessage) GetSpender ¶
func (p *PermitTransferFromMessage) GetSpender() string
func (PermitTransferFromMessage) MarshalJSON ¶
func (p PermitTransferFromMessage) MarshalJSON() ([]byte, error)
func (*PermitTransferFromMessage) UnmarshalJSON ¶
func (p *PermitTransferFromMessage) UnmarshalJSON(data []byte) error
type PermitTypedDataResponseInput ¶
type PermitTypedDataResponseInput struct {
// The EIP-712 domain separator for ERC-20 Permit.
Domain CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain `json:"domain"`
// The type definitions for EIP-712 structured data (ERC-20 Permit).
Types CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types `json:"types"`
// The message data for an ERC-20 Permit.
Message PermitMessage `json:"message"`
// contains filtered or unexported fields
}
PermitTypedDataResponseInput - Response containing EIP-712 typed data for ERC-20 Permit signing.
func (*PermitTypedDataResponseInput) GetMessage ¶
func (p *PermitTypedDataResponseInput) GetMessage() PermitMessage
func (*PermitTypedDataResponseInput) GetPrimaryType ¶
func (p *PermitTypedDataResponseInput) GetPrimaryType() string
func (PermitTypedDataResponseInput) MarshalJSON ¶
func (p PermitTypedDataResponseInput) MarshalJSON() ([]byte, error)
func (*PermitTypedDataResponseInput) UnmarshalJSON ¶
func (p *PermitTypedDataResponseInput) UnmarshalJSON(data []byte) error
type PermitTypedDataResponseOutput ¶
type PermitTypedDataResponseOutput struct {
// The EIP-712 domain separator for ERC-20 Permit.
Domain CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Domain `json:"domain"`
// The type definitions for EIP-712 structured data (ERC-20 Permit).
Types CompassAPIBackendV2ModelsGasSponsorshipPermitTypedDataEip712Types `json:"types"`
// The message data for an ERC-20 Permit.
Message PermitMessage `json:"message"`
// contains filtered or unexported fields
}
PermitTypedDataResponseOutput - Response containing EIP-712 typed data for ERC-20 Permit signing.
func (*PermitTypedDataResponseOutput) GetMessage ¶
func (p *PermitTypedDataResponseOutput) GetMessage() PermitMessage
func (*PermitTypedDataResponseOutput) GetPrimaryType ¶
func (p *PermitTypedDataResponseOutput) GetPrimaryType() string
func (PermitTypedDataResponseOutput) MarshalJSON ¶
func (p PermitTypedDataResponseOutput) MarshalJSON() ([]byte, error)
func (*PermitTypedDataResponseOutput) UnmarshalJSON ¶
func (p *PermitTypedDataResponseOutput) UnmarshalJSON(data []byte) error
type PositionPnL ¶
type PositionPnL struct {
// Total assets deposited over all time
TotalDeposited string `json:"total_deposited"`
// Current position value in underlying
CurrentValue string `json:"current_value"`
// current_value - cost_basis_remaining
UnrealizedPnl string `json:"unrealized_pnl"`
// Sum of profits/losses from all withdrawals
RealizedPnl string `json:"realized_pnl"`
// unrealized_pnl + realized_pnl
TotalPnl string `json:"total_pnl"`
// (total_pnl / total_deposited) * 100
TotalPnlPercent string `json:"total_pnl_percent"`
}
PositionPnL - Simplified PnL metrics for API response.
Historical events (deposits/withdrawals) are now at the position level, not inside PnL.
func (*PositionPnL) GetCurrentValue ¶
func (p *PositionPnL) GetCurrentValue() string
func (*PositionPnL) GetRealizedPnl ¶
func (p *PositionPnL) GetRealizedPnl() string
func (*PositionPnL) GetTotalDeposited ¶
func (p *PositionPnL) GetTotalDeposited() string
func (*PositionPnL) GetTotalPnl ¶
func (p *PositionPnL) GetTotalPnl() string
func (*PositionPnL) GetTotalPnlPercent ¶
func (p *PositionPnL) GetTotalPnlPercent() string
func (*PositionPnL) GetUnrealizedPnl ¶
func (p *PositionPnL) GetUnrealizedPnl() string
type PricePoint ¶
type PricePoint struct {
// ISO 8601 UTC timestamp.
Timestamp string `json:"timestamp"`
// Price in USD as a decimal string.
Price string `json:"price"`
}
PricePoint - A single (timestamp, price) sample from a 24h price-history sparkline.
func (*PricePoint) GetPrice ¶
func (p *PricePoint) GetPrice() string
func (*PricePoint) GetTimestamp ¶
func (p *PricePoint) GetTimestamp() string
type Product ¶
type Product string
Product - Which product the gas sponsorship is for. Determines which Product Account (Safe) address to use.
func (*Product) UnmarshalJSON ¶
type Quote ¶
type Quote struct {
// A token + amount pair for one leg of the quote.
Input TokenAmount `json:"input"`
// A token + amount pair for one leg of the quote.
Output TokenAmount `json:"output"`
// Aggregate fee charged for the order.
Fee QuoteFee `json:"fee"`
// Estimated upper bound on time-to-fill, in seconds.
EstFillSeconds int64 `json:"est_fill_seconds"`
}
Quote preview returned alongside an order.
func (*Quote) GetEstFillSeconds ¶
func (*Quote) GetInput ¶
func (q *Quote) GetInput() TokenAmount
func (*Quote) GetOutput ¶
func (q *Quote) GetOutput() TokenAmount
type QuoteFee ¶
type QuoteFee struct {
// Total fee in USD as a decimal string.
AmountUsd optionalnullable.OptionalNullable[string] `json:"amount_usd,omitzero"`
// Fee as basis points of the input amount.
Bps optionalnullable.OptionalNullable[int64] `json:"bps,omitzero"`
}
QuoteFee - Aggregate fee charged for the order.
func (*QuoteFee) GetAmountUsd ¶
func (q *QuoteFee) GetAmountUsd() optionalnullable.OptionalNullable[string]
func (*QuoteFee) GetBps ¶
func (q *QuoteFee) GetBps() optionalnullable.OptionalNullable[int64]
type RepayAmount ¶
type RepayAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type RepayAmountType
}
RepayAmount - Amount of repay_token to repay (in token units, not wei).
func CreateRepayAmountNumber ¶
func CreateRepayAmountNumber(number float64) RepayAmount
func CreateRepayAmountStr ¶
func CreateRepayAmountStr(str string) RepayAmount
func (RepayAmount) MarshalJSON ¶
func (u RepayAmount) MarshalJSON() ([]byte, error)
func (*RepayAmount) UnmarshalJSON ¶
func (u *RepayAmount) UnmarshalJSON(data []byte) error
type RepayAmountType ¶
type RepayAmountType string
const ( RepayAmountTypeNumber RepayAmountType = "number" RepayAmountTypeStr RepayAmountType = "str" )
type SafeMessageEip712Response ¶
type SafeMessageEip712Response struct {
// The EIP-712 domain separator.
Domain CompassAPIBackendV2ModelsSafeTransactResponseBatchedSafeOperationsEip712Domain `json:"domain"`
// Type definitions for the “SafeMessage“ EIP-712 payload.
Types SafeMessageEip712Types `json:"types"`
// Body of the “SafeMessage“ typed-data — a single “bytes message“.
Message SafeMessageMessage `json:"message"`
// contains filtered or unexported fields
}
SafeMessageEip712Response - “signTypedData“ payload for “SafeMessage(bytes message)“.
func (*SafeMessageEip712Response) GetMessage ¶
func (s *SafeMessageEip712Response) GetMessage() SafeMessageMessage
func (*SafeMessageEip712Response) GetPrimaryType ¶
func (s *SafeMessageEip712Response) GetPrimaryType() string
func (*SafeMessageEip712Response) GetTypes ¶
func (s *SafeMessageEip712Response) GetTypes() SafeMessageEip712Types
func (SafeMessageEip712Response) MarshalJSON ¶
func (s SafeMessageEip712Response) MarshalJSON() ([]byte, error)
func (*SafeMessageEip712Response) UnmarshalJSON ¶
func (s *SafeMessageEip712Response) UnmarshalJSON(data []byte) error
type SafeMessageEip712Types ¶
type SafeMessageEip712Types struct {
// EIP712Domain type definition
Eip712Domain []Eip712DomainField `json:"EIP712Domain"`
// SafeMessage type definition
SafeMessage []SafeMessageField `json:"SafeMessage"`
}
SafeMessageEip712Types - Type definitions for the “SafeMessage“ EIP-712 payload.
func (*SafeMessageEip712Types) GetEip712Domain ¶
func (s *SafeMessageEip712Types) GetEip712Domain() []Eip712DomainField
func (*SafeMessageEip712Types) GetSafeMessage ¶
func (s *SafeMessageEip712Types) GetSafeMessage() []SafeMessageField
type SafeMessageField ¶
SafeMessageField - A field in the “SafeMessage“ type definition.
func (*SafeMessageField) GetName ¶
func (s *SafeMessageField) GetName() string
func (*SafeMessageField) GetType ¶
func (s *SafeMessageField) GetType() string
type SafeMessageMessage ¶
type SafeMessageMessage struct {
// Raw bytes the product account is signing under ERC-1271. For a 1inch Fusion order this is the 32-byte order hash.
Message string `json:"message"`
}
SafeMessageMessage - Body of the “SafeMessage“ typed-data — a single “bytes message“.
func (*SafeMessageMessage) GetMessage ¶
func (s *SafeMessageMessage) GetMessage() string
type SafeTxField ¶
SafeTxField - A field in the SafeTx type definition.
func (*SafeTxField) GetName ¶
func (s *SafeTxField) GetName() string
func (*SafeTxField) GetType ¶
func (s *SafeTxField) GetType() string
func (SafeTxField) MarshalJSON ¶
func (s SafeTxField) MarshalJSON() ([]byte, error)
func (*SafeTxField) UnmarshalJSON ¶
func (s *SafeTxField) UnmarshalJSON(data []byte) error
type SafeTxMessage ¶
type SafeTxMessage struct {
// Destination address
To string `json:"to"`
// Value in wei as a string
Value string `json:"value"`
// Transaction data as hex string
Data string `json:"data"`
// Safe operation types.
Operation OperationType `json:"operation"`
// Gas for the transaction
SafeTxGas string `json:"safeTxGas"`
// Base gas costs
BaseGas string `json:"baseGas"`
// Gas price
GasPrice string `json:"gasPrice"`
// Token address for gas payment
GasToken string `json:"gasToken"`
// Address to receive gas refund
RefundReceiver string `json:"refundReceiver"`
// Transaction nonce
Nonce string `json:"nonce"`
}
SafeTxMessage - The message data for the transaction.
func (*SafeTxMessage) GetBaseGas ¶
func (s *SafeTxMessage) GetBaseGas() string
func (*SafeTxMessage) GetData ¶
func (s *SafeTxMessage) GetData() string
func (*SafeTxMessage) GetGasPrice ¶
func (s *SafeTxMessage) GetGasPrice() string
func (*SafeTxMessage) GetGasToken ¶
func (s *SafeTxMessage) GetGasToken() string
func (*SafeTxMessage) GetNonce ¶
func (s *SafeTxMessage) GetNonce() string
func (*SafeTxMessage) GetOperation ¶
func (s *SafeTxMessage) GetOperation() OperationType
func (*SafeTxMessage) GetRefundReceiver ¶
func (s *SafeTxMessage) GetRefundReceiver() string
func (*SafeTxMessage) GetSafeTxGas ¶
func (s *SafeTxMessage) GetSafeTxGas() string
func (*SafeTxMessage) GetTo ¶
func (s *SafeTxMessage) GetTo() string
func (*SafeTxMessage) GetValue ¶
func (s *SafeTxMessage) GetValue() string
func (SafeTxMessage) MarshalJSON ¶
func (s SafeTxMessage) MarshalJSON() ([]byte, error)
func (*SafeTxMessage) UnmarshalJSON ¶
func (s *SafeTxMessage) UnmarshalJSON(data []byte) error
type Security ¶
type Security struct {
APIKeyAuth string `security:"scheme,type=apiKey,subtype=header,name=x-api-key"`
}
func (*Security) GetAPIKeyAuth ¶
type Side ¶
type Side string
Side - Position side: 'long' or 'short'
type SponsorGasRequest ¶
type SponsorGasRequest struct {
// The wallet address that owns the Product Account.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// Which product the gas sponsorship is for. Determines which Product Account (Safe) address to use.
Product *Product `json:"product,omitzero"`
// The EIP-712 typed data that was signed.
Eip712 SponsorGasRequestEip712 `json:"eip_712"`
// The EIP-712 signed typed data signature.
Signature string `json:"signature"`
// The address of the wallet which will send the transaction.
Sender string `json:"sender"`
}
func (*SponsorGasRequest) GetChain ¶
func (s *SponsorGasRequest) GetChain() Chain
func (*SponsorGasRequest) GetEip712 ¶
func (s *SponsorGasRequest) GetEip712() SponsorGasRequestEip712
func (*SponsorGasRequest) GetOwner ¶
func (s *SponsorGasRequest) GetOwner() string
func (*SponsorGasRequest) GetProduct ¶
func (s *SponsorGasRequest) GetProduct() *Product
func (*SponsorGasRequest) GetSender ¶
func (s *SponsorGasRequest) GetSender() string
func (*SponsorGasRequest) GetSignature ¶
func (s *SponsorGasRequest) GetSignature() string
type SponsorGasRequestEip712 ¶
type SponsorGasRequestEip712 struct {
BatchedSafeOperationsResponseInput *BatchedSafeOperationsResponseInput `queryParam:"inline" union:"member"`
PermitTypedDataResponseInput *PermitTypedDataResponseInput `queryParam:"inline" union:"member"`
Permit2TypedDataInput *Permit2TypedDataInput `queryParam:"inline" union:"member"`
Type SponsorGasRequestEip712Type
}
SponsorGasRequestEip712 - The EIP-712 typed data that was signed.
func CreateSponsorGasRequestEip712BatchedSafeOperationsResponseInput ¶
func CreateSponsorGasRequestEip712BatchedSafeOperationsResponseInput(batchedSafeOperationsResponseInput BatchedSafeOperationsResponseInput) SponsorGasRequestEip712
func CreateSponsorGasRequestEip712Permit2TypedDataInput ¶
func CreateSponsorGasRequestEip712Permit2TypedDataInput(permit2TypedDataInput Permit2TypedDataInput) SponsorGasRequestEip712
func CreateSponsorGasRequestEip712PermitTypedDataResponseInput ¶
func CreateSponsorGasRequestEip712PermitTypedDataResponseInput(permitTypedDataResponseInput PermitTypedDataResponseInput) SponsorGasRequestEip712
func (SponsorGasRequestEip712) MarshalJSON ¶
func (u SponsorGasRequestEip712) MarshalJSON() ([]byte, error)
func (*SponsorGasRequestEip712) UnmarshalJSON ¶
func (u *SponsorGasRequestEip712) UnmarshalJSON(data []byte) error
type SponsorGasRequestEip712Type ¶
type SponsorGasRequestEip712Type string
const ( SponsorGasRequestEip712TypeBatchedSafeOperationsResponseInput SponsorGasRequestEip712Type = "BatchedSafeOperationsResponse-Input" SponsorGasRequestEip712TypePermitTypedDataResponseInput SponsorGasRequestEip712Type = "PermitTypedDataResponse-Input" SponsorGasRequestEip712TypePermit2TypedDataInput SponsorGasRequestEip712Type = "Permit2TypedData-Input" )
type SponsorGasResponse ¶
type SponsorGasResponse struct {
Transaction UnsignedTransaction `json:"transaction"`
}
func (*SponsorGasResponse) GetTransaction ¶
func (s *SponsorGasResponse) GetTransaction() UnsignedTransaction
type Status ¶
type Status string
Status - Order lifecycle state. One of `pending`, `filled`, `expired`, or `cancelled`. Upstream protocol states beyond these four (e.g. `partially-filled`, `refunded`) are mapped onto this set.
type TokenAmount ¶
type TokenAmount struct {
// On-chain token symbol (e.g. `USDC`, `TSLAon`).
Symbol string `json:"symbol"`
// Ethereum mainnet ERC-20 address.
ContractAddress string `json:"contract_address"`
// Human-readable amount as a decimal string.
Amount string `json:"amount"`
// USD value of `amount`.
AmountUsd optionalnullable.OptionalNullable[string] `json:"amount_usd,omitzero"`
}
TokenAmount - A token + amount pair for one leg of the quote.
func (*TokenAmount) GetAmount ¶
func (t *TokenAmount) GetAmount() string
func (*TokenAmount) GetAmountUsd ¶
func (t *TokenAmount) GetAmountUsd() optionalnullable.OptionalNullable[string]
func (*TokenAmount) GetContractAddress ¶
func (t *TokenAmount) GetContractAddress() string
func (*TokenAmount) GetSymbol ¶
func (t *TokenAmount) GetSymbol() string
type TokenMarketData ¶
type TokenMarketData struct {
// Market data per chain. Keys are chain names (ethereum, base, arbitrum).
Chains map[string]ChainMarketInfo `json:"chains"`
// Information about the chain with the highest supply APY for a token.
MaxSupplyApy MaxSupplyApyInfo `json:"max_supply_apy"`
}
TokenMarketData - Market data for a single token across all chains.
func (*TokenMarketData) GetChains ¶
func (t *TokenMarketData) GetChains() map[string]ChainMarketInfo
func (*TokenMarketData) GetMaxSupplyApy ¶
func (t *TokenMarketData) GetMaxSupplyApy() MaxSupplyApyInfo
type TokenPermissions ¶
type TokenPermissions struct {
// ERC-20 token address
Token string `json:"token"`
// Maximum amount allowed to transfer
Amount int64 `json:"amount"`
}
func (*TokenPermissions) GetAmount ¶
func (t *TokenPermissions) GetAmount() int64
func (*TokenPermissions) GetToken ¶
func (t *TokenPermissions) GetToken() string
func (TokenPermissions) MarshalJSON ¶
func (t TokenPermissions) MarshalJSON() ([]byte, error)
func (*TokenPermissions) UnmarshalJSON ¶
func (t *TokenPermissions) UnmarshalJSON(data []byte) error
type TokenTransfer ¶
type TokenTransfer struct {
// The address tokens were sent from.
FromAddress string `json:"from_address"`
// The address tokens were sent to.
ToAddress string `json:"to_address"`
// The raw transfer amount (in token's smallest unit).
Amount string `json:"amount"`
// The human-readable transfer amount.
AmountFormatted string `json:"amount_formatted"`
// The block number of the transfer.
BlockNumber int64 `json:"block_number"`
// The timestamp of the transfer.
BlockTimestamp time.Time `json:"block_timestamp"`
// The transaction hash of the transfer.
TransactionHash string `json:"transaction_hash"`
// Direction relative to the product account: 'in' for received, 'out' for sent.
Direction Direction `json:"direction"`
}
TokenTransfer - A single ERC20 token transfer event.
func (*TokenTransfer) GetAmount ¶
func (t *TokenTransfer) GetAmount() string
func (*TokenTransfer) GetAmountFormatted ¶
func (t *TokenTransfer) GetAmountFormatted() string
func (*TokenTransfer) GetBlockNumber ¶
func (t *TokenTransfer) GetBlockNumber() int64
func (*TokenTransfer) GetBlockTimestamp ¶
func (t *TokenTransfer) GetBlockTimestamp() time.Time
func (*TokenTransfer) GetDirection ¶
func (t *TokenTransfer) GetDirection() Direction
func (*TokenTransfer) GetFromAddress ¶
func (t *TokenTransfer) GetFromAddress() string
func (*TokenTransfer) GetToAddress ¶
func (t *TokenTransfer) GetToAddress() string
func (*TokenTransfer) GetTransactionHash ¶
func (t *TokenTransfer) GetTransactionHash() string
func (TokenTransfer) MarshalJSON ¶
func (t TokenTransfer) MarshalJSON() ([]byte, error)
func (*TokenTransfer) UnmarshalJSON ¶
func (t *TokenTransfer) UnmarshalJSON(data []byte) error
type TokenizedAssetsBuildOrderRequest ¶
type TokenizedAssetsBuildOrderRequest struct {
// The chain to use.
Chain Chain `json:"chain"`
// Token the sender is paying. Either an on-chain symbol (e.g. `TSLAon`), the literal `USDC`, or a 0x-prefixed token address.
FromToken string `json:"from_token"`
// Token the sender is receiving. Same accepted forms as `from_token`.
ToToken string `json:"to_token"`
// Human-readable amount of `from_token` to swap (decimal string). Decimals are applied server-side.
Amount string `json:"amount"`
// Wallet that owns the Tokenized Assets Account. The product account address is derived deterministically from this owner. The owner signs the EIP-712 payloads returned by this endpoint (the optional approval and the order itself).
Owner string `json:"owner"`
// Max acceptable slippage in basis points (1 bp = 0.01%). Range 1-5000 (0.01%-50%); defaults to 50 (0.5%). The upper bound is intentionally wide so callers can clear the wide auction floors quoted for thinly-traded tokenized stocks.
SlippageBps *int64 `json:"slippage_bps,omitzero"`
}
TokenizedAssetsBuildOrderRequest - Build a buy or sell order for a tokenized equity.
func (*TokenizedAssetsBuildOrderRequest) GetAmount ¶
func (t *TokenizedAssetsBuildOrderRequest) GetAmount() string
func (*TokenizedAssetsBuildOrderRequest) GetChain ¶
func (t *TokenizedAssetsBuildOrderRequest) GetChain() Chain
func (*TokenizedAssetsBuildOrderRequest) GetFromToken ¶
func (t *TokenizedAssetsBuildOrderRequest) GetFromToken() string
func (*TokenizedAssetsBuildOrderRequest) GetOwner ¶
func (t *TokenizedAssetsBuildOrderRequest) GetOwner() string
func (*TokenizedAssetsBuildOrderRequest) GetSlippageBps ¶
func (t *TokenizedAssetsBuildOrderRequest) GetSlippageBps() *int64
func (*TokenizedAssetsBuildOrderRequest) GetToToken ¶
func (t *TokenizedAssetsBuildOrderRequest) GetToToken() string
type TokenizedAssetsBuildOrderResponse ¶
type TokenizedAssetsBuildOrderResponse struct {
// Quote preview returned alongside an order.
Quote Quote `json:"quote"`
// EIP-712 payload that authorizes a one-time max-approve of `from_token` to the settlement contract. Populated when the Tokenized Assets Account's existing allowance is below `amount`. The owner signs it, then it is broadcast via `POST /v2/gas_sponsorship/prepare` (or directly by the owner) to set the allowance on-chain. `null` when the allowance is already sufficient.
ApprovalSafeTxEip712 optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput] `json:"approval_safe_tx_eip712,omitzero"`
// Order metadata plus the EIP-712 payload the owner signs to authorize it.
//
// The owner signs “safe_message_eip712“ off-chain. At submit time the
// signature is sent back to “/order/submit“ together with
// “order_message“, “extension“, and “quote_id“; resolvers validate
// the signature against the Tokenized Assets Account at fill time.
Order OrderToSign `json:"order"`
}
TokenizedAssetsBuildOrderResponse - Quote, optional approval payload, and the EIP-712 order to sign.
func (*TokenizedAssetsBuildOrderResponse) GetApprovalSafeTxEip712 ¶
func (t *TokenizedAssetsBuildOrderResponse) GetApprovalSafeTxEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
func (*TokenizedAssetsBuildOrderResponse) GetOrder ¶
func (t *TokenizedAssetsBuildOrderResponse) GetOrder() OrderToSign
func (*TokenizedAssetsBuildOrderResponse) GetQuote ¶
func (t *TokenizedAssetsBuildOrderResponse) GetQuote() Quote
func (TokenizedAssetsBuildOrderResponse) MarshalJSON ¶
func (t TokenizedAssetsBuildOrderResponse) MarshalJSON() ([]byte, error)
func (*TokenizedAssetsBuildOrderResponse) UnmarshalJSON ¶
func (t *TokenizedAssetsBuildOrderResponse) UnmarshalJSON(data []byte) error
type TokenizedAssetsCancelOrderRequest ¶
type TokenizedAssetsCancelOrderRequest struct {
// Wallet that owns the Tokenized Assets Account. The account address derived from this owner must match the order's on-chain maker; the API rejects otherwise (only the order's maker can cancel it).
Owner string `json:"owner"`
}
func (*TokenizedAssetsCancelOrderRequest) GetOwner ¶
func (t *TokenizedAssetsCancelOrderRequest) GetOwner() string
type TokenizedAssetsCancelOrderResponse ¶
type TokenizedAssetsCancelOrderResponse struct {
// Response containing EIP-712 typed data for Safe transaction signing.
CancelSafeTxEip712 BatchedSafeOperationsResponseOutput `json:"cancel_safe_tx_eip712"`
}
func (*TokenizedAssetsCancelOrderResponse) GetCancelSafeTxEip712 ¶
func (t *TokenizedAssetsCancelOrderResponse) GetCancelSafeTxEip712() BatchedSafeOperationsResponseOutput
type TokenizedAssetsMarketsListResponse ¶
type TokenizedAssetsMarketsListResponse struct {
// Tokenized equity markets surfaced on Ethereum.
Markets []CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket `json:"markets"`
}
TokenizedAssetsMarketsListResponse - List of tokenized equity markets.
func (*TokenizedAssetsMarketsListResponse) GetMarkets ¶
func (t *TokenizedAssetsMarketsListResponse) GetMarkets() []CompassAPIBackendV2ModelsTokenizedAssetsMarketMarket
type TokenizedAssetsOhlcInterval ¶
type TokenizedAssetsOhlcInterval string
const ( TokenizedAssetsOhlcIntervalOnemin TokenizedAssetsOhlcInterval = "1min" TokenizedAssetsOhlcIntervalFivemin TokenizedAssetsOhlcInterval = "5min" TokenizedAssetsOhlcIntervalFifteenmin TokenizedAssetsOhlcInterval = "15min" TokenizedAssetsOhlcIntervalOnehour TokenizedAssetsOhlcInterval = "1hour" TokenizedAssetsOhlcIntervalFourhour TokenizedAssetsOhlcInterval = "4hour" TokenizedAssetsOhlcIntervalTwelvehour TokenizedAssetsOhlcInterval = "12hour" TokenizedAssetsOhlcIntervalOneday TokenizedAssetsOhlcInterval = "1day" )
func (TokenizedAssetsOhlcInterval) ToPointer ¶
func (e TokenizedAssetsOhlcInterval) ToPointer() *TokenizedAssetsOhlcInterval
func (*TokenizedAssetsOhlcInterval) UnmarshalJSON ¶
func (e *TokenizedAssetsOhlcInterval) UnmarshalJSON(data []byte) error
type TokenizedAssetsOhlcRange ¶
type TokenizedAssetsOhlcRange string
const ( TokenizedAssetsOhlcRangeOneday TokenizedAssetsOhlcRange = "1day" TokenizedAssetsOhlcRangeOnemonth TokenizedAssetsOhlcRange = "1month" TokenizedAssetsOhlcRangeThreemonth TokenizedAssetsOhlcRange = "3month" TokenizedAssetsOhlcRangeSixmonth TokenizedAssetsOhlcRange = "6month" TokenizedAssetsOhlcRangeOneyear TokenizedAssetsOhlcRange = "1year" TokenizedAssetsOhlcRangeAll TokenizedAssetsOhlcRange = "all" )
func (TokenizedAssetsOhlcRange) ToPointer ¶
func (e TokenizedAssetsOhlcRange) ToPointer() *TokenizedAssetsOhlcRange
func (*TokenizedAssetsOhlcRange) UnmarshalJSON ¶
func (e *TokenizedAssetsOhlcRange) UnmarshalJSON(data []byte) error
type TokenizedAssetsPositionsResponse ¶
type TokenizedAssetsPositionsResponse struct {
// Queried wallet.
Wallet string `json:"wallet"`
// Chain on which the balances were read.
Chain *TokenizedAssetsPositionsResponseChain `json:"chain,omitzero"`
// Non-zero positions only; tokens with a zero balance are omitted.
Positions []CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition `json:"positions,omitzero"`
// Sum of `balance_usd` across positions where the price is known.
TotalUsd string `json:"total_usd"`
}
TokenizedAssetsPositionsResponse - Wallet's on-chain tokenized-asset holdings.
func (*TokenizedAssetsPositionsResponse) GetChain ¶
func (t *TokenizedAssetsPositionsResponse) GetChain() *TokenizedAssetsPositionsResponseChain
func (*TokenizedAssetsPositionsResponse) GetPositions ¶
func (t *TokenizedAssetsPositionsResponse) GetPositions() []CompassAPIBackendV2ModelsTokenizedAssetsReadResponsePositionsPosition
func (*TokenizedAssetsPositionsResponse) GetTotalUsd ¶
func (t *TokenizedAssetsPositionsResponse) GetTotalUsd() string
func (*TokenizedAssetsPositionsResponse) GetWallet ¶
func (t *TokenizedAssetsPositionsResponse) GetWallet() string
func (TokenizedAssetsPositionsResponse) MarshalJSON ¶
func (t TokenizedAssetsPositionsResponse) MarshalJSON() ([]byte, error)
func (*TokenizedAssetsPositionsResponse) UnmarshalJSON ¶
func (t *TokenizedAssetsPositionsResponse) UnmarshalJSON(data []byte) error
type TokenizedAssetsPositionsResponseChain ¶
type TokenizedAssetsPositionsResponseChain string
TokenizedAssetsPositionsResponseChain - Chain on which the balances were read.
const (
TokenizedAssetsPositionsResponseChainEthereum TokenizedAssetsPositionsResponseChain = "ethereum"
)
func (TokenizedAssetsPositionsResponseChain) ToPointer ¶
func (e TokenizedAssetsPositionsResponseChain) ToPointer() *TokenizedAssetsPositionsResponseChain
func (*TokenizedAssetsPositionsResponseChain) UnmarshalJSON ¶
func (e *TokenizedAssetsPositionsResponseChain) UnmarshalJSON(data []byte) error
type TokenizedAssetsQuoteRequest ¶
type TokenizedAssetsQuoteRequest struct {
// The chain to use.
Chain Chain `json:"chain"`
// Token the sender is paying. Either an on-chain symbol (e.g. `TSLAon`), the literal `USDC`, or a 0x-prefixed token address.
FromToken string `json:"from_token"`
// Token the sender is receiving. Same accepted forms as `from_token`.
ToToken string `json:"to_token"`
// Human-readable amount of `from_token` to swap (decimal string). Decimals are applied server-side.
Amount string `json:"amount"`
// Wallet that owns the Tokenized Assets Account. Used to verify the account is deployed before quoting; the account address is derived deterministically from this owner.
Owner string `json:"owner"`
}
TokenizedAssetsQuoteRequest - Preview a buy or sell quote for a tokenized equity.
Read-only relative to Fusion: this hits “/quote/receive“ only and does not consume a “quote_id“ or commit an order. Use it to surface expected output, fees, and a thin-liquidity warning before the user confirms; pass the same body (plus “slippage_bps“) to “POST /tokenized_assets/order“ when they do.
func (*TokenizedAssetsQuoteRequest) GetAmount ¶
func (t *TokenizedAssetsQuoteRequest) GetAmount() string
func (*TokenizedAssetsQuoteRequest) GetChain ¶
func (t *TokenizedAssetsQuoteRequest) GetChain() Chain
func (*TokenizedAssetsQuoteRequest) GetFromToken ¶
func (t *TokenizedAssetsQuoteRequest) GetFromToken() string
func (*TokenizedAssetsQuoteRequest) GetOwner ¶
func (t *TokenizedAssetsQuoteRequest) GetOwner() string
func (*TokenizedAssetsQuoteRequest) GetToToken ¶
func (t *TokenizedAssetsQuoteRequest) GetToToken() string
type TokenizedAssetsQuoteResponse ¶
type TokenizedAssetsQuoteResponse struct {
// Quote preview returned alongside an order.
Quote Quote `json:"quote"`
// Slippage tolerance in basis points (1 bp = 0.01%) the UI should echo back as `slippage_bps` on `POST /tokenized_assets/order`. Derived from Fusion's Dutch auction range (`auctionEndAmount` vs `toTokenAmount`) plus a small buffer; capped at 5000 bps.
RecommendedSlippageBps int64 `json:"recommended_slippage_bps"`
// Worst-case basis-points gap between the auction's end amount and the reference quote amount. Surfaces as a thin-liquidity warning before the user signs.
AuctionRangeBps int64 `json:"auction_range_bps"`
}
TokenizedAssetsQuoteResponse - Preview of input/output amounts plus auction-derived risk hints.
func (*TokenizedAssetsQuoteResponse) GetAuctionRangeBps ¶
func (t *TokenizedAssetsQuoteResponse) GetAuctionRangeBps() int64
func (*TokenizedAssetsQuoteResponse) GetQuote ¶
func (t *TokenizedAssetsQuoteResponse) GetQuote() Quote
func (*TokenizedAssetsQuoteResponse) GetRecommendedSlippageBps ¶
func (t *TokenizedAssetsQuoteResponse) GetRecommendedSlippageBps() int64
type TokenizedAssetsSubmitOrderRequest ¶
type TokenizedAssetsSubmitOrderRequest struct {
// The order struct returned by `/order` (`order.order_message`). `maker` is the Tokenized Assets Account, not the owner's wallet — pass this dict back to the API verbatim.
SignedOrder map[string]any `json:"signed_order"`
// Owner's EIP-712 signature over `order.safe_message_eip712` from the `/order` response. The signature is validated against the Tokenized Assets Account at fill time, so it must be a signature over the typed-data hash, not the raw order hash.
Signature string `json:"signature"`
// Opaque hex blob from the `/order` response — pass back unchanged.
Extension string `json:"extension"`
// `order.quote_id` from the `/order` response — pass back unchanged.
QuoteID string `json:"quote_id"`
// `order.order_hash` from the `/order` response. Optional but recommended: the upstream relayer occasionally returns a 2xx with an empty body, and supplying the hash lets the API still return a usable handle for status and cancel lookups instead of failing.
OrderHash optionalnullable.OptionalNullable[string] `json:"order_hash,omitzero"`
}
TokenizedAssetsSubmitOrderRequest - Submit an owner-signed order to the resolver network.
The shape echoes what `POST /order` returned plus the owner's EIP-712 signature. The maker is the Tokenized Assets Account, so the signature is validated against the product account at fill time.
func (*TokenizedAssetsSubmitOrderRequest) GetExtension ¶
func (t *TokenizedAssetsSubmitOrderRequest) GetExtension() string
func (*TokenizedAssetsSubmitOrderRequest) GetOrderHash ¶
func (t *TokenizedAssetsSubmitOrderRequest) GetOrderHash() optionalnullable.OptionalNullable[string]
func (*TokenizedAssetsSubmitOrderRequest) GetQuoteID ¶
func (t *TokenizedAssetsSubmitOrderRequest) GetQuoteID() string
func (*TokenizedAssetsSubmitOrderRequest) GetSignature ¶
func (t *TokenizedAssetsSubmitOrderRequest) GetSignature() string
func (*TokenizedAssetsSubmitOrderRequest) GetSignedOrder ¶
func (t *TokenizedAssetsSubmitOrderRequest) GetSignedOrder() map[string]any
type TokenizedAssetsSubmitOrderResponse ¶
type TokenizedAssetsSubmitOrderResponse struct {
// On-chain order hash for status / cancel lookups.
OrderHash string `json:"order_hash"`
// Server-side ISO 8601 UTC timestamp at which the order was relayed.
SubmittedAt string `json:"submitted_at"`
}
TokenizedAssetsSubmitOrderResponse - Returned after the signed order is relayed to 1inch Fusion.
func (*TokenizedAssetsSubmitOrderResponse) GetOrderHash ¶
func (t *TokenizedAssetsSubmitOrderResponse) GetOrderHash() string
func (*TokenizedAssetsSubmitOrderResponse) GetSubmittedAt ¶
func (t *TokenizedAssetsSubmitOrderResponse) GetSubmittedAt() string
type UnsignedTransaction ¶
type UnsignedTransaction struct {
// The chain id of the transaction
ChainID string `json:"chainId"`
// The data of the transaction
Data string `json:"data"`
// The sender of the transaction
From string `json:"from"`
// The gas of the transaction
Gas *string `json:"gas"`
// The recipient of the transaction
To string `json:"to"`
// The value of the transaction
Value string `json:"value"`
// The nonce of the address
Nonce string `json:"nonce"`
// The max fee per gas of the transaction
MaxFeePerGas string `json:"maxFeePerGas"`
// The max priority fee per gas of the transaction
MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas"`
}
func (*UnsignedTransaction) GetChainID ¶
func (u *UnsignedTransaction) GetChainID() string
func (*UnsignedTransaction) GetData ¶
func (u *UnsignedTransaction) GetData() string
func (*UnsignedTransaction) GetFrom ¶
func (u *UnsignedTransaction) GetFrom() string
func (*UnsignedTransaction) GetGas ¶
func (u *UnsignedTransaction) GetGas() *string
func (*UnsignedTransaction) GetMaxFeePerGas ¶
func (u *UnsignedTransaction) GetMaxFeePerGas() string
func (*UnsignedTransaction) GetMaxPriorityFeePerGas ¶
func (u *UnsignedTransaction) GetMaxPriorityFeePerGas() string
func (*UnsignedTransaction) GetNonce ¶
func (u *UnsignedTransaction) GetNonce() string
func (*UnsignedTransaction) GetTo ¶
func (u *UnsignedTransaction) GetTo() string
func (*UnsignedTransaction) GetValue ¶
func (u *UnsignedTransaction) GetValue() string
type V2BundleRequest ¶
type V2BundleRequest struct {
// The owner's wallet address that controls the Earn Account.
Owner string `json:"owner"`
// The chain to use.
Chain Chain `json:"chain"`
// List of actions to bundle. Actions are executed in order.
Actions []V2UserOperation `json:"actions"`
// If true, returns EIP-712 typed data for gas sponsorship. The owner must sign this data and submit to /gas_sponsorship/prepare.
GasSponsorship *bool `json:"gas_sponsorship,omitzero"`
}
V2BundleRequest - Request to execute multiple earn actions in a single atomic transaction.
## Supported Action Types
- **V2_TRANSFER_FROM_EOA**: Transfer tokens from the owner's EOA to the product account using Permit2. Requires a signed Permit2 message.
- **V2_TRANSFER_TO_EOA**: Transfer tokens from the product account back to the owner's EOA. No signature required (product account owns the tokens).
- **V2_TRANSFER_TO_ADDRESS**: Transfer ERC20 tokens from the product account to any specified recipient address. No signature required (product account owns the tokens).
- **V2_SWAP**: Swap tokens within the product account using 1inch aggregator.
- **V2_MANAGE**: Deposit or withdraw from DeFi venues (Aave, Morpho, Vaults, etc.)
## Using V2_TRANSFER_FROM_EOA (Deposit to Product Account)
To include a transfer from EOA in your bundle, follow these steps:
- **One-time setup**: Approve Permit2 to spend the token by calling `POST /v2/gas_sponsorship/approve_transfer` and executing the returned transaction.
2. **Get Permit2 signature**: Call `POST /v2/earn/transfer` with:
`action`: "DEPOSIT"
`gas_sponsorship`: true
`spender`: omit this field (defaults to product account address for bundle use)
This returns EIP-712 typed data. Sign it with the owner's wallet.
3. **Include in bundle**: Add a V2_TRANSFER_FROM_EOA action with the signature and nonce/deadline from the typed data.
The bundle will atomically: pull tokens from EOA → execute subsequent actions.
## Using V2_TRANSFER_TO_EOA (Withdraw to EOA)
To transfer tokens from the product account back to the owner's EOA, simply add a V2_TRANSFER_TO_EOA action to your bundle. No signature is required since the product account already owns the tokens.
Specify the exact token amount to transfer.
func (*V2BundleRequest) GetActions ¶
func (v *V2BundleRequest) GetActions() []V2UserOperation
func (*V2BundleRequest) GetChain ¶
func (v *V2BundleRequest) GetChain() Chain
func (*V2BundleRequest) GetGasSponsorship ¶
func (v *V2BundleRequest) GetGasSponsorship() *bool
func (*V2BundleRequest) GetOwner ¶
func (v *V2BundleRequest) GetOwner() string
type V2BundleResponse ¶
type V2BundleResponse struct {
// Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false.
Transaction optionalnullable.OptionalNullable[UnsignedTransaction] `json:"transaction,omitzero"`
// EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. Owner must sign and submit to /gas_sponsorship/prepare.
Eip712 optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput] `json:"eip_712,omitzero"`
// Number of individual transactions bundled in this execution.
ActionsCount int64 `json:"actions_count"`
}
func (*V2BundleResponse) GetActionsCount ¶
func (v *V2BundleResponse) GetActionsCount() int64
func (*V2BundleResponse) GetEip712 ¶
func (v *V2BundleResponse) GetEip712() optionalnullable.OptionalNullable[BatchedSafeOperationsResponseOutput]
func (*V2BundleResponse) GetTransaction ¶
func (v *V2BundleResponse) GetTransaction() optionalnullable.OptionalNullable[UnsignedTransaction]
func (V2BundleResponse) MarshalJSON ¶
func (v V2BundleResponse) MarshalJSON() ([]byte, error)
func (*V2BundleResponse) UnmarshalJSON ¶
func (v *V2BundleResponse) UnmarshalJSON(data []byte) error
type V2UserOperation ¶
type V2UserOperation struct {
Body V2UserOperationBody `json:"body"`
}
V2UserOperation - A single operation in a V2 bundle.
func (*V2UserOperation) GetBody ¶
func (v *V2UserOperation) GetBody() V2UserOperationBody
func (*V2UserOperation) GetBodyV2Manage ¶
func (v *V2UserOperation) GetBodyV2Manage() *EarnManageParams
func (*V2UserOperation) GetBodyV2Swap ¶
func (v *V2UserOperation) GetBodyV2Swap() *EarnSwapParams
func (*V2UserOperation) GetBodyV2TransferFromEoa ¶
func (v *V2UserOperation) GetBodyV2TransferFromEoa() *EarnTransferFromEOAParams
func (*V2UserOperation) GetBodyV2TransferToAddress ¶
func (v *V2UserOperation) GetBodyV2TransferToAddress() *EarnTransferToAddressParams
func (*V2UserOperation) GetBodyV2TransferToEoa ¶
func (v *V2UserOperation) GetBodyV2TransferToEoa() *EarnTransferToEOAParams
type V2UserOperationBody ¶
type V2UserOperationBody struct {
EarnSwapParams *EarnSwapParams `queryParam:"inline" union:"member"`
EarnManageParams *EarnManageParams `queryParam:"inline" union:"member"`
EarnTransferFromEOAParams *EarnTransferFromEOAParams `queryParam:"inline" union:"member"`
EarnTransferToEOAParams *EarnTransferToEOAParams `queryParam:"inline" union:"member"`
EarnTransferToAddressParams *EarnTransferToAddressParams `queryParam:"inline" union:"member"`
Type V2UserOperationBodyType
}
func CreateV2UserOperationBodyV2Manage ¶
func CreateV2UserOperationBodyV2Manage(v2Manage EarnManageParams) V2UserOperationBody
func CreateV2UserOperationBodyV2Swap ¶
func CreateV2UserOperationBodyV2Swap(v2Swap EarnSwapParams) V2UserOperationBody
func CreateV2UserOperationBodyV2TransferFromEoa ¶
func CreateV2UserOperationBodyV2TransferFromEoa(v2TransferFromEoa EarnTransferFromEOAParams) V2UserOperationBody
func CreateV2UserOperationBodyV2TransferToAddress ¶
func CreateV2UserOperationBodyV2TransferToAddress(v2TransferToAddress EarnTransferToAddressParams) V2UserOperationBody
func CreateV2UserOperationBodyV2TransferToEoa ¶
func CreateV2UserOperationBodyV2TransferToEoa(v2TransferToEoa EarnTransferToEOAParams) V2UserOperationBody
func (V2UserOperationBody) MarshalJSON ¶
func (u V2UserOperationBody) MarshalJSON() ([]byte, error)
func (*V2UserOperationBody) UnmarshalJSON ¶
func (u *V2UserOperationBody) UnmarshalJSON(data []byte) error
type V2UserOperationBodyType ¶
type V2UserOperationBodyType string
const ( V2UserOperationBodyTypeV2Manage V2UserOperationBodyType = "V2_MANAGE" V2UserOperationBodyTypeV2Swap V2UserOperationBodyType = "V2_SWAP" V2UserOperationBodyTypeV2TransferFromEoa V2UserOperationBodyType = "V2_TRANSFER_FROM_EOA" V2UserOperationBodyTypeV2TransferToAddress V2UserOperationBodyType = "V2_TRANSFER_TO_ADDRESS" V2UserOperationBodyTypeV2TransferToEoa V2UserOperationBodyType = "V2_TRANSFER_TO_EOA" )
type ValidationError ¶
type ValidationError struct {
Loc []Loc `json:"loc"`
Msg string `json:"msg"`
Type string `json:"type"`
}
func (*ValidationError) GetLoc ¶
func (v *ValidationError) GetLoc() []Loc
func (*ValidationError) GetMsg ¶
func (v *ValidationError) GetMsg() string
func (*ValidationError) GetType ¶
func (v *ValidationError) GetType() string
type VaultInfo ¶
type VaultInfo struct {
// The vault contract address.
VaultAddress string `json:"vault_address"`
// Blockchain name (e.g., 'ethereum', 'base').
Chain string `json:"chain"`
// The name of the vault.
Name optionalnullable.OptionalNullable[string] `json:"name,omitzero"`
// The vault share token symbol.
Symbol optionalnullable.OptionalNullable[string] `json:"symbol,omitzero"`
// The vault owner address.
Owner string `json:"owner"`
// The underlying asset contract address.
Asset string `json:"asset"`
// The name of the underlying asset.
AssetName optionalnullable.OptionalNullable[string] `json:"asset_name,omitzero"`
// The symbol of the underlying asset (e.g., 'USDC').
AssetSymbol optionalnullable.OptionalNullable[string] `json:"asset_symbol,omitzero"`
// Morpho factory version this vault was created from. 'v1.0' / 'v1.1' = MetaMorpho v1 (single-asset, Morpho Blue markets only). 'v2' = Morpho Vaults v2 (adapter framework, can route to non-Morpho-Blue venues). Null only on legacy rows that pre-date factory tracking.
FactoryVersion optionalnullable.OptionalNullable[string] `json:"factory_version,omitzero"`
// Total Value Locked in USD. Represents the total assets deposited in the vault.
TvlUsd optionalnullable.OptionalNullable[string] `json:"tvl_usd,omitzero"`
// Available liquidity in USD. The amount that can be withdrawn right now, accounting for idle funds and borrowable supply across the vault's markets. Always <= tvl_usd.
LiquidityUsd optionalnullable.OptionalNullable[string] `json:"liquidity_usd,omitzero"`
// Maximum additional amount that can be deposited into the vault, in human-readable token units (e.g., 1000.5 USDC). Derived from the ERC4626 maxDeposit function. A value of 0 means the vault is paused or full.
DepositCap optionalnullable.OptionalNullable[string] `json:"deposit_cap,omitzero"`
// Maximum additional depositable amount converted to USD.
DepositCapUsd optionalnullable.OptionalNullable[string] `json:"deposit_cap_usd,omitzero"`
// 7-day APY as a percentage (e.g., 5.25 = 5.25%).
Apy7d optionalnullable.OptionalNullable[string] `json:"apy_7d,omitzero"`
// 30-day APY as a percentage.
Apy30d optionalnullable.OptionalNullable[string] `json:"apy_30d,omitzero"`
// 90-day APY as a percentage.
Apy90d optionalnullable.OptionalNullable[string] `json:"apy_90d,omitzero"`
// Morpho Blue markets in this vault's supply queue, ordered by queue index. Shows how the vault's capital is split across lending markets with different collateral types and risk parameters.
Markets []MarketAllocation `json:"markets,omitzero"`
}
VaultInfo - Information about a single ERC-4626 vault from the database.
func (*VaultInfo) GetApy7d ¶
func (v *VaultInfo) GetApy7d() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetApy30d ¶
func (v *VaultInfo) GetApy30d() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetApy90d ¶
func (v *VaultInfo) GetApy90d() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetAssetName ¶
func (v *VaultInfo) GetAssetName() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetAssetSymbol ¶
func (v *VaultInfo) GetAssetSymbol() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetDepositCap ¶
func (v *VaultInfo) GetDepositCap() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetDepositCapUsd ¶
func (v *VaultInfo) GetDepositCapUsd() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetFactoryVersion ¶
func (v *VaultInfo) GetFactoryVersion() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetLiquidityUsd ¶
func (v *VaultInfo) GetLiquidityUsd() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetMarkets ¶
func (v *VaultInfo) GetMarkets() []MarketAllocation
func (*VaultInfo) GetName ¶
func (v *VaultInfo) GetName() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetSymbol ¶
func (v *VaultInfo) GetSymbol() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetTvlUsd ¶
func (v *VaultInfo) GetTvlUsd() optionalnullable.OptionalNullable[string]
func (*VaultInfo) GetVaultAddress ¶
func (VaultInfo) MarshalJSON ¶
func (*VaultInfo) UnmarshalJSON ¶
type VaultVenue ¶
type VaultVenue struct {
// The vault address you are interacting with for this action.
VaultAddress string `json:"vault_address"`
// contains filtered or unexported fields
}
func (*VaultVenue) GetType ¶
func (v *VaultVenue) GetType() string
func (*VaultVenue) GetVaultAddress ¶
func (v *VaultVenue) GetVaultAddress() string
func (VaultVenue) MarshalJSON ¶
func (v VaultVenue) MarshalJSON() ([]byte, error)
func (*VaultVenue) UnmarshalJSON ¶
func (v *VaultVenue) UnmarshalJSON(data []byte) error
type VaultsResponse ¶
type VaultsResponse struct {
Total int64 `json:"total"`
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
// A list of vault information objects.
Vaults []VaultInfo `json:"vaults"`
}
VaultsResponse - Response model for a paginated list of ERC-4626 vaults.
func (*VaultsResponse) GetLimit ¶
func (v *VaultsResponse) GetLimit() int64
func (*VaultsResponse) GetOffset ¶
func (v *VaultsResponse) GetOffset() int64
func (*VaultsResponse) GetTotal ¶
func (v *VaultsResponse) GetTotal() int64
func (*VaultsResponse) GetVaults ¶
func (v *VaultsResponse) GetVaults() []VaultInfo
type WithdrawAmount ¶
type WithdrawAmount struct {
Number *float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type WithdrawAmountType
}
WithdrawAmount - Amount of collateral to withdraw (in token units, not wei). Omit together with withdraw_token for repay-only mode.
func CreateWithdrawAmountNumber ¶
func CreateWithdrawAmountNumber(number float64) WithdrawAmount
func CreateWithdrawAmountStr ¶
func CreateWithdrawAmountStr(str string) WithdrawAmount
func (WithdrawAmount) MarshalJSON ¶
func (u WithdrawAmount) MarshalJSON() ([]byte, error)
func (*WithdrawAmount) UnmarshalJSON ¶
func (u *WithdrawAmount) UnmarshalJSON(data []byte) error
type WithdrawAmountType ¶
type WithdrawAmountType string
const ( WithdrawAmountTypeNumber WithdrawAmountType = "number" WithdrawAmountTypeStr WithdrawAmountType = "str" )
type WithdrawalEvent ¶
type WithdrawalEvent struct {
// Block number when withdrawal occurred
BlockNumber int64 `json:"block_number"`
// Timestamp when withdrawal occurred
BlockTimestamp time.Time `json:"block_timestamp"`
// Transaction hash of the withdrawal
TransactionHash string `json:"transaction_hash"`
// Units withdrawn (shares, aTokens, PT)
InputAmount string `json:"input_amount"`
// Symbol of units withdrawn
InputSymbol string `json:"input_symbol"`
// Amount received (underlying or token)
OutputAmount string `json:"output_amount"`
// Symbol of token received
OutputSymbol string `json:"output_symbol"`
// Profit/loss: output value - cost basis consumed
RealizedPnl string `json:"realized_pnl"`
}
WithdrawalEvent - Historical withdrawal event with realized PnL.
Uses generic input/output format: - Vault: input=shares, output=underlying - Aave: input=aTokens, output=underlying - Pendle: input=PT, output=token (varies)
func (*WithdrawalEvent) GetBlockNumber ¶
func (w *WithdrawalEvent) GetBlockNumber() int64
func (*WithdrawalEvent) GetBlockTimestamp ¶
func (w *WithdrawalEvent) GetBlockTimestamp() time.Time
func (*WithdrawalEvent) GetInputAmount ¶
func (w *WithdrawalEvent) GetInputAmount() string
func (*WithdrawalEvent) GetInputSymbol ¶
func (w *WithdrawalEvent) GetInputSymbol() string
func (*WithdrawalEvent) GetOutputAmount ¶
func (w *WithdrawalEvent) GetOutputAmount() string
func (*WithdrawalEvent) GetOutputSymbol ¶
func (w *WithdrawalEvent) GetOutputSymbol() string
func (*WithdrawalEvent) GetRealizedPnl ¶
func (w *WithdrawalEvent) GetRealizedPnl() string
func (*WithdrawalEvent) GetTransactionHash ¶
func (w *WithdrawalEvent) GetTransactionHash() string
func (WithdrawalEvent) MarshalJSON ¶
func (w WithdrawalEvent) MarshalJSON() ([]byte, error)
func (*WithdrawalEvent) UnmarshalJSON ¶
func (w *WithdrawalEvent) UnmarshalJSON(data []byte) error
Source Files
¶
- aaveposition.go
- aavevenue.go
- accountsummary.go
- approvetransferrequest.go
- approvetransferresponse.go
- batchedsafeoperationsresponseinput.go
- batchedsafeoperationsresponseoutput.go
- borrowabletoken.go
- chain.go
- chainmarketinfo.go
- collateralposition.go
- compassapibackendv2modelsbalancestokenbalance.go
- compassapibackendv2modelsearnreadresponsepositionsvaultposition.go
- compassapibackendv2modelsgassponsorshippermit2typeddataeip712domain.go
- compassapibackendv2modelsgassponsorshippermit2typeddataeip712types.go
- compassapibackendv2modelsgassponsorshippermittypeddataeip712domain.go
- compassapibackendv2modelsgassponsorshippermittypeddataeip712types.go
- compassapibackendv2modelssafetransactresponsebatchedsafeoperationseip712domain.go
- compassapibackendv2modelssafetransactresponsebatchedsafeoperationseip712types.go
- compassapibackendv2modelstokenizedassetsmarketmarket.go
- compassapibackendv2modelstokenizedassetsreadresponsepositionsposition.go
- createaccountrequest.go
- createaccountresponse.go
- createcreditaccountrequest.go
- createcreditaccountresponse.go
- createtokenizedassetsaccountrequest.go
- createtokenizedassetsaccountresponse.go
- creditbalancesresponse.go
- creditborrowparams.go
- creditborrowrequest.go
- creditborrowresponse.go
- creditbundlerequest.go
- creditbundleresponse.go
- creditenablecollateralparams.go
- creditevent.go
- creditfee.go
- creditpositionsresponse.go
- creditrepayparams.go
- creditrepayrequest.go
- creditrepayresponse.go
- creditsupplyparams.go
- credittransferrequest.go
- credittransferresponse.go
- credittransfertoaddressparams.go
- credituseroperation.go
- creditwithdrawparams.go
- debtposition.go
- depositevent.go
- earnbalancesresponse.go
- earnmanageparams.go
- earnmanagerequest.go
- earnmanageresponse.go
- earnpositionsallresponse.go
- earnpositionsresponse.go
- earnswapparams.go
- earnswaprequest.go
- earnswapresponse.go
- earntransferfromeoaparams.go
- earntransferrequest.go
- earntransferresponse.go
- earntransfertoaddressparams.go
- earntransfertoeoaparams.go
- eip712domainfield.go
- eip712field.go
- fee.go
- globalmarketsperpsapprovebuilderfeerequest.go
- globalmarketsperpscancelorderrequest.go
- globalmarketsperpscategory.go
- globalmarketsperpsdepositrequest.go
- globalmarketsperpsdepositresponse.go
- globalmarketsperpsenableunifiedaccountrequest.go
- globalmarketsperpsenableunifiedaccountresponse.go
- globalmarketsperpsensureleveragerequest.go
- globalmarketsperpsensureleverageresponse.go
- globalmarketsperpsexecuterequest.go
- globalmarketsperpsexecuteresponse.go
- globalmarketsperpslimitorderrequest.go
- globalmarketsperpsmarketorderrequest.go
- globalmarketsperpsopportunitiesresponse.go
- globalmarketsperpsopportunity.go
- globalmarketsperpsposition.go
- globalmarketsperpspositionsresponse.go
- globalmarketsperpssignableactionresponse.go
- globalmarketsperpswithdrawrequest.go
- httpmetadata.go
- interestratemode.go
- listaavemarketsresponse.go
- marketallocation.go
- marketdetail.go
- maxsupplyapyinfo.go
- ohlccandle.go
- operationtype.go
- orderstatus.go
- ordertosign.go
- pendledepositevent.go
- pendlemarketinfo.go
- pendlemarketsresponse.go
- pendleptposition.go
- pendleptvenue.go
- pendlewithdrawalevent.go
- permit2typeddatainput.go
- permit2typeddataoutput.go
- permitfield.go
- permitmessage.go
- permittransferfrommessage.go
- permittypeddataresponseinput.go
- permittypeddataresponseoutput.go
- positionpnl.go
- pricepoint.go
- quote.go
- quotefee.go
- safemessageeip712response.go
- safemessageeip712types.go
- safemessagefield.go
- safemessagemessage.go
- safetxfield.go
- safetxmessage.go
- security.go
- sponsorgasrequest.go
- sponsorgasresponse.go
- tokenamount.go
- tokenizedassetsbuildorderrequest.go
- tokenizedassetsbuildorderresponse.go
- tokenizedassetscancelorderrequest.go
- tokenizedassetscancelorderresponse.go
- tokenizedassetsmarketslistresponse.go
- tokenizedassetsohlcinterval.go
- tokenizedassetsohlcrange.go
- tokenizedassetspositionsresponse.go
- tokenizedassetsquoterequest.go
- tokenizedassetsquoteresponse.go
- tokenizedassetssubmitorderrequest.go
- tokenizedassetssubmitorderresponse.go
- tokenmarketdata.go
- tokenpermissions.go
- tokentransfer.go
- unsignedtransaction.go
- v2bundlerequest.go
- v2bundleresponse.go
- v2useroperation.go
- validationerror.go
- vaultinfo.go
- vaultsresponse.go
- vaultvenue.go
- withdrawalevent.go