Context
Hello,
I'm sorry to say this, but I think your docs are pretty bad. It has taken me days to implement AppKit and it looks like it could have been a 20 minute job.
The problem is that you don't explain the general idea you had in mind for how AppKit should be used. You jump into code very quickly to give the illusion of simplicity, when actually this leaves complete strangers in the dark.
When designing the SDK, your developer(s) must have had an idea in mind for how it would work, it's not possible to build something without a vision for its use. This vision should be communicated.
I think you need a page which lays out the general idea for how it is supposed to be implemented, without code, for a plain JS implementation on a normal MPA website - just talking through the design.
For example, explain the configuration and why you made the choices you did. Explain when to open the modal and close it, and how to react to the events. Educate your reader.
Can I also draw your attention to MetaMask documentation as an example of great crypto docs. I think many blockchain projects and companies have very poor documentation, and I think TS/JS itself has patterns/culture which makes for code which is harder to guess how to use than other (more verbose) languages.
The 'long-windedness' of some class-based languages helps with self-documentation, so when using JS/TS we instead need explicit external documentation instead - there is no free lunch.
Thanks
Luke
Background:
I use it for SIWE. I use the modal to get and address and provider which I pass to my own SIWE JS which communicates with my backend which formats and returns a SIWE message text that is signed via the provider and send back to my backend for validation. I cannot handle counterfactual wallets because my backend is C# and I am using my own Eth client (I should just setup viem in a JS cloud function).
My implementation is a mess. I have three places in my website where I need to connect wallets and each is different. Each time, I have got it to work almost by accident. I still don't have a very clear idea of how AppKit should be used.
Context
Hello,
I'm sorry to say this, but I think your docs are pretty bad. It has taken me days to implement AppKit and it looks like it could have been a 20 minute job.
The problem is that you don't explain the general idea you had in mind for how AppKit should be used. You jump into code very quickly to give the illusion of simplicity, when actually this leaves complete strangers in the dark.
When designing the SDK, your developer(s) must have had an idea in mind for how it would work, it's not possible to build something without a vision for its use. This vision should be communicated.
I think you need a page which lays out the general idea for how it is supposed to be implemented, without code, for a plain JS implementation on a normal MPA website - just talking through the design.
For example, explain the configuration and why you made the choices you did. Explain when to open the modal and close it, and how to react to the events. Educate your reader.
Can I also draw your attention to MetaMask documentation as an example of great crypto docs. I think many blockchain projects and companies have very poor documentation, and I think TS/JS itself has patterns/culture which makes for code which is harder to guess how to use than other (more verbose) languages.
The 'long-windedness' of some class-based languages helps with self-documentation, so when using JS/TS we instead need explicit external documentation instead - there is no free lunch.
Thanks
Luke
Background:
I use it for SIWE. I use the modal to get and address and provider which I pass to my own SIWE JS which communicates with my backend which formats and returns a SIWE message text that is signed via the provider and send back to my backend for validation. I cannot handle counterfactual wallets because my backend is C# and I am using my own Eth client (I should just setup viem in a JS cloud function).
My implementation is a mess. I have three places in my website where I need to connect wallets and each is different. Each time, I have got it to work almost by accident. I still don't have a very clear idea of how AppKit should be used.