Type alias PostRuleMetadataDetails

PostRuleMetadataDetails: {
    authors: string[];
    configureParams: ContractKeyValuePairDescriptor[];
    description: Markdown;
    id: string;
    name: string;
    processCreatePostParams: ContractKeyValuePairDescriptor[];
    processEditPostParams: ContractKeyValuePairDescriptor[];
    source: URI;
    title: string;
}

Type declaration

  • authors: string[]

    List of authors email addresses.

  • configureParams: ContractKeyValuePairDescriptor[]

    A list of ContractKeyValuePairDescriptor that describes the ruleParams argument of the configure function.

    function configure(bytes32 configSalt, uint256 postId, KeyValue[] calldata ruleParams) external;
    

    This will be used to know how to encode and decode the params for the configure function.

  • description: Markdown

    Markdown formatted description of the Rule.

    It should explain what this Rule does, how to use it, examples just like you would if you were building an NPM package. The more detail the better to allow dApp to easily integrate it.

  • id: string

    A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.

  • name: string

    A short name for the Rule.

  • processCreatePostParams: ContractKeyValuePairDescriptor[]

    A list of ContractKeyValuePairDescriptor that describes the ruleParams argument of the processCreatePost function.

    function processCreatePost(
      bytes32 configSalt,
      uint256 rootPostId,
      uint256 postId,
      CreatePostParams calldata postParams,
      KeyValue[] calldata primitiveParams,
      KeyValue[] calldata ruleParams
    ) external;
    

    This will be used to know how to encode and decode the params for the processCreatePost function.

  • processEditPostParams: ContractKeyValuePairDescriptor[]

    A list of ContractKeyValuePairDescriptor that describes the ruleParams argument of the processEditPost function.

    function processEditPost(
      bytes32 configSalt,
      uint256 rootPostId,
      uint256 postId,
      EditPostParams calldata postParams,
      KeyValue[] calldata primitiveParams,
      KeyValue[] calldata ruleParams
    ) external;
    

    This will be used to know how to encode the calldata for the processEditPost function.

  • source: URI

    The link to the Rule source code. Typically a GitHub repository.

  • title: string

    The human-friendly title for the Rule.