entropy-programs-core 0.11.0

Core traits and types for building programs on the Entropy network.
Documentation
package entropy:core

world program {
   // similar to `variant`, but no type payloads
  variant error {
    /// The signature request is invalid (ie. the `initial-state` )
    invalid-signature-request(string),
    evaluation(string)
  }
  /// Evaluates the program given the user's signature request and the program's configuration.
  export evaluate: func(signature-request: signature-request, config: option<list<u8>>, oracle-data: option<list<list<u8>>>) -> result<_, error>
  
  /// Programs that use custom hash functions can a custom 32-byte curve point to be signed.
  export custom-hash: func(data: list<u8>) -> option<list<u8>>

  record signature-request {
    /// Preimage of the user's data that will be signed (eg. RLP-encoded ETH transaction request).
    message: list<u8>,
    /// Auxiliary data optionally required for program evaluation; this won't be signed (eg. zero-knowledge proof, third party signature)
    auxilary-data: option<list<u8>>
  }
}