For the complete documentation index, see llms.txt. This page is also available as Markdown.

Withdraw Streamed Token

To withdraw the streamed token this function is useful. In this function only the receiver is signer i.e only the receiver can withdraw the token.

// Native Token

 const response = await native.withdraw({
   sender: "J75jd3kjsABQSDrEdywcyhmbq8eHDowfW9xtEWsVALy9",
   receiver: "Av6xsgSrnM1UAj4pUZnEWM97iBphph69NPHE8J2ceeYs",
   escrow: "FMBLNb3KD1u4pXhDzQQAqVanEqu6yCsD2wMjdARFbbtK",
});
  console.log(response.message);
// SPL Token

 const response = await token.withdraw({
   sender: "J75jd3kjsABQSDrEdywcyhmbq8eHDowfW9xtEWsVALy9",
   receiver: "Av6xsgSrnM1UAj4pUZnEWM97iBphph69NPHE8J2ceeYs",
   esrow: "FMBLNb3KD1u4pXhDzQQAqVanEqu6yCsD2wMjdARFbbtK",
   token_mint_address:'zebeczgi5fSEtbpfQKVZKCJ3WgYXxjkMUkNNx7fLKAF',
 });
  console.log(response.message);

Last updated