Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 committed Oct 28, 2024
1 parent fdd9afe commit c10f8d8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/design/asset-canister-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ The size of any chunk cannot exceed the message ingress limit.

```candid
service: (asset_canister_args: variant {
Init: record {};
Init: record {
set_permissions: opt record {
prepare: vec principal;
commit: vec principal;
manage_permissions: vec principal;
};
};
Upgrade: record {
set_permissions: opt record {
prepare: vec principal;
Expand All @@ -179,7 +185,7 @@ The methods `init` and `post_upgrade` are called automatically by the system aft
Both methods take the same argument type by definition. Therefore, to be able to have different arguments for the two cases, an enum is used to make the distinction.
If `init` is called with the `Upgrade` variant or if `post_upgrade` is called with the `Init` variant the asset canister traps and thereby reverts the code changes.

In `Upgrade`, the field `set_permissions` can be used to (re)set the list of principals with the listed permissions.
In both variants, the field `set_permissions` can be used to (re)set the list of principals with the listed permissions.
If `set_permissions` that is not `null`, then all permissions are set to the newly provided list of principals and the previous lists of principals are discarded.

### Method: `get`
Expand Down

0 comments on commit c10f8d8

Please sign in to comment.