Documentation ¶
Index ¶
- Variables
- type DIDResolutionProver
- type DIDResolutionProverRegistry
- func (ch *DIDResolutionProverRegistry) Add(proofType verifiable.ProofType, prover DIDResolutionProver)
- func (ch *DIDResolutionProverRegistry) Append(proofType verifiable.ProofType, prover DIDResolutionProver) error
- func (ch *DIDResolutionProverRegistry) GetDIDResolutionProverByProofType(proofType verifiable.ProofType) (DIDResolutionProver, error)
- type DidDocumentOption
- type DidDocumentServices
- func (d *DidDocumentServices) GetDidDocument(ctx context.Context, did string, opts *ResolverOpts) (*document.DidResolution, error)
- func (d *DidDocumentServices) GetGist(ctx context.Context, chain, network string, opts *ResolverOpts) (*verifiable.GistInfo, error)
- func (d *DidDocumentServices) ResolveDNSDomain(ctx context.Context, domain string) (*document.DidResolution, error)
- func (d *DidDocumentServices) ResolveENSDomain(ctx context.Context, domain string) (*document.DidResolution, error)
- type GistInfo
- type IdentityState
- type Resolver
- type ResolverOpts
- type ResolverRegistry
- type StateInfo
- type StateType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DIDResolutionProver ¶ added in v0.0.5
type DIDResolutionProver interface {
Prove(did w3c.DID, info IdentityState, dataType StateType) (document.DidResolutionProof, error)
}
type DIDResolutionProverRegistry ¶ added in v0.0.5
type DIDResolutionProverRegistry map[verifiable.ProofType]DIDResolutionProver
func NewDIDResolutionProverRegistry ¶ added in v0.0.5
func NewDIDResolutionProverRegistry() *DIDResolutionProverRegistry
func (*DIDResolutionProverRegistry) Add ¶ added in v0.0.5
func (ch *DIDResolutionProverRegistry) Add(proofType verifiable.ProofType, prover DIDResolutionProver)
func (*DIDResolutionProverRegistry) Append ¶ added in v0.0.5
func (ch *DIDResolutionProverRegistry) Append(proofType verifiable.ProofType, prover DIDResolutionProver) error
func (*DIDResolutionProverRegistry) GetDIDResolutionProverByProofType ¶ added in v0.0.5
func (ch *DIDResolutionProverRegistry) GetDIDResolutionProverByProofType(proofType verifiable.ProofType) (DIDResolutionProver, error)
type DidDocumentOption ¶ added in v0.0.5
type DidDocumentOption func(*DidDocumentServices)
func WithProvers ¶ added in v0.0.5
func WithProvers(provers *DIDResolutionProverRegistry) DidDocumentOption
type DidDocumentServices ¶
type DidDocumentServices struct {
// contains filtered or unexported fields
}
func NewDidDocumentServices ¶
func NewDidDocumentServices(resolvers *ResolverRegistry, registry *ens.Registry, opts ...DidDocumentOption) *DidDocumentServices
func (*DidDocumentServices) GetDidDocument ¶
func (d *DidDocumentServices) GetDidDocument(ctx context.Context, did string, opts *ResolverOpts) (*document.DidResolution, error)
GetDidDocument return did document by identifier.
func (*DidDocumentServices) GetGist ¶
func (d *DidDocumentServices) GetGist(ctx context.Context, chain, network string, opts *ResolverOpts) (*verifiable.GistInfo, error)
func (*DidDocumentServices) ResolveDNSDomain ¶
func (d *DidDocumentServices) ResolveDNSDomain(ctx context.Context, domain string) (*document.DidResolution, error)
ResolveDNSDomain return did document by domain via DNS.
func (*DidDocumentServices) ResolveENSDomain ¶
func (d *DidDocumentServices) ResolveENSDomain(ctx context.Context, domain string) (*document.DidResolution, error)
ResolveENSDomain return did document via ENS resolver.
type GistInfo ¶
type GistInfo struct { Root *big.Int ReplacedByRoot *big.Int CreatedAtTimestamp *big.Int ReplacedAtTimestamp *big.Int CreatedAtBlock *big.Int ReplacedAtBlock *big.Int }
func (*GistInfo) ToDidRepresentation ¶
func (gi *GistInfo) ToDidRepresentation() (*verifiable.GistInfo, error)
type IdentityState ¶
type Resolver ¶
type Resolver interface { Resolve(ctx context.Context, did w3c.DID, opts *ResolverOpts) (IdentityState, error) ResolveGist(ctx context.Context, opts *ResolverOpts) (*GistInfo, error) BlockchainID() string }
type ResolverRegistry ¶
func NewChainResolvers ¶
func NewChainResolvers() *ResolverRegistry
func (*ResolverRegistry) Add ¶
func (ch *ResolverRegistry) Add(prefix string, resolver Resolver)
func (*ResolverRegistry) Append ¶
func (ch *ResolverRegistry) Append(prefix string, resolver Resolver) error
func (*ResolverRegistry) GetResolverByNetwork ¶
func (ch *ResolverRegistry) GetResolverByNetwork(chain, networkID string) (Resolver, error)
type StateInfo ¶
type StateInfo struct { ID w3c.DID State *big.Int ReplacedByState *big.Int CreatedAtTimestamp *big.Int ReplacedAtTimestamp *big.Int CreatedAtBlock *big.Int ReplacedAtBlock *big.Int }
func (*StateInfo) ToDidRepresentation ¶
func (si *StateInfo) ToDidRepresentation() (*verifiable.StateInfo, error)
Directories ¶
Path | Synopsis |
---|---|
blockchain
|
|
eth/contract/mock
Package mock_eth is a generated GoMock package.
|
Package mock_eth is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.