@polyester/sdk 0.36.0-devnet-20261118123359 → 0.36.0-devnet-20261118184607
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 +60 -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/ready-gated-subscription.js +1 -1
- package/dist/realtime/snapshot-then-stream.js +2 -0
- 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.d.ts +2 -2
- 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 +25 -25
- 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 +21 -19
- 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/claims/claims.schemas.d.ts +2 -2
- package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +2 -2
- 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.js +1 -1
- package/dist/services/lifecycle/lifecycle.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +55 -55
- 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 +50 -6
- 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 +1 -1
- package/dist/services/orders/order-enums.codecs.d.ts +2 -0
- package/dist/services/orders/order-errors.schemas.d.ts +49 -4
- 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 +290 -50
- package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-input.schemas.d.ts +55 -8
- 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 +10 -10
- package/dist/services/orders/orders.d.ts.map +1 -1
- package/dist/services/orders/orders.js +47 -43
- package/dist/services/orders/orders.js.map +1 -1
- 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 +3 -3
- 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/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 +37 -9
- package/dist/services/statement-exports/statement-exports.schemas.d.ts.map +1 -1
- package/dist/services/statement-exports/statement-exports.schemas.js +24 -5
- 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.js +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +22 -15
- 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.d.ts.map +1 -1
- package/dist/services/trades/trades.js +12 -4
- package/dist/services/trades/trades.js.map +1 -1
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- 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-input.schemas.d.ts +2 -2
- package/dist/services/triggers/triggers-output.schemas.d.ts +153 -35
- 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.d.ts.map +1 -1
- package/dist/services/triggers/triggers.js +16 -12
- 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 +7 -2
- package/dist/shared/connect-error-mapping.js.map +1 -1
- package/dist/shared/decimal-surface.d.ts +6 -0
- package/dist/shared/decimal-surface.d.ts.map +1 -1
- package/dist/shared/decimal-surface.js +65 -1
- package/dist/shared/decimal-surface.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/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/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
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AccountSigner, AccountSignerConfig, AccountSignerFactory, HexAddress }
|
|
|
2
2
|
import { CreatePolyesterEnvironmentParams, POLYESTER_DEVNET_ENVIRONMENT, POLYESTER_TESTNET_ENVIRONMENT, PolyesterAccountAbstractionEnvironment, PolyesterContractsEnvironment, PolyesterEntryPointConfig, PolyesterEnvironment, PolyesterSafeDeploymentConfig, createPolyesterEnvironment } from "./environment.js";
|
|
3
3
|
import { CreatePolyesterAccountSignerParams } from "./account-signer/create-polyester-account-signer.js";
|
|
4
4
|
import "./account-signer/index.js";
|
|
5
|
-
import { AssetConfig, DepositWithdrawConfig, PairConfig, PairStatus, SpotConfig, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig, ZipperMemoRequirement, ZipperRouteStatus } from "./shared/catalog-config.js";
|
|
5
|
+
import { AssetConfig, DepositWithdrawConfig, PairConfig, PairStatus, SpotConfig, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig, ZipperMemoRequirement, ZipperRouteStatus, ZipperSupplyStatus } from "./shared/catalog-config.js";
|
|
6
6
|
import { OrderErrorCode, OrderErrorDetail } from "./services/orders/order-errors.schemas.js";
|
|
7
7
|
import { RateLimitDetail, RateLimitFailureReason, RateLimitPolicyClass, RateLimitRefillModel, RateLimitScope } from "./shared/rate-limit.schemas.js";
|
|
8
8
|
import { PolyesterErrorDetail, loadErrorDetailDecoders } from "./shared/error-detail.js";
|
|
@@ -19,11 +19,12 @@ import { ApiKeyPolicy, ApiKeyPolicyApplyInput, ApiKeyPolicyCreateInput, ApiKeyPo
|
|
|
19
19
|
import { ApiKey, ApiKeyIdInput, ApiKeyStatus, ApiKeysCreateInput, ApiKeysListInput, ApiKeysUpdateInput, AssistantKeySpecInput, SetAssistantKeysInput } from "./services/api-keys/api-keys.schemas.js";
|
|
20
20
|
import { SubaccountPolicy, SubaccountPolicyApplyInput, SubaccountPolicyCreateInput, SubaccountPolicyUpdateInput } from "./services/policies/subaccount-policies/subaccount-policies.schemas.js";
|
|
21
21
|
import { AccountCodeValue, TransferCodeValue } from "./shared/ledger-codes.js";
|
|
22
|
-
import { BalanceHistoryInput, BalanceHistoryResponse, BalanceRange, EquityGroupBy, EquityHistoryInput, EquityHistoryResponse, EquitySeries, EquitySeriesGrouping,
|
|
22
|
+
import { BalanceHistoryInput, BalanceHistoryResponse, BalanceRange, EquityGroupBy, EquityHistoryInput, EquityHistoryResponse, EquitySeries, EquitySeriesGrouping, LedgerBalance, PortfolioEquityHistoryInput, PortfolioEquityHistoryResponse, PortfolioEquitySeries, PortfolioEquitySeriesGrouping, PortfolioEquitySnapshotResponse, formatLedgerBalance } from "./services/balances/balances.schemas.js";
|
|
23
23
|
import { CreateSubaccountChallengeInput, CreateSubaccountInput, CreateSubaccountResult as CreateSubaccountResult$1, EffectiveSubaccountPermissions, GetSubaccountInput, InviteSubaccountMemberInput, ListSubaccountInvitesInput, RemoveSubaccountMemberInput, RespondSubaccountInviteInput, SetSubaccountMemberMfaRequirementInput, Subaccount, SubaccountActivityInput, SubaccountChallenge, SubaccountEvent, SubaccountIdInput, SubaccountInvite, SubaccountInviteStatus, SubaccountMember, SubaccountPermission, SubaccountPermissionDefinition, SubaccountRole, SubaccountRoleCatalog, SubaccountRoleDefinition, SubaccountStatus, UpdateSubaccountInput, UpdateSubaccountMemberRoleInput } from "./services/subaccounts/subaccounts.schemas.js";
|
|
24
|
+
import { AccountActivityEvent, ListAccountActivityInput, ListAccountActivityResult } from "./services/account-activity/account-activity.schemas.js";
|
|
24
25
|
import { Candle, CandleColumnar, CandleColumnarInt, CandleInt, GetCandlesColumnsInput, GetCandlesInput, Timeframe } from "./services/candles/candles.schemas.js";
|
|
25
26
|
import { ChainAnalyticsRange, GetUnifiedAssetBalancesInput, GetZippedAssetSupplyGroupInput, GetZippedAssetSupplyInput, UnifiedAssetBalancesResponse, ZippedAssetSupplyGroupResponse, ZippedAssetSupplyResponse, ZippedAssetSupplySeries } from "./services/chain-analytics/chain-analytics.schemas.js";
|
|
26
|
-
import { AssetEditorialInfo, AssetInfo, GetMarketTradesInput, ListAssetInfoInput, MarketTrade, TradeBackfill } from "./services/market-data/market-data.schemas.js";
|
|
27
|
+
import { AssetEditorialInfo, AssetInfo, AssetMarketStats, AssetMarketValue, GetMarketTradesInput, ListAssetInfoInput, MarketTrade, TradeBackfill } from "./services/market-data/market-data.schemas.js";
|
|
27
28
|
import { CurrencyConversionConfig, CurrencyConversionRates, CurrencyMetadata, FiatConversionRate, FiatConversionSnapshot, ListMarketOverviewInput, MarketOverview, MarketOverviewOrderBy, MarketOverviewSort, MarketOverviewSparkline, SparklineIntervalName, SpotPairVolumeSeries, SpotVolumeHistoryInput, SpotVolumeHistoryResponse, StablecoinConversionRate } from "./services/market-overview/market-overview.schemas.js";
|
|
28
29
|
import { GetOrderbookInput, OrderbookData, OrderbookLevel } from "./services/orderbook/orderbook.schemas.js";
|
|
29
30
|
import { CreateOrderbookSubscriptionInput, OrderbookStreamHandlers, OrderbookSubscription } from "./services/orderbook/orderbook.js";
|
|
@@ -43,11 +44,11 @@ import { ListTriggersResult } from "./services/triggers/triggers.js";
|
|
|
43
44
|
import { CancelPriceAlertInput, CreatePriceAlertInput, ListPriceAlertsInput, ListPriceAlertsResult, PriceAlert, UpdatePriceAlertInput, UpdatePriceAlertResult } from "./services/price-alerts/price-alerts.schemas.js";
|
|
44
45
|
import { AccountNotification, AccountNotificationDetail, GetNotificationInput, ListNotificationsInput, ListNotificationsResult, MarkAllNotificationsReadInput, MarkNotificationsInput, NotificationCounts } from "./services/notifications/notifications.schemas.js";
|
|
45
46
|
import { AssistantApprovalPreview, AssistantOrderPreview, AssistantRunEvent, AssistantView } from "./services/assistant/assistant-events.schemas.js";
|
|
46
|
-
import { AssistantAccountSelection, AssistantApprovalDecision, AssistantApprovalStatus, AssistantDisplaySetting, AssistantFailureCategory, AssistantKeyState, AssistantKeyView, AssistantMemoryKind, AssistantMessageRole, AssistantOrderPriceField, AssistantPriceOffsetDirection, AssistantPriceRounding, AssistantReferencePriceSource, AssistantTriggerChangeAction, AssistantTriggerDirection, AssistantUnfilledSlicePolicy } from "./services/assistant/assistant.codecs.js";
|
|
47
|
-
import { AssistantConversation, AssistantKey, AssistantMemory, AssistantMessage, AssistantRunIdInput, CompleteAssistantKeysInput, DecideAssistantApprovalInput, DeleteAssistantMemoryInput, ListAssistantConversationsInput, ListAssistantConversationsResult, ListAssistantKeysInput, ListAssistantMemoriesInput, ListAssistantMemoriesResult, ListAssistantMessagesInput, ListAssistantMessagesResult, PrepareAssistantKeysInput, PrepareAssistantKeysResult, PreparedAssistantKey, SendAssistantMessageInput, SetTelegramApprovalLimitsInput, TelegramApprovalLimits, WatchAssistantRunInput } from "./services/assistant/assistant.schemas.js";
|
|
48
|
-
import { CreateStatementExportInput, GetStatementExportInput, ListStatementExportsInput, ListStatementExportsResult, StatementExport } from "./services/statement-exports/statement-exports.schemas.js";
|
|
47
|
+
import { AssistantAccountSelection, AssistantApprovalDecision, AssistantApprovalStatus, AssistantDisplaySetting, AssistantFailureCategory, AssistantFundingMode, AssistantKeyState, AssistantKeyView, AssistantMemoryKind, AssistantMessageRole, AssistantModelKeyCheck, AssistantOrderPriceField, AssistantPriceOffsetDirection, AssistantPriceRounding, AssistantReferencePriceSource, AssistantTriggerChangeAction, AssistantTriggerDirection, AssistantUnfilledSlicePolicy } from "./services/assistant/assistant.codecs.js";
|
|
48
|
+
import { AssistantConversation, AssistantKey, AssistantMemory, AssistantMessage, AssistantMessageImage, AssistantModelKey, AssistantRunIdInput, AssistantUsage, CompleteAssistantKeysInput, DecideAssistantApprovalInput, DeleteAssistantMemoryInput, GetAssistantMessageImageInput, ListAssistantConversationsInput, ListAssistantConversationsResult, ListAssistantKeysInput, ListAssistantMemoriesInput, ListAssistantMemoriesResult, ListAssistantMessagesInput, ListAssistantMessagesResult, PrepareAssistantKeysInput, PrepareAssistantKeysResult, PreparedAssistantKey, SendAssistantMessageInput, SetAssistantModelKeyInput, SetTelegramApprovalLimitsInput, TelegramApprovalLimits, WatchAssistantRunInput } from "./services/assistant/assistant.schemas.js";
|
|
49
|
+
import { CancelStatementExportInput, CreateStatementExportInput, GetStatementExportDownloadUrlInput, GetStatementExportInput, ListStatementExportsInput, ListStatementExportsResult, StatementExport, StatementExportDownloadUrl } from "./services/statement-exports/statement-exports.schemas.js";
|
|
49
50
|
import { LedgerTransfer, LedgerTransferSide, ListTransfersInput } from "./services/transfers/transfers.schemas.js";
|
|
50
|
-
import { BatchCreateInternalTransfersInput, BatchCreateInternalTransfersResult, CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferResult, InternalTransferBatchLegInput, InternalTransferBatchLegResult, InternalTransferDestination, ResolvedInternalTransferDestination } from "./services/internal-transfers/internal-transfers.schemas.js";
|
|
51
|
+
import { BatchCreateInternalTransfersInput, BatchCreateInternalTransfersResult, CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferBatchInput, GetInternalTransferInput, GetInternalTransferResult, InternalTransferBatchLegInput, InternalTransferBatchLegResult, InternalTransferDestination, ResolvedInternalTransferDestination } from "./services/internal-transfers/internal-transfers.schemas.js";
|
|
51
52
|
import { CreateDustConversionInput, DustAssetPrice, DustBalance, DustConversion, DustConversionQuote, GetDustConversionInput, ListDustBalancesInput, ListDustBalancesResult, ListDustConversionsInput, ListDustConversionsResult, QuoteDustConversionInput } from "./services/dust-conversion/dust-conversion.schemas.js";
|
|
52
53
|
import { CreateTradingWithdrawResult, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToFundingInput, GetWalletBalancesInput, GetWalletBalancesResult, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationResult } from "./services/trading-withdraws/trading-withdraws.schemas.js";
|
|
53
54
|
import { CreateTradingWithdrawToExternalChainServiceInput, CreateTradingWithdrawToFundingServiceInput, PreparedTradingWithdraw, TradingWithdrawSigningConfig, TradingWithdrawWalletSigner } from "./services/trading-withdraws/trading-withdraws.js";
|
|
@@ -64,7 +65,7 @@ import { ClaimCampaign, ClaimDailyRewardInput, ClaimDailyRewardResult, ClaimPayo
|
|
|
64
65
|
import { Checkpoint, CheckpointAssetAmount, CheckpointBiggestTrade, CheckpointChainFlow, CheckpointEarnedBadge, CheckpointFlowTotal, CheckpointFundingDay, CheckpointFundingFlowSummary, CheckpointOrderToolCounts, CheckpointOrderTypeCounts, CheckpointPairActivity, CheckpointPortfolioValuePoint, CheckpointTimeInForceCounts, CheckpointVipTierChange, CheckpointVolumePoint, ListCheckpointsInput } from "./services/checkpoints/checkpoints.schemas.js";
|
|
65
66
|
import { ChangelogChange, ChangelogChangeEntry, ChangelogDeploymentGroup, ChangelogDeploymentGroupSummary, ChangelogPost, ChangelogPostSummary, ChangelogSection, GetChangelogDeploymentGroupInput, GetChangelogPostInput, ListChangelogChangesInput, ListChangelogChangesResult, ListChangelogDeploymentGroupsInput, ListChangelogDeploymentGroupsResult, ListChangelogPostsInput, ListChangelogPostsResult } from "./services/changelog/changelog.schemas.js";
|
|
66
67
|
import { ListStatusEventsInput, ListStatusEventsResult, StatusEvent } from "./services/system/system.schemas.js";
|
|
67
|
-
import { SystemVersion } from "./services/system/system.js";
|
|
68
|
+
import { SystemTime, SystemVersion } from "./services/system/system.js";
|
|
68
69
|
import { AcknowledgeRewardAwardInput, AcknowledgeRewardAwardResult, ListRewardAwardsInput, ListRewardAwardsResult, RewardAward, SetRewardDestinationInput, SetRewardDestinationResult } from "./services/rewards/rewards.schemas.js";
|
|
69
70
|
import { NextVipTierThresholds, VipMetricQuality, VipMetricStatus, VipStatus, VipTier, VipTierCatalog } from "./services/vip/vip.schemas.js";
|
|
70
71
|
import { GetSpotFeeRatesInput, SpotFeeDiscount, SpotFeeRate, SpotFeeRateBreakdown } from "./services/fees/fees.schemas.js";
|
|
@@ -91,6 +92,7 @@ import { mergeLedgerBalances } from "./services/balances/balances.merge.js";
|
|
|
91
92
|
import { compareUnsignedIntegerStrings, shouldApplyReconciliationUpdate } from "./shared/reconciliation.js";
|
|
92
93
|
import { tsObjToNsString } from "./utils/time.js";
|
|
93
94
|
import { EvmHex, checksumEvmAddress, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, isEvmAddress, isEvmAddressStrict, keccak256Hex } from "./utils/evm.js";
|
|
95
|
+
import "./services/account-activity/account-activity.types.js";
|
|
94
96
|
import "./services/accounts/accounts.types.js";
|
|
95
97
|
import "./services/address-book/address-book.types.js";
|
|
96
98
|
import { AssistantKeyPreset } from "./services/api-keys/api-keys.codecs.js";
|
|
@@ -117,6 +119,7 @@ import "./services/heatmap/heatmap.types.js";
|
|
|
117
119
|
import { InternalTransferBatchLegStatus, InternalTransferBatchStatus, InternalTransferErrorCode, InternalTransferStatus } from "./services/internal-transfers/internal-transfers.codecs.js";
|
|
118
120
|
import "./services/internal-transfers/internal-transfers.types.js";
|
|
119
121
|
import "./services/lifecycle/lifecycle.types.js";
|
|
122
|
+
import { AssetDataSourceValue } from "./services/market-data/market-data.codecs.js";
|
|
120
123
|
import "./services/market-data/market-data.types.js";
|
|
121
124
|
import "./services/market-overview/market-overview.types.js";
|
|
122
125
|
import "./services/mfa/mfa.types.js";
|
|
@@ -140,10 +143,11 @@ import "./services/subaccounts/subaccounts.types.js";
|
|
|
140
143
|
import { StatusEventImpact, StatusEventKind, StatusEventService, StatusEventState } from "./services/system/system.codecs.js";
|
|
141
144
|
import "./services/system/system.types.js";
|
|
142
145
|
import "./services/trades/trades.types.js";
|
|
146
|
+
import { WalletAssetUnavailableReasonValue } from "./services/trading-withdraws/trading-withdraws.codecs.js";
|
|
143
147
|
import "./services/trading-withdraws/trading-withdraws.types.js";
|
|
144
148
|
import { TransferSideKind } from "./services/transfers/transfers.codecs.js";
|
|
145
149
|
import "./services/transfers/transfers.types.js";
|
|
146
150
|
import "./services/triggers/triggers.types.js";
|
|
147
151
|
import "./services/vip/vip.types.js";
|
|
148
152
|
import "./services/zipper/zipper.types.js";
|
|
149
|
-
export { type AccountCodeValue, type AccountIdentity, type AccountNotification, type AccountNotificationDetail, type AccountScope, type AccountScopedInput, type AccountSigner, type AccountSignerAuthEvents, type AccountSignerConfig, type CreateSubaccountResult as AccountSignerCreateSubaccountResult, type AccountSignerFactory, type AcknowledgeRewardAwardInput, type AcknowledgeRewardAwardResult, type ActiveAccountInfo, type AddressBook, type AddressBookAccountScope, type AddressBookEntries, type AddressBookEntriesView, type AddressBookEntry, type AddressBookRecentDestinationsView, type AddressBookTag, type AddressBookTagSummary, type AddressBookView, type AddressBookViewInvalidated, AlreadyExistsError, type ApiKey, type ApiKeyEd25519AuthProvider, type ApiKeyIdInput, type ApiKeyPolicy, type ApiKeyPolicyApplyInput, type ApiKeyPolicyCreateInput, type ApiKeyPolicyUpdateInput, type ApiKeyStatus, type ApiKeysCreateInput, type ApiKeysListInput, type ApiKeysUpdateInput, type AssetConfig, type AssetEditorialInfo, type AssetInfo, type AssistantAccountSelection, type AssistantApprovalDecision, type AssistantApprovalPreview, type AssistantApprovalStatus, type AssistantConversation, type AssistantDisplaySetting, type AssistantFailureCategory, type AssistantKey, type AssistantKeyPreset, type AssistantKeySpecInput, type AssistantKeyState, type AssistantKeyView, type AssistantMemory, type AssistantMemoryKind, type AssistantMessage, type AssistantMessageRole, type AssistantOrderPreview, type AssistantOrderPriceField, type AssistantPriceOffsetDirection, type AssistantPriceRounding, type AssistantReferencePriceSource, type AssistantRunEvent, type AssistantRunIdInput, type AssistantTriggerChangeAction, type AssistantTriggerDirection, type AssistantUnfilledSlicePolicy, type AssistantView, type AuthCookieLocation, type AuthHydrationData, type AuthLoginMethod, type AuthState, type AuthTokenStorage, type AuthTokenStorageSetOptions, AuthenticationError, type AutoWithdrawCadence, type AutoWithdrawDestination, type AutoWithdrawDestinationInput, type AutoWithdrawHoldReason, type AutoWithdrawPause, type AutoWithdrawPauseReason, type AutoWithdrawPreview, type AutoWithdrawPreviewAsset, type AutoWithdrawPreviewStatus, type AutoWithdrawRule, type AutoWithdrawRun, type AutoWithdrawRunReason, type AutoWithdrawRunState, type AutoWithdrawSchedule, type AutoWithdrawScheduleInput, type AutoWithdrawScopedInput, type AutoWithdrawStep, type AutoWithdrawStepReason, type AutoWithdrawStepState, type AutoWithdrawWeekday, type BalanceHistoryInput, type BalanceHistoryResponse, type BalanceRange, type BatchCancelOrderInput, type BatchCancelOrderResult, type BatchCancelOrdersInput, type BatchCancelOrdersResult, type BatchCancelTriggerResult, type BatchCancelTriggersInput, type BatchCancelTriggersResult, type BatchCreateInternalTransfersInput, type BatchCreateInternalTransfersResult, type BatchCreateOrderResult, type BatchCreateOrdersInput, type BatchCreateOrdersResult, type BatchGuardApprovals, type BatchReplaceAdmissionItem, type BatchReplaceOrdersInput, type BatchReplaceOrdersResult, type BatchSignProtectedActionInput, type BeginMfaChallengeInput, type BeginMfaChallengeResult, type BeginPasskeyEnrollmentInput, type BeginPasskeyEnrollmentResult, type BeginTotpEnrollmentInput, type BeginTotpEnrollmentResult, type BrokerAllowlistAction, type BrokerAllowlistEvent, type CancelAllAfterInput, type CancelAllAfterResult, type CancelAllOrdersInput, type CancelAllOrdersResponse, type CancelOcoInput, type CancelOcoResult, type CancelOrderInput, type CancelOrderResult, type CancelPriceAlertInput, type CancelTriggerInput, type CancelTriggerResult, type Candle, type CandleColumnar, type CandleColumnarInt, type CandleInt, type ChainAnalyticsRange, type ChangelogAudience, type ChangelogChange, type ChangelogChangeAvailability, type ChangelogChangeCategory, type ChangelogChangeEntry, type ChangelogDeploymentGroup, type ChangelogDeploymentGroupSummary, type ChangelogEnvironment, type ChangelogPost, type ChangelogPostSummary, type ChangelogSection, type ChangelogSort, type ChangelogSurface, type Checkpoint, type CheckpointAssetAmount, type CheckpointBadge, type CheckpointBiggestTrade, type CheckpointChainFlow, type CheckpointEarnedBadge, type CheckpointField, type CheckpointFlowTotal, type CheckpointFundingDay, type CheckpointFundingFlowSummary, type CheckpointOrderToolCounts, type CheckpointOrderTypeCounts, type CheckpointPairActivity, type CheckpointPortfolioValuePoint, type CheckpointTimeInForceCounts, type CheckpointVipTierChange, type CheckpointVolumePoint, type ClaimCampaign, type ClaimDailyRewardInput, type ClaimDailyRewardResult, type ClaimFreshStepUpInput, type ClaimFreshStepUpResult, type ClaimGeneratedUsernameInput, ClaimOutcomeUnknownError, type ClaimOutcomeUnknownErrorOptions, type ClaimPayoutDelayReason, type ClaimPolicy, type ColumnarTimeWindow, type CompleteAssistantKeysInput, type CompleteMfaChallengeResult, ConfigurationError, type ConfirmVerificationInput, type ConnectChannelParams, type ConnectPrivateOrdersParams, type ConsumeFreshStepUpInput, type CookieAuthTokenStorageOptions, type CopyAddressBookEntryInput, type CreateAddressBookEntryInput, type CreateAddressBookTagInput, type CreateDepositAddressInput, type CreateDustConversionInput, type CreateGuardSignerWalletResult, type CreateInternalTransferInput, type CreateInternalTransferResult, type CreateOcoInput, type CreateOcoResult, type CreateOrderResult, type CreateOrderbookSubscriptionInput, type CreatePolyesterAccountSignerParams, type CreatePolyesterEnvironmentParams, type CreatePriceAlertInput, type CreateServerClientFromCookiesParams, type CreateServerClientFromRequestParams, type CreateStatementExportInput, type CreateSubaccountChallengeInput, type CreateSubaccountInput, type CreateSubaccountParams, type CreateSubaccountResult$1 as CreateSubaccountResult, type CreateSubaccountResult$1 as CreateSubaccountServiceResult, type CreateTradingWithdrawResult, type CreateTradingWithdrawToExternalChainInput, type CreateTradingWithdrawToExternalChainServiceInput, type CreateTradingWithdrawToFundingInput, type CreateTradingWithdrawToFundingServiceInput, type CreateTriggerInput, type CreateTriggerResult, type CreateWalletChallengeInput, type CurrencyConversionConfig, type CurrencyConversionRates, type CurrencyMetadata, type DailyClaimReward, type DailyClaimState, type DailyClaimStatus, type DailyClaimTransfer, type DecideAssistantApprovalInput, type DeleteAddressBookEntryInput, type DeleteAddressBookTagInput, type DeleteAssistantMemoryInput, type DeleteMfaFactorInput, type DepositAddress, type DepositWithdrawConfig, type DustAssetEligibility, type DustAssetPrice, type DustBalance, type DustConversion, type DustConversionQuote, type DustConversionRefusalCode, type DustConversionState, type EffectiveSubaccountPermissions, type EquityGroupBy, type EquityHistoryInput, type EquityHistoryResponse, type EquitySeries, type EquitySeriesGrouping, type EvmHex, type ExportGuardSignerWalletResult, type ExportStatementInput, type FiatConversionRate, type FiatConversionSnapshot, type FinishPasskeyChallengeInput, type FinishPasskeyEnrollmentInput, type FinishPasskeyEnrollmentResult, type FinishTotpEnrollmentInput, type FinishTotpEnrollmentResult, type GeneratedUsernameOffer, type GetAddressBookViewInput, type GetBatchReplaceStatusInput, type GetBatchReplaceStatusResult, type GetCandlesColumnsInput, type GetCandlesInput, type GetChangelogDeploymentGroupInput, type GetChangelogPostInput, type GetDustConversionInput, type GetInternalTransferInput, type GetInternalTransferResult, type GetLifecycleAccountFlowInput, type GetLifecycleFlowInput, type GetLifecycleFlowOutput, type GetMarketTradesInput, type GetNotificationInput, type GetOrderDetailsInput, type GetOrderbookHeatmapInput, type GetOrderbookInput, type GetSpotFeeRatesInput, type GetStatementExportInput, type GetSubaccountInput, type GetTriggerInput, type GetUnifiedAssetBalancesInput, type GetUserTradesInput, type GetVerificationResponse, type GetWalletBalancesInput, type GetWalletBalancesResult, type GetZippedAssetSupplyGroupInput, type GetZippedAssetSupplyInput, type GuardApproval, type GuardSignerScopedInput, type GuardSignerStatus, type HeatmapDepthValue, type HeatmapIntervalValue, type HeatmapQuantityModeValue, type HexAddress, InternalServerError, type InternalTransferBatchLegInput, type InternalTransferBatchLegResult, type InternalTransferBatchLegStatus, type InternalTransferBatchStatus, type InternalTransferDestination, type InternalTransferErrorCode, type InternalTransferStatus, type InternalTransferWhitelistEntries, type InternalTransferWhitelistEntry, type InviteSubaccountMemberInput, type JwtAuthProvider, type LadderDetailsOutput, type LedgerBalance, type LedgerTransfer, type LedgerTransferSide, type LifecycleAssetIds, type LifecycleFlowDetail, type LifecycleFlowState, type LifecycleFlowStep, type LifecycleFlowStepActivity, type LifecycleFlowSummary, type LifecycleFlowSummaryProgress, type LifecycleFlowTimelineItem, type LifecycleFlowTxMatch, type LifecycleListOrderBy, type LifecycleListScope, type LifecycleReason, type LifecycleRequestFee, type LifecycleRequestFeeStatus, type LifecycleSort, type LifecycleTxLookupKind, type LifecycleZipperReason, type LifecycleZipperReasonCode, type ListAddressBookEntriesInput, type ListApiKeyPoliciesResponse, type ListAssetInfoInput, type ListAssistantConversationsInput, type ListAssistantConversationsResult, type ListAssistantKeysInput, type ListAssistantMemoriesInput, type ListAssistantMemoriesResult, type ListAssistantMessagesInput, type ListAssistantMessagesResult, type ListAutoWithdrawRunsInput, type ListAutoWithdrawRunsResult, type ListChangelogChangesInput, type ListChangelogChangesResult, type ListChangelogDeploymentGroupsInput, type ListChangelogDeploymentGroupsResult, type ListChangelogPostsInput, type ListChangelogPostsResult, type ListCheckpointsInput, type ListDepositAddressesInput, type ListDustBalancesInput, type ListDustBalancesResult, type ListDustConversionsInput, type ListDustConversionsResult, type ListInternalTransferWhitelistEntriesInput, type ListLifecycleAccountFlowsInput, type ListLifecycleFlowsByTxInput, type ListLifecycleFlowsByTxOutput, type ListLifecycleFlowsInput, type ListLifecycleFlowsOutput, type ListMarketOverviewInput, type ListMfaFactorsResult, type ListNotificationsInput, type ListNotificationsResult, type ListPriceAlertsInput, type ListPriceAlertsResult, type ListRewardAwardsInput, type ListRewardAwardsResult, type ListStatementExportsInput, type ListStatementExportsResult, type ListStatusEventsInput, type ListStatusEventsResult, type ListSubaccountInvitesInput, type ListTransferCounterpartiesInput, type ListTransferDestinationsInput, type ListTransfersInput, type ListTriggerEventsInput, type ListTriggerEventsResult, type ListTriggersInput, type ListTriggersResult, type LoginOptions, type LoginResult, type LoginWithWalletInput, type LoginWithWalletResponse, type MarkAllNotificationsReadInput, type MarkNotificationsInput, type MarketOverview, type MarketOverviewOrderBy, type MarketOverviewSort, type MarketOverviewSparkline, type MarketTrade, type Me, MfaEnrollmentRequiredError, type MfaFactor, MfaLastFactorRequiredError, MfaRequiredError, type MfaSessionInfo, MfaVerificationError, type MfaVerificationFailureReason, type MirroredWithdrawWhitelistEntry, type ModifyOrderInput, type ModifyOrderResult, type ModifyTriggerInput, type ModifyTriggerResult, NetworkError, type NewOrderInput, type NextVipTierThresholds, NotImplementedError, type NotificationCategory, type NotificationCounts, type NotificationReadState, type NotificationType, type OpenOrdersInput, type Order, type OrderDetails, type OrderErrorCode, type OrderErrorDetail, type OrderHistoryInput, type OrderIntentInput, type OrderLineage, type OrderTransfer, type OrderbookData, type OrderbookHeatmapDeltaBucket, type OrderbookHeatmapDeltaChain, type OrderbookHeatmapDeltaLevels, type OrderbookHeatmapKeyframe, type OrderbookHeatmapLevels, type OrderbookHeatmapLiveBucket, type OrderbookHeatmapResponse, type OrderbookLevel, type OrderbookStreamHandlers, type OrderbookSubscription, OutcomeUnknownError, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_DEVNET_ENVIRONMENT, POLYESTER_SESSION_COOKIE_NAME, POLYESTER_TESTNET_ENVIRONMENT, type PairConfig, type PairStatus, type PauseTriggerInput, type PauseTriggerResult, PermissionError, type PolicyAction, PolicyInUseError, PolicyLockedError, type PolicyMarketScope, PolicyScopeMismatchError, type PolyesterAccountAbstractionEnvironment, PolyesterBrowserClient, type PolyesterBrowserClientConfig, PolyesterBrowserCore, PolyesterClient, type PolyesterClientBaseConfig, type PolyesterClientConfig, type PolyesterContractsEnvironment, PolyesterCore, type PolyesterEntryPointConfig, type PolyesterEnvironment, PolyesterError, type PolyesterErrorCode, type PolyesterErrorDetail, type PolyesterErrorOptions, type PolyesterMutationOptions, type PolyesterRealtime, type PolyesterRealtimeAuthConfig, type PolyesterRequestOptions, type PolyesterSafeDeploymentConfig, PolyesterServerClient, type PolyesterServerClientConfig, PolyesterServerCore, type PolyesterServices, type PortfolioEquityHistoryInput, type PortfolioEquityHistoryResponse, type PortfolioEquitySeries, type PortfolioEquitySeriesGrouping, type PortfolioEquitySnapshotResponse, PreconditionFailedError, type PrepareAssistantKeysInput, type PrepareAssistantKeysResult, type PreparedAssistantKey, type PreparedTradingWithdraw, type PreviewOrderResult, type PriceAlert, type PriceAlertChannel, type PriceAlertDirection, type PriceAlertPriceSource, type PriceAlertStatus, type PriceAlertUpdateOutcome, type PrivateOrdersEvent, type Profile, type QuoteDustConversionInput, type RateLimitConfig, type RateLimitDetail, RateLimitError, type RateLimitErrorOptions, type RateLimitFailureReason, type RateLimitPolicyClass, type RateLimitRefillModel, type RateLimitScope, type RealtimeConnection, type RealtimeConnectionState, type RealtimeConnectionStatus, RealtimeError, type RealtimeErrorOptions, type RegenerateRecoveryCodesInput, type RegenerateRecoveryCodesResult, type ReleaseFreshStepUpInput, type RemoveSubaccountMemberInput, RequestDeadlineExceededError, RequestError, RequestTooLargeError, type ResolveAccountInput, type ResolvedAccount, type ResolvedInternalTransferDestination, ResourceNotFoundError, type RespondSubaccountInviteInput, type ResumeTriggerInput, type ResumeTriggerResult, RevisionConflictError, type RewardAward, type RewardFulfillmentMethod, type RewardFulfillmentState, type RiskPolicyInput, type RotateGuardSignerWalletResult, type SdkSubscriptionErrorContext, type SendAssistantMessageInput, type ServerSessionCookieOptions, type ServerSessionSnapshot, ServiceUnavailableError, type SessionData, SessionElevationRequiredError, type SetAssistantKeysInput, type SetAutoWithdrawRuleEnabledInput, type SetAutoWithdrawRuleInput, type SetRewardDestinationInput, type SetRewardDestinationResult, type SetSubaccountMemberMfaRequirementInput, type SetTelegramApprovalLimitsInput, type SignProtectedActionInput, type SocialProvider, type SocialProviderInput, type SocialVerification, type SocialVerificationErrorCode, type SocialVerificationMethod, type SocialVerificationStatus, type SparklineIntervalName, type SpotConfig, type SpotFeeDiscount, type SpotFeeRate, type SpotFeeRateBreakdown, type SpotPairVolumeSeries, type SpotVolumeHistoryInput, type SpotVolumeHistoryResponse, type StablecoinConversionRate, StaleQuoteError, type StartVerificationInput, type StartVerificationResponse, type Statement, type StatementExport, type StatementExportFailureReason, type StatementExportStatus, type StatementPage, type StatusEvent, type StatusEventImpact, type StatusEventKind, type StatusEventService, type StatusEventState, StepUpRequiredError, type StopDetailsOutput, type StopLossInput, type Subaccount, type SubaccountActivityInput, type SubaccountChallenge, SubaccountChallengeInvalidError, type SubaccountEvent, type SubaccountIdInput, type SubaccountInvite, type SubaccountInviteStatus, type SubaccountMember, type SubaccountPermission, type SubaccountPermissionDefinition, type SubaccountPolicy, type SubaccountPolicyApplyInput, type SubaccountPolicyCreateInput, type SubaccountPolicyUpdateInput, type SubaccountRole, type SubaccountRoleCatalog, type SubaccountRoleDefinition, type SubaccountScopedInput, type SubaccountStatus, type SubscribeHandlers, type SubscribeZippedAssetSupplyInput, type SystemVersion, type TakeProfitInput, type TelegramApprovalAction, type TelegramApprovalLimits, type Timeframe, TimeoutError, TimestampSkewError, type Trade, type TradeBackfill, type TradingRateLimitClass, type TradingRateLimitRule, type TradingRateLimits, type TradingWithdrawSigningConfig, type TradingWithdrawWalletSigner, type TrailingDetailsOutput, type TrailingStopInput, type TransferCodeValue, type TransferCounterparties, type TransferCounterparty, type TransferDestination, type TransferDestinations, type TransferSideKind, TransientError, type Transports, type Trigger, type TriggerDetailsOutput, type TriggerEvent, type TwapDetailsOutput, type UnifiedAssetBalancesResponse, type UnlinkSocialAccountInput, type UpdateAddressBookEntryInput, type UpdateAddressBookTagInput, type UpdateMfaFactorInput, type UpdateMfaFactorResult, type UpdatePriceAlertInput, type UpdatePriceAlertResult, type UpdateProfileInput, type UpdateSubaccountInput, type UpdateSubaccountMemberRoleInput, UserOperationAlreadyKnownError, UserOperationNotExecutedError, UserOperationSendTimeoutError, type UsernameHistoryEntry, type ValidateWithdrawDestinationInput, type ValidateWithdrawDestinationResult, ValidationError, type VerificationReadyResponse, type VerifyRecoveryCodeChallengeInput, type VerifyTotpChallengeInput, type VipMetricQuality, type VipMetricStatus, type VipStatus, type VipTier, type VipTierCatalog, type WalletChallenge, type WatchAssistantRunInput, WithdrawDeadlineExpiredError, type WithdrawWhitelistView, type ZippedAssetSupplyBatch, type ZippedAssetSupplyGroupResponse, type ZippedAssetSupplyResponse, type ZippedAssetSupplySeries, type ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, type ZipperMemoRequirement, type ZipperRouteStatus, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, createPolyesterServerCoreFromCookies, createPolyesterServerCoreFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatLedgerBalance, formatUserFacingError, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, isTimeoutAbortError, keccak256Hex, loadErrorDetailDecoders, mergeLedgerBalances, normalizeErrorMessage, resolveAuthCookieName, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
|
|
153
|
+
export { type AccountActivityEvent, type AccountCodeValue, type AccountIdentity, type AccountNotification, type AccountNotificationDetail, type AccountScope, type AccountScopedInput, type AccountSigner, type AccountSignerAuthEvents, type AccountSignerConfig, type CreateSubaccountResult as AccountSignerCreateSubaccountResult, type AccountSignerFactory, type AcknowledgeRewardAwardInput, type AcknowledgeRewardAwardResult, type ActiveAccountInfo, type AddressBook, type AddressBookAccountScope, type AddressBookEntries, type AddressBookEntriesView, type AddressBookEntry, type AddressBookRecentDestinationsView, type AddressBookTag, type AddressBookTagSummary, type AddressBookView, type AddressBookViewInvalidated, AlreadyExistsError, type ApiKey, type ApiKeyEd25519AuthProvider, type ApiKeyIdInput, type ApiKeyPolicy, type ApiKeyPolicyApplyInput, type ApiKeyPolicyCreateInput, type ApiKeyPolicyUpdateInput, type ApiKeyStatus, type ApiKeysCreateInput, type ApiKeysListInput, type ApiKeysUpdateInput, type AssetConfig, type AssetDataSourceValue, type AssetEditorialInfo, type AssetInfo, type AssetMarketStats, type AssetMarketValue, type AssistantAccountSelection, type AssistantApprovalDecision, type AssistantApprovalPreview, type AssistantApprovalStatus, type AssistantConversation, type AssistantDisplaySetting, type AssistantFailureCategory, type AssistantFundingMode, type AssistantKey, type AssistantKeyPreset, type AssistantKeySpecInput, type AssistantKeyState, type AssistantKeyView, type AssistantMemory, type AssistantMemoryKind, type AssistantMessage, type AssistantMessageImage, type AssistantMessageRole, type AssistantModelKey, type AssistantModelKeyCheck, type AssistantOrderPreview, type AssistantOrderPriceField, type AssistantPriceOffsetDirection, type AssistantPriceRounding, type AssistantReferencePriceSource, type AssistantRunEvent, type AssistantRunIdInput, type AssistantTriggerChangeAction, type AssistantTriggerDirection, type AssistantUnfilledSlicePolicy, type AssistantUsage, type AssistantView, type AuthCookieLocation, type AuthHydrationData, type AuthLoginMethod, type AuthState, type AuthTokenStorage, type AuthTokenStorageSetOptions, AuthenticationError, type AutoWithdrawCadence, type AutoWithdrawDestination, type AutoWithdrawDestinationInput, type AutoWithdrawHoldReason, type AutoWithdrawPause, type AutoWithdrawPauseReason, type AutoWithdrawPreview, type AutoWithdrawPreviewAsset, type AutoWithdrawPreviewStatus, type AutoWithdrawRule, type AutoWithdrawRun, type AutoWithdrawRunReason, type AutoWithdrawRunState, type AutoWithdrawSchedule, type AutoWithdrawScheduleInput, type AutoWithdrawScopedInput, type AutoWithdrawStep, type AutoWithdrawStepReason, type AutoWithdrawStepState, type AutoWithdrawWeekday, type BalanceHistoryInput, type BalanceHistoryResponse, type BalanceRange, type BatchCancelOrderInput, type BatchCancelOrderResult, type BatchCancelOrdersInput, type BatchCancelOrdersResult, type BatchCancelTriggerResult, type BatchCancelTriggersInput, type BatchCancelTriggersResult, type BatchCreateInternalTransfersInput, type BatchCreateInternalTransfersResult, type BatchCreateOrderResult, type BatchCreateOrdersInput, type BatchCreateOrdersResult, type BatchGuardApprovals, type BatchReplaceAdmissionItem, type BatchReplaceOrdersInput, type BatchReplaceOrdersResult, type BatchSignProtectedActionInput, type BeginMfaChallengeInput, type BeginMfaChallengeResult, type BeginPasskeyEnrollmentInput, type BeginPasskeyEnrollmentResult, type BeginTotpEnrollmentInput, type BeginTotpEnrollmentResult, type BrokerAllowlistAction, type BrokerAllowlistEvent, type CancelAllAfterInput, type CancelAllAfterResult, type CancelAllOrdersInput, type CancelAllOrdersResponse, type CancelOcoInput, type CancelOcoResult, type CancelOrderInput, type CancelOrderResult, type CancelPriceAlertInput, type CancelStatementExportInput, type CancelTriggerInput, type CancelTriggerResult, type Candle, type CandleColumnar, type CandleColumnarInt, type CandleInt, type ChainAnalyticsRange, type ChangelogAudience, type ChangelogChange, type ChangelogChangeAvailability, type ChangelogChangeCategory, type ChangelogChangeEntry, type ChangelogDeploymentGroup, type ChangelogDeploymentGroupSummary, type ChangelogEnvironment, type ChangelogPost, type ChangelogPostSummary, type ChangelogSection, type ChangelogSort, type ChangelogSurface, type Checkpoint, type CheckpointAssetAmount, type CheckpointBadge, type CheckpointBiggestTrade, type CheckpointChainFlow, type CheckpointEarnedBadge, type CheckpointField, type CheckpointFlowTotal, type CheckpointFundingDay, type CheckpointFundingFlowSummary, type CheckpointOrderToolCounts, type CheckpointOrderTypeCounts, type CheckpointPairActivity, type CheckpointPortfolioValuePoint, type CheckpointTimeInForceCounts, type CheckpointVipTierChange, type CheckpointVolumePoint, type ClaimCampaign, type ClaimDailyRewardInput, type ClaimDailyRewardResult, type ClaimFreshStepUpInput, type ClaimFreshStepUpResult, type ClaimGeneratedUsernameInput, ClaimOutcomeUnknownError, type ClaimOutcomeUnknownErrorOptions, type ClaimPayoutDelayReason, type ClaimPolicy, type ColumnarTimeWindow, type CompleteAssistantKeysInput, type CompleteMfaChallengeResult, ConfigurationError, type ConfirmVerificationInput, type ConnectChannelParams, type ConnectPrivateOrdersParams, type ConsumeFreshStepUpInput, type CookieAuthTokenStorageOptions, type CopyAddressBookEntryInput, type CreateAddressBookEntryInput, type CreateAddressBookTagInput, type CreateDepositAddressInput, type CreateDustConversionInput, type CreateGuardSignerWalletResult, type CreateInternalTransferInput, type CreateInternalTransferResult, type CreateOcoInput, type CreateOcoResult, type CreateOrderResult, type CreateOrderbookSubscriptionInput, type CreatePolyesterAccountSignerParams, type CreatePolyesterEnvironmentParams, type CreatePriceAlertInput, type CreateServerClientFromCookiesParams, type CreateServerClientFromRequestParams, type CreateStatementExportInput, type CreateSubaccountChallengeInput, type CreateSubaccountInput, type CreateSubaccountParams, type CreateSubaccountResult$1 as CreateSubaccountResult, type CreateSubaccountResult$1 as CreateSubaccountServiceResult, type CreateTradingWithdrawResult, type CreateTradingWithdrawToExternalChainInput, type CreateTradingWithdrawToExternalChainServiceInput, type CreateTradingWithdrawToFundingInput, type CreateTradingWithdrawToFundingServiceInput, type CreateTriggerInput, type CreateTriggerResult, type CreateWalletChallengeInput, type CurrencyConversionConfig, type CurrencyConversionRates, type CurrencyMetadata, type DailyClaimReward, type DailyClaimState, type DailyClaimStatus, type DailyClaimTransfer, type DecideAssistantApprovalInput, type DeleteAddressBookEntryInput, type DeleteAddressBookTagInput, type DeleteAssistantMemoryInput, type DeleteMfaFactorInput, type DepositAddress, type DepositWithdrawConfig, type DustAssetEligibility, type DustAssetPrice, type DustBalance, type DustConversion, type DustConversionQuote, type DustConversionRefusalCode, type DustConversionState, type EffectiveSubaccountPermissions, type EquityGroupBy, type EquityHistoryInput, type EquityHistoryResponse, type EquitySeries, type EquitySeriesGrouping, type EvmHex, type ExportGuardSignerWalletResult, type FiatConversionRate, type FiatConversionSnapshot, type FinishPasskeyChallengeInput, type FinishPasskeyEnrollmentInput, type FinishPasskeyEnrollmentResult, type FinishTotpEnrollmentInput, type FinishTotpEnrollmentResult, type GeneratedUsernameOffer, type GetAddressBookViewInput, type GetAssistantMessageImageInput, type GetBatchReplaceStatusInput, type GetBatchReplaceStatusResult, type GetCandlesColumnsInput, type GetCandlesInput, type GetChangelogDeploymentGroupInput, type GetChangelogPostInput, type GetDustConversionInput, type GetInternalTransferBatchInput, type GetInternalTransferInput, type GetInternalTransferResult, type GetLifecycleAccountFlowInput, type GetLifecycleFlowInput, type GetLifecycleFlowOutput, type GetMarketTradesInput, type GetNotificationInput, type GetOrderDetailsInput, type GetOrderbookHeatmapInput, type GetOrderbookInput, type GetSpotFeeRatesInput, type GetStatementExportDownloadUrlInput, type GetStatementExportInput, type GetSubaccountInput, type GetTriggerInput, type GetUnifiedAssetBalancesInput, type GetUserTradesInput, type GetVerificationResponse, type GetWalletBalancesInput, type GetWalletBalancesResult, type GetZippedAssetSupplyGroupInput, type GetZippedAssetSupplyInput, type GuardApproval, type GuardSignerScopedInput, type GuardSignerStatus, type HeatmapDepthValue, type HeatmapIntervalValue, type HeatmapQuantityModeValue, type HexAddress, InternalServerError, type InternalTransferBatchLegInput, type InternalTransferBatchLegResult, type InternalTransferBatchLegStatus, type InternalTransferBatchStatus, type InternalTransferDestination, type InternalTransferErrorCode, type InternalTransferStatus, type InternalTransferWhitelistEntries, type InternalTransferWhitelistEntry, type InviteSubaccountMemberInput, type JwtAuthProvider, type LadderDetailsOutput, type LedgerBalance, type LedgerTransfer, type LedgerTransferSide, type LifecycleAssetIds, type LifecycleFlowDetail, type LifecycleFlowState, type LifecycleFlowStep, type LifecycleFlowStepActivity, type LifecycleFlowSummary, type LifecycleFlowSummaryProgress, type LifecycleFlowTimelineItem, type LifecycleFlowTxMatch, type LifecycleListOrderBy, type LifecycleListScope, type LifecycleReason, type LifecycleRequestFee, type LifecycleRequestFeeStatus, type LifecycleSort, type LifecycleTxLookupKind, type LifecycleZipperReason, type LifecycleZipperReasonCode, type ListAccountActivityInput, type ListAccountActivityResult, type ListAddressBookEntriesInput, type ListApiKeyPoliciesResponse, type ListAssetInfoInput, type ListAssistantConversationsInput, type ListAssistantConversationsResult, type ListAssistantKeysInput, type ListAssistantMemoriesInput, type ListAssistantMemoriesResult, type ListAssistantMessagesInput, type ListAssistantMessagesResult, type ListAutoWithdrawRunsInput, type ListAutoWithdrawRunsResult, type ListChangelogChangesInput, type ListChangelogChangesResult, type ListChangelogDeploymentGroupsInput, type ListChangelogDeploymentGroupsResult, type ListChangelogPostsInput, type ListChangelogPostsResult, type ListCheckpointsInput, type ListDepositAddressesInput, type ListDustBalancesInput, type ListDustBalancesResult, type ListDustConversionsInput, type ListDustConversionsResult, type ListInternalTransferWhitelistEntriesInput, type ListLifecycleAccountFlowsInput, type ListLifecycleFlowsByTxInput, type ListLifecycleFlowsByTxOutput, type ListLifecycleFlowsInput, type ListLifecycleFlowsOutput, type ListMarketOverviewInput, type ListMfaFactorsResult, type ListNotificationsInput, type ListNotificationsResult, type ListPriceAlertsInput, type ListPriceAlertsResult, type ListRewardAwardsInput, type ListRewardAwardsResult, type ListStatementExportsInput, type ListStatementExportsResult, type ListStatusEventsInput, type ListStatusEventsResult, type ListSubaccountInvitesInput, type ListTransferCounterpartiesInput, type ListTransferDestinationsInput, type ListTransfersInput, type ListTriggerEventsInput, type ListTriggerEventsResult, type ListTriggersInput, type ListTriggersResult, type LoginOptions, type LoginResult, type LoginWithWalletInput, type LoginWithWalletResponse, type MarkAllNotificationsReadInput, type MarkNotificationsInput, type MarketOverview, type MarketOverviewOrderBy, type MarketOverviewSort, type MarketOverviewSparkline, type MarketTrade, type Me, MfaEnrollmentRequiredError, type MfaFactor, MfaLastFactorRequiredError, MfaRequiredError, type MfaSessionInfo, MfaVerificationError, type MfaVerificationFailureReason, type MirroredWithdrawWhitelistEntry, type ModifyOrderInput, type ModifyOrderResult, type ModifyTriggerInput, type ModifyTriggerResult, NetworkError, type NewOrderInput, type NextVipTierThresholds, NotImplementedError, type NotificationCategory, type NotificationCounts, type NotificationReadState, type NotificationType, type OpenOrdersInput, type Order, type OrderDetails, type OrderErrorCode, type OrderErrorDetail, type OrderHistoryInput, type OrderIntentInput, type OrderLineage, type OrderTransfer, type OrderbookData, type OrderbookHeatmapDeltaBucket, type OrderbookHeatmapDeltaChain, type OrderbookHeatmapDeltaLevels, type OrderbookHeatmapKeyframe, type OrderbookHeatmapLevels, type OrderbookHeatmapLiveBucket, type OrderbookHeatmapResponse, type OrderbookLevel, type OrderbookStreamHandlers, type OrderbookSubscription, OutcomeUnknownError, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_DEVNET_ENVIRONMENT, POLYESTER_SESSION_COOKIE_NAME, POLYESTER_TESTNET_ENVIRONMENT, type PairConfig, type PairStatus, type PauseTriggerInput, type PauseTriggerResult, PermissionError, type PolicyAction, PolicyInUseError, PolicyLockedError, type PolicyMarketScope, PolicyScopeMismatchError, type PolyesterAccountAbstractionEnvironment, PolyesterBrowserClient, type PolyesterBrowserClientConfig, PolyesterBrowserCore, PolyesterClient, type PolyesterClientBaseConfig, type PolyesterClientConfig, type PolyesterContractsEnvironment, PolyesterCore, type PolyesterEntryPointConfig, type PolyesterEnvironment, PolyesterError, type PolyesterErrorCode, type PolyesterErrorDetail, type PolyesterErrorOptions, type PolyesterMutationOptions, type PolyesterRealtime, type PolyesterRealtimeAuthConfig, type PolyesterRequestOptions, type PolyesterSafeDeploymentConfig, PolyesterServerClient, type PolyesterServerClientConfig, PolyesterServerCore, type PolyesterServices, type PortfolioEquityHistoryInput, type PortfolioEquityHistoryResponse, type PortfolioEquitySeries, type PortfolioEquitySeriesGrouping, type PortfolioEquitySnapshotResponse, PreconditionFailedError, type PrepareAssistantKeysInput, type PrepareAssistantKeysResult, type PreparedAssistantKey, type PreparedTradingWithdraw, type PreviewOrderResult, type PriceAlert, type PriceAlertChannel, type PriceAlertDirection, type PriceAlertPriceSource, type PriceAlertStatus, type PriceAlertUpdateOutcome, type PrivateOrdersEvent, type Profile, type QuoteDustConversionInput, type RateLimitConfig, type RateLimitDetail, RateLimitError, type RateLimitErrorOptions, type RateLimitFailureReason, type RateLimitPolicyClass, type RateLimitRefillModel, type RateLimitScope, type RealtimeConnection, type RealtimeConnectionState, type RealtimeConnectionStatus, RealtimeError, type RealtimeErrorOptions, type RegenerateRecoveryCodesInput, type RegenerateRecoveryCodesResult, type ReleaseFreshStepUpInput, type RemoveSubaccountMemberInput, RequestDeadlineExceededError, RequestError, RequestTooLargeError, type ResolveAccountInput, type ResolvedAccount, type ResolvedInternalTransferDestination, ResourceNotFoundError, type RespondSubaccountInviteInput, type ResumeTriggerInput, type ResumeTriggerResult, RevisionConflictError, type RewardAward, type RewardFulfillmentMethod, type RewardFulfillmentState, type RiskPolicyInput, type RotateGuardSignerWalletResult, type SdkSubscriptionErrorContext, type SendAssistantMessageInput, type ServerSessionCookieOptions, type ServerSessionSnapshot, ServiceUnavailableError, type SessionData, SessionElevationRequiredError, type SetAssistantKeysInput, type SetAssistantModelKeyInput, type SetAutoWithdrawRuleEnabledInput, type SetAutoWithdrawRuleInput, type SetRewardDestinationInput, type SetRewardDestinationResult, type SetSubaccountMemberMfaRequirementInput, type SetTelegramApprovalLimitsInput, type SignProtectedActionInput, type SocialProvider, type SocialProviderInput, type SocialVerification, type SocialVerificationErrorCode, type SocialVerificationMethod, type SocialVerificationStatus, type SparklineIntervalName, type SpotConfig, type SpotFeeDiscount, type SpotFeeRate, type SpotFeeRateBreakdown, type SpotPairVolumeSeries, type SpotVolumeHistoryInput, type SpotVolumeHistoryResponse, type StablecoinConversionRate, StaleQuoteError, type StartVerificationInput, type StartVerificationResponse, type StatementExport, type StatementExportDownloadUrl, type StatementExportFailureReason, type StatementExportStatus, type StatusEvent, type StatusEventImpact, type StatusEventKind, type StatusEventService, type StatusEventState, StepUpRequiredError, type StopDetailsOutput, type StopLossInput, type Subaccount, type SubaccountActivityInput, type SubaccountChallenge, SubaccountChallengeInvalidError, type SubaccountEvent, type SubaccountIdInput, type SubaccountInvite, type SubaccountInviteStatus, type SubaccountMember, type SubaccountPermission, type SubaccountPermissionDefinition, type SubaccountPolicy, type SubaccountPolicyApplyInput, type SubaccountPolicyCreateInput, type SubaccountPolicyUpdateInput, type SubaccountRole, type SubaccountRoleCatalog, type SubaccountRoleDefinition, type SubaccountScopedInput, type SubaccountStatus, type SubscribeHandlers, type SubscribeZippedAssetSupplyInput, type SystemTime, type SystemVersion, type TakeProfitInput, type TelegramApprovalAction, type TelegramApprovalLimits, type Timeframe, TimeoutError, TimestampSkewError, type Trade, type TradeBackfill, type TradingRateLimitClass, type TradingRateLimitRule, type TradingRateLimits, type TradingWithdrawSigningConfig, type TradingWithdrawWalletSigner, type TrailingDetailsOutput, type TrailingStopInput, type TransferCodeValue, type TransferCounterparties, type TransferCounterparty, type TransferDestination, type TransferDestinations, type TransferSideKind, TransientError, type Transports, type Trigger, type TriggerDetailsOutput, type TriggerEvent, type TwapDetailsOutput, type UnifiedAssetBalancesResponse, type UnlinkSocialAccountInput, type UpdateAddressBookEntryInput, type UpdateAddressBookTagInput, type UpdateMfaFactorInput, type UpdateMfaFactorResult, type UpdatePriceAlertInput, type UpdatePriceAlertResult, type UpdateProfileInput, type UpdateSubaccountInput, type UpdateSubaccountMemberRoleInput, UserOperationAlreadyKnownError, UserOperationNotExecutedError, UserOperationSendTimeoutError, type UsernameHistoryEntry, type ValidateWithdrawDestinationInput, type ValidateWithdrawDestinationResult, ValidationError, type VerificationReadyResponse, type VerifyRecoveryCodeChallengeInput, type VerifyTotpChallengeInput, type VipMetricQuality, type VipMetricStatus, type VipStatus, type VipTier, type VipTierCatalog, type WalletAssetUnavailableReasonValue, type WalletChallenge, type WatchAssistantRunInput, WithdrawDeadlineExpiredError, type WithdrawWhitelistView, type ZippedAssetSupplyBatch, type ZippedAssetSupplyGroupResponse, type ZippedAssetSupplyResponse, type ZippedAssetSupplySeries, type ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, type ZipperMemoRequirement, type ZipperRouteStatus, type ZipperSupplyStatus, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, createPolyesterServerCoreFromCookies, createPolyesterServerCoreFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatLedgerBalance, formatUserFacingError, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, isTimeoutAbortError, keccak256Hex, loadErrorDetailDecoders, mergeLedgerBalances, normalizeErrorMessage, resolveAuthCookieName, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createReadyGate } from "../shared/decimal-surface.js";
|
|
2
1
|
import { publicationHandlerErrorContext } from "../shared/subscription-errors.js";
|
|
2
|
+
import { createReadyGate } from "../shared/decimal-surface.js";
|
|
3
3
|
//#region src/realtime/ready-gated-subscription.ts
|
|
4
4
|
/**
|
|
5
5
|
* Connects a transition feed whose publications require asynchronous catalog
|
|
@@ -80,6 +80,8 @@ function snapshotThenStream(params) {
|
|
|
80
80
|
retryAttempts++;
|
|
81
81
|
retryTimer = setTimeout(() => {
|
|
82
82
|
retryTimer = null;
|
|
83
|
+
const kind = params.channel.startsWith("private:") ? "private" : "public";
|
|
84
|
+
if (params.realtime.connection[kind].state === "disconnected") return;
|
|
83
85
|
refreshSnapshot(false);
|
|
84
86
|
}, delayMs);
|
|
85
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot-then-stream.js","names":[],"sources":["../../src/realtime/snapshot-then-stream.ts"],"sourcesContent":["import type { DescMessage, MessageShape } from \"@bufbuild/protobuf\";\nimport {\n createSdkSubscriptionErrorContext,\n type SdkSubscriptionErrorContext,\n} from \"../shared/subscription-errors.js\";\nimport type { PolyesterRealtime } from \"./types.js\";\nimport { formatConnectError } from \"../utils/errors.js\";\nimport { PolyesterError } from \"../shared/errors.js\";\nimport { isDev } from \"../utils/is-dev.js\";\n\nexport interface SnapshotThenStreamSubscription {\n unsubscribe: () => void;\n refreshSnapshot: () => void;\n isReady: () => boolean;\n isDisposed: () => boolean;\n}\n\nexport interface SnapshotThenStreamInput<TSchema extends DescMessage, TSnapshot, TPublication> {\n realtime: PolyesterRealtime;\n channel: string;\n schema: TSchema;\n maxBufferedPublications?: number;\n bufferPublicationKey?: (publication: TPublication) => PropertyKey;\n /** Exponential backoff from `delayMs`, capped at `maxDelayMs`; never retries a non-retryable PolyesterError. */\n snapshotRetry?: {\n maxAttempts: number;\n delayMs: number;\n maxDelayMs?: number;\n };\n snapshotFailureMode?: \"wait\" | \"live\" | ((error: unknown) => \"wait\" | \"live\");\n snapshotErrorLog?: string;\n fetchSnapshot: () => Promise<TSnapshot>;\n readPublication: (message: MessageShape<TSchema>) => readonly TPublication[];\n applySnapshot: (snapshot: TSnapshot, bufferedPublications: readonly TPublication[]) => void;\n applyLivePublications: (publications: readonly TPublication[]) => void;\n onOpen?: () => void;\n onClose?: () => void;\n onError?: (ctx: SdkSubscriptionErrorContext) => void;\n}\n\n/**\n * Snapshot-then-stream for feed state. By default, the buffer caps at\n * `maxBufferedPublications` and drops the OLDEST publications, which is correct for\n * ephemeral feeds where a later publication supersedes earlier ones. Keyed state can\n * provide `bufferPublicationKey` to retain the latest value for every key without FIFO\n * loss. Entity transitions (orders, triggers, balances, trades) must NOT use this —\n * their ordering contract lives in the app-side `EntityStreamStore`, which buffers\n * unbounded and replays because dropping an event loses a row transition.\n */\nexport function snapshotThenStream<TSchema extends DescMessage, TSnapshot, TPublication>(\n params: SnapshotThenStreamInput<TSchema, TSnapshot, TPublication>,\n): SnapshotThenStreamSubscription {\n const maxBufferedPublications = params.maxBufferedPublications ?? 200;\n let droppedPublications = 0;\n\n let ready = false;\n let disposed = false;\n let refreshGeneration = 0;\n let pendingPublications: TPublication[] = [];\n let retryAttempts = 0;\n let retryTimer: ReturnType<typeof setTimeout> | null = null;\n\n function reportSnapshotError(error: unknown): void {\n if (isDev() && params.snapshotErrorLog) {\n console.error(params.snapshotErrorLog, error);\n }\n params.onError?.(\n createSdkSubscriptionErrorContext(\n params.channel,\n \"snapshot\",\n error instanceof Error ? error : formatConnectError(error, \"snapshot failed\"),\n ),\n );\n }\n\n function takePendingPublications(): TPublication[] {\n const buffered = pendingPublications;\n pendingPublications = [];\n return buffered;\n }\n\n function applyBufferedAsLive(): void {\n const buffered = takePendingPublications();\n if (buffered.length === 0) return;\n applyLivePublications(buffered);\n }\n\n function bufferPublications(publications: readonly TPublication[]): void {\n if (params.bufferPublicationKey) {\n const byKey = new Map<PropertyKey, TPublication>();\n for (const publication of pendingPublications) {\n byKey.set(params.bufferPublicationKey(publication), publication);\n }\n for (const publication of publications) {\n byKey.set(params.bufferPublicationKey(publication), publication);\n }\n pendingPublications = Array.from(byKey.values());\n return;\n }\n\n const next = pendingPublications.concat(publications);\n if (next.length > maxBufferedPublications) {\n droppedPublications += next.length - maxBufferedPublications;\n if (isDev()) {\n console.warn(\n `[snapshot-then-stream] ${params.channel}: buffer cap dropped ${droppedPublications} publication(s) while snapshot in flight`,\n );\n }\n }\n pendingPublications = next.slice(-maxBufferedPublications);\n }\n\n function clearRetryTimer(): void {\n if (retryTimer === null) return;\n clearTimeout(retryTimer);\n retryTimer = null;\n }\n\n function reportBufferedPublicationError(error: unknown): void {\n params.onError?.(\n createSdkSubscriptionErrorContext(params.channel, \"publication_handler\", error),\n );\n }\n\n function applyLivePublications(publications: readonly TPublication[]): void {\n try {\n params.applyLivePublications(publications);\n } catch (error) {\n reportBufferedPublicationError(error);\n }\n }\n\n function applySnapshot(\n snapshot: TSnapshot,\n bufferedPublications: readonly TPublication[],\n ): void {\n try {\n params.applySnapshot(snapshot, bufferedPublications);\n } catch (error) {\n reportBufferedPublicationError(error);\n }\n }\n\n function scheduleSnapshotRetry(error: unknown): void {\n const retry = params.snapshotRetry;\n if (!retry || retryAttempts >= retry.maxAttempts || disposed) return;\n if (error instanceof PolyesterError && !error.retryable) return;\n\n const delayMs = Math.min(\n retry.delayMs * 2 ** retryAttempts,\n retry.maxDelayMs ?? Number.POSITIVE_INFINITY,\n );\n retryAttempts++;\n retryTimer = setTimeout(() => {\n retryTimer = null;\n refreshSnapshot(false);\n }, delayMs);\n }\n\n function refreshSnapshot(resetRetries = true): void {\n if (disposed) return;\n clearRetryTimer();\n if (resetRetries) retryAttempts = 0;\n\n const generation = ++refreshGeneration;\n ready = false;\n\n Promise.resolve()\n .then(() => params.fetchSnapshot())\n .then((snapshot) => {\n if (disposed || generation !== refreshGeneration) return;\n\n const buffered = takePendingPublications();\n applySnapshot(snapshot, buffered);\n\n if (disposed || generation !== refreshGeneration) return;\n ready = true;\n retryAttempts = 0;\n })\n .catch((error: unknown) => {\n if (disposed || generation !== refreshGeneration) return;\n reportSnapshotError(error);\n const failureMode =\n typeof params.snapshotFailureMode === \"function\"\n ? params.snapshotFailureMode(error)\n : params.snapshotFailureMode;\n if (failureMode === \"live\") {\n ready = true;\n applyBufferedAsLive();\n }\n scheduleSnapshotRetry(error);\n });\n }\n\n const unsubscribeRealtime = params.realtime.connectProtoChannel({\n channel: params.channel,\n schema: params.schema,\n onPublication: (message) => {\n const publications = params.readPublication(message);\n if (publications.length === 0) return;\n\n if (!ready) {\n bufferPublications(publications);\n return;\n }\n\n applyLivePublications(publications);\n },\n onConnected: () => {\n if (disposed) return;\n pendingPublications = [];\n refreshSnapshot();\n params.onOpen?.();\n },\n onDisconnected: () => {\n if (disposed) return;\n clearRetryTimer();\n refreshGeneration++;\n ready = false;\n pendingPublications = [];\n params.onClose?.();\n },\n onError: params.onError,\n });\n\n function unsubscribe(): void {\n disposed = true;\n clearRetryTimer();\n refreshGeneration++;\n pendingPublications = [];\n try {\n unsubscribeRealtime();\n } catch {\n // noop\n }\n }\n\n return {\n unsubscribe,\n refreshSnapshot,\n isReady: () => ready,\n isDisposed: () => disposed,\n };\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"snapshot-then-stream.js","names":[],"sources":["../../src/realtime/snapshot-then-stream.ts"],"sourcesContent":["import type { DescMessage, MessageShape } from \"@bufbuild/protobuf\";\nimport {\n createSdkSubscriptionErrorContext,\n type SdkSubscriptionErrorContext,\n} from \"../shared/subscription-errors.js\";\nimport type { PolyesterRealtime } from \"./types.js\";\nimport { formatConnectError } from \"../utils/errors.js\";\nimport { PolyesterError } from \"../shared/errors.js\";\nimport { isDev } from \"../utils/is-dev.js\";\n\nexport interface SnapshotThenStreamSubscription {\n unsubscribe: () => void;\n refreshSnapshot: () => void;\n isReady: () => boolean;\n isDisposed: () => boolean;\n}\n\nexport interface SnapshotThenStreamInput<TSchema extends DescMessage, TSnapshot, TPublication> {\n realtime: PolyesterRealtime;\n channel: string;\n schema: TSchema;\n maxBufferedPublications?: number;\n bufferPublicationKey?: (publication: TPublication) => PropertyKey;\n /** Exponential backoff from `delayMs`, capped at `maxDelayMs`; never retries a non-retryable PolyesterError. */\n snapshotRetry?: {\n maxAttempts: number;\n delayMs: number;\n maxDelayMs?: number;\n };\n snapshotFailureMode?: \"wait\" | \"live\" | ((error: unknown) => \"wait\" | \"live\");\n snapshotErrorLog?: string;\n fetchSnapshot: () => Promise<TSnapshot>;\n readPublication: (message: MessageShape<TSchema>) => readonly TPublication[];\n applySnapshot: (snapshot: TSnapshot, bufferedPublications: readonly TPublication[]) => void;\n applyLivePublications: (publications: readonly TPublication[]) => void;\n onOpen?: () => void;\n onClose?: () => void;\n onError?: (ctx: SdkSubscriptionErrorContext) => void;\n}\n\n/**\n * Snapshot-then-stream for feed state. By default, the buffer caps at\n * `maxBufferedPublications` and drops the OLDEST publications, which is correct for\n * ephemeral feeds where a later publication supersedes earlier ones. Keyed state can\n * provide `bufferPublicationKey` to retain the latest value for every key without FIFO\n * loss. Entity transitions (orders, triggers, balances, trades) must NOT use this —\n * their ordering contract lives in the app-side `EntityStreamStore`, which buffers\n * unbounded and replays because dropping an event loses a row transition.\n */\nexport function snapshotThenStream<TSchema extends DescMessage, TSnapshot, TPublication>(\n params: SnapshotThenStreamInput<TSchema, TSnapshot, TPublication>,\n): SnapshotThenStreamSubscription {\n const maxBufferedPublications = params.maxBufferedPublications ?? 200;\n let droppedPublications = 0;\n\n let ready = false;\n let disposed = false;\n let refreshGeneration = 0;\n let pendingPublications: TPublication[] = [];\n let retryAttempts = 0;\n let retryTimer: ReturnType<typeof setTimeout> | null = null;\n\n function reportSnapshotError(error: unknown): void {\n if (isDev() && params.snapshotErrorLog) {\n console.error(params.snapshotErrorLog, error);\n }\n params.onError?.(\n createSdkSubscriptionErrorContext(\n params.channel,\n \"snapshot\",\n error instanceof Error ? error : formatConnectError(error, \"snapshot failed\"),\n ),\n );\n }\n\n function takePendingPublications(): TPublication[] {\n const buffered = pendingPublications;\n pendingPublications = [];\n return buffered;\n }\n\n function applyBufferedAsLive(): void {\n const buffered = takePendingPublications();\n if (buffered.length === 0) return;\n applyLivePublications(buffered);\n }\n\n function bufferPublications(publications: readonly TPublication[]): void {\n if (params.bufferPublicationKey) {\n const byKey = new Map<PropertyKey, TPublication>();\n for (const publication of pendingPublications) {\n byKey.set(params.bufferPublicationKey(publication), publication);\n }\n for (const publication of publications) {\n byKey.set(params.bufferPublicationKey(publication), publication);\n }\n pendingPublications = Array.from(byKey.values());\n return;\n }\n\n const next = pendingPublications.concat(publications);\n if (next.length > maxBufferedPublications) {\n droppedPublications += next.length - maxBufferedPublications;\n if (isDev()) {\n console.warn(\n `[snapshot-then-stream] ${params.channel}: buffer cap dropped ${droppedPublications} publication(s) while snapshot in flight`,\n );\n }\n }\n pendingPublications = next.slice(-maxBufferedPublications);\n }\n\n function clearRetryTimer(): void {\n if (retryTimer === null) return;\n clearTimeout(retryTimer);\n retryTimer = null;\n }\n\n function reportBufferedPublicationError(error: unknown): void {\n params.onError?.(\n createSdkSubscriptionErrorContext(params.channel, \"publication_handler\", error),\n );\n }\n\n function applyLivePublications(publications: readonly TPublication[]): void {\n try {\n params.applyLivePublications(publications);\n } catch (error) {\n reportBufferedPublicationError(error);\n }\n }\n\n function applySnapshot(\n snapshot: TSnapshot,\n bufferedPublications: readonly TPublication[],\n ): void {\n try {\n params.applySnapshot(snapshot, bufferedPublications);\n } catch (error) {\n reportBufferedPublicationError(error);\n }\n }\n\n function scheduleSnapshotRetry(error: unknown): void {\n const retry = params.snapshotRetry;\n if (!retry || retryAttempts >= retry.maxAttempts || disposed) return;\n if (error instanceof PolyesterError && !error.retryable) return;\n\n const delayMs = Math.min(\n retry.delayMs * 2 ** retryAttempts,\n retry.maxDelayMs ?? Number.POSITIVE_INFINITY,\n );\n retryAttempts++;\n retryTimer = setTimeout(() => {\n retryTimer = null;\n // realtime.disconnect() drops handlers without onDisconnected; stop once the socket is gone.\n const kind = params.channel.startsWith(\"private:\") ? \"private\" : \"public\";\n if (params.realtime.connection[kind].state === \"disconnected\") return;\n refreshSnapshot(false);\n }, delayMs);\n }\n\n function refreshSnapshot(resetRetries = true): void {\n if (disposed) return;\n clearRetryTimer();\n if (resetRetries) retryAttempts = 0;\n\n const generation = ++refreshGeneration;\n ready = false;\n\n Promise.resolve()\n .then(() => params.fetchSnapshot())\n .then((snapshot) => {\n if (disposed || generation !== refreshGeneration) return;\n\n const buffered = takePendingPublications();\n applySnapshot(snapshot, buffered);\n\n if (disposed || generation !== refreshGeneration) return;\n ready = true;\n retryAttempts = 0;\n })\n .catch((error: unknown) => {\n if (disposed || generation !== refreshGeneration) return;\n reportSnapshotError(error);\n const failureMode =\n typeof params.snapshotFailureMode === \"function\"\n ? params.snapshotFailureMode(error)\n : params.snapshotFailureMode;\n if (failureMode === \"live\") {\n ready = true;\n applyBufferedAsLive();\n }\n scheduleSnapshotRetry(error);\n });\n }\n\n const unsubscribeRealtime = params.realtime.connectProtoChannel({\n channel: params.channel,\n schema: params.schema,\n onPublication: (message) => {\n const publications = params.readPublication(message);\n if (publications.length === 0) return;\n\n if (!ready) {\n bufferPublications(publications);\n return;\n }\n\n applyLivePublications(publications);\n },\n onConnected: () => {\n if (disposed) return;\n pendingPublications = [];\n refreshSnapshot();\n params.onOpen?.();\n },\n onDisconnected: () => {\n if (disposed) return;\n clearRetryTimer();\n refreshGeneration++;\n ready = false;\n pendingPublications = [];\n params.onClose?.();\n },\n onError: params.onError,\n });\n\n function unsubscribe(): void {\n disposed = true;\n clearRetryTimer();\n refreshGeneration++;\n pendingPublications = [];\n try {\n unsubscribeRealtime();\n } catch {\n // noop\n }\n }\n\n return {\n unsubscribe,\n refreshSnapshot,\n isReady: () => ready,\n isDisposed: () => disposed,\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AuthApiTransports } from "../../shared/transports.js";
|
|
2
|
+
import { PolyesterRequestOptions } from "../../shared/request-options.js";
|
|
3
|
+
import { ListAccountActivityInput, ListAccountActivityResult } from "./account-activity.schemas.js";
|
|
4
|
+
//#region src/services/account-activity/account-activity.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Reads the security and activity events of the caller's main account and its sub-accounts in
|
|
7
|
+
* one feed: sign-ins, API key, MFA, policy, member, invite and saved-destination changes.
|
|
8
|
+
*/
|
|
9
|
+
declare class AccountActivityService {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(transports: AuthApiTransports);
|
|
12
|
+
/**
|
|
13
|
+
* Lists events newest first. Only the main account's own session or an API key with
|
|
14
|
+
* `read-account-activity` may call it; a key scoped to a sub-account reads only that
|
|
15
|
+
* sub-account's events and may not set `includeMainAccount`. A sub-account the caller may
|
|
16
|
+
* not read throws `ResourceNotFoundError`.
|
|
17
|
+
*/
|
|
18
|
+
list(input?: ListAccountActivityInput, options?: PolyesterRequestOptions): Promise<ListAccountActivityResult>;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { AccountActivityService };
|
|
22
|
+
//# sourceMappingURL=account-activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-activity.d.ts","names":[],"sources":["../../../src/services/account-activity/account-activity.ts"],"mappings":";;;;;;;;cAoBa;;EAGG,YAAA,YAAY;;;;;;;EAUlB,KACF,QAAO,0BACP,UAAU,0BACX,QAAQ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { parse } from "../../shared/validation.js";
|
|
2
|
+
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
3
|
+
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
|
+
import { AccountActivityService as AccountActivityService$1 } from "../../gen/auth/v1/activity_pb.js";
|
|
5
|
+
import { ListAccountActivityInputSchema, ListAccountActivityResultSchema } from "./account-activity.schemas.js";
|
|
6
|
+
import { createClient } from "@connectrpc/connect";
|
|
7
|
+
//#region src/services/account-activity/account-activity.ts
|
|
8
|
+
/**
|
|
9
|
+
* Reads the security and activity events of the caller's main account and its sub-accounts in
|
|
10
|
+
* one feed: sign-ins, API key, MFA, policy, member, invite and saved-destination changes.
|
|
11
|
+
*/
|
|
12
|
+
var AccountActivityService = class {
|
|
13
|
+
#client;
|
|
14
|
+
constructor(transports) {
|
|
15
|
+
this.#client = createClient(AccountActivityService$1, transports.authApi);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Lists events newest first. Only the main account's own session or an API key with
|
|
19
|
+
* `read-account-activity` may call it; a key scoped to a sub-account reads only that
|
|
20
|
+
* sub-account's events and may not set `includeMainAccount`. A sub-account the caller may
|
|
21
|
+
* not read throws `ResourceNotFoundError`.
|
|
22
|
+
*/
|
|
23
|
+
async list(input = {}, options) {
|
|
24
|
+
const request = parse(ListAccountActivityInputSchema, input);
|
|
25
|
+
const response = await this.#client.listAccountActivity(removeUndefined(request), toConnectCallOptions(options));
|
|
26
|
+
return parse(ListAccountActivityResultSchema, response);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { AccountActivityService };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=account-activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-activity.js","names":["#client","Proto.AccountActivityService"],"sources":["../../../src/services/account-activity/account-activity.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/auth/v1/activity_pb.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n ListAccountActivityInputSchema,\n ListAccountActivityResultSchema,\n type ListAccountActivityInput,\n type ListAccountActivityResult,\n} from \"./account-activity.schemas.js\";\n\n/**\n * Reads the security and activity events of the caller's main account and its sub-accounts in\n * one feed: sign-ins, API key, MFA, policy, member, invite and saved-destination changes.\n */\nexport class AccountActivityService {\n #client: Client<typeof Proto.AccountActivityService>;\n\n constructor(transports: AuthApiTransports) {\n this.#client = createClient(Proto.AccountActivityService, transports.authApi);\n }\n\n /**\n * Lists events newest first. Only the main account's own session or an API key with\n * `read-account-activity` may call it; a key scoped to a sub-account reads only that\n * sub-account's events and may not set `includeMainAccount`. A sub-account the caller may\n * not read throws `ResourceNotFoundError`.\n */\n async list(\n input: ListAccountActivityInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<ListAccountActivityResult> {\n const request = parse(ListAccountActivityInputSchema, input);\n const response = await this.#client.listAccountActivity(\n removeUndefined(request),\n toConnectCallOptions(options),\n );\n return parse(ListAccountActivityResultSchema, response);\n }\n}\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,yBAAb,MAAoC;CAChC;CAEA,YAAY,YAA+B;EACvC,KAAKA,UAAU,aAAaC,0BAA8B,WAAW,OAAO;CAChF;;;;;;;CAQA,MAAM,KACF,QAAkC,CAAC,GACnC,SACkC;EAClC,MAAM,UAAU,MAAM,gCAAgC,KAAK;EAC3D,MAAM,WAAW,MAAM,KAAKD,QAAQ,oBAChC,gBAAgB,OAAO,GACvB,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,iCAAiC,QAAQ;CAC1D;AACJ"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ActivityEntityKind, ActivityEventAction, ActivityEventSource } from "../../gen/auth/v1/subaccounts_pb.js";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
//#region src/services/account-activity/account-activity.schemas.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Every filter narrows the list; an omitted or empty filter matches every event the caller may
|
|
6
|
+
* read. Times are epoch milliseconds: `startTime` inclusive, `endTime` exclusive.
|
|
7
|
+
*/
|
|
8
|
+
declare const ListAccountActivityInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
9
|
+
/**
|
|
10
|
+
* Sub-accounts to include. With neither this nor `includeMainAccount`, the list covers
|
|
11
|
+
* the main account and every sub-account the caller may read.
|
|
12
|
+
*/
|
|
13
|
+
readonly subaccountIds: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>, undefined>, undefined>;
|
|
14
|
+
/** Include the main account's own events, those of no sub-account. */
|
|
15
|
+
readonly includeMainAccount: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
16
|
+
readonly entityKinds: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["account", "session", "api_key", "subaccount", "member", "policy", "invite", "security", "destination"], undefined>, undefined>, undefined>;
|
|
17
|
+
readonly eventActions: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "updated", "deleted", "enabled", "disabled", "removed", "role_set", "received", "replied", "failed", "revoked", "blocked", "hold_placed", "hold_released", "requested", "applied"], undefined>, undefined>, undefined>;
|
|
18
|
+
readonly sources: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["web", "mobile", "api"], undefined>, undefined>, undefined>;
|
|
19
|
+
/** Only events performed with this API key. */
|
|
20
|
+
readonly apiKeyId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
|
|
21
|
+
readonly startTime: 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, import("@bufbuild/protobuf/wkt").Timestamp>]>, undefined>;
|
|
22
|
+
readonly endTime: 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, import("@bufbuild/protobuf/wkt").Timestamp>]>, undefined>;
|
|
23
|
+
/** Page size: default 50, at most 200. */
|
|
24
|
+
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 200, undefined>]>, undefined>;
|
|
25
|
+
/** Previous `nextPageToken`; reuse only with the same filters. */
|
|
26
|
+
readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
|
|
27
|
+
}, undefined>, v.TransformAction<{
|
|
28
|
+
subaccountIds?: bigint[] | undefined;
|
|
29
|
+
includeMainAccount?: boolean | undefined;
|
|
30
|
+
entityKinds?: ("subaccount" | "api_key" | "account" | "session" | "member" | "policy" | "invite" | "security" | "destination")[] | undefined;
|
|
31
|
+
eventActions?: ("disabled" | "revoked" | "removed" | "created" | "updated" | "deleted" | "enabled" | "role_set" | "received" | "replied" | "failed" | "blocked" | "hold_placed" | "hold_released" | "requested" | "applied")[] | undefined;
|
|
32
|
+
sources?: ("web" | "mobile" | "api")[] | undefined;
|
|
33
|
+
apiKeyId?: bigint | undefined;
|
|
34
|
+
startTime?: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
|
|
35
|
+
endTime?: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
|
|
36
|
+
limit?: number | undefined;
|
|
37
|
+
pageToken?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
entityKinds: (ActivityEntityKind.ACTIVITY_ENTITY_ACCOUNT | ActivityEntityKind.ACTIVITY_ENTITY_SESSION | ActivityEntityKind.ACTIVITY_ENTITY_API_KEY | ActivityEntityKind.ACTIVITY_ENTITY_SUBACCOUNT | ActivityEntityKind.ACTIVITY_ENTITY_MEMBER | ActivityEntityKind.ACTIVITY_ENTITY_POLICY | ActivityEntityKind.ACTIVITY_ENTITY_INVITE | ActivityEntityKind.ACTIVITY_ENTITY_SECURITY | ActivityEntityKind.ACTIVITY_ENTITY_DESTINATION)[] | undefined;
|
|
40
|
+
eventActions: (ActivityEventAction.ACTIVITY_ACTION_CREATED | ActivityEventAction.ACTIVITY_ACTION_UPDATED | ActivityEventAction.ACTIVITY_ACTION_DELETED | ActivityEventAction.ACTIVITY_ACTION_ENABLED | ActivityEventAction.ACTIVITY_ACTION_DISABLED | ActivityEventAction.ACTIVITY_ACTION_REMOVED | ActivityEventAction.ACTIVITY_ACTION_ROLE_SET | ActivityEventAction.ACTIVITY_ACTION_RECEIVED | ActivityEventAction.ACTIVITY_ACTION_REPLIED | ActivityEventAction.ACTIVITY_ACTION_FAILED | ActivityEventAction.ACTIVITY_ACTION_REVOKED | ActivityEventAction.ACTIVITY_ACTION_BLOCKED | ActivityEventAction.ACTIVITY_ACTION_HOLD_PLACED | ActivityEventAction.ACTIVITY_ACTION_HOLD_RELEASED | ActivityEventAction.ACTIVITY_ACTION_REQUESTED | ActivityEventAction.ACTIVITY_ACTION_APPLIED)[] | undefined;
|
|
41
|
+
sources: (ActivityEventSource.ACTIVITY_SOURCE_WEB | ActivityEventSource.ACTIVITY_SOURCE_MOBILE | ActivityEventSource.ACTIVITY_SOURCE_API)[] | undefined;
|
|
42
|
+
subaccountIds?: bigint[] | undefined;
|
|
43
|
+
includeMainAccount?: boolean | undefined;
|
|
44
|
+
apiKeyId?: bigint | undefined;
|
|
45
|
+
startTime?: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
|
|
46
|
+
endTime?: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
|
|
47
|
+
limit?: number | undefined;
|
|
48
|
+
pageToken?: string | undefined;
|
|
49
|
+
}>]>;
|
|
50
|
+
type ListAccountActivityInput = v.InferInput<typeof ListAccountActivityInputSchema>;
|
|
51
|
+
declare const ListAccountActivityResultSchema: v.ObjectSchema<{
|
|
52
|
+
readonly events: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
53
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
54
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
55
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
56
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
57
|
+
seconds: bigint;
|
|
58
|
+
nanos: number;
|
|
59
|
+
} | undefined, number | undefined>]>;
|
|
60
|
+
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "session" | "member" | "policy" | "invite" | "security" | "destination">]>;
|
|
61
|
+
readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "revoked" | "removed" | "created" | "updated" | "deleted" | "enabled" | "role_set" | "received" | "replied" | "failed" | "blocked" | "hold_placed" | "hold_released" | "requested" | "applied">]>;
|
|
62
|
+
readonly source: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "web" | "mobile" | "api">]>;
|
|
63
|
+
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
64
|
+
readonly userAgent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
65
|
+
readonly actorAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
66
|
+
readonly payloadJson: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, any>]>;
|
|
67
|
+
readonly subaccountId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
68
|
+
readonly actorApiKeyId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
69
|
+
}, undefined>, undefined>, readonly []>;
|
|
70
|
+
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
71
|
+
}, undefined>;
|
|
72
|
+
/** One page of events, newest first; an empty `nextPageToken` means no more. */
|
|
73
|
+
type ListAccountActivityResult = v.InferOutput<typeof ListAccountActivityResultSchema>;
|
|
74
|
+
/** A security or activity event of the main account or one of its sub-accounts. */
|
|
75
|
+
type AccountActivityEvent = ListAccountActivityResult["events"][number];
|
|
76
|
+
//#endregion
|
|
77
|
+
export { AccountActivityEvent, ListAccountActivityInput, ListAccountActivityInputSchema, ListAccountActivityResult, ListAccountActivityResultSchema };
|
|
78
|
+
//# sourceMappingURL=account-activity.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-activity.schemas.d.ts","names":[],"sources":["../../../src/services/account-activity/account-activity.schemas.ts"],"mappings":";;;;;;;cA2Ba,gCAA8B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6B/B,2BAA2B,EAAE,kBAAkB;cAE9C,iCAA+B,EAAA;;;;;;;;;;;;;;;;;;;;;;KAMhC,4BAA4B,EAAE,mBAAmB;;KAGjD,uBAAuB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { idInputSchema, optionalIdInputSchema } from "../../shared/schemas.js";
|
|
2
|
+
import { msToTimestamp } from "../../utils/timestamp.js";
|
|
3
|
+
import { ACTIVITY_ENTITY_KIND_VALUES, ACTIVITY_EVENT_ACTION_VALUES, ACTIVITY_EVENT_SOURCE_VALUES, ActivityEntityKindCodec, ActivityEventActionCodec, ActivityEventSourceCodec } from "../subaccounts/subaccounts.codecs.js";
|
|
4
|
+
import { SubaccountActivityEventSchema } from "../subaccounts/subaccounts.schemas.js";
|
|
5
|
+
import * as v from "valibot";
|
|
6
|
+
//#region src/services/account-activity/account-activity.schemas.ts
|
|
7
|
+
const TimestampMsInputSchema = v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(Number.MAX_SAFE_INTEGER), v.transform(msToTimestamp)));
|
|
8
|
+
/**
|
|
9
|
+
* Every filter narrows the list; an omitted or empty filter matches every event the caller may
|
|
10
|
+
* read. Times are epoch milliseconds: `startTime` inclusive, `endTime` exclusive.
|
|
11
|
+
*/
|
|
12
|
+
const ListAccountActivityInputSchema = v.pipe(v.strictObject({
|
|
13
|
+
/**
|
|
14
|
+
* Sub-accounts to include. With neither this nor `includeMainAccount`, the list covers
|
|
15
|
+
* the main account and every sub-account the caller may read.
|
|
16
|
+
*/
|
|
17
|
+
subaccountIds: v.optional(v.array(idInputSchema("subaccountIds"))),
|
|
18
|
+
/** Include the main account's own events, those of no sub-account. */
|
|
19
|
+
includeMainAccount: v.optional(v.boolean()),
|
|
20
|
+
entityKinds: v.optional(v.array(v.picklist(ACTIVITY_ENTITY_KIND_VALUES))),
|
|
21
|
+
eventActions: v.optional(v.array(v.picklist(ACTIVITY_EVENT_ACTION_VALUES))),
|
|
22
|
+
sources: v.optional(v.array(v.picklist(ACTIVITY_EVENT_SOURCE_VALUES))),
|
|
23
|
+
/** Only events performed with this API key. */
|
|
24
|
+
apiKeyId: optionalIdInputSchema("apiKeyId"),
|
|
25
|
+
startTime: TimestampMsInputSchema,
|
|
26
|
+
endTime: TimestampMsInputSchema,
|
|
27
|
+
/** Page size: default 50, at most 200. */
|
|
28
|
+
limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(200))),
|
|
29
|
+
/** Previous `nextPageToken`; reuse only with the same filters. */
|
|
30
|
+
pageToken: v.optional(v.pipe(v.string(), v.trim()))
|
|
31
|
+
}), v.transform(({ entityKinds, eventActions, sources, ...input }) => ({
|
|
32
|
+
...input,
|
|
33
|
+
entityKinds: entityKinds?.map((kind) => ActivityEntityKindCodec.inputToProto[kind]),
|
|
34
|
+
eventActions: eventActions?.map((action) => ActivityEventActionCodec.inputToProto[action]),
|
|
35
|
+
sources: sources?.map((source) => ActivityEventSourceCodec.inputToProto[source])
|
|
36
|
+
})));
|
|
37
|
+
const ListAccountActivityResultSchema = v.object({
|
|
38
|
+
events: v.optional(v.array(SubaccountActivityEventSchema), []),
|
|
39
|
+
nextPageToken: v.optional(v.string(), "")
|
|
40
|
+
});
|
|
41
|
+
//#endregion
|
|
42
|
+
export { ListAccountActivityInputSchema, ListAccountActivityResultSchema };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=account-activity.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-activity.schemas.js","names":[],"sources":["../../../src/services/account-activity/account-activity.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { idInputSchema, optionalIdInputSchema } from \"../../shared/schemas.js\";\nimport { msToTimestamp } from \"../../utils/timestamp.js\";\nimport {\n ACTIVITY_ENTITY_KIND_VALUES,\n ACTIVITY_EVENT_ACTION_VALUES,\n ACTIVITY_EVENT_SOURCE_VALUES,\n ActivityEntityKindCodec,\n ActivityEventActionCodec,\n ActivityEventSourceCodec,\n} from \"../subaccounts/subaccounts.codecs.js\";\nimport { SubaccountActivityEventSchema } from \"../subaccounts/subaccounts.schemas.js\";\n\nconst TimestampMsInputSchema = v.optional(\n v.pipe(\n v.number(),\n v.integer(),\n v.minValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n v.transform(msToTimestamp),\n ),\n);\n\n/**\n * Every filter narrows the list; an omitted or empty filter matches every event the caller may\n * read. Times are epoch milliseconds: `startTime` inclusive, `endTime` exclusive.\n */\nexport const ListAccountActivityInputSchema = v.pipe(\n v.strictObject({\n /**\n * Sub-accounts to include. With neither this nor `includeMainAccount`, the list covers\n * the main account and every sub-account the caller may read.\n */\n subaccountIds: v.optional(v.array(idInputSchema(\"subaccountIds\"))),\n /** Include the main account's own events, those of no sub-account. */\n includeMainAccount: v.optional(v.boolean()),\n entityKinds: v.optional(v.array(v.picklist(ACTIVITY_ENTITY_KIND_VALUES))),\n eventActions: v.optional(v.array(v.picklist(ACTIVITY_EVENT_ACTION_VALUES))),\n sources: v.optional(v.array(v.picklist(ACTIVITY_EVENT_SOURCE_VALUES))),\n /** Only events performed with this API key. */\n apiKeyId: optionalIdInputSchema(\"apiKeyId\"),\n startTime: TimestampMsInputSchema,\n endTime: TimestampMsInputSchema,\n /** Page size: default 50, at most 200. */\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(200))),\n /** Previous `nextPageToken`; reuse only with the same filters. */\n pageToken: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.transform(({ entityKinds, eventActions, sources, ...input }) => ({\n ...input,\n entityKinds: entityKinds?.map((kind) => ActivityEntityKindCodec.inputToProto[kind]),\n eventActions: eventActions?.map((action) => ActivityEventActionCodec.inputToProto[action]),\n sources: sources?.map((source) => ActivityEventSourceCodec.inputToProto[source]),\n })),\n);\n\nexport type ListAccountActivityInput = v.InferInput<typeof ListAccountActivityInputSchema>;\n\nexport const ListAccountActivityResultSchema = v.object({\n events: v.optional(v.array(SubaccountActivityEventSchema), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\n/** One page of events, newest first; an empty `nextPageToken` means no more. */\nexport type ListAccountActivityResult = v.InferOutput<typeof ListAccountActivityResultSchema>;\n\n/** A security or activity event of the main account or one of its sub-accounts. */\nexport type AccountActivityEvent = ListAccountActivityResult[\"events\"][number];\n"],"mappings":";;;;;;AAaA,MAAM,yBAAyB,EAAE,SAC7B,EAAE,KACE,EAAE,OAAO,GACT,EAAE,QAAQ,GACV,EAAE,SAAS,CAAC,GACZ,EAAE,SAAS,OAAO,gBAAgB,GAClC,EAAE,UAAU,aAAa,CAC7B,CACJ;;;;;AAMA,MAAa,iCAAiC,EAAE,KAC5C,EAAE,aAAa;;;;;CAKX,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,eAAe,CAAC,CAAC;;CAEjE,oBAAoB,EAAE,SAAS,EAAE,QAAQ,CAAC;CAC1C,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,2BAA2B,CAAC,CAAC;CACxE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,4BAA4B,CAAC,CAAC;CAC1E,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,4BAA4B,CAAC,CAAC;;CAErE,UAAU,sBAAsB,UAAU;CAC1C,WAAW;CACX,SAAS;;CAET,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,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC,GACD,EAAE,WAAW,EAAE,aAAa,cAAc,SAAS,GAAG,aAAa;CAC/D,GAAG;CACH,aAAa,aAAa,KAAK,SAAS,wBAAwB,aAAa,KAAK;CAClF,cAAc,cAAc,KAAK,WAAW,yBAAyB,aAAa,OAAO;CACzF,SAAS,SAAS,KAAK,WAAW,yBAAyB,aAAa,OAAO;AACnF,EAAE,CACN;AAIA,MAAa,kCAAkC,EAAE,OAAO;CACpD,QAAQ,EAAE,SAAS,EAAE,MAAM,6BAA6B,GAAG,CAAC,CAAC;CAC7D,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;AAC5C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AccountActivityService } from "./account-activity.js";
|
|
2
|
+
import { PolyesterCore } from "../../core-client.js";
|
|
3
|
+
//#region src/services/account-activity/service.d.ts
|
|
4
|
+
/** Returns the client's AccountActivityService, creating it on first use. */
|
|
5
|
+
declare const accountActivityService: (client: PolyesterCore) => AccountActivityService;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { accountActivityService };
|
|
8
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","names":[],"sources":["../../../src/services/account-activity/service.ts"],"mappings":";;;;cAIa,yBAAsB,QAAtB,kBAAsB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { defineService } from "../../core-client.js";
|
|
2
|
+
import { AccountActivityService } from "./account-activity.js";
|
|
3
|
+
//#region src/services/account-activity/service.ts
|
|
4
|
+
/** Returns the client's AccountActivityService, creating it on first use. */
|
|
5
|
+
const accountActivityService = defineService((context) => new AccountActivityService(context.transports));
|
|
6
|
+
//#endregion
|
|
7
|
+
export { accountActivityService };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","names":[],"sources":["../../../src/services/account-activity/service.ts"],"sourcesContent":["import { defineService } from \"../../core-client.js\";\nimport { AccountActivityService } from \"./account-activity.js\";\n\n/** Returns the client's AccountActivityService, creating it on first use. */\nexport const accountActivityService = defineService(\n (context) => new AccountActivityService(context.transports),\n);\n"],"mappings":";;;;AAIA,MAAa,yBAAyB,eACjC,YAAY,IAAI,uBAAuB,QAAQ,UAAU,CAC9D"}
|
|
@@ -297,7 +297,7 @@ declare const AddressBookSchema: v.ObjectSchema<{
|
|
|
297
297
|
rootAccountId: string;
|
|
298
298
|
subaccountId: bigint;
|
|
299
299
|
}, AddressBookAccountScope>]>, undefined>;
|
|
300
|
-
readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
300
|
+
readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
301
301
|
readonly label: v.StringSchema<undefined>;
|
|
302
302
|
readonly ownerUsername: v.StringSchema<undefined>;
|
|
303
303
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
@@ -1102,7 +1102,7 @@ declare const AddressBookViewSchema: v.ObjectSchema<{
|
|
|
1102
1102
|
rootAccountId: string;
|
|
1103
1103
|
subaccountId: bigint;
|
|
1104
1104
|
}, AddressBookAccountScope>]>, undefined>;
|
|
1105
|
-
readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
1105
|
+
readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
1106
1106
|
readonly label: v.StringSchema<undefined>;
|
|
1107
1107
|
readonly ownerUsername: v.StringSchema<undefined>;
|
|
1108
1108
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
@@ -2,11 +2,11 @@ import { parse } from "../../shared/validation.js";
|
|
|
2
2
|
import { formatId } from "../../utils/base58-id.js";
|
|
3
3
|
import { BigIntStringSchema, OptionalTimestampMsSchema, PublicIdOrEmptySchema, PublicIdSchema, TimestampMsSchema as TimestampMsSchema$1, idInputSchema, optionalSubaccountIdInputSchema, positiveBigintStringInputSchema } from "../../shared/schemas.js";
|
|
4
4
|
import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
|
|
5
|
+
import { SubaccountRoleCodec } from "../subaccounts/subaccounts.codecs.js";
|
|
6
|
+
import { buildProtoPatch, defineProtoPatchFields } from "../../utils/proto-patch.js";
|
|
5
7
|
import { PositiveUint32InputSchema } from "../shared.js";
|
|
6
8
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
7
9
|
import { ADDRESS_BOOK_ENTRY_KIND_VALUES, AccountScopeTypeCodec, AddressBookEntryKindCodec, DestinationWhitelistStatusCodec, InternalWhitelistResolutionStatusCodec, TRANSFER_COUNTERPARTY_DIRECTION_VALUES, TransferCounterpartyDirectionCodec } from "./address-book.codecs.js";
|
|
8
|
-
import { SubaccountRoleCodec } from "../subaccounts/subaccounts.codecs.js";
|
|
9
|
-
import { buildProtoPatch, defineProtoPatchFields } from "../../utils/proto-patch.js";
|
|
10
10
|
import * as v from "valibot";
|
|
11
11
|
//#region src/services/address-book/address-book.schemas.ts
|
|
12
12
|
const OptionalSubaccountIdSchema = optionalSubaccountIdInputSchema();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { tsObjToMs, tsObjToNsString } from "../../utils/time.js";
|
|
2
2
|
import { BigIntStringSchema, OptionalPublicIdSchema, OptionalTimestampMsSchema, PublicIdOrEmptySchema, TimestampMsSchema, TimestampSchema, idInputSchema, optionalSubaccountIdInputSchema, positiveBigintStringInputSchema } from "../../shared/schemas.js";
|
|
3
3
|
import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
|
|
4
|
-
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
5
|
-
import { buildProtoPatch, defineProtoPatchFields } from "../../utils/proto-patch.js";
|
|
6
4
|
import { msToTimestamp } from "../../utils/timestamp.js";
|
|
5
|
+
import { buildProtoPatch, defineProtoPatchFields } from "../../utils/proto-patch.js";
|
|
6
|
+
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
7
7
|
import { API_KEY_STATUS_VALUES, API_KEY_UPDATE_STATUS_VALUES, ASSISTANT_KEY_PRESET_VALUES, ApiKeyPurposeCodec, ApiKeyStatusCodec, AssistantKeyPresetCodec } from "./api-keys.codecs.js";
|
|
8
8
|
import { bytesToHex } from "@noble/hashes/utils.js";
|
|
9
9
|
import * as v from "valibot";
|