channelAutorize method

Future<Map<String, dynamic>> channelAutorize(
  1. String channelId,
  2. BigInt amount, {
  3. String? secret,
  4. String? seed,
  5. String? seedHex,
  6. String? passphrase,
  7. CryptoAlgorithm? keyType,
})

Implementation

Future<Map<String, dynamic>> channelAutorize(
  String channelId,
  BigInt amount, {
  String? secret,
  String? seed,
  String? seedHex,
  String? passphrase,
  CryptoAlgorithm? keyType,
}) async {
  final Map<String, dynamic> configParams = {};
  createRpcConfig(configParams, "channel_id", channelId);
  createRpcConfig(configParams, "amount", amount.toString());
  createRpcConfig(configParams, "secret", secret);
  createRpcConfig(configParams, "seed", seed);
  createRpcConfig(configParams, "seed_hex", seedHex);
  createRpcConfig(configParams, "passphrase", passphrase);
  createRpcConfig(configParams, "key_type", keyType?.value);
  final response = await makeCustomCall<Map<String, dynamic>>(
      "channel_authorize", [configParams]);
  return response;
}