This module implement the MintGate marketplace.
init: { };
Initializes the Market contract.
get_tokens_for_sale(): Promise<TokenForSale[]>;
Returns all available tokens for sale.
Use the nft_on_approve
method to add a token for sale.
get_tokens_by_owner_id(args: { owner_id: ValidAccountId }): Promise<TokenForSale[]>;
Returns all tokens for sale owned by owner_id
.
get_tokens_by_gate_id(args: { gate_id: ValidGateId }): Promise<TokenForSale[]>;
Returns all tokens for sale whose collectible's gate ID is gate_id
.
get_tokens_by_creator_id(args: { creator_id: ValidAccountId }): Promise<TokenForSale[]>;
Returns all tokens for sale whose collectible's creator ID is creator_id
.
buy_token(args: { nft_contract_id: ValidAccountId, token_id: TokenId }, gas?: any, amount?: any): Promise<void>;
Indicates that predecessor_account_id
wants to buy the token nft_contract_id:token_id
.
The caller must attach at least min_price
NEARs in order to pay for the given token.
Moreover, the owner cannot buy his/her own tokens.
When the token is sold,
royalties are paid by this marketplace according to nft_contract_id::nft_transfer_payout
.
nft_on_approve(args: { token_id: TokenId, owner_id: ValidAccountId, approval_id: U64, msg: string }, gas?: any): Promise<void>;
Callback method to allow this contract to put a Token
into the marketplace.
The msg must contain the following fields:
nft_on_revoke(args: { token_id: TokenId }, gas?: any): Promise<void>;
Callback method to remove this Token
from the marketplace.
batch_on_approve(args: { tokens: [TokenId, MarketApproveMsg][], owner_id: ValidAccountId }, gas?: any): Promise<void>;
Callback method to allow this contract to put multiple Token
s into the marketplace.
References
- 🚀 Initialization method. Needs to be called right after deployment.
- 👓 View only method, i.e., does not modify the contract state.
- ✍️ Call method, i.e., does modify the contract state.
- Ⓝ Payable method, i.e., call needs to have an attached NEAR deposit.
This documentation was generated with near-syn v0.3.0 https://github.com/epam/near-syn on 2021-05-03 08:06:39.479484 UTC