@polyester/sdk 0.36.0-devnet-20261119010940 → 0.36.0-devnet-20261119050221

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.
Files changed (162) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/dist/gen/ai/v1/assistant_pb.d.ts +1 -1
  3. package/dist/gen/ai/v1/assistant_pb.js +1 -1
  4. package/dist/gen/alerts/v1/price_alerts_pb.d.ts +1 -1
  5. package/dist/gen/auth/v1/activity_pb.d.ts +1 -1
  6. package/dist/gen/auth/v1/address_book_pb.d.ts +1 -1
  7. package/dist/gen/auth/v1/api_keys_pb.d.ts +1 -1
  8. package/dist/gen/auth/v1/auth_pb.d.ts +1 -1
  9. package/dist/gen/auth/v1/connected_apps_pb.d.ts +1 -1
  10. package/dist/gen/auth/v1/mfa_pb.d.ts +1 -1
  11. package/dist/gen/auth/v1/policies_pb.d.ts +1 -1
  12. package/dist/gen/auth/v1/profile_pb.d.ts +1 -1
  13. package/dist/gen/auth/v1/resolve_pb.d.ts +1 -1
  14. package/dist/gen/auth/v1/social_verification_pb.d.ts +1 -1
  15. package/dist/gen/auth/v1/subaccounts_pb.d.ts +1 -1
  16. package/dist/gen/auth/v1/subaccounts_pb.js +1 -1
  17. package/dist/gen/chain/analytics/v1/analytics_read_pb.d.ts +1 -1
  18. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +1 -1
  19. package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +1 -1
  20. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +1 -1
  21. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +1 -1
  22. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +1 -1
  23. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +1 -1
  24. package/dist/gen/chain/zipper/v1/reason_pb.d.ts +1 -1
  25. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +1 -1
  26. package/dist/gen/changelog/v1/changelog_pb.d.ts +1 -1
  27. package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts +1 -1
  28. package/dist/gen/claims/v1/claims_pb.d.ts +1 -1
  29. package/dist/gen/fees/v1/fees_pb.d.ts +1 -1
  30. package/dist/gen/index.js +24 -24
  31. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +1 -1
  32. package/dist/gen/ledger/read/v1/statement_export_pb.d.ts +1 -1
  33. package/dist/gen/marketdata/v1/asset_info_pb.d.ts +1 -1
  34. package/dist/gen/marketdata/v1/heatmap_pb.d.ts +1 -1
  35. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +1 -1
  36. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +1 -1
  37. package/dist/gen/notifications/v1/notifications_pb.d.ts +1 -1
  38. package/dist/gen/orderbook/v1/orderbook_pb.d.ts +1 -1
  39. package/dist/gen/orders/v1/orders_pb.d.ts +1 -1
  40. package/dist/gen/orders/v1/orders_read_pb.d.ts +1 -1
  41. package/dist/gen/polyester/api/v1/request_error_pb.d.ts +1 -1
  42. package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +1 -1
  43. package/dist/gen/polyester/type/v1/u128_pb.d.ts +1 -1
  44. package/dist/gen/privatews/v1/private_ws_pb.d.ts +1 -1
  45. package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +1 -1
  46. package/dist/gen/rewards/v1/rewards_pb.d.ts +1 -1
  47. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +1 -1
  48. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts +1 -1
  49. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +1 -1
  50. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +1 -1
  51. package/dist/gen/swap/v1/swap_pb.d.ts +1 -1
  52. package/dist/gen/system/v1/system_pb.d.ts +1 -1
  53. package/dist/gen/tradews/v1/trade_ws_pb.d.ts +1 -1
  54. package/dist/gen/transfer/v1/dust_conversion_pb.d.ts +1 -1
  55. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +1 -1
  56. package/dist/gen/triggers/v1/triggers_pb.d.ts +1 -1
  57. package/dist/gen/vip/v1/vip_pb.d.ts +1 -1
  58. package/dist/services/account-activity/account-activity.js +1 -1
  59. package/dist/services/account-activity/account-activity.schemas.d.ts +2 -2
  60. package/dist/services/accounts/accounts.js +1 -1
  61. package/dist/services/accounts/accounts.schemas.js +1 -1
  62. package/dist/services/address-book/address-book.schemas.d.ts +2 -2
  63. package/dist/services/api-keys/api-keys.schemas.d.ts +3 -3
  64. package/dist/services/assistant/assistant-events.schemas.d.ts +29 -29
  65. package/dist/services/assistant/assistant.js +1 -1
  66. package/dist/services/assistant/assistant.schemas.d.ts +2 -2
  67. package/dist/services/auth/profile/profile.js +1 -1
  68. package/dist/services/auto-withdraw/auto-withdraw.js +1 -1
  69. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +16 -16
  70. package/dist/services/auto-withdraw/auto-withdraw.schemas.js +1 -1
  71. package/dist/services/candles/candles.js +1 -1
  72. package/dist/services/chain-analytics/chain-analytics.js +1 -1
  73. package/dist/services/changelog/changelog.js +1 -1
  74. package/dist/services/changelog/changelog.schemas.d.ts +45 -40
  75. package/dist/services/changelog/changelog.schemas.d.ts.map +1 -1
  76. package/dist/services/changelog/changelog.schemas.js +6 -1
  77. package/dist/services/changelog/changelog.schemas.js.map +1 -1
  78. package/dist/services/checkpoints/checkpoints.js +1 -1
  79. package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
  80. package/dist/services/claims/claims.js +1 -1
  81. package/dist/services/claims/claims.schemas.js +1 -1
  82. package/dist/services/connected-apps/connected-apps.js +1 -1
  83. package/dist/services/deposit/deposit.js +1 -1
  84. package/dist/services/dust-conversion/dust-conversion.js +1 -1
  85. package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +6 -6
  86. package/dist/services/dust-conversion/dust-conversion.schemas.js +1 -1
  87. package/dist/services/fees/fees.js +1 -1
  88. package/dist/services/guard-signer/guard-signer.js +1 -1
  89. package/dist/services/heatmap/heatmap.js +1 -1
  90. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  91. package/dist/services/internal-transfers/internal-transfers.d.ts +4 -3
  92. package/dist/services/internal-transfers/internal-transfers.d.ts.map +1 -1
  93. package/dist/services/internal-transfers/internal-transfers.js +5 -4
  94. package/dist/services/internal-transfers/internal-transfers.js.map +1 -1
  95. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +1 -1
  96. package/dist/services/lifecycle/lifecycle.js +1 -1
  97. package/dist/services/lifecycle/lifecycle.schemas.d.ts +91 -91
  98. package/dist/services/lifecycle/lifecycle.schemas.js +2 -2
  99. package/dist/services/market-data/market-data.js +1 -1
  100. package/dist/services/market-overview/market-overview.js +1 -1
  101. package/dist/services/market-overview/market-overview.schemas.js +1 -1
  102. package/dist/services/notifications/notifications.js +1 -1
  103. package/dist/services/orderbook/orderbook.js +1 -1
  104. package/dist/services/orders/order-errors.schemas.d.ts +3 -3
  105. package/dist/services/orders/order-errors.schemas.js +1 -1
  106. package/dist/services/orders/orders-batch.schemas.d.ts +44 -44
  107. package/dist/services/orders/orders-batch.schemas.js +1 -1
  108. package/dist/services/orders/orders-input.schemas.d.ts +5 -5
  109. package/dist/services/orders/orders-input.schemas.js +1 -1
  110. package/dist/services/orders/orders-modify.schemas.js +1 -1
  111. package/dist/services/orders/orders-output.schemas.d.ts +12 -12
  112. package/dist/services/orders/orders-risk.schemas.js +2 -2
  113. package/dist/services/orders/orders.js +2 -2
  114. package/dist/services/price-alerts/price-alerts.js +1 -1
  115. package/dist/services/price-alerts/price-alerts.schemas.d.ts +10 -10
  116. package/dist/services/rate-limits/rate-limits.js +1 -1
  117. package/dist/services/rewards/rewards.js +1 -1
  118. package/dist/services/rewards/rewards.schemas.d.ts +4 -4
  119. package/dist/services/social-verification/social-verification.js +1 -1
  120. package/dist/services/social-verification/social-verification.schemas.js +1 -1
  121. package/dist/services/statement-exports/statement-exports.js +1 -1
  122. package/dist/services/statement-exports/statement-exports.schemas.d.ts +6 -6
  123. package/dist/services/subaccounts/subaccounts.schemas.d.ts +14 -14
  124. package/dist/services/system/system.js +1 -1
  125. package/dist/services/system/system.schemas.d.ts +13 -13
  126. package/dist/services/trades/trades.js +1 -1
  127. package/dist/services/trades/trades.schemas.d.ts +1 -1
  128. package/dist/services/trading-withdraws/trading-withdraws.js +1 -1
  129. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +1 -1
  130. package/dist/services/trading-withdraws/wallet-message.js +1 -1
  131. package/dist/services/triggers/trigger-child-order.schemas.js +2 -2
  132. package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
  133. package/dist/services/triggers/trigger-input.schemas.js +2 -2
  134. package/dist/services/triggers/triggers-output.schemas.d.ts +34 -34
  135. package/dist/services/triggers/triggers.js +1 -1
  136. package/dist/services/vip/vip.js +1 -1
  137. package/dist/services/vip/vip.schemas.js +1 -1
  138. package/dist/services/zipper/zipper.js +1 -1
  139. package/dist/services/zipper/zipper.schemas.js +1 -1
  140. package/dist/shared/error-details/alerts.js +1 -1
  141. package/dist/shared/error-details/assistant.js +1 -1
  142. package/dist/shared/error-details/auth.js +1 -1
  143. package/dist/shared/error-details/claims.js +1 -1
  144. package/dist/shared/error-details/internal-transfer.js +1 -1
  145. package/dist/shared/error-details/ledger.js +1 -1
  146. package/dist/shared/error-details/market-overview.js +1 -1
  147. package/dist/shared/error-details/notifications.js +1 -1
  148. package/dist/shared/error-details/orders.js +1 -1
  149. package/dist/shared/error-details/profile.js +1 -1
  150. package/dist/shared/error-details/rate-limit.js +1 -1
  151. package/dist/shared/error-details/withdraw.js +1 -1
  152. package/dist/shared/errors.d.ts +4 -1
  153. package/dist/shared/errors.d.ts.map +1 -1
  154. package/dist/shared/errors.js +4 -1
  155. package/dist/shared/errors.js.map +1 -1
  156. package/dist/shared/rate-limit.schemas.d.ts +1 -1
  157. package/dist/shared/rate-limit.schemas.js +1 -1
  158. package/dist/utils/connect-mfa-errors.d.ts +2 -2
  159. package/dist/utils/connect-mfa-errors.js +2 -2
  160. package/dist/utils/connect-mfa-errors.js.map +1 -1
  161. package/dist/wired-services.js +19 -19
  162. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"changelog.schemas.js","names":[],"sources":["../../../src/services/changelog/changelog.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport {\n OptionalTimestampMsSchema,\n PublicIdSchema,\n TimestampMsSchema,\n} from \"../../shared/schemas.js\";\nimport { msToTimestamp } from \"../../utils/timestamp.js\";\nimport {\n CHANGELOG_AUDIENCE_VALUES,\n CHANGELOG_CHANGE_CATEGORY_VALUES,\n CHANGELOG_SORT_VALUES,\n CHANGELOG_SURFACE_VALUES,\n ChangelogAudienceCodec,\n ChangelogChangeAvailabilityCodec,\n ChangelogChangeCategoryCodec,\n ChangelogEnvironmentCodec,\n ChangelogSortCodec,\n ChangelogSurfaceCodec,\n} from \"./changelog.codecs.js\";\n\nconst PageTokenInputSchema = v.optional(v.pipe(v.string(), v.trim()), \"\");\nconst SlugInputSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst TimestampMsInputSchema = v.pipe(\n v.number(),\n v.integer(),\n v.minValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n);\n\n/** `limit` is 0 through 100; 0 or omitted uses the server default of 20. */\nexport const ListChangelogPostsInputSchema = v.strictObject({\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(100)), 0),\n pageToken: PageTokenInputSchema,\n});\n\nexport type ListChangelogPostsInput = v.InferInput<typeof ListChangelogPostsInputSchema>;\n\nexport const GetChangelogPostInputSchema = v.strictObject({\n slug: SlugInputSchema,\n});\n\nexport type GetChangelogPostInput = v.InferInput<typeof GetChangelogPostInputSchema>;\n\n/**\n * Filters on different fields combine with AND; values within one field combine with OR.\n * Times are epoch milliseconds on first post publication time: `startTime` inclusive, `endTime`\n * exclusive and after `startTime`. `limit` is 0 through 500; 0 or omitted uses the server\n * default of 100.\n */\nexport const ListChangelogChangesInputSchema = v.pipe(\n v.strictObject({\n categories: v.optional(v.array(v.picklist(CHANGELOG_CHANGE_CATEGORY_VALUES)), []),\n actionRequired: v.optional(v.boolean()),\n surfaces: v.optional(v.array(v.picklist(CHANGELOG_SURFACE_VALUES)), []),\n audiences: v.optional(v.array(v.picklist(CHANGELOG_AUDIENCE_VALUES)), []),\n startTime: v.optional(TimestampMsInputSchema),\n endTime: v.optional(TimestampMsInputSchema),\n postSlug: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n sort: v.optional(v.picklist(CHANGELOG_SORT_VALUES)),\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(500)), 0),\n pageToken: PageTokenInputSchema,\n }),\n v.check(\n ({ startTime, endTime }) =>\n startTime === undefined || endTime === undefined || endTime > startTime,\n \"endTime: must be after startTime\",\n ),\n v.transform(({ categories, surfaces, audiences, startTime, endTime, sort, ...rest }) => ({\n ...rest,\n categories: categories.map((value) => ChangelogChangeCategoryCodec.inputToProto[value]),\n surfaces: surfaces.map((value) => ChangelogSurfaceCodec.inputToProto[value]),\n audiences: audiences.map((value) => ChangelogAudienceCodec.inputToProto[value]),\n startTime: startTime === undefined ? undefined : msToTimestamp(startTime),\n endTime: endTime === undefined ? undefined : msToTimestamp(endTime),\n sort: sort === undefined ? undefined : ChangelogSortCodec.inputToProto[sort],\n })),\n);\n\nexport type ListChangelogChangesInput = v.InferInput<typeof ListChangelogChangesInputSchema>;\n\n/** `liveAt` is set for `ahead` only: when the change became available there. */\nconst ChangelogChangeExceptionSchema = v.object({\n environment: enumLabelSchema(ChangelogEnvironmentCodec.protoToOutput),\n availability: enumLabelSchema(ChangelogChangeAvailabilityCodec.protoToOutput),\n liveAt: OptionalTimestampMsSchema,\n});\n\n/** `liveAt` is when the release went live there, `undefined` while it is pending. */\nconst ChangelogEnvironmentStatusSchema = v.object({\n environment: enumLabelSchema(ChangelogEnvironmentCodec.protoToOutput),\n liveAt: OptionalTimestampMsSchema,\n});\n\n/**\n * `id` is the public base58 identifier, stable across environments. `environmentExceptions`\n * lists every environment where the change differs from its release's status; it is empty\n * outside release posts and when the change follows its release everywhere.\n */\nexport const ChangelogChangeSchema = v.object({\n id: PublicIdSchema,\n title: v.string(),\n summary: v.string(),\n details: v.optional(v.string()),\n category: enumLabelSchema(ChangelogChangeCategoryCodec.protoToOutput),\n actionRequired: v.boolean(),\n migrationGuidance: v.optional(v.string()),\n audiences: v.optional(v.array(enumLabelSchema(ChangelogAudienceCodec.protoToOutput)), []),\n surfaces: v.optional(v.array(enumLabelSchema(ChangelogSurfaceCodec.protoToOutput)), []),\n environmentExceptions: v.optional(v.array(ChangelogChangeExceptionSchema), []),\n});\n\nexport type ChangelogChange = v.InferOutput<typeof ChangelogChangeSchema>;\n\n/** `surface` is the product area the section covers, `\"unspecified\"` when it spans several. */\nexport const ChangelogSectionSchema = v.object({\n heading: v.string(),\n summary: v.optional(v.string()),\n surface: enumLabelSchema(ChangelogSurfaceCodec.protoToOutput),\n changes: v.optional(v.array(ChangelogChangeSchema), []),\n});\n\nexport type ChangelogSection = v.InferOutput<typeof ChangelogSectionSchema>;\n\n/**\n * `coverageCutoff` is the exclusive end of the covered period, `undefined` when unknown.\n * A post can be republished to correct its copy or withdraw a change: `revision` starts at 1\n * and increases with each republication, and `updatedAt` is when the current revision was\n * published (equal to `publishedAt` for revision 1). `slug` and `publishedAt` never change.\n * A server that predates post revisions sends `revision` 0 and no `updatedAt`.\n *\n * A release post has `releaseVersion` (for example `\"0.92.9\"`), the same slug (`\"v0.92.9\"`) and\n * content in every environment, and is listed even where the release is still pending.\n * `environments` holds the release's status in devnet, testnet and mainnet, in that order, and\n * changes without a new revision. `deploymentGroupSlug` names the deployment group that brought\n * the release here, `undefined` while it is pending here. Posts that announce no single release\n * have no `releaseVersion`, no `deploymentGroupSlug` and empty `environments`.\n */\nexport const ChangelogPostSummarySchema = v.object({\n slug: v.string(),\n title: v.string(),\n introduction: v.string(),\n publishedAt: TimestampMsSchema,\n updatedAt: OptionalTimestampMsSchema,\n revision: v.number(),\n coverageCutoff: OptionalTimestampMsSchema,\n changeCount: v.number(),\n breakingChangeCount: v.number(),\n actionRequiredCount: v.number(),\n newFeatureCount: v.number(),\n improvementCount: v.number(),\n bugFixCount: v.number(),\n releaseVersion: v.optional(v.string()),\n environments: v.optional(v.array(ChangelogEnvironmentStatusSchema), []),\n deploymentGroupSlug: v.optional(v.string()),\n});\n\nexport type ChangelogPostSummary = v.InferOutput<typeof ChangelogPostSummarySchema>;\n\nexport const ListChangelogPostsResultSchema = v.object({\n posts: v.optional(v.array(ChangelogPostSummarySchema), []),\n nextPageToken: v.string(),\n});\n\nexport type ListChangelogPostsResult = v.InferOutput<typeof ListChangelogPostsResultSchema>;\n\nexport const ChangelogPostSchema = v.pipe(\n v.object({\n summary: ChangelogPostSummarySchema,\n sections: v.optional(v.array(ChangelogSectionSchema), []),\n }),\n v.transform(({ summary, sections }) => ({ ...summary, sections })),\n);\n\nexport type ChangelogPost = v.InferOutput<typeof ChangelogPostSchema>;\n\nexport const GetChangelogPostResultSchema = v.object({ post: ChangelogPostSchema });\n\nexport const ChangelogChangeEntrySchema = v.pipe(\n v.object({\n change: ChangelogChangeSchema,\n postSlug: v.string(),\n publishedAt: TimestampMsSchema,\n sectionHeading: v.string(),\n }),\n v.transform(({ change, ...entry }) => ({ ...change, ...entry })),\n);\n\n/** A change with the slug, first publication time and section heading of the post that announced it. */\nexport type ChangelogChangeEntry = v.InferOutput<typeof ChangelogChangeEntrySchema>;\n\nexport const ListChangelogChangesResultSchema = v.object({\n changes: v.optional(v.array(ChangelogChangeEntrySchema), []),\n nextPageToken: v.string(),\n});\n\nexport type ListChangelogChangesResult = v.InferOutput<typeof ListChangelogChangesResultSchema>;\n\n/** `limit` is 0 through 100; 0 or omitted uses the server default of 20. */\nexport const ListChangelogDeploymentGroupsInputSchema = v.strictObject({\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(100)), 0),\n pageToken: PageTokenInputSchema,\n});\n\nexport type ListChangelogDeploymentGroupsInput = v.InferInput<\n typeof ListChangelogDeploymentGroupsInputSchema\n>;\n\nexport const GetChangelogDeploymentGroupInputSchema = v.strictObject({\n slug: SlugInputSchema,\n});\n\nexport type GetChangelogDeploymentGroupInput = v.InferInput<\n typeof GetChangelogDeploymentGroupInputSchema\n>;\n\n/** A published release post a deployment group brought. */\nconst ChangelogDeploymentGroupPostSchema = v.object({\n slug: v.string(),\n releaseVersion: v.string(),\n title: v.string(),\n publishedAt: TimestampMsSchema,\n revision: v.number(),\n updatedAt: OptionalTimestampMsSchema,\n});\n\n/**\n * One deployment to this environment that raised its release version. `slug` is the environment\n * and the group's own release, for example `\"testnet-v0.92.9\"`, and never changes. `versions`\n * lists every release the group brought, ascending; `posts` holds the published release posts of\n * those releases, so a release without a post has none. `previousReleaseVersion` is `undefined`\n * for the first group, and `releaseTag` when unknown.\n */\nexport const ChangelogDeploymentGroupSummarySchema = v.object({\n slug: v.string(),\n environment: enumLabelSchema(ChangelogEnvironmentCodec.protoToOutput),\n occurredAt: TimestampMsSchema,\n releaseVersion: v.string(),\n releaseTag: v.optional(v.string()),\n previousReleaseVersion: v.optional(v.string()),\n versions: v.optional(v.array(v.string()), []),\n posts: v.optional(v.array(ChangelogDeploymentGroupPostSchema), []),\n});\n\nexport type ChangelogDeploymentGroupSummary = v.InferOutput<\n typeof ChangelogDeploymentGroupSummarySchema\n>;\n\nexport const ListChangelogDeploymentGroupsResultSchema = v.object({\n groups: v.optional(v.array(ChangelogDeploymentGroupSummarySchema), []),\n nextPageToken: v.string(),\n});\n\nexport type ListChangelogDeploymentGroupsResult = v.InferOutput<\n typeof ListChangelogDeploymentGroupsResultSchema\n>;\n\nconst ChangelogDeploymentGroupAttentionSchema = v.pipe(\n v.object({\n change: ChangelogChangeSchema,\n postSlug: v.string(),\n releaseVersion: v.string(),\n }),\n v.transform(({ change, ...entry }) => ({ ...change, ...entry })),\n);\n\nconst ChangelogDeploymentGroupHighlightSchema = v.object({\n postSlug: v.string(),\n releaseVersion: v.string(),\n /** Inline Markdown. */\n text: v.string(),\n});\n\n/**\n * A deployment group with `attention`, its breaking and action-required changes, and the\n * `highlights` of its release posts, both in ascending release order.\n */\nexport const ChangelogDeploymentGroupSchema = v.pipe(\n v.object({\n summary: ChangelogDeploymentGroupSummarySchema,\n attention: v.optional(v.array(ChangelogDeploymentGroupAttentionSchema), []),\n highlights: v.optional(v.array(ChangelogDeploymentGroupHighlightSchema), []),\n }),\n v.transform(({ summary, ...group }) => ({ ...summary, ...group })),\n);\n\nexport type ChangelogDeploymentGroup = v.InferOutput<typeof ChangelogDeploymentGroupSchema>;\n\nexport const GetChangelogDeploymentGroupResultSchema = v.object({\n group: ChangelogDeploymentGroupSchema,\n});\n"],"mappings":";;;;;;AAqBA,MAAM,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AACxE,MAAM,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AACnE,MAAM,yBAAyB,EAAE,KAC7B,EAAE,OAAO,GACT,EAAE,QAAQ,GACV,EAAE,SAAS,CAAC,GACZ,EAAE,SAAS,OAAO,gBAAgB,CACtC;;AAGA,MAAa,gCAAgC,EAAE,aAAa;CACxD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC;CACpF,WAAW;AACf,CAAC;AAID,MAAa,8BAA8B,EAAE,aAAa,EACtD,MAAM,gBACV,CAAC;;;;;;;AAUD,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa;CACX,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,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services/changelog/changelog.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport {\n OptionalTimestampMsSchema,\n PublicIdSchema,\n TimestampMsSchema,\n} from \"../../shared/schemas.js\";\nimport { msToTimestamp } from \"../../utils/timestamp.js\";\nimport {\n CHANGELOG_AUDIENCE_VALUES,\n CHANGELOG_CHANGE_CATEGORY_VALUES,\n CHANGELOG_SORT_VALUES,\n CHANGELOG_SURFACE_VALUES,\n ChangelogAudienceCodec,\n ChangelogChangeAvailabilityCodec,\n ChangelogChangeCategoryCodec,\n ChangelogEnvironmentCodec,\n ChangelogSortCodec,\n ChangelogSurfaceCodec,\n} from \"./changelog.codecs.js\";\n\nconst PageTokenInputSchema = v.optional(v.pipe(v.string(), v.trim()), \"\");\nconst SlugInputSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst TimestampMsInputSchema = v.pipe(\n v.number(),\n v.integer(),\n v.minValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n);\n\n/** `limit` is 0 through 100; 0 or omitted uses the server default of 20. */\nexport const ListChangelogPostsInputSchema = v.strictObject({\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(100)), 0),\n pageToken: PageTokenInputSchema,\n});\n\nexport type ListChangelogPostsInput = v.InferInput<typeof ListChangelogPostsInputSchema>;\n\nexport const GetChangelogPostInputSchema = v.strictObject({\n slug: SlugInputSchema,\n});\n\nexport type GetChangelogPostInput = v.InferInput<typeof GetChangelogPostInputSchema>;\n\n/**\n * Filters on different fields combine with AND; values within one field combine with OR.\n * Times are epoch milliseconds on first post publication time: `startTime` inclusive, `endTime`\n * exclusive and after `startTime`. `limit` is 0 through 500; 0 or omitted uses the server\n * default of 100.\n */\nexport const ListChangelogChangesInputSchema = v.pipe(\n v.strictObject({\n categories: v.optional(v.array(v.picklist(CHANGELOG_CHANGE_CATEGORY_VALUES)), []),\n actionRequired: v.optional(v.boolean()),\n surfaces: v.optional(v.array(v.picklist(CHANGELOG_SURFACE_VALUES)), []),\n audiences: v.optional(v.array(v.picklist(CHANGELOG_AUDIENCE_VALUES)), []),\n startTime: v.optional(TimestampMsInputSchema),\n endTime: v.optional(TimestampMsInputSchema),\n postSlug: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n sort: v.optional(v.picklist(CHANGELOG_SORT_VALUES)),\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(500)), 0),\n pageToken: PageTokenInputSchema,\n }),\n v.check(\n ({ startTime, endTime }) =>\n startTime === undefined || endTime === undefined || endTime > startTime,\n \"endTime: must be after startTime\",\n ),\n v.transform(({ categories, surfaces, audiences, startTime, endTime, sort, ...rest }) => ({\n ...rest,\n categories: categories.map((value) => ChangelogChangeCategoryCodec.inputToProto[value]),\n surfaces: surfaces.map((value) => ChangelogSurfaceCodec.inputToProto[value]),\n audiences: audiences.map((value) => ChangelogAudienceCodec.inputToProto[value]),\n startTime: startTime === undefined ? undefined : msToTimestamp(startTime),\n endTime: endTime === undefined ? undefined : msToTimestamp(endTime),\n sort: sort === undefined ? undefined : ChangelogSortCodec.inputToProto[sort],\n })),\n);\n\nexport type ListChangelogChangesInput = v.InferInput<typeof ListChangelogChangesInputSchema>;\n\n/** `liveAt` is set for `ahead` only: when the change became available there. */\nconst ChangelogChangeExceptionSchema = v.object({\n environment: enumLabelSchema(ChangelogEnvironmentCodec.protoToOutput),\n availability: enumLabelSchema(ChangelogChangeAvailabilityCodec.protoToOutput),\n liveAt: OptionalTimestampMsSchema,\n});\n\n/** `liveAt` is when the release went live there, `undefined` while it is pending. */\nconst ChangelogEnvironmentStatusSchema = v.object({\n environment: enumLabelSchema(ChangelogEnvironmentCodec.protoToOutput),\n liveAt: OptionalTimestampMsSchema,\n});\n\n/**\n * `id` is the public base58 identifier, stable across environments. `environmentExceptions`\n * lists every environment where the change differs from its release's status; it is empty\n * outside release posts and when the change follows its release everywhere.\n */\nexport const ChangelogChangeSchema = v.object({\n id: PublicIdSchema,\n title: v.string(),\n summary: v.string(),\n details: v.optional(v.string()),\n category: enumLabelSchema(ChangelogChangeCategoryCodec.protoToOutput),\n actionRequired: v.boolean(),\n migrationGuidance: v.optional(v.string()),\n audiences: v.optional(v.array(enumLabelSchema(ChangelogAudienceCodec.protoToOutput)), []),\n surfaces: v.optional(v.array(enumLabelSchema(ChangelogSurfaceCodec.protoToOutput)), []),\n environmentExceptions: v.optional(v.array(ChangelogChangeExceptionSchema), []),\n});\n\nexport type ChangelogChange = v.InferOutput<typeof ChangelogChangeSchema>;\n\n/** `surface` is the product area the section covers, `\"unspecified\"` when it spans several. */\nexport const ChangelogSectionSchema = v.object({\n heading: v.string(),\n summary: v.optional(v.string()),\n surface: enumLabelSchema(ChangelogSurfaceCodec.protoToOutput),\n changes: v.optional(v.array(ChangelogChangeSchema), []),\n});\n\nexport type ChangelogSection = v.InferOutput<typeof ChangelogSectionSchema>;\n\n/**\n * `coverageCutoff` is the exclusive end of the covered period, `undefined` when unknown.\n * A post can be republished to correct its copy or withdraw a change: `revision` starts at 1\n * and increases with each republication, and `updatedAt` is when the current revision was\n * published (the first publication time for revision 1). `slug` never changes.\n *\n * `publishedAt` is the first publication time for posts that announce no single release. For a\n * release post it is when the release went live in this environment, or the first publication\n * time while the release is still pending here. It can change without a new revision, so don't\n * treat it as fixed.\n * A server that predates post revisions sends `revision` 0 and no `updatedAt`.\n *\n * A release post has `releaseVersion` (for example `\"0.92.9\"`), the same slug (`\"v0.92.9\"`) and\n * content in every environment, and is listed even where the release is still pending.\n * `environments` holds the release's status in devnet, testnet and mainnet, in that order, and\n * changes without a new revision. `deploymentGroupSlug` names the deployment group that brought\n * the release here, `undefined` while it is pending here. Posts that announce no single release\n * have no `releaseVersion`, no `deploymentGroupSlug` and empty `environments`.\n */\nexport const ChangelogPostSummarySchema = v.object({\n slug: v.string(),\n title: v.string(),\n introduction: v.string(),\n publishedAt: TimestampMsSchema,\n updatedAt: OptionalTimestampMsSchema,\n revision: v.number(),\n coverageCutoff: OptionalTimestampMsSchema,\n changeCount: v.number(),\n breakingChangeCount: v.number(),\n actionRequiredCount: v.number(),\n newFeatureCount: v.number(),\n improvementCount: v.number(),\n bugFixCount: v.number(),\n releaseVersion: v.optional(v.string()),\n environments: v.optional(v.array(ChangelogEnvironmentStatusSchema), []),\n deploymentGroupSlug: v.optional(v.string()),\n});\n\nexport type ChangelogPostSummary = v.InferOutput<typeof ChangelogPostSummarySchema>;\n\nexport const ListChangelogPostsResultSchema = v.object({\n posts: v.optional(v.array(ChangelogPostSummarySchema), []),\n nextPageToken: v.string(),\n});\n\nexport type ListChangelogPostsResult = v.InferOutput<typeof ListChangelogPostsResultSchema>;\n\nexport const ChangelogPostSchema = v.pipe(\n v.object({\n summary: ChangelogPostSummarySchema,\n sections: v.optional(v.array(ChangelogSectionSchema), []),\n }),\n v.transform(({ summary, sections }) => ({ ...summary, sections })),\n);\n\nexport type ChangelogPost = v.InferOutput<typeof ChangelogPostSchema>;\n\nexport const GetChangelogPostResultSchema = v.object({ post: ChangelogPostSchema });\n\nexport const ChangelogChangeEntrySchema = v.pipe(\n v.object({\n change: ChangelogChangeSchema,\n postSlug: v.string(),\n publishedAt: TimestampMsSchema,\n sectionHeading: v.string(),\n }),\n v.transform(({ change, ...entry }) => ({ ...change, ...entry })),\n);\n\n/** A change with the slug, `publishedAt` and section heading of the post that announced it. */\nexport type ChangelogChangeEntry = v.InferOutput<typeof ChangelogChangeEntrySchema>;\n\nexport const ListChangelogChangesResultSchema = v.object({\n changes: v.optional(v.array(ChangelogChangeEntrySchema), []),\n nextPageToken: v.string(),\n});\n\nexport type ListChangelogChangesResult = v.InferOutput<typeof ListChangelogChangesResultSchema>;\n\n/** `limit` is 0 through 100; 0 or omitted uses the server default of 20. */\nexport const ListChangelogDeploymentGroupsInputSchema = v.strictObject({\n limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(100)), 0),\n pageToken: PageTokenInputSchema,\n});\n\nexport type ListChangelogDeploymentGroupsInput = v.InferInput<\n typeof ListChangelogDeploymentGroupsInputSchema\n>;\n\nexport const GetChangelogDeploymentGroupInputSchema = v.strictObject({\n slug: SlugInputSchema,\n});\n\nexport type GetChangelogDeploymentGroupInput = v.InferInput<\n typeof GetChangelogDeploymentGroupInputSchema\n>;\n\n/** A published release post a deployment group brought. */\nconst ChangelogDeploymentGroupPostSchema = v.object({\n slug: v.string(),\n releaseVersion: v.string(),\n title: v.string(),\n publishedAt: TimestampMsSchema,\n revision: v.number(),\n updatedAt: OptionalTimestampMsSchema,\n});\n\n/**\n * One deployment to this environment that raised its release version. `slug` is the environment\n * and the group's own release, for example `\"testnet-v0.92.9\"`, and never changes. `versions`\n * lists every release the group brought, ascending; `posts` holds the published release posts of\n * those releases, so a release without a post has none. `previousReleaseVersion` is `undefined`\n * for the first group, and `releaseTag` when unknown.\n */\nexport const ChangelogDeploymentGroupSummarySchema = v.object({\n slug: v.string(),\n environment: enumLabelSchema(ChangelogEnvironmentCodec.protoToOutput),\n occurredAt: TimestampMsSchema,\n releaseVersion: v.string(),\n releaseTag: v.optional(v.string()),\n previousReleaseVersion: v.optional(v.string()),\n versions: v.optional(v.array(v.string()), []),\n posts: v.optional(v.array(ChangelogDeploymentGroupPostSchema), []),\n});\n\nexport type ChangelogDeploymentGroupSummary = v.InferOutput<\n typeof ChangelogDeploymentGroupSummarySchema\n>;\n\nexport const ListChangelogDeploymentGroupsResultSchema = v.object({\n groups: v.optional(v.array(ChangelogDeploymentGroupSummarySchema), []),\n nextPageToken: v.string(),\n});\n\nexport type ListChangelogDeploymentGroupsResult = v.InferOutput<\n typeof ListChangelogDeploymentGroupsResultSchema\n>;\n\nconst ChangelogDeploymentGroupAttentionSchema = v.pipe(\n v.object({\n change: ChangelogChangeSchema,\n postSlug: v.string(),\n releaseVersion: v.string(),\n }),\n v.transform(({ change, ...entry }) => ({ ...change, ...entry })),\n);\n\nconst ChangelogDeploymentGroupHighlightSchema = v.object({\n postSlug: v.string(),\n releaseVersion: v.string(),\n /** Inline Markdown. */\n text: v.string(),\n});\n\n/**\n * A deployment group with `attention`, its breaking and action-required changes, and the\n * `highlights` of its release posts, both in ascending release order.\n */\nexport const ChangelogDeploymentGroupSchema = v.pipe(\n v.object({\n summary: ChangelogDeploymentGroupSummarySchema,\n attention: v.optional(v.array(ChangelogDeploymentGroupAttentionSchema), []),\n highlights: v.optional(v.array(ChangelogDeploymentGroupHighlightSchema), []),\n }),\n v.transform(({ summary, ...group }) => ({ ...summary, ...group })),\n);\n\nexport type ChangelogDeploymentGroup = v.InferOutput<typeof ChangelogDeploymentGroupSchema>;\n\nexport const GetChangelogDeploymentGroupResultSchema = v.object({\n group: ChangelogDeploymentGroupSchema,\n});\n"],"mappings":";;;;;;AAqBA,MAAM,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AACxE,MAAM,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AACnE,MAAM,yBAAyB,EAAE,KAC7B,EAAE,OAAO,GACT,EAAE,QAAQ,GACV,EAAE,SAAS,CAAC,GACZ,EAAE,SAAS,OAAO,gBAAgB,CACtC;;AAGA,MAAa,gCAAgC,EAAE,aAAa;CACxD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC;CACpF,WAAW;AACf,CAAC;AAID,MAAa,8BAA8B,EAAE,aAAa,EACtD,MAAM,gBACV,CAAC;;;;;;;AAUD,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa;CACX,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,gCAAgC,CAAC,GAAG,CAAC,CAAC;CAChF,gBAAgB,EAAE,SAAS,EAAE,QAAQ,CAAC;CACtC,UAAU,EAAE,SAAS,EAA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;CACpE,YAAY;CACZ,gBAAgB,EAAE,OAAO;CACzB,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC;CACjC,wBAAwB,EAAE,SAAS,EAAE,OAAO,CAAC;CAC7C,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,GAAG,CAAC,CAAC;AACrE,CAAC;AAMD,MAAa,4CAA4C,EAAE,OAAO;CAC9D,QAAQ,EAAE,SAAS,EAAE,MAAM,qCAAqC,GAAG,CAAC,CAAC;CACrE,eAAe,EAAE,OAAO;AAC5B,CAAC;AAMD,MAAM,0CAA0C,EAAE,KAC9C,EAAE,OAAO;CACL,QAAQ;CACR,UAAU,EAAE,OAAO;CACnB,gBAAgB,EAAE,OAAO;AAC7B,CAAC,GACD,EAAE,WAAW,EAAE,QAAQ,GAAG,aAAa;CAAE,GAAG;CAAQ,GAAG;AAAM,EAAE,CACnE;AAEA,MAAM,0CAA0C,EAAE,OAAO;CACrD,UAAU,EAAE,OAAO;CACnB,gBAAgB,EAAE,OAAO;;CAEzB,MAAM,EAAE,OAAO;AACnB,CAAC;;;;;AAMD,MAAa,iCAAiC,EAAE,KAC5C,EAAE,OAAO;CACL,SAAS;CACT,WAAW,EAAE,SAAS,EAAE,MAAM,uCAAuC,GAAG,CAAC,CAAC;CAC1E,YAAY,EAAE,SAAS,EAAE,MAAM,uCAAuC,GAAG,CAAC,CAAC;AAC/E,CAAC,GACD,EAAE,WAAW,EAAE,SAAS,GAAG,aAAa;CAAE,GAAG;CAAS,GAAG;AAAM,EAAE,CACrE;AAIA,MAAa,0CAA0C,EAAE,OAAO,EAC5D,OAAO,+BACX,CAAC"}
@@ -1,6 +1,6 @@
1
+ import { CheckpointService } from "../../gen/checkpoints/v1/checkpoints_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
- import { CheckpointService } from "../../gen/checkpoints/v1/checkpoints_pb.js";
4
4
  import { ListCheckpointsInputSchema, ListCheckpointsResultSchema } from "./checkpoints.schemas.js";
5
5
  import { createClient } from "@connectrpc/connect";
6
6
  //#region src/services/checkpoints/checkpoints.ts
@@ -427,7 +427,7 @@ declare const CheckpointSchema: v.ObjectSchema<{
427
427
  readonly seasonResultUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
428
428
  readonly subaccounts: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
429
429
  /** Values computed from partial evidence; show them with an approximation marker. */
430
- readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "tools" | "deposits" | "withdrawals" | "volume" | "top_pairs" | "order_types" | "time_in_force" | "order_status" | "median_limit_rest" | "internal_transfers" | "daily_claim_amounts" | "portfolio_value" | "trading_balances" | "funding_balances" | "transfers" | "season_result">]>, undefined>, readonly []>;
430
+ readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "transfers" | "deposits" | "withdrawals" | "volume" | "tools" | "top_pairs" | "order_types" | "time_in_force" | "order_status" | "median_limit_rest" | "internal_transfers" | "daily_claim_amounts" | "portfolio_value" | "trading_balances" | "funding_balances" | "season_result">]>, undefined>, readonly []>;
431
431
  }, undefined>;
432
432
  /**
433
433
  * One frozen season recap of a root account and all of its subaccounts. An absent USD value
@@ -1,6 +1,6 @@
1
+ import { ClaimsService as ClaimsService$1 } from "../../gen/claims/v1/claims_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
- import { ClaimsService as ClaimsService$1 } from "../../gen/claims/v1/claims_pb.js";
4
4
  import { ClaimDailyRewardInputSchema, ClaimDailyRewardResultSchema, DailyClaimStatusSchema } from "./claims.schemas.js";
5
5
  import { createClient } from "@connectrpc/connect";
6
6
  //#region src/services/claims/claims.ts
@@ -1,8 +1,8 @@
1
+ import { ErrorCode } from "../../gen/claims/v1/claims_pb.js";
1
2
  import { OptionalPublicIdSchema, OptionalTimestampMsSchema, U128Schema, optionalSubaccountIdInputSchema } from "../../shared/schemas.js";
2
3
  import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
3
4
  import { fromU128 } from "../../utils/u128.js";
4
5
  import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
5
- import { ErrorCode } from "../../gen/claims/v1/claims_pb.js";
6
6
  import { ClaimPolicyCodec, DailyClaimStateCodec } from "./claims.codecs.js";
7
7
  import * as v from "valibot";
8
8
  //#region src/services/claims/claims.schemas.ts
@@ -1,6 +1,6 @@
1
+ import { ConnectedAppService } from "../../gen/auth/v1/connected_apps_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
- import { ConnectedAppService } from "../../gen/auth/v1/connected_apps_pb.js";
4
4
  import { AppAuthorizationInputSchema, AppAuthorizationRedirectSchema, AppAuthorizationSchema, ConnectedAppsSchema, RevokeConnectedAppInputSchema } from "./connected-apps.schemas.js";
5
5
  import { createClient } from "@connectrpc/connect";
6
6
  //#region src/services/connected-apps/connected-apps.ts
@@ -1,8 +1,8 @@
1
+ import { DepositAddressService } from "../../gen/chain/deposit/v1/deposit_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  import { resolveAccountScopedInput } from "../subaccount-resolver.js";
5
- import { DepositAddressService } from "../../gen/chain/deposit/v1/deposit_pb.js";
6
6
  import { CreateDepositAddressInputSchema, DepositAddressSchema, DepositAddressesSchema, ListDepositAddressesInputSchema } from "./deposit.schemas.js";
7
7
  import { createClient } from "@connectrpc/connect";
8
8
  //#region src/services/deposit/deposit.ts
@@ -1,8 +1,8 @@
1
+ import { DustConversionService as DustConversionService$1 } from "../../gen/transfer/v1/dust_conversion_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  import { resolveAccountScopedInput } from "../subaccount-resolver.js";
5
- import { DustConversionService as DustConversionService$1 } from "../../gen/transfer/v1/dust_conversion_pb.js";
6
6
  import { CreateDustConversionInputSchema, DustConversionQuoteSchema, DustConversionSchema, GetDustConversionInputSchema, ListDustBalancesInputSchema, ListDustBalancesResultSchema, ListDustConversionsInputSchema, ListDustConversionsResultSchema, QuoteDustConversionInputSchema } from "./dust-conversion.schemas.js";
7
7
  import { createClient } from "@connectrpc/connect";
8
8
  //#region src/services/dust-conversion/dust-conversion.ts
@@ -147,7 +147,7 @@ type DustAssetPrice = v.InferOutput<typeof DustAssetPriceSchema>;
147
147
  declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
148
148
  readonly conversionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
149
149
  readonly quoteId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
150
- readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "completed" | "refused">]>;
150
+ readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "refused" | "completed">]>;
151
151
  readonly refusalCode: v.NumberSchema<undefined>;
152
152
  readonly targetAssetId: v.NumberSchema<undefined>;
153
153
  readonly sources: v.ArraySchema<v.ObjectSchema<{
@@ -187,7 +187,7 @@ declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
187
187
  }, undefined>, v.TransformAction<{
188
188
  conversionId: string;
189
189
  quoteId: string;
190
- state: "unspecified" | "processing" | "completed" | "refused";
190
+ state: "unspecified" | "processing" | "refused" | "completed";
191
191
  refusalCode: number;
192
192
  targetAssetId: number;
193
193
  sources: {
@@ -216,7 +216,7 @@ declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
216
216
  conversionId: string;
217
217
  /** The quote the conversion converted. */
218
218
  quoteId: string;
219
- state: "unspecified" | "processing" | "completed" | "refused";
219
+ state: "unspecified" | "processing" | "refused" | "completed";
220
220
  /** Why a `refused` conversion was refused; null otherwise. */
221
221
  refusalCode: "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "CONFLICT" | "INVALID_REQUEST" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "FAILED_PRECONDITION" | "SUBACCOUNT_NOT_FOUND" | "INSUFFICIENT_FUNDS" | "INVALID_SUBACCOUNT_ID" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "NOT_FOUND" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | null;
222
222
  targetAssetId: number;
@@ -463,7 +463,7 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
463
463
  readonly conversions: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
464
464
  readonly conversionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
465
465
  readonly quoteId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
466
- readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "completed" | "refused">]>;
466
+ readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "refused" | "completed">]>;
467
467
  readonly refusalCode: v.NumberSchema<undefined>;
468
468
  readonly targetAssetId: v.NumberSchema<undefined>;
469
469
  readonly sources: v.ArraySchema<v.ObjectSchema<{
@@ -503,7 +503,7 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
503
503
  }, undefined>, v.TransformAction<{
504
504
  conversionId: string;
505
505
  quoteId: string;
506
- state: "unspecified" | "processing" | "completed" | "refused";
506
+ state: "unspecified" | "processing" | "refused" | "completed";
507
507
  refusalCode: number;
508
508
  targetAssetId: number;
509
509
  sources: {
@@ -532,7 +532,7 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
532
532
  conversionId: string;
533
533
  /** The quote the conversion converted. */
534
534
  quoteId: string;
535
- state: "unspecified" | "processing" | "completed" | "refused";
535
+ state: "unspecified" | "processing" | "refused" | "completed";
536
536
  /** Why a `refused` conversion was refused; null otherwise. */
537
537
  refusalCode: "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "CONFLICT" | "INVALID_REQUEST" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "FAILED_PRECONDITION" | "SUBACCOUNT_NOT_FOUND" | "INSUFFICIENT_FUNDS" | "INVALID_SUBACCOUNT_ID" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "NOT_FOUND" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | null;
538
538
  targetAssetId: number;
@@ -1,3 +1,4 @@
1
+ import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
1
2
  import { codeName } from "../../shared/error-detail.js";
2
3
  import { OptionalTimestampMsSchema, U128Schema } from "../../shared/schemas.js";
3
4
  import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
@@ -5,7 +6,6 @@ import { fromU128 } from "../../utils/u128.js";
5
6
  import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
6
7
  import { PositiveUint32InputSchema } from "../shared.js";
7
8
  import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
8
- import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
9
9
  import { DustAssetEligibilityCodec, DustConversionStateCodec } from "./dust-conversion.codecs.js";
10
10
  import * as v from "valibot";
11
11
  //#region src/services/dust-conversion/dust-conversion.schemas.ts
@@ -1,8 +1,8 @@
1
+ import { FeeService } from "../../gen/fees/v1/fees_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  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";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  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
+ import { HeatmapLiveBucketSchema, HeatmapService as HeatmapService$1, HeatmapTimeRangeSchema } from "../../gen/marketdata/v1/heatmap_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
4
  import { SymbolIdInputSchema } from "../shared.js";
4
5
  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
8
  import { create } from "@bufbuild/protobuf";
@@ -15,7 +15,7 @@ type TimestampInit = {
15
15
  declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
16
16
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
17
17
  readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
18
- readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 200 | 100 | 1000 | 500 | 50, DepthTier>]>;
18
+ readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50, DepthTier>]>;
19
19
  readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
20
20
  readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
21
21
  readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
@@ -228,7 +228,7 @@ type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
228
228
  declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
229
229
  readonly symbolId: v.NumberSchema<undefined>;
230
230
  readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
231
- readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 5 | 10 | 20 | 200 | 100 | 1000 | 500 | 50 | 5000>]>;
231
+ readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50 | 5000>]>;
232
232
  readonly chain: v.OptionalSchema<v.ObjectSchema<{
233
233
  readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
234
234
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
@@ -288,7 +288,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
288
288
  }, undefined>, v.TransformAction<{
289
289
  symbolId: number;
290
290
  interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
291
- depth: 1 | "unspecified" | 5 | 10 | 20 | 200 | 100 | 1000 | 500 | 50 | 5000;
291
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50 | 5000;
292
292
  chain?: {
293
293
  baseKeyframe?: {
294
294
  tsSec: number;
@@ -348,7 +348,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
348
348
  }, {
349
349
  symbolId: number;
350
350
  interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
351
- depth: 1 | "unspecified" | 5 | 10 | 20 | 200 | 100 | 1000 | 500 | 50 | 5000;
351
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50 | 5000;
352
352
  chain: {
353
353
  baseKeyframe: {
354
354
  tsSec: number;
@@ -21,9 +21,10 @@ declare class InternalTransfersService {
21
21
  * step-up is used, the legs that caused it carry their `errorCode` and the rest are
22
22
  * `"not_moved"`. `"accepted"` means every leg is credited. A batch whose outcome is not known
23
23
  * within the request is `"processing"` and completes on its own: read it with `getBatch` by
24
- * its `requestId`, or retry with the same key and legs. Recent MFA covers the root owner
25
- * moving funds between its own accounts or to allowlisted destinations; any other leg needs
26
- * one fresh step-up for the whole batch.
24
+ * its `requestId`, or retry with the same key and legs. An MFA-elevated session (an MFA
25
+ * challenge completed in the last 30 minutes) covers the root owner moving funds between its
26
+ * own accounts or to allowlisted destinations; any other leg needs one fresh step-up for the
27
+ * whole batch.
27
28
  */
28
29
  batchCreate(input: BatchCreateInternalTransfersInput, options?: PolyesterMutationOptions): Promise<BatchCreateInternalTransfersResult>;
29
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"internal-transfers.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"mappings":";;;;;;;;;cAoCa;;EASL,YAAA,YAAY,mBACZ,UAAU,gCACV,QAAQ;;;;EAaN,OACF,OAAO,6BACP,UAAU,2BACX,QAAQ;;;;;;;;;;;;EAsBL,YACF,OAAO,mCACP,UAAU,2BACX,QAAQ;;;;;;;EAsBL,SACF,OAAO,+BACP,UAAU,0BACX,QAAQ;;;;;;;;;EAiBL,IACF,OAAO,0BACP,UAAU,0BACX,QAAQ"}
1
+ {"version":3,"file":"internal-transfers.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"mappings":";;;;;;;;;cAoCa;;EASL,YAAA,YAAY,mBACZ,UAAU,gCACV,QAAQ;;;;EAaN,OACF,OAAO,6BACP,UAAU,2BACX,QAAQ;;;;;;;;;;;;;EAuBL,YACF,OAAO,mCACP,UAAU,2BACX,QAAQ;;;;;;;EAsBL,SACF,OAAO,+BACP,UAAU,0BACX,QAAQ;;;;;;;;;EAiBL,IACF,OAAO,0BACP,UAAU,0BACX,QAAQ"}
@@ -1,8 +1,8 @@
1
+ import { InternalTransferService } from "../../gen/transfer/v1/internal_transfer_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  import { resolveAccountScope, resolveAccountScopedInput } from "../subaccount-resolver.js";
5
- import { InternalTransferService } from "../../gen/transfer/v1/internal_transfer_pb.js";
6
6
  import { BatchCreateInternalTransfersResultSchema, GetInternalTransferBatchInputSchema, 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
@@ -41,9 +41,10 @@ var InternalTransfersService = class {
41
41
  * step-up is used, the legs that caused it carry their `errorCode` and the rest are
42
42
  * `"not_moved"`. `"accepted"` means every leg is credited. A batch whose outcome is not known
43
43
  * within the request is `"processing"` and completes on its own: read it with `getBatch` by
44
- * its `requestId`, or retry with the same key and legs. Recent MFA covers the root owner
45
- * moving funds between its own accounts or to allowlisted destinations; any other leg needs
46
- * one fresh step-up for the whole batch.
44
+ * its `requestId`, or retry with the same key and legs. An MFA-elevated session (an MFA
45
+ * challenge completed in the last 30 minutes) covers the root owner moving funds between its
46
+ * own accounts or to allowlisted destinations; any other leg needs one fresh step-up for the
47
+ * whole batch.
47
48
  */
48
49
  async batchCreate(input, options) {
49
50
  await this.#scales.ready();
@@ -1 +1 @@
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 GetInternalTransferBatchInputSchema,\n GetInternalTransferInputSchema,\n GetInternalTransferResultSchema,\n type GetInternalTransferBatchInput,\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 * Moves up to 500 transfers together under one idempotency key and one MFA check: every leg\n * is credited, or nothing moves. Every leg passes the same checks as `create` first; if one\n * fails, or a source cannot cover its legs, the batch is `\"refused\"`: nothing moves, no\n * step-up is used, the legs that caused it carry their `errorCode` and the rest are\n * `\"not_moved\"`. `\"accepted\"` means every leg is credited. A batch whose outcome is not known\n * within the request is `\"processing\"` and completes on its own: read it with `getBatch` by\n * its `requestId`, or retry with the same key and legs. Recent MFA covers the root owner\n * moving funds between its own accounts or to allowlisted destinations; any other leg needs\n * 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 a batch's current status and every leg's state by the `requestId` `batchCreate`\n * returned, for example to follow a `\"processing\"` batch. The caller must be allowed to read\n * the transfers of every source account of the batch; any other batch is a\n * `ResourceNotFoundError`. Does not submit or retry the batch and needs no step-up.\n */\n async getBatch(\n input: GetInternalTransferBatchInput,\n options?: PolyesterRequestOptions,\n ): Promise<BatchCreateInternalTransfersResult> {\n const request = parse(GetInternalTransferBatchInputSchema, input);\n const res = await this.#client.getInternalTransferBatch(\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":";;;;;;;;;;;AAoCA,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;;;;;;;CAQA,MAAM,SACF,OACA,SAC2C;EAC3C,MAAM,UAAU,MAAM,qCAAqC,KAAK;EAChE,MAAM,MAAM,MAAM,KAAKA,QAAQ,yBAC3B,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"}
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 GetInternalTransferBatchInputSchema,\n GetInternalTransferInputSchema,\n GetInternalTransferResultSchema,\n type GetInternalTransferBatchInput,\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 * Moves up to 500 transfers together under one idempotency key and one MFA check: every leg\n * is credited, or nothing moves. Every leg passes the same checks as `create` first; if one\n * fails, or a source cannot cover its legs, the batch is `\"refused\"`: nothing moves, no\n * step-up is used, the legs that caused it carry their `errorCode` and the rest are\n * `\"not_moved\"`. `\"accepted\"` means every leg is credited. A batch whose outcome is not known\n * within the request is `\"processing\"` and completes on its own: read it with `getBatch` by\n * its `requestId`, or retry with the same key and legs. An MFA-elevated session (an MFA\n * challenge completed in the last 30 minutes) covers the root owner moving funds between its\n * own accounts or to allowlisted destinations; any other leg needs one fresh step-up for the\n * 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 a batch's current status and every leg's state by the `requestId` `batchCreate`\n * returned, for example to follow a `\"processing\"` batch. The caller must be allowed to read\n * the transfers of every source account of the batch; any other batch is a\n * `ResourceNotFoundError`. Does not submit or retry the batch and needs no step-up.\n */\n async getBatch(\n input: GetInternalTransferBatchInput,\n options?: PolyesterRequestOptions,\n ): Promise<BatchCreateInternalTransfersResult> {\n const request = parse(GetInternalTransferBatchInputSchema, input);\n const res = await this.#client.getInternalTransferBatch(\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":";;;;;;;;;;;AAoCA,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;;;;;;;;;;;;;CAcA,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;;;;;;;CAQA,MAAM,SACF,OACA,SAC2C;EAC3C,MAAM,UAAU,MAAM,qCAAqC,KAAK;EAChE,MAAM,MAAM,MAAM,KAAKA,QAAQ,yBAC3B,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"}
@@ -370,7 +370,7 @@ declare const BatchCreateInternalTransfersResultSchema: v.ObjectSchema<{
370
370
  * it was accepted for processing.
371
371
  */
372
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 status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "refused" | "accepted">]>;
373
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "accepted" | "refused">]>;
374
374
  /** One result per leg, in request order. */
375
375
  readonly legs: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
376
376
  readonly legIndex: v.NumberSchema<undefined>;
@@ -1,7 +1,7 @@
1
+ import { FlowDetailViewSchema, FlowSummaryViewSchema, GetFlowByIdRequestSchema, LifecycleReadService } from "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
4
  import { resolveAccountScopedInput } from "../subaccount-resolver.js";
4
- import { FlowDetailViewSchema, FlowSummaryViewSchema, GetFlowByIdRequestSchema, LifecycleReadService } from "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
5
5
  import { isDev } from "../../utils/is-dev.js";
6
6
  import { GetLifecycleAccountFlowInputSchema, GetLifecycleFlowInputSchema, GetLifecycleFlowOutputSchema, LifecycleFlowDetailSchema, LifecycleFlowSummarySchema, ListLifecycleAccountFlowsInputSchema, ListLifecycleFlowsByTxInputSchema, ListLifecycleFlowsByTxOutputSchema, ListLifecycleFlowsInputSchema, ListLifecycleFlowsOutputSchema } from "./lifecycle.schemas.js";
7
7
  import { create } from "@bufbuild/protobuf";