method

package
v0.31.69 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accept added in v0.30.15

func Accept(did core.DID, t Type) bool

func New

func New(
	method Type,
	hStorage managed.Wallet,
	args ...string,
) (
	id core.DID,
	err error,
)

func NewDoc added in v0.30.15

func NewDoc(pk, addr string) (d *did.Doc, err error)

func NewFromDID added in v0.30.15

func NewFromDID(
	hStorage managed.Wallet,
	didStr ...string,
) (
	id core.DID,
	err error,
)

func NewKey

func NewKey(
	hStorage managed.Wallet,
	_ ...string,
) (
	id core.DID,
	err error,
)

func NewKeyFromDID

func NewKeyFromDID(
	hStorage managed.Wallet,
	didStr string,
) (
	id core.DID,
	err error,
)

NewKeyFromDID doesn't create a totally new did:key but it stores its pubkey to our KMS. We need it there for cryptos to work.

func NewPeer added in v0.30.15

func NewPeer(
	hStorage managed.Wallet,
	args ...string,
) (
	id core.DID,
	err error,
)

func NewPeerFromDID added in v0.30.15

func NewPeerFromDID(
	hStorage managed.Wallet,
	d *api.DID,
) (
	id core.DID,
	err error,
)

func NewPeerFromDoc added in v0.30.15

func NewPeerFromDoc(
	hStorage managed.Wallet,
	didDoc string,
) (
	id core.DID,
	err error,
)

NewPeerFromDoc doesn't create a totally new did:peer but it saves its pubkey to our kms for us to be able to use cryptos with them.

func String added in v0.30.8

func String(d string) string

Types

type Base added in v0.30.15

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

func (Base) AEndp added in v0.30.15

func (b Base) AEndp() (ae service.Addr, err error)

func (Base) DOC added in v0.30.15

func (b Base) DOC() core.DIDDoc

func (Base) Did added in v0.30.15

func (b Base) Did() string

Did function returns current KID of it exists.

func (Base) KID added in v0.30.15

func (b Base) KID() string

func (Base) Packager added in v0.30.15

func (b Base) Packager() api.Packager

func (Base) SavePairwiseForDID added in v0.30.15

func (b Base) SavePairwiseForDID(_ managed.Wallet, _ core.DID, _ core.PairwiseMeta)

func (Base) SetAEndp added in v0.30.15

func (b Base) SetAEndp(_ service.Addr)

func (Base) SignKey added in v0.30.15

func (b Base) SignKey() any

func (Base) StartEndp added in v0.30.15

func (b Base) StartEndp(_ managed.Wallet, _ string)

func (Base) Storage added in v0.30.15

func (b Base) Storage() managed.Wallet

func (Base) Store added in v0.30.15

func (b Base) Store(_, _ managed.Wallet)

func (Base) StoreResult added in v0.30.15

func (b Base) StoreResult() error

func (Base) String added in v0.30.15

func (b Base) String() string

String returns URI formatted DID

func (Base) URI added in v0.30.15

func (b Base) URI() string

func (Base) VerKey added in v0.30.15

func (b Base) VerKey() string

type Key

type Key struct {
	Base
}

func (Key) NewDoc added in v0.30.15

func (k Key) NewDoc(_ service.Addr) core.DIDDoc

func (Key) RecipientKeys added in v0.30.15

func (k Key) RecipientKeys() []string

func (Key) Route added in v0.30.9

func (k Key) Route() []string

type Peer added in v0.30.15

type Peer struct {
	Base
}

func (Peer) AEndp added in v0.30.15

func (p Peer) AEndp() (ae service.Addr, err error)

func (Peer) Did added in v0.30.15

func (p Peer) Did() string

func (Peer) NewDoc added in v0.30.15

func (p Peer) NewDoc(ae service.Addr) core.DIDDoc

func (Peer) RecipientKeys added in v0.30.15

func (p Peer) RecipientKeys() []string

func (Peer) Route added in v0.30.15

func (p Peer) Route() []string

func (Peer) SavePairwiseForDID added in v0.30.15

func (p Peer) SavePairwiseForDID(mStorage managed.Wallet, theirDID core.DID,
	pw core.PairwiseMeta)

func (Peer) String added in v0.30.15

func (p Peer) String() string

String returns URI formatted 'did:key:' for verification method

func (Peer) URI added in v0.30.15

func (p Peer) URI() string

func (Peer) VerKey added in v0.30.15

func (p Peer) VerKey() string

type Type added in v0.30.15

type Type int
const (
	TypeUnknown Type = 0 + iota
	TypeKey
	TypePeer
	TypeSov
	TypeIndy
)

func DIDType added in v0.30.15

func DIDType(s string) Type

func (Type) DIDString added in v0.30.15

func (t Type) DIDString() string

func (Type) String added in v0.30.15

func (t Type) String() string

Jump to

Keyboard shortcuts

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