Interface ContractMethodProxy
-
- All Known Implementing Classes:
ContractMethodProxyClient
public interface ContractMethodProxy
The interface for contract method clients- Since:
- 0.2.0
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> FunctionCallResult<T>
invoke(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, ContractMethodType methodType, Base64String arguments, java.lang.Class<T> returnClass)
Proxy invoke the contracts view methods by sending the Base64StringTransactionAwait
invoke(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, ContractMethodType methodType, java.lang.String accountId, PublicKey publicKey, PrivateKey privateKey, com.fasterxml.jackson.databind.node.ObjectNode arguments, java.math.BigInteger deposit)
Proxy invoke the contracts call methods via signed transactionsEncodedHash
invokeAsync(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, ContractMethodType methodType, java.lang.String accountId, PublicKey publicKey, PrivateKey privateKey, com.fasterxml.jackson.databind.node.ObjectNode arguments, java.math.BigInteger deposit)
Proxy invoke the contracts call methods via signed transactions async
-
-
-
Method Detail
-
invoke
<T> FunctionCallResult<T> invoke(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, ContractMethodType methodType, Base64String arguments, java.lang.Class<T> returnClass) throws java.lang.Throwable
Proxy invoke the contracts view methods by sending the Base64String- Type Parameters:
T
- type- Parameters:
nearClient
- near client instancecontractAccountId
- contract idmethodName
- view method to callmethodType
- view or callarguments
- contract argumentsreturnClass
- return object class- Returns:
- a functioncallresult object with type T
- Throws:
java.lang.Throwable
- thrown if fails to invoke
-
invoke
TransactionAwait invoke(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, ContractMethodType methodType, java.lang.String accountId, PublicKey publicKey, PrivateKey privateKey, com.fasterxml.jackson.databind.node.ObjectNode arguments, java.math.BigInteger deposit) throws java.lang.Throwable
Proxy invoke the contracts call methods via signed transactions- Parameters:
nearClient
- near client instancecontractAccountId
- contract idmethodName
- view method to callmethodType
- view or callaccountId
- user accountIdpublicKey
- user publicKeyprivateKey
- user privateKey to sign the contractarguments
- contract argumentsdeposit
- transaction deposit- Returns:
- a transactionAwait
- Throws:
java.lang.Throwable
- thrown if fails to invoke
-
invokeAsync
EncodedHash invokeAsync(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, ContractMethodType methodType, java.lang.String accountId, PublicKey publicKey, PrivateKey privateKey, com.fasterxml.jackson.databind.node.ObjectNode arguments, java.math.BigInteger deposit) throws java.lang.Throwable
Proxy invoke the contracts call methods via signed transactions async- Parameters:
nearClient
- near client instancecontractAccountId
- contract idmethodName
- view method to callmethodType
- view or callaccountId
- user accountIdpublicKey
- user publicKeyprivateKey
- user privateKey to sign the contractarguments
- contract argumentsdeposit
- transaction deposit- Returns:
- an EncodedHash of the future transaction
- Throws:
java.lang.Throwable
- thrown if fails to invoke
-
-