I am using the openbrush standard to implement a psp34 token. Now I want to call certain methods from said token, like for example owner_of.
owner_of from psp34 has id:Id as an input which can then be defined as U8, U16, U32, U64, U128 or Bytes.
The input on the JavaScript side is a String like this:
const id = '0xf59eee94f32bfeddeca43d100742db523b5d00041d2314512c37c663e3404c68'
and now I want to call the owner_of method, using said Id. This results in this error:
Uncaught (in promise) Error: createType(OpenbrushContractsTypesId):: Unable to create Enum via index 237, in U8, U16, U32, U64, U128, Bytes
I tried to use the createType package of polkadot like this:
const input = api.createType('Bytes', id)
But it results in the same error. How can I cast my String input to 'Bytes' so it will be accepted by the api?