@polyester/sdk 0.36.0-devnet-20261114152753 → 0.36.0-devnet-20261116002603
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 +61 -3
- package/dist/browser-core.js +1 -1
- package/dist/catalogs/readers.d.ts.map +1 -1
- package/dist/catalogs/readers.js +1 -1
- package/dist/catalogs/readers.js.map +1 -1
- package/dist/catalogs/snapshot-validation.js +8 -6
- package/dist/catalogs/snapshot-validation.js.map +1 -1
- package/dist/catalogs/unknown-asset.d.ts.map +1 -1
- package/dist/catalogs/unknown-asset.js +4 -4
- package/dist/catalogs/unknown-asset.js.map +1 -1
- package/dist/client.d.ts +4 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -0
- package/dist/client.js.map +1 -1
- package/dist/core-client.d.ts.map +1 -1
- package/dist/core-client.js +2 -1
- package/dist/core-client.js.map +1 -1
- package/dist/gen/ai/v1/assistant_pb.d.ts +83 -5
- package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -1
- package/dist/gen/ai/v1/assistant_pb.js +67 -11
- package/dist/gen/ai/v1/assistant_pb.js.map +1 -1
- package/dist/gen/alerts/v1/price_alerts_pb.d.ts +1 -1
- package/dist/gen/auth/v1/address_book_pb.d.ts +1 -1
- package/dist/gen/auth/v1/api_keys_pb.d.ts +5 -5
- package/dist/gen/auth/v1/api_keys_pb.js +4 -4
- package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +27 -2
- package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/auth_pb.js +18 -1
- package/dist/gen/auth/v1/auth_pb.js.map +1 -1
- package/dist/gen/auth/v1/mfa_pb.d.ts +1 -1
- package/dist/gen/auth/v1/policies_pb.d.ts +19 -2
- package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/policies_pb.js +18 -1
- package/dist/gen/auth/v1/policies_pb.js.map +1 -1
- package/dist/gen/auth/v1/profile_pb.d.ts +8 -12
- package/dist/gen/auth/v1/profile_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/profile_pb.js +1 -1
- package/dist/gen/auth/v1/profile_pb.js.map +1 -1
- package/dist/gen/auth/v1/resolve_pb.d.ts +1 -1
- package/dist/gen/auth/v1/social_verification_pb.d.ts +45 -11
- 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 +18 -2
- package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.js +16 -2
- package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
- package/dist/gen/chain/analytics/v1/analytics_read_pb.d.ts +1 -1
- package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +1 -1
- package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +229 -39
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts.map +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js +34 -10
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +13 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.d.ts.map +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.js +13 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +7 -4
- 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 +11 -2
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js +10 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
- package/dist/gen/chain/zipper/v1/reason_pb.d.ts +1 -1
- package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +11 -7
- package/dist/gen/chain/zipper/v1/zipper_pb.d.ts.map +1 -1
- package/dist/gen/chain/zipper/v1/zipper_pb.js +2 -2
- package/dist/gen/chain/zipper/v1/zipper_pb.js.map +1 -1
- package/dist/gen/changelog/v1/changelog_pb.d.ts +1 -1
- package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts +1 -1
- package/dist/gen/claims/v1/claims_pb.d.ts +1 -1
- package/dist/gen/fees/v1/fees_pb.d.ts +1 -1
- package/dist/gen/index.d.ts +3 -1
- package/dist/gen/index.js +23 -21
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +58 -17
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts.map +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.js +32 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
- package/dist/gen/ledger/read/v1/statement_export_pb.d.ts +424 -0
- package/dist/gen/ledger/read/v1/statement_export_pb.d.ts.map +1 -0
- package/dist/gen/ledger/read/v1/statement_export_pb.js +154 -0
- package/dist/gen/ledger/read/v1/statement_export_pb.js.map +1 -0
- package/dist/gen/marketdata/v1/asset_info_pb.d.ts +1 -1
- package/dist/gen/marketdata/v1/heatmap_pb.d.ts +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +1 -1
- package/dist/gen/notifications/v1/notifications_pb.d.ts +1 -1
- package/dist/gen/orderbook/v1/orderbook_pb.d.ts +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +29 -5
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +1 -1
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +3 -2
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
- package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +1 -1
- package/dist/gen/polyester/type/v1/u128_pb.d.ts +1 -1
- package/dist/gen/privatews/v1/private_ws_pb.d.ts +1 -1
- package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +13 -8
- package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts.map +1 -1
- package/dist/gen/ratelimit/v1/ratelimit_pb.js.map +1 -1
- package/dist/gen/rewards/v1/rewards_pb.d.ts +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +23 -11
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +4 -2
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +48 -12
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js +35 -6
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +1 -1
- package/dist/gen/swap/v1/swap_pb.d.ts +1 -1
- package/dist/gen/system/v1/system_pb.d.ts +1 -1
- package/dist/gen/tradews/v1/trade_ws_pb.d.ts +1 -1
- package/dist/gen/transfer/v1/dust_conversion_pb.d.ts +741 -0
- package/dist/gen/transfer/v1/dust_conversion_pb.d.ts.map +1 -0
- package/dist/gen/transfer/v1/dust_conversion_pb.js +235 -0
- package/dist/gen/transfer/v1/dust_conversion_pb.js.map +1 -0
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +368 -4
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.js +166 -4
- package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.d.ts +11 -6
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +4 -2
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/gen/vip/v1/vip_pb.d.ts +1 -1
- package/dist/index.d.ts +13 -7
- package/dist/index.js +1 -1
- package/dist/realtime/private-orders.d.ts +8 -0
- package/dist/realtime/private-orders.d.ts.map +1 -1
- package/dist/realtime/private-orders.js +38 -5
- package/dist/realtime/private-orders.js.map +1 -1
- package/dist/realtime/snapshot-then-stream.js +1 -1
- package/dist/server-core.js +3 -3
- package/dist/services/accounts/accounts.js +1 -1
- package/dist/services/accounts/accounts.schemas.js +1 -1
- package/dist/services/address-book/address-book.js +1 -1
- package/dist/services/address-book/address-book.schemas.d.ts.map +1 -1
- package/dist/services/address-book/address-book.schemas.js +4 -4
- package/dist/services/address-book/address-book.schemas.js.map +1 -1
- package/dist/services/api-keys/api-keys.js +1 -1
- package/dist/services/api-keys/api-keys.schemas.js +1 -1
- package/dist/services/assistant/assistant-events.schemas.d.ts +27 -27
- package/dist/services/assistant/assistant.codecs.d.ts +7 -1
- package/dist/services/assistant/assistant.codecs.d.ts.map +1 -1
- package/dist/services/assistant/assistant.codecs.js +5 -1
- package/dist/services/assistant/assistant.codecs.js.map +1 -1
- package/dist/services/assistant/assistant.d.ts +4 -3
- package/dist/services/assistant/assistant.d.ts.map +1 -1
- package/dist/services/assistant/assistant.js +7 -5
- package/dist/services/assistant/assistant.js.map +1 -1
- package/dist/services/assistant/assistant.schemas.d.ts +40 -3
- package/dist/services/assistant/assistant.schemas.d.ts.map +1 -1
- package/dist/services/assistant/assistant.schemas.js +19 -5
- package/dist/services/assistant/assistant.schemas.js.map +1 -1
- package/dist/services/assistant/assistant.types.d.ts +3 -3
- package/dist/services/auth/account-signer-auth.js +2 -2
- package/dist/services/auth/auth.js +1 -1
- package/dist/services/auth/profile/profile.d.ts +1 -1
- package/dist/services/auth/profile/profile.js +3 -3
- package/dist/services/auth/profile/profile.js.map +1 -1
- package/dist/services/auth/profile/profile.schemas.d.ts +0 -1
- package/dist/services/auth/profile/profile.schemas.d.ts.map +1 -1
- package/dist/services/auth/profile/profile.schemas.js +0 -1
- package/dist/services/auth/profile/profile.schemas.js.map +1 -1
- 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.js +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +16 -16
- package/dist/services/auto-withdraw/auto-withdraw.schemas.js +1 -1
- package/dist/services/balances/balances.d.ts +4 -3
- package/dist/services/balances/balances.d.ts.map +1 -1
- package/dist/services/balances/balances.js +13 -5
- package/dist/services/balances/balances.js.map +1 -1
- package/dist/services/balances/balances.schemas.d.ts +36 -29
- package/dist/services/balances/balances.schemas.d.ts.map +1 -1
- package/dist/services/balances/balances.schemas.js +7 -11
- 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.js +2 -2
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/chain-analytics/chain-analytics.js +1 -1
- package/dist/services/changelog/changelog.js +1 -1
- package/dist/services/changelog/changelog.schemas.d.ts +38 -38
- package/dist/services/checkpoints/checkpoints.js +1 -1
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
- package/dist/services/claims/claims.js +1 -1
- package/dist/services/claims/claims.schemas.d.ts +2 -2
- package/dist/services/claims/claims.schemas.js +1 -1
- package/dist/services/deposit/deposit.js +1 -1
- package/dist/services/dust-conversion/dust-conversion.codecs.d.ts +22 -0
- package/dist/services/dust-conversion/dust-conversion.codecs.d.ts.map +1 -0
- package/dist/services/dust-conversion/dust-conversion.codecs.js +22 -0
- package/dist/services/dust-conversion/dust-conversion.codecs.js.map +1 -0
- package/dist/services/dust-conversion/dust-conversion.d.ts +59 -0
- package/dist/services/dust-conversion/dust-conversion.d.ts.map +1 -0
- package/dist/services/dust-conversion/dust-conversion.js +87 -0
- package/dist/services/dust-conversion/dust-conversion.js.map +1 -0
- package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +561 -0
- package/dist/services/dust-conversion/dust-conversion.schemas.d.ts.map +1 -0
- package/dist/services/dust-conversion/dust-conversion.schemas.js +190 -0
- package/dist/services/dust-conversion/dust-conversion.schemas.js.map +1 -0
- package/dist/services/dust-conversion/dust-conversion.types.d.ts +3 -0
- package/dist/services/dust-conversion/service.d.ts +8 -0
- package/dist/services/dust-conversion/service.d.ts.map +1 -0
- package/dist/services/dust-conversion/service.js +9 -0
- package/dist/services/dust-conversion/service.js.map +1 -0
- package/dist/services/fees/fees.js +1 -1
- package/dist/services/guard-signer/guard-signer.js +1 -1
- package/dist/services/guard-signer/guard-signer.schemas.js +1 -1
- package/dist/services/heatmap/heatmap.js +2 -2
- package/dist/services/internal-transfers/internal-transfers.codecs.d.ts +13 -1
- package/dist/services/internal-transfers/internal-transfers.codecs.d.ts.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.codecs.js +22 -2
- package/dist/services/internal-transfers/internal-transfers.codecs.js.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.d.ts +14 -2
- package/dist/services/internal-transfers/internal-transfers.d.ts.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.js +30 -4
- package/dist/services/internal-transfers/internal-transfers.js.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +262 -2
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.js +62 -4
- package/dist/services/internal-transfers/internal-transfers.schemas.js.map +1 -1
- package/dist/services/internal-transfers/internal-transfers.types.d.ts +3 -3
- package/dist/services/lifecycle/lifecycle.codecs.d.ts +1 -1
- package/dist/services/lifecycle/lifecycle.codecs.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.codecs.js +1 -0
- package/dist/services/lifecycle/lifecycle.codecs.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.d.ts +26 -8
- package/dist/services/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.js +42 -10
- package/dist/services/lifecycle/lifecycle.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +95 -71
- package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.js +45 -46
- package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.types.d.ts +2 -2
- package/dist/services/lifecycle/service.js +1 -1
- package/dist/services/lifecycle/service.js.map +1 -1
- package/dist/services/market-data/market-data.js +3 -3
- package/dist/services/market-overview/market-overview.js +2 -2
- package/dist/services/market-overview/market-overview.schemas.js +1 -1
- package/dist/services/notifications/notifications.js +1 -1
- package/dist/services/orderbook/orderbook.d.ts.map +1 -1
- package/dist/services/orderbook/orderbook.js +3 -2
- package/dist/services/orderbook/orderbook.js.map +1 -1
- package/dist/services/orderbook/orderbook.schemas.d.ts +10 -0
- package/dist/services/orderbook/orderbook.schemas.d.ts.map +1 -1
- package/dist/services/orderbook/orderbook.schemas.js +4 -1
- package/dist/services/orderbook/orderbook.schemas.js.map +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +11 -1
- package/dist/services/orders/order-errors.schemas.d.ts.map +1 -1
- package/dist/services/orders/order-errors.schemas.js +19 -6
- package/dist/services/orders/order-errors.schemas.js.map +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +68 -28
- package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-batch.schemas.js +5 -4
- package/dist/services/orders/orders-batch.schemas.js.map +1 -1
- package/dist/services/orders/orders-identifiers.schemas.js +2 -1
- package/dist/services/orders/orders-identifiers.schemas.js.map +1 -1
- package/dist/services/orders/orders-input.schemas.d.ts +11 -4
- package/dist/services/orders/orders-input.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-input.schemas.js +4 -3
- package/dist/services/orders/orders-input.schemas.js.map +1 -1
- package/dist/services/orders/orders-modify.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-modify.schemas.js +4 -3
- package/dist/services/orders/orders-modify.schemas.js.map +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +14 -14
- package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-output.schemas.js +2 -10
- package/dist/services/orders/orders-output.schemas.js.map +1 -1
- package/dist/services/orders/orders-risk.schemas.js +3 -3
- package/dist/services/orders/orders.d.ts +6 -0
- package/dist/services/orders/orders.d.ts.map +1 -1
- package/dist/services/orders/orders.js +6 -2
- package/dist/services/orders/orders.js.map +1 -1
- package/dist/services/policies/api-key-policies/api-key-policies.js +1 -1
- package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
- package/dist/services/policies/shared.codecs.js +10 -4
- package/dist/services/policies/shared.codecs.js.map +1 -1
- package/dist/services/policies/shared.d.ts +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.js +2 -2
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
- package/dist/services/price-alerts/price-alerts.js +1 -1
- package/dist/services/rate-limits/rate-limits.d.ts +4 -1
- package/dist/services/rate-limits/rate-limits.d.ts.map +1 -1
- package/dist/services/rate-limits/rate-limits.js +5 -2
- package/dist/services/rate-limits/rate-limits.js.map +1 -1
- package/dist/services/rate-limits/rate-limits.schemas.d.ts +1 -0
- package/dist/services/rate-limits/rate-limits.schemas.d.ts.map +1 -1
- package/dist/services/rate-limits/rate-limits.schemas.js +1 -0
- package/dist/services/rate-limits/rate-limits.schemas.js.map +1 -1
- package/dist/services/rewards/rewards.js +1 -1
- package/dist/services/rewards/rewards.schemas.d.ts +4 -4
- package/dist/services/social-verification/social-verification.codecs.js +6 -2
- package/dist/services/social-verification/social-verification.codecs.js.map +1 -1
- package/dist/services/social-verification/social-verification.d.ts +14 -3
- package/dist/services/social-verification/social-verification.d.ts.map +1 -1
- package/dist/services/social-verification/social-verification.js +15 -4
- package/dist/services/social-verification/social-verification.js.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.d.ts +13 -3
- package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.js +13 -5
- package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
- package/dist/services/statement-exports/service.d.ts +8 -0
- package/dist/services/statement-exports/service.d.ts.map +1 -0
- package/dist/services/statement-exports/service.js +9 -0
- package/dist/services/statement-exports/service.js.map +1 -0
- package/dist/services/statement-exports/statement-exports.codecs.d.ts +17 -0
- package/dist/services/statement-exports/statement-exports.codecs.d.ts.map +1 -0
- package/dist/services/statement-exports/statement-exports.codecs.js +19 -0
- package/dist/services/statement-exports/statement-exports.codecs.js.map +1 -0
- package/dist/services/statement-exports/statement-exports.d.ts +34 -0
- package/dist/services/statement-exports/statement-exports.d.ts.map +1 -0
- package/dist/services/statement-exports/statement-exports.js +53 -0
- package/dist/services/statement-exports/statement-exports.js.map +1 -0
- package/dist/services/statement-exports/statement-exports.schemas.d.ts +269 -0
- package/dist/services/statement-exports/statement-exports.schemas.d.ts.map +1 -0
- package/dist/services/statement-exports/statement-exports.schemas.js +98 -0
- package/dist/services/statement-exports/statement-exports.schemas.js.map +1 -0
- package/dist/services/statement-exports/statement-exports.types.d.ts +3 -0
- package/dist/services/subaccounts/subaccounts.codecs.js +3 -1
- package/dist/services/subaccounts/subaccounts.codecs.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.js +3 -3
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +12 -12
- package/dist/services/system/system.js +1 -1
- package/dist/services/system/system.schemas.d.ts +13 -13
- package/dist/services/trades/trades.js +2 -2
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trading-withdraws/service.js +1 -1
- package/dist/services/trading-withdraws/service.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.d.ts +10 -12
- package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +28 -20
- package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +0 -5
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js +1 -5
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
- package/dist/services/trading-withdraws/wallet-message.js +2 -2
- package/dist/services/trading-withdraws/wallet-message.js.map +1 -1
- package/dist/services/transfers/transfers.js +2 -2
- package/dist/services/triggers/trigger-child-order.schemas.js +3 -3
- package/dist/services/triggers/trigger-input.schemas.d.ts +5 -4
- package/dist/services/triggers/trigger-input.schemas.d.ts.map +1 -1
- package/dist/services/triggers/trigger-input.schemas.js +7 -6
- package/dist/services/triggers/trigger-input.schemas.js.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +33 -24
- package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.js +1 -1
- package/dist/services/triggers/triggers.js +2 -2
- package/dist/services/vip/vip.js +1 -1
- package/dist/services/vip/vip.schemas.d.ts +3 -3
- package/dist/services/vip/vip.schemas.js +1 -1
- package/dist/services/zipper/zipper.js +1 -1
- package/dist/services/zipper/zipper.schemas.d.ts.map +1 -1
- package/dist/services/zipper/zipper.schemas.js +11 -1
- package/dist/services/zipper/zipper.schemas.js.map +1 -1
- package/dist/shared/account-scope.js +4 -1
- package/dist/shared/account-scope.js.map +1 -1
- package/dist/shared/connect-error-mapping.d.ts.map +1 -1
- package/dist/shared/connect-error-mapping.js +3 -0
- package/dist/shared/connect-error-mapping.js.map +1 -1
- package/dist/shared/error-detail.d.ts +5 -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/alerts.js +1 -1
- package/dist/shared/error-details/assistant.js +1 -1
- package/dist/shared/error-details/auth.js +8 -3
- package/dist/shared/error-details/auth.js.map +1 -1
- package/dist/shared/error-details/claims.js +1 -1
- package/dist/shared/error-details/internal-transfer.js +1 -1
- package/dist/shared/error-details/ledger.js +1 -1
- package/dist/shared/error-details/market-overview.js +1 -1
- package/dist/shared/error-details/notifications.js +1 -1
- package/dist/shared/error-details/orders.js +1 -1
- package/dist/shared/error-details/profile.js +1 -1
- package/dist/shared/error-details/rate-limit.js +1 -1
- package/dist/shared/error-details/withdraw.js +1 -1
- package/dist/shared/rate-limit.schemas.js +1 -1
- package/dist/shared/transports.d.ts +2 -1
- package/dist/shared/transports.d.ts.map +1 -1
- package/dist/shared/transports.js +52 -9
- package/dist/shared/transports.js.map +1 -1
- package/dist/utils/base58-id.js +1 -1
- package/dist/utils/base58-id.js.map +1 -1
- package/dist/utils/cookies.js +1 -1
- package/dist/utils/numbers.js +3 -2
- package/dist/utils/numbers.js.map +1 -1
- package/dist/wired-services.d.ts.map +1 -1
- package/dist/wired-services.js +21 -17
- package/dist/wired-services.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { codeName } from "../../shared/error-detail.js";
|
|
2
|
+
import { OptionalTimestampMsSchema, U128Schema } from "../../shared/schemas.js";
|
|
3
|
+
import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
|
|
4
|
+
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
5
|
+
import { PositiveUint32InputSchema } from "../shared.js";
|
|
6
|
+
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
7
|
+
import { fromU128 } from "../../utils/u128.js";
|
|
8
|
+
import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
9
|
+
import { DustAssetEligibilityCodec, DustConversionStateCodec } from "./dust-conversion.codecs.js";
|
|
10
|
+
import * as v from "valibot";
|
|
11
|
+
//#region src/services/dust-conversion/dust-conversion.schemas.ts
|
|
12
|
+
const RequiredInputStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));
|
|
13
|
+
const ListDustBalancesInputSchema = v.pipe(v.strictObject({
|
|
14
|
+
...AccountScopeInputEntries,
|
|
15
|
+
/** One of the response's `targets`; omit for the first. */
|
|
16
|
+
targetAssetId: v.optional(PositiveUint32InputSchema)
|
|
17
|
+
}), v.transform(({ account, targetAssetId }) => ({
|
|
18
|
+
subaccountId: accountScopeToSubaccountId(account),
|
|
19
|
+
targetAssetId
|
|
20
|
+
})));
|
|
21
|
+
const QuoteDustConversionInputSchema = v.pipe(v.strictObject({
|
|
22
|
+
...AccountScopeInputEntries,
|
|
23
|
+
/** One of `listBalances`' `targets`. */
|
|
24
|
+
targetAssetId: PositiveUint32InputSchema
|
|
25
|
+
}), v.transform(({ account, targetAssetId }) => ({
|
|
26
|
+
subaccountId: accountScopeToSubaccountId(account),
|
|
27
|
+
targetAssetId
|
|
28
|
+
})));
|
|
29
|
+
const CreateDustConversionInputSchema = v.pipe(v.strictObject({
|
|
30
|
+
/** Must select the quote's account. */
|
|
31
|
+
...AccountScopeInputEntries,
|
|
32
|
+
/** `quoteId` from `quote`, at most 30 seconds old. A quote converts once. */
|
|
33
|
+
quoteId: RequiredInputStringSchema,
|
|
34
|
+
/** Stable key collapsing retries for the account; reusing it returns the same conversion. */
|
|
35
|
+
idempotencyKey: RequiredInputStringSchema
|
|
36
|
+
}), v.transform(({ account, quoteId, idempotencyKey }) => ({
|
|
37
|
+
subaccountId: accountScopeToSubaccountId(account),
|
|
38
|
+
quoteId,
|
|
39
|
+
idempotencyKey
|
|
40
|
+
})));
|
|
41
|
+
const GetDustConversionInputSchema = v.pipe(v.strictObject({
|
|
42
|
+
...AccountScopeInputEntries,
|
|
43
|
+
conversionId: RequiredInputStringSchema
|
|
44
|
+
}), v.transform(({ account, conversionId }) => ({
|
|
45
|
+
subaccountId: accountScopeToSubaccountId(account),
|
|
46
|
+
conversionId
|
|
47
|
+
})));
|
|
48
|
+
const ListDustConversionsInputSchema = v.pipe(v.strictObject({
|
|
49
|
+
...AccountScopeInputEntries,
|
|
50
|
+
/** Page size: default 20, at most 100. */
|
|
51
|
+
limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(100))),
|
|
52
|
+
/** Previous `nextPageToken`; reuse only with the same account. */
|
|
53
|
+
pageToken: v.optional(v.pipe(v.string(), v.trim()))
|
|
54
|
+
}), v.transform(({ account, limit, pageToken }) => ({
|
|
55
|
+
subaccountId: accountScopeToSubaccountId(account),
|
|
56
|
+
limit,
|
|
57
|
+
pageToken
|
|
58
|
+
})));
|
|
59
|
+
/** Wire `*_e18` U128 → exact decimal string; an unset amount is `"0"`. */
|
|
60
|
+
function e18ToDecimal(value) {
|
|
61
|
+
return scaledToDecimalOutput(fromU128(value), 18);
|
|
62
|
+
}
|
|
63
|
+
const AmountE18Schema = v.optional(U128Schema);
|
|
64
|
+
/** Decimal scale a wire price may carry, as catalog scales are bounded. */
|
|
65
|
+
const PriceScaleSchema = v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(18));
|
|
66
|
+
/** One Trading balance judged for conversion. Amounts are decimal strings. */
|
|
67
|
+
const DustBalanceSchema = v.pipe(v.object({
|
|
68
|
+
assetId: v.number(),
|
|
69
|
+
amountE18: AmountE18Schema,
|
|
70
|
+
eligibility: enumLabelSchema(DustAssetEligibilityCodec.protoToOutput),
|
|
71
|
+
usdValueE18: AmountE18Schema
|
|
72
|
+
}), v.transform((balance) => ({
|
|
73
|
+
assetId: balance.assetId,
|
|
74
|
+
/** The whole available balance: what no open order or other reservation holds. */
|
|
75
|
+
amount: e18ToDecimal(balance.amountE18),
|
|
76
|
+
eligibility: balance.eligibility,
|
|
77
|
+
/** USD value, rounded down; null when the asset has no current price. */
|
|
78
|
+
usdValue: balance.usdValueE18 === void 0 ? null : e18ToDecimal(balance.usdValueE18)
|
|
79
|
+
})));
|
|
80
|
+
/** USD index price a quote used for one asset. */
|
|
81
|
+
const DustAssetPriceSchema = v.pipe(v.object({
|
|
82
|
+
assetId: v.number(),
|
|
83
|
+
priceTicks: v.bigint(),
|
|
84
|
+
priceScale: PriceScaleSchema,
|
|
85
|
+
asOf: OptionalTimestampMsSchema
|
|
86
|
+
}), v.transform((price) => ({
|
|
87
|
+
assetId: price.assetId,
|
|
88
|
+
/** USD per whole asset unit, exact. */
|
|
89
|
+
price: scaledToDecimalOutput(price.priceTicks, price.priceScale),
|
|
90
|
+
/** Time of the oldest index observation the price used. */
|
|
91
|
+
asOf: price.asOf ?? null
|
|
92
|
+
})));
|
|
93
|
+
const DustConversionSchema = v.pipe(v.object({
|
|
94
|
+
conversionId: v.pipe(v.string(), v.minLength(1)),
|
|
95
|
+
quoteId: v.pipe(v.string(), v.minLength(1)),
|
|
96
|
+
state: enumLabelSchema(DustConversionStateCodec.protoToOutput),
|
|
97
|
+
refusalCode: v.number(),
|
|
98
|
+
targetAssetId: v.number(),
|
|
99
|
+
sources: v.array(v.object({
|
|
100
|
+
assetId: v.number(),
|
|
101
|
+
amountE18: AmountE18Schema
|
|
102
|
+
})),
|
|
103
|
+
payoutE18: AmountE18Schema,
|
|
104
|
+
quotedPayoutE18: AmountE18Schema,
|
|
105
|
+
feeE18: AmountE18Schema,
|
|
106
|
+
feeBps: v.number(),
|
|
107
|
+
createdAt: OptionalTimestampMsSchema,
|
|
108
|
+
completedAt: OptionalTimestampMsSchema
|
|
109
|
+
}), v.transform((conversion) => ({
|
|
110
|
+
conversionId: conversion.conversionId,
|
|
111
|
+
/** The quote the conversion converted. */
|
|
112
|
+
quoteId: conversion.quoteId,
|
|
113
|
+
state: conversion.state,
|
|
114
|
+
/** Why a `refused` conversion was refused; null otherwise. */
|
|
115
|
+
refusalCode: conversion.refusalCode === 0 ? null : codeName(ErrorCode, conversion.refusalCode) ?? "UNSPECIFIED",
|
|
116
|
+
targetAssetId: conversion.targetAssetId,
|
|
117
|
+
/** Whole quoted balances moved, in asset id order. */
|
|
118
|
+
sources: conversion.sources.map((source) => ({
|
|
119
|
+
assetId: source.assetId,
|
|
120
|
+
amount: e18ToDecimal(source.amountE18)
|
|
121
|
+
})),
|
|
122
|
+
/** Target amount credited after the fee, at the index prices when it was created. */
|
|
123
|
+
payout: e18ToDecimal(conversion.payoutE18),
|
|
124
|
+
/** The payout the quote showed. */
|
|
125
|
+
quotedPayout: e18ToDecimal(conversion.quotedPayoutE18),
|
|
126
|
+
/** Fee taken from the payout, in the target asset. */
|
|
127
|
+
fee: e18ToDecimal(conversion.feeE18),
|
|
128
|
+
feeBps: conversion.feeBps,
|
|
129
|
+
createdAt: conversion.createdAt ?? null,
|
|
130
|
+
/** Null until `completed`. */
|
|
131
|
+
completedAt: conversion.completedAt ?? null
|
|
132
|
+
})));
|
|
133
|
+
const ListDustBalancesResultSchema = v.pipe(v.object({
|
|
134
|
+
targetAssetId: v.number(),
|
|
135
|
+
targets: v.array(v.number()),
|
|
136
|
+
feeBps: v.number(),
|
|
137
|
+
balances: v.array(DustBalanceSchema),
|
|
138
|
+
grossUsdE18: AmountE18Schema,
|
|
139
|
+
payoutE18: AmountE18Schema,
|
|
140
|
+
targetAvailable: v.boolean()
|
|
141
|
+
}), v.transform((result) => ({
|
|
142
|
+
/** Target the balances were judged for. */
|
|
143
|
+
targetAssetId: result.targetAssetId,
|
|
144
|
+
/** Every asset the account can convert dust into, in preference order. */
|
|
145
|
+
targets: result.targets,
|
|
146
|
+
/** Fee taken from the payout. */
|
|
147
|
+
feeBps: result.feeBps,
|
|
148
|
+
/** Every nonzero available Trading balance, in asset id order. */
|
|
149
|
+
balances: result.balances,
|
|
150
|
+
/** Eligible balances' total USD value, rounded down. */
|
|
151
|
+
grossUsd: e18ToDecimal(result.grossUsdE18),
|
|
152
|
+
/** Target amount they would bring now, after the fee. */
|
|
153
|
+
payout: e18ToDecimal(result.payoutE18),
|
|
154
|
+
/** False when the target cannot be paid now; `quote` is then refused. */
|
|
155
|
+
targetAvailable: result.targetAvailable
|
|
156
|
+
})));
|
|
157
|
+
const DustConversionQuoteSchema = v.pipe(v.object({
|
|
158
|
+
quoteId: v.string(),
|
|
159
|
+
expiresAt: OptionalTimestampMsSchema,
|
|
160
|
+
targetAssetId: v.number(),
|
|
161
|
+
feeBps: v.number(),
|
|
162
|
+
grossUsdE18: AmountE18Schema,
|
|
163
|
+
payoutE18: AmountE18Schema,
|
|
164
|
+
balances: v.array(DustBalanceSchema),
|
|
165
|
+
prices: v.array(DustAssetPriceSchema)
|
|
166
|
+
}), v.transform((quote) => ({
|
|
167
|
+
/** Pass to `create`. Empty when nothing converts; `balances` says why. */
|
|
168
|
+
quoteId: quote.quoteId,
|
|
169
|
+
/** After this, `create` refuses the quote with `DUST_QUOTE_EXPIRED`. */
|
|
170
|
+
expiresAt: quote.expiresAt ?? null,
|
|
171
|
+
targetAssetId: quote.targetAssetId,
|
|
172
|
+
/** Fee taken from the payout. */
|
|
173
|
+
feeBps: quote.feeBps,
|
|
174
|
+
/** Sources' total USD value, rounded down. */
|
|
175
|
+
grossUsd: e18ToDecimal(quote.grossUsdE18),
|
|
176
|
+
/** Target amount after the fee, rounded down to the target's quantity precision. */
|
|
177
|
+
payout: e18ToDecimal(quote.payoutE18),
|
|
178
|
+
/** Every nonzero available Trading balance, sources and others, in asset id order. */
|
|
179
|
+
balances: quote.balances,
|
|
180
|
+
/** Prices of the sources and the target, in asset id order. */
|
|
181
|
+
prices: quote.prices
|
|
182
|
+
})));
|
|
183
|
+
const ListDustConversionsResultSchema = v.object({
|
|
184
|
+
conversions: v.array(DustConversionSchema),
|
|
185
|
+
nextPageToken: v.optional(v.string(), "")
|
|
186
|
+
});
|
|
187
|
+
//#endregion
|
|
188
|
+
export { CreateDustConversionInputSchema, DustAssetPriceSchema, DustBalanceSchema, DustConversionQuoteSchema, DustConversionSchema, GetDustConversionInputSchema, ListDustBalancesInputSchema, ListDustBalancesResultSchema, ListDustConversionsInputSchema, ListDustConversionsResultSchema, QuoteDustConversionInputSchema };
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=dust-conversion.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dust-conversion.schemas.js","names":[],"sources":["../../../src/services/dust-conversion/dust-conversion.schemas.ts"],"sourcesContent":["import type { MessageInitShape } from \"@bufbuild/protobuf\";\nimport * as v from \"valibot\";\nimport type * as Proto from \"../../gen/transfer/v1/dust_conversion_pb.js\";\nimport { ErrorCode } from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { E18_SCALE, scaledToDecimalOutput } from \"../../shared/decimal-surface.js\";\nimport { codeName } from \"../../shared/error-detail.js\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport { OptionalTimestampMsSchema, U128Schema } from \"../../shared/schemas.js\";\nimport { fromU128, type U128Value } from \"../../utils/u128.js\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport { DustAssetEligibilityCodec, DustConversionStateCodec } from \"./dust-conversion.codecs.js\";\n\nconst RequiredInputStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nexport const ListDustBalancesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** One of the response's `targets`; omit for the first. */\n targetAssetId: v.optional(PositiveUint32InputSchema),\n }),\n v.transform(\n ({ account, targetAssetId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n targetAssetId,\n }) satisfies MessageInitShape<typeof Proto.ListDustBalancesRequestSchema>,\n ),\n);\n\nexport type ListDustBalancesInput = v.InferInput<typeof ListDustBalancesInputSchema>;\n\nexport const QuoteDustConversionInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** One of `listBalances`' `targets`. */\n targetAssetId: PositiveUint32InputSchema,\n }),\n v.transform(\n ({ account, targetAssetId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n targetAssetId,\n }) satisfies MessageInitShape<typeof Proto.QuoteDustConversionRequestSchema>,\n ),\n);\n\nexport type QuoteDustConversionInput = v.InferInput<typeof QuoteDustConversionInputSchema>;\n\nexport const CreateDustConversionInputSchema = v.pipe(\n v.strictObject({\n /** Must select the quote's account. */\n ...AccountScopeInputEntries,\n /** `quoteId` from `quote`, at most 30 seconds old. A quote converts once. */\n quoteId: RequiredInputStringSchema,\n /** Stable key collapsing retries for the account; reusing it returns the same conversion. */\n idempotencyKey: RequiredInputStringSchema,\n }),\n v.transform(\n ({ account, quoteId, idempotencyKey }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n quoteId,\n idempotencyKey,\n }) satisfies MessageInitShape<typeof Proto.CreateDustConversionRequestSchema>,\n ),\n);\n\nexport type CreateDustConversionInput = v.InferInput<typeof CreateDustConversionInputSchema>;\n\nexport const GetDustConversionInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n conversionId: RequiredInputStringSchema,\n }),\n v.transform(\n ({ account, conversionId }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n conversionId,\n }) satisfies MessageInitShape<typeof Proto.GetDustConversionRequestSchema>,\n ),\n);\n\nexport type GetDustConversionInput = v.InferInput<typeof GetDustConversionInputSchema>;\n\nexport const ListDustConversionsInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n /** Page size: default 20, at most 100. */\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(100))),\n /** Previous `nextPageToken`; reuse only with the same account. */\n pageToken: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.transform(\n ({ account, limit, pageToken }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n pageToken,\n }) satisfies MessageInitShape<typeof Proto.ListDustConversionsRequestSchema>,\n ),\n);\n\nexport type ListDustConversionsInput = v.InferInput<typeof ListDustConversionsInputSchema>;\n\n/** Wire `*_e18` U128 → exact decimal string; an unset amount is `\"0\"`. */\nfunction e18ToDecimal(value: U128Value | undefined): string {\n return scaledToDecimalOutput(fromU128(value), E18_SCALE);\n}\n\nconst AmountE18Schema = v.optional(U128Schema);\n\n/** Decimal scale a wire price may carry, as catalog scales are bounded. */\nconst PriceScaleSchema = v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(18));\n\n/** One Trading balance judged for conversion. Amounts are decimal strings. */\nexport const DustBalanceSchema = v.pipe(\n v.object({\n assetId: v.number(),\n amountE18: AmountE18Schema,\n eligibility: enumLabelSchema(DustAssetEligibilityCodec.protoToOutput),\n usdValueE18: AmountE18Schema,\n }),\n v.transform((balance) => ({\n assetId: balance.assetId,\n /** The whole available balance: what no open order or other reservation holds. */\n amount: e18ToDecimal(balance.amountE18),\n eligibility: balance.eligibility,\n /** USD value, rounded down; null when the asset has no current price. */\n usdValue: balance.usdValueE18 === undefined ? null : e18ToDecimal(balance.usdValueE18),\n })),\n);\n\nexport type DustBalance = v.InferOutput<typeof DustBalanceSchema>;\n\n/** USD index price a quote used for one asset. */\nexport const DustAssetPriceSchema = v.pipe(\n v.object({\n assetId: v.number(),\n priceTicks: v.bigint(),\n priceScale: PriceScaleSchema,\n asOf: OptionalTimestampMsSchema,\n }),\n v.transform((price) => ({\n assetId: price.assetId,\n /** USD per whole asset unit, exact. */\n price: scaledToDecimalOutput(price.priceTicks, price.priceScale),\n /** Time of the oldest index observation the price used. */\n asOf: price.asOf ?? null,\n })),\n);\n\nexport type DustAssetPrice = v.InferOutput<typeof DustAssetPriceSchema>;\n\nexport const DustConversionSchema = v.pipe(\n v.object({\n conversionId: v.pipe(v.string(), v.minLength(1)),\n quoteId: v.pipe(v.string(), v.minLength(1)),\n state: enumLabelSchema(DustConversionStateCodec.protoToOutput),\n refusalCode: v.number(),\n targetAssetId: v.number(),\n sources: v.array(v.object({ assetId: v.number(), amountE18: AmountE18Schema })),\n payoutE18: AmountE18Schema,\n quotedPayoutE18: AmountE18Schema,\n feeE18: AmountE18Schema,\n feeBps: v.number(),\n createdAt: OptionalTimestampMsSchema,\n completedAt: OptionalTimestampMsSchema,\n }),\n v.transform((conversion) => ({\n conversionId: conversion.conversionId,\n /** The quote the conversion converted. */\n quoteId: conversion.quoteId,\n state: conversion.state,\n /** Why a `refused` conversion was refused; null otherwise. */\n refusalCode:\n conversion.refusalCode === ErrorCode.UNSPECIFIED\n ? null\n : (codeName(ErrorCode, conversion.refusalCode) ?? \"UNSPECIFIED\"),\n targetAssetId: conversion.targetAssetId,\n /** Whole quoted balances moved, in asset id order. */\n sources: conversion.sources.map((source) => ({\n assetId: source.assetId,\n amount: e18ToDecimal(source.amountE18),\n })),\n /** Target amount credited after the fee, at the index prices when it was created. */\n payout: e18ToDecimal(conversion.payoutE18),\n /** The payout the quote showed. */\n quotedPayout: e18ToDecimal(conversion.quotedPayoutE18),\n /** Fee taken from the payout, in the target asset. */\n fee: e18ToDecimal(conversion.feeE18),\n feeBps: conversion.feeBps,\n createdAt: conversion.createdAt ?? null,\n /** Null until `completed`. */\n completedAt: conversion.completedAt ?? null,\n })),\n);\n\n/** One conversion of the account's dust into a target asset. Amounts are decimal strings. */\nexport type DustConversion = v.InferOutput<typeof DustConversionSchema>;\n\nexport const ListDustBalancesResultSchema = v.pipe(\n v.object({\n targetAssetId: v.number(),\n targets: v.array(v.number()),\n feeBps: v.number(),\n balances: v.array(DustBalanceSchema),\n grossUsdE18: AmountE18Schema,\n payoutE18: AmountE18Schema,\n targetAvailable: v.boolean(),\n }),\n v.transform((result) => ({\n /** Target the balances were judged for. */\n targetAssetId: result.targetAssetId,\n /** Every asset the account can convert dust into, in preference order. */\n targets: result.targets,\n /** Fee taken from the payout. */\n feeBps: result.feeBps,\n /** Every nonzero available Trading balance, in asset id order. */\n balances: result.balances,\n /** Eligible balances' total USD value, rounded down. */\n grossUsd: e18ToDecimal(result.grossUsdE18),\n /** Target amount they would bring now, after the fee. */\n payout: e18ToDecimal(result.payoutE18),\n /** False when the target cannot be paid now; `quote` is then refused. */\n targetAvailable: result.targetAvailable,\n })),\n);\n\n/** The account's balances judged for one target. Reserves nothing. */\nexport type ListDustBalancesResult = v.InferOutput<typeof ListDustBalancesResultSchema>;\n\nexport const DustConversionQuoteSchema = v.pipe(\n v.object({\n quoteId: v.string(),\n expiresAt: OptionalTimestampMsSchema,\n targetAssetId: v.number(),\n feeBps: v.number(),\n grossUsdE18: AmountE18Schema,\n payoutE18: AmountE18Schema,\n balances: v.array(DustBalanceSchema),\n prices: v.array(DustAssetPriceSchema),\n }),\n v.transform((quote) => ({\n /** Pass to `create`. Empty when nothing converts; `balances` says why. */\n quoteId: quote.quoteId,\n /** After this, `create` refuses the quote with `DUST_QUOTE_EXPIRED`. */\n expiresAt: quote.expiresAt ?? null,\n targetAssetId: quote.targetAssetId,\n /** Fee taken from the payout. */\n feeBps: quote.feeBps,\n /** Sources' total USD value, rounded down. */\n grossUsd: e18ToDecimal(quote.grossUsdE18),\n /** Target amount after the fee, rounded down to the target's quantity precision. */\n payout: e18ToDecimal(quote.payoutE18),\n /** Every nonzero available Trading balance, sources and others, in asset id order. */\n balances: quote.balances,\n /** Prices of the sources and the target, in asset id order. */\n prices: quote.prices,\n })),\n);\n\n/** A quote valid for 30 seconds. Reserves nothing. */\nexport type DustConversionQuote = v.InferOutput<typeof DustConversionQuoteSchema>;\n\nexport const ListDustConversionsResultSchema = v.object({\n conversions: v.array(DustConversionSchema),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\n/** One page of conversions, newest first; an empty `nextPageToken` means no more. */\nexport type ListDustConversionsResult = v.InferOutput<typeof ListDustConversionsResultSchema>;\n"],"mappings":";;;;;;;;;;;AAgBA,MAAM,4BAA4B,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AAE7E,MAAa,8BAA8B,EAAE,KACzC,EAAE,aAAa;CACX,GAAG;;CAEH,eAAe,EAAE,SAAS,yBAAyB;AACvD,CAAC,GACD,EAAE,WACG,EAAE,SAAS,qBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,iCAAiC,EAAE,KAC5C,EAAE,aAAa;CACX,GAAG;;CAEH,eAAe;AACnB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,qBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa;;CAEX,GAAG;;CAEH,SAAS;;CAET,gBAAgB;AACpB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,SAAS,sBAChB;CACG,cAAc,2BAA2B,OAAO;CAChD;CACA;AACJ,EACR,CACJ;AAIA,MAAa,+BAA+B,EAAE,KAC1C,EAAE,aAAa;CACX,GAAG;CACH,cAAc;AAClB,CAAC,GACD,EAAE,WACG,EAAE,SAAS,oBACP;CACG,cAAc,2BAA2B,OAAO;CAChD;AACJ,EACR,CACJ;AAIA,MAAa,iCAAiC,EAAE,KAC5C,EAAE,aAAa;CACX,GAAG;;CAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,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,WACG,EAAE,SAAS,OAAO,iBACd;CACG,cAAc,2BAA2B,OAAO;CAChD;CACA;AACJ,EACR,CACJ;;AAKA,SAAS,aAAa,OAAsC;CACxD,OAAO,sBAAsB,SAAS,KAAK,GAAA,EAAY;AAC3D;AAEA,MAAM,kBAAkB,EAAE,SAAS,UAAU;;AAG7C,MAAM,mBAAmB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,CAAC;;AAGtF,MAAa,oBAAoB,EAAE,KAC/B,EAAE,OAAO;CACL,SAAS,EAAE,OAAO;CAClB,WAAW;CACX,aAAa,gBAAgB,0BAA0B,aAAa;CACpE,aAAa;AACjB,CAAC,GACD,EAAE,WAAW,aAAa;CACtB,SAAS,QAAQ;;CAEjB,QAAQ,aAAa,QAAQ,SAAS;CACtC,aAAa,QAAQ;;CAErB,UAAU,QAAQ,gBAAgB,KAAA,IAAY,OAAO,aAAa,QAAQ,WAAW;AACzF,EAAE,CACN;;AAKA,MAAa,uBAAuB,EAAE,KAClC,EAAE,OAAO;CACL,SAAS,EAAE,OAAO;CAClB,YAAY,EAAE,OAAO;CACrB,YAAY;CACZ,MAAM;AACV,CAAC,GACD,EAAE,WAAW,WAAW;CACpB,SAAS,MAAM;;CAEf,OAAO,sBAAsB,MAAM,YAAY,MAAM,UAAU;;CAE/D,MAAM,MAAM,QAAQ;AACxB,EAAE,CACN;AAIA,MAAa,uBAAuB,EAAE,KAClC,EAAE,OAAO;CACL,cAAc,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,UAAU,CAAC,CAAC;CAC/C,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,UAAU,CAAC,CAAC;CAC1C,OAAO,gBAAgB,yBAAyB,aAAa;CAC7D,aAAa,EAAE,OAAO;CACtB,eAAe,EAAE,OAAO;CACxB,SAAS,EAAE,MAAM,EAAE,OAAO;EAAE,SAAS,EAAE,OAAO;EAAG,WAAW;CAAgB,CAAC,CAAC;CAC9E,WAAW;CACX,iBAAiB;CACjB,QAAQ;CACR,QAAQ,EAAE,OAAO;CACjB,WAAW;CACX,aAAa;AACjB,CAAC,GACD,EAAE,WAAW,gBAAgB;CACzB,cAAc,WAAW;;CAEzB,SAAS,WAAW;CACpB,OAAO,WAAW;;CAElB,aACI,WAAW,gBAAA,IACL,OACC,SAAS,WAAW,WAAW,WAAW,KAAK;CAC1D,eAAe,WAAW;;CAE1B,SAAS,WAAW,QAAQ,KAAK,YAAY;EACzC,SAAS,OAAO;EAChB,QAAQ,aAAa,OAAO,SAAS;CACzC,EAAE;;CAEF,QAAQ,aAAa,WAAW,SAAS;;CAEzC,cAAc,aAAa,WAAW,eAAe;;CAErD,KAAK,aAAa,WAAW,MAAM;CACnC,QAAQ,WAAW;CACnB,WAAW,WAAW,aAAa;;CAEnC,aAAa,WAAW,eAAe;AAC3C,EAAE,CACN;AAKA,MAAa,+BAA+B,EAAE,KAC1C,EAAE,OAAO;CACL,eAAe,EAAE,OAAO;CACxB,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;CAC3B,QAAQ,EAAE,OAAO;CACjB,UAAU,EAAE,MAAM,iBAAiB;CACnC,aAAa;CACb,WAAW;CACX,iBAAiB,EAAE,QAAQ;AAC/B,CAAC,GACD,EAAE,WAAW,YAAY;;CAErB,eAAe,OAAO;;CAEtB,SAAS,OAAO;;CAEhB,QAAQ,OAAO;;CAEf,UAAU,OAAO;;CAEjB,UAAU,aAAa,OAAO,WAAW;;CAEzC,QAAQ,aAAa,OAAO,SAAS;;CAErC,iBAAiB,OAAO;AAC5B,EAAE,CACN;AAKA,MAAa,4BAA4B,EAAE,KACvC,EAAE,OAAO;CACL,SAAS,EAAE,OAAO;CAClB,WAAW;CACX,eAAe,EAAE,OAAO;CACxB,QAAQ,EAAE,OAAO;CACjB,aAAa;CACb,WAAW;CACX,UAAU,EAAE,MAAM,iBAAiB;CACnC,QAAQ,EAAE,MAAM,oBAAoB;AACxC,CAAC,GACD,EAAE,WAAW,WAAW;;CAEpB,SAAS,MAAM;;CAEf,WAAW,MAAM,aAAa;CAC9B,eAAe,MAAM;;CAErB,QAAQ,MAAM;;CAEd,UAAU,aAAa,MAAM,WAAW;;CAExC,QAAQ,aAAa,MAAM,SAAS;;CAEpC,UAAU,MAAM;;CAEhB,QAAQ,MAAM;AAClB,EAAE,CACN;AAKA,MAAa,kCAAkC,EAAE,OAAO;CACpD,aAAa,EAAE,MAAM,oBAAoB;CACzC,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;AAC5C,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CreateDustConversionInput, DustAssetPrice, DustBalance, DustConversion, DustConversionQuote, GetDustConversionInput, ListDustBalancesInput, ListDustBalancesResult, ListDustConversionsInput, ListDustConversionsResult, QuoteDustConversionInput } from "./dust-conversion.schemas.js";
|
|
2
|
+
import { DustAssetEligibility, DustConversionRefusalCode, DustConversionState } from "./dust-conversion.codecs.js";
|
|
3
|
+
export type { CreateDustConversionInput, DustAssetEligibility, DustAssetPrice, DustBalance, DustConversion, DustConversionQuote, DustConversionRefusalCode, DustConversionState, GetDustConversionInput, ListDustBalancesInput, ListDustBalancesResult, ListDustConversionsInput, ListDustConversionsResult, QuoteDustConversionInput };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DustConversionService } from "./dust-conversion.js";
|
|
2
|
+
import { PolyesterCore } from "../../core-client.js";
|
|
3
|
+
//#region src/services/dust-conversion/service.d.ts
|
|
4
|
+
/** Returns the client's DustConversionService, creating it on first use. */
|
|
5
|
+
declare const dustConversionService: (client: PolyesterCore) => DustConversionService;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { dustConversionService };
|
|
8
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","names":[],"sources":["../../../src/services/dust-conversion/service.ts"],"mappings":";;;;cAIa,wBAAqB,QAArB,kBAAqB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { defineService } from "../../core-client.js";
|
|
2
|
+
import { DustConversionService } from "./dust-conversion.js";
|
|
3
|
+
//#region src/services/dust-conversion/service.ts
|
|
4
|
+
/** Returns the client's DustConversionService, creating it on first use. */
|
|
5
|
+
const dustConversionService = defineService((context) => new DustConversionService(context.transports, context.resolver));
|
|
6
|
+
//#endregion
|
|
7
|
+
export { dustConversionService };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","names":[],"sources":["../../../src/services/dust-conversion/service.ts"],"sourcesContent":["import { defineService } from \"../../core-client.js\";\nimport { DustConversionService } from \"./dust-conversion.js\";\n\n/** Returns the client's DustConversionService, creating it on first use. */\nexport const dustConversionService = defineService(\n (context) => new DustConversionService(context.transports, context.resolver),\n);\n"],"mappings":";;;;AAIA,MAAa,wBAAwB,eAChC,YAAY,IAAI,sBAAsB,QAAQ,YAAY,QAAQ,QAAQ,CAC/E"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FeeService } from "../../gen/fees/v1/fees_pb.js";
|
|
2
1
|
import { parse } from "../../shared/validation.js";
|
|
3
2
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
4
3
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
5
4
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
5
|
+
import { FeeService } from "../../gen/fees/v1/fees_pb.js";
|
|
6
6
|
import { GetSpotFeeRatesInputSchema, SpotFeeRatesSchema } from "./fees.schemas.js";
|
|
7
7
|
import { createClient } from "@connectrpc/connect";
|
|
8
8
|
//#region src/services/fees/fees.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GuardSignerService as GuardSignerService$1 } from "../../gen/chain/guard/v1/guard_signer_pb.js";
|
|
2
1
|
import { parse } from "../../shared/validation.js";
|
|
3
2
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
4
3
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
5
4
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
5
|
+
import { GuardSignerService as GuardSignerService$1 } from "../../gen/chain/guard/v1/guard_signer_pb.js";
|
|
6
6
|
import { BatchGuardApprovalsSchema, BatchSignProtectedActionInputSchema, CreateGuardSignerWalletResultSchema, ExportGuardSignerWalletResultSchema, GuardApprovalSchema, GuardSignerScopedInputSchema, GuardSignerStatusSchema, RotateGuardSignerWalletResultSchema, SignProtectedActionInputSchema } from "./guard-signer.schemas.js";
|
|
7
7
|
import { formatConnectError, isResourceNotFoundError } from "../../utils/errors.js";
|
|
8
8
|
import { createClient } from "@connectrpc/connect";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PositiveUint32InputSchema } from "../shared.js";
|
|
2
2
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
3
3
|
import { PROTECTED_ACTION_VALUES, ProtectedActionCodec } from "./guard-signer.codecs.js";
|
|
4
|
-
import * as v from "valibot";
|
|
5
4
|
import { bytesToHex } from "@noble/hashes/utils.js";
|
|
5
|
+
import * as v from "valibot";
|
|
6
6
|
//#region src/services/guard-signer/guard-signer.schemas.ts
|
|
7
7
|
const HexAddressSchema = v.pipe(v.string(), v.trim(), v.regex(/^0x[0-9a-fA-F]{40}$/));
|
|
8
8
|
const WhitelistAddressSchema = v.pipe(v.string(), v.trim(), v.minLength(1));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { HeatmapLiveBucketSchema, HeatmapService as HeatmapService$1, HeatmapTimeRangeSchema } from "../../gen/marketdata/v1/heatmap_pb.js";
|
|
2
1
|
import { parse } from "../../shared/validation.js";
|
|
3
2
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
3
|
import { SymbolIdInputSchema } from "../shared.js";
|
|
5
4
|
import { connectReadyGatedProtoChannel } from "../../realtime/ready-gated-subscription.js";
|
|
5
|
+
import { HeatmapLiveBucketSchema, HeatmapService as HeatmapService$1, HeatmapTimeRangeSchema } from "../../gen/marketdata/v1/heatmap_pb.js";
|
|
6
6
|
import { HEATMAP_INTERVAL_VALUES } from "./heatmap.codecs.js";
|
|
7
7
|
import { GetOrderbookHeatmapInputSchema, createOrderbookHeatmapLiveBucketSchema, createOrderbookHeatmapResponseSchema } from "./heatmap.schemas.js";
|
|
8
|
-
import * as v from "valibot";
|
|
9
8
|
import { create } from "@bufbuild/protobuf";
|
|
10
9
|
import { createClient } from "@connectrpc/connect";
|
|
10
|
+
import * as v from "valibot";
|
|
11
11
|
//#region src/services/heatmap/heatmap.ts
|
|
12
12
|
const SubscribeHeatmapLiveParamsSchema = v.object({
|
|
13
13
|
symbolId: SymbolIdInputSchema,
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
1
2
|
//#region src/services/internal-transfers/internal-transfers.codecs.d.ts
|
|
2
3
|
declare const INTERNAL_TRANSFER_STATUS_VALUES: readonly ["accepted", "rejected", "failed"];
|
|
3
4
|
type InternalTransferStatus = (typeof INTERNAL_TRANSFER_STATUS_VALUES)[number];
|
|
5
|
+
declare const INTERNAL_TRANSFER_BATCH_STATUS_VALUES: readonly ["submitted", "refused"];
|
|
6
|
+
/** `"submitted"`: every leg passed its checks and ran; `"refused"`: no leg ran and nothing moved. */
|
|
7
|
+
type InternalTransferBatchStatus = (typeof INTERNAL_TRANSFER_BATCH_STATUS_VALUES)[number];
|
|
8
|
+
declare const INTERNAL_TRANSFER_BATCH_LEG_STATUS_VALUES: readonly ["accepted", "pending", "refused", "not_submitted"];
|
|
9
|
+
/**
|
|
10
|
+
* `"pending"`: the outcome is not known yet; read it with `internalTransfers.get` by the leg's
|
|
11
|
+
* `requestId`, or retry the batch with the same idempotency key. A retry also runs `"refused"`
|
|
12
|
+
* and `"not_submitted"` legs again.
|
|
13
|
+
*/
|
|
14
|
+
type InternalTransferBatchLegStatus = (typeof INTERNAL_TRANSFER_BATCH_LEG_STATUS_VALUES)[number];
|
|
15
|
+
type InternalTransferErrorCode = keyof typeof ErrorCode;
|
|
4
16
|
//#endregion
|
|
5
|
-
export { INTERNAL_TRANSFER_STATUS_VALUES, InternalTransferStatus };
|
|
17
|
+
export { INTERNAL_TRANSFER_BATCH_LEG_STATUS_VALUES, INTERNAL_TRANSFER_BATCH_STATUS_VALUES, INTERNAL_TRANSFER_STATUS_VALUES, InternalTransferBatchLegStatus, InternalTransferBatchStatus, InternalTransferErrorCode, InternalTransferStatus };
|
|
6
18
|
//# sourceMappingURL=internal-transfers.codecs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-transfers.codecs.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.codecs.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal-transfers.codecs.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.codecs.ts"],"mappings":";;cAuBa;KAED,iCAAiC;cAEhC;;KAGD,sCAAsC;cAUrC;;;;;;KAYD,yCACA;KAYA,yCAAyC"}
|
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
import "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
1
|
+
import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
2
2
|
//#region src/services/internal-transfers/internal-transfers.codecs.ts
|
|
3
3
|
const InternalTransferDestinationCodec = { inputToProtoCase: {
|
|
4
4
|
account: "destinationAccountId",
|
|
5
5
|
subaccount: "destinationSubaccountId",
|
|
6
6
|
smartAccountAddress: "destinationSmartAccountAddress"
|
|
7
7
|
} };
|
|
8
|
+
const InternalTransferBatchStatusCodec = { protoToOutput: {
|
|
9
|
+
[0]: "unspecified",
|
|
10
|
+
[1]: "submitted",
|
|
11
|
+
[2]: "refused"
|
|
12
|
+
} };
|
|
13
|
+
const InternalTransferBatchLegStatusCodec = { protoToOutput: {
|
|
14
|
+
[0]: "unspecified",
|
|
15
|
+
[1]: "accepted",
|
|
16
|
+
[2]: "pending",
|
|
17
|
+
[3]: "refused",
|
|
18
|
+
[4]: "not_submitted"
|
|
19
|
+
} };
|
|
20
|
+
/**
|
|
21
|
+
* Names a transfer error code like the `internal_transfer` error detail does. A code newer
|
|
22
|
+
* than this build reads as `"UNSPECIFIED"` instead of failing the whole response.
|
|
23
|
+
*/
|
|
24
|
+
function internalTransferErrorCodeName(code) {
|
|
25
|
+
const name = ErrorCode[code];
|
|
26
|
+
return typeof name === "string" ? name : "UNSPECIFIED";
|
|
27
|
+
}
|
|
8
28
|
const InternalTransferStatusCodec = { protoToOutput: {
|
|
9
29
|
[0]: "unspecified",
|
|
10
30
|
[1]: "accepted",
|
|
@@ -12,6 +32,6 @@ const InternalTransferStatusCodec = { protoToOutput: {
|
|
|
12
32
|
[3]: "failed"
|
|
13
33
|
} };
|
|
14
34
|
//#endregion
|
|
15
|
-
export { InternalTransferDestinationCodec, InternalTransferStatusCodec };
|
|
35
|
+
export { InternalTransferBatchLegStatusCodec, InternalTransferBatchStatusCodec, InternalTransferDestinationCodec, InternalTransferStatusCodec, internalTransferErrorCodeName };
|
|
16
36
|
|
|
17
37
|
//# sourceMappingURL=internal-transfers.codecs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-transfers.codecs.js","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport type { ProtoToOutput } from \"../../utils/types.js\";\n\nexport const INTERNAL_TRANSFER_DESTINATION_TYPE_VALUES = [\n \"account\",\n \"subaccount\",\n \"smartAccountAddress\",\n] as const;\n\nexport type InternalTransferDestinationType =\n (typeof INTERNAL_TRANSFER_DESTINATION_TYPE_VALUES)[number];\n\nexport const InternalTransferDestinationCodec = {\n inputToProtoCase: {\n account: \"destinationAccountId\",\n subaccount: \"destinationSubaccountId\",\n smartAccountAddress: \"destinationSmartAccountAddress\",\n } satisfies Record<\n InternalTransferDestinationType,\n \"destinationAccountId\" | \"destinationSubaccountId\" | \"destinationSmartAccountAddress\"\n >,\n} as const;\n\nexport const INTERNAL_TRANSFER_STATUS_VALUES = [\"accepted\", \"rejected\", \"failed\"] as const;\n\nexport type InternalTransferStatus = (typeof INTERNAL_TRANSFER_STATUS_VALUES)[number];\n\nexport const InternalTransferStatusCodec = {\n protoToOutput: {\n [Proto.InternalTransferStatus.UNSPECIFIED]: \"unspecified\",\n [Proto.InternalTransferStatus.ACCEPTED]: \"accepted\",\n [Proto.InternalTransferStatus.REJECTED]: \"rejected\",\n [Proto.InternalTransferStatus.FAILED]: \"failed\",\n } satisfies ProtoToOutput<Proto.InternalTransferStatus, InternalTransferStatus>,\n} as const;\n"],"mappings":";;AAYA,MAAa,mCAAmC,EAC5C,kBAAkB;CACd,SAAS;CACT,YAAY;CACZ,qBAAqB;AACzB,EAIJ;
|
|
1
|
+
{"version":3,"file":"internal-transfers.codecs.js","names":["Proto.ErrorCode"],"sources":["../../../src/services/internal-transfers/internal-transfers.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport type { ProtoToOutput } from \"../../utils/types.js\";\n\nexport const INTERNAL_TRANSFER_DESTINATION_TYPE_VALUES = [\n \"account\",\n \"subaccount\",\n \"smartAccountAddress\",\n] as const;\n\nexport type InternalTransferDestinationType =\n (typeof INTERNAL_TRANSFER_DESTINATION_TYPE_VALUES)[number];\n\nexport const InternalTransferDestinationCodec = {\n inputToProtoCase: {\n account: \"destinationAccountId\",\n subaccount: \"destinationSubaccountId\",\n smartAccountAddress: \"destinationSmartAccountAddress\",\n } satisfies Record<\n InternalTransferDestinationType,\n \"destinationAccountId\" | \"destinationSubaccountId\" | \"destinationSmartAccountAddress\"\n >,\n} as const;\n\nexport const INTERNAL_TRANSFER_STATUS_VALUES = [\"accepted\", \"rejected\", \"failed\"] as const;\n\nexport type InternalTransferStatus = (typeof INTERNAL_TRANSFER_STATUS_VALUES)[number];\n\nexport const INTERNAL_TRANSFER_BATCH_STATUS_VALUES = [\"submitted\", \"refused\"] as const;\n\n/** `\"submitted\"`: every leg passed its checks and ran; `\"refused\"`: no leg ran and nothing moved. */\nexport type InternalTransferBatchStatus = (typeof INTERNAL_TRANSFER_BATCH_STATUS_VALUES)[number];\n\nexport const InternalTransferBatchStatusCodec = {\n protoToOutput: {\n [Proto.InternalTransferBatchStatus.BATCH_STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.InternalTransferBatchStatus.BATCH_SUBMITTED]: \"submitted\",\n [Proto.InternalTransferBatchStatus.BATCH_REFUSED]: \"refused\",\n } satisfies ProtoToOutput<Proto.InternalTransferBatchStatus, InternalTransferBatchStatus>,\n} as const;\n\nexport const INTERNAL_TRANSFER_BATCH_LEG_STATUS_VALUES = [\n \"accepted\",\n \"pending\",\n \"refused\",\n \"not_submitted\",\n] as const;\n\n/**\n * `\"pending\"`: the outcome is not known yet; read it with `internalTransfers.get` by the leg's\n * `requestId`, or retry the batch with the same idempotency key. A retry also runs `\"refused\"`\n * and `\"not_submitted\"` legs again.\n */\nexport type InternalTransferBatchLegStatus =\n (typeof INTERNAL_TRANSFER_BATCH_LEG_STATUS_VALUES)[number];\n\nexport const InternalTransferBatchLegStatusCodec = {\n protoToOutput: {\n [Proto.InternalTransferBatchLegStatus.LEG_STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.InternalTransferBatchLegStatus.LEG_ACCEPTED]: \"accepted\",\n [Proto.InternalTransferBatchLegStatus.LEG_PENDING]: \"pending\",\n [Proto.InternalTransferBatchLegStatus.LEG_REFUSED]: \"refused\",\n [Proto.InternalTransferBatchLegStatus.LEG_NOT_SUBMITTED]: \"not_submitted\",\n } satisfies ProtoToOutput<Proto.InternalTransferBatchLegStatus, InternalTransferBatchLegStatus>,\n} as const;\n\nexport type InternalTransferErrorCode = keyof typeof Proto.ErrorCode;\n\n/**\n * Names a transfer error code like the `internal_transfer` error detail does. A code newer\n * than this build reads as `\"UNSPECIFIED\"` instead of failing the whole response.\n */\nexport function internalTransferErrorCodeName(code: number): InternalTransferErrorCode {\n const name: unknown = Proto.ErrorCode[code];\n return typeof name === \"string\" ? (name as InternalTransferErrorCode) : \"UNSPECIFIED\";\n}\n\nexport const InternalTransferStatusCodec = {\n protoToOutput: {\n [Proto.InternalTransferStatus.UNSPECIFIED]: \"unspecified\",\n [Proto.InternalTransferStatus.ACCEPTED]: \"accepted\",\n [Proto.InternalTransferStatus.REJECTED]: \"rejected\",\n [Proto.InternalTransferStatus.FAILED]: \"failed\",\n } satisfies ProtoToOutput<Proto.InternalTransferStatus, InternalTransferStatus>,\n} as const;\n"],"mappings":";;AAYA,MAAa,mCAAmC,EAC5C,kBAAkB;CACd,SAAS;CACT,YAAY;CACZ,qBAAqB;AACzB,EAIJ;AAWA,MAAa,mCAAmC,EAC5C,eAAe;EACmD,IAAA;EACT,IAAA;EACF,IAAA;AACvD,EACJ;AAiBA,MAAa,sCAAsC,EAC/C,eAAe;EACoD,IAAA;EACV,IAAA;EACD,IAAA;EACA,IAAA;EACM,IAAA;AAC9D,EACJ;;;;;AAQA,SAAgB,8BAA8B,MAAyC;CACnF,MAAM,OAAgBA,UAAgB;CACtC,OAAO,OAAO,SAAS,WAAY,OAAqC;AAC5E;AAEA,MAAa,8BAA8B,EACvC,eAAe;EACiC,IAAA;EACH,IAAA;EACA,IAAA;EACF,IAAA;AAC3C,EACJ"}
|
|
@@ -2,7 +2,7 @@ import { AuthApiTransports } from "../../shared/transports.js";
|
|
|
2
2
|
import { PolyesterMutationOptions, PolyesterRequestOptions } from "../../shared/request-options.js";
|
|
3
3
|
import { SubaccountResolver } from "../subaccount-resolver.js";
|
|
4
4
|
import { SdkScales } from "../../shared/decimal-surface.js";
|
|
5
|
-
import { CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferResult } from "./internal-transfers.schemas.js";
|
|
5
|
+
import { BatchCreateInternalTransfersInput, BatchCreateInternalTransfersResult, CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferResult } from "./internal-transfers.schemas.js";
|
|
6
6
|
//#region src/services/internal-transfers/internal-transfers.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Creates and reads authenticated Trading-to-Trading internal transfer requests.
|
|
@@ -14,10 +14,22 @@ declare class InternalTransfersService {
|
|
|
14
14
|
* Creates or returns an idempotent internal transfer from the resolved source account to a destination root account, subaccount, or smart-account address. The request carries asset id, a decimal quantity, and a stable idempotency key; the response includes request/transfer ids, the lifecycle `flowId`, resolved destination, and status. Rejections and failures, such as insufficient funds or a missing step-up, raise errors instead of returning a result.
|
|
15
15
|
*/
|
|
16
16
|
create(input: CreateInternalTransferInput, options?: PolyesterMutationOptions): Promise<CreateInternalTransferResult>;
|
|
17
|
+
/**
|
|
18
|
+
* Submits up to 10 transfers under one idempotency key and one MFA check. Every leg passes
|
|
19
|
+
* the same checks as `create` first; if one fails, the batch is `"refused"`: nothing moves,
|
|
20
|
+
* no step-up is used, the failing legs carry their `errorCode` and the rest are
|
|
21
|
+
* `"not_submitted"`. Otherwise the legs run in order and are not atomic: a leg can be
|
|
22
|
+
* `"refused"`, for example for insufficient balance, after earlier legs were accepted. Read
|
|
23
|
+
* each leg's `status`; a `"pending"` leg is like a timed-out `create`: read it with `get` by
|
|
24
|
+
* its `requestId`, or retry the batch with the same key and legs. Recent MFA covers the root
|
|
25
|
+
* owner moving funds between its own accounts or to allowlisted destinations; any other leg
|
|
26
|
+
* needs one fresh step-up for the whole batch.
|
|
27
|
+
*/
|
|
28
|
+
batchCreate(input: BatchCreateInternalTransfersInput, options?: PolyesterMutationOptions): Promise<BatchCreateInternalTransfersResult>;
|
|
17
29
|
/**
|
|
18
30
|
* Reads an accepted transfer of the resolved source account by exactly one of `requestId` or
|
|
19
31
|
* `transferId`, and returns both IDs, the lifecycle `flowId` and the acceptance time. Use it
|
|
20
|
-
* to reconcile a transfer without resubmitting it; pass `flowId` to `lifecycle.
|
|
32
|
+
* to reconcile a transfer without resubmitting it; pass `flowId` to `lifecycle.getAccountFlow`,
|
|
21
33
|
* whose ledger settlement step carries the transfer ID. An unknown, pending or inaccessible
|
|
22
34
|
* transfer is a `ResourceNotFoundError`, including briefly after a delegate is granted access.
|
|
23
35
|
* Session JWT only; API keys are refused. Moves no money and needs no step-up.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-transfers.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"internal-transfers.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"mappings":";;;;;;;;;cAkCa;;EASL,YAAA,YAAY,mBACZ,UAAU,gCACV,QAAQ;;;;EAaN,OACF,OAAO,6BACP,UAAU,2BACX,QAAQ;;;;;;;;;;;;EAsBL,YACF,OAAO,mCACP,UAAU,2BACX,QAAQ;;;;;;;;;EAwBL,IACF,OAAO,0BACP,UAAU,0BACX,QAAQ"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { InternalTransferService } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
2
1
|
import { parse } from "../../shared/validation.js";
|
|
3
2
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
4
3
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
5
|
-
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
6
|
-
import {
|
|
4
|
+
import { resolveAccountScope, resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
5
|
+
import { InternalTransferService } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
6
|
+
import { BatchCreateInternalTransfersResultSchema, GetInternalTransferInputSchema, GetInternalTransferResultSchema, createBatchCreateInternalTransfersInputSchema, createCreateInternalTransferInputSchema, createCreateInternalTransferResultSchema } from "./internal-transfers.schemas.js";
|
|
7
7
|
import { createClient } from "@connectrpc/connect";
|
|
8
8
|
//#region src/services/internal-transfers/internal-transfers.ts
|
|
9
9
|
/**
|
|
@@ -15,12 +15,14 @@ var InternalTransfersService = class {
|
|
|
15
15
|
#scales;
|
|
16
16
|
#inputSchema;
|
|
17
17
|
#resultSchema;
|
|
18
|
+
#batchInputSchema;
|
|
18
19
|
constructor(transports, resolver, scales) {
|
|
19
20
|
this.#client = createClient(InternalTransferService, transports.authApi);
|
|
20
21
|
this.#resolver = resolver;
|
|
21
22
|
this.#scales = scales;
|
|
22
23
|
this.#inputSchema = createCreateInternalTransferInputSchema(scales);
|
|
23
24
|
this.#resultSchema = createCreateInternalTransferResultSchema();
|
|
25
|
+
this.#batchInputSchema = createBatchCreateInternalTransfersInputSchema(scales);
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* Creates or returns an idempotent internal transfer from the resolved source account to a destination root account, subaccount, or smart-account address. The request carries asset id, a decimal quantity, and a stable idempotency key; the response includes request/transfer ids, the lifecycle `flowId`, resolved destination, and status. Rejections and failures, such as insufficient funds or a missing step-up, raise errors instead of returning a result.
|
|
@@ -33,9 +35,33 @@ var InternalTransfersService = class {
|
|
|
33
35
|
return parse(this.#resultSchema, res);
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
38
|
+
* Submits up to 10 transfers under one idempotency key and one MFA check. Every leg passes
|
|
39
|
+
* the same checks as `create` first; if one fails, the batch is `"refused"`: nothing moves,
|
|
40
|
+
* no step-up is used, the failing legs carry their `errorCode` and the rest are
|
|
41
|
+
* `"not_submitted"`. Otherwise the legs run in order and are not atomic: a leg can be
|
|
42
|
+
* `"refused"`, for example for insufficient balance, after earlier legs were accepted. Read
|
|
43
|
+
* each leg's `status`; a `"pending"` leg is like a timed-out `create`: read it with `get` by
|
|
44
|
+
* its `requestId`, or retry the batch with the same key and legs. Recent MFA covers the root
|
|
45
|
+
* owner moving funds between its own accounts or to allowlisted destinations; any other leg
|
|
46
|
+
* needs one fresh step-up for the whole batch.
|
|
47
|
+
*/
|
|
48
|
+
async batchCreate(input, options) {
|
|
49
|
+
await this.#scales.ready();
|
|
50
|
+
const legs = Array.isArray(input?.legs) ? input.legs.map((leg) => ({
|
|
51
|
+
...leg,
|
|
52
|
+
account: resolveAccountScope(leg?.account, this.#resolver)
|
|
53
|
+
})) : input?.legs;
|
|
54
|
+
const request = parse(this.#batchInputSchema, {
|
|
55
|
+
...input,
|
|
56
|
+
legs
|
|
57
|
+
});
|
|
58
|
+
const res = await this.#client.batchCreateInternalTransfers(request, toConnectCallOptions(options));
|
|
59
|
+
return parse(BatchCreateInternalTransfersResultSchema, res);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
36
62
|
* Reads an accepted transfer of the resolved source account by exactly one of `requestId` or
|
|
37
63
|
* `transferId`, and returns both IDs, the lifecycle `flowId` and the acceptance time. Use it
|
|
38
|
-
* to reconcile a transfer without resubmitting it; pass `flowId` to `lifecycle.
|
|
64
|
+
* to reconcile a transfer without resubmitting it; pass `flowId` to `lifecycle.getAccountFlow`,
|
|
39
65
|
* whose ledger settlement step carries the transfer ID. An unknown, pending or inaccessible
|
|
40
66
|
* transfer is a `ResourceNotFoundError`, including briefly after a delegate is granted access.
|
|
41
67
|
* Session JWT only; API keys are refused. Moves no money and needs no step-up.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-transfers.js","names":["#client","Proto.InternalTransferService","#resolver","#scales","#inputSchema","#resultSchema"],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport {
|
|
1
|
+
{"version":3,"file":"internal-transfers.js","names":["#client","Proto.InternalTransferService","#resolver","#scales","#inputSchema","#resultSchema","#batchInputSchema"],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport {\n type SubaccountResolver,\n resolveAccountScope,\n resolveAccountScopedInput,\n} from \"../subaccount-resolver.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n BatchCreateInternalTransfersResultSchema,\n createBatchCreateInternalTransfersInputSchema,\n type BatchCreateInternalTransfersInput,\n type BatchCreateInternalTransfersResult,\n createCreateInternalTransferInputSchema,\n createCreateInternalTransferResultSchema,\n type CreateInternalTransferInput,\n type CreateInternalTransferResult,\n GetInternalTransferInputSchema,\n GetInternalTransferResultSchema,\n type GetInternalTransferInput,\n type GetInternalTransferResult,\n} from \"./internal-transfers.schemas.js\";\n\n/**\n * Creates and reads authenticated Trading-to-Trading internal transfer requests.\n */\nexport class InternalTransfersService {\n #client: Client<typeof Proto.InternalTransferService>;\n #resolver?: SubaccountResolver;\n #scales: SdkScales;\n #inputSchema: ReturnType<typeof createCreateInternalTransferInputSchema>;\n #resultSchema: ReturnType<typeof createCreateInternalTransferResultSchema>;\n #batchInputSchema: ReturnType<typeof createBatchCreateInternalTransfersInputSchema>;\n\n constructor(\n transports: AuthApiTransports,\n resolver: SubaccountResolver | undefined,\n scales: SdkScales,\n ) {\n this.#client = createClient(Proto.InternalTransferService, transports.authApi);\n this.#resolver = resolver;\n this.#scales = scales;\n this.#inputSchema = createCreateInternalTransferInputSchema(scales);\n this.#resultSchema = createCreateInternalTransferResultSchema();\n this.#batchInputSchema = createBatchCreateInternalTransfersInputSchema(scales);\n }\n\n /**\n * Creates or returns an idempotent internal transfer from the resolved source account to a destination root account, subaccount, or smart-account address. The request carries asset id, a decimal quantity, and a stable idempotency key; the response includes request/transfer ids, the lifecycle `flowId`, resolved destination, and status. Rejections and failures, such as insufficient funds or a missing step-up, raise errors instead of returning a result.\n */\n async create(\n input: CreateInternalTransferInput,\n options?: PolyesterMutationOptions,\n ): Promise<CreateInternalTransferResult> {\n await this.#scales.ready();\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const validatedInput = parse(this.#inputSchema, resolvedInput);\n const res = await this.#client.createInternalTransfer(\n removeUndefined(validatedInput),\n toConnectCallOptions(options),\n );\n return parse(this.#resultSchema, res);\n }\n\n /**\n * Submits up to 10 transfers under one idempotency key and one MFA check. Every leg passes\n * the same checks as `create` first; if one fails, the batch is `\"refused\"`: nothing moves,\n * no step-up is used, the failing legs carry their `errorCode` and the rest are\n * `\"not_submitted\"`. Otherwise the legs run in order and are not atomic: a leg can be\n * `\"refused\"`, for example for insufficient balance, after earlier legs were accepted. Read\n * each leg's `status`; a `\"pending\"` leg is like a timed-out `create`: read it with `get` by\n * its `requestId`, or retry the batch with the same key and legs. Recent MFA covers the root\n * owner moving funds between its own accounts or to allowlisted destinations; any other leg\n * needs one fresh step-up for the whole batch.\n */\n async batchCreate(\n input: BatchCreateInternalTransfersInput,\n options?: PolyesterMutationOptions,\n ): Promise<BatchCreateInternalTransfersResult> {\n await this.#scales.ready();\n const legs = Array.isArray(input?.legs)\n ? input.legs.map((leg) => ({\n ...leg,\n account: resolveAccountScope(leg?.account, this.#resolver),\n }))\n : input?.legs;\n const request = parse(this.#batchInputSchema, { ...input, legs });\n const res = await this.#client.batchCreateInternalTransfers(\n request,\n toConnectCallOptions(options),\n );\n return parse(BatchCreateInternalTransfersResultSchema, res);\n }\n\n /**\n * Reads an accepted transfer of the resolved source account by exactly one of `requestId` or\n * `transferId`, and returns both IDs, the lifecycle `flowId` and the acceptance time. Use it\n * to reconcile a transfer without resubmitting it; pass `flowId` to `lifecycle.getAccountFlow`,\n * whose ledger settlement step carries the transfer ID. An unknown, pending or inaccessible\n * transfer is a `ResourceNotFoundError`, including briefly after a delegate is granted access.\n * Session JWT only; API keys are refused. Moves no money and needs no step-up.\n */\n async get(\n input: GetInternalTransferInput,\n options?: PolyesterRequestOptions,\n ): Promise<GetInternalTransferResult> {\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const request = parse(GetInternalTransferInputSchema, resolvedInput);\n const res = await this.#client.getInternalTransfer(\n removeUndefined(request),\n toConnectCallOptions(options),\n );\n return parse(GetInternalTransferResultSchema, res);\n }\n}\n"],"mappings":";;;;;;;;;;;AAkCA,IAAa,2BAAb,MAAsC;CAClC;CACA;CACA;CACA;CACA;CACA;CAEA,YACI,YACA,UACA,QACF;EACE,KAAKA,UAAU,aAAaC,yBAA+B,WAAW,OAAO;EAC7E,KAAKC,YAAY;EACjB,KAAKC,UAAU;EACf,KAAKC,eAAe,wCAAwC,MAAM;EAClE,KAAKC,gBAAgB,yCAAyC;EAC9D,KAAKC,oBAAoB,8CAA8C,MAAM;CACjF;;;;CAKA,MAAM,OACF,OACA,SACqC;EACrC,MAAM,KAAKH,QAAQ,MAAM;EACzB,MAAM,gBAAgB,0BAA0B,OAAO,KAAKD,SAAS;EACrE,MAAM,iBAAiB,MAAM,KAAKE,cAAc,aAAa;EAC7D,MAAM,MAAM,MAAM,KAAKJ,QAAQ,uBAC3B,gBAAgB,cAAc,GAC9B,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,KAAKK,eAAe,GAAG;CACxC;;;;;;;;;;;;CAaA,MAAM,YACF,OACA,SAC2C;EAC3C,MAAM,KAAKF,QAAQ,MAAM;EACzB,MAAM,OAAO,MAAM,QAAQ,OAAO,IAAI,IAChC,MAAM,KAAK,KAAK,SAAS;GACrB,GAAG;GACH,SAAS,oBAAoB,KAAK,SAAS,KAAKD,SAAS;EAC7D,EAAE,IACF,OAAO;EACb,MAAM,UAAU,MAAM,KAAKI,mBAAmB;GAAE,GAAG;GAAO;EAAK,CAAC;EAChE,MAAM,MAAM,MAAM,KAAKN,QAAQ,6BAC3B,SACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,0CAA0C,GAAG;CAC9D;;;;;;;;;CAUA,MAAM,IACF,OACA,SACkC;EAClC,MAAM,gBAAgB,0BAA0B,OAAO,KAAKE,SAAS;EACrE,MAAM,UAAU,MAAM,gCAAgC,aAAa;EACnE,MAAM,MAAM,MAAM,KAAKF,QAAQ,oBAC3B,gBAAgB,OAAO,GACvB,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,iCAAiC,GAAG;CACrD;AACJ"}
|