Withdraw Stream

const withdrawParams: WithdrawStreamParams = {
   streamId: "1",
};
const payload = await multisigservices1.withdraw(withdrawParams);
const result = await wallet.signAndTransactions(payload);

const successValue = (result[result.length - 1].status as FinalExecutionStatus).SuccessValue;
if (!successValue) throw new Error("successValue is missing");
const requestId = Number(Buffer.from(successValue, "base64").toString());

const confirmPayload = await multiSigService2.confirm({ requestId: Number(requestId) });
const result = await wallet.signAndTransactions(payload);

Last updated