StatePointer

A StatePointer contains a pointer to a ContractState. The StatePointer can be included in a ContractState or included in an off-ledger data structure. StatePointers can be resolved to a StateAndRef by performing a vault query. There are two types of pointers; linear and static. LinearPointers are for use with LinearStates. StaticPointers are for use with any type of ContractState.

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val isResolved: Boolean

Determines whether the state pointer should be resolved to a reference input when used in a transaction.

Link copied to clipboard
abstract val pointer: Any

An identifier for the ContractState that this StatePointer points to.

Link copied to clipboard
abstract val type: Class<T>

Type of the state which is being pointed to.

Functions

Link copied to clipboard
abstract fun resolve(services: ServiceHub): StateAndRef<T>

Resolves a StatePointer to a StateAndRef via a vault query. This method will either return a StateAndRef or return an exception.

abstract fun resolve(ltx: LedgerTransaction): StateAndRef<T>

Resolves a StatePointer to a StateAndRef from inside a LedgerTransaction. The intuition here is that all of the pointed-to states will be included in the transaction as reference states.