orbis.createChannel()
Will create a new channel
in an existing group
. Can only be used by the admin
of a group
How to use?
let res = await orbis.createChannel(
"kjzl6cwe1...e4wvxhiqj",
{
pfp: "https://...",
name: "Orbis Community",
description: "Official place to discuss Orbis related stuff."
}
);
Parameters
group_id
: ID of the group in which this channel should becontent
: JSON object that contains the details of the channelgroup_id
:string
ID of the group this channel is part ofname
:string
Name of the channeldescription
:string
Description of the channeltype
:string
Display type for the channel, can be:chat
: If the channel should be displayed as a group chat like Discordfeed
: If the posts shared are longer with comments and threadsencryptionRules
:object
optional
A JSON object containing the optional encryption rules for this channel. Those rules must then be passed as a parameter to the createPost function.type
:string
The type of encryption needed, onlytoken-gated
is supported for now.chain
:string
The chain on which the smart contract is. Must be one of those in lowercasecontractType
:string
The type of contract being used, must beERC20
,ERC721
orERC1155
.contractAddress
:string
The address of the contract.minTokenBalance
:string
The minimum balance required to decrypt the post (in WEI for ERC20).tokenId
:string
optional
Used only forERC1155
tokens to represent thetokenId
used.data
:string
optional
Can be used to attach some custom data to a channel
Returns
{
status: 200,
doc: "kjzl6cwe1...e4wvxhiqj",
result: "Success creating TileDocument."
}
Next steps
Explore other parts of the API.