This module is legible to non-returning-function attack. Throw it away if it fails this way.
Data is stored in bootstrapper_data
instead.
public func doBootstrapFrontend(
frontendTweakPubKey : PubKey,
user : Principal,
amountToMove : Nat
) : async { installedModules : [(Text, Principal)] }
public func bootstrapFrontend({ frontendTweakPubKey : PubKey }) : async { installedModules : [(Text, Principal)]; spentCycles : Int }
We don't allow to substitute user-chosen modules, because it would be a security risk of draining cycles.
In testing mode, cycles are supplied as the main account of the bootstrapper canister and returned back to the same account.
public func bootstrapBackend({ frontendTweakPrivKey : PrivKey; installedModules : [(Text, Principal)]; user : Principal }) : async { spentCycles : Int }
Installs the backend after frontend is already installed, tweaks frontend.
We don't allow to substitute user-chosen modules for the package manager itself, because it would be a security risk of draining cycles.
public func doBootstrapBackend({ pubKey : PubKey; installedModules : [(Text, Principal)]; user : Principal; amountToMove : Nat; tweaker : Data.FrontendTweaker }) : async { battery : Principal }
public func userAccountText() : async Text
public func topUpCycles() : async { balance : Nat }
public func topUpWithICP() : async { balance : Nat }
public func balance() : async Nat
public func userCycleBalance() : async Nat