DEVELOPERS

Build with GrowStreams

SDK, contract addresses, quickstart guides, and examples. Go from zero to first stream in under 10 minutes.

npm install @growstreams/sdk

Quickstart: Your first stream

Three calls. Under 30 lines. Live in minutes.

1"text-purple-400">import { GrowStreams } "text-purple-400">from '@growstreams/sdk';
2
3"text-provn-">muted">// Initialize the SDK
4"text-purple-400">const gs = "text-purple-400">new GrowStreams({
5 network: 'vara-testnet',
6 signer: wal"text-purple-400">letSigner,
7});
8
9"text-provn-">muted">// Step 1: Deposit tokens into vault
10"text-purple-400">await gs.vault.deposit({
11 token: 'USDC',
12 amount: '1000',
13 buffer: '4h',
14});
15
16"text-provn-">muted">// Step 2: Create a stream
17"text-purple-400">const stream = "text-purple-400">await gs.stream.create({
18 receiver: '0xBob...address',
19 token: 'USDC',
20 flowRate: '0.000277', "text-provn-">muted">// ~$1/hr
21});
22
23console.log('Stream created:', stream.id);
24"text-provn-">muted">// Stream is now live — Bob earns every second!
25
26"text-provn-">muted">// Step 3: Receiver withdraws anytime
27"text-purple-400">await gs.stream.withdraw({
28 streamId: stream.id,
29 amount: 'max', "text-provn-">muted">// or specific amount
30});

SDK reference

All methods available in @growstreams/sdk

Vault

vault.deposit()Deposit tokens + set buffer
vault.withdraw()Withdraw unused deposit
vault.getBalance()Check vault balance

Streams

stream.create()Start a new stream
stream.update()Change flow rate
stream.stop()Stop and close stream
stream.withdraw()Receiver claims funds
stream.getActive()List active streams
stream.getBalance()Real-time balance

Splits

splits.create()Create a split config
splits.update()Update weights
splits.distribute()Trigger distribution

Contract addresses

Deployed on Vara Testnet. Mainnet addresses coming soon.

ContractAddressNetwork
StreamCore
0x7f3a...b2c1
Vara Testnet
TokenVault
0x4d2e...a8f3
Vara Testnet
SplitsRouter
0x9c1b...d4e7
Vara Testnet
PermissionManager
0x2a5f...c6b9
Vara Testnet
BountyAdapter
0x6e8d...f1a2
Vara Testnet

Frequently asked questions

What tokens are supported?

Currently USDC and VARA on Vara Testnet. More tokens will be added progressively. The protocol is token-agnostic — any ERC-20 compatible token can be streamed.

How does the buffer model work?

When creating a stream, the sender must deposit a buffer (e.g., 4 hours of flow). This guarantees the receiver will be paid. If the buffer depletes, the stream auto-pauses.

Can I stream to multiple receivers?

Yes! Use the SplitsRouter to define weighted distributions. One incoming stream can be split to N receivers (e.g., 60% developer, 30% reviewer, 10% platform).

Is there a minimum stream amount?

No hard minimum, but gas costs on Vara are extremely low (~$0.001). Practically, any amount above $0.01/hour is viable.

How do I integrate with my existing app?

Install the SDK (`npm i @growstreams/sdk`), connect a signer, and call `stream.create()`. Most integrations take under 10 minutes.