orbis.updateChannel()

Will update an existing channel. Can only be used by the admin of a group

How to use?

let res = await orbis.updateChannel(
  "kjzl6cwe1...e4wvxhiqj",
  {
    pfp: "https://...",
    name: "Orbis Community",
    description: "Official place to discuss Orbis related stuff."
  }
);

Parameters

  • channel_id: ID of the channel being updated
  • content: JSON object that contains the details of the channel
  • group_id: string ID of the group this channel is part of
  • name: string Name of the channel
  • description: string Description of the channel
  • type: string Display type for the channel, can be:
  • chat: If the channel should be displayed as a group chat like Discord
  • feed: If the posts shared are longer with comments and threads
  • encryptionRules: 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, only token-gated is supported for now.
  • chain: string The chain on which the smart contract is. Must be one of those in lowercase
  • contractType: string The type of contract being used, must be ERC20, ERC721 or ERC1155.
  • 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 for ERC1155 tokens to represent the tokenId used.
  • vcAccessRules: array optional The list of credentials requested to share content in this channel.
  • key: string The key to check in the credential JSON object.
  • id: string The value expected for the key
  • rule: string Can be = or includes. It will be used to check if the key is equal to the id or if it should simply include it.
  • issuer: string The did issuing the credential.
  • data: string optional Can be used to attach some custom data to a channel

Returns

{
  status: 200,
  doc: "kjzl6cwe1...e4wvxhiqj",
  result: "Success creating TileDocument."
}