I have the following typescript in my test script:
const tmdBytes = Bytes.hex_encode("ipfs://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
const tmdMap : Array<[ string, Bytes ]> = [" ", tmdBytes]
The second line is giving me the errors:
Type 'string' is not assignable to type '[string, Bytes]'.
Type 'Bytes' is not assignable to type '[string, Bytes]'.
I have tried to copy the example in the docs which is:
const ledger : Array<[ Address, Int ]> = []
The errors of course go away if I remove the values from the array, copying the docs exactly, but then I don't know how to add the values to the Map/Array.
My goal is to pass this array as a parameter in a test script, eg:
await fa2_contract.mint(
ownerAddress
tmdMap,
{})
Any help appreciated, thanks.