EasyPath SDK
    Preparing search index...

    Class EasyPath

    Node.js 22+ client. Validates wire data, keeps amounts as strings and never signs a transaction.

    Index
    • Read available customer capacity. Does not reserve inventory or create an intent.

      Parameters

      • Optionalsignal: AbortSignal

      Returns Promise<
          {
              dailyUsd: { limit: string; remaining: string };
              maxPerOrderUsd: string;
              monthlyUsd: { limit: string; remaining: string };
              openIntents: { limit: number; remaining: number };
              tokens: {
                  availableAtoms: string;
                  chainId: string;
                  maxPerOrderAtoms?: string | null;
                  token: string;
              }[];
          },
      >

    • Long-poll status changes in order until a terminal state. Uses REST only.

      Parameters

      Returns AsyncGenerator<
          {
              amountOut: string
              | null;
              depositTxHash: string | null;
              failureReason: { code: string; message: string } | null;
              fillTxHash: string | null;
              intentId: string;
              latencyMs: number | null;
              metrics?: {
                  chainLatency?: {
                      alignedMs: number | null;
                      destination: {
                          block?: number;
                          chain: "solana" | "robinhood";
                          count: number;
                          index: number;
                          second: number;
                          slot?: number;
                      };
                      direction: "refund"
                      | "buy"
                      | "sell";
                      era: "pre-alpenglow" | "alpenglow" | null;
                      excluded: boolean;
                      origin: {
                          block?: number;
                          chain: "solana" | "robinhood";
                          count: number;
                          index: number;
                          second: number;
                          slot?: number;
                      };
                      provisional: boolean;
                      rawMs: number;
                      shiftMs: number
                      | null;
                  };
                  sends?: {
                      at: number;
                      attempt: number;
                      chain: "solana"
                      | "robinhood";
                      kind: "deposit" | "fill" | "refund";
                      lanes: {
                          code?: number;
                          label: string;
                          latencyUs?: number;
                          outcome: "accepted" | "failed" | "silent";
                          reason?:
                              | "rpc"
                              | "http"
                              | "timeout"
                              | "transport"
                              | "decode"
                              | "busy"
                              | "mismatch";
                      }[];
                      races: number;
                      winner: string
                      | null;
                  }[];
              };
              refundTxHash: string
              | null;
              status:
                  | "failed"
                  | "pending"
                  | "filling"
                  | "filled"
                  | "settled"
                  | "refunding"
                  | "refunded"
                  | "expired"
                  | "held"
                  | "reversed";
              statusSeq: number;
              timestamps: {
                  depositSeen: number
                  | null;
                  filled: number | null;
                  quoted: number;
                  refunded: number | null;
                  settled: number | null;
              };
          },
      >

    • Indicative price for a route and amount. Creates no intent and reserves nothing, so it is safe to call while a user types. Not binding: only quote sets minAmountOut.

      Parameters

      • params: {
            amount: string;
            destinationChainId: string;
            destinationToken: string;
            originChainId: string;
            originToken: string;
            slippage?: string;
        }
      • Optionalsignal: AbortSignal

      Returns Promise<
          {
              amountIn: string;
              estimatedAmountOut: string;
              estimatedAmountOutUsd: string;
              estimatedTimeMs: number;
              fees: {
                  bridgeFee: { amount: string; token: string; usd?: string
                  | null };
                  bridgeFeeBps: number;
                  destFillGas: { amount: string; token: string; usd?: string | null };
                  originGasEstimate: { amount: string; token: string; usd?: string | null };
                  totalFeeUsd: string;
              };
              indicative: true;
              priceAgeMs: number;
              rate: string;
              recommendedSlippage: number;
              route: {
                  destinationChainId: string;
                  destinationToken: string;
                  originChainId: string;
                  originToken: string;
              };
          },
      >

    • Creates an intent and reservation. Never retried; a timeout is OutcomeUnknownError.

      Parameters

      • params: {
            amount: string;
            destinationChainId: string;
            destinationToken: string;
            originChainId: string;
            originToken: string;
            refundTo?: string;
            senderAddress: string;
            slippage?: string;
            walletAddress: string;
        }
      • Optionalsignal: AbortSignal

      Returns Promise<
          {
              amountIn: string;
              deadline: number;
              deposit: | {
                  solana: {
                      amount: string;
                      lastValidBlockHeight: number;
                      memo: string;
                      to: string;
                      token: string;
                      tx: string;
                  };
              }
              | {
                  robinhood: {
                      approval?: { data: string; required: boolean; to: string };
                      data: string;
                      to: string;
                      value: string;
                  };
              };
              estimatedAmountOut: string;
              estimatedAmountOutUsd: string;
              estimatedTimeMs: number;
              fees: {
                  bridgeFee: { amount: string; token: string; usd?: string
                  | null };
                  bridgeFeeBps: number;
                  destFillGas: { amount: string; token: string; usd?: string | null };
                  originGasEstimate: { amount: string; token: string; usd?: string | null };
                  totalFeeUsd: string;
              };
              intentId: string;
              minAmountOut: string;
              persisted: true;
              recommendedSlippage: number;
              route: {
                  destinationChainId: string;
                  destinationToken: string;
                  originChainId: string;
                  originToken: string;
              };
              signatureRequired: false;
          },
      >

    • Relay mode for Solana: checks the wallet-signed bytes against the quote (sender signature, destination, amount, token, exact memo) and only then submits them unchanged.

      Parameters

      • quote: {
            amountIn: string;
            deadline: number;
            deposit:
                | {
                    solana: {
                        amount: string;
                        lastValidBlockHeight: number;
                        memo: string;
                        to: string;
                        token: string;
                        tx: string;
                    };
                }
                | {
                    robinhood: {
                        approval?: { data: string; required: boolean; to: string };
                        data: string;
                        to: string;
                        value: string;
                    };
                };
            estimatedAmountOut: string;
            estimatedAmountOutUsd: string;
            estimatedTimeMs: number;
            fees: {
                bridgeFee: { amount: string; token: string; usd?: string
                | null };
                bridgeFeeBps: number;
                destFillGas: { amount: string; token: string; usd?: string | null };
                originGasEstimate: { amount: string; token: string; usd?: string | null };
                totalFeeUsd: string;
            };
            intentId: string;
            minAmountOut: string;
            persisted: true;
            recommendedSlippage: number;
            route: {
                destinationChainId: string;
                destinationToken: string;
                originChainId: string;
                originToken: string;
            };
            signatureRequired: false;
        }
      • senderAddress: string
      • signedTx: string | Uint8Array<ArrayBufferLike>
      • Optionalsignal: AbortSignal

      Returns Promise<{ txHash: string }>

    • Read an intent belonging to this customer. A read error does not change its state.

      Parameters

      • intentId: string
      • Optionalsignal: AbortSignal

      Returns Promise<
          {
              amountOut: string
              | null;
              depositTxHash: string | null;
              failureReason: { code: string; message: string } | null;
              fillTxHash: string | null;
              intentId: string;
              latencyMs: number | null;
              metrics?: {
                  chainLatency?: {
                      alignedMs: number | null;
                      destination: {
                          block?: number;
                          chain: "solana" | "robinhood";
                          count: number;
                          index: number;
                          second: number;
                          slot?: number;
                      };
                      direction: "refund"
                      | "buy"
                      | "sell";
                      era: "pre-alpenglow" | "alpenglow" | null;
                      excluded: boolean;
                      origin: {
                          block?: number;
                          chain: "solana" | "robinhood";
                          count: number;
                          index: number;
                          second: number;
                          slot?: number;
                      };
                      provisional: boolean;
                      rawMs: number;
                      shiftMs: number
                      | null;
                  };
                  sends?: {
                      at: number;
                      attempt: number;
                      chain: "solana"
                      | "robinhood";
                      kind: "deposit" | "fill" | "refund";
                      lanes: {
                          code?: number;
                          label: string;
                          latencyUs?: number;
                          outcome: "accepted" | "failed" | "silent";
                          reason?:
                              | "rpc"
                              | "http"
                              | "timeout"
                              | "transport"
                              | "decode"
                              | "busy"
                              | "mismatch";
                      }[];
                      races: number;
                      winner: string
                      | null;
                  }[];
              };
              refundTxHash: string
              | null;
              status:
                  | "failed"
                  | "pending"
                  | "filling"
                  | "filled"
                  | "settled"
                  | "refunding"
                  | "refunded"
                  | "expired"
                  | "held"
                  | "reversed";
              statusSeq: number;
              timestamps: {
                  depositSeen: number
                  | null;
                  filled: number | null;
                  quoted: number;
                  refunded: number | null;
                  settled: number | null;
              };
          },
      >

    • Relays already-signed deposit bytes: base64 for Solana, 0x hex for Robinhood chain. Sends signedTx unchanged. An explicit caller retry must use the same intent and identical bytes.

      Parameters

      • intentId: string
      • signedTx: string
      • Optionalsignal: AbortSignal

      Returns Promise<{ txHash: string }>

    • Long poll: returns when statusSeq exceeds since, the intent is terminal, or 60 seconds pass.

      Parameters

      • intentId: string
      • Optionalsince: number
      • Optionalsignal: AbortSignal

      Returns Promise<
          {
              amountOut: string
              | null;
              depositTxHash: string | null;
              failureReason: { code: string; message: string } | null;
              fillTxHash: string | null;
              intentId: string;
              latencyMs: number | null;
              metrics?: {
                  chainLatency?: {
                      alignedMs: number | null;
                      destination: {
                          block?: number;
                          chain: "solana" | "robinhood";
                          count: number;
                          index: number;
                          second: number;
                          slot?: number;
                      };
                      direction: "refund"
                      | "buy"
                      | "sell";
                      era: "pre-alpenglow" | "alpenglow" | null;
                      excluded: boolean;
                      origin: {
                          block?: number;
                          chain: "solana" | "robinhood";
                          count: number;
                          index: number;
                          second: number;
                          slot?: number;
                      };
                      provisional: boolean;
                      rawMs: number;
                      shiftMs: number
                      | null;
                  };
                  sends?: {
                      at: number;
                      attempt: number;
                      chain: "solana"
                      | "robinhood";
                      kind: "deposit" | "fill" | "refund";
                      lanes: {
                          code?: number;
                          label: string;
                          latencyUs?: number;
                          outcome: "accepted" | "failed" | "silent";
                          reason?:
                              | "rpc"
                              | "http"
                              | "timeout"
                              | "transport"
                              | "decode"
                              | "busy"
                              | "mismatch";
                      }[];
                      races: number;
                      winner: string
                      | null;
                  }[];
              };
              refundTxHash: string
              | null;
              status:
                  | "failed"
                  | "pending"
                  | "filling"
                  | "filled"
                  | "settled"
                  | "refunding"
                  | "refunded"
                  | "expired"
                  | "held"
                  | "reversed";
              statusSeq: number;
              timestamps: {
                  depositSeen: number
                  | null;
                  filled: number | null;
                  quoted: number;
                  refunded: number | null;
                  settled: number | null;
              };
          },
      >

    • Single-intent, bounded reconnects. Refreshes REST state on each connection; filters stale sequences.

      Parameters

      Returns AsyncGenerator<
          {
              amountOut: string
              | null;
              depositTxHash: string | null;
              failureReason: { code: string; message: string } | null;
              fillTxHash: string | null;
              intentId: string;
              latencyMs: number | null;
              metrics?: {
                  chainLatency?: {
                      alignedMs: number | null;
                      destination: {
                          block?: number;
                          chain: "solana" | "robinhood";
                          count: number;
                          index: number;
                          second: number;
                          slot?: number;
                      };
                      direction: "refund"
                      | "buy"
                      | "sell";
                      era: "pre-alpenglow" | "alpenglow" | null;
                      excluded: boolean;
                      origin: {
                          block?: number;
                          chain: "solana" | "robinhood";
                          count: number;
                          index: number;
                          second: number;
                          slot?: number;
                      };
                      provisional: boolean;
                      rawMs: number;
                      shiftMs: number
                      | null;
                  };
                  sends?: {
                      at: number;
                      attempt: number;
                      chain: "solana"
                      | "robinhood";
                      kind: "deposit" | "fill" | "refund";
                      lanes: {
                          code?: number;
                          label: string;
                          latencyUs?: number;
                          outcome: "accepted" | "failed" | "silent";
                          reason?:
                              | "rpc"
                              | "http"
                              | "timeout"
                              | "transport"
                              | "decode"
                              | "busy"
                              | "mismatch";
                      }[];
                      races: number;
                      winner: string
                      | null;
                  }[];
              };
              refundTxHash: string
              | null;
              status:
                  | "failed"
                  | "pending"
                  | "filling"
                  | "filled"
                  | "settled"
                  | "refunding"
                  | "refunded"
                  | "expired"
                  | "held"
                  | "reversed";
              statusSeq: number;
              timestamps: {
                  depositSeen: number
                  | null;
                  filled: number | null;
                  quoted: number;
                  refunded: number | null;
                  settled: number | null;
              };
          },
      >