package
0.1.46
Repository: https://github.com/ava-labs/avalanche-rosetta.git
Documentation: pkg.go.dev

# Functions

BuildCredentialList builds a list of *secp256k1fx.Credentials using the given signatures Based on tx inputs, we can determine the number of signatures required by each input and put correct number of signatures to construct the signed tx.
BuildPayloads performs transaction construction in /construction/payloads call and returns the unsigned transaction as well as the signing payloads.
BuildSingletonCredentialList builds a list of a single *secp256k1fx.Credential using the given signatures.
Combine combines unsigned transactions with the provided signatures as part of /construction/combine call.
DeriveBech32Address derives Bech32 addresses for the given chain using public key and hrp provided in the request.
HashTx generates a transaction id for the given RosettaTx.
MatchOperations defines the operation Rosetta parser matching rules and parses the input operations We require 2 types of operations; inputs with negative amounts and outputs with positive amounts parser guarantees there will be 2 matches.
Parse contains transaction parsing logic for /construction/parse endpoint Chain specific logic is abstracted using TxParser interface's ParseTx method.
SortUnique deduplicates given slice of coins and sorts them by UTXO id in ascending order for consistency Per https://docs.avax.network/apis/avalanchego/apis/p-chain#platformgetutxos and https://docs.avax.network/apis/avalanchego/apis/c-chain#avaxgetutxos paginated getUTXOs calls may have duplicate UTXOs in different pages, this helper eliminates them.
SubmitTx broadcasts given Rosetta tx on chain and returns the transaction id.

# Variables

No description provided by the author

# Structs

RosettaTx wraps a transaction along with the input addresses and destination chain information.
Signer contains details of coin identifiers and the accounts signing those coins.

# Interfaces

AvaxTx encapsulates P-chain and C-chain atomic transactions in order to reuse common logic between them.
TransactionIssuer implements chain specific transaction submission logic.
TxBuilder implements backend specific transaction construction logic.
TxCombiner implements backend specific transaction submission logic.
TxParser implements backend specific transaction parsing logic.