tx

package
v0.0.0-...-6712c69 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	client.TxBuilder
	client.TxConfig
}

Builder to create transaction for broadcasting

func NewTxBuilder

func NewTxBuilder(txConfig client.TxConfig) Builder

NewTxBuilder - create TxBuilder

func (Builder) GetTxBytes

func (txBuilder Builder) GetTxBytes() ([]byte, error)

GetTxBytes return tx bytes for broadcast

func (Builder) Sign

func (txBuilder Builder) Sign(
	signMode signing.SignMode, signerData SignerData,
	privKey key.PrivKey, overwriteSig bool) error

Sign - generate signatures of the tx with given armored private key Only support Secp256k1 uses the Bitcoin secp256k1 ECDSA parameters.

type SignMode

type SignMode = signing.SignMode

SignMode represents a signing mode with its own security guarantees.

const (
	// SignModeUnspecified specifies an unknown signing mode and will be
	// rejected
	SignModeUnspecified SignMode = 0
	// SignModeDirect specifies a signing mode which uses SignDoc and is
	// verified with raw bytes from Tx
	SignModeDirect SignMode = 1
	// SignModeTexture is a future signing mode that will verify some
	// human-readable textual representation on top of the binary representation
	// from SIGN_MODE_DIRECT
	SignModeTexture SignMode = 2
	// SignModeLegacyAminoJSON is a backwards compatibility mode which uses
	// Amino JSON and will be removed in the future
	SignModeLegacyAminoJSON SignMode = 127
)

type SignatureV2

type SignatureV2 = signing.SignatureV2

SignatureV2 is a convenience type that is easier to use in application logic than the protobuf SignerInfo's and raw signature bytes. It goes beyond the first sdk.Signature types by supporting sign modes and explicitly nested multi-signatures. It is intended to be used for both building and verifying signatures.

type SignerData

type SignerData = authsigning.SignerData

SignerData is the specific information needed to sign a transaction that generally isn't included in the transaction body itself

type Tx

type Tx = authsigning.Tx

Tx defines a transaction interface that supports all standard message, signature fee, memo, and auxiliary interfaces.

Jump to

Keyboard shortcuts

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