Authentication
Using a Private Keyโ
const streamrClient = new StreamrClient({
auth: {
privateKey: 'your-private-key',
},
});
const logStoreClient = new LogStoreClient(steamrClient);
Private keys can also be generated using LogStoreClient.generateEthereumAccount()
.
Using a Web3 Providerโ
const streamrClient = new StreamrClient({
auth: {
ethereum: window.ethereum,
},
});
const logStoreClient = new LogStoreClient(steamrClient);
You can also create an anonymous client instance that can interact with public streams:
const streamrClient = new StreamrClient();
const logStoreClient = new LogStoreClient(streamrClient);