@polyester/sdk 0.36.0-devnet-20261115165158 → 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 +38 -4
- package/dist/browser-core.js +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/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/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/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 +29 -29
- 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 +22 -22
- 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 +30 -5
- package/dist/services/balances/balances.schemas.d.ts.map +1 -1
- package/dist/services/balances/balances.schemas.js +5 -9
- 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 +22 -22
- package/dist/services/checkpoints/checkpoints.js +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 +265 -5
- 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 +108 -84
- 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 +12 -2
- package/dist/services/orders/order-errors.schemas.js.map +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +67 -27
- package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-batch.schemas.js +2 -2
- 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 +3 -2
- package/dist/services/orders/orders-input.schemas.js.map +1 -1
- package/dist/services/orders/orders-modify.schemas.js +2 -2
- package/dist/services/orders/orders-output.schemas.d.ts +14 -14
- package/dist/services/orders/orders-risk.schemas.js +3 -3
- package/dist/services/orders/orders.js +2 -2
- 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/price-alerts/price-alerts.schemas.d.ts +10 -10
- 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/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 +13 -13
- package/dist/services/system/system.js +1 -1
- package/dist/services/system/system.schemas.d.ts +7 -7
- package/dist/services/trades/trades.js +2 -2
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js +1 -1
- package/dist/services/trading-withdraws/wallet-message.js +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 +4 -4
- package/dist/services/triggers/trigger-input.schemas.js.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +33 -23
- package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
- package/dist/services/triggers/triggers.js +2 -2
- package/dist/services/vip/vip.js +1 -1
- 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/utils/cookies.js +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
|
@@ -138,8 +138,8 @@ declare function createCreateInternalTransferResultSchema(): v.SchemaWithPipe<re
|
|
|
138
138
|
subaccountId: string | undefined;
|
|
139
139
|
smartAccountAddress: string | undefined;
|
|
140
140
|
}>]>, undefined>;
|
|
141
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
142
|
-
/** Lifecycle flow ID for `lifecycle.
|
|
141
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "accepted" | "rejected">]>;
|
|
142
|
+
/** Lifecycle flow ID for `lifecycle.getAccountFlow`; empty when the server did not return one. */
|
|
143
143
|
readonly flowId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
|
|
144
144
|
}, undefined>, v.TransformAction<{
|
|
145
145
|
requestId: string;
|
|
@@ -157,10 +157,12 @@ declare function createCreateInternalTransferResultSchema(): v.SchemaWithPipe<re
|
|
|
157
157
|
subaccountId: string | undefined;
|
|
158
158
|
smartAccountAddress: string | undefined;
|
|
159
159
|
} | undefined;
|
|
160
|
-
status: "unspecified" | "
|
|
160
|
+
status: "unspecified" | "failed" | "accepted" | "rejected";
|
|
161
161
|
flowId: string;
|
|
162
162
|
}, {
|
|
163
163
|
acceptedAtUnixMs: number;
|
|
164
|
+
/** Exact acceptance time in nanoseconds since epoch, as a decimal string. */
|
|
165
|
+
acceptedAtNs: string;
|
|
164
166
|
quantity: string;
|
|
165
167
|
requestId: string;
|
|
166
168
|
transferId: string;
|
|
@@ -172,10 +174,268 @@ declare function createCreateInternalTransferResultSchema(): v.SchemaWithPipe<re
|
|
|
172
174
|
subaccountId: string | undefined;
|
|
173
175
|
smartAccountAddress: string | undefined;
|
|
174
176
|
} | undefined;
|
|
175
|
-
status: "unspecified" | "
|
|
177
|
+
status: "unspecified" | "failed" | "accepted" | "rejected";
|
|
176
178
|
flowId: string;
|
|
177
179
|
}>]>;
|
|
178
180
|
type CreateInternalTransferResult = v.InferOutput<ReturnType<typeof createCreateInternalTransferResultSchema>>;
|
|
181
|
+
declare function createBatchCreateInternalTransfersInputSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
182
|
+
/**
|
|
183
|
+
* Up to 10 transfers, run in order. Each leg debits its own `account` (the
|
|
184
|
+
* resolved active account when omitted), and legs may repeat an asset, a source or a
|
|
185
|
+
* destination. Each leg counts as one internal transfer against the rate limit.
|
|
186
|
+
*/
|
|
187
|
+
readonly legs: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
188
|
+
readonly destination: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
189
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
190
|
+
readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>;
|
|
191
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
192
|
+
readonly type: v.LiteralSchema<"subaccount", undefined>;
|
|
193
|
+
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>;
|
|
194
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
195
|
+
readonly type: v.LiteralSchema<"smartAccountAddress", undefined>;
|
|
196
|
+
readonly address: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
197
|
+
}, undefined>], undefined>, v.TransformAction<{
|
|
198
|
+
type: "account";
|
|
199
|
+
accountId: bigint;
|
|
200
|
+
} | {
|
|
201
|
+
type: "subaccount";
|
|
202
|
+
subaccountId: bigint;
|
|
203
|
+
} | {
|
|
204
|
+
type: "smartAccountAddress";
|
|
205
|
+
address: string;
|
|
206
|
+
}, {
|
|
207
|
+
readonly case: "destinationAccountId";
|
|
208
|
+
readonly value: bigint;
|
|
209
|
+
} | {
|
|
210
|
+
readonly case: "destinationSubaccountId";
|
|
211
|
+
readonly value: bigint;
|
|
212
|
+
} | {
|
|
213
|
+
readonly case: "destinationSmartAccountAddress";
|
|
214
|
+
readonly value: string;
|
|
215
|
+
}>]>;
|
|
216
|
+
readonly assetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
217
|
+
readonly quantity: v.StringSchema<undefined>;
|
|
218
|
+
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
219
|
+
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
220
|
+
}, undefined>], undefined>, undefined>;
|
|
221
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
222
|
+
destination: {
|
|
223
|
+
readonly case: "destinationAccountId";
|
|
224
|
+
readonly value: bigint;
|
|
225
|
+
} | {
|
|
226
|
+
readonly case: "destinationSubaccountId";
|
|
227
|
+
readonly value: bigint;
|
|
228
|
+
} | {
|
|
229
|
+
readonly case: "destinationSmartAccountAddress";
|
|
230
|
+
readonly value: string;
|
|
231
|
+
};
|
|
232
|
+
assetId: number;
|
|
233
|
+
quantity: string;
|
|
234
|
+
account?: "active" | "main" | {
|
|
235
|
+
subaccountId: string;
|
|
236
|
+
} | undefined;
|
|
237
|
+
}[], 1, "A batch needs at least one leg.">, v.MaxLengthAction<{
|
|
238
|
+
destination: {
|
|
239
|
+
readonly case: "destinationAccountId";
|
|
240
|
+
readonly value: bigint;
|
|
241
|
+
} | {
|
|
242
|
+
readonly case: "destinationSubaccountId";
|
|
243
|
+
readonly value: bigint;
|
|
244
|
+
} | {
|
|
245
|
+
readonly case: "destinationSmartAccountAddress";
|
|
246
|
+
readonly value: string;
|
|
247
|
+
};
|
|
248
|
+
assetId: number;
|
|
249
|
+
quantity: string;
|
|
250
|
+
account?: "active" | "main" | {
|
|
251
|
+
subaccountId: string;
|
|
252
|
+
} | undefined;
|
|
253
|
+
}[], 10, "A batch holds at most 10 legs.">]>;
|
|
254
|
+
/** Covers the whole batch; a retry must send the same legs in the same order. */
|
|
255
|
+
readonly idempotencyKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
256
|
+
}, undefined>, v.TransformAction<{
|
|
257
|
+
legs: {
|
|
258
|
+
destination: {
|
|
259
|
+
readonly case: "destinationAccountId";
|
|
260
|
+
readonly value: bigint;
|
|
261
|
+
} | {
|
|
262
|
+
readonly case: "destinationSubaccountId";
|
|
263
|
+
readonly value: bigint;
|
|
264
|
+
} | {
|
|
265
|
+
readonly case: "destinationSmartAccountAddress";
|
|
266
|
+
readonly value: string;
|
|
267
|
+
};
|
|
268
|
+
assetId: number;
|
|
269
|
+
quantity: string;
|
|
270
|
+
account?: "active" | "main" | {
|
|
271
|
+
subaccountId: string;
|
|
272
|
+
} | undefined;
|
|
273
|
+
}[];
|
|
274
|
+
idempotencyKey: string;
|
|
275
|
+
}, {
|
|
276
|
+
idempotencyKey: string;
|
|
277
|
+
legs: {
|
|
278
|
+
subaccountId: bigint;
|
|
279
|
+
amountE18: U128Value;
|
|
280
|
+
destination: {
|
|
281
|
+
readonly case: "destinationAccountId";
|
|
282
|
+
readonly value: bigint;
|
|
283
|
+
} | {
|
|
284
|
+
readonly case: "destinationSubaccountId";
|
|
285
|
+
readonly value: bigint;
|
|
286
|
+
} | {
|
|
287
|
+
readonly case: "destinationSmartAccountAddress";
|
|
288
|
+
readonly value: string;
|
|
289
|
+
};
|
|
290
|
+
assetId: number;
|
|
291
|
+
}[];
|
|
292
|
+
}>]>;
|
|
293
|
+
type BatchCreateInternalTransfersInput = v.InferInput<ReturnType<typeof createBatchCreateInternalTransfersInputSchema>>;
|
|
294
|
+
type InternalTransferBatchLegInput = BatchCreateInternalTransfersInput["legs"][number];
|
|
295
|
+
declare const InternalTransferBatchLegResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
296
|
+
readonly legIndex: v.NumberSchema<undefined>;
|
|
297
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "accepted" | "refused" | "pending" | "not_submitted">]>;
|
|
298
|
+
readonly requestId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
299
|
+
readonly transferId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
300
|
+
readonly flowId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
301
|
+
readonly acceptedAtTsNs: v.OptionalSchema<v.BigintSchema<undefined>, 0n>;
|
|
302
|
+
readonly assetId: v.NumberSchema<undefined>;
|
|
303
|
+
readonly assetCode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
304
|
+
readonly amountE18: v.OptionalSchema<v.ObjectSchema<{
|
|
305
|
+
readonly hi: v.BigintSchema<undefined>;
|
|
306
|
+
readonly lo: v.BigintSchema<undefined>;
|
|
307
|
+
}, undefined>, undefined>;
|
|
308
|
+
readonly destination: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
309
|
+
readonly rootAccountPublicId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
310
|
+
readonly subaccountPublicId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
311
|
+
readonly smartAccountAddress: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
312
|
+
}, undefined>, v.TransformAction<{
|
|
313
|
+
rootAccountPublicId?: string | undefined;
|
|
314
|
+
subaccountPublicId?: string | undefined;
|
|
315
|
+
smartAccountAddress?: string | undefined;
|
|
316
|
+
}, {
|
|
317
|
+
rootAccountId: string | undefined;
|
|
318
|
+
subaccountId: string | undefined;
|
|
319
|
+
smartAccountAddress: string | undefined;
|
|
320
|
+
}>]>, undefined>;
|
|
321
|
+
readonly errorCode: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
322
|
+
readonly errorMessage: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
323
|
+
}, undefined>, v.TransformAction<{
|
|
324
|
+
legIndex: number;
|
|
325
|
+
status: "unspecified" | "accepted" | "refused" | "pending" | "not_submitted";
|
|
326
|
+
requestId?: string | undefined;
|
|
327
|
+
transferId?: string | undefined;
|
|
328
|
+
flowId?: string | undefined;
|
|
329
|
+
acceptedAtTsNs: bigint;
|
|
330
|
+
assetId: number;
|
|
331
|
+
assetCode?: string | undefined;
|
|
332
|
+
amountE18?: {
|
|
333
|
+
hi: bigint;
|
|
334
|
+
lo: bigint;
|
|
335
|
+
} | undefined;
|
|
336
|
+
destination?: {
|
|
337
|
+
rootAccountId: string | undefined;
|
|
338
|
+
subaccountId: string | undefined;
|
|
339
|
+
smartAccountAddress: string | undefined;
|
|
340
|
+
} | undefined;
|
|
341
|
+
errorCode: number;
|
|
342
|
+
errorMessage?: string | undefined;
|
|
343
|
+
}, {
|
|
344
|
+
acceptedAtUnixMs: number | undefined;
|
|
345
|
+
acceptedAtNs: string | undefined;
|
|
346
|
+
quantity: string | undefined;
|
|
347
|
+
/** Why the leg was refused, or why its outcome is not known yet; unset otherwise. */
|
|
348
|
+
errorCode: "UNSPECIFIED" | "INSUFFICIENT_FUNDS" | "INVALID_REQUEST" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "RATE_LIMIT_EXCEEDED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "INVALID_SUBACCOUNT_ID" | "SUBACCOUNT_NOT_FOUND" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "FAILED_PRECONDITION" | "NOT_FOUND" | "CONFLICT" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | undefined;
|
|
349
|
+
legIndex: number;
|
|
350
|
+
status: "unspecified" | "accepted" | "refused" | "pending" | "not_submitted";
|
|
351
|
+
requestId?: string | undefined;
|
|
352
|
+
transferId?: string | undefined;
|
|
353
|
+
flowId?: string | undefined;
|
|
354
|
+
assetId: number;
|
|
355
|
+
assetCode?: string | undefined;
|
|
356
|
+
destination?: {
|
|
357
|
+
rootAccountId: string | undefined;
|
|
358
|
+
subaccountId: string | undefined;
|
|
359
|
+
smartAccountAddress: string | undefined;
|
|
360
|
+
} | undefined;
|
|
361
|
+
errorMessage?: string | undefined;
|
|
362
|
+
}>]>;
|
|
363
|
+
type InternalTransferBatchLegResult = v.InferOutput<typeof InternalTransferBatchLegResultSchema>;
|
|
364
|
+
declare const BatchCreateInternalTransfersResultSchema: v.ObjectSchema<{
|
|
365
|
+
/** Batch request ID; unset when the batch was refused. */
|
|
366
|
+
readonly requestId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
367
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "submitted" | "refused">]>;
|
|
368
|
+
/** One result per leg, in request order. */
|
|
369
|
+
readonly legs: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
370
|
+
readonly legIndex: v.NumberSchema<undefined>;
|
|
371
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "accepted" | "refused" | "pending" | "not_submitted">]>;
|
|
372
|
+
readonly requestId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
373
|
+
readonly transferId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
374
|
+
readonly flowId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
375
|
+
readonly acceptedAtTsNs: v.OptionalSchema<v.BigintSchema<undefined>, 0n>;
|
|
376
|
+
readonly assetId: v.NumberSchema<undefined>;
|
|
377
|
+
readonly assetCode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
378
|
+
readonly amountE18: v.OptionalSchema<v.ObjectSchema<{
|
|
379
|
+
readonly hi: v.BigintSchema<undefined>;
|
|
380
|
+
readonly lo: v.BigintSchema<undefined>;
|
|
381
|
+
}, undefined>, undefined>;
|
|
382
|
+
readonly destination: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
383
|
+
readonly rootAccountPublicId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
384
|
+
readonly subaccountPublicId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
385
|
+
readonly smartAccountAddress: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
386
|
+
}, undefined>, v.TransformAction<{
|
|
387
|
+
rootAccountPublicId?: string | undefined;
|
|
388
|
+
subaccountPublicId?: string | undefined;
|
|
389
|
+
smartAccountAddress?: string | undefined;
|
|
390
|
+
}, {
|
|
391
|
+
rootAccountId: string | undefined;
|
|
392
|
+
subaccountId: string | undefined;
|
|
393
|
+
smartAccountAddress: string | undefined;
|
|
394
|
+
}>]>, undefined>;
|
|
395
|
+
readonly errorCode: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
396
|
+
readonly errorMessage: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
|
|
397
|
+
}, undefined>, v.TransformAction<{
|
|
398
|
+
legIndex: number;
|
|
399
|
+
status: "unspecified" | "accepted" | "refused" | "pending" | "not_submitted";
|
|
400
|
+
requestId?: string | undefined;
|
|
401
|
+
transferId?: string | undefined;
|
|
402
|
+
flowId?: string | undefined;
|
|
403
|
+
acceptedAtTsNs: bigint;
|
|
404
|
+
assetId: number;
|
|
405
|
+
assetCode?: string | undefined;
|
|
406
|
+
amountE18?: {
|
|
407
|
+
hi: bigint;
|
|
408
|
+
lo: bigint;
|
|
409
|
+
} | undefined;
|
|
410
|
+
destination?: {
|
|
411
|
+
rootAccountId: string | undefined;
|
|
412
|
+
subaccountId: string | undefined;
|
|
413
|
+
smartAccountAddress: string | undefined;
|
|
414
|
+
} | undefined;
|
|
415
|
+
errorCode: number;
|
|
416
|
+
errorMessage?: string | undefined;
|
|
417
|
+
}, {
|
|
418
|
+
acceptedAtUnixMs: number | undefined;
|
|
419
|
+
acceptedAtNs: string | undefined;
|
|
420
|
+
quantity: string | undefined;
|
|
421
|
+
/** Why the leg was refused, or why its outcome is not known yet; unset otherwise. */
|
|
422
|
+
errorCode: "UNSPECIFIED" | "INSUFFICIENT_FUNDS" | "INVALID_REQUEST" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "RATE_LIMIT_EXCEEDED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "INVALID_SUBACCOUNT_ID" | "SUBACCOUNT_NOT_FOUND" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "FAILED_PRECONDITION" | "NOT_FOUND" | "CONFLICT" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | undefined;
|
|
423
|
+
legIndex: number;
|
|
424
|
+
status: "unspecified" | "accepted" | "refused" | "pending" | "not_submitted";
|
|
425
|
+
requestId?: string | undefined;
|
|
426
|
+
transferId?: string | undefined;
|
|
427
|
+
flowId?: string | undefined;
|
|
428
|
+
assetId: number;
|
|
429
|
+
assetCode?: string | undefined;
|
|
430
|
+
destination?: {
|
|
431
|
+
rootAccountId: string | undefined;
|
|
432
|
+
subaccountId: string | undefined;
|
|
433
|
+
smartAccountAddress: string | undefined;
|
|
434
|
+
} | undefined;
|
|
435
|
+
errorMessage?: string | undefined;
|
|
436
|
+
}>]>, undefined>, readonly []>;
|
|
437
|
+
}, undefined>;
|
|
438
|
+
type BatchCreateInternalTransfersResult = v.InferOutput<typeof BatchCreateInternalTransfersResultSchema>;
|
|
179
439
|
declare const GetInternalTransferInputSchema: v.SchemaWithPipe<readonly [v.UnionSchema<[v.StrictObjectSchema<{
|
|
180
440
|
readonly requestId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
181
441
|
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
@@ -228,5 +488,5 @@ declare const GetInternalTransferResultSchema: v.SchemaWithPipe<readonly [v.Obje
|
|
|
228
488
|
}>]>;
|
|
229
489
|
type GetInternalTransferResult = v.InferOutput<typeof GetInternalTransferResultSchema>;
|
|
230
490
|
//#endregion
|
|
231
|
-
export { CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferInputSchema, GetInternalTransferResult, GetInternalTransferResultSchema, InternalTransferDestination, InternalTransferDestinationInputSchema, ResolvedInternalTransferDestination, ResolvedInternalTransferDestinationSchema, createCreateInternalTransferInputSchema, createCreateInternalTransferResultSchema };
|
|
491
|
+
export { BatchCreateInternalTransfersInput, BatchCreateInternalTransfersResult, BatchCreateInternalTransfersResultSchema, CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferInputSchema, GetInternalTransferResult, GetInternalTransferResultSchema, InternalTransferBatchLegInput, InternalTransferBatchLegResult, InternalTransferDestination, InternalTransferDestinationInputSchema, ResolvedInternalTransferDestination, ResolvedInternalTransferDestinationSchema, createBatchCreateInternalTransfersInputSchema, createCreateInternalTransferInputSchema, createCreateInternalTransferResultSchema };
|
|
232
492
|
//# sourceMappingURL=internal-transfers.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-transfers.schemas.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.schemas.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"internal-transfers.schemas.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.schemas.ts"],"mappings":";;;;cA6Ba,wCAAsC,EAAA,yBAAA,EAAA,uBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCvC,8BAA8B,EAAE,kBACjC;iBAGK,wCAAwC,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAAA;;;;;;;;;;;;;;;KA0B7D,8BAA8B,EAAE,WACxC,kBAAkB;cAYT,2CAAyC,EAAA,yBAAA,EAAA;;;;;;;;;;;;;KAa1C,sCAAsC,EAAE,mBACzC;iBAGK,4CAAwC,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyB5C,+BAA+B,EAAE,YACzC,kBAAkB;iBAMN,8CAA8C,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAAA;;;;;;;;;;;;;;KA4CnE,oCAAoC,EAAE,WAC9C,kBAAkB;KAEV,gCAAgC;cAEtC,sCAAoC,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyB9B,iCAAiC,EAAE,mBACpC;cAGE,0CAAwC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQzC,qCAAqC,EAAE,mBACxC;cAKE,gCAA8B,EAAA,yBAAA,EAAA,aAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqB/B,2BAA2B,EAAE,kBAAkB;cAE9C,iCAA+B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;KAehC,4BAA4B,EAAE,mBAAmB"}
|
|
@@ -3,9 +3,9 @@ import { U128Schema, idInputSchema } from "../../shared/schemas.js";
|
|
|
3
3
|
import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
|
|
4
4
|
import { quantityInputToE18, scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
5
5
|
import { PositiveUint32InputSchema } from "../shared.js";
|
|
6
|
-
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
6
|
+
import { AccountScopeInputEntries, accountScopeToSubaccountId, accountScopeToSubaccountIdOrZero } from "../../shared/account-scope.js";
|
|
7
7
|
import { fromU128, toU128 } from "../../utils/u128.js";
|
|
8
|
-
import { InternalTransferDestinationCodec, InternalTransferStatusCodec } from "./internal-transfers.codecs.js";
|
|
8
|
+
import { InternalTransferBatchLegStatusCodec, InternalTransferBatchStatusCodec, InternalTransferDestinationCodec, InternalTransferStatusCodec, internalTransferErrorCodeName } from "./internal-transfers.codecs.js";
|
|
9
9
|
import * as v from "valibot";
|
|
10
10
|
//#region src/services/internal-transfers/internal-transfers.schemas.ts
|
|
11
11
|
const IdSchema = idInputSchema;
|
|
@@ -77,14 +77,72 @@ function createCreateInternalTransferResultSchema() {
|
|
|
77
77
|
amountE18: U128Schema,
|
|
78
78
|
destination: v.optional(ResolvedInternalTransferDestinationSchema),
|
|
79
79
|
status: enumLabelSchema(InternalTransferStatusCodec.protoToOutput),
|
|
80
|
-
/** Lifecycle flow ID for `lifecycle.
|
|
80
|
+
/** Lifecycle flow ID for `lifecycle.getAccountFlow`; empty when the server did not return one. */
|
|
81
81
|
flowId: v.optional(v.pipe(v.string(), v.trim()), "")
|
|
82
82
|
}), v.transform(({ acceptedAtTsNs, amountE18, ...result }) => ({
|
|
83
83
|
...result,
|
|
84
84
|
acceptedAtUnixMs: tsNsToMs(acceptedAtTsNs),
|
|
85
|
+
/** Exact acceptance time in nanoseconds since epoch, as a decimal string. */
|
|
86
|
+
acceptedAtNs: acceptedAtTsNs.toString(),
|
|
85
87
|
quantity: scaledToDecimalOutput(fromU128(amountE18), 18)
|
|
86
88
|
})));
|
|
87
89
|
}
|
|
90
|
+
function createBatchCreateInternalTransfersInputSchema(scales) {
|
|
91
|
+
return v.pipe(v.strictObject({
|
|
92
|
+
/**
|
|
93
|
+
* Up to 10 transfers, run in order. Each leg debits its own `account` (the
|
|
94
|
+
* resolved active account when omitted), and legs may repeat an asset, a source or a
|
|
95
|
+
* destination. Each leg counts as one internal transfer against the rate limit.
|
|
96
|
+
*/
|
|
97
|
+
legs: v.pipe(v.array(v.strictObject({
|
|
98
|
+
...AccountScopeInputEntries,
|
|
99
|
+
destination: InternalTransferDestinationInputSchema,
|
|
100
|
+
assetId: PositiveUint32InputSchema,
|
|
101
|
+
quantity: v.string()
|
|
102
|
+
})), v.minLength(1, "A batch needs at least one leg."), v.maxLength(10, `A batch holds at most 10 legs.`)),
|
|
103
|
+
/** Covers the whole batch; a retry must send the same legs in the same order. */
|
|
104
|
+
idempotencyKey: v.pipe(v.string(), v.trim(), v.minLength(1))
|
|
105
|
+
}), v.transform(({ legs, idempotencyKey }) => ({
|
|
106
|
+
idempotencyKey,
|
|
107
|
+
legs: legs.map(({ account, quantity, ...leg }) => ({
|
|
108
|
+
...leg,
|
|
109
|
+
subaccountId: accountScopeToSubaccountIdOrZero(account),
|
|
110
|
+
amountE18: toU128(quantityInputToE18({
|
|
111
|
+
scales,
|
|
112
|
+
assetId: leg.assetId,
|
|
113
|
+
quantity
|
|
114
|
+
}))
|
|
115
|
+
}))
|
|
116
|
+
})));
|
|
117
|
+
}
|
|
118
|
+
const InternalTransferBatchLegResultSchema = v.pipe(v.object({
|
|
119
|
+
legIndex: v.number(),
|
|
120
|
+
status: enumLabelSchema(InternalTransferBatchLegStatusCodec.protoToOutput),
|
|
121
|
+
requestId: OptionalResponseStringSchema,
|
|
122
|
+
transferId: OptionalResponseStringSchema,
|
|
123
|
+
flowId: OptionalResponseStringSchema,
|
|
124
|
+
acceptedAtTsNs: v.optional(v.bigint(), 0n),
|
|
125
|
+
assetId: v.number(),
|
|
126
|
+
assetCode: OptionalResponseStringSchema,
|
|
127
|
+
amountE18: v.optional(U128Schema),
|
|
128
|
+
destination: v.optional(ResolvedInternalTransferDestinationSchema),
|
|
129
|
+
errorCode: v.optional(v.number(), 0),
|
|
130
|
+
errorMessage: OptionalResponseStringSchema
|
|
131
|
+
}), v.transform(({ acceptedAtTsNs, amountE18, errorCode, ...leg }) => ({
|
|
132
|
+
...leg,
|
|
133
|
+
acceptedAtUnixMs: acceptedAtTsNs ? tsNsToMs(acceptedAtTsNs) : void 0,
|
|
134
|
+
acceptedAtNs: acceptedAtTsNs ? acceptedAtTsNs.toString() : void 0,
|
|
135
|
+
quantity: amountE18 ? scaledToDecimalOutput(fromU128(amountE18), 18) : void 0,
|
|
136
|
+
/** Why the leg was refused, or why its outcome is not known yet; unset otherwise. */
|
|
137
|
+
errorCode: errorCode ? internalTransferErrorCodeName(errorCode) : void 0
|
|
138
|
+
})));
|
|
139
|
+
const BatchCreateInternalTransfersResultSchema = v.object({
|
|
140
|
+
/** Batch request ID; unset when the batch was refused. */
|
|
141
|
+
requestId: OptionalResponseStringSchema,
|
|
142
|
+
status: enumLabelSchema(InternalTransferBatchStatusCodec.protoToOutput),
|
|
143
|
+
/** One result per leg, in request order. */
|
|
144
|
+
legs: v.optional(v.array(InternalTransferBatchLegResultSchema), [])
|
|
145
|
+
});
|
|
88
146
|
const TransferLookupIdSchema = v.pipe(v.string(), v.trim(), v.minLength(1));
|
|
89
147
|
const GetInternalTransferInputSchema = v.pipe(v.union([v.strictObject({
|
|
90
148
|
...AccountScopeInputEntries,
|
|
@@ -114,6 +172,6 @@ const GetInternalTransferResultSchema = v.pipe(v.object({
|
|
|
114
172
|
acceptedAtNs: acceptedAtTsNs.toString()
|
|
115
173
|
})));
|
|
116
174
|
//#endregion
|
|
117
|
-
export { GetInternalTransferInputSchema, GetInternalTransferResultSchema, InternalTransferDestinationInputSchema, ResolvedInternalTransferDestinationSchema, createCreateInternalTransferInputSchema, createCreateInternalTransferResultSchema };
|
|
175
|
+
export { BatchCreateInternalTransfersResultSchema, GetInternalTransferInputSchema, GetInternalTransferResultSchema, InternalTransferDestinationInputSchema, ResolvedInternalTransferDestinationSchema, createBatchCreateInternalTransfersInputSchema, createCreateInternalTransferInputSchema, createCreateInternalTransferResultSchema };
|
|
118
176
|
|
|
119
177
|
//# sourceMappingURL=internal-transfers.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-transfers.schemas.js","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.schemas.ts"],"sourcesContent":["import type { MessageInitShape } from \"@bufbuild/protobuf\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport * as v from \"valibot\";\nimport type * as Proto from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport { idInputSchema, U128Schema } from \"../../shared/schemas.js\";\nimport { tsNsToMs } from \"../../utils/time.js\";\nimport {\n E18_SCALE,\n quantityInputToE18,\n scaledToDecimalOutput,\n type SdkScales,\n} from \"../../shared/decimal-surface.js\";\nimport {\n InternalTransferDestinationCodec,\n InternalTransferStatusCodec,\n} from \"./internal-transfers.codecs.js\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { fromU128, toU128 } from \"../../utils/u128.js\";\n\nconst IdSchema = idInputSchema;\n\nexport const InternalTransferDestinationInputSchema = v.pipe(\n v.variant(\"type\", [\n v.strictObject({\n type: v.literal(\"account\"),\n accountId: IdSchema(\"accountId\"),\n }),\n v.strictObject({\n type: v.literal(\"subaccount\"),\n subaccountId: IdSchema(\"subaccountId\"),\n }),\n v.strictObject({\n type: v.literal(\"smartAccountAddress\"),\n address: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n ]),\n v.transform((destination) => {\n switch (destination.type) {\n case \"account\":\n return {\n case: InternalTransferDestinationCodec.inputToProtoCase.account,\n value: destination.accountId,\n } as const;\n case \"subaccount\":\n return {\n case: InternalTransferDestinationCodec.inputToProtoCase.subaccount,\n value: destination.subaccountId,\n } as const;\n case \"smartAccountAddress\":\n return {\n case: InternalTransferDestinationCodec.inputToProtoCase.smartAccountAddress,\n value: destination.address,\n } as const;\n }\n }),\n);\n\nexport type InternalTransferDestination = v.InferInput<\n typeof InternalTransferDestinationInputSchema\n>;\n\nexport function createCreateInternalTransferInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n destination: InternalTransferDestinationInputSchema,\n assetId: PositiveUint32InputSchema,\n quantity: v.string(),\n idempotencyKey: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.transform(\n ({ account, quantity, ...input }) =>\n ({\n ...input,\n amountE18: toU128(\n quantityInputToE18({\n scales,\n assetId: input.assetId,\n quantity,\n }),\n ),\n subaccountId: accountScopeToSubaccountId(account),\n }) satisfies MessageInitShape<typeof Proto.CreateInternalTransferRequestSchema>,\n ),\n );\n}\n\nexport type CreateInternalTransferInput = v.InferInput<\n ReturnType<typeof createCreateInternalTransferInputSchema>\n>;\nexport type CreateInternalTransferRequest = v.InferOutput<\n ReturnType<typeof createCreateInternalTransferInputSchema>\n>;\n\nconst NonEmptyResponseStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst OptionalResponseStringSchema = v.pipe(\n v.optional(v.pipe(v.string(), v.trim())),\n v.transform((value) => (value ? value : undefined)),\n);\n\nexport const ResolvedInternalTransferDestinationSchema = v.pipe(\n v.object({\n rootAccountPublicId: OptionalResponseStringSchema,\n subaccountPublicId: OptionalResponseStringSchema,\n smartAccountAddress: OptionalResponseStringSchema,\n }),\n v.transform(({ rootAccountPublicId, subaccountPublicId, smartAccountAddress }) => ({\n rootAccountId: rootAccountPublicId,\n subaccountId: subaccountPublicId,\n smartAccountAddress,\n })),\n);\n\nexport type ResolvedInternalTransferDestination = v.InferOutput<\n typeof ResolvedInternalTransferDestinationSchema\n>;\n\nexport function createCreateInternalTransferResultSchema() {\n return v.pipe(\n v.object({\n requestId: NonEmptyResponseStringSchema,\n transferId: NonEmptyResponseStringSchema,\n acceptedAtTsNs: v.bigint(),\n assetId: v.number(),\n assetCode: NonEmptyResponseStringSchema,\n uAssetId: NonEmptyResponseStringSchema,\n amountE18: U128Schema,\n destination: v.optional(ResolvedInternalTransferDestinationSchema),\n status: enumLabelSchema(InternalTransferStatusCodec.protoToOutput),\n /** Lifecycle flow ID for `lifecycle.getFlow`; empty when the server did not return one. */\n flowId: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform(({ acceptedAtTsNs, amountE18, ...result }) => ({\n ...result,\n acceptedAtUnixMs: tsNsToMs(acceptedAtTsNs),\n quantity: scaledToDecimalOutput(fromU128(amountE18), E18_SCALE),\n })),\n );\n}\n\nexport type CreateInternalTransferResult = v.InferOutput<\n ReturnType<typeof createCreateInternalTransferResultSchema>\n>;\n\nconst TransferLookupIdSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nexport const GetInternalTransferInputSchema = v.pipe(\n v.union(\n [\n v.strictObject({ ...AccountScopeInputEntries, requestId: TransferLookupIdSchema }),\n v.strictObject({ ...AccountScopeInputEntries, transferId: TransferLookupIdSchema }),\n ],\n \"Pass exactly one of requestId or transferId.\",\n ),\n v.transform(\n ({ account, ...selector }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n identifier:\n \"requestId\" in selector\n ? { case: \"requestId\", value: selector.requestId }\n : { case: \"transferId\", value: selector.transferId },\n }) satisfies MessageInitShape<typeof Proto.GetInternalTransferRequestSchema>,\n ),\n);\n\n/** Selects an accepted transfer by exactly one of its `requestId` or `transferId`. */\nexport type GetInternalTransferInput = v.InferInput<typeof GetInternalTransferInputSchema>;\n\nexport const GetInternalTransferResultSchema = v.pipe(\n v.object({\n requestId: NonEmptyResponseStringSchema,\n transferId: NonEmptyResponseStringSchema,\n flowId: NonEmptyResponseStringSchema,\n acceptedAtTsNs: v.bigint(),\n }),\n v.transform(({ acceptedAtTsNs, ...result }) => ({\n ...result,\n acceptedAtUnixMs: tsNsToMs(acceptedAtTsNs),\n /** Exact acceptance time in nanoseconds since epoch, as a decimal string. */\n acceptedAtNs: acceptedAtTsNs.toString(),\n })),\n);\n\nexport type GetInternalTransferResult = v.InferOutput<typeof GetInternalTransferResultSchema>;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"internal-transfers.schemas.js","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.schemas.ts"],"sourcesContent":["import type { MessageInitShape } from \"@bufbuild/protobuf\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport * as v from \"valibot\";\nimport type * as Proto from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport { idInputSchema, U128Schema } from \"../../shared/schemas.js\";\nimport { tsNsToMs } from \"../../utils/time.js\";\nimport {\n E18_SCALE,\n quantityInputToE18,\n scaledToDecimalOutput,\n type SdkScales,\n} from \"../../shared/decimal-surface.js\";\nimport {\n InternalTransferBatchLegStatusCodec,\n InternalTransferBatchStatusCodec,\n InternalTransferDestinationCodec,\n InternalTransferStatusCodec,\n internalTransferErrorCodeName,\n} from \"./internal-transfers.codecs.js\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n accountScopeToSubaccountIdOrZero,\n} from \"../../shared/account-scope.js\";\nimport { fromU128, toU128 } from \"../../utils/u128.js\";\n\nconst IdSchema = idInputSchema;\n\nexport const InternalTransferDestinationInputSchema = v.pipe(\n v.variant(\"type\", [\n v.strictObject({\n type: v.literal(\"account\"),\n accountId: IdSchema(\"accountId\"),\n }),\n v.strictObject({\n type: v.literal(\"subaccount\"),\n subaccountId: IdSchema(\"subaccountId\"),\n }),\n v.strictObject({\n type: v.literal(\"smartAccountAddress\"),\n address: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n ]),\n v.transform((destination) => {\n switch (destination.type) {\n case \"account\":\n return {\n case: InternalTransferDestinationCodec.inputToProtoCase.account,\n value: destination.accountId,\n } as const;\n case \"subaccount\":\n return {\n case: InternalTransferDestinationCodec.inputToProtoCase.subaccount,\n value: destination.subaccountId,\n } as const;\n case \"smartAccountAddress\":\n return {\n case: InternalTransferDestinationCodec.inputToProtoCase.smartAccountAddress,\n value: destination.address,\n } as const;\n }\n }),\n);\n\nexport type InternalTransferDestination = v.InferInput<\n typeof InternalTransferDestinationInputSchema\n>;\n\nexport function createCreateInternalTransferInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n destination: InternalTransferDestinationInputSchema,\n assetId: PositiveUint32InputSchema,\n quantity: v.string(),\n idempotencyKey: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.transform(\n ({ account, quantity, ...input }) =>\n ({\n ...input,\n amountE18: toU128(\n quantityInputToE18({\n scales,\n assetId: input.assetId,\n quantity,\n }),\n ),\n subaccountId: accountScopeToSubaccountId(account),\n }) satisfies MessageInitShape<typeof Proto.CreateInternalTransferRequestSchema>,\n ),\n );\n}\n\nexport type CreateInternalTransferInput = v.InferInput<\n ReturnType<typeof createCreateInternalTransferInputSchema>\n>;\nexport type CreateInternalTransferRequest = v.InferOutput<\n ReturnType<typeof createCreateInternalTransferInputSchema>\n>;\n\nconst NonEmptyResponseStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst OptionalResponseStringSchema = v.pipe(\n v.optional(v.pipe(v.string(), v.trim())),\n v.transform((value) => (value ? value : undefined)),\n);\n\nexport const ResolvedInternalTransferDestinationSchema = v.pipe(\n v.object({\n rootAccountPublicId: OptionalResponseStringSchema,\n subaccountPublicId: OptionalResponseStringSchema,\n smartAccountAddress: OptionalResponseStringSchema,\n }),\n v.transform(({ rootAccountPublicId, subaccountPublicId, smartAccountAddress }) => ({\n rootAccountId: rootAccountPublicId,\n subaccountId: subaccountPublicId,\n smartAccountAddress,\n })),\n);\n\nexport type ResolvedInternalTransferDestination = v.InferOutput<\n typeof ResolvedInternalTransferDestinationSchema\n>;\n\nexport function createCreateInternalTransferResultSchema() {\n return v.pipe(\n v.object({\n requestId: NonEmptyResponseStringSchema,\n transferId: NonEmptyResponseStringSchema,\n acceptedAtTsNs: v.bigint(),\n assetId: v.number(),\n assetCode: NonEmptyResponseStringSchema,\n uAssetId: NonEmptyResponseStringSchema,\n amountE18: U128Schema,\n destination: v.optional(ResolvedInternalTransferDestinationSchema),\n status: enumLabelSchema(InternalTransferStatusCodec.protoToOutput),\n /** Lifecycle flow ID for `lifecycle.getAccountFlow`; empty when the server did not return one. */\n flowId: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform(({ acceptedAtTsNs, amountE18, ...result }) => ({\n ...result,\n acceptedAtUnixMs: tsNsToMs(acceptedAtTsNs),\n /** Exact acceptance time in nanoseconds since epoch, as a decimal string. */\n acceptedAtNs: acceptedAtTsNs.toString(),\n quantity: scaledToDecimalOutput(fromU128(amountE18), E18_SCALE),\n })),\n );\n}\n\nexport type CreateInternalTransferResult = v.InferOutput<\n ReturnType<typeof createCreateInternalTransferResultSchema>\n>;\n\n/** The most legs one batch may carry. */\nexport const MAX_INTERNAL_TRANSFER_BATCH_LEGS = 10;\n\nexport function createBatchCreateInternalTransfersInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n /**\n * Up to 10 transfers, run in order. Each leg debits its own `account` (the\n * resolved active account when omitted), and legs may repeat an asset, a source or a\n * destination. Each leg counts as one internal transfer against the rate limit.\n */\n legs: v.pipe(\n v.array(\n v.strictObject({\n ...AccountScopeInputEntries,\n destination: InternalTransferDestinationInputSchema,\n assetId: PositiveUint32InputSchema,\n quantity: v.string(),\n }),\n ),\n v.minLength(1, \"A batch needs at least one leg.\"),\n v.maxLength(\n MAX_INTERNAL_TRANSFER_BATCH_LEGS,\n `A batch holds at most ${MAX_INTERNAL_TRANSFER_BATCH_LEGS} legs.`,\n ),\n ),\n /** Covers the whole batch; a retry must send the same legs in the same order. */\n idempotencyKey: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.transform(\n ({ legs, idempotencyKey }) =>\n ({\n idempotencyKey,\n legs: legs.map(({ account, quantity, ...leg }) => ({\n ...leg,\n subaccountId: accountScopeToSubaccountIdOrZero(account),\n amountE18: toU128(\n quantityInputToE18({ scales, assetId: leg.assetId, quantity }),\n ),\n })),\n }) satisfies MessageInitShape<\n typeof Proto.BatchCreateInternalTransfersRequestSchema\n >,\n ),\n );\n}\n\nexport type BatchCreateInternalTransfersInput = v.InferInput<\n ReturnType<typeof createBatchCreateInternalTransfersInputSchema>\n>;\nexport type InternalTransferBatchLegInput = BatchCreateInternalTransfersInput[\"legs\"][number];\n\nconst InternalTransferBatchLegResultSchema = v.pipe(\n v.object({\n legIndex: v.number(),\n status: enumLabelSchema(InternalTransferBatchLegStatusCodec.protoToOutput),\n requestId: OptionalResponseStringSchema,\n transferId: OptionalResponseStringSchema,\n flowId: OptionalResponseStringSchema,\n acceptedAtTsNs: v.optional(v.bigint(), 0n),\n assetId: v.number(),\n assetCode: OptionalResponseStringSchema,\n amountE18: v.optional(U128Schema),\n destination: v.optional(ResolvedInternalTransferDestinationSchema),\n errorCode: v.optional(v.number(), 0),\n errorMessage: OptionalResponseStringSchema,\n }),\n v.transform(({ acceptedAtTsNs, amountE18, errorCode, ...leg }) => ({\n ...leg,\n acceptedAtUnixMs: acceptedAtTsNs ? tsNsToMs(acceptedAtTsNs) : undefined,\n acceptedAtNs: acceptedAtTsNs ? acceptedAtTsNs.toString() : undefined,\n quantity: amountE18 ? scaledToDecimalOutput(fromU128(amountE18), E18_SCALE) : undefined,\n /** Why the leg was refused, or why its outcome is not known yet; unset otherwise. */\n errorCode: errorCode ? internalTransferErrorCodeName(errorCode) : undefined,\n })),\n);\n\nexport type InternalTransferBatchLegResult = v.InferOutput<\n typeof InternalTransferBatchLegResultSchema\n>;\n\nexport const BatchCreateInternalTransfersResultSchema = v.object({\n /** Batch request ID; unset when the batch was refused. */\n requestId: OptionalResponseStringSchema,\n status: enumLabelSchema(InternalTransferBatchStatusCodec.protoToOutput),\n /** One result per leg, in request order. */\n legs: v.optional(v.array(InternalTransferBatchLegResultSchema), []),\n});\n\nexport type BatchCreateInternalTransfersResult = v.InferOutput<\n typeof BatchCreateInternalTransfersResultSchema\n>;\n\nconst TransferLookupIdSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nexport const GetInternalTransferInputSchema = v.pipe(\n v.union(\n [\n v.strictObject({ ...AccountScopeInputEntries, requestId: TransferLookupIdSchema }),\n v.strictObject({ ...AccountScopeInputEntries, transferId: TransferLookupIdSchema }),\n ],\n \"Pass exactly one of requestId or transferId.\",\n ),\n v.transform(\n ({ account, ...selector }) =>\n ({\n subaccountId: accountScopeToSubaccountId(account),\n identifier:\n \"requestId\" in selector\n ? { case: \"requestId\", value: selector.requestId }\n : { case: \"transferId\", value: selector.transferId },\n }) satisfies MessageInitShape<typeof Proto.GetInternalTransferRequestSchema>,\n ),\n);\n\n/** Selects an accepted transfer by exactly one of its `requestId` or `transferId`. */\nexport type GetInternalTransferInput = v.InferInput<typeof GetInternalTransferInputSchema>;\n\nexport const GetInternalTransferResultSchema = v.pipe(\n v.object({\n requestId: NonEmptyResponseStringSchema,\n transferId: NonEmptyResponseStringSchema,\n flowId: NonEmptyResponseStringSchema,\n acceptedAtTsNs: v.bigint(),\n }),\n v.transform(({ acceptedAtTsNs, ...result }) => ({\n ...result,\n acceptedAtUnixMs: tsNsToMs(acceptedAtTsNs),\n /** Exact acceptance time in nanoseconds since epoch, as a decimal string. */\n acceptedAtNs: acceptedAtTsNs.toString(),\n })),\n);\n\nexport type GetInternalTransferResult = v.InferOutput<typeof GetInternalTransferResultSchema>;\n"],"mappings":"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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferResult, InternalTransferDestination, ResolvedInternalTransferDestination } from "./internal-transfers.schemas.js";
|
|
2
|
-
import { InternalTransferStatus } from "./internal-transfers.codecs.js";
|
|
3
|
-
export type { CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferResult, InternalTransferDestination, InternalTransferStatus, ResolvedInternalTransferDestination };
|
|
1
|
+
import { BatchCreateInternalTransfersInput, BatchCreateInternalTransfersResult, CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferResult, InternalTransferBatchLegInput, InternalTransferBatchLegResult, InternalTransferDestination, ResolvedInternalTransferDestination } from "./internal-transfers.schemas.js";
|
|
2
|
+
import { InternalTransferBatchLegStatus, InternalTransferBatchStatus, InternalTransferErrorCode, InternalTransferStatus } from "./internal-transfers.codecs.js";
|
|
3
|
+
export type { BatchCreateInternalTransfersInput, BatchCreateInternalTransfersResult, CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferResult, InternalTransferBatchLegInput, InternalTransferBatchLegResult, InternalTransferBatchLegStatus, InternalTransferBatchStatus, InternalTransferDestination, InternalTransferErrorCode, InternalTransferStatus, ResolvedInternalTransferDestination };
|
|
@@ -9,7 +9,7 @@ declare const LIFECYCLE_SORT_VALUES: readonly ["newest", "oldest"];
|
|
|
9
9
|
type LifecycleSortValue = (typeof LIFECYCLE_SORT_VALUES)[number];
|
|
10
10
|
declare const LIFECYCLE_LIST_ORDER_BY_VALUES: readonly ["last_activity", "started_at"];
|
|
11
11
|
type LifecycleListOrderByValue = (typeof LIFECYCLE_LIST_ORDER_BY_VALUES)[number];
|
|
12
|
-
declare const LIFECYCLE_REASON_VALUES: readonly ["unspecified", "zipper_validation_rejected", "zipper_execution_rejected", "zipper_withdraw_execution_failed", "zipper_deposit_refund_failed", "zipper_compliance_transferred", "ledger_mirror_rejected", "ledger_mirror_transfer_exceeds_credits", "ledger_mirror_transfer_exists", "ledger_mirror_pending_transfer_not_found", "ledger_mirror_transfer_id_already_failed", "trading_withdraw_policy_denied", "trading_withdraw_contract_reverted", "trading_withdraw_execution_failed", "deposit_source_not_confirmed"];
|
|
12
|
+
declare const LIFECYCLE_REASON_VALUES: readonly ["unspecified", "zipper_validation_rejected", "zipper_execution_rejected", "zipper_withdraw_execution_failed", "zipper_deposit_refund_failed", "zipper_compliance_transferred", "zipper_deposit_delivered_to_wallet", "ledger_mirror_rejected", "ledger_mirror_transfer_exceeds_credits", "ledger_mirror_transfer_exists", "ledger_mirror_pending_transfer_not_found", "ledger_mirror_transfer_id_already_failed", "trading_withdraw_policy_denied", "trading_withdraw_contract_reverted", "trading_withdraw_execution_failed", "deposit_source_not_confirmed"];
|
|
13
13
|
/**
|
|
14
14
|
* Catalog labels plus a code-preserving fallback for wire values the generated
|
|
15
15
|
* enum does not know. Proto3 enums are open — the backend can emit codes ahead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.codecs.d.ts","names":[],"sources":["../../../src/services/lifecycle/lifecycle.codecs.ts"],"mappings":";;;cAmCa;KACD,kCAAkC;cAKjC;KACD,qCAAqC;cAEpC;KACD,6BAA6B;cAE5B;KACD,oCAAoC;cAEnC;;;;;;
|
|
1
|
+
{"version":3,"file":"lifecycle.codecs.d.ts","names":[],"sources":["../../../src/services/lifecycle/lifecycle.codecs.ts"],"mappings":";;;cAmCa;KACD,kCAAkC;cAKjC;KACD,qCAAqC;cAEpC;KACD,6BAA6B;cAE5B;KACD,oCAAoC;cAEnC;;;;;;KAuBD,+BACE;cAyCD;KACD,yCAAyC;;;;;;cAuNxC;KAsDD,gCACE"}
|
|
@@ -112,6 +112,7 @@ const LifecycleReasonCodec = { protoToOutput: {
|
|
|
112
112
|
[103]: "zipper_withdraw_execution_failed",
|
|
113
113
|
[104]: "zipper_deposit_refund_failed",
|
|
114
114
|
[105]: "zipper_compliance_transferred",
|
|
115
|
+
[106]: "zipper_deposit_delivered_to_wallet",
|
|
115
116
|
[200]: "ledger_mirror_rejected",
|
|
116
117
|
[201]: "ledger_mirror_transfer_exceeds_credits",
|
|
117
118
|
[202]: "ledger_mirror_transfer_exists",
|