tx

package
v0.0.0-...-a5ce5ae Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version1 uint8 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DID

type DID struct {
	Document *w3cdid.Document `msgpack:"d"`
}

type Node

type Node struct {
	Id  string `msgpack:"i"`
	Did string `msgpack:"d"`
	Key []byte `msgpack:"k"`
}

type Tx

type Tx struct {
	Version   uint8       `msgpack:"v"`
	Ts        int64       `msgpack:"t"`
	From      string      `msgpack:"f"`
	Type      TxType      `msgpack:"e"`
	Action    TxAction    `msgpack:"a"`
	Data      interface{} `msgpack:"d,noinline"`
	Signature []byte      `msgpack:"s"`
}

func (*Tx) Marshal

func (t *Tx) Marshal() ([]byte, error)

func (*Tx) Unmarshal

func (t *Tx) Unmarshal(b []byte) error

type TxAction

type TxAction int8
const (
	TxActionAdd TxAction = iota + 1
	TxActionUpdate
	TxActionRevoke
)

type TxID

type TxID cid.Cid

func (TxID) String

func (t TxID) String() string

type TxType

type TxType int8
const (
	TxType_DID TxType = iota + 1
	TxType_VC
	TxType_Node
)

Jump to

Keyboard shortcuts

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