A prefix to use for every key of this map
Add a bid to the given token
Basic usage example:
Assume an account/user with account id = alice.test.near
, want to add the bid B1
, to the token with token id = jenny911038
,
const persistent_market = new PersistentMarket('pm')
persistent_market.add("jenny911038" , "alice.test.near", B1 );
Note: This overwrites any present bids.
Id of the token
ID of the account who sets the bid
Bid to be added to the token and account/user
Get bids for a given token
Basic usage example:
Assume we need to get the bids for the token with token id = jenny911038
,
const persistent_market = new PersistentMarket('pm')
const bids = persistent_market.get("jenny911038");
ID of the token
A Map of TokenId to Bid
Get bids created by a given account/user
Basic usage example:
Assume we need to get the bids created by account/user with account id = alice.test.near
,
const persistent_market = new PersistentMarket('pm')
const bids = persistent_market.get_by_bidder("alice.test.near");
ID of the account/user to retrieve bids
An Array of bids made by the given account/user
Check if the relevant token has bids or not
Basic usage example:
Assume we need to check if the token with token id = jenny911038
has bids,
const persistent_market = new PersistentMarket('pm')
const is_bids_exists = persistent_market.has("jenny911038");
ID of the token to check
true
if bids exists, false
otherwise
Remove a bid from a given token
Basic usage example:
Assume an account/user with account id = alice.test.near
, want to remove the bid he made to the token with token id = jenny911038
,
const persistent_market = new PersistentMarket('pm')
persistent_market.remove("jenny911038" , "alice.test.near");
Id of the token
ID of the account
Generated using TypeDoc