Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ETHResolver ¶
ETHResolver resolver for eth blockchains
func NewETHResolver ¶ added in v1.0.0
func NewETHResolver(url, contract string) *ETHResolver
NewETHResolver create ETH resolver for state.
func (ETHResolver) Resolve ¶
func (r ETHResolver) Resolve(ctx context.Context, id, state *big.Int) (*ResolvedState, error)
Resolve returns Resolved state from blockchain
func (ETHResolver) ResolveGlobalRoot ¶ added in v1.0.0
func (r ETHResolver) ResolveGlobalRoot(ctx context.Context, state *big.Int) (*ResolvedState, error)
ResolveGlobalRoot returns Resolved global state from blockchain
type ExtendedVerificationsOptions ¶
type ExtendedVerificationsOptions struct { VerificationOptions OnlyLatestStates bool AcceptedStateTransitionDelay time.Duration }
ExtendedVerificationsOptions allows to set additional options
type GISTGetter ¶ added in v1.0.0
type GISTGetter interface {
GetGISTRootInfo(opts *bind.CallOpts, root *big.Int) (abi.IStateGistRootInfo, error)
}
GISTGetter return global state info by state
type ResolvedState ¶
type ResolvedState struct { State string `json:"state"` Latest bool `json:"latest"` Genesis bool `json:"genesis"` TransitionTimestamp int64 `json:"transition_timestamp"` }
ResolvedState can be the state verification result
func Resolve ¶
func Resolve(ctx context.Context, getter StateGetter, id, state *big.Int) (*ResolvedState, error)
Resolve is used to resolve identity state.
func ResolveGlobalRoot ¶ added in v1.0.0
func ResolveGlobalRoot(ctx context.Context, getter GISTGetter, state *big.Int) (*ResolvedState, error)
ResolveGlobalRoot is used to resolve global root.
type StateGetter ¶ added in v1.0.0
type StateGetter interface {
GetStateInfoByIdAndState(opts *bind.CallOpts, id, state *big.Int) (abi.IStateStateInfo, error)
}
StateGetter return user's state info by user's ID
type VerificationOptions ¶
VerificationOptions is options for state verification
Click to show internal directories.
Click to hide internal directories.