-
Stream ID Generation
- Deterministic generation from descriptive names
- Ensures unique, reproducible identifiers
const streamId = await StreamId.generate("economic_indicator");
-
Stream Deployment
- Validate stream type (Primitive/Composed)
- On-chain registration
- Transaction confirmation
await client.deployStream(streamId, StreamType.Primitive);
-
Stream Mutation
- Record insertion
- Taxonomy configuration
- Visibility settings
-
Stream Destruction
- Permanent removal from network
- Irreversible operation
await client.destroyStream(streamLocator);
- Represent relative importance
- Dynamic reconfiguration possible
await composedAction.setTaxonomy({
stream: composedStreamLocator,
taxonomyItems: [
{ childStream: stockStream, weight: "0.6" },
{ childStream: commodityStream, weight: "0.4" },
],
startDate: Math.floor(Date.now() / 1000),
});- Weighted Average
- Linear combination of child streams
- Hierarchical Aggregation
- Multi-level stream composition
- Time-Weighted Composition
- Varying weights based on temporal factors
- Batch record insertions
// Batch record insertion
await primitiveAction.insertRecords([
{ stream: stream1, eventTime: 1, value: "1" },
{ stream: stream2, eventTime: 2, value: "2" },
]);- Granular read/write permissions
- Public and private stream configurations
- Wallet-based access management
// Set stream visibility
await streamAction.setReadVisibility(streamLocator, visibility.private);
// Grant specific wallet access
await streamAction.allowReadWallet(
streamLocator,
EthereumAddress.fromString("0x...")
);- Use environment-secured private keys
- Implement robust error handling
- Validate stream data before insertion
- Monitor transaction confirmations