Added initial support for recursive PlutusData types. It is very simple patch, but it's required for handling recursive datatypes with translucent. It still requires manual intervention see example below:
Define the relevant types in aiken
pub type Node {
Link { value: ByteArray, next: Node }
Value { value: ByteArray}
}
pub type MintRedeemer {
node: Node,
}
import * as P from './plutus.ts'
...
const node: P.Node = {
Link: {
value: "test1",
next: {
Link: {
value: "test2",
next: { Value: { value: "test3", } },
},
},
},
}
...
const rdmr: P.MintRedeemer = {
Minting: [
{
Node: node,
},
], // Use 'as const' to assert that Minting is a tuple with a single element
}
const rdmr = Data.to(mintRedeemer, P.MyMinting.rdmr, 'node')
// pass this to the MyMinting script as redeemer.
Added initial support for recursive PlutusData types. It is very simple patch, but it's required for handling recursive datatypes with translucent. It still requires manual intervention see example below: Define the relevant types in aiken
Modify the
blueprint.ts
generatedplutus.ts
Use it witg translucent