Versions in this module Expand all Collapse all v0 v0.3.25 Feb 18, 2026 Changes in this version + var Formats = map[string]Format + var FormatsPerNetwork = map[string][]string + var SolanaSystemProgram = mustParseSolanaKey("11111111111111111111111111111111") + func BlockReward(network string, blockHeight uint64) (*big.Int, error) + func CumulativeReward(network string, blockHeight uint64) (*big.Int, error) + func EvmCall(method string, params ...any) ([]byte, error) + func GuessPubKeyAndHashByInScript(scriptBytes []byte) (foundPubKey []byte, foundPubKeyHash []byte) + func GuessPubKeyAndHashByOutScript(scriptBytes []byte) (foundPubKey []byte, foundPubKeyHash []byte) + func ParsePushBytes(v []byte) ([]byte, int) + func PushBytes(v []byte) []byte + type AbiBuffer struct + func NewAbiBuffer(buf []byte) *AbiBuffer + func (buf *AbiBuffer) AppendAddressAny(v any) error + func (buf *AbiBuffer) AppendBigInt(v *big.Int) error + func (buf *AbiBuffer) AppendBufferAny(v any) error + func (buf *AbiBuffer) AppendBytes(v []byte) + func (buf *AbiBuffer) AppendUint256Any(v any) error + func (buf *AbiBuffer) Bytes() []byte + func (buf *AbiBuffer) Call(method string) []byte + func (buf *AbiBuffer) EncodeAbi(abi string, params ...any) error + func (buf *AbiBuffer) EncodeAuto(params ...any) error + func (buf *AbiBuffer) EncodeTypes(types []string, params ...any) error + type BtcAmount uint64 + func (b BtcAmount) MarshalJSON() ([]byte, error) + func (ba *BtcAmount) UnmarshalJSON(b []byte) error + func (ba *BtcAmount) UnmarshalText(b []byte) error + type BtcTx struct + In []*BtcTxInput + Locktime uint32 + Out []*BtcTxOutput + Version uint32 + func (tx *BtcTx) AddNetOutput(network, address string, amount uint64) error + func (tx *BtcTx) AddOutput(address string, amount uint64) error + func (tx *BtcTx) Bytes() []byte + func (tx *BtcTx) ClearInputs() + func (tx *BtcTx) ComputeSize() int + func (tx *BtcTx) Dup() *BtcTx + func (tx *BtcTx) HasWitness() bool + func (tx *BtcTx) Hash() ([]byte, error) + func (tx *BtcTx) MarshalBinary() ([]byte, error) + func (tx *BtcTx) ReadFrom(r io.Reader) (int64, error) + func (tx *BtcTx) Sign(keys ...*BtcTxSign) error + func (tx *BtcTx) UnmarshalBinary(buf []byte) error + type BtcTxInput struct + Script []byte + Sequence uint32 + TXID Hex32 + Vout uint32 + Witnesses [][]byte + func (in *BtcTxInput) Bytes() []byte + func (in *BtcTxInput) Dup() *BtcTxInput + func (in *BtcTxInput) MarshalJSON() ([]byte, error) + func (in *BtcTxInput) Prefill(scheme string) error + func (in *BtcTxInput) ReadFrom(r io.Reader) (int64, error) + type BtcTxOutput struct + Amount BtcAmount + N int + Script []byte + func (out *BtcTxOutput) Bytes() []byte + func (out *BtcTxOutput) Dup() *BtcTxOutput + func (out *BtcTxOutput) MarshalJSON() ([]byte, error) + func (out *BtcTxOutput) ReadFrom(r io.Reader) (int64, error) + func (out *BtcTxOutput) UnmarshalJSON(b []byte) error + type BtcTxSign struct + Amount BtcAmount + Key crypto.Signer + Options crypto.SignerOpts + Scheme string + SigHash uint32 + type BtcVarInt uint64 + func (v *BtcVarInt) ReadFrom(r io.Reader) (int64, error) + func (v BtcVarInt) Bytes() []byte + func (v BtcVarInt) Len() int + func (v BtcVarInt) WriteTo(w io.Writer) (int64, error) + type Bytes []byte + func (b Bytes) Bytes(*Script) ([]byte, error) + func (b Bytes) String() string + type EvmTx struct + AccessList []any + ChainId uint64 + Data []byte + Gas uint64 + GasFeeCap *big.Int + GasTipCap *big.Int + Nonce uint64 + R *big.Int + S *big.Int + Signed bool + To string + Type EvmTxType + Value *big.Int + Y *big.Int + func (tx *EvmTx) Call(method string, params ...any) error + func (tx *EvmTx) Hash() ([]byte, error) + func (tx *EvmTx) MarshalBinary() ([]byte, error) + func (tx *EvmTx) MarshalJSON() ([]byte, error) + func (tx *EvmTx) ParseTransaction(buf []byte) error + func (tx *EvmTx) RlpFields() []any + func (tx *EvmTx) SenderAddress() (string, error) + func (tx *EvmTx) SenderPubkey() (*secp256k1.PublicKey, error) + func (tx *EvmTx) Sign(key crypto.Signer) error + func (tx *EvmTx) SignBytes() ([]byte, error) + func (tx *EvmTx) SignWithOptions(key crypto.Signer, opts crypto.SignerOpts) error + func (tx *EvmTx) Signature() (*secp256k1.Signature, error) + func (tx *EvmTx) UnmarshalBinary(buf []byte) error + func (tx *EvmTx) UnmarshalJSON(b []byte) error + type EvmTxType int + const EvmTxEIP1559 + const EvmTxEIP2930 + const EvmTxEIP4844 + const EvmTxLegacy + type Format []Insertable + type Hex32 [32]byte + func (h Hex32) MarshalJSON() ([]byte, error) + func (h Hex32) UnmarshalJSON(v []byte) error + type IHashInfo struct + func IHash(v Insertable, hash ...func() hash.Hash) IHashInfo + func IHash160(v Insertable) IHashInfo + func (i IHashInfo) Bytes(s *Script) ([]byte, error) + func (i IHashInfo) String() string + type IPushBytes struct + func (i IPushBytes) Bytes(s *Script) ([]byte, error) + func (i IPushBytes) String() string + type Insertable interface + Bytes func(*Script) ([]byte, error) + String func() string + type Lookup string + func (l Lookup) Bytes(s *Script) ([]byte, error) + func (l Lookup) String() string + type Out struct + Flags []string + Name string + Script string + func GetOuts(pubkey crypto.PublicKey) []*Out + func GuessOut(script []byte, pubkeyhint crypto.PublicKey) *Out + func ParseBitcoinAddress(address string) (*Out, error) + func ParseBitcoinBasedAddress(network, address string) (*Out, error) + func ParseEvmAddress(address string) (*Out, error) + func ParseMassaAddress(address string) (*Out, error) + func ParseSolanaAddress(address string) (*Out, error) + func (o *Out) Bytes() []byte + func (o *Out) Hash() []byte + func (o *Out) String() string + func (out *Out) Address(flags ...string) (string, error) + type Script struct + func New(pubkey crypto.PublicKey) *Script + func (s *Script) Address(script string, flags ...string) (string, error) + func (s *Script) Generate(name string) ([]byte, error) + func (s *Script) Out(name string) (*Out, error) + type SolanaAccountMeta struct + IsSigner bool + IsWritable bool + Pubkey SolanaKey + type SolanaCompiledInstruction struct + AccountIndices []uint8 + Data []byte + ProgramIDIndex uint8 + type SolanaInstruction struct + Accounts []SolanaAccountMeta + Data []byte + ProgramID SolanaKey + func SolanaTransferInstruction(from, to SolanaKey, lamports uint64) SolanaInstruction + type SolanaKey [32]byte + func ParseSolanaKey(s string) (SolanaKey, error) + func (k SolanaKey) IsZero() bool + func (k SolanaKey) String() string + type SolanaMessage struct + AccountKeys []SolanaKey + Header SolanaMessageHeader + Instructions []SolanaCompiledInstruction + RecentBlockhash SolanaKey + func (msg *SolanaMessage) MarshalBinary() ([]byte, error) + func (msg *SolanaMessage) UnmarshalBinary(data []byte) error + type SolanaMessageHeader struct + NumReadonlySignedAccounts uint8 + NumReadonlyUnsignedAccounts uint8 + NumRequiredSignatures uint8 + type SolanaTx struct + Message SolanaMessage + Signatures [][]byte + func NewSolanaTx(feePayer, recentBlockhash SolanaKey, instructions ...SolanaInstruction) *SolanaTx + func (tx *SolanaTx) Hash() ([]byte, error) + func (tx *SolanaTx) MarshalBinary() ([]byte, error) + func (tx *SolanaTx) Sign(keys ...ed25519.PrivateKey) error + func (tx *SolanaTx) UnmarshalBinary(data []byte) error + type Transaction interface + Hash func() ([]byte, error)