def export_channel_backup(self, channel_id):
    xpub = self.wallet.get_fingerprint()
    backup_bytes = self.create_channel_backup(channel_id).to_bytes()
    assert (backup_bytes == ImportedChannelBackupStorage.from_bytes(backup_bytes).to_bytes()), 'roundtrip failed'
    encrypted = pw_encode_with_version_and_mac(backup_bytes, xpub)
    assert (backup_bytes == pw_decode_with_version_and_mac(encrypted, xpub)), 'encrypt failed'
    return ('channel_backup:' + encrypted)
def export_channel_backup(self, channel_id):
    xpub = self.wallet.get_fingerprint()
    backup_bytes = self.create_channel_backup(channel_id).to_bytes()
    assert (backup_bytes == ImportedChannelBackupStorage.from_bytes(backup_bytes).to_bytes()), 'roundtrip failed'
    encrypted = pw_encode_with_version_and_mac(backup_bytes, xpub)
    assert (backup_bytes == pw_decode_with_version_and_mac(encrypted, xpub)), 'encrypt failed'
    return ('channel_backup:' + encrypted)