@cowprotocol/cow-sdk
Namespacesโ
Enumerationsโ
- BuyTokenDestination
- DurationType
- EcdsaSigningScheme
- OrderClass
- OrderKind
- OrderQuoteSideKindBuy
- OrderQuoteSideKindSell
- OrderStatus
- PollResultCode
- PriceQuality
- ProofLocation
- SellTokenSource
- SigningScheme
- StartTimeValue
- SupportedChainId
Classesโ
- ConditionalOrder
- ConditionalOrderFactory
- CowError
- Multiplexer
- OrderBookApi
- OrderBookApiError
- OrderSigningUtils
- SubgraphApi
- Twap
Interfacesโ
- ApiContext
- ConditionalOrderArguments
- EnrichedOrder
- FetchParams
- IpfsConfig
- IsNotValid
- IsValid
- PollResultDontTryAgain
- PollResultSuccess
- PollResultTryAtEpoch
- PollResultTryNextBlock
- PollResultTryOnBlock
- PollResultUnexpectedError
- QuoteAmountsAndCosts
- RequestOptions
- SignOrderCancellationParams
- SignOrderCancellationsParams
- SignOrderParams
- TwapData
- TwapStruct
Type Aliasesโ
Addressโ
ฦฌ Address: string
20 byte Ethereum address encoded as a hex with 0x
prefix.
Defined inโ
external/cow-sdk/src/order-book/generated/models/Address.ts:8
ApiBaseUrlsโ
ฦฌ ApiBaseUrls: Record
<SupportedChainId
, string
>
Defined inโ
external/cow-sdk/src/common/configs.ts:47
AppDataโ
ฦฌ AppData: string
The string encoding of a JSON object representing some appData
. The
format of the JSON expected in the appData
field is defined
here.
Defined inโ
external/cow-sdk/src/order-book/generated/models/AppData.ts:11
AppDataHashโ
ฦฌ AppDataHash: string
32 bytes encoded as hex with 0x
prefix.
It's expected to be the hash of the stringified JSON object representing the appData
.
Defined inโ
external/cow-sdk/src/order-book/generated/models/AppDataHash.ts:10
AppDataObjectโ
ฦฌ AppDataObject: Object
An appData
document that is registered with the API.
Type declarationโ
Name | Type |
---|---|
fullAppData? | AppData |
Defined inโ
external/cow-sdk/src/order-book/generated/models/AppDataObject.ts:10
Auctionโ
ฦฌ Auction: Object
A batch auction for solving.
Type declarationโ
Name | Type | Description |
---|---|---|
block? | number | The block number for the auction. Orders and prices are guaranteed to be valid on this block. Proposed settlements should be valid for this block as well. |
id? | number | The unique identifier of the auction. Increment whenever the backend creates a new auction. |
latestSettlementBlock? | number | The latest block on which a settlement has been processed. NOTE: Under certain conditions it is possible for a settlement to have been mined as part of block but not have yet been processed. |
orders? | AuctionOrder [] | The solvable orders included in the auction. |
prices? | AuctionPrices | - |
surplusCapturingJitOrderOwners? | Address [] | List of addresses on whose surplus will count towards the objective value of their solution (unlike other orders that were created by the solver). |
Defined inโ
external/cow-sdk/src/order-book/generated/models/Auction.ts:13
AuctionOrderโ
ฦฌ AuctionOrder: Object
A solvable order included in the current batch auction. Contains the data forwarded to solvers for solving.
Type declarationโ
Name | Type | Description |
---|---|---|
appData | AppDataHash | - |
buyAmount | TokenAmount | see OrderParameters::buyAmount |
buyToken | Address | see OrderParameters::buyToken |
buyTokenBalance | BuyTokenDestination | see OrderParameters::buyTokenBalance |
class | OrderClass | - |
created | string | Creation time of the order. Denominated in epoch seconds. |
executed | TokenAmount | Currently executed amount of sell/buy token, depending on the order kind. |
kind | OrderKind | see OrderParameters::kind |
owner | Address | - |
partiallyFillable | boolean | see OrderParameters::partiallyFillable |
postInteractions | InteractionData [] | The post-interactions that need to be executed after the execution of the order. |
preInteractions | InteractionData [] | The pre-interactions that need to be executed before the first execution of the order. |
protocolFees | FeePolicy [] | The fee policies that are used to compute the protocol fees for this order. |
quote? | Quote | A winning quote. |
receiver | Address | null | see OrderParameters::receiver |
sellAmount | TokenAmount | see OrderParameters::sellAmount |
sellToken | Address | see OrderParameters::sellToken |
sellTokenBalance | SellTokenSource | see OrderParameters::sellTokenBalance |
signature | Signature | - |
uid | UID | - |
validTo | number | see OrderParameters::validTo |
Defined inโ
external/cow-sdk/src/order-book/generated/models/AuctionOrder.ts:22
AuctionPricesโ
ฦฌ AuctionPrices: Record
<string
, BigUint
>
The reference prices for all traded tokens in the auction as a mapping from token addresses to a price denominated in native token (i.e. 1e18 represents a token that trades one to one with the native token). These prices are used for solution competition for computing surplus and converting fees to native token.
Defined inโ
external/cow-sdk/src/order-book/generated/models/AuctionPrices.ts:14
BigUintโ
ฦฌ BigUint: string
A big unsigned integer encoded in decimal.
Defined inโ
external/cow-sdk/src/order-book/generated/models/BigUint.ts:8
BlockInfoโ
ฦฌ BlockInfo: Object
Type declarationโ
Name | Type |
---|---|
blockNumber | number |
blockTimestamp | number |
Defined inโ
external/cow-sdk/src/composable/types.ts:102
CallDataโ
ฦฌ CallData: string
Some calldata
sent to a contract in a transaction encoded as a hex with 0x
prefix.
Defined inโ
external/cow-sdk/src/order-book/generated/models/CallData.ts:8
CompetitionAuctionโ
ฦฌ CompetitionAuction: Object
The components that describe a batch auction for the solver competition.
Type declarationโ
Name | Type | Description |
---|---|---|
orders? | UID [] | The UIDs of the orders included in the auction. |
prices? | AuctionPrices | - |
Defined inโ
external/cow-sdk/src/order-book/generated/models/CompetitionAuction.ts:12
CompetitionOrderStatusโ
ฦฌ CompetitionOrderStatus: Object
Type declarationโ
Name | Type | Description |
---|---|---|
type | type | - |
value? | { executedAmounts? : ExecutedAmounts ; solver : string }[] | A list of solvers who participated in the latest competition, sorted by score in ascending order, where the last element is the winner. The presence of executed amounts defines whether the solver provided a solution for the desired order. |
Defined inโ
external/cow-sdk/src/order-book/generated/models/CompetitionOrderStatus.ts:7
external/cow-sdk/src/order-book/generated/models/CompetitionOrderStatus.ts:23
ConditionalOrderParamsโ
ฦฌ ConditionalOrderParams: Object
Type declarationโ
Name | Type |
---|---|
handler | string |
salt | string |
staticInput | string |
Defined inโ
external/cow-sdk/src/composable/types.ts:13
ConditionalOrderRegistryโ
ฦฌ ConditionalOrderRegistry: Record
<string
, FromParams
<unknown
, unknown
>>
Defined inโ
external/cow-sdk/src/composable/ConditionalOrderFactory.ts:5
ContextFactoryโ
ฦฌ ContextFactory: Object
A factory and it's arguments that are called at transaction mining time to generate the context for a conditional order(s).
This allows to support the case where conditional orders may want to commence validity at the
time of transaction mining, like in the case of a TWAP
executed by a DAO or Safe
that takes
a reasonable amount of time to aggregate signatures or collect votes.
Remarks
This is used in conjunction with setRootWithContext
or createWithContext
.
Type declarationโ
Name | Type |
---|---|
address | string |
factoryArgs? | { args : unknown [] ; argsType : string [] } |
factoryArgs.args | unknown [] |
factoryArgs.argsType | string [] |
Defined inโ
external/cow-sdk/src/composable/types.ts:44
CowEnvโ
ฦฌ CowEnv: "prod"
| "staging"
The environment to use for the Cow API.
Defined inโ
external/cow-sdk/src/common/configs.ts:35
DurationOfPartโ
ฦฌ DurationOfPart: { durationType
: AUTO
} | { duration
: BigNumber
; durationType
: LIMIT_DURATION
}
Defined inโ
external/cow-sdk/src/composable/orderTypes/Twap.ts:138
EcdsaSignatureโ
ฦฌ EcdsaSignature: string
65 bytes encoded as hex with 0x
prefix. r || s || v
from the spec.
Defined inโ
external/cow-sdk/src/order-book/generated/models/EcdsaSignature.ts:8
EthflowDataโ
ฦฌ EthflowData: Object
Provides the additional data for ethflow orders.
Type declarationโ
Name | Type | Description |
---|---|---|
refundTxHash | TransactionHash | null | Specifies in which transaction the order was refunded. If this field is null the order was not yet refunded. |
userValidTo | number | Describes the validTo of an order ethflow order. NOTE: For ethflow orders, the validTo encoded in the smart contract is type(uint256).max . |
Defined inโ
external/cow-sdk/src/order-book/generated/models/EthflowData.ts:10
ExecutedAmountsโ
ฦฌ ExecutedAmounts: Object
Type declarationโ
Name | Type |
---|---|
buy | BigUint |
sell | BigUint |