Documentation
¶
Overview ¶
Package fusionplus provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Package fusionplus provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Package fusionplus provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Index ¶
- Constants
- Variables
- func CalcAuctionStartTime(startAuctionIn uint32, additionalWaitPeriod uint32) uint32
- func GetCurrentTime() int64
- func GetMerkleLeaves(secrets []string) ([]string, error)
- func GetMerkleLeavesFromSecretHashes(secretHashes []string) ([]string, error)
- func GetProof(leaves []string, index int) ([]string, error)
- func GetRandomBytes32() (string, error)
- func HashSecret(secret string) (string, error)
- func Keccak256SortedHash(a, b []byte) []byte
- func ParentIndex(i int) (int, error)
- func SetMask(original *big.Int, maskStart, maskLength uint, value *big.Int) *big.Int
- type ActiveOrdersOutput
- type AdditionalParams
- type AuctionDetails
- type AuctionPoint
- type AuctionPointClassFixed
- type AuctionPointOutput
- type AuctionWhitelistItem
- type BuildOrderBody
- type BuildOrderOutput
- type Client
- func (api *Client) GetActiveOrders(ctx context.Context, params OrderApiControllerGetActiveOrdersParams) (*GetActiveOrdersOutput, error)
- func (api *Client) GetOrderByOrderHash(ctx context.Context, params GetOrderByOrderHashParams) (*GetOrderFillsByHashOutputFixed, error)
- func (api *Client) GetQuote(ctx context.Context, params QuoterControllerGetQuoteParamsFixed) (*GetQuoteOutputFixed, error)
- func (api *Client) GetQuoteWithCustomPreset(ctx context.Context, params QuoterControllerGetQuoteWithCustomPresetsParams, ...) (*GetQuoteOutputFixed, error)
- func (api *Client) GetReadyToAcceptFills(ctx context.Context, params GetOrderByOrderHashParams) (*ReadyToAcceptSecretFills, error)
- func (api *Client) PlaceOrder(ctx context.Context, quoteParams QuoterControllerGetQuoteParamsFixed, ...) (string, error)
- func (api *Client) SubmitSecret(ctx context.Context, params SecretInput) error
- type Configuration
- type ConfigurationAPI
- type ConfigurationParams
- type ConfigurationWallet
- type CreateOrderDataParams
- type CrossChainOrderDto
- type CrossChainOrderParams
- type CustomPreset
- type CustomPresetParams
- type CustomPresetPoint
- type Details
- type EscrowEventDataOutput
- type EscrowEventDataOutputAction
- type EscrowEventDataOutputSide
- type EscrowExtension
- type EscrowExtensionParams
- type EscrowExtraData
- type EscrowFactory
- type ExtraData
- type ExtraParams
- type Fees
- type FillOutputDto
- type FillOutputDtoStatus
- type GasCostConfig
- type GasCostConfigClassFixed
- type GetActiveOrdersOutput
- type GetOrderByMakerOutput
- type GetOrderByOrderHashParams
- type GetOrderFillsByHashOutput
- type GetOrderFillsByHashOutputFixed
- type GetOrderFillsByHashOutputStatus
- type GetOrderFillsByHashOutputValidation
- type GetQuoteOutput
- type GetQuoteOutputFixed
- type GetQuoteOutputRecommendedPreset
- type HashLock
- type Immutables
- type IntegratorFee
- type Interaction
- type LimitOrderV4StructOutput
- type Meta
- type MyMerkleTree
- type NetworkEnum
- type Order
- type OrderApiControllerGetActiveOrdersParams
- type OrderApiControllerGetOrdersByMakerParams
- type OrderApiControllerGetOrdersByOrderHashesJSONRequestBody
- type OrderApiControllerGetSettlementContractParams
- type OrderInput
- type OrderParams
- type OrdersByHashesInput
- type PairCurrency
- type PreparedOrder
- type Preset
- type PublicSecret
- type QuotePresets
- type QuoterControllerBuildQuoteTypedDataJSONRequestBody
- type QuoterControllerBuildQuoteTypedDataParams
- type QuoterControllerGetQuoteParams
- type QuoterControllerGetQuoteParamsFixed
- type QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody
- type QuoterControllerGetQuoteWithCustomPresetsParams
- type ReadyToAcceptSecretFill
- type ReadyToAcceptSecretFills
- type ReadyToAcceptSecretFillsForAllOrders
- type ReadyToAcceptSecretFillsForOrder
- type ReadyToExecutePublicAction
- type ReadyToExecutePublicActionAction
- type ReadyToExecutePublicActionsOutput
- type RelayerControllerSubmitJSONRequestBody
- type RelayerControllerSubmitManyJSONBody
- type RelayerControllerSubmitManyJSONRequestBody
- type RelayerControllerSubmitSecretsJSONRequestBody
- type ResolverDataOutput
- type ResolverDataOutputOrderType
- type SecretInput
- type SettlementPostInteractionData
- type SettlementSuffixData
- type SignedOrderInput
- type TakingFeeInfo
- type TimeLocks
- type TokenPair
- type WhitelistItem
Constants ¶
const NativeToken = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
Variables ¶
var CalcAuctionStartTimeFunc func(uint32, uint32) uint32 = CalcAuctionStartTime
Functions ¶
func CalcAuctionStartTime ¶
func GetCurrentTime ¶
func GetCurrentTime() int64
func GetMerkleLeaves ¶
func GetRandomBytes32 ¶
func HashSecret ¶
func Keccak256SortedHash ¶
Keccak256SortedHash takes two byte slices, sorts them lexicographically, concatenates them, and hashes the result.
func ParentIndex ¶
ParentIndex returns the parent index of a given index in the tree.
Types ¶
type ActiveOrdersOutput ¶
type ActiveOrdersOutput struct { // AuctionEndDate End date of the auction for this order. AuctionEndDate float32 `json:"auctionEndDate"` // AuctionStartDate Start date of the auction for this order. AuctionStartDate float32 `json:"auctionStartDate"` // Deadline Deadline by which the order must be filled. Deadline float32 `json:"deadline"` // DstChainId Identifier of the chain where the taker asset is located. DstChainId float32 `json:"dstChainId"` // Extension An interaction call data. ABI encoded set of makerAssetSuffix, takerAssetSuffix, makingAmountGetter, takingAmountGetter, predicate, permit, preInteraction, postInteraction.If extension exists then lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash Extension string `json:"extension"` // Fills Array of fills. Fills []string `json:"fills"` // IsMakerContract True if order signed by contract (GnosisSafe, etc.) IsMakerContract bool `json:"isMakerContract"` // MakerAllowance Amount of the maker asset allowance. MakerAllowance string `json:"makerAllowance"` // MakerBalance Amount of the maker asset balance. MakerBalance string `json:"makerBalance"` Order CrossChainOrderDto `json:"order"` // OrderHash Unique identifier of the order. OrderHash string `json:"orderHash"` // QuoteId Identifier of the quote associated with this order. QuoteId string `json:"quoteId"` // RemainingMakerAmount Remaining amount of the maker asset that can still be filled. RemainingMakerAmount string `json:"remainingMakerAmount"` // SecretHashes Array of secret hashes. SecretHashes [][]interface{} `json:"secretHashes,omitempty"` // Signature Signature of the order. Signature string `json:"signature"` // SrcChainId Identifier of the chain where the maker asset is located. SrcChainId float32 `json:"srcChainId"` }
ActiveOrdersOutput defines model for ActiveOrdersOutput.
type AdditionalParams ¶
type AuctionDetails ¶
type AuctionDetails struct { StartTime uint32 `json:"startTime"` Duration uint32 `json:"duration"` InitialRateBump uint32 `json:"initialRateBump"` Points []AuctionPointClassFixed `json:"points"` GasCost GasCostConfigClassFixed `json:"gasCost"` }
func CreateAuctionDetails ¶
func CreateAuctionDetails(preset *Preset, additionalWaitPeriod float32) (*AuctionDetails, error)
func DecodeAuctionDetails ¶
func DecodeAuctionDetails(data string) (*AuctionDetails, error)
func NewAuctionDetails ¶
func NewAuctionDetails(startTime, duration, initialRateBump uint32, points []AuctionPointClassFixed, gasCost GasCostConfigClassFixed) (*AuctionDetails, error)
func (AuctionDetails) Encode ¶
func (ad AuctionDetails) Encode() string
type AuctionPoint ¶
AuctionPoint defines model for AuctionPoint.
type AuctionPointClassFixed ¶
type AuctionPointOutput ¶
type AuctionPointOutput struct { // Coefficient The rate bump from the order min taker amount Coefficient float32 `json:"coefficient"` // Delay The delay in seconds from the previous point or auction start time Delay float32 `json:"delay"` }
AuctionPointOutput defines model for AuctionPointOutput.
type AuctionWhitelistItem ¶
type BuildOrderBody ¶
type BuildOrderBody struct { Quote GetQuoteOutput `json:"quote"` // SecretsHashList keccak256(secret)[] SecretsHashList string `json:"secretsHashList"` }
BuildOrderBody defines model for BuildOrderBody.
type BuildOrderOutput ¶
type BuildOrderOutput struct { // Extension CrossChain order extension Extension string `json:"extension"` // OrderHash Hash of CrossChain order OrderHash string `json:"orderHash"` // TypedData EIP712 Typed Data TypedData map[string]interface{} `json:"typedData"` }
BuildOrderOutput defines model for BuildOrderOutput.
type Client ¶
func NewClient ¶
func NewClient(cfg *Configuration) (*Client, error)
func (*Client) GetActiveOrders ¶
func (api *Client) GetActiveOrders(ctx context.Context, params OrderApiControllerGetActiveOrdersParams) (*GetActiveOrdersOutput, error)
func (*Client) GetOrderByOrderHash ¶
func (api *Client) GetOrderByOrderHash(ctx context.Context, params GetOrderByOrderHashParams) (*GetOrderFillsByHashOutputFixed, error)
func (*Client) GetQuote ¶
func (api *Client) GetQuote(ctx context.Context, params QuoterControllerGetQuoteParamsFixed) (*GetQuoteOutputFixed, error)
func (*Client) GetQuoteWithCustomPreset ¶
func (api *Client) GetQuoteWithCustomPreset(ctx context.Context, params QuoterControllerGetQuoteWithCustomPresetsParams, presetDetails QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody) (*GetQuoteOutputFixed, error)
func (*Client) GetReadyToAcceptFills ¶
func (api *Client) GetReadyToAcceptFills(ctx context.Context, params GetOrderByOrderHashParams) (*ReadyToAcceptSecretFills, error)
func (*Client) PlaceOrder ¶
func (api *Client) PlaceOrder(ctx context.Context, quoteParams QuoterControllerGetQuoteParamsFixed, quote *GetQuoteOutputFixed, orderParams OrderParams, wallet common.Wallet) (string, error)
PlaceOrder accepts a quote and submits it as a fusion plus order
func (*Client) SubmitSecret ¶
func (api *Client) SubmitSecret(ctx context.Context, params SecretInput) error
type Configuration ¶
type Configuration struct { WalletConfiguration *ConfigurationWallet APIConfiguration *ConfigurationAPI }
func NewConfiguration ¶
func NewConfiguration(params ConfigurationParams) (*Configuration, error)
type ConfigurationAPI ¶
type ConfigurationParams ¶
type ConfigurationWallet ¶
func NewConfigurationWallet ¶
func NewConfigurationWallet(privateKey string) (*ConfigurationWallet, error)
type CreateOrderDataParams ¶
type CreateOrderDataParams struct {
// contains filtered or unexported fields
}
type CrossChainOrderDto ¶
type CrossChainOrderDto struct { // Maker Address of the account creating the order (maker) in src chain. Maker string `json:"maker"` // MakerAsset Identifier of the asset being offered by the maker in src chain. MakerAsset string `json:"makerAsset"` // MakerTraits Includes some flags like, allow multiple fills, is partial fill allowed or not, price improvement, nonce, deadline etc. MakerTraits string `json:"makerTraits"` // MakingAmount Amount of the makerAsset being offered by the maker in src chain. MakingAmount string `json:"makingAmount"` // Receiver Address of the account receiving the assets (receiver), if different from maker in dst chain. Receiver string `json:"receiver"` // Salt Some unique value. It is necessary to be able to create cross chain orders with the same parameters (so that they have a different hash), Lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash Salt string `json:"salt"` // TakerAsset Identifier of the asset being requested by the maker in exchange in dst chain. TakerAsset string `json:"takerAsset"` // TakingAmount Amount of the takerAsset being requested by the maker in dst chain. TakingAmount string `json:"takingAmount"` }
CrossChainOrderDto defines model for CrossChainOrderDto.
type CrossChainOrderParams ¶
type CrossChainOrderParams struct { HashLock *HashLock Preset GetQuoteOutputRecommendedPreset Receiver string Nonce *big.Int Permit string IsPermit2 bool TakingFeeReceiver string DelayAuctionStartTimeBy float32 /** * Order will expire in `orderExpirationDelay` after auction ends * Default 12s */ OrderExpirationDelay uint32 }
type CustomPreset ¶
type CustomPreset struct { AuctionDuration int `json:"auctionDuration"` AuctionStartAmount string `json:"auctionStartAmount"` AuctionEndAmount string `json:"auctionEndAmount"` Points []CustomPresetPoint `json:"points,omitempty"` }
type CustomPresetParams ¶
type CustomPresetParams = map[string]interface{}
CustomPresetParams defines model for CustomPresetParams.
type CustomPresetPoint ¶
type Details ¶
type Details struct { Auction *AuctionDetails `json:"auction"` Fees Fees `json:"fees"` Whitelist []AuctionWhitelistItem ResolvingStartTime *big.Int }
type EscrowEventDataOutput ¶
type EscrowEventDataOutput struct { // Action Action of the escrow event Action EscrowEventDataOutputAction `json:"action"` // BlockTimestamp Unix timestamp in milliseconds BlockTimestamp float32 `json:"blockTimestamp"` // Side Side of the escrow event SRC or DST Side EscrowEventDataOutputSide `json:"side"` // TransactionHash Transaction hash TransactionHash string `json:"transactionHash"` }
EscrowEventDataOutput defines model for EscrowEventDataOutput.
type EscrowEventDataOutputAction ¶
type EscrowEventDataOutputAction string
EscrowEventDataOutputAction Action of the escrow event
const ( DstEscrowCreated EscrowEventDataOutputAction = "dst_escrow_created" EscrowCancelled EscrowEventDataOutputAction = "escrow_cancelled" FundsRescued EscrowEventDataOutputAction = "funds_rescued" SrcEscrowCreated EscrowEventDataOutputAction = "src_escrow_created" Withdrawn EscrowEventDataOutputAction = "withdrawn" )
Defines values for EscrowEventDataOutputAction.
type EscrowEventDataOutputSide ¶
type EscrowEventDataOutputSide string
EscrowEventDataOutputSide Side of the escrow event SRC or DST
const ( Dst EscrowEventDataOutputSide = "dst" Src EscrowEventDataOutputSide = "src" )
Defines values for EscrowEventDataOutputSide.
type EscrowExtension ¶
type EscrowExtension struct { fusion.Extension HashLock *HashLock DstChainId float32 DstToken common.Address SrcSafetyDeposit string DstSafetyDeposit string TimeLocks TimeLocks }
func DecodeEscrowExtension ¶
func DecodeEscrowExtension(data []byte) (*EscrowExtension, error)
DecodeEscrowExtension decodes the input byte slice into an Extension struct using reflection.
func NewEscrowExtension ¶
func NewEscrowExtension(escrowParams EscrowExtensionParams) (*EscrowExtension, error)
func (*EscrowExtension) ConvertToOrderbookExtension ¶
func (e *EscrowExtension) ConvertToOrderbookExtension() (*orderbook.Extension, error)
type EscrowExtensionParams ¶
type EscrowExtraData ¶
type EscrowFactory ¶
type EscrowFactory struct { // Address actual escrow factory contract address Address string `json:"address"` }
EscrowFactory defines model for EscrowFactory.
type ExtraParams ¶
type Fees ¶
type Fees struct { IntFee IntegratorFee BankFee *big.Int }
type FillOutputDto ¶
type FillOutputDto struct { EscrowEvents []EscrowEventDataOutput `json:"escrowEvents"` // FilledAuctionTakerAmount Amount of the takerAsset filled in dst chain. FilledAuctionTakerAmount string `json:"filledAuctionTakerAmount"` // FilledMakerAmount Amount of the makerAsset filled in src chain. FilledMakerAmount string `json:"filledMakerAmount"` // Status Fill status Status FillOutputDtoStatus `json:"status"` // TxHash Transaction hash TxHash string `json:"txHash"` }
FillOutputDto defines model for FillOutputDto.
type FillOutputDtoStatus ¶
type FillOutputDtoStatus string
FillOutputDtoStatus Fill status
const ( FillOutputDtoStatusExecuted FillOutputDtoStatus = "executed" FillOutputDtoStatusPending FillOutputDtoStatus = "pending" FillOutputDtoStatusRefunded FillOutputDtoStatus = "refunded" FillOutputDtoStatusRefunding FillOutputDtoStatus = "refunding" )
Defines values for FillOutputDtoStatus.
type GasCostConfig ¶
type GasCostConfig struct { GasBumpEstimate float32 `json:"gasBumpEstimate"` GasPriceEstimate string `json:"gasPriceEstimate"` }
GasCostConfig defines model for GasCostConfig.
type GasCostConfigClassFixed ¶
type GetActiveOrdersOutput ¶
type GetActiveOrdersOutput struct { Items []ActiveOrdersOutput `json:"items"` Meta Meta `json:"meta"` }
GetActiveOrdersOutput defines model for GetActiveOrdersOutput.
type GetOrderByMakerOutput ¶
type GetOrderByMakerOutput struct { Items []ActiveOrdersOutput `json:"items"` Meta Meta `json:"meta"` }
GetOrderByMakerOutput defines model for GetOrderByMakerOutput.
type GetOrderByOrderHashParams ¶
type GetOrderByOrderHashParams struct {
Hash string `url:"hash" json:"hash"`
}
type GetOrderFillsByHashOutput ¶
type GetOrderFillsByHashOutput struct { // ApproximateTakingAmount Approximate amount of the takerAsset being requested by the maker in dst chain. ApproximateTakingAmount string `json:"approximateTakingAmount"` // AuctionDuration Unix timestamp in milliseconds AuctionDuration float32 `json:"auctionDuration"` // AuctionStartDate Unix timestamp in milliseconds AuctionStartDate float32 `json:"auctionStartDate"` CancelTx map[string]interface{} `json:"cancelTx"` // Cancelable Is order cancelable Cancelable bool `json:"cancelable"` // CreatedAt Unix timestamp in milliseconds CreatedAt float32 `json:"createdAt"` // DstChainId Identifier of the chain where the taker asset is located. DstChainId float32 `json:"dstChainId"` DstTokenPriceUsd map[string]interface{} `json:"dstTokenPriceUsd"` // Extension An interaction call data. ABI encoded set of makerAssetSuffix, takerAssetSuffix, makingAmountGetter, takingAmountGetter, predicate, permit, preInteraction, postInteraction.If extension exists then lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash Extension string `json:"extension"` // Fills Fills Fills []FillOutputDto `json:"fills"` // InitialRateBump Initial rate bump InitialRateBump float32 `json:"initialRateBump"` Order LimitOrderV4StructOutput `json:"order"` // OrderHash Order hash OrderHash string `json:"orderHash"` Points AuctionPointOutput `json:"points"` // SrcChainId Identifier of the chain where the maker asset is located. SrcChainId float32 `json:"srcChainId"` SrcTokenPriceUsd map[string]interface{} `json:"srcTokenPriceUsd"` // Status Order status Status GetOrderFillsByHashOutputStatus `json:"status"` // TakerAsset Identifier of the asset being requested by the maker in exchange in dst chain. TakerAsset string `json:"takerAsset"` // TimeLocks TimeLocks without deployedAt TimeLocks string `json:"timeLocks"` // Validation Order validation status Validation GetOrderFillsByHashOutputValidation `json:"validation"` }
GetOrderFillsByHashOutput defines model for GetOrderFillsByHashOutput.
type GetOrderFillsByHashOutputFixed ¶
type GetOrderFillsByHashOutputFixed struct { // ApproximateTakingAmount Approximate amount of the takerAsset being requested by the maker in dst chain. ApproximateTakingAmount string `json:"approximateTakingAmount"` // AuctionDuration Unix timestamp in milliseconds AuctionDuration float32 `json:"auctionDuration"` // AuctionStartDate Unix timestamp in milliseconds AuctionStartDate float32 `json:"auctionStartDate"` CancelTx map[string]interface{} `json:"cancelTx"` // Cancelable Is order cancelable Cancelable bool `json:"cancelable"` // CreatedAt Unix timestamp in milliseconds CreatedAt float32 `json:"createdAt"` // DstChainId Identifier of the chain where the taker asset is located. DstChainId float32 `json:"dstChainId"` DstTokenPriceUsd string `json:"dstTokenPriceUsd"` // Extension An interaction call data. ABI encoded set of makerAssetSuffix, takerAssetSuffix, makingAmountGetter, takingAmountGetter, predicate, permit, preInteraction, postInteraction.If extension exists then lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash Extension string `json:"extension"` // Fills Fills Fills []FillOutputDto `json:"fills"` // InitialRateBump Initial rate bump InitialRateBump float32 `json:"initialRateBump"` Order LimitOrderV4StructOutput `json:"order"` // OrderHash Order hash OrderHash string `json:"orderHash"` Points []AuctionPointOutput `json:"points"` // SrcChainId Identifier of the chain where the maker asset is located. SrcChainId float32 `json:"srcChainId"` SrcTokenPriceUsd string `json:"srcTokenPriceUsd"` // Status Order status Status GetOrderFillsByHashOutputStatus `json:"status"` // TakerAsset Identifier of the asset being requested by the maker in exchange in dst chain. TakerAsset string `json:"takerAsset"` // TimeLocks TimeLocks without deployedAt TimeLocks string `json:"timeLocks"` // Validation Order validation status Validation GetOrderFillsByHashOutputValidation `json:"validation"` }
GetOrderFillsByHashOutputFixed replaces the DstTokenPriceUsd and SrcTokenPriceUsd fields with string and changes Points to be an array
type GetOrderFillsByHashOutputStatus ¶
type GetOrderFillsByHashOutputStatus string
GetOrderFillsByHashOutputStatus Order status
const ( GetOrderFillsByHashOutputStatusCancelled GetOrderFillsByHashOutputStatus = "cancelled" GetOrderFillsByHashOutputStatusExecuted GetOrderFillsByHashOutputStatus = "executed" GetOrderFillsByHashOutputStatusExpired GetOrderFillsByHashOutputStatus = "expired" GetOrderFillsByHashOutputStatusPending GetOrderFillsByHashOutputStatus = "pending" GetOrderFillsByHashOutputStatusRefunded GetOrderFillsByHashOutputStatus = "refunded" GetOrderFillsByHashOutputStatusRefunding GetOrderFillsByHashOutputStatus = "refunding" )
Defines values for GetOrderFillsByHashOutputStatus.
type GetOrderFillsByHashOutputValidation ¶
type GetOrderFillsByHashOutputValidation string
GetOrderFillsByHashOutputValidation Order validation status
const ( FailedToDecodeRemaining GetOrderFillsByHashOutputValidation = "failed-to-decode-remaining" FailedToParsePermitDetails GetOrderFillsByHashOutputValidation = "failed-to-parse-permit-details" InvalidPermitSignature GetOrderFillsByHashOutputValidation = "invalid-permit-signature" InvalidPermitSigner GetOrderFillsByHashOutputValidation = "invalid-permit-signer" InvalidPermitSpender GetOrderFillsByHashOutputValidation = "invalid-permit-spender" InvalidSignature GetOrderFillsByHashOutputValidation = "invalid-signature" NotEnoughAllowance GetOrderFillsByHashOutputValidation = "not-enough-allowance" NotEnoughBalance GetOrderFillsByHashOutputValidation = "not-enough-balance" OrderPredicateReturnedFalse GetOrderFillsByHashOutputValidation = "order-predicate-returned-false" UnknownFailure GetOrderFillsByHashOutputValidation = "unknown-failure" UnknownPermitVersion GetOrderFillsByHashOutputValidation = "unknown-permit-version" Valid GetOrderFillsByHashOutputValidation = "valid" WrongEpochManagerAndBitInvalidator GetOrderFillsByHashOutputValidation = "wrong-epoch-manager-and-bit-invalidator" )
Defines values for GetOrderFillsByHashOutputValidation.
type GetQuoteOutput ¶
type GetQuoteOutput struct { // DstEscrowFactory Escrow factory contract address at destination chain DstEscrowFactory string `json:"dstEscrowFactory"` DstSafetyDeposit string `json:"dstSafetyDeposit"` DstTokenAmount string `json:"dstTokenAmount"` Presets QuotePresets `json:"presets"` Prices PairCurrency `json:"prices"` // QuoteId Current generated quote id, should be passed with order QuoteId map[string]interface{} `json:"quoteId"` // RecommendedPreset suggested preset RecommendedPreset GetQuoteOutputRecommendedPreset `json:"recommendedPreset"` // SrcEscrowFactory Escrow factory contract address at source chain SrcEscrowFactory string `json:"srcEscrowFactory"` SrcSafetyDeposit string `json:"srcSafetyDeposit"` SrcTokenAmount string `json:"srcTokenAmount"` TimeLocks TimeLocks `json:"timeLocks"` Volume PairCurrency `json:"volume"` // Whitelist current executors whitelist addresses Whitelist []string `json:"whitelist"` }
GetQuoteOutput defines model for GetQuoteOutput.
type GetQuoteOutputFixed ¶
type GetQuoteOutputFixed struct { // DstEscrowFactory Escrow factory contract address at destination chain DstEscrowFactory string `json:"dstEscrowFactory"` DstSafetyDeposit string `json:"dstSafetyDeposit"` // This is changed from string to *big.Int DstTokenAmount string `json:"dstTokenAmount"` Presets QuotePresets `json:"presets"` Prices PairCurrency `json:"prices"` // QuoteId Current generated quote id, should be passed with order QuoteId string `json:"quoteId"` // This is changed from map[string]interface{} to string // RecommendedPreset suggested preset RecommendedPreset GetQuoteOutputRecommendedPreset `json:"recommendedPreset"` // SrcEscrowFactory Escrow factory contract address at source chain SrcEscrowFactory string `json:"srcEscrowFactory"` SrcSafetyDeposit string `json:"srcSafetyDeposit"` // This is changed from string to *big.Int SrcTokenAmount string `json:"srcTokenAmount"` TimeLocks TimeLocks `json:"timeLocks"` Volume PairCurrency `json:"volume"` // Whitelist current executors whitelist addresses Whitelist []string `json:"whitelist"` }
GetQuoteOutputFixed defines model for GetQuoteOutput. QuoteId, DstSafetyDeposit, and SrcSafetyDeposit have been fixed
type GetQuoteOutputRecommendedPreset ¶
type GetQuoteOutputRecommendedPreset string
GetQuoteOutputRecommendedPreset suggested preset
const ( Custom GetQuoteOutputRecommendedPreset = "custom" Fast GetQuoteOutputRecommendedPreset = "fast" Medium GetQuoteOutputRecommendedPreset = "medium" Slow GetQuoteOutputRecommendedPreset = "slow" )
Defines values for GetQuoteOutputRecommendedPreset.
type Immutables ¶
type Immutables struct { // Amount Amount of token to receive Amount string `json:"amount"` // Hashlock keccak256(secret(idx)) Hashlock string `json:"hashlock"` // Maker Maker's address which will receive tokens Maker string `json:"maker"` // OrderHash Order's hash 32 bytes hex sting OrderHash string `json:"orderHash"` // SafetyDeposit Security deposit in chain's native currency SafetyDeposit string `json:"safetyDeposit"` // Taker Escrow creation initiator address Taker string `json:"taker"` // Timelocks Encoded timelocks. To decode use: https://github.com/1inch/cross-chain-sdk/blob/master/src/cross-chain-order/time-locks/time-locks.ts Timelocks string `json:"timelocks"` // Token Token to receive on specific chain Token string `json:"token"` }
Immutables defines model for Immutables.
type Interaction ¶
func DecodeInteraction ¶
func DecodeInteraction(bytes string) (*Interaction, error)
func NewInteraction ¶
func NewInteraction(target common.Address, data string) *Interaction
func (*Interaction) Encode ¶
func (i *Interaction) Encode() string
type LimitOrderV4StructOutput ¶
type LimitOrderV4StructOutput struct { // Maker Maker address Maker string `json:"maker"` // MakerAsset Maker asset address MakerAsset string `json:"makerAsset"` MakerTraits string `json:"makerTraits"` // MakingAmount Amount of the maker asset MakingAmount string `json:"makingAmount"` // Receiver Receiver address Receiver string `json:"receiver"` Salt string `json:"salt"` // TakerAsset Taker asset address TakerAsset string `json:"takerAsset"` // TakingAmount Amount of the taker asset TakingAmount string `json:"takingAmount"` }
LimitOrderV4StructOutput defines model for LimitOrderV4StructOutput.
type Meta ¶
type Meta struct { CurrentPage float32 `json:"currentPage"` ItemsPerPage float32 `json:"itemsPerPage"` TotalItems float32 `json:"totalItems"` TotalPages float32 `json:"totalPages"` }
Meta defines model for Meta.
type MyMerkleTree ¶
type MyMerkleTree struct {
// contains filtered or unexported fields
}
func MakeTree ¶
func MakeTree(leaves []string) *MyMerkleTree
type NetworkEnum ¶
type NetworkEnum int
const ( ETHEREUM NetworkEnum = 1 POLYGON NetworkEnum = 137 BINANCE NetworkEnum = 56 ARBITRUM NetworkEnum = 42161 AVALANCHE NetworkEnum = 43114 OPTIMISM NetworkEnum = 10 FANTOM NetworkEnum = 250 GNOSIS NetworkEnum = 100 COINBASE NetworkEnum = 8453 )
type Order ¶
type Order struct { EscExtension *EscrowExtension Inner orderbook.OrderData SettlementExtension common.Address OrderInfo CrossChainOrderDto AuctionDetails *AuctionDetails PostInteractionData *SettlementPostInteractionData Extra ExtraData }
func CreateOrder ¶
func CreateOrder(params CreateOrderDataParams) (*Order, error)
type OrderApiControllerGetActiveOrdersParams ¶
type OrderApiControllerGetActiveOrdersParams struct { // Page Pagination step, default: 1 (page = offset / limit) Page float32 `url:"page,omitempty" json:"page,omitempty"` // Limit Number of active orders to receive (default: 100, max: 500) Limit float32 `url:"limit,omitempty" json:"limit,omitempty"` // SrcChain Source chain of cross chain SrcChain float32 `url:"srcChain,omitempty" json:"srcChain,omitempty"` // DstChain Destination chain of cross chain DstChain float32 `url:"dstChain,omitempty" json:"dstChain,omitempty"` }
OrderApiControllerGetActiveOrdersParams defines parameters for OrderApiControllerGetActiveOrders.
func (*OrderApiControllerGetActiveOrdersParams) Validate ¶
func (params *OrderApiControllerGetActiveOrdersParams) Validate() error
type OrderApiControllerGetOrdersByMakerParams ¶
type OrderApiControllerGetOrdersByMakerParams struct { // Page Pagination step, default: 1 (page = offset / limit) Page float32 `url:"page,omitempty" json:"page,omitempty"` // Limit Number of active orders to receive (default: 100, max: 500) Limit float32 `url:"limit,omitempty" json:"limit,omitempty"` // TimestampFrom timestampFrom in milliseconds for interval [timestampFrom, timestampTo) TimestampFrom float32 `url:"timestampFrom,omitempty" json:"timestampFrom,omitempty"` // TimestampTo timestampTo in milliseconds for interval [timestampFrom, timestampTo) TimestampTo float32 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"` // SrcToken Find history by the given source token SrcToken string `url:"srcToken,omitempty" json:"srcToken,omitempty"` // DstToken Find history by the given destination token DstToken string `url:"dstToken,omitempty" json:"dstToken,omitempty"` // WithToken Find history items by source or destination token WithToken string `url:"withToken,omitempty" json:"withToken,omitempty"` // DstChainId Destination chain of cross chain DstChainId float32 `url:"dstChainId,omitempty" json:"dstChainId,omitempty"` // SrcChainId Source chain of cross chain SrcChainId float32 `url:"srcChainId,omitempty" json:"srcChainId,omitempty"` // ChainId chainId for looking by dstChainId == chainId OR srcChainId == chainId ChainId float32 `url:"chainId,omitempty" json:"chainId,omitempty"` }
OrderApiControllerGetOrdersByMakerParams defines parameters for OrderApiControllerGetOrdersByMaker.
type OrderApiControllerGetOrdersByOrderHashesJSONRequestBody ¶
type OrderApiControllerGetOrdersByOrderHashesJSONRequestBody = OrdersByHashesInput
OrderApiControllerGetOrdersByOrderHashesJSONRequestBody defines body for OrderApiControllerGetOrdersByOrderHashes for application/json ContentType.
type OrderApiControllerGetSettlementContractParams ¶
type OrderApiControllerGetSettlementContractParams struct { // ChainId Chain ID ChainId float32 `url:"chainId,omitempty" json:"chainId,omitempty"` }
OrderApiControllerGetSettlementContractParams defines parameters for OrderApiControllerGetSettlementContract.
type OrderInput ¶
type OrderInput struct { // Maker Source chain address of the maker (wallet or contract address) Maker string `json:"maker"` // MakerAsset Source chain address of the maker asset MakerAsset string `json:"makerAsset"` // MakerTraits Includes some flags like: allow multiple fills, is partial fill allowed or not, price improvement, nonce, deadline etc. See <a href="https://github.com/1inch/limit-order-sdk/blob/master/src/limit-order/maker-traits.ts" target="_blank">maker-traits.ts</a> MakerTraits string `json:"makerTraits"` // MakingAmount Order maker's token amount MakingAmount string `json:"makingAmount"` // Receiver Destination chain address of the wallet or contract who will receive filled amount Receiver string `json:"receiver"` Salt string `json:"salt"` // TakerAsset Destination chain address of the taker asset TakerAsset string `json:"takerAsset"` // TakingAmount Order taker's token amount TakingAmount string `json:"takingAmount"` }
OrderInput defines model for OrderInput.
type OrderParams ¶
type OrderParams struct { HashLock *HashLock SecretHashes []string Permit string Receiver string Preset GetQuoteOutputRecommendedPreset Nonce *big.Int Fee TakingFeeInfo Source string IsPermit2 bool TakingFeeReceiver string CustomPreset CustomPreset }
func (*OrderParams) Validate ¶
func (body *OrderParams) Validate() error
type OrdersByHashesInput ¶
type OrdersByHashesInput struct {
OrderHashes []string `json:"orderHashes"`
}
OrdersByHashesInput defines model for OrdersByHashesInput.
type PairCurrency ¶
type PairCurrency struct {
Usd TokenPair `json:"usd"`
}
PairCurrency defines model for PairCurrency.
type PreparedOrder ¶
type PreparedOrder struct { Order Order `json:"order"` Hash string `json:"hash"` QuoteId string `json:"quoteId"` LimitOrder *orderbook.Order }
func CreateFusionPlusOrderData ¶
func CreateFusionPlusOrderData(quoteParams QuoterControllerGetQuoteParamsFixed, quote *GetQuoteOutputFixed, orderParams OrderParams, wallet common.Wallet, chainId int) (*PreparedOrder, error)
type Preset ¶
type Preset struct { AllowMultipleFills bool `json:"allowMultipleFills"` AllowPartialFills bool `json:"allowPartialFills"` AuctionDuration float32 `json:"auctionDuration"` AuctionEndAmount string `json:"auctionEndAmount"` AuctionStartAmount string `json:"auctionStartAmount"` CostInDstToken string `json:"costInDstToken"` ExclusiveResolver map[string]interface{} `json:"exclusiveResolver"` GasCost GasCostConfig `json:"gasCost"` InitialRateBump float32 `json:"initialRateBump"` Points []AuctionPoint `json:"points"` SecretsCount float32 `json:"secretsCount"` // StartAmount auction start amount taking into account gas bump StartAmount string `json:"startAmount"` StartAuctionIn float32 `json:"startAuctionIn"` }
Preset defines model for Preset.
func GetPreset ¶
func GetPreset(presets QuotePresets, presetType GetQuoteOutputRecommendedPreset) (*Preset, error)
type PublicSecret ¶
type PublicSecret struct { DstImmutables Immutables `json:"dstImmutables"` // Idx Sequence number of secrets Idx float32 `json:"idx"` // Secret Public secret to perform a withdrawal Secret string `json:"secret"` SrcImmutables Immutables `json:"srcImmutables"` }
PublicSecret defines model for PublicSecret.
type QuotePresets ¶
type QuotePresets struct { Custom *Preset `json:"custom,omitempty"` Fast Preset `json:"fast"` Medium Preset `json:"medium"` Slow Preset `json:"slow"` }
QuotePresets defines model for QuotePresets.
type QuoterControllerBuildQuoteTypedDataJSONRequestBody ¶
type QuoterControllerBuildQuoteTypedDataJSONRequestBody = BuildOrderBody
QuoterControllerBuildQuoteTypedDataJSONRequestBody defines body for QuoterControllerBuildQuoteTypedData for application/json ContentType.
type QuoterControllerBuildQuoteTypedDataParams ¶
type QuoterControllerBuildQuoteTypedDataParams struct { // SrcChain Id of source chain SrcChain float32 `url:"srcChain" json:"srcChain"` // DstChain Id of destination chain DstChain float32 `url:"dstChain" json:"dstChain"` // SrcTokenAddress Address of "SOURCE" token SrcTokenAddress string `url:"srcTokenAddress" json:"srcTokenAddress"` // DstTokenAddress Address of "DESTINATION" token DstTokenAddress string `url:"dstTokenAddress" json:"dstTokenAddress"` // Amount Amount to take from "SOURCE" token to get "DESTINATION" token Amount float32 `url:"amount" json:"amount"` // WalletAddress An address of the wallet or contract who will create Fusion order WalletAddress string `url:"walletAddress" json:"walletAddress"` // Fee fee in bps format, 1% is equal to 100bps Fee float32 `url:"fee,omitempty" json:"fee,omitempty"` // Source Frontend or some other source selector Source string `url:"source,omitempty" json:"source,omitempty"` // IsPermit2 permit2 allowance transfer encoded call IsPermit2 string `url:"isPermit2,omitempty" json:"isPermit2,omitempty"` // IsMobile Enabled flag allows to save quote for Mobile History IsMobile string `url:"isMobile,omitempty" json:"isMobile,omitempty"` // FeeReceiver In case fee non zero -> the fee will be transferred to this address FeeReceiver string `url:"feeReceiver,omitempty" json:"feeReceiver,omitempty"` // Permit permit, user approval sign Permit string `url:"permit,omitempty" json:"permit,omitempty"` // Preset fast/medium/slow/custom Preset string `url:"preset,omitempty" json:"preset,omitempty"` }
QuoterControllerBuildQuoteTypedDataParams defines parameters for QuoterControllerBuildQuoteTypedData.
type QuoterControllerGetQuoteParams ¶
type QuoterControllerGetQuoteParams struct { // SrcChain Id of source chain SrcChain float32 `url:"srcChain" json:"srcChain"` // DstChain Id of destination chain DstChain float32 `url:"dstChain" json:"dstChain"` // SrcTokenAddress Address of "SOURCE" token in source chain SrcTokenAddress string `url:"srcTokenAddress" json:"srcTokenAddress"` // DstTokenAddress Address of "DESTINATION" token in destination chain DstTokenAddress string `url:"dstTokenAddress" json:"dstTokenAddress"` // Amount Amount to take from "SOURCE" token to get "DESTINATION" token Amount float32 `url:"amount" json:"amount"` // WalletAddress An address of the wallet or contract in source chain who will create Fusion order WalletAddress string `url:"walletAddress" json:"walletAddress"` // EnableEstimate if enabled then get estimation from 1inch swap builder and generates quoteId, by default is false EnableEstimate bool `url:"enableEstimate" json:"enableEstimate"` // Fee fee in bps format, 1% is equal to 100bps Fee float32 `url:"fee,omitempty" json:"fee,omitempty"` // IsPermit2 permit2 allowance transfer encoded call IsPermit2 string `url:"isPermit2,omitempty" json:"isPermit2,omitempty"` // Permit permit, user approval sign Permit string `url:"permit,omitempty" json:"permit,omitempty"` }
QuoterControllerGetQuoteParams defines parameters for QuoterControllerGetQuote.
type QuoterControllerGetQuoteParamsFixed ¶
type QuoterControllerGetQuoteParamsFixed struct { // SrcChain Id of source chain SrcChain float32 `url:"srcChain" json:"srcChain"` // DstChain Id of destination chain DstChain float32 `url:"dstChain" json:"dstChain"` // SrcTokenAddress Address of "SOURCE" token in source chain SrcTokenAddress string `url:"srcTokenAddress" json:"srcTokenAddress"` // DstTokenAddress Address of "DESTINATION" token in destination chain DstTokenAddress string `url:"dstTokenAddress" json:"dstTokenAddress"` // Amount to take from "SOURCE" token to get "DESTINATION" token Amount string `url:"amount" json:"amount"` // WalletAddress An address of the wallet or contract in source chain who will create Fusion order WalletAddress string `url:"walletAddress" json:"walletAddress"` // EnableEstimate if enabled then get estimation from 1inch swap builder and generates quoteId, by default is false EnableEstimate bool `url:"enableEstimate" json:"enableEstimate"` // Fee in bps format, 1% is equal to 100bps Fee *big.Int `url:"fee,omitempty" json:"fee,omitempty"` // This is changed from float32 to *big.Int // IsPermit2 permit2 allowance transfer encoded call IsPermit2 bool `url:"isPermit2,omitempty" json:"isPermit2,omitempty"` // This is changed from string to bool // Permit permit, user approval sign Permit string `url:"permit,omitempty" json:"permit,omitempty"` }
QuoterControllerGetQuoteParamsFixed defines parameters for QuoterControllerGetQuote.
func (*QuoterControllerGetQuoteParamsFixed) Validate ¶
func (params *QuoterControllerGetQuoteParamsFixed) Validate() error
type QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody ¶
type QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody = CustomPresetParams
QuoterControllerGetQuoteWithCustomPresetsJSONRequestBody defines body for QuoterControllerGetQuoteWithCustomPresets for application/json ContentType.
type QuoterControllerGetQuoteWithCustomPresetsParams ¶
type QuoterControllerGetQuoteWithCustomPresetsParams struct { // SrcChain Id of source chain SrcChain float32 `url:"srcChain" json:"srcChain"` // DstChain Id of destination chain DstChain float32 `url:"dstChain" json:"dstChain"` // SrcTokenAddress Address of "SOURCE" token SrcTokenAddress string `url:"srcTokenAddress" json:"srcTokenAddress"` // DstTokenAddress Address of "DESTINATION" token DstTokenAddress string `url:"dstTokenAddress" json:"dstTokenAddress"` // Amount Amount to take from "SOURCE" token to get "DESTINATION" token Amount float32 `url:"amount" json:"amount"` // WalletAddress An address of the wallet or contract who will create Fusion order WalletAddress string `url:"walletAddress" json:"walletAddress"` // EnableEstimate if enabled then get estimation from 1inch swap builder and generates quoteId, by default is false EnableEstimate bool `url:"enableEstimate" json:"enableEstimate"` // Fee fee in bps format, 1% is equal to 100bps Fee float32 `url:"fee,omitempty" json:"fee,omitempty"` // IsPermit2 permit2 allowance transfer encoded call IsPermit2 string `url:"isPermit2,omitempty" json:"isPermit2,omitempty"` // Permit permit, user approval sign Permit string `url:"permit,omitempty" json:"permit,omitempty"` }
QuoterControllerGetQuoteWithCustomPresetsParams defines parameters for QuoterControllerGetQuoteWithCustomPresets.
func (*QuoterControllerGetQuoteWithCustomPresetsParams) Validate ¶
func (params *QuoterControllerGetQuoteWithCustomPresetsParams) Validate() error
type ReadyToAcceptSecretFill ¶
type ReadyToAcceptSecretFill struct { // DstEscrowDeployTxHash Transaction hash where the destination chain escrow was deployed DstEscrowDeployTxHash string `json:"dstEscrowDeployTxHash"` // Idx Sequence number of secrets for submission Idx float32 `json:"idx"` // SrcEscrowDeployTxHash Transaction hash where the source chain escrow was deployed SrcEscrowDeployTxHash string `json:"srcEscrowDeployTxHash"` }
ReadyToAcceptSecretFill defines model for ReadyToAcceptSecretFill.
type ReadyToAcceptSecretFills ¶
type ReadyToAcceptSecretFills struct { // Fills Fills that are ready to accept secrets from the client Fills []ReadyToAcceptSecretFill `json:"fills"` }
ReadyToAcceptSecretFills defines model for ReadyToAcceptSecretFills.
type ReadyToAcceptSecretFillsForAllOrders ¶
type ReadyToAcceptSecretFillsForAllOrders struct { // Orders Fills that are ready to accept secrets from the client for all orders Orders []ReadyToAcceptSecretFillsForOrder `json:"orders"` }
ReadyToAcceptSecretFillsForAllOrders defines model for ReadyToAcceptSecretFillsForAllOrders.
type ReadyToAcceptSecretFillsForOrder ¶
type ReadyToAcceptSecretFillsForOrder struct { // Fills Fills that are ready to accept secrets from the client Fills []ReadyToAcceptSecretFill `json:"fills"` // MakerAddress Maker address MakerAddress string `json:"makerAddress"` // OrderHash Order hash OrderHash string `json:"orderHash"` }
ReadyToAcceptSecretFillsForOrder defines model for ReadyToAcceptSecretFillsForOrder.
type ReadyToExecutePublicAction ¶
type ReadyToExecutePublicAction struct { Action ReadyToExecutePublicActionAction `json:"action"` // ChainId Execute action on this chain ChainId float32 `json:"chainId"` // Escrow Escrow's address to perform public action Escrow string `json:"escrow"` Immutables Immutables `json:"immutables"` // Secret Presented only for withdraw action Secret string `json:"secret,omitempty"` }
ReadyToExecutePublicAction defines model for ReadyToExecutePublicAction.
type ReadyToExecutePublicActionAction ¶
type ReadyToExecutePublicActionAction string
ReadyToExecutePublicActionAction defines model for ReadyToExecutePublicAction.Action.
const ( Cancel ReadyToExecutePublicActionAction = "cancel" Withdraw ReadyToExecutePublicActionAction = "withdraw" )
Defines values for ReadyToExecutePublicActionAction.
type ReadyToExecutePublicActionsOutput ¶
type ReadyToExecutePublicActionsOutput struct { // Actions Actions allowed to be performed on public timelock periods Actions []ReadyToExecutePublicAction `json:"actions"` }
ReadyToExecutePublicActionsOutput defines model for ReadyToExecutePublicActionsOutput.
type RelayerControllerSubmitJSONRequestBody ¶
type RelayerControllerSubmitJSONRequestBody = SignedOrderInput
RelayerControllerSubmitJSONRequestBody defines body for RelayerControllerSubmit for application/json ContentType.
type RelayerControllerSubmitManyJSONBody ¶
type RelayerControllerSubmitManyJSONBody = []string
RelayerControllerSubmitManyJSONBody defines parameters for RelayerControllerSubmitMany.
type RelayerControllerSubmitManyJSONRequestBody ¶
type RelayerControllerSubmitManyJSONRequestBody = RelayerControllerSubmitManyJSONBody
RelayerControllerSubmitManyJSONRequestBody defines body for RelayerControllerSubmitMany for application/json ContentType.
type RelayerControllerSubmitSecretsJSONRequestBody ¶
type RelayerControllerSubmitSecretsJSONRequestBody = SecretInput
RelayerControllerSubmitSecretsJSONRequestBody defines body for RelayerControllerSubmitSecrets for application/json ContentType.
type ResolverDataOutput ¶
type ResolverDataOutput struct { // OrderType Type of the order: enabled or disabled partial fills OrderType ResolverDataOutputOrderType `json:"orderType"` // SecretHashes keccak256(secret(idx))[] SecretHashes [][]interface{} `json:"secretHashes,omitempty"` // Secrets The data required for order withdraw and cancel Secrets []PublicSecret `json:"secrets"` }
ResolverDataOutput defines model for ResolverDataOutput.
type ResolverDataOutputOrderType ¶
type ResolverDataOutputOrderType string
ResolverDataOutputOrderType Type of the order: enabled or disabled partial fills
const ( MultipleFills ResolverDataOutputOrderType = "MultipleFills" SingleFill ResolverDataOutputOrderType = "SingleFill" )
Defines values for ResolverDataOutputOrderType.
type SecretInput ¶
type SecretInput struct { OrderHash string `json:"orderHash"` // Secret A secret for the fill hashlock Secret string `json:"secret"` }
SecretInput defines model for SecretInput.
type SettlementPostInteractionData ¶
type SettlementPostInteractionData struct { Whitelist []WhitelistItem IntegratorFee *IntegratorFee BankFee *big.Int ResolvingStartTime *big.Int CustomReceiver common.Address }
func CreateSettlementPostInteractionData ¶
func CreateSettlementPostInteractionData(details Details, orderInfo CrossChainOrderDto) (*SettlementPostInteractionData, error)
func Decode ¶
func Decode(data string) (SettlementPostInteractionData, error)
func NewSettlementPostInteractionData ¶
func NewSettlementPostInteractionData(data SettlementSuffixData) (*SettlementPostInteractionData, error)
func (SettlementPostInteractionData) CanExecuteAt ¶
func (SettlementPostInteractionData) Encode ¶
func (spid SettlementPostInteractionData) Encode() (string, error)
func (SettlementPostInteractionData) IsExclusiveResolver ¶
func (spid SettlementPostInteractionData) IsExclusiveResolver(wallet common.Address) bool
type SettlementSuffixData ¶
type SettlementSuffixData struct { Whitelist []AuctionWhitelistItem IntegratorFee *IntegratorFee BankFee *big.Int ResolvingStartTime *big.Int CustomReceiver common.Address }
type SignedOrderInput ¶
type SignedOrderInput struct { // Extension An interaction call data. ABI encoded a set of makerAssetSuffix, takerAssetSuffix, makingAmountGetter, takingAmountGetter, predicate, permit, preInteraction, postInteraction.Lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash. See <a href="https://github.com/1inch/cross-chain-sdk/blob/master/src/cross-chain-order/escrow-extension.ts" target="_blank">escrow-extension.ts</a>> Extension string `json:"extension"` Order OrderInput `json:"order"` // QuoteId Quote id of the quote with presets QuoteId string `json:"quoteId"` // SecretHashes Secret Hashes, required for order with multiple fills allowed. keccak256(secret(idx)) SecretHashes []string `json:"secretHashes,omitempty"` // Signature Signature of the cross chain order typed data (using signTypedData v4) Signature string `json:"signature"` // SrcChainId Source chain id SrcChainId float32 `json:"srcChainId"` }
SignedOrderInput defines model for SignedOrderInput.
type TakingFeeInfo ¶
type TimeLocks ¶
type TimeLocks struct { DstCancellation float32 `json:"dstCancellation"` DstPublicWithdrawal float32 `json:"dstPublicWithdrawal"` DstWithdrawal float32 `json:"dstWithdrawal"` SrcCancellation float32 `json:"srcCancellation"` SrcPublicCancellation float32 `json:"srcPublicCancellation"` SrcPublicWithdrawal float32 `json:"srcPublicWithdrawal"` SrcWithdrawal float32 `json:"srcWithdrawal"` }
TimeLocks defines model for TimeLocks.
type WhitelistItem ¶
Source Files
¶
- api.go
- auctiondetails.go
- client.go
- configuration.go
- escrowextension.go
- fusionplus_orders_types.gen.go
- fusionplus_quoter_types.gen.go
- fusionplus_relayer_types.gen.go
- fusionplus_types_extended.go
- hashlock.go
- interaction.go
- merkletree.go
- nativetokenwrappers.go
- order.go
- settlementpostinteractiondata.go
- validation.go