@0xmonaco/types 1.0.57 → 1.0.58-develop.f12e78b

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.
@@ -267,6 +267,46 @@ export interface paths {
267
267
  patch?: never;
268
268
  trace?: never;
269
269
  };
270
+ "/api/v1/accounts/self-trade-prevention": {
271
+ parameters: {
272
+ query?: never;
273
+ header?: never;
274
+ path?: never;
275
+ cookie?: never;
276
+ };
277
+ /**
278
+ * Get your self-trade-prevention default
279
+ * @description Get your self-trade-prevention default.
280
+ *
281
+ * Return the authenticated wallet's self-trade-prevention default — the mode
282
+ * applied when an order from this wallet family (every account sharing the
283
+ * wallet address, across applications) would match against the family's own
284
+ * resting order and the order itself names no override. `is_custom` is true
285
+ * when the wallet has explicitly set a default; false means the platform
286
+ * default (`CANCEL_MAKER`) is in effect.
287
+ */
288
+ get: operations["get_self_trade_prevention_default"];
289
+ /**
290
+ * Set your self-trade-prevention default
291
+ * @description Set your self-trade-prevention default.
292
+ *
293
+ * Set the authenticated wallet's self-trade-prevention default to one of
294
+ * `CANCEL_MAKER`, `CANCEL_TAKER`, `CANCEL_BOTH`, or `SKIP` (input is
295
+ * case-insensitive; responses always carry these spellings). The default is
296
+ * wallet-scoped — it covers every application and account sharing the wallet
297
+ * address — and a per-order mode always overrides it. The write is sequenced
298
+ * through the matching engine; on success the next order from the wallet
299
+ * family already resolves the new mode. Delegated-agent sessions cannot
300
+ * change it.
301
+ */
302
+ put: operations["set_self_trade_prevention_default"];
303
+ post?: never;
304
+ delete?: never;
305
+ options?: never;
306
+ head?: never;
307
+ patch?: never;
308
+ trace?: never;
309
+ };
270
310
  "/api/v1/accounts/sub-accounts": {
271
311
  parameters: {
272
312
  query?: never;
@@ -545,8 +585,21 @@ export interface paths {
545
585
  * @description Create authentication challenge.
546
586
  *
547
587
  * Generate a cryptographic challenge (nonce) for wallet-based authentication.
548
- * The user must sign the returned message with their private key to prove
549
- * ownership of the wallet.
588
+ * The wallet must authorize the returned message to prove control of the
589
+ * address. An EOA does that by signing it with its private key. A
590
+ * smart-contract wallet has no private key and instead produces a signature
591
+ * its own contract will accept, which Monaco checks under EIP-1271 — see
592
+ * Verify.
593
+ *
594
+ * The challenge is single-use and binds the session public key supplied here,
595
+ * so it authorizes exactly one keypair, once. The lifetime is 5 minutes, or
596
+ * 30 minutes for EVERY address while contract-signature login is enabled on
597
+ * the deployment — a multisig must collect owner approvals before it can
598
+ * answer, and the window is uniform rather than eligibility-specific so this
599
+ * unauthenticated endpoint cannot be used to probe which addresses hold a
600
+ * BuilderCodes payout bucket. Widening it is cheap: a longer window is a
601
+ * longer-lived offer to authorize one predetermined keypair once, never a
602
+ * longer-lived credential.
550
603
  */
551
604
  post: operations["create_challenge"];
552
605
  delete?: never;
@@ -619,6 +672,30 @@ export interface paths {
619
672
  * Verify the signed challenge message and create an authenticated session.
620
673
  * Binds the caller-provided ed25519 session public key to the new session;
621
674
  * subsequent requests are signed with the matching private key.
675
+ *
676
+ * How the signature is checked depends on the address. Almost every address
677
+ * is verified by recovering the signing key, exactly as before. EIP-1271
678
+ * verification applies only to an address that is BOTH eligible for
679
+ * contract-signature login AND has contract code deployed on chain: an
680
+ * eligible payout wallet that is an ordinary EOA is still verified by
681
+ * recovery. The two are mutually exclusive, and the request is identical
682
+ * either way — `signature` carries whatever the wallet produced, and no
683
+ * field changes. The one bound is length: a contract signature over 8192
684
+ * decoded bytes is refused as invalid rather than forwarded to the chain,
685
+ * which is far above any realistic owner set.
686
+ *
687
+ * Because deciding that requires reading the chain, this adds one
688
+ * client-visible outcome the recovery path does not have: UNAVAILABLE (REST
689
+ * 503). It is retryable and is NOT a verdict on the signature. It covers
690
+ * three cases, and an eligible address can see any of them even when it turns
691
+ * out to be an EOA, because the code lookup happens first: the chain did not
692
+ * answer, it did not answer within the deadline, or the server declined to
693
+ * ask because its own concurrent-verification capacity was full. That last
694
+ * one is local saturation rather than a chain fault, so an operator
695
+ * diagnosing it should check this service before the RPC endpoint.
696
+ *
697
+ * A rejected signature is 401, and so is a contract that rejects by
698
+ * REVERTING: that is the wallet answering "no", not a failure to ask.
622
699
  */
623
700
  post: operations["verify_signature"];
624
701
  delete?: never;
@@ -627,6 +704,180 @@ export interface paths {
627
704
  patch?: never;
628
705
  trace?: never;
629
706
  };
707
+ "/api/v1/buildercodes/config": {
708
+ parameters: {
709
+ query?: never;
710
+ header?: never;
711
+ path?: never;
712
+ cookie?: never;
713
+ };
714
+ /**
715
+ * Get your BuilderCodes program configuration
716
+ * @description Read this application's BuilderCodes program state.
717
+ *
718
+ * The application is taken from the authenticated session; there is no
719
+ * application id in the request. The caller must be the application's
720
+ * configured payout wallet. This method is gated by `buildercodes_enabled`
721
+ * like the rest of the service.
722
+ */
723
+ get: operations["get_buildercodes_config"];
724
+ put?: never;
725
+ post?: never;
726
+ delete?: never;
727
+ options?: never;
728
+ head?: never;
729
+ patch?: never;
730
+ trace?: never;
731
+ };
732
+ "/api/v1/buildercodes/payouts": {
733
+ parameters: {
734
+ query?: never;
735
+ header?: never;
736
+ path?: never;
737
+ cookie?: never;
738
+ };
739
+ /**
740
+ * List your per-trade BuilderCodes earnings
741
+ * @description List this application's per-trade BuilderCodes earnings.
742
+ *
743
+ * Newest credits are returned first. The application is taken from the
744
+ * authenticated session and cannot be selected by the caller.
745
+ */
746
+ get: operations["list_buildercode_payouts"];
747
+ put?: never;
748
+ post?: never;
749
+ delete?: never;
750
+ options?: never;
751
+ head?: never;
752
+ patch?: never;
753
+ trace?: never;
754
+ };
755
+ "/api/v1/buildercodes/payouts/summary": {
756
+ parameters: {
757
+ query?: never;
758
+ header?: never;
759
+ path?: never;
760
+ cookie?: never;
761
+ };
762
+ /**
763
+ * Summarize your BuilderCodes earnings
764
+ * @description Summarize this application's BuilderCodes earnings by token.
765
+ *
766
+ * Amounts stay separated by token because they are RAW atomic units. The
767
+ * application is taken from the authenticated session.
768
+ */
769
+ get: operations["get_buildercode_payout_summary"];
770
+ put?: never;
771
+ post?: never;
772
+ delete?: never;
773
+ options?: never;
774
+ head?: never;
775
+ patch?: never;
776
+ trace?: never;
777
+ };
778
+ "/api/v1/buildercodes/rewards/balance": {
779
+ parameters: {
780
+ query?: never;
781
+ header?: never;
782
+ path?: never;
783
+ cookie?: never;
784
+ };
785
+ /**
786
+ * Get your accrued BuilderCodes balance
787
+ * @description Read the caller's accrued BuilderCodes reward-bucket balances.
788
+ *
789
+ * The bucket is derived from the authenticated wallet under the reserved
790
+ * BuilderCodes application. Current enrollment is not required, so a former
791
+ * payout wallet can still inspect and claim what it accrued. Returns an empty
792
+ * list when no payout bucket or non-zero balance exists.
793
+ */
794
+ get: operations["get_buildercode_rewards_balance"];
795
+ put?: never;
796
+ post?: never;
797
+ delete?: never;
798
+ options?: never;
799
+ head?: never;
800
+ patch?: never;
801
+ trace?: never;
802
+ };
803
+ "/api/v1/buildercodes/rewards/claim": {
804
+ parameters: {
805
+ query?: never;
806
+ header?: never;
807
+ path?: never;
808
+ cookie?: never;
809
+ };
810
+ get?: never;
811
+ put?: never;
812
+ /**
813
+ * Claim accrued BuilderCodes payout balance
814
+ * @description Claim accrued BuilderCodes payout balance.
815
+ *
816
+ * Move accrued BuilderCodes payout balance from your reserved payout bucket
817
+ * into a trading balance under the authenticated application, making it
818
+ * withdrawable through the ordinary withdrawal flow. Ledger-only (one shared
819
+ * vault + one backend ledger) — no on-chain transaction and no gas.
820
+ *
821
+ * The bucket is resolved from the AUTHENTICATED caller's own wallet address,
822
+ * never from the request body, so a caller can only ever claim their own
823
+ * accrued balance. A wallet that has never been an enrolled frontend's payout
824
+ * address simply has an empty bucket. A wallet that USED to be a payout
825
+ * address keeps whatever it accrued back then and can still claim it —
826
+ * payout-address changes are not retroactive, so current enrollment is
827
+ * deliberately not required.
828
+ *
829
+ * The payout wallet may be an EOA or a smart-contract wallet. An EOA answers
830
+ * Monaco's signature challenge directly. A contract wallet — a multisig such
831
+ * as a Safe — holds no private key and cannot, so it authenticates by EIP-1271
832
+ * contract signature instead: Monaco asks the wallet contract whether it
833
+ * accepts the challenge. That path is deliberately narrow. It is offered only
834
+ * to a wallet that holds a BuilderCodes payout bucket, only while the
835
+ * `contract_wallet_auth_enabled` flag is on, and only where the deployment has
836
+ * a chain RPC endpoint configured. While any of those is not met, login is
837
+ * EOA-only and a contract payout wallet can neither call this endpoint nor
838
+ * withdraw afterwards, so its accrued share stays unclaimable.
839
+ *
840
+ * Delegated-agent sessions are refused: a delegated grant conveys only
841
+ * order-management authority, and this claim converts reserved balance into a
842
+ * tradeable one. The refusal happens before the feature check, so a delegated
843
+ * caller is refused whether or not BuilderCodes is enabled.
844
+ *
845
+ * Transport contracts differ, and this comment is emitted into the generated
846
+ * gRPC SDK where HTTP statuses do not exist. An insufficient payout balance
847
+ * is **HTTP 409** on REST and **FAILED_PRECONDITION** on gRPC; a refused
848
+ * caller (delegated session, or BuilderCodes disabled) is **HTTP 403** on
849
+ * REST and **PERMISSION_DENIED** on gRPC.
850
+ *
851
+ * A claim can also fail as **HTTP 503** / **UNAVAILABLE** when the matching
852
+ * engine is unreachable, restarting, or slow to answer. Treat that as an
853
+ * UNKNOWN outcome, NOT a rejection. The request is admitted to the sequencer
854
+ * before its reply is sent, so a claim that timed out in transit may still
855
+ * commit, and there is no idempotency key — a blind retry can claim a SECOND
856
+ * time. Do NOT retry automatically, and do not settle it with a balance
857
+ * read: an admitted claim can still be sitting in the sequencer queue when
858
+ * the balance is read, so an unchanged balance does not prove the claim will
859
+ * not commit. Treat the claim as PENDING rather than failed, re-check once
860
+ * the engine is healthy again, and reconcile before issuing another claim.
861
+ *
862
+ * Not every 503 is ambiguous, and the safe ones are tagged. TWO outcomes are
863
+ * refused BEFORE the claim can be admitted to the sequencer, so they left no
864
+ * durable-log or state footprint and definitely committed nothing. One is a
865
+ * deliberate maintenance block, where REST carries
866
+ * `"error": "OPERATIONS_BLOCKED"` and gRPC tags the status with
867
+ * `x-maintenance-blocked: true`. The other is a sequencer admission rejection
868
+ * when the engine is saturated, where REST carries `"code": "OVERLOADED"` and
869
+ * gRPC carries the same code in the status' error details. Both are safe to
870
+ * retry with backoff, and an overload positively wants one. Only an UNTAGGED
871
+ * availability failure — matching-engine transport, timeout and fail-closed
872
+ * paths — carries the unknown outcome.
873
+ */
874
+ post: operations["claim_buildercode_rewards"];
875
+ delete?: never;
876
+ options?: never;
877
+ head?: never;
878
+ patch?: never;
879
+ trace?: never;
880
+ };
630
881
  "/api/v1/delegated-agents": {
631
882
  parameters: {
632
883
  query?: never;
@@ -2869,6 +3120,12 @@ export interface components {
2869
3120
  clientOrderId?: string | null;
2870
3121
  /** @description Optional submission identity, distinct from clientOrderId. Use 1-64 characters from [A-Za-z0-9._:-], without whitespace. Scoped to your authenticated user/subaccount and application, shared by create and batch-create items. Retrying the same key and normalized order payload within 24 hours of the original acceptance returns the original committed submission result, even after a fill or cancellation, without executing again. A full response cache does not prevent new keyed submissions: durable responses may be evicted while exact key history remains retained. If response capacity is protected by pending durability or persistence, a new key is refused with ORDER_SUBMISSION_CAPACITY_EXCEEDED. A retry whose original response cannot currently be retrieved returns ORDER_SUBMISSION_UNAVAILABLE and never executes again. Both are HTTP 503 / gRPC UNAVAILABLE, or per-item errors in batches. Retry the same key and payload; for previously accepted keys, stay within 24 hours of the original acceptance. A capacity refusal does not accept or reserve a new key. Different payload returns IDEMPOTENCY_KEY_CONFLICT (HTTP 409 / gRPC ALREADY_EXISTS; per-item error in batches). Validation failures before acceptance do not reserve the key. The window does not extend on retries; after it expires the key may execute a new order, so never retry an unresolved submission after 24 hours. Generate a fresh key for each intended new order and retain it across transport retries. Without a key, a timeout or 5xx leaves the outcome unknown and must not be blindly retried. */
2871
3122
  idempotencyKey?: string | null;
3123
+ /**
3124
+ * @description Per-order self-trade-prevention override: how the engine resolves this order matching against one of your own resting orders (your whole wallet family, subaccounts included; the incoming order's mode governs the step and resting orders' modes are never consulted). CANCEL_MAKER cancels each of your resting orders encountered and keeps matching. CANCEL_TAKER fills third-party liquidity up to the first self-touch, then cancels the incoming order's remainder — a zero-fill CANCELLED outcome is possible. CANCEL_BOTH additionally cancels the encountered resting orders. SKIP trades around your resting orders; a remainder that would rest crossing one of your surviving orders is cancelled instead of resting. Omitted, your wallet's configured default applies, else the platform default CANCEL_MAKER. STP cancellations carry terminalReason SELF_TRADE_PREVENTION and stpCounterpartyOrderId on reads and WebSocket events. With time_in_force FOK: CANCEL_MAKER cancels your makers first and then fills or kills; CANCEL_TAKER and SKIP cancel the whole order when self is in the fill path; CANCEL_BOTH fails only this item with a per-item SELF_TRADE_NOT_ALLOWED error — the batch itself still returns 2xx / OK. An unknown value likewise fails only this item, with error.code INVALID_SELF_TRADE_PREVENTION_MODE. The requested value is echoed back as selfTradePreventionMode on order reads, absent when omitted here.
3125
+ * @example CANCEL_TAKER
3126
+ * @enum {string|null}
3127
+ */
3128
+ selfTradePreventionMode?: "CANCEL_MAKER" | "CANCEL_TAKER" | "CANCEL_BOTH" | "SKIP" | null;
2872
3129
  };
2873
3130
  BatchCreateOrdersRequest: {
2874
3131
  orders: components["schemas"]["BatchCreateOrderItem"][];
@@ -2948,6 +3205,12 @@ export interface components {
2948
3205
  * @example quote-btc-1130-a
2949
3206
  */
2950
3207
  clientOrderId?: string | null;
3208
+ /**
3209
+ * @description Per-order self-trade-prevention override for the replacement: CANCEL_MAKER, CANCEL_TAKER, CANCEL_BOTH, or SKIP (see the create-order field for the full semantics). A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the override. Omitted, your wallet's configured default applies, else the platform default CANCEL_MAKER. An unknown value fails only this item, with error.code INVALID_SELF_TRADE_PREVENTION_MODE. The requested value is echoed back as selfTradePreventionMode on order reads, absent when omitted here.
3210
+ * @example CANCEL_TAKER
3211
+ * @enum {string|null}
3212
+ */
3213
+ selfTradePreventionMode?: "CANCEL_MAKER" | "CANCEL_TAKER" | "CANCEL_BOTH" | "SKIP" | null;
2951
3214
  };
2952
3215
  BatchReplaceOrdersRequest: {
2953
3216
  orders: components["schemas"]["BatchReplaceOrderItem"][];
@@ -2990,6 +3253,73 @@ export interface components {
2990
3253
  matchResult?: components["schemas"]["MatchResult"];
2991
3254
  error?: components["schemas"]["BatchReplaceError"];
2992
3255
  };
3256
+ BuildercodePayout: {
3257
+ /**
3258
+ * Format: uuid
3259
+ * @description Trade that generated this credit.
3260
+ */
3261
+ tradeId?: string | null;
3262
+ /**
3263
+ * @description Application payout address at credit time.
3264
+ * @example 0x0000000000000000000000000000000000000001
3265
+ */
3266
+ payoutAddress?: string | null;
3267
+ /**
3268
+ * @description Credit token contract address.
3269
+ * @example 0x0000000000000000000000000000000000000002
3270
+ */
3271
+ token?: string | null;
3272
+ /**
3273
+ * @description Credited amount in RAW atomic units of the token.
3274
+ * @example 1000000
3275
+ */
3276
+ amount?: string | null;
3277
+ /**
3278
+ * Format: int32
3279
+ * @description Realized whole-basis-point rate for this credit after the Monaco-floor clamp, computed from the credited amount divided by the gross protocol take and truncated down. This can be lower than the configured BuilderCodes budget.
3280
+ * @example 1000
3281
+ */
3282
+ appliedBps?: number | null;
3283
+ /**
3284
+ * Format: date-time
3285
+ * @description RFC 3339 credit timestamp.
3286
+ */
3287
+ createdAt?: string | null;
3288
+ };
3289
+ BuildercodePayoutTokenTotal: {
3290
+ /**
3291
+ * @description Credit token contract address.
3292
+ * @example 0x0000000000000000000000000000000000000002
3293
+ */
3294
+ token?: string | null;
3295
+ /**
3296
+ * @description Summed credits in RAW atomic units of this token.
3297
+ * @example 5000000
3298
+ */
3299
+ totalAmount?: string | null;
3300
+ /**
3301
+ * Format: int64
3302
+ * @description Number of credits included in this token total.
3303
+ */
3304
+ payoutCount?: number | null;
3305
+ /**
3306
+ * Format: date-time
3307
+ * @description RFC 3339 timestamp of this token's newest credit.
3308
+ */
3309
+ lastCreditedAt?: string | null;
3310
+ };
3311
+ BuildercodeRewardsBalance: {
3312
+ /**
3313
+ * @description Reward token contract address.
3314
+ * @example 0x0000000000000000000000000000000000000002
3315
+ */
3316
+ token?: string | null;
3317
+ /**
3318
+ * @description Available BuilderCodes reward balance in RAW atomic units.
3319
+ * @example 1200000
3320
+ */
3321
+ available?: string | null;
3322
+ };
2993
3323
  CancelConditionalOrderResponse: {
2994
3324
  /**
2995
3325
  * Format: uuid
@@ -3165,6 +3495,30 @@ export interface components {
3165
3495
  */
3166
3496
  reason?: string | null;
3167
3497
  };
3498
+ ClaimBuildercodeRewardsRequest: {
3499
+ /**
3500
+ * @description Payout token contract address (0x-prefixed) to claim. BuilderCodes shares accrue in the quote token of the traded pair.
3501
+ * @example 0x0000000000000000000000000000000000000002
3502
+ */
3503
+ token: string;
3504
+ /**
3505
+ * @description Amount to claim, in RAW atomic units of the token. Must be positive and no greater than the accrued payout balance.
3506
+ * @example 1000000
3507
+ */
3508
+ amount: string;
3509
+ };
3510
+ ClaimBuildercodeRewardsResponse: {
3511
+ /**
3512
+ * @description Your BuilderCodes payout-bucket balance after the claim, RAW atomic units.
3513
+ * @example 0
3514
+ */
3515
+ payoutBalance?: string | null;
3516
+ /**
3517
+ * @description Your trading balance for the token after the claim, RAW atomic units.
3518
+ * @example 1000000
3519
+ */
3520
+ tradingBalance?: string | null;
3521
+ };
3168
3522
  ClosePositionRequest: {
3169
3523
  quantity?: string | null;
3170
3524
  closeType?: string | null;
@@ -3383,6 +3737,12 @@ export interface components {
3383
3737
  clientOrderId?: string | null;
3384
3738
  /** @description Optional submission identity, distinct from clientOrderId. Use 1-64 characters from [A-Za-z0-9._:-], without whitespace. Scoped to your authenticated user/subaccount and application, shared by create and batch-create items. Retrying the same key and normalized order payload within 24 hours of the original acceptance returns the original committed submission result, even after a fill or cancellation, without executing again. A full response cache does not prevent new keyed submissions: durable responses may be evicted while exact key history remains retained. If response capacity is protected by pending durability or persistence, a new key is refused with ORDER_SUBMISSION_CAPACITY_EXCEEDED. A retry whose original response cannot currently be retrieved returns ORDER_SUBMISSION_UNAVAILABLE and never executes again. Both are HTTP 503 / gRPC UNAVAILABLE, or per-item errors in batches. Retry the same key and payload; for previously accepted keys, stay within 24 hours of the original acceptance. A capacity refusal does not accept or reserve a new key. Different payload returns IDEMPOTENCY_KEY_CONFLICT (HTTP 409 / gRPC ALREADY_EXISTS; per-item error in batches). Validation failures before acceptance do not reserve the key. The window does not extend on retries; after it expires the key may execute a new order, so never retry an unresolved submission after 24 hours. Generate a fresh key for each intended new order and retain it across transport retries. Without a key, a timeout or 5xx leaves the outcome unknown and must not be blindly retried. */
3385
3739
  idempotencyKey?: string | null;
3740
+ /**
3741
+ * @description Per-order self-trade-prevention override: how the engine resolves this order matching against one of your own resting orders (your whole wallet family, subaccounts included; the incoming order's mode governs the step and resting orders' modes are never consulted). CANCEL_MAKER cancels each of your resting orders encountered and keeps matching. CANCEL_TAKER fills third-party liquidity up to the first self-touch, then cancels the incoming order's remainder — a zero-fill CANCELLED outcome is possible. CANCEL_BOTH additionally cancels the encountered resting orders. SKIP trades around your resting orders; a remainder that would rest crossing one of your surviving orders is cancelled instead of resting. Omitted, your wallet's configured default applies, else the platform default CANCEL_MAKER. STP cancellations carry terminalReason SELF_TRADE_PREVENTION and stpCounterpartyOrderId on reads and WebSocket events. With time_in_force FOK: CANCEL_MAKER cancels your makers first and then fills or kills; CANCEL_TAKER and SKIP cancel the whole order when self is in the fill path; CANCEL_BOTH rejects the placement with SELF_TRADE_NOT_ALLOWED. The requested value is echoed back as selfTradePreventionMode on order reads, absent when omitted here.
3742
+ * @example CANCEL_TAKER
3743
+ * @enum {string|null}
3744
+ */
3745
+ selfTradePreventionMode?: "CANCEL_MAKER" | "CANCEL_TAKER" | "CANCEL_BOTH" | "SKIP" | null;
3386
3746
  };
3387
3747
  CreateOrderResponse: {
3388
3748
  /**
@@ -4003,6 +4363,46 @@ export interface components {
4003
4363
  */
4004
4364
  totalPages?: number | null;
4005
4365
  };
4366
+ GetBuildercodePayoutSummaryResponse: {
4367
+ /**
4368
+ * Format: int64
4369
+ * @description Total credit count across every token.
4370
+ */
4371
+ totalPayouts?: number | null;
4372
+ /**
4373
+ * Format: date-time
4374
+ * @description RFC 3339 timestamp of the newest credit, or null when none exists.
4375
+ */
4376
+ lastCreditedAt?: string | null;
4377
+ /** @description Per-token earnings totals. Empty when this application has no payouts. */
4378
+ byToken?: components["schemas"]["BuildercodePayoutTokenTotal"][] | null;
4379
+ };
4380
+ GetBuildercodeRewardsBalanceResponse: {
4381
+ /** @description One entry per reward token with a non-zero available balance. */
4382
+ balances?: components["schemas"]["BuildercodeRewardsBalance"][] | null;
4383
+ };
4384
+ GetBuildercodesConfigResponse: {
4385
+ /**
4386
+ * Format: uuid
4387
+ * @description Application id derived from the authenticated session.
4388
+ */
4389
+ applicationId?: string | null;
4390
+ /** @description Whether this application is currently enrolled in BuilderCodes. */
4391
+ enrolled?: boolean | null;
4392
+ /**
4393
+ * @description Current lowercase-normalized payout address, or null when none is configured.
4394
+ * @example 0x0000000000000000000000000000000000000001
4395
+ */
4396
+ payoutAddress?: string | null;
4397
+ /** @description Current BuilderCodes feature-flag state. Successful responses are true because this endpoint is gated by the flag. */
4398
+ buildercodesEnabled?: boolean | null;
4399
+ /**
4400
+ * Format: uint32
4401
+ * @description Target BuilderCodes share in basis points, computed from the fill's gross non-negative Monaco protocol take and capped by the remainder after Monaco's floor.
4402
+ * @example 1000
4403
+ */
4404
+ buildercodesBudgetBps?: number | null;
4405
+ };
4006
4406
  /** @description OHLCV candlestick data. */
4007
4407
  GetCandlesResponse: {
4008
4408
  candles?: components["schemas"]["Candle"][] | null;
@@ -4598,6 +4998,12 @@ export interface components {
4598
4998
  * @example 918342
4599
4999
  */
4600
5000
  version?: number | null;
5001
+ /**
5002
+ * @description The per-order self-trade-prevention override REQUESTED when this order was placed or replaced: CANCEL_MAKER, CANCEL_TAKER, CANCEL_BOTH, or SKIP. Absent when the order carried no override — including every order placed before the field was accepted on write — even though a wallet or platform default still governed its matching. This echoes the request, not the resolved default.
5003
+ * @example CANCEL_TAKER
5004
+ * @enum {string|null}
5005
+ */
5006
+ selfTradePreventionMode?: "CANCEL_MAKER" | "CANCEL_TAKER" | "CANCEL_BOTH" | "SKIP" | null;
4601
5007
  };
4602
5008
  /** @description Orderbook snapshot with token metadata and sequence number. */
4603
5009
  GetOrderbookResponse: {
@@ -4966,6 +5372,12 @@ export interface components {
4966
5372
  * partial.
4967
5373
  */
4968
5374
  cumFees?: string | null;
5375
+ /**
5376
+ * Format: int64
5377
+ * @description Opaque, non-negative producer-owned version for this position row. Compare only within the same position; higher is newer. 0 is the unranked legacy sentinel and never participates in ordering: treat it exactly as an absent version and fall back to a full field comparison rather than ranking it as oldest. It advances on sequenced position mutations (open, add, reduce, close, funding, margin transfer, liquidation, ADL) and is shared by the persisted read, the WebSocket positions snapshot and a RANKED live position_update frame. A live frame is ranked only when it is a faithful projection of the row persisted at that sequence: in practice the fills that leave a position open. Frames that re-read live risk state after sequencing (funding, margin_added/margin_reduced) and terminal frames (which report size 0 and LIQUIDATED, while the stored row keeps its size and records CLOSED) omit the version even though the mutation did advance the persisted one, so an absent version never implies that nothing was persisted. mark_price, unrealized_pnl, liquidation_price and leverage are UNVERSIONED valuation fields re-derived from the oracle mark on every frame: the version does not advance for them (a valuation-only oracle tick persists nothing; a state-transitioning one, a breach or recovery, does restamp the account's open positions), so the merge rule is per field group — on an equal version skip the versioned fields but still take those four from the newer payload, because discarding a whole payload on an equal version freezes displayed PnL. isolated_margin is the one exception among the versioned fields: the WebSocket positions snapshot overlays it from an independent live matching-engine read rather than the versioned row, so take it from the newest payload on an equal version too or a consumer can retain stale backing. A response served from live matching-engine state reports 0 (unranked): the engine holds the state but not the version.
5378
+ * @example 918342
5379
+ */
5380
+ version?: number | null;
4969
5381
  };
4970
5382
  GetPositionRiskResponse: {
4971
5383
  positionId?: string | null;
@@ -5559,6 +5971,30 @@ export interface components {
5559
5971
  */
5560
5972
  totalPages?: number | null;
5561
5973
  };
5974
+ ListBuildercodePayoutsResponse: {
5975
+ /** @description Per-trade credits, newest first. */
5976
+ payouts?: components["schemas"]["BuildercodePayout"][] | null;
5977
+ /**
5978
+ * Format: uint32
5979
+ * @description Total payout rows for this application.
5980
+ */
5981
+ total?: number | null;
5982
+ /**
5983
+ * Format: uint32
5984
+ * @description Current page number.
5985
+ */
5986
+ page?: number | null;
5987
+ /**
5988
+ * Format: uint32
5989
+ * @description Items per page.
5990
+ */
5991
+ pageSize?: number | null;
5992
+ /**
5993
+ * Format: uint32
5994
+ * @description Total number of pages.
5995
+ */
5996
+ totalPages?: number | null;
5997
+ };
5562
5998
  ListConditionalOrdersResponse: {
5563
5999
  orders?: components["schemas"]["ConditionalOrder"][] | null;
5564
6000
  /** Format: uint32 */
@@ -6444,6 +6880,12 @@ export interface components {
6444
6880
  * partial.
6445
6881
  */
6446
6882
  cumFees?: string | null;
6883
+ /**
6884
+ * Format: int64
6885
+ * @description Opaque, non-negative producer-owned version for this position row. Compare only within the same position; higher is newer. 0 is the unranked legacy sentinel and never participates in ordering: it means the row predates this field or came from a producer that does not stamp it, so treat it exactly as an absent version and fall back to a full field comparison rather than ranking it as oldest. It advances on sequenced position mutations (open, add, reduce, close, funding, margin transfer, liquidation, ADL) and is shared by the persisted read, the WebSocket positions snapshot and a RANKED live position_update frame. A live frame is ranked only when it is a faithful projection of the row persisted at that sequence: in practice the fills that leave a position open. Frames that re-read live risk state after sequencing (funding, margin_added/margin_reduced) and terminal frames (which report size 0 and LIQUIDATED, while the stored row keeps its size and records CLOSED) omit the version even though the mutation did advance the persisted one, so an absent version never implies that nothing was persisted. mark_price, unrealized_pnl, liquidation_price and leverage are UNVERSIONED valuation fields re-derived from the oracle mark on every frame: the version does not advance for them (a valuation-only oracle tick persists nothing; a state-transitioning one, a breach or recovery, does restamp the account's open positions), so the merge rule is per field group — on an equal version skip the versioned fields but still take those four from the newer payload, because discarding a whole payload on an equal version freezes displayed PnL. isolated_margin is the one exception among the versioned fields: the WebSocket positions snapshot overlays it from an independent live matching-engine read rather than the versioned row, so take it from the newest payload on an equal version too or a consumer can retain stale backing. A response served from live matching-engine state reports 0 (unranked): the engine holds the state but not the version.
6886
+ * @example 918342
6887
+ */
6888
+ version?: number | null;
6447
6889
  };
6448
6890
  PositionHistoryEvent: {
6449
6891
  id?: string | null;
@@ -6686,10 +7128,11 @@ export interface components {
6686
7128
  };
6687
7129
  ReplaceOrderRequest: {
6688
7130
  /**
6689
- * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: a create or replace reusing a value another of your resting orders still holds is rejected with HTTP 409 / gRPC ALREADY_EXISTS and the code CLIENT_ORDER_ID_CONFLICT. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key, though on this replace path a retry cannot double-execute: the request names the original order id, and the sequencer revalidates that original in memory and on the book at sequence time, so once the first replacement succeeds the original is gone and a retry is rejected with ORDER_NOT_FOUND rather than placing a second order. That code is itself ambiguous — the original may instead have filled or been cancelled — so the risk here is acting on a stale view, not duplicate execution. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and its fan-out is non-persistent Core NATS: the service can re-establish an ended upstream subscription without closing your socket, so events can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. A replacement carries no order type or time-in-force and its original must still be RESTING, so the post-acceptance rejection shapes are unreachable here: the reachable failures are all pre-acceptance — malformed, post-only would cross, handle conflict, or the original no longer resting (ORDER_NOT_FOUND) — and each fails the request, emits no event and is never written to order history (an order rejected AFTER acceptance is persisted with status REJECTED, so only the pre-acceptance class is absent). Where no surface is conclusive, do not resubmit. A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the handle.
6690
- * @example quote-btc-1130-a
7131
+ * @description Per-order self-trade-prevention override for the replacement: CANCEL_MAKER, CANCEL_TAKER, CANCEL_BOTH, or SKIP (see the create-order field for the full semantics). A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the override. Omitted, your wallet's configured default applies, else the platform default CANCEL_MAKER. The requested value is echoed back as selfTradePreventionMode on order reads, absent when omitted here.
7132
+ * @example CANCEL_TAKER
7133
+ * @enum {string|null}
6691
7134
  */
6692
- clientOrderId?: string | null;
7135
+ selfTradePreventionMode?: "CANCEL_MAKER" | "CANCEL_TAKER" | "CANCEL_BOTH" | "SKIP" | null;
6693
7136
  /**
6694
7137
  * @description New limit price (if changing)
6695
7138
  * @example 35500.00
@@ -6710,6 +7153,11 @@ export interface components {
6710
7153
  * @example false
6711
7154
  */
6712
7155
  postOnly?: boolean | null;
7156
+ /**
7157
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: a create or replace reusing a value another of your resting orders still holds is rejected with HTTP 409 / gRPC ALREADY_EXISTS and the code CLIENT_ORDER_ID_CONFLICT. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key, though on this replace path a retry cannot double-execute: the request names the original order id, and the sequencer revalidates that original in memory and on the book at sequence time, so once the first replacement succeeds the original is gone and a retry is rejected with ORDER_NOT_FOUND rather than placing a second order. That code is itself ambiguous — the original may instead have filled or been cancelled — so the risk here is acting on a stale view, not duplicate execution. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and its fan-out is non-persistent Core NATS: the service can re-establish an ended upstream subscription without closing your socket, so events can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. A replacement carries no order type or time-in-force and its original must still be RESTING, so the post-acceptance rejection shapes are unreachable here: the reachable failures are all pre-acceptance — malformed, post-only would cross, handle conflict, or the original no longer resting (ORDER_NOT_FOUND) — and each fails the request, emits no event and is never written to order history (an order rejected AFTER acceptance is persisted with status REJECTED, so only the pre-acceptance class is absent). Where no surface is conclusive, do not resubmit. A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the handle.
7158
+ * @example quote-btc-1130-a
7159
+ */
7160
+ clientOrderId?: string | null;
6713
7161
  };
6714
7162
  ReplaceOrderResponse: {
6715
7163
  /**
@@ -6895,6 +7343,25 @@ export interface components {
6895
7343
  */
6896
7344
  priceChangePercent?: string | null;
6897
7345
  };
7346
+ SelfTradePreventionDefaultResponse: {
7347
+ /**
7348
+ * @description The wallet's effective self-trade-prevention default: `CANCEL_MAKER`, `CANCEL_TAKER`, `CANCEL_BOTH`, or `SKIP`.
7349
+ * @example CANCEL_MAKER
7350
+ */
7351
+ mode?: string | null;
7352
+ /**
7353
+ * @description True when this wallet has explicitly set a default; false when the platform default (`CANCEL_MAKER`) is in effect.
7354
+ * @example false
7355
+ */
7356
+ isCustom?: boolean | null;
7357
+ };
7358
+ SetSelfTradePreventionDefaultRequest: {
7359
+ /**
7360
+ * @description The self-trade-prevention mode applied when an order from this wallet would match the wallet family's own resting order and the order names no override: `CANCEL_MAKER` (cancel the resting order — the platform default), `CANCEL_TAKER` (cancel the incoming order), `CANCEL_BOTH`, or `SKIP` (trade around own orders). Input is case-insensitive.
7361
+ * @example SKIP
7362
+ */
7363
+ mode: string;
7364
+ };
6898
7365
  SetTraderCodeRequest: {
6899
7366
  /**
6900
7367
  * @description The custom handle to claim or edit to: `[A-Za-z0-9_]`, must start with a letter, 5–20 characters. Case is preserved on store; uniqueness is case-insensitive.
@@ -7963,7 +8430,7 @@ export interface components {
7963
8430
  */
7964
8431
  address: string;
7965
8432
  /**
7966
- * @description Wallet signature over the challenge message
8433
+ * @description Wallet authorization of the challenge message, hex with an optional 0x prefix. An EOA sends a 65-byte EIP-191 signature; a contract wallet verified under EIP-1271 sends whatever its own contract accepts, which is usually longer and need not be 65 bytes. Capped at 8192 decoded bytes (16386 characters with the prefix) — enough for well over a hundred owner slots — and a longer value is rejected as an invalid signature rather than forwarded to the chain.
7967
8434
  * @example 0x1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0
7968
8435
  */
7969
8436
  signature: string;
@@ -8707,7 +9174,7 @@ export interface operations {
8707
9174
  };
8708
9175
  };
8709
9176
  };
8710
- list_sub_accounts_with_balances: {
9177
+ get_self_trade_prevention_default: {
8711
9178
  parameters: {
8712
9179
  query?: never;
8713
9180
  header?: never;
@@ -8722,12 +9189,98 @@ export interface operations {
8722
9189
  [name: string]: unknown;
8723
9190
  };
8724
9191
  content: {
8725
- "application/json": components["schemas"]["ListSubAccountsResponse"];
9192
+ "application/json": components["schemas"]["SelfTradePreventionDefaultResponse"];
8726
9193
  };
8727
9194
  };
8728
- /** @description Invalid request */
8729
- 400: {
8730
- headers: {
9195
+ /** @description Authentication required */
9196
+ 401: {
9197
+ headers: {
9198
+ [name: string]: unknown;
9199
+ };
9200
+ content?: never;
9201
+ };
9202
+ /** @description Internal server error */
9203
+ 500: {
9204
+ headers: {
9205
+ [name: string]: unknown;
9206
+ };
9207
+ content?: never;
9208
+ };
9209
+ };
9210
+ };
9211
+ set_self_trade_prevention_default: {
9212
+ parameters: {
9213
+ query?: never;
9214
+ header?: never;
9215
+ path?: never;
9216
+ cookie?: never;
9217
+ };
9218
+ requestBody: {
9219
+ content: {
9220
+ "application/json": components["schemas"]["SetSelfTradePreventionDefaultRequest"];
9221
+ };
9222
+ };
9223
+ responses: {
9224
+ /** @description OK */
9225
+ 200: {
9226
+ headers: {
9227
+ [name: string]: unknown;
9228
+ };
9229
+ content: {
9230
+ "application/json": components["schemas"]["SelfTradePreventionDefaultResponse"];
9231
+ };
9232
+ };
9233
+ /** @description Unknown mode */
9234
+ 400: {
9235
+ headers: {
9236
+ [name: string]: unknown;
9237
+ };
9238
+ content?: never;
9239
+ };
9240
+ /** @description Authentication required */
9241
+ 401: {
9242
+ headers: {
9243
+ [name: string]: unknown;
9244
+ };
9245
+ content?: never;
9246
+ };
9247
+ /** @description Delegated-agent sessions cannot change account settings */
9248
+ 403: {
9249
+ headers: {
9250
+ [name: string]: unknown;
9251
+ };
9252
+ content?: never;
9253
+ };
9254
+ /** @description Internal server error */
9255
+ 500: {
9256
+ headers: {
9257
+ [name: string]: unknown;
9258
+ };
9259
+ content?: never;
9260
+ };
9261
+ };
9262
+ };
9263
+ list_sub_accounts_with_balances: {
9264
+ parameters: {
9265
+ query?: never;
9266
+ header?: never;
9267
+ path?: never;
9268
+ cookie?: never;
9269
+ };
9270
+ requestBody?: never;
9271
+ responses: {
9272
+ /** @description OK */
9273
+ 200: {
9274
+ headers: {
9275
+ [name: string]: unknown;
9276
+ };
9277
+ content: {
9278
+ "application/json": components["schemas"]["ListSubAccountsResponse"];
9279
+ };
9280
+ };
9281
+ /** @description Invalid request */
9282
+ 400: {
9283
+ headers: {
8731
9284
  [name: string]: unknown;
8732
9285
  };
8733
9286
  content?: never;
@@ -9606,6 +10159,276 @@ export interface operations {
9606
10159
  };
9607
10160
  content?: never;
9608
10161
  };
10162
+ /** @description Contract-wallet (EIP-1271) verification could not be completed for an eligible address: the chain did not answer, did not answer within the deadline, or the server was at its concurrent-verification capacity and declined to ask. Retryable, and not a verdict on the signature. */
10163
+ 503: {
10164
+ headers: {
10165
+ [name: string]: unknown;
10166
+ };
10167
+ content?: never;
10168
+ };
10169
+ };
10170
+ };
10171
+ get_buildercodes_config: {
10172
+ parameters: {
10173
+ query?: never;
10174
+ header?: never;
10175
+ path?: never;
10176
+ cookie?: never;
10177
+ };
10178
+ requestBody?: never;
10179
+ responses: {
10180
+ /** @description OK */
10181
+ 200: {
10182
+ headers: {
10183
+ [name: string]: unknown;
10184
+ };
10185
+ content: {
10186
+ "application/json": components["schemas"]["GetBuildercodesConfigResponse"];
10187
+ };
10188
+ };
10189
+ /** @description Authentication required */
10190
+ 401: {
10191
+ headers: {
10192
+ [name: string]: unknown;
10193
+ };
10194
+ content?: never;
10195
+ };
10196
+ /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
10197
+ 403: {
10198
+ headers: {
10199
+ [name: string]: unknown;
10200
+ };
10201
+ content?: never;
10202
+ };
10203
+ /** @description Authenticated application not found (gRPC: NOT_FOUND) */
10204
+ 404: {
10205
+ headers: {
10206
+ [name: string]: unknown;
10207
+ };
10208
+ content?: never;
10209
+ };
10210
+ /** @description Internal server error */
10211
+ 500: {
10212
+ headers: {
10213
+ [name: string]: unknown;
10214
+ };
10215
+ content?: never;
10216
+ };
10217
+ };
10218
+ };
10219
+ list_buildercode_payouts: {
10220
+ parameters: {
10221
+ query?: {
10222
+ /** @description Page number (1-indexed) */
10223
+ page?: number;
10224
+ /** @description Items per page (max 100) */
10225
+ pageSize?: number;
10226
+ };
10227
+ header?: never;
10228
+ path?: never;
10229
+ cookie?: never;
10230
+ };
10231
+ requestBody?: never;
10232
+ responses: {
10233
+ /** @description OK */
10234
+ 200: {
10235
+ headers: {
10236
+ [name: string]: unknown;
10237
+ };
10238
+ content: {
10239
+ "application/json": components["schemas"]["ListBuildercodePayoutsResponse"];
10240
+ };
10241
+ };
10242
+ /** @description Invalid pagination */
10243
+ 400: {
10244
+ headers: {
10245
+ [name: string]: unknown;
10246
+ };
10247
+ content?: never;
10248
+ };
10249
+ /** @description Authentication required */
10250
+ 401: {
10251
+ headers: {
10252
+ [name: string]: unknown;
10253
+ };
10254
+ content?: never;
10255
+ };
10256
+ /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
10257
+ 403: {
10258
+ headers: {
10259
+ [name: string]: unknown;
10260
+ };
10261
+ content?: never;
10262
+ };
10263
+ /** @description Authenticated application not found (gRPC: NOT_FOUND) */
10264
+ 404: {
10265
+ headers: {
10266
+ [name: string]: unknown;
10267
+ };
10268
+ content?: never;
10269
+ };
10270
+ /** @description Internal server error */
10271
+ 500: {
10272
+ headers: {
10273
+ [name: string]: unknown;
10274
+ };
10275
+ content?: never;
10276
+ };
10277
+ };
10278
+ };
10279
+ get_buildercode_payout_summary: {
10280
+ parameters: {
10281
+ query?: never;
10282
+ header?: never;
10283
+ path?: never;
10284
+ cookie?: never;
10285
+ };
10286
+ requestBody?: never;
10287
+ responses: {
10288
+ /** @description OK */
10289
+ 200: {
10290
+ headers: {
10291
+ [name: string]: unknown;
10292
+ };
10293
+ content: {
10294
+ "application/json": components["schemas"]["GetBuildercodePayoutSummaryResponse"];
10295
+ };
10296
+ };
10297
+ /** @description Authentication required */
10298
+ 401: {
10299
+ headers: {
10300
+ [name: string]: unknown;
10301
+ };
10302
+ content?: never;
10303
+ };
10304
+ /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
10305
+ 403: {
10306
+ headers: {
10307
+ [name: string]: unknown;
10308
+ };
10309
+ content?: never;
10310
+ };
10311
+ /** @description Authenticated application not found (gRPC: NOT_FOUND) */
10312
+ 404: {
10313
+ headers: {
10314
+ [name: string]: unknown;
10315
+ };
10316
+ content?: never;
10317
+ };
10318
+ /** @description Internal server error */
10319
+ 500: {
10320
+ headers: {
10321
+ [name: string]: unknown;
10322
+ };
10323
+ content?: never;
10324
+ };
10325
+ };
10326
+ };
10327
+ get_buildercode_rewards_balance: {
10328
+ parameters: {
10329
+ query?: never;
10330
+ header?: never;
10331
+ path?: never;
10332
+ cookie?: never;
10333
+ };
10334
+ requestBody?: never;
10335
+ responses: {
10336
+ /** @description OK */
10337
+ 200: {
10338
+ headers: {
10339
+ [name: string]: unknown;
10340
+ };
10341
+ content: {
10342
+ "application/json": components["schemas"]["GetBuildercodeRewardsBalanceResponse"];
10343
+ };
10344
+ };
10345
+ /** @description Authentication required */
10346
+ 401: {
10347
+ headers: {
10348
+ [name: string]: unknown;
10349
+ };
10350
+ content?: never;
10351
+ };
10352
+ /** @description Refused: BuilderCodes is disabled or the caller is delegated (gRPC: PERMISSION_DENIED) */
10353
+ 403: {
10354
+ headers: {
10355
+ [name: string]: unknown;
10356
+ };
10357
+ content?: never;
10358
+ };
10359
+ /** @description Internal server error */
10360
+ 500: {
10361
+ headers: {
10362
+ [name: string]: unknown;
10363
+ };
10364
+ content?: never;
10365
+ };
10366
+ };
10367
+ };
10368
+ claim_buildercode_rewards: {
10369
+ parameters: {
10370
+ query?: never;
10371
+ header?: never;
10372
+ path?: never;
10373
+ cookie?: never;
10374
+ };
10375
+ requestBody: {
10376
+ content: {
10377
+ "application/json": components["schemas"]["ClaimBuildercodeRewardsRequest"];
10378
+ };
10379
+ };
10380
+ responses: {
10381
+ /** @description OK */
10382
+ 200: {
10383
+ headers: {
10384
+ [name: string]: unknown;
10385
+ };
10386
+ content: {
10387
+ "application/json": components["schemas"]["ClaimBuildercodeRewardsResponse"];
10388
+ };
10389
+ };
10390
+ /** @description Invalid token or amount */
10391
+ 400: {
10392
+ headers: {
10393
+ [name: string]: unknown;
10394
+ };
10395
+ content?: never;
10396
+ };
10397
+ /** @description Authentication required */
10398
+ 401: {
10399
+ headers: {
10400
+ [name: string]: unknown;
10401
+ };
10402
+ content?: never;
10403
+ };
10404
+ /** @description Refused: BuilderCodes is not enabled, or the caller is a delegated-agent session (gRPC: PERMISSION_DENIED) */
10405
+ 403: {
10406
+ headers: {
10407
+ [name: string]: unknown;
10408
+ };
10409
+ content?: never;
10410
+ };
10411
+ /** @description Insufficient BuilderCodes payout balance, including a wallet that never accrued one (gRPC: FAILED_PRECONDITION) */
10412
+ 409: {
10413
+ headers: {
10414
+ [name: string]: unknown;
10415
+ };
10416
+ content?: never;
10417
+ };
10418
+ /** @description Internal server error */
10419
+ 500: {
10420
+ headers: {
10421
+ [name: string]: unknown;
10422
+ };
10423
+ content?: never;
10424
+ };
10425
+ /** @description Matching engine unavailable or slow to answer. Outcome UNKNOWN, not a rejection — the claim may still commit and there is no idempotency key, so treat it as pending and do not retry automatically; a balance read does not settle it, because an admitted claim may still be queued. Two tagged cases are the exception, both refused before the claim can be admitted and so provably non-committing, and both safe to retry: a maintenance block (`error: OPERATIONS_BLOCKED`; gRPC metadata `x-maintenance-blocked: true`) and a sequencer overload (`code: OVERLOADED`) (gRPC: UNAVAILABLE) */
10426
+ 503: {
10427
+ headers: {
10428
+ [name: string]: unknown;
10429
+ };
10430
+ content?: never;
10431
+ };
9609
10432
  };
9610
10433
  };
9611
10434
  list_delegated_agents: {