zswhq

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountRAMDeltasToDEOS

func AccountRAMDeltasToDEOS(deltas []*zsw.AccountRAMDelta) (out []*pbcodec.AccountRAMDelta)

func ActionToDEOS

func ActionToDEOS(action *zsw.Action) *pbcodec.Action

func ActionTraceReceiptToDEOS

func ActionTraceReceiptToDEOS(in *zsw.ActionTraceReceipt) *pbcodec.ActionReceipt

func ActivatedProtocolFeaturesToDEOS

func ActivatedProtocolFeaturesToDEOS(in *zsw.ProtocolFeatureActivationSet) *pbcodec.ActivatedProtocolFeatures

func AuthSequenceToDEOS

func AuthSequenceToDEOS(in zsw.TransactionTraceAuthSequence) *pbcodec.AuthSequence

func AuthoritiesToDEOS

func AuthoritiesToDEOS(authority *zsw.Authority) *pbcodec.Authority

func AuthorizationToDEOS

func AuthorizationToDEOS(authorization []zsw.PermissionLevel) (out []*pbcodec.PermissionLevel)

func BlockHeaderToDEOS

func BlockHeaderToDEOS(blockHeader *zsw.BlockHeader) *pbcodec.BlockHeader

func BlockSigningAuthorityToDEOS

func BlockSigningAuthorityToDEOS(authority *zsw.BlockSigningAuthority) *pbcodec.BlockSigningAuthority

func BlockrootMerkleToDEOS

func BlockrootMerkleToDEOS(merkle *zsw.MerkleRoot) *pbcodec.BlockRootMerkle

func CreationTreeToDEOS

func CreationTreeToDEOS(tree CreationFlatTree) []*pbcodec.CreationFlatNode

func ErrorCodeToDEOS

func ErrorCodeToDEOS(in *zsw.Uint64) uint64

func ExceptionToDEOS

func ExceptionToDEOS(in *zsw.Except) *pbcodec.Exception

func ExtensionsToDEOS

func ExtensionsToDEOS(in []*zsw.Extension) (out []*pbcodec.Extension)

func GetPublicKeysFromSignedTransaction

func GetPublicKeysFromSignedTransaction(chainID zsw.Checksum256, signedTransaction *zsw.SignedTransaction) []string

Best effort to extract public keys from a signed transaction

func KeyWeightsPToDEOS

func KeyWeightsPToDEOS(keys []*zsw.KeyWeight) (out []*pbcodec.KeyWeight)

func KeyWeightsToDEOS

func KeyWeightsToDEOS(keys []zsw.KeyWeight) (out []*pbcodec.KeyWeight)

func LogContextToDEOS

func LogContextToDEOS(in zsw.ExceptLogContext) *pbcodec.Exception_LogContext

func PendingScheduleToDEOS

func PendingScheduleToDEOS(in *zsw.PendingSchedule) *pbcodec.PendingProducerSchedule

func PermissionLevelToDEOS

func PermissionLevelToDEOS(perm zsw.PermissionLevel) *pbcodec.PermissionLevel

func PermissionLevelWeightsToDEOS

func PermissionLevelWeightsToDEOS(weights []zsw.PermissionLevelWeight) (out []*pbcodec.PermissionLevelWeight)

func PermissionToDEOS

func PermissionToDEOS(perm *zsw.Permission) *pbcodec.Permission

func ProducerAuthoritiesToDEOS

func ProducerAuthoritiesToDEOS(producerAuthorities []*zsw.ProducerAuthority) (out []*pbcodec.ProducerAuthority)

func ProducerAuthorityScheduleToDEOS

func ProducerAuthorityScheduleToDEOS(e *zsw.ProducerAuthoritySchedule) *pbcodec.ProducerAuthoritySchedule

func ProducerKeysToDEOS

func ProducerKeysToDEOS(in []zsw.ProducerKey) (out []*pbcodec.ProducerKey)

func ProducerScheduleToDEOS

func ProducerScheduleToDEOS(e *zsw.ProducerSchedule) *pbcodec.ProducerSchedule

func ProducerToLastImpliedIrbToDEOS

func ProducerToLastImpliedIrbToDEOS(in []zsw.PairAccountNameBlockNum) []*pbcodec.ProducerToLastImpliedIRB

func ProducerToLastProducedToDEOS

func ProducerToLastProducedToDEOS(in []zsw.PairAccountNameBlockNum) []*pbcodec.ProducerToLastProduced

func SignaturesToDEOS

func SignaturesToDEOS(in []ecc.Signature) (out []string)

func SignedTransactionToDEOS

func SignedTransactionToDEOS(trx *zsw.SignedTransaction) *pbcodec.SignedTransaction

func TransactionHeaderToDEOS

func TransactionHeaderToDEOS(trx *zsw.TransactionHeader) *pbcodec.TransactionHeader

func TransactionReceiptHeaderToDEOS

func TransactionReceiptHeaderToDEOS(in *zsw.TransactionReceiptHeader) *pbcodec.TransactionReceiptHeader

func TransactionReceiptToDEOS

func TransactionReceiptToDEOS(txReceipt *zsw.TransactionReceipt) *pbcodec.TransactionReceipt

func TransactionStatusToDEOS

func TransactionStatusToDEOS(in zsw.TransactionStatus) pbcodec.TransactionStatus

func TransactionToDEOS

func TransactionToDEOS(trx *zsw.Transaction) *pbcodec.Transaction

func WaitWeightsToDEOS

func WaitWeightsToDEOS(waits []zsw.WaitWeight) (out []*pbcodec.WaitWeight)

Types

type ActionConversionOption

type ActionConversionOption interface {
	Apply(actionTrace *pbcodec.ActionTrace)
}

type ConversionOption

type ConversionOption interface{}

func LimitConsoleLengthConversionOption

func LimitConsoleLengthConversionOption(maxByteCount int) ConversionOption

type CreationFlatNode

type CreationFlatNode = [3]int

CreationFlatNode represents a flat node in a flat tree. It's a triplet slice where elements reprensents the following values, assuming `(<depthFirstWalkIndex>, <parentDepthFirstWalkIndex>, <executionActionIndex>)`:

The first value of the node is it's id, derived by doing a depth-first walk of the creation tree and incrementing an index at each node visited.

The second value is the parent index of the current node, the index is the index of the initial element of the `CreationFlatNode` slice.

The third value is the execution action index to get the actual execution traces from the actual execution tree (deep-first walking index in the execution tree).

type CreationFlatTree

type CreationFlatTree = []CreationFlatNode

CreationFlatTree represents the creation order tree in a flatten manners. The flat list is built by doing a deep-first walk of the creational tree, outputting at each traversal the `CreationNode` triplet `(index, creatorParentIndex, executionIndex)` where a parent of `-1` represents a root node.

For example, assuming a `CreationFlatTree` of the form:

[

[0, -1, 0],
[1, 0, 1],
[2, 0, 2],
[3, 2, 3],

]

Represents the following creational tree:

```

0
├── 1
└── 2
    └── 3

```

The tree can be reconstructed using the following quick Python.

type Hydrator

type Hydrator interface {
	// HydrateBlock decodes the received Deep Mind AcceptedBlock data structure against the
	// correct struct for this version of EOSIO supported by this hydrator.
	HydrateBlock(block *pbcodec.Block, input []byte) error

	// DecodeTransactionTrace decodes the received Deep Mind AppliedTransaction data structure against the
	// correct struct for this version of EOSIO supported by this hydrator.
	DecodeTransactionTrace(input []byte, opts ...ConversionOption) (*pbcodec.TransactionTrace, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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