ChannelAcceptedEvent.fromMap constructor

ChannelAcceptedEvent.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory ChannelAcceptedEvent.fromMap(Map<String, dynamic> map) {
  return ChannelAcceptedEvent(
    channelId: map['channelId'] as String,
    walletId: map['walletId'] as String,
    clientPeerId: map['clientPeerId'] as String,
    clientPubKeyHex: map['clientPubKeyHex'] as String,
    clientAddressB58: map['clientAddressB58'] as String,
    serverPubKeyHex: map['serverPubKeyHex'] as String,
    serverAddressB58: map['serverAddressB58'] as String,
    derivationIndex: map['derivationIndex'] as int,
    fundingAmountSats: BigInt.parse(map['fundingAmountSats'] as String),
    lockTimeUnix: map['lockTimeUnix'] as int,
    context: map['context'] as String?,
    eventId: map['eventId'] as String?,
    timestamp: ChannelEvent._parseTimestamp(map['timestamp']),
    version: map['version'] as int?,
    metadata: map['metadata'] as Map<String, dynamic>?,
  );
}