update

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: 4 Imported by: 4

Documentation

Overview

Package update implements sidetree update 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 update DID option.

func WithAddAlsoKnownAs

func WithAddAlsoKnownAs(uri string) Option

WithAddAlsoKnownAs adds also known as.

func WithAddPublicKey

func WithAddPublicKey(publicKey *doc.PublicKey) Option

WithAddPublicKey add DID public key.

func WithAddService

func WithAddService(service *docdid.Service) Option

WithAddService set services to be added.

func WithMultiHashAlgorithm

func WithMultiHashAlgorithm(multiHashAlgorithm uint) Option

WithMultiHashAlgorithm set multi hash algorithm for sidetree request.

func WithNextUpdatePublicKey

func WithNextUpdatePublicKey(nextUpdatePublicKey crypto.PublicKey) Option

WithNextUpdatePublicKey set next update public key.

func WithOperationCommitment

func WithOperationCommitment(operationCommitment string) Option

WithOperationCommitment sets last operation commitment.

func WithRemoveAlsoKnownAs

func WithRemoveAlsoKnownAs(uri string) Option

WithRemoveAlsoKnownAs removes also known as.

func WithRemovePublicKey

func WithRemovePublicKey(publicKeyID string) Option

WithRemovePublicKey set remove public key id.

func WithRemoveService

func WithRemoveService(serviceID string) Option

WithRemoveService set remove service id.

func WithSidetreeEndpoint

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

WithSidetreeEndpoint get sidetree endpoints.

func WithSigner

func WithSigner(signer api.Signer) Option

WithSigner set signer.

type Opts

type Opts struct {
	AddPublicKeys       []doc.PublicKey
	AddServices         []docdid.Service
	AddAlsoKnownAs      []string
	RemovePublicKeys    []string
	RemoveServices      []string
	RemoveAlsoKnownAs   []string
	GetEndpoints        func() ([]string, error)
	NextUpdatePublicKey crypto.PublicKey
	Signer              api.Signer
	OperationCommitment string
	MultiHashAlgorithm  uint
}

Opts update did opts.

Jump to

Keyboard shortcuts

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