Withdraw Funds

Show me the money

In the Core protocol, payment streams settle to the Trade NFT. The owner of the Trade NFT is the beneficiary of the funds in the NFT's balance. For the owner of the NFT to transfer the funds from the NFT to their own balance, the following function must be called.

let tokenId = toUint256WithFelts("0")
let txHash = await seller.invoke(
    txFlowContract, 
    "withdrawNFT", 
    { 
        beneficiary_address: txTradeContract.address, 
        beneficiary_tokenId: tokenId 
    }, 
    { maxFee: FEE}
)

The tokenId in the code above represents the id of the trade.

Last updated