W3bstream Outputs
A W3bstream proof can be directed to various destinations, referred to as "Outputs." Each configuration in the W3bstream project file must have an output specified. Below is an example configuration structure:
Each output type has its own settings and parameters. Below are the supported output types and their respective configurations:
Standard Output
stdout
is the default output for a configuration and is ideal during the development phase. It allows developers to retrieve the proof from the W3bstream node log for local verification without writing it to an actual destination. This simplifies debugging and testing:
Explanation of Settings
type: Specifies the output type. For standard output, this should be set to
stdout
.
By using the stdout
output type, you can focus on ensuring that your proofs are generated correctly and efficiently before moving on to more complex output configurations.
Ethereum Contract
When you need the W3bstream proof to be written to your Dapp contract (e.g., to trigger your DePIN token economy), you should use the ethereumContract
output type. This output currently supports the IoTeX blockchain and requires some additional settings:
Explanation of Settings
type: Specifies the output type. For Ethereum contracts, this should be set to
ethereumContract
.chainEndpoint: The endpoint of the IoTeX blockchain where your Dapp operates.
contractAddress: The address of the W3bstream router contract on the IoTeX blockchain.
receiverContract: The address of your DePIN Dapp contract that is supposed to receive the W3bstream proofs.
contractMethod: The method in the receiver contract that will handle the proof.
contractAbiJSON: The ABI of the method in the receiver contract that will handle the proof.
By configuring the output as shown, you ensure that the proofs generated by W3bstream are correctly sent to your Dapp contract on the IoTeX blockchain, enabling your DePIN token economy to function as intended.
Last updated