Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions packages/core-ts/src/routing/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ErrorCode, Warning } from "../address/types";

export type RoutingSource = "muxed" | "memo" | "none";

export type RoutingInput = {
destination: string;
memoType: string;
Expand All @@ -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;
}
}
Loading