binarycodec

package
v0.0.0-...-cb7fc92 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSigningClaimFieldNotFound = errors.New("'Channel' & 'Amount' fields are both required, but were not found")

Functions

func Decode

func Decode(hexEncoded string) (map[string]any, error)

Decode decodes a hex string in the canonical binary format into a JSON transaction object.

func DecodeBinary

func DecodeBinary(b []byte) (map[string]any, error)

DeocdeBinary decodes canonical binary format into JSON transition object

func Encode

func Encode(tx transactions.Tx) (string, error)

Encode converts a JSON transaction object to a hex string in the canonical binary format. The binary format is defined in XRPL's core codebase.

func EncodeForMultisigning

func EncodeForMultisigning(tx transactions.Tx, xrpAccountID string) ([]byte, error)

EncodeForMultiSign: encodes a transaction into binary format in preparation for providing one signature towards a multi-signed transaction. (Only encodes fields that are intended to be signed.)

func EncodeForSigning

func EncodeForSigning(tx transactions.Tx) ([]byte, error)

Encodes a transaction into binary format in preparation for signing.

func EncodeForSigningClaim

func EncodeForSigningClaim(tx transactions.PaymentChannelClaim) ([]byte, error)

EncodeForPaymentChannelClaim: encodes a payment channel claim into binary format in preparation for signing.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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