import { NearContractFactory } from './near-contract.js'; import { NearAccount, nep171 } from './types.js'; /** * Near NFT contract factory * https://github.com/near/NEPs/tree/master/specs/Standards/NonFungibleToken */ export declare class NEP171ContractFactory extends NearContractFactory { /** * Contract methods for NFT */ static contractMethods: { changeMethods: string[]; viewMethods: string[]; }; /** * Launch a NFT token contract * @param metadata - Token metadata * @param ownerId - Receiver id * @param supplyCapByType - Token caps by type * @param locked - Indicate if token types are locked * @returns */ launchToken(metadata: nep171.TokenMetadata, ownerId?: string, supplyCapByType?: Record, locked?: boolean, tokenContractId?: string): Promise<{ tokenAccount: NearAccount; result: import("@near-js/types").FinalExecutionOutcome; }>; /** * Transfer tokens to the given receiver account * @param tokenContract - Token account id * @param receiverId - Receiver account id * @param tokenId - Token id to be transferred * @returns */ transfer(tokenContract: string, receiverId: string, tokenId: string, approvalId?: bigint, memo?: string, account?: NearAccount): Promise; transferCall(tokenContract: string, receiverId: string, tokenId: string, approvalId: bigint, memo: string, msg: string): Promise; /** * Mint more tokens * @param tokenContract - Token account id * @param tokenId - Token id to be minted * @param amount - Amount of tokens to be minted * @param receiverId - Receiver of the newly minted token id * @param royalties - Royalties (accountId => perpetual). For example, * `{'a.testnet': 100}` gives `a.testnet` 1%. * @returns */ mint({ tokenContract, tokenId, metadata, receiverId, royalties, tokenType, tokenContractVersion, }: nep171.TokenRequest): Promise; /** * Add an approved account for a specific token * * @param tokenContract - Token contract account * @param tokenId - the token for which to add an approval * @param accountId - the account to add to `approvals` * @param msg - optional string to be passed to `nft_on_approve` * @returns */ approve(tokenContract: string, tokenId: string, accountId: string, msg?: string, account?: NearAccount): Promise; /** * Revoke an approved account for a specific token * @param tokenContract - Token contract account * @param tokenId - the token for which to revoke an approval * @param accountId - the account to remove from `approvals` * @returns */ revoke(tokenContract: string, tokenId: string, accountId: string): Promise; /** * Revoke all approved accounts for a specific token. * @param tokenContract - Token contract account * @param tokenId - the token for which to revoke an approval * @returns */ revokeAll(tokenContract: string, tokenId: string): Promise; /** * Check if a token is approved for transfer by a given account, optionally * checking an approval_id * * @param tokenContract - Token contract account * @param token_id - Token id * @param approvedAccountId - the account to check the existence of in * `approvals` * @param approvalId - an optional approval ID to check against current * approval ID for given account * @returns if `approval_id` given, `true` if `approved_account_id` is * approved with given `approval_id` otherwise, `true` if * `approved_account_id` is in list of approved accounts */ isApproved(tokenContract: string, tokenId: string, approvedAccountId: string, approvalId: bigint): Promise; /** * https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Enumeration.md */ /** * Look up a token by id * @param tokenContract - Token contract account * @param tokenId - Token id * @returns */ token(tokenContract: string, tokenId: string): Promise; /** * Get the total supply of tokens * @param tokenContract - Token account id * @returns */ totalSupply(tokenContract: string): Promise; /** * Get a list of all tokens * @param tokenContract - NEP171 contract account * @param fromIndex - a string representing an unsigned 128-bit integer, * representing the starting index of tokens to return * @param limit - the maximum number of tokens to return * @returns an array of Token objects */ tokens(tokenContract: string, fromIndex?: bigint, limit?: bigint): Promise; /** * Get number of tokens owned by a given account * @param tokenContract - Token contract account * @param accountId - Account id * @returns the number of non-fungible tokens owned by given `account_id` as * a string representing the value as an unsigned 128-bit integer to avoid * JSON number of 2^53. */ supplyForOwner(tokenContract: string, accountId: string): Promise; /** * Get a list of all tokens for a given account * @param tokenContract - NEP171 contract account * @param fromIndex - a string representing an unsigned 128-bit integer, * representing the starting index of tokens to return * @param - the maximum number of tokens to return * @returns an array of Token objects */ tokensForOwner(tokenContract: string, accountId: string, fromIndex?: bigint, limit?: bigint): Promise; fetchTokensForOwner(tokenContract: string, accountId: string): AsyncGenerator; /** * Get token ids * @param tokenContract - Token account id * @returns */ tokenIds(tokenContract: string): Promise; metadata(tokenContract: string): Promise; setContractRoyalty(tokenContract: string, royalty: bigint): Promise; getContractRoyalty(tokenContract: string): Promise; addTokenTypes(tokenContract: string, supplyCapByType: Record, locked?: boolean): Promise; unlockTokenTypes(tokenContract: string, tokenTypes: string[]): Promise; getTokenTypesLocked(tokenContract: string): Promise; }