Actor management: failed to decode call arguments

Hi everyone, Im developing a canister that can deploy a ICRC1 Ledger by uploading wasm. This is my code:

let IC0 : Types.ActorManagement = actor ("aaaaa-aa");
let { canister_id } = await IC0.create_canister({
  settings = ?{
    controllers = ?[Principal.fromActor(this)];
    compute_allocation = null;
    memory_allocation = null;
    freezing_threshold = null;
  };
});

let initArgs : Types.InitArgs = {
  token_symbol = "MYTOKEN";
  token_name = "My Token";
  transfer_fee = 0;
  decimals = ?8;
  feature_flags = ?{ icrc2 = true };
  minting_account = { owner = Principal.fromActor(this); subaccount = null };
  fee_collector_account = null;
  initial_balances = [];
  send_whitelist = ?[];
  metadata = [];
  archive_options = {
      num_blocks_to_archive = 1000;
      trigger_threshold = 2000;
      controller_id = Principal.fromActor(this);
      max_transactions_per_response = null;
      max_message_size_bytes = null;
      cycles_for_archive_creation = null;
      node_max_memory_size_bytes = null;
      more_controller_ids = null;
  };
  max_memo_length = null;
  max_message_size_bytes = null;
  transaction_window = null;
  maximum_number_of_accounts = null;
  accounts_overflow_trim_quantity = null;
};

await IC0.install_code({
  mode = #install;
  canister_id = canister_id;
  wasm_module = ledgerWasm;
  arg = Blob.toArray(to_candid (initArgs));
});

But it throws this error:

Error: Call was rejected:
  Request ID: dbfc1afc4c0a083cc5ab27167ff500c030a5679b5f97b4863cf9844dc8d1506c
  Reject code: 4
  Reject text: Canister ewdd7-oeaaa-aaaaa-qaa7a-cai trapped explicitly: failed to decode call arguments: Custom(Fail to decode argument 0

Caused by:
    Subtyping error: Type mismatch at external/crate_index__candid-0.10.5/src/de.rs:1028)

My wasm file is: https://download.dfinity.systems/ic/04775a0d6a27b65be2412f73172e529a138a6f44/canisters/ic-icrc1-ledger.wasm.gz

I have been struggling to this for several days already. Thank you very much

This is how I handle wasm file:

const buffer = readFileSync(`${absoluteDir}/../../scripts/icrc1_ledger.wasm`);

and in Motoko:

let ledgerWasm: [Nat8] = Blob.toArray(buffer: Blob);
let initArgs : Types.InitArgs = {
            decimals = ?8;
            token_symbol = "MYTOKEN";
            transfer_fee = 0;
            metadata = [];
            minting_account = {
                owner = Principal.fromActor(this);
                subaccount = null;
            };
            initial_balances = [];
            maximum_number_of_accounts = ?1000;
            accounts_overflow_trim_quantity = ?10;
            fee_collector_account = null;
            archive_options = {
                num_blocks_to_archive = 1000;
                max_transactions_per_response = ?100;
                trigger_threshold = 2000;
                max_message_size_bytes = ?10000;
                cycles_for_archive_creation = ?10000000000000;
                node_max_memory_size_bytes = ?100000000;
                controller_id = Principal.fromActor(this);
            };
            max_memo_length = ?32;
            token_name = "My Token";
            feature_flags = ?{ icrc2 = true };
        };

let ledgerArg : Types.LedgerArg = #Init(initArgs);

await IC0.install_code({
  mode = #install;
  canister_id = canister_id;
  wasm_module = ledgerWasm;
  arg = to_candid (ledgerArg);
  sender_canister_version = null;
});

pass arguments like above