Documentation ¶
Index ¶
- Constants
- Variables
- type AddSignerParams
- type ApproveReturn
- type ChangeNumApprovalsThresholdParams
- type ConstructorParams
- type LockBalanceParams
- type ProposalHashData
- type ProposeParams
- type ProposeReturn
- type RemoveSignerParams
- type State
- type StateSummary
- type SwapSignerParams
- type Transaction
- type TxnID
- type TxnIDParams
Constants ¶
View Source
const SignersMax = 256
SignersMax is the maximum number of signers allowed in a multisig. If more are required, please use a combining tree of multisigs.
Variables ¶
View Source
var Methods = map[abi.MethodNum]builtin.MethodMeta{ 1: builtin.NewMethodMeta("Constructor", *new(func(*ConstructorParams) *abi.EmptyValue)), 2: builtin.NewMethodMeta("Propose", *new(func(*ProposeParams) *ProposeReturn)), 3: builtin.NewMethodMeta("Approve", *new(func(*TxnIDParams) *ApproveReturn)), 4: builtin.NewMethodMeta("Cancel", *new(func(*TxnIDParams) *abi.EmptyValue)), 5: builtin.NewMethodMeta("AddSigner", *new(func(*AddSignerParams) *abi.EmptyValue)), 6: builtin.NewMethodMeta("RemoveSigner", *new(func(*RemoveSignerParams) *abi.EmptyValue)), 7: builtin.NewMethodMeta("SwapSigner", *new(func(*SwapSignerParams) *abi.EmptyValue)), 8: builtin.NewMethodMeta("ChangeNumApprovalsThreshold", *new(func(*ChangeNumApprovalsThresholdParams) *abi.EmptyValue)), 9: builtin.NewMethodMeta("LockBalance", *new(func(*LockBalanceParams) *abi.EmptyValue)), builtin.MustGenerateFRCMethodNum("Receive"): builtin.NewMethodMeta("UniversalReceiverHook", *new(func(*abi.CborBytesTransparent) *abi.EmptyValue)), }
Functions ¶
This section is empty.
Types ¶
type AddSignerParams ¶
func (*AddSignerParams) MarshalCBOR ¶
func (t *AddSignerParams) MarshalCBOR(w io.Writer) error
func (*AddSignerParams) UnmarshalCBOR ¶
func (t *AddSignerParams) UnmarshalCBOR(r io.Reader) (err error)
type ApproveReturn ¶
type ApproveReturn struct { // Applied indicates if the transaction was applied as opposed to proposed but not applied due to lack of approvals Applied bool // Code is the exitcode of the transaction, if Applied is false this field should be ignored. Code exitcode.ExitCode // Ret is the return vale of the transaction, if Applied is false this field should be ignored. Ret []byte }
func (*ApproveReturn) MarshalCBOR ¶
func (t *ApproveReturn) MarshalCBOR(w io.Writer) error
func (*ApproveReturn) UnmarshalCBOR ¶
func (t *ApproveReturn) UnmarshalCBOR(r io.Reader) (err error)
type ChangeNumApprovalsThresholdParams ¶
type ChangeNumApprovalsThresholdParams struct {
NewThreshold uint64
}
func (*ChangeNumApprovalsThresholdParams) MarshalCBOR ¶
func (t *ChangeNumApprovalsThresholdParams) MarshalCBOR(w io.Writer) error
func (*ChangeNumApprovalsThresholdParams) UnmarshalCBOR ¶
func (t *ChangeNumApprovalsThresholdParams) UnmarshalCBOR(r io.Reader) (err error)
type ConstructorParams ¶
type ConstructorParams struct { Signers []addr.Address NumApprovalsThreshold uint64 UnlockDuration abi.ChainEpoch StartEpoch abi.ChainEpoch }
func (*ConstructorParams) MarshalCBOR ¶
func (t *ConstructorParams) MarshalCBOR(w io.Writer) error
func (*ConstructorParams) UnmarshalCBOR ¶
func (t *ConstructorParams) UnmarshalCBOR(r io.Reader) (err error)
type LockBalanceParams ¶
type LockBalanceParams struct { StartEpoch abi.ChainEpoch UnlockDuration abi.ChainEpoch Amount abi.TokenAmount }
func (*LockBalanceParams) MarshalCBOR ¶
func (t *LockBalanceParams) MarshalCBOR(w io.Writer) error
func (*LockBalanceParams) UnmarshalCBOR ¶
func (t *LockBalanceParams) UnmarshalCBOR(r io.Reader) (err error)
type ProposalHashData ¶
type ProposalHashData struct { Requester addr.Address To addr.Address Value abi.TokenAmount Method abi.MethodNum Params []byte }
Data for a BLAKE2B-256 to be attached to methods referencing proposals via TXIDs. Ensures the existence of a cryptographic reference to the original proposal. Useful for offline signers and for protection when reorgs change a multisig TXID.
Requester - The requesting multisig wallet member. All other fields - From the "Transaction" struct.
func (*ProposalHashData) MarshalCBOR ¶
func (t *ProposalHashData) MarshalCBOR(w io.Writer) error
func (*ProposalHashData) Serialize ¶
func (phd *ProposalHashData) Serialize() ([]byte, error)
func (*ProposalHashData) UnmarshalCBOR ¶
func (t *ProposalHashData) UnmarshalCBOR(r io.Reader) (err error)
type ProposeParams ¶
type ProposeParams struct { To addr.Address Value abi.TokenAmount Method abi.MethodNum Params []byte }
func (*ProposeParams) MarshalCBOR ¶
func (t *ProposeParams) MarshalCBOR(w io.Writer) error
func (*ProposeParams) UnmarshalCBOR ¶
func (t *ProposeParams) UnmarshalCBOR(r io.Reader) (err error)
type ProposeReturn ¶
type ProposeReturn struct { // TxnID is the ID of the proposed transaction TxnID TxnID // Applied indicates if the transaction was applied as opposed to proposed but not applied due to lack of approvals Applied bool // Code is the exitcode of the transaction, if Applied is false this field should be ignored. Code exitcode.ExitCode // Ret is the return vale of the transaction, if Applied is false this field should be ignored. Ret []byte }
func (*ProposeReturn) MarshalCBOR ¶
func (t *ProposeReturn) MarshalCBOR(w io.Writer) error
func (*ProposeReturn) UnmarshalCBOR ¶
func (t *ProposeReturn) UnmarshalCBOR(r io.Reader) (err error)
type RemoveSignerParams ¶
func (*RemoveSignerParams) MarshalCBOR ¶
func (t *RemoveSignerParams) MarshalCBOR(w io.Writer) error
func (*RemoveSignerParams) UnmarshalCBOR ¶
func (t *RemoveSignerParams) UnmarshalCBOR(r io.Reader) (err error)
type State ¶
type State struct { Signers []address.Address // Signers must be canonical ID-addresses. NumApprovalsThreshold uint64 NextTxnID TxnID // Linear unlock InitialBalance abi.TokenAmount StartEpoch abi.ChainEpoch UnlockDuration abi.ChainEpoch PendingTxns cid.Cid // HAMT[TxnID]Transaction }
func (*State) AmountLocked ¶
func (st *State) AmountLocked(elapsedEpoch abi.ChainEpoch) abi.TokenAmount
type StateSummary ¶ added in v0.9.3
func CheckStateInvariants ¶ added in v0.9.3
func CheckStateInvariants(st *State, store adt.Store) (*StateSummary, *builtin.MessageAccumulator)
Checks internal invariants of multisig state.
type SwapSignerParams ¶
func (*SwapSignerParams) MarshalCBOR ¶
func (t *SwapSignerParams) MarshalCBOR(w io.Writer) error
func (*SwapSignerParams) UnmarshalCBOR ¶
func (t *SwapSignerParams) UnmarshalCBOR(r io.Reader) (err error)
type Transaction ¶
type Transaction struct { To addr.Address Value abi.TokenAmount Method abi.MethodNum Params []byte // This address at index 0 is the transaction proposer, order of this slice must be preserved. Approved []addr.Address }
func (*Transaction) MarshalCBOR ¶
func (t *Transaction) MarshalCBOR(w io.Writer) error
func (*Transaction) UnmarshalCBOR ¶
func (t *Transaction) UnmarshalCBOR(r io.Reader) (err error)
type TxnIDParams ¶
type TxnIDParams struct { ID TxnID // Optional hash of proposal to ensure an operation can only apply to a // specific proposal. ProposalHash []byte }
func (*TxnIDParams) MarshalCBOR ¶
func (t *TxnIDParams) MarshalCBOR(w io.Writer) error
func (*TxnIDParams) UnmarshalCBOR ¶
func (t *TxnIDParams) UnmarshalCBOR(r io.Reader) (err error)
Click to show internal directories.
Click to hide internal directories.