Class ContractMethodProxyClient
- java.lang.Object
-
- com.syntifi.near.api.rpc.service.contract.common.ContractMethodProxyClient
-
- All Implemented Interfaces:
ContractMethodProxy
public class ContractMethodProxyClient extends java.lang.Object implements ContractMethodProxy
The default contract method client for proxies- Since:
- 0.2.0
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Constructor Summary
Constructors Constructor Description ContractMethodProxyClient()
-
Method Summary
All Methods Instance Methods Concrete 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 accountPublicKey, PrivateKey accountPrivateKey, 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 accountPublicKey, PrivateKey accountPrivateKey, com.fasterxml.jackson.databind.node.ObjectNode arguments, java.math.BigInteger deposit)
Proxy invoke the contracts call methods via signed transactions async
-
-
-
Method Detail
-
invoke
public <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
Description copied from interface:ContractMethodProxy
Proxy invoke the contracts view methods by sending the Base64String- Specified by:
invoke
in interfaceContractMethodProxy
- 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
public TransactionAwait invoke(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, ContractMethodType methodType, java.lang.String accountId, PublicKey accountPublicKey, PrivateKey accountPrivateKey, com.fasterxml.jackson.databind.node.ObjectNode arguments, java.math.BigInteger deposit) throws java.lang.Throwable
Description copied from interface:ContractMethodProxy
Proxy invoke the contracts call methods via signed transactions- Specified by:
invoke
in interfaceContractMethodProxy
- Parameters:
nearClient
- near client instancecontractAccountId
- contract idmethodName
- view method to callmethodType
- view or callaccountId
- user accountIdaccountPublicKey
- user publicKeyaccountPrivateKey
- user privateKey to sign the contractarguments
- contract argumentsdeposit
- transaction deposit- Returns:
- a transactionAwait
- Throws:
java.lang.Throwable
- thrown if fails to invoke
-
invokeAsync
public EncodedHash invokeAsync(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, ContractMethodType methodType, java.lang.String accountId, PublicKey accountPublicKey, PrivateKey accountPrivateKey, com.fasterxml.jackson.databind.node.ObjectNode arguments, java.math.BigInteger deposit) throws java.lang.Throwable
Description copied from interface:ContractMethodProxy
Proxy invoke the contracts call methods via signed transactions async- Specified by:
invokeAsync
in interfaceContractMethodProxy
- Parameters:
nearClient
- near client instancecontractAccountId
- contract idmethodName
- view method to callmethodType
- view or callaccountId
- user accountIdaccountPublicKey
- user publicKeyaccountPrivateKey
- 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
-
-