From b51bfc338149840f05d1c7d51bb3251d7f61d34c Mon Sep 17 00:00:00 2001 From: MD JUBER QURAISHI Date: Thu, 26 Mar 2026 22:29:42 +0530 Subject: [PATCH] feat: define RoutingSource string literal union --- packages/core-ts/src/routing/types.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/core-ts/src/routing/types.ts b/packages/core-ts/src/routing/types.ts index bf6b5a3c..ae263c19 100644 --- a/packages/core-ts/src/routing/types.ts +++ b/packages/core-ts/src/routing/types.ts @@ -1,5 +1,7 @@ import { ErrorCode, Warning } from "../address/types"; +export type RoutingSource = "muxed" | "memo" | "none"; + export type RoutingInput = { destination: string; memoType: string; @@ -12,18 +14,14 @@ export type KnownMemoType = "none" | "id" | "text" | "hash" | "return"; export type RoutingResult = { destinationBaseAccount: string | null; routingId: string | null; // decimal uint64 string — spec level - routingSource: "muxed" | "memo" | "none"; + routingSource: RoutingSource; warnings: Warning[]; // WarningCode only, always destinationError?: { - // ErrorCode only, when destination unparseable code: ErrorCode; message: string; }; }; -/** - * Ergonomic helper for TypeScript callers to get a BigInt from the routingId string. - */ export function routingIdAsBigInt(routingId: string | null): bigint | null { return routingId ? BigInt(routingId) : null; -} +} \ No newline at end of file