@polyester/sdk 0.36.0-devnet-20261112144059 → 0.36.0-devnet-20261113022813
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 +23 -1
- package/dist/gen/ai/v1/assistant_pb.d.ts +211 -9
- package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -1
- package/dist/gen/ai/v1/assistant_pb.js +163 -73
- package/dist/gen/ai/v1/assistant_pb.js.map +1 -1
- package/dist/gen/auth/v1/api_keys_pb.d.ts +62 -5
- package/dist/gen/auth/v1/api_keys_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/api_keys_pb.js +50 -2
- package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +10 -2
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts.map +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +10 -5
- package/dist/gen/chain/lifecycle/v1/types_pb.d.ts.map +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.js +10 -5
- package/dist/gen/chain/lifecycle/v1/types_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +6 -1
- 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/zipper/v1/reason_pb.d.ts +6 -2
- package/dist/gen/chain/zipper/v1/reason_pb.d.ts.map +1 -1
- package/dist/gen/chain/zipper/v1/reason_pb.js.map +1 -1
- package/dist/gen/changelog/v1/changelog_pb.d.ts +482 -2
- package/dist/gen/changelog/v1/changelog_pb.d.ts.map +1 -1
- package/dist/gen/changelog/v1/changelog_pb.js +157 -14
- package/dist/gen/changelog/v1/changelog_pb.js.map +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +3 -3
- package/dist/gen/ledger/read/v1/ledger_read_pb.js +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
- package/dist/gen/ledger/v1/catalog_pb.d.ts +11 -4
- package/dist/gen/ledger/v1/catalog_pb.d.ts.map +1 -1
- package/dist/gen/ledger/v1/catalog_pb.js +11 -4
- package/dist/gen/ledger/v1/catalog_pb.js.map +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +3 -2
- package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts.map +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.js.map +1 -1
- package/dist/gen/notifications/v1/notifications_pb.d.ts +154 -3
- package/dist/gen/notifications/v1/notifications_pb.d.ts.map +1 -1
- package/dist/gen/notifications/v1/notifications_pb.js +102 -15
- package/dist/gen/notifications/v1/notifications_pb.js.map +1 -1
- package/dist/gen/orderbook/v1/orderbook_pb.d.ts +18 -10
- package/dist/gen/orderbook/v1/orderbook_pb.d.ts.map +1 -1
- package/dist/gen/orderbook/v1/orderbook_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +12 -1
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +12 -1
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +6 -1
- 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/triggers/v1/triggers_pb.d.ts +6 -0
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/services/api-keys/api-keys.codecs.d.ts +14 -0
- package/dist/services/api-keys/api-keys.codecs.d.ts.map +1 -0
- package/dist/services/api-keys/api-keys.codecs.js +13 -1
- package/dist/services/api-keys/api-keys.codecs.js.map +1 -1
- package/dist/services/api-keys/api-keys.d.ts +2 -2
- package/dist/services/api-keys/api-keys.js +2 -2
- package/dist/services/api-keys/api-keys.js.map +1 -1
- package/dist/services/api-keys/api-keys.schemas.d.ts +46 -12
- package/dist/services/api-keys/api-keys.schemas.d.ts.map +1 -1
- package/dist/services/api-keys/api-keys.schemas.js +10 -4
- package/dist/services/api-keys/api-keys.schemas.js.map +1 -1
- package/dist/services/api-keys/api-keys.types.d.ts +2 -1
- package/dist/services/assistant/assistant-events.schemas.d.ts +88 -57
- package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -1
- package/dist/services/assistant/assistant-events.schemas.js +20 -2
- package/dist/services/assistant/assistant-events.schemas.js.map +1 -1
- package/dist/services/assistant/assistant.codecs.d.ts +11 -2
- package/dist/services/assistant/assistant.codecs.d.ts.map +1 -1
- package/dist/services/assistant/assistant.codecs.js +42 -2
- package/dist/services/assistant/assistant.codecs.js.map +1 -1
- package/dist/services/assistant/assistant.d.ts +3 -3
- package/dist/services/assistant/assistant.js +3 -3
- package/dist/services/assistant/assistant.js.map +1 -1
- package/dist/services/assistant/assistant.schemas.d.ts +22 -4
- package/dist/services/assistant/assistant.schemas.d.ts.map +1 -1
- package/dist/services/assistant/assistant.schemas.js +27 -4
- package/dist/services/assistant/assistant.schemas.js.map +1 -1
- package/dist/services/assistant/assistant.types.d.ts +2 -2
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +13 -13
- package/dist/services/changelog/changelog.codecs.d.ts +10 -1
- package/dist/services/changelog/changelog.codecs.d.ts.map +1 -1
- package/dist/services/changelog/changelog.codecs.js +13 -1
- package/dist/services/changelog/changelog.codecs.js.map +1 -1
- package/dist/services/changelog/changelog.d.ts +14 -1
- package/dist/services/changelog/changelog.d.ts.map +1 -1
- package/dist/services/changelog/changelog.js +22 -1
- package/dist/services/changelog/changelog.js.map +1 -1
- package/dist/services/changelog/changelog.schemas.d.ts +445 -19
- package/dist/services/changelog/changelog.schemas.d.ts.map +1 -1
- package/dist/services/changelog/changelog.schemas.js +94 -5
- package/dist/services/changelog/changelog.schemas.js.map +1 -1
- package/dist/services/changelog/changelog.types.d.ts +3 -3
- package/dist/services/claims/claims.schemas.d.ts +2 -2
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +3 -3
- package/dist/services/lifecycle/lifecycle.codecs.d.ts +8 -1
- package/dist/services/lifecycle/lifecycle.codecs.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.codecs.js +62 -1
- package/dist/services/lifecycle/lifecycle.codecs.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +89 -88
- package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.js +2 -2
- package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.types.d.ts +2 -2
- package/dist/services/market-overview/market-overview.d.ts +1 -1
- package/dist/services/market-overview/market-overview.js +1 -1
- package/dist/services/market-overview/market-overview.js.map +1 -1
- package/dist/services/notifications/notifications.codecs.d.ts +8 -2
- package/dist/services/notifications/notifications.codecs.d.ts.map +1 -1
- package/dist/services/notifications/notifications.codecs.js +14 -2
- package/dist/services/notifications/notifications.codecs.js.map +1 -1
- package/dist/services/notifications/notifications.schemas.d.ts +100 -3
- package/dist/services/notifications/notifications.schemas.d.ts.map +1 -1
- package/dist/services/notifications/notifications.schemas.js +25 -1
- package/dist/services/notifications/notifications.schemas.js.map +1 -1
- package/dist/services/notifications/notifications.types.d.ts +2 -2
- package/dist/services/orderbook/orderbook.d.ts +2 -2
- package/dist/services/orderbook/orderbook.js +17 -12
- package/dist/services/orderbook/orderbook.js.map +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +27 -27
- package/dist/services/orders/orders-input.schemas.d.ts +4 -4
- package/dist/services/orders/orders-output.schemas.d.ts +14 -14
- package/dist/services/price-alerts/price-alerts.codecs.d.ts +1 -1
- package/dist/services/price-alerts/price-alerts.codecs.js +3 -3
- package/dist/services/price-alerts/price-alerts.codecs.js.map +1 -1
- package/dist/services/price-alerts/price-alerts.d.ts +2 -2
- package/dist/services/price-alerts/price-alerts.js +2 -2
- package/dist/services/price-alerts/price-alerts.js.map +1 -1
- package/dist/services/price-alerts/price-alerts.schemas.d.ts +11 -11
- package/dist/services/rewards/rewards.schemas.d.ts +4 -4
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +11 -11
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
- package/dist/services/triggers/triggers-output.schemas.d.ts +33 -33
- package/dist/services/triggers/triggers.d.ts +1 -1
- package/dist/services/triggers/triggers.js +1 -1
- package/dist/services/triggers/triggers.js.map +1 -1
- package/dist/shared/ledger-codes.d.ts +5 -3
- package/dist/shared/ledger-codes.d.ts.map +1 -1
- package/dist/shared/ledger-codes.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.schemas.d.ts","names":[],"sources":["../../../src/services/lifecycle/lifecycle.schemas.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"lifecycle.schemas.d.ts","names":[],"sources":["../../../src/services/lifecycle/lifecycle.schemas.ts"],"mappings":";;;;;cA+IM,yBAAuB,EAAA;;;;cAavB,8BAA4B,EAAA,yBAAA,EAAA,yBAAA,EAAA;cAiC5B,6BAA2B,EAAA;;;;;cAMpB,+BAA6B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwE7B,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAjID;;cA+IxB,6BAA2B,EAAA,yBAAA,EAAA;;;;;;;cAS3B,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le/v1/types_pb.js";
|
|
7
7
|
import "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
|
|
8
|
-
import { LIFECYCLE_FLOW_KIND_VALUES, LIFECYCLE_FLOW_PARTICIPATION_VALUES, LIFECYCLE_FLOW_STATE_VALUES, LIFECYCLE_LIST_ORDER_BY_VALUES, LIFECYCLE_LIST_SCOPE_VALUES, LIFECYCLE_SORT_VALUES, LIFECYCLE_TX_LOOKUP_KIND_VALUES, LifecycleFlowDomainCodec, LifecycleFlowKindCodec, LifecycleFlowParticipationCodec, LifecycleFlowStateCodec, LifecycleFlowStepActivityKindCodec, LifecycleFlowStepCodec, LifecycleFlowTimelineStatusCodec, LifecycleListOrderByCodec, LifecycleListScopeCodec, LifecycleRequestFeeStatusCodec, LifecycleSortCodec, LifecycleSourceCodec, LifecycleTxLookupKindCodec, lifecycleReasonFromCode } from "./lifecycle.codecs.js";
|
|
8
|
+
import { LIFECYCLE_FLOW_KIND_VALUES, LIFECYCLE_FLOW_PARTICIPATION_VALUES, LIFECYCLE_FLOW_STATE_VALUES, LIFECYCLE_LIST_ORDER_BY_VALUES, LIFECYCLE_LIST_SCOPE_VALUES, LIFECYCLE_SORT_VALUES, LIFECYCLE_TX_LOOKUP_KIND_VALUES, LifecycleFlowDomainCodec, LifecycleFlowKindCodec, LifecycleFlowParticipationCodec, LifecycleFlowStateCodec, LifecycleFlowStepActivityKindCodec, LifecycleFlowStepCodec, LifecycleFlowTimelineStatusCodec, LifecycleListOrderByCodec, LifecycleListScopeCodec, LifecycleRequestFeeStatusCodec, LifecycleSortCodec, LifecycleSourceCodec, LifecycleTxLookupKindCodec, lifecycleReasonFromCode, zipperReasonFromCode } from "./lifecycle.codecs.js";
|
|
9
9
|
import * as v from "valibot";
|
|
10
10
|
//#region src/services/lifecycle/lifecycle.schemas.ts
|
|
11
11
|
const FlowKindSchema = v.picklist(LIFECYCLE_FLOW_KIND_VALUES);
|
|
@@ -106,7 +106,7 @@ const LifecycleMsSchema = v.pipe(v.bigint(), v.transform((v) => Number(v)));
|
|
|
106
106
|
const LifecycleTxOccurrenceIndexSchema = v.pipe(v.optional(v.bigint()), v.transform((v) => Number(v ?? 0n)));
|
|
107
107
|
const LifecycleLedgerTransferIdSchema = v.optional(v.string(), "");
|
|
108
108
|
const LifecycleZipperReasonSchema = v.object({
|
|
109
|
-
code: v.pipe(v.number(), v.integer(), v.minValue(0)),
|
|
109
|
+
code: v.pipe(v.number(), v.integer(), v.minValue(0), v.transform(zipperReasonFromCode)),
|
|
110
110
|
reasonId: v.string(),
|
|
111
111
|
message: v.string()
|
|
112
112
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.schemas.js","names":[],"sources":["../../../src/services/lifecycle/lifecycle.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport * as Proto from \"../../gen/chain/lifecycle/v1/types_pb.js\";\nimport { FlowParticipation } from \"../../gen/chain/lifecycle/v1/lifecycle_read_pb.js\";\nimport {\n LIFECYCLE_FLOW_KIND_VALUES,\n LIFECYCLE_FLOW_PARTICIPATION_VALUES,\n LIFECYCLE_FLOW_STATE_VALUES,\n LIFECYCLE_LIST_SCOPE_VALUES,\n LIFECYCLE_LIST_ORDER_BY_VALUES,\n LIFECYCLE_SORT_VALUES,\n LIFECYCLE_TX_LOOKUP_KIND_VALUES,\n LifecycleFlowDomainCodec,\n LifecycleFlowKindCodec,\n LifecycleFlowParticipationCodec,\n lifecycleReasonFromCode,\n LifecycleFlowStateCodec,\n LifecycleFlowStepActivityKindCodec,\n LifecycleFlowStepCodec,\n LifecycleFlowTimelineStatusCodec,\n LifecycleListOrderByCodec,\n LifecycleListScopeCodec,\n LifecycleRequestFeeStatusCodec,\n LifecycleSortCodec,\n LifecycleSourceCodec,\n LifecycleTxLookupKindCodec,\n type LifecycleFlowParticipationValue,\n type LifecycleReasonValue,\n type LifecycleListOrderByValue,\n type LifecycleListScopeValue,\n type LifecycleRequestFeeStatusValue,\n type LifecycleSortValue,\n type LifecycleTxLookupKindValue,\n} from \"./lifecycle.codecs.js\";\nimport { idToBigInt } from \"../../utils/base58-id.js\";\nimport { fromU128 } from \"../../utils/u128.js\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport { PublicIdSchema } from \"../../shared/schemas.js\";\nimport { E18_SCALE, scaledToDecimalOutput } from \"../../shared/decimal-surface.js\";\n\nconst FlowKindSchema = v.picklist(LIFECYCLE_FLOW_KIND_VALUES);\nconst FlowStateSchema = v.picklist(LIFECYCLE_FLOW_STATE_VALUES);\n\nconst canonicalTxHashPattern = /^0x[0-9a-fA-F]{64}$/;\nconst chainTxHexPattern = /^[0-9a-fA-F]{64}$/;\nconst chainNativeTxIdPattern = /^[A-Za-z0-9]{8,128}$/;\nconst smartAccountAddressPattern = /^0x[0-9a-fA-F]{40}$/;\nconst maxUint32 = 4_294_967_295;\n\nfunction isChainTxIdentifier(value: string): boolean {\n if (canonicalTxHashPattern.test(value)) return true;\n if (chainTxHexPattern.test(value)) return true;\n return chainNativeTxIdPattern.test(value);\n}\n\nfunction normalizeChainTxIdentifier(value: string): string {\n if (canonicalTxHashPattern.test(value)) return value.toLowerCase();\n // Preserve caller casing — XRP and other chains may be case-sensitive on the API.\n if (chainTxHexPattern.test(value)) return value;\n return value;\n}\n\nconst ChainTxIdentifierSchema = v.pipe(\n v.string(),\n v.trim(),\n v.minLength(1, \"txHash is required.\"),\n v.check(isChainTxIdentifier, \"txHash must be a valid EVM hash or chain-native transaction id.\"),\n v.transform(normalizeChainTxIdentifier),\n);\n\nconst AccountSelectorIdSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst SmartAccountAddressSchema = v.pipe(\n v.string(),\n v.trim(),\n v.regex(smartAccountAddressPattern, \"smartAccountAddress must be a canonical 0x address.\"),\n);\n\nconst LifecycleAccountSelectorInputSchema = v.pipe(\n v.variant(\"kind\", [\n v.strictObject({\n kind: v.literal(\"accountId\"),\n accountId: AccountSelectorIdSchema,\n }),\n v.strictObject({\n kind: v.literal(\"ownerAccountId\"),\n ownerAccountId: AccountSelectorIdSchema,\n }),\n v.strictObject({\n kind: v.literal(\"smartAccountAddress\"),\n smartAccountAddress: SmartAccountAddressSchema,\n }),\n ]),\n v.transform((selector) => {\n switch (selector.kind) {\n case \"accountId\":\n return {\n case: \"ownerAccountId\" as const,\n value: idToBigInt(selector.accountId, \"accountId\"),\n };\n case \"ownerAccountId\":\n return {\n case: \"ownerAccountId\" as const,\n value: idToBigInt(selector.ownerAccountId, \"ownerAccountId\"),\n };\n case \"smartAccountAddress\":\n return {\n case: \"smartAccountAddress\" as const,\n value: selector.smartAccountAddress,\n };\n }\n }),\n);\n\nconst Uint32Schema = v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(maxUint32));\n\nconst LifecycleU128RawSchema = v.object({\n hi: v.bigint(),\n lo: v.bigint(),\n});\n\n/**\n * Wire `amount_e18` u128 → public decimal string. On-chain unified-asset\n * amounts are always 18-decimal scaled, so the conversion uses the constant\n * E18 scale and needs no catalog access.\n */\nconst LifecycleAmountSchema = v.pipe(\n LifecycleU128RawSchema,\n v.transform((v) => scaledToDecimalOutput(fromU128(v), E18_SCALE)),\n);\n\n/**\n * Renames the wire `amountE18` key to the public decimal `amount` field.\n * Preserves optional semantics exactly: when the wire field is unset, the\n * output carries no `amount` key.\n */\nfunction renameAmountE18<T extends { amountE18?: string }>(\n value: T,\n): Omit<T, \"amountE18\"> & { amount?: string } {\n const { amountE18, ...rest } = value;\n return amountE18 === undefined ? rest : { ...rest, amount: amountE18 };\n}\n\nconst LifecycleAssetIdsSchema = v.object({\n zippedAssetId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n unifiedAssetId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n});\n\nconst LifecycleFlowStepEnumSchema = enumLabelSchema(LifecycleFlowStepCodec.protoToOutput);\nconst LifecycleSourceEnumSchema = enumLabelSchema(LifecycleSourceCodec.protoToOutput);\nconst LifecycleFlowKindEnumSchema = enumLabelSchema(LifecycleFlowKindCodec.protoToOutput);\nconst LifecycleFlowParticipationEnumSchema = enumLabelSchema(\n LifecycleFlowParticipationCodec.protoToOutput,\n);\n\nconst LifecycleFlowDomainEnumSchema = enumLabelSchema(LifecycleFlowDomainCodec.protoToOutput);\nconst LifecycleFlowStateEnumSchema = enumLabelSchema(LifecycleFlowStateCodec.protoToOutput);\nconst LifecycleFlowStepActivityKindEnumSchema = enumLabelSchema(\n LifecycleFlowStepActivityKindCodec.protoToOutput,\n);\nconst LifecycleFlowTimelineStatusEnumSchema = enumLabelSchema(\n LifecycleFlowTimelineStatusCodec.protoToOutput,\n);\n/**\n * `REASON_UNSPECIFIED` (0) is the normal wire value for flows without a\n * notable reason, so this schema accepts zero unlike the other lifecycle enum\n * schemas. The catalog also grows on the backend ahead of SDK regeneration, so\n * uncataloged codes decode to `unknown_reason_${code}` instead of rejecting the whole flow —\n * a strict enum here froze failed flows out of the UI when the backend shipped\n * new reason codes.\n */\nconst LifecycleReasonEnumSchema = v.pipe(\n v.number(),\n v.integer(),\n v.minValue(0),\n v.transform((value) => lifecycleReasonFromCode(value)),\n);\nconst LifecycleRequestFeeStatusEnumSchema = enumLabelSchema(\n LifecycleRequestFeeStatusCodec.protoToOutput,\n);\nconst LifecycleMsSchema = v.pipe(\n v.bigint(),\n v.transform((v) => Number(v)),\n);\nconst LifecycleTxOccurrenceIndexSchema = v.pipe(\n v.optional(v.bigint()),\n v.transform((v) => Number(v ?? 0n)),\n);\nconst LifecycleLedgerTransferIdSchema = v.optional(v.string(), \"\");\nconst LifecycleZipperReasonSchema = v.object({\n code: v.pipe(v.number(), v.integer(), v.minValue(0)),\n reasonId: v.string(),\n message: v.string(),\n});\n\nexport const ListLifecycleFlowsInputSchema = v.pipe(\n v.strictObject({\n limit: v.optional(v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(500)), 100),\n sort: v.pipe(\n v.optional(v.picklist(LIFECYCLE_SORT_VALUES), \"newest\"),\n v.transform((value) => LifecycleSortCodec.inputToProto[value]),\n ),\n flowKind: v.pipe(\n v.optional(FlowKindSchema),\n v.transform((v) =>\n v ? LifecycleFlowKindCodec.inputToProto[v] : Proto.FlowKind.KIND_UNSPECIFIED,\n ),\n ),\n flowState: v.pipe(\n v.optional(FlowStateSchema),\n v.transform((v) =>\n v ? LifecycleFlowStateCodec.inputToProto[v] : Proto.FlowState.STATE_UNSPECIFIED,\n ),\n ),\n txRef: v.optional(ChainTxIdentifierSchema),\n scope: v.pipe(\n v.optional(v.picklist(LIFECYCLE_LIST_SCOPE_VALUES), \"all\"),\n v.transform((v) => LifecycleListScopeCodec.inputToProto[v ?? \"all\"]),\n ),\n accountSelector: v.optional(LifecycleAccountSelectorInputSchema),\n /**\n * Narrows an account's list to the flows it owns (`\"owner\"`, the list before\n * received transfers were added) or the transfers it receives (`\"recipient\"`).\n * Omit for both. Requires `accountSelector`.\n */\n participation: v.pipe(\n v.optional(v.picklist(LIFECYCLE_FLOW_PARTICIPATION_VALUES)),\n v.transform((value) =>\n value\n ? LifecycleFlowParticipationCodec.inputToProto[value]\n : FlowParticipation.PARTICIPATION_UNSPECIFIED,\n ),\n ),\n polyesterChainIds: v.optional(v.array(Uint32Schema)),\n zippedAssetIds: v.optional(v.array(Uint32Schema)),\n unifiedAssetIds: v.optional(v.array(Uint32Schema)),\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n orderBy: v.pipe(\n v.optional(v.picklist(LIFECYCLE_LIST_ORDER_BY_VALUES), \"last_activity\"),\n v.transform((value) => LifecycleListOrderByCodec.inputToProto[value]),\n ),\n }),\n v.check(\n (value) =>\n // Absent or unspecified participation (0) needs no selector.\n !value.participation || value.accountSelector !== undefined,\n \"participation requires accountSelector.\",\n ),\n v.transform((value) => {\n return {\n limit: value.limit,\n sort: value.sort,\n flowKind: value.flowKind,\n flowState: value.flowState,\n txRef: value.txRef,\n scope: value.scope,\n accountSelector: value.accountSelector,\n participation: value.participation,\n polyesterChainIds: value.polyesterChainIds,\n zippedAssetIds: value.zippedAssetIds,\n unifiedAssetIds: value.unifiedAssetIds,\n pageToken: value.pageToken,\n orderBy: value.orderBy,\n };\n }),\n);\n\nexport const LifecycleRequestFeeSchema = v.pipe(\n v.object({\n assetIds: v.optional(LifecycleAssetIdsSchema),\n amountE18: v.optional(LifecycleAmountSchema),\n recipientAddress: v.string(),\n status: LifecycleRequestFeeStatusEnumSchema,\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport function createLifecycleRequestFeeSchema() {\n return LifecycleRequestFeeSchema;\n}\n\nexport const GetLifecycleFlowInputSchema = v.pipe(\n v.strictObject({\n flowId: v.pipe(v.string(), v.trim(), v.minLength(1, \"flowId is required.\")),\n }),\n v.transform((value) => ({\n flowId: value.flowId,\n })),\n);\n\nexport const ListLifecycleFlowsByTxInputSchema = v.strictObject({\n txHash: ChainTxIdentifierSchema,\n lookupKind: v.pipe(\n v.picklist(LIFECYCLE_TX_LOOKUP_KIND_VALUES),\n v.transform((v) => LifecycleTxLookupKindCodec.inputToProto[v]),\n ),\n limit: v.optional(v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(500)), 100),\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n});\n\nexport const LifecycleFlowStepActivitySchema = v.pipe(\n v.object({\n sequence: v.pipe(v.number(), v.integer(), v.minValue(0)),\n txRef: v.string(),\n /** Chain holding `txRef`; a `GetDepositWithdrawConfig` chain ID, 0 when `txRef` is not a chain transaction. */\n txChainId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0)), 0),\n occurredAtUnixMs: LifecycleMsSchema,\n lifecycleSource: LifecycleSourceEnumSchema,\n lifecycleReason: LifecycleReasonEnumSchema,\n zipperReason: v.optional(LifecycleZipperReasonSchema),\n currentConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n approveCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n rejectCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n validatorCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n kind: LifecycleFlowStepActivityKindEnumSchema,\n requiredApprovals: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredRejections: v.pipe(v.number(), v.integer(), v.minValue(0)),\n amountE18: v.optional(LifecycleAmountSchema),\n ledgerTransferId: LifecycleLedgerTransferIdSchema,\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport const LifecycleFlowStepSchema = v.pipe(\n v.object({\n sequence: v.pipe(v.number(), v.integer(), v.minValue(0)),\n step: LifecycleFlowStepEnumSchema,\n assetIds: v.optional(LifecycleAssetIdsSchema),\n polyesterChainId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n amountE18: v.optional(LifecycleAmountSchema),\n requestFee: v.optional(LifecycleRequestFeeSchema),\n milestoneTxRef: v.string(),\n /** Chain holding `milestoneTxRef`; a `GetDepositWithdrawConfig` chain ID, 0 when it is not a chain transaction. */\n milestoneTxChainId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0)), 0),\n lifecycleSource: LifecycleSourceEnumSchema,\n lifecycleReason: LifecycleReasonEnumSchema,\n zipperReason: v.optional(LifecycleZipperReasonSchema),\n currentConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n approveCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n rejectCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n validatorCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredApprovals: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredRejections: v.pipe(v.number(), v.integer(), v.minValue(0)),\n occurredAtUnixMs: LifecycleMsSchema,\n blockTimeMovingAverageMs: LifecycleMsSchema,\n activities: v.optional(v.array(LifecycleFlowStepActivitySchema), []),\n /**\n * Polyester Chain smart account a rejected withdrawal's zTokens (net of the kept\n * request fee) were returned to; set only on a withdrawal's `refunded` step, `\"\"`\n * otherwise. The zTokens stay there until moved.\n */\n refundAddress: v.optional(v.string(), \"\"),\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport function createLifecycleFlowStepSchema() {\n return LifecycleFlowStepSchema;\n}\n\nexport const LifecycleFlowTimelineItemSchema = v.object({\n sequence: v.pipe(v.number(), v.integer(), v.minValue(0)),\n step: LifecycleFlowStepEnumSchema,\n status: LifecycleFlowTimelineStatusEnumSchema,\n expectedDurationMs: LifecycleMsSchema,\n});\n\nexport const LifecycleFlowSummaryProgressSchema = v.object({\n currentStepStartedAtUnixMs: LifecycleMsSchema,\n currentStepExpectedDurationMs: LifecycleMsSchema,\n currentConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n approveCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n rejectCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n validatorCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredApprovals: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredRejections: v.pipe(v.number(), v.integer(), v.minValue(0)),\n});\n\nexport const LifecycleFlowSummarySchema = v.pipe(\n v.object({\n ownerAccountId: PublicIdSchema,\n smartAccountAddress: v.string(),\n flowId: v.string(),\n flowKind: LifecycleFlowKindEnumSchema,\n currentStep: LifecycleFlowStepEnumSchema,\n assetIds: v.optional(LifecycleAssetIdsSchema),\n polyesterChainId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n amountE18: v.optional(LifecycleAmountSchema),\n requestFee: v.optional(LifecycleRequestFeeSchema),\n sourceTxHash: v.string(),\n txOccurrenceIndex: LifecycleTxOccurrenceIndexSchema,\n sourceAddress: v.string(),\n destinationAddress: v.string(),\n sourceDomain: LifecycleFlowDomainEnumSchema,\n destinationDomain: LifecycleFlowDomainEnumSchema,\n latestTxRef: v.string(),\n latestLifecycleSource: LifecycleSourceEnumSchema,\n lifecycleReason: LifecycleReasonEnumSchema,\n zipperReason: v.optional(LifecycleZipperReasonSchema),\n startedAtUnixMs: LifecycleMsSchema,\n updatedAtUnixMs: LifecycleMsSchema,\n terminalAtUnixMs: LifecycleMsSchema,\n lastActivityAtUnixMs: LifecycleMsSchema,\n isOpen: v.boolean(),\n isTerminal: v.boolean(),\n currentStepSequence: v.pipe(v.number(), v.integer(), v.minValue(0)),\n currentProgress: v.optional(LifecycleFlowSummaryProgressSchema),\n progressTimeline: v.optional(v.array(LifecycleFlowTimelineItemSchema), []),\n estimatedCompletionUnixMs: LifecycleMsSchema,\n /** An open flow has stalled well past its current step's expected time; `estimatedCompletionUnixMs` is 0 meanwhile. */\n isDelayed: v.optional(v.boolean(), false),\n /**\n * How the listed account takes part: `\"owner\"` for its own flows, including a\n * transfer it sent, `\"recipient\"` for a transfer another account sent it.\n * `\"unspecified\"` outside an account-scoped `listFlows`.\n */\n participation: v.optional(\n LifecycleFlowParticipationEnumSchema,\n FlowParticipation.PARTICIPATION_UNSPECIFIED,\n ),\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport function createLifecycleFlowSummarySchema() {\n return LifecycleFlowSummarySchema;\n}\n\nexport const LifecycleFlowDetailSchema = v.object({\n summary: v.optional(LifecycleFlowSummarySchema),\n observedSteps: v.optional(v.array(LifecycleFlowStepSchema), []),\n fromLiveState: v.boolean(),\n});\n\nexport function createLifecycleFlowDetailSchema() {\n return LifecycleFlowDetailSchema;\n}\n\nexport const ListLifecycleFlowsOutputSchema = v.object({\n flows: v.optional(v.array(LifecycleFlowSummarySchema), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\nexport function createListLifecycleFlowsOutputSchema() {\n return ListLifecycleFlowsOutputSchema;\n}\n\nexport const GetLifecycleFlowOutputSchema = v.object({\n flow: v.optional(LifecycleFlowDetailSchema),\n});\n\nexport function createGetLifecycleFlowOutputSchema() {\n return GetLifecycleFlowOutputSchema;\n}\n\nexport const LifecycleFlowTxMatchSchema = v.pipe(\n v.object({\n ownerAccountId: PublicIdSchema,\n smartAccountAddress: v.string(),\n flowId: v.string(),\n flowKind: LifecycleFlowKindEnumSchema,\n sourceTxHash: v.string(),\n latestTxRef: v.string(),\n txOccurrenceIndex: LifecycleTxOccurrenceIndexSchema,\n sourceDomain: LifecycleFlowDomainEnumSchema,\n destinationDomain: LifecycleFlowDomainEnumSchema,\n currentStep: LifecycleFlowStepEnumSchema,\n isOpen: v.boolean(),\n isTerminal: v.boolean(),\n assetIds: v.optional(LifecycleAssetIdsSchema),\n polyesterChainId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n amountE18: v.optional(LifecycleAmountSchema),\n sourceAddress: v.string(),\n destinationAddress: v.string(),\n lifecycleReason: LifecycleReasonEnumSchema,\n zipperReason: v.optional(LifecycleZipperReasonSchema),\n lastActivityAtUnixMs: LifecycleMsSchema,\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport function createLifecycleFlowTxMatchSchema() {\n return LifecycleFlowTxMatchSchema;\n}\n\nexport const ListLifecycleFlowsByTxOutputSchema = v.object({\n txHash: v.string(),\n matches: v.optional(v.array(LifecycleFlowTxMatchSchema), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\nexport function createListLifecycleFlowsByTxOutputSchema() {\n return ListLifecycleFlowsByTxOutputSchema;\n}\n\nexport type ListLifecycleFlowsInput = v.InferInput<typeof ListLifecycleFlowsInputSchema>;\nexport type ParsedListLifecycleFlowsInput = v.InferOutput<typeof ListLifecycleFlowsInputSchema>;\n\nexport type GetLifecycleFlowInput = v.InferInput<typeof GetLifecycleFlowInputSchema>;\nexport type ParsedGetLifecycleFlowInput = v.InferOutput<typeof GetLifecycleFlowInputSchema>;\n\nexport type ListLifecycleFlowsByTxInput = v.InferInput<typeof ListLifecycleFlowsByTxInputSchema>;\nexport type ParsedListLifecycleFlowsByTxInput = v.InferOutput<\n typeof ListLifecycleFlowsByTxInputSchema\n>;\n\nexport type LifecycleFlowSummary = v.InferOutput<typeof LifecycleFlowSummarySchema>;\nexport type LifecycleFlowStep = v.InferOutput<typeof LifecycleFlowStepSchema>;\nexport type LifecycleFlowStepActivity = v.InferOutput<typeof LifecycleFlowStepActivitySchema>;\nexport type LifecycleFlowTimelineItem = v.InferOutput<typeof LifecycleFlowTimelineItemSchema>;\nexport type LifecycleFlowDetail = v.InferOutput<typeof LifecycleFlowDetailSchema>;\n\nexport type ListLifecycleFlowsOutput = v.InferOutput<typeof ListLifecycleFlowsOutputSchema>;\nexport type GetLifecycleFlowOutput = v.InferOutput<typeof GetLifecycleFlowOutputSchema>;\nexport type ListLifecycleFlowsByTxOutput = v.InferOutput<typeof ListLifecycleFlowsByTxOutputSchema>;\n\nexport type LifecycleAssetIds = v.InferOutput<typeof LifecycleAssetIdsSchema>;\nexport type LifecycleRequestFee = v.InferOutput<typeof LifecycleRequestFeeSchema>;\n\nexport type LifecycleFlowSummaryProgress = v.InferOutput<typeof LifecycleFlowSummaryProgressSchema>;\nexport type LifecycleFlowState = v.InferOutput<typeof LifecycleFlowStateEnumSchema>;\nexport type LifecycleReason = LifecycleReasonValue;\nexport type LifecycleZipperReason = v.InferOutput<typeof LifecycleZipperReasonSchema>;\nexport type LifecycleListOrderBy = LifecycleListOrderByValue;\nexport type LifecycleListScope = LifecycleListScopeValue;\nexport type LifecycleFlowParticipation = LifecycleFlowParticipationValue;\nexport type LifecycleSort = LifecycleSortValue;\nexport type LifecycleTxLookupKind = LifecycleTxLookupKindValue;\nexport type LifecycleRequestFeeStatus = LifecycleRequestFeeStatusValue;\n\nexport type LifecycleFlowTxMatch = v.InferOutput<typeof LifecycleFlowTxMatchSchema>;\n"],"mappings":";;;;;;;;;;AAuCA,MAAM,iBAAiB,EAAE,SAAS,0BAA0B;AAC5D,MAAM,kBAAkB,EAAE,SAAS,2BAA2B;AAE9D,MAAM,yBAAyB;AAC/B,MAAM,oBAAoB;AAC1B,MAAM,yBAAyB;AAC/B,MAAM,6BAA6B;AACnC,MAAM,YAAY;AAElB,SAAS,oBAAoB,OAAwB;CACjD,IAAI,u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9C,CAAC;AAMD,MAAa,6BAA6B,EAAE,KACxC,EAAE,OAAO;CACL,gBAAgB;CAChB,qBAAqB,EAAE,OAAO;CAC9B,QAAQ,EAAE,OAAO;CACjB,UAAU;CACV,cAAc,EAAE,OAAO;CACvB,aAAa,EAAE,OAAO;CACtB,mBAAmB;CACnB,cAAc;CACd,mBAAmB;CACnB,aAAa;CACb,QAAQ,EAAE,QAAQ;CAClB,YAAY,EAAE,QAAQ;CACtB,UAAU,EAAE,SAAS,uBAAuB;CAC5C,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,CAAC,CAAC;CAC/D,WAAW,EAAE,SAAS,qBAAqB;CAC3C,eAAe,EAAE,OAAO;CACxB,oBAAoB,EAAE,OAAO;CAC7B,iBAAiB;CACjB,cAAc,EAAE,SAAS,2BAA2B;CACpD,sBAAsB;AAC1B,CAAC,GACD,EAAE,WAAW,UAAU,gBAAgB,KAAK,CAAC,CACjD;AAMA,MAAa,qCAAqC,EAAE,OAAO;CACvD,QAAQ,EAAE,OAAO;CACjB,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,GAAG,CAAC,CAAC;CAC3D,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;AAC5C,CAAC"}
|
|
1
|
+
{"version":3,"file":"lifecycle.schemas.js","names":[],"sources":["../../../src/services/lifecycle/lifecycle.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport * as Proto from \"../../gen/chain/lifecycle/v1/types_pb.js\";\nimport { FlowParticipation } from \"../../gen/chain/lifecycle/v1/lifecycle_read_pb.js\";\nimport {\n LIFECYCLE_FLOW_KIND_VALUES,\n LIFECYCLE_FLOW_PARTICIPATION_VALUES,\n LIFECYCLE_FLOW_STATE_VALUES,\n LIFECYCLE_LIST_SCOPE_VALUES,\n LIFECYCLE_LIST_ORDER_BY_VALUES,\n LIFECYCLE_SORT_VALUES,\n LIFECYCLE_TX_LOOKUP_KIND_VALUES,\n LifecycleFlowDomainCodec,\n LifecycleFlowKindCodec,\n LifecycleFlowParticipationCodec,\n lifecycleReasonFromCode,\n LifecycleFlowStateCodec,\n LifecycleFlowStepActivityKindCodec,\n LifecycleFlowStepCodec,\n LifecycleFlowTimelineStatusCodec,\n LifecycleListOrderByCodec,\n LifecycleListScopeCodec,\n LifecycleRequestFeeStatusCodec,\n LifecycleSortCodec,\n LifecycleSourceCodec,\n LifecycleTxLookupKindCodec,\n type LifecycleFlowParticipationValue,\n type LifecycleReasonValue,\n type LifecycleListOrderByValue,\n type LifecycleListScopeValue,\n type LifecycleRequestFeeStatusValue,\n type LifecycleSortValue,\n type LifecycleTxLookupKindValue,\n type ZipperReasonCodeValue,\n zipperReasonFromCode,\n} from \"./lifecycle.codecs.js\";\nimport { idToBigInt } from \"../../utils/base58-id.js\";\nimport { fromU128 } from \"../../utils/u128.js\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport { PublicIdSchema } from \"../../shared/schemas.js\";\nimport { E18_SCALE, scaledToDecimalOutput } from \"../../shared/decimal-surface.js\";\n\nconst FlowKindSchema = v.picklist(LIFECYCLE_FLOW_KIND_VALUES);\nconst FlowStateSchema = v.picklist(LIFECYCLE_FLOW_STATE_VALUES);\n\nconst canonicalTxHashPattern = /^0x[0-9a-fA-F]{64}$/;\nconst chainTxHexPattern = /^[0-9a-fA-F]{64}$/;\nconst chainNativeTxIdPattern = /^[A-Za-z0-9]{8,128}$/;\nconst smartAccountAddressPattern = /^0x[0-9a-fA-F]{40}$/;\nconst maxUint32 = 4_294_967_295;\n\nfunction isChainTxIdentifier(value: string): boolean {\n if (canonicalTxHashPattern.test(value)) return true;\n if (chainTxHexPattern.test(value)) return true;\n return chainNativeTxIdPattern.test(value);\n}\n\nfunction normalizeChainTxIdentifier(value: string): string {\n if (canonicalTxHashPattern.test(value)) return value.toLowerCase();\n // Preserve caller casing — XRP and other chains may be case-sensitive on the API.\n if (chainTxHexPattern.test(value)) return value;\n return value;\n}\n\nconst ChainTxIdentifierSchema = v.pipe(\n v.string(),\n v.trim(),\n v.minLength(1, \"txHash is required.\"),\n v.check(isChainTxIdentifier, \"txHash must be a valid EVM hash or chain-native transaction id.\"),\n v.transform(normalizeChainTxIdentifier),\n);\n\nconst AccountSelectorIdSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\nconst SmartAccountAddressSchema = v.pipe(\n v.string(),\n v.trim(),\n v.regex(smartAccountAddressPattern, \"smartAccountAddress must be a canonical 0x address.\"),\n);\n\nconst LifecycleAccountSelectorInputSchema = v.pipe(\n v.variant(\"kind\", [\n v.strictObject({\n kind: v.literal(\"accountId\"),\n accountId: AccountSelectorIdSchema,\n }),\n v.strictObject({\n kind: v.literal(\"ownerAccountId\"),\n ownerAccountId: AccountSelectorIdSchema,\n }),\n v.strictObject({\n kind: v.literal(\"smartAccountAddress\"),\n smartAccountAddress: SmartAccountAddressSchema,\n }),\n ]),\n v.transform((selector) => {\n switch (selector.kind) {\n case \"accountId\":\n return {\n case: \"ownerAccountId\" as const,\n value: idToBigInt(selector.accountId, \"accountId\"),\n };\n case \"ownerAccountId\":\n return {\n case: \"ownerAccountId\" as const,\n value: idToBigInt(selector.ownerAccountId, \"ownerAccountId\"),\n };\n case \"smartAccountAddress\":\n return {\n case: \"smartAccountAddress\" as const,\n value: selector.smartAccountAddress,\n };\n }\n }),\n);\n\nconst Uint32Schema = v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(maxUint32));\n\nconst LifecycleU128RawSchema = v.object({\n hi: v.bigint(),\n lo: v.bigint(),\n});\n\n/**\n * Wire `amount_e18` u128 → public decimal string. On-chain unified-asset\n * amounts are always 18-decimal scaled, so the conversion uses the constant\n * E18 scale and needs no catalog access.\n */\nconst LifecycleAmountSchema = v.pipe(\n LifecycleU128RawSchema,\n v.transform((v) => scaledToDecimalOutput(fromU128(v), E18_SCALE)),\n);\n\n/**\n * Renames the wire `amountE18` key to the public decimal `amount` field.\n * Preserves optional semantics exactly: when the wire field is unset, the\n * output carries no `amount` key.\n */\nfunction renameAmountE18<T extends { amountE18?: string }>(\n value: T,\n): Omit<T, \"amountE18\"> & { amount?: string } {\n const { amountE18, ...rest } = value;\n return amountE18 === undefined ? rest : { ...rest, amount: amountE18 };\n}\n\nconst LifecycleAssetIdsSchema = v.object({\n zippedAssetId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n unifiedAssetId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n});\n\nconst LifecycleFlowStepEnumSchema = enumLabelSchema(LifecycleFlowStepCodec.protoToOutput);\nconst LifecycleSourceEnumSchema = enumLabelSchema(LifecycleSourceCodec.protoToOutput);\nconst LifecycleFlowKindEnumSchema = enumLabelSchema(LifecycleFlowKindCodec.protoToOutput);\nconst LifecycleFlowParticipationEnumSchema = enumLabelSchema(\n LifecycleFlowParticipationCodec.protoToOutput,\n);\n\nconst LifecycleFlowDomainEnumSchema = enumLabelSchema(LifecycleFlowDomainCodec.protoToOutput);\nconst LifecycleFlowStateEnumSchema = enumLabelSchema(LifecycleFlowStateCodec.protoToOutput);\nconst LifecycleFlowStepActivityKindEnumSchema = enumLabelSchema(\n LifecycleFlowStepActivityKindCodec.protoToOutput,\n);\nconst LifecycleFlowTimelineStatusEnumSchema = enumLabelSchema(\n LifecycleFlowTimelineStatusCodec.protoToOutput,\n);\n/**\n * `REASON_UNSPECIFIED` (0) is the normal wire value for flows without a\n * notable reason, so this schema accepts zero unlike the other lifecycle enum\n * schemas. The catalog also grows on the backend ahead of SDK regeneration, so\n * uncataloged codes decode to `unknown_reason_${code}` instead of rejecting the whole flow —\n * a strict enum here froze failed flows out of the UI when the backend shipped\n * new reason codes.\n */\nconst LifecycleReasonEnumSchema = v.pipe(\n v.number(),\n v.integer(),\n v.minValue(0),\n v.transform((value) => lifecycleReasonFromCode(value)),\n);\nconst LifecycleRequestFeeStatusEnumSchema = enumLabelSchema(\n LifecycleRequestFeeStatusCodec.protoToOutput,\n);\nconst LifecycleMsSchema = v.pipe(\n v.bigint(),\n v.transform((v) => Number(v)),\n);\nconst LifecycleTxOccurrenceIndexSchema = v.pipe(\n v.optional(v.bigint()),\n v.transform((v) => Number(v ?? 0n)),\n);\nconst LifecycleLedgerTransferIdSchema = v.optional(v.string(), \"\");\nconst LifecycleZipperReasonSchema = v.object({\n code: v.pipe(v.number(), v.integer(), v.minValue(0), v.transform(zipperReasonFromCode)),\n reasonId: v.string(),\n message: v.string(),\n});\n\nexport const ListLifecycleFlowsInputSchema = v.pipe(\n v.strictObject({\n limit: v.optional(v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(500)), 100),\n sort: v.pipe(\n v.optional(v.picklist(LIFECYCLE_SORT_VALUES), \"newest\"),\n v.transform((value) => LifecycleSortCodec.inputToProto[value]),\n ),\n flowKind: v.pipe(\n v.optional(FlowKindSchema),\n v.transform((v) =>\n v ? LifecycleFlowKindCodec.inputToProto[v] : Proto.FlowKind.KIND_UNSPECIFIED,\n ),\n ),\n flowState: v.pipe(\n v.optional(FlowStateSchema),\n v.transform((v) =>\n v ? LifecycleFlowStateCodec.inputToProto[v] : Proto.FlowState.STATE_UNSPECIFIED,\n ),\n ),\n txRef: v.optional(ChainTxIdentifierSchema),\n scope: v.pipe(\n v.optional(v.picklist(LIFECYCLE_LIST_SCOPE_VALUES), \"all\"),\n v.transform((v) => LifecycleListScopeCodec.inputToProto[v ?? \"all\"]),\n ),\n accountSelector: v.optional(LifecycleAccountSelectorInputSchema),\n /**\n * Narrows an account's list to the flows it owns (`\"owner\"`, the list before\n * received transfers were added) or the transfers it receives (`\"recipient\"`).\n * Omit for both. Requires `accountSelector`.\n */\n participation: v.pipe(\n v.optional(v.picklist(LIFECYCLE_FLOW_PARTICIPATION_VALUES)),\n v.transform((value) =>\n value\n ? LifecycleFlowParticipationCodec.inputToProto[value]\n : FlowParticipation.PARTICIPATION_UNSPECIFIED,\n ),\n ),\n polyesterChainIds: v.optional(v.array(Uint32Schema)),\n zippedAssetIds: v.optional(v.array(Uint32Schema)),\n unifiedAssetIds: v.optional(v.array(Uint32Schema)),\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n orderBy: v.pipe(\n v.optional(v.picklist(LIFECYCLE_LIST_ORDER_BY_VALUES), \"last_activity\"),\n v.transform((value) => LifecycleListOrderByCodec.inputToProto[value]),\n ),\n }),\n v.check(\n (value) =>\n // Absent or unspecified participation (0) needs no selector.\n !value.participation || value.accountSelector !== undefined,\n \"participation requires accountSelector.\",\n ),\n v.transform((value) => {\n return {\n limit: value.limit,\n sort: value.sort,\n flowKind: value.flowKind,\n flowState: value.flowState,\n txRef: value.txRef,\n scope: value.scope,\n accountSelector: value.accountSelector,\n participation: value.participation,\n polyesterChainIds: value.polyesterChainIds,\n zippedAssetIds: value.zippedAssetIds,\n unifiedAssetIds: value.unifiedAssetIds,\n pageToken: value.pageToken,\n orderBy: value.orderBy,\n };\n }),\n);\n\nexport const LifecycleRequestFeeSchema = v.pipe(\n v.object({\n assetIds: v.optional(LifecycleAssetIdsSchema),\n amountE18: v.optional(LifecycleAmountSchema),\n recipientAddress: v.string(),\n status: LifecycleRequestFeeStatusEnumSchema,\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport function createLifecycleRequestFeeSchema() {\n return LifecycleRequestFeeSchema;\n}\n\nexport const GetLifecycleFlowInputSchema = v.pipe(\n v.strictObject({\n flowId: v.pipe(v.string(), v.trim(), v.minLength(1, \"flowId is required.\")),\n }),\n v.transform((value) => ({\n flowId: value.flowId,\n })),\n);\n\nexport const ListLifecycleFlowsByTxInputSchema = v.strictObject({\n txHash: ChainTxIdentifierSchema,\n lookupKind: v.pipe(\n v.picklist(LIFECYCLE_TX_LOOKUP_KIND_VALUES),\n v.transform((v) => LifecycleTxLookupKindCodec.inputToProto[v]),\n ),\n limit: v.optional(v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(500)), 100),\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n});\n\nexport const LifecycleFlowStepActivitySchema = v.pipe(\n v.object({\n sequence: v.pipe(v.number(), v.integer(), v.minValue(0)),\n txRef: v.string(),\n /** Chain holding `txRef`; a `GetDepositWithdrawConfig` chain ID, 0 when `txRef` is not a chain transaction. */\n txChainId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0)), 0),\n occurredAtUnixMs: LifecycleMsSchema,\n lifecycleSource: LifecycleSourceEnumSchema,\n lifecycleReason: LifecycleReasonEnumSchema,\n zipperReason: v.optional(LifecycleZipperReasonSchema),\n currentConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n approveCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n rejectCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n validatorCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n kind: LifecycleFlowStepActivityKindEnumSchema,\n requiredApprovals: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredRejections: v.pipe(v.number(), v.integer(), v.minValue(0)),\n amountE18: v.optional(LifecycleAmountSchema),\n ledgerTransferId: LifecycleLedgerTransferIdSchema,\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport const LifecycleFlowStepSchema = v.pipe(\n v.object({\n sequence: v.pipe(v.number(), v.integer(), v.minValue(0)),\n step: LifecycleFlowStepEnumSchema,\n assetIds: v.optional(LifecycleAssetIdsSchema),\n polyesterChainId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n amountE18: v.optional(LifecycleAmountSchema),\n requestFee: v.optional(LifecycleRequestFeeSchema),\n milestoneTxRef: v.string(),\n /** Chain holding `milestoneTxRef`; a `GetDepositWithdrawConfig` chain ID, 0 when it is not a chain transaction. */\n milestoneTxChainId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0)), 0),\n lifecycleSource: LifecycleSourceEnumSchema,\n lifecycleReason: LifecycleReasonEnumSchema,\n zipperReason: v.optional(LifecycleZipperReasonSchema),\n currentConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n approveCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n rejectCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n validatorCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredApprovals: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredRejections: v.pipe(v.number(), v.integer(), v.minValue(0)),\n occurredAtUnixMs: LifecycleMsSchema,\n blockTimeMovingAverageMs: LifecycleMsSchema,\n activities: v.optional(v.array(LifecycleFlowStepActivitySchema), []),\n /**\n * Polyester Chain smart account a rejected withdrawal's zTokens (net of the kept\n * request fee) were returned to; set only on a withdrawal's `refunded` step, `\"\"`\n * otherwise. The zTokens stay there until moved.\n */\n refundAddress: v.optional(v.string(), \"\"),\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport function createLifecycleFlowStepSchema() {\n return LifecycleFlowStepSchema;\n}\n\nexport const LifecycleFlowTimelineItemSchema = v.object({\n sequence: v.pipe(v.number(), v.integer(), v.minValue(0)),\n step: LifecycleFlowStepEnumSchema,\n status: LifecycleFlowTimelineStatusEnumSchema,\n expectedDurationMs: LifecycleMsSchema,\n});\n\nexport const LifecycleFlowSummaryProgressSchema = v.object({\n currentStepStartedAtUnixMs: LifecycleMsSchema,\n currentStepExpectedDurationMs: LifecycleMsSchema,\n currentConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredConfirmations: v.pipe(v.number(), v.integer(), v.minValue(0)),\n approveCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n rejectCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n validatorCount: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredApprovals: v.pipe(v.number(), v.integer(), v.minValue(0)),\n requiredRejections: v.pipe(v.number(), v.integer(), v.minValue(0)),\n});\n\nexport const LifecycleFlowSummarySchema = v.pipe(\n v.object({\n ownerAccountId: PublicIdSchema,\n smartAccountAddress: v.string(),\n flowId: v.string(),\n flowKind: LifecycleFlowKindEnumSchema,\n currentStep: LifecycleFlowStepEnumSchema,\n assetIds: v.optional(LifecycleAssetIdsSchema),\n polyesterChainId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n amountE18: v.optional(LifecycleAmountSchema),\n requestFee: v.optional(LifecycleRequestFeeSchema),\n sourceTxHash: v.string(),\n txOccurrenceIndex: LifecycleTxOccurrenceIndexSchema,\n sourceAddress: v.string(),\n destinationAddress: v.string(),\n sourceDomain: LifecycleFlowDomainEnumSchema,\n destinationDomain: LifecycleFlowDomainEnumSchema,\n latestTxRef: v.string(),\n latestLifecycleSource: LifecycleSourceEnumSchema,\n lifecycleReason: LifecycleReasonEnumSchema,\n zipperReason: v.optional(LifecycleZipperReasonSchema),\n startedAtUnixMs: LifecycleMsSchema,\n updatedAtUnixMs: LifecycleMsSchema,\n terminalAtUnixMs: LifecycleMsSchema,\n lastActivityAtUnixMs: LifecycleMsSchema,\n isOpen: v.boolean(),\n isTerminal: v.boolean(),\n currentStepSequence: v.pipe(v.number(), v.integer(), v.minValue(0)),\n currentProgress: v.optional(LifecycleFlowSummaryProgressSchema),\n progressTimeline: v.optional(v.array(LifecycleFlowTimelineItemSchema), []),\n estimatedCompletionUnixMs: LifecycleMsSchema,\n /** An open flow has stalled well past its current step's expected time; `estimatedCompletionUnixMs` is 0 meanwhile. */\n isDelayed: v.optional(v.boolean(), false),\n /**\n * How the listed account takes part: `\"owner\"` for its own flows, including a\n * transfer it sent, `\"recipient\"` for a transfer another account sent it.\n * `\"unspecified\"` outside an account-scoped `listFlows`.\n */\n participation: v.optional(\n LifecycleFlowParticipationEnumSchema,\n FlowParticipation.PARTICIPATION_UNSPECIFIED,\n ),\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport function createLifecycleFlowSummarySchema() {\n return LifecycleFlowSummarySchema;\n}\n\nexport const LifecycleFlowDetailSchema = v.object({\n summary: v.optional(LifecycleFlowSummarySchema),\n observedSteps: v.optional(v.array(LifecycleFlowStepSchema), []),\n fromLiveState: v.boolean(),\n});\n\nexport function createLifecycleFlowDetailSchema() {\n return LifecycleFlowDetailSchema;\n}\n\nexport const ListLifecycleFlowsOutputSchema = v.object({\n flows: v.optional(v.array(LifecycleFlowSummarySchema), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\nexport function createListLifecycleFlowsOutputSchema() {\n return ListLifecycleFlowsOutputSchema;\n}\n\nexport const GetLifecycleFlowOutputSchema = v.object({\n flow: v.optional(LifecycleFlowDetailSchema),\n});\n\nexport function createGetLifecycleFlowOutputSchema() {\n return GetLifecycleFlowOutputSchema;\n}\n\nexport const LifecycleFlowTxMatchSchema = v.pipe(\n v.object({\n ownerAccountId: PublicIdSchema,\n smartAccountAddress: v.string(),\n flowId: v.string(),\n flowKind: LifecycleFlowKindEnumSchema,\n sourceTxHash: v.string(),\n latestTxRef: v.string(),\n txOccurrenceIndex: LifecycleTxOccurrenceIndexSchema,\n sourceDomain: LifecycleFlowDomainEnumSchema,\n destinationDomain: LifecycleFlowDomainEnumSchema,\n currentStep: LifecycleFlowStepEnumSchema,\n isOpen: v.boolean(),\n isTerminal: v.boolean(),\n assetIds: v.optional(LifecycleAssetIdsSchema),\n polyesterChainId: v.pipe(v.number(), v.integer(), v.minValue(0)),\n amountE18: v.optional(LifecycleAmountSchema),\n sourceAddress: v.string(),\n destinationAddress: v.string(),\n lifecycleReason: LifecycleReasonEnumSchema,\n zipperReason: v.optional(LifecycleZipperReasonSchema),\n lastActivityAtUnixMs: LifecycleMsSchema,\n }),\n v.transform((value) => renameAmountE18(value)),\n);\n\nexport function createLifecycleFlowTxMatchSchema() {\n return LifecycleFlowTxMatchSchema;\n}\n\nexport const ListLifecycleFlowsByTxOutputSchema = v.object({\n txHash: v.string(),\n matches: v.optional(v.array(LifecycleFlowTxMatchSchema), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\nexport function createListLifecycleFlowsByTxOutputSchema() {\n return ListLifecycleFlowsByTxOutputSchema;\n}\n\nexport type ListLifecycleFlowsInput = v.InferInput<typeof ListLifecycleFlowsInputSchema>;\nexport type ParsedListLifecycleFlowsInput = v.InferOutput<typeof ListLifecycleFlowsInputSchema>;\n\nexport type GetLifecycleFlowInput = v.InferInput<typeof GetLifecycleFlowInputSchema>;\nexport type ParsedGetLifecycleFlowInput = v.InferOutput<typeof GetLifecycleFlowInputSchema>;\n\nexport type ListLifecycleFlowsByTxInput = v.InferInput<typeof ListLifecycleFlowsByTxInputSchema>;\nexport type ParsedListLifecycleFlowsByTxInput = v.InferOutput<\n typeof ListLifecycleFlowsByTxInputSchema\n>;\n\nexport type LifecycleFlowSummary = v.InferOutput<typeof LifecycleFlowSummarySchema>;\nexport type LifecycleFlowStep = v.InferOutput<typeof LifecycleFlowStepSchema>;\nexport type LifecycleFlowStepActivity = v.InferOutput<typeof LifecycleFlowStepActivitySchema>;\nexport type LifecycleFlowTimelineItem = v.InferOutput<typeof LifecycleFlowTimelineItemSchema>;\nexport type LifecycleFlowDetail = v.InferOutput<typeof LifecycleFlowDetailSchema>;\n\nexport type ListLifecycleFlowsOutput = v.InferOutput<typeof ListLifecycleFlowsOutputSchema>;\nexport type GetLifecycleFlowOutput = v.InferOutput<typeof GetLifecycleFlowOutputSchema>;\nexport type ListLifecycleFlowsByTxOutput = v.InferOutput<typeof ListLifecycleFlowsByTxOutputSchema>;\n\nexport type LifecycleAssetIds = v.InferOutput<typeof LifecycleAssetIdsSchema>;\nexport type LifecycleRequestFee = v.InferOutput<typeof LifecycleRequestFeeSchema>;\n\nexport type LifecycleFlowSummaryProgress = v.InferOutput<typeof LifecycleFlowSummaryProgressSchema>;\nexport type LifecycleFlowState = v.InferOutput<typeof LifecycleFlowStateEnumSchema>;\nexport type LifecycleReason = LifecycleReasonValue;\nexport type LifecycleZipperReasonCode = ZipperReasonCodeValue;\n\nexport type LifecycleZipperReason = v.InferOutput<typeof LifecycleZipperReasonSchema>;\nexport type LifecycleListOrderBy = LifecycleListOrderByValue;\nexport type LifecycleListScope = LifecycleListScopeValue;\nexport type LifecycleFlowParticipation = LifecycleFlowParticipationValue;\nexport type LifecycleSort = LifecycleSortValue;\nexport type LifecycleTxLookupKind = LifecycleTxLookupKindValue;\nexport type LifecycleRequestFeeStatus = LifecycleRequestFeeStatusValue;\n\nexport type LifecycleFlowTxMatch = v.InferOutput<typeof LifecycleFlowTxMatchSchema>;\n"],"mappings":";;;;;;;;;;AAyCA,MAAM,iBAAiB,EAAE,SAAS,0BAA0B;AAC5D,MAAM,kBAAkB,EAAE,SAAS,2BAA2B;AAE9D,MAAM,yBAAyB;AAC/B,MAAM,oBAAoB;AAC1B,MAAM,yBAAyB;AAC/B,MAAM,6BAA6B;AACnC,MAAM,YAAY;AAElB,SAAS,oBAAoB,OAAwB;CACjD,IAAI,uBAAuB,KAAK,KAAK,GAAG,OAAO;CAC/C,IAAI,kBAAkB,KAAK,KAAK,GAAG,OAAO;CAC1C,OAAO,uBAAuB,KAAK,KAAK;AAC5C;AAEA,SAAS,2BAA2B,OAAuB;CACvD,IAAI,uBAAuB,KAAK,KAAK,GAAG,OAAO,MAAM,YAAY;CAEjE,IAAI,kBAAkB,KAAK,KAAK,GAAG,OAAO;CAC1C,OAAO;AACX;AAEA,MAAM,0BAA0B,EAAE,KAC9B,EAAE,OAAO,GACT,EAAE,KAAK,GACP,EAAE,UAAU,GAAG,qBAAqB,GACpC,EAAE,MAAM,qBAAqB,iEAAiE,GAC9F,EAAE,UAAU,0BAA0B,CAC1C;AAEA,MAAM,0BAA0B,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AAC3E,MAAM,4BAA4B,EAAE,KAChC,EAAE,OAAO,GACT,EAAE,KAAK,GACP,EAAE,MAAM,4BAA4B,qDAAqD,CAC7F;AAEA,MAAM,sCAAsC,EAAE,KAC1C,EAAE,QAAQ,QAAQ;CACd,EAAE,aAAa;EACX,MAAM,EAAE,QAAQ,WAAW;EAC3B,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0BAA0B,GAAG,CAAC,CAAC;CAC3D,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;AAC5C,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { GetLifecycleFlowInput, GetLifecycleFlowOutput, LifecycleAssetIds, LifecycleFlowDetail, LifecycleFlowState, LifecycleFlowStep, LifecycleFlowStepActivity, LifecycleFlowSummary, LifecycleFlowSummaryProgress, LifecycleFlowTimelineItem, LifecycleFlowTxMatch, LifecycleListOrderBy, LifecycleListScope, LifecycleReason, LifecycleRequestFee, LifecycleRequestFeeStatus, LifecycleSort, LifecycleTxLookupKind, LifecycleZipperReason, ListLifecycleFlowsByTxInput, ListLifecycleFlowsByTxOutput, ListLifecycleFlowsInput, ListLifecycleFlowsOutput } from "./lifecycle.schemas.js";
|
|
2
|
-
export type { GetLifecycleFlowInput, GetLifecycleFlowOutput, LifecycleAssetIds, LifecycleFlowDetail, LifecycleFlowState, LifecycleFlowStep, LifecycleFlowStepActivity, LifecycleFlowSummary, LifecycleFlowSummaryProgress, LifecycleFlowTimelineItem, LifecycleFlowTxMatch, LifecycleListOrderBy, LifecycleListScope, LifecycleReason, LifecycleRequestFee, LifecycleRequestFeeStatus, LifecycleSort, LifecycleTxLookupKind, LifecycleZipperReason, ListLifecycleFlowsByTxInput, ListLifecycleFlowsByTxOutput, ListLifecycleFlowsInput, ListLifecycleFlowsOutput };
|
|
1
|
+
import { GetLifecycleFlowInput, GetLifecycleFlowOutput, LifecycleAssetIds, LifecycleFlowDetail, LifecycleFlowState, LifecycleFlowStep, LifecycleFlowStepActivity, LifecycleFlowSummary, LifecycleFlowSummaryProgress, LifecycleFlowTimelineItem, LifecycleFlowTxMatch, LifecycleListOrderBy, LifecycleListScope, LifecycleReason, LifecycleRequestFee, LifecycleRequestFeeStatus, LifecycleSort, LifecycleTxLookupKind, LifecycleZipperReason, LifecycleZipperReasonCode, ListLifecycleFlowsByTxInput, ListLifecycleFlowsByTxOutput, ListLifecycleFlowsInput, ListLifecycleFlowsOutput } from "./lifecycle.schemas.js";
|
|
2
|
+
export type { GetLifecycleFlowInput, GetLifecycleFlowOutput, LifecycleAssetIds, LifecycleFlowDetail, LifecycleFlowState, LifecycleFlowStep, LifecycleFlowStepActivity, LifecycleFlowSummary, LifecycleFlowSummaryProgress, LifecycleFlowTimelineItem, LifecycleFlowTxMatch, LifecycleListOrderBy, LifecycleListScope, LifecycleReason, LifecycleRequestFee, LifecycleRequestFeeStatus, LifecycleSort, LifecycleTxLookupKind, LifecycleZipperReason, LifecycleZipperReasonCode, ListLifecycleFlowsByTxInput, ListLifecycleFlowsByTxOutput, ListLifecycleFlowsInput, ListLifecycleFlowsOutput };
|
|
@@ -17,7 +17,7 @@ declare class MarketOverviewService {
|
|
|
17
17
|
#private;
|
|
18
18
|
constructor(transports: PublicApiTransports, realtime: PolyesterRealtime, scales: SdkScales);
|
|
19
19
|
/**
|
|
20
|
-
* Returns market overview rows with last and index prices, 24h stats, top-of-book values, listing timestamp, and optional sparklines. Supports symbol ID filtering, sorting, pagination, and sparkline interval selection.
|
|
20
|
+
* Returns market overview rows with last and index prices, 24h stats, top-of-book values, listing timestamp, and optional sparklines. Supports symbol ID filtering, sorting, pagination, and sparkline interval selection. A symbol ID that names no configured market is rejected as an invalid argument instead of returning an empty page.
|
|
21
21
|
*/
|
|
22
22
|
list(input?: ListMarketOverviewInput, options?: PolyesterRequestOptions): Promise<{
|
|
23
23
|
markets: MarketOverview[];
|
|
@@ -22,7 +22,7 @@ var MarketOverviewService = class {
|
|
|
22
22
|
this.#marketOverviewSchema = createMarketOverviewSchema(scales);
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Returns market overview rows with last and index prices, 24h stats, top-of-book values, listing timestamp, and optional sparklines. Supports symbol ID filtering, sorting, pagination, and sparkline interval selection.
|
|
25
|
+
* Returns market overview rows with last and index prices, 24h stats, top-of-book values, listing timestamp, and optional sparklines. Supports symbol ID filtering, sorting, pagination, and sparkline interval selection. A symbol ID that names no configured market is rejected as an invalid argument instead of returning an empty page.
|
|
26
26
|
*/
|
|
27
27
|
async list(input = {}, options) {
|
|
28
28
|
const validatedInput = parse(ListMarketOverviewInputSchema, input);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-overview.js","names":["#client","Proto.MarketOverviewService","#realtime","#scales","#marketOverviewSchema","#decodeMarkets","Proto.MarketOverviewBatchSchema"],"sources":["../../../src/services/market-overview/market-overview.ts"],"sourcesContent":["import * as Proto from \"../../gen/marketoverview/v1/marketoverview_pb.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport { parse } from \"../../shared/validation.js\";\nimport { CatalogLookupError } from \"../../catalogs/types.js\";\nimport { isDev } from \"../../utils/is-dev.js\";\nimport type { PolyesterRealtime } from \"../../realtime/types.js\";\nimport { snapshotThenStream } from \"../../realtime/snapshot-then-stream.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport type { PublicApiTransports } from \"../../shared/transports.js\";\nimport {\n CurrencyConversionConfigSchema,\n CurrencyConversionRatesSchema,\n type CurrencyConversionConfig,\n type CurrencyConversionRates,\n SpotVolumeHistoryInputSchema,\n SpotVolumeHistoryResponseSchema,\n type SpotVolumeHistoryInput,\n type SpotVolumeHistoryResponse,\n ListMarketOverviewInputSchema,\n createMarketOverviewSchema,\n type SparklineIntervalName,\n type ListMarketOverviewInput,\n type MarketOverview,\n} from \"./market-overview.schemas.js\";\n\ninterface SubscribeMarketOverviewInput extends BaseSubscribeInput<MarketOverview[]> {\n symbolIds?: number[];\n includeSparklines?: boolean;\n sparklineIntervals?: SparklineIntervalName[];\n}\n\n/**\n * Provides ticker-style per-market stats and a live merged overview stream.\n */\nexport class MarketOverviewService {\n #client: Client<typeof Proto.MarketOverviewService>;\n #realtime: PolyesterRealtime;\n #scales: SdkScales;\n #marketOverviewSchema: ReturnType<typeof createMarketOverviewSchema>;\n\n constructor(transports: PublicApiTransports, realtime: PolyesterRealtime, scales: SdkScales) {\n this.#client = createClient(Proto.MarketOverviewService, transports.publicApi);\n this.#realtime = realtime;\n this.#scales = scales;\n this.#marketOverviewSchema = createMarketOverviewSchema(scales);\n }\n\n /**\n * Returns market overview rows with last and index prices, 24h stats, top-of-book values, listing timestamp, and optional sparklines. Supports symbol ID filtering, sorting, pagination, and sparkline interval selection.\n */\n async list(\n input: ListMarketOverviewInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<{ markets: MarketOverview[]; nextPageToken: string }> {\n const validatedInput = parse(ListMarketOverviewInputSchema, input);\n await this.#scales.ready();\n const res = await this.#client.listMarketOverview(\n validatedInput,\n toConnectCallOptions(options),\n );\n return {\n markets: this.#decodeMarkets(res.markets),\n nextPageToken: res.nextPageToken,\n };\n }\n\n /**\n * Returns 97 aligned trailing-24h USD volume samples at 15-minute intervals.\n * Empty symbolIds selects all pairs. Samples overlap and must not be summed\n * as period volume. Unavailable valuations reject the request.\n */\n async getSpotVolumeHistory(\n input: SpotVolumeHistoryInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<SpotVolumeHistoryResponse> {\n const validated = parse(SpotVolumeHistoryInputSchema, input);\n const response = await this.#client.getSpotVolumeHistory(\n validated,\n toConnectCallOptions(options),\n );\n return parse(SpotVolumeHistoryResponseSchema, response);\n }\n\n /** Returns cacheable display metadata, even before rates have been observed. */\n async getCurrencyConversionConfig(\n options?: PolyesterRequestOptions,\n ): Promise<CurrencyConversionConfig> {\n const response = await this.#client.getCurrencyConversionConfig(\n {},\n toConnectCallOptions(options),\n );\n return parse(CurrencyConversionConfigSchema, response);\n }\n\n /**\n * Returns exact decimal rates with observation times and backend staleness flags.\n * Fiat is units per USD; stablecoins are USD per unit. Unobserved rates remain absent.\n * Rejects as unavailable before any observation exists.\n */\n async getCurrencyConversionRates(\n options?: PolyesterRequestOptions,\n ): Promise<CurrencyConversionRates> {\n const response = await this.#client.getCurrencyConversionRates(\n {},\n toConnectCallOptions(options),\n );\n return parse(CurrencyConversionRatesSchema, response);\n }\n\n /**\n * Decodes market rows, skipping any whose symbolId the catalog cannot resolve\n * (unknown or disabled pairs the backend still reports). Other errors propagate.\n */\n #decodeMarkets(markets: readonly Proto.MarketOverview[]): MarketOverview[] {\n const decoded: MarketOverview[] = [];\n const skipped: number[] = [];\n for (const m of markets) {\n try {\n decoded.push(parse(this.#marketOverviewSchema, m));\n } catch (error) {\n if (\n error instanceof CatalogLookupError &&\n error.domain === \"market\" &&\n error.lookup === \"symbolId\"\n ) {\n skipped.push(m.symbolId);\n continue;\n }\n throw error;\n }\n }\n if (skipped.length > 0 && isDev()) {\n console.warn(\n `[market-overview] skipped ${skipped.length} row(s) with unknown symbolId: ${skipped.join(\", \")}`,\n );\n }\n return decoded;\n }\n\n /**\n * Subscribes to public:spot:market_overview:updates:proto, fetches an initial snapshot, buffers updates until ready, and emits the merged set of latest market rows. On reconnect it refetches the snapshot before resuming updates.\n */\n subscribe(input: SubscribeMarketOverviewInput): () => void {\n const channel = \"public:spot:market_overview:updates:proto\";\n const bySymbolId = new Map<number, MarketOverview>();\n const symbolIds = new Set(input.symbolIds);\n const includeSparklines = input.includeSparklines ?? true;\n const sparklineIntervals = input.sparklineIntervals ?? [\"24h\"];\n const listMarketOverview = this.list.bind(this);\n const parseMarkets = this.#decodeMarkets.bind(this);\n function emit(): void {\n input.onEvent(Array.from(bySymbolId.values()));\n }\n\n function matchesSymbol(market: { symbolId: number }): boolean {\n return symbolIds.size === 0 || symbolIds.has(market.symbolId);\n }\n\n function applyMarkets(markets: readonly MarketOverview[]): void {\n for (const market of markets) {\n if (matchesSymbol(market)) bySymbolId.set(market.symbolId, market);\n }\n }\n\n async function fetchSnapshot(): Promise<MarketOverview[]> {\n const result = await listMarketOverview({\n symbolIds: input.symbolIds,\n includeSparklines,\n sparklineIntervals,\n });\n return result.markets;\n }\n\n const stream = snapshotThenStream({\n realtime: this.#realtime,\n channel,\n schema: Proto.MarketOverviewBatchSchema,\n maxBufferedPublications: 2000,\n snapshotErrorLog: \"Failed to fetch market overview\",\n fetchSnapshot,\n readPublication: (batch) => batch.markets.filter(matchesSymbol),\n bufferPublicationKey: (market) => market.symbolId,\n applySnapshot: (markets, bufferedMarkets) => {\n bySymbolId.clear();\n applyMarkets(markets);\n applyMarkets(parseMarkets(bufferedMarkets));\n emit();\n },\n applyLivePublications: (markets) => {\n applyMarkets(parseMarkets(markets));\n emit();\n },\n onOpen: input.onOpen,\n onClose: input.onClose,\n onError: input.onError,\n });\n\n function dispose(): void {\n stream.unsubscribe();\n }\n\n return dispose;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAuCA,IAAa,wBAAb,MAAmC;CAC/B;CACA;CACA;CACA;CAEA,YAAY,YAAiC,UAA6B,QAAmB;EACzF,KAAKA,UAAU,aAAaC,yBAA6B,WAAW,SAAS;EAC7E,KAAKC,YAAY;EACjB,KAAKC,UAAU;EACf,KAAKC,wBAAwB,2BAA2B,MAAM;CAClE;;;;CAKA,MAAM,KACF,QAAiC,CAAC,GAClC,SAC6D;EAC7D,MAAM,iBAAiB,MAAM,+BAA+B,KAAK;EACjE,MAAM,KAAKD,QAAQ,MAAM;EACzB,MAAM,MAAM,MAAM,KAAKH,QAAQ,mBAC3B,gBACA,qBAAqB,OAAO,CAChC;EACA,OAAO;GACH,SAAS,KAAKK,eAAe,IAAI,OAAO;GACxC,eAAe,IAAI;EACvB;CACJ;;;;;;CAOA,MAAM,qBACF,QAAgC,CAAC,GACjC,SACkC;EAClC,MAAM,YAAY,MAAM,8BAA8B,KAAK;EAC3D,MAAM,WAAW,MAAM,KAAKL,QAAQ,qBAChC,WACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,iCAAiC,QAAQ;CAC1D;;CAGA,MAAM,4BACF,SACiC;EACjC,MAAM,WAAW,MAAM,KAAKA,QAAQ,4BAChC,CAAC,GACD,qBAAqB,OAAO,CAChC;E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AAmB;IACpC,WAAW,MAAM;IACjB;IACA;GACJ,CAAC,EAAA,CACa;EAClB;EAEA,MAAM,SAAS,mBAAmB;GAC9B,UAAU,KAAKH;GACf;GACA,QAAQI;GACR,yBAAyB;GACzB,kBAAkB;GAClB;GACA,kBAAkB,UAAU,MAAM,QAAQ,OAAO,aAAa;GAC9D,uBAAuB,WAAW,OAAO;GACzC,gBAAgB,SAAS,oBAAoB;IACzC,WAAW,MAAM;IACjB,aAAa,OAAO;IACpB,aAAa,aAAa,eAAe,CAAC;IAC1C,KAAK;GACT;GACA,wBAAwB,YAAY;IAChC,aAAa,aAAa,OAAO,CAAC;IAClC,KAAK;GACT;GACA,QAAQ,MAAM;GACd,SAAS,MAAM;GACf,SAAS,MAAM;EACnB,CAAC;EAED,SAAS,UAAgB;GACrB,OAAO,YAAY;EACvB;EAEA,OAAO;CACX;AACJ"}
|
|
1
|
+
{"version":3,"file":"market-overview.js","names":["#client","Proto.MarketOverviewService","#realtime","#scales","#marketOverviewSchema","#decodeMarkets","Proto.MarketOverviewBatchSchema"],"sources":["../../../src/services/market-overview/market-overview.ts"],"sourcesContent":["import * as Proto from \"../../gen/marketoverview/v1/marketoverview_pb.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport { parse } from \"../../shared/validation.js\";\nimport { CatalogLookupError } from \"../../catalogs/types.js\";\nimport { isDev } from \"../../utils/is-dev.js\";\nimport type { PolyesterRealtime } from \"../../realtime/types.js\";\nimport { snapshotThenStream } from \"../../realtime/snapshot-then-stream.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport type { PublicApiTransports } from \"../../shared/transports.js\";\nimport {\n CurrencyConversionConfigSchema,\n CurrencyConversionRatesSchema,\n type CurrencyConversionConfig,\n type CurrencyConversionRates,\n SpotVolumeHistoryInputSchema,\n SpotVolumeHistoryResponseSchema,\n type SpotVolumeHistoryInput,\n type SpotVolumeHistoryResponse,\n ListMarketOverviewInputSchema,\n createMarketOverviewSchema,\n type SparklineIntervalName,\n type ListMarketOverviewInput,\n type MarketOverview,\n} from \"./market-overview.schemas.js\";\n\ninterface SubscribeMarketOverviewInput extends BaseSubscribeInput<MarketOverview[]> {\n symbolIds?: number[];\n includeSparklines?: boolean;\n sparklineIntervals?: SparklineIntervalName[];\n}\n\n/**\n * Provides ticker-style per-market stats and a live merged overview stream.\n */\nexport class MarketOverviewService {\n #client: Client<typeof Proto.MarketOverviewService>;\n #realtime: PolyesterRealtime;\n #scales: SdkScales;\n #marketOverviewSchema: ReturnType<typeof createMarketOverviewSchema>;\n\n constructor(transports: PublicApiTransports, realtime: PolyesterRealtime, scales: SdkScales) {\n this.#client = createClient(Proto.MarketOverviewService, transports.publicApi);\n this.#realtime = realtime;\n this.#scales = scales;\n this.#marketOverviewSchema = createMarketOverviewSchema(scales);\n }\n\n /**\n * Returns market overview rows with last and index prices, 24h stats, top-of-book values, listing timestamp, and optional sparklines. Supports symbol ID filtering, sorting, pagination, and sparkline interval selection. A symbol ID that names no configured market is rejected as an invalid argument instead of returning an empty page.\n */\n async list(\n input: ListMarketOverviewInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<{ markets: MarketOverview[]; nextPageToken: string }> {\n const validatedInput = parse(ListMarketOverviewInputSchema, input);\n await this.#scales.ready();\n const res = await this.#client.listMarketOverview(\n validatedInput,\n toConnectCallOptions(options),\n );\n return {\n markets: this.#decodeMarkets(res.markets),\n nextPageToken: res.nextPageToken,\n };\n }\n\n /**\n * Returns 97 aligned trailing-24h USD volume samples at 15-minute intervals.\n * Empty symbolIds selects all pairs. Samples overlap and must not be summed\n * as period volume. Unavailable valuations reject the request.\n */\n async getSpotVolumeHistory(\n input: SpotVolumeHistoryInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<SpotVolumeHistoryResponse> {\n const validated = parse(SpotVolumeHistoryInputSchema, input);\n const response = await this.#client.getSpotVolumeHistory(\n validated,\n toConnectCallOptions(options),\n );\n return parse(SpotVolumeHistoryResponseSchema, response);\n }\n\n /** Returns cacheable display metadata, even before rates have been observed. */\n async getCurrencyConversionConfig(\n options?: PolyesterRequestOptions,\n ): Promise<CurrencyConversionConfig> {\n const response = await this.#client.getCurrencyConversionConfig(\n {},\n toConnectCallOptions(options),\n );\n return parse(CurrencyConversionConfigSchema, response);\n }\n\n /**\n * Returns exact decimal rates with observation times and backend staleness flags.\n * Fiat is units per USD; stablecoins are USD per unit. Unobserved rates remain absent.\n * Rejects as unavailable before any observation exists.\n */\n async getCurrencyConversionRates(\n options?: PolyesterRequestOptions,\n ): Promise<CurrencyConversionRates> {\n const response = await this.#client.getCurrencyConversionRates(\n {},\n toConnectCallOptions(options),\n );\n return parse(CurrencyConversionRatesSchema, response);\n }\n\n /**\n * Decodes market rows, skipping any whose symbolId the catalog cannot resolve\n * (unknown or disabled pairs the backend still reports). Other errors propagate.\n */\n #decodeMarkets(markets: readonly Proto.MarketOverview[]): MarketOverview[] {\n const decoded: MarketOverview[] = [];\n const skipped: number[] = [];\n for (const m of markets) {\n try {\n decoded.push(parse(this.#marketOverviewSchema, m));\n } catch (error) {\n if (\n error instanceof CatalogLookupError &&\n error.domain === \"market\" &&\n error.lookup === \"symbolId\"\n ) {\n skipped.push(m.symbolId);\n continue;\n }\n throw error;\n }\n }\n if (skipped.length > 0 && isDev()) {\n console.warn(\n `[market-overview] skipped ${skipped.length} row(s) with unknown symbolId: ${skipped.join(\", \")}`,\n );\n }\n return decoded;\n }\n\n /**\n * Subscribes to public:spot:market_overview:updates:proto, fetches an initial snapshot, buffers updates until ready, and emits the merged set of latest market rows. On reconnect it refetches the snapshot before resuming updates.\n */\n subscribe(input: SubscribeMarketOverviewInput): () => void {\n const channel = \"public:spot:market_overview:updates:proto\";\n const bySymbolId = new Map<number, MarketOverview>();\n const symbolIds = new Set(input.symbolIds);\n const includeSparklines = input.includeSparklines ?? true;\n const sparklineIntervals = input.sparklineIntervals ?? [\"24h\"];\n const listMarketOverview = this.list.bind(this);\n const parseMarkets = this.#decodeMarkets.bind(this);\n function emit(): void {\n input.onEvent(Array.from(bySymbolId.values()));\n }\n\n function matchesSymbol(market: { symbolId: number }): boolean {\n return symbolIds.size === 0 || symbolIds.has(market.symbolId);\n }\n\n function applyMarkets(markets: readonly MarketOverview[]): void {\n for (const market of markets) {\n if (matchesSymbol(market)) bySymbolId.set(market.symbolId, market);\n }\n }\n\n async function fetchSnapshot(): Promise<MarketOverview[]> {\n const result = await listMarketOverview({\n symbolIds: input.symbolIds,\n includeSparklines,\n sparklineIntervals,\n });\n return result.markets;\n }\n\n const stream = snapshotThenStream({\n realtime: this.#realtime,\n channel,\n schema: Proto.MarketOverviewBatchSchema,\n maxBufferedPublications: 2000,\n snapshotErrorLog: \"Failed to fetch market overview\",\n fetchSnapshot,\n readPublication: (batch) => batch.markets.filter(matchesSymbol),\n bufferPublicationKey: (market) => market.symbolId,\n applySnapshot: (markets, bufferedMarkets) => {\n bySymbolId.clear();\n applyMarkets(markets);\n applyMarkets(parseMarkets(bufferedMarkets));\n emit();\n },\n applyLivePublications: (markets) => {\n applyMarkets(parseMarkets(markets));\n emit();\n },\n onOpen: input.onOpen,\n onClose: input.onClose,\n onError: input.onError,\n });\n\n function dispose(): void {\n stream.unsubscribe();\n }\n\n return dispose;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAuCA,IAAa,wBAAb,MAAmC;CAC/B;CACA;CACA;CACA;CAEA,YAAY,YAAiC,UAA6B,QAAmB;EACzF,KAAKA,UAAU,aAAaC,yBAA6B,WAAW,SAAS;EAC7E,KAAKC,YAAY;EACjB,KAAKC,UAAU;EACf,KAAKC,wBAAwB,2BAA2B,MAAM;CAClE;;;;CAKA,MAAM,KACF,QAAiC,CAAC,GAClC,SAC6D;EAC7D,MAAM,iBAAiB,MAAM,+BAA+B,KAAK;EACjE,MAAM,KAAKD,QAAQ,MAAM;EACzB,MAAM,MAAM,MA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AsB,CAAC,KAAK;EAC7D,MAAM,qBAAqB,KAAK,KAAK,KAAK,IAAI;EAC9C,MAAM,eAAe,KAAKC,eAAe,KAAK,IAAI;EAClD,SAAS,OAAa;GAClB,MAAM,QAAQ,MAAM,KAAK,WAAW,OAAO,CAAC,CAAC;EACjD;EAEA,SAAS,cAAc,QAAuC;GAC1D,OAAO,UAAU,SAAS,KAAK,UAAU,IAAI,OAAO,QAAQ;EAChE;EAEA,SAAS,aAAa,SAA0C;GAC5D,KAAK,MAAM,UAAU,SACjB,IAAI,cAAc,MAAM,GAAG,WAAW,IAAI,OAAO,UAAU,MAAM;EAEzE;EAEA,eAAe,gBAA2C;GAMtD,QAAO,MALc,mBAAmB;IACpC,WAAW,MAAM;IACjB;IACA;GACJ,CAAC,EAAA,CACa;EAClB;EAEA,MAAM,SAAS,mBAAmB;GAC9B,UAAU,KAAKH;GACf;GACA,QAAQI;GACR,yBAAyB;GACzB,kBAAkB;GAClB;GACA,kBAAkB,UAAU,MAAM,QAAQ,OAAO,aAAa;GAC9D,uBAAuB,WAAW,OAAO;GACzC,gBAAgB,SAAS,oBAAoB;IACzC,WAAW,MAAM;IACjB,aAAa,OAAO;IACpB,aAAa,aAAa,eAAe,CAAC;IAC1C,KAAK;GACT;GACA,wBAAwB,YAAY;IAChC,aAAa,aAAa,OAAO,CAAC;IAClC,KAAK;GACT;GACA,QAAQ,MAAM;GACd,SAAS,MAAM;GACf,SAAS,MAAM;EACnB,CAAC;EAED,SAAS,UAAgB;GACrB,OAAO,YAAY;EACvB;EAEA,OAAO;CACX;AACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../gen/notifications/v1/notifications_pb.js";
|
|
2
2
|
//#region src/services/notifications/notifications.codecs.d.ts
|
|
3
|
-
declare const NOTIFICATION_TYPE_VALUES: readonly ["price_alert", "telegram_approval"];
|
|
3
|
+
declare const NOTIFICATION_TYPE_VALUES: readonly ["price_alert", "telegram_approval", "broker_allowlist_change"];
|
|
4
4
|
/** What a notification reports; each type belongs to one category. */
|
|
5
5
|
type NotificationType = (typeof NOTIFICATION_TYPE_VALUES)[number];
|
|
6
6
|
declare const NOTIFICATION_CATEGORY_VALUES: readonly ["alerts", "security"];
|
|
@@ -11,6 +11,12 @@ type NotificationReadState = (typeof NOTIFICATION_READ_STATE_VALUES)[number];
|
|
|
11
11
|
declare const TELEGRAM_APPROVAL_ACTION_VALUES: readonly ["place_order", "place_orders", "modify_orders", "cancel_order", "cancel_all_orders", "modify_trigger", "pause_trigger", "resume_trigger", "swap"];
|
|
12
12
|
/** What an approval from the linked Telegram account approved. */
|
|
13
13
|
type TelegramApprovalAction = (typeof TELEGRAM_APPROVAL_ACTION_VALUES)[number];
|
|
14
|
+
declare const BROKER_ALLOWLIST_EVENT_VALUES: readonly ["change_requested", "change_applied", "change_not_applied"];
|
|
15
|
+
/** What happened to a broker vault payout address change. `change_not_applied` is final. */
|
|
16
|
+
type BrokerAllowlistEvent = (typeof BROKER_ALLOWLIST_EVENT_VALUES)[number];
|
|
17
|
+
declare const BROKER_ALLOWLIST_ACTION_VALUES: readonly ["add_destination", "remove_destination"];
|
|
18
|
+
/** Whether a broker vault payout address change adds or removes the address. */
|
|
19
|
+
type BrokerAllowlistAction = (typeof BROKER_ALLOWLIST_ACTION_VALUES)[number];
|
|
14
20
|
//#endregion
|
|
15
|
-
export { NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_READ_STATE_VALUES, NOTIFICATION_TYPE_VALUES, NotificationCategory, NotificationReadState, NotificationType, TELEGRAM_APPROVAL_ACTION_VALUES, TelegramApprovalAction };
|
|
21
|
+
export { BROKER_ALLOWLIST_ACTION_VALUES, BROKER_ALLOWLIST_EVENT_VALUES, BrokerAllowlistAction, BrokerAllowlistEvent, NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_READ_STATE_VALUES, NOTIFICATION_TYPE_VALUES, NotificationCategory, NotificationReadState, NotificationType, TELEGRAM_APPROVAL_ACTION_VALUES, TelegramApprovalAction };
|
|
16
22
|
//# sourceMappingURL=notifications.codecs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.codecs.d.ts","names":[],"sources":["../../../src/services/notifications/notifications.codecs.ts"],"mappings":";;cAGa;;
|
|
1
|
+
{"version":3,"file":"notifications.codecs.d.ts","names":[],"sources":["../../../src/services/notifications/notifications.codecs.ts"],"mappings":";;cAGa;;KAMD,2BAA2B;cAE1B;;KAED,+BAA+B;cAE9B;KACD,gCAAgC;cAE/B;;KAYD,iCAAiC;cAEhC;;KAMD,+BAA+B;cAE9B;;KAED,gCAAgC"}
|
|
@@ -5,7 +5,8 @@ const NOTIFICATION_READ_STATE_VALUES = ["unread", "read"];
|
|
|
5
5
|
const NotificationTypeCodec = { protoToOutput: {
|
|
6
6
|
[0]: "unspecified",
|
|
7
7
|
[1]: "price_alert",
|
|
8
|
-
[2]: "telegram_approval"
|
|
8
|
+
[2]: "telegram_approval",
|
|
9
|
+
[3]: "broker_allowlist_change"
|
|
9
10
|
} };
|
|
10
11
|
const NotificationCategoryCodec = {
|
|
11
12
|
inputToProto: {
|
|
@@ -34,7 +35,18 @@ const TelegramApprovalActionCodec = { protoToOutput: {
|
|
|
34
35
|
[8]: "resume_trigger",
|
|
35
36
|
[9]: "swap"
|
|
36
37
|
} };
|
|
38
|
+
const BrokerAllowlistEventCodec = { protoToOutput: {
|
|
39
|
+
[0]: "unspecified",
|
|
40
|
+
[1]: "change_requested",
|
|
41
|
+
[2]: "change_applied",
|
|
42
|
+
[3]: "change_not_applied"
|
|
43
|
+
} };
|
|
44
|
+
const BrokerAllowlistActionCodec = { protoToOutput: {
|
|
45
|
+
[0]: "unspecified",
|
|
46
|
+
[1]: "add_destination",
|
|
47
|
+
[2]: "remove_destination"
|
|
48
|
+
} };
|
|
37
49
|
//#endregion
|
|
38
|
-
export { NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_READ_STATE_VALUES, NotificationCategoryCodec, NotificationReadStateCodec, NotificationTypeCodec, TelegramApprovalActionCodec };
|
|
50
|
+
export { BrokerAllowlistActionCodec, BrokerAllowlistEventCodec, NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_READ_STATE_VALUES, NotificationCategoryCodec, NotificationReadStateCodec, NotificationTypeCodec, TelegramApprovalActionCodec };
|
|
39
51
|
|
|
40
52
|
//# sourceMappingURL=notifications.codecs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.codecs.js","names":[],"sources":["../../../src/services/notifications/notifications.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/notifications/v1/notifications_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const NOTIFICATION_TYPE_VALUES = [\"price_alert\"
|
|
1
|
+
{"version":3,"file":"notifications.codecs.js","names":[],"sources":["../../../src/services/notifications/notifications.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/notifications/v1/notifications_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const NOTIFICATION_TYPE_VALUES = [\n \"price_alert\",\n \"telegram_approval\",\n \"broker_allowlist_change\",\n] as const;\n/** What a notification reports; each type belongs to one category. */\nexport type NotificationType = (typeof NOTIFICATION_TYPE_VALUES)[number];\n\nexport const NOTIFICATION_CATEGORY_VALUES = [\"alerts\", \"security\"] as const;\n/** `alerts` holds alerts the caller set; `security` holds account security events. */\nexport type NotificationCategory = (typeof NOTIFICATION_CATEGORY_VALUES)[number];\n\nexport const NOTIFICATION_READ_STATE_VALUES = [\"unread\", \"read\"] as const;\nexport type NotificationReadState = (typeof NOTIFICATION_READ_STATE_VALUES)[number];\n\nexport const TELEGRAM_APPROVAL_ACTION_VALUES = [\n \"place_order\",\n \"place_orders\",\n \"modify_orders\",\n \"cancel_order\",\n \"cancel_all_orders\",\n \"modify_trigger\",\n \"pause_trigger\",\n \"resume_trigger\",\n \"swap\",\n] as const;\n/** What an approval from the linked Telegram account approved. */\nexport type TelegramApprovalAction = (typeof TELEGRAM_APPROVAL_ACTION_VALUES)[number];\n\nexport const BROKER_ALLOWLIST_EVENT_VALUES = [\n \"change_requested\",\n \"change_applied\",\n \"change_not_applied\",\n] as const;\n/** What happened to a broker vault payout address change. `change_not_applied` is final. */\nexport type BrokerAllowlistEvent = (typeof BROKER_ALLOWLIST_EVENT_VALUES)[number];\n\nexport const BROKER_ALLOWLIST_ACTION_VALUES = [\"add_destination\", \"remove_destination\"] as const;\n/** Whether a broker vault payout address change adds or removes the address. */\nexport type BrokerAllowlistAction = (typeof BROKER_ALLOWLIST_ACTION_VALUES)[number];\n\nexport const NotificationTypeCodec = {\n protoToOutput: {\n [Proto.NotificationType.TYPE_UNSPECIFIED]: \"unspecified\",\n [Proto.NotificationType.PRICE_ALERT]: \"price_alert\",\n [Proto.NotificationType.TELEGRAM_APPROVAL]: \"telegram_approval\",\n [Proto.NotificationType.BROKER_ALLOWLIST_CHANGE]: \"broker_allowlist_change\",\n } satisfies ProtoToOutput<Proto.NotificationType, NotificationType>,\n} as const;\n\nexport const NotificationCategoryCodec = {\n inputToProto: {\n alerts: Proto.NotificationCategory.ALERTS,\n security: Proto.NotificationCategory.SECURITY,\n } satisfies InputToProto<NotificationCategory, Proto.NotificationCategory>,\n protoToOutput: {\n [Proto.NotificationCategory.CATEGORY_UNSPECIFIED]: \"unspecified\",\n [Proto.NotificationCategory.ALERTS]: \"alerts\",\n [Proto.NotificationCategory.SECURITY]: \"security\",\n } satisfies ProtoToOutput<Proto.NotificationCategory, NotificationCategory>,\n} as const;\n\nexport const NotificationReadStateCodec = {\n inputToProto: {\n unread: Proto.ReadState.UNREAD,\n read: Proto.ReadState.READ,\n } satisfies InputToProto<NotificationReadState, Proto.ReadState>,\n} as const;\n\nexport const TelegramApprovalActionCodec = {\n protoToOutput: {\n [Proto.TelegramApprovalAction.ACTION_UNSPECIFIED]: \"unspecified\",\n [Proto.TelegramApprovalAction.PLACE_ORDER]: \"place_order\",\n [Proto.TelegramApprovalAction.PLACE_ORDERS]: \"place_orders\",\n [Proto.TelegramApprovalAction.MODIFY_ORDERS]: \"modify_orders\",\n [Proto.TelegramApprovalAction.CANCEL_ORDER]: \"cancel_order\",\n [Proto.TelegramApprovalAction.CANCEL_ALL_ORDERS]: \"cancel_all_orders\",\n [Proto.TelegramApprovalAction.MODIFY_TRIGGER]: \"modify_trigger\",\n [Proto.TelegramApprovalAction.PAUSE_TRIGGER]: \"pause_trigger\",\n [Proto.TelegramApprovalAction.RESUME_TRIGGER]: \"resume_trigger\",\n [Proto.TelegramApprovalAction.SWAP]: \"swap\",\n } satisfies ProtoToOutput<Proto.TelegramApprovalAction, TelegramApprovalAction>,\n} as const;\n\nexport const BrokerAllowlistEventCodec = {\n protoToOutput: {\n [Proto.BrokerAllowlistEvent.BROKER_ALLOWLIST_EVENT_UNSPECIFIED]: \"unspecified\",\n [Proto.BrokerAllowlistEvent.CHANGE_REQUESTED]: \"change_requested\",\n [Proto.BrokerAllowlistEvent.CHANGE_APPLIED]: \"change_applied\",\n [Proto.BrokerAllowlistEvent.CHANGE_NOT_APPLIED]: \"change_not_applied\",\n } satisfies ProtoToOutput<Proto.BrokerAllowlistEvent, BrokerAllowlistEvent>,\n} as const;\n\nexport const BrokerAllowlistActionCodec = {\n protoToOutput: {\n [Proto.BrokerAllowlistAction.BROKER_ALLOWLIST_ACTION_UNSPECIFIED]: \"unspecified\",\n [Proto.BrokerAllowlistAction.ADD_DESTINATION]: \"add_destination\",\n [Proto.BrokerAllowlistAction.REMOVE_DESTINATION]: \"remove_destination\",\n } satisfies ProtoToOutput<Proto.BrokerAllowlistAction, BrokerAllowlistAction>,\n} as const;\n"],"mappings":";;AAWA,MAAa,+BAA+B,CAAC,UAAU,UAAU;AAIjE,MAAa,iCAAiC,CAAC,UAAU,MAAM;AA6B/D,MAAa,wBAAwB,EACjC,eAAe;EACgC,IAAA;EACL,IAAA;EACM,IAAA;EACM,IAAA;AACtD,EACJ;AAEA,MAAa,4BAA4B;CACrC,cAAc;EACV,QAAA;EACA,UAAA;CACJ;CACA,eAAe;GACwC,IAAA;GACd,IAAA;GACE,IAAA;CAC3C;AACJ;AAEA,MAAa,6BAA6B,EACtC,cAAc;CACV,QAAA;CACA,MAAA;AACJ,EACJ;AAEA,MAAa,8BAA8B,EACvC,eAAe;EACwC,IAAA;EACP,IAAA;EACC,IAAA;EACC,IAAA;EACD,IAAA;EACK,IAAA;EACH,IAAA;EACD,IAAA;EACC,IAAA;EACV,IAAA;AACzC,EACJ;AAEA,MAAa,4BAA4B,EACrC,eAAe;EACsD,IAAA;EAClB,IAAA;EACF,IAAA;EACI,IAAA;AACrD,EACJ;AAEA,MAAa,6BAA6B,EACtC,eAAe;EACwD,IAAA;EACpB,IAAA;EACG,IAAA;AACtD,EACJ"}
|
|
@@ -56,7 +56,7 @@ declare const MarkAllNotificationsReadInputSchema: v.StrictObjectSchema<{
|
|
|
56
56
|
type MarkAllNotificationsReadInput = v.InferInput<typeof MarkAllNotificationsReadInputSchema>;
|
|
57
57
|
declare function formatNotification(notification: Notification): {
|
|
58
58
|
notificationId: string;
|
|
59
|
-
type: "unspecified" | "price_alert" | "telegram_approval";
|
|
59
|
+
type: "unspecified" | "price_alert" | "telegram_approval" | "broker_allowlist_change";
|
|
60
60
|
category: "unspecified" | "alerts" | "security";
|
|
61
61
|
/** Plain-text title, the same for every notification of a type. */
|
|
62
62
|
title: string;
|
|
@@ -77,17 +77,37 @@ declare function formatNotification(notification: Notification): {
|
|
|
77
77
|
/** Price that fired the alert, as a decimal string. */
|
|
78
78
|
triggeredPrice: string;
|
|
79
79
|
triggeredAt: number | null;
|
|
80
|
+
/** The approval's ID in `client.assistant`. */
|
|
80
81
|
approvalId?: undefined;
|
|
81
82
|
action?: undefined;
|
|
83
|
+
/** Trading account (subaccount) the action acted on. */
|
|
82
84
|
accountId?: undefined;
|
|
83
85
|
summary?: undefined;
|
|
86
|
+
/** Key parameters in display order, such as market, side and quantity. */
|
|
84
87
|
parameters?: undefined;
|
|
85
88
|
approvedAt?: undefined;
|
|
89
|
+
broker?: undefined;
|
|
90
|
+
/** Sub-account ID of the broker vault. */
|
|
91
|
+
vaultAccountId?: undefined;
|
|
92
|
+
/** The change's ID; key the broker's vault allowlist view on it. */
|
|
93
|
+
changeId?: undefined;
|
|
94
|
+
event?: undefined;
|
|
95
|
+
/** Destination chain ID, as a decimal string. */
|
|
96
|
+
destinationChainId?: undefined;
|
|
97
|
+
destinationAddress?: undefined;
|
|
98
|
+
/** The requesting member's name for an added address; empty when none. */
|
|
99
|
+
label?: undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Account ID of the member who requested the change. Show a `change_requested`
|
|
102
|
+
* the caller did not make prominently: an added address becomes payable 24 hours
|
|
103
|
+
* after it is listed.
|
|
104
|
+
*/
|
|
105
|
+
requestedByAccountId?: undefined;
|
|
86
106
|
} | {
|
|
87
107
|
type: "telegram_approval";
|
|
88
108
|
/** The approval's ID in `client.assistant`. */
|
|
89
109
|
approvalId: string;
|
|
90
|
-
action: "unspecified" | "swap" | "
|
|
110
|
+
action: "unspecified" | "swap" | "place_order" | "place_orders" | "modify_orders" | "cancel_order" | "cancel_all_orders" | "modify_trigger" | "pause_trigger" | "resume_trigger";
|
|
91
111
|
/** Trading account (subaccount) the action acted on. */
|
|
92
112
|
accountId: string;
|
|
93
113
|
summary: string;
|
|
@@ -102,10 +122,66 @@ declare function formatNotification(notification: Notification): {
|
|
|
102
122
|
symbolId?: undefined;
|
|
103
123
|
direction?: undefined;
|
|
104
124
|
priceSource?: undefined;
|
|
125
|
+
/** Alert price, as a decimal string. */
|
|
105
126
|
price?: undefined;
|
|
106
127
|
/** Price that fired the alert, as a decimal string. */
|
|
107
128
|
triggeredPrice?: undefined;
|
|
108
129
|
triggeredAt?: undefined;
|
|
130
|
+
broker?: undefined;
|
|
131
|
+
/** Sub-account ID of the broker vault. */
|
|
132
|
+
vaultAccountId?: undefined;
|
|
133
|
+
/** The change's ID; key the broker's vault allowlist view on it. */
|
|
134
|
+
changeId?: undefined;
|
|
135
|
+
event?: undefined;
|
|
136
|
+
/** Destination chain ID, as a decimal string. */
|
|
137
|
+
destinationChainId?: undefined;
|
|
138
|
+
destinationAddress?: undefined;
|
|
139
|
+
/** The requesting member's name for an added address; empty when none. */
|
|
140
|
+
label?: undefined;
|
|
141
|
+
/**
|
|
142
|
+
* Account ID of the member who requested the change. Show a `change_requested`
|
|
143
|
+
* the caller did not make prominently: an added address becomes payable 24 hours
|
|
144
|
+
* after it is listed.
|
|
145
|
+
*/
|
|
146
|
+
requestedByAccountId?: undefined;
|
|
147
|
+
} | {
|
|
148
|
+
type: "broker_allowlist_change";
|
|
149
|
+
broker: string;
|
|
150
|
+
/** Sub-account ID of the broker vault. */
|
|
151
|
+
vaultAccountId: string;
|
|
152
|
+
/** The change's ID; key the broker's vault allowlist view on it. */
|
|
153
|
+
changeId: string;
|
|
154
|
+
event: "unspecified" | "change_requested" | "change_applied" | "change_not_applied";
|
|
155
|
+
action: "unspecified" | "add_destination" | "remove_destination";
|
|
156
|
+
/** Destination chain ID, as a decimal string. */
|
|
157
|
+
destinationChainId: string;
|
|
158
|
+
destinationAddress: string;
|
|
159
|
+
/** The requesting member's name for an added address; empty when none. */
|
|
160
|
+
label: string;
|
|
161
|
+
/**
|
|
162
|
+
* Account ID of the member who requested the change. Show a `change_requested`
|
|
163
|
+
* the caller did not make prominently: an added address becomes payable 24 hours
|
|
164
|
+
* after it is listed.
|
|
165
|
+
*/
|
|
166
|
+
requestedByAccountId: string;
|
|
167
|
+
/** The alert's ID in `client.priceAlerts`. */
|
|
168
|
+
alertId?: undefined;
|
|
169
|
+
symbolId?: undefined;
|
|
170
|
+
direction?: undefined;
|
|
171
|
+
priceSource?: undefined;
|
|
172
|
+
/** Alert price, as a decimal string. */
|
|
173
|
+
price?: undefined;
|
|
174
|
+
/** Price that fired the alert, as a decimal string. */
|
|
175
|
+
triggeredPrice?: undefined;
|
|
176
|
+
triggeredAt?: undefined;
|
|
177
|
+
/** The approval's ID in `client.assistant`. */
|
|
178
|
+
approvalId?: undefined;
|
|
179
|
+
/** Trading account (subaccount) the action acted on. */
|
|
180
|
+
accountId?: undefined;
|
|
181
|
+
summary?: undefined;
|
|
182
|
+
/** Key parameters in display order, such as market, side and quantity. */
|
|
183
|
+
parameters?: undefined;
|
|
184
|
+
approvedAt?: undefined;
|
|
109
185
|
} | {
|
|
110
186
|
type: "unspecified";
|
|
111
187
|
/** The alert's ID in `client.priceAlerts`. */
|
|
@@ -113,16 +189,37 @@ declare function formatNotification(notification: Notification): {
|
|
|
113
189
|
symbolId?: undefined;
|
|
114
190
|
direction?: undefined;
|
|
115
191
|
priceSource?: undefined;
|
|
192
|
+
/** Alert price, as a decimal string. */
|
|
116
193
|
price?: undefined;
|
|
117
194
|
/** Price that fired the alert, as a decimal string. */
|
|
118
195
|
triggeredPrice?: undefined;
|
|
119
196
|
triggeredAt?: undefined;
|
|
197
|
+
/** The approval's ID in `client.assistant`. */
|
|
120
198
|
approvalId?: undefined;
|
|
121
199
|
action?: undefined;
|
|
200
|
+
/** Trading account (subaccount) the action acted on. */
|
|
122
201
|
accountId?: undefined;
|
|
123
202
|
summary?: undefined;
|
|
203
|
+
/** Key parameters in display order, such as market, side and quantity. */
|
|
124
204
|
parameters?: undefined;
|
|
125
205
|
approvedAt?: undefined;
|
|
206
|
+
broker?: undefined;
|
|
207
|
+
/** Sub-account ID of the broker vault. */
|
|
208
|
+
vaultAccountId?: undefined;
|
|
209
|
+
/** The change's ID; key the broker's vault allowlist view on it. */
|
|
210
|
+
changeId?: undefined;
|
|
211
|
+
event?: undefined;
|
|
212
|
+
/** Destination chain ID, as a decimal string. */
|
|
213
|
+
destinationChainId?: undefined;
|
|
214
|
+
destinationAddress?: undefined;
|
|
215
|
+
/** The requesting member's name for an added address; empty when none. */
|
|
216
|
+
label?: undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Account ID of the member who requested the change. Show a `change_requested`
|
|
219
|
+
* the caller did not make prominently: an added address becomes payable 24 hours
|
|
220
|
+
* after it is listed.
|
|
221
|
+
*/
|
|
222
|
+
requestedByAccountId?: undefined;
|
|
126
223
|
};
|
|
127
224
|
};
|
|
128
225
|
/**
|
|
@@ -141,7 +238,7 @@ declare function formatNotificationCounts(counts: GetNotificationCountsResponse)
|
|
|
141
238
|
unread: number;
|
|
142
239
|
/** Every type in ascending enum order, including types with no notification. */
|
|
143
240
|
types: {
|
|
144
|
-
type: "unspecified" | "price_alert" | "telegram_approval";
|
|
241
|
+
type: "unspecified" | "price_alert" | "telegram_approval" | "broker_allowlist_change";
|
|
145
242
|
category: "unspecified" | "alerts" | "security";
|
|
146
243
|
total: number;
|
|
147
244
|
unread: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.schemas.d.ts","names":[],"sources":["../../../src/services/notifications/notifications.schemas.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"notifications.schemas.d.ts","names":[],"sources":["../../../src/services/notifications/notifications.schemas.ts"],"mappings":";;;cA2Ca,8BAA4B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2B7B,yBAAyB,EAAE,kBAAkB;cAE5C,4BAA0B,EAAA;;;KAI3B,uBAAuB,EAAE,kBAAkB;cAE1C,8BAA4B,EAAA;;;;KAU7B,yBAAyB,EAAE,kBAAkB;cAE5C,qCAAmC,EAAA;;;;;;;;KASpC,gCAAgC,EAAE,kBACnC;iBA4EK,mBAAmB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoBrC,sBAAsB,kBAAkB;KAExC,4BAA4B;;KAG5B;EACR,eAAe;EACf;;iBAGY,yBAAyB,QAAQ;;;;;;;;;;;;KAerC,qBAAqB,kBAAkB"}
|
|
@@ -5,7 +5,7 @@ import { enumLabel } from "../../shared/proto-enum-codec.js";
|
|
|
5
5
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
6
6
|
import { msToTimestamp } from "../../utils/timestamp.js";
|
|
7
7
|
import { PriceAlertDirectionCodec, PriceAlertPriceSourceCodec } from "../price-alerts/price-alerts.codecs.js";
|
|
8
|
-
import { NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_READ_STATE_VALUES, NotificationCategoryCodec, NotificationReadStateCodec, NotificationTypeCodec, TelegramApprovalActionCodec } from "./notifications.codecs.js";
|
|
8
|
+
import { BrokerAllowlistActionCodec, BrokerAllowlistEventCodec, NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_READ_STATE_VALUES, NotificationCategoryCodec, NotificationReadStateCodec, NotificationTypeCodec, TelegramApprovalActionCodec } from "./notifications.codecs.js";
|
|
9
9
|
import * as v from "valibot";
|
|
10
10
|
//#region src/services/notifications/notifications.schemas.ts
|
|
11
11
|
const NotificationIdInputSchema = idInputSchema("notificationId");
|
|
@@ -79,6 +79,30 @@ function formatDetail(detail) {
|
|
|
79
79
|
approvedAt: tsObjToMs(notice.approvedAt) ?? null
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
+
case "brokerAllowlist": {
|
|
83
|
+
const notice = detail.value;
|
|
84
|
+
return {
|
|
85
|
+
type: "broker_allowlist_change",
|
|
86
|
+
broker: notice.broker,
|
|
87
|
+
/** Sub-account ID of the broker vault. */
|
|
88
|
+
vaultAccountId: formatId(notice.vaultAccountId),
|
|
89
|
+
/** The change's ID; key the broker's vault allowlist view on it. */
|
|
90
|
+
changeId: formatId(notice.changeId),
|
|
91
|
+
event: enumLabel(BrokerAllowlistEventCodec.protoToOutput, notice.event),
|
|
92
|
+
action: enumLabel(BrokerAllowlistActionCodec.protoToOutput, notice.action),
|
|
93
|
+
/** Destination chain ID, as a decimal string. */
|
|
94
|
+
destinationChainId: notice.destinationChainId.toString(),
|
|
95
|
+
destinationAddress: notice.destinationAddress,
|
|
96
|
+
/** The requesting member's name for an added address; empty when none. */
|
|
97
|
+
label: notice.label,
|
|
98
|
+
/**
|
|
99
|
+
* Account ID of the member who requested the change. Show a `change_requested`
|
|
100
|
+
* the caller did not make prominently: an added address becomes payable 24 hours
|
|
101
|
+
* after it is listed.
|
|
102
|
+
*/
|
|
103
|
+
requestedByAccountId: formatId(notice.requestedByAccountId)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
82
106
|
default: return { type: "unspecified" };
|
|
83
107
|
}
|
|
84
108
|
}
|