eth

package
v0.0.6-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalStateAPITypes = apitypes.Types{
	"GlobalState": []apitypes.Type{
		{Name: "from", Type: "address"},
		{Name: "timestamp", Type: "uint256"},
		{Name: "root", Type: "uint256"},
		{Name: "replacedByRoot", Type: "uint256"},
		{Name: "createdAtTimestamp", Type: "uint256"},
		{Name: "replacedAtTimestamp", Type: "uint256"},
	},
	"EIP712Domain": []apitypes.Type{
		{Name: "name", Type: "string"},
		{Name: "version", Type: "string"},
		{Name: "chainId", Type: "uint256"},
		{Name: "verifyingContract", Type: "address"},
	},
}
View Source
var IdentityStateAPITypes = apitypes.Types{
	"IdentityState": []apitypes.Type{
		{Name: "from", Type: "address"},
		{Name: "timestamp", Type: "uint256"},
		{Name: "identity", Type: "uint256"},
		{Name: "state", Type: "uint256"},
		{Name: "replacedByState", Type: "uint256"},
		{Name: "createdAtTimestamp", Type: "uint256"},
		{Name: "replacedAtTimestamp", Type: "uint256"},
	},
	"EIP712Domain": []apitypes.Type{
		{Name: "name", Type: "string"},
		{Name: "version", Type: "string"},
		{Name: "chainId", Type: "uint256"},
		{Name: "verifyingContract", Type: "address"},
	},
}
View Source
var TimeStamp = TimeStampFn

Functions

func TimeStampFn

func TimeStampFn() string

Types

type AuthData

type AuthData struct {
	TypedData apitypes.TypedData
	Signature string
	Address   string
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(url, address, walletKey string) (*Resolver, error)

NewResolver create new ethereum resolver.

func (*Resolver) BlockchainID

func (r *Resolver) BlockchainID() string

func (*Resolver) Resolve

func (r *Resolver) Resolve(
	ctx context.Context,
	did w3c.DID,
	opts *services.ResolverOpts,
) (services.IdentityState, error)

func (*Resolver) ResolveGist

func (r *Resolver) ResolveGist(
	ctx context.Context,
	opts *services.ResolverOpts,
) (*services.GistInfo, error)

func (*Resolver) TypedData

func (r *Resolver) TypedData(primaryType services.PrimaryType, did w3c.DID, identityState services.IdentityState, walletAddress string) (apitypes.TypedData, error)

func (*Resolver) VerifyState

func (r *Resolver) VerifyState(
	primaryType services.PrimaryType,
	identityState services.IdentityState,
	did w3c.DID,
) (bool, error)

func (*Resolver) WalletAddress

func (r *Resolver) WalletAddress() (string, error)

type StateContract

type StateContract interface {
	GetGISTRoot(opts *bind.CallOpts) (*big.Int, error)
	GetGISTRootInfo(opts *bind.CallOpts, root *big.Int) (contract.IStateGistRootInfo, error)
	GetGISTProofByRoot(opts *bind.CallOpts, id *big.Int, root *big.Int) (contract.IStateGistProof, error)

	GetStateInfoById(opts *bind.CallOpts, id *big.Int) (contract.IStateStateInfo, error)
	GetStateInfoByIdAndState(opts *bind.CallOpts, id *big.Int, state *big.Int) (contract.IStateStateInfo, error)
}

Directories

Path Synopsis
contract
mock
Package mock_eth is a generated GoMock package.
Package mock_eth is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL