Creating Channel on dApp / Server / Smart Contract
The creation of channel is a one time process and as such is recommended to do it either from EPNS dApp, EPNS JS library or a custom JS library of your choice. Information about the channel payload specs is described here.
Interfacing directly via smart contract to protocol to create a channel can also be done by calling it
- with public key registry function
createChannelWithFeesAndPublicKey(ChannelType _channelType, bytes calldata _identity, bytes calldata _publickey) external
- without public key registry function
createChannelWithFees(ChannelType _channelType, bytes calldata _identity)
The delimiter + is used for joining the fields together, this is done to optimize the payload written on chain.
Example _identity: 1+QmXSuc8iVsNFtsqrFvgHWpa6tJXFLoq2QEWYu2aS6KF8ux
Example _publickey: 0x187c0568118be8032ece2499135d16a69b1da955125185c195a900d45eed0a325f2a7bf3ce6eb01375011db55d3a311fd84c2a17d0476edf8c6290f36ed2280b
Always recommended to interface with EPNS JS Library for abstracting these details out.
This feature of protocol might change for further optimizations in the future.