multipartyRagequit sub-class
The following readme describes all the functions and their parameters exposed by the multipartyRageQuit
class of the Stakehouse SDK.
signRageQuitRequest function
This function allows users to sign a multi-party Rage Quit request. During the multiparty Rage Quit, each of the participants must generate a signature. The same function can also be used to generate signatures for the Stakehouse kick process.
Input Parameters
stakehouseAddress: Stakehouse address of the KNOT that wants to Rage Quit
blsPublicKey: BLS Public key of the KNOT
recipient: the Ethereum execution layer address that will receive the unstaked ETH after rage quit and after the withdrawal is triggered
deadline: deadline for the validity of the generated signature
signatureHolder: type of participant. Should be either ROUTER
, FREE_FLOATING_SLOT_OWNER
, SAVETH_INDEX_OWNER
or COLLATERALISDED_SLOT_OWNER
stakehouseKick: Boolean. If the signature being generated is for a multiparty Rage Quit, then this can be left null
or false
. Otherwise, for Stakehouse kick, it should be provided as true
.
Using signRageQuitRequest function
await sdk.multipartyRageQuit.signRageQuitRequest(stakehouseAddress, blsPublicKey, recipient, deadline, signatureHolder, stakehouseKick=null);
Return Parameter
Returns the signature.
multipartyRageQuit function
This function allows users to multi-party Rage Quit or a Stakehouse to Stakehouse kick a KNOT.
Input Parameters
stakehouseAddress: Stakehouse address of the KNOT that wants to Rage Quit
ethRecipient: Ethereum execution layer address of the receiver of all the funds after Rage Quit is successful
freeFloatingSlotOwner: Ethereum execution layer address of the free floating SLOT owner
authenticatedReport: report returned by the authenticateReport
function
reportAndTokenHolderSignatures: List of signatures of all the participants in correct order. The order is ROUTER
, FREE_FLOATING_SLOT_OWNER
, SAVETH_INDEX_OWNER
, COLLATERALISDED_SLOT_OWNER
.
ethValue: ETH to be paid for the payable function
stakehouseKick: null
or false
for multiparty Rage Quit, true
for Stakehouse kick
Using multipartyRageQuit function
await sdk.multipartyRageQuit.multipartyRageQuit(stakehouseAddress, ethRecipient, freeFloatingSlotOwner, authenticatedReport, reportAndTokenHolderSignatures, ethValue, stakehouseKick=null);
Return Parameter
Returns the transaction data.