pub struct MultiSig {
pub user: Address,
pub outer_signer: Address,
pub action: Map,
pub signatures: Vec<Signature>,
}Expand description
An L1 action for the multi-sig account user, posted by outer_signer, one of its signers,
with each signature collected for it.
Fields§
§user: AddressmultiSigUser: the multi-sig account the action is for.
outer_signer: AddressouterSigner: the signer that posts the action and signs the outer SendMultiSig.
action: MapThe action as the account would send it alone, type and all.
signatures: Vec<Signature>Each signer’s signature over MultiSig::payload_digest, in the order collected.
Implementations§
Source§impl MultiSig
impl MultiSig
Sourcepub fn new(user: Address, outer_signer: Address, action: &impl L1Action) -> Self
pub fn new(user: Address, outer_signer: Address, action: &impl L1Action) -> Self
No signatures yet.
Sourcepub fn signed(self, signatures: Vec<Signature>) -> Self
pub fn signed(self, signatures: Vec<Signature>) -> Self
With the signatures collected, in the order they are posted.
Sourcepub fn payload(&self) -> Value
pub fn payload(&self) -> Value
What each signer signs: [multiSigUser, outerSigner, action], the addresses lower case.
Sourcepub fn payload_connection_id(
&self,
nonce: u64,
vault: Option<Address>,
) -> [u8; 32]
pub fn payload_connection_id( &self, nonce: u64, vault: Option<Address>, ) -> [u8; 32]
The payload’s connection id, hashed as an L1 action’s is.
Sourcepub fn payload_digest(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> [u8; 32]
pub fn payload_digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
What each signer’s key signs on network: the payload’s phantom agent.
Sourcepub fn action(&self, network: Network) -> Map
pub fn action(&self, network: Network) -> Map
{"type":"multiSig","signatureChainId","signatures","payload":{"multiSigUser","outerSigner","action"}},
as posted on network, each signature {r,s,v}.
Sourcepub fn action_hash(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> [u8; 32]
pub fn action_hash( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
multiSigActionHash: MultiSig::action without its type, hashed as an L1 action’s is.
Sourcepub fn typed(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> TypedStruct<'static>
pub fn typed( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> TypedStruct<'static>
What the outer signer signs: hyperliquidChain, multiSigActionHash, then the nonce.
Sourcepub fn digest(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> [u8; 32]
pub fn digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
What the outer signer’s key signs: MultiSig::typed under the network’s user-signed domain.
Trait Implementations§
impl Eq for MultiSig
impl StructuralPartialEq for MultiSig
Auto Trait Implementations§
impl Forget for MultiSig
impl Freeze for MultiSig
impl Move for MultiSig
impl RefUnwindSafe for MultiSig
impl Send for MultiSig
impl Sync for MultiSig
impl Unpin for MultiSig
impl UnsafeUnpin for MultiSig
impl UnwindSafe for MultiSig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.