• Executes a quote by signing it and then executing the signed quote. This is a two-step process that:

    1. Signs the quote using signQuote
    2. Executes the signed quote using executeSignedQuote

    Parameters

    • client: {
          account: MultichainSmartAccount;
          extend: (<const client, const extendedHttpClient>(fn) => never);
          info: GetInfoPayload;
          pollingInterval: number;
          request: (<T>(params) => Promise<T>);
      }

      The Mee client instance used for API interactions

      • account: MultichainSmartAccount
      • extend: (<const client, const extendedHttpClient>(fn) => never)

        Extends the client with additional functionality

        Returns

        Extended client with both base and new functionality

          • <const client, const extendedHttpClient>(fn): never
          • Type Parameters

            • const client extends {
                  extend?: undefined;
                  request?: undefined;
              }
            • const extendedHttpClient extends HttpClient

            Parameters

            Returns never

      • info: GetInfoPayload
      • pollingInterval: number
      • request: (<T>(params) => Promise<T>)

        Makes HTTP requests to the Http node

          • <T>(params): Promise<T>
          • Type Parameters

            • T

            Parameters

            • params: RequestParams

            Returns Promise<T>

    • params: SignQuoteParams

      Parameters for signing the quote

    Returns Promise<ExecuteSignedQuotePayload>

    Promise resolving to ExecuteSignedQuotePayload containing:

    • hash: The transaction hash
    • chainId: The chain ID where the transaction was executed
    • status: The transaction status

    Example

    const result = await executeQuote(client, {
    quote: {
    id: "quote_123",
    chainId: "1",
    instructions: [{
    to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    data: "0x...",
    value: "0"
    }],
    gasToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    expiresAt: "2024-03-21T15:00:00Z"
    }
    });
    // result: { hash: "0x...", chainId: "1", status: "pending" }

    Throws

    Will throw an error if either the signing or execution step fails