diff --git a/packages/agent/src/actor.ts b/packages/agent/src/actor.ts index 6c139e35f..0e284a52e 100644 --- a/packages/agent/src/actor.ts +++ b/packages/agent/src/actor.ts @@ -332,7 +332,7 @@ async function _requestStatusAndLoop( // we don't know the result and cannot decode it. throw new Error( `Call was marked as done but we never saw the reply:\n` + - ` Request ID: ${requestIdToHex(requestId)}\n` + ` Request ID: ${requestIdToHex(requestId)}\n`, ); } } diff --git a/packages/agent/src/canisters/asset.ts b/packages/agent/src/canisters/asset.ts index d4dc6754f..52b28cc0c 100644 --- a/packages/agent/src/canisters/asset.ts +++ b/packages/agent/src/canisters/asset.ts @@ -5,6 +5,7 @@ import assetCanister from './asset_idl'; export interface AssetCanisterRecord { store(path: string, content: number[]): Promise; retrieve(path: string): Promise; + list(): Promise; } /* tslint:enable */ diff --git a/packages/agent/src/canisters/asset_idl.ts b/packages/agent/src/canisters/asset_idl.ts index a698ae31d..db8b0ea99 100644 --- a/packages/agent/src/canisters/asset_idl.ts +++ b/packages/agent/src/canisters/asset_idl.ts @@ -7,5 +7,6 @@ export default ({ IDL }) => { return IDL.Service({ retrieve: IDL.Func([IDL.Text], [IDL.Vec(IDL.Nat8)], ['query']), store: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8)], [], []), + list: IDL.Func([], [IDL.Vec(IDL.Text)], ['query']), }); }; diff --git a/packages/agent/src/canisters/management_idl.ts b/packages/agent/src/canisters/management_idl.ts index d39417068..63863c2d5 100644 --- a/packages/agent/src/canisters/management_idl.ts +++ b/packages/agent/src/canisters/management_idl.ts @@ -1,5 +1,6 @@ /** - * This file is generated from the candid for asset management. + * This file is generated from public spec 0.10. + * didc bind ic.did -t js */ /* tslint:disable */ // @ts-ignore @@ -7,25 +8,51 @@ export default ({ IDL }) => { const canister_id = IDL.Principal; const wasm_module = IDL.Vec(IDL.Nat8); return IDL.Service({ - create_canister: IDL.Func([], [IDL.Record({ canister_id: canister_id })], []), - install_code: IDL.Func( + stop_canister: IDL.Func([IDL.Record({ canister_id: canister_id })], [], []), + start_canister: IDL.Func([IDL.Record({ canister_id: canister_id })], [], []), + canister_status: IDL.Func( + [IDL.Record({ canister_id: canister_id })], + [ + IDL.Record({ + status: IDL.Variant({ + stopped: IDL.Null, + stopping: IDL.Null, + running: IDL.Null, + }), + }), + ], + [], + ), + delete_canister: IDL.Func([IDL.Record({ canister_id: canister_id })], [], []), + set_controller: IDL.Func( [ IDL.Record({ - mode: IDL.Variant({ install: IDL.Null, reinstall: IDL.Null, upgrade: IDL.Null }), canister_id: canister_id, - wasm_module: wasm_module, - arg: IDL.Vec(IDL.Nat8), - compute_allocation: IDL.Opt(IDL.Nat), - memory_allocation: IDL.Opt(IDL.Nat), + new_controller: IDL.Principal, }), ], [], [], ), - set_controller: IDL.Func( - [IDL.Record({ canister_id: canister_id, new_controller: IDL.Principal })], + install_code: IDL.Func( + [ + IDL.Record({ + arg: IDL.Vec(IDL.Nat8), + wasm_module: wasm_module, + mode: IDL.Variant({ + reinstall: IDL.Null, + upgrade: IDL.Null, + install: IDL.Null, + }), + canister_id: canister_id, + memory_allocation: IDL.Opt(IDL.Nat), + compute_allocation: IDL.Opt(IDL.Nat), + }), + ], [], [], ), + raw_rand: IDL.Func([], [IDL.Vec(IDL.Nat8)], []), + create_canister: IDL.Func([], [IDL.Record({ canister_id: canister_id })], []), }); };