create

package
v1.0.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Overview

Package create implements sidetree create did option

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(opts *Opts)

Option is a create DID option.

func WithAlsoKnownAs

func WithAlsoKnownAs(uri string) Option

WithAlsoKnownAs adds also known as URI.

func WithAnchorOrigin

func WithAnchorOrigin(anchorOrigin string) Option

WithAnchorOrigin set anchor origin for sidetree request.

func WithMultiHashAlgorithm

func WithMultiHashAlgorithm(multiHashAlgorithm uint) Option

WithMultiHashAlgorithm set multi hash algorithm for sidetree request.

func WithPublicKey

func WithPublicKey(publicKey *doc.PublicKey) Option

WithPublicKey add DID public key.

func WithRecoveryPublicKey

func WithRecoveryPublicKey(recoveryPublicKey crypto.PublicKey) Option

WithRecoveryPublicKey set recovery public key.

func WithService

func WithService(service *docdid.Service) Option

WithService add service.

func WithSidetreeEndpoint

func WithSidetreeEndpoint(getEndpoints func() ([]string, error)) Option

WithSidetreeEndpoint get sidetree endpoints.

func WithUpdatePublicKey

func WithUpdatePublicKey(updatePublicKey crypto.PublicKey) Option

WithUpdatePublicKey set update public key.

type Opts

type Opts struct {
	PublicKeys         []doc.PublicKey
	Services           []docdid.Service
	AlsoKnownAs        []string
	GetEndpoints       func() ([]string, error)
	RecoveryPublicKey  crypto.PublicKey
	UpdatePublicKey    crypto.PublicKey
	SigningKey         crypto.PrivateKey
	SigningKeyID       string
	MultiHashAlgorithm uint
	AnchorOrigin       string
}

Opts create did opts.

Jump to

Keyboard shortcuts

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