TypeScript SDK
GetBuyWithCryptoTransferParams
The parameters for getBuyWithCryptoTransfer function
It facilitates a token transfer.
type GetBuyWithCryptoTransferParams = { amount: string; chainId: number; feePayer?: "sender" | "receiver"; fromAddress: string; paymentLinkId?: string; purchaseData?: PurchaseData; toAddress: string; tokenAddress: string;};The amount of token to be transferred.
type amount = string;The chain id of the transfer token.
type chainId = number;A client is the entry point to the thirdweb SDK. It is required for all other actions.
You can create a client using the createThirdwebClient function.
Refer to the Creating a Client documentation for more information.
For direct transfers, specify who will pay for the transfer fee. Can be "sender" or "receiver".
type feePayer = "sender" | "receiver";The address of wallet that pays for the tokens.
type fromAddress = string;type paymentLinkId = string;Extra details to store with the purchase.
This details will be stored with the purchase and can be retrieved later via the status API or Webhook
type purchaseData = PurchaseData;The address of the wallet where the tokens are sent
type toAddress = string;The token address of the transfer token.
type tokenAddress = string;