Hello, @Gabriel I have one question about the agent and identities-PrinicpalIDs. Does the agent create new Principals per browser like we already know? I am new to agent so I am currently trying to understand how it works and what could I create with that.
That particular setup will store an identity in the browser’s local storage, it’ll keep using this one if found. If you were to delete your browser’s local data it would generate you a new one. See this part: dfinity-react/agent.js at main · gabrielnic/dfinity-react · GitHub
Thanks for creating the issues! We do generate a d.ts file alongside the other content in dfx-generated, but I recognize the ergonomics aren’t great. I’ve got a proposal on the backlog to provide a command to generate those files so they can be committed into your source code.
you need to import _SERVICE and pass it to Actor.createActor<_SERVICE>(...
Long term goal is for this to all be automatic, but I do want to get you unblocked.
I think the BigInt issue will go away when we release the next version of DFX that removes the BigNumber references, and idk what’s up with the SVG
…which raises "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.ts(2363)". It should probably be a type instead:
Working on updating the version of candid used by dfx now, where we’ve fixed that.
While we haven’t added in the generate types command yet, a good workaround we’ve used in a few projects is to download didc and use it to output the types into the source directory. Releases · dfinity/candid · GitHub
Improved TypeScript + Candid experience now one of the top three priorities in my queue. It’s going to take some time to design it and get it right though