TradeFlows
  • TradeFlows
    • What is the Core Protocol?
    • Benefits of using TradeFlows
    • Innovations
    • Flows - Programmed Liquidity
    • Dharma - Collaborative Ratings
    • Smart Contracts
  • Guides
    • Getting Started
      • Assets
        • Minting
        • Agreeing
        • Composing
      • Payment Streams
        • Create
        • Pause
      • Escrows
        • Increase Collateral
        • Decrease Collateral
      • Ratings
      • Withdraw Funds
  • Use Cases
    • Web3
      • DAO Management
    • Web2
      • Building & Construction
      • Gig Economy
      • Small Business
  • Links
    • Website
    • Twitter
    • Discord
Powered by GitBook
On this page
  1. Guides
  2. Getting Started

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.

PreviousRatingsNextWeb3

Last updated 2 years ago