@polyester/sdk 0.36.0-devnet-20261117035807 → 0.36.0-devnet-20261118141710
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.
- package/CHANGELOG.md +66 -8
- package/dist/catalogs/index.d.ts +2 -2
- package/dist/catalogs/snapshot-validation.js +10 -1
- package/dist/catalogs/snapshot-validation.js.map +1 -1
- package/dist/catalogs/zipper-catalog.d.ts +2 -0
- package/dist/catalogs/zipper-catalog.d.ts.map +1 -1
- package/dist/catalogs/zipper-catalog.js.map +1 -1
- package/dist/catalogs/zipper-supply.d.ts +2 -0
- package/dist/catalogs/zipper-supply.d.ts.map +1 -1
- package/dist/catalogs/zipper-supply.js +7 -5
- package/dist/catalogs/zipper-supply.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/gen/ai/v1/assistant_pb.d.ts +679 -13
- package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -1
- package/dist/gen/ai/v1/assistant_pb.js +355 -97
- package/dist/gen/ai/v1/assistant_pb.js.map +1 -1
- package/dist/gen/alerts/v1/price_alerts_pb.d.ts +33 -4
- package/dist/gen/alerts/v1/price_alerts_pb.d.ts.map +1 -1
- package/dist/gen/alerts/v1/price_alerts_pb.js +23 -2
- package/dist/gen/alerts/v1/price_alerts_pb.js.map +1 -1
- package/dist/gen/auth/v1/activity_pb.d.ts +148 -0
- package/dist/gen/auth/v1/activity_pb.d.ts.map +1 -0
- package/dist/gen/auth/v1/activity_pb.js +40 -0
- package/dist/gen/auth/v1/activity_pb.js.map +1 -0
- package/dist/gen/auth/v1/api_keys_pb.d.ts +10 -4
- package/dist/gen/auth/v1/api_keys_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/api_keys_pb.js +3 -1
- package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +61 -5
- package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/auth_pb.js +23 -6
- package/dist/gen/auth/v1/auth_pb.js.map +1 -1
- package/dist/gen/auth/v1/mfa_pb.d.ts +140 -2
- package/dist/gen/auth/v1/mfa_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/mfa_pb.js +80 -8
- package/dist/gen/auth/v1/mfa_pb.js.map +1 -1
- package/dist/gen/auth/v1/policies_pb.d.ts +18 -3
- package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/policies_pb.js +18 -3
- package/dist/gen/auth/v1/policies_pb.js.map +1 -1
- package/dist/gen/auth/v1/social_verification_pb.d.ts +36 -15
- package/dist/gen/auth/v1/social_verification_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/social_verification_pb.js +1 -1
- package/dist/gen/auth/v1/social_verification_pb.js.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.d.ts +15 -1
- package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.js +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +6 -2
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +104 -6
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js +49 -3
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
- package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +76 -3
- package/dist/gen/chain/zipper/v1/zipper_pb.d.ts.map +1 -1
- package/dist/gen/chain/zipper/v1/zipper_pb.js +46 -2
- package/dist/gen/chain/zipper/v1/zipper_pb.js.map +1 -1
- package/dist/gen/index.d.ts +3 -1
- package/dist/gen/index.js +4 -2
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +21 -139
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts.map +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.js +16 -17
- package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
- package/dist/gen/ledger/read/v1/statement_export_pb.d.ts +236 -20
- package/dist/gen/ledger/read/v1/statement_export_pb.d.ts.map +1 -1
- package/dist/gen/ledger/read/v1/statement_export_pb.js +44 -10
- package/dist/gen/ledger/read/v1/statement_export_pb.js.map +1 -1
- package/dist/gen/ledger/v1/catalog_pb.d.ts +9 -1
- package/dist/gen/ledger/v1/catalog_pb.d.ts.map +1 -1
- package/dist/gen/ledger/v1/catalog_pb.js +9 -1
- package/dist/gen/ledger/v1/catalog_pb.js.map +1 -1
- package/dist/gen/marketdata/v1/asset_info_pb.d.ts +158 -7
- package/dist/gen/marketdata/v1/asset_info_pb.d.ts.map +1 -1
- package/dist/gen/marketdata/v1/asset_info_pb.js +56 -6
- package/dist/gen/marketdata/v1/asset_info_pb.js.map +1 -1
- package/dist/gen/notifications/v1/notifications_pb.d.ts +45 -6
- package/dist/gen/notifications/v1/notifications_pb.d.ts.map +1 -1
- package/dist/gen/notifications/v1/notifications_pb.js +23 -5
- package/dist/gen/notifications/v1/notifications_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +105 -29
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +14 -2
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +50 -20
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
- package/dist/gen/polyester/api/options_pb.d.ts +11 -2
- package/dist/gen/polyester/api/options_pb.d.ts.map +1 -1
- package/dist/gen/polyester/api/options_pb.js +13 -3
- package/dist/gen/polyester/api/options_pb.js.map +1 -1
- package/dist/gen/privatews/v1/private_ws_pb.d.ts +13 -3
- package/dist/gen/privatews/v1/private_ws_pb.d.ts.map +1 -1
- package/dist/gen/privatews/v1/private_ws_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +126 -10
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +14 -6
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts +665 -0
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts.map +1 -0
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.js +216 -0
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.js.map +1 -0
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +166 -52
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js +50 -12
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
- package/dist/gen/system/v1/system_pb.d.ts +49 -2
- package/dist/gen/system/v1/system_pb.d.ts.map +1 -1
- package/dist/gen/system/v1/system_pb.js +18 -6
- package/dist/gen/system/v1/system_pb.js.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +150 -71
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.js +56 -34
- package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.d.ts +117 -16
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +45 -2
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/index.d.ts +13 -9
- package/dist/realtime/client.js +5 -1
- package/dist/realtime/client.js.map +1 -1
- package/dist/realtime/snapshot-then-stream.js +5 -3
- package/dist/realtime/snapshot-then-stream.js.map +1 -1
- package/dist/services/account-activity/account-activity.d.ts +22 -0
- package/dist/services/account-activity/account-activity.d.ts.map +1 -0
- package/dist/services/account-activity/account-activity.js +32 -0
- package/dist/services/account-activity/account-activity.js.map +1 -0
- package/dist/services/account-activity/account-activity.schemas.d.ts +78 -0
- package/dist/services/account-activity/account-activity.schemas.d.ts.map +1 -0
- package/dist/services/account-activity/account-activity.schemas.js +44 -0
- package/dist/services/account-activity/account-activity.schemas.js.map +1 -0
- package/dist/services/account-activity/account-activity.types.d.ts +2 -0
- package/dist/services/account-activity/service.d.ts +8 -0
- package/dist/services/account-activity/service.d.ts.map +1 -0
- package/dist/services/account-activity/service.js +9 -0
- package/dist/services/account-activity/service.js.map +1 -0
- package/dist/services/address-book/address-book.schemas.js +2 -2
- package/dist/services/api-keys/api-keys.schemas.js +2 -2
- package/dist/services/assistant/assistant-events.schemas.d.ts +81 -81
- package/dist/services/assistant/assistant.codecs.d.ts +7 -2
- package/dist/services/assistant/assistant.codecs.d.ts.map +1 -1
- package/dist/services/assistant/assistant.codecs.js +18 -2
- package/dist/services/assistant/assistant.codecs.js.map +1 -1
- package/dist/services/assistant/assistant.d.ts +29 -2
- package/dist/services/assistant/assistant.d.ts.map +1 -1
- package/dist/services/assistant/assistant.js +44 -2
- package/dist/services/assistant/assistant.js.map +1 -1
- package/dist/services/assistant/assistant.schemas.d.ts +111 -6
- package/dist/services/assistant/assistant.schemas.d.ts.map +1 -1
- package/dist/services/assistant/assistant.schemas.js +74 -6
- package/dist/services/assistant/assistant.schemas.js.map +1 -1
- package/dist/services/assistant/assistant.types.d.ts +3 -3
- package/dist/services/auto-withdraw/auto-withdraw.codecs.d.ts +3 -1
- package/dist/services/auto-withdraw/auto-withdraw.codecs.d.ts.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.codecs.js.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +15 -13
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.schemas.js +1 -0
- package/dist/services/auto-withdraw/auto-withdraw.schemas.js.map +1 -1
- package/dist/services/balances/balances.d.ts +1 -13
- package/dist/services/balances/balances.d.ts.map +1 -1
- package/dist/services/balances/balances.js +1 -45
- package/dist/services/balances/balances.js.map +1 -1
- package/dist/services/balances/balances.schemas.d.ts +1 -67
- package/dist/services/balances/balances.schemas.d.ts.map +1 -1
- package/dist/services/balances/balances.schemas.js +1 -22
- package/dist/services/balances/balances.schemas.js.map +1 -1
- package/dist/services/balances/balances.types.d.ts +2 -2
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/changelog/changelog.schemas.d.ts +38 -38
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +3 -3
- package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +11 -11
- package/dist/services/dust-conversion/dust-conversion.schemas.d.ts.map +1 -1
- package/dist/services/dust-conversion/dust-conversion.schemas.js +1 -1
- package/dist/services/dust-conversion/dust-conversion.schemas.js.map +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/internal-transfers/internal-transfers.codecs.d.ts +11 -6
- package/dist/services/internal-transfers/internal-transfers.codecs.d.ts.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.codecs.js +6 -6
- package/dist/services/internal-transfers/internal-transfers.codecs.js.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.d.ts +17 -10
- package/dist/services/internal-transfers/internal-transfers.d.ts.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.js +21 -10
- package/dist/services/internal-transfers/internal-transfers.js.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +43 -31
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.js +23 -12
- package/dist/services/internal-transfers/internal-transfers.schemas.js.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.types.d.ts +2 -2
- package/dist/services/lifecycle/lifecycle.d.ts +1 -1
- package/dist/services/lifecycle/lifecycle.js +2 -3
- package/dist/services/lifecycle/lifecycle.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +40 -40
- package/dist/services/market-data/market-data.codecs.d.ts +8 -0
- package/dist/services/market-data/market-data.codecs.d.ts.map +1 -0
- package/dist/services/market-data/market-data.codecs.js +7 -1
- package/dist/services/market-data/market-data.codecs.js.map +1 -1
- package/dist/services/market-data/market-data.d.ts +3 -2
- package/dist/services/market-data/market-data.d.ts.map +1 -1
- package/dist/services/market-data/market-data.js +3 -2
- package/dist/services/market-data/market-data.js.map +1 -1
- package/dist/services/market-data/market-data.schemas.d.ts +332 -4
- package/dist/services/market-data/market-data.schemas.d.ts.map +1 -1
- package/dist/services/market-data/market-data.schemas.js +56 -8
- package/dist/services/market-data/market-data.schemas.js.map +1 -1
- package/dist/services/market-data/market-data.types.d.ts +3 -2
- package/dist/services/notifications/notifications.codecs.d.ts +1 -1
- package/dist/services/notifications/notifications.codecs.d.ts.map +1 -1
- package/dist/services/notifications/notifications.codecs.js +2 -1
- package/dist/services/notifications/notifications.codecs.js.map +1 -1
- package/dist/services/notifications/notifications.d.ts +4 -2
- package/dist/services/notifications/notifications.d.ts.map +1 -1
- package/dist/services/notifications/notifications.js +4 -2
- package/dist/services/notifications/notifications.js.map +1 -1
- package/dist/services/notifications/notifications.schemas.d.ts +63 -7
- package/dist/services/notifications/notifications.schemas.d.ts.map +1 -1
- package/dist/services/notifications/notifications.schemas.js +5 -0
- package/dist/services/notifications/notifications.schemas.js.map +1 -1
- package/dist/services/orderbook/orderbook.js +3 -2
- package/dist/services/orderbook/orderbook.js.map +1 -1
- package/dist/services/orders/order-enums.codecs.d.ts +2 -0
- package/dist/services/orders/order-errors.schemas.d.ts +50 -5
- package/dist/services/orders/order-errors.schemas.d.ts.map +1 -1
- package/dist/services/orders/order-errors.schemas.js +13 -3
- package/dist/services/orders/order-errors.schemas.js.map +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +310 -70
- package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-input.schemas.d.ts +58 -11
- package/dist/services/orders/orders-input.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-input.schemas.js +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +13 -13
- package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
- package/dist/services/policies/api-key-policies/api-key-policies.schemas.js +1 -1
- package/dist/services/policies/shared.codecs.js +12 -6
- package/dist/services/policies/shared.codecs.js.map +1 -1
- package/dist/services/policies/shared.d.ts +1 -1
- package/dist/services/policies/shared.js +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +9 -9
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js +4 -30
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js.map +1 -1
- package/dist/services/price-alerts/price-alerts.d.ts +5 -2
- package/dist/services/price-alerts/price-alerts.d.ts.map +1 -1
- package/dist/services/price-alerts/price-alerts.js +5 -2
- package/dist/services/price-alerts/price-alerts.js.map +1 -1
- package/dist/services/price-alerts/price-alerts.schemas.js +1 -1
- package/dist/services/rewards/rewards.schemas.d.ts +4 -4
- package/dist/services/social-verification/social-verification.schemas.d.ts +9 -0
- package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.js +9 -2
- package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
- package/dist/services/statement-exports/statement-exports.codecs.d.ts +3 -2
- package/dist/services/statement-exports/statement-exports.codecs.d.ts.map +1 -1
- package/dist/services/statement-exports/statement-exports.codecs.js +2 -1
- package/dist/services/statement-exports/statement-exports.codecs.js.map +1 -1
- package/dist/services/statement-exports/statement-exports.d.ts +25 -10
- package/dist/services/statement-exports/statement-exports.d.ts.map +1 -1
- package/dist/services/statement-exports/statement-exports.js +33 -10
- package/dist/services/statement-exports/statement-exports.js.map +1 -1
- package/dist/services/statement-exports/statement-exports.schemas.d.ts +38 -10
- package/dist/services/statement-exports/statement-exports.schemas.d.ts.map +1 -1
- package/dist/services/statement-exports/statement-exports.schemas.js +25 -6
- package/dist/services/statement-exports/statement-exports.schemas.js.map +1 -1
- package/dist/services/statement-exports/statement-exports.types.d.ts +2 -2
- package/dist/services/subaccounts/subaccounts.codecs.js +112 -38
- package/dist/services/subaccounts/subaccounts.codecs.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.d.ts +2 -1
- package/dist/services/subaccounts/subaccounts.d.ts.map +1 -1
- package/dist/services/subaccounts/subaccounts.js +3 -3
- package/dist/services/subaccounts/subaccounts.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +12 -5
- package/dist/services/subaccounts/subaccounts.schemas.d.ts.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.js +10 -3
- package/dist/services/subaccounts/subaccounts.schemas.js.map +1 -1
- package/dist/services/system/system.d.ts +12 -1
- package/dist/services/system/system.d.ts.map +1 -1
- package/dist/services/system/system.js +5 -0
- package/dist/services/system/system.js.map +1 -1
- package/dist/services/system/system.schemas.d.ts +13 -13
- package/dist/services/system/system.types.d.ts +2 -2
- package/dist/services/trades/trades.schemas.d.ts +2 -2
- package/dist/services/trading-withdraws/trading-withdraws.codecs.d.ts +8 -0
- package/dist/services/trading-withdraws/trading-withdraws.codecs.d.ts.map +1 -0
- package/dist/services/trading-withdraws/trading-withdraws.codecs.js +7 -1
- package/dist/services/trading-withdraws/trading-withdraws.codecs.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.d.ts +2 -1
- package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +2 -1
- package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +15 -0
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js +16 -2
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.types.d.ts +2 -1
- package/dist/services/transfers/transfers.schemas.d.ts +4 -4
- package/dist/services/triggers/trigger-child-order.schemas.js +1 -1
- package/dist/services/triggers/trigger-child-order.schemas.js.map +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +10 -10
- package/dist/services/triggers/triggers-output.schemas.d.ts +170 -52
- package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.js +13 -3
- package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
- package/dist/services/triggers/triggers.codecs.d.ts +10 -0
- package/dist/services/triggers/triggers.codecs.d.ts.map +1 -0
- package/dist/services/triggers/triggers.codecs.js +7 -1
- package/dist/services/triggers/triggers.codecs.js.map +1 -1
- package/dist/services/triggers/triggers.d.ts +2 -2
- package/dist/services/triggers/triggers.js +2 -2
- package/dist/services/triggers/triggers.js.map +1 -1
- package/dist/services/zipper/zipper.d.ts.map +1 -1
- package/dist/services/zipper/zipper.js +13 -7
- package/dist/services/zipper/zipper.js.map +1 -1
- package/dist/services/zipper/zipper.schemas.d.ts +7 -2
- package/dist/services/zipper/zipper.schemas.d.ts.map +1 -1
- package/dist/services/zipper/zipper.schemas.js +29 -9
- package/dist/services/zipper/zipper.schemas.js.map +1 -1
- package/dist/services/zipper/zipper.types.d.ts +2 -2
- package/dist/shared/catalog-config.d.ts +16 -2
- package/dist/shared/catalog-config.d.ts.map +1 -1
- package/dist/shared/catalog-config.js.map +1 -1
- package/dist/shared/connect-error-mapping.d.ts.map +1 -1
- package/dist/shared/connect-error-mapping.js +27 -4
- package/dist/shared/connect-error-mapping.js.map +1 -1
- package/dist/shared/error-detail.d.ts +10 -0
- package/dist/shared/error-detail.d.ts.map +1 -1
- package/dist/shared/error-detail.js.map +1 -1
- package/dist/shared/error-details/auth.js +6 -0
- package/dist/shared/error-details/auth.js.map +1 -1
- package/dist/shared/errors.d.ts +5 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +3 -0
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/ledger-codes.d.ts +3 -1
- package/dist/shared/ledger-codes.d.ts.map +1 -1
- package/dist/shared/ledger-codes.js +6 -3
- package/dist/shared/ledger-codes.js.map +1 -1
- package/dist/shared/rate-limit.schemas.d.ts +1 -1
- package/dist/wired-services.d.ts.map +1 -1
- package/dist/wired-services.js +3 -1
- package/dist/wired-services.js.map +1 -1
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.Stri
|
|
|
31
31
|
}, undefined>, v.CheckAction<{
|
|
32
32
|
categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
|
|
33
33
|
actionRequired?: boolean | undefined;
|
|
34
|
-
surfaces: ("assistant" | "
|
|
34
|
+
surfaces: ("assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
35
35
|
audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
|
|
36
36
|
startTime?: number | undefined;
|
|
37
37
|
endTime?: number | undefined;
|
|
@@ -42,7 +42,7 @@ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.Stri
|
|
|
42
42
|
}, "endTime: must be after startTime">, v.TransformAction<{
|
|
43
43
|
categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
|
|
44
44
|
actionRequired?: boolean | undefined;
|
|
45
|
-
surfaces: ("assistant" | "
|
|
45
|
+
surfaces: ("assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
46
46
|
audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
|
|
47
47
|
startTime?: number | undefined;
|
|
48
48
|
endTime?: number | undefined;
|
|
@@ -77,10 +77,10 @@ declare const ChangelogChangeSchema: v.ObjectSchema<{
|
|
|
77
77
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
78
78
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
79
79
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
80
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
80
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
81
81
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
82
82
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
83
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
83
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
84
84
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
85
85
|
readonly seconds: v.BigintSchema<undefined>;
|
|
86
86
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -95,7 +95,7 @@ type ChangelogChange = v.InferOutput<typeof ChangelogChangeSchema>;
|
|
|
95
95
|
declare const ChangelogSectionSchema: v.ObjectSchema<{
|
|
96
96
|
readonly heading: v.StringSchema<undefined>;
|
|
97
97
|
readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
98
|
-
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
98
|
+
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
|
|
99
99
|
readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
100
100
|
readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
101
101
|
readonly title: v.StringSchema<undefined>;
|
|
@@ -105,10 +105,10 @@ declare const ChangelogSectionSchema: v.ObjectSchema<{
|
|
|
105
105
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
106
106
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
107
107
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
108
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
108
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
109
109
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
110
110
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
111
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
111
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
112
112
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
113
113
|
readonly seconds: v.BigintSchema<undefined>;
|
|
114
114
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -278,7 +278,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
278
278
|
readonly sections: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
279
279
|
readonly heading: v.StringSchema<undefined>;
|
|
280
280
|
readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
281
|
-
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
281
|
+
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
|
|
282
282
|
readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
283
283
|
readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
284
284
|
readonly title: v.StringSchema<undefined>;
|
|
@@ -288,10 +288,10 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
288
288
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
289
289
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
290
290
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
291
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
291
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
292
292
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
293
293
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
294
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
294
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
295
295
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
296
296
|
readonly seconds: v.BigintSchema<undefined>;
|
|
297
297
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -327,7 +327,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
327
327
|
sections: {
|
|
328
328
|
heading: string;
|
|
329
329
|
summary?: string | undefined;
|
|
330
|
-
surface: "unspecified" | "assistant" | "
|
|
330
|
+
surface: "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
|
|
331
331
|
changes: {
|
|
332
332
|
id: string;
|
|
333
333
|
title: string;
|
|
@@ -337,10 +337,10 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
337
337
|
actionRequired: boolean;
|
|
338
338
|
migrationGuidance?: string | undefined;
|
|
339
339
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
340
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
340
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
341
341
|
environmentExceptions: {
|
|
342
342
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
343
|
-
availability: "unspecified" | "
|
|
343
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
344
344
|
liveAt?: number | undefined;
|
|
345
345
|
}[];
|
|
346
346
|
}[];
|
|
@@ -349,7 +349,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
349
349
|
sections: {
|
|
350
350
|
heading: string;
|
|
351
351
|
summary?: string | undefined;
|
|
352
|
-
surface: "unspecified" | "assistant" | "
|
|
352
|
+
surface: "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
|
|
353
353
|
changes: {
|
|
354
354
|
id: string;
|
|
355
355
|
title: string;
|
|
@@ -359,10 +359,10 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
359
359
|
actionRequired: boolean;
|
|
360
360
|
migrationGuidance?: string | undefined;
|
|
361
361
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
362
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
362
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
363
363
|
environmentExceptions: {
|
|
364
364
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
365
|
-
availability: "unspecified" | "
|
|
365
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
366
366
|
liveAt?: number | undefined;
|
|
367
367
|
}[];
|
|
368
368
|
}[];
|
|
@@ -398,10 +398,10 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
398
398
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
399
399
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
400
400
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
401
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
401
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
402
402
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
403
403
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
404
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
404
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
405
405
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
406
406
|
readonly seconds: v.BigintSchema<undefined>;
|
|
407
407
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -430,10 +430,10 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
430
430
|
actionRequired: boolean;
|
|
431
431
|
migrationGuidance?: string | undefined;
|
|
432
432
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
433
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
433
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
434
434
|
environmentExceptions: {
|
|
435
435
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
436
|
-
availability: "unspecified" | "
|
|
436
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
437
437
|
liveAt?: number | undefined;
|
|
438
438
|
}[];
|
|
439
439
|
};
|
|
@@ -452,10 +452,10 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
452
452
|
actionRequired: boolean;
|
|
453
453
|
migrationGuidance?: string | undefined;
|
|
454
454
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
455
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
455
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
456
456
|
environmentExceptions: {
|
|
457
457
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
458
|
-
availability: "unspecified" | "
|
|
458
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
459
459
|
liveAt?: number | undefined;
|
|
460
460
|
}[];
|
|
461
461
|
}>]>;
|
|
@@ -472,10 +472,10 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
472
472
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
473
473
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
474
474
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
475
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
475
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
476
476
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
477
477
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
478
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
478
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
479
479
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
480
480
|
readonly seconds: v.BigintSchema<undefined>;
|
|
481
481
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -504,10 +504,10 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
504
504
|
actionRequired: boolean;
|
|
505
505
|
migrationGuidance?: string | undefined;
|
|
506
506
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
507
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
507
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
508
508
|
environmentExceptions: {
|
|
509
509
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
510
|
-
availability: "unspecified" | "
|
|
510
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
511
511
|
liveAt?: number | undefined;
|
|
512
512
|
}[];
|
|
513
513
|
};
|
|
@@ -526,10 +526,10 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
526
526
|
actionRequired: boolean;
|
|
527
527
|
migrationGuidance?: string | undefined;
|
|
528
528
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
529
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
529
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
530
530
|
environmentExceptions: {
|
|
531
531
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
532
|
-
availability: "unspecified" | "
|
|
532
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
533
533
|
liveAt?: number | undefined;
|
|
534
534
|
}[];
|
|
535
535
|
}>]>, undefined>, readonly []>;
|
|
@@ -678,10 +678,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
678
678
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
679
679
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
680
680
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
681
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
681
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
682
682
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
683
683
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
684
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
684
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
685
685
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
686
686
|
readonly seconds: v.BigintSchema<undefined>;
|
|
687
687
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -703,10 +703,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
703
703
|
actionRequired: boolean;
|
|
704
704
|
migrationGuidance?: string | undefined;
|
|
705
705
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
706
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
706
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
707
707
|
environmentExceptions: {
|
|
708
708
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
709
|
-
availability: "unspecified" | "
|
|
709
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
710
710
|
liveAt?: number | undefined;
|
|
711
711
|
}[];
|
|
712
712
|
};
|
|
@@ -723,10 +723,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
723
723
|
actionRequired: boolean;
|
|
724
724
|
migrationGuidance?: string | undefined;
|
|
725
725
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
726
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
726
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
727
727
|
environmentExceptions: {
|
|
728
728
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
729
|
-
availability: "unspecified" | "
|
|
729
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
730
730
|
liveAt?: number | undefined;
|
|
731
731
|
}[];
|
|
732
732
|
}>]>, undefined>, readonly []>;
|
|
@@ -765,10 +765,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
765
765
|
actionRequired: boolean;
|
|
766
766
|
migrationGuidance?: string | undefined;
|
|
767
767
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
768
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
768
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
769
769
|
environmentExceptions: {
|
|
770
770
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
771
|
-
availability: "unspecified" | "
|
|
771
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
772
772
|
liveAt?: number | undefined;
|
|
773
773
|
}[];
|
|
774
774
|
}[];
|
|
@@ -789,10 +789,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
789
789
|
actionRequired: boolean;
|
|
790
790
|
migrationGuidance?: string | undefined;
|
|
791
791
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
792
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
792
|
+
surfaces: ("unspecified" | "assistant" | "rewards" | "api" | "trading" | "funding" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
793
793
|
environmentExceptions: {
|
|
794
794
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
795
|
-
availability: "unspecified" | "
|
|
795
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
796
796
|
liveAt?: number | undefined;
|
|
797
797
|
}[];
|
|
798
798
|
}[];
|
|
@@ -49,7 +49,7 @@ declare const CheckpointBiggestTradeSchema: v.SchemaWithPipe<readonly [v.ObjectS
|
|
|
49
49
|
side: number;
|
|
50
50
|
at: number;
|
|
51
51
|
}, {
|
|
52
|
-
side: "
|
|
52
|
+
side: "unspecified" | "buy" | "sell";
|
|
53
53
|
symbolId: number;
|
|
54
54
|
symbol: string;
|
|
55
55
|
at: number;
|
|
@@ -229,7 +229,7 @@ declare const CheckpointSchema: v.ObjectSchema<{
|
|
|
229
229
|
side: number;
|
|
230
230
|
at: number;
|
|
231
231
|
}, {
|
|
232
|
-
side: "
|
|
232
|
+
side: "unspecified" | "buy" | "sell";
|
|
233
233
|
symbolId: number;
|
|
234
234
|
symbol: string;
|
|
235
235
|
at: number;
|
|
@@ -427,7 +427,7 @@ declare const CheckpointSchema: v.ObjectSchema<{
|
|
|
427
427
|
readonly seasonResultUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
428
428
|
readonly subaccounts: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
|
|
429
429
|
/** Values computed from partial evidence; show them with an approximation marker. */
|
|
430
|
-
readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
430
|
+
readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "transfers" | "tools" | "deposits" | "withdrawals" | "volume" | "top_pairs" | "order_types" | "time_in_force" | "order_status" | "median_limit_rest" | "internal_transfers" | "daily_claim_amounts" | "portfolio_value" | "trading_balances" | "funding_balances" | "season_result">]>, undefined>, readonly []>;
|
|
431
431
|
}, undefined>;
|
|
432
432
|
/**
|
|
433
433
|
* One frozen season recap of a root account and all of its subaccounts. An absent USD value
|
|
@@ -34,9 +34,9 @@ declare const QuoteDustConversionInputSchema: v.SchemaWithPipe<readonly [v.Stric
|
|
|
34
34
|
type QuoteDustConversionInput = v.InferInput<typeof QuoteDustConversionInputSchema>;
|
|
35
35
|
declare const CreateDustConversionInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
36
36
|
/** `quoteId` from `quote`, at most 30 seconds old. A quote converts once. */
|
|
37
|
-
readonly quoteId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.
|
|
37
|
+
readonly quoteId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
38
38
|
/** Stable key collapsing retries for the account; reusing it returns the same conversion. */
|
|
39
|
-
readonly idempotencyKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.
|
|
39
|
+
readonly idempotencyKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
40
40
|
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
41
41
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
42
42
|
}, undefined>], undefined>, undefined>;
|
|
@@ -53,7 +53,7 @@ declare const CreateDustConversionInputSchema: v.SchemaWithPipe<readonly [v.Stri
|
|
|
53
53
|
}>]>;
|
|
54
54
|
type CreateDustConversionInput = v.InferInput<typeof CreateDustConversionInputSchema>;
|
|
55
55
|
declare const GetDustConversionInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
56
|
-
readonly conversionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.
|
|
56
|
+
readonly conversionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
57
57
|
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
58
58
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
59
59
|
}, undefined>], undefined>, undefined>;
|
|
@@ -147,7 +147,7 @@ type DustAssetPrice = v.InferOutput<typeof DustAssetPriceSchema>;
|
|
|
147
147
|
declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
148
148
|
readonly conversionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
149
149
|
readonly quoteId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
150
|
-
readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
150
|
+
readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "completed" | "refused">]>;
|
|
151
151
|
readonly refusalCode: v.NumberSchema<undefined>;
|
|
152
152
|
readonly targetAssetId: v.NumberSchema<undefined>;
|
|
153
153
|
readonly sources: v.ArraySchema<v.ObjectSchema<{
|
|
@@ -187,7 +187,7 @@ declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
187
187
|
}, undefined>, v.TransformAction<{
|
|
188
188
|
conversionId: string;
|
|
189
189
|
quoteId: string;
|
|
190
|
-
state: "unspecified" | "
|
|
190
|
+
state: "unspecified" | "processing" | "completed" | "refused";
|
|
191
191
|
refusalCode: number;
|
|
192
192
|
targetAssetId: number;
|
|
193
193
|
sources: {
|
|
@@ -216,9 +216,9 @@ declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
216
216
|
conversionId: string;
|
|
217
217
|
/** The quote the conversion converted. */
|
|
218
218
|
quoteId: string;
|
|
219
|
-
state: "unspecified" | "
|
|
219
|
+
state: "unspecified" | "processing" | "completed" | "refused";
|
|
220
220
|
/** Why a `refused` conversion was refused; null otherwise. */
|
|
221
|
-
refusalCode: "UNSPECIFIED" | "
|
|
221
|
+
refusalCode: "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "CONFLICT" | "INVALID_REQUEST" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "FAILED_PRECONDITION" | "SUBACCOUNT_NOT_FOUND" | "INSUFFICIENT_FUNDS" | "NOT_FOUND" | "INVALID_SUBACCOUNT_ID" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | null;
|
|
222
222
|
targetAssetId: number;
|
|
223
223
|
/** Whole quoted balances moved, in asset id order. */
|
|
224
224
|
sources: {
|
|
@@ -463,7 +463,7 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
|
|
|
463
463
|
readonly conversions: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
464
464
|
readonly conversionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
465
465
|
readonly quoteId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
466
|
-
readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
466
|
+
readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "completed" | "refused">]>;
|
|
467
467
|
readonly refusalCode: v.NumberSchema<undefined>;
|
|
468
468
|
readonly targetAssetId: v.NumberSchema<undefined>;
|
|
469
469
|
readonly sources: v.ArraySchema<v.ObjectSchema<{
|
|
@@ -503,7 +503,7 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
|
|
|
503
503
|
}, undefined>, v.TransformAction<{
|
|
504
504
|
conversionId: string;
|
|
505
505
|
quoteId: string;
|
|
506
|
-
state: "unspecified" | "
|
|
506
|
+
state: "unspecified" | "processing" | "completed" | "refused";
|
|
507
507
|
refusalCode: number;
|
|
508
508
|
targetAssetId: number;
|
|
509
509
|
sources: {
|
|
@@ -532,9 +532,9 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
|
|
|
532
532
|
conversionId: string;
|
|
533
533
|
/** The quote the conversion converted. */
|
|
534
534
|
quoteId: string;
|
|
535
|
-
state: "unspecified" | "
|
|
535
|
+
state: "unspecified" | "processing" | "completed" | "refused";
|
|
536
536
|
/** Why a `refused` conversion was refused; null otherwise. */
|
|
537
|
-
refusalCode: "UNSPECIFIED" | "
|
|
537
|
+
refusalCode: "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "CONFLICT" | "INVALID_REQUEST" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "FAILED_PRECONDITION" | "SUBACCOUNT_NOT_FOUND" | "INSUFFICIENT_FUNDS" | "NOT_FOUND" | "INVALID_SUBACCOUNT_ID" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | null;
|
|
538
538
|
targetAssetId: number;
|
|
539
539
|
/** Whole quoted balances moved, in asset id order. */
|
|
540
540
|
sources: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dust-conversion.schemas.d.ts","names":[],"sources":["../../../src/services/dust-conversion/dust-conversion.schemas.ts"],"mappings":";;
|
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;;;;;;;;;;;KA+B1B,sBAAsB,EAAE,mBAAmB;cAE1C,iCAA+B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMhC,4BAA4B,EAAE,mBAAmB"}
|
|
@@ -9,7 +9,7 @@ import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
|
9
9
|
import { DustAssetEligibilityCodec, DustConversionStateCodec } from "./dust-conversion.codecs.js";
|
|
10
10
|
import * as v from "valibot";
|
|
11
11
|
//#region src/services/dust-conversion/dust-conversion.schemas.ts
|
|
12
|
-
const RequiredInputStringSchema = v.pipe(v.string(), v.
|
|
12
|
+
const RequiredInputStringSchema = v.pipe(v.string(), v.minLength(1));
|
|
13
13
|
const ListDustBalancesInputSchema = v.pipe(v.strictObject({
|
|
14
14
|
...AccountScopeInputEntries,
|
|
15
15
|
/** One of the response's `targets`; omit for the first. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dust-conversion.schemas.js","names":[],"sources":["../../../src/services/dust-conversion/dust-conversion.schemas.ts"],"sourcesContent":["import type { MessageInitShape } from \"@bufbuild/protobuf\";\nimport * as v from \"valibot\";\nimport type * as Proto from \"../../gen/transfer/v1/dust_conversion_pb.js\";\nimport { ErrorCode } from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { E18_SCALE, scaledToDecimalOutput } from \"../../shared/decimal-surface.js\";\nimport { codeName } from \"../../shared/error-detail.js\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport { OptionalTimestampMsSchema, U128Schema } from \"../../shared/schemas.js\";\nimport { fromU128, type U128Value } from \"../../utils/u128.js\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport { DustAssetEligibilityCodec, DustConversionStateCodec } from \"./dust-conversion.codecs.js\";\n\nconst RequiredInputStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nexport const ListDustBalancesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** One of the response's `targets`; omit for the first. */\n targetAssetId: v.optional(PositiveUint32InputSchema),\n }),\n v.transform(\n ({ account, targetAssetId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n targetAssetId,\n }) satisfies MessageInitShape<typeof Proto.ListDustBalancesRequestSchema>,\n ),\n);\n\nexport type ListDustBalancesInput = v.InferInput<typeof ListDustBalancesInputSchema>;\n\nexport const QuoteDustConversionInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** One of `listBalances`' `targets`. */\n targetAssetId: PositiveUint32InputSchema,\n }),\n v.transform(\n ({ account, targetAssetId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n targetAssetId,\n }) satisfies MessageInitShape<typeof Proto.QuoteDustConversionRequestSchema>,\n ),\n);\n\nexport type QuoteDustConversionInput = v.InferInput<typeof QuoteDustConversionInputSchema>;\n\nexport const CreateDustConversionInputSchema = v.pipe(\n v.strictObject({\n /** Must select the quote's account. */\n ...AccountScopeInputEntries,\n /** `quoteId` from `quote`, at most 30 seconds old. A quote converts once. */\n quoteId: RequiredInputStringSchema,\n /** Stable key collapsing retries for the account; reusing it returns the same conversion. */\n idempotencyKey: RequiredInputStringSchema,\n }),\n v.transform(\n ({ account, quoteId, idempotencyKey }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n quoteId,\n idempotencyKey,\n }) satisfies MessageInitShape<typeof Proto.CreateDustConversionRequestSchema>,\n ),\n);\n\nexport type CreateDustConversionInput = v.InferInput<typeof CreateDustConversionInputSchema>;\n\nexport const GetDustConversionInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n conversionId: RequiredInputStringSchema,\n }),\n v.transform(\n ({ account, conversionId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n conversionId,\n }) satisfies MessageInitShape<typeof Proto.GetDustConversionRequestSchema>,\n ),\n);\n\nexport type GetDustConversionInput = v.InferInput<typeof GetDustConversionInputSchema>;\n\nexport const ListDustConversionsInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** Page size: default 20, at most 100. */\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(100))),\n /** Previous `nextPageToken`; reuse only with the same account. */\n pageToken: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.transform(\n ({ account, limit, pageToken }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n pageToken,\n }) satisfies MessageInitShape<typeof Proto.ListDustConversionsRequestSchema>,\n ),\n);\n\nexport type ListDustConversionsInput = v.InferInput<typeof ListDustConversionsInputSchema>;\n\n/** Wire `*_e18` U128 → exact decimal string; an unset amount is `\"0\"`. */\nfunction e18ToDecimal(value: U128Value | undefined): string {\n return scaledToDecimalOutput(fromU128(value), E18_SCALE);\n}\n\nconst AmountE18Schema = v.optional(U128Schema);\n\n/** Decimal scale a wire price may carry, as catalog scales are bounded. */\nconst PriceScaleSchema = v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(18));\n\n/** One Trading balance judged for conversion. Amounts are decimal strings. */\nexport const DustBalanceSchema = v.pipe(\n v.object({\n assetId: v.number(),\n amountE18: AmountE18Schema,\n eligibility: enumLabelSchema(DustAssetEligibilityCodec.protoToOutput),\n usdValueE18: AmountE18Schema,\n }),\n v.transform((balance) => ({\n assetId: balance.assetId,\n /** The whole available balance: what no open order or other reservation holds. */\n amount: e18ToDecimal(balance.amountE18),\n eligibility: balance.eligibility,\n /** USD value, rounded down; null when the asset has no current price. */\n usdValue: balance.usdValueE18 === undefined ? null : e18ToDecimal(balance.usdValueE18),\n })),\n);\n\nexport type DustBalance = v.InferOutput<typeof DustBalanceSchema>;\n\n/** USD index price a quote used for one asset. */\nexport const DustAssetPriceSchema = v.pipe(\n v.object({\n assetId: v.number(),\n priceTicks: v.bigint(),\n priceScale: PriceScaleSchema,\n asOf: OptionalTimestampMsSchema,\n }),\n v.transform((price) => ({\n assetId: price.assetId,\n /** USD per whole asset unit, exact. */\n price: scaledToDecimalOutput(price.priceTicks, price.priceScale),\n /** Time of the oldest index observation the price used. */\n asOf: price.asOf ?? null,\n })),\n);\n\nexport type DustAssetPrice = v.InferOutput<typeof DustAssetPriceSchema>;\n\nexport const DustConversionSchema = v.pipe(\n v.object({\n conversionId: v.pipe(v.string(), v.minLength(1)),\n quoteId: v.pipe(v.string(), v.minLength(1)),\n state: enumLabelSchema(DustConversionStateCodec.protoToOutput),\n refusalCode: v.number(),\n targetAssetId: v.number(),\n sources: v.array(v.object({ assetId: v.number(), amountE18: AmountE18Schema })),\n payoutE18: AmountE18Schema,\n quotedPayoutE18: AmountE18Schema,\n feeE18: AmountE18Schema,\n feeBps: v.number(),\n createdAt: OptionalTimestampMsSchema,\n completedAt: OptionalTimestampMsSchema,\n }),\n v.transform((conversion) => ({\n conversionId: conversion.conversionId,\n /** The quote the conversion converted. */\n quoteId: conversion.quoteId,\n state: conversion.state,\n /** Why a `refused` conversion was refused; null otherwise. */\n refusalCode:\n conversion.refusalCode === ErrorCode.UNSPECIFIED\n ? null\n : (codeName(ErrorCode, conversion.refusalCode) ?? \"UNSPECIFIED\"),\n targetAssetId: conversion.targetAssetId,\n /** Whole quoted balances moved, in asset id order. */\n sources: conversion.sources.map((source) => ({\n assetId: source.assetId,\n amount: e18ToDecimal(source.amountE18),\n })),\n /** Target amount credited after the fee, at the index prices when it was created. */\n payout: e18ToDecimal(conversion.payoutE18),\n /** The payout the quote showed. */\n quotedPayout: e18ToDecimal(conversion.quotedPayoutE18),\n /** Fee taken from the payout, in the target asset. */\n fee: e18ToDecimal(conversion.feeE18),\n feeBps: conversion.feeBps,\n createdAt: conversion.createdAt ?? null,\n /** Null until `completed`. */\n completedAt: conversion.completedAt ?? null,\n })),\n);\n\n/** One conversion of the account's dust into a target asset. Amounts are decimal strings. */\nexport type DustConversion = v.InferOutput<typeof DustConversionSchema>;\n\nexport const ListDustBalancesResultSchema = v.pipe(\n v.object({\n targetAssetId: v.number(),\n targets: v.array(v.number()),\n feeBps: v.number(),\n balances: v.array(DustBalanceSchema),\n grossUsdE18: AmountE18Schema,\n payoutE18: AmountE18Schema,\n targetAvailable: v.boolean(),\n }),\n v.transform((result) => ({\n /** Target the balances were judged for. */\n targetAssetId: result.targetAssetId,\n /** Every asset the account can convert dust into, in preference order. */\n targets: result.targets,\n /** Fee taken from the payout. */\n feeBps: result.feeBps,\n /** Every nonzero available Trading balance, in asset id order. */\n balances: result.balances,\n /** Eligible balances' total USD value, rounded down. */\n grossUsd: e18ToDecimal(result.grossUsdE18),\n /** Target amount they would bring now, after the fee. */\n payout: e18ToDecimal(result.payoutE18),\n /** False when the target cannot be paid now; `quote` is then refused. */\n targetAvailable: result.targetAvailable,\n })),\n);\n\n/** The account's balances judged for one target. Reserves nothing. */\nexport type ListDustBalancesResult = v.InferOutput<typeof ListDustBalancesResultSchema>;\n\nexport const DustConversionQuoteSchema = v.pipe(\n v.object({\n quoteId: v.string(),\n expiresAt: OptionalTimestampMsSchema,\n targetAssetId: v.number(),\n feeBps: v.number(),\n grossUsdE18: AmountE18Schema,\n payoutE18: AmountE18Schema,\n balances: v.array(DustBalanceSchema),\n prices: v.array(DustAssetPriceSchema),\n }),\n v.transform((quote) => ({\n /** Pass to `create`. Empty when nothing converts; `balances` says why. */\n quoteId: quote.quoteId,\n /** After this, `create` refuses the quote with `DUST_QUOTE_EXPIRED`. */\n expiresAt: quote.expiresAt ?? null,\n targetAssetId: quote.targetAssetId,\n /** Fee taken from the payout. */\n feeBps: quote.feeBps,\n /** Sources' total USD value, rounded down. */\n grossUsd: e18ToDecimal(quote.grossUsdE18),\n /** Target amount after the fee, rounded down to the target's quantity precision. */\n payout: e18ToDecimal(quote.payoutE18),\n /** Every nonzero available Trading balance, sources and others, in asset id order. */\n balances: quote.balances,\n /** Prices of the sources and the target, in asset id order. */\n prices: quote.prices,\n })),\n);\n\n/** A quote valid for 30 seconds. Reserves nothing. */\nexport type DustConversionQuote = v.InferOutput<typeof DustConversionQuoteSchema>;\n\nexport const ListDustConversionsResultSchema = v.object({\n conversions: v.array(DustConversionSchema),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\n/** One page of conversions, newest first; an empty `nextPageToken` means no more. */\nexport type ListDustConversionsResult = v.InferOutput<typeof ListDustConversionsResultSchema>;\n"],"mappings":";;;;;;;;;;;AAgBA,MAAM,4BAA4B,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AAE7E,MAAa,8BAA8B,EAAE,KACzC,EAAE,aAAa;CACX,GAAG;;CAEH,eAAe,EAAE,SAAS,yBAAyB;AACvD,CAAC,GACD,EAAE,WACG,EAAE,SAAS,qBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,iCAAiC,EAAE,KAC5C,EAAE,aAAa;CACX,GAAG;;CAEH,eAAe;AACnB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,qBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa;;CAEX,GAAG;;CAEH,SAAS;;CAET,gBAAgB;AACpB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,SAAS,sBAChB;CACG,cAAc,2BAA2B,OAAO;CAChD;CACA;AACJ,EACR,CACJ;AAIA,MAAa,+BAA+B,EAAE,KAC1C,EAAE,aAAa;CACX,GAAG;CACH,cAAc;AAClB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,oBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,iCAAiC,EAAE,KAC5C,EAAE,aAAa;CACX,GAAG;;CAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QA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S,EAAE,OAAO;CAClB,WAAW;CACX,eAAe,EAAE,OAAO;CACxB,QAAQ,EAAE,OAAO;CACjB,aAAa;CACb,WAAW;CACX,UAAU,EAAE,MAAM,iBAAiB;CACnC,QAAQ,EAAE,MAAM,oBAAoB;AACxC,CAAC,GACD,EAAE,WAAW,WAAW;;CAEpB,SAAS,MAAM;;CAEf,WAAW,MAAM,aAAa;CAC9B,eAAe,MAAM;;CAErB,QAAQ,MAAM;;CAEd,UAAU,aAAa,MAAM,WAAW;;CAExC,QAAQ,aAAa,MAAM,SAAS;;CAEpC,UAAU,MAAM;;CAEhB,QAAQ,MAAM;AAClB,EAAE,CACN;AAKA,MAAa,kCAAkC,EAAE,OAAO;CACpD,aAAa,EAAE,MAAM,oBAAoB;CACzC,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;AAC5C,CAAC"}
|
|
1
|
+
{"version":3,"file":"dust-conversion.schemas.js","names":[],"sources":["../../../src/services/dust-conversion/dust-conversion.schemas.ts"],"sourcesContent":["import type { MessageInitShape } from \"@bufbuild/protobuf\";\nimport * as v from \"valibot\";\nimport type * as Proto from \"../../gen/transfer/v1/dust_conversion_pb.js\";\nimport { ErrorCode } from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { E18_SCALE, scaledToDecimalOutput } from \"../../shared/decimal-surface.js\";\nimport { codeName } from \"../../shared/error-detail.js\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport { OptionalTimestampMsSchema, U128Schema } from \"../../shared/schemas.js\";\nimport { fromU128, type U128Value } from \"../../utils/u128.js\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport { DustAssetEligibilityCodec, DustConversionStateCodec } from \"./dust-conversion.codecs.js\";\n\n// Sent exactly as given: trimming would make \" k \" and \"k\" the same idempotency key.\nconst RequiredInputStringSchema = v.pipe(v.string(), v.minLength(1));\n\nexport const ListDustBalancesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** One of the response's `targets`; omit for the first. */\n targetAssetId: v.optional(PositiveUint32InputSchema),\n }),\n v.transform(\n ({ account, targetAssetId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n targetAssetId,\n }) satisfies MessageInitShape<typeof Proto.ListDustBalancesRequestSchema>,\n ),\n);\n\nexport type ListDustBalancesInput = v.InferInput<typeof ListDustBalancesInputSchema>;\n\nexport const QuoteDustConversionInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** One of `listBalances`' `targets`. */\n targetAssetId: PositiveUint32InputSchema,\n }),\n v.transform(\n ({ account, targetAssetId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n targetAssetId,\n }) satisfies MessageInitShape<typeof Proto.QuoteDustConversionRequestSchema>,\n ),\n);\n\nexport type QuoteDustConversionInput = v.InferInput<typeof QuoteDustConversionInputSchema>;\n\nexport const CreateDustConversionInputSchema = v.pipe(\n v.strictObject({\n /** Must select the quote's account. */\n ...AccountScopeInputEntries,\n /** `quoteId` from `quote`, at most 30 seconds old. A quote converts once. */\n quoteId: RequiredInputStringSchema,\n /** Stable key collapsing retries for the account; reusing it returns the same conversion. */\n idempotencyKey: RequiredInputStringSchema,\n }),\n v.transform(\n ({ account, quoteId, idempotencyKey }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n quoteId,\n idempotencyKey,\n }) satisfies MessageInitShape<typeof Proto.CreateDustConversionRequestSchema>,\n ),\n);\n\nexport type CreateDustConversionInput = v.InferInput<typeof CreateDustConversionInputSchema>;\n\nexport const GetDustConversionInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n conversionId: RequiredInputStringSchema,\n }),\n v.transform(\n ({ account, conversionId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n conversionId,\n }) satisfies MessageInitShape<typeof Proto.GetDustConversionRequestSchema>,\n ),\n);\n\nexport type GetDustConversionInput = v.InferInput<typeof GetDustConversionInputSchema>;\n\nexport const ListDustConversionsInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** Page size: default 20, at most 100. */\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(100))),\n /** Previous `nextPageToken`; reuse only with the same account. */\n pageToken: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.transform(\n ({ account, limit, pageToken }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n pageToken,\n }) satisfies MessageInitShape<typeof Proto.ListDustConversionsRequestSchema>,\n ),\n);\n\nexport type ListDustConversionsInput = v.InferInput<typeof ListDustConversionsInputSchema>;\n\n/** Wire `*_e18` U128 → exact decimal string; an unset amount is `\"0\"`. */\nfunction e18ToDecimal(value: U128Value | undefined): string {\n return scaledToDecimalOutput(fromU128(value), E18_SCALE);\n}\n\nconst AmountE18Schema = v.optional(U128Schema);\n\n/** Decimal scale a wire price may carry, as catalog scales are bounded. */\nconst PriceScaleSchema = v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(18));\n\n/** One Trading balance judged for conversion. Amounts are decimal strings. */\nexport const DustBalanceSchema = v.pipe(\n v.object({\n assetId: v.number(),\n amountE18: AmountE18Schema,\n eligibility: enumLabelSchema(DustAssetEligibilityCodec.protoToOutput),\n usdValueE18: AmountE18Schema,\n }),\n v.transform((balance) => ({\n assetId: balance.assetId,\n /** The whole available balance: what no open order or other reservation holds. */\n amount: e18ToDecimal(balance.amountE18),\n eligibility: balance.eligibility,\n /** USD value, rounded down; null when the asset has no current price. */\n usdValue: balance.usdValueE18 === undefined ? null : e18ToDecimal(balance.usdValueE18),\n })),\n);\n\nexport type DustBalance = v.InferOutput<typeof DustBalanceSchema>;\n\n/** USD index price a quote used for one asset. */\nexport const DustAssetPriceSchema = v.pipe(\n v.object({\n assetId: v.number(),\n priceTicks: v.bigint(),\n priceScale: PriceScaleSchema,\n asOf: OptionalTimestampMsSchema,\n }),\n v.transform((price) => ({\n assetId: price.assetId,\n /** USD per whole asset unit, exact. */\n price: scaledToDecimalOutput(price.priceTicks, price.priceScale),\n /** Time of the oldest index observation the price used. */\n asOf: price.asOf ?? null,\n })),\n);\n\nexport type DustAssetPrice = v.InferOutput<typeof DustAssetPriceSchema>;\n\nexport const DustConversionSchema = v.pipe(\n v.object({\n conversionId: v.pipe(v.string(), v.minLength(1)),\n quoteId: v.pipe(v.string(), v.minLength(1)),\n state: enumLabelSchema(DustConversionStateCodec.protoToOutput),\n refusalCode: v.number(),\n targetAssetId: v.number(),\n sources: v.array(v.object({ assetId: v.number(), amountE18: AmountE18Schema })),\n payoutE18: AmountE18Schema,\n quotedPayoutE18: AmountE18Schema,\n feeE18: AmountE18Schema,\n feeBps: v.number(),\n createdAt: OptionalTimestampMsSchema,\n completedAt: OptionalTimestampMsSchema,\n }),\n v.transform((conversion) => ({\n conversionId: conversion.conversionId,\n /** The quote the conversion converted. */\n quoteId: conversion.quoteId,\n state: conversion.state,\n /** Why a `refused` conversion was refused; null otherwise. */\n refusalCode:\n conversion.refusalCode === ErrorCode.UNSPECIFIED\n ? null\n : (codeName(ErrorCode, conversion.refusalCode) ?? \"UNSPECIFIED\"),\n targetAssetId: conversion.targetAssetId,\n /** Whole quoted balances moved, in asset id order. */\n sources: conversion.sources.map((source) => ({\n assetId: source.assetId,\n amount: e18ToDecimal(source.amountE18),\n })),\n /** Target amount credited after the fee, at the index prices when it was created. */\n payout: e18ToDecimal(conversion.payoutE18),\n /** The payout the quote showed. */\n quotedPayout: e18ToDecimal(conversion.quotedPayoutE18),\n /** Fee taken from the payout, in the target asset. */\n fee: e18ToDecimal(conversion.feeE18),\n feeBps: conversion.feeBps,\n createdAt: conversion.createdAt ?? null,\n /** Null until `completed`. */\n completedAt: conversion.completedAt ?? null,\n })),\n);\n\n/** One conversion of the account's dust into a target asset. Amounts are decimal strings. */\nexport type DustConversion = v.InferOutput<typeof DustConversionSchema>;\n\nexport const ListDustBalancesResultSchema = v.pipe(\n v.object({\n targetAssetId: v.number(),\n targets: v.array(v.number()),\n feeBps: v.number(),\n balances: v.array(DustBalanceSchema),\n grossUsdE18: AmountE18Schema,\n payoutE18: AmountE18Schema,\n targetAvailable: v.boolean(),\n }),\n v.transform((result) => ({\n /** Target the balances were judged for. */\n targetAssetId: result.targetAssetId,\n /** Every asset the account can convert dust into, in preference order. */\n targets: result.targets,\n /** Fee taken from the payout. */\n feeBps: result.feeBps,\n /** Every nonzero available Trading balance, in asset id order. */\n balances: result.balances,\n /** Eligible balances' total USD value, rounded down. */\n grossUsd: e18ToDecimal(result.grossUsdE18),\n /** Target amount they would bring now, after the fee. */\n payout: e18ToDecimal(result.payoutE18),\n /** False when the target cannot be paid now; `quote` is then refused. */\n targetAvailable: result.targetAvailable,\n })),\n);\n\n/** The account's balances judged for one target. Reserves nothing. */\nexport type ListDustBalancesResult = v.InferOutput<typeof ListDustBalancesResultSchema>;\n\nexport const DustConversionQuoteSchema = v.pipe(\n v.object({\n quoteId: v.string(),\n expiresAt: OptionalTimestampMsSchema,\n targetAssetId: v.number(),\n feeBps: v.number(),\n grossUsdE18: AmountE18Schema,\n payoutE18: AmountE18Schema,\n balances: v.array(DustBalanceSchema),\n prices: v.array(DustAssetPriceSchema),\n }),\n v.transform((quote) => ({\n /** Pass to `create`. Empty when nothing converts; `balances` says why. */\n quoteId: quote.quoteId,\n /** After this, `create` refuses the quote with `DUST_QUOTE_EXPIRED`. */\n expiresAt: quote.expiresAt ?? null,\n targetAssetId: quote.targetAssetId,\n /** Fee taken from the payout. */\n feeBps: quote.feeBps,\n /** Sources' total USD value, rounded down. */\n grossUsd: e18ToDecimal(quote.grossUsdE18),\n /** Target amount after the fee, rounded down to the target's quantity precision. */\n payout: e18ToDecimal(quote.payoutE18),\n /** Every nonzero available Trading balance, sources and others, in asset id order. */\n balances: quote.balances,\n /** Prices of the sources and the target, in asset id order. */\n prices: quote.prices,\n })),\n);\n\n/** A quote valid for 30 seconds. Reserves nothing. */\nexport type DustConversionQuote = v.InferOutput<typeof DustConversionQuoteSchema>;\n\nexport const ListDustConversionsResultSchema = v.object({\n conversions: v.array(DustConversionSchema),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\n/** One page of conversions, newest first; an empty `nextPageToken` means no more. */\nexport type ListDustConversionsResult = v.InferOutput<typeof ListDustConversionsResultSchema>;\n"],"mappings":";;;;;;;;;;;AAiBA,MAAM,4BAA4B,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,UAAU,CAAC,CAAC;AAEnE,MAAa,8BAA8B,EAAE,KACzC,EAAE,aAAa;CACX,GAAG;;CAEH,eAAe,EAAE,SAAS,yBAAyB;AACvD,CAAC,GACD,EAAE,WACG,EAAE,SAAS,qBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,iCAAiC,EAAE,KAC5C,EAAE,aAAa;CACX,GAAG;;CAEH,eAAe;AACnB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,qBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa;;CAEX,GAAG;;CAEH,SAAS;;CAET,gBAAgB;AACpB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,SAAS,sBAChB;CACG,cAAc,2BAA2B,OAAO;CAChD;CACA;AACJ,EACR,CACJ;AAIA,MAAa,+BAA+B,EAAE,KAC1C,EAAE,aAAa;CACX,GAAG;CACH,cAAc;AAClB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,oBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,iCAAiC,EAAE,KAC5C,EAAE,aAAa;CACX,GAAG;;CAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CAAC;;CAEjF,WAAW,EAAE,SAAS,EAAE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;CACX,UAAU,EAAE,MAAM,iBAAiB;CACnC,QAAQ,EAAE,MAAM,oBAAoB;AACxC,CAAC,GACD,EAAE,WAAW,WAAW;;CAEpB,SAAS,MAAM;;CAEf,WAAW,MAAM,aAAa;CAC9B,eAAe,MAAM;;CAErB,QAAQ,MAAM;;CAEd,UAAU,aAAa,MAAM,WAAW;;CAExC,QAAQ,aAAa,MAAM,SAAS;;CAEpC,UAAU,MAAM;;CAEhB,QAAQ,MAAM;AAClB,EAAE,CACN;AAKA,MAAa,kCAAkC,EAAE,OAAO;CACpD,aAAa,EAAE,MAAM,oBAAoB;CACzC,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;AAC5C,CAAC"}
|
|
@@ -14,7 +14,7 @@ type TimestampInit = {
|
|
|
14
14
|
declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
15
15
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
16
16
|
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
|
|
17
|
-
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 |
|
|
17
|
+
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 10 | 5 | 20 | 100 | 200 | 500 | 1000 | 50, HeatmapDepth>]>;
|
|
18
18
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
|
|
19
19
|
readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
|
|
20
20
|
readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
|
|
@@ -227,7 +227,7 @@ type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
|
|
|
227
227
|
declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
228
228
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
229
229
|
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
|
|
230
|
-
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 |
|
|
230
|
+
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 10 | 5 | 20 | 100 | 200 | 500 | 1000 | 50>]>;
|
|
231
231
|
readonly chain: v.OptionalSchema<v.ObjectSchema<{
|
|
232
232
|
readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
|
|
233
233
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
@@ -287,7 +287,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
287
287
|
}, undefined>, v.TransformAction<{
|
|
288
288
|
symbolId: number;
|
|
289
289
|
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
290
|
-
depth: 1 |
|
|
290
|
+
depth: 1 | "unspecified" | 10 | 5 | 20 | 100 | 200 | 500 | 1000 | 50;
|
|
291
291
|
chain?: {
|
|
292
292
|
baseKeyframe?: {
|
|
293
293
|
tsSec: number;
|
|
@@ -347,7 +347,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
347
347
|
}, {
|
|
348
348
|
symbolId: number;
|
|
349
349
|
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
350
|
-
depth: 1 |
|
|
350
|
+
depth: 1 | "unspecified" | 10 | 5 | 20 | 100 | 200 | 500 | 1000 | 50;
|
|
351
351
|
chain: {
|
|
352
352
|
baseKeyframe: {
|
|
353
353
|
tsSec: number;
|
|
@@ -2,14 +2,19 @@ import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
|
2
2
|
//#region src/services/internal-transfers/internal-transfers.codecs.d.ts
|
|
3
3
|
declare const INTERNAL_TRANSFER_STATUS_VALUES: readonly ["accepted", "rejected", "failed"];
|
|
4
4
|
type InternalTransferStatus = (typeof INTERNAL_TRANSFER_STATUS_VALUES)[number];
|
|
5
|
-
declare const INTERNAL_TRANSFER_BATCH_STATUS_VALUES: readonly ["
|
|
6
|
-
/**
|
|
5
|
+
declare const INTERNAL_TRANSFER_BATCH_STATUS_VALUES: readonly ["refused", "processing", "accepted"];
|
|
6
|
+
/**
|
|
7
|
+
* `"accepted"`: every leg is credited. `"refused"`: nothing moved, and nothing will under this
|
|
8
|
+
* idempotency key. `"processing"`: the outcome is not known yet; the batch completes on its own,
|
|
9
|
+
* ending accepted or refused. Read it with `internalTransfers.getBatch` by its `requestId`, or
|
|
10
|
+
* retry with the same idempotency key.
|
|
11
|
+
*/
|
|
7
12
|
type InternalTransferBatchStatus = (typeof INTERNAL_TRANSFER_BATCH_STATUS_VALUES)[number];
|
|
8
|
-
declare const INTERNAL_TRANSFER_BATCH_LEG_STATUS_VALUES: readonly ["
|
|
13
|
+
declare const INTERNAL_TRANSFER_BATCH_LEG_STATUS_VALUES: readonly ["processing", "credited", "not_moved"];
|
|
9
14
|
/**
|
|
10
|
-
* `"
|
|
11
|
-
* `
|
|
12
|
-
*
|
|
15
|
+
* `"processing"`: the leg's outcome is its batch's, not known yet. `"credited"`: credited to its
|
|
16
|
+
* destination. `"not_moved"`: its batch was refused; `errorCode` is set on the legs that caused
|
|
17
|
+
* the refusal.
|
|
13
18
|
*/
|
|
14
19
|
type InternalTransferBatchLegStatus = (typeof INTERNAL_TRANSFER_BATCH_LEG_STATUS_VALUES)[number];
|
|
15
20
|
type InternalTransferErrorCode = keyof typeof ErrorCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-transfers.codecs.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.codecs.ts"],"mappings":";;cAuBa;KAED,iCAAiC;cAEhC
|
|
1
|
+
{"version":3,"file":"internal-transfers.codecs.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.codecs.ts"],"mappings":";;cAuBa;KAED,iCAAiC;cAEhC;;;;;;;KAQD,sCAAsC;cAWrC;;;;;;KAWD,yCACA;KAWA,yCAAyC"}
|