Versions in this module Expand all Collapse all v1 v1.0.0 Nov 14, 2024 Changes in this version + const EwoqPrivateKey + var ErrCantSpend = errors.New("can't spend") + var ErrInvalidPrivateKey = errors.New("invalid private key") + var ErrInvalidPrivateKeyEncoding = errors.New("invalid private key encoding") + var ErrInvalidPrivateKeyEnding = errors.New("invalid private key ending") + var ErrInvalidPrivateKeyLen = errors.New("invalid private key length (expect 64 bytes in hex)") + var ErrInvalidType = errors.New("invalid type") + func GetHRP(networkID uint32) string + func SortTransferableInputsWithSigners(ins []*avax.TransferableInput, signers [][]ids.ShortID) + type Key interface + Addresses func() []ids.ShortID + C func() string + Match func(owners *secp256k1fx.OutputOwners, time uint64) ([]uint32, []ids.ShortID, bool) + P func() []string + Sign func(pTx *txs.Tx, signers [][]ids.ShortID) error + Spends func(outputs []*avax.UTXO, opts ...OpOption) (totalBalanceToSpend uint64, inputs []*avax.TransferableInput, ...) + type Op struct + type OpOption func(*Op) + func WithFeeDeduct(fee uint64) OpOption + func WithTargetAmount(ta uint64) OpOption + func WithTime(t uint64) OpOption + type SOp struct + type SOpOption func(*SOp) + func WithPrivateKey(privKey *secp256k1.PrivateKey) SOpOption + func WithPrivateKeyEncoded(privKey string) SOpOption + type SoftKey struct + func LoadEwoq(networkID uint32) (*SoftKey, error) + func LoadSoft(networkID uint32, keyPath string) (*SoftKey, error) + func LoadSoftFromBytes(networkID uint32, kb []byte) (*SoftKey, error) + func NewSoft(networkID uint32, opts ...SOpOption) (*SoftKey, error) + func (m *SoftKey) Addresses() []ids.ShortID + func (m *SoftKey) C() string + func (m *SoftKey) Encode() string + func (m *SoftKey) Key() *secp256k1.PrivateKey + func (m *SoftKey) KeyChain() *secp256k1fx.Keychain + func (m *SoftKey) Match(owners *secp256k1fx.OutputOwners, time uint64) ([]uint32, []ids.ShortID, bool) + func (m *SoftKey) P() []string + func (m *SoftKey) Raw() []byte + func (m *SoftKey) Save(p string) error + func (m *SoftKey) Sign(pTx *txs.Tx, signers [][]ids.ShortID) error + func (m *SoftKey) Spends(outputs []*avax.UTXO, opts ...OpOption) (totalBalanceToSpend uint64, inputs []*avax.TransferableInput, ...) + func (m *SoftKey) X() []string