Class NearInvoker
java.lang.Object
dev.getelements.elements.service.blockchain.invoke.near.NearInvoker
- All Implemented Interfaces:
ScopedInvoker<NearInvocationScope>
,NearSmartContractInvocationService.Invoker
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.getelements.elements.sdk.service.blockchain.invoke.ScopedInvoker
ScopedInvoker.Factory<InvocationScopeT extends InvocationScope,
InvokerT extends ScopedInvoker<InvocationScopeT>> -
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.service.blockchain.NearSmartContractInvocationService.Invoker
DEFAULT_GAS_LIMIT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecutes a script, but does not write, to the blockchain.com.syntifi.near.api.rpc.NearClient
com.fasterxml.jackson.databind.ObjectMapper
void
initialize
(NearInvocationScope nearInvocationScope) Initializes theEvmSmartContractInvocationService.Invoker
with the invocation scope.Sends a transaction to the blockchain.Sends a transaction to the blockchain with a specified receiver id.void
setNearClient
(com.syntifi.near.api.rpc.NearClient nearClient) void
setNearInvocationScope
(NearInvocationScope nearInvocationScope) void
setObjectMapper
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.getelements.elements.sdk.service.blockchain.NearSmartContractInvocationService.Invoker
call, send, sendDirect
-
Constructor Details
-
NearInvoker
public NearInvoker()
-
-
Method Details
-
initialize
Description copied from interface:ScopedInvoker
Initializes theEvmSmartContractInvocationService.Invoker
with the invocation scope.- Specified by:
initialize
in interfaceScopedInvoker<NearInvocationScope>
- Parameters:
nearInvocationScope
- theInvocationScope
-
send
Description copied from interface:NearSmartContractInvocationService.Invoker
Sends a transaction to the blockchain. Receiver id is determined by the invocation scope.- Specified by:
send
in interfaceNearSmartContractInvocationService.Invoker
- Parameters:
actions
- the actions to be performed by the transaction (see https://nomicon.io/RuntimeSpec/Actions) with their associated arguments. List(ActionName, Map(PropertyName, PropertyValue)).- Returns:
- the return value
-
sendDirect
public NearInvokeContractResponse sendDirect(String receiverId, List<Map.Entry<String, Map<String, Object>>> actions) Description copied from interface:NearSmartContractInvocationService.Invoker
Sends a transaction to the blockchain with a specified receiver id.- Specified by:
sendDirect
in interfaceNearSmartContractInvocationService.Invoker
- Parameters:
receiverId
- the id of the address to send the transactions toactions
- the actions to be performed by the transaction (see https://nomicon.io/RuntimeSpec/Actions) with their associated arguments. List(ActionName, Map(PropertyName, PropertyValue)).- Returns:
- the return value
-
call
public NearContractFunctionCallResult call(String accountId, String methodName, Map<String, ?> arguments) Description copied from interface:NearSmartContractInvocationService.Invoker
Executes a script, but does not write, to the blockchain.- Specified by:
call
in interfaceNearSmartContractInvocationService.Invoker
- Parameters:
methodName
- the Cadence script to executearguments
- the arguments passed to the script itself- Returns:
- the return value
-
getNearInvocationScope
-
setNearInvocationScope
-
getNearClient
public com.syntifi.near.api.rpc.NearClient getNearClient() -
setNearClient
@Inject public void setNearClient(com.syntifi.near.api.rpc.NearClient nearClient) -
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
setObjectMapper
@Inject public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-