Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt

Use this file to discover all available pages before exploring further.

By default, the destination funds are sent to the sender’s account. You can override this with the recipient parameter to send funds to a different address.

Address Recipient

Pass a plain address to send funds to an arbitrary address:
const transaction = await rhinestoneAccount.prepareTransaction({
  sourceChains: [optimism],
  targetChain: base,
  recipient: "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
  calls: [
    // …
  ],
  tokenRequests: [
    // …
  ],
});

Smart Account Recipient

You can also pass a RhinestoneAccountConfig to send funds to a smart account:
const transaction = await rhinestoneAccount.prepareTransaction({
  sourceChains: [optimism],
  targetChain: base,
  recipient: {
    owners: {
      type: "ecdsa",
      accounts: [recipientOwner],
    },
  },
  calls: [
    // …
  ],
  tokenRequests: [
    // …
  ],
});