To encode the init args for any canister, you need to have the idlFactory
for the init
function. If you have the canister setup with DFX, then you get it using dfx generate
. For the ICP ledger, you can also find it here.
And then you can use it similarly to this example.
If you have any further issues with PicJS, feel free to post it on the PicJS thread to keep this one relevant to the original topic.