Pause/Resume Stream
const pauseParams: PauseStreamParams = {
streamId: "1",
};
const payoad = await multisigservices1.pause(pauseParams);
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);
const resumeParams: ResumeStreamParams = {
streamId,
};
const payload = await multisigservices1.resume(resumeParams);
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