LedgerCanisterInitPayload.fromJson constructor

LedgerCanisterInitPayload.fromJson(
  1. Map map
)

Implementation

factory LedgerCanisterInitPayload.fromJson(Map map) {
  final initValues = map['initial_values'] as List<List>;
  final initialValues = [
    [initValues[0], ICPTs.fromJson(initValues[1] as Map)],
  ];
  return LedgerCanisterInitPayload(
    sendWhitelist: map['send_whitelist'],
    mintingAccount: map['minting_account'],
    initialValues: initialValues,
    transactionWindow: map['transaction_window'] != null
        ? PayloadDuration.fromJson(map['transaction_window'])
        : null,
    maxMessageSizeBytes: map['max_message_size_bytes'],
    archiveOptions: map['archive_options'] != null
        ? ArchiveOptions.fromJson(map['archive_options'])
        : null,
  );
}