near / fast-auth-signer

https://fast-auth-signer.vercel.app
MIT License
29 stars 8 forks source link

Release 2.0.0 FastAuthWallet version to BOS VM and NearDiscovery #249

Open Pessina opened 3 weeks ago

Pessina commented 3 weeks ago

The current FastAuthWallet and FastAuthSigner support only signing delegate actions. This PR introduces new methods to enable FastAuthWallet and FastAuthSigner to sign and send transactions without using a relayer.

PR link: #26

New Methods:

The interface of these new methods is consistent with the existing signAndSendTransaction.

Important Notes:

charleslavon commented 3 weeks ago

hey @Pessina can you help clarify what are the end goals as it relates to near-discovery and the relayer used by the vm?

Pessina commented 3 weeks ago

Hey @charleslavon ,

The previous version of the wallet was only able to sign DelegateAction and send them through the relayer. What imposed some limitations, like: only being able to call contracts and actions whitelisted/allowed by the relayer.

With this new version, the dApp have the option to choose if it wants to request a DelegateAction signature (gas paid by the relayer) or a Transaction signature (gas paid by the user).

For more details I pinged @esaminu, I think he knows more about the ecosystem and can explain it better than me.

esaminu commented 3 weeks ago

Hi @charleslavon to add to @Pessina 's explanation the end goal is to integrate the new signAndSendDelegateAction into the BOS and make it accessible to component developers. Currently only signAndSendTransaction is accessible to component devs through the following methods:

  1. Social.set
  2. Near.call
  3. CommitButton, I remember using this before but I don't see it in the docs anymore. Maybe it was deprecated?

We need to add similar methods or add additional arguments to these methods so that component developers can be more explicit and opt to send these transactions as meta transactions covered by the relayer and secondly we need to update the actions that intend to use the relayer in near-discovery-components e.g. the TOS component and DevHub components. Since BOS components support many wallets they will likely need to check if the wallet their user selected supports meta transactions before calling the new methods.

geltonastech commented 2 weeks ago

Just to understand. So people like me who created a wallet using email address at near.org still cannot withdraw funds right?

how to create a ticket for help in this regard? thanks in advance

charleslavon commented 6 days ago

hey @geltonastech this issue is a requisite to support allowing fast-auth accounts successfully sign arbitrary transactions like sending funds. This is being prioritized for attention. Keep an eye on this issue for progress updates. Thanks.

charleslavon commented 1 day ago

@Pessina @esaminu for local development and testing of 2.1.0, what should I pass into setupFastAuthWallet({ walletUrl, iconUrl, deprecated, successUrl, failureUrl, relayerUrl, })

Pessina commented 1 day ago

@charleslavon for local development you have to provide the walletUrl. If the relayer it's failing too much, I also provide the relayerUrl.

In order to provide the walletUrl follow this steps:

Then you provide to walletUrl: http://localhost:3000 something like this.

Let me know if you face any issues, if it's better you can ping me on slack

Pessina commented 1 day ago

@charleslavon I'm sorry, I think I wasn't clear about the relayerUrl, you have to provide it.

In case the url setup on the main branch it's not working, then I provide a local relayerUrl