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

3 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

Does CanCan use cycles wallet or not?
In my understanding every application must use a cycles wallet. Doesn’t have to be one you ceated but it must happen to turn ICP into cycles.

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?

Cycles wallet are for devs only. Users do not need to have a wallet only and identity which creates a wallet as well.

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

The owner is responsible.

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

The owner always pays.

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?

The front end is decentralized in accordance with the protocol. The other questions are a bit confusing. Users are managed in accordance to the smart contract code.

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?

No cycles wallet is only used as means of funding the application and managing it as a dev. It doesn’t have any performance issues when it comes to users.