How send identity?

how can i send identity structure from fuel-ts??

I hope to receive the structure in the contract.
what is the difference between the structure identity and address?

I tried to send using fuel’s dynamic typing, but without success either

export type IdentityInput = Enum<{ Address: AddressInput, ContractId: ContractIdInput }>;
export type AddressInput = { value: string };
export type ContractIdInput = { value: string };

but I was not successful

1 Like

You can use Typegen to generate accurate type definitions from all structures your contract uses:

After that, you can import and use the generated files like this:

If you still have problems, please describe the issue (with more details) and share the code from your Sway contract.


You can also find an example here: sway-farm/Garden.tsx at a6f0f1699bb7b7de5df8ee58856f4647e255b2f2 · FuelLabs/sway-farm · GitHub


I had tried to send the address as a string, converter to B256 worked for me

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.