otx

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOrderingAndFinalityView

func NewOrderingAndFinalityView(tx *Transaction) *orderingAndFinalityView

func UsersMap

func UsersMap(users ...string) map[string]bool

Types

type LoadedTransaction

type LoadedTransaction struct {
	SP        view2.ServiceProvider
	Network   string
	Namespace string

	Creator view.Identity
	Nonce   []byte
	TxID    string
	Env     []byte

	ONS          *orion.NetworkService
	LoadedDataTx *orion.LoadedTransaction
}

func NewLoadedTransaction

func NewLoadedTransaction(sp view2.ServiceProvider, id, network, namespace string, env []byte) (*LoadedTransaction, error)

func (*LoadedTransaction) CoSignAndClose

func (lt *LoadedTransaction) CoSignAndClose() ([]byte, error)

func (*LoadedTransaction) Commit

func (lt *LoadedTransaction) Commit() error

func (*LoadedTransaction) GetONS

func (lt *LoadedTransaction) GetONS() *orion.NetworkService

func (*LoadedTransaction) ID

func (lt *LoadedTransaction) ID() string

func (*LoadedTransaction) MustSignUsers

func (lt *LoadedTransaction) MustSignUsers() []string

func (*LoadedTransaction) Reads

func (lt *LoadedTransaction) Reads() []*orion.DataRead

func (*LoadedTransaction) SignedUsers

func (lt *LoadedTransaction) SignedUsers() []string

func (*LoadedTransaction) Writes

func (lt *LoadedTransaction) Writes() []*orion.DataWrite

type Transaction

type Transaction struct {
	SP        view2.ServiceProvider
	Network   string
	Namespace string

	Creator view.Identity
	Nonce   []byte
	TxID    string

	ONS    *orion.NetworkService
	DataTx *orion.Transaction
}

func NewTransaction

func NewTransaction(sp view2.ServiceProvider, id, network string) (*Transaction, error)

func (*Transaction) AddMustSignUser

func (t *Transaction) AddMustSignUser(userID string)

func (*Transaction) Get

func (t *Transaction) Get(key string) ([]byte, error)

func (*Transaction) GetONS

func (t *Transaction) GetONS() *orion.NetworkService

func (*Transaction) ID

func (t *Transaction) ID() string

func (*Transaction) Put

func (t *Transaction) Put(key string, bytes []byte, a orion.AccessControl) error

func (*Transaction) SetNamespace

func (t *Transaction) SetNamespace(ns string)

func (*Transaction) SignAndClose

func (t *Transaction) SignAndClose() ([]byte, error)

Jump to

Keyboard shortcuts

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