forked from dfinity/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dfx canister status shows multiple controllers (dfinity#1782)
- `dfx canister info` displays all controllers - `dfx canister status` displays all controllers - `dfx canister update-settings` now accepts multiple instances of the `--controller` parameter. Note that update-settings forwards its call through the wallet to the management canister, so this works regardless of wallet version. - `dfx canister create` now accepts multiple instances of the `--controller` parameter. If the installed wallet does not support multiple controllers, displays an error message that mentions `dfx wallet upgrade`. - update to ic-ref (ic-hs) 0.18.0 See also: - dfinity/cycles-wallet#105 - dfinity/agent-rs#249 - dfinity/docs#575
- Loading branch information
1 parent
e4eb355
commit f5131a1
Showing
25 changed files
with
555 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
type EventKind = variant { | ||
CyclesSent: record { | ||
to: principal; | ||
amount: nat64; | ||
refund: nat64; | ||
}; | ||
CyclesReceived: record { | ||
from: principal; | ||
amount: nat64; | ||
}; | ||
AddressAdded: record { | ||
id: principal; | ||
name: opt text; | ||
role: Role; | ||
}; | ||
AddressRemoved: record { | ||
id: principal; | ||
}; | ||
CanisterCreated: record { | ||
canister: principal; | ||
cycles: nat64; | ||
}; | ||
CanisterCalled: record { | ||
canister: principal; | ||
method_name: text; | ||
cycles: nat64; | ||
}; | ||
WalletDeployed: record { | ||
canister: principal; | ||
} | ||
}; | ||
|
||
type Event = record { | ||
id: nat32; | ||
timestamp: nat64; | ||
kind: EventKind; | ||
}; | ||
|
||
type Role = variant { | ||
Contact; | ||
Custodian; | ||
Controller; | ||
}; | ||
|
||
type Kind = variant { | ||
Unknown; | ||
User; | ||
Canister; | ||
}; | ||
|
||
// An entry in the address book. It must have an ID and a role. | ||
type AddressEntry = record { | ||
id: principal; | ||
name: opt text; | ||
kind: Kind; | ||
role: Role; | ||
}; | ||
|
||
type WalletResultCreate = variant { | ||
Ok : record { canister_id: principal }; | ||
Err: text; | ||
}; | ||
|
||
type WalletResult = variant { | ||
Ok : null; | ||
Err : text; | ||
}; | ||
|
||
type WalletResultCall = variant { | ||
Ok : record { return: blob }; | ||
Err : text; | ||
}; | ||
|
||
type CanisterSettings = record { | ||
controller: opt principal; | ||
controllers: opt vec principal; | ||
compute_allocation: opt nat; | ||
memory_allocation: opt nat; | ||
freezing_threshold: opt nat; | ||
}; | ||
|
||
type CreateCanisterArgs = record { | ||
cycles: nat64; | ||
settings: CanisterSettings; | ||
}; | ||
|
||
|
||
// Assets | ||
type HeaderField = record { text; text; }; | ||
|
||
type HttpRequest = record { | ||
method: text; | ||
url: text; | ||
headers: vec HeaderField; | ||
body: blob; | ||
}; | ||
|
||
type HttpResponse = record { | ||
status_code: nat16; | ||
headers: vec HeaderField; | ||
body: blob; | ||
streaming_strategy: opt StreamingStrategy; | ||
}; | ||
|
||
type StreamingCallbackHttpResponse = record { | ||
body: blob; | ||
token: opt Token; | ||
}; | ||
|
||
type Token = record {}; | ||
|
||
type StreamingStrategy = variant { | ||
Callback: record { | ||
callback: func (Token) -> (StreamingCallbackHttpResponse) query; | ||
token: Token; | ||
}; | ||
}; | ||
|
||
service : { | ||
wallet_api_version: () -> (text) query; | ||
|
||
// Wallet Name | ||
name: () -> (opt text) query; | ||
set_name: (text) -> (); | ||
|
||
// Controller Management | ||
get_controllers: () -> (vec principal) query; | ||
add_controller: (principal) -> (); | ||
remove_controller: (principal) -> (WalletResult); | ||
|
||
// Custodian Management | ||
get_custodians: () -> (vec principal) query; | ||
authorize: (principal) -> (); | ||
deauthorize: (principal) -> (WalletResult); | ||
|
||
// Cycle Management | ||
wallet_balance: () -> (record { amount: nat64 }) query; | ||
wallet_send: (record { canister: principal; amount: nat64 }) -> (WalletResult); | ||
wallet_receive: () -> (); // Endpoint for receiving cycles. | ||
|
||
// Managing canister | ||
wallet_create_canister: (CreateCanisterArgs) -> (WalletResultCreate); | ||
|
||
wallet_create_wallet: (CreateCanisterArgs) -> (WalletResultCreate); | ||
|
||
wallet_store_wallet_wasm: (record { | ||
wasm_module: blob; | ||
}) -> (); | ||
|
||
// Call Forwarding | ||
wallet_call: (record { | ||
canister: principal; | ||
method_name: text; | ||
args: blob; | ||
cycles: nat64; | ||
}) -> (WalletResultCall); | ||
|
||
// Address book | ||
add_address: (address: AddressEntry) -> (); | ||
list_addresses: () -> (vec AddressEntry) query; | ||
remove_address: (address: principal) -> (WalletResult); | ||
|
||
// Events | ||
get_events: (opt record { from: opt nat32; to: opt nat32; }) -> (vec Event) query; | ||
get_chart: (opt record { count: opt nat32; precision: opt nat64; } ) -> (vec record { nat64; nat64; }) query; | ||
|
||
// Assets | ||
http_request: (request: HttpRequest) -> (HttpResponse) query; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.