@symbiome-forge/cow-sdk-wasm 0.1.0-alpha.1 → 0.1.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +8 -7
  2. package/dist/cloudflare/index.cjs +6 -0
  3. package/dist/cloudflare/index.d.ts +3 -1
  4. package/dist/cloudflare/index.mjs +6 -0
  5. package/dist/default/index.cjs +6 -0
  6. package/dist/default/index.d.ts +3 -1
  7. package/dist/default/index.mjs +6 -0
  8. package/dist/orderbook/index.cjs +6 -0
  9. package/dist/orderbook/index.d.ts +3 -1
  10. package/dist/orderbook/index.mjs +6 -0
  11. package/dist/raw/cloudflare-web/cow_sdk_wasm.d.ts +154 -3
  12. package/dist/raw/cloudflare-web/cow_sdk_wasm.js +62 -21
  13. package/dist/raw/cloudflare-web/cow_sdk_wasm_bg.wasm +0 -0
  14. package/dist/raw/cloudflare-web/cow_sdk_wasm_bg.wasm.d.ts +5 -3
  15. package/dist/raw/default-bundler/cow_sdk_wasm.d.ts +149 -0
  16. package/dist/raw/default-bundler/cow_sdk_wasm_bg.js +62 -21
  17. package/dist/raw/default-bundler/cow_sdk_wasm_bg.wasm +0 -0
  18. package/dist/raw/default-bundler/cow_sdk_wasm_bg.wasm.d.ts +5 -3
  19. package/dist/raw/default-nodejs/cow_sdk_wasm.cjs +62 -21
  20. package/dist/raw/default-nodejs/cow_sdk_wasm.d.ts +149 -0
  21. package/dist/raw/default-nodejs/cow_sdk_wasm_bg.wasm.d.ts +5 -3
  22. package/dist/raw/orderbook-bundler/cow_sdk_wasm.d.ts +149 -0
  23. package/dist/raw/orderbook-bundler/cow_sdk_wasm_bg.js +60 -19
  24. package/dist/raw/orderbook-bundler/cow_sdk_wasm_bg.wasm +0 -0
  25. package/dist/raw/orderbook-bundler/cow_sdk_wasm_bg.wasm.d.ts +5 -3
  26. package/dist/raw/orderbook-nodejs/cow_sdk_wasm.cjs +60 -19
  27. package/dist/raw/orderbook-nodejs/cow_sdk_wasm.d.ts +149 -0
  28. package/dist/raw/orderbook-nodejs/cow_sdk_wasm_bg.wasm.d.ts +5 -3
  29. package/dist/raw/signing-bundler/cow_sdk_wasm_bg.js +10 -10
  30. package/dist/raw/signing-bundler/cow_sdk_wasm_bg.wasm +0 -0
  31. package/dist/raw/signing-bundler/cow_sdk_wasm_bg.wasm.d.ts +3 -3
  32. package/dist/raw/signing-nodejs/cow_sdk_wasm.cjs +10 -10
  33. package/dist/raw/signing-nodejs/cow_sdk_wasm_bg.wasm.d.ts +3 -3
  34. package/package.json +2 -3
package/README.md CHANGED
@@ -21,7 +21,7 @@ without depending on a specific wallet library.
21
21
  | Cloudflare Worker proxying CoW orderbook calls | `@symbiome-forge/cow-sdk-wasm/cloudflare` | Worker-compatible web target and explicit wasm module initialization |
22
22
  | Signer service or HSM proxy | `@symbiome-forge/cow-sdk-wasm/signing` | Signing primitives without orderbook, trading, subgraph, or IPFS clients |
23
23
  | Native Rust service, bot, solver, or treasury automation | `cow-sdk` | Avoids wasm-bindgen and npm packaging entirely |
24
- | Rust app compiled to browser WASM | `cow-sdk-browser-wallet` plus `cow-sdk-core` (browser `FetchTransport`) | Rust-on-wasm path; this package is for JavaScript hosts |
24
+ | Rust app compiled to browser WASM | `cow-sdk` with `cow-sdk-core`'s browser `FetchTransport` (the `wasm32-unknown-unknown` `transport::fetch` module) | Rust-on-wasm path; this package is for JavaScript hosts |
25
25
 
26
26
  ## Not in this crate
27
27
 
@@ -183,14 +183,14 @@ subpaths above.
183
183
  ## Performance and bundle size
184
184
 
185
185
  The package is built with release-size settings and a `wasm-opt -Oz` post-pass.
186
- Measured on the `0.1.0-alpha.1` build:
186
+ Measured on the current alpha build:
187
187
 
188
188
  | Flavor | Raw wasm | Brotli | Gzip | Gate |
189
189
  | --- | ---: | ---: | ---: | --- |
190
- | default | 1.59 MiB | 501 KiB | 675 KiB | 3.3 MiB raw / 900 KiB brotli |
191
- | orderbook | 0.99 MiB | 330 KiB | 432 KiB | 1.5 MiB raw / 500 KiB brotli |
190
+ | default | 1.63 MiB | 511 KiB | 688 KiB | 3.3 MiB raw / 900 KiB brotli |
191
+ | orderbook | 1.03 MiB | 341 KiB | 447 KiB | 1.5 MiB raw / 500 KiB brotli |
192
192
  | signing | 0.31 MiB | 119 KiB | 142 KiB | 0.9 MiB raw / 300 KiB brotli |
193
- | cloudflare | 1.50 MiB | 478 KiB | 642 KiB | 3.2 MiB raw / 850 KiB brotli / 3,000,000 B gzip (warn at 2,700,000 B) |
193
+ | cloudflare | 1.54 MiB | 489 KiB | 657 KiB | 3.2 MiB raw / 850 KiB brotli / 3,000,000 B gzip (warn at 2,700,000 B) |
194
194
 
195
195
  The cloudflare flavor's gzip-compressed artifact is below the current
196
196
  Cloudflare Workers Free compressed-size limit at the time of measurement.
@@ -269,8 +269,9 @@ subsets. This package is appropriate for specialized cases:
269
269
  - Single-source-of-truth Rust + TypeScript embedding (one implementation
270
270
  across both runtimes).
271
271
  - Cloudflare Workers (size-compatible with the current Workers Free
272
- compressed-size limit at the time of measurement; full Workers support
273
- pending release-bundle and startup validation).
272
+ compressed-size limit at the time of measurement; the `cloudflare` flavor
273
+ is built and tested end-to-end in CI (Workers Vitest), within the Workers
274
+ compressed-size budget).
274
275
  - Embeddable signing helpers (the `./signing` flavor is the smallest).
275
276
 
276
277
  The "When to use this SDK" table at the top of this README routes consumers
@@ -121,6 +121,12 @@ class OrderBookClient {
121
121
  async getTotalSurplus(owner, options) {
122
122
  return this.#call((client, merged) => client.getTotalSurplus(owner, merged), options);
123
123
  }
124
+ async getSolverCompetition(auctionId, options) {
125
+ return this.#call((client, merged) => client.getSolverCompetition(auctionId, merged), options);
126
+ }
127
+ async getSolverCompetitionByTxHash(txHash, options) {
128
+ return this.#call((client, merged) => client.getSolverCompetitionByTxHash(txHash, merged), options);
129
+ }
124
130
  async getAppData(appDataHash, options) {
125
131
  return this.#call((client, merged) => client.getAppData(appDataHash, merged), options);
126
132
  }
@@ -24,6 +24,8 @@ export declare class OrderBookClient {
24
24
  getTrades(query: raw.TradesQueryInput, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.TradeDto[]>>;
25
25
  getOrderCompetitionStatus(orderUid: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.CompetitionOrderStatusDto>>;
26
26
  getTotalSurplus(owner: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.TotalSurplusDto>>;
27
+ getSolverCompetition(auctionId: number, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.SolverCompetitionResponseDto>>;
28
+ getSolverCompetitionByTxHash(txHash: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.SolverCompetitionResponseDto>>;
27
29
  getAppData(appDataHash: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.AppDataObjectDto>>;
28
30
  uploadAppData(appDataHash: string, fullAppData: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<{
29
31
  uploaded: true;
@@ -71,7 +73,7 @@ export declare function signOrderWithTypedDataSigner(input: raw.OrderInput, chai
71
73
  export declare function supportedChainIds(): Uint32Array;
72
74
  export declare function validateAppDataDoc(doc: raw.AppDataDocInput): WasmEnvelope<raw.ValidationResultDto>;
73
75
  export declare function wasmVersion(): string;
74
- export type { AllowanceParametersInput, AmountsDto, AppDataDocDto, AppDataDocInput, AppDataInfoDto, AppDataObjectDto, ApprovalParametersInput, BuiltSellNativeCurrencyTxDto, CompetitionOrderStatusDto, CompetitionOrderStatusKindDto, ContractCallDto, CostsDto, CowEip1271SignRequest, CowEnvDto, DeploymentAddressesDto, Eip1193Request, EthFlowEventDto, EthflowDataDto, EventLogInput, ExecutedAmountsDto, ExecutedProtocolFeeDto, FeeComponentDto, GeneratedOrderUidDto, InitInput, InteractionDataDto, LimitTradeParametersInput, NativePriceResponseDto, NetworkFeeDto, OnchainOrderDataDto, OrderClassDto, OrderCreationInput, OrderDataDto, OrderDto, OrderInput, OrderInteractionsDto, OrderKindDto, OrderPostingResultDto, OrderQuoteRequestInput, OrderQuoteResponseDto, OrderStatusDto, OrderTraderParametersInput, OrderBookRuntimeBindingDto, PaginationOptions, PartnerFeeDto, PartnerFeeInput, PartnerFeePolicyDto, PartnerFeePolicyInput, QuoteAmountsAndCostsDto, QuoteDataDto, QuoteResultsDto, SettlementEventDto, SignedCancellationsInput, SignedOrderDto, SigningSchemeDto, SolverExecutionDto, StoredOrderQuoteDto, SwapParametersInput, TokenBalanceDto, TotalSurplusDto, TradeDto, TradeParametersDto, TradesQueryInput, TradingAppDataInfoDto, TransactionRequestDto, TypedDataDomainDto, TypedDataEnvelopeDto, TypedDataFieldDto, ValidationResultDto } from "./raw/cloudflare.js";
76
+ export type { AllowanceParametersInput, AmountsDto, AppDataDocDto, AppDataDocInput, AppDataInfoDto, AppDataObjectDto, ApprovalParametersInput, BuiltSellNativeCurrencyTxDto, CompetitionAuctionDto, CompetitionOrderStatusDto, CompetitionOrderStatusKindDto, ContractCallDto, CostsDto, CowEip1271SignRequest, CowEnvDto, DeploymentAddressesDto, Eip1193Request, EthFlowEventDto, EthflowDataDto, EventLogInput, ExecutedAmountsDto, ExecutedProtocolFeeDto, FeeComponentDto, GeneratedOrderUidDto, InitInput, InteractionDataDto, LimitTradeParametersInput, NativePriceResponseDto, NetworkFeeDto, OnchainOrderDataDto, OrderClassDto, OrderCreationInput, OrderDataDto, OrderDto, OrderInput, OrderInteractionsDto, OrderKindDto, OrderPostingResultDto, OrderQuoteRequestInput, OrderQuoteResponseDto, OrderStatusDto, OrderTraderParametersInput, OrderBookRuntimeBindingDto, PaginationOptions, PartnerFeeDto, PartnerFeeInput, PartnerFeePolicyDto, PartnerFeePolicyInput, QuoteAmountsAndCostsDto, QuoteDataDto, QuoteResultsDto, SettlementEventDto, SignedCancellationsInput, SignedOrderDto, SigningSchemeDto, SolverCompetitionOrderDto, SolverCompetitionResponseDto, SolverExecutionDto, SolverSettlementDto, StoredOrderQuoteDto, SwapParametersInput, TokenBalanceDto, TotalSurplusDto, TradeDto, TradeParametersDto, TradesQueryInput, TradingAppDataInfoDto, TransactionRequestDto, TypedDataDomainDto, TypedDataEnvelopeDto, TypedDataFieldDto, ValidationResultDto } from "./raw/cloudflare.js";
75
77
  export type { ContractReadCallback, CowEip1271SignCallback, CowEnv, CustomEip1271Callback, DigestSignerCallback, Eip1193RequestCallback, TypedDataSignerCallback } from "./callbacks.js";
76
78
  export type { OrderBookRejectionCategory, CowError } from "./errors.js";
77
79
  export type { SchemaVersion, WasmEnvelope } from "./envelope.js";
@@ -60,6 +60,12 @@ export class OrderBookClient {
60
60
  async getTotalSurplus(owner, options) {
61
61
  return this.#call((client, merged) => client.getTotalSurplus(owner, merged), options);
62
62
  }
63
+ async getSolverCompetition(auctionId, options) {
64
+ return this.#call((client, merged) => client.getSolverCompetition(auctionId, merged), options);
65
+ }
66
+ async getSolverCompetitionByTxHash(txHash, options) {
67
+ return this.#call((client, merged) => client.getSolverCompetitionByTxHash(txHash, merged), options);
68
+ }
63
69
  async getAppData(appDataHash, options) {
64
70
  return this.#call((client, merged) => client.getAppData(appDataHash, merged), options);
65
71
  }
@@ -150,6 +150,12 @@ class OrderBookClient {
150
150
  async getTotalSurplus(owner, options) {
151
151
  return this.#call((client, merged) => client.getTotalSurplus(owner, merged), options);
152
152
  }
153
+ async getSolverCompetition(auctionId, options) {
154
+ return this.#call((client, merged) => client.getSolverCompetition(auctionId, merged), options);
155
+ }
156
+ async getSolverCompetitionByTxHash(txHash, options) {
157
+ return this.#call((client, merged) => client.getSolverCompetitionByTxHash(txHash, merged), options);
158
+ }
153
159
  async getAppData(appDataHash, options) {
154
160
  return this.#call((client, merged) => client.getAppData(appDataHash, merged), options);
155
161
  }
@@ -30,6 +30,8 @@ export declare class OrderBookClient {
30
30
  getTrades(query: raw.TradesQueryInput, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.TradeDto[]>>;
31
31
  getOrderCompetitionStatus(orderUid: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.CompetitionOrderStatusDto>>;
32
32
  getTotalSurplus(owner: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.TotalSurplusDto>>;
33
+ getSolverCompetition(auctionId: number, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.SolverCompetitionResponseDto>>;
34
+ getSolverCompetitionByTxHash(txHash: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.SolverCompetitionResponseDto>>;
33
35
  getAppData(appDataHash: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.AppDataObjectDto>>;
34
36
  uploadAppData(appDataHash: string, fullAppData: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<{
35
37
  uploaded: true;
@@ -87,7 +89,7 @@ export declare function signOrderWithTypedDataSigner(input: raw.OrderInput, chai
87
89
  export declare function supportedChainIds(): Uint32Array;
88
90
  export declare function validateAppDataDoc(doc: raw.AppDataDocInput): WasmEnvelope<raw.ValidationResultDto>;
89
91
  export declare function wasmVersion(): string;
90
- export type { AllowanceParametersInput, AmountsDto, AppDataDocDto, AppDataDocInput, AppDataInfoDto, AppDataObjectDto, ApprovalParametersInput, BuiltSellNativeCurrencyTxDto, CompetitionOrderStatusDto, CompetitionOrderStatusKindDto, ContractCallDto, CostsDto, CowEip1271SignRequest, CowEnvDto, DeploymentAddressesDto, Eip1193Request, EthFlowEventDto, EthflowDataDto, EventLogInput, ExecutedAmountsDto, ExecutedProtocolFeeDto, FeeComponentDto, GeneratedOrderUidDto, InteractionDataDto, LimitTradeParametersInput, NativePriceResponseDto, NetworkFeeDto, OnchainOrderDataDto, OrderClassDto, OrderCreationInput, OrderDataDto, OrderDto, OrderInput, OrderInteractionsDto, OrderKindDto, OrderPostingResultDto, OrderQuoteRequestInput, OrderQuoteResponseDto, OrderStatusDto, OrderTraderParametersInput, OrderBookRuntimeBindingDto, PaginationOptions, PartnerFeeDto, PartnerFeeInput, PartnerFeePolicyDto, PartnerFeePolicyInput, QuoteAmountsAndCostsDto, QuoteDataDto, QuoteResultsDto, SettlementEventDto, SignedCancellationsInput, SignedOrderDto, SigningSchemeDto, SolverExecutionDto, StoredOrderQuoteDto, SubgraphQueryInput, SwapParametersInput, TokenBalanceDto, TotalSurplusDto, TradeDto, TradeParametersDto, TradesQueryInput, TradingAppDataInfoDto, TransactionRequestDto, TypedDataDomainDto, TypedDataEnvelopeDto, TypedDataFieldDto, ValidationResultDto } from "./raw/default.js";
92
+ export type { AllowanceParametersInput, AmountsDto, AppDataDocDto, AppDataDocInput, AppDataInfoDto, AppDataObjectDto, ApprovalParametersInput, BuiltSellNativeCurrencyTxDto, CompetitionAuctionDto, CompetitionOrderStatusDto, CompetitionOrderStatusKindDto, ContractCallDto, CostsDto, CowEip1271SignRequest, CowEnvDto, DeploymentAddressesDto, Eip1193Request, EthFlowEventDto, EthflowDataDto, EventLogInput, ExecutedAmountsDto, ExecutedProtocolFeeDto, FeeComponentDto, GeneratedOrderUidDto, InteractionDataDto, LimitTradeParametersInput, NativePriceResponseDto, NetworkFeeDto, OnchainOrderDataDto, OrderClassDto, OrderCreationInput, OrderDataDto, OrderDto, OrderInput, OrderInteractionsDto, OrderKindDto, OrderPostingResultDto, OrderQuoteRequestInput, OrderQuoteResponseDto, OrderStatusDto, OrderTraderParametersInput, OrderBookRuntimeBindingDto, PaginationOptions, PartnerFeeDto, PartnerFeeInput, PartnerFeePolicyDto, PartnerFeePolicyInput, QuoteAmountsAndCostsDto, QuoteDataDto, QuoteResultsDto, SettlementEventDto, SignedCancellationsInput, SignedOrderDto, SigningSchemeDto, SolverCompetitionOrderDto, SolverCompetitionResponseDto, SolverExecutionDto, SolverSettlementDto, StoredOrderQuoteDto, SubgraphQueryInput, SwapParametersInput, TokenBalanceDto, TotalSurplusDto, TradeDto, TradeParametersDto, TradesQueryInput, TradingAppDataInfoDto, TransactionRequestDto, TypedDataDomainDto, TypedDataEnvelopeDto, TypedDataFieldDto, ValidationResultDto } from "./raw/default.js";
91
93
  export type { ContractReadCallback, CowEip1271SignCallback, CowEnv, CustomEip1271Callback, DigestSignerCallback, Eip1193RequestCallback, TypedDataSignerCallback } from "./callbacks.js";
92
94
  export type { OrderBookRejectionCategory, CowError } from "./errors.js";
93
95
  export type { SchemaVersion, WasmEnvelope } from "./envelope.js";
@@ -89,6 +89,12 @@ export class OrderBookClient {
89
89
  async getTotalSurplus(owner, options) {
90
90
  return this.#call((client, merged) => client.getTotalSurplus(owner, merged), options);
91
91
  }
92
+ async getSolverCompetition(auctionId, options) {
93
+ return this.#call((client, merged) => client.getSolverCompetition(auctionId, merged), options);
94
+ }
95
+ async getSolverCompetitionByTxHash(txHash, options) {
96
+ return this.#call((client, merged) => client.getSolverCompetitionByTxHash(txHash, merged), options);
97
+ }
92
98
  async getAppData(appDataHash, options) {
93
99
  return this.#call((client, merged) => client.getAppData(appDataHash, merged), options);
94
100
  }
@@ -107,6 +107,12 @@ class OrderBookClient {
107
107
  async getTotalSurplus(owner, options) {
108
108
  return this.#call((client, merged) => client.getTotalSurplus(owner, merged), options);
109
109
  }
110
+ async getSolverCompetition(auctionId, options) {
111
+ return this.#call((client, merged) => client.getSolverCompetition(auctionId, merged), options);
112
+ }
113
+ async getSolverCompetitionByTxHash(txHash, options) {
114
+ return this.#call((client, merged) => client.getSolverCompetitionByTxHash(txHash, merged), options);
115
+ }
110
116
  async getAppData(appDataHash, options) {
111
117
  return this.#call((client, merged) => client.getAppData(appDataHash, merged), options);
112
118
  }
@@ -22,6 +22,8 @@ export declare class OrderBookClient {
22
22
  getTrades(query: raw.TradesQueryInput, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.TradeDto[]>>;
23
23
  getOrderCompetitionStatus(orderUid: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.CompetitionOrderStatusDto>>;
24
24
  getTotalSurplus(owner: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.TotalSurplusDto>>;
25
+ getSolverCompetition(auctionId: number, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.SolverCompetitionResponseDto>>;
26
+ getSolverCompetitionByTxHash(txHash: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.SolverCompetitionResponseDto>>;
25
27
  getAppData(appDataHash: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<raw.AppDataObjectDto>>;
26
28
  uploadAppData(appDataHash: string, fullAppData: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<{
27
29
  uploaded: true;
@@ -50,7 +52,7 @@ export declare function signOrderWithEip1271(input: raw.OrderInput, chainId: num
50
52
  export declare function signOrderWithTypedDataSigner(input: raw.OrderInput, chainId: number, owner: string, typedDataSigner: TypedDataSignerCallback, options?: SigningOptions | null): Promise<WasmEnvelope<raw.SignedOrderDto>>;
51
53
  export declare function supportedChainIds(): Uint32Array;
52
54
  export declare function wasmVersion(): string;
53
- export type { AppDataObjectDto, CompetitionOrderStatusDto, CompetitionOrderStatusKindDto, CowEip1271SignRequest, DeploymentAddressesDto, Eip1193Request, EthFlowEventDto, EthflowDataDto, EventLogInput, ExecutedAmountsDto, ExecutedProtocolFeeDto, GeneratedOrderUidDto, InteractionDataDto, NativePriceResponseDto, OnchainOrderDataDto, OrderClassDto, OrderCreationInput, OrderDto, OrderInput, OrderInteractionsDto, OrderKindDto, OrderQuoteRequestInput, OrderQuoteResponseDto, OrderStatusDto, OrderTraderParametersInput, PaginationOptions, QuoteDataDto, SettlementEventDto, SignedCancellationsInput, SignedOrderDto, SigningSchemeDto, SolverExecutionDto, StoredOrderQuoteDto, TokenBalanceDto, TotalSurplusDto, TradeDto, TradesQueryInput, TransactionRequestDto, TypedDataDomainDto, TypedDataEnvelopeDto, TypedDataFieldDto } from "./raw/orderbook.js";
55
+ export type { AppDataObjectDto, CompetitionAuctionDto, CompetitionOrderStatusDto, CompetitionOrderStatusKindDto, CowEip1271SignRequest, DeploymentAddressesDto, Eip1193Request, EthFlowEventDto, EthflowDataDto, EventLogInput, ExecutedAmountsDto, ExecutedProtocolFeeDto, GeneratedOrderUidDto, InteractionDataDto, NativePriceResponseDto, OnchainOrderDataDto, OrderClassDto, OrderCreationInput, OrderDto, OrderInput, OrderInteractionsDto, OrderKindDto, OrderQuoteRequestInput, OrderQuoteResponseDto, OrderStatusDto, OrderTraderParametersInput, PaginationOptions, QuoteDataDto, SettlementEventDto, SignedCancellationsInput, SignedOrderDto, SigningSchemeDto, SolverCompetitionOrderDto, SolverCompetitionResponseDto, SolverExecutionDto, SolverSettlementDto, StoredOrderQuoteDto, TokenBalanceDto, TotalSurplusDto, TradeDto, TradesQueryInput, TransactionRequestDto, TypedDataDomainDto, TypedDataEnvelopeDto, TypedDataFieldDto } from "./raw/orderbook.js";
54
56
  export type { CowEip1271SignCallback, CowEnv, CustomEip1271Callback, DigestSignerCallback, Eip1193RequestCallback, TypedDataSignerCallback } from "./callbacks.js";
55
57
  export type { OrderBookRejectionCategory, CowError } from "./errors.js";
56
58
  export type { SchemaVersion, WasmEnvelope } from "./envelope.js";
@@ -52,6 +52,12 @@ export class OrderBookClient {
52
52
  async getTotalSurplus(owner, options) {
53
53
  return this.#call((client, merged) => client.getTotalSurplus(owner, merged), options);
54
54
  }
55
+ async getSolverCompetition(auctionId, options) {
56
+ return this.#call((client, merged) => client.getSolverCompetition(auctionId, merged), options);
57
+ }
58
+ async getSolverCompetitionByTxHash(txHash, options) {
59
+ return this.#call((client, merged) => client.getSolverCompetitionByTxHash(txHash, merged), options);
60
+ }
55
61
  async getAppData(appDataHash, options) {
56
62
  return this.#call((client, merged) => client.getAppData(appDataHash, merged), options);
57
63
  }
@@ -268,6 +268,21 @@ export interface ApprovalParametersInput {
268
268
  vaultRelayerOverride?: string;
269
269
  }
270
270
 
271
+ /**
272
+ * Auction snapshot nested in a solver-competition response, mirroring
273
+ * `cow_sdk_orderbook::CompetitionAuction`.
274
+ */
275
+ export interface CompetitionAuctionDto {
276
+ /**
277
+ * Order UIDs included in the auction.
278
+ */
279
+ orders?: string[];
280
+ /**
281
+ * Reference prices keyed by token address.
282
+ */
283
+ prices?: Record<string, string>;
284
+ }
285
+
271
286
  /**
272
287
  * Coarse, switchable classification of an orderbook rejection, mirrored for
273
288
  * the JS error surface.
@@ -768,6 +783,77 @@ export interface OnchainOrderDataDto {
768
783
  placementError?: string;
769
784
  }
770
785
 
786
+ /**
787
+ * One order touched by a solver settlement, mirroring
788
+ * `cow_sdk_orderbook::SolverCompetitionOrder`.
789
+ */
790
+ export interface SolverCompetitionOrderDto {
791
+ /**
792
+ * Order UID.
793
+ */
794
+ id: string;
795
+ /**
796
+ * Sell amount in the upstream decimal-string wire shape.
797
+ */
798
+ sellAmount: string;
799
+ /**
800
+ * Buy amount in the upstream decimal-string wire shape.
801
+ */
802
+ buyAmount: string;
803
+ /**
804
+ * Buy-token address, when the service returns it.
805
+ */
806
+ buyToken?: string;
807
+ /**
808
+ * Sell-token address, when the service returns it.
809
+ */
810
+ sellToken?: string;
811
+ }
812
+
813
+ /**
814
+ * One solver\'s settlement entry in a competition, mirroring
815
+ * `cow_sdk_orderbook::SolverSettlement`.
816
+ */
817
+ export interface SolverSettlementDto {
818
+ /**
819
+ * On-chain executor address (the zero address for legacy settlements).
820
+ */
821
+ solverAddress: string;
822
+ /**
823
+ * CIP-20 score in the upstream decimal-string wire shape.
824
+ */
825
+ score: string;
826
+ /**
827
+ * Position in the total ranking.
828
+ */
829
+ ranking: number;
830
+ /**
831
+ * Clearing prices keyed by token address (deprecated; empty for recent
832
+ * auctions).
833
+ */
834
+ clearingPrices?: Record<string, string>;
835
+ /**
836
+ * Orders touched by this settlement.
837
+ */
838
+ orders?: SolverCompetitionOrderDto[];
839
+ /**
840
+ * Whether this solver received the right to execute.
841
+ */
842
+ isWinner: boolean;
843
+ /**
844
+ * Whether this solution was filtered out under CIP-67.
845
+ */
846
+ filteredOut: boolean;
847
+ /**
848
+ * CIP-67 reference score, when available.
849
+ */
850
+ referenceScore?: string;
851
+ /**
852
+ * Settlement transaction hash, when available.
853
+ */
854
+ txHash?: string;
855
+ }
856
+
771
857
  /**
772
858
  * One typed partner-fee policy object, mirroring
773
859
  * `cow_sdk_app_data::PartnerFeePolicy`.
@@ -1567,6 +1653,42 @@ export interface SolverExecutionDto {
1567
1653
  executedAmounts?: ExecutedAmountsDto;
1568
1654
  }
1569
1655
 
1656
+ /**
1657
+ * Solver-competition result for an auction, mirroring
1658
+ * `cow_sdk_orderbook::SolverCompetitionResponse` (the CIP-67 contract served at
1659
+ * the `/api/v2/solver_competition/*` routes).
1660
+ */
1661
+ export interface SolverCompetitionResponseDto {
1662
+ /**
1663
+ * Auction identifier.
1664
+ */
1665
+ auctionId: number;
1666
+ /**
1667
+ * Block the auction started on.
1668
+ */
1669
+ auctionStartBlock: number;
1670
+ /**
1671
+ * Block deadline by which the auction must settle.
1672
+ */
1673
+ auctionDeadlineBlock: number;
1674
+ /**
1675
+ * Winning-solution transaction hashes.
1676
+ */
1677
+ transactionHashes?: string[];
1678
+ /**
1679
+ * CIP-67 per-winning-solver reference scores keyed by solver address.
1680
+ */
1681
+ referenceScores?: Record<string, string>;
1682
+ /**
1683
+ * Auction snapshot.
1684
+ */
1685
+ auction: CompetitionAuctionDto;
1686
+ /**
1687
+ * Per-solver settlements.
1688
+ */
1689
+ solutions?: SolverSettlementDto[];
1690
+ }
1691
+
1570
1692
  /**
1571
1693
  * Stepwise quote amounts and cost components across the quote lifecycle.
1572
1694
  */
@@ -2204,6 +2326,33 @@ export class OrderBookClient {
2204
2326
  * @throws CowError for invalid input, transport failure, timeout, or cancellation.
2205
2327
  */
2206
2328
  getQuote(request: OrderQuoteRequestInput, options?: SdkClientOptions | null): Promise<WasmEnvelope<OrderQuoteResponseDto>>;
2329
+ /**
2330
+ * Fetches the solver-competition result for an auction.
2331
+ *
2332
+ * Returns the solver competition the protocol ran for the auction: the
2333
+ * winning solvers, their scores and rankings, the auction snapshot, and the
2334
+ * per-solver settlements, in the upstream wire shape. Targets the v2
2335
+ * `/api/v2/solver_competition/{auctionId}` route.
2336
+ *
2337
+ * @param auctionId Auction id to look up (a non-negative integer).
2338
+ * @param options Optional per-call cancellation and timeout settings.
2339
+ * @returns A versioned envelope containing the solver-competition response.
2340
+ * @throws CowError for an out-of-range id, not-found responses, transport failure, or timeout.
2341
+ */
2342
+ getSolverCompetition(auctionId: number, options?: SdkClientOptions | null): Promise<WasmEnvelope<SolverCompetitionResponseDto>>;
2343
+ /**
2344
+ * Fetches the solver-competition result by settlement transaction hash.
2345
+ *
2346
+ * Like `getSolverCompetition`, keyed by the settlement transaction hash
2347
+ * rather than the auction id. Targets the v2
2348
+ * `/api/v2/solver_competition/by_tx_hash/{txHash}` route.
2349
+ *
2350
+ * @param txHash Settlement transaction hash as a `0x`-prefixed 32-byte hex string.
2351
+ * @param options Optional per-call cancellation and timeout settings.
2352
+ * @returns A versioned envelope containing the solver-competition response.
2353
+ * @throws CowError for an invalid hash, not-found responses, transport failure, or timeout.
2354
+ */
2355
+ getSolverCompetitionByTxHash(txHash: string, options?: SdkClientOptions | null): Promise<WasmEnvelope<SolverCompetitionResponseDto>>;
2207
2356
  /**
2208
2357
  * Fetches the total accumulated surplus for an account.
2209
2358
  *
@@ -2808,6 +2957,8 @@ export interface InitOutput {
2808
2957
  readonly orderbookclient_getOrderMultiEnv: (a: number, b: number, c: number, d: number) => number;
2809
2958
  readonly orderbookclient_getOrders: (a: number, b: number, c: number, d: number, e: number) => number;
2810
2959
  readonly orderbookclient_getQuote: (a: number, b: number, c: number) => number;
2960
+ readonly orderbookclient_getSolverCompetition: (a: number, b: number, c: number) => number;
2961
+ readonly orderbookclient_getSolverCompetitionByTxHash: (a: number, b: number, c: number, d: number) => number;
2811
2962
  readonly orderbookclient_getTotalSurplus: (a: number, b: number, c: number, d: number) => number;
2812
2963
  readonly orderbookclient_getTrades: (a: number, b: number, c: number) => number;
2813
2964
  readonly orderbookclient_getTxOrders: (a: number, b: number, c: number, d: number) => number;
@@ -2836,9 +2987,9 @@ export interface InitOutput {
2836
2987
  readonly tradingclient_postSwapOrderWithEip1271: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
2837
2988
  readonly validateAppDataDoc: (a: number, b: number) => void;
2838
2989
  readonly wasmVersion: (a: number) => void;
2839
- readonly __wasm_bindgen_func_elem_5941: (a: number, b: number, c: number, d: number) => void;
2840
- readonly __wasm_bindgen_func_elem_5950: (a: number, b: number, c: number, d: number) => void;
2841
- readonly __wasm_bindgen_func_elem_5861: (a: number, b: number) => void;
2990
+ readonly __wasm_bindgen_func_elem_6117: (a: number, b: number, c: number, d: number) => void;
2991
+ readonly __wasm_bindgen_func_elem_6126: (a: number, b: number, c: number, d: number) => void;
2992
+ readonly __wasm_bindgen_func_elem_6037: (a: number, b: number) => void;
2842
2993
  readonly __wbindgen_export: (a: number, b: number) => number;
2843
2994
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
2844
2995
  readonly __wbindgen_export3: (a: number) => void;
@@ -204,6 +204,47 @@ export class OrderBookClient {
204
204
  const ret = wasm.orderbookclient_getQuote(this.__wbg_ptr, addHeapObject(request), isLikeNone(options) ? 0 : addHeapObject(options));
205
205
  return takeObject(ret);
206
206
  }
207
+ /**
208
+ * Fetches the solver-competition result for an auction.
209
+ *
210
+ * Returns the solver competition the protocol ran for the auction: the
211
+ * winning solvers, their scores and rankings, the auction snapshot, and the
212
+ * per-solver settlements, in the upstream wire shape. Targets the v2
213
+ * `/api/v2/solver_competition/{auctionId}` route.
214
+ *
215
+ * @param auctionId Auction id to look up (a non-negative integer).
216
+ * @param options Optional per-call cancellation and timeout settings.
217
+ * @returns A versioned envelope containing the solver-competition response.
218
+ * @throws CowError for an out-of-range id, not-found responses, transport failure, or timeout.
219
+ * @param {number} auctionId
220
+ * @param {SdkClientOptions | null} [options]
221
+ * @returns {WasmEnvelope<SolverCompetitionResponseDto>}
222
+ */
223
+ getSolverCompetition(auctionId, options) {
224
+ const ret = wasm.orderbookclient_getSolverCompetition(this.__wbg_ptr, auctionId, isLikeNone(options) ? 0 : addHeapObject(options));
225
+ return takeObject(ret);
226
+ }
227
+ /**
228
+ * Fetches the solver-competition result by settlement transaction hash.
229
+ *
230
+ * Like `getSolverCompetition`, keyed by the settlement transaction hash
231
+ * rather than the auction id. Targets the v2
232
+ * `/api/v2/solver_competition/by_tx_hash/{txHash}` route.
233
+ *
234
+ * @param txHash Settlement transaction hash as a `0x`-prefixed 32-byte hex string.
235
+ * @param options Optional per-call cancellation and timeout settings.
236
+ * @returns A versioned envelope containing the solver-competition response.
237
+ * @throws CowError for an invalid hash, not-found responses, transport failure, or timeout.
238
+ * @param {string} txHash
239
+ * @param {SdkClientOptions | null} [options]
240
+ * @returns {WasmEnvelope<SolverCompetitionResponseDto>}
241
+ */
242
+ getSolverCompetitionByTxHash(txHash, options) {
243
+ const ptr0 = passStringToWasm0(txHash, wasm.__wbindgen_export, wasm.__wbindgen_export2);
244
+ const len0 = WASM_VECTOR_LEN;
245
+ const ret = wasm.orderbookclient_getSolverCompetitionByTxHash(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addHeapObject(options));
246
+ return takeObject(ret);
247
+ }
207
248
  /**
208
249
  * Fetches the total accumulated surplus for an account.
209
250
  *
@@ -1401,10 +1442,10 @@ function __wbg_get_imports() {
1401
1442
  __wbg__wbg_cb_unref_33c39e13d73b25f6: function(arg0) {
1402
1443
  getObject(arg0)._wbg_cb_unref();
1403
1444
  },
1404
- __wbg_abort_413b060ce2cedffd: function(arg0) {
1445
+ __wbg_abort_6e6ea7d259504afc: function(arg0) {
1405
1446
  getObject(arg0).abort();
1406
1447
  },
1407
- __wbg_abort_6e6ea7d259504afc: function(arg0) {
1448
+ __wbg_abort_dfa2db6f36b2e2ed: function(arg0) {
1408
1449
  getObject(arg0).abort();
1409
1450
  },
1410
1451
  __wbg_aborted_4d4114700dc4c251: function(arg0) {
@@ -1422,13 +1463,13 @@ function __wbg_get_imports() {
1422
1463
  const ret = getObject(arg0).call(getObject(arg1));
1423
1464
  return addHeapObject(ret);
1424
1465
  }, arguments); },
1425
- __wbg_clearTimeout_323d72e2c87b37b4: function(arg0) {
1426
- globalThis.clearTimeout(getObject(arg0));
1427
- },
1428
1466
  __wbg_clearTimeout_3629d6209dfcc46e: function(arg0) {
1429
1467
  const ret = clearTimeout(takeObject(arg0));
1430
1468
  return addHeapObject(ret);
1431
1469
  },
1470
+ __wbg_clearTimeout_8b00bc4651646e19: function(arg0) {
1471
+ globalThis.clearTimeout(getObject(arg0));
1472
+ },
1432
1473
  __wbg_done_b62d4a7d2286852a: function(arg0) {
1433
1474
  const ret = getObject(arg0).done;
1434
1475
  return ret;
@@ -1556,7 +1597,7 @@ function __wbg_get_imports() {
1556
1597
  const ret = getObject(arg0).length;
1557
1598
  return ret;
1558
1599
  },
1559
- __wbg_new_0d0108049d844421: function() {
1600
+ __wbg_new_0ace9a25fb079afe: function() {
1560
1601
  const ret = new globalThis.AbortController();
1561
1602
  return addHeapObject(ret);
1562
1603
  },
@@ -1595,7 +1636,7 @@ function __wbg_get_imports() {
1595
1636
  const a = state0.a;
1596
1637
  state0.a = 0;
1597
1638
  try {
1598
- return __wasm_bindgen_func_elem_5950(a, state0.b, arg0, arg1);
1639
+ return __wasm_bindgen_func_elem_6126(a, state0.b, arg0, arg1);
1599
1640
  } finally {
1600
1641
  state0.a = a;
1601
1642
  }
@@ -1613,7 +1654,7 @@ function __wbg_get_imports() {
1613
1654
  const a = state0.a;
1614
1655
  state0.a = 0;
1615
1656
  try {
1616
- return __wasm_bindgen_func_elem_5950(a, state0.b, arg0, arg1);
1657
+ return __wasm_bindgen_func_elem_6126(a, state0.b, arg0, arg1);
1617
1658
  } finally {
1618
1659
  state0.a = a;
1619
1660
  }
@@ -1677,7 +1718,7 @@ function __wbg_get_imports() {
1677
1718
  const ret = setTimeout(getObject(arg0), arg1);
1678
1719
  return addHeapObject(ret);
1679
1720
  }, arguments); },
1680
- __wbg_setTimeout_63c2e8b855bb48ad: function(arg0, arg1) {
1721
+ __wbg_setTimeout_cab0a11a73079ec4: function(arg0, arg1) {
1681
1722
  const ret = globalThis.setTimeout(getObject(arg0), arg1 >>> 0);
1682
1723
  return addHeapObject(ret);
1683
1724
  },
@@ -1710,11 +1751,11 @@ function __wbg_get_imports() {
1710
1751
  __wbg_set_signal_4a69430cb12800f3: function(arg0, arg1) {
1711
1752
  getObject(arg0).signal = getObject(arg1);
1712
1753
  },
1713
- __wbg_signal_4c9d3f39f4095986: function(arg0) {
1754
+ __wbg_signal_4d9d567be73ea52c: function(arg0) {
1714
1755
  const ret = getObject(arg0).signal;
1715
1756
  return addHeapObject(ret);
1716
1757
  },
1717
- __wbg_signal_4d9d567be73ea52c: function(arg0) {
1758
+ __wbg_signal_93793c07c495b010: function(arg0) {
1718
1759
  const ret = getObject(arg0).signal;
1719
1760
  return addHeapObject(ret);
1720
1761
  },
@@ -1765,13 +1806,13 @@ function __wbg_get_imports() {
1765
1806
  console.warn(getObject(arg0));
1766
1807
  },
1767
1808
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1768
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 589, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1769
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_5941);
1809
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 601, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1810
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6117);
1770
1811
  return addHeapObject(ret);
1771
1812
  },
1772
1813
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1773
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 581, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1774
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_5861);
1814
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 593, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1815
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_6037);
1775
1816
  return addHeapObject(ret);
1776
1817
  },
1777
1818
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1808,14 +1849,14 @@ function __wbg_get_imports() {
1808
1849
  };
1809
1850
  }
1810
1851
 
1811
- function __wasm_bindgen_func_elem_5861(arg0, arg1) {
1812
- wasm.__wasm_bindgen_func_elem_5861(arg0, arg1);
1852
+ function __wasm_bindgen_func_elem_6037(arg0, arg1) {
1853
+ wasm.__wasm_bindgen_func_elem_6037(arg0, arg1);
1813
1854
  }
1814
1855
 
1815
- function __wasm_bindgen_func_elem_5941(arg0, arg1, arg2) {
1856
+ function __wasm_bindgen_func_elem_6117(arg0, arg1, arg2) {
1816
1857
  try {
1817
1858
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1818
- wasm.__wasm_bindgen_func_elem_5941(retptr, arg0, arg1, addHeapObject(arg2));
1859
+ wasm.__wasm_bindgen_func_elem_6117(retptr, arg0, arg1, addHeapObject(arg2));
1819
1860
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1820
1861
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1821
1862
  if (r1) {
@@ -1826,8 +1867,8 @@ function __wasm_bindgen_func_elem_5941(arg0, arg1, arg2) {
1826
1867
  }
1827
1868
  }
1828
1869
 
1829
- function __wasm_bindgen_func_elem_5950(arg0, arg1, arg2, arg3) {
1830
- wasm.__wasm_bindgen_func_elem_5950(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1870
+ function __wasm_bindgen_func_elem_6126(arg0, arg1, arg2, arg3) {
1871
+ wasm.__wasm_bindgen_func_elem_6126(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1831
1872
  }
1832
1873
 
1833
1874
  const OrderBookClientFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -26,6 +26,8 @@ export const orderbookclient_getOrderLink: (a: number, b: number, c: number, d:
26
26
  export const orderbookclient_getOrderMultiEnv: (a: number, b: number, c: number, d: number) => number;
27
27
  export const orderbookclient_getOrders: (a: number, b: number, c: number, d: number, e: number) => number;
28
28
  export const orderbookclient_getQuote: (a: number, b: number, c: number) => number;
29
+ export const orderbookclient_getSolverCompetition: (a: number, b: number, c: number) => number;
30
+ export const orderbookclient_getSolverCompetitionByTxHash: (a: number, b: number, c: number, d: number) => number;
29
31
  export const orderbookclient_getTotalSurplus: (a: number, b: number, c: number, d: number) => number;
30
32
  export const orderbookclient_getTrades: (a: number, b: number, c: number) => number;
31
33
  export const orderbookclient_getTxOrders: (a: number, b: number, c: number, d: number) => number;
@@ -54,9 +56,9 @@ export const tradingclient_postSwapOrderFromQuote: (a: number, b: number, c: num
54
56
  export const tradingclient_postSwapOrderWithEip1271: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
55
57
  export const validateAppDataDoc: (a: number, b: number) => void;
56
58
  export const wasmVersion: (a: number) => void;
57
- export const __wasm_bindgen_func_elem_5941: (a: number, b: number, c: number, d: number) => void;
58
- export const __wasm_bindgen_func_elem_5950: (a: number, b: number, c: number, d: number) => void;
59
- export const __wasm_bindgen_func_elem_5861: (a: number, b: number) => void;
59
+ export const __wasm_bindgen_func_elem_6117: (a: number, b: number, c: number, d: number) => void;
60
+ export const __wasm_bindgen_func_elem_6126: (a: number, b: number, c: number, d: number) => void;
61
+ export const __wasm_bindgen_func_elem_6037: (a: number, b: number) => void;
60
62
  export const __wbindgen_export: (a: number, b: number) => number;
61
63
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
62
64
  export const __wbindgen_export3: (a: number) => void;