plc

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DidFromOp

func DidFromOp(op *Operation) (string, error)

Types

type Client

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

func NewClient

func NewClient(args *ClientArgs) (*Client, error)

func (*Client) CreateDID

func (c *Client) CreateDID(sigkey *atcrypto.PrivateKeyK256, recovery string, handle string) (string, *Operation, error)

func (*Client) CreateDidCredentials

func (c *Client) CreateDidCredentials(sigkey *atcrypto.PrivateKeyK256, recovery string, handle string) (*DidCredentials, error)

func (*Client) SendOperation

func (c *Client) SendOperation(ctx context.Context, did string, op *Operation) error

func (*Client) SignOp

func (c *Client) SignOp(sigkey *atcrypto.PrivateKeyK256, op *Operation) error

type ClientArgs

type ClientArgs struct {
	H           *http.Client
	Service     string
	RotationKey []byte
	PdsHostname string
}

type DidCredentials

type DidCredentials struct {
	VerificationMethods map[string]string                    `json:"verificationMethods"`
	RotationKeys        []string                             `json:"rotationKeys"`
	AlsoKnownAs         []string                             `json:"alsoKnownAs"`
	Services            map[string]identity.OperationService `json:"services"`
}

type Operation

type Operation struct {
	Type                string                               `json:"type"`
	VerificationMethods map[string]string                    `json:"verificationMethods"`
	RotationKeys        []string                             `json:"rotationKeys"`
	AlsoKnownAs         []string                             `json:"alsoKnownAs"`
	Services            map[string]identity.OperationService `json:"services"`
	Prev                *string                              `json:"prev"`
	Sig                 string                               `json:"sig,omitempty"`
}

func (*Operation) MarshalCBOR

func (po *Operation) MarshalCBOR() ([]byte, error)

type OperationService

type OperationService struct {
	Type     string `json:"type"`
	Endpoint string `json:"endpoint"`
}

Jump to

Keyboard shortcuts

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