I am trying to create a js script using agent-js that creates a new wallet canister the same way dfx does it.
The script successfully creates the canister with CMC using notify_create_canister, but while trying to call the management canister install_code returns an error.
Invalid certificate: Canister aaaaa-aa not in range of delegations for subnet 0xba488d13a5dd7649d8093fe4897df1cc7c728ab64c856a78c4b97d6a02
On calls to the management canister, the effective_canister_id must be set in the call as the canister-target of the call, so for install_code that is the canister that is being installed.