Skip to content
markpaper

src/account/call.ts

v0.3.0 · 508 B

Download file
import type { InfoCallOptions } from '../transport/types.js';

/** Per-call transport options forwarded to the InfoRequester. */
export interface AccountCallOptions {
  signal?: AbortSignal;
  timeoutMs?: number;
}

export function callOptions(opts: AccountCallOptions | undefined): InfoCallOptions | undefined {
  if (!opts) return undefined;
  const out: InfoCallOptions = {};
  if (opts.signal) out.signal = opts.signal;
  if (opts.timeoutMs !== undefined) out.timeoutMs = opts.timeoutMs;
  return out;
}
All files