# Initialize Near Stream

Let's suppose this multisig requires two of its member to confirm a request and `multisigservices1` is an instance created for `member1` and `multisigservices2` is an instance created for `member2`. A native stream can be done in the following way.

```typescript
const params: InitStreamParams = {
    canCancel: true,
    canUpdate: true,
    startTime: (nowInSec() + 15).toString(),
    endTime: (nowInSec() + 20).toString(),
    receiver: member2,
    streamRate: NearAmount.parse("0.001").toString(),
};

const payload = await multisigservices1.initStream(params);

const result = await wallet.signAndTransactions(payload);
```

Then to confirm the request by another member you need to retrieve the requestId from the result which can be done in the following way.

```typescript
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());
```

Then request can be confirmed by another member in the following way.

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zebec.io/zebec-near/zebec-near-sdk/multisig-stream/initialize-near-stream.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
