Function encode_json_str_to_native_script

Source
pub fn encode_json_str_to_native_script(
    json: &str,
    self_xpub: &str,
    schema: ScriptSchema,
) -> Result<NativeScript, JsError>
Expand description

Receives a script JSON string and returns a NativeScript. Cardano Wallet and Node styles are supported.

  • wallet: https://github.com/input-output-hk/cardano-wallet/blob/master/specifications/api/swagger.yaml
  • node: https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md

self_xpub is expected to be a Bip32PublicKey as hex-encoded bytes