Market
A perpetual market.
class Bid {
constructor(
public amount: u128,
public bidder: AccountId,
public recipient: AccountId,
public sell_on_share: u16,
public currency: CurrencyId = 'near'
) {}
}
class BidShares {
constructor(
public prev_owner: u16,
public creator: u16,
public owner: u16
) {}
}
class Ask {
amount: u128 // Amount asked
currency: CurrencyId = 'near' // currency of ask, default is NEAR
sell_on_share: u16 // % to pay to previous owner on this sale
constructor() {}
}
get
[market-contract]
.get_bids(token_id)
Get Bids
get
[market-contract]
.get_bidders_bids(account_id)
Get Bidders Bids
post
[market-contract]
.set_bid(token_id, amount, bidder, recipient, sell_on_share, currency)
Set Bid
delete
[market-contract]
.remove_bid(token_id, bidder)
Remove Bid
get
[market-contract]
.burn(token_id)
Burn
patch
[market-contract]
.accept_bid(token_id, bidder, creator, owner, prev_owner)
Accept Bid
Last modified 2yr ago