Some questions about - Cycles wallet and without cycles wallet application

Hi everyone,

a few days ago I started working on dfx 0.7.1 - 0.7.2 and I am confused with the cycles wallet. Here are some of my questions:

  • As I understand, when you create a new project in dfx 0.7.2, by default this project work with cycles wallet. How can someone create a project in dfx 0.7.2 that works without cycles wallet? Is something specific that someone must do, to ensure that end-users of an application will not have to use their wallets? Although, someone can bypass the cycles wallet by using dfx canister --no-wallet call locally, I cannot understand when the application is not local, how these calls will be executed.

  • Is there a way to use Candid UI to make your calls in a 0.7.2 dfx project, without using cycles wallet?

Thank you :slight_smile: !

1 Like

The local cycles wallet was added to mimic the flow of control that needs to happen in production. We expect that most people will be creating canisters through a wallet, so that the wallet’s Principal will be the direct controller of the new canister. That is why the assumption is that calls will go through a wallet, with --no-wallet being the exception, where your dfx Principal has been made the controller directly.

To create a project without a cycles wallet, you could do the following

  • Create a canister using the NNS dapp
  • Assign your dfx Principal as a controller
  • Install your software to the canister
  • Write logic so that end users can sign in using Internet Identity, Username + Password, Metamask, or other authentication strategies (without making them controllers)

Candid UI still exists, although it isn’t shipped by default in asset canisters. You can install and run it from candid/tools/ui at master · dfinity/candid · GitHub. Note - Candid UI only supports API calls that are available to an AnonymousIdentity

2 Likes

Thank you for your answer @kpeacock :slight_smile: that was quite helpful! Some more questions:

  • Does CanCan use cycles wallet or not? In CanCan repository I can see the Internet Identity and the agent.

  • If an application uses cycles wallet, does this mean that every user “must” have a wallet to interact with this application?

  • If an application uses cycles wallet, do the users pay for their calls or the owner of the canister is responsible for the fees?

  • When an application is not using cycles wallet, the cost of the cycles will be paid from the owner’s wallet?

  • If the front-end of an application is centralized and is connected with a canister via agent, can this application use cycles wallet or it can only use Internet Identity to manage users?

  • If I choose to use cycles wallet to my application, that means that my application’s calls will have a bigger delay than without cycles wallet? If yes, does this affect the get calls too?

I am sorry if my questions are a bit stupid, just I am confused and I want to understand the opportunities for both sides (with or without cycles wallet application) and how exatly cycles wallet work.

1 Like