Documentation ¶
Index ¶
- Variables
- 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 PrimaryType
- type Resolver
- type ResolverOpts
- type ResolverRegistry
- type StateInfo
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DidDocumentServices ¶
type DidDocumentServices struct {
// contains filtered or unexported fields
}
func NewDidDocumentServices ¶
func NewDidDocumentServices(resolvers *ResolverRegistry, registry *ens.Registry) *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 PrimaryType ¶
type PrimaryType int32
const ( IdentityStateType PrimaryType = 0 GlobalStateType PrimaryType = 1 )
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 WalletAddress() (string, error) TypedData(primaryType PrimaryType, did w3c.DID, identityState IdentityState, walletAddress string) (apitypes.TypedData, error) }
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.