Interface NFTService
-
public interface NFTServiceContract function call object for NFTs- Since:
- 0.2.0
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TransactionAwaitcallTransfer(NearClient nearClient, java.lang.String contractAccountId, java.lang.String receiverAccountId, java.lang.String tokenId, java.lang.String accountId, PublicKey publicKey, PrivateKey privateKey, java.math.BigInteger deposit)Synchronous contractCall to transfer nftEncodedHashcallTransferAsync(NearClient nearClient, java.lang.String contractAccountId, java.lang.String receiverAccountId, java.lang.String tokenId, java.lang.String accountId, PublicKey publicKey, PrivateKey privateKey, java.math.BigInteger deposit)Asynchronous contractCall to transfer nftFunctionCallResult<NFTContractMetadata>getMetadata(NearClient nearClient, java.lang.String contractAccountId)Gets NFT metadataFunctionCallResult<java.lang.String>getSupplyForOwner(NearClient nearClient, java.lang.String contractAccountId, java.lang.String accountId)Gets the supply of an NFT for an ownerFunctionCallResult<NFTTokenMetadata>getTokenMetadata(NearClient nearClient, java.lang.String contractAccountId, java.lang.String tokenId)Gets NFT metadataFunctionCallResult<com.fasterxml.jackson.databind.JsonNode>getTokens(NearClient nearClient, java.lang.String contractAccountId, java.lang.String fromIndex)Get tokens for given parametersFunctionCallResult<com.fasterxml.jackson.databind.JsonNode>getTokens(NearClient nearClient, java.lang.String contractAccountId, java.lang.String fromIndex, java.lang.Integer limit)Get tokens for given parametersFunctionCallResult<NFTTokenList>getTokensForOwner(NearClient nearClient, java.lang.String contractAccountId, java.lang.String accountId, java.lang.String fromIndex)Gets tokens for the given ownerFunctionCallResult<NFTTokenList>getTokensForOwner(NearClient nearClient, java.lang.String contractAccountId, java.lang.String accountId, java.lang.String fromIndex, java.lang.Integer limit)Gets tokens for the given ownerFunctionCallResult<java.lang.String>getTotalSupply(NearClient nearClient, java.lang.String contractAccountId)Get total supply of NFT for given contract
-
-
-
Method Detail
-
getMetadata
FunctionCallResult<NFTContractMetadata> getMetadata(NearClient nearClient, java.lang.String contractAccountId)
Gets NFT metadata- Parameters:
nearClient- near rpc client to usecontractAccountId- the contract's account id- Returns:
- a
FunctionCallResultfor the call
-
getTokenMetadata
FunctionCallResult<NFTTokenMetadata> getTokenMetadata(NearClient nearClient, java.lang.String contractAccountId, java.lang.String tokenId)
Gets NFT metadata- Parameters:
nearClient- near rpc client to usecontractAccountId- the contract's account id- Returns:
- a
FunctionCallResultfor the call
-
getTokensForOwner
FunctionCallResult<NFTTokenList> getTokensForOwner(NearClient nearClient, java.lang.String contractAccountId, java.lang.String accountId, java.lang.String fromIndex, java.lang.Integer limit)
Gets tokens for the given owner- Parameters:
nearClient- near rpc client to useaccountId- the contract's account idfromIndex- the starting indexlimit- limit- Returns:
- a
FunctionCallResultfor the call
-
getTokensForOwner
FunctionCallResult<NFTTokenList> getTokensForOwner(NearClient nearClient, java.lang.String contractAccountId, java.lang.String accountId, java.lang.String fromIndex)
Gets tokens for the given owner- Parameters:
nearClient- near rpc client to useaccountId- the contract's account idfromIndex- the starting index- Returns:
- a
FunctionCallResultfor the call
-
getTokens
FunctionCallResult<com.fasterxml.jackson.databind.JsonNode> getTokens(NearClient nearClient, java.lang.String contractAccountId, java.lang.String fromIndex, java.lang.Integer limit)
Get tokens for given parameters- Parameters:
nearClient- near rpc client to usecontractAccountId- the contract's account idfromIndex- the starting indexlimit- limit- Returns:
- a
FunctionCallResultfor the call
-
getTokens
FunctionCallResult<com.fasterxml.jackson.databind.JsonNode> getTokens(NearClient nearClient, java.lang.String contractAccountId, java.lang.String fromIndex)
Get tokens for given parameters- Parameters:
nearClient- near rpc client to usecontractAccountId- the contract's account idfromIndex- the starting index- Returns:
- a
FunctionCallResultfor the call
-
getTotalSupply
FunctionCallResult<java.lang.String> getTotalSupply(NearClient nearClient, java.lang.String contractAccountId)
Get total supply of NFT for given contract- Parameters:
nearClient- near rpc client to usecontractAccountId- the contract's account id- Returns:
- a
FunctionCallResultfor the call
-
getSupplyForOwner
FunctionCallResult<java.lang.String> getSupplyForOwner(NearClient nearClient, java.lang.String contractAccountId, java.lang.String accountId)
Gets the supply of an NFT for an owner- Parameters:
nearClient- near rpc client to usecontractAccountId- the contract's account idaccountId- the user's account id- Returns:
- a
FunctionCallResultfor the call
-
callTransfer
TransactionAwait callTransfer(NearClient nearClient, java.lang.String contractAccountId, java.lang.String receiverAccountId, java.lang.String tokenId, java.lang.String accountId, PublicKey publicKey, PrivateKey privateKey, java.math.BigInteger deposit)
Synchronous contractCall to transfer nft- Parameters:
nearClient- the near service instance to use for the contract callcontractAccountId- the contract's account idreceiverAccountId- the receiver account idtokenId- the token id to transferaccountId- the arguments for the view methodpublicKey- the arguments for the view methodprivateKey- the arguments for the view methoddeposit- the deposit for the transfer (1 yocto)- Returns:
- a
TransactionAwaitobject
-
callTransferAsync
EncodedHash callTransferAsync(NearClient nearClient, java.lang.String contractAccountId, java.lang.String receiverAccountId, java.lang.String tokenId, java.lang.String accountId, PublicKey publicKey, PrivateKey privateKey, java.math.BigInteger deposit)
Asynchronous contractCall to transfer nft- Parameters:
nearClient- the near service instance to use for the contract callcontractAccountId- the contract's account idreceiverAccountId- the receiver account idtokenId- the token id to transferaccountId- the arguments for the view methodpublicKey- the arguments for the view methodprivateKey- the arguments for the view methoddeposit- the deposit for the transfer (1 yocto)- Returns:
- a
EncodedHashobject
-
-