java.lang.Object
com.hedera.hashgraph.sdk.HookCall
- Direct Known Subclasses:
FungibleHookCall,NftHookCall
Specifies a call to a hook from within a transaction.
Often the hook's entity is implied by the nature of the call site. For example, when using an account allowance hook inside a crypto transfer, the hook's entity is necessarily the account whose authorization is required.
For future extension points where the hook owner is not forced by the context, we include the option to fully specify the hook id for the call.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHookCall(long hookId, EvmHookCall evmHookCall) Create a HookCall with a numeric hook ID. -
Method Summary
Modifier and TypeMethodDescriptionboolean(package private) static HookCallfromProtobuf(HookCall proto) Create a HookCall from a protobuf message.Get the EVM hook call details.Get the numeric hook ID.inthashCode()(package private) HookCallConvert this HookCall to a protobuf message.toString()
-
Constructor Details
-
HookCall
Create a HookCall with a numeric hook ID.- Parameters:
hookId- the numeric ID of the hook to callevmHookCall- the EVM hook call details
-
-
Method Details
-
getHookId
Get the numeric hook ID.- Returns:
- the numeric hook ID, or null if using full hook ID
-
getEvmHookCall
Get the EVM hook call details.- Returns:
- the EVM hook call details
-
toProtobuf
HookCall toProtobuf()Convert this HookCall to a protobuf message.- Returns:
- the protobuf HookCall
-
fromProtobuf
Create a HookCall from a protobuf message.- Parameters:
proto- the protobuf HookCall- Returns:
- a new HookCall instance
-
equals
-
hashCode
public int hashCode() -
toString
-