Documentation
¶
Overview ¶
Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Variables
- func GetOwners(network network.Network, subnetID ids.ID) ([]ids.ShortID, uint32, error)
- type Multisig
- func (ms *Multisig) FromBytes(txBytes []byte) error
- func (ms *Multisig) GetAuthSigners() ([]ids.ShortID, error)
- func (ms *Multisig) GetBlockchainID() (ids.ID, error)
- func (ms *Multisig) GetNetwork() (network.Network, error)
- func (ms *Multisig) GetNetworkID() (uint32, error)
- func (ms *Multisig) GetRemainingAuthSigners() ([]ids.ShortID, []ids.ShortID, error)
- func (*Multisig) GetSpendSigners() ([]ids.ShortID, error)
- func (ms *Multisig) GetSubnetID() (ids.ID, error)
- func (ms *Multisig) GetSubnetOwners() ([]ids.ShortID, uint32, error)
- func (ms *Multisig) GetTxKind() (TxKind, error)
- func (ms *Multisig) GetWrappedPChainTx() (*txs.Tx, error)
- func (ms *Multisig) IsReadyToCommit() (bool, error)
- func (ms *Multisig) String() string
- func (ms *Multisig) ToBytes() ([]byte, error)
- func (ms *Multisig) Undefined() bool
- type TxKind
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUndefinedTx = fmt.Errorf("tx is undefined")
Functions ¶
Types ¶
type Multisig ¶
func (*Multisig) GetAuthSigners ¶
GetAuthSigners gets all subnet auth addresses that are required to sign a given tx
- get subnet control keys as string slice using P-Chain API (GetOwners)
- get subnet auth indices from the tx, field tx.UnsignedTx.SubnetAuth
- creates the string slice of required subnet auth addresses by applying the indices to the control keys slice
func (*Multisig) GetNetwork ¶
get network model associated to tx
func (*Multisig) GetNetworkID ¶
get network id associated to tx
func (*Multisig) GetRemainingAuthSigners ¶
GetRemainingAuthSigners gets subnet auth addresses that have not signed a given tx
- get the string slice of auth signers for the tx (GetAuthSigners)
- verifies that all creds in tx.Creds, except the last one, are fully signed (a cred is fully signed if all the signatures in cred.Sigs are non-empty)
- computes remaining signers by iterating the last cred in tx.Creds, associated to subnet auth signing
- for each sig in cred.Sig: if sig is empty, then add the associated auth signer address (obtained from authSigners by using the index) to the remaining signers list
if the tx is fully signed, returns empty slice
func (*Multisig) GetSubnetID ¶
GetSubnetID gets subnet id associated to tx
func (*Multisig) GetSubnetOwners ¶
func (*Multisig) IsReadyToCommit ¶
Click to show internal directories.
Click to hide internal directories.