@0xmonaco/types 0.8.22-develop.efb9dc9 → 0.8.22

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.
@@ -22,12 +22,9 @@ export interface AuthAPI extends BaseAPI {
22
22
  * 4. Verifies the signature, registering the session public key
23
23
  *
24
24
  * @param clientId - Client ID of the application
25
- * @param referralCode - Optional PitPass TraderCode (wallet address) of the referrer.
26
- * Passed through to the verify call so a first-time sign-up records the referral
27
- * relationship. Has no effect when the user already exists.
28
25
  * @returns Promise resolving to the authentication state (including the session keypair)
29
26
  */
30
- authenticate(clientId: string, referralCode?: string): Promise<AuthState>;
27
+ authenticate(clientId: string): Promise<AuthState>;
31
28
  /**
32
29
  * Signs a challenge message using the wallet client.
33
30
  *
@@ -57,11 +54,9 @@ export interface AuthAPI extends BaseAPI {
57
54
  * @param nonce - Nonce from the challenge response
58
55
  * @param clientId - Client ID of the application
59
56
  * @param session - The locally-generated session keypair (hex-encoded)
60
- * @param referralCode - Optional PitPass TraderCode (wallet address) of the referrer;
61
- * recorded at first sign-up only.
62
57
  * @returns Promise resolving to the authentication state
63
58
  */
64
- verifySignature(address: string, signature: string, nonce: string, clientId: string, session: SessionCredentials, referralCode?: string): Promise<AuthState>;
59
+ verifySignature(address: string, signature: string, nonce: string, clientId: string, session: SessionCredentials): Promise<AuthState>;
65
60
  /**
66
61
  * Extends the current session's expiry. The request is signed with the
67
62
  * active session key (set via {@link setSessionKeypair}).
package/dist/index.d.ts CHANGED
@@ -13,7 +13,6 @@ export * from "./faucet";
13
13
  export * from "./fees";
14
14
  export * from "./margin-accounts";
15
15
  export * from "./market";
16
- export * from "./pitpass";
17
16
  export * from "./positions";
18
17
  export * from "./profile";
19
18
  export * from "./sdk";
package/dist/index.js CHANGED
@@ -14,7 +14,6 @@ export * from "./faucet";
14
14
  export * from "./fees";
15
15
  export * from "./margin-accounts";
16
16
  export * from "./market";
17
- export * from "./pitpass";
18
17
  export * from "./positions";
19
18
  export * from "./profile";
20
19
  export * from "./sdk";
@@ -6,7 +6,6 @@ import type { FaucetAPI } from "../faucet";
6
6
  import type { FeesAPI } from "../fees";
7
7
  import type { MarginAccountsAPI } from "../margin-accounts";
8
8
  import type { Interval, MarketAPI } from "../market";
9
- import type { PitpassAPI } from "../pitpass";
10
9
  import type { PositionsAPI } from "../positions";
11
10
  import type { ProfileAPI } from "../profile";
12
11
  import type { SubAccountsAPI } from "../sub-accounts";
@@ -82,8 +81,6 @@ export interface MonacoSDK {
82
81
  positions: PositionsAPI;
83
82
  /** Sub-account management API */
84
83
  subAccounts: SubAccountsAPI;
85
- /** PitPass TraderCode referral and rewards API */
86
- pitpass: PitpassAPI;
87
84
  /** Testnet faucet API */
88
85
  faucet: FaucetAPI;
89
86
  /** Public whitelist (waitlist) submission API */
@@ -10,6 +10,6 @@
10
10
  * hand-written SDK surface. CI regenerates it and fails on a diff, identical to
11
11
  * the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
12
12
  */
13
- export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "authenticate_backend", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_conditional_order", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_chart", "get_portfolio_stats", "get_position", "get_position_pnl_history", "get_position_risk", "get_rewards_balance", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trader_code_info", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
13
+ export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "authenticate_backend", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_conditional_order", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_chart", "get_portfolio_stats", "get_position", "get_position_pnl_history", "get_position_risk", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
14
14
  /** Union of every OpenAPI operationId in the spec. */
15
15
  export type OperationId = (typeof OPERATION_IDS)[number];
@@ -41,7 +41,6 @@ export const OPERATION_IDS = [
41
41
  "get_market_metadata",
42
42
  "get_market_stats",
43
43
  "get_my_fee_tier",
44
- "get_my_trader_code",
45
44
  "get_open_interest",
46
45
  "get_order_by_id",
47
46
  "get_orderbook_snapshot",
@@ -55,11 +54,9 @@ export const OPERATION_IDS = [
55
54
  "get_position",
56
55
  "get_position_pnl_history",
57
56
  "get_position_risk",
58
- "get_rewards_balance",
59
57
  "get_screener",
60
58
  "get_sub_account_limits",
61
59
  "get_trade_by_id",
62
- "get_trader_code_info",
63
60
  "get_trades",
64
61
  "get_trading_pair_by_id",
65
62
  "get_user_balance_by_asset",
@@ -101,7 +98,6 @@ export const OPERATION_IDS = [
101
98
  "transfer_collateral_to_margin_account",
102
99
  "transfer_collateral_to_parent_margin_account",
103
100
  "transfer_collateral_to_risk_bucket",
104
- "transfer_rewards",
105
101
  "update_sub_account_limit",
106
102
  "upsert_delegated_agent",
107
103
  "verify_signature",
@@ -1470,108 +1470,6 @@ export interface paths {
1470
1470
  patch?: never;
1471
1471
  trace?: never;
1472
1472
  };
1473
- "/api/v1/pitpass/codes/me": {
1474
- parameters: {
1475
- query?: never;
1476
- header?: never;
1477
- path?: never;
1478
- cookie?: never;
1479
- };
1480
- /**
1481
- * Get your TraderCode
1482
- * @description Claim your TraderCode.
1483
- *
1484
- * Get your TraderCode.
1485
- *
1486
- * Return the authenticated caller's TraderCode, which is derived from their
1487
- * wallet address (rendered `Monaco - <address>` by clients). Never 404s — the
1488
- * code always exists for a signed-in wallet — and ensures the backing row so
1489
- * referrals attributed to this wallet have a code to link.
1490
- */
1491
- get: operations["get_my_trader_code"];
1492
- put?: never;
1493
- post?: never;
1494
- delete?: never;
1495
- options?: never;
1496
- head?: never;
1497
- patch?: never;
1498
- trace?: never;
1499
- };
1500
- "/api/v1/pitpass/codes/{code}": {
1501
- parameters: {
1502
- query?: never;
1503
- header?: never;
1504
- path?: never;
1505
- cookie?: never;
1506
- };
1507
- /**
1508
- * Look up a TraderCode
1509
- * @description Look up a TraderCode (public).
1510
- *
1511
- * Public, unauthenticated lookup used to validate a referral code at signup.
1512
- * The code is a wallet address; returns the normalized code when it resolves
1513
- * to a known wallet. Returns 404 when the code does not resolve to a user.
1514
- */
1515
- get: operations["get_trader_code_info"];
1516
- put?: never;
1517
- post?: never;
1518
- delete?: never;
1519
- options?: never;
1520
- head?: never;
1521
- patch?: never;
1522
- trace?: never;
1523
- };
1524
- "/api/v1/pitpass/rewards/balance": {
1525
- parameters: {
1526
- query?: never;
1527
- header?: never;
1528
- path?: never;
1529
- cookie?: never;
1530
- };
1531
- /**
1532
- * Get your rewards balance
1533
- * @description Read accrued PitPass rewards balance.
1534
- *
1535
- * Return the caller's current rewards-bucket balances across all reward tokens.
1536
- * Rewards accumulate here as referred users trade; call TransferRewards to move
1537
- * them into a tradeable balance. Returns an empty list when no rewards have
1538
- * been earned yet.
1539
- */
1540
- get: operations["get_rewards_balance"];
1541
- put?: never;
1542
- post?: never;
1543
- delete?: never;
1544
- options?: never;
1545
- head?: never;
1546
- patch?: never;
1547
- trace?: never;
1548
- };
1549
- "/api/v1/pitpass/rewards/transfer": {
1550
- parameters: {
1551
- query?: never;
1552
- header?: never;
1553
- path?: never;
1554
- cookie?: never;
1555
- };
1556
- get?: never;
1557
- put?: never;
1558
- /**
1559
- * Transfer rewards into a trading balance
1560
- * @description Transfer earned rewards into a trading balance.
1561
- *
1562
- * Move spendable PitPass reward balance from your rewards bucket into a
1563
- * trading balance under the authenticated application, making it tradeable
1564
- * immediately. Ledger-only (one shared vault + one backend ledger) — no
1565
- * on-chain transaction and no gas. Fails with 402 when the rewards balance is
1566
- * insufficient.
1567
- */
1568
- post: operations["transfer_rewards"];
1569
- delete?: never;
1570
- options?: never;
1571
- head?: never;
1572
- patch?: never;
1573
- trace?: never;
1574
- };
1575
1473
  "/api/v1/positions": {
1576
1474
  parameters: {
1577
1475
  query?: never;
@@ -4034,10 +3932,6 @@ export interface components {
4034
3932
  */
4035
3933
  applicationMakerFeeBps?: number | null;
4036
3934
  };
4037
- GetRewardsBalanceResponse: {
4038
- /** @description One entry per reward token that has a non-zero available balance. */
4039
- balances?: components["schemas"]["RewardsBalanceEntry"][] | null;
4040
- };
4041
3935
  /** @description Paginated screener response sorted by quoteVolume24h desc (nulls last). */
4042
3936
  GetScreenerResponse: {
4043
3937
  items?: components["schemas"]["ScreenerItem"][] | null;
@@ -4086,10 +3980,6 @@ export interface components {
4086
3980
  */
4087
3981
  tradingMode?: string | null;
4088
3982
  };
4089
- GetTraderCodeInfoResponse: {
4090
- /** @description The resolved TraderCode (normalized wallet address) */
4091
- code?: string | null;
4092
- };
4093
3983
  /** @description Recent trades for a trading pair. */
4094
3984
  GetTradesResponse: {
4095
3985
  trades?: components["schemas"]["PublicTrade"][] | null;
@@ -5034,15 +4924,6 @@ export interface components {
5034
4924
  */
5035
4925
  message?: string | null;
5036
4926
  };
5037
- RewardsBalanceEntry: {
5038
- /** @description Reward token contract address (0x-prefixed). */
5039
- token?: string | null;
5040
- /**
5041
- * @description Available rewards balance in RAW atomic units of the token.
5042
- * @example 1200000
5043
- */
5044
- available?: string | null;
5045
- };
5046
4927
  RiskTier: {
5047
4928
  initialMarginRatio?: string | null;
5048
4929
  maintenanceMarginRatio?: string | null;
@@ -5451,15 +5332,6 @@ export interface components {
5451
5332
  */
5452
5333
  tradeId?: string | null;
5453
5334
  };
5454
- TraderCodeResponse: {
5455
- /** @description Your TraderCode — your normalized wallet address (clients render it `Monaco - <address>`). */
5456
- code?: string | null;
5457
- /**
5458
- * @description RFC 3339 timestamp when the code row was first derived
5459
- * @example 2026-07-07T18:00:00Z
5460
- */
5461
- createdAt?: string | null;
5462
- };
5463
5335
  /** @description Trading pair configuration including tokens, fees, and order limits. */
5464
5336
  TradingPairData: {
5465
5337
  /**
@@ -5660,27 +5532,6 @@ export interface components {
5660
5532
  /** @description Trading pair UUIDs selected into the cross risk bucket. Required when marginMode is CROSS. */
5661
5533
  selectedTradingPairIds?: string[] | null;
5662
5534
  };
5663
- TransferRewardsRequest: {
5664
- /** @description Reward token contract address (0x-prefixed) to transfer. */
5665
- token: string;
5666
- /**
5667
- * @description Amount to transfer, in RAW atomic units of the token.
5668
- * @example 1000000
5669
- */
5670
- amount: string;
5671
- };
5672
- TransferRewardsResponse: {
5673
- /**
5674
- * @description Your rewards-bucket balance after the transfer, RAW atomic units.
5675
- * @example 0
5676
- */
5677
- rewardsBalance?: string | null;
5678
- /**
5679
- * @description Your trading balance for the token after the transfer, RAW atomic units.
5680
- * @example 1000000
5681
- */
5682
- tradingBalance?: string | null;
5683
- };
5684
5535
  UpdateLimitRequest: {
5685
5536
  /**
5686
5537
  * Format: uuid
@@ -5833,8 +5684,6 @@ export interface components {
5833
5684
  * @example 3b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29
5834
5685
  */
5835
5686
  sessionPublicKey: string;
5836
- /** @description Optional PitPass TraderCode captured at signup (e.g. from a `?ref=CODE` link). When a user verifies for the very first time with a valid code, a referral relationship is recorded atomically. Ignored for users who already exist, and silently ignored if the code is unknown — a bad code never blocks sign-in. */
5837
- referralCode?: string | null;
5838
5687
  };
5839
5688
  VerifyResponse: {
5840
5689
  /**
@@ -8875,162 +8724,6 @@ export interface operations {
8875
8724
  };
8876
8725
  };
8877
8726
  };
8878
- get_my_trader_code: {
8879
- parameters: {
8880
- query?: never;
8881
- header?: never;
8882
- path?: never;
8883
- cookie?: never;
8884
- };
8885
- requestBody?: never;
8886
- responses: {
8887
- /** @description OK */
8888
- 200: {
8889
- headers: {
8890
- [name: string]: unknown;
8891
- };
8892
- content: {
8893
- "application/json": components["schemas"]["TraderCodeResponse"];
8894
- };
8895
- };
8896
- /** @description Authentication required */
8897
- 401: {
8898
- headers: {
8899
- [name: string]: unknown;
8900
- };
8901
- content?: never;
8902
- };
8903
- /** @description Internal server error */
8904
- 500: {
8905
- headers: {
8906
- [name: string]: unknown;
8907
- };
8908
- content?: never;
8909
- };
8910
- };
8911
- };
8912
- get_trader_code_info: {
8913
- parameters: {
8914
- query?: never;
8915
- header?: never;
8916
- path: {
8917
- code: string;
8918
- };
8919
- cookie?: never;
8920
- };
8921
- requestBody?: never;
8922
- responses: {
8923
- /** @description OK */
8924
- 200: {
8925
- headers: {
8926
- [name: string]: unknown;
8927
- };
8928
- content: {
8929
- "application/json": components["schemas"]["GetTraderCodeInfoResponse"];
8930
- };
8931
- };
8932
- /** @description Code not found */
8933
- 404: {
8934
- headers: {
8935
- [name: string]: unknown;
8936
- };
8937
- content?: never;
8938
- };
8939
- /** @description Internal server error */
8940
- 500: {
8941
- headers: {
8942
- [name: string]: unknown;
8943
- };
8944
- content?: never;
8945
- };
8946
- };
8947
- };
8948
- get_rewards_balance: {
8949
- parameters: {
8950
- query?: never;
8951
- header?: never;
8952
- path?: never;
8953
- cookie?: never;
8954
- };
8955
- requestBody?: never;
8956
- responses: {
8957
- /** @description OK */
8958
- 200: {
8959
- headers: {
8960
- [name: string]: unknown;
8961
- };
8962
- content: {
8963
- "application/json": components["schemas"]["GetRewardsBalanceResponse"];
8964
- };
8965
- };
8966
- /** @description Authentication required */
8967
- 401: {
8968
- headers: {
8969
- [name: string]: unknown;
8970
- };
8971
- content?: never;
8972
- };
8973
- /** @description Internal server error */
8974
- 500: {
8975
- headers: {
8976
- [name: string]: unknown;
8977
- };
8978
- content?: never;
8979
- };
8980
- };
8981
- };
8982
- transfer_rewards: {
8983
- parameters: {
8984
- query?: never;
8985
- header?: never;
8986
- path?: never;
8987
- cookie?: never;
8988
- };
8989
- requestBody: {
8990
- content: {
8991
- "application/json": components["schemas"]["TransferRewardsRequest"];
8992
- };
8993
- };
8994
- responses: {
8995
- /** @description OK */
8996
- 200: {
8997
- headers: {
8998
- [name: string]: unknown;
8999
- };
9000
- content: {
9001
- "application/json": components["schemas"]["TransferRewardsResponse"];
9002
- };
9003
- };
9004
- /** @description Invalid token or amount */
9005
- 400: {
9006
- headers: {
9007
- [name: string]: unknown;
9008
- };
9009
- content?: never;
9010
- };
9011
- /** @description Authentication required */
9012
- 401: {
9013
- headers: {
9014
- [name: string]: unknown;
9015
- };
9016
- content?: never;
9017
- };
9018
- /** @description Insufficient rewards balance */
9019
- 409: {
9020
- headers: {
9021
- [name: string]: unknown;
9022
- };
9023
- content?: never;
9024
- };
9025
- /** @description Internal server error */
9026
- 500: {
9027
- headers: {
9028
- [name: string]: unknown;
9029
- };
9030
- content?: never;
9031
- };
9032
- };
9033
- };
9034
8727
  list_positions: {
9035
8728
  parameters: {
9036
8729
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "0.8.22-develop.efb9dc9",
3
+ "version": "0.8.22",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "lint": "biome lint ."
21
21
  },
22
22
  "dependencies": {
23
- "@0xmonaco/contracts": "0.8.22-develop.efb9dc9",
23
+ "@0xmonaco/contracts": "0.8.22",
24
24
  "zod": "^4.1.12"
25
25
  },
26
26
  "peerDependencies": {
@@ -1,60 +0,0 @@
1
- /**
2
- * PitPass Types
3
- *
4
- * Types for PitPass TraderCode API: code lookup, rewards balance, and transfer.
5
- */
6
- import type { BaseAPI } from "../api";
7
- import type { GetRewardsBalanceResponse, TraderCodeInfoResponse, TraderCodeResponse, TransferRewardsParams, TransferRewardsResponse } from "./responses";
8
- /**
9
- * PitPass TraderCode API interface.
10
- *
11
- * Provides methods for reading your wallet-derived TraderCode, looking up a
12
- * referral code at sign-up, reading your accrued rewards balance, and
13
- * transferring rewards into a tradeable balance.
14
- */
15
- export interface PitpassAPI extends BaseAPI {
16
- /**
17
- * Return the authenticated caller's TraderCode (their normalized wallet address).
18
- *
19
- * Never 404s — every signed-in wallet has a derivable code. Ensures the
20
- * backing row so referrals attributed to this wallet have a code to link.
21
- *
22
- * @returns Promise resolving to the caller's TraderCode and its creation timestamp
23
- */
24
- getMyTraderCode(): Promise<TraderCodeResponse>;
25
- /**
26
- * Public, unauthenticated lookup of a TraderCode.
27
- *
28
- * Used to validate a referral code at sign-up. The code is a wallet address
29
- * (the `Monaco - <address>` display form is also accepted). Returns the
30
- * normalized code when it resolves to a known wallet, or throws a 404 when
31
- * the code does not resolve to any user.
32
- *
33
- * @param code - The TraderCode (wallet address or `Monaco - <address>` form) to look up
34
- * @returns Promise resolving to the normalized TraderCode
35
- */
36
- getTraderCodeInfo(code: string): Promise<TraderCodeInfoResponse>;
37
- /**
38
- * Return the caller's current PitPass rewards-bucket balances.
39
- *
40
- * Rewards accumulate here as referred users trade. Call
41
- * {@link transferRewards} to move them into a tradeable balance.
42
- * Returns an empty `balances` array when no rewards have been earned yet.
43
- *
44
- * @returns Promise resolving to the list of per-token reward balances
45
- */
46
- getRewardsBalance(): Promise<GetRewardsBalanceResponse>;
47
- /**
48
- * Transfer earned PitPass rewards into a trading balance.
49
- *
50
- * Moves the specified amount of a reward token from the caller's rewards
51
- * bucket into their trading balance under the authenticated application.
52
- * Ledger-only — no on-chain transaction, immediately tradeable.
53
- *
54
- * @param params - Token address and raw-unit amount to transfer
55
- * @returns Promise resolving to the post-transfer rewards and trading balances
56
- */
57
- transferRewards(params: TransferRewardsParams): Promise<TransferRewardsResponse>;
58
- }
59
- export type { GetRewardsBalanceResponse, RewardsBalanceEntry, TraderCodeInfoResponse, TraderCodeResponse, TransferRewardsParams, TransferRewardsResponse, } from "./responses";
60
- export { GetRewardsBalanceResponseSchema, RewardsBalanceEntrySchema, TraderCodeInfoResponseSchema, TraderCodeResponseSchema, TransferRewardsParamsSchema, TransferRewardsResponseSchema, } from "./responses";
@@ -1,6 +0,0 @@
1
- /**
2
- * PitPass Types
3
- *
4
- * Types for PitPass TraderCode API: code lookup, rewards balance, and transfer.
5
- */
6
- export { GetRewardsBalanceResponseSchema, RewardsBalanceEntrySchema, TraderCodeInfoResponseSchema, TraderCodeResponseSchema, TransferRewardsParamsSchema, TransferRewardsResponseSchema, } from "./responses";
@@ -1,44 +0,0 @@
1
- /**
2
- * PitPass TraderCode Response Types
3
- *
4
- * Types for PitPass TraderCode API responses and requests.
5
- * All types are derived from Zod schemas for runtime validation.
6
- */
7
- import { z } from "zod";
8
- /** Schema for a single token entry in the rewards balance response. */
9
- export declare const RewardsBalanceEntrySchema: z.ZodObject<{
10
- token: z.ZodString;
11
- available: z.ZodString;
12
- }, z.core.$strip>;
13
- /** Schema for the rewards balance response. */
14
- export declare const GetRewardsBalanceResponseSchema: z.ZodObject<{
15
- balances: z.ZodArray<z.ZodObject<{
16
- token: z.ZodString;
17
- available: z.ZodString;
18
- }, z.core.$strip>>;
19
- }, z.core.$strip>;
20
- /** Schema for a TraderCode response. */
21
- export declare const TraderCodeResponseSchema: z.ZodObject<{
22
- code: z.ZodString;
23
- createdAt: z.ZodString;
24
- }, z.core.$strip>;
25
- /** Schema for the public TraderCode info response. */
26
- export declare const TraderCodeInfoResponseSchema: z.ZodObject<{
27
- code: z.ZodString;
28
- }, z.core.$strip>;
29
- /** Schema for the transfer rewards request body. */
30
- export declare const TransferRewardsParamsSchema: z.ZodObject<{
31
- token: z.ZodString;
32
- amount: z.ZodString;
33
- }, z.core.$strip>;
34
- /** Schema for the transfer rewards response. */
35
- export declare const TransferRewardsResponseSchema: z.ZodObject<{
36
- rewardsBalance: z.ZodString;
37
- tradingBalance: z.ZodString;
38
- }, z.core.$strip>;
39
- export type RewardsBalanceEntry = z.infer<typeof RewardsBalanceEntrySchema>;
40
- export type GetRewardsBalanceResponse = z.infer<typeof GetRewardsBalanceResponseSchema>;
41
- export type TraderCodeResponse = z.infer<typeof TraderCodeResponseSchema>;
42
- export type TraderCodeInfoResponse = z.infer<typeof TraderCodeInfoResponseSchema>;
43
- export type TransferRewardsParams = z.infer<typeof TransferRewardsParamsSchema>;
44
- export type TransferRewardsResponse = z.infer<typeof TransferRewardsResponseSchema>;
@@ -1,53 +0,0 @@
1
- /**
2
- * PitPass TraderCode Response Types
3
- *
4
- * Types for PitPass TraderCode API responses and requests.
5
- * All types are derived from Zod schemas for runtime validation.
6
- */
7
- import { z } from "zod";
8
- /** Schema for a single token entry in the rewards balance response. */
9
- export const RewardsBalanceEntrySchema = z.object({
10
- /** Reward token contract address (0x-prefixed). */
11
- token: z.string(),
12
- /** Available rewards balance in RAW atomic units of the token. */
13
- available: z.string(),
14
- });
15
- /** Schema for the rewards balance response. */
16
- export const GetRewardsBalanceResponseSchema = z.object({
17
- /** One entry per reward token that has a non-zero available balance. */
18
- balances: z.array(RewardsBalanceEntrySchema),
19
- });
20
- /** Schema for a TraderCode response. */
21
- export const TraderCodeResponseSchema = z.object({
22
- /** The caller's TraderCode — their normalized wallet address. */
23
- code: z.string(),
24
- /** RFC 3339 timestamp when the code row was first derived. */
25
- createdAt: z.string(),
26
- });
27
- /** Schema for the public TraderCode info response. */
28
- export const TraderCodeInfoResponseSchema = z.object({
29
- /** The resolved TraderCode (normalized wallet address). */
30
- code: z.string(),
31
- });
32
- /** Schema for the transfer rewards request body. */
33
- export const TransferRewardsParamsSchema = z.object({
34
- /** Reward token contract address (0x-prefixed) to transfer. */
35
- token: z
36
- .string()
37
- .trim()
38
- .min(1, "token is required")
39
- .regex(/^0x[0-9a-fA-F]{40}$/, "token must be a 0x-prefixed EVM address"),
40
- /** Amount to transfer, in RAW atomic units of the token. Must be a positive integer string. */
41
- amount: z
42
- .string()
43
- .trim()
44
- .min(1, "amount is required")
45
- .refine((v) => /^\d+$/.test(v) && BigInt(v) > 0n, "amount must be a positive integer string"),
46
- });
47
- /** Schema for the transfer rewards response. */
48
- export const TransferRewardsResponseSchema = z.object({
49
- /** Your rewards-bucket balance after the transfer, RAW atomic units. */
50
- rewardsBalance: z.string(),
51
- /** Your trading balance for the token after the transfer, RAW atomic units. */
52
- tradingBalance: z.string(),
53
- });