diff --git a/.gitignore b/.gitignore index 57cbf7fb2..9d2d4ccf9 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,7 @@ google-services.json # iOS /ios/Pods + +# Lnd binaries +android/lndmobile/Lndmobile.aar +ios/Lndmobile.framework diff --git a/README.md b/README.md index 684111b3e..25d3a8ab4 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ powered by lnd and Neutrino SPV. - [x] Scheduled sync of chain background job - [x] Local channel backup - [x] [LNURL](https://github.com/btcontract/lnurl-rfc) support (all sub-protocols: pay, channel, auth and withdraw) -- [x] Channel backup to Google Drive +- [x] Channel backup to Google Drive (Android) and iCloud (iOS) - [x] [WebLN](https://webln.dev/) browser - [x] Support for [Multi-Part Payments (MPP)](https://lightning.engineering/posts/2020-05-07-mpp/) - [x] Integrated Tor support @@ -57,11 +57,12 @@ To start the application: ### iOS -_The iPhone/iOS version is still work in progress and is not yet stable nor fully working._ +_The iPhone/iOS version is still work in progress._ To build the iOS version, macOS is required. You also need an Apple Developer account, although you do not need to be enrolled in the Developer Program. - Install [XCode](https://developer.apple.com/xcode/), [Node](https://nodejs.org) and [Yarn](https://classic.yarnpkg.com/) +- Build lnd for iOS by following the steps in [build-ios-framework.md](build-ios-framework.md) - Install Node packages: `yarn` - Generate proto files: `yarn gen-proto` - Install CocoaPods libs: `cd ios && pod install` @@ -74,7 +75,7 @@ To build the iOS version, macOS is required. You also need an Apple Developer ac To start the application: - Run: `yarn start-metro` -- Run: `yarn ios:mainnet-fakelnd-debug` +- Run: `yarn ios:mainnet-debug --device ""` or build from XCode ## Commit and Code-Style diff --git a/android/app/src/main/java/com/blixtwallet/LndMobile.java b/android/app/src/main/java/com/blixtwallet/LndMobile.java index a01e04157..f2d4128aa 100644 --- a/android/app/src/main/java/com/blixtwallet/LndMobile.java +++ b/android/app/src/main/java/com/blixtwallet/LndMobile.java @@ -276,21 +276,7 @@ public void sendPongToLndMobileservice(Promise promise) { } @ReactMethod - public void checkLndProcessExist(Promise promise) { - String packageName = getReactApplicationContext().getPackageName(); - ActivityManager am = (ActivityManager) getReactApplicationContext().getSystemService(Context.ACTIVITY_SERVICE); - for (ActivityManager.RunningAppProcessInfo p : am.getRunningAppProcesses()) { - if (p.processName.equals(packageName + ":blixtLndMobile")) { - HyperLog.d(TAG, packageName + ":blixtLndMobile pid: " + String.valueOf(p.pid)); - promise.resolve(true); - return; - } - } - promise.resolve(false); - } - - @ReactMethod - public void init(Promise promise) { + public void initialize(Promise promise) { if (!lndMobileServiceBound) { int req = new Random().nextInt(); requests.put(req, promise); @@ -404,297 +390,6 @@ public void stopLnd(Promise promise) { } } - private FileObserver logObserver; - - @ReactMethod - public void observeLndLogFile(Promise p) { - File appDir = getReactApplicationContext().getFilesDir(); - - final String logDir = appDir + "/logs/bitcoin/mainnet"; - final String logFile = logDir + "/lnd.log"; - - FileInputStream stream = null; - while (true) { - try { - stream = new FileInputStream(logFile); - } catch (FileNotFoundException e) { - File dir = new File(logDir); - dir.mkdirs(); - File f = new File(logFile); - try { - f.createNewFile(); - continue; - } catch (IOException e1) { - e1.printStackTrace(); - return; - } - } - break; - } - - final InputStreamReader istream = new InputStreamReader(stream); - final BufferedReader buf = new BufferedReader(istream); - try { - readToEnd(buf, false); - } catch (IOException e) { - e.printStackTrace(); - return; - } - - logObserver = new FileObserver(logFile) { - @Override - public void onEvent(int event, String file) { - if(event != FileObserver.MODIFY) { - return; - } - try { - readToEnd(buf, true); - } catch (IOException e) { - e.printStackTrace(); - } - } - }; - logObserver.startWatching(); - Log.i("LndNativeModule", "Started watching " + logFile); - p.resolve(true); - } - - private void readToEnd(BufferedReader buf, boolean emit) throws IOException { - String s = ""; - while ( (s = buf.readLine()) != null ) { - if (!emit) { - continue; - } - getReactApplicationContext() - .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) - .emit("lndlog", s); - } - } - - @ReactMethod - public void killLnd(Promise promise) { - boolean result = killLndProcess(); - promise.resolve(result); - } - - private boolean killLndProcess() { - String packageName = getReactApplicationContext().getPackageName(); - ActivityManager am = (ActivityManager) getCurrentActivity().getSystemService(Context.ACTIVITY_SERVICE); - for (ActivityManager.RunningAppProcessInfo p : am.getRunningAppProcesses()) { - if (p.processName.equals(packageName + ":blixtLndMobile")) { - HyperLog.i(TAG, "Killing " + packageName + ":blixtLndMobile with pid: " + String.valueOf(p.pid)); - Process.killProcess(p.pid); - return true; - } - } - return false; - } - - @ReactMethod - public void restartApp() { - ProcessPhoenix.triggerRebirth(getReactApplicationContext()); - } - - @ReactMethod - void writeConfigFile(Promise promise) { - String filename = getReactApplicationContext().getFilesDir().toString() + "/lnd.conf"; - - try { - new File(filename).getParentFile().mkdirs(); - PrintWriter out = new PrintWriter(filename); - - if (BuildConfig.CHAIN.equals("mainnet")) { - out.println( - "[Application Options]\n" + - "debuglevel=info\n" + - "maxbackoff=2s\n" + - "norest=1\n" + - "sync-freelist=1\n" + - "accept-keysend=1\n" + - "\n" + - "[Routing]\n" + - "routing.assumechanvalid=1\n" + - "\n" + - "[Bitcoin]\n" + - "bitcoin.active=1\n" + - "bitcoin.mainnet=1\n" + - "bitcoin.node=neutrino\n" + - "\n" + - "[Neutrino]\n" + - "neutrino.connect=btcd-mainnet.lightning.computer\n" + - "neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json\n" + - "\n" + - "[autopilot]\n" + - "autopilot.active=0\n" + - "autopilot.private=1\n" + - "autopilot.minconfs=1\n" + - "autopilot.conftarget=3\n" + - "autopilot.allocation=1.0\n" + - "autopilot.heuristic=externalscore:0.95\n" + - "autopilot.heuristic=preferential:0.05\n" - ); - } else if (BuildConfig.CHAIN.equals("testnet")) { - out.println( - "[Application Options]\n" + - "debuglevel=info\n" + - "maxbackoff=2s\n" + - "norest=1\n" + - "sync-freelist=1\n" + - "accept-keysend=1\n" + - "\n" + - "[Routing]\n" + - "routing.assumechanvalid=1\n" + - "\n" + - "[Bitcoin]\n" + - "bitcoin.active=1\n" + - "bitcoin.testnet=1\n" + - "bitcoin.node=neutrino\n" + - "\n" + - "[Neutrino]\n" + - "neutrino.connect=btcd-testnet.lightning.computer\n" + - "neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json\n" + - "\n" + - "[autopilot]\n" + - "autopilot.active=0\n" + - "autopilot.private=1\n" + - "autopilot.minconfs=1\n" + - "autopilot.conftarget=3\n" + - "autopilot.allocation=1.0\n" + - "autopilot.heuristic=externalscore:0.95\n" + - "autopilot.heuristic=preferential:0.05\n" - ); - } else if (BuildConfig.CHAIN.equals("regtest")) { - out.println( - "[Application Options]\n" + - "debuglevel=info\n" + - "maxbackoff=2s\n" + - "nolisten=1\n" + - "norest=1\n" + - "sync-freelist=1\n" + - "accept-keysend=1\n" + - "\n" + - "[Routing]\n" + - "routing.assumechanvalid=1\n" + - "\n" + - "[Bitcoin]\n" + - "bitcoin.active=1\n" + - "bitcoin.regtest=1\n" + - "bitcoin.node=bitcoind\n" + - "\n" + - "[Bitcoind]\n" + - "bitcoind.rpchost=192.168.1.113:18443\n" + - "bitcoind.rpcuser=polaruser\n" + - "bitcoind.rpcpass=polarpass\n" + - "bitcoind.zmqpubrawblock=192.168.1.113:28334\n" + - "bitcoind.zmqpubrawtx=192.168.1.113:29335\n" + - "\n" + - "[autopilot]\n" + - "autopilot.active=0\n" + - "autopilot.private=1\n" + - "autopilot.minconfs=1\n" + - "autopilot.conftarget=3\n" + - "autopilot.allocation=1.0\n" + - "autopilot.heuristic=externalscore:0.95\n" + - "autopilot.heuristic=preferential:0.05\n" - ); - } - - out.close(); - HyperLog.d(TAG, "Saved lnd config: " + filename); - } catch (Exception e) { - HyperLog.e(TAG, "Couldn't write " + filename, e); - promise.reject("Couldn't write: " + filename, e); - return; - } - - promise.resolve("File written: " + filename); - } - - void deleteRecursive(File fileOrDirectory) { - if (fileOrDirectory.isDirectory()) { - for (File child : fileOrDirectory.listFiles()) { - deleteRecursive(child); - } - } - - HyperLog.d(TAG, "Delete file " + fileOrDirectory.getName() + " : " + fileOrDirectory.delete()); - } - - @ReactMethod - public void DEBUG_getWalletPasswordFromKeychain(Promise promise) { - KeychainModule keychain = new KeychainModule(getReactApplicationContext()); - - WritableMap keychainOptions = Arguments.createMap(); - WritableMap keychainOptionsAuthenticationPrompt = Arguments.createMap(); - keychainOptionsAuthenticationPrompt.putString("title", "Authenticate to retrieve secret"); - keychainOptionsAuthenticationPrompt.putString("cancel", "Cancel"); - keychainOptions.putMap("authenticationPrompt", keychainOptionsAuthenticationPrompt); - - keychain.getInternetCredentialsForServer("password", keychainOptions, new PromiseWrapper() { - @Override - public void onSuccess(@Nullable Object value) { - if (value != null) { - promise.resolve(((ReadableMap) value).getString("password")); - return; - } - promise.reject("fail2"); - } - - @Override - public void onFail(Throwable throwable) { - Log.d(TAG, "error", throwable); - promise.reject(throwable.getMessage()); - } - }); - } - - @ReactMethod - public void DEBUG_deleteWallet(Promise promise) { - HyperLog.i(TAG, "DEBUG deleting wallet"); - String filename = getReactApplicationContext().getFilesDir().toString() + "/data/chain/bitcoin/" + BuildConfig.CHAIN + "/wallet.db"; - File file = new File(filename); - promise.resolve(file.delete()); - } - - @ReactMethod - public void DEBUG_deleteDatafolder(Promise promise) { - HyperLog.i(TAG, "DEBUG deleting data folder"); - String filename = getReactApplicationContext().getFilesDir().toString() + "/data/"; - File file = new File(filename); - deleteRecursive(file); - promise.resolve(null); - } - - @ReactMethod - public void DEBUG_listProcesses(Promise promise) { - String processes = ""; - - String packageName = getReactApplicationContext().getPackageName(); - ActivityManager am = (ActivityManager) getCurrentActivity().getSystemService(Context.ACTIVITY_SERVICE); - for (ActivityManager.RunningAppProcessInfo p : am.getRunningAppProcesses()) { - processes += p.processName + "\n"; - } - - promise.resolve(processes); - } - - @ReactMethod - public void deleteTLSCerts(Promise promise) { - HyperLog.i(TAG, "Deleting lnd TLS certificates"); - - String tlsKeyFilename = getReactApplicationContext().getFilesDir().toString() + "/tls.key"; - File tlsKeyFile = new File(tlsKeyFilename); - boolean tlsKeyFileDeletion = tlsKeyFile.delete(); - HyperLog.i(TAG, "Delete: " + tlsKeyFilename.toString() + ": " + tlsKeyFileDeletion); - - String tlsCertFilename = getReactApplicationContext().getFilesDir().toString() + "/tls.cert"; - File tlsCertFile = new File(tlsCertFilename); - boolean tlsCertFileDeletion = tlsCertFile.delete(); - HyperLog.i(TAG, "Delete: " + tlsCertFilename.toString() + ": " + tlsCertFileDeletion); - - promise.resolve(tlsKeyFileDeletion && tlsCertFileDeletion); - } - @ReactMethod public void sendCommand(String method, String payloadStr, final Promise promise) { HyperLog.d(TAG, "sendCommand() " + method); @@ -796,323 +491,4 @@ void initWallet(ReadableArray seed, String password, int recoveryWindow, String promise.reject(TAG, "Could not Send MSG_INITWALLET to LndMobileService", e); } } - - @ReactMethod - public void saveLogs(Promise promise) { - File file = HyperLog.getDeviceLogsInFile(getReactApplicationContext(), false); - if (file != null && file.exists()) { - promise.resolve(file.getAbsolutePath()); - } - else { - promise.reject("Fail saving log"); - } - } - - @ReactMethod - public void copyLndLog(Promise promise) { - checkWriteExternalStoragePermission( - (@Nullable Object value) -> { - if (value.equals("granted")) { - String lndLogFile = copyLndLogFile(); - if (lndLogFile != null) { - promise.resolve(lndLogFile); - } - else { - promise.reject("Error copying"); - } - } - }, - () -> { - promise.reject("Request Error"); - }, - () -> { - promise.reject("Permission Check Error"); - } - ); - } - - public String copyLndLogFile() { - File sourceLocation = new File( - getReactApplicationContext().getFilesDir().toString() + - "/logs/bitcoin/" + - BuildConfig.CHAIN + - "/lnd.log" - ); - File targetDir = new File( - ContextCompat.getExternalFilesDirs(getReactApplicationContext(), null)[0].toString() - ); - File targetLocation = new File(targetDir.toString() + "/lnd-" + BuildConfig.CHAIN + (BuildConfig.DEBUG ? "-debug" : "") + ".log"); - - try { - Log.i(TAG, targetLocation.toString()); - - if (!targetDir.exists()) { - if (!targetDir.mkdirs()) { - throw new Error("Error creating dir"); - } - } - - InputStream in = new FileInputStream(sourceLocation); - OutputStream out = new FileOutputStream(targetLocation); - - byte[] buf = new byte[1024]; - int len; - while ((len = in.read(buf)) > 0) { - out.write(buf, 0, len); - } - in.close(); - out.close(); - - return targetLocation.toString(); - } catch (Throwable e) { - Log.e(TAG, "copyLndLogFile() failed: " + e.getMessage() + " " + - "source: " + sourceLocation.toString() + "\n " + - "dest: " + targetDir.toString() - ); - return null; - } - } - - @ReactMethod - public void saveChannelsBackup(String base64Backups, Promise promise) { - byte[] backups = Base64.decode(base64Backups, Base64.NO_WRAP); - checkWriteExternalStoragePermission( - (@Nullable Object value) -> { - if (value.equals("granted")) { - saveChannelBackupToFile(backups, promise); - } - else { - promise.reject("You must grant access"); - } - }, - () -> { promise.reject("Request Error"); }, - () -> { promise.reject("Check Error"); } - ); - } - - private void saveChannelBackupToFile(byte[] backups, Promise promise) { - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss") ; - String path = ContextCompat.getExternalFilesDirs(getReactApplicationContext(), null)[0].toString(); - String file = path + - "/channels-backup-" + - dateFormat.format(new Date()) + ".bin"; - - try { - File dir = new File(path); - if (!dir.exists()) { - dir.mkdirs(); - } - } catch (Exception e) { - Log.e(TAG, "Couldn't create folder " + path, e); - promise.reject("Couldn't create folder: " + path, e.getMessage()); - } - - try (FileOutputStream stream = new FileOutputStream(file)) { - stream.write(backups); - Log.i(TAG, "Success " + file); - } catch (Exception e) { - Log.e(TAG, "Couldn't write " + file, e); - promise.reject("Couldn't write: " + file, e.getMessage()); - } - - promise.resolve(file); - } - - private interface RequestWriteExternalStoragePermissionCallback { - void success(@Nullable Object value); - } - - private void checkWriteExternalStoragePermission(@NonNull RequestWriteExternalStoragePermissionCallback successCallback, - @NonNull Runnable failCallback, - @NonNull Runnable failPermissionCheckcallback) { - PermissionsModule permissions = new PermissionsModule(getReactApplicationContext()); - - PromiseWrapper requestPromiseWrapper = new PromiseWrapper() { - @Override - public void onSuccess(@Nullable Object value) { - successCallback.success(value); - } - - @Override - public void onFail(Throwable throwable) { - failCallback.run(); - } - }; - - PromiseWrapper checkPromiseWrapper = new PromiseWrapper() { - @Override - void onSuccess(@Nullable Object value) { - permissions.requestPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, requestPromiseWrapper); - } - - @Override - void onFail(Throwable throwable) { - failPermissionCheckcallback.run(); - } - }; - - permissions.checkPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, checkPromiseWrapper); - } - - @ReactMethod - public void getIntentStringData(Promise promise) { - String sharedText = getReactApplicationContext() - .getCurrentActivity().getIntent().getStringExtra(Intent.EXTRA_TEXT); - - if (sharedText != null) { - Log.d(TAG, sharedText); - promise.resolve(sharedText); - } - else { - Log.d(TAG, "sharedText null"); - promise.resolve(null); - } - } - - @ReactMethod - public void getIntentNfcData(Promise promise) { - // https://code.tutsplus.com/tutorials/reading-nfc-tags-with-android--mobile-17278 - Tag tag = getReactApplicationContext() - .getCurrentActivity().getIntent().getParcelableExtra(NfcAdapter.EXTRA_TAG); - if (tag == null) { - promise.resolve(null); - return; - } - - Ndef ndef = Ndef.get(tag); - if (ndef == null) { - HyperLog.d(TAG, "NFC tag is not NDEF"); - promise.resolve(null); - } - - NdefMessage ndefMessage = ndef.getCachedNdefMessage(); - - NdefRecord[] records = ndefMessage.getRecords(); - if (records.length > 0) { - // Get first record and ignore the rest - NdefRecord record = records[0]; - if (record.getTnf() == NdefRecord.TNF_WELL_KNOWN && Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)) { - /* - * See NFC forum specification for "Text Record Type Definition" at 3.2.1 - * - * http://www.nfc-forum.org/specs/ - * - * bit_7 defines encoding - * bit_6 reserved for future use, must be 0 - * bit_5..0 length of IANA language code - */ - byte[] payload = record.getPayload(); - - // Get the Text Encoding - String textEncoding = ((payload[0] & 128) == 0) ? "UTF-8" : "UTF-16"; - - // Get the Language Code - int languageCodeLength = payload[0] & 0063; - - // String languageCode = new String(payload, 1, languageCodeLength, "US-ASCII"); - // e.g. "en" - - try { - String s = new String(payload, languageCodeLength + 1, payload.length - languageCodeLength - 1, textEncoding); - promise.resolve(s); - return; - } catch (UnsupportedEncodingException e) { - HyperLog.e(TAG, "Error returning ndef data", e); - } - } - else { - HyperLog.d(TAG, "Cannot read NFC Tag Record"); - } - } - promise.resolve(null); - } - - @ReactMethod - public void tailLog(Integer numberOfLines, Promise promise) { - File file = new File( - getReactApplicationContext().getFilesDir().toString() + - "/logs/bitcoin/" + - BuildConfig.CHAIN + - "/lnd.log" - ); - - java.io.RandomAccessFile fileHandler = null; - try { - fileHandler = new java.io.RandomAccessFile(file, "r"); - long fileLength = fileHandler.length() - 1; - StringBuilder sb = new StringBuilder(); - int line = 0; - - for(long filePointer = fileLength; filePointer != -1; filePointer--){ - fileHandler.seek( filePointer ); - int readByte = fileHandler.readByte(); - - if (readByte == 0xA) { - if (filePointer < fileLength) { - line = line + 1; - } - } else if (readByte == 0xD) { - if (filePointer < fileLength-1) { - line = line + 1; - } - } - if (line >= numberOfLines) { - break; - } - sb.append((char) readByte); - } - - String lastLine = sb.reverse().toString(); - promise.resolve(lastLine); - } catch (java.io.FileNotFoundException e) { - e.printStackTrace(); - promise.reject(e); - } catch (java.io.IOException e) { - e.printStackTrace(); - promise.reject(e); - } - finally { - if (fileHandler != null) { - try { - fileHandler.close(); - } catch (java.io.IOException e) {} - } - } - } - - @ReactMethod - public void log(String type, String tag, String message) { - String mainTag = "BlixtWallet"; - - switch (type) { - case "v": - HyperLog.v(mainTag, "[" + tag + "] " + message); - break; - case "d": - HyperLog.d(mainTag, "[" + tag + "] " + message); - break; - case "i": - HyperLog.i(mainTag, "[" + tag + "] " + message); - break; - case "w": - HyperLog.w(mainTag, "[" + tag + "] " + message); - break; - case "e": - HyperLog.e(mainTag, "[" + tag + "] " + message); - break; - default: - HyperLog.v(mainTag, "[unknown msg type][" + tag + "] " + message); - break; - } - } - - @ReactMethod - public void getTorEnabled(Promise promise) { - android.database.sqlite.SQLiteDatabase db = com.facebook.react.modules.storage.ReactDatabaseSupplier.getInstance(getReactApplicationContext()).get(); - String torEnabled = AsyncLocalStorageUtil.getItemImpl(db, "torEnabled"); - if (torEnabled != null) { - promise.resolve(torEnabled.equals("true")); - } - promise.reject(new Error("")); - } } diff --git a/android/app/src/main/java/com/blixtwallet/LndMobileScheduledSyncWorker.java b/android/app/src/main/java/com/blixtwallet/LndMobileScheduledSyncWorker.java index 389871a89..4549195ef 100644 --- a/android/app/src/main/java/com/blixtwallet/LndMobileScheduledSyncWorker.java +++ b/android/app/src/main/java/com/blixtwallet/LndMobileScheduledSyncWorker.java @@ -392,11 +392,6 @@ private void unbindLndMobileService() { } } - private String getWalletPassword() { - SQLiteDatabase db = dbSupplier.get(); - return AsyncLocalStorageUtil.getItemImpl(db, "walletPassword"); - } - private boolean getTorEnabled() { SQLiteDatabase db = dbSupplier.get(); String torEnabled = AsyncLocalStorageUtil.getItemImpl(db, "torEnabled"); diff --git a/android/app/src/main/java/com/blixtwallet/LndMobileService.java b/android/app/src/main/java/com/blixtwallet/LndMobileService.java index 83f032140..5df493fb4 100644 --- a/android/app/src/main/java/com/blixtwallet/LndMobileService.java +++ b/android/app/src/main/java/com/blixtwallet/LndMobileService.java @@ -241,7 +241,7 @@ public void handleMessage(Message msg) { initWallet.setRecoveryWindow(recoveryWindow); } if (channelBackupsBase64 != null) { - HyperLog.d(TAG, "--CHANNEL BACKUP RESTORE TEST--"); + HyperLog.d(TAG, "--CHANNEL BACKUP RESTORE--"); initWallet.setChannelBackups( Rpc.ChanBackupSnapshot.newBuilder().setMultiChanBackup( Rpc.MultiChanBackup.newBuilder().setMultiChanBackup( diff --git a/android/app/src/main/java/com/blixtwallet/LndMobileTools.java b/android/app/src/main/java/com/blixtwallet/LndMobileTools.java new file mode 100644 index 000000000..d1204375a --- /dev/null +++ b/android/app/src/main/java/com/blixtwallet/LndMobileTools.java @@ -0,0 +1,709 @@ +package com.blixtwallet; + +import com.blixtwallet.tor.BlixtTorUtils; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; + +import android.Manifest; +import android.app.ActivityManager; +import android.database.sqlite.SQLiteDatabase; +import android.os.FileObserver; +import android.os.Process; +import android.util.Base64; +import android.util.Log; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.ServiceConnection; +import android.os.Environment; +import android.os.Message; +import android.os.Messenger; +import android.os.Handler; +import android.os.Bundle; +import android.os.IBinder; +import android.os.RemoteException; + +import android.nfc.Tag; +import android.nfc.NfcAdapter; +import android.nfc.NdefMessage; +import android.nfc.tech.Ndef; +import android.nfc.NdefRecord; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.Arrays; +import java.io.UnsupportedEncodingException; + +import java.io.PrintWriter; +import java.io.File; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; +import java.util.EnumSet; + +import com.facebook.react.bridge.Arguments; +import com.facebook.react.bridge.WritableMap; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContextBaseJavaModule; +import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.Promise; +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.ReadableType; +import com.facebook.react.modules.core.DeviceEventManagerModule; +import com.facebook.react.modules.permissions.PermissionsModule; + +import com.facebook.react.modules.storage.AsyncLocalStorageUtil; +import com.jakewharton.processphoenix.ProcessPhoenix; +import com.oblador.keychain.KeychainModule; + +import com.hypertrack.hyperlog.HyperLog; + +// TODO break this class up +class LndMobileTools extends ReactContextBaseJavaModule { + final String TAG = "LndMobileTools"; + + public LndMobileTools(ReactApplicationContext reactContext) { + super(reactContext); + } + + @Override + public String getName() { + return "LndMobileTools"; + } + + @ReactMethod + void writeConfigFile(Promise promise) { + String filename = getReactApplicationContext().getFilesDir().toString() + "/lnd.conf"; + + try { + new File(filename).getParentFile().mkdirs(); + PrintWriter out = new PrintWriter(filename); + + if (BuildConfig.CHAIN.equals("mainnet")) { + out.println( + "[Application Options]\n" + + "debuglevel=info\n" + + "maxbackoff=2s\n" + + "norest=1\n" + + "sync-freelist=1\n" + + "accept-keysend=1\n" + + "\n" + + "[Routing]\n" + + "routing.assumechanvalid=1\n" + + "\n" + + "[Bitcoin]\n" + + "bitcoin.active=1\n" + + "bitcoin.mainnet=1\n" + + "bitcoin.node=neutrino\n" + + "\n" + + "[Neutrino]\n" + + "neutrino.connect=btcd-mainnet.lightning.computer\n" + + "neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json\n" + + "\n" + + "[autopilot]\n" + + "autopilot.active=0\n" + + "autopilot.private=1\n" + + "autopilot.minconfs=1\n" + + "autopilot.conftarget=3\n" + + "autopilot.allocation=1.0\n" + + "autopilot.heuristic=externalscore:0.95\n" + + "autopilot.heuristic=preferential:0.05\n" + ); + } else if (BuildConfig.CHAIN.equals("testnet")) { + out.println( + "[Application Options]\n" + + "debuglevel=info\n" + + "maxbackoff=2s\n" + + "norest=1\n" + + "sync-freelist=1\n" + + "accept-keysend=1\n" + + "\n" + + "[Routing]\n" + + "routing.assumechanvalid=1\n" + + "\n" + + "[Bitcoin]\n" + + "bitcoin.active=1\n" + + "bitcoin.testnet=1\n" + + "bitcoin.node=neutrino\n" + + "\n" + + "[Neutrino]\n" + + "neutrino.connect=btcd-testnet.lightning.computer\n" + + "neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json\n" + + "\n" + + "[autopilot]\n" + + "autopilot.active=0\n" + + "autopilot.private=1\n" + + "autopilot.minconfs=1\n" + + "autopilot.conftarget=3\n" + + "autopilot.allocation=1.0\n" + + "autopilot.heuristic=externalscore:0.95\n" + + "autopilot.heuristic=preferential:0.05\n" + ); + } else if (BuildConfig.CHAIN.equals("regtest")) { + out.println( + "[Application Options]\n" + + "debuglevel=info\n" + + "maxbackoff=2s\n" + + "nolisten=1\n" + + "norest=1\n" + + "sync-freelist=1\n" + + "accept-keysend=1\n" + + "\n" + + "[Routing]\n" + + "routing.assumechanvalid=1\n" + + "\n" + + "[Bitcoin]\n" + + "bitcoin.active=1\n" + + "bitcoin.regtest=1\n" + + "bitcoin.node=bitcoind\n" + + "\n" + + "[Bitcoind]\n" + + "bitcoind.rpchost=192.168.1.113:18443\n" + + "bitcoind.rpcuser=polaruser\n" + + "bitcoind.rpcpass=polarpass\n" + + "bitcoind.zmqpubrawblock=192.168.1.113:28334\n" + + "bitcoind.zmqpubrawtx=192.168.1.113:29335\n" + + "\n" + + "[autopilot]\n" + + "autopilot.active=0\n" + + "autopilot.private=1\n" + + "autopilot.minconfs=1\n" + + "autopilot.conftarget=3\n" + + "autopilot.allocation=1.0\n" + + "autopilot.heuristic=externalscore:0.95\n" + + "autopilot.heuristic=preferential:0.05\n" + ); + } + + out.close(); + HyperLog.d(TAG, "Saved lnd config: " + filename); + } catch (Exception e) { + HyperLog.e(TAG, "Couldn't write " + filename, e); + promise.reject("Couldn't write: " + filename, e); + return; + } + + promise.resolve("File written: " + filename); + } + + @ReactMethod + public void killLnd(Promise promise) { + boolean result = killLndProcess(); + promise.resolve(result); + } + + private boolean killLndProcess() { + String packageName = getReactApplicationContext().getPackageName(); + ActivityManager am = (ActivityManager) getCurrentActivity().getSystemService(Context.ACTIVITY_SERVICE); + for (ActivityManager.RunningAppProcessInfo p : am.getRunningAppProcesses()) { + if (p.processName.equals(packageName + ":blixtLndMobile")) { + HyperLog.i(TAG, "Killing " + packageName + ":blixtLndMobile with pid: " + String.valueOf(p.pid)); + Process.killProcess(p.pid); + return true; + } + } + return false; + } + + @ReactMethod + public void log(String type, String tag, String message) { + String mainTag = "BlixtWallet"; + + switch (type) { + case "v": + HyperLog.v(mainTag, "[" + tag + "] " + message); + break; + case "d": + HyperLog.d(mainTag, "[" + tag + "] " + message); + break; + case "i": + HyperLog.i(mainTag, "[" + tag + "] " + message); + break; + case "w": + HyperLog.w(mainTag, "[" + tag + "] " + message); + break; + case "e": + HyperLog.e(mainTag, "[" + tag + "] " + message); + break; + default: + HyperLog.v(mainTag, "[unknown msg type][" + tag + "] " + message); + break; + } + } + + @ReactMethod + public void saveLogs(Promise promise) { + File file = HyperLog.getDeviceLogsInFile(getReactApplicationContext(), false); + if (file != null && file.exists()) { + promise.resolve(file.getAbsolutePath()); + } + else { + promise.reject("Fail saving log"); + } + } + + @ReactMethod + public void copyLndLog(Promise promise) { + checkWriteExternalStoragePermission( + (@Nullable Object value) -> { + if (value.equals("granted")) { + String lndLogFile = copyLndLogFile(); + if (lndLogFile != null) { + promise.resolve(lndLogFile); + } + else { + promise.reject("Error copying"); + } + } + }, + () -> { + promise.reject("Request Error"); + }, + () -> { + promise.reject("Permission Check Error"); + } + ); + } + + public String copyLndLogFile() { + File sourceLocation = new File( + getReactApplicationContext().getFilesDir().toString() + + "/logs/bitcoin/" + + BuildConfig.CHAIN + + "/lnd.log" + ); + File targetDir = new File( + ContextCompat.getExternalFilesDirs(getReactApplicationContext(), null)[0].toString() + ); + File targetLocation = new File(targetDir.toString() + "/lnd-" + BuildConfig.CHAIN + (BuildConfig.DEBUG ? "-debug" : "") + ".log"); + + try { + Log.i(TAG, targetLocation.toString()); + + if (!targetDir.exists()) { + if (!targetDir.mkdirs()) { + throw new Error("Error creating dir"); + } + } + + InputStream in = new FileInputStream(sourceLocation); + OutputStream out = new FileOutputStream(targetLocation); + + byte[] buf = new byte[1024]; + int len; + while ((len = in.read(buf)) > 0) { + out.write(buf, 0, len); + } + in.close(); + out.close(); + + return targetLocation.toString(); + } catch (Throwable e) { + Log.e(TAG, "copyLndLogFile() failed: " + e.getMessage() + " " + + "source: " + sourceLocation.toString() + "\n " + + "dest: " + targetDir.toString() + ); + return null; + } + } + + @ReactMethod + public void tailLog(Integer numberOfLines, Promise promise) { + File file = new File( + getReactApplicationContext().getFilesDir().toString() + + "/logs/bitcoin/" + + BuildConfig.CHAIN + + "/lnd.log" + ); + + java.io.RandomAccessFile fileHandler = null; + try { + fileHandler = new java.io.RandomAccessFile(file, "r"); + long fileLength = fileHandler.length() - 1; + StringBuilder sb = new StringBuilder(); + int line = 0; + + for(long filePointer = fileLength; filePointer != -1; filePointer--){ + fileHandler.seek( filePointer ); + int readByte = fileHandler.readByte(); + + if (readByte == 0xA) { + if (filePointer < fileLength) { + line = line + 1; + } + } else if (readByte == 0xD) { + if (filePointer < fileLength-1) { + line = line + 1; + } + } + if (line >= numberOfLines) { + break; + } + sb.append((char) readByte); + } + + String lastLine = sb.reverse().toString(); + promise.resolve(lastLine); + } catch (java.io.FileNotFoundException e) { + e.printStackTrace(); + promise.reject(e); + } catch (java.io.IOException e) { + e.printStackTrace(); + promise.reject(e); + } + finally { + if (fileHandler != null) { + try { + fileHandler.close(); + } catch (java.io.IOException e) {} + } + } + } + + private FileObserver logObserver; + + @ReactMethod + public void observeLndLogFile(Promise p) { + File appDir = getReactApplicationContext().getFilesDir(); + + final String logDir = appDir + "/logs/bitcoin/mainnet"; + final String logFile = logDir + "/lnd.log"; + + FileInputStream stream = null; + while (true) { + try { + stream = new FileInputStream(logFile); + } catch (FileNotFoundException e) { + File dir = new File(logDir); + dir.mkdirs(); + File f = new File(logFile); + try { + f.createNewFile(); + continue; + } catch (IOException e1) { + e1.printStackTrace(); + return; + } + } + break; + } + + final InputStreamReader istream = new InputStreamReader(stream); + final BufferedReader buf = new BufferedReader(istream); + try { + readToEnd(buf, false); + } catch (IOException e) { + e.printStackTrace(); + return; + } + + logObserver = new FileObserver(logFile) { + @Override + public void onEvent(int event, String file) { + if(event != FileObserver.MODIFY) { + return; + } + try { + readToEnd(buf, true); + } catch (IOException e) { + e.printStackTrace(); + } + } + }; + logObserver.startWatching(); + Log.i(TAG, "Started watching " + logFile); + p.resolve(true); + } + + private void readToEnd(BufferedReader buf, boolean emit) throws IOException { + String s = ""; + while ( (s = buf.readLine()) != null ) { + if (!emit) { + continue; + } + getReactApplicationContext() + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit("lndlog", s); + } + } + + @ReactMethod + public void saveChannelsBackup(String base64Backups, Promise promise) { + byte[] backups = Base64.decode(base64Backups, Base64.NO_WRAP); + checkWriteExternalStoragePermission( + (@Nullable Object value) -> { + if (value.equals("granted")) { + saveChannelBackupToFile(backups, promise); + } + else { + promise.reject("You must grant access"); + } + }, + () -> { promise.reject("Request Error"); }, + () -> { promise.reject("Check Error"); } + ); + } + + private void saveChannelBackupToFile(byte[] backups, Promise promise) { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss") ; + String path = ContextCompat.getExternalFilesDirs(getReactApplicationContext(), null)[0].toString(); + String file = path + + "/channels-backup-" + + dateFormat.format(new Date()) + ".bin"; + + try { + File dir = new File(path); + if (!dir.exists()) { + dir.mkdirs(); + } + } catch (Exception e) { + Log.e(TAG, "Couldn't create folder " + path, e); + promise.reject("Couldn't create folder: " + path, e.getMessage()); + } + + try (FileOutputStream stream = new FileOutputStream(file)) { + stream.write(backups); + Log.i(TAG, "Success " + file); + } catch (Exception e) { + Log.e(TAG, "Couldn't write " + file, e); + promise.reject("Couldn't write: " + file, e.getMessage()); + } + + promise.resolve(file); + } + + @ReactMethod + public void DEBUG_getWalletPasswordFromKeychain(Promise promise) { + KeychainModule keychain = new KeychainModule(getReactApplicationContext()); + + WritableMap keychainOptions = Arguments.createMap(); + WritableMap keychainOptionsAuthenticationPrompt = Arguments.createMap(); + keychainOptionsAuthenticationPrompt.putString("title", "Authenticate to retrieve secret"); + keychainOptionsAuthenticationPrompt.putString("cancel", "Cancel"); + keychainOptions.putMap("authenticationPrompt", keychainOptionsAuthenticationPrompt); + + keychain.getInternetCredentialsForServer("password", keychainOptions, new PromiseWrapper() { + @Override + public void onSuccess(@Nullable Object value) { + if (value != null) { + promise.resolve(((ReadableMap) value).getString("password")); + return; + } + promise.reject("fail2"); + } + + @Override + public void onFail(Throwable throwable) { + Log.d(TAG, "error", throwable); + promise.reject(throwable.getMessage()); + } + }); + } + + @ReactMethod + public void getTorEnabled(Promise promise) { + android.database.sqlite.SQLiteDatabase db = com.facebook.react.modules.storage.ReactDatabaseSupplier.getInstance(getReactApplicationContext()).get(); + String torEnabled = AsyncLocalStorageUtil.getItemImpl(db, "torEnabled"); + if (torEnabled != null) { + promise.resolve(torEnabled.equals("true")); + } + promise.reject(new Error("")); + } + + @ReactMethod + public void getIntentStringData(Promise promise) { + String sharedText = getReactApplicationContext() + .getCurrentActivity().getIntent().getStringExtra(Intent.EXTRA_TEXT); + + if (sharedText != null) { + Log.d(TAG, sharedText); + promise.resolve(sharedText); + } + else { + Log.d(TAG, "sharedText null"); + promise.resolve(null); + } + } + + @ReactMethod + public void getIntentNfcData(Promise promise) { + // https://code.tutsplus.com/tutorials/reading-nfc-tags-with-android--mobile-17278 + Tag tag = getReactApplicationContext() + .getCurrentActivity().getIntent().getParcelableExtra(NfcAdapter.EXTRA_TAG); + if (tag == null) { + promise.resolve(null); + return; + } + + Ndef ndef = Ndef.get(tag); + if (ndef == null) { + HyperLog.d(TAG, "NFC tag is not NDEF"); + promise.resolve(null); + } + + NdefMessage ndefMessage = ndef.getCachedNdefMessage(); + + NdefRecord[] records = ndefMessage.getRecords(); + if (records.length > 0) { + // Get first record and ignore the rest + NdefRecord record = records[0]; + if (record.getTnf() == NdefRecord.TNF_WELL_KNOWN && Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)) { + /* + * See NFC forum specification for "Text Record Type Definition" at 3.2.1 + * + * http://www.nfc-forum.org/specs/ + * + * bit_7 defines encoding + * bit_6 reserved for future use, must be 0 + * bit_5..0 length of IANA language code + */ + byte[] payload = record.getPayload(); + + // Get the Text Encoding + String textEncoding = ((payload[0] & 128) == 0) ? "UTF-8" : "UTF-16"; + + // Get the Language Code + int languageCodeLength = payload[0] & 0063; + + // String languageCode = new String(payload, 1, languageCodeLength, "US-ASCII"); + // e.g. "en" + + try { + String s = new String(payload, languageCodeLength + 1, payload.length - languageCodeLength - 1, textEncoding); + promise.resolve(s); + return; + } catch (UnsupportedEncodingException e) { + HyperLog.e(TAG, "Error returning ndef data", e); + } + } + else { + HyperLog.d(TAG, "Cannot read NFC Tag Record"); + } + } + promise.resolve(null); + } + + @ReactMethod + public void DEBUG_deleteWallet(Promise promise) { + HyperLog.i(TAG, "DEBUG deleting wallet"); + String filename = getReactApplicationContext().getFilesDir().toString() + "/data/chain/bitcoin/" + BuildConfig.CHAIN + "/wallet.db"; + File file = new File(filename); + promise.resolve(file.delete()); + } + + @ReactMethod + public void DEBUG_deleteDatafolder(Promise promise) { + HyperLog.i(TAG, "DEBUG deleting data folder"); + String filename = getReactApplicationContext().getFilesDir().toString() + "/data/"; + File file = new File(filename); + deleteRecursive(file); + promise.resolve(null); + } + + void deleteRecursive(File fileOrDirectory) { + if (fileOrDirectory.isDirectory()) { + for (File child : fileOrDirectory.listFiles()) { + deleteRecursive(child); + } + } + + HyperLog.d(TAG, "Delete file " + fileOrDirectory.getName() + " : " + fileOrDirectory.delete()); + } + + @ReactMethod + public void DEBUG_listProcesses(Promise promise) { + String processes = ""; + + String packageName = getReactApplicationContext().getPackageName(); + ActivityManager am = (ActivityManager) getCurrentActivity().getSystemService(Context.ACTIVITY_SERVICE); + for (ActivityManager.RunningAppProcessInfo p : am.getRunningAppProcesses()) { + processes += p.processName + "\n"; + } + + promise.resolve(processes); + } + + @ReactMethod + public void checkLndProcessExist(Promise promise) { + String packageName = getReactApplicationContext().getPackageName(); + ActivityManager am = (ActivityManager) getReactApplicationContext().getSystemService(Context.ACTIVITY_SERVICE); + for (ActivityManager.RunningAppProcessInfo p : am.getRunningAppProcesses()) { + if (p.processName.equals(packageName + ":blixtLndMobile")) { + HyperLog.d(TAG, packageName + ":blixtLndMobile pid: " + String.valueOf(p.pid)); + promise.resolve(true); + return; + } + } + promise.resolve(false); + } + + @ReactMethod + public void deleteTLSCerts(Promise promise) { + HyperLog.i(TAG, "Deleting lnd TLS certificates"); + + String tlsKeyFilename = getReactApplicationContext().getFilesDir().toString() + "/tls.key"; + File tlsKeyFile = new File(tlsKeyFilename); + boolean tlsKeyFileDeletion = tlsKeyFile.delete(); + HyperLog.i(TAG, "Delete: " + tlsKeyFilename.toString() + ": " + tlsKeyFileDeletion); + + String tlsCertFilename = getReactApplicationContext().getFilesDir().toString() + "/tls.cert"; + File tlsCertFile = new File(tlsCertFilename); + boolean tlsCertFileDeletion = tlsCertFile.delete(); + HyperLog.i(TAG, "Delete: " + tlsCertFilename.toString() + ": " + tlsCertFileDeletion); + + promise.resolve(tlsKeyFileDeletion && tlsCertFileDeletion); + } + + @ReactMethod + public void restartApp() { + ProcessPhoenix.triggerRebirth(getReactApplicationContext()); + } + + private void checkWriteExternalStoragePermission(@NonNull RequestWriteExternalStoragePermissionCallback successCallback, + @NonNull Runnable failCallback, + @NonNull Runnable failPermissionCheckcallback) { + PermissionsModule permissions = new PermissionsModule(getReactApplicationContext()); + + PromiseWrapper requestPromiseWrapper = new PromiseWrapper() { + @Override + public void onSuccess(@Nullable Object value) { + successCallback.success(value); + } + + @Override + public void onFail(Throwable throwable) { + failCallback.run(); + } + }; + + PromiseWrapper checkPromiseWrapper = new PromiseWrapper() { + @Override + void onSuccess(@Nullable Object value) { + permissions.requestPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, requestPromiseWrapper); + } + + @Override + void onFail(Throwable throwable) { + failPermissionCheckcallback.run(); + } + }; + + permissions.checkPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, checkPromiseWrapper); + } + + private interface RequestWriteExternalStoragePermissionCallback { + void success(@Nullable Object value); + } +} diff --git a/android/app/src/main/java/com/blixtwallet/LndMobileToolsPackage.java b/android/app/src/main/java/com/blixtwallet/LndMobileToolsPackage.java new file mode 100644 index 000000000..17041b54d --- /dev/null +++ b/android/app/src/main/java/com/blixtwallet/LndMobileToolsPackage.java @@ -0,0 +1,22 @@ +package com.blixtwallet; + +import com.facebook.react.ReactPackage; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.uimanager.ViewManager; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class LndMobileToolsPackage implements ReactPackage { + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); + } + + @Override + public List createNativeModules(ReactApplicationContext reactContext) { + return Arrays.asList(new LndMobileTools(reactContext)); + } +} diff --git a/android/app/src/main/java/com/blixtwallet/MainApplication.java b/android/app/src/main/java/com/blixtwallet/MainApplication.java index 2ab4cede0..61301fa96 100644 --- a/android/app/src/main/java/com/blixtwallet/MainApplication.java +++ b/android/app/src/main/java/com/blixtwallet/MainApplication.java @@ -28,6 +28,7 @@ protected List getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List packages = new PackageList(this).getPackages(); packages.add(new LndMobilePackage()); + packages.add(new LndMobileToolsPackage()); packages.add(new LndMobileScheduledSyncPackage()); packages.add(new BlixtTorPackage()); packages.add(new RealTimeBlurPackage()); diff --git a/build-ios-framework.md b/build-ios-framework.md new file mode 100644 index 000000000..ca60b50a0 --- /dev/null +++ b/build-ios-framework.md @@ -0,0 +1,7 @@ +Make sure you have installed [Go](https://golang.org) and relevant iOS development tools before proceeding. + +* Get lnd: `go get -d github.com/lightningnetwork/lnd` +* `cd src/github.com/lightningnetwork/lnd/` +* Get and init gomobile: `go get golang.org/x/tools/cmd/goimports`, `go get golang.org/x/tools/go/packages`, `go get golang.org/x/mobile/cmd/gomobile` and `gomobile init` +* Compile with `make ios prefix="1" tags="routerrpc walletrpc signrpc invoicesrpc"` +* Put `mobile/build/ios/Lndmobile.framework` folder to `ios/` diff --git a/contrib/log b/contrib/log index 5291ab37f..ead99acc3 100755 --- a/contrib/log +++ b/contrib/log @@ -1 +1 @@ -adb logcat ReactNative:V ReactNativeJS:V LndMobile:V SoLoader:V LndMobileService:V OnionProxyManagerEventHandler:V BlixtTor:V *oxyManagerEventHandler:V crash_dump64:V DEBUG:V *:S +adb logcat ReactNative:V ReactNativeJS:V LndMobile:V SoLoader:V LndMobileService:V OnionProxyManagerEventHandler:V BlixtWallet:V BlixtTor:V *oxyManagerEventHandler:V crash_dump64:V DEBUG:V *:S diff --git a/index.js b/index.js index 16162ca95..812241f21 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +import "react-native-gesture-handler"; + import ReactNative, { AppRegistry, YellowBox, Platform, UIManager } from "react-native"; import App from "./src/App"; import {name as appName} from "./app.json"; diff --git a/ios/BlixtWallet.xcodeproj/project.pbxproj b/ios/BlixtWallet.xcodeproj/project.pbxproj index 8c61ace8c..f05a74633 100644 --- a/ios/BlixtWallet.xcodeproj/project.pbxproj +++ b/ios/BlixtWallet.xcodeproj/project.pbxproj @@ -21,7 +21,18 @@ B77E06202F5CCA2EF5A26E97 /* libPods-BlixtWallet-BlixtWalletTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 457694BE08363A5757587B12 /* libPods-BlixtWallet-BlixtWalletTests.a */; }; BA12DD7C6C3D42969E297EAE /* IBMPlexSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 53E703C0F141473C8564E7EA /* IBMPlexSans-Regular.ttf */; }; C22E6DD819CB41F69AADA37A /* IBMPlexSans-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D57823EDB09B4CD1998E77F2 /* IBMPlexSans-Medium.ttf */; }; + CC28DA0B25925F8700A2DFA3 /* rpc.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC28DA0A25925F8700A2DFA3 /* rpc.pb.swift */; }; + CC28DA1025925FD500A2DFA3 /* walletunlocker.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC28DA0F25925FD500A2DFA3 /* walletunlocker.pb.swift */; }; + CC3C19202579C662004521F7 /* LndMobile.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6139F12579B66E0077D27B /* LndMobile.m */; }; + CC3ED73F25983106007D29B4 /* LndMobileScheduledSync.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC3ED73E25983106007D29B4 /* LndMobileScheduledSync.swift */; }; + CC3ED74425983118007D29B4 /* LndMobileScheduledSync.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3ED74325983118007D29B4 /* LndMobileScheduledSync.m */; }; + CC3F684925915ACA000F11AA /* LndMobileTools.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3F684825915ACA000F11AA /* LndMobileTools.m */; }; + CC3F684E25915AD7000F11AA /* LndMobileTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC3F684D25915AD7000F11AA /* LndMobileTools.swift */; }; + CC3F68532591683B000F11AA /* Lnd.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC3F68522591683B000F11AA /* Lnd.swift */; }; CC4F84C39523CF90E4DA5819 /* libPods-BlixtWallet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 24A62E03C64FF473C7843187 /* libPods-BlixtWallet.a */; }; + CCB51AEA259C2F74002637A2 /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCB51AE9259C2F74002637A2 /* CloudKit.framework */; }; + CCC7384A2599894B00CC7028 /* Lndmobile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC3EDCF9259950F2007D29B4 /* Lndmobile.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + CCDBCBB525864296003E8BA8 /* LndMobile.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCDBCBB425864296003E8BA8 /* LndMobile.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -86,7 +97,19 @@ C132F37DCBE159303BCD7902 /* Pods-BlixtWallet-tvOS.debugfakelnd.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlixtWallet-tvOS.debugfakelnd.xcconfig"; path = "Target Support Files/Pods-BlixtWallet-tvOS/Pods-BlixtWallet-tvOS.debugfakelnd.xcconfig"; sourceTree = ""; }; C410974135376A18E1B2404A /* Pods-BlixtWallet-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlixtWallet-tvOS.release.xcconfig"; path = "Target Support Files/Pods-BlixtWallet-tvOS/Pods-BlixtWallet-tvOS.release.xcconfig"; sourceTree = ""; }; CAAB4E5D47A9A21CFEB062E7 /* Pods-BlixtWallet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlixtWallet.release.xcconfig"; path = "Target Support Files/Pods-BlixtWallet/Pods-BlixtWallet.release.xcconfig"; sourceTree = ""; }; + CC28DA0A25925F8700A2DFA3 /* rpc.pb.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = rpc.pb.swift; sourceTree = ""; }; + CC28DA0F25925FD500A2DFA3 /* walletunlocker.pb.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = walletunlocker.pb.swift; sourceTree = ""; }; + CC3ED73E25983106007D29B4 /* LndMobileScheduledSync.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LndMobileScheduledSync.swift; sourceTree = ""; }; + CC3ED74325983118007D29B4 /* LndMobileScheduledSync.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LndMobileScheduledSync.m; sourceTree = ""; }; + CC3EDCF9259950F2007D29B4 /* Lndmobile.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Lndmobile.framework; sourceTree = ""; }; + CC3F684825915ACA000F11AA /* LndMobileTools.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LndMobileTools.m; sourceTree = ""; }; + CC3F684D25915AD7000F11AA /* LndMobileTools.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LndMobileTools.swift; sourceTree = ""; }; + CC3F68522591683B000F11AA /* Lnd.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Lnd.swift; sourceTree = ""; }; + CC6139F12579B66E0077D27B /* LndMobile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LndMobile.m; sourceTree = ""; }; CC85FC242576522B00C376A9 /* BlixtWallet.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = BlixtWallet.entitlements; path = BlixtWallet/BlixtWallet.entitlements; sourceTree = ""; }; + CCB51AE9259C2F74002637A2 /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; }; + CCDBCBB325864296003E8BA8 /* BlixtWallet-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BlixtWallet-Bridging-Header.h"; sourceTree = ""; }; + CCDBCBB425864296003E8BA8 /* LndMobile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LndMobile.swift; sourceTree = ""; }; CFC488B9CB00B9AB0D8FDE59 /* libPods-BlixtWallet-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BlixtWallet-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; D57823EDB09B4CD1998E77F2 /* IBMPlexSans-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "IBMPlexSans-Medium.ttf"; path = "../assets/fonts/IBMPlexSans-Medium.ttf"; sourceTree = ""; }; D64B150F528503028AA4B961 /* Pods-BlixtWallet-tvOS.debugtestnet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlixtWallet-tvOS.debugtestnet.xcconfig"; path = "Target Support Files/Pods-BlixtWallet-tvOS/Pods-BlixtWallet-tvOS.debugtestnet.xcconfig"; sourceTree = ""; }; @@ -111,7 +134,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + CCB51AEA259C2F74002637A2 /* CloudKit.framework in Frameworks */, CC4F84C39523CF90E4DA5819 /* libPods-BlixtWallet.a in Frameworks */, + CCC7384A2599894B00CC7028 /* Lndmobile.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -154,6 +179,7 @@ 13B07FAE1A68108700A75B9A /* BlixtWallet */ = { isa = PBXGroup; children = ( + CCDBC9FB258515DD003E8BA8 /* LndMobile */, CC85FC242576522B00C376A9 /* BlixtWallet.entitlements */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, @@ -169,6 +195,7 @@ 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { isa = PBXGroup; children = ( + CCB51AE9259C2F74002637A2 /* CloudKit.framework */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */, ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 24A62E03C64FF473C7843187 /* libPods-BlixtWallet.a */, @@ -228,6 +255,7 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( + CC3EDCF9259950F2007D29B4 /* Lndmobile.framework */, 13B07FAE1A68108700A75B9A /* BlixtWallet */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* BlixtWalletTests */, @@ -261,6 +289,23 @@ name = Resources; sourceTree = ""; }; + CCDBC9FB258515DD003E8BA8 /* LndMobile */ = { + isa = PBXGroup; + children = ( + CC28DA0F25925FD500A2DFA3 /* walletunlocker.pb.swift */, + CC28DA0A25925F8700A2DFA3 /* rpc.pb.swift */, + CC6139F12579B66E0077D27B /* LndMobile.m */, + CC3F684825915ACA000F11AA /* LndMobileTools.m */, + CCDBCBB425864296003E8BA8 /* LndMobile.swift */, + CCDBCBB325864296003E8BA8 /* BlixtWallet-Bridging-Header.h */, + CC3F684D25915AD7000F11AA /* LndMobileTools.swift */, + CC3F68522591683B000F11AA /* Lnd.swift */, + CC3ED73E25983106007D29B4 /* LndMobileScheduledSync.swift */, + CC3ED74325983118007D29B4 /* LndMobileScheduledSync.m */, + ); + path = LndMobile; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -358,7 +403,7 @@ }; 13B07F861A680F5B00A75B9A = { DevelopmentTeam = AT26Z24V2Q; - LastSwiftMigration = 1120; + LastSwiftMigration = 1230; }; 2D02E47A1E0B4A5D006451C7 = { CreatedOnToolsVersion = 8.2.1; @@ -508,7 +553,6 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-BlixtWallet/Pods-BlixtWallet-resources.sh", - "${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", @@ -529,7 +573,6 @@ ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", @@ -560,7 +603,6 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-BlixtWallet-BlixtWalletTests/Pods-BlixtWallet-BlixtWalletTests-resources.sh", - "${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", @@ -581,7 +623,6 @@ ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", @@ -702,7 +743,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + CC3F684E25915AD7000F11AA /* LndMobileTools.swift in Sources */, + CC3F68532591683B000F11AA /* Lnd.swift in Sources */, + CC3ED74425983118007D29B4 /* LndMobileScheduledSync.m in Sources */, + CC3ED73F25983106007D29B4 /* LndMobileScheduledSync.swift in Sources */, + CCDBCBB525864296003E8BA8 /* LndMobile.swift in Sources */, + CC3C19202579C662004521F7 /* LndMobile.m in Sources */, + CC28DA0B25925F8700A2DFA3 /* rpc.pb.swift in Sources */, + CC28DA1025925FD500A2DFA3 /* walletunlocker.pb.swift in Sources */, 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + CC3F684925915ACA000F11AA /* LndMobileTools.m in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -744,6 +794,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7FB0EDCFC05DD4E258EB4698 /* Pods-BlixtWallet-BlixtWalletTests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -767,6 +818,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 6F21675F737F23140EE8373E /* Pods-BlixtWallet-BlixtWalletTests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = BlixtWalletTests/Info.plist; @@ -791,22 +843,31 @@ CHAIN = mainnet; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = BlixtWallet/BlixtWallet.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 7; DEBUG = true; DEVELOPMENT_TEAM = AT26Z24V2Q; - ENABLE_BITCODE = NO; + EXCLUDED_ARCHS = "i386 x86_64"; FLAVOR = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LndMobile", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = BlixtWallet/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Blixt-Wallet-Debug2"; + PRODUCT_BUNDLE_IDENTIFIER = com.blixtwallet.debug; PRODUCT_NAME = "Blixt Wallet Debug"; + SWIFT_OBJC_BRIDGING_HEADER = "LndMobile/BlixtWallet-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; + VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -819,20 +880,30 @@ CHAIN = mainnet; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = BlixtWallet/BlixtWallet.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 7; DEBUG = false; DEVELOPMENT_TEAM = AT26Z24V2Q; + EXCLUDED_ARCHS = "i386 x86_64"; FLAVOR = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LndMobile", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = BlixtWallet/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Blixt-Wallet"; + PRODUCT_BUNDLE_IDENTIFIER = com.blixtwallet; PRODUCT_NAME = "Blixt Wallet"; + SWIFT_OBJC_BRIDGING_HEADER = "LndMobile/BlixtWallet-Bridging-Header.h"; SWIFT_VERSION = 5.0; + VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; @@ -979,6 +1050,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + EXCLUDED_ARCHS = "i386 x86_64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -994,7 +1066,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -1036,9 +1108,10 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + EXCLUDED_ARCHS = "i386 x86_64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1047,7 +1120,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -1055,6 +1128,7 @@ "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = NO; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; @@ -1092,6 +1166,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + EXCLUDED_ARCHS = "i386 x86_64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1107,7 +1182,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -1125,25 +1200,34 @@ baseConfigurationReference = 51FEA3B5F5E91ADECAF81AF4 /* Pods-BlixtWallet.debugtestnet.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CHAIN = regtest; + CHAIN = testnet; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = BlixtWallet/BlixtWallet.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 7; DEBUG = true; DEVELOPMENT_TEAM = AT26Z24V2Q; - ENABLE_BITCODE = NO; + EXCLUDED_ARCHS = "i386 x86_64"; FLAVOR = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LndMobile", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = BlixtWallet/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = com.blixtwallet.testnet.debug; PRODUCT_NAME = "Blixt Wallet Testnet Debug"; + SWIFT_OBJC_BRIDGING_HEADER = "LndMobile/BlixtWallet-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; + VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = DebugTestnet; @@ -1152,6 +1236,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = DC5C60C16BB07650A497820A /* Pods-BlixtWallet-BlixtWalletTests.debugtestnet.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -1255,9 +1340,10 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + EXCLUDED_ARCHS = "i386 x86_64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1266,7 +1352,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -1274,6 +1360,7 @@ "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = NO; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; @@ -1287,20 +1374,30 @@ CHAIN = testnet; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = BlixtWallet/BlixtWallet.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 7; DEBUG = false; DEVELOPMENT_TEAM = AT26Z24V2Q; + EXCLUDED_ARCHS = "i386 x86_64"; FLAVOR = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LndMobile", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = BlixtWallet/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Blixt-Wallet-Regtest"; + PRODUCT_BUNDLE_IDENTIFIER = com.blixtwallet.regtest; PRODUCT_NAME = "Blixt Wallet Testnet"; + SWIFT_OBJC_BRIDGING_HEADER = "LndMobile/BlixtWallet-Bridging-Header.h"; SWIFT_VERSION = 5.0; + VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = ReleaseTestnet; @@ -1309,6 +1406,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7F8DF590825EC1BAC7E0ABE5 /* Pods-BlixtWallet-BlixtWalletTests.releasetestnet.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = BlixtWalletTests/Info.plist; @@ -1412,6 +1510,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + EXCLUDED_ARCHS = "i386 x86_64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1427,7 +1526,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -1445,25 +1544,34 @@ baseConfigurationReference = 1D85700D17488384A1AE7C09 /* Pods-BlixtWallet.debugregtest.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CHAIN = mainnet; + CHAIN = regtest; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = BlixtWallet/BlixtWallet.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 7; DEBUG = true; DEVELOPMENT_TEAM = AT26Z24V2Q; - ENABLE_BITCODE = NO; - FLAVOR = fakelnd; + EXCLUDED_ARCHS = "i386 x86_64"; + FLAVOR = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LndMobile", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = BlixtWallet/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Blixt-Wallet-Regtest-Debug"; + PRODUCT_BUNDLE_IDENTIFIER = com.blixtwallet.regtest.debug; PRODUCT_NAME = "Blixt Wallet Regtest Debug"; + SWIFT_OBJC_BRIDGING_HEADER = "LndMobile/BlixtWallet-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; + VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = DebugRegtest; @@ -1472,6 +1580,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 542C9ECE0553F656BFC79606 /* Pods-BlixtWallet-BlixtWalletTests.debugregtest.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -1575,9 +1684,10 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + EXCLUDED_ARCHS = "i386 x86_64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1586,7 +1696,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -1594,6 +1704,7 @@ "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = NO; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; @@ -1607,20 +1718,30 @@ CHAIN = regtest; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = BlixtWallet/BlixtWallet.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 7; DEBUG = false; DEVELOPMENT_TEAM = AT26Z24V2Q; - FLAVOR = fakelnd; + EXCLUDED_ARCHS = "i386 x86_64"; + FLAVOR = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LndMobile", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = BlixtWallet/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Blixt-Wallet-Fakelnd"; + PRODUCT_BUNDLE_IDENTIFIER = com.blixtwallet.regtest; PRODUCT_NAME = "Blixt Wallet Regtest"; + SWIFT_OBJC_BRIDGING_HEADER = "LndMobile/BlixtWallet-Bridging-Header.h"; SWIFT_VERSION = 5.0; + VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = ReleaseRegtest; @@ -1629,6 +1750,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = EA2D85B8E85EE977BE93539A /* Pods-BlixtWallet-BlixtWalletTests.releaseregtest.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = BlixtWalletTests/Info.plist; @@ -1732,6 +1854,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + EXCLUDED_ARCHS = "i386 x86_64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1747,7 +1870,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -1768,22 +1891,31 @@ CHAIN = mainnet; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = BlixtWallet/BlixtWallet.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 7; DEBUG = true; DEVELOPMENT_TEAM = AT26Z24V2Q; - ENABLE_BITCODE = NO; + EXCLUDED_ARCHS = "i386 x86_64"; FLAVOR = fakelnd; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LndMobile", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = BlixtWallet/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Blixt-Wallet-Fakelnd-Debug"; + PRODUCT_BUNDLE_IDENTIFIER = com.blixtwallet.mainnet.fakelnd.debug; PRODUCT_NAME = "Blixt Wallet Fakelnd Debug"; + SWIFT_OBJC_BRIDGING_HEADER = "LndMobile/BlixtWallet-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; + VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = DebugFakelnd; @@ -1792,6 +1924,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1575F4AEEE77591610698556 /* Pods-BlixtWallet-BlixtWalletTests.debugfakelnd.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -1895,9 +2028,10 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + EXCLUDED_ARCHS = "i386 x86_64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1906,7 +2040,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -1914,6 +2048,7 @@ "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = NO; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; @@ -1927,20 +2062,30 @@ CHAIN = mainnet; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = BlixtWallet/BlixtWallet.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 7; DEBUG = false; DEVELOPMENT_TEAM = AT26Z24V2Q; + EXCLUDED_ARCHS = "i386 x86_64"; FLAVOR = fakelnd; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/LndMobile", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = BlixtWallet/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Blixt-Wallet-Fakelnd"; + PRODUCT_BUNDLE_IDENTIFIER = com.blixtwallet.mainnet.fakelnd; PRODUCT_NAME = "Blixt Wallet Fakelnd"; + SWIFT_OBJC_BRIDGING_HEADER = "LndMobile/BlixtWallet-Bridging-Header.h"; SWIFT_VERSION = 5.0; + VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = ReleaseFakelnd; @@ -1949,6 +2094,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1BF9C37DDFECED4FEB42102D /* Pods-BlixtWallet-BlixtWalletTests.releasefakelnd.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = BlixtWalletTests/Info.plist; diff --git a/ios/BlixtWallet.xcodeproj/xcshareddata/xcschemes/BlixtWallet.xcscheme b/ios/BlixtWallet.xcodeproj/xcshareddata/xcschemes/BlixtWallet.xcscheme index 9f7a8e0d7..aa305b565 100644 --- a/ios/BlixtWallet.xcodeproj/xcshareddata/xcschemes/BlixtWallet.xcscheme +++ b/ios/BlixtWallet.xcodeproj/xcshareddata/xcschemes/BlixtWallet.xcscheme @@ -47,7 +47,7 @@ launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" - debugDocumentVersioning = "YES" + debugDocumentVersioning = "NO" debugServiceExtension = "internal" allowLocationSimulation = "YES"> #import #import +#import #ifdef FB_SONARKIT_ENABLED #import @@ -29,6 +30,13 @@ static void InitializeFlipper(UIApplication *application) { @implementation AppDelegate +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication annotation:(id)annotation +{ + return [RCTLinkingManager application:application openURL:url + sourceApplication:sourceApplication annotation:annotation]; +} + - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #ifdef FB_SONARKIT_ENABLED diff --git a/ios/BlixtWallet/BlixtWallet.entitlements b/ios/BlixtWallet/BlixtWallet.entitlements index 903def2af..f1cddf78f 100644 --- a/ios/BlixtWallet/BlixtWallet.entitlements +++ b/ios/BlixtWallet/BlixtWallet.entitlements @@ -4,5 +4,11 @@ aps-environment development + com.apple.developer.icloud-container-identifiers + + com.apple.developer.icloud-services + + com.apple.developer.ubiquity-kvstore-identifier + $(TeamIdentifierPrefix)$(CFBundleIdentifier) diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/Contents.json b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/Contents.json index 8df2a7a12..871a6d703 100644 --- a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,55 +1,109 @@ { "images" : [ { - "filename" : "blixt-wallet-60-20@2x.png", + "filename" : "blixt-wallet-70-20@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { - "filename" : "blixt-wallet-60-20@3x.png", + "filename" : "blixt-wallet-70-20@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { - "filename" : "blixt-wallet-60-29@2x.png", + "filename" : "blixt-wallet-70-29@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { - "filename" : "blixt-wallet-60-29@3x.png", + "filename" : "blixt-wallet-70-29@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { - "filename" : "blixt-wallet-60-40@2x.png", + "filename" : "blixt-wallet-70-40@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { - "filename" : "blixt-wallet-60-40@3x.png", + "filename" : "blixt-wallet-70-40@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { - "filename" : "blixt-wallet-60-60@2x.png", + "filename" : "blixt-wallet-70-60@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { - "filename" : "blixt-wallet-60-60@3x.png", + "filename" : "blixt-wallet-70-60@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" }, { - "filename" : "blixt-wallet-60-1024.png", + "filename" : "blixt-wallet-70-20.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "filename" : "blixt-wallet-70-20@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "blixt-wallet-70-29.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "blixt-wallet-70-29@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "blixt-wallet-70-40.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "filename" : "blixt-wallet-70-40@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "blixt-wallet-70-76.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "blixt-wallet-70-76@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "filename" : "blixt-wallet-70-83.5@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "filename" : "blixt-wallet-70-1024.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-1024.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-1024.png deleted file mode 100644 index 604c2512d..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-1024.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-20@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-20@2x.png deleted file mode 100644 index db6e6ef5e..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-20@2x.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-20@3x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-20@3x.png deleted file mode 100644 index 92eace293..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-20@3x.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-29@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-29@2x.png deleted file mode 100644 index fbd57296d..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-29@2x.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-29@3x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-29@3x.png deleted file mode 100644 index 2da19d5e5..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-29@3x.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-40@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-40@2x.png deleted file mode 100644 index 986d4d51b..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-40@2x.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-40@3x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-40@3x.png deleted file mode 100644 index 566209407..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-40@3x.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-60@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-60@2x.png deleted file mode 100644 index 566209407..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-60@2x.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-60@3x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-60@3x.png deleted file mode 100644 index f9891b42d..000000000 Binary files a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-60-60@3x.png and /dev/null differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-1024.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-1024.png new file mode 100644 index 000000000..594693710 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-1024.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20.png new file mode 100644 index 000000000..dca8c8cef Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20@2x.png new file mode 100644 index 000000000..e8cb1c69a Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20@2x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20@3x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20@3x.png new file mode 100644 index 000000000..3727f4267 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-20@3x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29.png new file mode 100644 index 000000000..4207ffc17 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29@2x.png new file mode 100644 index 000000000..eb4e75503 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29@2x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29@3x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29@3x.png new file mode 100644 index 000000000..d5548e0b7 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-29@3x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40.png new file mode 100644 index 000000000..e8cb1c69a Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40@2x.png new file mode 100644 index 000000000..eb94dcf71 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40@2x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40@3x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40@3x.png new file mode 100644 index 000000000..6c6a98578 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-40@3x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-60@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-60@2x.png new file mode 100644 index 000000000..6c6a98578 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-60@2x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-60@3x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-60@3x.png new file mode 100644 index 000000000..5587cb9eb Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-60@3x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-76.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-76.png new file mode 100644 index 000000000..6500ea463 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-76.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-76@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-76@2x.png new file mode 100644 index 000000000..caba2f444 Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-76@2x.png differ diff --git a/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-83.5@2x.png b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-83.5@2x.png new file mode 100644 index 000000000..08e3db77b Binary files /dev/null and b/ios/BlixtWallet/Images.xcassets/AppIcon.appiconset/blixt-wallet-70-83.5@2x.png differ diff --git a/ios/BlixtWallet/Info.plist b/ios/BlixtWallet/Info.plist index b897fc2db..70ca2a997 100644 --- a/ios/BlixtWallet/Info.plist +++ b/ios/BlixtWallet/Info.plist @@ -17,17 +17,30 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) CFBundleSignature ???? + CFBundleURLTypes + + + CFBundleURLSchemes + + lightning + + + CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) CHAIN $(CHAIN) CONFIGURATION $(CONFIGURATION) + DEBUG + $(DEBUG) FLAVOR $(FLAVOR) + ITSAppUsesNonExemptEncryption + LSApplicationQueriesSchemes lightning @@ -49,12 +62,12 @@ NSCameraUsageDescription Scan QR codes for invoices - DEBUG - $(DEBUG) - NSLocationWhenInUseUsageDescription - Locally save location of where a transaction was made + NSFaceIDUsageDescription + Use Face ID for accessing wallet functionality NSLocationUsageDescription Locally save location of where a transaction was made + NSLocationWhenInUseUsageDescription + Locally save location of where a transaction was made SCHEME $(SCHEME) UIAppFonts diff --git a/ios/LndMobile/BlixtWallet-Bridging-Header.h b/ios/LndMobile/BlixtWallet-Bridging-Header.h new file mode 100644 index 000000000..a8d51b722 --- /dev/null +++ b/ios/LndMobile/BlixtWallet-Bridging-Header.h @@ -0,0 +1,4 @@ +#import +#import +#import +#import diff --git a/ios/LndMobile/Lnd.swift b/ios/LndMobile/Lnd.swift new file mode 100644 index 000000000..295e2c390 --- /dev/null +++ b/ios/LndMobile/Lnd.swift @@ -0,0 +1,246 @@ +import Foundation +import Lndmobile +import SwiftProtobuf + +public struct LndError: Error { + let msg: String +} + +extension LndError: LocalizedError { + public var errorDescription: String? { + return NSLocalizedString(msg, comment: "") + } +} + +enum LndStatusCodes: NSNumber { + case STATUS_SERVICE_BOUND = 1 + case STATUS_PROCESS_STARTED = 2 + case STATUS_WALLET_UNLOCKED = 4 +} + +// Used for anyone who wants to use this class +typealias Callback = (Data?, Error?) -> Void +typealias StreamCallback = (Data?, Error?) -> Void + +// Used internally in this class to deal with Lndmobile/Go +class LndmobileCallback: NSObject, LndmobileCallbackProtocol { + var method: String + var callback: Callback + + init(method: String, callback: @escaping Callback) { + self.method = method + self.callback = callback + } + + func onResponse(_ p0: Data?) { + self.callback(p0, nil) + } + + func onError(_ p0: Error?) { + NSLog("Inside onError " + self.method) + NSLog(p0?.localizedDescription ?? "unknown error") + self.callback(nil, p0) + } +} + +class LndmobileReceiveStream: NSObject, LndmobileRecvStreamProtocol { + var method: String + var callback: StreamCallback + + init(method: String, callback: @escaping StreamCallback) { + self.method = method + self.callback = callback + } + + func onResponse(_ p0: Data?) { + self.callback(p0, nil) + } + + func onError(_ p0: Error?) { + NSLog("LndmobileReceiveStream onError " + self.method) + NSLog(p0?.localizedDescription ?? "unknown error") + self.callback(nil, p0) + } +} + +open class Lnd { + static let shared = Lnd() + + var lndStarted = false + var walletUnlocked = false + var activeStreams: [String] = [] + + static let syncMethods = [ + // index + // + "AddInvoice": { bytes, cb in LndmobileAddInvoice(bytes, cb) }, + "InvoicesCancelInvoice": { bytes, cb in LndmobileInvoicesCancelInvoice(bytes, cb) }, + "ConnectPeer": { bytes, cb in LndmobileConnectPeer(bytes, cb) }, + "DecodePayReq": { bytes, cb in LndmobileDecodePayReq(bytes, cb) }, + "GetInfo": { bytes, cb in LndmobileGetInfo(bytes, cb) }, + "GetNodeInfo": { bytes, cb in LndmobileGetNodeInfo(bytes, cb) }, + "LookupInvoice": { bytes, cb in LndmobileLookupInvoice(bytes, cb) }, + "ListPeers": { bytes, cb in LndmobileListPeers(bytes, cb) }, + "DisconnectPeer": { bytes, cb in Lndmobile.LndmobileDisconnectPeer (bytes, cb) }, + "SendPaymentSync": { bytes, cb in LndmobileSendPaymentSync(bytes, cb) }, + + // channel + // + "ChannelBalance": { bytes, cb in LndmobileChannelBalance(bytes, cb) }, + "ListChannels": { bytes, cb in LndmobileListChannels(bytes, cb) }, + "OpenChannelSync": { bytes, cb in LndmobileOpenChannelSync(bytes, cb) }, + "PendingChannels": { bytes, cb in LndmobilePendingChannels(bytes, cb) }, + "ExportAllChannelBackups": { bytes, cb in LndmobileExportAllChannelBackups(bytes, cb) }, + "AbandonChannel": { bytes, cb in LndmobileAbandonChannel(bytes, cb) }, + + // onchain + // + "GetTransactions": { bytes, cb in LndmobileGetTransactions(bytes, cb) }, + "NewAddress": { bytes, cb in LndmobileNewAddress(bytes, cb) }, + "SendCoins": { bytes, cb in LndmobileSendCoins(bytes, cb) }, + "WalletBalance": { bytes, cb in LndmobileWalletBalance(bytes, cb) }, + + // wallet + "GenSeed": { bytes, cb in LndmobileGenSeed(bytes, cb) }, + "InitWallet": { bytes, cb in LndmobileInitWallet(bytes, cb) }, + "UnlockWallet": { bytes, cb in LndmobileUnlockWallet(bytes, cb) }, + "WalletKitDeriveKey": { bytes, cb in LndmobileWalletKitDeriveKey(bytes, cb) }, +// derivePrivateKey + "SignerSignMessage": { bytes, cb in LndmobileSignerSignMessage(bytes, cb) }, + + // autopilot + "AutopilotStatus": { bytes, cb in LndmobileAutopilotStatus(bytes, cb) }, + "AutopilotModifyStatus": { bytes, cb in LndmobileAutopilotModifyStatus(bytes, cb) }, + "AutopilotQueryScores": { bytes, cb in LndmobileAutopilotQueryScores(bytes, cb) }, + "AutopilotSetScores": { bytes, cb in LndmobileAutopilotSetScores(bytes, cb) }, + ] + + static let streamMethods = [ + // index + // + "RouterSendPaymentV2": { req, cb in return LndmobileRouterSendPaymentV2(req, cb) }, + // channel + // + "CloseChannel": { req, cb in return LndmobileCloseChannel(req, cb)}, + "SubscribeChannelEvents": { req, cb in return LndmobileSubscribeChannelEvents(req, cb)}, + // onchain + // + "SubscribeTransactions": { req, cb in return LndmobileSubscribeTransactions(req, cb) }, + "SubscribeInvoices": { req, cb in return LndmobileSubscribeInvoices(req, cb) }, + ] + + func checkStatus() -> Int32 { + // Service is always bound on iOS + var flags = LndStatusCodes.STATUS_SERVICE_BOUND.rawValue.int32Value + + if (self.lndStarted) { + flags += LndStatusCodes.STATUS_PROCESS_STARTED.rawValue.int32Value + } + + if (self.walletUnlocked) { + flags += LndStatusCodes.STATUS_WALLET_UNLOCKED.rawValue.int32Value + } + + return flags + } + + func startLnd(_ torEnabled: Bool, lndStartedCallback: @escaping Callback, walletUnlockedCallback: @escaping Callback) -> Void { + let applicationSupport = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0] + let lndPath = applicationSupport.appendingPathComponent("lnd", isDirectory: true) + let args = "--lnddir=\"\(lndPath.path)\"" + + let started: Callback = {(data: Data?, error: Error?) in { + self.lndStarted = true + lndStartedCallback(data, error) + }()} + + let unlocked: Callback = {(data: Data?, error: Error?) in { + self.walletUnlocked = true + walletUnlockedCallback(data, error) + }()} + + LndmobileStart( + args, + LndmobileCallback(method: "start", callback: started), + LndmobileCallback(method: "start2", callback: unlocked) + ) + } + + func stopLnd(_ callback: @escaping Callback) { + do { + let stopRequest = Lnrpc_StopRequest() + let payload = try stopRequest.serializedData() + LndmobileStopDaemon(payload, LndmobileCallback(method: "stopLnd", callback: callback)) + } catch let error { + callback(nil, error) + } + } + + func initWallet(_ seed: [String], password: String, recoveryWindow: Int32, channelsBackupsBase64: String, callback: @escaping Callback) { + do { + var initWalletRequest = Lnrpc_InitWalletRequest() + initWalletRequest.cipherSeedMnemonic = seed + initWalletRequest.walletPassword = password.data(using: .utf8).unsafelyUnwrapped + if (recoveryWindow != 0) { + initWalletRequest.recoveryWindow = recoveryWindow + } + + if (channelsBackupsBase64 != "") { + NSLog("--CHANNEL BACKUP RESTORE--") + var chanBackupSnapshot = Lnrpc_ChanBackupSnapshot() + var multiChanBackup = Lnrpc_MultiChanBackup() + + multiChanBackup.multiChanBackup = Data(base64Encoded: channelsBackupsBase64, options: [])! + chanBackupSnapshot.multiChanBackup = multiChanBackup + + initWalletRequest.channelBackups = chanBackupSnapshot + } + let payload = try initWalletRequest.serializedData() + LndmobileInitWallet(payload, LndmobileCallback(method: "InitWallet", callback: callback)) + } catch let error { + callback(nil, error) + } + } + + func unlockWallet(_ password: String, callback: @escaping Callback) { + do { + var unlockWalletRequest = Lnrpc_UnlockWalletRequest(); + unlockWalletRequest.walletPassword = password.data(using: .utf8).unsafelyUnwrapped + let payload = try unlockWalletRequest.serializedData() + LndmobileUnlockWallet(payload, LndmobileCallback(method: "UnlockWallet", callback: callback)) + } catch let error { + callback(nil, error) + } + } + + func sendCommand(_ method: String, payload: String, callback: @escaping Callback) { + let block = Lnd.syncMethods[method] + + if block == nil { + NSLog("method not found" + method) + callback(nil, LndError(msg: "Lnd method not found: " + method)) + return + } + + let bytes = Data(base64Encoded: payload, options: []) + block?(bytes, LndmobileCallback(method: method, callback: callback)) + } + + func sendStreamCommand(_ method: String, payload: String, streamOnlyOnce: Bool, callback: @escaping StreamCallback) { + if (self.activeStreams.contains(method)) { + NSLog("Attempting to stream " + method + " twice, not allowing") + return + } else { + self.activeStreams.append(method) + } + let block = Lnd.streamMethods[method] + if block == nil { + NSLog("method not found" + method) + callback(nil, LndError(msg: "Lnd method not found: " + method)) + return + } + + let bytes = Data(base64Encoded: payload, options: []) + block?(bytes, LndmobileReceiveStream(method: method, callback: callback)) + } +} diff --git a/ios/LndMobile/LndMobile.m b/ios/LndMobile/LndMobile.m new file mode 100644 index 000000000..471b8a4e3 --- /dev/null +++ b/ios/LndMobile/LndMobile.m @@ -0,0 +1,52 @@ +#import +#import + +@interface RCT_EXTERN_MODULE(LndMobile, NSObject) + +RCT_EXTERN_METHOD( + initialize: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + checkStatus: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + startLnd: (BOOL)torEnabled + resolver: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + initWallet: (NSArray *)seed + password: (NSString *)password + recoveryWindow: (NSInteger)recoveryWindow + channelsBackupBase64: (NSString *)channelsBackupBase64 + resolver: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + unlockWallet: (NSString *)password + resolver: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + sendCommand: (NSString *)method + payload: (NSString *)payload + resolver: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + sendStreamCommand: (NSString *)method + payload: (NSString *)payload + streamOnlyOnce: (BOOL)streamOnlyOnce + resolver: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +@end diff --git a/ios/LndMobile/LndMobile.swift b/ios/LndMobile/LndMobile.swift new file mode 100644 index 000000000..f41cc2379 --- /dev/null +++ b/ios/LndMobile/LndMobile.swift @@ -0,0 +1,209 @@ +import Foundation +import Lndmobile +import React + +@objc(LndMobile) +class LndMobile: RCTEventEmitter { + @objc + override static func moduleName() -> String! { + "LndMobile" + } + + var walletUnlockedResolver: RCTPromiseResolveBlock? = nil + + override func supportedEvents() -> [String]! { + var events = Lnd.streamMethods.map{ $0.key } + events.append("WalletUnlocked") + return events + } + + @objc + override static func requiresMainQueueSetup() -> Bool { + return false + } + + @objc(initialize:rejecter:) + func initialize(resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + // If regtest, we need to ask for LAN access permission + // before lnd requests it, otherwise it won't have time and crash + // https://developer.apple.com/forums/thread/663768 + let chain = Bundle.main.object(forInfoDictionaryKey: "CHAIN") as? String + if (chain == "regtest") { + NSLog("Triggering LAN access permission dialog") + triggerLocalNetworkPrivacyAlert() + } + resolve([ + "data": "" + ]) + } + + func triggerLocalNetworkPrivacyAlert() { + let sock4 = socket(AF_INET, SOCK_DGRAM, 0) + guard sock4 >= 0 else { return } + defer { close(sock4) } + let sock6 = socket(AF_INET6, SOCK_DGRAM, 0) + guard sock6 >= 0 else { return } + defer { close(sock6) } + + let addresses = addressesOfDiscardServiceOnBroadcastCapableInterfaces() + var message = [UInt8]("!".utf8) + for address in addresses { + address.withUnsafeBytes { buf in + let sa = buf.baseAddress!.assumingMemoryBound(to: sockaddr.self) + let saLen = socklen_t(buf.count) + let sock = sa.pointee.sa_family == AF_INET ? sock4 : sock6 + _ = sendto(sock, &message, message.count, MSG_DONTWAIT, sa, saLen) + } + } + } + + /// Returns the addresses of the discard service (port 9) on every + /// broadcast-capable interface. + /// + /// Each array entry is contains either a `sockaddr_in` or `sockaddr_in6`. + private func addressesOfDiscardServiceOnBroadcastCapableInterfaces() -> [Data] { + var addrList: UnsafeMutablePointer? = nil + let err = getifaddrs(&addrList) + guard err == 0, let start = addrList else { return [] } + defer { freeifaddrs(start) } + return sequence(first: start, next: { $0.pointee.ifa_next }) + .compactMap { i -> Data? in + guard + (i.pointee.ifa_flags & UInt32(bitPattern: IFF_BROADCAST)) != 0, + let sa = i.pointee.ifa_addr + else { return nil } + var result = Data(UnsafeRawBufferPointer(start: sa, count: Int(sa.pointee.sa_len))) + switch CInt(sa.pointee.sa_family) { + case AF_INET: + result.withUnsafeMutableBytes { buf in + let sin = buf.baseAddress!.assumingMemoryBound(to: sockaddr_in.self) + sin.pointee.sin_port = UInt16(9).bigEndian + } + case AF_INET6: + result.withUnsafeMutableBytes { buf in + let sin6 = buf.baseAddress!.assumingMemoryBound(to: sockaddr_in6.self) + sin6.pointee.sin6_port = UInt16(9).bigEndian + } + default: + return nil + } + return result + } + } + + @objc(checkStatus:rejecter:) + func checkStatus(resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + resolve(Lnd.shared.checkStatus()) + } + + @objc(startLnd:resolver:rejecter:) + func startLnd(_ torEnabled: Bool, resolve: @escaping RCTPromiseResolveBlock, rejecter reject:@escaping RCTPromiseRejectBlock) { + Lnd.shared.startLnd(torEnabled) { (data, error) in + if let e = error { + reject("error", e.localizedDescription, e) + return + } + resolve([ + "data": data?.base64EncodedString() + ]) + } walletUnlockedCallback: { (data, error) in + if let e = error { + NSLog("unlock error" + e.localizedDescription) + return + } + self.sendEvent(withName: "WalletUnlocked", body: [ + "data": data?.base64EncodedString() + ]) + if (self.walletUnlockedResolver != nil) { + NSLog("Resolving walletUnlockedResolver") + self.walletUnlockedResolver!("done") + } + } + } + + @objc(startLnd:rejecter:) + func stopLnd(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject:@escaping RCTPromiseRejectBlock) { + Lnd.shared.stopLnd() { (data, error) in + if let e = error { + reject("error", e.localizedDescription, e) + return + } + resolve([ + "data": data?.base64EncodedString() + ]) + } + } + + @objc(initWallet:password:recoveryWindow:channelsBackupBase64:resolver:rejecter:) + func initWallet(_ seed: [AnyHashable], password: String, recoveryWindow: Int, channelsBackupBase64: String, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) { + NSLog("seed " + (seed as! [String]).joined()) + NSLog("password " + password) + NSLog("recoveryWindow " + String(recoveryWindow)) + NSLog("channelsBackupBase64 ", channelsBackupBase64) + + self.walletUnlockedResolver = resolve + Lnd.shared.initWallet( + seed as! [String], + password: password, + recoveryWindow: Int32(recoveryWindow), + channelsBackupsBase64: channelsBackupBase64 + ) { (data, error) in + if let e = error { + reject("error", e.localizedDescription, e) + return + } + // IMPORTANT: + // Promise resolve is happening in startLnd + // by self.walletUnlockerResolver + } + } + + @objc(unlockWallet:resolver:rejecter:) + func unlockWallet(_ password: String, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) { + Lnd.shared.unlockWallet(password) { (data, error) in + if let e = error { + reject("error", e.localizedDescription, e) + return + } + resolve([ + "data": data?.base64EncodedString() + ]) + } + } + + @objc(sendCommand:payload:resolver:rejecter:) + func sendCommand(_ method: String, payload: String, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) { + Lnd.shared.sendCommand( + method, + payload: payload + ) { (data, error) in + if let e = error { + reject("error", e.localizedDescription, e) + return + } + resolve([ + "data": data?.base64EncodedString() + ]) + } + } + + @objc(sendStreamCommand:payload:streamOnlyOnce:resolver:rejecter:) + func sendStreamCommand(_ method: String, payload: String, streamOnlyOnce: Bool, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) { + Lnd.shared.sendStreamCommand( + method, + payload: payload, + streamOnlyOnce: streamOnlyOnce + ) { (data, error) in + if let e = error { + // TODO(hsjoberg): handle error... + NSLog("stream error") + NSLog(e.localizedDescription) + } + self.sendEvent( + withName: method, + body: ["data": data?.base64EncodedString()] + ) + } + resolve("done") + } +} diff --git a/ios/LndMobile/LndMobileScheduledSync.m b/ios/LndMobile/LndMobileScheduledSync.m new file mode 100644 index 000000000..3b60e4440 --- /dev/null +++ b/ios/LndMobile/LndMobileScheduledSync.m @@ -0,0 +1,21 @@ +#import +#import + +@interface RCT_EXTERN_MODULE(LndMobileScheduledSync, NSObject) + +RCT_EXTERN_METHOD( + setupScheduledSyncWork: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + removeScheduledSyncWork: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + checkScheduledSyncWorkStatus: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +@end diff --git a/ios/LndMobile/LndMobileScheduledSync.swift b/ios/LndMobile/LndMobileScheduledSync.swift new file mode 100644 index 000000000..b314068d5 --- /dev/null +++ b/ios/LndMobile/LndMobileScheduledSync.swift @@ -0,0 +1,28 @@ +import Foundation + +@objc(LndMobileScheduledSync) +class LndMobileScheduledSync: NSObject, RCTBridgeModule { + @objc + static func moduleName() -> String! { + "LndMobileScheduledSync" + } + + @objc + static func requiresMainQueueSetup() -> Bool { + return false + } + + @objc(setupScheduledSyncWork:rejecter:) + func setupScheduledSyncWork(resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock ) -> Void { + resolve(true) + } + + @objc(removeScheduledSyncWork:rejecter:) + func removeScheduledSyncWork(resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) -> Void { + resolve(true) + } + + @objc(checkScheduledSyncWorkStatus:rejecter:) + func checkScheduledSyncWorkStatus(resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) -> Void { + } +} diff --git a/ios/LndMobile/LndMobileTools.m b/ios/LndMobile/LndMobileTools.m new file mode 100644 index 000000000..e2b244d98 --- /dev/null +++ b/ios/LndMobile/LndMobileTools.m @@ -0,0 +1,74 @@ +#import +#import + +@interface RCT_EXTERN_MODULE(LndMobileTools, NSObject) + +RCT_EXTERN_METHOD( + writeConfigFile: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + log: (NSString *)level + tag: (NSString *)tag + msg: (NSString *)msg +) + +RCT_EXTERN_METHOD( + DEBUG_getWalletPasswordFromKeychain: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + getTorEnabled: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + saveChannelsBackup: (NSString *)base64Backups + resolver: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + checkICloudEnabled: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + DEBUG_listFilesInDocuments: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + DEBUG_listFilesInApplicationSupport: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + checkApplicationSupportExists: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + checkLndFolderExists: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + createIOSApplicationSupportAndLndDirectories: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + excludeLndICloudBackup: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + TEMP_moveLndToApplicationSupport: (RCTPromiseResolveBlock)resolve + rejecter: (RCTPromiseRejectBlock)reject +) + +@end + diff --git a/ios/LndMobile/LndMobileTools.swift b/ios/LndMobile/LndMobileTools.swift new file mode 100644 index 000000000..4505e55a6 --- /dev/null +++ b/ios/LndMobile/LndMobileTools.swift @@ -0,0 +1,334 @@ +import Foundation +import React + +public struct LndMobileToolsError: Error { + let msg: String +} + +extension LndMobileToolsError: LocalizedError { + public var errorDescription: String? { + return NSLocalizedString(msg, comment: "") + } +} + +@objc(LndMobileTools) +class LndMobileTools: NSObject, RCTBridgeModule { + @objc + static func moduleName() -> String! { + "LndMobileTools" + } + + @objc + static func requiresMainQueueSetup() -> Bool { + return false + } + + @objc(writeConfigFile:rejecter:) + func writeConfigFile(resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) -> Void { + let chain = Bundle.main.object(forInfoDictionaryKey: "CHAIN") as? String + var str = "" + + if (chain == "mainnet") { + str = +""" +[Application Options] +debuglevel=info +maxbackoff=2s +norest=1 +sync-freelist=1 +accept-keysend=1 + +[Routing] +routing.assumechanvalid=1 + +[Bitcoin] +bitcoin.active=1 +bitcoin.mainnet=1 +bitcoin.node=neutrino + +[Neutrino] +neutrino.connect=btcd-mainnet.lightning.computer +neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json + +[autopilot] +autopilot.active=0 +autopilot.private=1 +autopilot.minconfs=1 +autopilot.conftarget=3 +autopilot.allocation=1.0 +autopilot.heuristic=externalscore:0.95 +autopilot.heuristic=preferential:0.05 + +""" + } else if (chain == "testnet") { + str = +""" +[Application Options] +debuglevel=info +maxbackoff=2s +norest=1 +sync-freelist=1 +accept-keysend=1 + +[Routing] +routing.assumechanvalid=1 + +[Bitcoin] +bitcoin.active=1 +bitcoin.testnet=1 +bitcoin.node=neutrino + +[Neutrino] +neutrino.connect=btcd-testnet.lightning.computer +neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json + +[autopilot] +autopilot.active=0 +autopilot.private=1 +autopilot.minconfs=1 +autopilot.conftarget=3 +autopilot.allocation=1.0 +autopilot.heuristic=externalscore:0.95 +autopilot.heuristic=preferential:0.05 + +""" + } else if (chain == "regtest") { + str = +""" +[Application Options] +debuglevel=info +maxbackoff=2s +norest=1 +sync-freelist=1 +accept-keysend=1 + +[Routing] +routing.assumechanvalid=1 + +[Bitcoin] +bitcoin.active=1 +bitcoin.regtest=1 +bitcoin.node=bitcoind + +[Bitcoind] +bitcoind.rpchost=192.168.1.113:18443 +bitcoind.rpcuser=polaruser +bitcoind.rpcpass=polarpass +bitcoind.zmqpubrawblock=192.168.1.113:28334 +bitcoind.zmqpubrawtx=192.168.1.113:29335 + +[autopilot] +autopilot.active=0 +autopilot.private=1 +autopilot.minconfs=1 +autopilot.conftarget=3 +autopilot.allocation=1.0 +autopilot.heuristic=externalscore:0.95 +autopilot.heuristic=preferential:0.05 + +""" + } + + do { + let paths = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask) + let url = paths[0].appendingPathComponent("lnd", isDirectory: true).appendingPathComponent("lnd.conf", isDirectory: false) + + try str.write(to: url, atomically: true, encoding: .utf8) + let input = try String(contentsOf: url) + NSLog("Read config: " + input) + resolve("Config written") + } catch let error { + NSLog(error.localizedDescription) + reject("error", error.localizedDescription, error) + } + } + + @objc(log:tag:msg:) + func log(level: String, tag: String, msg: String) { + NSLog("[" + tag + "] " + msg) + } + + @objc(DEBUG_getWalletPasswordFromKeychain:rejecter:) + func DEBUG_getWalletPasswordFromKeychain(resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + let server = "password" + + let query = [ + kSecClass as String: kSecClassInternetPassword, + kSecAttrServer as String: server, + kSecReturnAttributes as String: kCFBooleanTrue!, + kSecReturnData as String: kCFBooleanTrue!, + kSecMatchLimit as String: kSecMatchLimitOne as String + ] as CFDictionary + + var result: AnyObject? + let osStatus = SecItemCopyMatching(query, &result) + if osStatus != noErr && osStatus != errSecItemNotFound { + let error = NSError(domain: NSOSStatusErrorDomain, code: Int(osStatus), userInfo: nil) + return reject("error", error.localizedDescription, error) + } else if (result == nil) { + return resolve(NSNumber(value: false)) + } + + if let passwordData = result![kSecValueData] as? Data { + let password = String(data: passwordData, encoding: .utf8) + return resolve(password) + } + } + + @objc(getTorEnabled:rejecter:) + func getTorEnabled(resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) { + // let asyncStorage = self.bridge.module(forClass: RNCAsyncStorage.self) + let asyncStorage = RNCAsyncStorage.init() + + asyncStorage.methodQueue.async { + asyncStorage.multiGet(["torEnabled"], callback: { (result) in + if let result = result { + let count = result[0] + if count is Error { + let error = count as! Error + reject("error", error.localizedDescription, error) + return + } + + if let values = result[1] as? [[String]] { + if let first = values[0] as [String]? { + resolve(first[1]) + } + } + } + }) + } + } + + @objc(saveChannelsBackup:resolver:rejecter:) + func saveChannelsBackup(base64Backups: String, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + DispatchQueue.main.async { + // let data = Data(base64Encoded: base64Backups, options: []) + let activityController = UIActivityViewController(activityItems: [base64Backups], applicationActivities: nil) + RCTSharedApplication()?.delegate?.window??.rootViewController?.present(activityController, animated: true, completion: { + resolve(true) + }) + } + } + + @objc(checkICloudEnabled:rejecter:) + func checkICloudEnabled(resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + let token = FileManager.default.ubiquityIdentityToken + resolve(token != nil) + } + + @objc(DEBUG_listFilesInDocuments:rejecter:) + func DEBUG_listFilesInDocuments(resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + let fileManager = FileManager.default + let documentsURL = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + do { + let fileURLs = try fileManager.contentsOfDirectory(at: documentsURL, includingPropertiesForKeys: nil) + print(fileURLs) + resolve(fileURLs.description) + } catch { + print("Error while enumerating files \(documentsURL.path): \(error.localizedDescription)") + reject("error", error.localizedDescription, error) + } + } + + @objc(DEBUG_listFilesInApplicationSupport:rejecter:) + func DEBUG_listFilesInApplicationSupport(resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + let fileManager = FileManager.default + let applicationSupportUrl = fileManager.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0] + let lndUrl = applicationSupportUrl.appendingPathComponent("lnd") + do { + let fileURLs = try fileManager.contentsOfDirectory(at: lndUrl, includingPropertiesForKeys: nil) + // process files + print(fileURLs) + resolve(fileURLs.description) + } catch { + print("Error while enumerating files \(lndUrl.path): \(error.localizedDescription)") + reject("error", error.localizedDescription, error) + } + } + + @objc(checkApplicationSupportExists:rejecter:) + func checkApplicationSupportExists(resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + let applicationSupport = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first! + resolve(FileManager.default.fileExists(atPath: applicationSupport.path)) + } + + @objc(checkLndFolderExists:rejecter:) + func checkLndFolderExists(resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + let applicationSupport = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first! + let lndFolder = applicationSupport.appendingPathComponent("lnd", isDirectory: true) + resolve(FileManager.default.fileExists(atPath: lndFolder.path)) + } + + @objc(createIOSApplicationSupportAndLndDirectories:rejecter:) + func createIOSApplicationSupportAndLndDirectories(resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + do { +// try FileManager.default.url( +// for: .applicationSupportDirectory, +// in: .userDomainMask, +// appropriateFor: nil, +// create: true +// ) + let applicationSupport = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first! + let lndFolder = applicationSupport.appendingPathComponent("lnd", isDirectory: true) + // This will create the lnd folder as well as "Application Support" + try FileManager.default.createDirectory(at: lndFolder, withIntermediateDirectories: true) + + resolve(true) + } catch let error { + reject("error", error.localizedDescription, error) + } + } + + @objc(excludeLndICloudBackup:rejecter:) + func excludeLndICloudBackup(resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + let applicationSupport = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first! + var lndFolder = applicationSupport.appendingPathComponent("lnd", isDirectory: true) + + do { + if FileManager.default.fileExists(atPath: lndFolder.path) { + var resourceValues = URLResourceValues() + resourceValues.isExcludedFromBackup = true + try lndFolder.setResourceValues(resourceValues) + resolve(true) + } else { + let error = LndMobileToolsError(msg: "lnd path " + lndFolder.path + " doesn't exist") + reject("error", error.localizedDescription, error) + } + } catch let error { + print("failed setting isExcludedFromBackup: \(error)") + reject("error", error.localizedDescription, error) + } + } + + @objc(TEMP_moveLndToApplicationSupport:rejecter:) + func TEMP_moveLndToApplicationSupport(resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) { + let documents = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! + let applicationSupport = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first! + + let newLndFolder = applicationSupport.appendingPathComponent("lnd", isDirectory: true) + + let lndData = documents.appendingPathComponent("data", isDirectory: true) + let lndConfig = documents.appendingPathComponent("lnd.conf") + + let newlndDataPath = newLndFolder.appendingPathComponent("data") + let newLndConfigPath = newLndFolder.appendingPathComponent("lnd.conf") + + NSLog("FROM: \(lndData.path)") + NSLog("TO: \(newlndDataPath.path)") + + do { + if FileManager.default.fileExists(atPath: newLndFolder.path) { + try FileManager.default.moveItem(at: lndData, to: newlndDataPath) + try FileManager.default.moveItem(at: lndConfig, to: newLndConfigPath) + resolve(true) + } else { + let error = LndMobileToolsError(msg: "lnd path \(newLndFolder.path) doesn't exist") + reject("error", error.localizedDescription, error) + } + } catch let error { + NSLog("Failed moving lnd files: \(error)") + reject("error", error.localizedDescription, error) + } + } +} diff --git a/ios/LndMobile/rpc.pb.swift b/ios/LndMobile/rpc.pb.swift new file mode 100644 index 000000000..b0ee449ce --- /dev/null +++ b/ios/LndMobile/rpc.pb.swift @@ -0,0 +1,15267 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: rpc.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +/// +///`AddressType` has to be one of: +/// +///- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0) +///- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1) +enum Lnrpc_AddressType: SwiftProtobuf.Enum { + typealias RawValue = Int + case witnessPubkeyHash // = 0 + case nestedPubkeyHash // = 1 + case unusedWitnessPubkeyHash // = 2 + case unusedNestedPubkeyHash // = 3 + case UNRECOGNIZED(Int) + + init() { + self = .witnessPubkeyHash + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .witnessPubkeyHash + case 1: self = .nestedPubkeyHash + case 2: self = .unusedWitnessPubkeyHash + case 3: self = .unusedNestedPubkeyHash + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .witnessPubkeyHash: return 0 + case .nestedPubkeyHash: return 1 + case .unusedWitnessPubkeyHash: return 2 + case .unusedNestedPubkeyHash: return 3 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_AddressType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_AddressType] = [ + .witnessPubkeyHash, + .nestedPubkeyHash, + .unusedWitnessPubkeyHash, + .unusedNestedPubkeyHash, + ] +} + +#endif // swift(>=4.2) + +enum Lnrpc_CommitmentType: SwiftProtobuf.Enum { + typealias RawValue = Int + + /// + ///A channel using the legacy commitment format having tweaked to_remote + ///keys. + case legacy // = 0 + + /// + ///A channel that uses the modern commitment format where the key in the + ///output of the remote party does not change each state. This makes back + ///up and recovery easier as when the channel is closed, the funds go + ///directly to that key. + case staticRemoteKey // = 1 + + /// + ///A channel that uses a commitment format that has anchor outputs on the + ///commitments, allowing fee bumping after a force close transaction has + ///been broadcast. + case anchors // = 2 + + /// + ///Returned when the commitment type isn't known or unavailable. + case unknownCommitmentType // = 999 + case UNRECOGNIZED(Int) + + init() { + self = .legacy + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .legacy + case 1: self = .staticRemoteKey + case 2: self = .anchors + case 999: self = .unknownCommitmentType + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .legacy: return 0 + case .staticRemoteKey: return 1 + case .anchors: return 2 + case .unknownCommitmentType: return 999 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_CommitmentType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_CommitmentType] = [ + .legacy, + .staticRemoteKey, + .anchors, + .unknownCommitmentType, + ] +} + +#endif // swift(>=4.2) + +enum Lnrpc_Initiator: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case local // = 1 + case remote // = 2 + case both // = 3 + case UNRECOGNIZED(Int) + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .local + case 2: self = .remote + case 3: self = .both + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .local: return 1 + case .remote: return 2 + case .both: return 3 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_Initiator: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_Initiator] = [ + .unknown, + .local, + .remote, + .both, + ] +} + +#endif // swift(>=4.2) + +enum Lnrpc_ResolutionType: SwiftProtobuf.Enum { + typealias RawValue = Int + case typeUnknown // = 0 + + /// We resolved an anchor output. + case anchor // = 1 + + /// + ///We are resolving an incoming htlc on chain. This if this htlc is + ///claimed, we swept the incoming htlc with the preimage. If it is timed + ///out, our peer swept the timeout path. + case incomingHtlc // = 2 + + /// + ///We are resolving an outgoing htlc on chain. If this htlc is claimed, + ///the remote party swept the htlc with the preimage. If it is timed out, + ///we swept it with the timeout path. + case outgoingHtlc // = 3 + + /// We force closed and need to sweep our time locked commitment output. + case commit // = 4 + case UNRECOGNIZED(Int) + + init() { + self = .typeUnknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .typeUnknown + case 1: self = .anchor + case 2: self = .incomingHtlc + case 3: self = .outgoingHtlc + case 4: self = .commit + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .typeUnknown: return 0 + case .anchor: return 1 + case .incomingHtlc: return 2 + case .outgoingHtlc: return 3 + case .commit: return 4 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_ResolutionType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_ResolutionType] = [ + .typeUnknown, + .anchor, + .incomingHtlc, + .outgoingHtlc, + .commit, + ] +} + +#endif // swift(>=4.2) + +enum Lnrpc_ResolutionOutcome: SwiftProtobuf.Enum { + typealias RawValue = Int + + /// Outcome unknown. + case outcomeUnknown // = 0 + + /// An output was claimed on chain. + case claimed // = 1 + + /// An output was left unclaimed on chain. + case unclaimed // = 2 + + /// + ///ResolverOutcomeAbandoned indicates that an output that we did not + ///claim on chain, for example an anchor that we did not sweep and a + ///third party claimed on chain, or a htlc that we could not decode + ///so left unclaimed. + case abandoned // = 3 + + /// + ///If we force closed our channel, our htlcs need to be claimed in two + ///stages. This outcome represents the broadcast of a timeout or success + ///transaction for this two stage htlc claim. + case firstStage // = 4 + + /// A htlc was timed out on chain. + case timeout // = 5 + case UNRECOGNIZED(Int) + + init() { + self = .outcomeUnknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .outcomeUnknown + case 1: self = .claimed + case 2: self = .unclaimed + case 3: self = .abandoned + case 4: self = .firstStage + case 5: self = .timeout + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .outcomeUnknown: return 0 + case .claimed: return 1 + case .unclaimed: return 2 + case .abandoned: return 3 + case .firstStage: return 4 + case .timeout: return 5 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_ResolutionOutcome: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_ResolutionOutcome] = [ + .outcomeUnknown, + .claimed, + .unclaimed, + .abandoned, + .firstStage, + .timeout, + ] +} + +#endif // swift(>=4.2) + +enum Lnrpc_NodeMetricType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case betweennessCentrality // = 1 + case UNRECOGNIZED(Int) + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .betweennessCentrality + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .betweennessCentrality: return 1 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_NodeMetricType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_NodeMetricType] = [ + .unknown, + .betweennessCentrality, + ] +} + +#endif // swift(>=4.2) + +enum Lnrpc_InvoiceHTLCState: SwiftProtobuf.Enum { + typealias RawValue = Int + case accepted // = 0 + case settled // = 1 + case canceled // = 2 + case UNRECOGNIZED(Int) + + init() { + self = .accepted + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .accepted + case 1: self = .settled + case 2: self = .canceled + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .accepted: return 0 + case .settled: return 1 + case .canceled: return 2 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_InvoiceHTLCState: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_InvoiceHTLCState] = [ + .accepted, + .settled, + .canceled, + ] +} + +#endif // swift(>=4.2) + +enum Lnrpc_PaymentFailureReason: SwiftProtobuf.Enum { + typealias RawValue = Int + + /// + ///Payment isn't failed (yet). + case failureReasonNone // = 0 + + /// + ///There are more routes to try, but the payment timeout was exceeded. + case failureReasonTimeout // = 1 + + /// + ///All possible routes were tried and failed permanently. Or were no + ///routes to the destination at all. + case failureReasonNoRoute // = 2 + + /// + ///A non-recoverable error has occured. + case failureReasonError // = 3 + + /// + ///Payment details incorrect (unknown hash, invalid amt or + ///invalid final cltv delta) + case failureReasonIncorrectPaymentDetails // = 4 + + /// + ///Insufficient local balance. + case failureReasonInsufficientBalance // = 5 + case UNRECOGNIZED(Int) + + init() { + self = .failureReasonNone + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .failureReasonNone + case 1: self = .failureReasonTimeout + case 2: self = .failureReasonNoRoute + case 3: self = .failureReasonError + case 4: self = .failureReasonIncorrectPaymentDetails + case 5: self = .failureReasonInsufficientBalance + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .failureReasonNone: return 0 + case .failureReasonTimeout: return 1 + case .failureReasonNoRoute: return 2 + case .failureReasonError: return 3 + case .failureReasonIncorrectPaymentDetails: return 4 + case .failureReasonInsufficientBalance: return 5 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_PaymentFailureReason: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_PaymentFailureReason] = [ + .failureReasonNone, + .failureReasonTimeout, + .failureReasonNoRoute, + .failureReasonError, + .failureReasonIncorrectPaymentDetails, + .failureReasonInsufficientBalance, + ] +} + +#endif // swift(>=4.2) + +enum Lnrpc_FeatureBit: SwiftProtobuf.Enum { + typealias RawValue = Int + case datalossProtectReq // = 0 + case datalossProtectOpt // = 1 + case initialRouingSync // = 3 + case upfrontShutdownScriptReq // = 4 + case upfrontShutdownScriptOpt // = 5 + case gossipQueriesReq // = 6 + case gossipQueriesOpt // = 7 + case tlvOnionReq // = 8 + case tlvOnionOpt // = 9 + case extGossipQueriesReq // = 10 + case extGossipQueriesOpt // = 11 + case staticRemoteKeyReq // = 12 + case staticRemoteKeyOpt // = 13 + case paymentAddrReq // = 14 + case paymentAddrOpt // = 15 + case mppReq // = 16 + case mppOpt // = 17 + case UNRECOGNIZED(Int) + + init() { + self = .datalossProtectReq + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .datalossProtectReq + case 1: self = .datalossProtectOpt + case 3: self = .initialRouingSync + case 4: self = .upfrontShutdownScriptReq + case 5: self = .upfrontShutdownScriptOpt + case 6: self = .gossipQueriesReq + case 7: self = .gossipQueriesOpt + case 8: self = .tlvOnionReq + case 9: self = .tlvOnionOpt + case 10: self = .extGossipQueriesReq + case 11: self = .extGossipQueriesOpt + case 12: self = .staticRemoteKeyReq + case 13: self = .staticRemoteKeyOpt + case 14: self = .paymentAddrReq + case 15: self = .paymentAddrOpt + case 16: self = .mppReq + case 17: self = .mppOpt + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .datalossProtectReq: return 0 + case .datalossProtectOpt: return 1 + case .initialRouingSync: return 3 + case .upfrontShutdownScriptReq: return 4 + case .upfrontShutdownScriptOpt: return 5 + case .gossipQueriesReq: return 6 + case .gossipQueriesOpt: return 7 + case .tlvOnionReq: return 8 + case .tlvOnionOpt: return 9 + case .extGossipQueriesReq: return 10 + case .extGossipQueriesOpt: return 11 + case .staticRemoteKeyReq: return 12 + case .staticRemoteKeyOpt: return 13 + case .paymentAddrReq: return 14 + case .paymentAddrOpt: return 15 + case .mppReq: return 16 + case .mppOpt: return 17 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Lnrpc_FeatureBit: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_FeatureBit] = [ + .datalossProtectReq, + .datalossProtectOpt, + .initialRouingSync, + .upfrontShutdownScriptReq, + .upfrontShutdownScriptOpt, + .gossipQueriesReq, + .gossipQueriesOpt, + .tlvOnionReq, + .tlvOnionOpt, + .extGossipQueriesReq, + .extGossipQueriesOpt, + .staticRemoteKeyReq, + .staticRemoteKeyOpt, + .paymentAddrReq, + .paymentAddrOpt, + .mppReq, + .mppOpt, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_Utxo { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The type of address + var addressType: Lnrpc_AddressType = .witnessPubkeyHash + + /// The address + var address: String = String() + + /// The value of the unspent coin in satoshis + var amountSat: Int64 = 0 + + /// The pkscript in hex + var pkScript: String = String() + + /// The outpoint in format txid:n + var outpoint: Lnrpc_OutPoint { + get {return _outpoint ?? Lnrpc_OutPoint()} + set {_outpoint = newValue} + } + /// Returns true if `outpoint` has been explicitly set. + var hasOutpoint: Bool {return self._outpoint != nil} + /// Clears the value of `outpoint`. Subsequent reads from it will return its default value. + mutating func clearOutpoint() {self._outpoint = nil} + + /// The number of confirmations for the Utxo + var confirmations: Int64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _outpoint: Lnrpc_OutPoint? = nil +} + +struct Lnrpc_Transaction { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The transaction hash + var txHash: String = String() + + /// The transaction amount, denominated in satoshis + var amount: Int64 = 0 + + /// The number of confirmations + var numConfirmations: Int32 = 0 + + /// The hash of the block this transaction was included in + var blockHash: String = String() + + /// The height of the block this transaction was included in + var blockHeight: Int32 = 0 + + /// Timestamp of this transaction + var timeStamp: Int64 = 0 + + /// Fees paid for this transaction + var totalFees: Int64 = 0 + + /// Addresses that received funds for this transaction + var destAddresses: [String] = [] + + /// The raw transaction hex. + var rawTxHex: String = String() + + /// A label that was optionally set on transaction broadcast. + var label: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_GetTransactionsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The height from which to list transactions, inclusive. If this value is + ///greater than end_height, transactions will be read in reverse. + var startHeight: Int32 = 0 + + /// + ///The height until which to list transactions, inclusive. To include + ///unconfirmed transactions, this value should be set to -1, which will + ///return transactions from start_height until the current chain tip and + ///unconfirmed transactions. If no end_height is provided, the call will + ///default to this option. + var endHeight: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_TransactionDetails { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The list of transactions relevant to the wallet. + var transactions: [Lnrpc_Transaction] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_FeeLimit { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var limit: Lnrpc_FeeLimit.OneOf_Limit? = nil + + /// + ///The fee limit expressed as a fixed amount of satoshis. + /// + ///The fields fixed and fixed_msat are mutually exclusive. + var fixed: Int64 { + get { + if case .fixed(let v)? = limit {return v} + return 0 + } + set {limit = .fixed(newValue)} + } + + /// + ///The fee limit expressed as a fixed amount of millisatoshis. + /// + ///The fields fixed and fixed_msat are mutually exclusive. + var fixedMsat: Int64 { + get { + if case .fixedMsat(let v)? = limit {return v} + return 0 + } + set {limit = .fixedMsat(newValue)} + } + + /// The fee limit expressed as a percentage of the payment amount. + var percent: Int64 { + get { + if case .percent(let v)? = limit {return v} + return 0 + } + set {limit = .percent(newValue)} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_Limit: Equatable { + /// + ///The fee limit expressed as a fixed amount of satoshis. + /// + ///The fields fixed and fixed_msat are mutually exclusive. + case fixed(Int64) + /// + ///The fee limit expressed as a fixed amount of millisatoshis. + /// + ///The fields fixed and fixed_msat are mutually exclusive. + case fixedMsat(Int64) + /// The fee limit expressed as a percentage of the payment amount. + case percent(Int64) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_FeeLimit.OneOf_Limit, rhs: Lnrpc_FeeLimit.OneOf_Limit) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.fixed, .fixed): return { + guard case .fixed(let l) = lhs, case .fixed(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.fixedMsat, .fixedMsat): return { + guard case .fixedMsat(let l) = lhs, case .fixedMsat(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.percent, .percent): return { + guard case .percent(let l) = lhs, case .percent(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + init() {} +} + +struct Lnrpc_SendRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The identity pubkey of the payment recipient. When using REST, this field + ///must be encoded as base64. + var dest: Data = Data() + + /// + ///The hex-encoded identity pubkey of the payment recipient. Deprecated now + ///that the REST gateway supports base64 encoding of bytes fields. + var destString: String = String() + + /// + ///The amount to send expressed in satoshis. + /// + ///The fields amt and amt_msat are mutually exclusive. + var amt: Int64 = 0 + + /// + ///The amount to send expressed in millisatoshis. + /// + ///The fields amt and amt_msat are mutually exclusive. + var amtMsat: Int64 = 0 + + /// + ///The hash to use within the payment's HTLC. When using REST, this field + ///must be encoded as base64. + var paymentHash: Data = Data() + + /// + ///The hex-encoded hash to use within the payment's HTLC. Deprecated now + ///that the REST gateway supports base64 encoding of bytes fields. + var paymentHashString: String = String() + + /// + ///A bare-bones invoice for a payment within the Lightning Network. With the + ///details of the invoice, the sender has all the data necessary to send a + ///payment to the recipient. + var paymentRequest: String = String() + + /// + ///The CLTV delta from the current height that should be used to set the + ///timelock for the final hop. + var finalCltvDelta: Int32 = 0 + + /// + ///The maximum number of satoshis that will be paid as a fee of the payment. + ///This value can be represented either as a percentage of the amount being + ///sent, or as a fixed amount of the maximum fee the user is willing the pay to + ///send the payment. + var feeLimit: Lnrpc_FeeLimit { + get {return _feeLimit ?? Lnrpc_FeeLimit()} + set {_feeLimit = newValue} + } + /// Returns true if `feeLimit` has been explicitly set. + var hasFeeLimit: Bool {return self._feeLimit != nil} + /// Clears the value of `feeLimit`. Subsequent reads from it will return its default value. + mutating func clearFeeLimit() {self._feeLimit = nil} + + /// + ///The channel id of the channel that must be taken to the first hop. If zero, + ///any channel may be used. + var outgoingChanID: UInt64 = 0 + + /// + ///The pubkey of the last hop of the route. If empty, any hop may be used. + var lastHopPubkey: Data = Data() + + /// + ///An optional maximum total time lock for the route. This should not exceed + ///lnd's `--max-cltv-expiry` setting. If zero, then the value of + ///`--max-cltv-expiry` is enforced. + var cltvLimit: UInt32 = 0 + + /// + ///An optional field that can be used to pass an arbitrary set of TLV records + ///to a peer which understands the new records. This can be used to pass + ///application specific data during the payment attempt. Record types are + ///required to be in the custom range >= 65536. When using REST, the values + ///must be encoded as base64. + var destCustomRecords: Dictionary = [:] + + /// If set, circular payments to self are permitted. + var allowSelfPayment: Bool = false + + /// + ///Features assumed to be supported by the final node. All transitive feature + ///dependencies must also be set properly. For a given feature bit pair, either + ///optional or remote may be set, but not both. If this field is nil or empty, + ///the router will try to load destination features from the graph as a + ///fallback. + var destFeatures: [Lnrpc_FeatureBit] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _feeLimit: Lnrpc_FeeLimit? = nil +} + +struct Lnrpc_SendResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var paymentError: String = String() + + var paymentPreimage: Data = Data() + + var paymentRoute: Lnrpc_Route { + get {return _paymentRoute ?? Lnrpc_Route()} + set {_paymentRoute = newValue} + } + /// Returns true if `paymentRoute` has been explicitly set. + var hasPaymentRoute: Bool {return self._paymentRoute != nil} + /// Clears the value of `paymentRoute`. Subsequent reads from it will return its default value. + mutating func clearPaymentRoute() {self._paymentRoute = nil} + + var paymentHash: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _paymentRoute: Lnrpc_Route? = nil +} + +struct Lnrpc_SendToRouteRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The payment hash to use for the HTLC. When using REST, this field must be + ///encoded as base64. + var paymentHash: Data = Data() + + /// + ///An optional hex-encoded payment hash to be used for the HTLC. Deprecated now + ///that the REST gateway supports base64 encoding of bytes fields. + var paymentHashString: String = String() + + /// Route that should be used to attempt to complete the payment. + var route: Lnrpc_Route { + get {return _route ?? Lnrpc_Route()} + set {_route = newValue} + } + /// Returns true if `route` has been explicitly set. + var hasRoute: Bool {return self._route != nil} + /// Clears the value of `route`. Subsequent reads from it will return its default value. + mutating func clearRoute() {self._route = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _route: Lnrpc_Route? = nil +} + +struct Lnrpc_ChannelAcceptRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The pubkey of the node that wishes to open an inbound channel. + var nodePubkey: Data = Data() + + /// The hash of the genesis block that the proposed channel resides in. + var chainHash: Data = Data() + + /// The pending channel id. + var pendingChanID: Data = Data() + + /// The funding amount in satoshis that initiator wishes to use in the + /// channel. + var fundingAmt: UInt64 = 0 + + /// The push amount of the proposed channel in millisatoshis. + var pushAmt: UInt64 = 0 + + /// The dust limit of the initiator's commitment tx. + var dustLimit: UInt64 = 0 + + /// The maximum amount of coins in millisatoshis that can be pending in this + /// channel. + var maxValueInFlight: UInt64 = 0 + + /// The minimum amount of satoshis the initiator requires us to have at all + /// times. + var channelReserve: UInt64 = 0 + + /// The smallest HTLC in millisatoshis that the initiator will accept. + var minHtlc: UInt64 = 0 + + /// The initial fee rate that the initiator suggests for both commitment + /// transactions. + var feePerKw: UInt64 = 0 + + /// + ///The number of blocks to use for the relative time lock in the pay-to-self + ///output of both commitment transactions. + var csvDelay: UInt32 = 0 + + /// The total number of incoming HTLC's that the initiator will accept. + var maxAcceptedHtlcs: UInt32 = 0 + + /// A bit-field which the initiator uses to specify proposed channel + /// behavior. + var channelFlags: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelAcceptResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Whether or not the client accepts the channel. + var accept: Bool = false + + /// The pending channel id to which this response applies. + var pendingChanID: Data = Data() + + /// + ///An optional error to send the initiating party to indicate why the channel + ///was rejected. This field *should not* contain sensitive information, it will + ///be sent to the initiating party. This field should only be set if accept is + ///false, the channel will be rejected if an error is set with accept=true + ///because the meaning of this response is ambiguous. Limited to 500 + ///characters. + var error: String = String() + + /// + ///The upfront shutdown address to use if the initiating peer supports option + ///upfront shutdown script (see ListPeers for the features supported). Note + ///that the channel open will fail if this value is set for a peer that does + ///not support this feature bit. + var upfrontShutdown: String = String() + + /// + ///The csv delay (in blocks) that we require for the remote party. + var csvDelay: UInt32 = 0 + + /// + ///The reserve amount in satoshis that we require the remote peer to adhere to. + ///We require that the remote peer always have some reserve amount allocated to + ///them so that there is always a disincentive to broadcast old state (if they + ///hold 0 sats on their side of the channel, there is nothing to lose). + var reserveSat: UInt64 = 0 + + /// + ///The maximum amount of funds in millisatoshis that we allow the remote peer + ///to have in outstanding htlcs. + var inFlightMaxMsat: UInt64 = 0 + + /// + ///The maximum number of htlcs that the remote peer can offer us. + var maxHtlcCount: UInt32 = 0 + + /// + ///The minimum value in millisatoshis for incoming htlcs on the channel. + var minHtlcIn: UInt64 = 0 + + /// + ///The number of confirmations we require before we consider the channel open. + var minAcceptDepth: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelPoint { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var fundingTxid: Lnrpc_ChannelPoint.OneOf_FundingTxid? = nil + + /// + ///Txid of the funding transaction. When using REST, this field must be + ///encoded as base64. + var fundingTxidBytes: Data { + get { + if case .fundingTxidBytes(let v)? = fundingTxid {return v} + return Data() + } + set {fundingTxid = .fundingTxidBytes(newValue)} + } + + /// + ///Hex-encoded string representing the byte-reversed hash of the funding + ///transaction. + var fundingTxidStr: String { + get { + if case .fundingTxidStr(let v)? = fundingTxid {return v} + return String() + } + set {fundingTxid = .fundingTxidStr(newValue)} + } + + /// The index of the output of the funding transaction + var outputIndex: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_FundingTxid: Equatable { + /// + ///Txid of the funding transaction. When using REST, this field must be + ///encoded as base64. + case fundingTxidBytes(Data) + /// + ///Hex-encoded string representing the byte-reversed hash of the funding + ///transaction. + case fundingTxidStr(String) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_ChannelPoint.OneOf_FundingTxid, rhs: Lnrpc_ChannelPoint.OneOf_FundingTxid) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.fundingTxidBytes, .fundingTxidBytes): return { + guard case .fundingTxidBytes(let l) = lhs, case .fundingTxidBytes(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.fundingTxidStr, .fundingTxidStr): return { + guard case .fundingTxidStr(let l) = lhs, case .fundingTxidStr(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + init() {} +} + +struct Lnrpc_OutPoint { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Raw bytes representing the transaction id. + var txidBytes: Data = Data() + + /// Reversed, hex-encoded string representing the transaction id. + var txidStr: String = String() + + /// The index of the output on the transaction. + var outputIndex: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_LightningAddress { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The identity pubkey of the Lightning node + var pubkey: String = String() + + /// The network location of the lightning node, e.g. `69.69.69.69:1337` or + /// `localhost:10011` + var host: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_EstimateFeeRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The map from addresses to amounts for the transaction. + var addrToAmount: Dictionary = [:] + + /// The target number of blocks that this transaction should be confirmed + /// by. + var targetConf: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_EstimateFeeResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The total fee in satoshis. + var feeSat: Int64 = 0 + + /// The fee rate in satoshi/byte. + var feerateSatPerByte: Int64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_SendManyRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The map from addresses to amounts + var addrToAmount: Dictionary = [:] + + /// The target number of blocks that this transaction should be confirmed + /// by. + var targetConf: Int32 = 0 + + /// A manual fee rate set in sat/byte that should be used when crafting the + /// transaction. + var satPerByte: Int64 = 0 + + /// An optional label for the transaction, limited to 500 characters. + var label: String = String() + + /// The minimum number of confirmations each one of your outputs used for + /// the transaction must satisfy. + var minConfs: Int32 = 0 + + /// Whether unconfirmed outputs should be used as inputs for the transaction. + var spendUnconfirmed: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_SendManyResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The id of the transaction + var txid: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_SendCoinsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The address to send coins to + var addr: String = String() + + /// The amount in satoshis to send + var amount: Int64 = 0 + + /// The target number of blocks that this transaction should be confirmed + /// by. + var targetConf: Int32 = 0 + + /// A manual fee rate set in sat/byte that should be used when crafting the + /// transaction. + var satPerByte: Int64 = 0 + + /// + ///If set, then the amount field will be ignored, and lnd will attempt to + ///send all the coins under control of the internal wallet to the specified + ///address. + var sendAll: Bool = false + + /// An optional label for the transaction, limited to 500 characters. + var label: String = String() + + /// The minimum number of confirmations each one of your outputs used for + /// the transaction must satisfy. + var minConfs: Int32 = 0 + + /// Whether unconfirmed outputs should be used as inputs for the transaction. + var spendUnconfirmed: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_SendCoinsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The transaction ID of the transaction + var txid: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListUnspentRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The minimum number of confirmations to be included. + var minConfs: Int32 = 0 + + /// The maximum number of confirmations to be included. + var maxConfs: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListUnspentResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// A list of utxos + var utxos: [Lnrpc_Utxo] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NewAddressRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The address type + var type: Lnrpc_AddressType = .witnessPubkeyHash + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NewAddressResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The newly generated wallet address + var address: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_SignMessageRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The message to be signed. When using REST, this field must be encoded as + ///base64. + var msg: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_SignMessageResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The signature for the given message + var signature: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_VerifyMessageRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The message over which the signature is to be verified. When using REST, + ///this field must be encoded as base64. + var msg: Data = Data() + + /// The signature to be verified over the given message + var signature: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_VerifyMessageResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Whether the signature was valid over the given message + var valid: Bool = false + + /// The pubkey recovered from the signature + var pubkey: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ConnectPeerRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Lightning address of the peer, in the format `@host` + var addr: Lnrpc_LightningAddress { + get {return _addr ?? Lnrpc_LightningAddress()} + set {_addr = newValue} + } + /// Returns true if `addr` has been explicitly set. + var hasAddr: Bool {return self._addr != nil} + /// Clears the value of `addr`. Subsequent reads from it will return its default value. + mutating func clearAddr() {self._addr = nil} + + /// If set, the daemon will attempt to persistently connect to the target + /// peer. Otherwise, the call will be synchronous. + var perm: Bool = false + + /// + ///The connection timeout value (in seconds) for this request. It won't affect + ///other requests. + var timeout: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _addr: Lnrpc_LightningAddress? = nil +} + +struct Lnrpc_ConnectPeerResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_DisconnectPeerRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The pubkey of the node to disconnect from + var pubKey: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_DisconnectPeerResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_HTLC { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var incoming: Bool = false + + var amount: Int64 = 0 + + var hashLock: Data = Data() + + var expirationHeight: UInt32 = 0 + + /// Index identifying the htlc on the channel. + var htlcIndex: UInt64 = 0 + + /// If this HTLC is involved in a forwarding operation, this field indicates + /// the forwarding channel. For an outgoing htlc, it is the incoming channel. + /// For an incoming htlc, it is the outgoing channel. When the htlc + /// originates from this node or this node is the final destination, + /// forwarding_channel will be zero. The forwarding channel will also be zero + /// for htlcs that need to be forwarded but don't have a forwarding decision + /// persisted yet. + var forwardingChannel: UInt64 = 0 + + /// Index identifying the htlc on the forwarding channel. + var forwardingHtlcIndex: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelConstraints { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The CSV delay expressed in relative blocks. If the channel is force closed, + ///we will need to wait for this many blocks before we can regain our funds. + var csvDelay: UInt32 = 0 + + /// The minimum satoshis this node is required to reserve in its balance. + var chanReserveSat: UInt64 = 0 + + /// The dust limit (in satoshis) of the initiator's commitment tx. + var dustLimitSat: UInt64 = 0 + + /// The maximum amount of coins in millisatoshis that can be pending in this + /// channel. + var maxPendingAmtMsat: UInt64 = 0 + + /// The smallest HTLC in millisatoshis that the initiator will accept. + var minHtlcMsat: UInt64 = 0 + + /// The total number of incoming HTLC's that the initiator will accept. + var maxAcceptedHtlcs: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Channel { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Whether this channel is active or not + var active: Bool { + get {return _storage._active} + set {_uniqueStorage()._active = newValue} + } + + /// The identity pubkey of the remote node + var remotePubkey: String { + get {return _storage._remotePubkey} + set {_uniqueStorage()._remotePubkey = newValue} + } + + /// + ///The outpoint (txid:index) of the funding transaction. With this value, Bob + ///will be able to generate a signature for Alice's version of the commitment + ///transaction. + var channelPoint: String { + get {return _storage._channelPoint} + set {_uniqueStorage()._channelPoint = newValue} + } + + /// + ///The unique channel ID for the channel. The first 3 bytes are the block + ///height, the next 3 the index within the block, and the last 2 bytes are the + ///output index for the channel. + var chanID: UInt64 { + get {return _storage._chanID} + set {_uniqueStorage()._chanID = newValue} + } + + /// The total amount of funds held in this channel + var capacity: Int64 { + get {return _storage._capacity} + set {_uniqueStorage()._capacity = newValue} + } + + /// This node's current balance in this channel + var localBalance: Int64 { + get {return _storage._localBalance} + set {_uniqueStorage()._localBalance = newValue} + } + + /// The counterparty's current balance in this channel + var remoteBalance: Int64 { + get {return _storage._remoteBalance} + set {_uniqueStorage()._remoteBalance = newValue} + } + + /// + ///The amount calculated to be paid in fees for the current set of commitment + ///transactions. The fee amount is persisted with the channel in order to + ///allow the fee amount to be removed and recalculated with each channel state + ///update, including updates that happen after a system restart. + var commitFee: Int64 { + get {return _storage._commitFee} + set {_uniqueStorage()._commitFee = newValue} + } + + /// The weight of the commitment transaction + var commitWeight: Int64 { + get {return _storage._commitWeight} + set {_uniqueStorage()._commitWeight = newValue} + } + + /// + ///The required number of satoshis per kilo-weight that the requester will pay + ///at all times, for both the funding transaction and commitment transaction. + ///This value can later be updated once the channel is open. + var feePerKw: Int64 { + get {return _storage._feePerKw} + set {_uniqueStorage()._feePerKw = newValue} + } + + /// The unsettled balance in this channel + var unsettledBalance: Int64 { + get {return _storage._unsettledBalance} + set {_uniqueStorage()._unsettledBalance = newValue} + } + + /// + ///The total number of satoshis we've sent within this channel. + var totalSatoshisSent: Int64 { + get {return _storage._totalSatoshisSent} + set {_uniqueStorage()._totalSatoshisSent = newValue} + } + + /// + ///The total number of satoshis we've received within this channel. + var totalSatoshisReceived: Int64 { + get {return _storage._totalSatoshisReceived} + set {_uniqueStorage()._totalSatoshisReceived = newValue} + } + + /// + ///The total number of updates conducted within this channel. + var numUpdates: UInt64 { + get {return _storage._numUpdates} + set {_uniqueStorage()._numUpdates = newValue} + } + + /// + ///The list of active, uncleared HTLCs currently pending within the channel. + var pendingHtlcs: [Lnrpc_HTLC] { + get {return _storage._pendingHtlcs} + set {_uniqueStorage()._pendingHtlcs = newValue} + } + + /// + ///Deprecated. The CSV delay expressed in relative blocks. If the channel is + ///force closed, we will need to wait for this many blocks before we can regain + ///our funds. + var csvDelay: UInt32 { + get {return _storage._csvDelay} + set {_uniqueStorage()._csvDelay = newValue} + } + + /// Whether this channel is advertised to the network or not. + var `private`: Bool { + get {return _storage._private} + set {_uniqueStorage()._private = newValue} + } + + /// True if we were the ones that created the channel. + var initiator: Bool { + get {return _storage._initiator} + set {_uniqueStorage()._initiator = newValue} + } + + /// A set of flags showing the current state of the channel. + var chanStatusFlags: String { + get {return _storage._chanStatusFlags} + set {_uniqueStorage()._chanStatusFlags = newValue} + } + + /// Deprecated. The minimum satoshis this node is required to reserve in its + /// balance. + var localChanReserveSat: Int64 { + get {return _storage._localChanReserveSat} + set {_uniqueStorage()._localChanReserveSat = newValue} + } + + /// + ///Deprecated. The minimum satoshis the other node is required to reserve in + ///its balance. + var remoteChanReserveSat: Int64 { + get {return _storage._remoteChanReserveSat} + set {_uniqueStorage()._remoteChanReserveSat = newValue} + } + + /// Deprecated. Use commitment_type. + var staticRemoteKey: Bool { + get {return _storage._staticRemoteKey} + set {_uniqueStorage()._staticRemoteKey = newValue} + } + + /// The commitment type used by this channel. + var commitmentType: Lnrpc_CommitmentType { + get {return _storage._commitmentType} + set {_uniqueStorage()._commitmentType = newValue} + } + + /// + ///The number of seconds that the channel has been monitored by the channel + ///scoring system. Scores are currently not persisted, so this value may be + ///less than the lifetime of the channel [EXPERIMENTAL]. + var lifetime: Int64 { + get {return _storage._lifetime} + set {_uniqueStorage()._lifetime = newValue} + } + + /// + ///The number of seconds that the remote peer has been observed as being online + ///by the channel scoring system over the lifetime of the channel + ///[EXPERIMENTAL]. + var uptime: Int64 { + get {return _storage._uptime} + set {_uniqueStorage()._uptime = newValue} + } + + /// + ///Close address is the address that we will enforce payout to on cooperative + ///close if the channel was opened utilizing option upfront shutdown. This + ///value can be set on channel open by setting close_address in an open channel + ///request. If this value is not set, you can still choose a payout address by + ///cooperatively closing with the delivery_address field set. + var closeAddress: String { + get {return _storage._closeAddress} + set {_uniqueStorage()._closeAddress = newValue} + } + + /// + ///The amount that the initiator of the channel optionally pushed to the remote + ///party on channel open. This amount will be zero if the channel initiator did + ///not push any funds to the remote peer. If the initiator field is true, we + ///pushed this amount to our peer, if it is false, the remote peer pushed this + ///amount to us. + var pushAmountSat: UInt64 { + get {return _storage._pushAmountSat} + set {_uniqueStorage()._pushAmountSat = newValue} + } + + /// + ///This uint32 indicates if this channel is to be considered 'frozen'. A + ///frozen channel doest not allow a cooperative channel close by the + ///initiator. The thaw_height is the height that this restriction stops + ///applying to the channel. This field is optional, not setting it or using a + ///value of zero will mean the channel has no additional restrictions. The + ///height can be interpreted in two ways: as a relative height if the value is + ///less than 500,000, or as an absolute height otherwise. + var thawHeight: UInt32 { + get {return _storage._thawHeight} + set {_uniqueStorage()._thawHeight = newValue} + } + + /// List constraints for the local node. + var localConstraints: Lnrpc_ChannelConstraints { + get {return _storage._localConstraints ?? Lnrpc_ChannelConstraints()} + set {_uniqueStorage()._localConstraints = newValue} + } + /// Returns true if `localConstraints` has been explicitly set. + var hasLocalConstraints: Bool {return _storage._localConstraints != nil} + /// Clears the value of `localConstraints`. Subsequent reads from it will return its default value. + mutating func clearLocalConstraints() {_uniqueStorage()._localConstraints = nil} + + /// List constraints for the remote node. + var remoteConstraints: Lnrpc_ChannelConstraints { + get {return _storage._remoteConstraints ?? Lnrpc_ChannelConstraints()} + set {_uniqueStorage()._remoteConstraints = newValue} + } + /// Returns true if `remoteConstraints` has been explicitly set. + var hasRemoteConstraints: Bool {return _storage._remoteConstraints != nil} + /// Clears the value of `remoteConstraints`. Subsequent reads from it will return its default value. + mutating func clearRemoteConstraints() {_uniqueStorage()._remoteConstraints = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _storage = _StorageClass.defaultInstance +} + +struct Lnrpc_ListChannelsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var activeOnly: Bool = false + + var inactiveOnly: Bool = false + + var publicOnly: Bool = false + + var privateOnly: Bool = false + + /// + ///Filters the response for channels with a target peer's pubkey. If peer is + ///empty, all channels will be returned. + var peer: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListChannelsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The list of active channels + var channels: [Lnrpc_Channel] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelCloseSummary { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The outpoint (txid:index) of the funding transaction. + var channelPoint: String = String() + + /// The unique channel ID for the channel. + var chanID: UInt64 = 0 + + /// The hash of the genesis block that this channel resides within. + var chainHash: String = String() + + /// The txid of the transaction which ultimately closed this channel. + var closingTxHash: String = String() + + /// Public key of the remote peer that we formerly had a channel with. + var remotePubkey: String = String() + + /// Total capacity of the channel. + var capacity: Int64 = 0 + + /// Height at which the funding transaction was spent. + var closeHeight: UInt32 = 0 + + /// Settled balance at the time of channel closure + var settledBalance: Int64 = 0 + + /// The sum of all the time-locked outputs at the time of channel closure + var timeLockedBalance: Int64 = 0 + + /// Details on how the channel was closed. + var closeType: Lnrpc_ChannelCloseSummary.ClosureType = .cooperativeClose + + /// + ///Open initiator is the party that initiated opening the channel. Note that + ///this value may be unknown if the channel was closed before we migrated to + ///store open channel information after close. + var openInitiator: Lnrpc_Initiator = .unknown + + /// + ///Close initiator indicates which party initiated the close. This value will + ///be unknown for channels that were cooperatively closed before we started + ///tracking cooperative close initiators. Note that this indicates which party + ///initiated a close, and it is possible for both to initiate cooperative or + ///force closes, although only one party's close will be confirmed on chain. + var closeInitiator: Lnrpc_Initiator = .unknown + + var resolutions: [Lnrpc_Resolution] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum ClosureType: SwiftProtobuf.Enum { + typealias RawValue = Int + case cooperativeClose // = 0 + case localForceClose // = 1 + case remoteForceClose // = 2 + case breachClose // = 3 + case fundingCanceled // = 4 + case abandoned // = 5 + case UNRECOGNIZED(Int) + + init() { + self = .cooperativeClose + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .cooperativeClose + case 1: self = .localForceClose + case 2: self = .remoteForceClose + case 3: self = .breachClose + case 4: self = .fundingCanceled + case 5: self = .abandoned + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .cooperativeClose: return 0 + case .localForceClose: return 1 + case .remoteForceClose: return 2 + case .breachClose: return 3 + case .fundingCanceled: return 4 + case .abandoned: return 5 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} +} + +#if swift(>=4.2) + +extension Lnrpc_ChannelCloseSummary.ClosureType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_ChannelCloseSummary.ClosureType] = [ + .cooperativeClose, + .localForceClose, + .remoteForceClose, + .breachClose, + .fundingCanceled, + .abandoned, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_Resolution { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The type of output we are resolving. + var resolutionType: Lnrpc_ResolutionType = .typeUnknown + + /// The outcome of our on chain action that resolved the outpoint. + var outcome: Lnrpc_ResolutionOutcome = .outcomeUnknown + + /// The outpoint that was spent by the resolution. + var outpoint: Lnrpc_OutPoint { + get {return _outpoint ?? Lnrpc_OutPoint()} + set {_outpoint = newValue} + } + /// Returns true if `outpoint` has been explicitly set. + var hasOutpoint: Bool {return self._outpoint != nil} + /// Clears the value of `outpoint`. Subsequent reads from it will return its default value. + mutating func clearOutpoint() {self._outpoint = nil} + + /// The amount that was claimed by the resolution. + var amountSat: UInt64 = 0 + + /// The hex-encoded transaction ID of the sweep transaction that spent the + /// output. + var sweepTxid: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _outpoint: Lnrpc_OutPoint? = nil +} + +struct Lnrpc_ClosedChannelsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var cooperative: Bool = false + + var localForce: Bool = false + + var remoteForce: Bool = false + + var breach: Bool = false + + var fundingCanceled: Bool = false + + var abandoned: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ClosedChannelsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var channels: [Lnrpc_ChannelCloseSummary] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Peer { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The identity pubkey of the peer + var pubKey: String = String() + + /// Network address of the peer; eg `127.0.0.1:10011` + var address: String = String() + + /// Bytes of data transmitted to this peer + var bytesSent: UInt64 = 0 + + /// Bytes of data transmitted from this peer + var bytesRecv: UInt64 = 0 + + /// Satoshis sent to this peer + var satSent: Int64 = 0 + + /// Satoshis received from this peer + var satRecv: Int64 = 0 + + /// A channel is inbound if the counterparty initiated the channel + var inbound: Bool = false + + /// Ping time to this peer + var pingTime: Int64 = 0 + + /// The type of sync we are currently performing with this peer. + var syncType: Lnrpc_Peer.SyncType = .unknownSync + + /// Features advertised by the remote peer in their init message. + var features: Dictionary = [:] + + /// + ///The latest errors received from our peer with timestamps, limited to the 10 + ///most recent errors. These errors are tracked across peer connections, but + ///are not persisted across lnd restarts. Note that these errors are only + ///stored for peers that we have channels open with, to prevent peers from + ///spamming us with errors at no cost. + var errors: [Lnrpc_TimestampedError] = [] + + /// + ///The number of times we have recorded this peer going offline or coming + ///online, recorded across restarts. Note that this value is decreased over + ///time if the peer has not recently flapped, so that we can forgive peers + ///with historically high flap counts. + var flapCount: Int32 = 0 + + /// + ///The timestamp of the last flap we observed for this peer. If this value is + ///zero, we have not observed any flaps for this peer. + var lastFlapNs: Int64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum SyncType: SwiftProtobuf.Enum { + typealias RawValue = Int + + /// + ///Denotes that we cannot determine the peer's current sync type. + case unknownSync // = 0 + + /// + ///Denotes that we are actively receiving new graph updates from the peer. + case activeSync // = 1 + + /// + ///Denotes that we are not receiving new graph updates from the peer. + case passiveSync // = 2 + case UNRECOGNIZED(Int) + + init() { + self = .unknownSync + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownSync + case 1: self = .activeSync + case 2: self = .passiveSync + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .unknownSync: return 0 + case .activeSync: return 1 + case .passiveSync: return 2 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} +} + +#if swift(>=4.2) + +extension Lnrpc_Peer.SyncType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_Peer.SyncType] = [ + .unknownSync, + .activeSync, + .passiveSync, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_TimestampedError { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The unix timestamp in seconds when the error occurred. + var timestamp: UInt64 = 0 + + /// The string representation of the error sent by our peer. + var error: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListPeersRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///If true, only the last error that our peer sent us will be returned with + ///the peer's information, rather than the full set of historic errors we have + ///stored. + var latestError: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListPeersResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The list of currently connected peers + var peers: [Lnrpc_Peer] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PeerEventSubscription { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PeerEvent { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The identity pubkey of the peer. + var pubKey: String = String() + + var type: Lnrpc_PeerEvent.EventType = .peerOnline + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum EventType: SwiftProtobuf.Enum { + typealias RawValue = Int + case peerOnline // = 0 + case peerOffline // = 1 + case UNRECOGNIZED(Int) + + init() { + self = .peerOnline + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .peerOnline + case 1: self = .peerOffline + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .peerOnline: return 0 + case .peerOffline: return 1 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} +} + +#if swift(>=4.2) + +extension Lnrpc_PeerEvent.EventType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_PeerEvent.EventType] = [ + .peerOnline, + .peerOffline, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_GetInfoRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_GetInfoResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The version of the LND software that the node is running. + var version: String { + get {return _storage._version} + set {_uniqueStorage()._version = newValue} + } + + /// The SHA1 commit hash that the daemon is compiled with. + var commitHash: String { + get {return _storage._commitHash} + set {_uniqueStorage()._commitHash = newValue} + } + + /// The identity pubkey of the current node. + var identityPubkey: String { + get {return _storage._identityPubkey} + set {_uniqueStorage()._identityPubkey = newValue} + } + + /// If applicable, the alias of the current node, e.g. "bob" + var alias: String { + get {return _storage._alias} + set {_uniqueStorage()._alias = newValue} + } + + /// The color of the current node in hex code format + var color: String { + get {return _storage._color} + set {_uniqueStorage()._color = newValue} + } + + /// Number of pending channels + var numPendingChannels: UInt32 { + get {return _storage._numPendingChannels} + set {_uniqueStorage()._numPendingChannels = newValue} + } + + /// Number of active channels + var numActiveChannels: UInt32 { + get {return _storage._numActiveChannels} + set {_uniqueStorage()._numActiveChannels = newValue} + } + + /// Number of inactive channels + var numInactiveChannels: UInt32 { + get {return _storage._numInactiveChannels} + set {_uniqueStorage()._numInactiveChannels = newValue} + } + + /// Number of peers + var numPeers: UInt32 { + get {return _storage._numPeers} + set {_uniqueStorage()._numPeers = newValue} + } + + /// The node's current view of the height of the best block + var blockHeight: UInt32 { + get {return _storage._blockHeight} + set {_uniqueStorage()._blockHeight = newValue} + } + + /// The node's current view of the hash of the best block + var blockHash: String { + get {return _storage._blockHash} + set {_uniqueStorage()._blockHash = newValue} + } + + /// Timestamp of the block best known to the wallet + var bestHeaderTimestamp: Int64 { + get {return _storage._bestHeaderTimestamp} + set {_uniqueStorage()._bestHeaderTimestamp = newValue} + } + + /// Whether the wallet's view is synced to the main chain + var syncedToChain: Bool { + get {return _storage._syncedToChain} + set {_uniqueStorage()._syncedToChain = newValue} + } + + /// Whether we consider ourselves synced with the public channel graph. + var syncedToGraph: Bool { + get {return _storage._syncedToGraph} + set {_uniqueStorage()._syncedToGraph = newValue} + } + + /// + ///Whether the current node is connected to testnet. This field is + ///deprecated and the network field should be used instead + var testnet: Bool { + get {return _storage._testnet} + set {_uniqueStorage()._testnet = newValue} + } + + /// A list of active chains the node is connected to + var chains: [Lnrpc_Chain] { + get {return _storage._chains} + set {_uniqueStorage()._chains = newValue} + } + + /// The URIs of the current node. + var uris: [String] { + get {return _storage._uris} + set {_uniqueStorage()._uris = newValue} + } + + /// + ///Features that our node has advertised in our init message, node + ///announcements and invoices. + var features: Dictionary { + get {return _storage._features} + set {_uniqueStorage()._features = newValue} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _storage = _StorageClass.defaultInstance +} + +struct Lnrpc_GetRecoveryInfoRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_GetRecoveryInfoResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Whether the wallet is in recovery mode + var recoveryMode: Bool = false + + /// Whether the wallet recovery progress is finished + var recoveryFinished: Bool = false + + /// The recovery progress, ranging from 0 to 1. + var progress: Double = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Chain { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The blockchain the node is on (eg bitcoin, litecoin) + var chain: String = String() + + /// The network the node is on (eg regtest, testnet, mainnet) + var network: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ConfirmationUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var blockSha: Data = Data() + + var blockHeight: Int32 = 0 + + var numConfsLeft: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelOpenUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var channelPoint: Lnrpc_ChannelPoint { + get {return _channelPoint ?? Lnrpc_ChannelPoint()} + set {_channelPoint = newValue} + } + /// Returns true if `channelPoint` has been explicitly set. + var hasChannelPoint: Bool {return self._channelPoint != nil} + /// Clears the value of `channelPoint`. Subsequent reads from it will return its default value. + mutating func clearChannelPoint() {self._channelPoint = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _channelPoint: Lnrpc_ChannelPoint? = nil +} + +struct Lnrpc_ChannelCloseUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var closingTxid: Data = Data() + + var success: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_CloseChannelRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The outpoint (txid:index) of the funding transaction. With this value, Bob + ///will be able to generate a signature for Alice's version of the commitment + ///transaction. + var channelPoint: Lnrpc_ChannelPoint { + get {return _channelPoint ?? Lnrpc_ChannelPoint()} + set {_channelPoint = newValue} + } + /// Returns true if `channelPoint` has been explicitly set. + var hasChannelPoint: Bool {return self._channelPoint != nil} + /// Clears the value of `channelPoint`. Subsequent reads from it will return its default value. + mutating func clearChannelPoint() {self._channelPoint = nil} + + /// If true, then the channel will be closed forcibly. This means the + /// current commitment transaction will be signed and broadcast. + var force: Bool = false + + /// The target number of blocks that the closure transaction should be + /// confirmed by. + var targetConf: Int32 = 0 + + /// A manual fee rate set in sat/byte that should be used when crafting the + /// closure transaction. + var satPerByte: Int64 = 0 + + /// + ///An optional address to send funds to in the case of a cooperative close. + ///If the channel was opened with an upfront shutdown script and this field + ///is set, the request to close will fail because the channel must pay out + ///to the upfront shutdown addresss. + var deliveryAddress: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _channelPoint: Lnrpc_ChannelPoint? = nil +} + +struct Lnrpc_CloseStatusUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var update: Lnrpc_CloseStatusUpdate.OneOf_Update? = nil + + var closePending: Lnrpc_PendingUpdate { + get { + if case .closePending(let v)? = update {return v} + return Lnrpc_PendingUpdate() + } + set {update = .closePending(newValue)} + } + + var chanClose: Lnrpc_ChannelCloseUpdate { + get { + if case .chanClose(let v)? = update {return v} + return Lnrpc_ChannelCloseUpdate() + } + set {update = .chanClose(newValue)} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_Update: Equatable { + case closePending(Lnrpc_PendingUpdate) + case chanClose(Lnrpc_ChannelCloseUpdate) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_CloseStatusUpdate.OneOf_Update, rhs: Lnrpc_CloseStatusUpdate.OneOf_Update) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.closePending, .closePending): return { + guard case .closePending(let l) = lhs, case .closePending(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.chanClose, .chanClose): return { + guard case .chanClose(let l) = lhs, case .chanClose(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + init() {} +} + +struct Lnrpc_PendingUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var txid: Data = Data() + + var outputIndex: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ReadyForPsbtFunding { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The P2WSH address of the channel funding multisig address that the below + ///specified amount in satoshis needs to be sent to. + var fundingAddress: String = String() + + /// + ///The exact amount in satoshis that needs to be sent to the above address to + ///fund the pending channel. + var fundingAmount: Int64 = 0 + + /// + ///A raw PSBT that contains the pending channel output. If a base PSBT was + ///provided in the PsbtShim, this is the base PSBT with one additional output. + ///If no base PSBT was specified, this is an otherwise empty PSBT with exactly + ///one output. + var psbt: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_OpenChannelRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The pubkey of the node to open a channel with. When using REST, this field + ///must be encoded as base64. + var nodePubkey: Data { + get {return _storage._nodePubkey} + set {_uniqueStorage()._nodePubkey = newValue} + } + + /// + ///The hex encoded pubkey of the node to open a channel with. Deprecated now + ///that the REST gateway supports base64 encoding of bytes fields. + var nodePubkeyString: String { + get {return _storage._nodePubkeyString} + set {_uniqueStorage()._nodePubkeyString = newValue} + } + + /// The number of satoshis the wallet should commit to the channel + var localFundingAmount: Int64 { + get {return _storage._localFundingAmount} + set {_uniqueStorage()._localFundingAmount = newValue} + } + + /// The number of satoshis to push to the remote side as part of the initial + /// commitment state + var pushSat: Int64 { + get {return _storage._pushSat} + set {_uniqueStorage()._pushSat = newValue} + } + + /// The target number of blocks that the funding transaction should be + /// confirmed by. + var targetConf: Int32 { + get {return _storage._targetConf} + set {_uniqueStorage()._targetConf = newValue} + } + + /// A manual fee rate set in sat/byte that should be used when crafting the + /// funding transaction. + var satPerByte: Int64 { + get {return _storage._satPerByte} + set {_uniqueStorage()._satPerByte = newValue} + } + + /// Whether this channel should be private, not announced to the greater + /// network. + var `private`: Bool { + get {return _storage._private} + set {_uniqueStorage()._private = newValue} + } + + /// The minimum value in millisatoshi we will require for incoming HTLCs on + /// the channel. + var minHtlcMsat: Int64 { + get {return _storage._minHtlcMsat} + set {_uniqueStorage()._minHtlcMsat = newValue} + } + + /// The delay we require on the remote's commitment transaction. If this is + /// not set, it will be scaled automatically with the channel size. + var remoteCsvDelay: UInt32 { + get {return _storage._remoteCsvDelay} + set {_uniqueStorage()._remoteCsvDelay = newValue} + } + + /// The minimum number of confirmations each one of your outputs used for + /// the funding transaction must satisfy. + var minConfs: Int32 { + get {return _storage._minConfs} + set {_uniqueStorage()._minConfs = newValue} + } + + /// Whether unconfirmed outputs should be used as inputs for the funding + /// transaction. + var spendUnconfirmed: Bool { + get {return _storage._spendUnconfirmed} + set {_uniqueStorage()._spendUnconfirmed = newValue} + } + + /// + ///Close address is an optional address which specifies the address to which + ///funds should be paid out to upon cooperative close. This field may only be + ///set if the peer supports the option upfront feature bit (call listpeers + ///to check). The remote peer will only accept cooperative closes to this + ///address if it is set. + /// + ///Note: If this value is set on channel creation, you will *not* be able to + ///cooperatively close out to a different address. + var closeAddress: String { + get {return _storage._closeAddress} + set {_uniqueStorage()._closeAddress = newValue} + } + + /// + ///Funding shims are an optional argument that allow the caller to intercept + ///certain funding functionality. For example, a shim can be provided to use a + ///particular key for the commitment key (ideally cold) rather than use one + ///that is generated by the wallet as normal, or signal that signing will be + ///carried out in an interactive manner (PSBT based). + var fundingShim: Lnrpc_FundingShim { + get {return _storage._fundingShim ?? Lnrpc_FundingShim()} + set {_uniqueStorage()._fundingShim = newValue} + } + /// Returns true if `fundingShim` has been explicitly set. + var hasFundingShim: Bool {return _storage._fundingShim != nil} + /// Clears the value of `fundingShim`. Subsequent reads from it will return its default value. + mutating func clearFundingShim() {_uniqueStorage()._fundingShim = nil} + + /// + ///The maximum amount of coins in millisatoshi that can be pending within + ///the channel. It only applies to the remote party. + var remoteMaxValueInFlightMsat: UInt64 { + get {return _storage._remoteMaxValueInFlightMsat} + set {_uniqueStorage()._remoteMaxValueInFlightMsat = newValue} + } + + /// + ///The maximum number of concurrent HTLCs we will allow the remote party to add + ///to the commitment transaction. + var remoteMaxHtlcs: UInt32 { + get {return _storage._remoteMaxHtlcs} + set {_uniqueStorage()._remoteMaxHtlcs = newValue} + } + + /// + ///Max local csv is the maximum csv delay we will allow for our own commitment + ///transaction. + var maxLocalCsv: UInt32 { + get {return _storage._maxLocalCsv} + set {_uniqueStorage()._maxLocalCsv = newValue} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _storage = _StorageClass.defaultInstance +} + +struct Lnrpc_OpenStatusUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var update: Lnrpc_OpenStatusUpdate.OneOf_Update? = nil + + /// + ///Signals that the channel is now fully negotiated and the funding + ///transaction published. + var chanPending: Lnrpc_PendingUpdate { + get { + if case .chanPending(let v)? = update {return v} + return Lnrpc_PendingUpdate() + } + set {update = .chanPending(newValue)} + } + + /// + ///Signals that the channel's funding transaction has now reached the + ///required number of confirmations on chain and can be used. + var chanOpen: Lnrpc_ChannelOpenUpdate { + get { + if case .chanOpen(let v)? = update {return v} + return Lnrpc_ChannelOpenUpdate() + } + set {update = .chanOpen(newValue)} + } + + /// + ///Signals that the funding process has been suspended and the construction + ///of a PSBT that funds the channel PK script is now required. + var psbtFund: Lnrpc_ReadyForPsbtFunding { + get { + if case .psbtFund(let v)? = update {return v} + return Lnrpc_ReadyForPsbtFunding() + } + set {update = .psbtFund(newValue)} + } + + /// + ///The pending channel ID of the created channel. This value may be used to + ///further the funding flow manually via the FundingStateStep method. + var pendingChanID: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_Update: Equatable { + /// + ///Signals that the channel is now fully negotiated and the funding + ///transaction published. + case chanPending(Lnrpc_PendingUpdate) + /// + ///Signals that the channel's funding transaction has now reached the + ///required number of confirmations on chain and can be used. + case chanOpen(Lnrpc_ChannelOpenUpdate) + /// + ///Signals that the funding process has been suspended and the construction + ///of a PSBT that funds the channel PK script is now required. + case psbtFund(Lnrpc_ReadyForPsbtFunding) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_OpenStatusUpdate.OneOf_Update, rhs: Lnrpc_OpenStatusUpdate.OneOf_Update) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.chanPending, .chanPending): return { + guard case .chanPending(let l) = lhs, case .chanPending(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.chanOpen, .chanOpen): return { + guard case .chanOpen(let l) = lhs, case .chanOpen(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.psbtFund, .psbtFund): return { + guard case .psbtFund(let l) = lhs, case .psbtFund(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + init() {} +} + +struct Lnrpc_KeyLocator { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The family of key being identified. + var keyFamily: Int32 = 0 + + /// The precise index of the key being identified. + var keyIndex: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_KeyDescriptor { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The raw bytes of the key being identified. + var rawKeyBytes: Data = Data() + + /// + ///The key locator that identifies which key to use for signing. + var keyLoc: Lnrpc_KeyLocator { + get {return _keyLoc ?? Lnrpc_KeyLocator()} + set {_keyLoc = newValue} + } + /// Returns true if `keyLoc` has been explicitly set. + var hasKeyLoc: Bool {return self._keyLoc != nil} + /// Clears the value of `keyLoc`. Subsequent reads from it will return its default value. + mutating func clearKeyLoc() {self._keyLoc = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _keyLoc: Lnrpc_KeyLocator? = nil +} + +struct Lnrpc_ChanPointShim { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The size of the pre-crafted output to be used as the channel point for this + ///channel funding. + var amt: Int64 = 0 + + /// The target channel point to refrence in created commitment transactions. + var chanPoint: Lnrpc_ChannelPoint { + get {return _chanPoint ?? Lnrpc_ChannelPoint()} + set {_chanPoint = newValue} + } + /// Returns true if `chanPoint` has been explicitly set. + var hasChanPoint: Bool {return self._chanPoint != nil} + /// Clears the value of `chanPoint`. Subsequent reads from it will return its default value. + mutating func clearChanPoint() {self._chanPoint = nil} + + /// Our local key to use when creating the multi-sig output. + var localKey: Lnrpc_KeyDescriptor { + get {return _localKey ?? Lnrpc_KeyDescriptor()} + set {_localKey = newValue} + } + /// Returns true if `localKey` has been explicitly set. + var hasLocalKey: Bool {return self._localKey != nil} + /// Clears the value of `localKey`. Subsequent reads from it will return its default value. + mutating func clearLocalKey() {self._localKey = nil} + + /// The key of the remote party to use when creating the multi-sig output. + var remoteKey: Data = Data() + + /// + ///If non-zero, then this will be used as the pending channel ID on the wire + ///protocol to initate the funding request. This is an optional field, and + ///should only be set if the responder is already expecting a specific pending + ///channel ID. + var pendingChanID: Data = Data() + + /// + ///This uint32 indicates if this channel is to be considered 'frozen'. A frozen + ///channel does not allow a cooperative channel close by the initiator. The + ///thaw_height is the height that this restriction stops applying to the + ///channel. The height can be interpreted in two ways: as a relative height if + ///the value is less than 500,000, or as an absolute height otherwise. + var thawHeight: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _chanPoint: Lnrpc_ChannelPoint? = nil + fileprivate var _localKey: Lnrpc_KeyDescriptor? = nil +} + +struct Lnrpc_PsbtShim { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///A unique identifier of 32 random bytes that will be used as the pending + ///channel ID to identify the PSBT state machine when interacting with it and + ///on the wire protocol to initiate the funding request. + var pendingChanID: Data = Data() + + /// + ///An optional base PSBT the new channel output will be added to. If this is + ///non-empty, it must be a binary serialized PSBT. + var basePsbt: Data = Data() + + /// + ///If a channel should be part of a batch (multiple channel openings in one + ///transaction), it can be dangerous if the whole batch transaction is + ///published too early before all channel opening negotiations are completed. + ///This flag prevents this particular channel from broadcasting the transaction + ///after the negotiation with the remote peer. In a batch of channel openings + ///this flag should be set to true for every channel but the very last. + var noPublish: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_FundingShim { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var shim: Lnrpc_FundingShim.OneOf_Shim? = nil + + /// + ///A channel shim where the channel point was fully constructed outside + ///of lnd's wallet and the transaction might already be published. + var chanPointShim: Lnrpc_ChanPointShim { + get { + if case .chanPointShim(let v)? = shim {return v} + return Lnrpc_ChanPointShim() + } + set {shim = .chanPointShim(newValue)} + } + + /// + ///A channel shim that uses a PSBT to fund and sign the channel funding + ///transaction. + var psbtShim: Lnrpc_PsbtShim { + get { + if case .psbtShim(let v)? = shim {return v} + return Lnrpc_PsbtShim() + } + set {shim = .psbtShim(newValue)} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_Shim: Equatable { + /// + ///A channel shim where the channel point was fully constructed outside + ///of lnd's wallet and the transaction might already be published. + case chanPointShim(Lnrpc_ChanPointShim) + /// + ///A channel shim that uses a PSBT to fund and sign the channel funding + ///transaction. + case psbtShim(Lnrpc_PsbtShim) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_FundingShim.OneOf_Shim, rhs: Lnrpc_FundingShim.OneOf_Shim) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.chanPointShim, .chanPointShim): return { + guard case .chanPointShim(let l) = lhs, case .chanPointShim(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.psbtShim, .psbtShim): return { + guard case .psbtShim(let l) = lhs, case .psbtShim(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + init() {} +} + +struct Lnrpc_FundingShimCancel { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The pending channel ID of the channel to cancel the funding shim for. + var pendingChanID: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_FundingPsbtVerify { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The funded but not yet signed PSBT that sends the exact channel capacity + ///amount to the PK script returned in the open channel message in a previous + ///step. + var fundedPsbt: Data = Data() + + /// The pending channel ID of the channel to get the PSBT for. + var pendingChanID: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_FundingPsbtFinalize { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The funded PSBT that contains all witness data to send the exact channel + ///capacity amount to the PK script returned in the open channel message in a + ///previous step. Cannot be set at the same time as final_raw_tx. + var signedPsbt: Data = Data() + + /// The pending channel ID of the channel to get the PSBT for. + var pendingChanID: Data = Data() + + /// + ///As an alternative to the signed PSBT with all witness data, the final raw + ///wire format transaction can also be specified directly. Cannot be set at the + ///same time as signed_psbt. + var finalRawTx: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_FundingTransitionMsg { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var trigger: Lnrpc_FundingTransitionMsg.OneOf_Trigger? = nil + + /// + ///The funding shim to register. This should be used before any + ///channel funding has began by the remote party, as it is intended as a + ///preparatory step for the full channel funding. + var shimRegister: Lnrpc_FundingShim { + get { + if case .shimRegister(let v)? = trigger {return v} + return Lnrpc_FundingShim() + } + set {trigger = .shimRegister(newValue)} + } + + /// Used to cancel an existing registered funding shim. + var shimCancel: Lnrpc_FundingShimCancel { + get { + if case .shimCancel(let v)? = trigger {return v} + return Lnrpc_FundingShimCancel() + } + set {trigger = .shimCancel(newValue)} + } + + /// + ///Used to continue a funding flow that was initiated to be executed + ///through a PSBT. This step verifies that the PSBT contains the correct + ///outputs to fund the channel. + var psbtVerify: Lnrpc_FundingPsbtVerify { + get { + if case .psbtVerify(let v)? = trigger {return v} + return Lnrpc_FundingPsbtVerify() + } + set {trigger = .psbtVerify(newValue)} + } + + /// + ///Used to continue a funding flow that was initiated to be executed + ///through a PSBT. This step finalizes the funded and signed PSBT, finishes + ///negotiation with the peer and finally publishes the resulting funding + ///transaction. + var psbtFinalize: Lnrpc_FundingPsbtFinalize { + get { + if case .psbtFinalize(let v)? = trigger {return v} + return Lnrpc_FundingPsbtFinalize() + } + set {trigger = .psbtFinalize(newValue)} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_Trigger: Equatable { + /// + ///The funding shim to register. This should be used before any + ///channel funding has began by the remote party, as it is intended as a + ///preparatory step for the full channel funding. + case shimRegister(Lnrpc_FundingShim) + /// Used to cancel an existing registered funding shim. + case shimCancel(Lnrpc_FundingShimCancel) + /// + ///Used to continue a funding flow that was initiated to be executed + ///through a PSBT. This step verifies that the PSBT contains the correct + ///outputs to fund the channel. + case psbtVerify(Lnrpc_FundingPsbtVerify) + /// + ///Used to continue a funding flow that was initiated to be executed + ///through a PSBT. This step finalizes the funded and signed PSBT, finishes + ///negotiation with the peer and finally publishes the resulting funding + ///transaction. + case psbtFinalize(Lnrpc_FundingPsbtFinalize) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_FundingTransitionMsg.OneOf_Trigger, rhs: Lnrpc_FundingTransitionMsg.OneOf_Trigger) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.shimRegister, .shimRegister): return { + guard case .shimRegister(let l) = lhs, case .shimRegister(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.shimCancel, .shimCancel): return { + guard case .shimCancel(let l) = lhs, case .shimCancel(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.psbtVerify, .psbtVerify): return { + guard case .psbtVerify(let l) = lhs, case .psbtVerify(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.psbtFinalize, .psbtFinalize): return { + guard case .psbtFinalize(let l) = lhs, case .psbtFinalize(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + init() {} +} + +struct Lnrpc_FundingStateStepResp { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PendingHTLC { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The direction within the channel that the htlc was sent + var incoming: Bool = false + + /// The total value of the htlc + var amount: Int64 = 0 + + /// The final output to be swept back to the user's wallet + var outpoint: String = String() + + /// The next block height at which we can spend the current stage + var maturityHeight: UInt32 = 0 + + /// + ///The number of blocks remaining until the current stage can be swept. + ///Negative values indicate how many blocks have passed since becoming + ///mature. + var blocksTilMaturity: Int32 = 0 + + /// Indicates whether the htlc is in its first or second stage of recovery + var stage: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PendingChannelsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PendingChannelsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The balance in satoshis encumbered in pending channels + var totalLimboBalance: Int64 = 0 + + /// Channels pending opening + var pendingOpenChannels: [Lnrpc_PendingChannelsResponse.PendingOpenChannel] = [] + + /// + ///Deprecated: Channels pending closing previously contained cooperatively + ///closed channels with a single confirmation. These channels are now + ///considered closed from the time we see them on chain. + var pendingClosingChannels: [Lnrpc_PendingChannelsResponse.ClosedChannel] = [] + + /// Channels pending force closing + var pendingForceClosingChannels: [Lnrpc_PendingChannelsResponse.ForceClosedChannel] = [] + + /// Channels waiting for closing tx to confirm + var waitingCloseChannels: [Lnrpc_PendingChannelsResponse.WaitingCloseChannel] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + struct PendingChannel { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var remoteNodePub: String = String() + + var channelPoint: String = String() + + var capacity: Int64 = 0 + + var localBalance: Int64 = 0 + + var remoteBalance: Int64 = 0 + + /// The minimum satoshis this node is required to reserve in its + /// balance. + var localChanReserveSat: Int64 = 0 + + /// + ///The minimum satoshis the other node is required to reserve in its + ///balance. + var remoteChanReserveSat: Int64 = 0 + + /// The party that initiated opening the channel. + var initiator: Lnrpc_Initiator = .unknown + + /// The commitment type used by this channel. + var commitmentType: Lnrpc_CommitmentType = .legacy + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + } + + struct PendingOpenChannel { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The pending channel + var channel: Lnrpc_PendingChannelsResponse.PendingChannel { + get {return _channel ?? Lnrpc_PendingChannelsResponse.PendingChannel()} + set {_channel = newValue} + } + /// Returns true if `channel` has been explicitly set. + var hasChannel: Bool {return self._channel != nil} + /// Clears the value of `channel`. Subsequent reads from it will return its default value. + mutating func clearChannel() {self._channel = nil} + + /// The height at which this channel will be confirmed + var confirmationHeight: UInt32 = 0 + + /// + ///The amount calculated to be paid in fees for the current set of + ///commitment transactions. The fee amount is persisted with the channel + ///in order to allow the fee amount to be removed and recalculated with + ///each channel state update, including updates that happen after a system + ///restart. + var commitFee: Int64 = 0 + + /// The weight of the commitment transaction + var commitWeight: Int64 = 0 + + /// + ///The required number of satoshis per kilo-weight that the requester will + ///pay at all times, for both the funding transaction and commitment + ///transaction. This value can later be updated once the channel is open. + var feePerKw: Int64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _channel: Lnrpc_PendingChannelsResponse.PendingChannel? = nil + } + + struct WaitingCloseChannel { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The pending channel waiting for closing tx to confirm + var channel: Lnrpc_PendingChannelsResponse.PendingChannel { + get {return _channel ?? Lnrpc_PendingChannelsResponse.PendingChannel()} + set {_channel = newValue} + } + /// Returns true if `channel` has been explicitly set. + var hasChannel: Bool {return self._channel != nil} + /// Clears the value of `channel`. Subsequent reads from it will return its default value. + mutating func clearChannel() {self._channel = nil} + + /// The balance in satoshis encumbered in this channel + var limboBalance: Int64 = 0 + + /// + ///A list of valid commitment transactions. Any of these can confirm at + ///this point. + var commitments: Lnrpc_PendingChannelsResponse.Commitments { + get {return _commitments ?? Lnrpc_PendingChannelsResponse.Commitments()} + set {_commitments = newValue} + } + /// Returns true if `commitments` has been explicitly set. + var hasCommitments: Bool {return self._commitments != nil} + /// Clears the value of `commitments`. Subsequent reads from it will return its default value. + mutating func clearCommitments() {self._commitments = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _channel: Lnrpc_PendingChannelsResponse.PendingChannel? = nil + fileprivate var _commitments: Lnrpc_PendingChannelsResponse.Commitments? = nil + } + + struct Commitments { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Hash of the local version of the commitment tx. + var localTxid: String = String() + + /// Hash of the remote version of the commitment tx. + var remoteTxid: String = String() + + /// Hash of the remote pending version of the commitment tx. + var remotePendingTxid: String = String() + + /// + ///The amount in satoshis calculated to be paid in fees for the local + ///commitment. + var localCommitFeeSat: UInt64 = 0 + + /// + ///The amount in satoshis calculated to be paid in fees for the remote + ///commitment. + var remoteCommitFeeSat: UInt64 = 0 + + /// + ///The amount in satoshis calculated to be paid in fees for the remote + ///pending commitment. + var remotePendingCommitFeeSat: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + } + + struct ClosedChannel { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The pending channel to be closed + var channel: Lnrpc_PendingChannelsResponse.PendingChannel { + get {return _channel ?? Lnrpc_PendingChannelsResponse.PendingChannel()} + set {_channel = newValue} + } + /// Returns true if `channel` has been explicitly set. + var hasChannel: Bool {return self._channel != nil} + /// Clears the value of `channel`. Subsequent reads from it will return its default value. + mutating func clearChannel() {self._channel = nil} + + /// The transaction id of the closing transaction + var closingTxid: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _channel: Lnrpc_PendingChannelsResponse.PendingChannel? = nil + } + + struct ForceClosedChannel { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The pending channel to be force closed + var channel: Lnrpc_PendingChannelsResponse.PendingChannel { + get {return _channel ?? Lnrpc_PendingChannelsResponse.PendingChannel()} + set {_channel = newValue} + } + /// Returns true if `channel` has been explicitly set. + var hasChannel: Bool {return self._channel != nil} + /// Clears the value of `channel`. Subsequent reads from it will return its default value. + mutating func clearChannel() {self._channel = nil} + + /// The transaction id of the closing transaction + var closingTxid: String = String() + + /// The balance in satoshis encumbered in this pending channel + var limboBalance: Int64 = 0 + + /// The height at which funds can be swept into the wallet + var maturityHeight: UInt32 = 0 + + /// + ///Remaining # of blocks until the commitment output can be swept. + ///Negative values indicate how many blocks have passed since becoming + ///mature. + var blocksTilMaturity: Int32 = 0 + + /// The total value of funds successfully recovered from this channel + var recoveredBalance: Int64 = 0 + + var pendingHtlcs: [Lnrpc_PendingHTLC] = [] + + var anchor: Lnrpc_PendingChannelsResponse.ForceClosedChannel.AnchorState = .limbo + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum AnchorState: SwiftProtobuf.Enum { + typealias RawValue = Int + case limbo // = 0 + case recovered // = 1 + case lost // = 2 + case UNRECOGNIZED(Int) + + init() { + self = .limbo + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .limbo + case 1: self = .recovered + case 2: self = .lost + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .limbo: return 0 + case .recovered: return 1 + case .lost: return 2 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} + + fileprivate var _channel: Lnrpc_PendingChannelsResponse.PendingChannel? = nil + } + + init() {} +} + +#if swift(>=4.2) + +extension Lnrpc_PendingChannelsResponse.ForceClosedChannel.AnchorState: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_PendingChannelsResponse.ForceClosedChannel.AnchorState] = [ + .limbo, + .recovered, + .lost, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_ChannelEventSubscription { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelEventUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var channel: Lnrpc_ChannelEventUpdate.OneOf_Channel? = nil + + var openChannel: Lnrpc_Channel { + get { + if case .openChannel(let v)? = channel {return v} + return Lnrpc_Channel() + } + set {channel = .openChannel(newValue)} + } + + var closedChannel: Lnrpc_ChannelCloseSummary { + get { + if case .closedChannel(let v)? = channel {return v} + return Lnrpc_ChannelCloseSummary() + } + set {channel = .closedChannel(newValue)} + } + + var activeChannel: Lnrpc_ChannelPoint { + get { + if case .activeChannel(let v)? = channel {return v} + return Lnrpc_ChannelPoint() + } + set {channel = .activeChannel(newValue)} + } + + var inactiveChannel: Lnrpc_ChannelPoint { + get { + if case .inactiveChannel(let v)? = channel {return v} + return Lnrpc_ChannelPoint() + } + set {channel = .inactiveChannel(newValue)} + } + + var pendingOpenChannel: Lnrpc_PendingUpdate { + get { + if case .pendingOpenChannel(let v)? = channel {return v} + return Lnrpc_PendingUpdate() + } + set {channel = .pendingOpenChannel(newValue)} + } + + var type: Lnrpc_ChannelEventUpdate.UpdateType = .openChannel + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_Channel: Equatable { + case openChannel(Lnrpc_Channel) + case closedChannel(Lnrpc_ChannelCloseSummary) + case activeChannel(Lnrpc_ChannelPoint) + case inactiveChannel(Lnrpc_ChannelPoint) + case pendingOpenChannel(Lnrpc_PendingUpdate) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_ChannelEventUpdate.OneOf_Channel, rhs: Lnrpc_ChannelEventUpdate.OneOf_Channel) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.openChannel, .openChannel): return { + guard case .openChannel(let l) = lhs, case .openChannel(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.closedChannel, .closedChannel): return { + guard case .closedChannel(let l) = lhs, case .closedChannel(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.activeChannel, .activeChannel): return { + guard case .activeChannel(let l) = lhs, case .activeChannel(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.inactiveChannel, .inactiveChannel): return { + guard case .inactiveChannel(let l) = lhs, case .inactiveChannel(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.pendingOpenChannel, .pendingOpenChannel): return { + guard case .pendingOpenChannel(let l) = lhs, case .pendingOpenChannel(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + enum UpdateType: SwiftProtobuf.Enum { + typealias RawValue = Int + case openChannel // = 0 + case closedChannel // = 1 + case activeChannel // = 2 + case inactiveChannel // = 3 + case pendingOpenChannel // = 4 + case UNRECOGNIZED(Int) + + init() { + self = .openChannel + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .openChannel + case 1: self = .closedChannel + case 2: self = .activeChannel + case 3: self = .inactiveChannel + case 4: self = .pendingOpenChannel + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .openChannel: return 0 + case .closedChannel: return 1 + case .activeChannel: return 2 + case .inactiveChannel: return 3 + case .pendingOpenChannel: return 4 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} +} + +#if swift(>=4.2) + +extension Lnrpc_ChannelEventUpdate.UpdateType: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_ChannelEventUpdate.UpdateType] = [ + .openChannel, + .closedChannel, + .activeChannel, + .inactiveChannel, + .pendingOpenChannel, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_WalletBalanceRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_WalletBalanceResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The balance of the wallet + var totalBalance: Int64 = 0 + + /// The confirmed balance of a wallet(with >= 1 confirmations) + var confirmedBalance: Int64 = 0 + + /// The unconfirmed balance of a wallet(with 0 confirmations) + var unconfirmedBalance: Int64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Amount { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Value denominated in satoshis. + var sat: UInt64 = 0 + + /// Value denominated in milli-satoshis. + var msat: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelBalanceRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelBalanceResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Deprecated. Sum of channels balances denominated in satoshis + var balance: Int64 = 0 + + /// Deprecated. Sum of channels pending balances denominated in satoshis + var pendingOpenBalance: Int64 = 0 + + /// Sum of channels local balances. + var localBalance: Lnrpc_Amount { + get {return _localBalance ?? Lnrpc_Amount()} + set {_localBalance = newValue} + } + /// Returns true if `localBalance` has been explicitly set. + var hasLocalBalance: Bool {return self._localBalance != nil} + /// Clears the value of `localBalance`. Subsequent reads from it will return its default value. + mutating func clearLocalBalance() {self._localBalance = nil} + + /// Sum of channels remote balances. + var remoteBalance: Lnrpc_Amount { + get {return _remoteBalance ?? Lnrpc_Amount()} + set {_remoteBalance = newValue} + } + /// Returns true if `remoteBalance` has been explicitly set. + var hasRemoteBalance: Bool {return self._remoteBalance != nil} + /// Clears the value of `remoteBalance`. Subsequent reads from it will return its default value. + mutating func clearRemoteBalance() {self._remoteBalance = nil} + + /// Sum of channels local unsettled balances. + var unsettledLocalBalance: Lnrpc_Amount { + get {return _unsettledLocalBalance ?? Lnrpc_Amount()} + set {_unsettledLocalBalance = newValue} + } + /// Returns true if `unsettledLocalBalance` has been explicitly set. + var hasUnsettledLocalBalance: Bool {return self._unsettledLocalBalance != nil} + /// Clears the value of `unsettledLocalBalance`. Subsequent reads from it will return its default value. + mutating func clearUnsettledLocalBalance() {self._unsettledLocalBalance = nil} + + /// Sum of channels remote unsettled balances. + var unsettledRemoteBalance: Lnrpc_Amount { + get {return _unsettledRemoteBalance ?? Lnrpc_Amount()} + set {_unsettledRemoteBalance = newValue} + } + /// Returns true if `unsettledRemoteBalance` has been explicitly set. + var hasUnsettledRemoteBalance: Bool {return self._unsettledRemoteBalance != nil} + /// Clears the value of `unsettledRemoteBalance`. Subsequent reads from it will return its default value. + mutating func clearUnsettledRemoteBalance() {self._unsettledRemoteBalance = nil} + + /// Sum of channels pending local balances. + var pendingOpenLocalBalance: Lnrpc_Amount { + get {return _pendingOpenLocalBalance ?? Lnrpc_Amount()} + set {_pendingOpenLocalBalance = newValue} + } + /// Returns true if `pendingOpenLocalBalance` has been explicitly set. + var hasPendingOpenLocalBalance: Bool {return self._pendingOpenLocalBalance != nil} + /// Clears the value of `pendingOpenLocalBalance`. Subsequent reads from it will return its default value. + mutating func clearPendingOpenLocalBalance() {self._pendingOpenLocalBalance = nil} + + /// Sum of channels pending remote balances. + var pendingOpenRemoteBalance: Lnrpc_Amount { + get {return _pendingOpenRemoteBalance ?? Lnrpc_Amount()} + set {_pendingOpenRemoteBalance = newValue} + } + /// Returns true if `pendingOpenRemoteBalance` has been explicitly set. + var hasPendingOpenRemoteBalance: Bool {return self._pendingOpenRemoteBalance != nil} + /// Clears the value of `pendingOpenRemoteBalance`. Subsequent reads from it will return its default value. + mutating func clearPendingOpenRemoteBalance() {self._pendingOpenRemoteBalance = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _localBalance: Lnrpc_Amount? = nil + fileprivate var _remoteBalance: Lnrpc_Amount? = nil + fileprivate var _unsettledLocalBalance: Lnrpc_Amount? = nil + fileprivate var _unsettledRemoteBalance: Lnrpc_Amount? = nil + fileprivate var _pendingOpenLocalBalance: Lnrpc_Amount? = nil + fileprivate var _pendingOpenRemoteBalance: Lnrpc_Amount? = nil +} + +struct Lnrpc_QueryRoutesRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The 33-byte hex-encoded public key for the payment destination + var pubKey: String = String() + + /// + ///The amount to send expressed in satoshis. + /// + ///The fields amt and amt_msat are mutually exclusive. + var amt: Int64 = 0 + + /// + ///The amount to send expressed in millisatoshis. + /// + ///The fields amt and amt_msat are mutually exclusive. + var amtMsat: Int64 = 0 + + /// + ///An optional CLTV delta from the current height that should be used for the + ///timelock of the final hop. Note that unlike SendPayment, QueryRoutes does + ///not add any additional block padding on top of final_ctlv_delta. This + ///padding of a few blocks needs to be added manually or otherwise failures may + ///happen when a block comes in while the payment is in flight. + var finalCltvDelta: Int32 = 0 + + /// + ///The maximum number of satoshis that will be paid as a fee of the payment. + ///This value can be represented either as a percentage of the amount being + ///sent, or as a fixed amount of the maximum fee the user is willing the pay to + ///send the payment. + var feeLimit: Lnrpc_FeeLimit { + get {return _feeLimit ?? Lnrpc_FeeLimit()} + set {_feeLimit = newValue} + } + /// Returns true if `feeLimit` has been explicitly set. + var hasFeeLimit: Bool {return self._feeLimit != nil} + /// Clears the value of `feeLimit`. Subsequent reads from it will return its default value. + mutating func clearFeeLimit() {self._feeLimit = nil} + + /// + ///A list of nodes to ignore during path finding. When using REST, these fields + ///must be encoded as base64. + var ignoredNodes: [Data] = [] + + /// + ///Deprecated. A list of edges to ignore during path finding. + var ignoredEdges: [Lnrpc_EdgeLocator] = [] + + /// + ///The source node where the request route should originated from. If empty, + ///self is assumed. + var sourcePubKey: String = String() + + /// + ///If set to true, edge probabilities from mission control will be used to get + ///the optimal route. + var useMissionControl: Bool = false + + /// + ///A list of directed node pairs that will be ignored during path finding. + var ignoredPairs: [Lnrpc_NodePair] = [] + + /// + ///An optional maximum total time lock for the route. If the source is empty or + ///ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If + ///zero, then the value of `--max-cltv-expiry` is used as the limit. + var cltvLimit: UInt32 = 0 + + /// + ///An optional field that can be used to pass an arbitrary set of TLV records + ///to a peer which understands the new records. This can be used to pass + ///application specific data during the payment attempt. If the destination + ///does not support the specified recrods, and error will be returned. + ///Record types are required to be in the custom range >= 65536. When using + ///REST, the values must be encoded as base64. + var destCustomRecords: Dictionary = [:] + + /// + ///The channel id of the channel that must be taken to the first hop. If zero, + ///any channel may be used. + var outgoingChanID: UInt64 = 0 + + /// + ///The pubkey of the last hop of the route. If empty, any hop may be used. + var lastHopPubkey: Data = Data() + + /// + ///Optional route hints to reach the destination through private channels. + var routeHints: [Lnrpc_RouteHint] = [] + + /// + ///Features assumed to be supported by the final node. All transitive feature + ///dependencies must also be set properly. For a given feature bit pair, either + ///optional or remote may be set, but not both. If this field is nil or empty, + ///the router will try to load destination features from the graph as a + ///fallback. + var destFeatures: [Lnrpc_FeatureBit] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _feeLimit: Lnrpc_FeeLimit? = nil +} + +struct Lnrpc_NodePair { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The sending node of the pair. When using REST, this field must be encoded as + ///base64. + var from: Data = Data() + + /// + ///The receiving node of the pair. When using REST, this field must be encoded + ///as base64. + var to: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_EdgeLocator { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The short channel id of this edge. + var channelID: UInt64 = 0 + + /// + ///The direction of this edge. If direction_reverse is false, the direction + ///of this edge is from the channel endpoint with the lexicographically smaller + ///pub key to the endpoint with the larger pub key. If direction_reverse is + ///is true, the edge goes the other way. + var directionReverse: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_QueryRoutesResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The route that results from the path finding operation. This is still a + ///repeated field to retain backwards compatibility. + var routes: [Lnrpc_Route] = [] + + /// + ///The success probability of the returned route based on the current mission + ///control state. [EXPERIMENTAL] + var successProb: Double = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Hop { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The unique channel ID for the channel. The first 3 bytes are the block + ///height, the next 3 the index within the block, and the last 2 bytes are the + ///output index for the channel. + var chanID: UInt64 = 0 + + var chanCapacity: Int64 = 0 + + var amtToForward: Int64 = 0 + + var fee: Int64 = 0 + + var expiry: UInt32 = 0 + + var amtToForwardMsat: Int64 = 0 + + var feeMsat: Int64 = 0 + + /// + ///An optional public key of the hop. If the public key is given, the payment + ///can be executed without relying on a copy of the channel graph. + var pubKey: String = String() + + /// + ///If set to true, then this hop will be encoded using the new variable length + ///TLV format. Note that if any custom tlv_records below are specified, then + ///this field MUST be set to true for them to be encoded properly. + var tlvPayload: Bool = false + + /// + ///An optional TLV record that signals the use of an MPP payment. If present, + ///the receiver will enforce that that the same mpp_record is included in the + ///final hop payload of all non-zero payments in the HTLC set. If empty, a + ///regular single-shot payment is or was attempted. + var mppRecord: Lnrpc_MPPRecord { + get {return _mppRecord ?? Lnrpc_MPPRecord()} + set {_mppRecord = newValue} + } + /// Returns true if `mppRecord` has been explicitly set. + var hasMppRecord: Bool {return self._mppRecord != nil} + /// Clears the value of `mppRecord`. Subsequent reads from it will return its default value. + mutating func clearMppRecord() {self._mppRecord = nil} + + /// + ///An optional set of key-value TLV records. This is useful within the context + ///of the SendToRoute call as it allows callers to specify arbitrary K-V pairs + ///to drop off at each hop within the onion. + var customRecords: Dictionary = [:] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _mppRecord: Lnrpc_MPPRecord? = nil +} + +struct Lnrpc_MPPRecord { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///A unique, random identifier used to authenticate the sender as the intended + ///payer of a multi-path payment. The payment_addr must be the same for all + ///subpayments, and match the payment_addr provided in the receiver's invoice. + ///The same payment_addr must be used on all subpayments. + var paymentAddr: Data = Data() + + /// + ///The total amount in milli-satoshis being sent as part of a larger multi-path + ///payment. The caller is responsible for ensuring subpayments to the same node + ///and payment_hash sum exactly to total_amt_msat. The same + ///total_amt_msat must be used on all subpayments. + var totalAmtMsat: Int64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +/// +///A path through the channel graph which runs over one or more channels in +///succession. This struct carries all the information required to craft the +///Sphinx onion packet, and send the payment along the first hop in the path. A +///route is only selected as valid if all the channels have sufficient capacity to +///carry the initial payment amount after fees are accounted for. +struct Lnrpc_Route { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The cumulative (final) time lock across the entire route. This is the CLTV + ///value that should be extended to the first hop in the route. All other hops + ///will decrement the time-lock as advertised, leaving enough time for all + ///hops to wait for or present the payment preimage to complete the payment. + var totalTimeLock: UInt32 = 0 + + /// + ///The sum of the fees paid at each hop within the final route. In the case + ///of a one-hop payment, this value will be zero as we don't need to pay a fee + ///to ourselves. + var totalFees: Int64 = 0 + + /// + ///The total amount of funds required to complete a payment over this route. + ///This value includes the cumulative fees at each hop. As a result, the HTLC + ///extended to the first-hop in the route will need to have at least this many + ///satoshis, otherwise the route will fail at an intermediate node due to an + ///insufficient amount of fees. + var totalAmt: Int64 = 0 + + /// + ///Contains details concerning the specific forwarding details at each hop. + var hops: [Lnrpc_Hop] = [] + + /// + ///The total fees in millisatoshis. + var totalFeesMsat: Int64 = 0 + + /// + ///The total amount in millisatoshis. + var totalAmtMsat: Int64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NodeInfoRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The 33-byte hex-encoded compressed public of the target node + var pubKey: String = String() + + /// If true, will include all known channels associated with the node. + var includeChannels: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NodeInfo { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///An individual vertex/node within the channel graph. A node is + ///connected to other nodes by one or more channel edges emanating from it. As + ///the graph is directed, a node will also have an incoming edge attached to + ///it for each outgoing edge. + var node: Lnrpc_LightningNode { + get {return _node ?? Lnrpc_LightningNode()} + set {_node = newValue} + } + /// Returns true if `node` has been explicitly set. + var hasNode: Bool {return self._node != nil} + /// Clears the value of `node`. Subsequent reads from it will return its default value. + mutating func clearNode() {self._node = nil} + + /// The total number of channels for the node. + var numChannels: UInt32 = 0 + + /// The sum of all channels capacity for the node, denominated in satoshis. + var totalCapacity: Int64 = 0 + + /// A list of all public channels for the node. + var channels: [Lnrpc_ChannelEdge] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _node: Lnrpc_LightningNode? = nil +} + +/// +///An individual vertex/node within the channel graph. A node is +///connected to other nodes by one or more channel edges emanating from it. As the +///graph is directed, a node will also have an incoming edge attached to it for +///each outgoing edge. +struct Lnrpc_LightningNode { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var lastUpdate: UInt32 = 0 + + var pubKey: String = String() + + var alias: String = String() + + var addresses: [Lnrpc_NodeAddress] = [] + + var color: String = String() + + var features: Dictionary = [:] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NodeAddress { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var network: String = String() + + var addr: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_RoutingPolicy { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var timeLockDelta: UInt32 = 0 + + var minHtlc: Int64 = 0 + + var feeBaseMsat: Int64 = 0 + + var feeRateMilliMsat: Int64 = 0 + + var disabled: Bool = false + + var maxHtlcMsat: UInt64 = 0 + + var lastUpdate: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +/// +///A fully authenticated channel along with all its unique attributes. +///Once an authenticated channel announcement has been processed on the network, +///then an instance of ChannelEdgeInfo encapsulating the channels attributes is +///stored. The other portions relevant to routing policy of a channel are stored +///within a ChannelEdgePolicy for each direction of the channel. +struct Lnrpc_ChannelEdge { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The unique channel ID for the channel. The first 3 bytes are the block + ///height, the next 3 the index within the block, and the last 2 bytes are the + ///output index for the channel. + var channelID: UInt64 { + get {return _storage._channelID} + set {_uniqueStorage()._channelID = newValue} + } + + var chanPoint: String { + get {return _storage._chanPoint} + set {_uniqueStorage()._chanPoint = newValue} + } + + var lastUpdate: UInt32 { + get {return _storage._lastUpdate} + set {_uniqueStorage()._lastUpdate = newValue} + } + + var node1Pub: String { + get {return _storage._node1Pub} + set {_uniqueStorage()._node1Pub = newValue} + } + + var node2Pub: String { + get {return _storage._node2Pub} + set {_uniqueStorage()._node2Pub = newValue} + } + + var capacity: Int64 { + get {return _storage._capacity} + set {_uniqueStorage()._capacity = newValue} + } + + var node1Policy: Lnrpc_RoutingPolicy { + get {return _storage._node1Policy ?? Lnrpc_RoutingPolicy()} + set {_uniqueStorage()._node1Policy = newValue} + } + /// Returns true if `node1Policy` has been explicitly set. + var hasNode1Policy: Bool {return _storage._node1Policy != nil} + /// Clears the value of `node1Policy`. Subsequent reads from it will return its default value. + mutating func clearNode1Policy() {_uniqueStorage()._node1Policy = nil} + + var node2Policy: Lnrpc_RoutingPolicy { + get {return _storage._node2Policy ?? Lnrpc_RoutingPolicy()} + set {_uniqueStorage()._node2Policy = newValue} + } + /// Returns true if `node2Policy` has been explicitly set. + var hasNode2Policy: Bool {return _storage._node2Policy != nil} + /// Clears the value of `node2Policy`. Subsequent reads from it will return its default value. + mutating func clearNode2Policy() {_uniqueStorage()._node2Policy = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _storage = _StorageClass.defaultInstance +} + +struct Lnrpc_ChannelGraphRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///Whether unannounced channels are included in the response or not. If set, + ///unannounced channels are included. Unannounced channels are both private + ///channels, and public channels that are not yet announced to the network. + var includeUnannounced: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +/// Returns a new instance of the directed channel graph. +struct Lnrpc_ChannelGraph { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The list of `LightningNode`s in this channel graph + var nodes: [Lnrpc_LightningNode] = [] + + /// The list of `ChannelEdge`s in this channel graph + var edges: [Lnrpc_ChannelEdge] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NodeMetricsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The requested node metrics. + var types: [Lnrpc_NodeMetricType] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NodeMetricsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///Betweenness centrality is the sum of the ratio of shortest paths that pass + ///through the node for each pair of nodes in the graph (not counting paths + ///starting or ending at this node). + ///Map of node pubkey to betweenness centrality of the node. Normalized + ///values are in the [0,1] closed interval. + var betweennessCentrality: Dictionary = [:] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_FloatMetric { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Arbitrary float value. + var value: Double = 0 + + /// The value normalized to [0,1] or [-1,1]. + var normalizedValue: Double = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChanInfoRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The unique channel ID for the channel. The first 3 bytes are the block + ///height, the next 3 the index within the block, and the last 2 bytes are the + ///output index for the channel. + var chanID: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NetworkInfoRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NetworkInfo { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var graphDiameter: UInt32 = 0 + + var avgOutDegree: Double = 0 + + var maxOutDegree: UInt32 = 0 + + var numNodes: UInt32 = 0 + + var numChannels: UInt32 = 0 + + var totalNetworkCapacity: Int64 = 0 + + var avgChannelSize: Double = 0 + + var minChannelSize: Int64 = 0 + + var maxChannelSize: Int64 = 0 + + var medianChannelSizeSat: Int64 = 0 + + /// The number of edges marked as zombies. + var numZombieChans: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_StopRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_StopResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_GraphTopologySubscription { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_GraphTopologyUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var nodeUpdates: [Lnrpc_NodeUpdate] = [] + + var channelUpdates: [Lnrpc_ChannelEdgeUpdate] = [] + + var closedChans: [Lnrpc_ClosedChannelUpdate] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_NodeUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var addresses: [String] = [] + + var identityKey: String = String() + + var globalFeatures: Data = Data() + + var alias: String = String() + + var color: String = String() + + /// + ///Features that the node has advertised in the init message, node + ///announcements and invoices. + var features: Dictionary = [:] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelEdgeUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The unique channel ID for the channel. The first 3 bytes are the block + ///height, the next 3 the index within the block, and the last 2 bytes are the + ///output index for the channel. + var chanID: UInt64 = 0 + + var chanPoint: Lnrpc_ChannelPoint { + get {return _chanPoint ?? Lnrpc_ChannelPoint()} + set {_chanPoint = newValue} + } + /// Returns true if `chanPoint` has been explicitly set. + var hasChanPoint: Bool {return self._chanPoint != nil} + /// Clears the value of `chanPoint`. Subsequent reads from it will return its default value. + mutating func clearChanPoint() {self._chanPoint = nil} + + var capacity: Int64 = 0 + + var routingPolicy: Lnrpc_RoutingPolicy { + get {return _routingPolicy ?? Lnrpc_RoutingPolicy()} + set {_routingPolicy = newValue} + } + /// Returns true if `routingPolicy` has been explicitly set. + var hasRoutingPolicy: Bool {return self._routingPolicy != nil} + /// Clears the value of `routingPolicy`. Subsequent reads from it will return its default value. + mutating func clearRoutingPolicy() {self._routingPolicy = nil} + + var advertisingNode: String = String() + + var connectingNode: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _chanPoint: Lnrpc_ChannelPoint? = nil + fileprivate var _routingPolicy: Lnrpc_RoutingPolicy? = nil +} + +struct Lnrpc_ClosedChannelUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The unique channel ID for the channel. The first 3 bytes are the block + ///height, the next 3 the index within the block, and the last 2 bytes are the + ///output index for the channel. + var chanID: UInt64 = 0 + + var capacity: Int64 = 0 + + var closedHeight: UInt32 = 0 + + var chanPoint: Lnrpc_ChannelPoint { + get {return _chanPoint ?? Lnrpc_ChannelPoint()} + set {_chanPoint = newValue} + } + /// Returns true if `chanPoint` has been explicitly set. + var hasChanPoint: Bool {return self._chanPoint != nil} + /// Clears the value of `chanPoint`. Subsequent reads from it will return its default value. + mutating func clearChanPoint() {self._chanPoint = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _chanPoint: Lnrpc_ChannelPoint? = nil +} + +struct Lnrpc_HopHint { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The public key of the node at the start of the channel. + var nodeID: String = String() + + /// The unique identifier of the channel. + var chanID: UInt64 = 0 + + /// The base fee of the channel denominated in millisatoshis. + var feeBaseMsat: UInt32 = 0 + + /// + ///The fee rate of the channel for sending one satoshi across it denominated in + ///millionths of a satoshi. + var feeProportionalMillionths: UInt32 = 0 + + /// The time-lock delta of the channel. + var cltvExpiryDelta: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_RouteHint { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///A list of hop hints that when chained together can assist in reaching a + ///specific destination. + var hopHints: [Lnrpc_HopHint] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Invoice { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///An optional memo to attach along with the invoice. Used for record keeping + ///purposes for the invoice's creator, and will also be set in the description + ///field of the encoded payment request if the description_hash field is not + ///being used. + var memo: String { + get {return _storage._memo} + set {_uniqueStorage()._memo = newValue} + } + + /// + ///The hex-encoded preimage (32 byte) which will allow settling an incoming + ///HTLC payable to this preimage. When using REST, this field must be encoded + ///as base64. + var rPreimage: Data { + get {return _storage._rPreimage} + set {_uniqueStorage()._rPreimage = newValue} + } + + /// + ///The hash of the preimage. When using REST, this field must be encoded as + ///base64. + var rHash: Data { + get {return _storage._rHash} + set {_uniqueStorage()._rHash = newValue} + } + + /// + ///The value of this invoice in satoshis + /// + ///The fields value and value_msat are mutually exclusive. + var value: Int64 { + get {return _storage._value} + set {_uniqueStorage()._value = newValue} + } + + /// + ///The value of this invoice in millisatoshis + /// + ///The fields value and value_msat are mutually exclusive. + var valueMsat: Int64 { + get {return _storage._valueMsat} + set {_uniqueStorage()._valueMsat = newValue} + } + + /// Whether this invoice has been fulfilled + var settled: Bool { + get {return _storage._settled} + set {_uniqueStorage()._settled = newValue} + } + + /// When this invoice was created + var creationDate: Int64 { + get {return _storage._creationDate} + set {_uniqueStorage()._creationDate = newValue} + } + + /// When this invoice was settled + var settleDate: Int64 { + get {return _storage._settleDate} + set {_uniqueStorage()._settleDate = newValue} + } + + /// + ///A bare-bones invoice for a payment within the Lightning Network. With the + ///details of the invoice, the sender has all the data necessary to send a + ///payment to the recipient. + var paymentRequest: String { + get {return _storage._paymentRequest} + set {_uniqueStorage()._paymentRequest = newValue} + } + + /// + ///Hash (SHA-256) of a description of the payment. Used if the description of + ///payment (memo) is too long to naturally fit within the description field + ///of an encoded payment request. When using REST, this field must be encoded + ///as base64. + var descriptionHash: Data { + get {return _storage._descriptionHash} + set {_uniqueStorage()._descriptionHash = newValue} + } + + /// Payment request expiry time in seconds. Default is 3600 (1 hour). + var expiry: Int64 { + get {return _storage._expiry} + set {_uniqueStorage()._expiry = newValue} + } + + /// Fallback on-chain address. + var fallbackAddr: String { + get {return _storage._fallbackAddr} + set {_uniqueStorage()._fallbackAddr = newValue} + } + + /// Delta to use for the time-lock of the CLTV extended to the final hop. + var cltvExpiry: UInt64 { + get {return _storage._cltvExpiry} + set {_uniqueStorage()._cltvExpiry = newValue} + } + + /// + ///Route hints that can each be individually used to assist in reaching the + ///invoice's destination. + var routeHints: [Lnrpc_RouteHint] { + get {return _storage._routeHints} + set {_uniqueStorage()._routeHints = newValue} + } + + /// Whether this invoice should include routing hints for private channels. + var `private`: Bool { + get {return _storage._private} + set {_uniqueStorage()._private = newValue} + } + + /// + ///The "add" index of this invoice. Each newly created invoice will increment + ///this index making it monotonically increasing. Callers to the + ///SubscribeInvoices call can use this to instantly get notified of all added + ///invoices with an add_index greater than this one. + var addIndex: UInt64 { + get {return _storage._addIndex} + set {_uniqueStorage()._addIndex = newValue} + } + + /// + ///The "settle" index of this invoice. Each newly settled invoice will + ///increment this index making it monotonically increasing. Callers to the + ///SubscribeInvoices call can use this to instantly get notified of all + ///settled invoices with an settle_index greater than this one. + var settleIndex: UInt64 { + get {return _storage._settleIndex} + set {_uniqueStorage()._settleIndex = newValue} + } + + /// Deprecated, use amt_paid_sat or amt_paid_msat. + var amtPaid: Int64 { + get {return _storage._amtPaid} + set {_uniqueStorage()._amtPaid = newValue} + } + + /// + ///The amount that was accepted for this invoice, in satoshis. This will ONLY + ///be set if this invoice has been settled. We provide this field as if the + ///invoice was created with a zero value, then we need to record what amount + ///was ultimately accepted. Additionally, it's possible that the sender paid + ///MORE that was specified in the original invoice. So we'll record that here + ///as well. + var amtPaidSat: Int64 { + get {return _storage._amtPaidSat} + set {_uniqueStorage()._amtPaidSat = newValue} + } + + /// + ///The amount that was accepted for this invoice, in millisatoshis. This will + ///ONLY be set if this invoice has been settled. We provide this field as if + ///the invoice was created with a zero value, then we need to record what + ///amount was ultimately accepted. Additionally, it's possible that the sender + ///paid MORE that was specified in the original invoice. So we'll record that + ///here as well. + var amtPaidMsat: Int64 { + get {return _storage._amtPaidMsat} + set {_uniqueStorage()._amtPaidMsat = newValue} + } + + /// + ///The state the invoice is in. + var state: Lnrpc_Invoice.InvoiceState { + get {return _storage._state} + set {_uniqueStorage()._state = newValue} + } + + /// List of HTLCs paying to this invoice [EXPERIMENTAL]. + var htlcs: [Lnrpc_InvoiceHTLC] { + get {return _storage._htlcs} + set {_uniqueStorage()._htlcs = newValue} + } + + /// List of features advertised on the invoice. + var features: Dictionary { + get {return _storage._features} + set {_uniqueStorage()._features = newValue} + } + + /// + ///Indicates if this invoice was a spontaneous payment that arrived via keysend + ///[EXPERIMENTAL]. + var isKeysend: Bool { + get {return _storage._isKeysend} + set {_uniqueStorage()._isKeysend = newValue} + } + + /// + ///The payment address of this invoice. This value will be used in MPP + ///payments, and also for newer invoies that always require the MPP paylaod + ///for added end-to-end security. + var paymentAddr: Data { + get {return _storage._paymentAddr} + set {_uniqueStorage()._paymentAddr = newValue} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum InvoiceState: SwiftProtobuf.Enum { + typealias RawValue = Int + case `open` // = 0 + case settled // = 1 + case canceled // = 2 + case accepted // = 3 + case UNRECOGNIZED(Int) + + init() { + self = .open + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .open + case 1: self = .settled + case 2: self = .canceled + case 3: self = .accepted + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .open: return 0 + case .settled: return 1 + case .canceled: return 2 + case .accepted: return 3 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} + + fileprivate var _storage = _StorageClass.defaultInstance +} + +#if swift(>=4.2) + +extension Lnrpc_Invoice.InvoiceState: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_Invoice.InvoiceState] = [ + .open, + .settled, + .canceled, + .accepted, + ] +} + +#endif // swift(>=4.2) + +/// Details of an HTLC that paid to an invoice +struct Lnrpc_InvoiceHTLC { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Short channel id over which the htlc was received. + var chanID: UInt64 = 0 + + /// Index identifying the htlc on the channel. + var htlcIndex: UInt64 = 0 + + /// The amount of the htlc in msat. + var amtMsat: UInt64 = 0 + + /// Block height at which this htlc was accepted. + var acceptHeight: Int32 = 0 + + /// Time at which this htlc was accepted. + var acceptTime: Int64 = 0 + + /// Time at which this htlc was settled or canceled. + var resolveTime: Int64 = 0 + + /// Block height at which this htlc expires. + var expiryHeight: Int32 = 0 + + /// Current state the htlc is in. + var state: Lnrpc_InvoiceHTLCState = .accepted + + /// Custom tlv records. + var customRecords: Dictionary = [:] + + /// The total amount of the mpp payment in msat. + var mppTotalAmtMsat: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_AddInvoiceResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var rHash: Data = Data() + + /// + ///A bare-bones invoice for a payment within the Lightning Network. With the + ///details of the invoice, the sender has all the data necessary to send a + ///payment to the recipient. + var paymentRequest: String = String() + + /// + ///The "add" index of this invoice. Each newly created invoice will increment + ///this index making it monotonically increasing. Callers to the + ///SubscribeInvoices call can use this to instantly get notified of all added + ///invoices with an add_index greater than this one. + var addIndex: UInt64 = 0 + + /// + ///The payment address of the generated invoice. This value should be used + ///in all payments for this invoice as we require it for end to end + ///security. + var paymentAddr: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PaymentHash { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The hex-encoded payment hash of the invoice to be looked up. The passed + ///payment hash must be exactly 32 bytes, otherwise an error is returned. + ///Deprecated now that the REST gateway supports base64 encoding of bytes + ///fields. + var rHashStr: String = String() + + /// + ///The payment hash of the invoice to be looked up. When using REST, this field + ///must be encoded as base64. + var rHash: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListInvoiceRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///If set, only invoices that are not settled and not canceled will be returned + ///in the response. + var pendingOnly: Bool = false + + /// + ///The index of an invoice that will be used as either the start or end of a + ///query to determine which invoices should be returned in the response. + var indexOffset: UInt64 = 0 + + /// The max number of invoices to return in the response to this query. + var numMaxInvoices: UInt64 = 0 + + /// + ///If set, the invoices returned will result from seeking backwards from the + ///specified index offset. This can be used to paginate backwards. + var reversed: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListInvoiceResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///A list of invoices from the time slice of the time series specified in the + ///request. + var invoices: [Lnrpc_Invoice] = [] + + /// + ///The index of the last item in the set of returned invoices. This can be used + ///to seek further, pagination style. + var lastIndexOffset: UInt64 = 0 + + /// + ///The index of the last item in the set of returned invoices. This can be used + ///to seek backwards, pagination style. + var firstIndexOffset: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_InvoiceSubscription { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///If specified (non-zero), then we'll first start by sending out + ///notifications for all added indexes with an add_index greater than this + ///value. This allows callers to catch up on any events they missed while they + ///weren't connected to the streaming RPC. + var addIndex: UInt64 = 0 + + /// + ///If specified (non-zero), then we'll first start by sending out + ///notifications for all settled indexes with an settle_index greater than + ///this value. This allows callers to catch up on any events they missed while + ///they weren't connected to the streaming RPC. + var settleIndex: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Payment { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The payment hash + var paymentHash: String = String() + + /// Deprecated, use value_sat or value_msat. + var value: Int64 = 0 + + /// Deprecated, use creation_time_ns + var creationDate: Int64 = 0 + + /// Deprecated, use fee_sat or fee_msat. + var fee: Int64 = 0 + + /// The payment preimage + var paymentPreimage: String = String() + + /// The value of the payment in satoshis + var valueSat: Int64 = 0 + + /// The value of the payment in milli-satoshis + var valueMsat: Int64 = 0 + + /// The optional payment request being fulfilled. + var paymentRequest: String = String() + + /// The status of the payment. + var status: Lnrpc_Payment.PaymentStatus = .unknown + + /// The fee paid for this payment in satoshis + var feeSat: Int64 = 0 + + /// The fee paid for this payment in milli-satoshis + var feeMsat: Int64 = 0 + + /// The time in UNIX nanoseconds at which the payment was created. + var creationTimeNs: Int64 = 0 + + /// The HTLCs made in attempt to settle the payment. + var htlcs: [Lnrpc_HTLCAttempt] = [] + + /// + ///The creation index of this payment. Each payment can be uniquely identified + ///by this index, which may not strictly increment by 1 for payments made in + ///older versions of lnd. + var paymentIndex: UInt64 = 0 + + var failureReason: Lnrpc_PaymentFailureReason = .failureReasonNone + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum PaymentStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case inFlight // = 1 + case succeeded // = 2 + case failed // = 3 + case UNRECOGNIZED(Int) + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .inFlight + case 2: self = .succeeded + case 3: self = .failed + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .inFlight: return 1 + case .succeeded: return 2 + case .failed: return 3 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} +} + +#if swift(>=4.2) + +extension Lnrpc_Payment.PaymentStatus: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_Payment.PaymentStatus] = [ + .unknown, + .inFlight, + .succeeded, + .failed, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_HTLCAttempt { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The status of the HTLC. + var status: Lnrpc_HTLCAttempt.HTLCStatus = .inFlight + + /// The route taken by this HTLC. + var route: Lnrpc_Route { + get {return _route ?? Lnrpc_Route()} + set {_route = newValue} + } + /// Returns true if `route` has been explicitly set. + var hasRoute: Bool {return self._route != nil} + /// Clears the value of `route`. Subsequent reads from it will return its default value. + mutating func clearRoute() {self._route = nil} + + /// The time in UNIX nanoseconds at which this HTLC was sent. + var attemptTimeNs: Int64 = 0 + + /// + ///The time in UNIX nanoseconds at which this HTLC was settled or failed. + ///This value will not be set if the HTLC is still IN_FLIGHT. + var resolveTimeNs: Int64 = 0 + + /// Detailed htlc failure info. + var failure: Lnrpc_Failure { + get {return _failure ?? Lnrpc_Failure()} + set {_failure = newValue} + } + /// Returns true if `failure` has been explicitly set. + var hasFailure: Bool {return self._failure != nil} + /// Clears the value of `failure`. Subsequent reads from it will return its default value. + mutating func clearFailure() {self._failure = nil} + + /// The preimage that was used to settle the HTLC. + var preimage: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum HTLCStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case inFlight // = 0 + case succeeded // = 1 + case failed // = 2 + case UNRECOGNIZED(Int) + + init() { + self = .inFlight + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .inFlight + case 1: self = .succeeded + case 2: self = .failed + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .inFlight: return 0 + case .succeeded: return 1 + case .failed: return 2 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} + + fileprivate var _route: Lnrpc_Route? = nil + fileprivate var _failure: Lnrpc_Failure? = nil +} + +#if swift(>=4.2) + +extension Lnrpc_HTLCAttempt.HTLCStatus: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_HTLCAttempt.HTLCStatus] = [ + .inFlight, + .succeeded, + .failed, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_ListPaymentsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///If true, then return payments that have not yet fully completed. This means + ///that pending payments, as well as failed payments will show up if this + ///field is set to true. This flag doesn't change the meaning of the indices, + ///which are tied to individual payments. + var includeIncomplete: Bool = false + + /// + ///The index of a payment that will be used as either the start or end of a + ///query to determine which payments should be returned in the response. The + ///index_offset is exclusive. In the case of a zero index_offset, the query + ///will start with the oldest payment when paginating forwards, or will end + ///with the most recent payment when paginating backwards. + var indexOffset: UInt64 = 0 + + /// The maximal number of payments returned in the response to this query. + var maxPayments: UInt64 = 0 + + /// + ///If set, the payments returned will result from seeking backwards from the + ///specified index offset. This can be used to paginate backwards. The order + ///of the returned payments is always oldest first (ascending index order). + var reversed: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListPaymentsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The list of payments + var payments: [Lnrpc_Payment] = [] + + /// + ///The index of the first item in the set of returned payments. This can be + ///used as the index_offset to continue seeking backwards in the next request. + var firstIndexOffset: UInt64 = 0 + + /// + ///The index of the last item in the set of returned payments. This can be used + ///as the index_offset to continue seeking forwards in the next request. + var lastIndexOffset: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_DeleteAllPaymentsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_DeleteAllPaymentsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_AbandonChannelRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var channelPoint: Lnrpc_ChannelPoint { + get {return _channelPoint ?? Lnrpc_ChannelPoint()} + set {_channelPoint = newValue} + } + /// Returns true if `channelPoint` has been explicitly set. + var hasChannelPoint: Bool {return self._channelPoint != nil} + /// Clears the value of `channelPoint`. Subsequent reads from it will return its default value. + mutating func clearChannelPoint() {self._channelPoint = nil} + + var pendingFundingShimOnly: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _channelPoint: Lnrpc_ChannelPoint? = nil +} + +struct Lnrpc_AbandonChannelResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_DebugLevelRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var show: Bool = false + + var levelSpec: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_DebugLevelResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var subSystems: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PayReqString { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The payment request string to be decoded + var payReq: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PayReq { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var destination: String = String() + + var paymentHash: String = String() + + var numSatoshis: Int64 = 0 + + var timestamp: Int64 = 0 + + var expiry: Int64 = 0 + + var description_p: String = String() + + var descriptionHash: String = String() + + var fallbackAddr: String = String() + + var cltvExpiry: Int64 = 0 + + var routeHints: [Lnrpc_RouteHint] = [] + + var paymentAddr: Data = Data() + + var numMsat: Int64 = 0 + + var features: Dictionary = [:] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Feature { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var name: String = String() + + var isRequired: Bool = false + + var isKnown: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_FeeReportRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelFeeReport { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The short channel id that this fee report belongs to. + var chanID: UInt64 = 0 + + /// The channel that this fee report belongs to. + var channelPoint: String = String() + + /// The base fee charged regardless of the number of milli-satoshis sent. + var baseFeeMsat: Int64 = 0 + + /// The amount charged per milli-satoshis transferred expressed in + /// millionths of a satoshi. + var feePerMil: Int64 = 0 + + /// The effective fee rate in milli-satoshis. Computed by dividing the + /// fee_per_mil value by 1 million. + var feeRate: Double = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_FeeReportResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// An array of channel fee reports which describes the current fee schedule + /// for each channel. + var channelFees: [Lnrpc_ChannelFeeReport] = [] + + /// The total amount of fee revenue (in satoshis) the switch has collected + /// over the past 24 hrs. + var dayFeeSum: UInt64 = 0 + + /// The total amount of fee revenue (in satoshis) the switch has collected + /// over the past 1 week. + var weekFeeSum: UInt64 = 0 + + /// The total amount of fee revenue (in satoshis) the switch has collected + /// over the past 1 month. + var monthFeeSum: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_PolicyUpdateRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var scope: Lnrpc_PolicyUpdateRequest.OneOf_Scope? = nil + + /// If set, then this update applies to all currently active channels. + var global: Bool { + get { + if case .global(let v)? = scope {return v} + return false + } + set {scope = .global(newValue)} + } + + /// If set, this update will target a specific channel. + var chanPoint: Lnrpc_ChannelPoint { + get { + if case .chanPoint(let v)? = scope {return v} + return Lnrpc_ChannelPoint() + } + set {scope = .chanPoint(newValue)} + } + + /// The base fee charged regardless of the number of milli-satoshis sent. + var baseFeeMsat: Int64 = 0 + + /// The effective fee rate in milli-satoshis. The precision of this value + /// goes up to 6 decimal places, so 1e-6. + var feeRate: Double = 0 + + /// The required timelock delta for HTLCs forwarded over the channel. + var timeLockDelta: UInt32 = 0 + + /// If set, the maximum HTLC size in milli-satoshis. If unset, the maximum + /// HTLC will be unchanged. + var maxHtlcMsat: UInt64 = 0 + + /// The minimum HTLC size in milli-satoshis. Only applied if + /// min_htlc_msat_specified is true. + var minHtlcMsat: UInt64 = 0 + + /// If true, min_htlc_msat is applied. + var minHtlcMsatSpecified: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_Scope: Equatable { + /// If set, then this update applies to all currently active channels. + case global(Bool) + /// If set, this update will target a specific channel. + case chanPoint(Lnrpc_ChannelPoint) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_PolicyUpdateRequest.OneOf_Scope, rhs: Lnrpc_PolicyUpdateRequest.OneOf_Scope) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.global, .global): return { + guard case .global(let l) = lhs, case .global(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.chanPoint, .chanPoint): return { + guard case .chanPoint(let l) = lhs, case .chanPoint(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + init() {} +} + +struct Lnrpc_PolicyUpdateResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ForwardingHistoryRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Start time is the starting point of the forwarding history request. All + /// records beyond this point will be included, respecting the end time, and + /// the index offset. + var startTime: UInt64 = 0 + + /// End time is the end point of the forwarding history request. The + /// response will carry at most 50k records between the start time and the + /// end time. The index offset can be used to implement pagination. + var endTime: UInt64 = 0 + + /// Index offset is the offset in the time series to start at. As each + /// response can only contain 50k records, callers can use this to skip + /// around within a packed time series. + var indexOffset: UInt32 = 0 + + /// The max number of events to return in the response to this query. + var numMaxEvents: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ForwardingEvent { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Timestamp is the time (unix epoch offset) that this circuit was + /// completed. + var timestamp: UInt64 = 0 + + /// The incoming channel ID that carried the HTLC that created the circuit. + var chanIDIn: UInt64 = 0 + + /// The outgoing channel ID that carried the preimage that completed the + /// circuit. + var chanIDOut: UInt64 = 0 + + /// The total amount (in satoshis) of the incoming HTLC that created half + /// the circuit. + var amtIn: UInt64 = 0 + + /// The total amount (in satoshis) of the outgoing HTLC that created the + /// second half of the circuit. + var amtOut: UInt64 = 0 + + /// The total fee (in satoshis) that this payment circuit carried. + var fee: UInt64 = 0 + + /// The total fee (in milli-satoshis) that this payment circuit carried. + var feeMsat: UInt64 = 0 + + /// The total amount (in milli-satoshis) of the incoming HTLC that created + /// half the circuit. + var amtInMsat: UInt64 = 0 + + /// The total amount (in milli-satoshis) of the outgoing HTLC that created + /// the second half of the circuit. + var amtOutMsat: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ForwardingHistoryResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// A list of forwarding events from the time slice of the time series + /// specified in the request. + var forwardingEvents: [Lnrpc_ForwardingEvent] = [] + + /// The index of the last time in the set of returned forwarding events. Can + /// be used to seek further, pagination style. + var lastOffsetIndex: UInt32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ExportChannelBackupRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The target channel point to obtain a back up for. + var chanPoint: Lnrpc_ChannelPoint { + get {return _chanPoint ?? Lnrpc_ChannelPoint()} + set {_chanPoint = newValue} + } + /// Returns true if `chanPoint` has been explicitly set. + var hasChanPoint: Bool {return self._chanPoint != nil} + /// Clears the value of `chanPoint`. Subsequent reads from it will return its default value. + mutating func clearChanPoint() {self._chanPoint = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _chanPoint: Lnrpc_ChannelPoint? = nil +} + +struct Lnrpc_ChannelBackup { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///Identifies the channel that this backup belongs to. + var chanPoint: Lnrpc_ChannelPoint { + get {return _chanPoint ?? Lnrpc_ChannelPoint()} + set {_chanPoint = newValue} + } + /// Returns true if `chanPoint` has been explicitly set. + var hasChanPoint: Bool {return self._chanPoint != nil} + /// Clears the value of `chanPoint`. Subsequent reads from it will return its default value. + mutating func clearChanPoint() {self._chanPoint = nil} + + /// + ///Is an encrypted single-chan backup. this can be passed to + ///RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in + ///order to trigger the recovery protocol. When using REST, this field must be + ///encoded as base64. + var chanBackup: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _chanPoint: Lnrpc_ChannelPoint? = nil +} + +struct Lnrpc_MultiChanBackup { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///Is the set of all channels that are included in this multi-channel backup. + var chanPoints: [Lnrpc_ChannelPoint] = [] + + /// + ///A single encrypted blob containing all the static channel backups of the + ///channel listed above. This can be stored as a single file or blob, and + ///safely be replaced with any prior/future versions. When using REST, this + ///field must be encoded as base64. + var multiChanBackup: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChanBackupExportRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChanBackupSnapshot { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The set of new channels that have been added since the last channel backup + ///snapshot was requested. + var singleChanBackups: Lnrpc_ChannelBackups { + get {return _singleChanBackups ?? Lnrpc_ChannelBackups()} + set {_singleChanBackups = newValue} + } + /// Returns true if `singleChanBackups` has been explicitly set. + var hasSingleChanBackups: Bool {return self._singleChanBackups != nil} + /// Clears the value of `singleChanBackups`. Subsequent reads from it will return its default value. + mutating func clearSingleChanBackups() {self._singleChanBackups = nil} + + /// + ///A multi-channel backup that covers all open channels currently known to + ///lnd. + var multiChanBackup: Lnrpc_MultiChanBackup { + get {return _multiChanBackup ?? Lnrpc_MultiChanBackup()} + set {_multiChanBackup = newValue} + } + /// Returns true if `multiChanBackup` has been explicitly set. + var hasMultiChanBackup: Bool {return self._multiChanBackup != nil} + /// Clears the value of `multiChanBackup`. Subsequent reads from it will return its default value. + mutating func clearMultiChanBackup() {self._multiChanBackup = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _singleChanBackups: Lnrpc_ChannelBackups? = nil + fileprivate var _multiChanBackup: Lnrpc_MultiChanBackup? = nil +} + +struct Lnrpc_ChannelBackups { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///A set of single-chan static channel backups. + var chanBackups: [Lnrpc_ChannelBackup] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_RestoreChanBackupRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var backup: Lnrpc_RestoreChanBackupRequest.OneOf_Backup? = nil + + /// + ///The channels to restore as a list of channel/backup pairs. + var chanBackups: Lnrpc_ChannelBackups { + get { + if case .chanBackups(let v)? = backup {return v} + return Lnrpc_ChannelBackups() + } + set {backup = .chanBackups(newValue)} + } + + /// + ///The channels to restore in the packed multi backup format. When using + ///REST, this field must be encoded as base64. + var multiChanBackup: Data { + get { + if case .multiChanBackup(let v)? = backup {return v} + return Data() + } + set {backup = .multiChanBackup(newValue)} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_Backup: Equatable { + /// + ///The channels to restore as a list of channel/backup pairs. + case chanBackups(Lnrpc_ChannelBackups) + /// + ///The channels to restore in the packed multi backup format. When using + ///REST, this field must be encoded as base64. + case multiChanBackup(Data) + + #if !swift(>=4.1) + static func ==(lhs: Lnrpc_RestoreChanBackupRequest.OneOf_Backup, rhs: Lnrpc_RestoreChanBackupRequest.OneOf_Backup) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.chanBackups, .chanBackups): return { + guard case .chanBackups(let l) = lhs, case .chanBackups(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.multiChanBackup, .multiChanBackup): return { + guard case .multiChanBackup(let l) = lhs, case .multiChanBackup(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + init() {} +} + +struct Lnrpc_RestoreBackupResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChannelBackupSubscription { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_VerifyChanBackupResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_MacaroonPermission { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The entity a permission grants access to. + var entity: String = String() + + /// The action that is granted. + var action: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_BakeMacaroonRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The list of permissions the new macaroon should grant. + var permissions: [Lnrpc_MacaroonPermission] = [] + + /// The root key ID used to create the macaroon, must be a positive integer. + var rootKeyID: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_BakeMacaroonResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The hex encoded macaroon, serialized in binary format. + var macaroon: String = String() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListMacaroonIDsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListMacaroonIDsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The list of root key IDs that are in use. + var rootKeyIds: [UInt64] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_DeleteMacaroonIDRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The root key ID to be removed. + var rootKeyID: UInt64 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_DeleteMacaroonIDResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// A boolean indicates that the deletion is successful. + var deleted: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_MacaroonPermissionList { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// A list of macaroon permissions. + var permissions: [Lnrpc_MacaroonPermission] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListPermissionsRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ListPermissionsResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///A map between all RPC method URIs and their required macaroon permissions to + ///access them. + var methodPermissions: Dictionary = [:] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Failure { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Failure code as defined in the Lightning spec + var code: Lnrpc_Failure.FailureCode { + get {return _storage._code} + set {_uniqueStorage()._code = newValue} + } + + /// An optional channel update message. + var channelUpdate: Lnrpc_ChannelUpdate { + get {return _storage._channelUpdate ?? Lnrpc_ChannelUpdate()} + set {_uniqueStorage()._channelUpdate = newValue} + } + /// Returns true if `channelUpdate` has been explicitly set. + var hasChannelUpdate: Bool {return _storage._channelUpdate != nil} + /// Clears the value of `channelUpdate`. Subsequent reads from it will return its default value. + mutating func clearChannelUpdate() {_uniqueStorage()._channelUpdate = nil} + + /// A failure type-dependent htlc value. + var htlcMsat: UInt64 { + get {return _storage._htlcMsat} + set {_uniqueStorage()._htlcMsat = newValue} + } + + /// The sha256 sum of the onion payload. + var onionSha256: Data { + get {return _storage._onionSha256} + set {_uniqueStorage()._onionSha256 = newValue} + } + + /// A failure type-dependent cltv expiry value. + var cltvExpiry: UInt32 { + get {return _storage._cltvExpiry} + set {_uniqueStorage()._cltvExpiry = newValue} + } + + /// A failure type-dependent flags value. + var flags: UInt32 { + get {return _storage._flags} + set {_uniqueStorage()._flags = newValue} + } + + /// + ///The position in the path of the intermediate or final node that generated + ///the failure message. Position zero is the sender node. + var failureSourceIndex: UInt32 { + get {return _storage._failureSourceIndex} + set {_uniqueStorage()._failureSourceIndex = newValue} + } + + /// A failure type-dependent block height. + var height: UInt32 { + get {return _storage._height} + set {_uniqueStorage()._height = newValue} + } + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum FailureCode: SwiftProtobuf.Enum { + typealias RawValue = Int + + /// + ///The numbers assigned in this enumeration match the failure codes as + ///defined in BOLT #4. Because protobuf 3 requires enums to start with 0, + ///a RESERVED value is added. + case reserved // = 0 + case incorrectOrUnknownPaymentDetails // = 1 + case incorrectPaymentAmount // = 2 + case finalIncorrectCltvExpiry // = 3 + case finalIncorrectHtlcAmount // = 4 + case finalExpiryTooSoon // = 5 + case invalidRealm // = 6 + case expiryTooSoon // = 7 + case invalidOnionVersion // = 8 + case invalidOnionHmac // = 9 + case invalidOnionKey // = 10 + case amountBelowMinimum // = 11 + case feeInsufficient // = 12 + case incorrectCltvExpiry // = 13 + case channelDisabled // = 14 + case temporaryChannelFailure // = 15 + case requiredNodeFeatureMissing // = 16 + case requiredChannelFeatureMissing // = 17 + case unknownNextPeer // = 18 + case temporaryNodeFailure // = 19 + case permanentNodeFailure // = 20 + case permanentChannelFailure // = 21 + case expiryTooFar // = 22 + case mppTimeout // = 23 + + /// + ///An internal error occurred. + case internalFailure // = 997 + + /// + ///The error source is known, but the failure itself couldn't be decoded. + case unknownFailure // = 998 + + /// + ///An unreadable failure result is returned if the received failure message + ///cannot be decrypted. In that case the error source is unknown. + case unreadableFailure // = 999 + case UNRECOGNIZED(Int) + + init() { + self = .reserved + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .reserved + case 1: self = .incorrectOrUnknownPaymentDetails + case 2: self = .incorrectPaymentAmount + case 3: self = .finalIncorrectCltvExpiry + case 4: self = .finalIncorrectHtlcAmount + case 5: self = .finalExpiryTooSoon + case 6: self = .invalidRealm + case 7: self = .expiryTooSoon + case 8: self = .invalidOnionVersion + case 9: self = .invalidOnionHmac + case 10: self = .invalidOnionKey + case 11: self = .amountBelowMinimum + case 12: self = .feeInsufficient + case 13: self = .incorrectCltvExpiry + case 14: self = .channelDisabled + case 15: self = .temporaryChannelFailure + case 16: self = .requiredNodeFeatureMissing + case 17: self = .requiredChannelFeatureMissing + case 18: self = .unknownNextPeer + case 19: self = .temporaryNodeFailure + case 20: self = .permanentNodeFailure + case 21: self = .permanentChannelFailure + case 22: self = .expiryTooFar + case 23: self = .mppTimeout + case 997: self = .internalFailure + case 998: self = .unknownFailure + case 999: self = .unreadableFailure + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .reserved: return 0 + case .incorrectOrUnknownPaymentDetails: return 1 + case .incorrectPaymentAmount: return 2 + case .finalIncorrectCltvExpiry: return 3 + case .finalIncorrectHtlcAmount: return 4 + case .finalExpiryTooSoon: return 5 + case .invalidRealm: return 6 + case .expiryTooSoon: return 7 + case .invalidOnionVersion: return 8 + case .invalidOnionHmac: return 9 + case .invalidOnionKey: return 10 + case .amountBelowMinimum: return 11 + case .feeInsufficient: return 12 + case .incorrectCltvExpiry: return 13 + case .channelDisabled: return 14 + case .temporaryChannelFailure: return 15 + case .requiredNodeFeatureMissing: return 16 + case .requiredChannelFeatureMissing: return 17 + case .unknownNextPeer: return 18 + case .temporaryNodeFailure: return 19 + case .permanentNodeFailure: return 20 + case .permanentChannelFailure: return 21 + case .expiryTooFar: return 22 + case .mppTimeout: return 23 + case .internalFailure: return 997 + case .unknownFailure: return 998 + case .unreadableFailure: return 999 + case .UNRECOGNIZED(let i): return i + } + } + + } + + init() {} + + fileprivate var _storage = _StorageClass.defaultInstance +} + +#if swift(>=4.2) + +extension Lnrpc_Failure.FailureCode: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + static var allCases: [Lnrpc_Failure.FailureCode] = [ + .reserved, + .incorrectOrUnknownPaymentDetails, + .incorrectPaymentAmount, + .finalIncorrectCltvExpiry, + .finalIncorrectHtlcAmount, + .finalExpiryTooSoon, + .invalidRealm, + .expiryTooSoon, + .invalidOnionVersion, + .invalidOnionHmac, + .invalidOnionKey, + .amountBelowMinimum, + .feeInsufficient, + .incorrectCltvExpiry, + .channelDisabled, + .temporaryChannelFailure, + .requiredNodeFeatureMissing, + .requiredChannelFeatureMissing, + .unknownNextPeer, + .temporaryNodeFailure, + .permanentNodeFailure, + .permanentChannelFailure, + .expiryTooFar, + .mppTimeout, + .internalFailure, + .unknownFailure, + .unreadableFailure, + ] +} + +#endif // swift(>=4.2) + +struct Lnrpc_ChannelUpdate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The signature that validates the announced data and proves the ownership + ///of node id. + var signature: Data = Data() + + /// + ///The target chain that this channel was opened within. This value + ///should be the genesis hash of the target chain. Along with the short + ///channel ID, this uniquely identifies the channel globally in a + ///blockchain. + var chainHash: Data = Data() + + /// + ///The unique description of the funding transaction. + var chanID: UInt64 = 0 + + /// + ///A timestamp that allows ordering in the case of multiple announcements. + ///We should ignore the message if timestamp is not greater than the + ///last-received. + var timestamp: UInt32 = 0 + + /// + ///The bitfield that describes whether optional fields are present in this + ///update. Currently, the least-significant bit must be set to 1 if the + ///optional field MaxHtlc is present. + var messageFlags: UInt32 = 0 + + /// + ///The bitfield that describes additional meta-data concerning how the + ///update is to be interpreted. Currently, the least-significant bit must be + ///set to 0 if the creating node corresponds to the first node in the + ///previously sent channel announcement and 1 otherwise. If the second bit + ///is set, then the channel is set to be disabled. + var channelFlags: UInt32 = 0 + + /// + ///The minimum number of blocks this node requires to be added to the expiry + ///of HTLCs. This is a security parameter determined by the node operator. + ///This value represents the required gap between the time locks of the + ///incoming and outgoing HTLC's set to this node. + var timeLockDelta: UInt32 = 0 + + /// + ///The minimum HTLC value which will be accepted. + var htlcMinimumMsat: UInt64 = 0 + + /// + ///The base fee that must be used for incoming HTLC's to this particular + ///channel. This value will be tacked onto the required for a payment + ///independent of the size of the payment. + var baseFee: UInt32 = 0 + + /// + ///The fee rate that will be charged per millionth of a satoshi. + var feeRate: UInt32 = 0 + + /// + ///The maximum HTLC value which will be accepted. + var htlcMaximumMsat: UInt64 = 0 + + /// + ///The set of data that was appended to this message, some of which we may + ///not actually know how to iterate or parse. By holding onto this data, we + ///ensure that we're able to properly validate the set of signatures that + ///cover these new fields, and ensure we're able to make upgrades to the + ///network in a forwards compatible manner. + var extraOpaqueData: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_MacaroonId { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var nonce: Data = Data() + + var storageID: Data = Data() + + var ops: [Lnrpc_Op] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_Op { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var entity: String = String() + + var actions: [String] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "lnrpc" + +extension Lnrpc_AddressType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "WITNESS_PUBKEY_HASH"), + 1: .same(proto: "NESTED_PUBKEY_HASH"), + 2: .same(proto: "UNUSED_WITNESS_PUBKEY_HASH"), + 3: .same(proto: "UNUSED_NESTED_PUBKEY_HASH"), + ] +} + +extension Lnrpc_CommitmentType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "LEGACY"), + 1: .same(proto: "STATIC_REMOTE_KEY"), + 2: .same(proto: "ANCHORS"), + 999: .same(proto: "UNKNOWN_COMMITMENT_TYPE"), + ] +} + +extension Lnrpc_Initiator: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "INITIATOR_UNKNOWN"), + 1: .same(proto: "INITIATOR_LOCAL"), + 2: .same(proto: "INITIATOR_REMOTE"), + 3: .same(proto: "INITIATOR_BOTH"), + ] +} + +extension Lnrpc_ResolutionType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "TYPE_UNKNOWN"), + 1: .same(proto: "ANCHOR"), + 2: .same(proto: "INCOMING_HTLC"), + 3: .same(proto: "OUTGOING_HTLC"), + 4: .same(proto: "COMMIT"), + ] +} + +extension Lnrpc_ResolutionOutcome: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "OUTCOME_UNKNOWN"), + 1: .same(proto: "CLAIMED"), + 2: .same(proto: "UNCLAIMED"), + 3: .same(proto: "ABANDONED"), + 4: .same(proto: "FIRST_STAGE"), + 5: .same(proto: "TIMEOUT"), + ] +} + +extension Lnrpc_NodeMetricType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN"), + 1: .same(proto: "BETWEENNESS_CENTRALITY"), + ] +} + +extension Lnrpc_InvoiceHTLCState: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "ACCEPTED"), + 1: .same(proto: "SETTLED"), + 2: .same(proto: "CANCELED"), + ] +} + +extension Lnrpc_PaymentFailureReason: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "FAILURE_REASON_NONE"), + 1: .same(proto: "FAILURE_REASON_TIMEOUT"), + 2: .same(proto: "FAILURE_REASON_NO_ROUTE"), + 3: .same(proto: "FAILURE_REASON_ERROR"), + 4: .same(proto: "FAILURE_REASON_INCORRECT_PAYMENT_DETAILS"), + 5: .same(proto: "FAILURE_REASON_INSUFFICIENT_BALANCE"), + ] +} + +extension Lnrpc_FeatureBit: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "DATALOSS_PROTECT_REQ"), + 1: .same(proto: "DATALOSS_PROTECT_OPT"), + 3: .same(proto: "INITIAL_ROUING_SYNC"), + 4: .same(proto: "UPFRONT_SHUTDOWN_SCRIPT_REQ"), + 5: .same(proto: "UPFRONT_SHUTDOWN_SCRIPT_OPT"), + 6: .same(proto: "GOSSIP_QUERIES_REQ"), + 7: .same(proto: "GOSSIP_QUERIES_OPT"), + 8: .same(proto: "TLV_ONION_REQ"), + 9: .same(proto: "TLV_ONION_OPT"), + 10: .same(proto: "EXT_GOSSIP_QUERIES_REQ"), + 11: .same(proto: "EXT_GOSSIP_QUERIES_OPT"), + 12: .same(proto: "STATIC_REMOTE_KEY_REQ"), + 13: .same(proto: "STATIC_REMOTE_KEY_OPT"), + 14: .same(proto: "PAYMENT_ADDR_REQ"), + 15: .same(proto: "PAYMENT_ADDR_OPT"), + 16: .same(proto: "MPP_REQ"), + 17: .same(proto: "MPP_OPT"), + ] +} + +extension Lnrpc_Utxo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Utxo" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "address_type"), + 2: .same(proto: "address"), + 3: .standard(proto: "amount_sat"), + 4: .standard(proto: "pk_script"), + 5: .same(proto: "outpoint"), + 6: .same(proto: "confirmations"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.addressType) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.address) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.amountSat) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.pkScript) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._outpoint) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.confirmations) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.addressType != .witnessPubkeyHash { + try visitor.visitSingularEnumField(value: self.addressType, fieldNumber: 1) + } + if !self.address.isEmpty { + try visitor.visitSingularStringField(value: self.address, fieldNumber: 2) + } + if self.amountSat != 0 { + try visitor.visitSingularInt64Field(value: self.amountSat, fieldNumber: 3) + } + if !self.pkScript.isEmpty { + try visitor.visitSingularStringField(value: self.pkScript, fieldNumber: 4) + } + if let v = self._outpoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if self.confirmations != 0 { + try visitor.visitSingularInt64Field(value: self.confirmations, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Utxo, rhs: Lnrpc_Utxo) -> Bool { + if lhs.addressType != rhs.addressType {return false} + if lhs.address != rhs.address {return false} + if lhs.amountSat != rhs.amountSat {return false} + if lhs.pkScript != rhs.pkScript {return false} + if lhs._outpoint != rhs._outpoint {return false} + if lhs.confirmations != rhs.confirmations {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Transaction" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "tx_hash"), + 2: .same(proto: "amount"), + 3: .standard(proto: "num_confirmations"), + 4: .standard(proto: "block_hash"), + 5: .standard(proto: "block_height"), + 6: .standard(proto: "time_stamp"), + 7: .standard(proto: "total_fees"), + 8: .standard(proto: "dest_addresses"), + 9: .standard(proto: "raw_tx_hex"), + 10: .same(proto: "label"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.txHash) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.numConfirmations) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.blockHash) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.blockHeight) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.timeStamp) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &self.totalFees) }() + case 8: try { try decoder.decodeRepeatedStringField(value: &self.destAddresses) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.rawTxHex) }() + case 10: try { try decoder.decodeSingularStringField(value: &self.label) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.txHash.isEmpty { + try visitor.visitSingularStringField(value: self.txHash, fieldNumber: 1) + } + if self.amount != 0 { + try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) + } + if self.numConfirmations != 0 { + try visitor.visitSingularInt32Field(value: self.numConfirmations, fieldNumber: 3) + } + if !self.blockHash.isEmpty { + try visitor.visitSingularStringField(value: self.blockHash, fieldNumber: 4) + } + if self.blockHeight != 0 { + try visitor.visitSingularInt32Field(value: self.blockHeight, fieldNumber: 5) + } + if self.timeStamp != 0 { + try visitor.visitSingularInt64Field(value: self.timeStamp, fieldNumber: 6) + } + if self.totalFees != 0 { + try visitor.visitSingularInt64Field(value: self.totalFees, fieldNumber: 7) + } + if !self.destAddresses.isEmpty { + try visitor.visitRepeatedStringField(value: self.destAddresses, fieldNumber: 8) + } + if !self.rawTxHex.isEmpty { + try visitor.visitSingularStringField(value: self.rawTxHex, fieldNumber: 9) + } + if !self.label.isEmpty { + try visitor.visitSingularStringField(value: self.label, fieldNumber: 10) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Transaction, rhs: Lnrpc_Transaction) -> Bool { + if lhs.txHash != rhs.txHash {return false} + if lhs.amount != rhs.amount {return false} + if lhs.numConfirmations != rhs.numConfirmations {return false} + if lhs.blockHash != rhs.blockHash {return false} + if lhs.blockHeight != rhs.blockHeight {return false} + if lhs.timeStamp != rhs.timeStamp {return false} + if lhs.totalFees != rhs.totalFees {return false} + if lhs.destAddresses != rhs.destAddresses {return false} + if lhs.rawTxHex != rhs.rawTxHex {return false} + if lhs.label != rhs.label {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_GetTransactionsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetTransactionsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "start_height"), + 2: .standard(proto: "end_height"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self.startHeight) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.endHeight) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.startHeight != 0 { + try visitor.visitSingularInt32Field(value: self.startHeight, fieldNumber: 1) + } + if self.endHeight != 0 { + try visitor.visitSingularInt32Field(value: self.endHeight, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GetTransactionsRequest, rhs: Lnrpc_GetTransactionsRequest) -> Bool { + if lhs.startHeight != rhs.startHeight {return false} + if lhs.endHeight != rhs.endHeight {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_TransactionDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".TransactionDetails" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "transactions"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.transactions) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.transactions.isEmpty { + try visitor.visitRepeatedMessageField(value: self.transactions, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_TransactionDetails, rhs: Lnrpc_TransactionDetails) -> Bool { + if lhs.transactions != rhs.transactions {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FeeLimit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FeeLimit" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "fixed"), + 3: .standard(proto: "fixed_msat"), + 2: .same(proto: "percent"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + if self.limit != nil {try decoder.handleConflictingOneOf()} + var v: Int64? + try decoder.decodeSingularInt64Field(value: &v) + if let v = v {self.limit = .fixed(v)} + }() + case 2: try { + if self.limit != nil {try decoder.handleConflictingOneOf()} + var v: Int64? + try decoder.decodeSingularInt64Field(value: &v) + if let v = v {self.limit = .percent(v)} + }() + case 3: try { + if self.limit != nil {try decoder.handleConflictingOneOf()} + var v: Int64? + try decoder.decodeSingularInt64Field(value: &v) + if let v = v {self.limit = .fixedMsat(v)} + }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.limit { + case .fixed?: try { + guard case .fixed(let v)? = self.limit else { preconditionFailure() } + try visitor.visitSingularInt64Field(value: v, fieldNumber: 1) + }() + case .percent?: try { + guard case .percent(let v)? = self.limit else { preconditionFailure() } + try visitor.visitSingularInt64Field(value: v, fieldNumber: 2) + }() + case .fixedMsat?: try { + guard case .fixedMsat(let v)? = self.limit else { preconditionFailure() } + try visitor.visitSingularInt64Field(value: v, fieldNumber: 3) + }() + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FeeLimit, rhs: Lnrpc_FeeLimit) -> Bool { + if lhs.limit != rhs.limit {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SendRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "dest"), + 2: .standard(proto: "dest_string"), + 3: .same(proto: "amt"), + 12: .standard(proto: "amt_msat"), + 4: .standard(proto: "payment_hash"), + 5: .standard(proto: "payment_hash_string"), + 6: .standard(proto: "payment_request"), + 7: .standard(proto: "final_cltv_delta"), + 8: .standard(proto: "fee_limit"), + 9: .standard(proto: "outgoing_chan_id"), + 13: .standard(proto: "last_hop_pubkey"), + 10: .standard(proto: "cltv_limit"), + 11: .standard(proto: "dest_custom_records"), + 14: .standard(proto: "allow_self_payment"), + 15: .standard(proto: "dest_features"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.dest) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.destString) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.amt) }() + case 4: try { try decoder.decodeSingularBytesField(value: &self.paymentHash) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.paymentHashString) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.paymentRequest) }() + case 7: try { try decoder.decodeSingularInt32Field(value: &self.finalCltvDelta) }() + case 8: try { try decoder.decodeSingularMessageField(value: &self._feeLimit) }() + case 9: try { try decoder.decodeSingularUInt64Field(value: &self.outgoingChanID) }() + case 10: try { try decoder.decodeSingularUInt32Field(value: &self.cltvLimit) }() + case 11: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.destCustomRecords) }() + case 12: try { try decoder.decodeSingularInt64Field(value: &self.amtMsat) }() + case 13: try { try decoder.decodeSingularBytesField(value: &self.lastHopPubkey) }() + case 14: try { try decoder.decodeSingularBoolField(value: &self.allowSelfPayment) }() + case 15: try { try decoder.decodeRepeatedEnumField(value: &self.destFeatures) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.dest.isEmpty { + try visitor.visitSingularBytesField(value: self.dest, fieldNumber: 1) + } + if !self.destString.isEmpty { + try visitor.visitSingularStringField(value: self.destString, fieldNumber: 2) + } + if self.amt != 0 { + try visitor.visitSingularInt64Field(value: self.amt, fieldNumber: 3) + } + if !self.paymentHash.isEmpty { + try visitor.visitSingularBytesField(value: self.paymentHash, fieldNumber: 4) + } + if !self.paymentHashString.isEmpty { + try visitor.visitSingularStringField(value: self.paymentHashString, fieldNumber: 5) + } + if !self.paymentRequest.isEmpty { + try visitor.visitSingularStringField(value: self.paymentRequest, fieldNumber: 6) + } + if self.finalCltvDelta != 0 { + try visitor.visitSingularInt32Field(value: self.finalCltvDelta, fieldNumber: 7) + } + if let v = self._feeLimit { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if self.outgoingChanID != 0 { + try visitor.visitSingularUInt64Field(value: self.outgoingChanID, fieldNumber: 9) + } + if self.cltvLimit != 0 { + try visitor.visitSingularUInt32Field(value: self.cltvLimit, fieldNumber: 10) + } + if !self.destCustomRecords.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.destCustomRecords, fieldNumber: 11) + } + if self.amtMsat != 0 { + try visitor.visitSingularInt64Field(value: self.amtMsat, fieldNumber: 12) + } + if !self.lastHopPubkey.isEmpty { + try visitor.visitSingularBytesField(value: self.lastHopPubkey, fieldNumber: 13) + } + if self.allowSelfPayment != false { + try visitor.visitSingularBoolField(value: self.allowSelfPayment, fieldNumber: 14) + } + if !self.destFeatures.isEmpty { + try visitor.visitPackedEnumField(value: self.destFeatures, fieldNumber: 15) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SendRequest, rhs: Lnrpc_SendRequest) -> Bool { + if lhs.dest != rhs.dest {return false} + if lhs.destString != rhs.destString {return false} + if lhs.amt != rhs.amt {return false} + if lhs.amtMsat != rhs.amtMsat {return false} + if lhs.paymentHash != rhs.paymentHash {return false} + if lhs.paymentHashString != rhs.paymentHashString {return false} + if lhs.paymentRequest != rhs.paymentRequest {return false} + if lhs.finalCltvDelta != rhs.finalCltvDelta {return false} + if lhs._feeLimit != rhs._feeLimit {return false} + if lhs.outgoingChanID != rhs.outgoingChanID {return false} + if lhs.lastHopPubkey != rhs.lastHopPubkey {return false} + if lhs.cltvLimit != rhs.cltvLimit {return false} + if lhs.destCustomRecords != rhs.destCustomRecords {return false} + if lhs.allowSelfPayment != rhs.allowSelfPayment {return false} + if lhs.destFeatures != rhs.destFeatures {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SendResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "payment_error"), + 2: .standard(proto: "payment_preimage"), + 3: .standard(proto: "payment_route"), + 4: .standard(proto: "payment_hash"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.paymentError) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.paymentPreimage) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._paymentRoute) }() + case 4: try { try decoder.decodeSingularBytesField(value: &self.paymentHash) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.paymentError.isEmpty { + try visitor.visitSingularStringField(value: self.paymentError, fieldNumber: 1) + } + if !self.paymentPreimage.isEmpty { + try visitor.visitSingularBytesField(value: self.paymentPreimage, fieldNumber: 2) + } + if let v = self._paymentRoute { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !self.paymentHash.isEmpty { + try visitor.visitSingularBytesField(value: self.paymentHash, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SendResponse, rhs: Lnrpc_SendResponse) -> Bool { + if lhs.paymentError != rhs.paymentError {return false} + if lhs.paymentPreimage != rhs.paymentPreimage {return false} + if lhs._paymentRoute != rhs._paymentRoute {return false} + if lhs.paymentHash != rhs.paymentHash {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SendToRouteRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendToRouteRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "payment_hash"), + 2: .standard(proto: "payment_hash_string"), + 4: .same(proto: "route"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.paymentHash) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.paymentHashString) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._route) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.paymentHash.isEmpty { + try visitor.visitSingularBytesField(value: self.paymentHash, fieldNumber: 1) + } + if !self.paymentHashString.isEmpty { + try visitor.visitSingularStringField(value: self.paymentHashString, fieldNumber: 2) + } + if let v = self._route { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SendToRouteRequest, rhs: Lnrpc_SendToRouteRequest) -> Bool { + if lhs.paymentHash != rhs.paymentHash {return false} + if lhs.paymentHashString != rhs.paymentHashString {return false} + if lhs._route != rhs._route {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelAcceptRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelAcceptRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "node_pubkey"), + 2: .standard(proto: "chain_hash"), + 3: .standard(proto: "pending_chan_id"), + 4: .standard(proto: "funding_amt"), + 5: .standard(proto: "push_amt"), + 6: .standard(proto: "dust_limit"), + 7: .standard(proto: "max_value_in_flight"), + 8: .standard(proto: "channel_reserve"), + 9: .standard(proto: "min_htlc"), + 10: .standard(proto: "fee_per_kw"), + 11: .standard(proto: "csv_delay"), + 12: .standard(proto: "max_accepted_htlcs"), + 13: .standard(proto: "channel_flags"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.nodePubkey) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.chainHash) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self.pendingChanID) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &self.fundingAmt) }() + case 5: try { try decoder.decodeSingularUInt64Field(value: &self.pushAmt) }() + case 6: try { try decoder.decodeSingularUInt64Field(value: &self.dustLimit) }() + case 7: try { try decoder.decodeSingularUInt64Field(value: &self.maxValueInFlight) }() + case 8: try { try decoder.decodeSingularUInt64Field(value: &self.channelReserve) }() + case 9: try { try decoder.decodeSingularUInt64Field(value: &self.minHtlc) }() + case 10: try { try decoder.decodeSingularUInt64Field(value: &self.feePerKw) }() + case 11: try { try decoder.decodeSingularUInt32Field(value: &self.csvDelay) }() + case 12: try { try decoder.decodeSingularUInt32Field(value: &self.maxAcceptedHtlcs) }() + case 13: try { try decoder.decodeSingularUInt32Field(value: &self.channelFlags) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.nodePubkey.isEmpty { + try visitor.visitSingularBytesField(value: self.nodePubkey, fieldNumber: 1) + } + if !self.chainHash.isEmpty { + try visitor.visitSingularBytesField(value: self.chainHash, fieldNumber: 2) + } + if !self.pendingChanID.isEmpty { + try visitor.visitSingularBytesField(value: self.pendingChanID, fieldNumber: 3) + } + if self.fundingAmt != 0 { + try visitor.visitSingularUInt64Field(value: self.fundingAmt, fieldNumber: 4) + } + if self.pushAmt != 0 { + try visitor.visitSingularUInt64Field(value: self.pushAmt, fieldNumber: 5) + } + if self.dustLimit != 0 { + try visitor.visitSingularUInt64Field(value: self.dustLimit, fieldNumber: 6) + } + if self.maxValueInFlight != 0 { + try visitor.visitSingularUInt64Field(value: self.maxValueInFlight, fieldNumber: 7) + } + if self.channelReserve != 0 { + try visitor.visitSingularUInt64Field(value: self.channelReserve, fieldNumber: 8) + } + if self.minHtlc != 0 { + try visitor.visitSingularUInt64Field(value: self.minHtlc, fieldNumber: 9) + } + if self.feePerKw != 0 { + try visitor.visitSingularUInt64Field(value: self.feePerKw, fieldNumber: 10) + } + if self.csvDelay != 0 { + try visitor.visitSingularUInt32Field(value: self.csvDelay, fieldNumber: 11) + } + if self.maxAcceptedHtlcs != 0 { + try visitor.visitSingularUInt32Field(value: self.maxAcceptedHtlcs, fieldNumber: 12) + } + if self.channelFlags != 0 { + try visitor.visitSingularUInt32Field(value: self.channelFlags, fieldNumber: 13) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelAcceptRequest, rhs: Lnrpc_ChannelAcceptRequest) -> Bool { + if lhs.nodePubkey != rhs.nodePubkey {return false} + if lhs.chainHash != rhs.chainHash {return false} + if lhs.pendingChanID != rhs.pendingChanID {return false} + if lhs.fundingAmt != rhs.fundingAmt {return false} + if lhs.pushAmt != rhs.pushAmt {return false} + if lhs.dustLimit != rhs.dustLimit {return false} + if lhs.maxValueInFlight != rhs.maxValueInFlight {return false} + if lhs.channelReserve != rhs.channelReserve {return false} + if lhs.minHtlc != rhs.minHtlc {return false} + if lhs.feePerKw != rhs.feePerKw {return false} + if lhs.csvDelay != rhs.csvDelay {return false} + if lhs.maxAcceptedHtlcs != rhs.maxAcceptedHtlcs {return false} + if lhs.channelFlags != rhs.channelFlags {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelAcceptResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelAcceptResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "accept"), + 2: .standard(proto: "pending_chan_id"), + 3: .same(proto: "error"), + 4: .standard(proto: "upfront_shutdown"), + 5: .standard(proto: "csv_delay"), + 6: .standard(proto: "reserve_sat"), + 7: .standard(proto: "in_flight_max_msat"), + 8: .standard(proto: "max_htlc_count"), + 9: .standard(proto: "min_htlc_in"), + 10: .standard(proto: "min_accept_depth"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.accept) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.pendingChanID) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.error) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.upfrontShutdown) }() + case 5: try { try decoder.decodeSingularUInt32Field(value: &self.csvDelay) }() + case 6: try { try decoder.decodeSingularUInt64Field(value: &self.reserveSat) }() + case 7: try { try decoder.decodeSingularUInt64Field(value: &self.inFlightMaxMsat) }() + case 8: try { try decoder.decodeSingularUInt32Field(value: &self.maxHtlcCount) }() + case 9: try { try decoder.decodeSingularUInt64Field(value: &self.minHtlcIn) }() + case 10: try { try decoder.decodeSingularUInt32Field(value: &self.minAcceptDepth) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.accept != false { + try visitor.visitSingularBoolField(value: self.accept, fieldNumber: 1) + } + if !self.pendingChanID.isEmpty { + try visitor.visitSingularBytesField(value: self.pendingChanID, fieldNumber: 2) + } + if !self.error.isEmpty { + try visitor.visitSingularStringField(value: self.error, fieldNumber: 3) + } + if !self.upfrontShutdown.isEmpty { + try visitor.visitSingularStringField(value: self.upfrontShutdown, fieldNumber: 4) + } + if self.csvDelay != 0 { + try visitor.visitSingularUInt32Field(value: self.csvDelay, fieldNumber: 5) + } + if self.reserveSat != 0 { + try visitor.visitSingularUInt64Field(value: self.reserveSat, fieldNumber: 6) + } + if self.inFlightMaxMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.inFlightMaxMsat, fieldNumber: 7) + } + if self.maxHtlcCount != 0 { + try visitor.visitSingularUInt32Field(value: self.maxHtlcCount, fieldNumber: 8) + } + if self.minHtlcIn != 0 { + try visitor.visitSingularUInt64Field(value: self.minHtlcIn, fieldNumber: 9) + } + if self.minAcceptDepth != 0 { + try visitor.visitSingularUInt32Field(value: self.minAcceptDepth, fieldNumber: 10) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelAcceptResponse, rhs: Lnrpc_ChannelAcceptResponse) -> Bool { + if lhs.accept != rhs.accept {return false} + if lhs.pendingChanID != rhs.pendingChanID {return false} + if lhs.error != rhs.error {return false} + if lhs.upfrontShutdown != rhs.upfrontShutdown {return false} + if lhs.csvDelay != rhs.csvDelay {return false} + if lhs.reserveSat != rhs.reserveSat {return false} + if lhs.inFlightMaxMsat != rhs.inFlightMaxMsat {return false} + if lhs.maxHtlcCount != rhs.maxHtlcCount {return false} + if lhs.minHtlcIn != rhs.minHtlcIn {return false} + if lhs.minAcceptDepth != rhs.minAcceptDepth {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelPoint" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "funding_txid_bytes"), + 2: .standard(proto: "funding_txid_str"), + 3: .standard(proto: "output_index"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + if self.fundingTxid != nil {try decoder.handleConflictingOneOf()} + var v: Data? + try decoder.decodeSingularBytesField(value: &v) + if let v = v {self.fundingTxid = .fundingTxidBytes(v)} + }() + case 2: try { + if self.fundingTxid != nil {try decoder.handleConflictingOneOf()} + var v: String? + try decoder.decodeSingularStringField(value: &v) + if let v = v {self.fundingTxid = .fundingTxidStr(v)} + }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &self.outputIndex) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.fundingTxid { + case .fundingTxidBytes?: try { + guard case .fundingTxidBytes(let v)? = self.fundingTxid else { preconditionFailure() } + try visitor.visitSingularBytesField(value: v, fieldNumber: 1) + }() + case .fundingTxidStr?: try { + guard case .fundingTxidStr(let v)? = self.fundingTxid else { preconditionFailure() } + try visitor.visitSingularStringField(value: v, fieldNumber: 2) + }() + case nil: break + } + if self.outputIndex != 0 { + try visitor.visitSingularUInt32Field(value: self.outputIndex, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelPoint, rhs: Lnrpc_ChannelPoint) -> Bool { + if lhs.fundingTxid != rhs.fundingTxid {return false} + if lhs.outputIndex != rhs.outputIndex {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_OutPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".OutPoint" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "txid_bytes"), + 2: .standard(proto: "txid_str"), + 3: .standard(proto: "output_index"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.txidBytes) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.txidStr) }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &self.outputIndex) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.txidBytes.isEmpty { + try visitor.visitSingularBytesField(value: self.txidBytes, fieldNumber: 1) + } + if !self.txidStr.isEmpty { + try visitor.visitSingularStringField(value: self.txidStr, fieldNumber: 2) + } + if self.outputIndex != 0 { + try visitor.visitSingularUInt32Field(value: self.outputIndex, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_OutPoint, rhs: Lnrpc_OutPoint) -> Bool { + if lhs.txidBytes != rhs.txidBytes {return false} + if lhs.txidStr != rhs.txidStr {return false} + if lhs.outputIndex != rhs.outputIndex {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_LightningAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".LightningAddress" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "pubkey"), + 2: .same(proto: "host"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.pubkey) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.host) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.pubkey.isEmpty { + try visitor.visitSingularStringField(value: self.pubkey, fieldNumber: 1) + } + if !self.host.isEmpty { + try visitor.visitSingularStringField(value: self.host, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_LightningAddress, rhs: Lnrpc_LightningAddress) -> Bool { + if lhs.pubkey != rhs.pubkey {return false} + if lhs.host != rhs.host {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_EstimateFeeRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".EstimateFeeRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "AddrToAmount"), + 2: .standard(proto: "target_conf"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.addrToAmount) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.targetConf) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.addrToAmount.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.addrToAmount, fieldNumber: 1) + } + if self.targetConf != 0 { + try visitor.visitSingularInt32Field(value: self.targetConf, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_EstimateFeeRequest, rhs: Lnrpc_EstimateFeeRequest) -> Bool { + if lhs.addrToAmount != rhs.addrToAmount {return false} + if lhs.targetConf != rhs.targetConf {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_EstimateFeeResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".EstimateFeeResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "fee_sat"), + 2: .standard(proto: "feerate_sat_per_byte"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt64Field(value: &self.feeSat) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.feerateSatPerByte) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.feeSat != 0 { + try visitor.visitSingularInt64Field(value: self.feeSat, fieldNumber: 1) + } + if self.feerateSatPerByte != 0 { + try visitor.visitSingularInt64Field(value: self.feerateSatPerByte, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_EstimateFeeResponse, rhs: Lnrpc_EstimateFeeResponse) -> Bool { + if lhs.feeSat != rhs.feeSat {return false} + if lhs.feerateSatPerByte != rhs.feerateSatPerByte {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SendManyRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendManyRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "AddrToAmount"), + 3: .standard(proto: "target_conf"), + 5: .standard(proto: "sat_per_byte"), + 6: .same(proto: "label"), + 7: .standard(proto: "min_confs"), + 8: .standard(proto: "spend_unconfirmed"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.addrToAmount) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.targetConf) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.satPerByte) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.label) }() + case 7: try { try decoder.decodeSingularInt32Field(value: &self.minConfs) }() + case 8: try { try decoder.decodeSingularBoolField(value: &self.spendUnconfirmed) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.addrToAmount.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.addrToAmount, fieldNumber: 1) + } + if self.targetConf != 0 { + try visitor.visitSingularInt32Field(value: self.targetConf, fieldNumber: 3) + } + if self.satPerByte != 0 { + try visitor.visitSingularInt64Field(value: self.satPerByte, fieldNumber: 5) + } + if !self.label.isEmpty { + try visitor.visitSingularStringField(value: self.label, fieldNumber: 6) + } + if self.minConfs != 0 { + try visitor.visitSingularInt32Field(value: self.minConfs, fieldNumber: 7) + } + if self.spendUnconfirmed != false { + try visitor.visitSingularBoolField(value: self.spendUnconfirmed, fieldNumber: 8) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SendManyRequest, rhs: Lnrpc_SendManyRequest) -> Bool { + if lhs.addrToAmount != rhs.addrToAmount {return false} + if lhs.targetConf != rhs.targetConf {return false} + if lhs.satPerByte != rhs.satPerByte {return false} + if lhs.label != rhs.label {return false} + if lhs.minConfs != rhs.minConfs {return false} + if lhs.spendUnconfirmed != rhs.spendUnconfirmed {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SendManyResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendManyResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "txid"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.txid) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.txid.isEmpty { + try visitor.visitSingularStringField(value: self.txid, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SendManyResponse, rhs: Lnrpc_SendManyResponse) -> Bool { + if lhs.txid != rhs.txid {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SendCoinsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendCoinsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "addr"), + 2: .same(proto: "amount"), + 3: .standard(proto: "target_conf"), + 5: .standard(proto: "sat_per_byte"), + 6: .standard(proto: "send_all"), + 7: .same(proto: "label"), + 8: .standard(proto: "min_confs"), + 9: .standard(proto: "spend_unconfirmed"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.addr) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.targetConf) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.satPerByte) }() + case 6: try { try decoder.decodeSingularBoolField(value: &self.sendAll) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.label) }() + case 8: try { try decoder.decodeSingularInt32Field(value: &self.minConfs) }() + case 9: try { try decoder.decodeSingularBoolField(value: &self.spendUnconfirmed) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.addr.isEmpty { + try visitor.visitSingularStringField(value: self.addr, fieldNumber: 1) + } + if self.amount != 0 { + try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) + } + if self.targetConf != 0 { + try visitor.visitSingularInt32Field(value: self.targetConf, fieldNumber: 3) + } + if self.satPerByte != 0 { + try visitor.visitSingularInt64Field(value: self.satPerByte, fieldNumber: 5) + } + if self.sendAll != false { + try visitor.visitSingularBoolField(value: self.sendAll, fieldNumber: 6) + } + if !self.label.isEmpty { + try visitor.visitSingularStringField(value: self.label, fieldNumber: 7) + } + if self.minConfs != 0 { + try visitor.visitSingularInt32Field(value: self.minConfs, fieldNumber: 8) + } + if self.spendUnconfirmed != false { + try visitor.visitSingularBoolField(value: self.spendUnconfirmed, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SendCoinsRequest, rhs: Lnrpc_SendCoinsRequest) -> Bool { + if lhs.addr != rhs.addr {return false} + if lhs.amount != rhs.amount {return false} + if lhs.targetConf != rhs.targetConf {return false} + if lhs.satPerByte != rhs.satPerByte {return false} + if lhs.sendAll != rhs.sendAll {return false} + if lhs.label != rhs.label {return false} + if lhs.minConfs != rhs.minConfs {return false} + if lhs.spendUnconfirmed != rhs.spendUnconfirmed {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SendCoinsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SendCoinsResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "txid"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.txid) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.txid.isEmpty { + try visitor.visitSingularStringField(value: self.txid, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SendCoinsResponse, rhs: Lnrpc_SendCoinsResponse) -> Bool { + if lhs.txid != rhs.txid {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListUnspentRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListUnspentRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "min_confs"), + 2: .standard(proto: "max_confs"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self.minConfs) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.maxConfs) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.minConfs != 0 { + try visitor.visitSingularInt32Field(value: self.minConfs, fieldNumber: 1) + } + if self.maxConfs != 0 { + try visitor.visitSingularInt32Field(value: self.maxConfs, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListUnspentRequest, rhs: Lnrpc_ListUnspentRequest) -> Bool { + if lhs.minConfs != rhs.minConfs {return false} + if lhs.maxConfs != rhs.maxConfs {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListUnspentResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListUnspentResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "utxos"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.utxos) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.utxos.isEmpty { + try visitor.visitRepeatedMessageField(value: self.utxos, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListUnspentResponse, rhs: Lnrpc_ListUnspentResponse) -> Bool { + if lhs.utxos != rhs.utxos {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NewAddressRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NewAddressRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.type) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.type != .witnessPubkeyHash { + try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NewAddressRequest, rhs: Lnrpc_NewAddressRequest) -> Bool { + if lhs.type != rhs.type {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NewAddressResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NewAddressResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "address"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.address) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.address.isEmpty { + try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NewAddressResponse, rhs: Lnrpc_NewAddressResponse) -> Bool { + if lhs.address != rhs.address {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SignMessageRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SignMessageRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "msg"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.msg) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.msg.isEmpty { + try visitor.visitSingularBytesField(value: self.msg, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SignMessageRequest, rhs: Lnrpc_SignMessageRequest) -> Bool { + if lhs.msg != rhs.msg {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_SignMessageResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".SignMessageResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "signature"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.signature) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.signature.isEmpty { + try visitor.visitSingularStringField(value: self.signature, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_SignMessageResponse, rhs: Lnrpc_SignMessageResponse) -> Bool { + if lhs.signature != rhs.signature {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_VerifyMessageRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".VerifyMessageRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "msg"), + 2: .same(proto: "signature"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.msg) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.signature) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.msg.isEmpty { + try visitor.visitSingularBytesField(value: self.msg, fieldNumber: 1) + } + if !self.signature.isEmpty { + try visitor.visitSingularStringField(value: self.signature, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_VerifyMessageRequest, rhs: Lnrpc_VerifyMessageRequest) -> Bool { + if lhs.msg != rhs.msg {return false} + if lhs.signature != rhs.signature {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_VerifyMessageResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".VerifyMessageResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "valid"), + 2: .same(proto: "pubkey"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.valid) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.pubkey) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.valid != false { + try visitor.visitSingularBoolField(value: self.valid, fieldNumber: 1) + } + if !self.pubkey.isEmpty { + try visitor.visitSingularStringField(value: self.pubkey, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_VerifyMessageResponse, rhs: Lnrpc_VerifyMessageResponse) -> Bool { + if lhs.valid != rhs.valid {return false} + if lhs.pubkey != rhs.pubkey {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ConnectPeerRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ConnectPeerRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "addr"), + 2: .same(proto: "perm"), + 3: .same(proto: "timeout"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._addr) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.perm) }() + case 3: try { try decoder.decodeSingularUInt64Field(value: &self.timeout) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._addr { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if self.perm != false { + try visitor.visitSingularBoolField(value: self.perm, fieldNumber: 2) + } + if self.timeout != 0 { + try visitor.visitSingularUInt64Field(value: self.timeout, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ConnectPeerRequest, rhs: Lnrpc_ConnectPeerRequest) -> Bool { + if lhs._addr != rhs._addr {return false} + if lhs.perm != rhs.perm {return false} + if lhs.timeout != rhs.timeout {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ConnectPeerResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ConnectPeerResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ConnectPeerResponse, rhs: Lnrpc_ConnectPeerResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_DisconnectPeerRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DisconnectPeerRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pub_key"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.pubKey) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.pubKey.isEmpty { + try visitor.visitSingularStringField(value: self.pubKey, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_DisconnectPeerRequest, rhs: Lnrpc_DisconnectPeerRequest) -> Bool { + if lhs.pubKey != rhs.pubKey {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_DisconnectPeerResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DisconnectPeerResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_DisconnectPeerResponse, rhs: Lnrpc_DisconnectPeerResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_HTLC: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".HTLC" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "incoming"), + 2: .same(proto: "amount"), + 3: .standard(proto: "hash_lock"), + 4: .standard(proto: "expiration_height"), + 5: .standard(proto: "htlc_index"), + 6: .standard(proto: "forwarding_channel"), + 7: .standard(proto: "forwarding_htlc_index"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.incoming) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self.hashLock) }() + case 4: try { try decoder.decodeSingularUInt32Field(value: &self.expirationHeight) }() + case 5: try { try decoder.decodeSingularUInt64Field(value: &self.htlcIndex) }() + case 6: try { try decoder.decodeSingularUInt64Field(value: &self.forwardingChannel) }() + case 7: try { try decoder.decodeSingularUInt64Field(value: &self.forwardingHtlcIndex) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.incoming != false { + try visitor.visitSingularBoolField(value: self.incoming, fieldNumber: 1) + } + if self.amount != 0 { + try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) + } + if !self.hashLock.isEmpty { + try visitor.visitSingularBytesField(value: self.hashLock, fieldNumber: 3) + } + if self.expirationHeight != 0 { + try visitor.visitSingularUInt32Field(value: self.expirationHeight, fieldNumber: 4) + } + if self.htlcIndex != 0 { + try visitor.visitSingularUInt64Field(value: self.htlcIndex, fieldNumber: 5) + } + if self.forwardingChannel != 0 { + try visitor.visitSingularUInt64Field(value: self.forwardingChannel, fieldNumber: 6) + } + if self.forwardingHtlcIndex != 0 { + try visitor.visitSingularUInt64Field(value: self.forwardingHtlcIndex, fieldNumber: 7) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_HTLC, rhs: Lnrpc_HTLC) -> Bool { + if lhs.incoming != rhs.incoming {return false} + if lhs.amount != rhs.amount {return false} + if lhs.hashLock != rhs.hashLock {return false} + if lhs.expirationHeight != rhs.expirationHeight {return false} + if lhs.htlcIndex != rhs.htlcIndex {return false} + if lhs.forwardingChannel != rhs.forwardingChannel {return false} + if lhs.forwardingHtlcIndex != rhs.forwardingHtlcIndex {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelConstraints: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelConstraints" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "csv_delay"), + 2: .standard(proto: "chan_reserve_sat"), + 3: .standard(proto: "dust_limit_sat"), + 4: .standard(proto: "max_pending_amt_msat"), + 5: .standard(proto: "min_htlc_msat"), + 6: .standard(proto: "max_accepted_htlcs"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt32Field(value: &self.csvDelay) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.chanReserveSat) }() + case 3: try { try decoder.decodeSingularUInt64Field(value: &self.dustLimitSat) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &self.maxPendingAmtMsat) }() + case 5: try { try decoder.decodeSingularUInt64Field(value: &self.minHtlcMsat) }() + case 6: try { try decoder.decodeSingularUInt32Field(value: &self.maxAcceptedHtlcs) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.csvDelay != 0 { + try visitor.visitSingularUInt32Field(value: self.csvDelay, fieldNumber: 1) + } + if self.chanReserveSat != 0 { + try visitor.visitSingularUInt64Field(value: self.chanReserveSat, fieldNumber: 2) + } + if self.dustLimitSat != 0 { + try visitor.visitSingularUInt64Field(value: self.dustLimitSat, fieldNumber: 3) + } + if self.maxPendingAmtMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.maxPendingAmtMsat, fieldNumber: 4) + } + if self.minHtlcMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.minHtlcMsat, fieldNumber: 5) + } + if self.maxAcceptedHtlcs != 0 { + try visitor.visitSingularUInt32Field(value: self.maxAcceptedHtlcs, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelConstraints, rhs: Lnrpc_ChannelConstraints) -> Bool { + if lhs.csvDelay != rhs.csvDelay {return false} + if lhs.chanReserveSat != rhs.chanReserveSat {return false} + if lhs.dustLimitSat != rhs.dustLimitSat {return false} + if lhs.maxPendingAmtMsat != rhs.maxPendingAmtMsat {return false} + if lhs.minHtlcMsat != rhs.minHtlcMsat {return false} + if lhs.maxAcceptedHtlcs != rhs.maxAcceptedHtlcs {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Channel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Channel" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "active"), + 2: .standard(proto: "remote_pubkey"), + 3: .standard(proto: "channel_point"), + 4: .standard(proto: "chan_id"), + 5: .same(proto: "capacity"), + 6: .standard(proto: "local_balance"), + 7: .standard(proto: "remote_balance"), + 8: .standard(proto: "commit_fee"), + 9: .standard(proto: "commit_weight"), + 10: .standard(proto: "fee_per_kw"), + 11: .standard(proto: "unsettled_balance"), + 12: .standard(proto: "total_satoshis_sent"), + 13: .standard(proto: "total_satoshis_received"), + 14: .standard(proto: "num_updates"), + 15: .standard(proto: "pending_htlcs"), + 16: .standard(proto: "csv_delay"), + 17: .same(proto: "private"), + 18: .same(proto: "initiator"), + 19: .standard(proto: "chan_status_flags"), + 20: .standard(proto: "local_chan_reserve_sat"), + 21: .standard(proto: "remote_chan_reserve_sat"), + 22: .standard(proto: "static_remote_key"), + 26: .standard(proto: "commitment_type"), + 23: .same(proto: "lifetime"), + 24: .same(proto: "uptime"), + 25: .standard(proto: "close_address"), + 27: .standard(proto: "push_amount_sat"), + 28: .standard(proto: "thaw_height"), + 29: .standard(proto: "local_constraints"), + 30: .standard(proto: "remote_constraints"), + ] + + fileprivate class _StorageClass { + var _active: Bool = false + var _remotePubkey: String = String() + var _channelPoint: String = String() + var _chanID: UInt64 = 0 + var _capacity: Int64 = 0 + var _localBalance: Int64 = 0 + var _remoteBalance: Int64 = 0 + var _commitFee: Int64 = 0 + var _commitWeight: Int64 = 0 + var _feePerKw: Int64 = 0 + var _unsettledBalance: Int64 = 0 + var _totalSatoshisSent: Int64 = 0 + var _totalSatoshisReceived: Int64 = 0 + var _numUpdates: UInt64 = 0 + var _pendingHtlcs: [Lnrpc_HTLC] = [] + var _csvDelay: UInt32 = 0 + var _private: Bool = false + var _initiator: Bool = false + var _chanStatusFlags: String = String() + var _localChanReserveSat: Int64 = 0 + var _remoteChanReserveSat: Int64 = 0 + var _staticRemoteKey: Bool = false + var _commitmentType: Lnrpc_CommitmentType = .legacy + var _lifetime: Int64 = 0 + var _uptime: Int64 = 0 + var _closeAddress: String = String() + var _pushAmountSat: UInt64 = 0 + var _thawHeight: UInt32 = 0 + var _localConstraints: Lnrpc_ChannelConstraints? = nil + var _remoteConstraints: Lnrpc_ChannelConstraints? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _active = source._active + _remotePubkey = source._remotePubkey + _channelPoint = source._channelPoint + _chanID = source._chanID + _capacity = source._capacity + _localBalance = source._localBalance + _remoteBalance = source._remoteBalance + _commitFee = source._commitFee + _commitWeight = source._commitWeight + _feePerKw = source._feePerKw + _unsettledBalance = source._unsettledBalance + _totalSatoshisSent = source._totalSatoshisSent + _totalSatoshisReceived = source._totalSatoshisReceived + _numUpdates = source._numUpdates + _pendingHtlcs = source._pendingHtlcs + _csvDelay = source._csvDelay + _private = source._private + _initiator = source._initiator + _chanStatusFlags = source._chanStatusFlags + _localChanReserveSat = source._localChanReserveSat + _remoteChanReserveSat = source._remoteChanReserveSat + _staticRemoteKey = source._staticRemoteKey + _commitmentType = source._commitmentType + _lifetime = source._lifetime + _uptime = source._uptime + _closeAddress = source._closeAddress + _pushAmountSat = source._pushAmountSat + _thawHeight = source._thawHeight + _localConstraints = source._localConstraints + _remoteConstraints = source._remoteConstraints + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &_storage._active) }() + case 2: try { try decoder.decodeSingularStringField(value: &_storage._remotePubkey) }() + case 3: try { try decoder.decodeSingularStringField(value: &_storage._channelPoint) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._chanID) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &_storage._capacity) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &_storage._localBalance) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &_storage._remoteBalance) }() + case 8: try { try decoder.decodeSingularInt64Field(value: &_storage._commitFee) }() + case 9: try { try decoder.decodeSingularInt64Field(value: &_storage._commitWeight) }() + case 10: try { try decoder.decodeSingularInt64Field(value: &_storage._feePerKw) }() + case 11: try { try decoder.decodeSingularInt64Field(value: &_storage._unsettledBalance) }() + case 12: try { try decoder.decodeSingularInt64Field(value: &_storage._totalSatoshisSent) }() + case 13: try { try decoder.decodeSingularInt64Field(value: &_storage._totalSatoshisReceived) }() + case 14: try { try decoder.decodeSingularUInt64Field(value: &_storage._numUpdates) }() + case 15: try { try decoder.decodeRepeatedMessageField(value: &_storage._pendingHtlcs) }() + case 16: try { try decoder.decodeSingularUInt32Field(value: &_storage._csvDelay) }() + case 17: try { try decoder.decodeSingularBoolField(value: &_storage._private) }() + case 18: try { try decoder.decodeSingularBoolField(value: &_storage._initiator) }() + case 19: try { try decoder.decodeSingularStringField(value: &_storage._chanStatusFlags) }() + case 20: try { try decoder.decodeSingularInt64Field(value: &_storage._localChanReserveSat) }() + case 21: try { try decoder.decodeSingularInt64Field(value: &_storage._remoteChanReserveSat) }() + case 22: try { try decoder.decodeSingularBoolField(value: &_storage._staticRemoteKey) }() + case 23: try { try decoder.decodeSingularInt64Field(value: &_storage._lifetime) }() + case 24: try { try decoder.decodeSingularInt64Field(value: &_storage._uptime) }() + case 25: try { try decoder.decodeSingularStringField(value: &_storage._closeAddress) }() + case 26: try { try decoder.decodeSingularEnumField(value: &_storage._commitmentType) }() + case 27: try { try decoder.decodeSingularUInt64Field(value: &_storage._pushAmountSat) }() + case 28: try { try decoder.decodeSingularUInt32Field(value: &_storage._thawHeight) }() + case 29: try { try decoder.decodeSingularMessageField(value: &_storage._localConstraints) }() + case 30: try { try decoder.decodeSingularMessageField(value: &_storage._remoteConstraints) }() + default: break + } + } + } + } + + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._active != false { + try visitor.visitSingularBoolField(value: _storage._active, fieldNumber: 1) + } + if !_storage._remotePubkey.isEmpty { + try visitor.visitSingularStringField(value: _storage._remotePubkey, fieldNumber: 2) + } + if !_storage._channelPoint.isEmpty { + try visitor.visitSingularStringField(value: _storage._channelPoint, fieldNumber: 3) + } + if _storage._chanID != 0 { + try visitor.visitSingularUInt64Field(value: _storage._chanID, fieldNumber: 4) + } + if _storage._capacity != 0 { + try visitor.visitSingularInt64Field(value: _storage._capacity, fieldNumber: 5) + } + if _storage._localBalance != 0 { + try visitor.visitSingularInt64Field(value: _storage._localBalance, fieldNumber: 6) + } + if _storage._remoteBalance != 0 { + try visitor.visitSingularInt64Field(value: _storage._remoteBalance, fieldNumber: 7) + } + if _storage._commitFee != 0 { + try visitor.visitSingularInt64Field(value: _storage._commitFee, fieldNumber: 8) + } + if _storage._commitWeight != 0 { + try visitor.visitSingularInt64Field(value: _storage._commitWeight, fieldNumber: 9) + } + if _storage._feePerKw != 0 { + try visitor.visitSingularInt64Field(value: _storage._feePerKw, fieldNumber: 10) + } + if _storage._unsettledBalance != 0 { + try visitor.visitSingularInt64Field(value: _storage._unsettledBalance, fieldNumber: 11) + } + if _storage._totalSatoshisSent != 0 { + try visitor.visitSingularInt64Field(value: _storage._totalSatoshisSent, fieldNumber: 12) + } + if _storage._totalSatoshisReceived != 0 { + try visitor.visitSingularInt64Field(value: _storage._totalSatoshisReceived, fieldNumber: 13) + } + if _storage._numUpdates != 0 { + try visitor.visitSingularUInt64Field(value: _storage._numUpdates, fieldNumber: 14) + } + if !_storage._pendingHtlcs.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._pendingHtlcs, fieldNumber: 15) + } + if _storage._csvDelay != 0 { + try visitor.visitSingularUInt32Field(value: _storage._csvDelay, fieldNumber: 16) + } + if _storage._private != false { + try visitor.visitSingularBoolField(value: _storage._private, fieldNumber: 17) + } + if _storage._initiator != false { + try visitor.visitSingularBoolField(value: _storage._initiator, fieldNumber: 18) + } + if !_storage._chanStatusFlags.isEmpty { + try visitor.visitSingularStringField(value: _storage._chanStatusFlags, fieldNumber: 19) + } + if _storage._localChanReserveSat != 0 { + try visitor.visitSingularInt64Field(value: _storage._localChanReserveSat, fieldNumber: 20) + } + if _storage._remoteChanReserveSat != 0 { + try visitor.visitSingularInt64Field(value: _storage._remoteChanReserveSat, fieldNumber: 21) + } + if _storage._staticRemoteKey != false { + try visitor.visitSingularBoolField(value: _storage._staticRemoteKey, fieldNumber: 22) + } + if _storage._lifetime != 0 { + try visitor.visitSingularInt64Field(value: _storage._lifetime, fieldNumber: 23) + } + if _storage._uptime != 0 { + try visitor.visitSingularInt64Field(value: _storage._uptime, fieldNumber: 24) + } + if !_storage._closeAddress.isEmpty { + try visitor.visitSingularStringField(value: _storage._closeAddress, fieldNumber: 25) + } + if _storage._commitmentType != .legacy { + try visitor.visitSingularEnumField(value: _storage._commitmentType, fieldNumber: 26) + } + if _storage._pushAmountSat != 0 { + try visitor.visitSingularUInt64Field(value: _storage._pushAmountSat, fieldNumber: 27) + } + if _storage._thawHeight != 0 { + try visitor.visitSingularUInt32Field(value: _storage._thawHeight, fieldNumber: 28) + } + if let v = _storage._localConstraints { + try visitor.visitSingularMessageField(value: v, fieldNumber: 29) + } + if let v = _storage._remoteConstraints { + try visitor.visitSingularMessageField(value: v, fieldNumber: 30) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Channel, rhs: Lnrpc_Channel) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._active != rhs_storage._active {return false} + if _storage._remotePubkey != rhs_storage._remotePubkey {return false} + if _storage._channelPoint != rhs_storage._channelPoint {return false} + if _storage._chanID != rhs_storage._chanID {return false} + if _storage._capacity != rhs_storage._capacity {return false} + if _storage._localBalance != rhs_storage._localBalance {return false} + if _storage._remoteBalance != rhs_storage._remoteBalance {return false} + if _storage._commitFee != rhs_storage._commitFee {return false} + if _storage._commitWeight != rhs_storage._commitWeight {return false} + if _storage._feePerKw != rhs_storage._feePerKw {return false} + if _storage._unsettledBalance != rhs_storage._unsettledBalance {return false} + if _storage._totalSatoshisSent != rhs_storage._totalSatoshisSent {return false} + if _storage._totalSatoshisReceived != rhs_storage._totalSatoshisReceived {return false} + if _storage._numUpdates != rhs_storage._numUpdates {return false} + if _storage._pendingHtlcs != rhs_storage._pendingHtlcs {return false} + if _storage._csvDelay != rhs_storage._csvDelay {return false} + if _storage._private != rhs_storage._private {return false} + if _storage._initiator != rhs_storage._initiator {return false} + if _storage._chanStatusFlags != rhs_storage._chanStatusFlags {return false} + if _storage._localChanReserveSat != rhs_storage._localChanReserveSat {return false} + if _storage._remoteChanReserveSat != rhs_storage._remoteChanReserveSat {return false} + if _storage._staticRemoteKey != rhs_storage._staticRemoteKey {return false} + if _storage._commitmentType != rhs_storage._commitmentType {return false} + if _storage._lifetime != rhs_storage._lifetime {return false} + if _storage._uptime != rhs_storage._uptime {return false} + if _storage._closeAddress != rhs_storage._closeAddress {return false} + if _storage._pushAmountSat != rhs_storage._pushAmountSat {return false} + if _storage._thawHeight != rhs_storage._thawHeight {return false} + if _storage._localConstraints != rhs_storage._localConstraints {return false} + if _storage._remoteConstraints != rhs_storage._remoteConstraints {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListChannelsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListChannelsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "active_only"), + 2: .standard(proto: "inactive_only"), + 3: .standard(proto: "public_only"), + 4: .standard(proto: "private_only"), + 5: .same(proto: "peer"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.activeOnly) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.inactiveOnly) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.publicOnly) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.privateOnly) }() + case 5: try { try decoder.decodeSingularBytesField(value: &self.peer) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.activeOnly != false { + try visitor.visitSingularBoolField(value: self.activeOnly, fieldNumber: 1) + } + if self.inactiveOnly != false { + try visitor.visitSingularBoolField(value: self.inactiveOnly, fieldNumber: 2) + } + if self.publicOnly != false { + try visitor.visitSingularBoolField(value: self.publicOnly, fieldNumber: 3) + } + if self.privateOnly != false { + try visitor.visitSingularBoolField(value: self.privateOnly, fieldNumber: 4) + } + if !self.peer.isEmpty { + try visitor.visitSingularBytesField(value: self.peer, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListChannelsRequest, rhs: Lnrpc_ListChannelsRequest) -> Bool { + if lhs.activeOnly != rhs.activeOnly {return false} + if lhs.inactiveOnly != rhs.inactiveOnly {return false} + if lhs.publicOnly != rhs.publicOnly {return false} + if lhs.privateOnly != rhs.privateOnly {return false} + if lhs.peer != rhs.peer {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListChannelsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListChannelsResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 11: .same(proto: "channels"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 11: try { try decoder.decodeRepeatedMessageField(value: &self.channels) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.channels.isEmpty { + try visitor.visitRepeatedMessageField(value: self.channels, fieldNumber: 11) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListChannelsResponse, rhs: Lnrpc_ListChannelsResponse) -> Bool { + if lhs.channels != rhs.channels {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelCloseSummary: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelCloseSummary" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "channel_point"), + 2: .standard(proto: "chan_id"), + 3: .standard(proto: "chain_hash"), + 4: .standard(proto: "closing_tx_hash"), + 5: .standard(proto: "remote_pubkey"), + 6: .same(proto: "capacity"), + 7: .standard(proto: "close_height"), + 8: .standard(proto: "settled_balance"), + 9: .standard(proto: "time_locked_balance"), + 10: .standard(proto: "close_type"), + 11: .standard(proto: "open_initiator"), + 12: .standard(proto: "close_initiator"), + 13: .same(proto: "resolutions"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.channelPoint) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.chainHash) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.closingTxHash) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.remotePubkey) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.capacity) }() + case 7: try { try decoder.decodeSingularUInt32Field(value: &self.closeHeight) }() + case 8: try { try decoder.decodeSingularInt64Field(value: &self.settledBalance) }() + case 9: try { try decoder.decodeSingularInt64Field(value: &self.timeLockedBalance) }() + case 10: try { try decoder.decodeSingularEnumField(value: &self.closeType) }() + case 11: try { try decoder.decodeSingularEnumField(value: &self.openInitiator) }() + case 12: try { try decoder.decodeSingularEnumField(value: &self.closeInitiator) }() + case 13: try { try decoder.decodeRepeatedMessageField(value: &self.resolutions) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.channelPoint.isEmpty { + try visitor.visitSingularStringField(value: self.channelPoint, fieldNumber: 1) + } + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 2) + } + if !self.chainHash.isEmpty { + try visitor.visitSingularStringField(value: self.chainHash, fieldNumber: 3) + } + if !self.closingTxHash.isEmpty { + try visitor.visitSingularStringField(value: self.closingTxHash, fieldNumber: 4) + } + if !self.remotePubkey.isEmpty { + try visitor.visitSingularStringField(value: self.remotePubkey, fieldNumber: 5) + } + if self.capacity != 0 { + try visitor.visitSingularInt64Field(value: self.capacity, fieldNumber: 6) + } + if self.closeHeight != 0 { + try visitor.visitSingularUInt32Field(value: self.closeHeight, fieldNumber: 7) + } + if self.settledBalance != 0 { + try visitor.visitSingularInt64Field(value: self.settledBalance, fieldNumber: 8) + } + if self.timeLockedBalance != 0 { + try visitor.visitSingularInt64Field(value: self.timeLockedBalance, fieldNumber: 9) + } + if self.closeType != .cooperativeClose { + try visitor.visitSingularEnumField(value: self.closeType, fieldNumber: 10) + } + if self.openInitiator != .unknown { + try visitor.visitSingularEnumField(value: self.openInitiator, fieldNumber: 11) + } + if self.closeInitiator != .unknown { + try visitor.visitSingularEnumField(value: self.closeInitiator, fieldNumber: 12) + } + if !self.resolutions.isEmpty { + try visitor.visitRepeatedMessageField(value: self.resolutions, fieldNumber: 13) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelCloseSummary, rhs: Lnrpc_ChannelCloseSummary) -> Bool { + if lhs.channelPoint != rhs.channelPoint {return false} + if lhs.chanID != rhs.chanID {return false} + if lhs.chainHash != rhs.chainHash {return false} + if lhs.closingTxHash != rhs.closingTxHash {return false} + if lhs.remotePubkey != rhs.remotePubkey {return false} + if lhs.capacity != rhs.capacity {return false} + if lhs.closeHeight != rhs.closeHeight {return false} + if lhs.settledBalance != rhs.settledBalance {return false} + if lhs.timeLockedBalance != rhs.timeLockedBalance {return false} + if lhs.closeType != rhs.closeType {return false} + if lhs.openInitiator != rhs.openInitiator {return false} + if lhs.closeInitiator != rhs.closeInitiator {return false} + if lhs.resolutions != rhs.resolutions {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelCloseSummary.ClosureType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "COOPERATIVE_CLOSE"), + 1: .same(proto: "LOCAL_FORCE_CLOSE"), + 2: .same(proto: "REMOTE_FORCE_CLOSE"), + 3: .same(proto: "BREACH_CLOSE"), + 4: .same(proto: "FUNDING_CANCELED"), + 5: .same(proto: "ABANDONED"), + ] +} + +extension Lnrpc_Resolution: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Resolution" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "resolution_type"), + 2: .same(proto: "outcome"), + 3: .same(proto: "outpoint"), + 4: .standard(proto: "amount_sat"), + 5: .standard(proto: "sweep_txid"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.resolutionType) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.outcome) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._outpoint) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &self.amountSat) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.sweepTxid) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.resolutionType != .typeUnknown { + try visitor.visitSingularEnumField(value: self.resolutionType, fieldNumber: 1) + } + if self.outcome != .outcomeUnknown { + try visitor.visitSingularEnumField(value: self.outcome, fieldNumber: 2) + } + if let v = self._outpoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if self.amountSat != 0 { + try visitor.visitSingularUInt64Field(value: self.amountSat, fieldNumber: 4) + } + if !self.sweepTxid.isEmpty { + try visitor.visitSingularStringField(value: self.sweepTxid, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Resolution, rhs: Lnrpc_Resolution) -> Bool { + if lhs.resolutionType != rhs.resolutionType {return false} + if lhs.outcome != rhs.outcome {return false} + if lhs._outpoint != rhs._outpoint {return false} + if lhs.amountSat != rhs.amountSat {return false} + if lhs.sweepTxid != rhs.sweepTxid {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ClosedChannelsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ClosedChannelsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "cooperative"), + 2: .standard(proto: "local_force"), + 3: .standard(proto: "remote_force"), + 4: .same(proto: "breach"), + 5: .standard(proto: "funding_canceled"), + 6: .same(proto: "abandoned"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.cooperative) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.localForce) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.remoteForce) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.breach) }() + case 5: try { try decoder.decodeSingularBoolField(value: &self.fundingCanceled) }() + case 6: try { try decoder.decodeSingularBoolField(value: &self.abandoned) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.cooperative != false { + try visitor.visitSingularBoolField(value: self.cooperative, fieldNumber: 1) + } + if self.localForce != false { + try visitor.visitSingularBoolField(value: self.localForce, fieldNumber: 2) + } + if self.remoteForce != false { + try visitor.visitSingularBoolField(value: self.remoteForce, fieldNumber: 3) + } + if self.breach != false { + try visitor.visitSingularBoolField(value: self.breach, fieldNumber: 4) + } + if self.fundingCanceled != false { + try visitor.visitSingularBoolField(value: self.fundingCanceled, fieldNumber: 5) + } + if self.abandoned != false { + try visitor.visitSingularBoolField(value: self.abandoned, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ClosedChannelsRequest, rhs: Lnrpc_ClosedChannelsRequest) -> Bool { + if lhs.cooperative != rhs.cooperative {return false} + if lhs.localForce != rhs.localForce {return false} + if lhs.remoteForce != rhs.remoteForce {return false} + if lhs.breach != rhs.breach {return false} + if lhs.fundingCanceled != rhs.fundingCanceled {return false} + if lhs.abandoned != rhs.abandoned {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ClosedChannelsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ClosedChannelsResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "channels"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.channels) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.channels.isEmpty { + try visitor.visitRepeatedMessageField(value: self.channels, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ClosedChannelsResponse, rhs: Lnrpc_ClosedChannelsResponse) -> Bool { + if lhs.channels != rhs.channels {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Peer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Peer" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pub_key"), + 3: .same(proto: "address"), + 4: .standard(proto: "bytes_sent"), + 5: .standard(proto: "bytes_recv"), + 6: .standard(proto: "sat_sent"), + 7: .standard(proto: "sat_recv"), + 8: .same(proto: "inbound"), + 9: .standard(proto: "ping_time"), + 10: .standard(proto: "sync_type"), + 11: .same(proto: "features"), + 12: .same(proto: "errors"), + 13: .standard(proto: "flap_count"), + 14: .standard(proto: "last_flap_ns"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.pubKey) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.address) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &self.bytesSent) }() + case 5: try { try decoder.decodeSingularUInt64Field(value: &self.bytesRecv) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.satSent) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &self.satRecv) }() + case 8: try { try decoder.decodeSingularBoolField(value: &self.inbound) }() + case 9: try { try decoder.decodeSingularInt64Field(value: &self.pingTime) }() + case 10: try { try decoder.decodeSingularEnumField(value: &self.syncType) }() + case 11: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.features) }() + case 12: try { try decoder.decodeRepeatedMessageField(value: &self.errors) }() + case 13: try { try decoder.decodeSingularInt32Field(value: &self.flapCount) }() + case 14: try { try decoder.decodeSingularInt64Field(value: &self.lastFlapNs) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.pubKey.isEmpty { + try visitor.visitSingularStringField(value: self.pubKey, fieldNumber: 1) + } + if !self.address.isEmpty { + try visitor.visitSingularStringField(value: self.address, fieldNumber: 3) + } + if self.bytesSent != 0 { + try visitor.visitSingularUInt64Field(value: self.bytesSent, fieldNumber: 4) + } + if self.bytesRecv != 0 { + try visitor.visitSingularUInt64Field(value: self.bytesRecv, fieldNumber: 5) + } + if self.satSent != 0 { + try visitor.visitSingularInt64Field(value: self.satSent, fieldNumber: 6) + } + if self.satRecv != 0 { + try visitor.visitSingularInt64Field(value: self.satRecv, fieldNumber: 7) + } + if self.inbound != false { + try visitor.visitSingularBoolField(value: self.inbound, fieldNumber: 8) + } + if self.pingTime != 0 { + try visitor.visitSingularInt64Field(value: self.pingTime, fieldNumber: 9) + } + if self.syncType != .unknownSync { + try visitor.visitSingularEnumField(value: self.syncType, fieldNumber: 10) + } + if !self.features.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.features, fieldNumber: 11) + } + if !self.errors.isEmpty { + try visitor.visitRepeatedMessageField(value: self.errors, fieldNumber: 12) + } + if self.flapCount != 0 { + try visitor.visitSingularInt32Field(value: self.flapCount, fieldNumber: 13) + } + if self.lastFlapNs != 0 { + try visitor.visitSingularInt64Field(value: self.lastFlapNs, fieldNumber: 14) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Peer, rhs: Lnrpc_Peer) -> Bool { + if lhs.pubKey != rhs.pubKey {return false} + if lhs.address != rhs.address {return false} + if lhs.bytesSent != rhs.bytesSent {return false} + if lhs.bytesRecv != rhs.bytesRecv {return false} + if lhs.satSent != rhs.satSent {return false} + if lhs.satRecv != rhs.satRecv {return false} + if lhs.inbound != rhs.inbound {return false} + if lhs.pingTime != rhs.pingTime {return false} + if lhs.syncType != rhs.syncType {return false} + if lhs.features != rhs.features {return false} + if lhs.errors != rhs.errors {return false} + if lhs.flapCount != rhs.flapCount {return false} + if lhs.lastFlapNs != rhs.lastFlapNs {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Peer.SyncType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_SYNC"), + 1: .same(proto: "ACTIVE_SYNC"), + 2: .same(proto: "PASSIVE_SYNC"), + ] +} + +extension Lnrpc_TimestampedError: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".TimestampedError" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "timestamp"), + 2: .same(proto: "error"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.timestamp) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.error) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.timestamp != 0 { + try visitor.visitSingularUInt64Field(value: self.timestamp, fieldNumber: 1) + } + if !self.error.isEmpty { + try visitor.visitSingularStringField(value: self.error, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_TimestampedError, rhs: Lnrpc_TimestampedError) -> Bool { + if lhs.timestamp != rhs.timestamp {return false} + if lhs.error != rhs.error {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListPeersRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListPeersRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "latest_error"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.latestError) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.latestError != false { + try visitor.visitSingularBoolField(value: self.latestError, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListPeersRequest, rhs: Lnrpc_ListPeersRequest) -> Bool { + if lhs.latestError != rhs.latestError {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListPeersResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListPeersResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "peers"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.peers) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.peers.isEmpty { + try visitor.visitRepeatedMessageField(value: self.peers, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListPeersResponse, rhs: Lnrpc_ListPeersResponse) -> Bool { + if lhs.peers != rhs.peers {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PeerEventSubscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PeerEventSubscription" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PeerEventSubscription, rhs: Lnrpc_PeerEventSubscription) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PeerEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PeerEvent" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pub_key"), + 2: .same(proto: "type"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.pubKey) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.type) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.pubKey.isEmpty { + try visitor.visitSingularStringField(value: self.pubKey, fieldNumber: 1) + } + if self.type != .peerOnline { + try visitor.visitSingularEnumField(value: self.type, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PeerEvent, rhs: Lnrpc_PeerEvent) -> Bool { + if lhs.pubKey != rhs.pubKey {return false} + if lhs.type != rhs.type {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PeerEvent.EventType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "PEER_ONLINE"), + 1: .same(proto: "PEER_OFFLINE"), + ] +} + +extension Lnrpc_GetInfoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetInfoRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GetInfoRequest, rhs: Lnrpc_GetInfoRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_GetInfoResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetInfoResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 14: .same(proto: "version"), + 20: .standard(proto: "commit_hash"), + 1: .standard(proto: "identity_pubkey"), + 2: .same(proto: "alias"), + 17: .same(proto: "color"), + 3: .standard(proto: "num_pending_channels"), + 4: .standard(proto: "num_active_channels"), + 15: .standard(proto: "num_inactive_channels"), + 5: .standard(proto: "num_peers"), + 6: .standard(proto: "block_height"), + 8: .standard(proto: "block_hash"), + 13: .standard(proto: "best_header_timestamp"), + 9: .standard(proto: "synced_to_chain"), + 18: .standard(proto: "synced_to_graph"), + 10: .same(proto: "testnet"), + 16: .same(proto: "chains"), + 12: .same(proto: "uris"), + 19: .same(proto: "features"), + ] + + fileprivate class _StorageClass { + var _version: String = String() + var _commitHash: String = String() + var _identityPubkey: String = String() + var _alias: String = String() + var _color: String = String() + var _numPendingChannels: UInt32 = 0 + var _numActiveChannels: UInt32 = 0 + var _numInactiveChannels: UInt32 = 0 + var _numPeers: UInt32 = 0 + var _blockHeight: UInt32 = 0 + var _blockHash: String = String() + var _bestHeaderTimestamp: Int64 = 0 + var _syncedToChain: Bool = false + var _syncedToGraph: Bool = false + var _testnet: Bool = false + var _chains: [Lnrpc_Chain] = [] + var _uris: [String] = [] + var _features: Dictionary = [:] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _version = source._version + _commitHash = source._commitHash + _identityPubkey = source._identityPubkey + _alias = source._alias + _color = source._color + _numPendingChannels = source._numPendingChannels + _numActiveChannels = source._numActiveChannels + _numInactiveChannels = source._numInactiveChannels + _numPeers = source._numPeers + _blockHeight = source._blockHeight + _blockHash = source._blockHash + _bestHeaderTimestamp = source._bestHeaderTimestamp + _syncedToChain = source._syncedToChain + _syncedToGraph = source._syncedToGraph + _testnet = source._testnet + _chains = source._chains + _uris = source._uris + _features = source._features + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &_storage._identityPubkey) }() + case 2: try { try decoder.decodeSingularStringField(value: &_storage._alias) }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._numPendingChannels) }() + case 4: try { try decoder.decodeSingularUInt32Field(value: &_storage._numActiveChannels) }() + case 5: try { try decoder.decodeSingularUInt32Field(value: &_storage._numPeers) }() + case 6: try { try decoder.decodeSingularUInt32Field(value: &_storage._blockHeight) }() + case 8: try { try decoder.decodeSingularStringField(value: &_storage._blockHash) }() + case 9: try { try decoder.decodeSingularBoolField(value: &_storage._syncedToChain) }() + case 10: try { try decoder.decodeSingularBoolField(value: &_storage._testnet) }() + case 12: try { try decoder.decodeRepeatedStringField(value: &_storage._uris) }() + case 13: try { try decoder.decodeSingularInt64Field(value: &_storage._bestHeaderTimestamp) }() + case 14: try { try decoder.decodeSingularStringField(value: &_storage._version) }() + case 15: try { try decoder.decodeSingularUInt32Field(value: &_storage._numInactiveChannels) }() + case 16: try { try decoder.decodeRepeatedMessageField(value: &_storage._chains) }() + case 17: try { try decoder.decodeSingularStringField(value: &_storage._color) }() + case 18: try { try decoder.decodeSingularBoolField(value: &_storage._syncedToGraph) }() + case 19: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._features) }() + case 20: try { try decoder.decodeSingularStringField(value: &_storage._commitHash) }() + default: break + } + } + } + } + + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._identityPubkey.isEmpty { + try visitor.visitSingularStringField(value: _storage._identityPubkey, fieldNumber: 1) + } + if !_storage._alias.isEmpty { + try visitor.visitSingularStringField(value: _storage._alias, fieldNumber: 2) + } + if _storage._numPendingChannels != 0 { + try visitor.visitSingularUInt32Field(value: _storage._numPendingChannels, fieldNumber: 3) + } + if _storage._numActiveChannels != 0 { + try visitor.visitSingularUInt32Field(value: _storage._numActiveChannels, fieldNumber: 4) + } + if _storage._numPeers != 0 { + try visitor.visitSingularUInt32Field(value: _storage._numPeers, fieldNumber: 5) + } + if _storage._blockHeight != 0 { + try visitor.visitSingularUInt32Field(value: _storage._blockHeight, fieldNumber: 6) + } + if !_storage._blockHash.isEmpty { + try visitor.visitSingularStringField(value: _storage._blockHash, fieldNumber: 8) + } + if _storage._syncedToChain != false { + try visitor.visitSingularBoolField(value: _storage._syncedToChain, fieldNumber: 9) + } + if _storage._testnet != false { + try visitor.visitSingularBoolField(value: _storage._testnet, fieldNumber: 10) + } + if !_storage._uris.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._uris, fieldNumber: 12) + } + if _storage._bestHeaderTimestamp != 0 { + try visitor.visitSingularInt64Field(value: _storage._bestHeaderTimestamp, fieldNumber: 13) + } + if !_storage._version.isEmpty { + try visitor.visitSingularStringField(value: _storage._version, fieldNumber: 14) + } + if _storage._numInactiveChannels != 0 { + try visitor.visitSingularUInt32Field(value: _storage._numInactiveChannels, fieldNumber: 15) + } + if !_storage._chains.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._chains, fieldNumber: 16) + } + if !_storage._color.isEmpty { + try visitor.visitSingularStringField(value: _storage._color, fieldNumber: 17) + } + if _storage._syncedToGraph != false { + try visitor.visitSingularBoolField(value: _storage._syncedToGraph, fieldNumber: 18) + } + if !_storage._features.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._features, fieldNumber: 19) + } + if !_storage._commitHash.isEmpty { + try visitor.visitSingularStringField(value: _storage._commitHash, fieldNumber: 20) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GetInfoResponse, rhs: Lnrpc_GetInfoResponse) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._version != rhs_storage._version {return false} + if _storage._commitHash != rhs_storage._commitHash {return false} + if _storage._identityPubkey != rhs_storage._identityPubkey {return false} + if _storage._alias != rhs_storage._alias {return false} + if _storage._color != rhs_storage._color {return false} + if _storage._numPendingChannels != rhs_storage._numPendingChannels {return false} + if _storage._numActiveChannels != rhs_storage._numActiveChannels {return false} + if _storage._numInactiveChannels != rhs_storage._numInactiveChannels {return false} + if _storage._numPeers != rhs_storage._numPeers {return false} + if _storage._blockHeight != rhs_storage._blockHeight {return false} + if _storage._blockHash != rhs_storage._blockHash {return false} + if _storage._bestHeaderTimestamp != rhs_storage._bestHeaderTimestamp {return false} + if _storage._syncedToChain != rhs_storage._syncedToChain {return false} + if _storage._syncedToGraph != rhs_storage._syncedToGraph {return false} + if _storage._testnet != rhs_storage._testnet {return false} + if _storage._chains != rhs_storage._chains {return false} + if _storage._uris != rhs_storage._uris {return false} + if _storage._features != rhs_storage._features {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_GetRecoveryInfoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetRecoveryInfoRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GetRecoveryInfoRequest, rhs: Lnrpc_GetRecoveryInfoRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_GetRecoveryInfoResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetRecoveryInfoResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "recovery_mode"), + 2: .standard(proto: "recovery_finished"), + 3: .same(proto: "progress"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.recoveryMode) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.recoveryFinished) }() + case 3: try { try decoder.decodeSingularDoubleField(value: &self.progress) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.recoveryMode != false { + try visitor.visitSingularBoolField(value: self.recoveryMode, fieldNumber: 1) + } + if self.recoveryFinished != false { + try visitor.visitSingularBoolField(value: self.recoveryFinished, fieldNumber: 2) + } + if self.progress != 0 { + try visitor.visitSingularDoubleField(value: self.progress, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GetRecoveryInfoResponse, rhs: Lnrpc_GetRecoveryInfoResponse) -> Bool { + if lhs.recoveryMode != rhs.recoveryMode {return false} + if lhs.recoveryFinished != rhs.recoveryFinished {return false} + if lhs.progress != rhs.progress {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Chain: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Chain" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "chain"), + 2: .same(proto: "network"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.chain) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.network) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.chain.isEmpty { + try visitor.visitSingularStringField(value: self.chain, fieldNumber: 1) + } + if !self.network.isEmpty { + try visitor.visitSingularStringField(value: self.network, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Chain, rhs: Lnrpc_Chain) -> Bool { + if lhs.chain != rhs.chain {return false} + if lhs.network != rhs.network {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ConfirmationUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ConfirmationUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "block_sha"), + 2: .standard(proto: "block_height"), + 3: .standard(proto: "num_confs_left"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.blockSha) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.blockHeight) }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &self.numConfsLeft) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.blockSha.isEmpty { + try visitor.visitSingularBytesField(value: self.blockSha, fieldNumber: 1) + } + if self.blockHeight != 0 { + try visitor.visitSingularInt32Field(value: self.blockHeight, fieldNumber: 2) + } + if self.numConfsLeft != 0 { + try visitor.visitSingularUInt32Field(value: self.numConfsLeft, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ConfirmationUpdate, rhs: Lnrpc_ConfirmationUpdate) -> Bool { + if lhs.blockSha != rhs.blockSha {return false} + if lhs.blockHeight != rhs.blockHeight {return false} + if lhs.numConfsLeft != rhs.numConfsLeft {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelOpenUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelOpenUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "channel_point"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._channelPoint) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._channelPoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelOpenUpdate, rhs: Lnrpc_ChannelOpenUpdate) -> Bool { + if lhs._channelPoint != rhs._channelPoint {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelCloseUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelCloseUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "closing_txid"), + 2: .same(proto: "success"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.closingTxid) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.success) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.closingTxid.isEmpty { + try visitor.visitSingularBytesField(value: self.closingTxid, fieldNumber: 1) + } + if self.success != false { + try visitor.visitSingularBoolField(value: self.success, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelCloseUpdate, rhs: Lnrpc_ChannelCloseUpdate) -> Bool { + if lhs.closingTxid != rhs.closingTxid {return false} + if lhs.success != rhs.success {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_CloseChannelRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".CloseChannelRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "channel_point"), + 2: .same(proto: "force"), + 3: .standard(proto: "target_conf"), + 4: .standard(proto: "sat_per_byte"), + 5: .standard(proto: "delivery_address"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._channelPoint) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.force) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.targetConf) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self.satPerByte) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.deliveryAddress) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._channelPoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if self.force != false { + try visitor.visitSingularBoolField(value: self.force, fieldNumber: 2) + } + if self.targetConf != 0 { + try visitor.visitSingularInt32Field(value: self.targetConf, fieldNumber: 3) + } + if self.satPerByte != 0 { + try visitor.visitSingularInt64Field(value: self.satPerByte, fieldNumber: 4) + } + if !self.deliveryAddress.isEmpty { + try visitor.visitSingularStringField(value: self.deliveryAddress, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_CloseChannelRequest, rhs: Lnrpc_CloseChannelRequest) -> Bool { + if lhs._channelPoint != rhs._channelPoint {return false} + if lhs.force != rhs.force {return false} + if lhs.targetConf != rhs.targetConf {return false} + if lhs.satPerByte != rhs.satPerByte {return false} + if lhs.deliveryAddress != rhs.deliveryAddress {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_CloseStatusUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".CloseStatusUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "close_pending"), + 3: .standard(proto: "chan_close"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + var v: Lnrpc_PendingUpdate? + if let current = self.update { + try decoder.handleConflictingOneOf() + if case .closePending(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.update = .closePending(v)} + }() + case 3: try { + var v: Lnrpc_ChannelCloseUpdate? + if let current = self.update { + try decoder.handleConflictingOneOf() + if case .chanClose(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.update = .chanClose(v)} + }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.update { + case .closePending?: try { + guard case .closePending(let v)? = self.update else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + }() + case .chanClose?: try { + guard case .chanClose(let v)? = self.update else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + }() + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_CloseStatusUpdate, rhs: Lnrpc_CloseStatusUpdate) -> Bool { + if lhs.update != rhs.update {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PendingUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "txid"), + 2: .standard(proto: "output_index"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.txid) }() + case 2: try { try decoder.decodeSingularUInt32Field(value: &self.outputIndex) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.txid.isEmpty { + try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 1) + } + if self.outputIndex != 0 { + try visitor.visitSingularUInt32Field(value: self.outputIndex, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingUpdate, rhs: Lnrpc_PendingUpdate) -> Bool { + if lhs.txid != rhs.txid {return false} + if lhs.outputIndex != rhs.outputIndex {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ReadyForPsbtFunding: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ReadyForPsbtFunding" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "funding_address"), + 2: .standard(proto: "funding_amount"), + 3: .same(proto: "psbt"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.fundingAddress) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.fundingAmount) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self.psbt) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.fundingAddress.isEmpty { + try visitor.visitSingularStringField(value: self.fundingAddress, fieldNumber: 1) + } + if self.fundingAmount != 0 { + try visitor.visitSingularInt64Field(value: self.fundingAmount, fieldNumber: 2) + } + if !self.psbt.isEmpty { + try visitor.visitSingularBytesField(value: self.psbt, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ReadyForPsbtFunding, rhs: Lnrpc_ReadyForPsbtFunding) -> Bool { + if lhs.fundingAddress != rhs.fundingAddress {return false} + if lhs.fundingAmount != rhs.fundingAmount {return false} + if lhs.psbt != rhs.psbt {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_OpenChannelRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".OpenChannelRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 2: .standard(proto: "node_pubkey"), + 3: .standard(proto: "node_pubkey_string"), + 4: .standard(proto: "local_funding_amount"), + 5: .standard(proto: "push_sat"), + 6: .standard(proto: "target_conf"), + 7: .standard(proto: "sat_per_byte"), + 8: .same(proto: "private"), + 9: .standard(proto: "min_htlc_msat"), + 10: .standard(proto: "remote_csv_delay"), + 11: .standard(proto: "min_confs"), + 12: .standard(proto: "spend_unconfirmed"), + 13: .standard(proto: "close_address"), + 14: .standard(proto: "funding_shim"), + 15: .standard(proto: "remote_max_value_in_flight_msat"), + 16: .standard(proto: "remote_max_htlcs"), + 17: .standard(proto: "max_local_csv"), + ] + + fileprivate class _StorageClass { + var _nodePubkey: Data = Data() + var _nodePubkeyString: String = String() + var _localFundingAmount: Int64 = 0 + var _pushSat: Int64 = 0 + var _targetConf: Int32 = 0 + var _satPerByte: Int64 = 0 + var _private: Bool = false + var _minHtlcMsat: Int64 = 0 + var _remoteCsvDelay: UInt32 = 0 + var _minConfs: Int32 = 0 + var _spendUnconfirmed: Bool = false + var _closeAddress: String = String() + var _fundingShim: Lnrpc_FundingShim? = nil + var _remoteMaxValueInFlightMsat: UInt64 = 0 + var _remoteMaxHtlcs: UInt32 = 0 + var _maxLocalCsv: UInt32 = 0 + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _nodePubkey = source._nodePubkey + _nodePubkeyString = source._nodePubkeyString + _localFundingAmount = source._localFundingAmount + _pushSat = source._pushSat + _targetConf = source._targetConf + _satPerByte = source._satPerByte + _private = source._private + _minHtlcMsat = source._minHtlcMsat + _remoteCsvDelay = source._remoteCsvDelay + _minConfs = source._minConfs + _spendUnconfirmed = source._spendUnconfirmed + _closeAddress = source._closeAddress + _fundingShim = source._fundingShim + _remoteMaxValueInFlightMsat = source._remoteMaxValueInFlightMsat + _remoteMaxHtlcs = source._remoteMaxHtlcs + _maxLocalCsv = source._maxLocalCsv + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 2: try { try decoder.decodeSingularBytesField(value: &_storage._nodePubkey) }() + case 3: try { try decoder.decodeSingularStringField(value: &_storage._nodePubkeyString) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &_storage._localFundingAmount) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &_storage._pushSat) }() + case 6: try { try decoder.decodeSingularInt32Field(value: &_storage._targetConf) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &_storage._satPerByte) }() + case 8: try { try decoder.decodeSingularBoolField(value: &_storage._private) }() + case 9: try { try decoder.decodeSingularInt64Field(value: &_storage._minHtlcMsat) }() + case 10: try { try decoder.decodeSingularUInt32Field(value: &_storage._remoteCsvDelay) }() + case 11: try { try decoder.decodeSingularInt32Field(value: &_storage._minConfs) }() + case 12: try { try decoder.decodeSingularBoolField(value: &_storage._spendUnconfirmed) }() + case 13: try { try decoder.decodeSingularStringField(value: &_storage._closeAddress) }() + case 14: try { try decoder.decodeSingularMessageField(value: &_storage._fundingShim) }() + case 15: try { try decoder.decodeSingularUInt64Field(value: &_storage._remoteMaxValueInFlightMsat) }() + case 16: try { try decoder.decodeSingularUInt32Field(value: &_storage._remoteMaxHtlcs) }() + case 17: try { try decoder.decodeSingularUInt32Field(value: &_storage._maxLocalCsv) }() + default: break + } + } + } + } + + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._nodePubkey.isEmpty { + try visitor.visitSingularBytesField(value: _storage._nodePubkey, fieldNumber: 2) + } + if !_storage._nodePubkeyString.isEmpty { + try visitor.visitSingularStringField(value: _storage._nodePubkeyString, fieldNumber: 3) + } + if _storage._localFundingAmount != 0 { + try visitor.visitSingularInt64Field(value: _storage._localFundingAmount, fieldNumber: 4) + } + if _storage._pushSat != 0 { + try visitor.visitSingularInt64Field(value: _storage._pushSat, fieldNumber: 5) + } + if _storage._targetConf != 0 { + try visitor.visitSingularInt32Field(value: _storage._targetConf, fieldNumber: 6) + } + if _storage._satPerByte != 0 { + try visitor.visitSingularInt64Field(value: _storage._satPerByte, fieldNumber: 7) + } + if _storage._private != false { + try visitor.visitSingularBoolField(value: _storage._private, fieldNumber: 8) + } + if _storage._minHtlcMsat != 0 { + try visitor.visitSingularInt64Field(value: _storage._minHtlcMsat, fieldNumber: 9) + } + if _storage._remoteCsvDelay != 0 { + try visitor.visitSingularUInt32Field(value: _storage._remoteCsvDelay, fieldNumber: 10) + } + if _storage._minConfs != 0 { + try visitor.visitSingularInt32Field(value: _storage._minConfs, fieldNumber: 11) + } + if _storage._spendUnconfirmed != false { + try visitor.visitSingularBoolField(value: _storage._spendUnconfirmed, fieldNumber: 12) + } + if !_storage._closeAddress.isEmpty { + try visitor.visitSingularStringField(value: _storage._closeAddress, fieldNumber: 13) + } + if let v = _storage._fundingShim { + try visitor.visitSingularMessageField(value: v, fieldNumber: 14) + } + if _storage._remoteMaxValueInFlightMsat != 0 { + try visitor.visitSingularUInt64Field(value: _storage._remoteMaxValueInFlightMsat, fieldNumber: 15) + } + if _storage._remoteMaxHtlcs != 0 { + try visitor.visitSingularUInt32Field(value: _storage._remoteMaxHtlcs, fieldNumber: 16) + } + if _storage._maxLocalCsv != 0 { + try visitor.visitSingularUInt32Field(value: _storage._maxLocalCsv, fieldNumber: 17) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_OpenChannelRequest, rhs: Lnrpc_OpenChannelRequest) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._nodePubkey != rhs_storage._nodePubkey {return false} + if _storage._nodePubkeyString != rhs_storage._nodePubkeyString {return false} + if _storage._localFundingAmount != rhs_storage._localFundingAmount {return false} + if _storage._pushSat != rhs_storage._pushSat {return false} + if _storage._targetConf != rhs_storage._targetConf {return false} + if _storage._satPerByte != rhs_storage._satPerByte {return false} + if _storage._private != rhs_storage._private {return false} + if _storage._minHtlcMsat != rhs_storage._minHtlcMsat {return false} + if _storage._remoteCsvDelay != rhs_storage._remoteCsvDelay {return false} + if _storage._minConfs != rhs_storage._minConfs {return false} + if _storage._spendUnconfirmed != rhs_storage._spendUnconfirmed {return false} + if _storage._closeAddress != rhs_storage._closeAddress {return false} + if _storage._fundingShim != rhs_storage._fundingShim {return false} + if _storage._remoteMaxValueInFlightMsat != rhs_storage._remoteMaxValueInFlightMsat {return false} + if _storage._remoteMaxHtlcs != rhs_storage._remoteMaxHtlcs {return false} + if _storage._maxLocalCsv != rhs_storage._maxLocalCsv {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_OpenStatusUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".OpenStatusUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_pending"), + 3: .standard(proto: "chan_open"), + 5: .standard(proto: "psbt_fund"), + 4: .standard(proto: "pending_chan_id"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + var v: Lnrpc_PendingUpdate? + if let current = self.update { + try decoder.handleConflictingOneOf() + if case .chanPending(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.update = .chanPending(v)} + }() + case 3: try { + var v: Lnrpc_ChannelOpenUpdate? + if let current = self.update { + try decoder.handleConflictingOneOf() + if case .chanOpen(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.update = .chanOpen(v)} + }() + case 4: try { try decoder.decodeSingularBytesField(value: &self.pendingChanID) }() + case 5: try { + var v: Lnrpc_ReadyForPsbtFunding? + if let current = self.update { + try decoder.handleConflictingOneOf() + if case .psbtFund(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.update = .psbtFund(v)} + }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.update { + case .chanPending?: try { + guard case .chanPending(let v)? = self.update else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + }() + case .chanOpen?: try { + guard case .chanOpen(let v)? = self.update else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + }() + default: break + } + if !self.pendingChanID.isEmpty { + try visitor.visitSingularBytesField(value: self.pendingChanID, fieldNumber: 4) + } + if case .psbtFund(let v)? = self.update { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_OpenStatusUpdate, rhs: Lnrpc_OpenStatusUpdate) -> Bool { + if lhs.update != rhs.update {return false} + if lhs.pendingChanID != rhs.pendingChanID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_KeyLocator: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".KeyLocator" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "key_family"), + 2: .standard(proto: "key_index"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self.keyFamily) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.keyIndex) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.keyFamily != 0 { + try visitor.visitSingularInt32Field(value: self.keyFamily, fieldNumber: 1) + } + if self.keyIndex != 0 { + try visitor.visitSingularInt32Field(value: self.keyIndex, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_KeyLocator, rhs: Lnrpc_KeyLocator) -> Bool { + if lhs.keyFamily != rhs.keyFamily {return false} + if lhs.keyIndex != rhs.keyIndex {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_KeyDescriptor: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".KeyDescriptor" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "raw_key_bytes"), + 2: .standard(proto: "key_loc"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.rawKeyBytes) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._keyLoc) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.rawKeyBytes.isEmpty { + try visitor.visitSingularBytesField(value: self.rawKeyBytes, fieldNumber: 1) + } + if let v = self._keyLoc { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_KeyDescriptor, rhs: Lnrpc_KeyDescriptor) -> Bool { + if lhs.rawKeyBytes != rhs.rawKeyBytes {return false} + if lhs._keyLoc != rhs._keyLoc {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChanPointShim: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChanPointShim" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "amt"), + 2: .standard(proto: "chan_point"), + 3: .standard(proto: "local_key"), + 4: .standard(proto: "remote_key"), + 5: .standard(proto: "pending_chan_id"), + 6: .standard(proto: "thaw_height"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt64Field(value: &self.amt) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._chanPoint) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._localKey) }() + case 4: try { try decoder.decodeSingularBytesField(value: &self.remoteKey) }() + case 5: try { try decoder.decodeSingularBytesField(value: &self.pendingChanID) }() + case 6: try { try decoder.decodeSingularUInt32Field(value: &self.thawHeight) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.amt != 0 { + try visitor.visitSingularInt64Field(value: self.amt, fieldNumber: 1) + } + if let v = self._chanPoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = self._localKey { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !self.remoteKey.isEmpty { + try visitor.visitSingularBytesField(value: self.remoteKey, fieldNumber: 4) + } + if !self.pendingChanID.isEmpty { + try visitor.visitSingularBytesField(value: self.pendingChanID, fieldNumber: 5) + } + if self.thawHeight != 0 { + try visitor.visitSingularUInt32Field(value: self.thawHeight, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChanPointShim, rhs: Lnrpc_ChanPointShim) -> Bool { + if lhs.amt != rhs.amt {return false} + if lhs._chanPoint != rhs._chanPoint {return false} + if lhs._localKey != rhs._localKey {return false} + if lhs.remoteKey != rhs.remoteKey {return false} + if lhs.pendingChanID != rhs.pendingChanID {return false} + if lhs.thawHeight != rhs.thawHeight {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PsbtShim: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PsbtShim" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pending_chan_id"), + 2: .standard(proto: "base_psbt"), + 3: .standard(proto: "no_publish"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.pendingChanID) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.basePsbt) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.noPublish) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.pendingChanID.isEmpty { + try visitor.visitSingularBytesField(value: self.pendingChanID, fieldNumber: 1) + } + if !self.basePsbt.isEmpty { + try visitor.visitSingularBytesField(value: self.basePsbt, fieldNumber: 2) + } + if self.noPublish != false { + try visitor.visitSingularBoolField(value: self.noPublish, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PsbtShim, rhs: Lnrpc_PsbtShim) -> Bool { + if lhs.pendingChanID != rhs.pendingChanID {return false} + if lhs.basePsbt != rhs.basePsbt {return false} + if lhs.noPublish != rhs.noPublish {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FundingShim: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FundingShim" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_point_shim"), + 2: .standard(proto: "psbt_shim"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + var v: Lnrpc_ChanPointShim? + if let current = self.shim { + try decoder.handleConflictingOneOf() + if case .chanPointShim(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.shim = .chanPointShim(v)} + }() + case 2: try { + var v: Lnrpc_PsbtShim? + if let current = self.shim { + try decoder.handleConflictingOneOf() + if case .psbtShim(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.shim = .psbtShim(v)} + }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.shim { + case .chanPointShim?: try { + guard case .chanPointShim(let v)? = self.shim else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + }() + case .psbtShim?: try { + guard case .psbtShim(let v)? = self.shim else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + }() + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FundingShim, rhs: Lnrpc_FundingShim) -> Bool { + if lhs.shim != rhs.shim {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FundingShimCancel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FundingShimCancel" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pending_chan_id"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.pendingChanID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.pendingChanID.isEmpty { + try visitor.visitSingularBytesField(value: self.pendingChanID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FundingShimCancel, rhs: Lnrpc_FundingShimCancel) -> Bool { + if lhs.pendingChanID != rhs.pendingChanID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FundingPsbtVerify: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FundingPsbtVerify" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "funded_psbt"), + 2: .standard(proto: "pending_chan_id"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.fundedPsbt) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.pendingChanID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.fundedPsbt.isEmpty { + try visitor.visitSingularBytesField(value: self.fundedPsbt, fieldNumber: 1) + } + if !self.pendingChanID.isEmpty { + try visitor.visitSingularBytesField(value: self.pendingChanID, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FundingPsbtVerify, rhs: Lnrpc_FundingPsbtVerify) -> Bool { + if lhs.fundedPsbt != rhs.fundedPsbt {return false} + if lhs.pendingChanID != rhs.pendingChanID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FundingPsbtFinalize: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FundingPsbtFinalize" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "signed_psbt"), + 2: .standard(proto: "pending_chan_id"), + 3: .standard(proto: "final_raw_tx"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.signedPsbt) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.pendingChanID) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self.finalRawTx) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.signedPsbt.isEmpty { + try visitor.visitSingularBytesField(value: self.signedPsbt, fieldNumber: 1) + } + if !self.pendingChanID.isEmpty { + try visitor.visitSingularBytesField(value: self.pendingChanID, fieldNumber: 2) + } + if !self.finalRawTx.isEmpty { + try visitor.visitSingularBytesField(value: self.finalRawTx, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FundingPsbtFinalize, rhs: Lnrpc_FundingPsbtFinalize) -> Bool { + if lhs.signedPsbt != rhs.signedPsbt {return false} + if lhs.pendingChanID != rhs.pendingChanID {return false} + if lhs.finalRawTx != rhs.finalRawTx {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FundingTransitionMsg: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FundingTransitionMsg" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "shim_register"), + 2: .standard(proto: "shim_cancel"), + 3: .standard(proto: "psbt_verify"), + 4: .standard(proto: "psbt_finalize"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + var v: Lnrpc_FundingShim? + if let current = self.trigger { + try decoder.handleConflictingOneOf() + if case .shimRegister(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.trigger = .shimRegister(v)} + }() + case 2: try { + var v: Lnrpc_FundingShimCancel? + if let current = self.trigger { + try decoder.handleConflictingOneOf() + if case .shimCancel(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.trigger = .shimCancel(v)} + }() + case 3: try { + var v: Lnrpc_FundingPsbtVerify? + if let current = self.trigger { + try decoder.handleConflictingOneOf() + if case .psbtVerify(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.trigger = .psbtVerify(v)} + }() + case 4: try { + var v: Lnrpc_FundingPsbtFinalize? + if let current = self.trigger { + try decoder.handleConflictingOneOf() + if case .psbtFinalize(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.trigger = .psbtFinalize(v)} + }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.trigger { + case .shimRegister?: try { + guard case .shimRegister(let v)? = self.trigger else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + }() + case .shimCancel?: try { + guard case .shimCancel(let v)? = self.trigger else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + }() + case .psbtVerify?: try { + guard case .psbtVerify(let v)? = self.trigger else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + }() + case .psbtFinalize?: try { + guard case .psbtFinalize(let v)? = self.trigger else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + }() + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FundingTransitionMsg, rhs: Lnrpc_FundingTransitionMsg) -> Bool { + if lhs.trigger != rhs.trigger {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FundingStateStepResp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FundingStateStepResp" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FundingStateStepResp, rhs: Lnrpc_FundingStateStepResp) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingHTLC: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PendingHTLC" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "incoming"), + 2: .same(proto: "amount"), + 3: .same(proto: "outpoint"), + 4: .standard(proto: "maturity_height"), + 5: .standard(proto: "blocks_til_maturity"), + 6: .same(proto: "stage"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.incoming) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.outpoint) }() + case 4: try { try decoder.decodeSingularUInt32Field(value: &self.maturityHeight) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.blocksTilMaturity) }() + case 6: try { try decoder.decodeSingularUInt32Field(value: &self.stage) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.incoming != false { + try visitor.visitSingularBoolField(value: self.incoming, fieldNumber: 1) + } + if self.amount != 0 { + try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) + } + if !self.outpoint.isEmpty { + try visitor.visitSingularStringField(value: self.outpoint, fieldNumber: 3) + } + if self.maturityHeight != 0 { + try visitor.visitSingularUInt32Field(value: self.maturityHeight, fieldNumber: 4) + } + if self.blocksTilMaturity != 0 { + try visitor.visitSingularInt32Field(value: self.blocksTilMaturity, fieldNumber: 5) + } + if self.stage != 0 { + try visitor.visitSingularUInt32Field(value: self.stage, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingHTLC, rhs: Lnrpc_PendingHTLC) -> Bool { + if lhs.incoming != rhs.incoming {return false} + if lhs.amount != rhs.amount {return false} + if lhs.outpoint != rhs.outpoint {return false} + if lhs.maturityHeight != rhs.maturityHeight {return false} + if lhs.blocksTilMaturity != rhs.blocksTilMaturity {return false} + if lhs.stage != rhs.stage {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PendingChannelsRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingChannelsRequest, rhs: Lnrpc_PendingChannelsRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PendingChannelsResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "total_limbo_balance"), + 2: .standard(proto: "pending_open_channels"), + 3: .standard(proto: "pending_closing_channels"), + 4: .standard(proto: "pending_force_closing_channels"), + 5: .standard(proto: "waiting_close_channels"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt64Field(value: &self.totalLimboBalance) }() + case 2: try { try decoder.decodeRepeatedMessageField(value: &self.pendingOpenChannels) }() + case 3: try { try decoder.decodeRepeatedMessageField(value: &self.pendingClosingChannels) }() + case 4: try { try decoder.decodeRepeatedMessageField(value: &self.pendingForceClosingChannels) }() + case 5: try { try decoder.decodeRepeatedMessageField(value: &self.waitingCloseChannels) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.totalLimboBalance != 0 { + try visitor.visitSingularInt64Field(value: self.totalLimboBalance, fieldNumber: 1) + } + if !self.pendingOpenChannels.isEmpty { + try visitor.visitRepeatedMessageField(value: self.pendingOpenChannels, fieldNumber: 2) + } + if !self.pendingClosingChannels.isEmpty { + try visitor.visitRepeatedMessageField(value: self.pendingClosingChannels, fieldNumber: 3) + } + if !self.pendingForceClosingChannels.isEmpty { + try visitor.visitRepeatedMessageField(value: self.pendingForceClosingChannels, fieldNumber: 4) + } + if !self.waitingCloseChannels.isEmpty { + try visitor.visitRepeatedMessageField(value: self.waitingCloseChannels, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingChannelsResponse, rhs: Lnrpc_PendingChannelsResponse) -> Bool { + if lhs.totalLimboBalance != rhs.totalLimboBalance {return false} + if lhs.pendingOpenChannels != rhs.pendingOpenChannels {return false} + if lhs.pendingClosingChannels != rhs.pendingClosingChannels {return false} + if lhs.pendingForceClosingChannels != rhs.pendingForceClosingChannels {return false} + if lhs.waitingCloseChannels != rhs.waitingCloseChannels {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsResponse.PendingChannel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Lnrpc_PendingChannelsResponse.protoMessageName + ".PendingChannel" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "remote_node_pub"), + 2: .standard(proto: "channel_point"), + 3: .same(proto: "capacity"), + 4: .standard(proto: "local_balance"), + 5: .standard(proto: "remote_balance"), + 6: .standard(proto: "local_chan_reserve_sat"), + 7: .standard(proto: "remote_chan_reserve_sat"), + 8: .same(proto: "initiator"), + 9: .standard(proto: "commitment_type"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.remoteNodePub) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.channelPoint) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.capacity) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self.localBalance) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.remoteBalance) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.localChanReserveSat) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &self.remoteChanReserveSat) }() + case 8: try { try decoder.decodeSingularEnumField(value: &self.initiator) }() + case 9: try { try decoder.decodeSingularEnumField(value: &self.commitmentType) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.remoteNodePub.isEmpty { + try visitor.visitSingularStringField(value: self.remoteNodePub, fieldNumber: 1) + } + if !self.channelPoint.isEmpty { + try visitor.visitSingularStringField(value: self.channelPoint, fieldNumber: 2) + } + if self.capacity != 0 { + try visitor.visitSingularInt64Field(value: self.capacity, fieldNumber: 3) + } + if self.localBalance != 0 { + try visitor.visitSingularInt64Field(value: self.localBalance, fieldNumber: 4) + } + if self.remoteBalance != 0 { + try visitor.visitSingularInt64Field(value: self.remoteBalance, fieldNumber: 5) + } + if self.localChanReserveSat != 0 { + try visitor.visitSingularInt64Field(value: self.localChanReserveSat, fieldNumber: 6) + } + if self.remoteChanReserveSat != 0 { + try visitor.visitSingularInt64Field(value: self.remoteChanReserveSat, fieldNumber: 7) + } + if self.initiator != .unknown { + try visitor.visitSingularEnumField(value: self.initiator, fieldNumber: 8) + } + if self.commitmentType != .legacy { + try visitor.visitSingularEnumField(value: self.commitmentType, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingChannelsResponse.PendingChannel, rhs: Lnrpc_PendingChannelsResponse.PendingChannel) -> Bool { + if lhs.remoteNodePub != rhs.remoteNodePub {return false} + if lhs.channelPoint != rhs.channelPoint {return false} + if lhs.capacity != rhs.capacity {return false} + if lhs.localBalance != rhs.localBalance {return false} + if lhs.remoteBalance != rhs.remoteBalance {return false} + if lhs.localChanReserveSat != rhs.localChanReserveSat {return false} + if lhs.remoteChanReserveSat != rhs.remoteChanReserveSat {return false} + if lhs.initiator != rhs.initiator {return false} + if lhs.commitmentType != rhs.commitmentType {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsResponse.PendingOpenChannel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Lnrpc_PendingChannelsResponse.protoMessageName + ".PendingOpenChannel" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "channel"), + 2: .standard(proto: "confirmation_height"), + 4: .standard(proto: "commit_fee"), + 5: .standard(proto: "commit_weight"), + 6: .standard(proto: "fee_per_kw"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._channel) }() + case 2: try { try decoder.decodeSingularUInt32Field(value: &self.confirmationHeight) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self.commitFee) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.commitWeight) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.feePerKw) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._channel { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if self.confirmationHeight != 0 { + try visitor.visitSingularUInt32Field(value: self.confirmationHeight, fieldNumber: 2) + } + if self.commitFee != 0 { + try visitor.visitSingularInt64Field(value: self.commitFee, fieldNumber: 4) + } + if self.commitWeight != 0 { + try visitor.visitSingularInt64Field(value: self.commitWeight, fieldNumber: 5) + } + if self.feePerKw != 0 { + try visitor.visitSingularInt64Field(value: self.feePerKw, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingChannelsResponse.PendingOpenChannel, rhs: Lnrpc_PendingChannelsResponse.PendingOpenChannel) -> Bool { + if lhs._channel != rhs._channel {return false} + if lhs.confirmationHeight != rhs.confirmationHeight {return false} + if lhs.commitFee != rhs.commitFee {return false} + if lhs.commitWeight != rhs.commitWeight {return false} + if lhs.feePerKw != rhs.feePerKw {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsResponse.WaitingCloseChannel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Lnrpc_PendingChannelsResponse.protoMessageName + ".WaitingCloseChannel" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "channel"), + 2: .standard(proto: "limbo_balance"), + 3: .same(proto: "commitments"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._channel) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.limboBalance) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._commitments) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._channel { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if self.limboBalance != 0 { + try visitor.visitSingularInt64Field(value: self.limboBalance, fieldNumber: 2) + } + if let v = self._commitments { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingChannelsResponse.WaitingCloseChannel, rhs: Lnrpc_PendingChannelsResponse.WaitingCloseChannel) -> Bool { + if lhs._channel != rhs._channel {return false} + if lhs.limboBalance != rhs.limboBalance {return false} + if lhs._commitments != rhs._commitments {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsResponse.Commitments: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Lnrpc_PendingChannelsResponse.protoMessageName + ".Commitments" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "local_txid"), + 2: .standard(proto: "remote_txid"), + 3: .standard(proto: "remote_pending_txid"), + 4: .standard(proto: "local_commit_fee_sat"), + 5: .standard(proto: "remote_commit_fee_sat"), + 6: .standard(proto: "remote_pending_commit_fee_sat"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.localTxid) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.remoteTxid) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.remotePendingTxid) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &self.localCommitFeeSat) }() + case 5: try { try decoder.decodeSingularUInt64Field(value: &self.remoteCommitFeeSat) }() + case 6: try { try decoder.decodeSingularUInt64Field(value: &self.remotePendingCommitFeeSat) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.localTxid.isEmpty { + try visitor.visitSingularStringField(value: self.localTxid, fieldNumber: 1) + } + if !self.remoteTxid.isEmpty { + try visitor.visitSingularStringField(value: self.remoteTxid, fieldNumber: 2) + } + if !self.remotePendingTxid.isEmpty { + try visitor.visitSingularStringField(value: self.remotePendingTxid, fieldNumber: 3) + } + if self.localCommitFeeSat != 0 { + try visitor.visitSingularUInt64Field(value: self.localCommitFeeSat, fieldNumber: 4) + } + if self.remoteCommitFeeSat != 0 { + try visitor.visitSingularUInt64Field(value: self.remoteCommitFeeSat, fieldNumber: 5) + } + if self.remotePendingCommitFeeSat != 0 { + try visitor.visitSingularUInt64Field(value: self.remotePendingCommitFeeSat, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingChannelsResponse.Commitments, rhs: Lnrpc_PendingChannelsResponse.Commitments) -> Bool { + if lhs.localTxid != rhs.localTxid {return false} + if lhs.remoteTxid != rhs.remoteTxid {return false} + if lhs.remotePendingTxid != rhs.remotePendingTxid {return false} + if lhs.localCommitFeeSat != rhs.localCommitFeeSat {return false} + if lhs.remoteCommitFeeSat != rhs.remoteCommitFeeSat {return false} + if lhs.remotePendingCommitFeeSat != rhs.remotePendingCommitFeeSat {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsResponse.ClosedChannel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Lnrpc_PendingChannelsResponse.protoMessageName + ".ClosedChannel" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "channel"), + 2: .standard(proto: "closing_txid"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._channel) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.closingTxid) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._channel { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !self.closingTxid.isEmpty { + try visitor.visitSingularStringField(value: self.closingTxid, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingChannelsResponse.ClosedChannel, rhs: Lnrpc_PendingChannelsResponse.ClosedChannel) -> Bool { + if lhs._channel != rhs._channel {return false} + if lhs.closingTxid != rhs.closingTxid {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsResponse.ForceClosedChannel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Lnrpc_PendingChannelsResponse.protoMessageName + ".ForceClosedChannel" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "channel"), + 2: .standard(proto: "closing_txid"), + 3: .standard(proto: "limbo_balance"), + 4: .standard(proto: "maturity_height"), + 5: .standard(proto: "blocks_til_maturity"), + 6: .standard(proto: "recovered_balance"), + 8: .standard(proto: "pending_htlcs"), + 9: .same(proto: "anchor"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._channel) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.closingTxid) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.limboBalance) }() + case 4: try { try decoder.decodeSingularUInt32Field(value: &self.maturityHeight) }() + case 5: try { try decoder.decodeSingularInt32Field(value: &self.blocksTilMaturity) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.recoveredBalance) }() + case 8: try { try decoder.decodeRepeatedMessageField(value: &self.pendingHtlcs) }() + case 9: try { try decoder.decodeSingularEnumField(value: &self.anchor) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._channel { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !self.closingTxid.isEmpty { + try visitor.visitSingularStringField(value: self.closingTxid, fieldNumber: 2) + } + if self.limboBalance != 0 { + try visitor.visitSingularInt64Field(value: self.limboBalance, fieldNumber: 3) + } + if self.maturityHeight != 0 { + try visitor.visitSingularUInt32Field(value: self.maturityHeight, fieldNumber: 4) + } + if self.blocksTilMaturity != 0 { + try visitor.visitSingularInt32Field(value: self.blocksTilMaturity, fieldNumber: 5) + } + if self.recoveredBalance != 0 { + try visitor.visitSingularInt64Field(value: self.recoveredBalance, fieldNumber: 6) + } + if !self.pendingHtlcs.isEmpty { + try visitor.visitRepeatedMessageField(value: self.pendingHtlcs, fieldNumber: 8) + } + if self.anchor != .limbo { + try visitor.visitSingularEnumField(value: self.anchor, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PendingChannelsResponse.ForceClosedChannel, rhs: Lnrpc_PendingChannelsResponse.ForceClosedChannel) -> Bool { + if lhs._channel != rhs._channel {return false} + if lhs.closingTxid != rhs.closingTxid {return false} + if lhs.limboBalance != rhs.limboBalance {return false} + if lhs.maturityHeight != rhs.maturityHeight {return false} + if lhs.blocksTilMaturity != rhs.blocksTilMaturity {return false} + if lhs.recoveredBalance != rhs.recoveredBalance {return false} + if lhs.pendingHtlcs != rhs.pendingHtlcs {return false} + if lhs.anchor != rhs.anchor {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PendingChannelsResponse.ForceClosedChannel.AnchorState: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "LIMBO"), + 1: .same(proto: "RECOVERED"), + 2: .same(proto: "LOST"), + ] +} + +extension Lnrpc_ChannelEventSubscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelEventSubscription" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelEventSubscription, rhs: Lnrpc_ChannelEventSubscription) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelEventUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelEventUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "open_channel"), + 2: .standard(proto: "closed_channel"), + 3: .standard(proto: "active_channel"), + 4: .standard(proto: "inactive_channel"), + 6: .standard(proto: "pending_open_channel"), + 5: .same(proto: "type"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + var v: Lnrpc_Channel? + if let current = self.channel { + try decoder.handleConflictingOneOf() + if case .openChannel(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.channel = .openChannel(v)} + }() + case 2: try { + var v: Lnrpc_ChannelCloseSummary? + if let current = self.channel { + try decoder.handleConflictingOneOf() + if case .closedChannel(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.channel = .closedChannel(v)} + }() + case 3: try { + var v: Lnrpc_ChannelPoint? + if let current = self.channel { + try decoder.handleConflictingOneOf() + if case .activeChannel(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.channel = .activeChannel(v)} + }() + case 4: try { + var v: Lnrpc_ChannelPoint? + if let current = self.channel { + try decoder.handleConflictingOneOf() + if case .inactiveChannel(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.channel = .inactiveChannel(v)} + }() + case 5: try { try decoder.decodeSingularEnumField(value: &self.type) }() + case 6: try { + var v: Lnrpc_PendingUpdate? + if let current = self.channel { + try decoder.handleConflictingOneOf() + if case .pendingOpenChannel(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.channel = .pendingOpenChannel(v)} + }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.channel { + case .openChannel?: try { + guard case .openChannel(let v)? = self.channel else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + }() + case .closedChannel?: try { + guard case .closedChannel(let v)? = self.channel else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + }() + case .activeChannel?: try { + guard case .activeChannel(let v)? = self.channel else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + }() + case .inactiveChannel?: try { + guard case .inactiveChannel(let v)? = self.channel else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + }() + default: break + } + if self.type != .openChannel { + try visitor.visitSingularEnumField(value: self.type, fieldNumber: 5) + } + if case .pendingOpenChannel(let v)? = self.channel { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelEventUpdate, rhs: Lnrpc_ChannelEventUpdate) -> Bool { + if lhs.channel != rhs.channel {return false} + if lhs.type != rhs.type {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelEventUpdate.UpdateType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "OPEN_CHANNEL"), + 1: .same(proto: "CLOSED_CHANNEL"), + 2: .same(proto: "ACTIVE_CHANNEL"), + 3: .same(proto: "INACTIVE_CHANNEL"), + 4: .same(proto: "PENDING_OPEN_CHANNEL"), + ] +} + +extension Lnrpc_WalletBalanceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".WalletBalanceRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_WalletBalanceRequest, rhs: Lnrpc_WalletBalanceRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_WalletBalanceResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".WalletBalanceResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "total_balance"), + 2: .standard(proto: "confirmed_balance"), + 3: .standard(proto: "unconfirmed_balance"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt64Field(value: &self.totalBalance) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.confirmedBalance) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.unconfirmedBalance) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.totalBalance != 0 { + try visitor.visitSingularInt64Field(value: self.totalBalance, fieldNumber: 1) + } + if self.confirmedBalance != 0 { + try visitor.visitSingularInt64Field(value: self.confirmedBalance, fieldNumber: 2) + } + if self.unconfirmedBalance != 0 { + try visitor.visitSingularInt64Field(value: self.unconfirmedBalance, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_WalletBalanceResponse, rhs: Lnrpc_WalletBalanceResponse) -> Bool { + if lhs.totalBalance != rhs.totalBalance {return false} + if lhs.confirmedBalance != rhs.confirmedBalance {return false} + if lhs.unconfirmedBalance != rhs.unconfirmedBalance {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Amount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Amount" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "sat"), + 2: .same(proto: "msat"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.sat) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.msat) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.sat != 0 { + try visitor.visitSingularUInt64Field(value: self.sat, fieldNumber: 1) + } + if self.msat != 0 { + try visitor.visitSingularUInt64Field(value: self.msat, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Amount, rhs: Lnrpc_Amount) -> Bool { + if lhs.sat != rhs.sat {return false} + if lhs.msat != rhs.msat {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelBalanceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelBalanceRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelBalanceRequest, rhs: Lnrpc_ChannelBalanceRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelBalanceResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelBalanceResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "balance"), + 2: .standard(proto: "pending_open_balance"), + 3: .standard(proto: "local_balance"), + 4: .standard(proto: "remote_balance"), + 5: .standard(proto: "unsettled_local_balance"), + 6: .standard(proto: "unsettled_remote_balance"), + 7: .standard(proto: "pending_open_local_balance"), + 8: .standard(proto: "pending_open_remote_balance"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt64Field(value: &self.balance) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.pendingOpenBalance) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._localBalance) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._remoteBalance) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._unsettledLocalBalance) }() + case 6: try { try decoder.decodeSingularMessageField(value: &self._unsettledRemoteBalance) }() + case 7: try { try decoder.decodeSingularMessageField(value: &self._pendingOpenLocalBalance) }() + case 8: try { try decoder.decodeSingularMessageField(value: &self._pendingOpenRemoteBalance) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.balance != 0 { + try visitor.visitSingularInt64Field(value: self.balance, fieldNumber: 1) + } + if self.pendingOpenBalance != 0 { + try visitor.visitSingularInt64Field(value: self.pendingOpenBalance, fieldNumber: 2) + } + if let v = self._localBalance { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = self._remoteBalance { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = self._unsettledLocalBalance { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = self._unsettledRemoteBalance { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = self._pendingOpenLocalBalance { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = self._pendingOpenRemoteBalance { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelBalanceResponse, rhs: Lnrpc_ChannelBalanceResponse) -> Bool { + if lhs.balance != rhs.balance {return false} + if lhs.pendingOpenBalance != rhs.pendingOpenBalance {return false} + if lhs._localBalance != rhs._localBalance {return false} + if lhs._remoteBalance != rhs._remoteBalance {return false} + if lhs._unsettledLocalBalance != rhs._unsettledLocalBalance {return false} + if lhs._unsettledRemoteBalance != rhs._unsettledRemoteBalance {return false} + if lhs._pendingOpenLocalBalance != rhs._pendingOpenLocalBalance {return false} + if lhs._pendingOpenRemoteBalance != rhs._pendingOpenRemoteBalance {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_QueryRoutesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".QueryRoutesRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pub_key"), + 2: .same(proto: "amt"), + 12: .standard(proto: "amt_msat"), + 4: .standard(proto: "final_cltv_delta"), + 5: .standard(proto: "fee_limit"), + 6: .standard(proto: "ignored_nodes"), + 7: .standard(proto: "ignored_edges"), + 8: .standard(proto: "source_pub_key"), + 9: .standard(proto: "use_mission_control"), + 10: .standard(proto: "ignored_pairs"), + 11: .standard(proto: "cltv_limit"), + 13: .standard(proto: "dest_custom_records"), + 14: .standard(proto: "outgoing_chan_id"), + 15: .standard(proto: "last_hop_pubkey"), + 16: .standard(proto: "route_hints"), + 17: .standard(proto: "dest_features"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.pubKey) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.amt) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.finalCltvDelta) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._feeLimit) }() + case 6: try { try decoder.decodeRepeatedBytesField(value: &self.ignoredNodes) }() + case 7: try { try decoder.decodeRepeatedMessageField(value: &self.ignoredEdges) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.sourcePubKey) }() + case 9: try { try decoder.decodeSingularBoolField(value: &self.useMissionControl) }() + case 10: try { try decoder.decodeRepeatedMessageField(value: &self.ignoredPairs) }() + case 11: try { try decoder.decodeSingularUInt32Field(value: &self.cltvLimit) }() + case 12: try { try decoder.decodeSingularInt64Field(value: &self.amtMsat) }() + case 13: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.destCustomRecords) }() + case 14: try { try decoder.decodeSingularUInt64Field(value: &self.outgoingChanID) }() + case 15: try { try decoder.decodeSingularBytesField(value: &self.lastHopPubkey) }() + case 16: try { try decoder.decodeRepeatedMessageField(value: &self.routeHints) }() + case 17: try { try decoder.decodeRepeatedEnumField(value: &self.destFeatures) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.pubKey.isEmpty { + try visitor.visitSingularStringField(value: self.pubKey, fieldNumber: 1) + } + if self.amt != 0 { + try visitor.visitSingularInt64Field(value: self.amt, fieldNumber: 2) + } + if self.finalCltvDelta != 0 { + try visitor.visitSingularInt32Field(value: self.finalCltvDelta, fieldNumber: 4) + } + if let v = self._feeLimit { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !self.ignoredNodes.isEmpty { + try visitor.visitRepeatedBytesField(value: self.ignoredNodes, fieldNumber: 6) + } + if !self.ignoredEdges.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ignoredEdges, fieldNumber: 7) + } + if !self.sourcePubKey.isEmpty { + try visitor.visitSingularStringField(value: self.sourcePubKey, fieldNumber: 8) + } + if self.useMissionControl != false { + try visitor.visitSingularBoolField(value: self.useMissionControl, fieldNumber: 9) + } + if !self.ignoredPairs.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ignoredPairs, fieldNumber: 10) + } + if self.cltvLimit != 0 { + try visitor.visitSingularUInt32Field(value: self.cltvLimit, fieldNumber: 11) + } + if self.amtMsat != 0 { + try visitor.visitSingularInt64Field(value: self.amtMsat, fieldNumber: 12) + } + if !self.destCustomRecords.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.destCustomRecords, fieldNumber: 13) + } + if self.outgoingChanID != 0 { + try visitor.visitSingularUInt64Field(value: self.outgoingChanID, fieldNumber: 14) + } + if !self.lastHopPubkey.isEmpty { + try visitor.visitSingularBytesField(value: self.lastHopPubkey, fieldNumber: 15) + } + if !self.routeHints.isEmpty { + try visitor.visitRepeatedMessageField(value: self.routeHints, fieldNumber: 16) + } + if !self.destFeatures.isEmpty { + try visitor.visitPackedEnumField(value: self.destFeatures, fieldNumber: 17) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_QueryRoutesRequest, rhs: Lnrpc_QueryRoutesRequest) -> Bool { + if lhs.pubKey != rhs.pubKey {return false} + if lhs.amt != rhs.amt {return false} + if lhs.amtMsat != rhs.amtMsat {return false} + if lhs.finalCltvDelta != rhs.finalCltvDelta {return false} + if lhs._feeLimit != rhs._feeLimit {return false} + if lhs.ignoredNodes != rhs.ignoredNodes {return false} + if lhs.ignoredEdges != rhs.ignoredEdges {return false} + if lhs.sourcePubKey != rhs.sourcePubKey {return false} + if lhs.useMissionControl != rhs.useMissionControl {return false} + if lhs.ignoredPairs != rhs.ignoredPairs {return false} + if lhs.cltvLimit != rhs.cltvLimit {return false} + if lhs.destCustomRecords != rhs.destCustomRecords {return false} + if lhs.outgoingChanID != rhs.outgoingChanID {return false} + if lhs.lastHopPubkey != rhs.lastHopPubkey {return false} + if lhs.routeHints != rhs.routeHints {return false} + if lhs.destFeatures != rhs.destFeatures {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NodePair: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NodePair" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "from"), + 2: .same(proto: "to"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.to) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.from.isEmpty { + try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) + } + if !self.to.isEmpty { + try visitor.visitSingularBytesField(value: self.to, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NodePair, rhs: Lnrpc_NodePair) -> Bool { + if lhs.from != rhs.from {return false} + if lhs.to != rhs.to {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_EdgeLocator: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".EdgeLocator" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "channel_id"), + 2: .standard(proto: "direction_reverse"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.channelID) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.directionReverse) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.channelID != 0 { + try visitor.visitSingularUInt64Field(value: self.channelID, fieldNumber: 1) + } + if self.directionReverse != false { + try visitor.visitSingularBoolField(value: self.directionReverse, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_EdgeLocator, rhs: Lnrpc_EdgeLocator) -> Bool { + if lhs.channelID != rhs.channelID {return false} + if lhs.directionReverse != rhs.directionReverse {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_QueryRoutesResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".QueryRoutesResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "routes"), + 2: .standard(proto: "success_prob"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.routes) }() + case 2: try { try decoder.decodeSingularDoubleField(value: &self.successProb) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.routes.isEmpty { + try visitor.visitRepeatedMessageField(value: self.routes, fieldNumber: 1) + } + if self.successProb != 0 { + try visitor.visitSingularDoubleField(value: self.successProb, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_QueryRoutesResponse, rhs: Lnrpc_QueryRoutesResponse) -> Bool { + if lhs.routes != rhs.routes {return false} + if lhs.successProb != rhs.successProb {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Hop: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Hop" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_id"), + 2: .standard(proto: "chan_capacity"), + 3: .standard(proto: "amt_to_forward"), + 4: .same(proto: "fee"), + 5: .same(proto: "expiry"), + 6: .standard(proto: "amt_to_forward_msat"), + 7: .standard(proto: "fee_msat"), + 8: .standard(proto: "pub_key"), + 9: .standard(proto: "tlv_payload"), + 10: .standard(proto: "mpp_record"), + 11: .standard(proto: "custom_records"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.chanCapacity) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.amtToForward) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() + case 5: try { try decoder.decodeSingularUInt32Field(value: &self.expiry) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.amtToForwardMsat) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &self.feeMsat) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.pubKey) }() + case 9: try { try decoder.decodeSingularBoolField(value: &self.tlvPayload) }() + case 10: try { try decoder.decodeSingularMessageField(value: &self._mppRecord) }() + case 11: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.customRecords) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 1) + } + if self.chanCapacity != 0 { + try visitor.visitSingularInt64Field(value: self.chanCapacity, fieldNumber: 2) + } + if self.amtToForward != 0 { + try visitor.visitSingularInt64Field(value: self.amtToForward, fieldNumber: 3) + } + if self.fee != 0 { + try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 4) + } + if self.expiry != 0 { + try visitor.visitSingularUInt32Field(value: self.expiry, fieldNumber: 5) + } + if self.amtToForwardMsat != 0 { + try visitor.visitSingularInt64Field(value: self.amtToForwardMsat, fieldNumber: 6) + } + if self.feeMsat != 0 { + try visitor.visitSingularInt64Field(value: self.feeMsat, fieldNumber: 7) + } + if !self.pubKey.isEmpty { + try visitor.visitSingularStringField(value: self.pubKey, fieldNumber: 8) + } + if self.tlvPayload != false { + try visitor.visitSingularBoolField(value: self.tlvPayload, fieldNumber: 9) + } + if let v = self._mppRecord { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if !self.customRecords.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.customRecords, fieldNumber: 11) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Hop, rhs: Lnrpc_Hop) -> Bool { + if lhs.chanID != rhs.chanID {return false} + if lhs.chanCapacity != rhs.chanCapacity {return false} + if lhs.amtToForward != rhs.amtToForward {return false} + if lhs.fee != rhs.fee {return false} + if lhs.expiry != rhs.expiry {return false} + if lhs.amtToForwardMsat != rhs.amtToForwardMsat {return false} + if lhs.feeMsat != rhs.feeMsat {return false} + if lhs.pubKey != rhs.pubKey {return false} + if lhs.tlvPayload != rhs.tlvPayload {return false} + if lhs._mppRecord != rhs._mppRecord {return false} + if lhs.customRecords != rhs.customRecords {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_MPPRecord: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".MPPRecord" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 11: .standard(proto: "payment_addr"), + 10: .standard(proto: "total_amt_msat"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 10: try { try decoder.decodeSingularInt64Field(value: &self.totalAmtMsat) }() + case 11: try { try decoder.decodeSingularBytesField(value: &self.paymentAddr) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.totalAmtMsat != 0 { + try visitor.visitSingularInt64Field(value: self.totalAmtMsat, fieldNumber: 10) + } + if !self.paymentAddr.isEmpty { + try visitor.visitSingularBytesField(value: self.paymentAddr, fieldNumber: 11) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_MPPRecord, rhs: Lnrpc_MPPRecord) -> Bool { + if lhs.paymentAddr != rhs.paymentAddr {return false} + if lhs.totalAmtMsat != rhs.totalAmtMsat {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Route: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Route" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "total_time_lock"), + 2: .standard(proto: "total_fees"), + 3: .standard(proto: "total_amt"), + 4: .same(proto: "hops"), + 5: .standard(proto: "total_fees_msat"), + 6: .standard(proto: "total_amt_msat"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt32Field(value: &self.totalTimeLock) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.totalFees) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.totalAmt) }() + case 4: try { try decoder.decodeRepeatedMessageField(value: &self.hops) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.totalFeesMsat) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.totalAmtMsat) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.totalTimeLock != 0 { + try visitor.visitSingularUInt32Field(value: self.totalTimeLock, fieldNumber: 1) + } + if self.totalFees != 0 { + try visitor.visitSingularInt64Field(value: self.totalFees, fieldNumber: 2) + } + if self.totalAmt != 0 { + try visitor.visitSingularInt64Field(value: self.totalAmt, fieldNumber: 3) + } + if !self.hops.isEmpty { + try visitor.visitRepeatedMessageField(value: self.hops, fieldNumber: 4) + } + if self.totalFeesMsat != 0 { + try visitor.visitSingularInt64Field(value: self.totalFeesMsat, fieldNumber: 5) + } + if self.totalAmtMsat != 0 { + try visitor.visitSingularInt64Field(value: self.totalAmtMsat, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Route, rhs: Lnrpc_Route) -> Bool { + if lhs.totalTimeLock != rhs.totalTimeLock {return false} + if lhs.totalFees != rhs.totalFees {return false} + if lhs.totalAmt != rhs.totalAmt {return false} + if lhs.hops != rhs.hops {return false} + if lhs.totalFeesMsat != rhs.totalFeesMsat {return false} + if lhs.totalAmtMsat != rhs.totalAmtMsat {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NodeInfoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NodeInfoRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pub_key"), + 2: .standard(proto: "include_channels"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.pubKey) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.includeChannels) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.pubKey.isEmpty { + try visitor.visitSingularStringField(value: self.pubKey, fieldNumber: 1) + } + if self.includeChannels != false { + try visitor.visitSingularBoolField(value: self.includeChannels, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NodeInfoRequest, rhs: Lnrpc_NodeInfoRequest) -> Bool { + if lhs.pubKey != rhs.pubKey {return false} + if lhs.includeChannels != rhs.includeChannels {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NodeInfo" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "node"), + 2: .standard(proto: "num_channels"), + 3: .standard(proto: "total_capacity"), + 4: .same(proto: "channels"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._node) }() + case 2: try { try decoder.decodeSingularUInt32Field(value: &self.numChannels) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.totalCapacity) }() + case 4: try { try decoder.decodeRepeatedMessageField(value: &self.channels) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._node { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if self.numChannels != 0 { + try visitor.visitSingularUInt32Field(value: self.numChannels, fieldNumber: 2) + } + if self.totalCapacity != 0 { + try visitor.visitSingularInt64Field(value: self.totalCapacity, fieldNumber: 3) + } + if !self.channels.isEmpty { + try visitor.visitRepeatedMessageField(value: self.channels, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NodeInfo, rhs: Lnrpc_NodeInfo) -> Bool { + if lhs._node != rhs._node {return false} + if lhs.numChannels != rhs.numChannels {return false} + if lhs.totalCapacity != rhs.totalCapacity {return false} + if lhs.channels != rhs.channels {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_LightningNode: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".LightningNode" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "last_update"), + 2: .standard(proto: "pub_key"), + 3: .same(proto: "alias"), + 4: .same(proto: "addresses"), + 5: .same(proto: "color"), + 6: .same(proto: "features"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt32Field(value: &self.lastUpdate) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.pubKey) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.alias) }() + case 4: try { try decoder.decodeRepeatedMessageField(value: &self.addresses) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.color) }() + case 6: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.features) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.lastUpdate != 0 { + try visitor.visitSingularUInt32Field(value: self.lastUpdate, fieldNumber: 1) + } + if !self.pubKey.isEmpty { + try visitor.visitSingularStringField(value: self.pubKey, fieldNumber: 2) + } + if !self.alias.isEmpty { + try visitor.visitSingularStringField(value: self.alias, fieldNumber: 3) + } + if !self.addresses.isEmpty { + try visitor.visitRepeatedMessageField(value: self.addresses, fieldNumber: 4) + } + if !self.color.isEmpty { + try visitor.visitSingularStringField(value: self.color, fieldNumber: 5) + } + if !self.features.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.features, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_LightningNode, rhs: Lnrpc_LightningNode) -> Bool { + if lhs.lastUpdate != rhs.lastUpdate {return false} + if lhs.pubKey != rhs.pubKey {return false} + if lhs.alias != rhs.alias {return false} + if lhs.addresses != rhs.addresses {return false} + if lhs.color != rhs.color {return false} + if lhs.features != rhs.features {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NodeAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NodeAddress" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "network"), + 2: .same(proto: "addr"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.network) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.addr) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.network.isEmpty { + try visitor.visitSingularStringField(value: self.network, fieldNumber: 1) + } + if !self.addr.isEmpty { + try visitor.visitSingularStringField(value: self.addr, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NodeAddress, rhs: Lnrpc_NodeAddress) -> Bool { + if lhs.network != rhs.network {return false} + if lhs.addr != rhs.addr {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_RoutingPolicy: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RoutingPolicy" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "time_lock_delta"), + 2: .standard(proto: "min_htlc"), + 3: .standard(proto: "fee_base_msat"), + 4: .standard(proto: "fee_rate_milli_msat"), + 5: .same(proto: "disabled"), + 6: .standard(proto: "max_htlc_msat"), + 7: .standard(proto: "last_update"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt32Field(value: &self.timeLockDelta) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.minHtlc) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.feeBaseMsat) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self.feeRateMilliMsat) }() + case 5: try { try decoder.decodeSingularBoolField(value: &self.disabled) }() + case 6: try { try decoder.decodeSingularUInt64Field(value: &self.maxHtlcMsat) }() + case 7: try { try decoder.decodeSingularUInt32Field(value: &self.lastUpdate) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.timeLockDelta != 0 { + try visitor.visitSingularUInt32Field(value: self.timeLockDelta, fieldNumber: 1) + } + if self.minHtlc != 0 { + try visitor.visitSingularInt64Field(value: self.minHtlc, fieldNumber: 2) + } + if self.feeBaseMsat != 0 { + try visitor.visitSingularInt64Field(value: self.feeBaseMsat, fieldNumber: 3) + } + if self.feeRateMilliMsat != 0 { + try visitor.visitSingularInt64Field(value: self.feeRateMilliMsat, fieldNumber: 4) + } + if self.disabled != false { + try visitor.visitSingularBoolField(value: self.disabled, fieldNumber: 5) + } + if self.maxHtlcMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.maxHtlcMsat, fieldNumber: 6) + } + if self.lastUpdate != 0 { + try visitor.visitSingularUInt32Field(value: self.lastUpdate, fieldNumber: 7) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_RoutingPolicy, rhs: Lnrpc_RoutingPolicy) -> Bool { + if lhs.timeLockDelta != rhs.timeLockDelta {return false} + if lhs.minHtlc != rhs.minHtlc {return false} + if lhs.feeBaseMsat != rhs.feeBaseMsat {return false} + if lhs.feeRateMilliMsat != rhs.feeRateMilliMsat {return false} + if lhs.disabled != rhs.disabled {return false} + if lhs.maxHtlcMsat != rhs.maxHtlcMsat {return false} + if lhs.lastUpdate != rhs.lastUpdate {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelEdge: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelEdge" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "channel_id"), + 2: .standard(proto: "chan_point"), + 3: .standard(proto: "last_update"), + 4: .standard(proto: "node1_pub"), + 5: .standard(proto: "node2_pub"), + 6: .same(proto: "capacity"), + 7: .standard(proto: "node1_policy"), + 8: .standard(proto: "node2_policy"), + ] + + fileprivate class _StorageClass { + var _channelID: UInt64 = 0 + var _chanPoint: String = String() + var _lastUpdate: UInt32 = 0 + var _node1Pub: String = String() + var _node2Pub: String = String() + var _capacity: Int64 = 0 + var _node1Policy: Lnrpc_RoutingPolicy? = nil + var _node2Policy: Lnrpc_RoutingPolicy? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _channelID = source._channelID + _chanPoint = source._chanPoint + _lastUpdate = source._lastUpdate + _node1Pub = source._node1Pub + _node2Pub = source._node2Pub + _capacity = source._capacity + _node1Policy = source._node1Policy + _node2Policy = source._node2Policy + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &_storage._channelID) }() + case 2: try { try decoder.decodeSingularStringField(value: &_storage._chanPoint) }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._lastUpdate) }() + case 4: try { try decoder.decodeSingularStringField(value: &_storage._node1Pub) }() + case 5: try { try decoder.decodeSingularStringField(value: &_storage._node2Pub) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &_storage._capacity) }() + case 7: try { try decoder.decodeSingularMessageField(value: &_storage._node1Policy) }() + case 8: try { try decoder.decodeSingularMessageField(value: &_storage._node2Policy) }() + default: break + } + } + } + } + + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._channelID != 0 { + try visitor.visitSingularUInt64Field(value: _storage._channelID, fieldNumber: 1) + } + if !_storage._chanPoint.isEmpty { + try visitor.visitSingularStringField(value: _storage._chanPoint, fieldNumber: 2) + } + if _storage._lastUpdate != 0 { + try visitor.visitSingularUInt32Field(value: _storage._lastUpdate, fieldNumber: 3) + } + if !_storage._node1Pub.isEmpty { + try visitor.visitSingularStringField(value: _storage._node1Pub, fieldNumber: 4) + } + if !_storage._node2Pub.isEmpty { + try visitor.visitSingularStringField(value: _storage._node2Pub, fieldNumber: 5) + } + if _storage._capacity != 0 { + try visitor.visitSingularInt64Field(value: _storage._capacity, fieldNumber: 6) + } + if let v = _storage._node1Policy { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._node2Policy { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelEdge, rhs: Lnrpc_ChannelEdge) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._channelID != rhs_storage._channelID {return false} + if _storage._chanPoint != rhs_storage._chanPoint {return false} + if _storage._lastUpdate != rhs_storage._lastUpdate {return false} + if _storage._node1Pub != rhs_storage._node1Pub {return false} + if _storage._node2Pub != rhs_storage._node2Pub {return false} + if _storage._capacity != rhs_storage._capacity {return false} + if _storage._node1Policy != rhs_storage._node1Policy {return false} + if _storage._node2Policy != rhs_storage._node2Policy {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelGraphRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelGraphRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "include_unannounced"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.includeUnannounced) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.includeUnannounced != false { + try visitor.visitSingularBoolField(value: self.includeUnannounced, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelGraphRequest, rhs: Lnrpc_ChannelGraphRequest) -> Bool { + if lhs.includeUnannounced != rhs.includeUnannounced {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelGraph: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelGraph" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "nodes"), + 2: .same(proto: "edges"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.nodes) }() + case 2: try { try decoder.decodeRepeatedMessageField(value: &self.edges) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.nodes.isEmpty { + try visitor.visitRepeatedMessageField(value: self.nodes, fieldNumber: 1) + } + if !self.edges.isEmpty { + try visitor.visitRepeatedMessageField(value: self.edges, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelGraph, rhs: Lnrpc_ChannelGraph) -> Bool { + if lhs.nodes != rhs.nodes {return false} + if lhs.edges != rhs.edges {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NodeMetricsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NodeMetricsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "types"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedEnumField(value: &self.types) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.types.isEmpty { + try visitor.visitPackedEnumField(value: self.types, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NodeMetricsRequest, rhs: Lnrpc_NodeMetricsRequest) -> Bool { + if lhs.types != rhs.types {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NodeMetricsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NodeMetricsResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "betweenness_centrality"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.betweennessCentrality) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.betweennessCentrality.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.betweennessCentrality, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NodeMetricsResponse, rhs: Lnrpc_NodeMetricsResponse) -> Bool { + if lhs.betweennessCentrality != rhs.betweennessCentrality {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FloatMetric: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FloatMetric" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + 2: .standard(proto: "normalized_value"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularDoubleField(value: &self.value) }() + case 2: try { try decoder.decodeSingularDoubleField(value: &self.normalizedValue) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.value != 0 { + try visitor.visitSingularDoubleField(value: self.value, fieldNumber: 1) + } + if self.normalizedValue != 0 { + try visitor.visitSingularDoubleField(value: self.normalizedValue, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FloatMetric, rhs: Lnrpc_FloatMetric) -> Bool { + if lhs.value != rhs.value {return false} + if lhs.normalizedValue != rhs.normalizedValue {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChanInfoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChanInfoRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_id"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChanInfoRequest, rhs: Lnrpc_ChanInfoRequest) -> Bool { + if lhs.chanID != rhs.chanID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NetworkInfoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NetworkInfoRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NetworkInfoRequest, rhs: Lnrpc_NetworkInfoRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NetworkInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NetworkInfo" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "graph_diameter"), + 2: .standard(proto: "avg_out_degree"), + 3: .standard(proto: "max_out_degree"), + 4: .standard(proto: "num_nodes"), + 5: .standard(proto: "num_channels"), + 6: .standard(proto: "total_network_capacity"), + 7: .standard(proto: "avg_channel_size"), + 8: .standard(proto: "min_channel_size"), + 9: .standard(proto: "max_channel_size"), + 10: .standard(proto: "median_channel_size_sat"), + 11: .standard(proto: "num_zombie_chans"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt32Field(value: &self.graphDiameter) }() + case 2: try { try decoder.decodeSingularDoubleField(value: &self.avgOutDegree) }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &self.maxOutDegree) }() + case 4: try { try decoder.decodeSingularUInt32Field(value: &self.numNodes) }() + case 5: try { try decoder.decodeSingularUInt32Field(value: &self.numChannels) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.totalNetworkCapacity) }() + case 7: try { try decoder.decodeSingularDoubleField(value: &self.avgChannelSize) }() + case 8: try { try decoder.decodeSingularInt64Field(value: &self.minChannelSize) }() + case 9: try { try decoder.decodeSingularInt64Field(value: &self.maxChannelSize) }() + case 10: try { try decoder.decodeSingularInt64Field(value: &self.medianChannelSizeSat) }() + case 11: try { try decoder.decodeSingularUInt64Field(value: &self.numZombieChans) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.graphDiameter != 0 { + try visitor.visitSingularUInt32Field(value: self.graphDiameter, fieldNumber: 1) + } + if self.avgOutDegree != 0 { + try visitor.visitSingularDoubleField(value: self.avgOutDegree, fieldNumber: 2) + } + if self.maxOutDegree != 0 { + try visitor.visitSingularUInt32Field(value: self.maxOutDegree, fieldNumber: 3) + } + if self.numNodes != 0 { + try visitor.visitSingularUInt32Field(value: self.numNodes, fieldNumber: 4) + } + if self.numChannels != 0 { + try visitor.visitSingularUInt32Field(value: self.numChannels, fieldNumber: 5) + } + if self.totalNetworkCapacity != 0 { + try visitor.visitSingularInt64Field(value: self.totalNetworkCapacity, fieldNumber: 6) + } + if self.avgChannelSize != 0 { + try visitor.visitSingularDoubleField(value: self.avgChannelSize, fieldNumber: 7) + } + if self.minChannelSize != 0 { + try visitor.visitSingularInt64Field(value: self.minChannelSize, fieldNumber: 8) + } + if self.maxChannelSize != 0 { + try visitor.visitSingularInt64Field(value: self.maxChannelSize, fieldNumber: 9) + } + if self.medianChannelSizeSat != 0 { + try visitor.visitSingularInt64Field(value: self.medianChannelSizeSat, fieldNumber: 10) + } + if self.numZombieChans != 0 { + try visitor.visitSingularUInt64Field(value: self.numZombieChans, fieldNumber: 11) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NetworkInfo, rhs: Lnrpc_NetworkInfo) -> Bool { + if lhs.graphDiameter != rhs.graphDiameter {return false} + if lhs.avgOutDegree != rhs.avgOutDegree {return false} + if lhs.maxOutDegree != rhs.maxOutDegree {return false} + if lhs.numNodes != rhs.numNodes {return false} + if lhs.numChannels != rhs.numChannels {return false} + if lhs.totalNetworkCapacity != rhs.totalNetworkCapacity {return false} + if lhs.avgChannelSize != rhs.avgChannelSize {return false} + if lhs.minChannelSize != rhs.minChannelSize {return false} + if lhs.maxChannelSize != rhs.maxChannelSize {return false} + if lhs.medianChannelSizeSat != rhs.medianChannelSizeSat {return false} + if lhs.numZombieChans != rhs.numZombieChans {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_StopRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".StopRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_StopRequest, rhs: Lnrpc_StopRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_StopResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".StopResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_StopResponse, rhs: Lnrpc_StopResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_GraphTopologySubscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GraphTopologySubscription" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GraphTopologySubscription, rhs: Lnrpc_GraphTopologySubscription) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_GraphTopologyUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GraphTopologyUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "node_updates"), + 2: .standard(proto: "channel_updates"), + 3: .standard(proto: "closed_chans"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.nodeUpdates) }() + case 2: try { try decoder.decodeRepeatedMessageField(value: &self.channelUpdates) }() + case 3: try { try decoder.decodeRepeatedMessageField(value: &self.closedChans) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.nodeUpdates.isEmpty { + try visitor.visitRepeatedMessageField(value: self.nodeUpdates, fieldNumber: 1) + } + if !self.channelUpdates.isEmpty { + try visitor.visitRepeatedMessageField(value: self.channelUpdates, fieldNumber: 2) + } + if !self.closedChans.isEmpty { + try visitor.visitRepeatedMessageField(value: self.closedChans, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GraphTopologyUpdate, rhs: Lnrpc_GraphTopologyUpdate) -> Bool { + if lhs.nodeUpdates != rhs.nodeUpdates {return false} + if lhs.channelUpdates != rhs.channelUpdates {return false} + if lhs.closedChans != rhs.closedChans {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_NodeUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".NodeUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "addresses"), + 2: .standard(proto: "identity_key"), + 3: .standard(proto: "global_features"), + 4: .same(proto: "alias"), + 5: .same(proto: "color"), + 6: .same(proto: "features"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedStringField(value: &self.addresses) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.identityKey) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self.globalFeatures) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.alias) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.color) }() + case 6: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.features) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.addresses.isEmpty { + try visitor.visitRepeatedStringField(value: self.addresses, fieldNumber: 1) + } + if !self.identityKey.isEmpty { + try visitor.visitSingularStringField(value: self.identityKey, fieldNumber: 2) + } + if !self.globalFeatures.isEmpty { + try visitor.visitSingularBytesField(value: self.globalFeatures, fieldNumber: 3) + } + if !self.alias.isEmpty { + try visitor.visitSingularStringField(value: self.alias, fieldNumber: 4) + } + if !self.color.isEmpty { + try visitor.visitSingularStringField(value: self.color, fieldNumber: 5) + } + if !self.features.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.features, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_NodeUpdate, rhs: Lnrpc_NodeUpdate) -> Bool { + if lhs.addresses != rhs.addresses {return false} + if lhs.identityKey != rhs.identityKey {return false} + if lhs.globalFeatures != rhs.globalFeatures {return false} + if lhs.alias != rhs.alias {return false} + if lhs.color != rhs.color {return false} + if lhs.features != rhs.features {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelEdgeUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelEdgeUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_id"), + 2: .standard(proto: "chan_point"), + 3: .same(proto: "capacity"), + 4: .standard(proto: "routing_policy"), + 5: .standard(proto: "advertising_node"), + 6: .standard(proto: "connecting_node"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._chanPoint) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.capacity) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._routingPolicy) }() + case 5: try { try decoder.decodeSingularStringField(value: &self.advertisingNode) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.connectingNode) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 1) + } + if let v = self._chanPoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if self.capacity != 0 { + try visitor.visitSingularInt64Field(value: self.capacity, fieldNumber: 3) + } + if let v = self._routingPolicy { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !self.advertisingNode.isEmpty { + try visitor.visitSingularStringField(value: self.advertisingNode, fieldNumber: 5) + } + if !self.connectingNode.isEmpty { + try visitor.visitSingularStringField(value: self.connectingNode, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelEdgeUpdate, rhs: Lnrpc_ChannelEdgeUpdate) -> Bool { + if lhs.chanID != rhs.chanID {return false} + if lhs._chanPoint != rhs._chanPoint {return false} + if lhs.capacity != rhs.capacity {return false} + if lhs._routingPolicy != rhs._routingPolicy {return false} + if lhs.advertisingNode != rhs.advertisingNode {return false} + if lhs.connectingNode != rhs.connectingNode {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ClosedChannelUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ClosedChannelUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_id"), + 2: .same(proto: "capacity"), + 3: .standard(proto: "closed_height"), + 4: .standard(proto: "chan_point"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.capacity) }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &self.closedHeight) }() + case 4: try { try decoder.decodeSingularMessageField(value: &self._chanPoint) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 1) + } + if self.capacity != 0 { + try visitor.visitSingularInt64Field(value: self.capacity, fieldNumber: 2) + } + if self.closedHeight != 0 { + try visitor.visitSingularUInt32Field(value: self.closedHeight, fieldNumber: 3) + } + if let v = self._chanPoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ClosedChannelUpdate, rhs: Lnrpc_ClosedChannelUpdate) -> Bool { + if lhs.chanID != rhs.chanID {return false} + if lhs.capacity != rhs.capacity {return false} + if lhs.closedHeight != rhs.closedHeight {return false} + if lhs._chanPoint != rhs._chanPoint {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_HopHint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".HopHint" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "node_id"), + 2: .standard(proto: "chan_id"), + 3: .standard(proto: "fee_base_msat"), + 4: .standard(proto: "fee_proportional_millionths"), + 5: .standard(proto: "cltv_expiry_delta"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.nodeID) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &self.feeBaseMsat) }() + case 4: try { try decoder.decodeSingularUInt32Field(value: &self.feeProportionalMillionths) }() + case 5: try { try decoder.decodeSingularUInt32Field(value: &self.cltvExpiryDelta) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.nodeID.isEmpty { + try visitor.visitSingularStringField(value: self.nodeID, fieldNumber: 1) + } + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 2) + } + if self.feeBaseMsat != 0 { + try visitor.visitSingularUInt32Field(value: self.feeBaseMsat, fieldNumber: 3) + } + if self.feeProportionalMillionths != 0 { + try visitor.visitSingularUInt32Field(value: self.feeProportionalMillionths, fieldNumber: 4) + } + if self.cltvExpiryDelta != 0 { + try visitor.visitSingularUInt32Field(value: self.cltvExpiryDelta, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_HopHint, rhs: Lnrpc_HopHint) -> Bool { + if lhs.nodeID != rhs.nodeID {return false} + if lhs.chanID != rhs.chanID {return false} + if lhs.feeBaseMsat != rhs.feeBaseMsat {return false} + if lhs.feeProportionalMillionths != rhs.feeProportionalMillionths {return false} + if lhs.cltvExpiryDelta != rhs.cltvExpiryDelta {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_RouteHint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RouteHint" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "hop_hints"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.hopHints) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.hopHints.isEmpty { + try visitor.visitRepeatedMessageField(value: self.hopHints, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_RouteHint, rhs: Lnrpc_RouteHint) -> Bool { + if lhs.hopHints != rhs.hopHints {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Invoice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Invoice" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "memo"), + 3: .standard(proto: "r_preimage"), + 4: .standard(proto: "r_hash"), + 5: .same(proto: "value"), + 23: .standard(proto: "value_msat"), + 6: .same(proto: "settled"), + 7: .standard(proto: "creation_date"), + 8: .standard(proto: "settle_date"), + 9: .standard(proto: "payment_request"), + 10: .standard(proto: "description_hash"), + 11: .same(proto: "expiry"), + 12: .standard(proto: "fallback_addr"), + 13: .standard(proto: "cltv_expiry"), + 14: .standard(proto: "route_hints"), + 15: .same(proto: "private"), + 16: .standard(proto: "add_index"), + 17: .standard(proto: "settle_index"), + 18: .standard(proto: "amt_paid"), + 19: .standard(proto: "amt_paid_sat"), + 20: .standard(proto: "amt_paid_msat"), + 21: .same(proto: "state"), + 22: .same(proto: "htlcs"), + 24: .same(proto: "features"), + 25: .standard(proto: "is_keysend"), + 26: .standard(proto: "payment_addr"), + ] + + fileprivate class _StorageClass { + var _memo: String = String() + var _rPreimage: Data = Data() + var _rHash: Data = Data() + var _value: Int64 = 0 + var _valueMsat: Int64 = 0 + var _settled: Bool = false + var _creationDate: Int64 = 0 + var _settleDate: Int64 = 0 + var _paymentRequest: String = String() + var _descriptionHash: Data = Data() + var _expiry: Int64 = 0 + var _fallbackAddr: String = String() + var _cltvExpiry: UInt64 = 0 + var _routeHints: [Lnrpc_RouteHint] = [] + var _private: Bool = false + var _addIndex: UInt64 = 0 + var _settleIndex: UInt64 = 0 + var _amtPaid: Int64 = 0 + var _amtPaidSat: Int64 = 0 + var _amtPaidMsat: Int64 = 0 + var _state: Lnrpc_Invoice.InvoiceState = .open + var _htlcs: [Lnrpc_InvoiceHTLC] = [] + var _features: Dictionary = [:] + var _isKeysend: Bool = false + var _paymentAddr: Data = Data() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _memo = source._memo + _rPreimage = source._rPreimage + _rHash = source._rHash + _value = source._value + _valueMsat = source._valueMsat + _settled = source._settled + _creationDate = source._creationDate + _settleDate = source._settleDate + _paymentRequest = source._paymentRequest + _descriptionHash = source._descriptionHash + _expiry = source._expiry + _fallbackAddr = source._fallbackAddr + _cltvExpiry = source._cltvExpiry + _routeHints = source._routeHints + _private = source._private + _addIndex = source._addIndex + _settleIndex = source._settleIndex + _amtPaid = source._amtPaid + _amtPaidSat = source._amtPaidSat + _amtPaidMsat = source._amtPaidMsat + _state = source._state + _htlcs = source._htlcs + _features = source._features + _isKeysend = source._isKeysend + _paymentAddr = source._paymentAddr + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &_storage._memo) }() + case 3: try { try decoder.decodeSingularBytesField(value: &_storage._rPreimage) }() + case 4: try { try decoder.decodeSingularBytesField(value: &_storage._rHash) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &_storage._value) }() + case 6: try { try decoder.decodeSingularBoolField(value: &_storage._settled) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &_storage._creationDate) }() + case 8: try { try decoder.decodeSingularInt64Field(value: &_storage._settleDate) }() + case 9: try { try decoder.decodeSingularStringField(value: &_storage._paymentRequest) }() + case 10: try { try decoder.decodeSingularBytesField(value: &_storage._descriptionHash) }() + case 11: try { try decoder.decodeSingularInt64Field(value: &_storage._expiry) }() + case 12: try { try decoder.decodeSingularStringField(value: &_storage._fallbackAddr) }() + case 13: try { try decoder.decodeSingularUInt64Field(value: &_storage._cltvExpiry) }() + case 14: try { try decoder.decodeRepeatedMessageField(value: &_storage._routeHints) }() + case 15: try { try decoder.decodeSingularBoolField(value: &_storage._private) }() + case 16: try { try decoder.decodeSingularUInt64Field(value: &_storage._addIndex) }() + case 17: try { try decoder.decodeSingularUInt64Field(value: &_storage._settleIndex) }() + case 18: try { try decoder.decodeSingularInt64Field(value: &_storage._amtPaid) }() + case 19: try { try decoder.decodeSingularInt64Field(value: &_storage._amtPaidSat) }() + case 20: try { try decoder.decodeSingularInt64Field(value: &_storage._amtPaidMsat) }() + case 21: try { try decoder.decodeSingularEnumField(value: &_storage._state) }() + case 22: try { try decoder.decodeRepeatedMessageField(value: &_storage._htlcs) }() + case 23: try { try decoder.decodeSingularInt64Field(value: &_storage._valueMsat) }() + case 24: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._features) }() + case 25: try { try decoder.decodeSingularBoolField(value: &_storage._isKeysend) }() + case 26: try { try decoder.decodeSingularBytesField(value: &_storage._paymentAddr) }() + default: break + } + } + } + } + + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._memo.isEmpty { + try visitor.visitSingularStringField(value: _storage._memo, fieldNumber: 1) + } + if !_storage._rPreimage.isEmpty { + try visitor.visitSingularBytesField(value: _storage._rPreimage, fieldNumber: 3) + } + if !_storage._rHash.isEmpty { + try visitor.visitSingularBytesField(value: _storage._rHash, fieldNumber: 4) + } + if _storage._value != 0 { + try visitor.visitSingularInt64Field(value: _storage._value, fieldNumber: 5) + } + if _storage._settled != false { + try visitor.visitSingularBoolField(value: _storage._settled, fieldNumber: 6) + } + if _storage._creationDate != 0 { + try visitor.visitSingularInt64Field(value: _storage._creationDate, fieldNumber: 7) + } + if _storage._settleDate != 0 { + try visitor.visitSingularInt64Field(value: _storage._settleDate, fieldNumber: 8) + } + if !_storage._paymentRequest.isEmpty { + try visitor.visitSingularStringField(value: _storage._paymentRequest, fieldNumber: 9) + } + if !_storage._descriptionHash.isEmpty { + try visitor.visitSingularBytesField(value: _storage._descriptionHash, fieldNumber: 10) + } + if _storage._expiry != 0 { + try visitor.visitSingularInt64Field(value: _storage._expiry, fieldNumber: 11) + } + if !_storage._fallbackAddr.isEmpty { + try visitor.visitSingularStringField(value: _storage._fallbackAddr, fieldNumber: 12) + } + if _storage._cltvExpiry != 0 { + try visitor.visitSingularUInt64Field(value: _storage._cltvExpiry, fieldNumber: 13) + } + if !_storage._routeHints.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._routeHints, fieldNumber: 14) + } + if _storage._private != false { + try visitor.visitSingularBoolField(value: _storage._private, fieldNumber: 15) + } + if _storage._addIndex != 0 { + try visitor.visitSingularUInt64Field(value: _storage._addIndex, fieldNumber: 16) + } + if _storage._settleIndex != 0 { + try visitor.visitSingularUInt64Field(value: _storage._settleIndex, fieldNumber: 17) + } + if _storage._amtPaid != 0 { + try visitor.visitSingularInt64Field(value: _storage._amtPaid, fieldNumber: 18) + } + if _storage._amtPaidSat != 0 { + try visitor.visitSingularInt64Field(value: _storage._amtPaidSat, fieldNumber: 19) + } + if _storage._amtPaidMsat != 0 { + try visitor.visitSingularInt64Field(value: _storage._amtPaidMsat, fieldNumber: 20) + } + if _storage._state != .open { + try visitor.visitSingularEnumField(value: _storage._state, fieldNumber: 21) + } + if !_storage._htlcs.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._htlcs, fieldNumber: 22) + } + if _storage._valueMsat != 0 { + try visitor.visitSingularInt64Field(value: _storage._valueMsat, fieldNumber: 23) + } + if !_storage._features.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._features, fieldNumber: 24) + } + if _storage._isKeysend != false { + try visitor.visitSingularBoolField(value: _storage._isKeysend, fieldNumber: 25) + } + if !_storage._paymentAddr.isEmpty { + try visitor.visitSingularBytesField(value: _storage._paymentAddr, fieldNumber: 26) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Invoice, rhs: Lnrpc_Invoice) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._memo != rhs_storage._memo {return false} + if _storage._rPreimage != rhs_storage._rPreimage {return false} + if _storage._rHash != rhs_storage._rHash {return false} + if _storage._value != rhs_storage._value {return false} + if _storage._valueMsat != rhs_storage._valueMsat {return false} + if _storage._settled != rhs_storage._settled {return false} + if _storage._creationDate != rhs_storage._creationDate {return false} + if _storage._settleDate != rhs_storage._settleDate {return false} + if _storage._paymentRequest != rhs_storage._paymentRequest {return false} + if _storage._descriptionHash != rhs_storage._descriptionHash {return false} + if _storage._expiry != rhs_storage._expiry {return false} + if _storage._fallbackAddr != rhs_storage._fallbackAddr {return false} + if _storage._cltvExpiry != rhs_storage._cltvExpiry {return false} + if _storage._routeHints != rhs_storage._routeHints {return false} + if _storage._private != rhs_storage._private {return false} + if _storage._addIndex != rhs_storage._addIndex {return false} + if _storage._settleIndex != rhs_storage._settleIndex {return false} + if _storage._amtPaid != rhs_storage._amtPaid {return false} + if _storage._amtPaidSat != rhs_storage._amtPaidSat {return false} + if _storage._amtPaidMsat != rhs_storage._amtPaidMsat {return false} + if _storage._state != rhs_storage._state {return false} + if _storage._htlcs != rhs_storage._htlcs {return false} + if _storage._features != rhs_storage._features {return false} + if _storage._isKeysend != rhs_storage._isKeysend {return false} + if _storage._paymentAddr != rhs_storage._paymentAddr {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Invoice.InvoiceState: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "OPEN"), + 1: .same(proto: "SETTLED"), + 2: .same(proto: "CANCELED"), + 3: .same(proto: "ACCEPTED"), + ] +} + +extension Lnrpc_InvoiceHTLC: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".InvoiceHTLC" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_id"), + 2: .standard(proto: "htlc_index"), + 3: .standard(proto: "amt_msat"), + 4: .standard(proto: "accept_height"), + 5: .standard(proto: "accept_time"), + 6: .standard(proto: "resolve_time"), + 7: .standard(proto: "expiry_height"), + 8: .same(proto: "state"), + 9: .standard(proto: "custom_records"), + 10: .standard(proto: "mpp_total_amt_msat"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.htlcIndex) }() + case 3: try { try decoder.decodeSingularUInt64Field(value: &self.amtMsat) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.acceptHeight) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.acceptTime) }() + case 6: try { try decoder.decodeSingularInt64Field(value: &self.resolveTime) }() + case 7: try { try decoder.decodeSingularInt32Field(value: &self.expiryHeight) }() + case 8: try { try decoder.decodeSingularEnumField(value: &self.state) }() + case 9: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.customRecords) }() + case 10: try { try decoder.decodeSingularUInt64Field(value: &self.mppTotalAmtMsat) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 1) + } + if self.htlcIndex != 0 { + try visitor.visitSingularUInt64Field(value: self.htlcIndex, fieldNumber: 2) + } + if self.amtMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.amtMsat, fieldNumber: 3) + } + if self.acceptHeight != 0 { + try visitor.visitSingularInt32Field(value: self.acceptHeight, fieldNumber: 4) + } + if self.acceptTime != 0 { + try visitor.visitSingularInt64Field(value: self.acceptTime, fieldNumber: 5) + } + if self.resolveTime != 0 { + try visitor.visitSingularInt64Field(value: self.resolveTime, fieldNumber: 6) + } + if self.expiryHeight != 0 { + try visitor.visitSingularInt32Field(value: self.expiryHeight, fieldNumber: 7) + } + if self.state != .accepted { + try visitor.visitSingularEnumField(value: self.state, fieldNumber: 8) + } + if !self.customRecords.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.customRecords, fieldNumber: 9) + } + if self.mppTotalAmtMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.mppTotalAmtMsat, fieldNumber: 10) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_InvoiceHTLC, rhs: Lnrpc_InvoiceHTLC) -> Bool { + if lhs.chanID != rhs.chanID {return false} + if lhs.htlcIndex != rhs.htlcIndex {return false} + if lhs.amtMsat != rhs.amtMsat {return false} + if lhs.acceptHeight != rhs.acceptHeight {return false} + if lhs.acceptTime != rhs.acceptTime {return false} + if lhs.resolveTime != rhs.resolveTime {return false} + if lhs.expiryHeight != rhs.expiryHeight {return false} + if lhs.state != rhs.state {return false} + if lhs.customRecords != rhs.customRecords {return false} + if lhs.mppTotalAmtMsat != rhs.mppTotalAmtMsat {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_AddInvoiceResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AddInvoiceResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "r_hash"), + 2: .standard(proto: "payment_request"), + 16: .standard(proto: "add_index"), + 17: .standard(proto: "payment_addr"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.rHash) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.paymentRequest) }() + case 16: try { try decoder.decodeSingularUInt64Field(value: &self.addIndex) }() + case 17: try { try decoder.decodeSingularBytesField(value: &self.paymentAddr) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.rHash.isEmpty { + try visitor.visitSingularBytesField(value: self.rHash, fieldNumber: 1) + } + if !self.paymentRequest.isEmpty { + try visitor.visitSingularStringField(value: self.paymentRequest, fieldNumber: 2) + } + if self.addIndex != 0 { + try visitor.visitSingularUInt64Field(value: self.addIndex, fieldNumber: 16) + } + if !self.paymentAddr.isEmpty { + try visitor.visitSingularBytesField(value: self.paymentAddr, fieldNumber: 17) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_AddInvoiceResponse, rhs: Lnrpc_AddInvoiceResponse) -> Bool { + if lhs.rHash != rhs.rHash {return false} + if lhs.paymentRequest != rhs.paymentRequest {return false} + if lhs.addIndex != rhs.addIndex {return false} + if lhs.paymentAddr != rhs.paymentAddr {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PaymentHash: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PaymentHash" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "r_hash_str"), + 2: .standard(proto: "r_hash"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.rHashStr) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.rHash) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.rHashStr.isEmpty { + try visitor.visitSingularStringField(value: self.rHashStr, fieldNumber: 1) + } + if !self.rHash.isEmpty { + try visitor.visitSingularBytesField(value: self.rHash, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PaymentHash, rhs: Lnrpc_PaymentHash) -> Bool { + if lhs.rHashStr != rhs.rHashStr {return false} + if lhs.rHash != rhs.rHash {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListInvoiceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListInvoiceRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pending_only"), + 4: .standard(proto: "index_offset"), + 5: .standard(proto: "num_max_invoices"), + 6: .same(proto: "reversed"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.pendingOnly) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &self.indexOffset) }() + case 5: try { try decoder.decodeSingularUInt64Field(value: &self.numMaxInvoices) }() + case 6: try { try decoder.decodeSingularBoolField(value: &self.reversed) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.pendingOnly != false { + try visitor.visitSingularBoolField(value: self.pendingOnly, fieldNumber: 1) + } + if self.indexOffset != 0 { + try visitor.visitSingularUInt64Field(value: self.indexOffset, fieldNumber: 4) + } + if self.numMaxInvoices != 0 { + try visitor.visitSingularUInt64Field(value: self.numMaxInvoices, fieldNumber: 5) + } + if self.reversed != false { + try visitor.visitSingularBoolField(value: self.reversed, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListInvoiceRequest, rhs: Lnrpc_ListInvoiceRequest) -> Bool { + if lhs.pendingOnly != rhs.pendingOnly {return false} + if lhs.indexOffset != rhs.indexOffset {return false} + if lhs.numMaxInvoices != rhs.numMaxInvoices {return false} + if lhs.reversed != rhs.reversed {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListInvoiceResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListInvoiceResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "invoices"), + 2: .standard(proto: "last_index_offset"), + 3: .standard(proto: "first_index_offset"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.invoices) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.lastIndexOffset) }() + case 3: try { try decoder.decodeSingularUInt64Field(value: &self.firstIndexOffset) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.invoices.isEmpty { + try visitor.visitRepeatedMessageField(value: self.invoices, fieldNumber: 1) + } + if self.lastIndexOffset != 0 { + try visitor.visitSingularUInt64Field(value: self.lastIndexOffset, fieldNumber: 2) + } + if self.firstIndexOffset != 0 { + try visitor.visitSingularUInt64Field(value: self.firstIndexOffset, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListInvoiceResponse, rhs: Lnrpc_ListInvoiceResponse) -> Bool { + if lhs.invoices != rhs.invoices {return false} + if lhs.lastIndexOffset != rhs.lastIndexOffset {return false} + if lhs.firstIndexOffset != rhs.firstIndexOffset {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_InvoiceSubscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".InvoiceSubscription" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "add_index"), + 2: .standard(proto: "settle_index"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.addIndex) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.settleIndex) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.addIndex != 0 { + try visitor.visitSingularUInt64Field(value: self.addIndex, fieldNumber: 1) + } + if self.settleIndex != 0 { + try visitor.visitSingularUInt64Field(value: self.settleIndex, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_InvoiceSubscription, rhs: Lnrpc_InvoiceSubscription) -> Bool { + if lhs.addIndex != rhs.addIndex {return false} + if lhs.settleIndex != rhs.settleIndex {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Payment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Payment" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "payment_hash"), + 2: .same(proto: "value"), + 3: .standard(proto: "creation_date"), + 5: .same(proto: "fee"), + 6: .standard(proto: "payment_preimage"), + 7: .standard(proto: "value_sat"), + 8: .standard(proto: "value_msat"), + 9: .standard(proto: "payment_request"), + 10: .same(proto: "status"), + 11: .standard(proto: "fee_sat"), + 12: .standard(proto: "fee_msat"), + 13: .standard(proto: "creation_time_ns"), + 14: .same(proto: "htlcs"), + 15: .standard(proto: "payment_index"), + 16: .standard(proto: "failure_reason"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.paymentHash) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.value) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.creationDate) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.paymentPreimage) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &self.valueSat) }() + case 8: try { try decoder.decodeSingularInt64Field(value: &self.valueMsat) }() + case 9: try { try decoder.decodeSingularStringField(value: &self.paymentRequest) }() + case 10: try { try decoder.decodeSingularEnumField(value: &self.status) }() + case 11: try { try decoder.decodeSingularInt64Field(value: &self.feeSat) }() + case 12: try { try decoder.decodeSingularInt64Field(value: &self.feeMsat) }() + case 13: try { try decoder.decodeSingularInt64Field(value: &self.creationTimeNs) }() + case 14: try { try decoder.decodeRepeatedMessageField(value: &self.htlcs) }() + case 15: try { try decoder.decodeSingularUInt64Field(value: &self.paymentIndex) }() + case 16: try { try decoder.decodeSingularEnumField(value: &self.failureReason) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.paymentHash.isEmpty { + try visitor.visitSingularStringField(value: self.paymentHash, fieldNumber: 1) + } + if self.value != 0 { + try visitor.visitSingularInt64Field(value: self.value, fieldNumber: 2) + } + if self.creationDate != 0 { + try visitor.visitSingularInt64Field(value: self.creationDate, fieldNumber: 3) + } + if self.fee != 0 { + try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 5) + } + if !self.paymentPreimage.isEmpty { + try visitor.visitSingularStringField(value: self.paymentPreimage, fieldNumber: 6) + } + if self.valueSat != 0 { + try visitor.visitSingularInt64Field(value: self.valueSat, fieldNumber: 7) + } + if self.valueMsat != 0 { + try visitor.visitSingularInt64Field(value: self.valueMsat, fieldNumber: 8) + } + if !self.paymentRequest.isEmpty { + try visitor.visitSingularStringField(value: self.paymentRequest, fieldNumber: 9) + } + if self.status != .unknown { + try visitor.visitSingularEnumField(value: self.status, fieldNumber: 10) + } + if self.feeSat != 0 { + try visitor.visitSingularInt64Field(value: self.feeSat, fieldNumber: 11) + } + if self.feeMsat != 0 { + try visitor.visitSingularInt64Field(value: self.feeMsat, fieldNumber: 12) + } + if self.creationTimeNs != 0 { + try visitor.visitSingularInt64Field(value: self.creationTimeNs, fieldNumber: 13) + } + if !self.htlcs.isEmpty { + try visitor.visitRepeatedMessageField(value: self.htlcs, fieldNumber: 14) + } + if self.paymentIndex != 0 { + try visitor.visitSingularUInt64Field(value: self.paymentIndex, fieldNumber: 15) + } + if self.failureReason != .failureReasonNone { + try visitor.visitSingularEnumField(value: self.failureReason, fieldNumber: 16) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Payment, rhs: Lnrpc_Payment) -> Bool { + if lhs.paymentHash != rhs.paymentHash {return false} + if lhs.value != rhs.value {return false} + if lhs.creationDate != rhs.creationDate {return false} + if lhs.fee != rhs.fee {return false} + if lhs.paymentPreimage != rhs.paymentPreimage {return false} + if lhs.valueSat != rhs.valueSat {return false} + if lhs.valueMsat != rhs.valueMsat {return false} + if lhs.paymentRequest != rhs.paymentRequest {return false} + if lhs.status != rhs.status {return false} + if lhs.feeSat != rhs.feeSat {return false} + if lhs.feeMsat != rhs.feeMsat {return false} + if lhs.creationTimeNs != rhs.creationTimeNs {return false} + if lhs.htlcs != rhs.htlcs {return false} + if lhs.paymentIndex != rhs.paymentIndex {return false} + if lhs.failureReason != rhs.failureReason {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Payment.PaymentStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN"), + 1: .same(proto: "IN_FLIGHT"), + 2: .same(proto: "SUCCEEDED"), + 3: .same(proto: "FAILED"), + ] +} + +extension Lnrpc_HTLCAttempt: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".HTLCAttempt" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "status"), + 2: .same(proto: "route"), + 3: .standard(proto: "attempt_time_ns"), + 4: .standard(proto: "resolve_time_ns"), + 5: .same(proto: "failure"), + 6: .same(proto: "preimage"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.status) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._route) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.attemptTimeNs) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self.resolveTimeNs) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._failure) }() + case 6: try { try decoder.decodeSingularBytesField(value: &self.preimage) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.status != .inFlight { + try visitor.visitSingularEnumField(value: self.status, fieldNumber: 1) + } + if let v = self._route { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if self.attemptTimeNs != 0 { + try visitor.visitSingularInt64Field(value: self.attemptTimeNs, fieldNumber: 3) + } + if self.resolveTimeNs != 0 { + try visitor.visitSingularInt64Field(value: self.resolveTimeNs, fieldNumber: 4) + } + if let v = self._failure { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !self.preimage.isEmpty { + try visitor.visitSingularBytesField(value: self.preimage, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_HTLCAttempt, rhs: Lnrpc_HTLCAttempt) -> Bool { + if lhs.status != rhs.status {return false} + if lhs._route != rhs._route {return false} + if lhs.attemptTimeNs != rhs.attemptTimeNs {return false} + if lhs.resolveTimeNs != rhs.resolveTimeNs {return false} + if lhs._failure != rhs._failure {return false} + if lhs.preimage != rhs.preimage {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_HTLCAttempt.HTLCStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "IN_FLIGHT"), + 1: .same(proto: "SUCCEEDED"), + 2: .same(proto: "FAILED"), + ] +} + +extension Lnrpc_ListPaymentsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListPaymentsRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "include_incomplete"), + 2: .standard(proto: "index_offset"), + 3: .standard(proto: "max_payments"), + 4: .same(proto: "reversed"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.includeIncomplete) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.indexOffset) }() + case 3: try { try decoder.decodeSingularUInt64Field(value: &self.maxPayments) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.reversed) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.includeIncomplete != false { + try visitor.visitSingularBoolField(value: self.includeIncomplete, fieldNumber: 1) + } + if self.indexOffset != 0 { + try visitor.visitSingularUInt64Field(value: self.indexOffset, fieldNumber: 2) + } + if self.maxPayments != 0 { + try visitor.visitSingularUInt64Field(value: self.maxPayments, fieldNumber: 3) + } + if self.reversed != false { + try visitor.visitSingularBoolField(value: self.reversed, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListPaymentsRequest, rhs: Lnrpc_ListPaymentsRequest) -> Bool { + if lhs.includeIncomplete != rhs.includeIncomplete {return false} + if lhs.indexOffset != rhs.indexOffset {return false} + if lhs.maxPayments != rhs.maxPayments {return false} + if lhs.reversed != rhs.reversed {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListPaymentsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListPaymentsResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "payments"), + 2: .standard(proto: "first_index_offset"), + 3: .standard(proto: "last_index_offset"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.payments) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.firstIndexOffset) }() + case 3: try { try decoder.decodeSingularUInt64Field(value: &self.lastIndexOffset) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.payments.isEmpty { + try visitor.visitRepeatedMessageField(value: self.payments, fieldNumber: 1) + } + if self.firstIndexOffset != 0 { + try visitor.visitSingularUInt64Field(value: self.firstIndexOffset, fieldNumber: 2) + } + if self.lastIndexOffset != 0 { + try visitor.visitSingularUInt64Field(value: self.lastIndexOffset, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListPaymentsResponse, rhs: Lnrpc_ListPaymentsResponse) -> Bool { + if lhs.payments != rhs.payments {return false} + if lhs.firstIndexOffset != rhs.firstIndexOffset {return false} + if lhs.lastIndexOffset != rhs.lastIndexOffset {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_DeleteAllPaymentsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DeleteAllPaymentsRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_DeleteAllPaymentsRequest, rhs: Lnrpc_DeleteAllPaymentsRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_DeleteAllPaymentsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DeleteAllPaymentsResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_DeleteAllPaymentsResponse, rhs: Lnrpc_DeleteAllPaymentsResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_AbandonChannelRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AbandonChannelRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "channel_point"), + 2: .standard(proto: "pending_funding_shim_only"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._channelPoint) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.pendingFundingShimOnly) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._channelPoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if self.pendingFundingShimOnly != false { + try visitor.visitSingularBoolField(value: self.pendingFundingShimOnly, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_AbandonChannelRequest, rhs: Lnrpc_AbandonChannelRequest) -> Bool { + if lhs._channelPoint != rhs._channelPoint {return false} + if lhs.pendingFundingShimOnly != rhs.pendingFundingShimOnly {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_AbandonChannelResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AbandonChannelResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_AbandonChannelResponse, rhs: Lnrpc_AbandonChannelResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_DebugLevelRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DebugLevelRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "show"), + 2: .standard(proto: "level_spec"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.show) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.levelSpec) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.show != false { + try visitor.visitSingularBoolField(value: self.show, fieldNumber: 1) + } + if !self.levelSpec.isEmpty { + try visitor.visitSingularStringField(value: self.levelSpec, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_DebugLevelRequest, rhs: Lnrpc_DebugLevelRequest) -> Bool { + if lhs.show != rhs.show {return false} + if lhs.levelSpec != rhs.levelSpec {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_DebugLevelResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DebugLevelResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "sub_systems"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.subSystems) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.subSystems.isEmpty { + try visitor.visitSingularStringField(value: self.subSystems, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_DebugLevelResponse, rhs: Lnrpc_DebugLevelResponse) -> Bool { + if lhs.subSystems != rhs.subSystems {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PayReqString: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PayReqString" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "pay_req"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.payReq) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.payReq.isEmpty { + try visitor.visitSingularStringField(value: self.payReq, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PayReqString, rhs: Lnrpc_PayReqString) -> Bool { + if lhs.payReq != rhs.payReq {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PayReq: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PayReq" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "destination"), + 2: .standard(proto: "payment_hash"), + 3: .standard(proto: "num_satoshis"), + 4: .same(proto: "timestamp"), + 5: .same(proto: "expiry"), + 6: .same(proto: "description"), + 7: .standard(proto: "description_hash"), + 8: .standard(proto: "fallback_addr"), + 9: .standard(proto: "cltv_expiry"), + 10: .standard(proto: "route_hints"), + 11: .standard(proto: "payment_addr"), + 12: .standard(proto: "num_msat"), + 13: .same(proto: "features"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.destination) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.paymentHash) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.numSatoshis) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self.timestamp) }() + case 5: try { try decoder.decodeSingularInt64Field(value: &self.expiry) }() + case 6: try { try decoder.decodeSingularStringField(value: &self.description_p) }() + case 7: try { try decoder.decodeSingularStringField(value: &self.descriptionHash) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.fallbackAddr) }() + case 9: try { try decoder.decodeSingularInt64Field(value: &self.cltvExpiry) }() + case 10: try { try decoder.decodeRepeatedMessageField(value: &self.routeHints) }() + case 11: try { try decoder.decodeSingularBytesField(value: &self.paymentAddr) }() + case 12: try { try decoder.decodeSingularInt64Field(value: &self.numMsat) }() + case 13: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.features) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.destination.isEmpty { + try visitor.visitSingularStringField(value: self.destination, fieldNumber: 1) + } + if !self.paymentHash.isEmpty { + try visitor.visitSingularStringField(value: self.paymentHash, fieldNumber: 2) + } + if self.numSatoshis != 0 { + try visitor.visitSingularInt64Field(value: self.numSatoshis, fieldNumber: 3) + } + if self.timestamp != 0 { + try visitor.visitSingularInt64Field(value: self.timestamp, fieldNumber: 4) + } + if self.expiry != 0 { + try visitor.visitSingularInt64Field(value: self.expiry, fieldNumber: 5) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 6) + } + if !self.descriptionHash.isEmpty { + try visitor.visitSingularStringField(value: self.descriptionHash, fieldNumber: 7) + } + if !self.fallbackAddr.isEmpty { + try visitor.visitSingularStringField(value: self.fallbackAddr, fieldNumber: 8) + } + if self.cltvExpiry != 0 { + try visitor.visitSingularInt64Field(value: self.cltvExpiry, fieldNumber: 9) + } + if !self.routeHints.isEmpty { + try visitor.visitRepeatedMessageField(value: self.routeHints, fieldNumber: 10) + } + if !self.paymentAddr.isEmpty { + try visitor.visitSingularBytesField(value: self.paymentAddr, fieldNumber: 11) + } + if self.numMsat != 0 { + try visitor.visitSingularInt64Field(value: self.numMsat, fieldNumber: 12) + } + if !self.features.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.features, fieldNumber: 13) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PayReq, rhs: Lnrpc_PayReq) -> Bool { + if lhs.destination != rhs.destination {return false} + if lhs.paymentHash != rhs.paymentHash {return false} + if lhs.numSatoshis != rhs.numSatoshis {return false} + if lhs.timestamp != rhs.timestamp {return false} + if lhs.expiry != rhs.expiry {return false} + if lhs.description_p != rhs.description_p {return false} + if lhs.descriptionHash != rhs.descriptionHash {return false} + if lhs.fallbackAddr != rhs.fallbackAddr {return false} + if lhs.cltvExpiry != rhs.cltvExpiry {return false} + if lhs.routeHints != rhs.routeHints {return false} + if lhs.paymentAddr != rhs.paymentAddr {return false} + if lhs.numMsat != rhs.numMsat {return false} + if lhs.features != rhs.features {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Feature: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Feature" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 2: .same(proto: "name"), + 3: .standard(proto: "is_required"), + 4: .standard(proto: "is_known"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.isRequired) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.isKnown) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + if self.isRequired != false { + try visitor.visitSingularBoolField(value: self.isRequired, fieldNumber: 3) + } + if self.isKnown != false { + try visitor.visitSingularBoolField(value: self.isKnown, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Feature, rhs: Lnrpc_Feature) -> Bool { + if lhs.name != rhs.name {return false} + if lhs.isRequired != rhs.isRequired {return false} + if lhs.isKnown != rhs.isKnown {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FeeReportRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FeeReportRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FeeReportRequest, rhs: Lnrpc_FeeReportRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelFeeReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelFeeReport" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 5: .standard(proto: "chan_id"), + 1: .standard(proto: "channel_point"), + 2: .standard(proto: "base_fee_msat"), + 3: .standard(proto: "fee_per_mil"), + 4: .standard(proto: "fee_rate"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.channelPoint) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self.baseFeeMsat) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.feePerMil) }() + case 4: try { try decoder.decodeSingularDoubleField(value: &self.feeRate) }() + case 5: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.channelPoint.isEmpty { + try visitor.visitSingularStringField(value: self.channelPoint, fieldNumber: 1) + } + if self.baseFeeMsat != 0 { + try visitor.visitSingularInt64Field(value: self.baseFeeMsat, fieldNumber: 2) + } + if self.feePerMil != 0 { + try visitor.visitSingularInt64Field(value: self.feePerMil, fieldNumber: 3) + } + if self.feeRate != 0 { + try visitor.visitSingularDoubleField(value: self.feeRate, fieldNumber: 4) + } + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelFeeReport, rhs: Lnrpc_ChannelFeeReport) -> Bool { + if lhs.chanID != rhs.chanID {return false} + if lhs.channelPoint != rhs.channelPoint {return false} + if lhs.baseFeeMsat != rhs.baseFeeMsat {return false} + if lhs.feePerMil != rhs.feePerMil {return false} + if lhs.feeRate != rhs.feeRate {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_FeeReportResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FeeReportResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "channel_fees"), + 2: .standard(proto: "day_fee_sum"), + 3: .standard(proto: "week_fee_sum"), + 4: .standard(proto: "month_fee_sum"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.channelFees) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.dayFeeSum) }() + case 3: try { try decoder.decodeSingularUInt64Field(value: &self.weekFeeSum) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &self.monthFeeSum) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.channelFees.isEmpty { + try visitor.visitRepeatedMessageField(value: self.channelFees, fieldNumber: 1) + } + if self.dayFeeSum != 0 { + try visitor.visitSingularUInt64Field(value: self.dayFeeSum, fieldNumber: 2) + } + if self.weekFeeSum != 0 { + try visitor.visitSingularUInt64Field(value: self.weekFeeSum, fieldNumber: 3) + } + if self.monthFeeSum != 0 { + try visitor.visitSingularUInt64Field(value: self.monthFeeSum, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_FeeReportResponse, rhs: Lnrpc_FeeReportResponse) -> Bool { + if lhs.channelFees != rhs.channelFees {return false} + if lhs.dayFeeSum != rhs.dayFeeSum {return false} + if lhs.weekFeeSum != rhs.weekFeeSum {return false} + if lhs.monthFeeSum != rhs.monthFeeSum {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PolicyUpdateRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PolicyUpdateRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "global"), + 2: .standard(proto: "chan_point"), + 3: .standard(proto: "base_fee_msat"), + 4: .standard(proto: "fee_rate"), + 5: .standard(proto: "time_lock_delta"), + 6: .standard(proto: "max_htlc_msat"), + 7: .standard(proto: "min_htlc_msat"), + 8: .standard(proto: "min_htlc_msat_specified"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + if self.scope != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {self.scope = .global(v)} + }() + case 2: try { + var v: Lnrpc_ChannelPoint? + if let current = self.scope { + try decoder.handleConflictingOneOf() + if case .chanPoint(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.scope = .chanPoint(v)} + }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self.baseFeeMsat) }() + case 4: try { try decoder.decodeSingularDoubleField(value: &self.feeRate) }() + case 5: try { try decoder.decodeSingularUInt32Field(value: &self.timeLockDelta) }() + case 6: try { try decoder.decodeSingularUInt64Field(value: &self.maxHtlcMsat) }() + case 7: try { try decoder.decodeSingularUInt64Field(value: &self.minHtlcMsat) }() + case 8: try { try decoder.decodeSingularBoolField(value: &self.minHtlcMsatSpecified) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.scope { + case .global?: try { + guard case .global(let v)? = self.scope else { preconditionFailure() } + try visitor.visitSingularBoolField(value: v, fieldNumber: 1) + }() + case .chanPoint?: try { + guard case .chanPoint(let v)? = self.scope else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + }() + case nil: break + } + if self.baseFeeMsat != 0 { + try visitor.visitSingularInt64Field(value: self.baseFeeMsat, fieldNumber: 3) + } + if self.feeRate != 0 { + try visitor.visitSingularDoubleField(value: self.feeRate, fieldNumber: 4) + } + if self.timeLockDelta != 0 { + try visitor.visitSingularUInt32Field(value: self.timeLockDelta, fieldNumber: 5) + } + if self.maxHtlcMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.maxHtlcMsat, fieldNumber: 6) + } + if self.minHtlcMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.minHtlcMsat, fieldNumber: 7) + } + if self.minHtlcMsatSpecified != false { + try visitor.visitSingularBoolField(value: self.minHtlcMsatSpecified, fieldNumber: 8) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PolicyUpdateRequest, rhs: Lnrpc_PolicyUpdateRequest) -> Bool { + if lhs.scope != rhs.scope {return false} + if lhs.baseFeeMsat != rhs.baseFeeMsat {return false} + if lhs.feeRate != rhs.feeRate {return false} + if lhs.timeLockDelta != rhs.timeLockDelta {return false} + if lhs.maxHtlcMsat != rhs.maxHtlcMsat {return false} + if lhs.minHtlcMsat != rhs.minHtlcMsat {return false} + if lhs.minHtlcMsatSpecified != rhs.minHtlcMsatSpecified {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_PolicyUpdateResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PolicyUpdateResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_PolicyUpdateResponse, rhs: Lnrpc_PolicyUpdateResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ForwardingHistoryRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ForwardingHistoryRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "start_time"), + 2: .standard(proto: "end_time"), + 3: .standard(proto: "index_offset"), + 4: .standard(proto: "num_max_events"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.startTime) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.endTime) }() + case 3: try { try decoder.decodeSingularUInt32Field(value: &self.indexOffset) }() + case 4: try { try decoder.decodeSingularUInt32Field(value: &self.numMaxEvents) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.startTime != 0 { + try visitor.visitSingularUInt64Field(value: self.startTime, fieldNumber: 1) + } + if self.endTime != 0 { + try visitor.visitSingularUInt64Field(value: self.endTime, fieldNumber: 2) + } + if self.indexOffset != 0 { + try visitor.visitSingularUInt32Field(value: self.indexOffset, fieldNumber: 3) + } + if self.numMaxEvents != 0 { + try visitor.visitSingularUInt32Field(value: self.numMaxEvents, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ForwardingHistoryRequest, rhs: Lnrpc_ForwardingHistoryRequest) -> Bool { + if lhs.startTime != rhs.startTime {return false} + if lhs.endTime != rhs.endTime {return false} + if lhs.indexOffset != rhs.indexOffset {return false} + if lhs.numMaxEvents != rhs.numMaxEvents {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ForwardingEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ForwardingEvent" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "timestamp"), + 2: .standard(proto: "chan_id_in"), + 4: .standard(proto: "chan_id_out"), + 5: .standard(proto: "amt_in"), + 6: .standard(proto: "amt_out"), + 7: .same(proto: "fee"), + 8: .standard(proto: "fee_msat"), + 9: .standard(proto: "amt_in_msat"), + 10: .standard(proto: "amt_out_msat"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.timestamp) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.chanIDIn) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &self.chanIDOut) }() + case 5: try { try decoder.decodeSingularUInt64Field(value: &self.amtIn) }() + case 6: try { try decoder.decodeSingularUInt64Field(value: &self.amtOut) }() + case 7: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() + case 8: try { try decoder.decodeSingularUInt64Field(value: &self.feeMsat) }() + case 9: try { try decoder.decodeSingularUInt64Field(value: &self.amtInMsat) }() + case 10: try { try decoder.decodeSingularUInt64Field(value: &self.amtOutMsat) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.timestamp != 0 { + try visitor.visitSingularUInt64Field(value: self.timestamp, fieldNumber: 1) + } + if self.chanIDIn != 0 { + try visitor.visitSingularUInt64Field(value: self.chanIDIn, fieldNumber: 2) + } + if self.chanIDOut != 0 { + try visitor.visitSingularUInt64Field(value: self.chanIDOut, fieldNumber: 4) + } + if self.amtIn != 0 { + try visitor.visitSingularUInt64Field(value: self.amtIn, fieldNumber: 5) + } + if self.amtOut != 0 { + try visitor.visitSingularUInt64Field(value: self.amtOut, fieldNumber: 6) + } + if self.fee != 0 { + try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 7) + } + if self.feeMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.feeMsat, fieldNumber: 8) + } + if self.amtInMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.amtInMsat, fieldNumber: 9) + } + if self.amtOutMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.amtOutMsat, fieldNumber: 10) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ForwardingEvent, rhs: Lnrpc_ForwardingEvent) -> Bool { + if lhs.timestamp != rhs.timestamp {return false} + if lhs.chanIDIn != rhs.chanIDIn {return false} + if lhs.chanIDOut != rhs.chanIDOut {return false} + if lhs.amtIn != rhs.amtIn {return false} + if lhs.amtOut != rhs.amtOut {return false} + if lhs.fee != rhs.fee {return false} + if lhs.feeMsat != rhs.feeMsat {return false} + if lhs.amtInMsat != rhs.amtInMsat {return false} + if lhs.amtOutMsat != rhs.amtOutMsat {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ForwardingHistoryResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ForwardingHistoryResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "forwarding_events"), + 2: .standard(proto: "last_offset_index"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.forwardingEvents) }() + case 2: try { try decoder.decodeSingularUInt32Field(value: &self.lastOffsetIndex) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.forwardingEvents.isEmpty { + try visitor.visitRepeatedMessageField(value: self.forwardingEvents, fieldNumber: 1) + } + if self.lastOffsetIndex != 0 { + try visitor.visitSingularUInt32Field(value: self.lastOffsetIndex, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ForwardingHistoryResponse, rhs: Lnrpc_ForwardingHistoryResponse) -> Bool { + if lhs.forwardingEvents != rhs.forwardingEvents {return false} + if lhs.lastOffsetIndex != rhs.lastOffsetIndex {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ExportChannelBackupRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ExportChannelBackupRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_point"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._chanPoint) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._chanPoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ExportChannelBackupRequest, rhs: Lnrpc_ExportChannelBackupRequest) -> Bool { + if lhs._chanPoint != rhs._chanPoint {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelBackup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelBackup" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_point"), + 2: .standard(proto: "chan_backup"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._chanPoint) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.chanBackup) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._chanPoint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !self.chanBackup.isEmpty { + try visitor.visitSingularBytesField(value: self.chanBackup, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelBackup, rhs: Lnrpc_ChannelBackup) -> Bool { + if lhs._chanPoint != rhs._chanPoint {return false} + if lhs.chanBackup != rhs.chanBackup {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_MultiChanBackup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".MultiChanBackup" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_points"), + 2: .standard(proto: "multi_chan_backup"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.chanPoints) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.multiChanBackup) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.chanPoints.isEmpty { + try visitor.visitRepeatedMessageField(value: self.chanPoints, fieldNumber: 1) + } + if !self.multiChanBackup.isEmpty { + try visitor.visitSingularBytesField(value: self.multiChanBackup, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_MultiChanBackup, rhs: Lnrpc_MultiChanBackup) -> Bool { + if lhs.chanPoints != rhs.chanPoints {return false} + if lhs.multiChanBackup != rhs.multiChanBackup {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChanBackupExportRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChanBackupExportRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChanBackupExportRequest, rhs: Lnrpc_ChanBackupExportRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChanBackupSnapshot: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChanBackupSnapshot" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "single_chan_backups"), + 2: .standard(proto: "multi_chan_backup"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._singleChanBackups) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._multiChanBackup) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._singleChanBackups { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = self._multiChanBackup { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChanBackupSnapshot, rhs: Lnrpc_ChanBackupSnapshot) -> Bool { + if lhs._singleChanBackups != rhs._singleChanBackups {return false} + if lhs._multiChanBackup != rhs._multiChanBackup {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelBackups: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelBackups" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_backups"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.chanBackups) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.chanBackups.isEmpty { + try visitor.visitRepeatedMessageField(value: self.chanBackups, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelBackups, rhs: Lnrpc_ChannelBackups) -> Bool { + if lhs.chanBackups != rhs.chanBackups {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_RestoreChanBackupRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RestoreChanBackupRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "chan_backups"), + 2: .standard(proto: "multi_chan_backup"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + var v: Lnrpc_ChannelBackups? + if let current = self.backup { + try decoder.handleConflictingOneOf() + if case .chanBackups(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {self.backup = .chanBackups(v)} + }() + case 2: try { + if self.backup != nil {try decoder.handleConflictingOneOf()} + var v: Data? + try decoder.decodeSingularBytesField(value: &v) + if let v = v {self.backup = .multiChanBackup(v)} + }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch self.backup { + case .chanBackups?: try { + guard case .chanBackups(let v)? = self.backup else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + }() + case .multiChanBackup?: try { + guard case .multiChanBackup(let v)? = self.backup else { preconditionFailure() } + try visitor.visitSingularBytesField(value: v, fieldNumber: 2) + }() + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_RestoreChanBackupRequest, rhs: Lnrpc_RestoreChanBackupRequest) -> Bool { + if lhs.backup != rhs.backup {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_RestoreBackupResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".RestoreBackupResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_RestoreBackupResponse, rhs: Lnrpc_RestoreBackupResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChannelBackupSubscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelBackupSubscription" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelBackupSubscription, rhs: Lnrpc_ChannelBackupSubscription) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_VerifyChanBackupResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".VerifyChanBackupResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_VerifyChanBackupResponse, rhs: Lnrpc_VerifyChanBackupResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_MacaroonPermission: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".MacaroonPermission" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "entity"), + 2: .same(proto: "action"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.entity) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.action) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.entity.isEmpty { + try visitor.visitSingularStringField(value: self.entity, fieldNumber: 1) + } + if !self.action.isEmpty { + try visitor.visitSingularStringField(value: self.action, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_MacaroonPermission, rhs: Lnrpc_MacaroonPermission) -> Bool { + if lhs.entity != rhs.entity {return false} + if lhs.action != rhs.action {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_BakeMacaroonRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".BakeMacaroonRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "permissions"), + 2: .standard(proto: "root_key_id"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.permissions) }() + case 2: try { try decoder.decodeSingularUInt64Field(value: &self.rootKeyID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.permissions.isEmpty { + try visitor.visitRepeatedMessageField(value: self.permissions, fieldNumber: 1) + } + if self.rootKeyID != 0 { + try visitor.visitSingularUInt64Field(value: self.rootKeyID, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_BakeMacaroonRequest, rhs: Lnrpc_BakeMacaroonRequest) -> Bool { + if lhs.permissions != rhs.permissions {return false} + if lhs.rootKeyID != rhs.rootKeyID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_BakeMacaroonResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".BakeMacaroonResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "macaroon"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.macaroon) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.macaroon.isEmpty { + try visitor.visitSingularStringField(value: self.macaroon, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_BakeMacaroonResponse, rhs: Lnrpc_BakeMacaroonResponse) -> Bool { + if lhs.macaroon != rhs.macaroon {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListMacaroonIDsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListMacaroonIDsRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListMacaroonIDsRequest, rhs: Lnrpc_ListMacaroonIDsRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListMacaroonIDsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListMacaroonIDsResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "root_key_ids"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedUInt64Field(value: &self.rootKeyIds) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.rootKeyIds.isEmpty { + try visitor.visitPackedUInt64Field(value: self.rootKeyIds, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListMacaroonIDsResponse, rhs: Lnrpc_ListMacaroonIDsResponse) -> Bool { + if lhs.rootKeyIds != rhs.rootKeyIds {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_DeleteMacaroonIDRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DeleteMacaroonIDRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "root_key_id"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularUInt64Field(value: &self.rootKeyID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.rootKeyID != 0 { + try visitor.visitSingularUInt64Field(value: self.rootKeyID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_DeleteMacaroonIDRequest, rhs: Lnrpc_DeleteMacaroonIDRequest) -> Bool { + if lhs.rootKeyID != rhs.rootKeyID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_DeleteMacaroonIDResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".DeleteMacaroonIDResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "deleted"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.deleted) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.deleted != false { + try visitor.visitSingularBoolField(value: self.deleted, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_DeleteMacaroonIDResponse, rhs: Lnrpc_DeleteMacaroonIDResponse) -> Bool { + if lhs.deleted != rhs.deleted {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_MacaroonPermissionList: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".MacaroonPermissionList" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "permissions"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.permissions) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.permissions.isEmpty { + try visitor.visitRepeatedMessageField(value: self.permissions, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_MacaroonPermissionList, rhs: Lnrpc_MacaroonPermissionList) -> Bool { + if lhs.permissions != rhs.permissions {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListPermissionsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListPermissionsRequest" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListPermissionsRequest, rhs: Lnrpc_ListPermissionsRequest) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ListPermissionsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ListPermissionsResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "method_permissions"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.methodPermissions) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.methodPermissions.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.methodPermissions, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ListPermissionsResponse, rhs: Lnrpc_ListPermissionsResponse) -> Bool { + if lhs.methodPermissions != rhs.methodPermissions {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Failure: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Failure" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "code"), + 3: .standard(proto: "channel_update"), + 4: .standard(proto: "htlc_msat"), + 5: .standard(proto: "onion_sha_256"), + 6: .standard(proto: "cltv_expiry"), + 7: .same(proto: "flags"), + 8: .standard(proto: "failure_source_index"), + 9: .same(proto: "height"), + ] + + fileprivate class _StorageClass { + var _code: Lnrpc_Failure.FailureCode = .reserved + var _channelUpdate: Lnrpc_ChannelUpdate? = nil + var _htlcMsat: UInt64 = 0 + var _onionSha256: Data = Data() + var _cltvExpiry: UInt32 = 0 + var _flags: UInt32 = 0 + var _failureSourceIndex: UInt32 = 0 + var _height: UInt32 = 0 + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _code = source._code + _channelUpdate = source._channelUpdate + _htlcMsat = source._htlcMsat + _onionSha256 = source._onionSha256 + _cltvExpiry = source._cltvExpiry + _flags = source._flags + _failureSourceIndex = source._failureSourceIndex + _height = source._height + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &_storage._code) }() + case 3: try { try decoder.decodeSingularMessageField(value: &_storage._channelUpdate) }() + case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._htlcMsat) }() + case 5: try { try decoder.decodeSingularBytesField(value: &_storage._onionSha256) }() + case 6: try { try decoder.decodeSingularUInt32Field(value: &_storage._cltvExpiry) }() + case 7: try { try decoder.decodeSingularUInt32Field(value: &_storage._flags) }() + case 8: try { try decoder.decodeSingularUInt32Field(value: &_storage._failureSourceIndex) }() + case 9: try { try decoder.decodeSingularUInt32Field(value: &_storage._height) }() + default: break + } + } + } + } + + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._code != .reserved { + try visitor.visitSingularEnumField(value: _storage._code, fieldNumber: 1) + } + if let v = _storage._channelUpdate { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if _storage._htlcMsat != 0 { + try visitor.visitSingularUInt64Field(value: _storage._htlcMsat, fieldNumber: 4) + } + if !_storage._onionSha256.isEmpty { + try visitor.visitSingularBytesField(value: _storage._onionSha256, fieldNumber: 5) + } + if _storage._cltvExpiry != 0 { + try visitor.visitSingularUInt32Field(value: _storage._cltvExpiry, fieldNumber: 6) + } + if _storage._flags != 0 { + try visitor.visitSingularUInt32Field(value: _storage._flags, fieldNumber: 7) + } + if _storage._failureSourceIndex != 0 { + try visitor.visitSingularUInt32Field(value: _storage._failureSourceIndex, fieldNumber: 8) + } + if _storage._height != 0 { + try visitor.visitSingularUInt32Field(value: _storage._height, fieldNumber: 9) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Failure, rhs: Lnrpc_Failure) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._code != rhs_storage._code {return false} + if _storage._channelUpdate != rhs_storage._channelUpdate {return false} + if _storage._htlcMsat != rhs_storage._htlcMsat {return false} + if _storage._onionSha256 != rhs_storage._onionSha256 {return false} + if _storage._cltvExpiry != rhs_storage._cltvExpiry {return false} + if _storage._flags != rhs_storage._flags {return false} + if _storage._failureSourceIndex != rhs_storage._failureSourceIndex {return false} + if _storage._height != rhs_storage._height {return false} + return true + } + if !storagesAreEqual {return false} + } + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Failure.FailureCode: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "RESERVED"), + 1: .same(proto: "INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS"), + 2: .same(proto: "INCORRECT_PAYMENT_AMOUNT"), + 3: .same(proto: "FINAL_INCORRECT_CLTV_EXPIRY"), + 4: .same(proto: "FINAL_INCORRECT_HTLC_AMOUNT"), + 5: .same(proto: "FINAL_EXPIRY_TOO_SOON"), + 6: .same(proto: "INVALID_REALM"), + 7: .same(proto: "EXPIRY_TOO_SOON"), + 8: .same(proto: "INVALID_ONION_VERSION"), + 9: .same(proto: "INVALID_ONION_HMAC"), + 10: .same(proto: "INVALID_ONION_KEY"), + 11: .same(proto: "AMOUNT_BELOW_MINIMUM"), + 12: .same(proto: "FEE_INSUFFICIENT"), + 13: .same(proto: "INCORRECT_CLTV_EXPIRY"), + 14: .same(proto: "CHANNEL_DISABLED"), + 15: .same(proto: "TEMPORARY_CHANNEL_FAILURE"), + 16: .same(proto: "REQUIRED_NODE_FEATURE_MISSING"), + 17: .same(proto: "REQUIRED_CHANNEL_FEATURE_MISSING"), + 18: .same(proto: "UNKNOWN_NEXT_PEER"), + 19: .same(proto: "TEMPORARY_NODE_FAILURE"), + 20: .same(proto: "PERMANENT_NODE_FAILURE"), + 21: .same(proto: "PERMANENT_CHANNEL_FAILURE"), + 22: .same(proto: "EXPIRY_TOO_FAR"), + 23: .same(proto: "MPP_TIMEOUT"), + 997: .same(proto: "INTERNAL_FAILURE"), + 998: .same(proto: "UNKNOWN_FAILURE"), + 999: .same(proto: "UNREADABLE_FAILURE"), + ] +} + +extension Lnrpc_ChannelUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChannelUpdate" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "signature"), + 2: .standard(proto: "chain_hash"), + 3: .standard(proto: "chan_id"), + 4: .same(proto: "timestamp"), + 10: .standard(proto: "message_flags"), + 5: .standard(proto: "channel_flags"), + 6: .standard(proto: "time_lock_delta"), + 7: .standard(proto: "htlc_minimum_msat"), + 8: .standard(proto: "base_fee"), + 9: .standard(proto: "fee_rate"), + 11: .standard(proto: "htlc_maximum_msat"), + 12: .standard(proto: "extra_opaque_data"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.signature) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.chainHash) }() + case 3: try { try decoder.decodeSingularUInt64Field(value: &self.chanID) }() + case 4: try { try decoder.decodeSingularUInt32Field(value: &self.timestamp) }() + case 5: try { try decoder.decodeSingularUInt32Field(value: &self.channelFlags) }() + case 6: try { try decoder.decodeSingularUInt32Field(value: &self.timeLockDelta) }() + case 7: try { try decoder.decodeSingularUInt64Field(value: &self.htlcMinimumMsat) }() + case 8: try { try decoder.decodeSingularUInt32Field(value: &self.baseFee) }() + case 9: try { try decoder.decodeSingularUInt32Field(value: &self.feeRate) }() + case 10: try { try decoder.decodeSingularUInt32Field(value: &self.messageFlags) }() + case 11: try { try decoder.decodeSingularUInt64Field(value: &self.htlcMaximumMsat) }() + case 12: try { try decoder.decodeSingularBytesField(value: &self.extraOpaqueData) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.signature.isEmpty { + try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 1) + } + if !self.chainHash.isEmpty { + try visitor.visitSingularBytesField(value: self.chainHash, fieldNumber: 2) + } + if self.chanID != 0 { + try visitor.visitSingularUInt64Field(value: self.chanID, fieldNumber: 3) + } + if self.timestamp != 0 { + try visitor.visitSingularUInt32Field(value: self.timestamp, fieldNumber: 4) + } + if self.channelFlags != 0 { + try visitor.visitSingularUInt32Field(value: self.channelFlags, fieldNumber: 5) + } + if self.timeLockDelta != 0 { + try visitor.visitSingularUInt32Field(value: self.timeLockDelta, fieldNumber: 6) + } + if self.htlcMinimumMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.htlcMinimumMsat, fieldNumber: 7) + } + if self.baseFee != 0 { + try visitor.visitSingularUInt32Field(value: self.baseFee, fieldNumber: 8) + } + if self.feeRate != 0 { + try visitor.visitSingularUInt32Field(value: self.feeRate, fieldNumber: 9) + } + if self.messageFlags != 0 { + try visitor.visitSingularUInt32Field(value: self.messageFlags, fieldNumber: 10) + } + if self.htlcMaximumMsat != 0 { + try visitor.visitSingularUInt64Field(value: self.htlcMaximumMsat, fieldNumber: 11) + } + if !self.extraOpaqueData.isEmpty { + try visitor.visitSingularBytesField(value: self.extraOpaqueData, fieldNumber: 12) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChannelUpdate, rhs: Lnrpc_ChannelUpdate) -> Bool { + if lhs.signature != rhs.signature {return false} + if lhs.chainHash != rhs.chainHash {return false} + if lhs.chanID != rhs.chanID {return false} + if lhs.timestamp != rhs.timestamp {return false} + if lhs.messageFlags != rhs.messageFlags {return false} + if lhs.channelFlags != rhs.channelFlags {return false} + if lhs.timeLockDelta != rhs.timeLockDelta {return false} + if lhs.htlcMinimumMsat != rhs.htlcMinimumMsat {return false} + if lhs.baseFee != rhs.baseFee {return false} + if lhs.feeRate != rhs.feeRate {return false} + if lhs.htlcMaximumMsat != rhs.htlcMaximumMsat {return false} + if lhs.extraOpaqueData != rhs.extraOpaqueData {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_MacaroonId: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".MacaroonId" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "nonce"), + 2: .same(proto: "storageId"), + 3: .same(proto: "ops"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.nonce) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.storageID) }() + case 3: try { try decoder.decodeRepeatedMessageField(value: &self.ops) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.nonce.isEmpty { + try visitor.visitSingularBytesField(value: self.nonce, fieldNumber: 1) + } + if !self.storageID.isEmpty { + try visitor.visitSingularBytesField(value: self.storageID, fieldNumber: 2) + } + if !self.ops.isEmpty { + try visitor.visitRepeatedMessageField(value: self.ops, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_MacaroonId, rhs: Lnrpc_MacaroonId) -> Bool { + if lhs.nonce != rhs.nonce {return false} + if lhs.storageID != rhs.storageID {return false} + if lhs.ops != rhs.ops {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_Op: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".Op" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "entity"), + 2: .same(proto: "actions"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.entity) }() + case 2: try { try decoder.decodeRepeatedStringField(value: &self.actions) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.entity.isEmpty { + try visitor.visitSingularStringField(value: self.entity, fieldNumber: 1) + } + if !self.actions.isEmpty { + try visitor.visitRepeatedStringField(value: self.actions, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_Op, rhs: Lnrpc_Op) -> Bool { + if lhs.entity != rhs.entity {return false} + if lhs.actions != rhs.actions {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/ios/LndMobile/walletunlocker.pb.swift b/ios/LndMobile/walletunlocker.pb.swift new file mode 100644 index 000000000..906d18c11 --- /dev/null +++ b/ios/LndMobile/walletunlocker.pb.swift @@ -0,0 +1,580 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: walletunlocker.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +struct Lnrpc_GenSeedRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///aezeed_passphrase is an optional user provided passphrase that will be used + ///to encrypt the generated aezeed cipher seed. When using REST, this field + ///must be encoded as base64. + var aezeedPassphrase: Data = Data() + + /// + ///seed_entropy is an optional 16-bytes generated via CSPRNG. If not + ///specified, then a fresh set of randomness will be used to create the seed. + ///When using REST, this field must be encoded as base64. + var seedEntropy: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_GenSeedResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed + ///cipher seed obtained by the user. This field is optional, as if not + ///provided, then the daemon will generate a new cipher seed for the user. + ///Otherwise, then the daemon will attempt to recover the wallet state linked + ///to this cipher seed. + var cipherSeedMnemonic: [String] = [] + + /// + ///enciphered_seed are the raw aezeed cipher seed bytes. This is the raw + ///cipher text before run through our mnemonic encoding scheme. + var encipheredSeed: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_InitWalletRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///wallet_password is the passphrase that should be used to encrypt the + ///wallet. This MUST be at least 8 chars in length. After creation, this + ///password is required to unlock the daemon. When using REST, this field + ///must be encoded as base64. + var walletPassword: Data = Data() + + /// + ///cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed + ///cipher seed obtained by the user. This may have been generated by the + ///GenSeed method, or be an existing seed. + var cipherSeedMnemonic: [String] = [] + + /// + ///aezeed_passphrase is an optional user provided passphrase that will be used + ///to encrypt the generated aezeed cipher seed. When using REST, this field + ///must be encoded as base64. + var aezeedPassphrase: Data = Data() + + /// + ///recovery_window is an optional argument specifying the address lookahead + ///when restoring a wallet seed. The recovery window applies to each + ///individual branch of the BIP44 derivation paths. Supplying a recovery + ///window of zero indicates that no addresses should be recovered, such after + ///the first initialization of the wallet. + var recoveryWindow: Int32 = 0 + + /// + ///channel_backups is an optional argument that allows clients to recover the + ///settled funds within a set of channels. This should be populated if the + ///user was unable to close out all channels and sweep funds before partial or + ///total data loss occurred. If specified, then after on-chain recovery of + ///funds, lnd begin to carry out the data loss recovery protocol in order to + ///recover the funds in each channel from a remote force closed transaction. + var channelBackups: Lnrpc_ChanBackupSnapshot { + get {return _channelBackups ?? Lnrpc_ChanBackupSnapshot()} + set {_channelBackups = newValue} + } + /// Returns true if `channelBackups` has been explicitly set. + var hasChannelBackups: Bool {return self._channelBackups != nil} + /// Clears the value of `channelBackups`. Subsequent reads from it will return its default value. + mutating func clearChannelBackups() {self._channelBackups = nil} + + /// + ///stateless_init is an optional argument instructing the daemon NOT to create + ///any *.macaroon files in its filesystem. If this parameter is set, then the + ///admin macaroon returned in the response MUST be stored by the caller of the + ///RPC as otherwise all access to the daemon will be lost! + var statelessInit: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _channelBackups: Lnrpc_ChanBackupSnapshot? = nil +} + +struct Lnrpc_InitWalletResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The binary serialized admin macaroon that can be used to access the daemon + ///after creating the wallet. If the stateless_init parameter was set to true, + ///this is the ONLY copy of the macaroon and MUST be stored safely by the + ///caller. Otherwise a copy of this macaroon is also persisted on disk by the + ///daemon, together with other macaroon files. + var adminMacaroon: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_UnlockWalletRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///wallet_password should be the current valid passphrase for the daemon. This + ///will be required to decrypt on-disk material that the daemon requires to + ///function properly. When using REST, this field must be encoded as base64. + var walletPassword: Data = Data() + + /// + ///recovery_window is an optional argument specifying the address lookahead + ///when restoring a wallet seed. The recovery window applies to each + ///individual branch of the BIP44 derivation paths. Supplying a recovery + ///window of zero indicates that no addresses should be recovered, such after + ///the first initialization of the wallet. + var recoveryWindow: Int32 = 0 + + /// + ///channel_backups is an optional argument that allows clients to recover the + ///settled funds within a set of channels. This should be populated if the + ///user was unable to close out all channels and sweep funds before partial or + ///total data loss occurred. If specified, then after on-chain recovery of + ///funds, lnd begin to carry out the data loss recovery protocol in order to + ///recover the funds in each channel from a remote force closed transaction. + var channelBackups: Lnrpc_ChanBackupSnapshot { + get {return _channelBackups ?? Lnrpc_ChanBackupSnapshot()} + set {_channelBackups = newValue} + } + /// Returns true if `channelBackups` has been explicitly set. + var hasChannelBackups: Bool {return self._channelBackups != nil} + /// Clears the value of `channelBackups`. Subsequent reads from it will return its default value. + mutating func clearChannelBackups() {self._channelBackups = nil} + + /// + ///stateless_init is an optional argument instructing the daemon NOT to create + ///any *.macaroon files in its file system. + var statelessInit: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _channelBackups: Lnrpc_ChanBackupSnapshot? = nil +} + +struct Lnrpc_UnlockWalletResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChangePasswordRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///current_password should be the current valid passphrase used to unlock the + ///daemon. When using REST, this field must be encoded as base64. + var currentPassword: Data = Data() + + /// + ///new_password should be the new passphrase that will be needed to unlock the + ///daemon. When using REST, this field must be encoded as base64. + var newPassword: Data = Data() + + /// + ///stateless_init is an optional argument instructing the daemon NOT to create + ///any *.macaroon files in its filesystem. If this parameter is set, then the + ///admin macaroon returned in the response MUST be stored by the caller of the + ///RPC as otherwise all access to the daemon will be lost! + var statelessInit: Bool = false + + /// + ///new_macaroon_root_key is an optional argument instructing the daemon to + ///rotate the macaroon root key when set to true. This will invalidate all + ///previously generated macaroons. + var newMacaroonRootKey: Bool = false + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +struct Lnrpc_ChangePasswordResponse { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// + ///The binary serialized admin macaroon that can be used to access the daemon + ///after rotating the macaroon root key. If both the stateless_init and + ///new_macaroon_root_key parameter were set to true, this is the ONLY copy of + ///the macaroon that was created from the new root key and MUST be stored + ///safely by the caller. Otherwise a copy of this macaroon is also persisted on + ///disk by the daemon, together with other macaroon files. + var adminMacaroon: Data = Data() + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "lnrpc" + +extension Lnrpc_GenSeedRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GenSeedRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "aezeed_passphrase"), + 2: .standard(proto: "seed_entropy"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.aezeedPassphrase) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.seedEntropy) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.aezeedPassphrase.isEmpty { + try visitor.visitSingularBytesField(value: self.aezeedPassphrase, fieldNumber: 1) + } + if !self.seedEntropy.isEmpty { + try visitor.visitSingularBytesField(value: self.seedEntropy, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GenSeedRequest, rhs: Lnrpc_GenSeedRequest) -> Bool { + if lhs.aezeedPassphrase != rhs.aezeedPassphrase {return false} + if lhs.seedEntropy != rhs.seedEntropy {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_GenSeedResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GenSeedResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "cipher_seed_mnemonic"), + 2: .standard(proto: "enciphered_seed"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedStringField(value: &self.cipherSeedMnemonic) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.encipheredSeed) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.cipherSeedMnemonic.isEmpty { + try visitor.visitRepeatedStringField(value: self.cipherSeedMnemonic, fieldNumber: 1) + } + if !self.encipheredSeed.isEmpty { + try visitor.visitSingularBytesField(value: self.encipheredSeed, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_GenSeedResponse, rhs: Lnrpc_GenSeedResponse) -> Bool { + if lhs.cipherSeedMnemonic != rhs.cipherSeedMnemonic {return false} + if lhs.encipheredSeed != rhs.encipheredSeed {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_InitWalletRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".InitWalletRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "wallet_password"), + 2: .standard(proto: "cipher_seed_mnemonic"), + 3: .standard(proto: "aezeed_passphrase"), + 4: .standard(proto: "recovery_window"), + 5: .standard(proto: "channel_backups"), + 6: .standard(proto: "stateless_init"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.walletPassword) }() + case 2: try { try decoder.decodeRepeatedStringField(value: &self.cipherSeedMnemonic) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self.aezeedPassphrase) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.recoveryWindow) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._channelBackups) }() + case 6: try { try decoder.decodeSingularBoolField(value: &self.statelessInit) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.walletPassword.isEmpty { + try visitor.visitSingularBytesField(value: self.walletPassword, fieldNumber: 1) + } + if !self.cipherSeedMnemonic.isEmpty { + try visitor.visitRepeatedStringField(value: self.cipherSeedMnemonic, fieldNumber: 2) + } + if !self.aezeedPassphrase.isEmpty { + try visitor.visitSingularBytesField(value: self.aezeedPassphrase, fieldNumber: 3) + } + if self.recoveryWindow != 0 { + try visitor.visitSingularInt32Field(value: self.recoveryWindow, fieldNumber: 4) + } + if let v = self._channelBackups { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if self.statelessInit != false { + try visitor.visitSingularBoolField(value: self.statelessInit, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_InitWalletRequest, rhs: Lnrpc_InitWalletRequest) -> Bool { + if lhs.walletPassword != rhs.walletPassword {return false} + if lhs.cipherSeedMnemonic != rhs.cipherSeedMnemonic {return false} + if lhs.aezeedPassphrase != rhs.aezeedPassphrase {return false} + if lhs.recoveryWindow != rhs.recoveryWindow {return false} + if lhs._channelBackups != rhs._channelBackups {return false} + if lhs.statelessInit != rhs.statelessInit {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_InitWalletResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".InitWalletResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "admin_macaroon"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.adminMacaroon) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.adminMacaroon.isEmpty { + try visitor.visitSingularBytesField(value: self.adminMacaroon, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_InitWalletResponse, rhs: Lnrpc_InitWalletResponse) -> Bool { + if lhs.adminMacaroon != rhs.adminMacaroon {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_UnlockWalletRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".UnlockWalletRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "wallet_password"), + 2: .standard(proto: "recovery_window"), + 3: .standard(proto: "channel_backups"), + 4: .standard(proto: "stateless_init"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.walletPassword) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.recoveryWindow) }() + case 3: try { try decoder.decodeSingularMessageField(value: &self._channelBackups) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.statelessInit) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.walletPassword.isEmpty { + try visitor.visitSingularBytesField(value: self.walletPassword, fieldNumber: 1) + } + if self.recoveryWindow != 0 { + try visitor.visitSingularInt32Field(value: self.recoveryWindow, fieldNumber: 2) + } + if let v = self._channelBackups { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if self.statelessInit != false { + try visitor.visitSingularBoolField(value: self.statelessInit, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_UnlockWalletRequest, rhs: Lnrpc_UnlockWalletRequest) -> Bool { + if lhs.walletPassword != rhs.walletPassword {return false} + if lhs.recoveryWindow != rhs.recoveryWindow {return false} + if lhs._channelBackups != rhs._channelBackups {return false} + if lhs.statelessInit != rhs.statelessInit {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_UnlockWalletResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".UnlockWalletResponse" + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_UnlockWalletResponse, rhs: Lnrpc_UnlockWalletResponse) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChangePasswordRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChangePasswordRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "current_password"), + 2: .standard(proto: "new_password"), + 3: .standard(proto: "stateless_init"), + 4: .standard(proto: "new_macaroon_root_key"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.currentPassword) }() + case 2: try { try decoder.decodeSingularBytesField(value: &self.newPassword) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self.statelessInit) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.newMacaroonRootKey) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.currentPassword.isEmpty { + try visitor.visitSingularBytesField(value: self.currentPassword, fieldNumber: 1) + } + if !self.newPassword.isEmpty { + try visitor.visitSingularBytesField(value: self.newPassword, fieldNumber: 2) + } + if self.statelessInit != false { + try visitor.visitSingularBoolField(value: self.statelessInit, fieldNumber: 3) + } + if self.newMacaroonRootKey != false { + try visitor.visitSingularBoolField(value: self.newMacaroonRootKey, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChangePasswordRequest, rhs: Lnrpc_ChangePasswordRequest) -> Bool { + if lhs.currentPassword != rhs.currentPassword {return false} + if lhs.newPassword != rhs.newPassword {return false} + if lhs.statelessInit != rhs.statelessInit {return false} + if lhs.newMacaroonRootKey != rhs.newMacaroonRootKey {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Lnrpc_ChangePasswordResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ChangePasswordResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "admin_macaroon"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self.adminMacaroon) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.adminMacaroon.isEmpty { + try visitor.visitSingularBytesField(value: self.adminMacaroon, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Lnrpc_ChangePasswordResponse, rhs: Lnrpc_ChangePasswordResponse) -> Bool { + if lhs.adminMacaroon != rhs.adminMacaroon {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/ios/Podfile b/ios/Podfile index ca7ee067a..e3dba8952 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -18,6 +18,9 @@ target 'BlixtWallet' do use_react_native!(:path => config["reactNativePath"]) + # proto + pod 'SwiftProtobuf', '~> 1.0' + # react-native-permissions permissions_path = '../node_modules/react-native-permissions/ios' pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse" diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0c188c5bc..ca0616a54 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,23 +1,18 @@ PODS: - - AppAuth (1.4.0): - - AppAuth/Core (= 1.4.0) - - AppAuth/ExternalUserAgent (= 1.4.0) - - AppAuth/Core (1.4.0) - - AppAuth/ExternalUserAgent (1.4.0) - boost-for-react-native (1.63.0) - BVLinearGradient (2.5.6): - React - CocoaAsyncSocket (7.6.4) - CocoaLibEvent (1.0.0) - DoubleConversion (1.1.6) - - FBLazyVector (0.63.3) - - FBReactNativeSpec (0.63.3): + - FBLazyVector (0.63.4) + - FBReactNativeSpec (0.63.4): - Folly (= 2020.01.13.00) - - RCTRequired (= 0.63.3) - - RCTTypeSafety (= 0.63.3) - - React-Core (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) + - RCTRequired (= 0.63.4) + - RCTTypeSafety (= 0.63.4) + - React-Core (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) - Flipper (0.54.0): - Flipper-Folly (~> 2.2) - Flipper-RSocket (~> 1.1) @@ -74,189 +69,177 @@ PODS: - DoubleConversion - glog - glog (0.3.5) - - GoogleSignIn (5.0.2): - - AppAuth (~> 1.2) - - GTMAppAuth (~> 1.0) - - GTMSessionFetcher/Core (~> 1.1) - - GTMAppAuth (1.1.0): - - AppAuth/Core (~> 1.4) - - GTMSessionFetcher (~> 1.4) - - GTMSessionFetcher (1.5.0): - - GTMSessionFetcher/Full (= 1.5.0) - - GTMSessionFetcher/Core (1.5.0) - - GTMSessionFetcher/Full (1.5.0): - - GTMSessionFetcher/Core (= 1.5.0) - OpenSSL-Universal (1.0.2.20): - OpenSSL-Universal/Static (= 1.0.2.20) - OpenSSL-Universal/Static (1.0.2.20) - Permission-LocationWhenInUse (3.0.0): - RNPermissions - - RCTRequired (0.63.3) - - RCTTypeSafety (0.63.3): - - FBLazyVector (= 0.63.3) + - RCTRequired (0.63.4) + - RCTTypeSafety (0.63.4): + - FBLazyVector (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTRequired (= 0.63.3) - - React-Core (= 0.63.3) - - React (0.63.3): - - React-Core (= 0.63.3) - - React-Core/DevSupport (= 0.63.3) - - React-Core/RCTWebSocket (= 0.63.3) - - React-RCTActionSheet (= 0.63.3) - - React-RCTAnimation (= 0.63.3) - - React-RCTBlob (= 0.63.3) - - React-RCTImage (= 0.63.3) - - React-RCTLinking (= 0.63.3) - - React-RCTNetwork (= 0.63.3) - - React-RCTSettings (= 0.63.3) - - React-RCTText (= 0.63.3) - - React-RCTVibration (= 0.63.3) - - React-callinvoker (0.63.3) - - React-Core (0.63.3): + - RCTRequired (= 0.63.4) + - React-Core (= 0.63.4) + - React (0.63.4): + - React-Core (= 0.63.4) + - React-Core/DevSupport (= 0.63.4) + - React-Core/RCTWebSocket (= 0.63.4) + - React-RCTActionSheet (= 0.63.4) + - React-RCTAnimation (= 0.63.4) + - React-RCTBlob (= 0.63.4) + - React-RCTImage (= 0.63.4) + - React-RCTLinking (= 0.63.4) + - React-RCTNetwork (= 0.63.4) + - React-RCTSettings (= 0.63.4) + - React-RCTText (= 0.63.4) + - React-RCTVibration (= 0.63.4) + - React-callinvoker (0.63.4) + - React-Core (0.63.4): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.3) - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-Core/Default (= 0.63.4) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/CoreModulesHeaders (0.63.3): + - React-Core/CoreModulesHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/Default (0.63.3): + - React-Core/Default (0.63.4): - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/DevSupport (0.63.3): + - React-Core/DevSupport (0.63.4): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.3) - - React-Core/RCTWebSocket (= 0.63.3) - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) - - React-jsinspector (= 0.63.3) + - React-Core/Default (= 0.63.4) + - React-Core/RCTWebSocket (= 0.63.4) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) + - React-jsinspector (= 0.63.4) - Yoga - - React-Core/RCTActionSheetHeaders (0.63.3): + - React-Core/RCTActionSheetHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTAnimationHeaders (0.63.3): + - React-Core/RCTAnimationHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTBlobHeaders (0.63.3): + - React-Core/RCTBlobHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTImageHeaders (0.63.3): + - React-Core/RCTImageHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTLinkingHeaders (0.63.3): + - React-Core/RCTLinkingHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTNetworkHeaders (0.63.3): + - React-Core/RCTNetworkHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTSettingsHeaders (0.63.3): + - React-Core/RCTSettingsHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTTextHeaders (0.63.3): + - React-Core/RCTTextHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTVibrationHeaders (0.63.3): + - React-Core/RCTVibrationHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTWebSocket (0.63.3): + - React-Core/RCTWebSocket (0.63.4): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.3) - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-Core/Default (= 0.63.4) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-CoreModules (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - React-CoreModules (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/CoreModulesHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - React-RCTImage (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-cxxreact (0.63.3): + - RCTTypeSafety (= 0.63.4) + - React-Core/CoreModulesHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - React-RCTImage (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-cxxreact (0.63.4): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-callinvoker (= 0.63.3) - - React-jsinspector (= 0.63.3) - - React-jsi (0.63.3): + - React-callinvoker (= 0.63.4) + - React-jsinspector (= 0.63.4) + - React-jsi (0.63.4): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-jsi/Default (= 0.63.3) - - React-jsi/Default (0.63.3): + - React-jsi/Default (= 0.63.4) + - React-jsi/Default (0.63.4): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-jsiexecutor (0.63.3): + - React-jsiexecutor (0.63.4): - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsinspector (0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsinspector (0.63.4) - react-native-build-config (0.3.2): - React - react-native-camera (3.40.0): @@ -283,66 +266,66 @@ PODS: - React - react-native-webview (10.10.2): - React-Core - - React-RCTActionSheet (0.63.3): - - React-Core/RCTActionSheetHeaders (= 0.63.3) - - React-RCTAnimation (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - React-RCTActionSheet (0.63.4): + - React-Core/RCTActionSheetHeaders (= 0.63.4) + - React-RCTAnimation (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/RCTAnimationHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTBlob (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - RCTTypeSafety (= 0.63.4) + - React-Core/RCTAnimationHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTBlob (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - React-Core/RCTBlobHeaders (= 0.63.3) - - React-Core/RCTWebSocket (= 0.63.3) - - React-jsi (= 0.63.3) - - React-RCTNetwork (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTImage (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - React-Core/RCTBlobHeaders (= 0.63.4) + - React-Core/RCTWebSocket (= 0.63.4) + - React-jsi (= 0.63.4) + - React-RCTNetwork (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTImage (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/RCTImageHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - React-RCTNetwork (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTLinking (0.63.3): - - FBReactNativeSpec (= 0.63.3) - - React-Core/RCTLinkingHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTNetwork (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - RCTTypeSafety (= 0.63.4) + - React-Core/RCTImageHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - React-RCTNetwork (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTLinking (0.63.4): + - FBReactNativeSpec (= 0.63.4) + - React-Core/RCTLinkingHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTNetwork (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/RCTNetworkHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTSettings (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - RCTTypeSafety (= 0.63.4) + - React-Core/RCTNetworkHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTSettings (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/RCTSettingsHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTText (0.63.3): - - React-Core/RCTTextHeaders (= 0.63.3) - - React-RCTVibration (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - RCTTypeSafety (= 0.63.4) + - React-Core/RCTSettingsHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTText (0.63.4): + - React-Core/RCTTextHeaders (= 0.63.4) + - React-RCTVibration (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - React-Core/RCTVibrationHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - ReactCommon/turbomodule/core (0.63.3): + - React-Core/RCTVibrationHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - ReactCommon/turbomodule/core (0.63.4): - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-callinvoker (= 0.63.3) - - React-Core (= 0.63.3) - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) + - React-callinvoker (= 0.63.4) + - React-Core (= 0.63.4) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) - RNCAsyncStorage (1.12.1): - React-Core - RNCClipboard (1.5.1): @@ -355,9 +338,8 @@ PODS: - React - RNGestureHandler (1.9.0): - React-Core - - RNGoogleSignin (5.0.0): - - GoogleSignIn (~> 5.0.0) - - React-Core + - RNICloudStore (0.1.0): + - React - RNKeychain (4.0.5): - React - RNPermissions (3.0.0): @@ -379,6 +361,7 @@ PODS: - React - RNVectorIcons (7.1.0): - React + - SwiftProtobuf (1.14.0) - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) @@ -448,7 +431,7 @@ DEPENDENCIES: - "RNCPushNotificationIOS (from `../node_modules/@react-native-community/push-notification-ios`)" - RNFS (from `../node_modules/react-native-fs`) - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - - "RNGoogleSignin (from `../node_modules/@react-native-community/google-signin`)" + - RNICloudStore (from `../node_modules/react-native-icloudstore`) - RNKeychain (from `../node_modules/react-native-keychain`) - RNPermissions (from `../node_modules/react-native-permissions`) - RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`) @@ -458,11 +441,11 @@ DEPENDENCIES: - RNSound (from `../node_modules/react-native-sound`) - RNSVG (from `../node_modules/react-native-svg`) - RNVectorIcons (from `../node_modules/react-native-vector-icons`) + - SwiftProtobuf (~> 1.0) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: - - AppAuth - boost-for-react-native - CocoaAsyncSocket - CocoaLibEvent @@ -473,10 +456,8 @@ SPEC REPOS: - Flipper-PeerTalk - Flipper-RSocket - FlipperKit - - GoogleSignIn - - GTMAppAuth - - GTMSessionFetcher - OpenSSL-Universal + - SwiftProtobuf - YogaKit EXTERNAL SOURCES: @@ -566,8 +547,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-fs" RNGestureHandler: :path: "../node_modules/react-native-gesture-handler" - RNGoogleSignin: - :path: "../node_modules/@react-native-community/google-signin" + RNICloudStore: + :path: "../node_modules/react-native-icloudstore" RNKeychain: :path: "../node_modules/react-native-keychain" RNPermissions: @@ -590,14 +571,13 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7 boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f DoubleConversion: cde416483dac037923206447da6e1454df403714 - FBLazyVector: 878b59e31113e289e275165efbe4b54fa614d43d - FBReactNativeSpec: 7da9338acfb98d4ef9e5536805a0704572d33c2f + FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e + FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e Flipper: be611d4b742d8c87fbae2ca5f44603a02539e365 Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 Flipper-Folly: e4493b013c02d9347d5e0cb4d128680239f6c78a @@ -607,21 +587,18 @@ SPEC CHECKSUMS: FlipperKit: ab353d41aea8aae2ea6daaf813e67496642f3d7d Folly: b73c3869541e86821df3c387eb0af5f65addfab4 glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 - GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213 - GTMAppAuth: 197a8dabfea5d665224aa00d17f164fc2248dab9 - GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 OpenSSL-Universal: ff34003318d5e1163e9529b08470708e389ffcdd Permission-LocationWhenInUse: e2b8c40ce0f3675a521f26787ab47ebb9bace503 - RCTRequired: 48884c74035a0b5b76dbb7a998bd93bcfc5f2047 - RCTTypeSafety: edf4b618033c2f1c5b7bc3d90d8e085ed95ba2ab - React: f36e90f3ceb976546e97df3403e37d226f79d0e3 - React-callinvoker: 18874f621eb96625df7a24a7dc8d6e07391affcd - React-Core: ac3d816b8e3493970153f4aaf0cff18af0bb95e6 - React-CoreModules: 4016d3a4e518bcfc4f5a51252b5a05692ca6f0e1 - React-cxxreact: ffc9129013b87cb36cf3f30a86695a3c397b0f99 - React-jsi: df07aa95b39c5be3e41199921509bfa929ed2b9d - React-jsiexecutor: b56c03e61c0dd5f5801255f2160a815f4a53d451 - React-jsinspector: 8e68ffbfe23880d3ee9bafa8be2777f60b25cbe2 + RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e + RCTTypeSafety: 8c9c544ecbf20337d069e4ae7fd9a377aadf504b + React: b0a957a2c44da4113b0c4c9853d8387f8e64e615 + React-callinvoker: c3f44dd3cb195b6aa46621fff95ded79d59043fe + React-Core: d3b2a1ac9a2c13c3bcde712d9281fc1c8a5b315b + React-CoreModules: 0581ff36cb797da0943d424f69e7098e43e9be60 + React-cxxreact: c1480d4fda5720086c90df537ee7d285d4c57ac3 + React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31 + React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949 + React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a react-native-build-config: 1130ad8668ca251b65e95e002b5b8f308a96726f react-native-camera: 35854c4f764a4a6cf61c1c3525888b92f0fe4b31 react-native-document-picker: d870e0a41510b241d5b764e7a2b5ccf129af7967 @@ -632,23 +609,23 @@ SPEC CHECKSUMS: react-native-slider: e99fc201cefe81270fc9d81714a7a0f5e566b168 react-native-sqlite-storage: 418ef4afc5e6df6ce3574c4617e5f0b65cffde55 react-native-webview: 0aa2cde4ee7e3e1c5fffdf64dbce9c709aa18155 - React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa - React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2 - React-RCTBlob: 0b284339cbe4b15705a05e2313a51c6d8b51fa40 - React-RCTImage: d1756599ebd4dc2cb19d1682fe67c6b976658387 - React-RCTLinking: 9af0a51c6d6a4dd1674daadafffc6d03033a6d18 - React-RCTNetwork: 332c83929cc5eae0b3bbca4add1d668e1fc18bda - React-RCTSettings: d6953772cfd55f2c68ad72b7ef29efc7ec49f773 - React-RCTText: 65a6de06a7389098ce24340d1d3556015c38f746 - React-RCTVibration: 8e9fb25724a0805107fc1acc9075e26f814df454 - ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3 + React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336 + React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b + React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0 + React-RCTImage: c1b1f2d3f43a4a528c8946d6092384b5c880d2f0 + React-RCTLinking: 35ae4ab9dc0410d1fcbdce4d7623194a27214fb2 + React-RCTNetwork: 29ec2696f8d8cfff7331fac83d3e893c95ef43ae + React-RCTSettings: 60f0691bba2074ef394f95d4c2265ec284e0a46a + React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c + React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d + ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398 RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495 RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f RNCPushNotificationIOS: 61a7c72bd1ebad3568025957d001e0f0e7b32191 RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df RNGestureHandler: 9b7e605a741412e20e13c512738a31bd1611759b - RNGoogleSignin: ad866d4c4af2651e36801dd3b7771d7715353499 + RNICloudStore: bc6e225811637c09bd1eb055d6cd7448e61cd451 RNKeychain: 840f8e6f13be0576202aefcdffd26a4f54bfe7b5 RNPermissions: 99dd8d4a30ff13509b949ca63cd1f69edc461775 RNReactNativeHapticFeedback: 653a8c126a0f5e88ce15ffe280b3ff37e1fbb285 @@ -658,9 +635,10 @@ SPEC CHECKSUMS: RNSound: da030221e6ac7e8290c6b43f2b5f2133a8e225b0 RNSVG: ce9d996113475209013317e48b05c21ee988d42e RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 - Yoga: 7d13633d129fd179e01b8953d38d47be90db185a + SwiftProtobuf: ed465ed18402f998fd117f631da27e0168e6b59c + Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: afb16583a79febb8d0f0fca06f053e4f8c05ed07 +PODFILE CHECKSUM: f1501ba21caa69277e0d2541cd1f0d022211f347 COCOAPODS: 1.10.0 diff --git a/ios/put_Lndmobile.framework_here b/ios/put_Lndmobile.framework_here new file mode 100644 index 000000000..e69de29bb diff --git a/jest.config.js b/jest.config.js index 4398f8d18..534712a9f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,6 @@ module.exports = { preset: 'react-native', - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + moduleFileExtensions: ['android.ts', 'android.tsx', 'ts', 'tsx', 'js', 'jsx', 'json', 'node'], transformIgnorePatterns: [ "node_modules/(?!react-native|@shoutem|react-clone-referenced-element|native-base-shoutem-theme|react-native-camera|@react-navigation|react-navigation-tabs|react-navigation|@react-native-community\/async-storage|@react-native-community/slider|@codler\/react-native-keyboard-aware-scroll-view)", ], diff --git a/jestSetup.js b/jestSetup.js index f94922969..35b2da853 100644 --- a/jestSetup.js +++ b/jestSetup.js @@ -26,7 +26,8 @@ jest.mock("./src/utils/constants.ts", () => require("./mocks/utils/constants")); const ReactNative = require("react-native"); ReactNative.NativeModules.LndMobile = {}; -ReactNative.NativeModules.LndMobile.log = jest.fn(); +ReactNative.NativeModules.LndMobileTools = {}; +ReactNative.NativeModules.LndMobileTools.log = jest.fn(); ReactNative.UIManager.configureNext = jest.fn(); ReactNative.UIManager.configureNextLayoutAnimation = jest.fn(); ReactNative.InteractionManager.runAfterInteractions = ((cb) => { diff --git a/mocks/lndmobile/index.ts b/mocks/lndmobile/index.ts index 410dc99b7..4ccf04f06 100644 --- a/mocks/lndmobile/index.ts +++ b/mocks/lndmobile/index.ts @@ -13,7 +13,7 @@ export enum ELndMobileStatusCodes { let LndMobileStatus = 0; -export const init = jest.fn(async (): Promise<{ data: string } | number> => { +export const initialize = jest.fn(async (): Promise<{ data: string } | number> => { await timeout(10); LndMobileStatus += ELndMobileStatusCodes.STATUS_SERVICE_BOUND; // TODO figure out bitmasking... return { data: "" }; diff --git a/package.json b/package.json index 48351b5ac..b4eaa3896 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "scripts": { "start": "react-native run-android --variant chaintestnetNormalDebug --appIdSuffix testnet.debug", "start-metro": "react-native start", - "devtools": "redux-devtools --hostname=192.168.1.100 --port=8000", "test": "jest --silent --roots tests", "test-update-snapshot": "jest --silent --roots tests --updateSnapshot", "gen-proto": "pbjs -t static-module -w es6 --force-long -o proto/proto.js proto/rpc.proto proto/walletunlocker.proto proto/autopilotrpc/autopilot.proto proto/walletrpc/walletkit.proto proto/signrpc/signer.proto proto/routerrpc/router.proto proto/invoicesrpc/invoices.proto && pbts -o proto/proto.d.ts proto/proto.js", @@ -21,11 +20,11 @@ "android:mainnet-fakelnd-debug": "react-native run-android --variant chainmainnetFakelndDebug --appIdSuffix fakelnd.debug", "android:bundle-release": "cd android && ./gradlew clean && ./gradlew bundleChainmainnetNormalRelease && ./gradlew bundleChaintestnetNormalRelease", "ios:regtest-debug": "react-native run-ios --scheme BlixtWalletRegtest --configuration DebugRegtest", - "ios:regtest": "react-native run-ios --scheme BlixtWalletRegtest --configuration Regtest", + "ios:regtest": "react-native run-ios --scheme BlixtWalletRegtest --configuration ReleaseRegtest", "ios:testnet-debug": "react-native run-ios --scheme BlixtWalletTestnet --configuration DebugTestnet", "ios:testnet": "react-native run-ios --scheme BlixtWalletTestnet --configuration ReleaseTestnet", - "ios:mainnet-debug": "react-native run-ios --scheme BlixtWallet --configuration Release", - "ios:mainnet": "react-native run-android --variant chainmainnetNormalRelease", + "ios:mainnet-debug": "react-native run-ios --scheme BlixtWallet --configuration Debug", + "ios:mainnet": "react-native run-ios --scheme BlixtWallet --configuration Release", "ios:mainnet-fakelnd": "react-native run-ios --scheme BlixtWalletFakelnd --configuration ReleaseFakelnd", "ios:mainnet-fakelnd-debug": "react-native run-ios --scheme BlixtWalletFakelnd --configuration DebugFakelnd" }, @@ -60,32 +59,33 @@ "native-base": "2.13.14", "protobufjs": "6.10.2", "react": "17.0.1", - "react-native": "0.63.3", + "react-native": "0.63.4", "react-native-animatable": "1.3.3", "react-native-build-config": "^0.3.2", "react-native-camera": "3.40.0", "react-native-dialogs": "1.1.1", - "react-native-document-picker": "4.1.0", + "react-native-document-picker": "4.2.0", "react-native-easy-grid": "0.2.2", "react-native-enhanced-popup-menu": "^0.7.0", "react-native-fingerprint-scanner": "6.0.0", "react-native-fs": "2.16.6", "react-native-gesture-handler": "1.9.0", "react-native-haptic-feedback": "^1.11.0", + "react-native-icloudstore": "git+https://github.com/manicakes/react-native-icloudstore.git#4c9f668d3121aedf7a5635b0a13f6e3999c0e6f3", "react-native-image-slider-box": "^1.0.12", "react-native-keychain": "4.0.5", "react-native-linear-gradient": "2.5.6", "react-native-maps": "0.27.1", - "react-native-material-menu": "^1.1.3", - "react-native-modal": "11.5.6", - "react-native-paper": "4.4.0", + "react-native-material-menu": "1.2.0", + "react-native-modal": "11.6.1", + "react-native-paper": "4.5.0", "react-native-permissions": "^3.0.0", "react-native-progress": "^4.1.2", "react-native-push-notification": "5.0.1", "react-native-qrcode-svg": "6.0.6", "react-native-reanimated": "1.13.2", "react-native-safe-area-context": "3.1.9", - "react-native-screens": "2.15.0", + "react-native-screens": "2.16.1", "react-native-securerandom": "1.0.0", "react-native-sound": "^0.11.0", "react-native-sqlite-storage": "5.0.0", @@ -94,24 +94,24 @@ "react-native-tab-view": "2.15.2", "react-native-vector-icons": "^7.1.0", "react-native-webln": "0.1.10", - "react-native-webview": "10.10.2", + "react-native-webview": "11.0.2", "secp256k1": "4.0.2", "sha.js": "^2.4.11", - "use-debounce": "5.1.0", + "use-debounce": "5.2.0", "webln": "^0.2.2" }, "devDependencies": { - "@babel/core": "7.12.7", + "@babel/core": "7.12.10", "@babel/runtime": "7.12.5", "@testing-library/react-native": "7.1.0", "@types/base64-js": "1.3.0", "@types/bech32": "1.1.2", "@types/color": "3.0.1", "@types/crypto-js": "4.0.1", - "@types/jest": "26.0.15", + "@types/jest": "26.0.19", "@types/long": "4.0.1", "@types/react": "17.0.0", - "@types/react-native": "0.63.36", + "@types/react-native": "0.63.43", "@types/react-native-push-notification": "5.0.5", "@types/react-native-sqlite-storage": "5.0.0", "@types/react-test-renderer": "17.0.0", @@ -125,12 +125,11 @@ "jetifier": "1.6.6", "metro-react-native-babel-preset": "0.64.0", "react-test-renderer": "16.13.1", - "redux-devtools-cli": "1.0.0-4", "remote-redux-devtools": "^0.5.16", "tslint": "6.1.3", "tslint-config-airbnb": "^5.11.2", "tslint-react": "5.0.0", "tslint-react-native": "0.0.7", - "typescript": "4.1.2" + "typescript": "4.1.3" } } diff --git a/react-native.config.js b/react-native.config.js index 4b31d765f..aca919558 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -3,6 +3,12 @@ module.exports = { ios: {}, android: {}, }, - dependencies: {}, + dependencies: { + '@react-native-community/google-signin': { + platforms: { + ios: null, + }, + }, + }, assets: ["./assets/fonts/"], -} \ No newline at end of file +} diff --git a/src/App.tsx b/src/App.tsx index 9c600b17d..1eb96dc5f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,6 +11,7 @@ const getTheme = require("../native-base-theme/components").default; const theme = require("../native-base-theme/variables/commonColor").default; import store from "./state/store"; +import SendDone from "./windows/Send/SendDone"; export default function App() { const [debug, setDebug] = useState(__DEV__ ? true : false); diff --git a/src/Main.tsx b/src/Main.tsx index 37438013e..c08d1786b 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -121,8 +121,8 @@ export default function Main() { }, { text: "Restart app", onPress: async () => { - await NativeModules.LndMobile.killLnd(); - NativeModules.LndMobile.restartApp(); + await NativeModules.LndMobileTools.killLnd(); + NativeModules.LndMobileTools.restartApp(); }, }, { text: "Try again", diff --git a/src/components/BlixtWallet.tsx b/src/components/BlixtWallet.tsx new file mode 100644 index 000000000..5c5448b0b --- /dev/null +++ b/src/components/BlixtWallet.tsx @@ -0,0 +1,83 @@ +import { Text } from "native-base"; +import React, { useRef, useState } from "react"; +import { Image, StyleSheet, TouchableWithoutFeedback, View } from "react-native"; +import { Image as AnimatedImage } from 'react-native-animatable'; +import { blixtTheme } from "../../native-base-theme/variables/commonColor"; +import { timeout } from "../utils"; +import { VersionName } from "../utils/build"; + +export default () => { + const blixtLogo = useRef(null); + const [blixtNumPress, setBlixtNumPress] = useState(0); + const [animationActive, setAnimationActive] = useState(false); + + const doAnimation = async () => { + if (!blixtLogo || !blixtLogo.current || animationActive) { + return; + } + + setAnimationActive(true); + if (blixtNumPress === 6) { + blixtLogo.current.zoomOutDown!(2300) + return; + } else { + blixtLogo.current.rubberBand!(1500) + } + + timeout(500).then(() => { + setBlixtNumPress(blixtNumPress + 1); + setAnimationActive(false); + }); + } + + return ( + + + + + + Blixt Wallet + version {VersionName} + + + ) +} + +const style = StyleSheet.create({ + container: { + marginTop: 16, + height: 200, + marginBottom: -13, + justifyContent: "center", + }, + blixtLogo: { + width: 320, + height: 320, + borderRadius: 55, + alignSelf: "center", + margin: 5, + }, + textContainer: { + width: 215, + alignSelf: "center", + }, + blixtTitle: { + fontFamily: blixtTheme.fontMedium, + fontSize: 40, + }, + version: { + textAlign: "right", + marginRight: 5, + fontSize: 10, + }, +}); + +const blixtLogoWebP = "data:image/webp;base64,UklGRgoIAABXRUJQVlA4IP4HAADwQACdASpeAV4BPpFIo0wlpKOiIhOoYLASCWVu4Db6HWf/E2sE6//z//9P89FUZe/6DVWfD/mH7Stqftf4r9eXcV1z6H3Ln/E6QHmAfq50iP3F/AD4Aftn+qvvuejX/AeoB+5PWW+gB5avs2/2n/i5T19I3knGseNcTetJzH6RR/5HZ58I0HZeZ9uZ9uZ9uZ9uZ9uZ9uZ9uZ9uZ9uZ9uZ9uZ9uZ9uZ9tCArCEOFHnLi8z7cz0kjJdlJtNgmcz7cz7cz7cysVNFjXI2lDtf2wSrwpR5y4vM+uVGi6wtVZydaY7LzPtzPtzPVAhh9GgLBFI93xXWJsKPOXF5nrYhXjHuMCmH+Gv4c7wpR5y4vMrKKTWnAS18oqbR011XGXt4xXhSji8uZsA/Y/NLQf/RMMGFI+DUBspAitM5VbJ/NaTx/FnVh+eIuLzPtyT8ssWYV1I2CPTUR3RuBsT/4+Uo0G3EyEzkdeWA6Fk8cdE5+PsvM+3M+3SeZCn4RUcoXhhTKkgXZDL28YrwmUjDPA5akjX9LvjyJO6+vClHnLi8z655cyFJ1zMzXoPykCjmfbmXMW1C34FBE0U+w2udwJI+9hx/tzPrnlzFJWvCUgrM32XmfbmfbmfXwK9HqNjH4dl5n25n25n15D/jipxK+LxivClCH8qPHiVtx/Kjx0OP9uZ9uZ9uZ9uZ9uZ9uZ9uZ9uZ6QAA/vCXf/RYPhYPhYAYOncauRRxhrYALEp8IvywaoEWDUvxb3DvYvjEuHMOthlsLbDBxyrTwjMfzcyQNXuUoPRya73SNlbzbW5nDmkQbAwwDk3aQbGH2cYs7cmxnEDh3d1BiXDq992IqoBXAgXDDIEHf155v3t3c7pnPKtb+sQd63uO8JgEccAJpkVzNHw8XDM6xPK+GnY+Jc3iOfmI57irvlxkKbtZEMDs8LO3zJ8h3SDLn+AXVLo0i6aKRaGwE6zz06X+ZCYXtyXRUhOoWoYY7/1mNc5JMbTsqKy/pMOOX2JQz7BATvEBWliovFPVx1pvbmvBw73Ef7JuicK5F4ODKGvIDnAZVsG7IrwxxpEGXtNa7jgJT+s4JAmKt2ytyvOFAswRxPdJew1pRSmNzEh8RCp5pU3bB9xiQlmqNPs1IcWopLidGSoU0paiPWaxfI8sOJSZVSd/XCaTgAlqazjXuc3JeNSf6x3bSzRzNXp0OEX7QIFkGKWK8Tjy+QJdRJwghezAVV3yeGJSLnH89RGsaRgam9qCtWIl3zjCmFdnoNxLOXgvndghLLMp/Np43RyVFBDv5U28YffT/LjIU3ZErB3b64fNAjAG7Xv6a+fhqBA7RYbup9HgfdxxNBxRKBh3k2QHxNuFOWezxerHgfYGDCoKeUPe19+AhTdf9bW9jYZ2N+MOqfhoOPQW4soHbA49SIYH3oxB3bM7SXhq9s6QhiSvL8ZTKTTcV3VCP501M0P++yV/LRhGYd8gnAlW0w1n0IRmRyVLfrRbprwTfUgKMcFVHcvojkTZcrCmN2fQpd6EtofqdZ6e2e0H/WF+FxLqNJoa/uec6F/qhMFPBKpYMdaee9z1P8kQygV1dC2b29eYoVrevh9Bw/z4JtIwtE9MMc35KbBIyEEHxX/eWXY2fF+f4HHSes2sGcQdsbdZG59WC7gQWFh7in9IfxHbzaFr+sM2ngd+qfA7duRd6H1jjiQoW07KIPdDvhueTXbwXg3xmEGrrfklPtv1MVZ+m4NPs9oA63RPwYL61ye1B+fzDHYji5NjznXx7Y7/uCw4E0qNKKi9dbK5nR/0DTn8w5uDJ7yiQQGjgtQP7HZxL41iiHYmB+3SPNBHpBnqM15fOfDOQdUrhin+XS0NfH0cr7dvINpPZg/cQFmkKNT1FdPu88KpyrxnqRyxQ0UbyUJIh+lnheZUjqBBtRotQfxptmo5IZi/nPhYynkTgyZcRYo9Azw7JPTs4nI7T7OVc2czanHHhEoLvFNZUfyYYI1X01RahuqyqOXdxFI345Cc689wckfvYYtMAVVLZL20eOmT++/PHJxOV2UyLyLiU6IxsZBKSSMyhV2nJZOUs3DvpyeJhzrI7hJdyFHNV/BQMGDMLBTewfdMzk+/zJGNwMXgTnxE2I5XHPDdZfurvNZhs1lzj3i/aXpNuYcP2Ym7bdU7v/ve5fL6Neu8EdxiySr0weu3HjB1AXYqTezC2xzKDGDJdfJNTh1B8o6GEM3M7Val0xLPHasBDiMUljBw/fDl2ZMttbB4dNQAq92U84eWe3e7pvwXa1eUCT8EwjZKmm1ajtauCXzwUn5civS6mvB+Y4qpewYtjYKOL/yO8/lCs73CfWcaAl0b8fCfLOcPfM0x5XNOjHsrjm0HyoUanfg2fcJeWaNeZ2CFO8gjFek7gimZIuQFGalNchj0ijLl4LxMGmC3DPsBeg8Wy+7f5bo4J6WpW8TFu37miFUrUWcvAgQePnO7p/KBI3nZsFCZhQI8CGHO8ZIZKiXtfnpCQBA7gRv670ldJf16hFn3lHFpnrnTfgunEjqNsqi5GltvqqLb9tusKKdnigAG9Yq9vVPqQYJBBSdeV8FmjmavSi54HARgQiveU366rz7oaPmaU2DczkaDKyNkXm0Il8IOYj6hy2vU4MGsaDA4uqKR3HEQdLHeICfBR53WTfwKZDc83YU9zrWHKR40QnPdSDaF6JNR1pHiyMAAAOKAAA3p0KqZmUXMx8S4dMMeA58S6ZsG0AA="; diff --git a/src/components/BlurModal.tsx b/src/components/BlurModal.tsx index 1ad003c95..dac25e763 100644 --- a/src/components/BlurModal.tsx +++ b/src/components/BlurModal.tsx @@ -3,7 +3,7 @@ import Modal from "react-native-modal"; import { useNavigation } from "@react-navigation/native"; import RealTimeBlur from "../react-native-realtimeblur"; import { KeyboardAvoidingView, View, StyleSheet } from "react-native"; -import { TouchableWithoutFeedback } from "react-native-gesture-handler"; +import { TouchableWithoutFeedback } from "react-native"; export interface ITransactionDetailsProps { children: any; @@ -31,7 +31,7 @@ export default function BlurModal({ children, useModalComponent, goBackByClickin > {!useModal ? - + {children} diff --git a/src/components/Content.tsx b/src/components/Content.tsx index e035e526d..5cb54b3e1 100644 --- a/src/components/Content.tsx +++ b/src/components/Content.tsx @@ -1,7 +1,7 @@ import React, { ReactNode } from "react"; import { Content } from "native-base"; import { StyleProp, ViewStyle, StyleSheet } from "react-native"; -import { ScrollView } from "react-native-gesture-handler"; +import { ScrollView } from "react-native"; export interface IContentProps { children?: ReactNode; diff --git a/src/components/Form.tsx b/src/components/Form.tsx index 56b9aa179..e13fd2acd 100644 --- a/src/components/Form.tsx +++ b/src/components/Form.tsx @@ -3,7 +3,7 @@ import { StyleSheet, KeyboardAvoidingView, StyleProp, ViewStyle, InputAccessoryV import { View, Item, Text, Label, Icon } from "native-base"; import { blixtTheme } from "../../native-base-theme/variables/commonColor"; import { MathPad, IMathPadProps } from "../components/MathPad"; -import { PLATFORM } from "../utils/constants"; +import { MATH_PAD_NATIVEID, MATH_PAD_NATIVE_ID, PLATFORM } from "../utils/constants"; export interface IFormItem { title: string | null; @@ -60,7 +60,7 @@ export default function Form({ buttons, items, style, noticeText, mathPadProps } {PLATFORM === "ios" && - + } diff --git a/src/hooks/useBalance.ts b/src/hooks/useBalance.ts index 952d6aaf9..34ad8db52 100644 --- a/src/hooks/useBalance.ts +++ b/src/hooks/useBalance.ts @@ -85,7 +85,7 @@ export default function useBalance(initialSat?: Long, noConversion = false) { bitcoinUnit: BitcoinUnits[bitcoinUnit], fiatUnit, evalMathExpression(target: "bitcoin" | "fiat") { - const val = evaluateExpression(target === "bitcoin" ? bitcoinValue! : dollarValue!); + const val = evaluateExpression(target === "bitcoin" ? bitcoinValue || "0" : dollarValue || "0"); if (target === "bitcoin") { setBitcoinValue(val); setDollarValue( diff --git a/src/hooks/useFingerprintAuth.ts b/src/hooks/useFingerprintAuth.ts index 97ea865ea..c311b5f93 100644 --- a/src/hooks/useFingerprintAuth.ts +++ b/src/hooks/useFingerprintAuth.ts @@ -21,7 +21,6 @@ export default function useFingerprintAuth(callback: () => void, forceEnabled: b } return () => { fingerprintStopScan(); - // AppState.removeEventListener("change", handler); } }, [fingerprintAvailable, fingerprintEnabled, forceEnabled]); diff --git a/src/lndmobile/LndMobile.d.ts b/src/lndmobile/LndMobile.d.ts index 008f02188..f8e2682ec 100644 --- a/src/lndmobile/LndMobile.d.ts +++ b/src/lndmobile/LndMobile.d.ts @@ -6,29 +6,35 @@ export enum ELndMobileStatusCodes { export interface ILndMobile { // General - init(): Promise; - checkLndMobileServiceConnected(): Promise; - sendPongToLndMobileservice(): Promise<{ data: string }>; - checkStatus(): Promise; - writeConfigFile(): Promise; + initialize(): Promise<{ data: string }>; startLnd(torEnabled: boolean): Promise<{ data: string }> stopLnd(): Promise<{ data: string }>; initWallet(seed: string[], password: string, recoveryWindow: number, channelBackupsBase64: string | null): Promise<{ data: string }>; unlockWallet(password: string): Promise<{ data: string }> + + checkStatus(): Promise; + + // Send gRPC LND API request + sendCommand(method: string, base64Payload: string): Promise<{ data: string }>; + sendStreamCommand(method: string, base64Payload: string, streamOnlyOnce: boolean): Promise<"done">; + + // Android-specific + unbindLndMobileService(): Promise; // TODO(hsjoberg): function looks broken + sendPongToLndMobileservice(): Promise<{ data: string }>; + checkLndMobileServiceConnected(): Promise; +} + +export interface ILndMobileTools { + writeConfigFile(): Promise; killLnd(): Promise; - restartApp(): void; - saveChannelsBackup(base64Backups: string): Promise; log(level: "v" | "d" | "i" | "w" | "e", tag: string, msg: string): void; saveLogs(): Promise; copyLndLog(): Promise; tailLog(numberOfLines: number): Promise; - getTorEnabled(): Promise; observeLndLogFile(): Promise; + saveChannelsBackup(base64Backups: string): Promise; DEBUG_getWalletPasswordFromKeychain(): Promise; - - // Send gRPC LND API request - sendCommand(method: string, base64Payload: string): Promise<{ data: string }>; - sendStreamCommand(method: string, base64Payload: string, streamOnlyOnce: boolean): Promise<"done">; + getTorEnabled(): Promise; // Android-specific getIntentStringData(): Promise; @@ -38,11 +44,29 @@ export interface ILndMobile { DEBUG_listProcesses(): Promise; checkLndProcessExist(): Promise; deleteTLSCerts(): Promise; - unbindLndMobileService(): Promise; // TODO(hsjoberg): function looks broken + restartApp(): void; + + // iOS-specific + checkICloudEnabled(): Promise; + checkApplicationSupportExists(): Promise; + checkLndFolderExists(): Promise; + createIOSApplicationSupportAndLndDirectories(): Promise; + excludeLndICloudBackup(): Promise; + TEMP_moveLndToApplicationSupport(): Promise; +} + +export type WorkInfo = "BLOCKED" | "CANCELLED" | "ENQUEUED" | "FAILED" | "RUNNING" | "SUCCEEDED" | "WORK_NOT_EXIST"; + +export interface ILndMobileScheduledSync { + setupScheduledSyncWork: () => Promise; + removeScheduledSyncWork: () => Promise; + checkScheduledSyncWorkStatus: () => Promise; } declare module "react-native" { interface NativeModulesStatic { LndMobile: ILndMobile; + LndMobileTools: ILndMobileTools; + LndMobileScheduledSync: ILndMobileScheduledSync; } -} \ No newline at end of file +} diff --git a/src/lndmobile/fake/index.ts b/src/lndmobile/fake/index.ts index 9d3bd8617..0ecc22944 100644 --- a/src/lndmobile/fake/index.ts +++ b/src/lndmobile/fake/index.ts @@ -9,13 +9,15 @@ import { TLV_RECORD_NAME } from "../../utils/constants"; import * as base64 from "base64-js"; import payReq from "bolt11"; +const { LndMobileTools } = NativeModules; + let LndMobileStatus = 0; /** * @throws * TODO return values are terrible */ -export const init = async (): Promise<{ data: string } | number> => { +export const initialize = async (): Promise<{ data: string } | number> => { await timeout(10); LndMobileStatus += ELndMobileStatusCodes.STATUS_SERVICE_BOUND; // TODO figure out bitmasking... return { data: "" }; @@ -47,6 +49,45 @@ export const startLnd = async (torEnabled: boolean): Promise => { return "started"; }; +/** + * @throws + */ +export const checkApplicationSupportExists = async () => { + return await LndMobileTools.checkApplicationSupportExists(); +}; + +/** + * @throws + */ +export const checkLndFolderExists = async () => { + return await LndMobileTools.checkLndFolderExists(); +}; + +/** + * @throws + */ +export const createIOSApplicationSupportAndLndDirectories = async () => { + return await LndMobileTools.createIOSApplicationSupportAndLndDirectories(); +}; + +/** + * @throws + */ +export const TEMP_moveLndToApplicationSupport = async () => { + return await LndMobileTools.TEMP_moveLndToApplicationSupport(); +}; + +/** + * @throws + */ +export const excludeLndICloudBackup = async () => { + return await LndMobileTools.excludeLndICloudBackup(); +}; + +export const checkICloudEnabled = async (): Promise => { + return await LndMobileTools.checkICloudEnabled(); +}; + /** * @throws */ diff --git a/src/lndmobile/index.ts b/src/lndmobile/index.ts index 2a9cebdbf..b73ca3872 100644 --- a/src/lndmobile/index.ts +++ b/src/lndmobile/index.ts @@ -5,14 +5,13 @@ import Long from "long"; import sha from "sha.js"; import { stringToUint8Array, hexToUint8Array, decodeTLVRecord } from "../utils"; import { TLV_RECORD_NAME } from "../utils/constants"; -const { LndMobile } = NativeModules; +const { LndMobile, LndMobileTools } = NativeModules; /** * @throws - * TODO return values are terrible */ -export const init = async (): Promise<{ data: string } | number> => { - return await LndMobile.init(); +export const initialize = async (): Promise<{ data: string } | number> => { + return await LndMobile.initialize(); }; export enum ELndMobileStatusCodes { @@ -30,7 +29,7 @@ export const checkStatus = async (): Promise => { * @return string */ export const writeConfigFile = async () => { - return await LndMobile.writeConfigFile(); + return await LndMobileTools.writeConfigFile(); }; /** @@ -40,6 +39,45 @@ export const startLnd = async (torEnabled: boolean): Promise => { return await LndMobile.startLnd(torEnabled); }; +export const checkICloudEnabled = async (): Promise => { + return await LndMobileTools.checkICloudEnabled(); +}; + +/** + * @throws + */ +export const checkApplicationSupportExists = async () => { + return await LndMobileTools.checkApplicationSupportExists(); +}; + +/** + * @throws + */ +export const checkLndFolderExists = async () => { + return await LndMobileTools.checkLndFolderExists(); +}; + +/** + * @throws + */ +export const createIOSApplicationSupportAndLndDirectories = async () => { + return await LndMobileTools.createIOSApplicationSupportAndLndDirectories(); +}; + +/** + * @throws + */ +export const TEMP_moveLndToApplicationSupport = async () => { + return await LndMobileTools.TEMP_moveLndToApplicationSupport(); +}; + +/** + * @throws + */ +export const excludeLndICloudBackup = async () => { + return await LndMobileTools.excludeLndICloudBackup(); +}; + /** * @throws */ @@ -57,6 +95,20 @@ export const connectPeer = async (pubkey: string, host: string): Promise => { + const response = await sendCommand({ + request: lnrpc.DisconnectPeerRequest, + response: lnrpc.DisconnectPeerResponse, + method: "DisconnectPeer", + options: { + pubKey, + }, + }); + return response; +}; /** * @throws @@ -410,7 +462,6 @@ export const listPeers = async (): Promise => { return response; }; - /** * @throws */ diff --git a/src/lndmobile/scheduled-sync.ts b/src/lndmobile/scheduled-sync.ts index 75ec77ed5..915d1ee6d 100644 --- a/src/lndmobile/scheduled-sync.ts +++ b/src/lndmobile/scheduled-sync.ts @@ -1,8 +1,7 @@ import { NativeModules } from "react-native"; +import { WorkInfo } from "./LndMobile"; const { LndMobileScheduledSync } = NativeModules; -export type WorkInfo = "BLOCKED" | "CANCELLED" | "ENQUEUED" | "FAILED" | "RUNNING" | "SUCCEEDED" | "WORK_NOT_EXIST"; - export const checkScheduledSyncWorkStatus = async (): Promise => { return await LndMobileScheduledSync.checkScheduledSyncWorkStatus(); }; \ No newline at end of file diff --git a/src/lndmobile/utils.ts b/src/lndmobile/utils.ts index d5cd29322..2c8d68a78 100644 --- a/src/lndmobile/utils.ts +++ b/src/lndmobile/utils.ts @@ -39,7 +39,7 @@ export const sendCommand = async ({ request, response, method, o try { const instance = request.create(options); const b64 = await LndMobile.sendCommand(method, base64.fromByteArray(request.encode(instance).finish())); - return response.decode(base64.toByteArray(b64.data)); + return response.decode(base64.toByteArray(b64.data || "")); } catch (e) { throw e; } }; diff --git a/src/lndmobile/wallet.ts b/src/lndmobile/wallet.ts index cb2e020af..ffafd88a4 100644 --- a/src/lndmobile/wallet.ts +++ b/src/lndmobile/wallet.ts @@ -4,6 +4,7 @@ import { stringToUint8Array } from "../utils/index"; import * as base64 from "base64-js"; import { lnrpc, walletrpc, signrpc } from "../../proto/proto"; +import { PLATFORM } from "../utils/constants"; const { LndMobile } = NativeModules; @@ -23,7 +24,6 @@ export const genSeed = async (): Promise => { export const initWallet = async (seed: string[], password: string, recoveryWindow?: number, channelBackupsBase64?: string): Promise => { await NativeModules.LndMobile.initWallet(seed, password, recoveryWindow ?? 0, channelBackupsBase64 ?? null); - return; // const options: lnrpc.IInitWalletRequest = { // cipherSeedMnemonic: seed, // walletPassword: stringToUint8Array(password), @@ -123,6 +123,7 @@ export const signMessage = async (keyFamily: number, keyIndex: number, msg: Uint }; // TODO exception? +// TODO move to a more appropiate file? export const subscribeInvoices = async (): Promise => { try { const response = await sendStreamCommand({ diff --git a/src/migration/app-migration.ts b/src/migration/app-migration.ts index 593bae1d8..0d90f5f1d 100644 --- a/src/migration/app-migration.ts +++ b/src/migration/app-migration.ts @@ -2,7 +2,7 @@ import { NativeModules } from "react-native"; import { SQLiteDatabase } from "react-native-sqlite-storage"; import { getWalletCreated, StorageItem, getItemObject, setItemObject, setItem, getItem } from "../storage/app"; import { getPin, getSeed, removeSeed, setSeed, setPin, removePin, setWalletPassword } from "../storage/keystore"; -const { LndMobile } = NativeModules; +const { LndMobile, LndMobileTools } = NativeModules; export interface IAppMigration { beforeLnd: (db: SQLiteDatabase, currentVersion: number) => Promise; @@ -16,14 +16,14 @@ export const appMigration: IAppMigration[] = [ // Version 1 { async beforeLnd(db, i) { - await LndMobile.writeConfigFile(); + await LndMobileTools.writeConfigFile(); }, }, // Version 2 { async beforeLnd(db, i) { await setItemObject(StorageItem.clipboardInvoiceCheck, true); - await LndMobile.writeConfigFile(); + await LndMobileTools.writeConfigFile(); }, }, // Version 3 @@ -39,7 +39,7 @@ export const appMigration: IAppMigration[] = [ { async beforeLnd(db, i) { // Might not be needed: - // const result = await NativeModules.LndMobile.deleteTLSCerts(); + // const result = await NativeModules.LndMobileTools.deleteTLSCerts(); // if (!result) { // throw new Error("Failed to delete TLS certificates"); // } @@ -94,7 +94,7 @@ export const appMigration: IAppMigration[] = [ // Version 11 { async beforeLnd(db, i) { - await LndMobile.writeConfigFile(); + await LndMobileTools.writeConfigFile(); }, }, // Version 12 @@ -118,7 +118,7 @@ export const appMigration: IAppMigration[] = [ // Version 15 { async beforeLnd(db, i) { - await LndMobile.writeConfigFile(); + await LndMobileTools.writeConfigFile(); }, }, // Version 16 @@ -133,7 +133,7 @@ export const appMigration: IAppMigration[] = [ await db.executeSql("ALTER TABLE tx ADD identifiedService TEXT NULL"); await setItemObject(StorageItem.hideExpiredInvoices, true); await setItemObject(StorageItem.lastGoogleDriveBackup, new Date().getTime()); - await LndMobile.writeConfigFile(); + await LndMobileTools.writeConfigFile(); }, }, // Version 18 @@ -148,4 +148,10 @@ export const appMigration: IAppMigration[] = [ await db.executeSql("ALTER TABLE tx ADD note TEXT NULL"); }, }, + // Version 20 + { + async beforeLnd(db, i) { + await setItemObject(StorageItem.lastICloudBackup, new Date().getTime()); + }, + }, ]; \ No newline at end of file diff --git a/src/state/Channel.ts b/src/state/Channel.ts index 952fbf931..28db9c741 100644 --- a/src/state/Channel.ts +++ b/src/state/Channel.ts @@ -9,6 +9,7 @@ import { IStoreInjections } from "./store"; import { IStoreModel } from "../state"; import { IChannelEvent, getChannelEvents, createChannelEvent } from "../storage/database/channel-events"; import { bytesToHexString, uint8ArrayToString } from "../utils"; +import { LndMobileEventEmitter } from "../utils/event-listener"; import logger from "./../utils/log"; const log = logger("Channel"); @@ -99,7 +100,7 @@ export const channel: IChannelModel = { setupChannelUpdateSubscriptions: thunk(async (actions, _2, { getStoreState, getStoreActions, injections }) => { log.i("Starting channel update subscription"); await injections.lndMobile.channel.subscribeChannelEvents(); - DeviceEventEmitter.addListener("SubscribeChannelEvents", async (e: any) => { + LndMobileEventEmitter.addListener("SubscribeChannelEvents", async (e: any) => { if (e.data === "") { log.i("Got e.data empty from SubscribeChannelEvent. Skipping event"); return; @@ -198,7 +199,7 @@ export const channel: IChannelModel = { ]); }); - DeviceEventEmitter.addListener("CloseChannel", async (e: any) => { + LndMobileEventEmitter.addListener("CloseChannel", async (e: any) => { log.i("Event CloseChannel", [e]); await actions.getChannels(); }); @@ -282,7 +283,7 @@ export const channel: IChannelModel = { exportChannelsBackup: thunk(async (_, _2, { injections }) => { const response = await injections.lndMobile.channel.exportAllChannelBackups(); if (response.multiChanBackup && response.multiChanBackup.multiChanBackup) { - const exportResponse = await NativeModules.LndMobile.saveChannelsBackup( + const exportResponse = await NativeModules.LndMobileTools.saveChannelsBackup( base64.fromByteArray(response.multiChanBackup.multiChanBackup) ); return exportResponse; diff --git a/src/state/AndroidDeeplinkManager.ts b/src/state/DeeplinkManager.ts similarity index 80% rename from src/state/AndroidDeeplinkManager.ts rename to src/state/DeeplinkManager.ts index 7be7b4640..241883429 100644 --- a/src/state/AndroidDeeplinkManager.ts +++ b/src/state/DeeplinkManager.ts @@ -8,27 +8,28 @@ import { timeout } from "../utils"; import { LnBech32Prefix } from "../utils/build"; import logger from "./../utils/log"; -const log = logger("AndroidDeeplinkManager"); +import { PLATFORM } from "../utils/constants"; +const log = logger("DeeplinkManager"); -export interface IAndroidDeeplinkManager { - initialize: Thunk; - setupAppStateChangeListener: Thunk; +export interface IDeeplinkManager { + initialize: Thunk; + setupAppStateChangeListener: Thunk; - checkDeeplink: Thunk; - tryInvoice: Thunk; - tryLNUrl: Thunk; - addToCache: Action; + checkDeeplink: Thunk; + tryInvoice: Thunk; + tryLNUrl: Thunk; + addToCache: Action; cache: string[]; } -export const androidDeeplinkManager: IAndroidDeeplinkManager = { +export const deeplinkManager: IDeeplinkManager = { initialize: thunk((actions) => { actions.setupAppStateChangeListener(); // Used for checking for URL intent invocations Linking.addListener("url", async (e: { url: string }) => { - log.i("url eventlistener"); - const result = await actions.checkDeeplink(); + log.i("url eventlistener", [e]); + const result = await actions.checkDeeplink(e.url); console.log(result); if (result) { result(getNavigator()); @@ -50,14 +51,18 @@ export const androidDeeplinkManager: IAndroidDeeplinkManager = { }); }), - checkDeeplink: thunk(async (actions, _, { getState, getStoreState }) => { + checkDeeplink: thunk(async (actions, data, { getState, getStoreState }) => { try { - let data = await Linking.getInitialURL(); - if (data === null) { - data = await NativeModules.LndMobile.getIntentStringData(); + if (data === undefined || data === null) { + data = await Linking.getInitialURL(); } - if (data === null) { - data = await NativeModules.LndMobile.getIntentNfcData(); + if (PLATFORM === "android") { + if (data === null) { + data = await NativeModules.LndMobileTools.getIntentStringData(); + } + if (data === null) { + data = await NativeModules.LndMobileTools.getIntentNfcData(); + } } log.d("Deeplink", [data]); if (data) { diff --git a/src/state/Google.android.ts b/src/state/Google.android.ts new file mode 100644 index 000000000..991352251 --- /dev/null +++ b/src/state/Google.android.ts @@ -0,0 +1,100 @@ +import { Action, action, Thunk, thunk } from "easy-peasy"; +import { GoogleSignin, statusCodes, User } from '@react-native-community/google-signin'; + +import logger from "./../utils/log"; +import { PLATFORM } from "../utils/constants"; +const log = logger("Google"); + +export interface IGoogleDriveToken { + idToken: string; + accessToken: string; +} + +export interface IGoogleModel { + initialize: Thunk; + + signIn: Thunk; + signOut: Thunk; + getTokens: Thunk>; + + setIsSignedIn: Action; + setHasPlayServices: Action; + setUser: Action; + + isSignedIn: boolean; + hasPlayServices: boolean; + user?: User; +}; + +export const google: IGoogleModel = { + initialize: thunk(async (actions) => { + log.i("Initializing", [PLATFORM]); + + GoogleSignin.configure({ + scopes: ["https://www.googleapis.com/auth/drive.appdata"], + }); + + const hasPlayServices = await GoogleSignin.hasPlayServices({ + showPlayServicesUpdateDialog: true, + }); + actions.setHasPlayServices(hasPlayServices); + + if (hasPlayServices) { + try { + const user = await GoogleSignin.signInSilently(); + actions.setIsSignedIn(true); + actions.setUser(user); + } catch (e) { + if (e.code !== statusCodes.SIGN_IN_REQUIRED) { + log.w(`Got unexpected error from GoogleSignin.signInSilently(): ${e.code}`, [e]); + } + } + } + log.d("Done"); + }), + + signIn: thunk(async (actions, _, { getState }) => { + if (!(getState().hasPlayServices)) { + throw new Error("Google Play Services needed to login to Google"); + } + + try { + const user = await GoogleSignin.signIn(); + actions.setUser(user); + actions.setIsSignedIn(true); + } catch (error) { + if (error.code === statusCodes.SIGN_IN_CANCELLED) { + // user cancelled the login flow + } else if (error.code === statusCodes.IN_PROGRESS) { + // operation (e.g. sign in) is in progress already + } else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) { + // play services not available or outdated + } else { + // some other error happened + log.e("Got expected error from GoogleSignin.signIn(): ${e.code}", [error]); + } + return false + } + return true; + }), + + signOut: thunk(async (actions) => { + // await GoogleSignin.revokeAccess(); + await GoogleSignin.signOut(); + actions.setIsSignedIn(false); + }), + + getTokens: thunk(async (_, _2, { getState }) => { + if (!getState().isSignedIn) { + throw new Error("Attempting to call Google.getTokens() when user not logged in"); + } + return await GoogleSignin.getTokens(); + }), + + setIsSignedIn: action((store, payload) => { store.isSignedIn = payload; }), + setHasPlayServices: action((store, payload) => { store.hasPlayServices = payload; }), + setUser: action((store, payload) => { store.user = payload; }), + + isSignedIn: false, + hasPlayServices: false, +} diff --git a/src/state/Google.ts b/src/state/Google.ts index a84ed95a6..f3f549201 100644 --- a/src/state/Google.ts +++ b/src/state/Google.ts @@ -1,5 +1,4 @@ import { Action, action, Thunk, thunk } from "easy-peasy"; -import { GoogleSignin, statusCodes, User } from '@react-native-community/google-signin'; import logger from "./../utils/log"; const log = logger("Google"); @@ -14,79 +13,28 @@ export interface IGoogleModel { signIn: Thunk; signOut: Thunk; - getTokens: Thunk>; + getTokens: Thunk>; setIsSignedIn: Action; setHasPlayServices: Action; - setUser: Action; + setUser: Action; isSignedIn: boolean; hasPlayServices: boolean; - user?: User; + user?: any; }; export const google: IGoogleModel = { initialize: thunk(async (actions) => { - log.d("Initializing"); - GoogleSignin.configure({ - scopes: ["https://www.googleapis.com/auth/drive.appdata"], - }); - - const hasPlayServices = await GoogleSignin.hasPlayServices({ - showPlayServicesUpdateDialog: true, - }); - actions.setHasPlayServices(hasPlayServices); - - if (hasPlayServices) { - try { - const user = await GoogleSignin.signInSilently(); - actions.setIsSignedIn(true); - actions.setUser(user); - } catch (e) { - if (e.code !== statusCodes.SIGN_IN_REQUIRED) { - log.w(`Got unexpected error from GoogleSignin.signInSilently(): ${e.code}`, [e]); - } - } - } - log.d("Done"); }), signIn: thunk(async (actions, _, { getState }) => { - if (!(getState().hasPlayServices)) { - throw new Error("Google Play Services needed to login to Google"); - } - - try { - const user = await GoogleSignin.signIn(); - actions.setUser(user); - actions.setIsSignedIn(true); - } catch (error) { - if (error.code === statusCodes.SIGN_IN_CANCELLED) { - // user cancelled the login flow - } else if (error.code === statusCodes.IN_PROGRESS) { - // operation (e.g. sign in) is in progress already - } else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) { - // play services not available or outdated - } else { - // some other error happened - log.e("Got expected error from GoogleSignin.signIn(): ${e.code}", [error]); - } - return false - } - return true; }), signOut: thunk(async (actions) => { - // await GoogleSignin.revokeAccess(); - await GoogleSignin.signOut(); - actions.setIsSignedIn(false); }), getTokens: thunk(async (_, _2, { getState }) => { - if (!getState().isSignedIn) { - throw new Error("Attempting to call Google.getTokens() when user not logged in"); - } - return await GoogleSignin.getTokens(); }), setIsSignedIn: action((store, payload) => { store.isSignedIn = payload; }), @@ -95,4 +43,4 @@ export const google: IGoogleModel = { isSignedIn: false, hasPlayServices: false, -} \ No newline at end of file +} diff --git a/src/state/ICloudBackup.ts b/src/state/ICloudBackup.ts new file mode 100644 index 000000000..7a0e7af85 --- /dev/null +++ b/src/state/ICloudBackup.ts @@ -0,0 +1,111 @@ +import { DeviceEventEmitter } from "react-native"; +import { Action, action, Thunk, thunk } from "easy-peasy"; +import * as base64 from "base64-js"; +import { differenceInDays } from "date-fns"; +import iCloudStorage from "react-native-icloudstore"; + +import { IStoreInjections } from "./store"; +import { IStoreModel } from "../state"; +import { waitUntilTrue, timeout } from "../utils"; +import { Chain, Debug, Flavor } from "../utils/build"; +import { getItemObject, StorageItem, setItemObject } from "../storage/app"; + +import logger from "./../utils/log"; +const log = logger("ICloudBackup"); + +export const ICLOUD_BACKUP_KEY = `blixt-wallet-backup-${Chain}${Debug ? "-debug" : ""}${Flavor ? `-${Flavor}` : ""}`; + +export interface IICloudBackupModel { + initialize: Thunk; + + setupChannelUpdateSubscriptions: Thunk; + makeBackup: Thunk; + getBackup: Thunk>; + + setChannelUpdateSubscriptionStarted: Action; + setICloudActive: Action; + + channelUpdateSubscriptionStarted: boolean; + iCloudActive: boolean; // Whether iCloud is active on the system +}; + +export const iCloudBackup: IICloudBackupModel = { + initialize: thunk(async (actions, _, { getState, getStoreState, injections }) => { + log.d("Initializing"); + if (!getState().channelUpdateSubscriptionStarted) { + await actions.setupChannelUpdateSubscriptions(); + } + + const iCloudActive = await injections.lndMobile.index.checkICloudEnabled(); + log.i("iCloudActive", [iCloudActive]); + actions.setICloudActive(iCloudActive); + + // Automatically backup every 3 days + // tslint:disable-next-line: no-floating-promises + (async () => { + if (getStoreState().settings.iCloudBackupEnabled) { + try { + let lastICloudBackup = await getItemObject(StorageItem.lastICloudBackup); + log.d("lastICloudBackup", [lastICloudBackup]); + lastICloudBackup = lastICloudBackup - (60 * 60 * 24 * 1000); + const currentDate = new Date().getTime(); + const diff = differenceInDays(currentDate, lastICloudBackup); + if (diff >= 3) { + log.i(">= 3 days since last iCloud backup"); + await waitUntilTrue(() => getStoreState().lightning.rpcReady); + await timeout(2500); + await actions.makeBackup(); + await setItemObject(StorageItem.lastICloudBackup, currentDate); + } + } catch (error) { + log.e("Error while doing auto backup", [error]); + } + } + })(); + + log.d("Done"); + }), + + setupChannelUpdateSubscriptions: thunk((actions, _2, { getStoreState, injections }) => { + log.i("Starting channel update subscription for iCloud channel backup"); + + DeviceEventEmitter.addListener("SubscribeChannelEvents", async (e: any) => { + if (!getStoreState().settings.iCloudBackupEnabled) { + return; + } + log.d("Received SubscribeChannelEvents"); + const decodeChannelEvent = injections.lndMobile.channel.decodeChannelEvent; + const channelEvent = decodeChannelEvent(e.data); + if (channelEvent.openChannel || channelEvent.closedChannel) { + log.i("New channel event received, starting new iCloud backup"); + await actions.makeBackup(); + } + }); + actions.setChannelUpdateSubscriptionStarted(true); + }), + + makeBackup: thunk(async (_, _2, { injections }) => { + const exportAllChannelBackups = injections.lndMobile.channel.exportAllChannelBackups; + const backup = await exportAllChannelBackups(); + const backupsB64 = base64.fromByteArray(backup.multiChanBackup!.multiChanBackup!); + await iCloudStorage.setItem(ICLOUD_BACKUP_KEY, backupsB64); + + const remoteStoredBackupsB64 = await iCloudStorage.getItem(ICLOUD_BACKUP_KEY); + if (remoteStoredBackupsB64 !== backupsB64) { + log.i("iCloud storage missmatch, local, remote:", [backupsB64, remoteStoredBackupsB64]) + throw new Error("Could not save iCloud backup"); + } + + log.i("Backing up channels to iCloud succeeded"); + }), + + getBackup: thunk(async () => { + return await iCloudStorage.getItem(ICLOUD_BACKUP_KEY); + }), + + setChannelUpdateSubscriptionStarted: action((state, payload) => { state.channelUpdateSubscriptionStarted = payload; }), + setICloudActive: action((state, payload) => { state.iCloudActive = payload; }), + + channelUpdateSubscriptionStarted: false, + iCloudActive: false, +} \ No newline at end of file diff --git a/src/state/LNURL.ts b/src/state/LNURL.ts index b560e5653..80ce58989 100644 --- a/src/state/LNURL.ts +++ b/src/state/LNURL.ts @@ -12,6 +12,7 @@ import Long from "long"; import { DeviceEventEmitter } from "react-native"; import { lnrpc } from "../../proto/proto"; import { deriveKey, signMessage } from "../lndmobile/wallet"; +import { LndMobileEventEmitter } from "../utils/event-listener"; const log = logger("LNURL"); @@ -319,7 +320,7 @@ export const lnUrl: ILNUrlModel = { if (lnUrlStr && type === "withdrawRequest" && lnUrlObject && lnUrlObject.tag === "withdrawRequest") { // 5. Once accepted by the user, LN WALLET sends a GET to LN SERVICE in the form of ?k1=&pr= - const listener = DeviceEventEmitter.addListener("SubscribeInvoices", async (e) => { + const listener = LndMobileEventEmitter.addListener("SubscribeInvoices", async (e) => { log.d("SubscribeInvoices event", [e]); listener.remove(); diff --git a/src/state/Lightning.ts b/src/state/Lightning.ts index 522179594..7a1c6e870 100644 --- a/src/state/Lightning.ts +++ b/src/state/Lightning.ts @@ -1,4 +1,3 @@ -import { DeviceEventEmitter, Alert } from "react-native"; import { Action, action, Thunk, thunk, Computed, computed } from "easy-peasy"; import { differenceInDays } from "date-fns"; @@ -11,12 +10,23 @@ import { toast, timeout } from "../utils"; import { Chain } from "../utils/build"; import { getWalletPassword } from "../storage/keystore"; import { PLATFORM } from "../utils/constants"; +import { LndMobileEventEmitter } from "../utils/event-listener"; import logger from "./../utils/log"; const log = logger("Lightning"); const SYNC_UNLOCK_WALLET = false; +interface ILightningPeer { + peer: lnrpc.Peer; + node?: lnrpc.LightningNode; +} + +interface ISetLightningPeersPayload { + peer: lnrpc.IPeer; + node?: lnrpc.ILightningNode; +} + export interface ILightningModel { initialize: Thunk; @@ -27,6 +37,8 @@ export interface ILightningModel { waitForChainSync: Thunk; waitForGraphSync: Thunk; setupAutopilot: Thunk; + getLightningPeers: Thunk; + disconnectPeer: Thunk; setNodeInfo: Action; setRPCServerReady: Action; @@ -35,6 +47,7 @@ export interface ILightningModel { setSyncedToGraph: Action; setFirstSync: Action; setAutopilotSet: Action; + setLightningPeers: Action setBestBlockheight: Action; @@ -45,6 +58,7 @@ export interface ILightningModel { ready: boolean; firstSync: boolean; autopilotSet?: boolean; + lightningPeers: ILightningPeer[]; bestBlockheight?: number; initialKnownBlockheight?: number; @@ -61,7 +75,8 @@ export const lightning: ILightningModel = { // When the RPC server is ready // WalletUnlocked event will be emitted log.v("Starting WalletUnlocked event listener"); - DeviceEventEmitter.addListener("WalletUnlocked", async () => { + + LndMobileEventEmitter.addListener("WalletUnlocked", async () => { debugShowStartupInfo && toast("RPC server ready time: " + (new Date().getTime() - start.getTime()) / 1000 + "s", 1000); actions.setRPCServerReady(true); try { @@ -178,9 +193,7 @@ export const lightning: ILightningModel = { ]); await dispatch.notificationManager.initialize(); await dispatch.clipboardManager.initialize(); - if (PLATFORM === "android") { - await dispatch.androidDeeplinkManager.initialize(); - } + await dispatch.deeplinkManager.initialize(); } catch (e) { toast(e.message, 0, "danger", "OK"); return; @@ -198,7 +211,7 @@ export const lightning: ILightningModel = { }), setupAutopilot: thunk(async (actions, enabled, { injections }) => { - console.log("Setting up Autopilot"); + log.i("Setting up Autopilot"); const modifyStatus = injections.lndMobile.autopilot.modifyStatus; const status = injections.lndMobile.autopilot.status; @@ -227,6 +240,40 @@ export const lightning: ILightningModel = { } while (true); }), + getLightningPeers: thunk(async (actions, _, { injections }) => { + const listPeers = injections.lndMobile.index.listPeers; + const getNodeInfo = injections.lndMobile.index.getNodeInfo; + + const response = await listPeers(); + + const lightningPeers = await Promise.all(response.peers.map(async (ipeer) => { + let nodeInfo = undefined; + try { + nodeInfo = await getNodeInfo(ipeer.pubKey ?? ""); + } catch(e) { console.log(e) } + return { + peer: ipeer, + node: nodeInfo?.node ?? undefined, + } + })); + + const sortedPeers = lightningPeers.sort((lightningNode, lightningNode2) => { + if (lightningNode.peer.pubKey! < lightningNode2.peer.pubKey!) { + return -1; + } else if (lightningNode.peer.pubKey! > lightningNode2.peer.pubKey!){ + return 1; + } + return 0; + }); + + actions.setLightningPeers(sortedPeers); + }), + + disconnectPeer: thunk(async (_, pubkey, { injections }) => { + const disconnectPeer = injections.lndMobile.index.disconnectPeer; + return await disconnectPeer(pubkey); + }), + getInfo: thunk(async (actions, _, { injections }) => { const { getInfo } = injections.lndMobile.index; const info = await getInfo(); @@ -308,6 +355,12 @@ export const lightning: ILightningModel = { setSyncedToGraph: action((state, payload) => { state.syncedToGraph = payload; }), setFirstSync: action((state, payload) => { state.firstSync = payload; }), setAutopilotSet: action((state, payload) => { state.autopilotSet = payload; }), + setLightningPeers: action((state, payload) => { + state.lightningPeers = payload.map((p) => ({ + peer: lnrpc.Peer.create(p.peer), + node: lnrpc.LightningNode.create(p.node), + })); + }), setBestBlockheight: action((state, payload) => { state.bestBlockheight = payload; }), @@ -317,6 +370,7 @@ export const lightning: ILightningModel = { syncedToGraph: computed((state) => (state.nodeInfo?.syncedToGraph) ?? false), firstSync: false, bestBlockheight: undefined, + lightningPeers: [], }; const getNodeScores = async () => { diff --git a/src/state/LndMobileInjection.ts b/src/state/LndMobileInjection.ts index 2425bf870..a8736fdb3 100644 --- a/src/state/LndMobileInjection.ts +++ b/src/state/LndMobileInjection.ts @@ -1,16 +1,24 @@ import { - init, + initialize, writeConfigFile, checkStatus, startLnd, + checkICloudEnabled, + checkApplicationSupportExists, + checkLndFolderExists, + createIOSApplicationSupportAndLndDirectories, + TEMP_moveLndToApplicationSupport, + excludeLndICloudBackup, addInvoice, cancelInvoice, connectPeer, + disconnectPeer, decodePayReq, getNodeInfo, getInfo, lookupInvoice, + listPeers, readLndLog, sendPaymentSync, sendPaymentV2Sync, @@ -52,25 +60,33 @@ import { setScores, } from "../lndmobile/autopilot"; import { - checkScheduledSyncWorkStatus, WorkInfo + checkScheduledSyncWorkStatus } from "../lndmobile/scheduled-sync"; // TODO(hsjoberg): This could be its own injection "LndMobileScheduledSync" -import { lnrpc, signrpc, invoicesrpc } from "../../proto/proto"; -import { autopilotrpc } from "../../proto/proto-autopilot"; +import { lnrpc, signrpc, invoicesrpc, autopilotrpc } from "../../proto/proto"; +import { WorkInfo } from "../lndmobile/LndMobile"; export interface ILndMobileInjections { index: { - init: () => Promise<{ data: string } | number>; + initialize: () => Promise<{ data: string } | number>; writeConfigFile: () => Promise; checkStatus: () => Promise; startLnd: (torEnabled: boolean) => Promise; + checkICloudEnabled: () => Promise; + checkApplicationSupportExists: () => Promise; + checkLndFolderExists: () => Promise; + createIOSApplicationSupportAndLndDirectories: () => Promise; + TEMP_moveLndToApplicationSupport: () => Promise; + excludeLndICloudBackup: () => Promise; addInvoice: (amount: number, memo: string, expiry?: number) => Promise; cancelInvoice: (paymentHash: string) => Promise connectPeer: (pubkey: string, host: string) => Promise; + disconnectPeer: (pubkey: string) => Promise; decodePayReq: (bolt11: string) => Promise; getInfo: () => Promise; getNodeInfo: (pubKey: string) => Promise; lookupInvoice: (rHash: string) => Promise; + listPeers: () => Promise; readLndLog: () => Promise; sendPaymentSync: (paymentRequest: string, amount?: Long, tlvRecordName?: string | null) => Promise; sendPaymentV2Sync: (paymentRequest: string, amount?: Long, tlvRecordName?: string | null) => Promise; @@ -117,18 +133,26 @@ export interface ILndMobileInjections { export default { index: { - init, + initialize, writeConfigFile, checkStatus, startLnd, + checkICloudEnabled, + checkApplicationSupportExists, + checkLndFolderExists, + createIOSApplicationSupportAndLndDirectories, + TEMP_moveLndToApplicationSupport, + excludeLndICloudBackup, addInvoice, cancelInvoice, connectPeer, + disconnectPeer, decodePayReq, getNodeInfo, getInfo, lookupInvoice, + listPeers, readLndLog, sendPaymentSync, sendPaymentV2Sync, diff --git a/src/state/LndMobileInjectionFake.ts b/src/state/LndMobileInjectionFake.ts index 8bb4575d7..07a67ddff 100644 --- a/src/state/LndMobileInjectionFake.ts +++ b/src/state/LndMobileInjectionFake.ts @@ -1,16 +1,24 @@ import { - init, + initialize, writeConfigFile, checkStatus, startLnd, + checkICloudEnabled, + checkApplicationSupportExists, + checkLndFolderExists, + createIOSApplicationSupportAndLndDirectories, + TEMP_moveLndToApplicationSupport, + excludeLndICloudBackup, addInvoice, cancelInvoice, connectPeer, + // TODO disconnectPeer decodePayReq, getNodeInfo, getInfo, lookupInvoice, + // TODO listPeers readLndLog, sendPaymentSync, sendPaymentV2Sync, @@ -54,15 +62,20 @@ import { import { checkScheduledSyncWorkStatus, WorkInfo } from "../lndmobile/fake/scheduled-sync"; // TODO(hsjoberg): This could be its own injection "LndMobileScheduledSync" -import { lnrpc, signrpc, invoicesrpc } from "../../proto/proto"; -import { autopilotrpc } from "../../proto/proto-autopilot"; +import { lnrpc, signrpc, invoicesrpc, autopilotrpc } from "../../proto/proto"; export interface ILndMobileInjections { index: { - init: () => Promise<{ data: string } | number>; + initialize: () => Promise<{ data: string } | number>; writeConfigFile: () => Promise; checkStatus: () => Promise; startLnd: (torEnabled: boolean) => Promise; + checkICloudEnabled: () => Promise; + checkApplicationSupportExists: () => Promise; + checkLndFolderExists: () => Promise; + createIOSApplicationSupportAndLndDirectories: () => Promise; + TEMP_moveLndToApplicationSupport: () => Promise; + excludeLndICloudBackup: () => Promise; addInvoice: (amount: number, memo: string, expiry?: number) => Promise; cancelInvoice: (paymentHash: string) => Promise @@ -117,10 +130,16 @@ export interface ILndMobileInjections { export default { index: { - init, + initialize, writeConfigFile, checkStatus, startLnd, + checkICloudEnabled, + checkApplicationSupportExists, + checkLndFolderExists, + createIOSApplicationSupportAndLndDirectories, + TEMP_moveLndToApplicationSupport, + excludeLndICloudBackup, addInvoice, cancelInvoice, diff --git a/src/state/NotificationManager.ts b/src/state/NotificationManager.ts index 3c5f5e902..795361f9e 100644 --- a/src/state/NotificationManager.ts +++ b/src/state/NotificationManager.ts @@ -35,15 +35,18 @@ export const notificationManager: INotificationManagerModel = { PushNotification.configure({ requestPermissions: false, onNotification: ((notification) => { - log.i("onNotification"); + log.i("onNotification", [notification]); - if (notification.message.toString().includes("on-chain")) { - log.i("Navigating to OnChainTransactionLog"); - navigate("OnChain", { screen: "OnChainTransactionLog"}); - } - else if (notification.message.toString().toLocaleLowerCase().includes("payment channel")) { - log.i("Navigating to LightningInfo"); - navigate("LightningInfo"); + // TODO(hsjoberg): ios notification deeplinking + if (PLATFORM === "android") { + if (notification.message.toString().includes("on-chain")) { + log.i("Navigating to OnChainTransactionLog"); + navigate("OnChain", { screen: "OnChainTransactionLog"}); + } + else if (notification.message.toString().toLocaleLowerCase().includes("payment channel")) { + log.i("Navigating to LightningInfo"); + navigate("LightningInfo"); + } } }), }); @@ -61,4 +64,4 @@ export const notificationManager: INotificationManagerModel = { }); } }), -}; \ No newline at end of file +}; diff --git a/src/state/OnChain.ts b/src/state/OnChain.ts index 9c12ef194..9e6aacccd 100644 --- a/src/state/OnChain.ts +++ b/src/state/OnChain.ts @@ -8,6 +8,7 @@ import { lnrpc } from "../../proto/proto"; import logger from "./../utils/log"; import { decodeSubscribeTransactionsResult } from "../lndmobile/onchain"; +import { LndMobileEventEmitter } from "../utils/event-listener"; const log = logger("OnChain"); export interface IBlixtTransaction extends lnrpc.ITransaction { @@ -78,7 +79,7 @@ export const onChain: IOnChainModel = { } else { await injections.lndMobile.onchain.subscribeTransactions(); - DeviceEventEmitter.addListener("SubscribeTransactions", async (e: any) => { + LndMobileEventEmitter.addListener("SubscribeTransactions", async (e: any) => { log.d("Event SubscribeTransactions", [e]); if (e.data === "") { log.i("Got e.data empty from SubscribeTransactions. Skipping transaction"); diff --git a/src/state/Receive.ts b/src/state/Receive.ts index acda13890..c3d54ae89 100644 --- a/src/state/Receive.ts +++ b/src/state/Receive.ts @@ -11,6 +11,7 @@ import { valueFiat, formatBitcoin } from "../utils/bitcoin-units"; import { timeout, uint8ArrayToString, decodeTLVRecord, bytesToHexString, toast } from "../utils"; import { TLV_RECORD_NAME } from "../utils/constants"; import { identifyService } from "../utils/lightning-services"; +import { LndMobileEventEmitter } from "../utils/event-listener"; import logger from "./../utils/log"; const log = logger("Receive"); @@ -107,7 +108,7 @@ export const receive: IReceiveModel = { log.d("Receive.subscribeInvoice() called when subsription already started"); return; } - const invoiceSubscription = DeviceEventEmitter.addListener("SubscribeInvoices", async (e: any) => { + const invoiceSubscription = LndMobileEventEmitter.addListener("SubscribeInvoices", async (e: any) => { try { log.i("New invoice event"); if (e.data === "") { diff --git a/src/state/ScheduledSync.ts b/src/state/ScheduledSync.ts index a3abc3796..991832dbf 100644 --- a/src/state/ScheduledSync.ts +++ b/src/state/ScheduledSync.ts @@ -1,7 +1,7 @@ import { NativeModules } from "react-native" import { Action, action, Thunk, thunk, computed, Computed } from "easy-peasy"; import { StorageItem, getItemObject } from "../storage/app"; -import { WorkInfo } from "../lndmobile/scheduled-sync"; +import { WorkInfo } from "../lndmobile/LndMobile"; import { IStoreInjections } from "./store"; import { PLATFORM } from "../utils/constants"; @@ -29,7 +29,7 @@ export interface IScheduledSyncModel { export const scheduledSync: IScheduledSyncModel = { initialize: thunk(async (actions) => { if (PLATFORM !== "android") { - log.w("initialize(): Platform does not support scheduled sync yet"); + log.i("initialize(): Platform does not support scheduled sync yet"); return; } await actions.retrieveSyncInfo(); diff --git a/src/state/Security.ts b/src/state/Security.ts index a0247fb25..2374c1032 100644 --- a/src/state/Security.ts +++ b/src/state/Security.ts @@ -1,5 +1,5 @@ import { Action, action, Thunk, thunk, Computed, computed } from "easy-peasy"; -import FingerprintScanner from "react-native-fingerprint-scanner"; +import FingerprintScanner, { Biometrics } from "react-native-fingerprint-scanner"; import { StorageItem, getItemObject, setItemObject, removeItem } from "../storage/app"; import { Alert, AppState } from "react-native"; @@ -29,13 +29,14 @@ export interface ISecurityModel { setLoggedIn: Action; setLoginMethods: Action>; setSeedAvailable: Action; - setFingerprintAvailable: Action; + setSensor: Action; loggedIn: boolean; loginMethods: Set; seedAvailable: boolean; - fingerprintAvailable: boolean; + fingerprintAvailable: Computed; fingerprintEnabled: Computed; + sensor: Biometrics | null; } export const security: ISecurityModel = { @@ -46,8 +47,8 @@ export const security: ISecurityModel = { actions.setLoggedIn(loginMethods.size === 0); actions.setSeedAvailable(await getItemObject(StorageItem.seedStored) || false); try { - const sensorAvailable = await FingerprintScanner.isSensorAvailable(); - actions.setFingerprintAvailable(sensorAvailable === "Biometrics"); + const sensor = await FingerprintScanner.isSensorAvailable(); + actions.setSensor(sensor); } catch (e) { log.d("Error checking fingerprint availability", [e]); } @@ -145,12 +146,12 @@ export const security: ISecurityModel = { setLoggedIn: action((store, payload) => { store.loggedIn = payload; }), setLoginMethods: action((store, payload) => { store.loginMethods = payload; }), setSeedAvailable: action((store, payload) => { store.seedAvailable = payload; }), - setFingerprintAvailable: action((store, payload) => { store.fingerprintAvailable = payload; }), + setSensor: action((store, payload) => { store.sensor = payload; }), loginMethods: new Set([]), loggedIn: false, seedAvailable: false, - fingerprintAvailable: false, + fingerprintAvailable: computed((store) => store.sensor !== null), fingerprintEnabled: computed((store) => store.loginMethods.has(LoginMethods.fingerprint)), + sensor: null, }; - diff --git a/src/state/Settings.ts b/src/state/Settings.ts index ff07a23d0..b1cf9db79 100644 --- a/src/state/Settings.ts +++ b/src/state/Settings.ts @@ -37,6 +37,7 @@ export interface ISettingsModel { changeTorEnabled: Thunk; changeHideExpiredInvoices: Thunk; changeScreenTransitionsEnabled: Thunk; + changeICloudBackupEnabled: Thunk; setBitcoinUnit: Action; setFiatUnit: Action; @@ -56,6 +57,7 @@ export interface ISettingsModel { setTorEnabled: Action; setHideExpiredInvoices: Action; setScreenTransitionsEnabled: Action; + setICloudBackupEnabled: Action; bitcoinUnit: keyof IBitcoinUnits; fiatUnit: keyof IFiatRates; @@ -75,6 +77,7 @@ export interface ISettingsModel { torEnabled: boolean; hideExpiredInvoices: boolean; screenTransitionsEnabled: boolean; + iCloudBackupEnabled: boolean; } export const settings: ISettingsModel = { @@ -98,6 +101,7 @@ export const settings: ISettingsModel = { actions.setTorEnabled(await getItemObject(StorageItem.torEnabled) || false); actions.setHideExpiredInvoices(await getItemObject(StorageItem.hideExpiredInvoices) || false); actions.setScreenTransitionsEnabled(await getItemObject(StorageItem.screenTransitionsEnabled) ?? true); + actions.setICloudBackupEnabled(await getItemObject(StorageItem.iCloudBackupEnabled ?? false)); log.d("Done"); }), @@ -195,6 +199,11 @@ export const settings: ISettingsModel = { actions.setScreenTransitionsEnabled(payload); }), + changeICloudBackupEnabled: thunk(async (actions, payload) => { + await setItemObject(StorageItem.iCloudBackupEnabled, payload); + actions.setICloudBackupEnabled(payload); + }), + setBitcoinUnit: action((state, payload) => { state.bitcoinUnit = payload; }), setFiatUnit: action((state, payload) => { state.fiatUnit = payload; }), setName: action((state, payload) => { state.name = payload; }), @@ -213,6 +222,7 @@ export const settings: ISettingsModel = { setTorEnabled: action((state, payload) => { state.torEnabled = payload; }), setHideExpiredInvoices: action((state, payload) => { state.hideExpiredInvoices = payload; }), setScreenTransitionsEnabled: action((state, payload) => { state.screenTransitionsEnabled = payload; }), + setICloudBackupEnabled: action((state, payload) => { state.iCloudBackupEnabled = payload; }), bitcoinUnit: "bitcoin", fiatUnit: "USD", @@ -232,4 +242,5 @@ export const settings: ISettingsModel = { torEnabled: false, hideExpiredInvoices: false, screenTransitionsEnabled: true, + iCloudBackupEnabled: false, }; diff --git a/src/state/index.ts b/src/state/index.ts index 21a4579eb..ee01364ab 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -20,9 +20,10 @@ import { ILNUrlModel, lnUrl } from "./LNURL"; import { IGoogleModel, google } from "./Google"; import { IGoogleDriveBackupModel, googleDriveBackup } from "./GoogleDriveBackup"; import { IWebLNModel, webln } from "./WebLN"; -import { IAndroidDeeplinkManager, androidDeeplinkManager } from "./AndroidDeeplinkManager"; +import { IDeeplinkManager, deeplinkManager } from "./DeeplinkManager"; import { INotificationManagerModel, notificationManager } from "./NotificationManager"; import { ILightNameModel, lightName } from "./LightName"; +import { IICloudBackupModel, iCloudBackup } from "./ICloudBackup"; import { ELndMobileStatusCodes } from "../lndmobile/index"; import { clearApp, setupApp, getWalletCreated, StorageItem, getItem as getItemAsyncStorage, getItemObject as getItemObjectAsyncStorage, setItemObject, setItem, getAppVersion, setAppVersion } from "../storage/app"; @@ -87,9 +88,10 @@ export interface IStoreModel { google: IGoogleModel; googleDriveBackup: IGoogleDriveBackupModel; webln: IWebLNModel; - androidDeeplinkManager: IAndroidDeeplinkManager; + deeplinkManager: IDeeplinkManager; notificationManager: INotificationManagerModel; lightName: ILightNameModel; + iCloudBackup: IICloudBackupModel; walletSeed?: string[]; appVersion: number; @@ -106,16 +108,34 @@ export const model: IStoreModel = { log.v("initializeApp()"); - const { init, writeConfigFile, checkStatus, startLnd } = injections.lndMobile.index; + const { initialize, writeConfigFile, checkStatus, startLnd } = injections.lndMobile.index; const db = await openDatabase(); actions.setDb(db); if (!await getItemObjectAsyncStorage(StorageItem.app)) { log.i("Initializing app for the first time"); + if (PLATFORM === "ios") { + log.i("Creating Application Support and lnd directories"); + await injections.lndMobile.index.createIOSApplicationSupportAndLndDirectories(); + log.i("Excluding lnd directory from backup") + await injections.lndMobile.index.excludeLndICloudBackup(); + } + await setupApp(); log.i("Initializing db for the first time"); await setupInitialSchema(db); log.i("Writing lnd.conf"); await writeConfigFile(); + } else { + // Temporarily dealing with moving lnd to "Application Support" folder + if (PLATFORM === "ios") { + if (!(await injections.lndMobile.index.checkLndFolderExists())) { + log.i("Moving lnd from Documents to Application Support"); + await injections.lndMobile.index.createIOSApplicationSupportAndLndDirectories(); + await injections.lndMobile.index.TEMP_moveLndToApplicationSupport(); + log.i("Excluding lnd directory from backup") + await injections.lndMobile.index.excludeLndICloudBackup() + } + } } actions.setAppVersion(await getAppVersion()); await actions.checkAppVersionMigration(); @@ -132,10 +152,9 @@ export const model: IStoreModel = { await NativeModules.BlixtTor.startTor(); // FIXME } - log.v("Running LndMobile init()"); - const initReturn = await init(); - log.v("init done"); - log.d("init", [initReturn]); + log.v("Running LndMobile.initialize()"); + const initReturn = await initialize(); + log.v("initialize done", [initReturn]); const status = await checkStatus(); if (!getState().walletCreated && (status & ELndMobileStatusCodes.STATUS_PROCESS_STARTED) !== ELndMobileStatusCodes.STATUS_PROCESS_STARTED) { @@ -155,6 +174,8 @@ export const model: IStoreModel = { if (PLATFORM === "android") { await dispatch.google.initialize(); await dispatch.googleDriveBackup.initialize(); + } else if (PLATFORM === "ios") { + await dispatch.iCloudBackup.initialize(); } await dispatch.transaction.getTransactions(); await dispatch.channel.setupCachedBalance(); @@ -270,9 +291,10 @@ export const model: IStoreModel = { google, googleDriveBackup, webln, - androidDeeplinkManager, + deeplinkManager, notificationManager, lightName, + iCloudBackup, }; export default model; diff --git a/src/storage/app.ts b/src/storage/app.ts index a4ac68a4c..2b2d5311c 100644 --- a/src/storage/app.ts +++ b/src/storage/app.ts @@ -40,6 +40,8 @@ export enum StorageItem { // const enums not supported in Babel 7... hideExpiredInvoices = "hideExpiredInvoices", lastGoogleDriveBackup = "lastGoogleDriveBackup", screenTransitionsEnabled = "screenTransitionsEnabled", + iCloudBackupEnabled = "iCloudBackupEnabled", + lastICloudBackup = "lastICloudBackup", } export const setItem = async (key: StorageItem, value: string) => await AsyncStorage.setItem(key, value); @@ -92,6 +94,8 @@ export const clearApp = async () => { removeItem(StorageItem.hideExpiredInvoices), removeItem(StorageItem.lastGoogleDriveBackup), removeItem(StorageItem.screenTransitionsEnabled), + removeItem(StorageItem.iCloudBackupEnabled), + removeItem(StorageItem.lastICloudBackup), ]); }; @@ -127,5 +131,7 @@ export const setupApp = async () => { setItemObject(StorageItem.hideExpiredInvoices, false), setItemObject(StorageItem.lastGoogleDriveBackup, new Date().getTime()), setItemObject(StorageItem.screenTransitionsEnabled, true), + setItemObject(StorageItem.iCloudBackupEnabled, false), + setItemObject(StorageItem.lastICloudBackup, new Date().getTime()), ]); }; \ No newline at end of file diff --git a/src/storage/keystore.ts b/src/storage/keystore.ts index e4c127274..3bcb1c2de 100644 --- a/src/storage/keystore.ts +++ b/src/storage/keystore.ts @@ -2,7 +2,7 @@ import * as Keychain from 'react-native-keychain'; const USER = 'blixt'; -export const setItem = async (key: string, value: string, accessible: Keychain.ACCESSIBLE = Keychain.ACCESSIBLE.WHEN_UNLOCKED) => { +export const setItem = async (key: string, value: string, accessible: Keychain.ACCESSIBLE = Keychain.ACCESSIBLE.ALWAYS) => { const options = { accessible, }; diff --git a/src/utils/build.ts b/src/utils/build.ts index 1749b2315..bdf1a1ebb 100644 --- a/src/utils/build.ts +++ b/src/utils/build.ts @@ -3,11 +3,11 @@ import { PLATFORM } from "./constants"; export const Flavor: string = PLATFORM === "android" ? BuildConfig.FLAVOR_custom : BuildConfig.FLAVOR; export const Debug: boolean = PLATFORM === "android" ? BuildConfig.DEBUG : BuildConfig.DEBUG === "true"; -export const VersionCode: number = PLATFORM === "android" ? BuildConfig.VERSION_CODE : 1; -export const BuildType: string = PLATFORM === "android" ? BuildConfig.BUILD_TYPE : "BuildType"; +export const VersionCode: number = PLATFORM === "android" ? BuildConfig.VERSION_CODE : BuildConfig.CFBundleVersion; +export const BuildType: string = PLATFORM === "android" ? BuildConfig.BUILD_TYPE : Debug ? "debug" : "release"; export const ApplicationId: string = PLATFORM === "android" ? BuildConfig.APPLICATION_ID : BuildConfig.CFBundleIdentifier; -export const VersionName: string = PLATFORM === "android" ? BuildConfig.VERSION_NAME : ""; -export const IsHermes: boolean = global.HermesInternal != null; +export const VersionName: string = PLATFORM === "android" ? BuildConfig.VERSION_NAME : BuildConfig.CFBundleShortVersionString; +export const IsHermes: boolean = (global as any).HermesInternal != null; export const Chain: "mainnet" | "testnet" | "regtest" = BuildConfig.CHAIN; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index d205710e8..25dfc5721 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -7,4 +7,6 @@ export const GITHUB_REPO_URL = "https://github.com/hsjoberg/blixt-wallet"; export const HAMPUS_EMAIL = "mailto:hampus.sjoberg💩protonmail.com".replace("💩", "@"); export const TELEGRAM = "https://t.me/blixtwallet"; -export const PLATFORM = Platform.OS; \ No newline at end of file +export const PLATFORM = Platform.OS; + +export const MATH_PAD_NATIVE_ID = "MATH_PAD"; \ No newline at end of file diff --git a/src/utils/event-listener.ts b/src/utils/event-listener.ts new file mode 100644 index 000000000..53de1b75d --- /dev/null +++ b/src/utils/event-listener.ts @@ -0,0 +1,7 @@ +import { DeviceEventEmitter, NativeEventEmitter, NativeModules } from "react-native"; +import { PLATFORM } from "./constants"; + +export const LndMobileEventEmitter = + PLATFORM == "android" + ? DeviceEventEmitter + : new NativeEventEmitter(NativeModules.LndMobile); \ No newline at end of file diff --git a/src/utils/log.ts b/src/utils/log.ts index 48865774c..1a42670d8 100644 --- a/src/utils/log.ts +++ b/src/utils/log.ts @@ -11,9 +11,7 @@ const log = (tag?: string) => { if (Debug) { const msg = fixMessage(message, data); console.debug(`${tag}: ${msg}`); - if (PLATFORM === "android") { - NativeModules.LndMobile.log("v", tag, msg); - } + NativeModules.LndMobileTools.log("v", tag, msg); } }, @@ -21,34 +19,26 @@ const log = (tag?: string) => { if (Debug) { const msg = fixMessage(message, data); console.debug(`${tag}: ${msg}`); - if (PLATFORM === "android") { - NativeModules.LndMobile.log("d", tag, msg); - } + NativeModules.LndMobileTools.log("d", tag, msg); } }, i: (message: string, data: any[] = []) => { const msg = fixMessage(message, data); - console.log(`${tag}: ${msg}`); - if (PLATFORM === "android") { - NativeModules.LndMobile.log("i", tag, msg); - } + console.log(`${tag}: ${msg}`) + NativeModules.LndMobileTools.log("i", tag, msg); }, w: (message: string, data: any[] = []) => { const msg = fixMessage(message, data); - console.warn(`${tag}: ${msg}`); - if (PLATFORM === "android") { - NativeModules.LndMobile.log("w", tag, msg); - } + console.warn(`${tag}: ${msg}`) + NativeModules.LndMobileTools.log("w", tag, msg); }, e: (message: string, data: any[] = []) => { const msg = fixMessage(message, data); - console.error(`${tag}: ${msg}`); - if (PLATFORM === "android") { - NativeModules.LndMobile.log("e", tag, msg); - } + console.error(`${tag}: ${msg}`) + NativeModules.LndMobileTools.log("e", tag, msg); }, }; }; diff --git a/src/utils/push-notification.ts b/src/utils/push-notification.ts index 511dd884e..5a30aabca 100644 --- a/src/utils/push-notification.ts +++ b/src/utils/push-notification.ts @@ -9,4 +9,4 @@ export const localNotification = (message: string, importance: PushNotificationO importance, autoCancel: true, }); -}; \ No newline at end of file +}; diff --git a/src/windows/HelperWindows/SelectList.tsx b/src/windows/HelperWindows/SelectList.tsx index 745457ab3..f12f2d198 100644 --- a/src/windows/HelperWindows/SelectList.tsx +++ b/src/windows/HelperWindows/SelectList.tsx @@ -1,7 +1,7 @@ import React, { useLayoutEffect, useState } from "react"; import { Header, Icon, Input, Item, ListItem, Text } from "native-base"; import Container from "../../components/Container"; -import { FlatList, View } from "react-native"; +import { FlatList, StyleSheet, View } from "react-native"; import { blixtTheme } from "../../../native-base-theme/variables/commonColor"; import { StackNavigationProp } from "@react-navigation/stack"; import { RouteProp } from "@react-navigation/native"; @@ -13,6 +13,7 @@ export interface ISelectListNavigationProps { onPick: (address: T) => void; data: { title: string, value: T }[]; searchEnabled?: boolean; + description?: string } type IFakeStack = { @@ -24,11 +25,12 @@ export interface ISelectListProps { route: RouteProp, "SelectList">; } -export default function({ navigation, route }: ISelectListProps) { +export default function({ navigation, route }: ISelectListProps) { const title = route?.params?.title ?? ""; const onPick = route?.params?.onPick ?? (() => {}); const data = route?.params?.data ?? []; const searchEnabled = route?.params?.searchEnabled ?? false; + const description = route?.params?.description; useLayoutEffect(() => { navigation.setOptions({ @@ -61,27 +63,34 @@ export default function({ navigation, route }: ISelectListProps } - - { - return ( - title.toUpperCase().includes(searchText.toUpperCase()) || - value.toUpperCase().includes(searchText.toUpperCase()) - ); - })} - renderItem={({ item }) => ( - { - onPick(item.value); - navigation.pop(); - }}> - {item.title} - - )} - keyExtractor={(item) => item.value} - /> - + {description} : undefined} + contentContainerStyle={{ paddingTop: 8, paddingHorizontal: 14, paddingBottom: 65 }} + initialNumToRender={20} + data={data.filter(({ title, value }) => { + return ( + title.toUpperCase().includes(searchText.toUpperCase()) || + (typeof value === "string" && value.toUpperCase().includes(searchText.toUpperCase())) + ); + })} + renderItem={({ item }) => ( + { + onPick(item.value); + navigation.pop(); + }}> + {item.title} + + )} + keyExtractor={(item) => item.value} + /> ) -} \ No newline at end of file +} + +const style = StyleSheet.create({ + description: { + marginTop: 35, + marginHorizontal: 10, + marginBottom: 35, + } +}); diff --git a/src/windows/InitProcess/Authentication.tsx b/src/windows/InitProcess/Authentication.tsx index edd2c4e7e..655243529 100644 --- a/src/windows/InitProcess/Authentication.tsx +++ b/src/windows/InitProcess/Authentication.tsx @@ -15,6 +15,7 @@ export default function Authentication() { const fingerprintEnabled = useStoreState((store) => store.security.fingerprintEnabled); const fingerprintStartScan = useStoreActions((store) => store.security.fingerprintStartScan); const fingerprintStopScan = useStoreActions((store) => store.security.fingerprintStopScan); + const biometricsSensor = useStoreState((store) => store.security.sensor); const loginMethods = useStoreState((store) => store.security.loginMethods); const startScan = useFingerprintAuth(async () => {}); @@ -40,7 +41,12 @@ export default function Authentication() { } {loginMethods.has(LoginMethods.fingerprint) && - + {biometricsSensor !== "Face ID" && + + } + {biometricsSensor === "Face ID" && + + } } {loginMethods.size === 0 && Error} diff --git a/src/windows/InitProcess/DEV_Commands.tsx b/src/windows/InitProcess/DEV_Commands.tsx index 38efdd5a2..154414806 100644 --- a/src/windows/InitProcess/DEV_Commands.tsx +++ b/src/windows/InitProcess/DEV_Commands.tsx @@ -1,17 +1,17 @@ import React, { useState } from "react"; -import { StyleSheet, StatusBar, NativeModules, ScrollView, DeviceEventEmitter } from "react-native"; +import { StyleSheet, StatusBar, NativeModules, ScrollView, DeviceEventEmitter, Alert, EventEmitter, NativeEventEmitter } from "react-native"; import Clipboard from "@react-native-community/clipboard"; import { Text, Button, Toast, Input, View, Container } from "native-base"; import Long from "long"; import { StackNavigationProp } from "@react-navigation/stack"; import * as base64 from "base64-js"; import * as Keychain from 'react-native-keychain'; - import Sound from "react-native-sound"; +import iCloudStorage from "react-native-icloudstore"; import { getTransactions, getTransaction, createTransaction, clearTransactions } from "../../storage/database/transaction"; import { useStoreState, useStoreActions } from "../../state/store"; -import { lnrpc } from "../../../proto/proto"; +import { invoicesrpc, lnrpc } from "../../../proto/proto"; import { sendCommand } from "../../lndmobile/utils"; import { getInfo, connectPeer, listPeers, decodePayReq, queryRoutes, checkStatus } from "../../lndmobile/index"; import { initWallet, genSeed, deriveKey, signMessage, derivePrivateKey } from "../../lndmobile/wallet"; @@ -26,14 +26,12 @@ import { blixtTheme } from "../../../native-base-theme/variables/commonColor"; import { LoginMethods } from "../../state/Security"; import Spinner from "../../components/Spinner"; - import secp256k1 from "secp256k1"; import { Hash as sha256Hash, HMAC as sha256HMAC } from "fast-sha256"; -import { bytesToString, bytesToHexString } from "../../utils"; +import { bytesToString, bytesToHexString, stringToUint8Array } from "../../utils"; import { ILightningServices } from "../../utils/lightning-services"; import { localNotification } from "../../utils/push-notification"; - - +import { ICLOUD_BACKUP_KEY } from "../../state/ICloudBackup"; interface IProps { navigation?: StackNavigationProp; @@ -72,7 +70,7 @@ export default function DEV_Commands({ navigation, continueCallback }: IProps) { console.log(await queryRoutes("03abf6f44c355dec0d5aa155bdbdd6e0c8fefe318eff402de65c6eb2e1be55dc3e")) }}>decode() @@ -247,6 +245,65 @@ export default function DEV_Commands({ navigation, continueCallback }: IProps) { console.log(localNotification("TEST NOTIFICATION")); }}>localNotification + iOS LndMobile: + + + + + + + + + + + + + + + + + Security: - {/* Dangerous: + Dangerous: - - */} + + App storage: @@ -296,17 +353,18 @@ export default function DEV_Commands({ navigation, continueCallback }: IProps) { + }}>LndMobileTools.DEBUG_getWalletPasswordFromKeychain() - + + - Sqlite: diff --git a/src/windows/Overview.tsx b/src/windows/Overview.tsx index 2d2b7d3e1..b2a401681 100644 --- a/src/windows/Overview.tsx +++ b/src/windows/Overview.tsx @@ -220,7 +220,7 @@ function Overview({ navigation }: IOverviewProps) { } - {Chain === "mainnet" && nodeInfo && nodeInfo.syncedToChain && experimentWeblnEnabled && + {nodeInfo && nodeInfo.syncedToChain && experimentWeblnEnabled && navigation.navigate("WebLNBrowser")} /> diff --git a/src/windows/Receive/ReceiveSetup.tsx b/src/windows/Receive/ReceiveSetup.tsx index ba4e035da..ed063adc8 100644 --- a/src/windows/Receive/ReceiveSetup.tsx +++ b/src/windows/Receive/ReceiveSetup.tsx @@ -11,7 +11,7 @@ import BlixtForm from "../../components/Form"; import { formatBitcoin, BitcoinUnits, IBitcoinUnits } from "../../utils/bitcoin-units"; import { blixtTheme } from "../../../native-base-theme/variables/commonColor"; import useBalance from "../../hooks/useBalance"; -import { MAX_SAT_INVOICE, PLATFORM } from "../../utils/constants"; +import { MATH_PAD_NATIVE_ID, MAX_SAT_INVOICE, PLATFORM } from "../../utils/constants"; import { toast } from "../../utils"; import { Keyboard } from "react-native"; import Container from "../../components/Container"; @@ -169,6 +169,7 @@ export default function ReceiveSetup({ navigation }: IReceiveSetupProps) { component: ( <> setMathPadVisible(false)} testID="input-amount-sat" onChangeText={onChangeBitcoinInput} placeholder="0" @@ -182,7 +183,7 @@ export default function ReceiveSetup({ navigation }: IReceiveSetupProps) { onBlur={() => { // setMathPadVisible(false); }} - inputAccessoryViewID="MATH_PAD" + inputAccessoryViewID={MATH_PAD_NATIVE_ID} /> @@ -193,7 +194,7 @@ export default function ReceiveSetup({ navigation }: IReceiveSetupProps) { component: ( <> setMathPadVisible(false)} + onSubmitEditing={() => setMathPadVisible(false)} onChangeText={onChangeFiatInput} placeholder="0.00" value={dollarValue !== undefined ? dollarValue.toString() : undefined} @@ -206,7 +207,7 @@ export default function ReceiveSetup({ navigation }: IReceiveSetupProps) { onBlur={() => { // setMathPadVisible(false); }} - inputAccessoryViewID="MATH_PAD" + inputAccessoryViewID={MATH_PAD_NATIVE_ID} /> @@ -270,7 +271,7 @@ export default function ReceiveSetup({ navigation }: IReceiveSetupProps) { addMathOperatorToInput("+"), onSubPress: () => addMathOperatorToInput("-"), onMulPress: () => addMathOperatorToInput("*"), diff --git a/src/windows/Send/SendConfirmation.tsx b/src/windows/Send/SendConfirmation.tsx index e417be2e7..09d053ad9 100644 --- a/src/windows/Send/SendConfirmation.tsx +++ b/src/windows/Send/SendConfirmation.tsx @@ -170,7 +170,7 @@ export default function SendConfirmation({ navigation, route }: ISendConfirmatio formItems.push({ key: "RECIPIENT", title: "Recipient", - component: (), + component: (), }); } else if (nodeInfo && nodeInfo.node && nodeInfo.node.alias) { diff --git a/src/windows/Send/SendDone.tsx b/src/windows/Send/SendDone.tsx index 0aa740151..62e8eaa9c 100644 --- a/src/windows/Send/SendDone.tsx +++ b/src/windows/Send/SendDone.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from "react"; +import React, { useState, useEffect, useRef } from "react"; import { View, Animated } from "react-native"; import { Text } from "native-base"; import { RouteProp } from "@react-navigation/native"; @@ -6,88 +6,61 @@ import { StackNavigationProp } from "@react-navigation/stack"; import * as Animatable from "react-native-animatable"; import { SendStackParamList } from "./index"; -import Svg, { G, Circle, Polyline, PolylineProps } from "react-native-svg"; +import Svg, { G, Circle, Polyline } from "react-native-svg"; import { blixtTheme } from "../../../native-base-theme/variables/commonColor"; import Container from "../../components/Container"; const AnimatedCircle = Animated.createAnimatedComponent(Circle); const AnimatedPolyline = Animated.createAnimatedComponent(Polyline); +const AnimatedText = Animatable.createAnimatableComponent(Text); -class CheckmarkCircle extends React.Component { - constructor(props) { - super(props); +// https://codepen.io/ottodevs/pen/BMmdMM - this.state = { circleRadius: new Animated.Value(55) }; +function CheckmarkCircle() { + const circleRadius = useRef(new Animated.Value(55)).current; - this.state.circleRadius.addListener((circleRadius) => { - if (this._myCircle) { - this._myCircle.setNativeProps({ r: circleRadius.value.toString() }); - } - }); + useEffect(() => { + Animated.spring(circleRadius, { + toValue: 80, + friction: 4.5, + useNativeDriver: true, + }).start(); + }, []); - setTimeout(() => { - Animated.spring(this.state.circleRadius, { - toValue: 80, - friction: 4.5, - useNativeDriver: true, - }).start(); - }, 1); - } - render() { - return ( - (this._myCircle = ref)} - cx="93" - cy="95" - r="45" - fill={blixtTheme.green} - /> - ); - } + return ( + + ); } -// tslint:disable-next-line: max-classes-per-file -class CheckmarkPolyline extends React.Component { - constructor(props) { - super(props); - - this.state = { strokeWidth: new Animated.Value(0) }; - - this.state.strokeWidth.addListener((strokeWidth) => { - if (this._myPolyline) { - this._myPolyline.setNativeProps({ - strokeWidth: strokeWidth.value.toString(), - }); - } - }); +function CheckmarkPolyline() { + const strokeWidth = useRef(new Animated.Value(0)).current; - setTimeout(() => { - Animated.spring(this.state.strokeWidth, { - toValue: 8, - friction: 4, - useNativeDriver: true, - }).start(); - }, 5); - } + useEffect(() => { + Animated.spring(strokeWidth, { + toValue: 8, + friction: 4, + useNativeDriver: true, + }).start(); + }, []); - render() { - // points="43.5,77.8 63.7,97.9 112.2,49.4" - return ( - (this._myPolyline = ref)} - strokeWidth={0} - strokeDasharray={[100, 100]} - strokeDashoffset={200} - stroke="#fff" - points="59.5,99.8 79.7,119.9 128.2,71.4" - /> - ); - } + return ( + + ); } -const AnimatedText = Animatable.createAnimatableComponent(Text); - export interface ISendConfirmationProps { navigation: StackNavigationProp; route: RouteProp; diff --git a/src/windows/Settings/ChangeFingerprintSettingsAuth.tsx b/src/windows/Settings/ChangeFingerprintSettingsAuth.tsx index 186e9aee8..2ea626c2a 100644 --- a/src/windows/Settings/ChangeFingerprintSettingsAuth.tsx +++ b/src/windows/Settings/ChangeFingerprintSettingsAuth.tsx @@ -1,16 +1,20 @@ import React, { useEffect } from "react"; import { StyleSheet, StatusBar, AppState, AppStateStatus } from "react-native"; -import { Container, Content, View, Text, Icon } from "native-base"; +import { Container, View, Text, Icon } from "native-base"; import { useNavigation } from "@react-navigation/native"; import { useStoreActions, useStoreState, } from "../../state/store"; import { blixtTheme } from "../../../native-base-theme/variables/commonColor"; import useFingerprintAuth from "../../hooks/useFingerprintAuth"; +import { PLATFORM } from "../../utils/constants"; +import { getStatusBarHeight } from "react-native-status-bar-height"; +import BlixtContent from "../../components/Content"; export default function ChangeFingerprintSettingsAuth() { const navigation = useNavigation(); const setFingerprintEnabled = useStoreActions((store) => store.security.setFingerprintEnabled); const fingerPrintEnabled = useStoreState((store) => store.security.fingerprintEnabled); + const sensor = useStoreState((store) => store.security.sensor); const startScan = useFingerprintAuth(async () => { navigation.goBack(); await setFingerprintEnabled(!fingerPrintEnabled); @@ -18,12 +22,28 @@ export default function ChangeFingerprintSettingsAuth() { return ( - - Authenticate to change fingerprint settings - - + + Authenticate to change biometrics settings + + {sensor !== "Face ID" && + + } + {sensor === "Face ID" && + + } - + + {PLATFORM === "ios" && + navigation.goBack()} + /> + } ) } diff --git a/src/windows/Settings/LightningPeers.tsx b/src/windows/Settings/LightningPeers.tsx new file mode 100644 index 000000000..f4af0e3ac --- /dev/null +++ b/src/windows/Settings/LightningPeers.tsx @@ -0,0 +1,217 @@ +import React, { useEffect, useLayoutEffect } from "react"; +import { Body, Button, Card, CardItem, Icon, Left, Right, Row, Text } from "native-base"; +import { Image, StyleSheet } from "react-native"; +import { StackNavigationProp } from "@react-navigation/stack"; +import { RouteProp } from "@react-navigation/native"; +import Long from "long"; + +import Container from "../../components/Container"; +import BlixtContent from "../../components/Content"; +import { useStoreActions, useStoreState } from "../../state/store"; +import { NavigationButton } from "../../components/NavigationButton"; +import { identifyService, lightningServices } from "../../utils/lightning-services"; +import { timeout } from "../../utils"; +import { SettingsStackParamList } from "./index"; +import { lnrpc } from "../../../proto/proto"; + +export interface ISelectListProps { + navigation: StackNavigationProp; + route: RouteProp; +} + +export default function({ navigation }: ISelectListProps) { + const rpcReady = useStoreState((store) => store.lightning.rpcReady); + const syncedToChain = useStoreState((store) => store.lightning.syncedToChain); + const lightningPeers = useStoreState((store) => store.lightning.lightningPeers); + const getLightningPeers = useStoreActions((store) => store.lightning.getLightningPeers); + const disconnectPeer = useStoreActions((store) => store.lightning.disconnectPeer); + + useEffect(() => { + console.log("useeffect"); + if (rpcReady && syncedToChain) { + (async () => { + await timeout(2000) + await getLightningPeers(); + })(); + } + }, [getLightningPeers, rpcReady, syncedToChain]); + + useLayoutEffect(() => { + navigation.setOptions({ + headerTitle: "Lightning Peers", + headerShown: true, + headerRight: () => { + return ( + rpcReady && await getLightningPeers()}> + + + ) + } + }); + }, [navigation]); + + const close = async (pubkey: string) => { + await disconnectPeer(pubkey); + await getLightningPeers(); + }; + + return ( + + + {lightningPeers.map((peer) => { + const serviceKey = identifyService(peer.peer.pubKey, "", null); + let service; + if (lightningServices[serviceKey!]) { + service = lightningServices[serviceKey!]; + } + + return ( + + + + + + Node alias + + + + {peer.node?.alias} + + {service && + + } + + + + + Node public key + + + {peer.peer.pubKey} + + + + + Node address + + + {peer.peer.address} + + + + + Data + + + + {Long.fromValue(peer.peer.bytesSent).toString()} bytes sent{"\n"} + {Long.fromValue(peer.peer.bytesSent).toString()} byes received + + + + + + Transfer + + + + {Long.fromValue(peer.peer.satSent).toString()} sat sent{"\n"} + {Long.fromValue(peer.peer.satRecv).toString()} sat received + + + + + + Inbound + + + + {peer.peer.inbound ? "true" : "false"} + + + + {/* + + Ping time + + + + {Long.fromValue(peer.peer.pingTime).divtoString()} + + + */} + + + Sync type + + + + {getPeerSyncType(peer.peer.syncType)} + + + + {peer.peer.errors.length > 0 && + + + Errors + + + + {(peer.peer.errors.map((error) => ( + + {error.error}{"\n"} + + )))} + + + + } + + + + + + + + + ); + })} + + + ) +} + +const style = StyleSheet.create({ + nodeImage: { + width: 320, + height: 320, + borderRadius: 22, + marginLeft: 10, + marginBottom: 4, + }, + card: { + width: "100%", + marginTop: 8, + }, + cardDataText: { + textAlign: "right", + } +}) + +function getPeerSyncType(type: lnrpc.Peer.SyncType) { + if (type === lnrpc.Peer.SyncType.UNKNOWN_SYNC) { + return "UNKNOWN_SYNC" + } else if (type === lnrpc.Peer.SyncType.ACTIVE_SYNC) { + return "ACTIVE_SYNC" + } else if (type === lnrpc.Peer.SyncType.PASSIVE_SYNC) { + return "PASSIVE_SYNC" + } + return "UNKNOWN"; +} \ No newline at end of file diff --git a/src/windows/Settings/LndMobileHelpCenter.tsx b/src/windows/Settings/LndMobileHelpCenter.tsx index 4042d44d5..46cc89ad7 100644 --- a/src/windows/Settings/LndMobileHelpCenter.tsx +++ b/src/windows/Settings/LndMobileHelpCenter.tsx @@ -33,7 +33,7 @@ export default function LndMobileHelpCenter({ navigation }) { setLndLog(lndLog.slice(0)); }); - NativeModules.LndMobile.observeLndLogFile(); + NativeModules.LndMobileTools.observeLndLogFile(); return () => { listener.remove(); @@ -43,7 +43,7 @@ export default function LndMobileHelpCenter({ navigation }) { const steps = [{ title: "Check LndMobileService process exist", async exec () { - const r = await NativeModules.LndMobile.checkLndProcessExist(); + const r = await NativeModules.LndMobileTools.checkLndProcessExist(); return r; } },{ @@ -170,7 +170,7 @@ export default function LndMobileHelpCenter({ navigation }) { const runSigKill = async () => { try { - const result = await NativeModules.LndMobile.killLnd(); + const result = await NativeModules.LndMobileTools.killLnd(); toast("Result: " + JSON.stringify(result), 0, "success", "OK"); } catch (e) { toast("Error: " + e.message, 0, "danger", "OK"); diff --git a/src/windows/Settings/Settings.tsx b/src/windows/Settings/Settings.tsx index 054887ae2..47b8b3516 100644 --- a/src/windows/Settings/Settings.tsx +++ b/src/windows/Settings/Settings.tsx @@ -9,20 +9,20 @@ import DialogAndroid from "react-native-dialogs"; import { fromUnixTime } from "date-fns"; import { StackNavigationProp } from "@react-navigation/stack"; - import { SettingsStackParamList } from "./index"; import Content from "../../components/Content"; import { useStoreActions, useStoreState } from "../../state/store"; import { LoginMethods } from "../../state/Security"; import { BitcoinUnits, IBitcoinUnits } from "../../utils/bitcoin-units"; import { verifyChanBackup } from "../../lndmobile/channel"; -import { camelCaseToSpace, formatISO, toast } from "../../utils"; +import { camelCaseToSpace, formatISO, timeout, toast } from "../../utils"; import { MapStyle } from "../../utils/google-maps"; import { Chain } from "../../utils/build"; import { OnchainExplorer } from "../../state/Settings"; import TorSvg from "./TorSvg"; import { PLATFORM } from "../../utils/constants"; import { IFiatRates } from "../../state/Fiat"; +import BlixtWallet from "../../components/BlixtWallet"; interface ISettingsProps { navigation: StackNavigationProp; @@ -46,6 +46,7 @@ export default function Settings({ navigation }: ISettingsProps) { // Fingerprint const fingerprintAvailable = useStoreState((store) => store.security.fingerprintAvailable); const fingerPrintEnabled = useStoreState((store) => store.security.fingerprintEnabled); + const biometricsSensor = useStoreState((store) => store.security.sensor); const onToggleFingerprintPress = async () => { navigation.navigate("ChangeFingerprintSettingsAuth"); } @@ -207,14 +208,16 @@ export default function Settings({ navigation }: ISettingsProps) { const checkInvoice = useStoreActions((store) => store.clipboardManager.checkInvoice); const onToggleClipBoardInvoiceCheck = async () => { await changeClipboardInvoiceCheckEnabled(!clipboardInvoiceCheckEnabled); - const clipboardText = await Clipboard.getString(); - await checkInvoice(clipboardText); + if (!clipboardInvoiceCheckEnabled) { + const clipboardText = await Clipboard.getString(); + await checkInvoice(clipboardText); + } }; // Copy log const copyLog = async () => { try { - await NativeModules.LndMobile.copyLndLog(); + await NativeModules.LndMobileTools.copyLndLog(); toast("Copied lnd log file.", undefined, "warning"); } catch (e) { console.error(e); @@ -227,7 +230,9 @@ export default function Settings({ navigation }: ISettingsProps) { const onExportChannelsPress = async () => { try { const response = await exportChannelsBackup(); - toast(`File written:\n ${response}`, 10000, "warning"); + if (PLATFORM === "android") { + toast(`File written:\n ${response}`, 10000, "warning"); + } } catch (e) { console.log(e); toast(e.message, 10000, "danger"); @@ -251,7 +256,6 @@ export default function Settings({ navigation }: ISettingsProps) { const workInfo = useStoreState((store) => store.scheduledSync.workInfo); const lastScheduledSync = useStoreState((store) => store.scheduledSync.lastScheduledSync); const lastScheduledSyncAttempt = useStoreState((store) => store.scheduledSync.lastScheduledSyncAttempt); - console.log(workInfo, lastScheduledSync, lastScheduledSyncAttempt); const scheduledSyncEnabled = useStoreState((store) => store.settings.scheduledSyncEnabled); const changeScheduledSyncEnabled = useStoreActions((store) => store.settings.changeScheduledSyncEnabled); @@ -312,6 +316,27 @@ export default function Settings({ navigation }: ISettingsProps) { } } + const iCloudBackupEnabled = useStoreState((store) => store.settings.iCloudBackupEnabled); + const changeICloudBackupEnabled = useStoreActions((store) => store.settings.changeICloudBackupEnabled); + const iCloudMakeBackup = useStoreActions((store) => store.iCloudBackup.makeBackup); + const onToggleICloudBackup = async () => { + if (!iCloudBackupEnabled) { + await iCloudMakeBackup(); + } + await changeICloudBackupEnabled(!iCloudBackupEnabled); + toast(`iCloud backup ${iCloudBackupEnabled ? "disabled" : "enabled"}`); + }; + + const onDoICloudBackupPress = async () => { + try { + await iCloudMakeBackup(); + toast("Backed up channels to iCloud"); + } + catch (e) { + toast(`Error backup up: ${e.message}`, 10000, "danger"); + } + } + // Transaction geolocation const transactionGeolocationEnabled = useStoreState((store) => store.settings.transactionGeolocationEnabled); const changeTransactionGeolocationEnabled = useStoreActions((store) => store.settings.changeTransactionGeolocationEnabled); @@ -371,38 +396,60 @@ export default function Settings({ navigation }: ISettingsProps) { // Inbound services list const onInboundServiceListPress = async () => { - interface ShowPickerResult { - selectedItem: { - id: "LNBIG" | "BITREFILL_THOR"; - label: "LN Big" | "Bitrefill Thor"; - } | undefined; - } - const { selectedItem }: ShowPickerResult = await DialogAndroid.showPicker(null, null, { - title: "Incoming channel provider", - content: -`Choose an incoming channel provider and press Continue. + const goToSite = async (selectedItem: "LNBIG" | "BITREFILL_THOR") => { + if (selectedItem === "LNBIG") { + await Linking.openURL("https://lnbig.com/"); + } else if (selectedItem === "BITREFILL_THOR") { + await Linking.openURL("https://embed.bitrefill.com/buy/lightning"); + } + }; + + const description = `Choose an incoming channel provider and press Continue. Your web browser will be opened to the corresponding provider's website, where you will be able to request a channel. -When you're done, you can copy the address code and/or open the link using Blixt Wallet.`, - positiveText: "Continue", - negativeText: "Cancel", - type: DialogAndroid.listRadio, - items: [{ - id: "LNBIG", - label: "LN Big" - }, { - id: "BITREFILL_THOR", - label: "Bitrefill Thor" - }], - }); +When you're done, you can copy the address code and/or open the link using Blixt Wallet.` - if (selectedItem) { - if (selectedItem.id === "LNBIG") { - await Linking.openURL("https://lnbig.com/"); - } else if (selectedItem.id === "BITREFILL_THOR") { - await Linking.openURL("https://embed.bitrefill.com/buy/lightning"); + if (PLATFORM === "android") { + interface ShowPickerResult { + selectedItem: { + id: "LNBIG" | "BITREFILL_THOR"; + label: "LN Big" | "Bitrefill Thor"; + } | undefined; } + const { selectedItem }: ShowPickerResult = await DialogAndroid.showPicker(null, null, { + title: "Incoming channel provider", + content: description, + positiveText: "Continue", + negativeText: "Cancel", + type: DialogAndroid.listRadio, + items: [{ + id: "LNBIG", + label: "LN Big" + }, { + id: "BITREFILL_THOR", + label: "Bitrefill Thor" + }], + }); + + if (selectedItem) { + await goToSite(selectedItem.id); + } + } else { + navigation.navigate("ChannelProvider", { + title: "Incoming channel provider", + description, + data: [{ + title: "LN Big", + value: "LNBIG", + }, { + title: "Bitrefill Thor", + value: "BITREFILL_THOR", + }], + onPick: async (selectedItem) => { + goToSite(selectedItem as any) + } + }); } } @@ -482,11 +529,11 @@ Do you wish to proceed?`; await changeTorEnabled(!torEnabled); try { await NativeModules.LndMobile.stopLnd(); - await NativeModules.LndMobile.killLnd(); + await NativeModules.LndMobileTools.killLnd(); } catch(e) { console.log(e); } - NativeModules.LndMobile.restartApp(); + NativeModules.LndMobileTools.restartApp(); }, } ]); @@ -515,6 +562,8 @@ Do you wish to proceed?`; return ( + + General @@ -587,14 +636,12 @@ Do you wish to proceed?`; } } - {PLATFORM === "android" && - - - - Export channel backup - - - } + + + + Export channel backup + + {(PLATFORM === "android" && (name === "Hampus" || __DEV__ === true)) && @@ -619,6 +666,22 @@ Do you wish to proceed?`; Manually trigger Google Drive Backup } + {PLATFORM == "ios" && + + + + iCloud channel backup + Automatically backup channels to iCloud + + + + } + {iCloudBackupEnabled && + + + Manually trigger iCloud Backup + + } Security @@ -631,8 +694,22 @@ Do you wish to proceed?`; {fingerprintAvailable && - - Login with fingerprint + + {biometricsSensor !== "Face ID" && + + } + {biometricsSensor === "Face ID" && + + } + + + + Login with{" "} + {biometricsSensor === "Biometrics" && "fingerprint"} + {biometricsSensor === "Face ID" && "Face ID"} + {biometricsSensor === "Touch ID" && "Touch ID"} + + } @@ -701,9 +778,13 @@ Do you wish to proceed?`; navigation.navigate("LightningNodeInfo")}> - + Show node data + navigation.navigate("LightningPeers")}> + + Show Lightning peers + Automatically open channels @@ -762,7 +843,7 @@ Do you wish to proceed?`; - {Chain === "mainnet" && + {(Chain === "mainnet" || Chain === "regtest") && <> Experiments @@ -822,13 +903,15 @@ Do you wish to proceed?`; } - { - const logLines = await NativeModules.LndMobile.tailLog(30); - Alert.alert("Log", logLines); - }}> - - Read lnd log - + {PLATFORM === "android" && + { + const logLines = await NativeModules.LndMobileTools.tailLog(30); + Alert.alert("Log", logLines); + }}> + + Read lnd log + + } {(PLATFORM === "android" && (name === "Hampus" || __DEV__ === true)) && <> navigation.navigate("KeysendTest")}> diff --git a/src/windows/Settings/index.tsx b/src/windows/Settings/index.tsx index 3d68433d7..26202fa5f 100644 --- a/src/windows/Settings/index.tsx +++ b/src/windows/Settings/index.tsx @@ -13,6 +13,7 @@ import useStackNavigationOptions from "../../hooks/useStackNavigationOptions"; import SelectList, { ISelectListNavigationProps } from "../HelperWindows/SelectList"; import { IFiatRates } from "../../state/Fiat"; import { OnchainExplorer } from "../../state/Settings"; +import LightningPeers from "./LightningPeers"; const Stack = createStackNavigator(); @@ -28,6 +29,8 @@ export type SettingsStackParamList = { ChangeBitcoinUnit: ISelectListNavigationProps; ChangeFiatUnit: ISelectListNavigationProps; ChangeOnchainExplorer: ISelectListNavigationProps; + LightningPeers: undefined; + ChannelProvider: ISelectListNavigationProps; } export default function SettingsIndex() { @@ -49,6 +52,8 @@ export default function SettingsIndex() { + + ); } diff --git a/src/windows/WebLN/Browser.tsx b/src/windows/WebLN/Browser.tsx index 27b5d6de3..0b0f6ad1e 100644 --- a/src/windows/WebLN/Browser.tsx +++ b/src/windows/WebLN/Browser.tsx @@ -115,10 +115,16 @@ export default function WebLNBrowser({ navigation, route }: IBrowserProps) { }, { text: "No", }]) - } + }; + + const onLongPressHome = () => { + if (PLATFORM === "ios" ) { + ToastAndroid.show("Go back to store list", ToastAndroid.SHORT); + } + }; return ( - + - setUrl(INITIAL_URL)} onLongPress={() => ToastAndroid.show("Go back to store list", ToastAndroid.SHORT)}> + setUrl(INITIAL_URL)} onLongPress={() => onLongPressHome()}> {PLATFORM === "ios" && @@ -202,7 +208,7 @@ const style = StyleSheet.create({ }, card: { marginTop: (StatusBar.currentHeight ?? 0) + getStatusBarHeight(true) + 8, - marginBottom: 12 + (PLATFORM === "ios" ? 10 : 0), + marginBottom: 12 + (PLATFORM === "ios" ? 7 : 0), marginLeft: 9, marginRight: 9, paddingTop: 8, diff --git a/src/windows/Welcome/AlmostDone.tsx b/src/windows/Welcome/AlmostDone.tsx index 114e9d980..b5c17c7cc 100644 --- a/src/windows/Welcome/AlmostDone.tsx +++ b/src/windows/Welcome/AlmostDone.tsx @@ -63,6 +63,7 @@ const AlmostDone = ({ navigation }: IProps) => { // Fingerprint const fingerprintAvailable = useStoreState((store) => store.security.fingerprintAvailable); const fingerPrintEnabled = useStoreState((store) => store.security.fingerprintEnabled); + const biometricsSensor = useStoreState((store) => store.security.sensor); const onToggleFingerprintPress = async () => { navigation.navigate("ChangeFingerprintSettingsAuth"); } @@ -161,8 +162,22 @@ const AlmostDone = ({ navigation }: IProps) => { {fingerprintAvailable && - - Login with fingerprint + + {biometricsSensor !== "Face ID" && + + } + {biometricsSensor === "Face ID" && + + } + + + + Login with{" "} + {biometricsSensor === "Biometrics" && "fingerprint"} + {biometricsSensor === "Face ID" && "Face ID"} + {biometricsSensor === "Touch ID" && "Touch ID"} + + } diff --git a/src/windows/Welcome/Confirm.tsx b/src/windows/Welcome/Confirm.tsx index 68344d3ca..cfa99a565 100644 --- a/src/windows/Welcome/Confirm.tsx +++ b/src/windows/Welcome/Confirm.tsx @@ -65,6 +65,8 @@ export default function Confirm({ navigation }: IProps) { if (PLATFORM === "android") { navigation.replace("GoogleDriveBackup"); + } else if (PLATFORM === "ios") { + navigation.replace("ICloudBackup"); } else { navigation.replace("AlmostDone") } diff --git a/src/windows/Welcome/GoogleDriveBackup.tsx b/src/windows/Welcome/GoogleDriveBackup.tsx index d5094558b..1514de555 100644 --- a/src/windows/Welcome/GoogleDriveBackup.tsx +++ b/src/windows/Welcome/GoogleDriveBackup.tsx @@ -43,7 +43,7 @@ export default function GoogleDriveBackup({ navigation }: IProps) { {!googleDriveBackupEnabled && - diff --git a/src/windows/Welcome/ICloudBackup.tsx b/src/windows/Welcome/ICloudBackup.tsx new file mode 100644 index 000000000..1f9c58b08 --- /dev/null +++ b/src/windows/Welcome/ICloudBackup.tsx @@ -0,0 +1,93 @@ +import React from "react"; +import { StatusBar, StyleSheet, } from "react-native"; +import { Icon, Text, View, Button, H1 } from "native-base"; +import { StackNavigationProp } from "@react-navigation/stack"; + +import { WelcomeStackParamList } from "./index"; +import { useStoreState, useStoreActions } from "../../state/store"; +import style from "./style"; +import Container from "../../components/Container"; + +interface IProps { + navigation: StackNavigationProp; +} +export default function ICloudBackup({ navigation }: IProps) { + const iCloudBackupEnabled = useStoreState((store) => store.settings.iCloudBackupEnabled); + const changeICloudBackupEnabled = useStoreActions((store) => store.settings.changeICloudBackupEnabled); + const iCloudMakeBackup = useStoreActions((store) => store.iCloudBackup.makeBackup); + const onPressICloudBackup = async () => { + await iCloudMakeBackup(); + await changeICloudBackupEnabled(true); + }; + + const onPressContinue = () => { + navigation.replace("AlmostDone"); + }; + + return ( + + + ); +} + +const extraStyle = StyleSheet.create({ + list: { + paddingTop: 12, + marginBottom: 48, + }, + listItem: { + paddingLeft: 8, + paddingRight: 8, + // paddingLeft: 24, + // paddingRight: 24, + }, + itemHeader: { + paddingLeft: 8, + paddingRight: 8, + // paddingRight: 24, + // paddingLeft: 24, + paddingTop: 24, + paddingBottom: 16, + }, + icon: { + fontSize: 22, + }, +}); diff --git a/src/windows/Welcome/Restore.tsx b/src/windows/Welcome/Restore.tsx index be745c1f9..4029544f7 100644 --- a/src/windows/Welcome/Restore.tsx +++ b/src/windows/Welcome/Restore.tsx @@ -21,14 +21,16 @@ interface IProps { export default function Restore({ navigation }: IProps) { const [loading, setLoading] = useState(false); const [seedText, setSeedText] = useState(""); - const [backupType, setBackupType] = useState<"file" | "google_drive" | "none">("none"); + const [backupType, setBackupType] = useState<"file" | "google_drive" | "icloud" | "none">("none"); const [backupFile, setBackupFile] = useState(null); const [b64Backup, setB64Backup] = useState(null); const setWalletSeed = useStoreActions((store) => store.setWalletSeed); const createWallet = useStoreActions((store) => store.createWallet); const isSignedInGoogle = useStoreState((store) => store.google.isSignedIn); const signInGoogle = useStoreActions((store) => store.google.signIn); - const getBackupFile = useStoreActions((store => store.googleDriveBackup.getBackupFile)); + const googleDriveGetBackupFile = useStoreActions((store => store.googleDriveBackup.getBackupFile)); + const iCloudGetBackup = useStoreActions((store => store.iCloudBackup.getBackup)); + const iCloudActive = useStoreState((store) => store.iCloudBackup.iCloudActive); const setSyncEnabled = useStoreActions((state) => state.scheduledSync.setSyncEnabled); const changeScheduledSyncEnabled = useStoreActions((state) => state.settings.changeScheduledSyncEnabled); @@ -53,11 +55,11 @@ export default function Restore({ navigation }: IProps) { if (backupType === "file") { if (backupFile) { - const backupBase64 = await readFile(backupFile.uri, "base64"); + const backupBase64 = await readFile(backupFile.uri, PLATFORM === "android" ? "base64" : undefined); createWalletOpts.restore!.channelsBackup = backupBase64; } } - else if (backupType === "google_drive") { + else if (backupType === "google_drive" || backupType === "icloud") { createWalletOpts.restore!.channelsBackup = b64Backup!; } @@ -87,12 +89,23 @@ export default function Restore({ navigation }: IProps) { } try { - const base64Backup = await getBackupFile(); + const base64Backup = await googleDriveGetBackupFile(); console.log(base64Backup); setB64Backup(base64Backup); setBackupType("google_drive"); } catch (e) { - window.alert(`Restoring via Google Drive failed:\n\n${e.message}`); + Alert.alert(`Restoring via Google Drive failed:\n\n${e.message}`); + } + }; + + const iCloudBackup = async () => { + try { + const base64Backup = await iCloudGetBackup() + console.log(base64Backup); + setB64Backup(base64Backup); + setBackupType("icloud"); + } catch (e) { + Alert.alert(`Restoring via iClouod failed:\n\n${e.message}`); } }; @@ -153,6 +166,13 @@ export default function Restore({ navigation }: IProps) { } + {(PLATFORM === "ios" && iCloudActive) && + + } } {backupType === "file" && @@ -175,6 +195,16 @@ export default function Restore({ navigation }: IProps) { } + {backupType === "icloud" && + + Backup via iCloud + + + } diff --git a/src/windows/Welcome/Start.tsx b/src/windows/Welcome/Start.tsx index 447bc2975..af049ce06 100644 --- a/src/windows/Welcome/Start.tsx +++ b/src/windows/Welcome/Start.tsx @@ -99,11 +99,11 @@ There is currently no WatchTower support to watch your channels while you are of menu.current.hide(); try { // await NativeModules.LndMobile.stopLnd(); - await NativeModules.LndMobile.killLnd(); + await NativeModules.LndMobileTools.killLnd(); } catch(e) { console.log(e); } - NativeModules.LndMobile.restartApp(); + NativeModules.LndMobileTools.restartApp(); } return ( diff --git a/src/windows/Welcome/index.tsx b/src/windows/Welcome/index.tsx index aa4650c72..c2820eced 100644 --- a/src/windows/Welcome/index.tsx +++ b/src/windows/Welcome/index.tsx @@ -6,6 +6,7 @@ import Seed from "./Seed"; import Confirm from "./Confirm"; import AlmostDone from "./AlmostDone"; import GoogleDriveBackup from "./GoogleDriveBackup"; +import ICloudBackup from "./ICloudBackup"; import Restore from "./Restore"; @@ -20,6 +21,7 @@ export type WelcomeStackParamList = { Seed: undefined; Confirm: undefined; GoogleDriveBackup: undefined; + ICloudBackup: undefined; AlmostDone: undefined; Restore: undefined; @@ -44,6 +46,7 @@ export default function WelcomeIndex() { + diff --git a/tests/react/windows/__snapshots__/Receive.test.tsx.snap b/tests/react/windows/__snapshots__/Receive.test.tsx.snap index 9db4e91e7..6f72a50b3 100644 --- a/tests/react/windows/__snapshots__/Receive.test.tsx.snap +++ b/tests/react/windows/__snapshots__/Receive.test.tsx.snap @@ -514,11 +514,11 @@ exports[`renders correctly 1`] = ` - diff --git a/yarn.lock b/yarn.lock index 03baa3a93..3bd9e8587 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,7 +16,35 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/core@7.12.7", "@babel/core@^7.0.0": +"@babel/code-frame@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/core@7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.12.10" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helpers" "^7.12.5" + "@babel/parser" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/core@^7.0.0": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.7.tgz" integrity sha512-tRKx9B53kJe8NCGGIxEQb2Bkr0riUIEuN7Sc1fxhs5H8lKlCWUvQCSNMVIB0Meva7hcbCRJ76de15KoLltdoqw== @@ -70,12 +98,12 @@ lodash "^4.17.13" source-map "^0.5.0" -"@babel/generator@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.0.tgz" - integrity sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ== +"@babel/generator@^7.12.10", "@babel/generator@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" + integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== dependencies: - "@babel/types" "^7.11.0" + "@babel/types" "^7.12.11" jsesc "^2.5.1" source-map "^0.5.0" @@ -88,13 +116,6 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz" - integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== - dependencies: - "@babel/types" "^7.10.4" - "@babel/helper-annotate-as-pure@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz" @@ -183,6 +204,15 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-function-name@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" + integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/types" "^7.12.11" + "@babel/helper-get-function-arity@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz" @@ -197,6 +227,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-get-function-arity@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== + dependencies: + "@babel/types" "^7.12.10" + "@babel/helper-member-expression-to-functions@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz" @@ -211,13 +248,6 @@ dependencies: "@babel/types" "^7.12.1" -"@babel/helper-module-imports@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz" - integrity sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw== - dependencies: - "@babel/types" "^7.10.4" - "@babel/helper-module-imports@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz" @@ -351,6 +381,13 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-split-export-declaration@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" + integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== + dependencies: + "@babel/types" "^7.12.11" + "@babel/helper-validator-identifier@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz" @@ -361,6 +398,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + "@babel/helper-wrap-function@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.1.tgz" @@ -417,10 +459,10 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.4.tgz" integrity sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA== -"@babel/parser@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.0.tgz" - integrity sha512-qvRvi4oI8xii8NllyEc4MDJjuZiNaRzyb7Y7lup1NqJV8TZHF4O27CcP+72WPn/k1zkgJ6WJfnIbk4jTsVAZHw== +"@babel/parser@^7.12.10", "@babel/parser@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" + integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== "@babel/parser@^7.12.5": version "7.12.5" @@ -859,14 +901,6 @@ pirates "^4.0.0" source-map-support "^0.5.16" -"@babel/runtime-corejs2@^7.4.5": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.11.2.tgz" - integrity sha512-AC/ciV28adSSpEkBglONBWq4/Lvm6GAZuxIoyVtsnUpZMl0bxLtoChEnYAkP+47KyOCayZanojtflUEUJtR/6Q== - dependencies: - core-js "^2.6.5" - regenerator-runtime "^0.13.4" - "@babel/runtime@7.12.5": version "7.12.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz" @@ -874,7 +908,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.7": +"@babel/runtime@^7.0.0": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz" integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== @@ -945,6 +979,21 @@ globals "^11.1.0" lodash "^4.17.19" +"@babel/traverse@^7.12.10": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" + integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== + dependencies: + "@babel/code-frame" "^7.12.11" + "@babel/generator" "^7.12.11" + "@babel/helper-function-name" "^7.12.11" + "@babel/helper-split-export-declaration" "^7.12.11" + "@babel/parser" "^7.12.11" + "@babel/types" "^7.12.12" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + "@babel/traverse@^7.12.7": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.7.tgz" @@ -960,21 +1009,6 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/traverse@^7.4.5": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz" - integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.11.0" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.11.0" - "@babel/types" "^7.11.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - "@babel/types@^7.0.0", "@babel/types@^7.10.1", "@babel/types@^7.10.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.10.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.2.tgz" @@ -1011,6 +1045,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" + integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + "@babel/types@^7.12.7": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz" @@ -1055,106 +1098,6 @@ dependencies: "@types/hammerjs" "^2.0.36" -"@electron/get@^1.0.1": - version "1.12.2" - resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.12.2.tgz" - integrity sha512-vAuHUbfvBQpYTJ5wB7uVIDq5c/Ry0fiTBMs7lnEYAo/qXXppIVcWdfBr57u6eRnKdVso7KSiH6p/LbQAG6Izrg== - dependencies: - debug "^4.1.1" - env-paths "^2.2.0" - fs-extra "^8.1.0" - got "^9.6.0" - progress "^2.0.3" - sanitize-filename "^1.6.2" - sumchecker "^3.0.1" - optionalDependencies: - global-agent "^2.0.2" - global-tunnel-ng "^2.7.1" - -"@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9": - version "10.0.29" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz" - integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ== - dependencies: - "@emotion/sheet" "0.9.4" - "@emotion/stylis" "0.8.5" - "@emotion/utils" "0.11.3" - "@emotion/weak-memoize" "0.2.5" - -"@emotion/core@^10.0.9": - version "10.0.35" - resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.35.tgz" - integrity sha512-sH++vJCdk025fBlRZSAhkRlSUoqSqgCzYf5fMOmqqi3bM6how+sQpg3hkgJonj8GxXM4WbD7dRO+4tegDB9fUw== - dependencies: - "@babel/runtime" "^7.5.5" - "@emotion/cache" "^10.0.27" - "@emotion/css" "^10.0.27" - "@emotion/serialize" "^0.11.15" - "@emotion/sheet" "0.9.4" - "@emotion/utils" "0.11.3" - -"@emotion/css@^10.0.27", "@emotion/css@^10.0.9": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz" - integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== - dependencies: - "@emotion/serialize" "^0.11.15" - "@emotion/utils" "0.11.3" - babel-plugin-emotion "^10.0.27" - -"@emotion/hash@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz" - integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== - -"@emotion/is-prop-valid@^0.8.8": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz" - integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== - dependencies: - "@emotion/memoize" "0.7.4" - -"@emotion/memoize@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz" - integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== - -"@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16": - version "0.11.16" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz" - integrity sha512-G3J4o8by0VRrO+PFeSc3js2myYNOXVJ3Ya+RGVxnshRYgsvErfAOglKAiy1Eo1vhzxqtUvjCyS5gtewzkmvSSg== - dependencies: - "@emotion/hash" "0.8.0" - "@emotion/memoize" "0.7.4" - "@emotion/unitless" "0.7.5" - "@emotion/utils" "0.11.3" - csstype "^2.5.7" - -"@emotion/sheet@0.9.4": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz" - integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== - -"@emotion/stylis@0.8.5", "@emotion/stylis@^0.8.4": - version "0.8.5" - resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz" - integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== - -"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4": - version "0.7.5" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz" - integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== - -"@emotion/utils@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz" - integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== - -"@emotion/weak-memoize@0.2.5": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz" - integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== - "@fimbul/bifrost@^0.21.0": version "0.21.0" resolved "https://registry.yarnpkg.com/@fimbul/bifrost/-/bifrost-0.21.0.tgz" @@ -1741,11 +1684,6 @@ color "^3.1.3" react-native-iphone-x-helper "^1.3.0" -"@sindresorhus/is@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== - "@sinonjs/commons@^1.7.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.0.tgz" @@ -1760,13 +1698,6 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - dependencies: - defer-to-connect "^1.0.1" - "@testing-library/react-native@7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@testing-library/react-native/-/react-native-7.1.0.tgz" @@ -1830,11 +1761,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/base16@*", "@types/base16@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@types/base16/-/base16-1.0.2.tgz" - integrity sha512-oYO/U4VD1DavwrKuCSQWdLG+5K22SLPem2OQaHmFcQuwHoVeGC+JGVRji2MUqZUAIQZHEonOeVfAX09hYiLsdg== - "@types/base64-js@1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@types/base64-js/-/base64-js-1.3.0.tgz" @@ -1885,11 +1811,6 @@ resolved "https://registry.yarnpkg.com/@types/crypto-js/-/crypto-js-4.0.1.tgz" integrity sha512-6+OPzqhKX/cx5xh+yO8Cqg3u3alrkhoxhE5ZOdSEv0DOzJ13lwJ6laqGU0Kv6+XDMFmlnGId04LtY22PsFLQUw== -"@types/dragula@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@types/dragula/-/dragula-3.7.0.tgz" - integrity sha512-Scr3lQ7pDmwic+I4qrzDEIfPVGUhc/qo8S0VJJ9v5pzTyIIJzAXrnFajjsMSL8J84VERIkZUh7wH6wYEisY+TA== - "@types/filesystem@*": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.29.tgz" @@ -1941,33 +1862,14 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.0.15": - version "26.0.15" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.15.tgz" - integrity sha512-s2VMReFXRg9XXxV+CW9e5Nz8fH2K1aEhwgjUqPPbQd7g95T0laAcvLv032EhFHIa5GHsZ8W7iJEQVaJq6k3Gog== +"@types/jest@26.0.19": + version "26.0.19" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.19.tgz#e6fa1e3def5842ec85045bd5210e9bb8289de790" + integrity sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/lodash.curry@^4.1.6": - version "4.1.6" - resolved "https://registry.yarnpkg.com/@types/lodash.curry/-/lodash.curry-4.1.6.tgz" - integrity sha512-x3ctCcmOYqRrihNNnQJW6fe/yZFCgnrIa6p80AiPQRO8Jis29bBdy1dEw1FwngoF/mCZa3Bx+33fUZvOEE635Q== - dependencies: - "@types/lodash" "*" - -"@types/lodash.debounce@^4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@types/lodash.debounce/-/lodash.debounce-4.0.6.tgz" - integrity sha512-4WTmnnhCfDvvuLMaF3KV4Qfki93KebocUF45msxhYyjMttZDQYzHkO639ohhk8+oco2cluAFL3t5+Jn4mleylQ== - dependencies: - "@types/lodash" "*" - -"@types/lodash@*": - version "4.14.161" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.161.tgz" - integrity sha512-EP6O3Jkr7bXvZZSZYlsgt5DIjiGr0dXP1/jVEwVLTFgg0d+3lWVQkRavYVQszV7dYUwvg0B8R0MBDpcmXg7XIA== - "@types/long@4.0.1", "@types/long@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz" @@ -1983,11 +1885,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz" integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== -"@types/node@^12.0.12": - version "12.12.54" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.54.tgz" - integrity sha512-ge4xZ3vSBornVYlDnk7yZ0gK6ChHf/CHB7Gl1I0Jhah8DDnEQqBzgohYG4FX4p81TNirSETOiSyn+y1r9/IR6w== - "@types/node@^13.7.0": version "13.13.12" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.12.tgz" @@ -1998,17 +1895,12 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - "@types/prettier@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.1.tgz" integrity sha512-boy4xPNEtiw6N3abRhBi/e7hNvy3Tt8E9ZRAQrwAGzoCGZS/1wjo9KY7JHhnfnEsG5wSjDbymCozUM9a3ea7OQ== -"@types/prop-types@*", "@types/prop-types@^15.7.3": +"@types/prop-types@*": version "15.7.3" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz" integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== @@ -2038,10 +1930,10 @@ dependencies: "@types/react" "*" -"@types/react-native@0.63.36": - version "0.63.36" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.63.36.tgz" - integrity sha512-mCWEiPgi55MkXXMuDe0VsOWO3C4hhj6mO/jnTvy0sXcRD6MbAmGwXnVe5+m1FRCuEQMaJwgG1ZNahZvvyvuGUA== +"@types/react-native@0.63.43": + version "0.63.43" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.63.43.tgz#0278dd540f8479b35ae5d6ef373dd9b3be4cffb1" + integrity sha512-zFD+rFf7xmk3ZL5laaGdWB8NLNoN36TjHc2M5PcT5gXcDk7ZJBPsiabNcPDQPSIU/om8YPwBpaFdd1IiyuIM+g== dependencies: "@types/react" "*" @@ -2068,13 +1960,6 @@ "@types/prop-types" "*" csstype "^3.0.2" -"@types/redux-devtools-themes@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/redux-devtools-themes/-/redux-devtools-themes-1.0.0.tgz" - integrity sha512-ul3x0MYM5Nzj57Fh9wINyHFne8vZL04RC4nWAUWLYcL105vHoa/oJyopuKOrQmqVmhqmDiL4c9FfLbUmIB7TWQ== - dependencies: - "@types/base16" "*" - "@types/remote-redux-devtools@0.5.4": version "0.5.4" resolved "https://registry.yarnpkg.com/@types/remote-redux-devtools/-/remote-redux-devtools-0.5.4.tgz" @@ -2125,23 +2010,11 @@ dependencies: "@types/yargs-parser" "*" -"@wry/equality@^0.1.2": - version "0.1.11" - resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz" - integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== - dependencies: - tslib "^1.9.3" - abab@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz" @@ -2195,16 +2068,6 @@ ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.7.0: - version "6.12.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.3.tgz" - integrity sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - anser@^1.4.9: version "1.4.9" resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.9.tgz" @@ -2320,75 +2183,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -apollo-cache-control@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/apollo-cache-control/-/apollo-cache-control-0.1.1.tgz" - integrity sha512-XJQs167e9u+e5ybSi51nGYr70NPBbswdvTEHtbtXbwkZ+n9t0SLPvUcoqceayOSwjK1XYOdU/EKPawNdb3rLQA== - dependencies: - graphql-extensions "^0.0.x" - -apollo-link@^1.2.14: - version "1.2.14" - resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz" - integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== - dependencies: - apollo-utilities "^1.3.0" - ts-invariant "^0.4.0" - tslib "^1.9.3" - zen-observable-ts "^0.8.21" - -apollo-server-core@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-1.4.0.tgz" - integrity sha512-BP1Vh39krgEjkQxbjTdBURUjLHbFq1zeOChDJgaRsMxGtlhzuLWwwC6lLdPatN8jEPbeHq8Tndp9QZ3iQZOKKA== - dependencies: - apollo-cache-control "^0.1.0" - apollo-tracing "^0.1.0" - graphql-extensions "^0.0.x" - -apollo-server-express@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/apollo-server-express/-/apollo-server-express-1.4.0.tgz" - integrity sha512-zkH00nxhLnJfO0HgnNPBTfZw8qI5ILaPZ5TecMCI9+Y9Ssr2b0bFr9pBRsXy9eudPhI+/O4yqegSUsnLdF/CPw== - dependencies: - apollo-server-core "^1.4.0" - apollo-server-module-graphiql "^1.4.0" - -apollo-server-module-graphiql@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/apollo-server-module-graphiql/-/apollo-server-module-graphiql-1.4.0.tgz" - integrity sha512-GmkOcb5he2x5gat+TuiTvabnBf1m4jzdecal3XbXBh/Jg+kx4hcvO3TTDFQ9CuTprtzdcVyA11iqG7iOMOt7vA== - -apollo-tracing@^0.1.0: - version "0.1.4" - resolved "https://registry.yarnpkg.com/apollo-tracing/-/apollo-tracing-0.1.4.tgz" - integrity sha512-Uv+1nh5AsNmC3m130i2u3IqbS+nrxyVV3KYimH5QKsdPjxxIQB3JAT+jJmpeDxBel8gDVstNmCh82QSLxLSIdQ== - dependencies: - graphql-extensions "~0.0.9" - -apollo-utilities@^1.0.1, apollo-utilities@^1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz" - integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig== - dependencies: - "@wry/equality" "^0.1.2" - fast-json-stable-stringify "^2.0.0" - ts-invariant "^0.4.0" - tslib "^1.10.0" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz" @@ -2424,21 +2218,11 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-each@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz" - integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= - array-filter@~0.0.0: version "0.0.1" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz" integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - array-map@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz" @@ -2454,11 +2238,6 @@ array-slice@^0.2.3: resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz" integrity sha1-3Tz7gO15c6dRF82sabC5nshhhvU= -array-slice@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz" - integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== - array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz" @@ -2501,42 +2280,18 @@ async-limiter@^1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.0.0.tgz" - integrity sha1-0JAK04WvE4BFQKEJxCFm4657K50= - dependencies: - lodash "^4.8.0" - -async@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.3.0.tgz" - integrity sha1-EBPRBRBH3TIP4k5JTVxm7K9hR9k= - dependencies: - lodash "^4.14.0" - -async@^2.4.0, async@^2.6.1: +async@^2.4.0: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz" integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== dependencies: lodash "^4.17.14" -async@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz" - integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -atoa@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/atoa/-/atoa-1.0.0.tgz" - integrity sha1-DMDpGkgOc4+SPrwQNnZHF3mzSkk= - atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz" @@ -2582,22 +2337,6 @@ babel-plugin-dynamic-import-node@^2.3.3: dependencies: object.assign "^4.1.0" -babel-plugin-emotion@^10.0.27: - version "10.0.33" - resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.33.tgz" - integrity sha512-bxZbTTGz0AJQDHm8k6Rf3RQJ8tX2scsfsRyKVgAbiUPUNIRtlK+7JxP+TAd1kRLABFxe0CFm2VdK4ePkoA9FxQ== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@emotion/hash" "0.8.0" - "@emotion/memoize" "0.7.4" - "@emotion/serialize" "^0.11.16" - babel-plugin-macros "^2.0.0" - babel-plugin-syntax-jsx "^6.18.0" - convert-source-map "^1.5.0" - escape-string-regexp "^1.0.5" - find-root "^1.1.0" - source-map "^0.5.7" - babel-plugin-istanbul@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz" @@ -2619,30 +2358,6 @@ babel-plugin-jest-hoist@^26.6.2: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@^2.0.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz" - integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== - dependencies: - "@babel/runtime" "^7.7.2" - cosmiconfig "^6.0.0" - resolve "^1.12.0" - -"babel-plugin-styled-components@>= 1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.11.1.tgz" - integrity sha512-YwrInHyKUk1PU3avIRdiLyCpM++18Rs1NgyMXEAQC33rIXs/vro0A+stf4sT0Gf22Got+xRWB8Cm0tw+qkRzBA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-module-imports" "^7.0.0" - babel-plugin-syntax-jsx "^6.18.0" - lodash "^4.17.11" - -babel-plugin-syntax-jsx@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: version "7.0.0-beta.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz" @@ -2724,11 +2439,6 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" -base16@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz" - integrity sha1-4pf2DX7BAUp6lxo568ipjAtoHnA= - base64-js@*, base64-js@^1.0.2, base64-js@^1.1.2, base64-js@^1.2.3: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz" @@ -2739,11 +2449,6 @@ base64-js@1.5.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -base64id@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz" - integrity sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY= - base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz" @@ -2757,13 +2462,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -basic-auth@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz" - integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== - dependencies: - safe-buffer "5.1.2" - bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" @@ -2831,18 +2529,6 @@ bitcoinjs-lib@^3.3.1: varuint-bitcoin "^1.0.4" wif "^2.0.1" -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz" - integrity sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= - dependencies: - inherits "~2.0.0" - -bluebird@^3.7.0: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - blueimp-md5@^2.5.0: version "2.18.0" resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.18.0.tgz#1152be1335f0c6b3911ed9e36db54f3e6ac52935" @@ -2853,22 +2539,6 @@ bn.js@^4.11.8, bn.js@^4.4.0: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz" integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== -body-parser@1.19.0, body-parser@^1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - bolt11@1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/bolt11/-/bolt11-1.2.7.tgz" @@ -2889,11 +2559,6 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -boolean@^3.0.0, boolean@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.0.1.tgz" - integrity sha512-HRZPIjPcbwAVQvOTxR4YE3o8Xs98NqbbL1iEZDCz7CL8ql0Lt5iOyJFxfnAB0oFs8Oh02F/lLlg30Mexv46LjA== - bplist-creator@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz" @@ -2997,16 +2662,11 @@ buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" -buffer-crc32@^0.2.13, buffer-crc32@~0.2.3: +buffer-crc32@^0.2.13: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= -buffer-equal-constant-time@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" - integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= - buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz" @@ -3040,11 +2700,6 @@ bytes@3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz" integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz" @@ -3060,19 +2715,6 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^1.0.2" - caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz" @@ -3107,11 +2749,6 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.0.0.tgz" integrity sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w== -camelize@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz" - integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= - capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz" @@ -3163,7 +2800,7 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz" integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== @@ -3181,11 +2818,6 @@ chardet@^0.4.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz" integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz" @@ -3254,13 +2886,6 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" -clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - clone@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz" @@ -3276,16 +2901,6 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -codemirror@^5.56.0: - version "5.56.0" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.56.0.tgz" - integrity sha512-MfKVmYgifXjQpLSgpETuih7A7WTTIsxvKfSLGseTY5+qt0E1UD1wblZGM6WLenORo8sgmf+3X+WTe2WF7mufyw== - coininfo@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/coininfo/-/coininfo-4.5.0.tgz" @@ -3367,11 +2982,6 @@ color@^3.1.2: color-convert "^1.9.1" color-string "^1.5.2" -colorette@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.1.0.tgz" - integrity sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg== - colorette@^1.0.7: version "1.2.0" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.0.tgz" @@ -3394,11 +3004,6 @@ commander@^2.12.1, commander@^2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== - commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz" @@ -3444,7 +3049,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.6.0, concat-stream@^1.6.2: +concat-stream@^1.6.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -3454,14 +3059,6 @@ concat-stream@^1.6.0, concat-stream@^1.6.2: readable-stream "^2.2.2" typedarray "^0.0.6" -config-chain@^1.1.11: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - connect@^3.6.5: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz" @@ -3472,48 +3069,13 @@ connect@^3.6.5: parseurl "~1.3.3" utils-merge "1.0.1" -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== - dependencies: - safe-buffer "5.1.2" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -contra@1.9.4: - version "1.9.4" - resolved "https://registry.yarnpkg.com/contra/-/contra-1.9.4.tgz" - integrity sha1-9TveQtfltZhcrk2ZqNYQUm3o8o0= - dependencies: - atoa "1.0.0" - ticky "1.0.1" - -convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz" @@ -3524,29 +3086,16 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz" integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= -core-js@^2.2.2, core-js@^2.4.1, core-js@^2.5.3, core-js@^2.5.7, core-js@^2.6.5: +core-js@^2.2.2, core-js@^2.4.1: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz" integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== -core-js@^3.6.5: - version "3.6.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz" - integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cors@^2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz" @@ -3557,17 +3106,6 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.7.2" - create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz" @@ -3627,7 +3165,7 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.3: +cross-spawn@^7.0.0: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3636,23 +3174,11 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crossvent@1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/crossvent/-/crossvent-1.5.4.tgz" - integrity sha1-2ixPj0DJR4JRe/K+7BBEFIGUq5I= - dependencies: - custom-event "1.0.0" - crypto-js@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.0.0.tgz" integrity sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg== -css-color-keywords@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz" - integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= - css-select@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz" @@ -3663,15 +3189,6 @@ css-select@^2.1.0: domutils "^1.7.0" nth-check "^1.0.2" -css-to-react-native@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz" - integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ== - dependencies: - camelize "^1.0.0" - css-color-keywords "^1.0.0" - postcss-value-parser "^4.0.2" - css-tree@^1.0.0-alpha.39: version "1.0.0-alpha.39" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.39.tgz" @@ -3680,14 +3197,6 @@ css-tree@^1.0.0-alpha.39: mdn-data "2.0.6" source-map "^0.6.1" -css-vendor@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/css-vendor/-/css-vendor-2.0.8.tgz" - integrity sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ== - dependencies: - "@babel/runtime" "^7.8.3" - is-in-browser "^1.0.2" - css-what@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.3.0.tgz" @@ -3715,44 +3224,11 @@ csstype@^2.2.0: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz" integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== -csstype@^2.5.7: - version "2.6.13" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.13.tgz" - integrity sha512-ul26pfSQTZW8dcOnD2iiJssfXw0gdNVX9IJDH/X3K5DGPfj+fUYe3kB+swUY6BF3oZDxaID3AJt+9/ojSAE05A== - csstype@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.2.tgz" integrity sha512-ofovWglpqoqbfLNOTBNZLSbMuGrblAf1efvvArGKOZMBrIoJeu5UsAipQolkijtyQx5MtAzT/J9IHj/CEY1mJw== -custom-event@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.0.tgz" - integrity sha1-LkYovhncSyFLXAJjDFlx6BFhgGI= - -d3-state-visualizer@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/d3-state-visualizer/-/d3-state-visualizer-1.3.4.tgz" - integrity sha512-AKksKbczleaV9UvAImfWQmaIiImoe4t7H8edOksytiZ6Yo8BGvZ3P7RGZpddaZ8SnM8k2tEFAHFtyCMd1jVm7w== - dependencies: - d3 "^3.5.17" - d3tooltip "^1.2.3" - deepmerge "^4.2.2" - map2tree "^1.4.2" - ramda "^0.27.1" - -d3@^3.5.17: - version "3.5.17" - resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz" - integrity sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g= - -d3tooltip@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/d3tooltip/-/d3tooltip-1.2.3.tgz" - integrity sha512-VoguUK+Hxy9Ruhqm6O1UKmETNWjASNTK+gzR9G5r3AAgGp0ENCGWg860Eh5YJThPpog33eAD+afQ31PfJwAz+A== - dependencies: - ramda "^0.27.1" - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz" @@ -3774,37 +3250,25 @@ date-fns@2.16.1: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.16.1.tgz" integrity sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ== -dateformat@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz" - integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== - dayjs@^1.8.15: version "1.8.28" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.28.tgz" integrity sha512-ccnYgKC0/hPSGXxj7Ju6AV/BP4HUkXC2u15mikXT5mX9YorEaoi1bEKOmAqdkJHN4EEkmAf97SpH66Try5Mbeg== -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@4.1.1, debug@^4.1.0, debug@^4.1.1: +debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" -debug@^3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz" @@ -3820,13 +3284,6 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - deep-assign@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-3.0.0.tgz" @@ -3834,11 +3291,6 @@ deep-assign@^3.0.0: dependencies: is-obj "^1.0.0" -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz" @@ -3861,12 +3313,7 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -defer-to-connect@^1.0.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz" - integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== - -define-properties@^1.1.2, define-properties@^1.1.3: +define-properties@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -3900,11 +3347,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - denodeify@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz" @@ -3915,63 +3357,16 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= -depd@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -deprecated-decorator@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz" - integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc= - destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -detect-file@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz" - integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -detect-node@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz" - integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== - -devui@^1.0.0-6: - version "1.0.0-6" - resolved "https://registry.yarnpkg.com/devui/-/devui-1.0.0-6.tgz" - integrity sha512-9hMso1CG4qnpf+6SP4zlnvgCYxEwEXC6tWzhMrTILEE37Ra6veyo9B3Y5MKVNC/xhSqHavmdft780Y9YBnMtqA== - dependencies: - base16 "^1.0.0" - codemirror "^5.56.0" - color "^3.1.2" - prop-types "^15.7.2" - react-icons "^3.10.0" - react-is "^16.13.1" - react-jsonschema-form "^1.8.1" - react-select "^3.1.0" - redux-devtools-themes "^1.0.0" - simple-element-resize-detector "^1.3.0" - styled-components "^5.1.1" - -diff-match-patch@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz" - integrity sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw== - diff-sequences@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz" @@ -4000,14 +3395,6 @@ doctrine@0.7.2: esutils "^1.1.6" isarray "0.0.1" -dom-helpers@^5.0.1: - version "5.2.0" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.0.tgz" - integrity sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ== - dependencies: - "@babel/runtime" "^7.8.7" - csstype "^3.0.2" - dom-serializer@0: version "0.2.2" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz" @@ -4041,14 +3428,6 @@ domutils@^1.7.0: dom-serializer "0" domelementtype "1" -dragula@3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/dragula/-/dragula-3.7.2.tgz" - integrity sha1-SjXJ05gf+sGpScKcpyhQWOhzk84= - dependencies: - contra "1.9.4" - crossvent "1.5.4" - drbg.js@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz" @@ -4058,11 +3437,6 @@ drbg.js@^1.0.1: create-hash "^1.1.2" create-hmac "^1.1.4" -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - easy-peasy@4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/easy-peasy/-/easy-peasy-4.0.1.tgz" @@ -4085,13 +3459,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ecdsa-sig-formatter@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - ecurve@^1.0.0: version "1.0.6" resolved "https://registry.yarnpkg.com/ecurve/-/ecurve-1.0.6.tgz" @@ -4105,15 +3472,6 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron@^9.2.0: - version "9.2.1" - resolved "https://registry.yarnpkg.com/electron/-/electron-9.2.1.tgz" - integrity sha512-ZsetaQjXB8+9/EFW1FnfK4ukpkwXCxMEaiKiUZhZ0ZLFlLnFCpe0Bg4vdDf7e4boWGcnlgN1jAJpBw7w0eXuqA== - dependencies: - "@electron/get" "^1.0.1" - "@types/node" "^12.0.12" - extract-zip "^1.0.3" - elliptic@^6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz" @@ -4142,7 +3500,7 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -encodeurl@^1.0.2, encodeurl@~1.0.2: +encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= @@ -4166,11 +3524,6 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz" integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== -env-paths@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz" - integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== - envinfo@^7.7.2: version "7.7.3" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.3.tgz" @@ -4191,26 +3544,6 @@ errorhandler@^1.5.0: accepts "~1.3.7" escape-html "~1.0.3" -es6-error@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz" - integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== - -es6-template-regex@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/es6-template-regex/-/es6-template-regex-0.1.1.tgz" - integrity sha1-5Re54PdCvuuNMECDRUT9oORlFGc= - -es6template@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/es6template/-/es6template-1.0.5.tgz" - integrity sha1-O7u5efpriudlsMmGMQ9yAHJWKp8= - dependencies: - es6-template-regex "^0.1.1" - extend-shallow "^2.0.1" - get-value "^2.0.2" - sliced "^1.0.1" - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz" @@ -4344,13 +3677,6 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= - dependencies: - homedir-polyfill "^1.0.1" - expect@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.2.tgz" @@ -4363,52 +3689,11 @@ expect@^26.6.2: jest-message-util "^26.6.2" jest-regex-util "^26.0.0" -expirymanager@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/expirymanager/-/expirymanager-0.9.3.tgz" - integrity sha1-5fazugDY12z2MxHCtx19/JvePk8= - expr-eval@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expr-eval/-/expr-eval-2.0.2.tgz" integrity sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg== -express@^4.17.1: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - extend-shallow@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz" @@ -4431,12 +3716,12 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0, extend@~3.0.2: +extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^2.0.4, external-editor@^2.1.0: +external-editor@^2.0.4: version "2.2.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz" integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== @@ -4459,16 +3744,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@^1.0.3: - version "1.7.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz" - integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== - dependencies: - concat-stream "^1.6.2" - debug "^2.6.9" - mkdirp "^0.5.4" - yauzl "^2.10.0" - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz" @@ -4577,13 +3852,6 @@ fbjs@^3.0.0: setimmediate "^1.0.5" ua-parser-js "^0.7.18" -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz" @@ -4613,7 +3881,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.1.2, finalhandler@~1.1.2: +finalhandler@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz" integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== @@ -4635,11 +3903,6 @@ find-cache-dir@^2.0.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-root@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz" - integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== - find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz" @@ -4655,49 +3918,11 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -findup-sync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz" - integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== - dependencies: - detect-file "^1.0.0" - is-glob "^4.0.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" - -fined@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz" - integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== - dependencies: - expand-tilde "^2.0.2" - is-plain-object "^2.0.3" - object.defaults "^1.1.0" - object.pick "^1.2.0" - parse-filepath "^1.0.1" - -flagged-respawn@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz" - integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== - -fleximap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fleximap/-/fleximap-1.0.0.tgz" - integrity sha512-zg/PthjBzESYKomTw/wivo8Id6B+obVkWriIzDuRfuw4wxEIV2/0D/NIGf+LKcGTTifHRfw73+oAAQozZ9MAhA== - -for-in@^1.0.1, for-in@^1.0.2: +for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz" integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= -for-own@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz" - integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= - dependencies: - for-in "^1.0.1" - forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz" @@ -4712,11 +3937,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz" @@ -4729,15 +3949,6 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -fs-extra@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz" - integrity sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz" @@ -4764,13 +3975,6 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz" @@ -4789,35 +3993,11 @@ fsevents@^2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== -fstream@^1.0.0, fstream@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz" - integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz" @@ -4843,7 +4023,7 @@ get-stdin@^6.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stream@^4.0.0, get-stream@^4.1.0: +get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== @@ -4857,23 +4037,11 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -get-value@^2.0.2, get-value@^2.0.3, get-value@^2.0.6: +get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= -getopts@2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz" - integrity sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA== - getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz" @@ -4881,12 +4049,7 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -getport@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/getport/-/getport-0.1.0.tgz" - integrity sha1-q93z1dHnfdlnzPorA2oKH7Jv1/c= - -glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: +glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -4898,116 +4061,16 @@ glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -global-agent@^2.0.2: - version "2.1.12" - resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.1.12.tgz" - integrity sha512-caAljRMS/qcDo69X9BfkgrihGUgGx44Fb4QQToNQjsiWh+YlQ66uqYVAdA8Olqit+5Ng0nkz09je3ZzANMZcjg== - dependencies: - boolean "^3.0.1" - core-js "^3.6.5" - es6-error "^4.1.1" - matcher "^3.0.0" - roarr "^2.15.3" - semver "^7.3.2" - serialize-error "^7.0.1" - -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - -global-tunnel-ng@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz" - integrity sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg== - dependencies: - encodeurl "^1.0.2" - lodash "^4.17.10" - npm-conf "^1.1.3" - tunnel "^0.0.6" - globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globalthis@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.1.tgz" - integrity sha512-mJPRTc/P39NH/iNG4mXa9aIhNymaQikTrnspeCa2ZuJ+mH2QN/rXwtX3XwKrHqWgUQFbNZKtHM105aHzJalElw== - dependencies: - define-properties "^1.1.3" - -got@^9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== - dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" - graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== -graphql-extensions@^0.0.x, graphql-extensions@~0.0.9: - version "0.0.10" - resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.0.10.tgz" - integrity sha512-TnQueqUDCYzOSrpQb3q1ngDSP2otJSF+9yNLrQGPzkMsvnQ+v6e2d5tl+B35D4y+XpmvVnAn4T3ZK28mkILveA== - dependencies: - core-js "^2.5.3" - source-map-support "^0.5.1" - -graphql-server-express@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/graphql-server-express/-/graphql-server-express-1.4.1.tgz" - integrity sha512-7HEIz2USTCXgk4YMKIcOVUdVZQT429nZnPQr4Gqp5pydZ08KJM9Y2sl9+VU+3a91HGKyrtF04eUumuYeS2fDcg== - dependencies: - apollo-server-express "^1.4.0" - -graphql-tools@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-4.0.8.tgz" - integrity sha512-MW+ioleBrwhRjalKjYaLQbr+920pHBgy9vM/n47sswtns8+96sRn5M/G+J1eu7IMeKWiN/9p6tmwCHU7552VJg== - dependencies: - apollo-link "^1.2.14" - apollo-utilities "^1.0.1" - deprecated-decorator "^0.1.6" - iterall "^1.1.3" - uuid "^3.1.0" - -graphql@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.13.2.tgz" - integrity sha512-QZ5BL8ZO/B20VA8APauGBg3GyEgZ19eduvpLWoq5x7gMmWnHoy8rlQWPLmWgFvo1yNgjSEFMesmS4R6pPr7xog== - dependencies: - iterall "^1.2.1" - growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz" @@ -5048,11 +4111,6 @@ has-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz" @@ -5125,11 +4183,6 @@ hermes-profile-transformer@^0.0.6: dependencies: source-map "^0.7.3" -hex-rgba@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/hex-rgba/-/hex-rgba-1.0.2.tgz" - integrity sha512-MKla68wFGv+i7zU3Q4giWN74f+zWdkuf2Tk21fISV7aw55r8dH/noBbH5JsVlM4Z2WRTYCEmSxsoZ1QR/o68jg== - hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz" @@ -5144,25 +4197,13 @@ hoist-non-react-statics@^1.0.5: resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" integrity sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs= -hoist-non-react-statics@^2.3.1: - version "2.5.5" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz" - integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== - -hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.3.0: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== dependencies: react-is "^16.7.0" -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - hosted-git-info@^2.1.4: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz" @@ -5175,32 +4216,11 @@ html-encoding-sniffer@^2.0.1: dependencies: whatwg-encoding "^1.0.5" -html-entities@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.3.1.tgz" - integrity sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA== - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - http-errors@~1.7.2: version "1.7.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz" @@ -5226,12 +4246,7 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -hyphenate-style-name@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz" - integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ== - -iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -5243,23 +4258,11 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz" integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== -ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - image-size@^0.6.0: version "0.6.3" resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.6.3.tgz" integrity sha512-47xSUiQioGaB96nqtp5/q55m0aBQSQdyIloMOc/x+QVTDZLNmXE892IIDrJ0hM1A5vcNUDD5tDffkSP5lCaIIA== -immediate@~3.0.5: - version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz" - integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= - immer@7.0.9: version "7.0.9" resolved "https://registry.yarnpkg.com/immer/-/immer-7.0.9.tgz" @@ -5273,14 +4276,6 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" -import-fresh@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - import-local@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz" @@ -5302,40 +4297,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@^1.3.4, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -inquirer@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz" - integrity sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ== - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.1.0" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^5.5.2" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - inquirer@^3.0.6: version "3.3.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz" @@ -5356,11 +4322,6 @@ inquirer@^3.0.6: strip-ansi "^4.0.0" through "^2.3.6" -interpret@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - invariant@2.2.4, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz" @@ -5383,19 +4344,6 @@ ip@^1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-absolute@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz" - integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== - dependencies: - is-relative "^1.0.0" - is-windows "^1.0.1" - is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz" @@ -5493,18 +4441,6 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" @@ -5520,18 +4456,6 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-in-browser@^1.0.2, is-in-browser@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-in-browser/-/is-in-browser-1.1.3.tgz" - integrity sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU= - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz" @@ -5566,13 +4490,6 @@ is-potential-custom-element-name@^1.0.0: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz" integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= -is-relative@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz" - integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== - dependencies: - is-unc-path "^1.0.0" - is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz" @@ -5588,14 +4505,7 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-unc-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz" - integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== - dependencies: - unc-path-regex "^0.1.2" - -is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -5605,7 +4515,7 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= -is-wsl@^2.1.1, is-wsl@^2.2.0: +is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -5698,16 +4608,6 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterall@^1.1.3, iterall@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz" - integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== - -javascript-stringify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-2.0.1.tgz" - integrity sha512-yV+gqbd5vaOYjqlbk16EG89xB5udgjqQF3C5FAORDg4f/IS1Yc5ERCv5e/57yBcfJYw05V5JyIXabhwb75Xxow== - jest-changed-files@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz" @@ -6272,11 +5172,6 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz" @@ -6299,7 +5194,7 @@ json-stable-stringify@^1.0.1: dependencies: jsonify "~0.0.0" -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: +json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= @@ -6311,14 +5206,6 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" -jsondiffpatch@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/jsondiffpatch/-/jsondiffpatch-0.4.1.tgz" - integrity sha512-t0etAxTUk1w5MYdNOkZBZ8rvYYN5iL+2dHCCx/DpkFm/bW28M6y5nUS83D4XdZiHy35Fpaw6LBb+F88fHZnVCw== - dependencies: - chalk "^2.3.0" - diff-match-patch "^1.0.0" - jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz" @@ -6338,22 +5225,6 @@ jsonify@~0.0.0: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz" integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= -jsonwebtoken@^8.3.0: - version "8.5.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== - dependencies: - jws "^3.2.2" - lodash.includes "^4.3.0" - lodash.isboolean "^3.0.3" - lodash.isinteger "^4.0.4" - lodash.isnumber "^3.0.3" - lodash.isplainobject "^4.0.6" - lodash.isstring "^4.0.1" - lodash.once "^4.0.0" - ms "^2.1.1" - semver "^5.6.0" - jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz" @@ -6364,164 +5235,6 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jss-plugin-camel-case@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.4.0.tgz" - integrity sha512-9oDjsQ/AgdBbMyRjc06Kl3P8lDCSEts2vYZiPZfGAxbGCegqE4RnMob3mDaBby5H9vL9gWmyyImhLRWqIkRUCw== - dependencies: - "@babel/runtime" "^7.3.1" - hyphenate-style-name "^1.0.3" - jss "10.4.0" - -jss-plugin-compose@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-compose/-/jss-plugin-compose-10.4.0.tgz" - integrity sha512-m1MKZQDH/48W2NHqgsfhYBAObVHzDzSCULLLqrc8nZh1fYGvEBUND82oqd6Jh95pJbMhTzx3E9st63MivEuvAw== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - tiny-warning "^1.0.2" - -jss-plugin-default-unit@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-default-unit/-/jss-plugin-default-unit-10.4.0.tgz" - integrity sha512-BYJ+Y3RUYiMEgmlcYMLqwbA49DcSWsGgHpVmEEllTC8MK5iJ7++pT9TnKkKBnNZZxTV75ycyFCR5xeLSOzVm4A== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - -jss-plugin-expand@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-expand/-/jss-plugin-expand-10.4.0.tgz" - integrity sha512-UiZ6D4Ud2Chg3GIzRGjgs3DLiueN4r+g1TkEgc7L/0J/L9wsvuFKOtkahdHn177+YUK5/+N05mIE9xsgREB4+Q== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - -jss-plugin-extend@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-extend/-/jss-plugin-extend-10.4.0.tgz" - integrity sha512-TsgSmvWnpZWvXWpCDHl9Vj/n8wA/Awluutg/dnrfU7rwnM+BKkssHocGai8wQ5mtmIR+lYt+y7zAO+MOeigPiw== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - tiny-warning "^1.0.2" - -jss-plugin-global@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-global/-/jss-plugin-global-10.4.0.tgz" - integrity sha512-b8IHMJUmv29cidt3nI4bUI1+Mo5RZE37kqthaFpmxf5K7r2aAegGliAw4hXvA70ca6ckAoXMUl4SN/zxiRcRag== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - -jss-plugin-nested@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-nested/-/jss-plugin-nested-10.4.0.tgz" - integrity sha512-cKgpeHIxAP0ygeWh+drpLbrxFiak6zzJ2toVRi/NmHbpkNaLjTLgePmOz5+67ln3qzJiPdXXJB1tbOyYKAP4Pw== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - tiny-warning "^1.0.2" - -jss-plugin-props-sort@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-props-sort/-/jss-plugin-props-sort-10.4.0.tgz" - integrity sha512-j/t0R40/2fp+Nzt6GgHeUFnHVY2kPGF5drUVlgkcwYoHCgtBDOhTTsOfdaQFW6sHWfoQYgnGV4CXdjlPiRrzwA== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - -jss-plugin-rule-value-function@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.4.0.tgz" - integrity sha512-w8504Cdfu66+0SJoLkr6GUQlEb8keHg8ymtJXdVHWh0YvFxDG2l/nS93SI5Gfx0fV29dO6yUugXnKzDFJxrdFQ== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - tiny-warning "^1.0.2" - -jss-plugin-rule-value-observable@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-rule-value-observable/-/jss-plugin-rule-value-observable-10.4.0.tgz" - integrity sha512-Utnsvopa2Gg9Z/9rJ5uH0Gl5QRWlnx9Hd+K/rnAc7UyxbIpvTAWMv5hsnuCUbmUSyb9RKJPHlohJNwG8rFownQ== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - symbol-observable "^1.2.0" - -jss-plugin-template@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-template/-/jss-plugin-template-10.4.0.tgz" - integrity sha512-bpRu56Dnas1+G/HvB0TdeC2907YujZ8F3pwLls7gNS6oJSYZD3iYbqsJuRVcAkhNINYVdcuW1SCo1aigCI7r/Q== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - tiny-warning "^1.0.2" - -jss-plugin-vendor-prefixer@10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.4.0.tgz" - integrity sha512-DpF+/a+GU8hMh/948sBGnKSNfKkoHg2p9aRFUmyoyxgKjOeH9n74Ht3Yt8lOgdZsuWNJbPrvaa3U4PXKwxVpTQ== - dependencies: - "@babel/runtime" "^7.3.1" - css-vendor "^2.0.8" - jss "10.4.0" - -jss-preset-default@^10.3.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-preset-default/-/jss-preset-default-10.4.0.tgz" - integrity sha512-WnmqDtQiK7bcw7yOxoW4iwf2ytVhgJfxqsb9R7V0gYOQi8TuApxs99nXgLVr3XN2HfVwk8hXlc9j50N5imozCQ== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - jss-plugin-camel-case "10.4.0" - jss-plugin-compose "10.4.0" - jss-plugin-default-unit "10.4.0" - jss-plugin-expand "10.4.0" - jss-plugin-extend "10.4.0" - jss-plugin-global "10.4.0" - jss-plugin-nested "10.4.0" - jss-plugin-props-sort "10.4.0" - jss-plugin-rule-value-function "10.4.0" - jss-plugin-rule-value-observable "10.4.0" - jss-plugin-template "10.4.0" - jss-plugin-vendor-prefixer "10.4.0" - -jss@10.4.0, jss@^10.3.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss/-/jss-10.4.0.tgz" - integrity sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw== - dependencies: - "@babel/runtime" "^7.3.1" - csstype "^3.0.2" - is-in-browser "^1.1.3" - tiny-warning "^1.0.2" - -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== - dependencies: - jwa "^1.4.1" - safe-buffer "^5.0.1" - -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - kind-of@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz" @@ -6563,27 +5276,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -knex@^0.19.5: - version "0.19.5" - resolved "https://registry.yarnpkg.com/knex/-/knex-0.19.5.tgz" - integrity sha512-Hy258avCVircQq+oj3WBqPzl8jDIte438Qlq+8pt1i/TyLYVA4zPh2uKc7Bx0t+qOpa6D42HJ2jjtl2vagzilw== - dependencies: - bluebird "^3.7.0" - colorette "1.1.0" - commander "^3.0.2" - debug "4.1.1" - getopts "2.2.5" - inherits "~2.0.4" - interpret "^1.2.0" - liftoff "3.1.0" - lodash "^4.17.15" - mkdirp "^0.5.1" - pg-connection-string "2.1.0" - tarn "^2.0.0" - tildify "2.0.0" - uuid "^3.3.3" - v8flags "^3.1.3" - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz" @@ -6597,27 +5289,6 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lie@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz" - integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4= - dependencies: - immediate "~3.0.5" - -liftoff@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz" - integrity sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog== - dependencies: - extend "^3.0.0" - findup-sync "^3.0.0" - fined "^1.0.1" - flagged-respawn "^1.0.0" - is-plain-object "^2.0.4" - object.map "^1.0.0" - rechoir "^0.6.2" - resolve "^1.1.7" - lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz" @@ -6628,13 +5299,6 @@ linked-list@0.1.0: resolved "https://registry.yarnpkg.com/linked-list/-/linked-list-0.1.0.tgz" integrity sha1-eYsP+X0bkqT9CEgPVa6k6dSdN78= -localforage@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.9.0.tgz" - integrity sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g== - dependencies: - lie "3.1.1" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz" @@ -6650,66 +5314,21 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash-es@^4.17.4: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz" - integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== - lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash.clonedeep@4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= - -lodash.curry@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz" - integrity sha1-JI42By7ekGUB11lmIAqG2riyMXA= - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz" - integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= - lodash.frompairs@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.frompairs/-/lodash.frompairs-4.0.1.tgz#bc4e5207fa2757c136e573614e9664506b2b1bd2" integrity sha1-vE5SB/onV8E25XNhTpZkUGsrG9I= -lodash.includes@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz" - integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= - -lodash.isboolean@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz" - integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= - lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= -lodash.isinteger@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz" - integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= - -lodash.isnumber@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz" - integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= - lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz" @@ -6720,11 +5339,6 @@ lodash.omit@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60" integrity sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA= -lodash.once@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz" - integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= - lodash.pick@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" @@ -6755,7 +5369,7 @@ lodash.throttle@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz" integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= -lodash@^4.14.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.8.0: +lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.2.0, lodash@^4.3.0: version "4.17.19" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz" integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== @@ -6788,16 +5402,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4 dependencies: js-tokens "^3.0.0 || ^4.0.0" -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz" @@ -6821,13 +5425,6 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" -make-iterator@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz" - integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== - dependencies: - kind-of "^6.0.2" - makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz" @@ -6835,7 +5432,7 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" -map-cache@^0.2.0, map-cache@^0.2.2: +map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz" integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= @@ -6852,20 +5449,6 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -map2tree@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/map2tree/-/map2tree-1.4.2.tgz" - integrity sha512-Dczesn85J/bfBuW2XedxQQOG5+hNCK1OC09DjZ2ZL2VFSs9J59ZNeGEvXlEHfPM4sG6Ss/QYloQTM9NKx6Vi5Q== - dependencies: - lodash "^4.17.19" - -matcher@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz" - integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng== - dependencies: - escape-string-regexp "^4.0.0" - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz" @@ -6880,16 +5463,6 @@ mdn-data@2.0.6: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.6.tgz" integrity sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA== -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -memoize-one@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz" - integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== - memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz" @@ -6897,11 +5470,6 @@ memoizerific@^1.11.3: dependencies: map-or-similar "^1.5.0" -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz" @@ -6919,11 +5487,6 @@ merkle-lib@^2.0.10: resolved "https://registry.yarnpkg.com/merkle-lib/-/merkle-lib-2.0.10.tgz" integrity sha1-grjbrnXieneFOItz+ddyXQ9vMyY= -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - metro-babel-register@0.58.0: version "0.58.0" resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.58.0.tgz" @@ -7291,7 +5854,7 @@ metro@0.58.0, metro@^0.58.0: xpipe "^1.0.5" yargs "^14.2.0" -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -7362,11 +5925,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-response@^1.0.0, mimic-response@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" @@ -7384,31 +5942,11 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz" @@ -7417,24 +5955,13 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4: +mkdirp@^0.5.1, mkdirp@^0.5.3: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" -morgan@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz" - integrity sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ== - dependencies: - basic-auth "~2.0.1" - debug "2.6.9" - depd "~2.0.0" - on-finished "~2.3.0" - on-headers "~1.0.2" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz" @@ -7460,16 +5987,11 @@ nan@^2.12.1, nan@^2.14.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== -nanoid@^2.0.0, nanoid@^2.1.0: +nanoid@^2.0.0: version "2.1.11" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz" integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== -nanoid@^3.1.12: - version "3.1.12" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz" - integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== - nanoid@^3.1.15: version "3.1.16" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.16.tgz" @@ -7530,22 +6052,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -ncom@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ncom/-/ncom-1.0.3.tgz" - integrity sha512-PfA7rjxxMAItsGo2qXrGn2GvKJIwN0bUTa3GehsblrKRVdCCEwB0QG2ymM6/DppQGUt7YqbfxQB7LaMWMiHHWQ== - dependencies: - sc-formatter "~3.0.1" - -needle@^2.2.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.5.0.tgz" - integrity sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz" @@ -7556,11 +6062,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-addon-api@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.0.tgz" - integrity sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA== - node-addon-api@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.1.tgz" @@ -7584,24 +6085,6 @@ node-gyp-build@^4.2.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.2.tgz" integrity sha512-Lqh7mrByWCM8Cf9UPqpeoVBBo5Ugx+RKu885GAzmLBVYjeywScxHXPGLa4JfYNZmcNGwzR0Glu5/9GaQZMFqyA== -node-gyp@3.x: - version "3.8.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz" - integrity sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA== - dependencies: - fstream "^1.0.0" - glob "^7.0.3" - graceful-fs "^4.1.2" - mkdirp "^0.5.0" - nopt "2 || 3" - npmlog "0 || 1 || 2 || 3 || 4" - osenv "0" - request "^2.87.0" - rimraf "2" - semver "~5.3.0" - tar "^2.0.0" - which "1" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz" @@ -7624,42 +6107,11 @@ node-notifier@^8.0.0: uuid "^8.3.0" which "^2.0.2" -node-pre-gyp@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz" - integrity sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - node-stream-zip@^1.9.1: version "1.11.2" resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.11.2.tgz" integrity sha512-cowCX+OyzS3tN2i4BMMFxCr/pE6cQlEMTbVCugmos0TNEJQNtcG04tR41CY8lumO1I7F5GFiLaU4WavomJthaA== -"nopt@2 || 3": - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz" - integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= - dependencies: - abbrev "1" - -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz" @@ -7682,40 +6134,6 @@ normalize-path@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== - -npm-bundled@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz" - integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-conf@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz" - integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== - dependencies: - config-chain "^1.1.11" - pify "^3.0.0" - -npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -npm-packlist@^1.1.6: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz" @@ -7730,16 +6148,6 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - nth-check@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz" @@ -7752,11 +6160,6 @@ nullthrows@^1.1.1: resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz" integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz" @@ -7777,7 +6180,7 @@ ob1@0.59.0: resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.59.0.tgz" integrity sha512-opXMTxyWJ9m68ZglCxwo0OPRESIC/iGmKFPXEXzMZqsVIrgoRXOHmoMDkQzz4y3irVjbyPJRAh5pI9fd0MJTFQ== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -7796,11 +6199,6 @@ object-keys@^1.0.11, object-keys@^1.0.12: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-path@^0.11.4: - version "0.11.4" - resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.4.tgz" - integrity sha1-NwrnUvvzfePqcKhhwju6iRVpGUk= - object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz" @@ -7818,25 +6216,7 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" -object.defaults@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz" - integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= - dependencies: - array-each "^1.0.1" - array-slice "^1.0.0" - for-own "^1.0.0" - isobject "^3.0.0" - -object.map@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz" - integrity sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= - dependencies: - for-own "^1.0.0" - make-iterator "^1.0.0" - -object.pick@^1.2.0, object.pick@^1.3.0: +object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz" integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= @@ -7883,14 +6263,6 @@ open@^6.2.0: dependencies: is-wsl "^1.1.0" -open@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/open/-/open-7.2.0.tgz" - integrity sha512-4HeyhxCvBTI5uBePsAdi55C5fmqnWZ2e2MlmvWi5KW5tdH5rxoiv/aMtbeVxKZc3eWkT1GymMnLG8XC4Rq4TDQ== - dependencies: - is-docker "^2.0.0" - is-wsl "^2.1.1" - opencollective-postinstall@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" @@ -7925,29 +6297,11 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@0, osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== - p-each-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.1.0.tgz" @@ -7984,22 +6338,6 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-filepath@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz" - integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= - dependencies: - is-absolute "^1.0.0" - map-cache "^0.2.0" - path-root "^0.1.1" - parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz" @@ -8023,11 +6361,6 @@ parse-node-version@^1.0.0: resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz" integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= - parse5@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz" @@ -8073,53 +6406,16 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== -path-root-regex@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz" - integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= - -path-root@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz" - integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= - dependencies: - path-root-regex "^0.1.0" - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -pg-connection-string@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.1.0.tgz" - integrity sha512-bhlV7Eq09JrRIvo1eKngpwuqKtJnNhZdpdOlvrPrA4dxqXPjxSrbNrfnIDmTpwMyRszrcV4kU5ZA4mMsQUrjdg== - picomatch@^2.0.4, picomatch@^2.0.5: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz" @@ -8176,21 +6472,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postcss-value-parser@^4.0.2: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - pretty-format@^24.7.0, pretty-format@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz" @@ -8248,11 +6534,6 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -progress@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise-polyfill@^8.1.3: version "8.1.3" resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.1.3.tgz" @@ -8280,7 +6561,7 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.4" -prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -8289,11 +6570,6 @@ prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, object-assign "^4.1.1" react-is "^16.8.1" -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz" - integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= - protobufjs@6.10.2: version "6.10.2" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.10.2.tgz" @@ -8313,14 +6589,6 @@ protobufjs@6.10.2: "@types/node" "^13.7.0" long "^4.0.0" -proxy-addr@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz" - integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.1" - pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz" @@ -8364,11 +6632,6 @@ qrcode@^1.3.2: pngjs "^3.3.0" yargs "^13.2.4" -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz" @@ -8393,12 +6656,7 @@ raf@^3.1.0: resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== dependencies: - performance-now "^2.1.0" - -ramda@^0.27.1: - version "0.27.1" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz" - integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw== + performance-now "^2.1.0" randombytes@^2.0.1: version "2.1.0" @@ -8412,26 +6670,6 @@ range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - react-addons-shallow-compare@15.6.2: version "15.6.2" resolved "https://registry.yarnpkg.com/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.2.tgz" @@ -8440,18 +6678,6 @@ react-addons-shallow-compare@15.6.2: fbjs "^0.8.4" object-assign "^4.1.0" -react-base16-styling@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/react-base16-styling/-/react-base16-styling-0.8.0.tgz" - integrity sha512-ElvciPaL4xpWh7ISX7ugkNS/dvoh7DpVMp4t93ngnEsS2LkMd8Gu+cDDOLis2rj4889CNK662UdjOfv3wvZg9w== - dependencies: - "@types/base16" "^1.0.2" - "@types/lodash.curry" "^4.1.6" - base16 "^1.0.0" - color "^3.1.2" - csstype "^3.0.2" - lodash.curry "^4.1.1" - react-devtools-core@^4.6.0: version "4.8.2" resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.8.2.tgz" @@ -8460,39 +6686,7 @@ react-devtools-core@^4.6.0: shell-quote "^1.6.1" ws "^7" -react-dom@^16.13.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz" - integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.19.1" - -react-dragula@^1.1.17: - version "1.1.17" - resolved "https://registry.yarnpkg.com/react-dragula/-/react-dragula-1.1.17.tgz" - integrity sha1-s8s1KkcKcZNnupnWpUAcYPrU9v8= - dependencies: - atoa "1.0.0" - dragula "3.7.2" - -react-icons@^3.10.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-3.11.0.tgz" - integrity sha512-JRgiI/vdF6uyBgyZhVyYJUZAop95Sy4XDe/jmT3R/bKliFWpO/uZBwvSjWEdxwzec7SYbEPNPck0Kff2tUGM2Q== - dependencies: - camelcase "^5.0.0" - -react-input-autosize@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz" - integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw== - dependencies: - prop-types "^15.5.8" - -react-is@^16.12.0, react-is@^16.13.0, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6, react-is@^16.9.0: +react-is@^16.12.0, react-is@^16.13.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -8502,34 +6696,6 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz" integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== -react-json-tree@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/react-json-tree/-/react-json-tree-0.13.0.tgz" - integrity sha512-FPJUQzYWi7pvBUAnMd9ENOnAUT2mXLhe01VUbPfKH9Q4gk4FQ0fpS1e1WZ3o7g6zfYJpYJeBTo1WwlMHlMlZOw== - dependencies: - "@types/prop-types" "^15.7.3" - prop-types "^15.7.2" - react-base16-styling "^0.8.0" - -react-jsonschema-form@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/react-jsonschema-form/-/react-jsonschema-form-1.8.1.tgz" - integrity sha512-aaDloxNAcGXOOOcdKOxxqEEn5oDlPUZgWcs8unXXB9vjBRgCF8rCm/wVSv1u2G5ih0j/BX6Ewd/WjI2g00lPdg== - dependencies: - "@babel/runtime-corejs2" "^7.4.5" - ajv "^6.7.0" - core-js "^2.5.7" - lodash "^4.17.15" - prop-types "^15.5.8" - react-is "^16.8.4" - react-lifecycles-compat "^3.0.4" - shortid "^2.2.14" - -react-lifecycles-compat@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz" - integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== - react-native-animatable@1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/react-native-animatable/-/react-native-animatable-1.3.3.tgz" @@ -8554,10 +6720,10 @@ react-native-dialogs@1.1.1: resolved "https://registry.yarnpkg.com/react-native-dialogs/-/react-native-dialogs-1.1.1.tgz" integrity sha512-JduVYRXvLTT4k4VfXuKt3HF2/fixsR1EDXkvNf8fJwxKZUs2kzs1E0EtgiAx4IgYMTOewLPVtzTVfiv0GWeHuA== -react-native-document-picker@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/react-native-document-picker/-/react-native-document-picker-4.1.0.tgz" - integrity sha512-tHYNng9GrnVrOoLk9K2j+T1xa8gAfC2Mk2dbJq32QBYD3zkHGMkFYGd2FZt0nuYxCBnd768tOQWuEZXwXM1tsg== +react-native-document-picker@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/react-native-document-picker/-/react-native-document-picker-4.2.0.tgz#2d6f560fd902c5f9034c287941a9505f037b6eeb" + integrity sha512-bZlQ3ooOO+2G0J0vSvcWWv1OojMwhEhiF5M7gCKp3LT/VPikZnmzIGgCkhcu8HexxWLuaGToSAQAUL2VcSo5oQ== react-native-drawer@2.5.1: version "2.5.1" @@ -8608,6 +6774,10 @@ react-native-haptic-feedback@^1.11.0: resolved "https://registry.yarnpkg.com/react-native-haptic-feedback/-/react-native-haptic-feedback-1.11.0.tgz#adfd841f3b67046532f912c6ec827aea0037d8ad" integrity sha512-KTIy7lExwMtB6pOpCARyUzFj5EzYTh+A1GN/FB5Eb0LrW5C6hbb1kdj9K2/RHyZC+wyAJD1M823ZaDCU6n6cLA== +"react-native-icloudstore@git+https://github.com/manicakes/react-native-icloudstore.git#4c9f668d3121aedf7a5635b0a13f6e3999c0e6f3": + version "0.9.0" + resolved "git+https://github.com/manicakes/react-native-icloudstore.git#4c9f668d3121aedf7a5635b0a13f6e3999c0e6f3" + react-native-image-slider-box@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/react-native-image-slider-box/-/react-native-image-slider-box-1.0.12.tgz" @@ -8615,7 +6785,7 @@ react-native-image-slider-box@^1.0.12: dependencies: react-native-snap-carousel "*" -react-native-iphone-x-helper@^1.0.3, react-native-iphone-x-helper@^1.3.0: +react-native-iphone-x-helper@^1.0.3, react-native-iphone-x-helper@^1.3.0, react-native-iphone-x-helper@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz" integrity sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg== @@ -8635,27 +6805,27 @@ react-native-maps@0.27.1: resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.27.1.tgz" integrity sha512-HygBkZBecTnIVRYrSiLRAvu4OmXOYso/A7c6Cy73HkOh9CgGV8Ap5eBea24tvmFGptjj5Hg8AJ94/YbmWK1Okw== -react-native-material-menu@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/react-native-material-menu/-/react-native-material-menu-1.1.3.tgz" - integrity sha512-/4j47dWP7x0laIYKkbKxgaG2663u8o02+OrNe4Qpdmmt9KrBAuAaU3wMpry1WC/ECh6ZjnACJYx0s06mSvdOlA== +react-native-material-menu@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/react-native-material-menu/-/react-native-material-menu-1.2.0.tgz#07fac14ccc6e1cd7b995016340efbfbddc6a7a58" + integrity sha512-1XbzJP8Uo09YjW0G8xuKcL2BD76BL/IYOq1KQuQ2yGMuwqBvfU/+AKvhvHWuckQK+bhcDSUgTWbH8qv1mRAX6w== -react-native-modal@11.5.6: - version "11.5.6" - resolved "https://registry.yarnpkg.com/react-native-modal/-/react-native-modal-11.5.6.tgz" - integrity sha512-APGNfbvgC4hXbJqcSADu79GLoMKIHUmgR3fDQ7rCGZNBypkStSP8imZ4PKK/OzIZZfjGU9aP49jhMgGbhY9KHA== +react-native-modal@11.6.1: + version "11.6.1" + resolved "https://registry.yarnpkg.com/react-native-modal/-/react-native-modal-11.6.1.tgz#6162a39731860fb3b6e8304059f72dc0a961f9fd" + integrity sha512-Xsd79nuBvbLOYwpRuur4btwJFQ3WkV9zp5LbAREidUtjl/Ajlp4QbNBx888FOPjo+EpOO3+U0riCRqs1dkdIzQ== dependencies: prop-types "^15.6.2" react-native-animatable "1.3.3" -react-native-paper@4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-4.4.0.tgz" - integrity sha512-yDb9ME9cP+tOoGV/OZcUX6QpD+kN6fcLXkehfMBDKJ/3rKfq3uA2HhT4mOFKLLCLsGkd4oZwIz7POkJpB+k0aw== +react-native-paper@4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-4.5.0.tgz#5f1f1e658dbd7a322a299e08ce76e22be44c01d5" + integrity sha512-mQtOL9yAs5B5b+HPWVMMbFFuKVpTDn1YuR0h5SCtDkR+3deZjJNRLtrNgPnsrwRfBhA/F8j/p2yps4DY8AiyMg== dependencies: "@callstack/react-theme-provider" "^3.0.5" color "^3.1.2" - react-native-safe-area-view "^0.14.9" + react-native-iphone-x-helper "^1.3.1" react-native-permissions@^3.0.0: version "3.0.0" @@ -8697,17 +6867,10 @@ react-native-safe-area-context@3.1.9: resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-3.1.9.tgz" integrity sha512-wmcGbdyE/vBSL5IjDPReoJUEqxkZsywZw5gPwsVUV1NBpw5eTIdnL6Y0uNKHE25Z661moxPHQz6kwAkYQyorxA== -react-native-safe-area-view@^0.14.9: - version "0.14.9" - resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.9.tgz" - integrity sha512-WII/ulhpVyL/qbYb7vydq7dJAfZRBcEhg4/UWt6F6nAKpLa3gAceMOxBxI914ppwSP/TdUsandFy6lkJQE0z4A== - dependencies: - hoist-non-react-statics "^2.3.1" - -react-native-screens@2.15.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.15.0.tgz" - integrity sha512-qTSQPy0WKHtlb8xt5gY0Gt6sdvfQUQAnFSqgsggW9UEvySbkHzpqOrOYNA79Ca8oXO0dCFwp6X8buIiDefa7+Q== +react-native-screens@2.16.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.16.1.tgz#b105a127378d90018a46daf0c2f6518fca60c06f" + integrity sha512-WZ7m0sBDVaHbBnlHxwQnUlI6KNfQKHq+Unfw+VBuAlnSXvT+aw6Bb/K2bUlHzBgvrPjwY3Spc7ZERFuTwRLLwg== react-native-securerandom@1.0.0: version "1.0.0" @@ -8771,18 +6934,18 @@ react-native-webln@0.1.10: resolved "https://registry.yarnpkg.com/react-native-webln/-/react-native-webln-0.1.10.tgz" integrity sha512-H0it8l07rEHCCqDBfl6tt8EuTZKsEJYVzOr9d2ZolU0sKOv07J9+/8tQAUiEbaUB9tFi/HvBbSpr1KUgJCKefg== -react-native-webview@10.10.2: - version "10.10.2" - resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-10.10.2.tgz" - integrity sha512-98Dh7q1gEflicFZ8KNL3nK5XRjx50OZXqw87jHofVjKfjbK0LKmvI5X8ymgUMGg61JVgI3AF+g8qpDvqjgQsfg== +react-native-webview@11.0.2: + version "11.0.2" + resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.0.2.tgz#c88e84fa470f04ff070ff8a2c7f4d7295d46bb06" + integrity sha512-GDyIBRbCZ2wbMUGCxA7LufSEbSoWKOzkFB8YljmAffA15tzN6ccvGEquB/hkk5KhvoYy300kwJyEmyBeG6d/AA== dependencies: escape-string-regexp "2.0.0" invariant "2.2.4" -react-native@0.63.3: - version "0.63.3" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.63.3.tgz" - integrity sha512-71wq13uNo5W8QVQnFlnzZ3AD+XgUBYGhpsxysQFW/hJ8GAt/J5o+Bvhy81FXichp6IBDJDh/JgfHH2gNji8dFA== +react-native@0.63.4: + version "0.63.4" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.63.4.tgz#2210fdd404c94a5fa6b423c6de86f8e48810ec36" + integrity sha512-I4kM8kYO2mWEYUFITMcpRulcy4/jd+j9T6PbIzR0FuMcz/xwd+JwHoLPa1HmCesvR1RDOw9o4D+OFLwuXXfmGw== dependencies: "@babel/runtime" "^7.0.0" "@react-native-community/cli" "^4.10.0" @@ -8812,44 +6975,14 @@ react-native@0.63.3: use-subscription "^1.0.0" whatwg-fetch "^3.0.0" -react-pure-render@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/react-pure-render/-/react-pure-render-1.0.2.tgz" - integrity sha1-nYqSjH8sN1E8LQZOV7Pjw1bp+rs= - -react-redux@^7.2.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.1.tgz" - integrity sha512-T+VfD/bvgGTUA74iW9d2i5THrDQWbweXP0AVNI8tNd1Rk5ch1rnMiJkDD67ejw7YBKM4+REvcvqRuWJb7BLuEg== - dependencies: - "@babel/runtime" "^7.5.5" - hoist-non-react-statics "^3.3.0" - loose-envify "^1.4.0" - prop-types "^15.7.2" - react-is "^16.9.0" - react-refresh@^0.4.0: version "0.4.3" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz" integrity sha512-Hwln1VNuGl/6bVwnd0Xdn1e84gT/8T9aYNL+HAKDArLCS7LWjwr7StE30IEYbIkx0Vi3vs+coQxe+SQDbGbbpA== -react-select@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.0.tgz" - integrity sha512-wBFVblBH1iuCBprtpyGtd1dGMadsG36W5/t2Aj8OE6WbByDg5jIFyT7X5gT+l0qmT5TqWhxX+VsKJvCEl2uL9g== - dependencies: - "@babel/runtime" "^7.4.4" - "@emotion/cache" "^10.0.9" - "@emotion/core" "^10.0.9" - "@emotion/css" "^10.0.9" - memoize-one "^5.0.0" - prop-types "^15.6.0" - react-input-autosize "^2.2.2" - react-transition-group "^4.3.0" - react-test-renderer@16.13.1: version "16.13.1" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.13.1.tgz" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.13.1.tgz#de25ea358d9012606de51e012d9742e7f0deabc1" integrity sha512-Sn2VRyOK2YJJldOqoh8Tn/lWQ+ZiKhyZTPtaO0Q6yNj+QDbmRkVFap6pZPy3YQk8DScRDfyqm/KxKYP9gCMRiQ== dependencies: object-assign "^4.1.1" @@ -8857,16 +6990,6 @@ react-test-renderer@16.13.1: react-is "^16.8.6" scheduler "^0.19.1" -react-transition-group@^4.3.0: - version "4.4.1" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz" - integrity sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw== - dependencies: - "@babel/runtime" "^7.5.5" - dom-helpers "^5.0.1" - loose-envify "^1.4.0" - prop-types "^15.6.2" - react-tween-state@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/react-tween-state/-/react-tween-state-0.1.5.tgz#e98b066551efb93cb92dd1be14995c2e3deae339" @@ -8883,15 +7006,6 @@ react@17.0.1: loose-envify "^1.1.0" object-assign "^4.1.1" -react@^16.13.1: - version "16.14.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d" - integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz" @@ -8911,7 +7025,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@~2.3.6: +readable-stream@^2.0.1, readable-stream@^2.2.2, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -8933,52 +7047,6 @@ readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - -redux-devtools-chart-monitor@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/redux-devtools-chart-monitor/-/redux-devtools-chart-monitor-1.7.2.tgz" - integrity sha512-QlDcWn45IeDURUKxMnA7q3fseUFPPBwT0izpHaafaq5ycTyfId8clJbPlKKMZ6BzLeiorYbBzfLq1KUyGJHqbg== - dependencies: - d3-state-visualizer "^1.3.4" - deepmerge "^4.2.2" - prop-types "^15.7.2" - react-pure-render "^1.0.2" - redux-devtools-themes "^1.0.0" - -redux-devtools-cli@1.0.0-4: - version "1.0.0-4" - resolved "https://registry.yarnpkg.com/redux-devtools-cli/-/redux-devtools-cli-1.0.0-4.tgz" - integrity sha512-pT/oJfpAMmUyEDIX3NxpXByu1sOJZ3Qzy0FTllVvCWRScSlPdA8XyQhstL6saZdjJdHO+uZHLGMTmdzkEDcNRw== - dependencies: - body-parser "^1.19.0" - chalk "^4.1.0" - cors "^2.8.5" - cross-spawn "^7.0.3" - electron "^9.2.0" - express "^4.17.1" - getport "^0.1.0" - graphql "^0.13.2" - graphql-server-express "^1.4.1" - graphql-tools "^4.0.8" - knex "^0.19.5" - lodash "^4.17.19" - minimist "^1.2.5" - morgan "^1.10.0" - open "^7.1.0" - react "^16.13.1" - react-dom "^16.13.1" - redux-devtools-core "^1.0.0-4" - semver "^7.3.2" - socketcluster "^14.4.2" - sqlite3 "^5.0.0" - uuid "^8.3.0" - redux-devtools-core@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/redux-devtools-core/-/redux-devtools-core-0.2.1.tgz" @@ -8990,66 +7058,6 @@ redux-devtools-core@^0.2.1: nanoid "^2.0.0" remotedev-serialize "^0.1.8" -redux-devtools-core@^1.0.0-4: - version "1.0.0-4" - resolved "https://registry.yarnpkg.com/redux-devtools-core/-/redux-devtools-core-1.0.0-4.tgz" - integrity sha512-vgmWeTRYXS0Ndi+HPwaQm158dt7iImyN4iKTw/LeaNXLoginfrYBmmMBgsUrCBlIaA0Po7wF7IpzEPOH8rOX0Q== - dependencies: - d3-state-visualizer "^1.3.4" - devui "^1.0.0-6" - get-params "^0.1.2" - javascript-stringify "^2.0.1" - jsan "^3.1.13" - jsondiffpatch "^0.4.1" - localforage "^1.9.0" - lodash "^4.17.19" - nanoid "^3.1.12" - prop-types "^15.7.2" - react-icons "^3.10.0" - react-is "^16.13.1" - react-redux "^7.2.1" - redux "^4.0.5" - redux-devtools "^3.7.0" - redux-devtools-chart-monitor "^1.7.2" - redux-devtools-inspector "^0.14.0" - redux-devtools-instrument "^1.10.0" - redux-devtools-log-monitor "^2.1.0" - redux-devtools-serialize "^0.2.0" - redux-devtools-slider-monitor "^2.0.0-5" - redux-devtools-test-generator "^0.6.2" - redux-devtools-trace-monitor "^0.1.3" - redux-persist "^4.10.2" - socketcluster-client "^14.3.1" - styled-components "^5.1.1" - -redux-devtools-inspector@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/redux-devtools-inspector/-/redux-devtools-inspector-0.14.0.tgz" - integrity sha512-NRLCUqyzzHwBIE2GQeAc/6uRZMIXG15yhSOlmoPareqiQyBuxYU6bSCcJUhOJrJP2TlAADlb3jfuQQVbMd8w3A== - dependencies: - "@types/dragula" "^3.7.0" - "@types/prop-types" "^15.7.3" - dateformat "^3.0.3" - hex-rgba "^1.0.2" - javascript-stringify "^2.0.1" - jsondiffpatch "^0.4.1" - jss "^10.3.0" - jss-preset-default "^10.3.0" - lodash.debounce "^4.0.8" - prop-types "^15.7.2" - react-base16-styling "^0.8.0" - react-dragula "^1.1.17" - react-json-tree "^0.13.0" - redux-devtools-themes "^1.0.0" - -redux-devtools-instrument@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.10.0.tgz" - integrity sha512-X8JRBCzX2ADSMp+iiV7YQ8uoTNyEm0VPFPd4T854coz6lvRiBrFSqAr9YAS2n8Kzxx8CJQotR0QF9wsMM+3DvA== - dependencies: - lodash "^4.17.19" - symbol-observable "^1.2.0" - redux-devtools-instrument@^1.9.4: version "1.9.6" resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.9.6.tgz" @@ -9058,88 +7066,6 @@ redux-devtools-instrument@^1.9.4: lodash "^4.2.0" symbol-observable "^1.0.2" -redux-devtools-log-monitor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/redux-devtools-log-monitor/-/redux-devtools-log-monitor-2.1.0.tgz" - integrity sha512-68YOl45psVVXNzE4LZEnbb6Jsc2JiNyy6SZDgaJDXUOODVdzIQbjd30wUODoRx4P0J/1oSyJdYrb8PUtmtYbtA== - dependencies: - "@types/lodash.debounce" "^4.0.6" - "@types/prop-types" "^15.7.3" - "@types/redux-devtools-themes" "^1.0.0" - lodash.debounce "^4.0.8" - prop-types "^15.7.2" - react-json-tree "^0.13.0" - redux-devtools-themes "^1.0.0" - -redux-devtools-serialize@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/redux-devtools-serialize/-/redux-devtools-serialize-0.2.0.tgz" - integrity sha512-Oy1U9HdPCBsJtK1nte+CkOc0yKVACVwawAO3l3t0O5Y9omHqauxBNxjDNtAGMw6njmPIR4uomOEfTqTeS7bOJQ== - dependencies: - jsan "^3.1.13" - -redux-devtools-slider-monitor@^2.0.0-5: - version "2.0.0-5" - resolved "https://registry.yarnpkg.com/redux-devtools-slider-monitor/-/redux-devtools-slider-monitor-2.0.0-5.tgz" - integrity sha512-IrcxBMJU011lsQqsChnYdhVTg14sBkjIpm9NSkHC4ZKYKXsJan3D2nj+CQpuVQoFpwza0KfKf8o63qUHVVFJtQ== - dependencies: - devui "^1.0.0-6" - prop-types "^15.7.2" - redux-devtools-themes "^1.0.0" - -redux-devtools-test-generator@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/redux-devtools-test-generator/-/redux-devtools-test-generator-0.6.2.tgz" - integrity sha512-HpXEGCY6auiJVo58gvjeXGGSWxrUl01yeGX4z/i+IyFr90GkPyqCgDWnwGgXPbh4rqDHJ/bUkuO/CQT+SPy5kQ== - dependencies: - devui "^1.0.0-6" - es6template "^1.0.5" - javascript-stringify "^2.0.1" - jsan "^3.1.13" - object-path "^0.11.4" - prop-types "^15.7.2" - react "^16.13.1" - react-icons "^3.10.0" - simple-diff "^1.6.0" - -redux-devtools-themes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redux-devtools-themes/-/redux-devtools-themes-1.0.0.tgz" - integrity sha1-xILc48U3OXYEX0ATSQfZ3LOuPV0= - dependencies: - base16 "^1.0.0" - -redux-devtools-trace-monitor@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/redux-devtools-trace-monitor/-/redux-devtools-trace-monitor-0.1.3.tgz" - integrity sha512-dHiRFdAsRkBebOTGVokRT0ZTO7fEz92L9YseUhwPwkxskVmXywIubhlLB+CYmgME8yppleYwwqlPD5XiVoengA== - dependencies: - "@babel/code-frame" "^7.10.4" - anser "^1.4.9" - html-entities "^1.3.1" - react "^16.13.1" - redux-devtools-themes "^1.0.0" - settle-promise "^1.0.0" - -redux-devtools@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/redux-devtools/-/redux-devtools-3.7.0.tgz" - integrity sha512-Lnx3UX7mnJij2Xs+RicPK1GyKkbuodrCKtfYmJsN603wC0mc99W//xCAskGVNmRhIXg4e57m2k1CyX0kVzCsBg== - dependencies: - "@types/prop-types" "^15.7.3" - lodash "^4.17.19" - prop-types "^15.7.2" - redux-devtools-instrument "^1.10.0" - -redux-persist@^4.10.2: - version "4.10.2" - resolved "https://registry.yarnpkg.com/redux-persist/-/redux-persist-4.10.2.tgz" - integrity sha512-U+e0ieMGC69Zr72929iJW40dEld7Mflh6mu0eJtVMLGfMq/aJqjxUM1hzyUWMR1VUyAEEdPHuQmeq5ti9krIgg== - dependencies: - json-stringify-safe "^5.0.1" - lodash "^4.17.4" - lodash-es "^4.17.4" - redux-thunk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz" @@ -9265,7 +7191,7 @@ request-promise-native@^1.0.8: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.87.0, request@^2.88.2: +request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -9308,24 +7234,11 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" -resolve-dir@^1.0.0, resolve-dir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz" integrity sha1-six699nWiBvItuZTM17rywoYh0g= -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz" @@ -9336,7 +7249,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: +resolve@^1.10.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -9351,13 +7264,6 @@ resolve@^1.18.1: is-core-module "^2.1.0" path-parse "^1.0.6" -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz" @@ -9371,7 +7277,7 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@2, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@^2.5.4: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -9403,18 +7309,6 @@ rn-host-detect@^1.1.5: resolved "https://registry.yarnpkg.com/rn-host-detect/-/rn-host-detect-1.2.0.tgz" integrity sha512-btNg5kzHcjZZ7t7mvvV/4wNJ9e3MPgrWivkRgWURzXL0JJ0pwWlU4zrbmdlz3HHzHOxhBhHB4D+/dbMFfu4/4A== -roarr@^2.15.3: - version "2.15.3" - resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.3.tgz" - integrity sha512-AEjYvmAhlyxOeB9OqPUzQCo3kuAkNfuDk/HqWbZdFsqDFpapkTjiw+p4svNEoRLvuqNTxqfL+s+gtD4eDgZ+CA== - dependencies: - boolean "^3.0.0" - detect-node "^2.0.4" - globalthis "^1.0.1" - json-stringify-safe "^5.0.1" - semver-compare "^1.0.0" - sprintf-js "^1.1.2" - rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz" @@ -9437,7 +7331,7 @@ rx-lite@*, rx-lite@^4.0.8: resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz" integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= -rxjs@^5.4.3, rxjs@^5.5.2: +rxjs@^5.4.3: version "5.5.12" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.12.tgz" integrity sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw== @@ -9481,14 +7375,7 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sanitize-filename@^1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/sanitize-filename/-/sanitize-filename-1.6.3.tgz" - integrity sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg== - dependencies: - truncate-utf8-bytes "^1.0.0" - -sax@^1.2.1, sax@^1.2.4: +sax@^1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -9500,37 +7387,6 @@ saxes@^5.0.0: dependencies: xmlchars "^2.2.0" -sc-auth@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/sc-auth/-/sc-auth-5.0.2.tgz" - integrity sha512-Le3YBsFjzv5g6wIH6Y+vD+KFkK0HDXiaWy1Gm4nXtYebMQUyNYSf1cS83MtHrYzVEMlhYElRva1b0bvZ0hBqQw== - dependencies: - jsonwebtoken "^8.3.0" - sc-errors "^1.4.1" - -sc-broker-cluster@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/sc-broker-cluster/-/sc-broker-cluster-7.0.0.tgz" - integrity sha512-DNG8sxiFwmRSMS0sUXA25UvDV8QTwEfYnzrutqbp4HlMU9JP65FBcs6GuNFPhjQN4s9VtwAE8BBaCNK5BjNV0g== - dependencies: - async "2.0.0" - sc-broker "^6.0.0" - sc-channel "^1.2.0" - sc-errors "^1.4.1" - sc-hasher "^1.0.1" - -sc-broker@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/sc-broker/-/sc-broker-6.0.0.tgz" - integrity sha512-c1mFIllUdPnEXDDFxTiX3obYW+cT0hb56fdNM5k+Xo5DI3+3Q9MYxTc8jD23qBIXOHokt4+d/CHocmZQPlAjAQ== - dependencies: - async "^2.6.1" - expirymanager "^0.9.3" - fleximap "^1.0.0" - ncom "^1.0.2" - sc-errors "^1.4.1" - uuid "3.1.0" - sc-channel@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/sc-channel/-/sc-channel-1.2.0.tgz" @@ -9538,33 +7394,16 @@ sc-channel@^1.2.0: dependencies: component-emitter "1.2.1" -sc-errors@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sc-errors/-/sc-errors-1.4.1.tgz" - integrity sha512-dBn92iIonpChTxYLgKkIT/PCApvmYT6EPIbRvbQKTgY6tbEbIy8XVUv4pGyKwEK4nCmvX4TKXcN0iXC6tNW6rQ== - sc-errors@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/sc-errors/-/sc-errors-2.0.1.tgz" integrity sha512-JoVhq3Ud+3Ujv2SIG7W0XtjRHsrNgl6iXuHHsh0s+Kdt5NwI6N2EGAZD4iteitdDv68ENBkpjtSvN597/wxPSQ== -sc-formatter@^3.0.1, sc-formatter@^3.0.2, sc-formatter@~3.0.1: +sc-formatter@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/sc-formatter/-/sc-formatter-3.0.2.tgz" integrity sha512-9PbqYBpCq+OoEeRQ3QfFIGE6qwjjBcd2j7UjgDlhnZbtSnuGgHdcRklPKYGuYFH82V/dwd+AIpu8XvA1zqTd+A== -sc-hasher@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sc-hasher/-/sc-hasher-1.0.1.tgz" - integrity sha512-whZWw70Gp5ibXXMcz6+Tulmk8xkwWMs42gG70p12hGscdUg8BICBvihS3pX2T3dWTw+yeZuGKiULr3MwL37SOQ== - -sc-simple-broker@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/sc-simple-broker/-/sc-simple-broker-2.1.3.tgz" - integrity sha512-ldt0ybOS5fVZSMea5Z8qVu7lmDBTy0qO9BD6TseJjRuPx+g+stfSqmPAb0RsCsQUXRH8A1koCbwsuUnI9BOxvw== - dependencies: - sc-channel "^1.2.0" - scheduler@0.19.1, scheduler@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz" @@ -9596,11 +7435,6 @@ secp256k1@^3.4.0: nan "^2.14.0" safe-buffer "^5.1.2" -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - "semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz" @@ -9616,11 +7450,6 @@ semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz" - integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= - send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz" @@ -9645,14 +7474,7 @@ serialize-error@^2.1.0: resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz" integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go= -serialize-error@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz" - integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw== - dependencies: - type-fest "^0.13.1" - -serve-static@1.14.1, serve-static@^1.13.1: +serve-static@^1.13.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz" integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== @@ -9662,7 +7484,7 @@ serve-static@1.14.1, serve-static@^1.13.1: parseurl "~1.3.3" send "0.17.1" -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -9687,11 +7509,6 @@ setprototypeof@1.1.1: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== -settle-promise@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/settle-promise/-/settle-promise-1.0.0.tgz" - integrity sha1-aXrbWLgh84fOJ1fAbvyd5fDuM9g= - sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz" @@ -9700,11 +7517,6 @@ sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shallowequal@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz" - integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz" @@ -9749,28 +7561,11 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== -shortid@^2.2.14: - version "2.2.15" - resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.15.tgz" - integrity sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw== - dependencies: - nanoid "^2.1.0" - signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== -simple-diff@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/simple-diff/-/simple-diff-1.6.0.tgz" - integrity sha1-m7XZUKe0ZNHsyG8gTog2UBnVpUI= - -simple-element-resize-detector@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/simple-element-resize-detector/-/simple-element-resize-detector-1.3.0.tgz" - integrity sha512-cCFTDpFMgz/OikrV9R++wOQgLbFwqrneci8FmAOH79xrfn1sQVZg9LJV2RvproMgdN2LnfZXZPrM+Z12GXN7jA== - simple-plist@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.1.0.tgz" @@ -9811,11 +7606,6 @@ slice-ansi@^2.0.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -sliced@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz" - integrity sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E= - slide@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz" @@ -9851,7 +7641,7 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socketcluster-client@^14.2.1, socketcluster-client@^14.3.1: +socketcluster-client@^14.2.1: version "14.3.1" resolved "https://registry.yarnpkg.com/socketcluster-client/-/socketcluster-client-14.3.1.tgz" integrity sha512-Sd/T0K/9UlqTfz+HUuFq90dshA5OBJPQbdkRzGtcKIOm52fkdsBTt0FYpiuzzxv5VrU7PWpRm6KIfNXyPwlLpw== @@ -9867,38 +7657,6 @@ socketcluster-client@^14.2.1, socketcluster-client@^14.3.1: uuid "3.2.1" ws "7.1.0" -socketcluster-server@^14.7.0: - version "14.7.1" - resolved "https://registry.yarnpkg.com/socketcluster-server/-/socketcluster-server-14.7.1.tgz" - integrity sha512-KhZ1c6BKOtGaUWAA9Jdvvs+qSzMq/rBzB8O1Jpq4EpX4+zbq2B4igH6yxnflZw2EamAcAX06XokX+nre5PY+vA== - dependencies: - async "^3.1.0" - base64id "1.0.0" - component-emitter "1.2.1" - lodash.clonedeep "4.5.0" - sc-auth "^5.0.2" - sc-errors "^2.0.1" - sc-formatter "^3.0.2" - sc-simple-broker "^2.1.3" - uuid "3.2.1" - ws "7.1.0" - -socketcluster@^14.4.2: - version "14.4.2" - resolved "https://registry.yarnpkg.com/socketcluster/-/socketcluster-14.4.2.tgz" - integrity sha512-Z45tSQ6K/XUEyftrID1hyBXSdaK/gDeq6BMqhNR3XvjnUQ6HkkeTrxZUoXIn/In/J8KLl1WRVtvZAB0Zf9pEjA== - dependencies: - async "2.3.0" - fs-extra "6.0.1" - inquirer "5.2.0" - minimist "1.2.0" - sc-auth "^5.0.2" - sc-broker-cluster "^7.0.0" - sc-errors "^1.4.1" - socketcluster-server "^14.7.0" - uid-number "0.0.6" - uuid "3.2.1" - source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz" @@ -9910,7 +7668,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.1, source-map-support@^0.5.16, source-map-support@^0.5.6: +source-map-support@^0.5.16, source-map-support@^0.5.6: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -9923,7 +7681,7 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -9976,26 +7734,11 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" -sprintf-js@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz" - integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sqlite3@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.0.0.tgz" - integrity sha512-rjvqHFUaSGnzxDy2AHCwhHy6Zp6MNJzCPGYju4kD8yi6bze4d1/zMTg6C7JI49b7/EM7jKMTvyfN/4ylBKdwfw== - dependencies: - node-addon-api "2.0.0" - node-pre-gyp "^0.11.0" - optionalDependencies: - node-gyp "3.x" - sshpk@^1.7.0: version "1.16.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz" @@ -10066,16 +7809,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.1.0: +string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -10115,7 +7849,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: +strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz" integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= @@ -10158,45 +7892,17 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -styled-components@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.1.1.tgz" - integrity sha512-1ps8ZAYu2Husx+Vz8D+MvXwEwvMwFv+hqqUwhNlDN5ybg6A+3xyW1ECrAgywhvXapNfXiz79jJyU0x22z0FFTg== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/traverse" "^7.4.5" - "@emotion/is-prop-valid" "^0.8.8" - "@emotion/stylis" "^0.8.4" - "@emotion/unitless" "^0.7.4" - babel-plugin-styled-components ">= 1" - css-to-react-native "^3.0.0" - hoist-non-react-statics "^3.0.0" - shallowequal "^1.1.0" - supports-color "^5.5.0" - sudo-prompt@^9.0.0: version "9.2.1" resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz" integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw== -sumchecker@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz" - integrity sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg== - dependencies: - debug "^4.1.0" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -10245,33 +7951,6 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -tar@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz" - integrity sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA== - dependencies: - block-stream "*" - fstream "^1.0.12" - inherits "2" - -tar@^4: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - -tarn@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tarn/-/tarn-2.0.0.tgz" - integrity sha512-7rNMCZd3s9bhQh47ksAQd92ADFcJUjjbyOvyFjNLwTPpGieFHMC84S+LOzw0fx1uh6hnDz/19r8CPMnIjJlMMA== - temp@0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz" @@ -10320,26 +7999,11 @@ through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -ticky@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ticky/-/ticky-1.0.1.tgz" - integrity sha1-t8+nHnaPHJAAxJe5FRswlHxQ5G0= - -tildify@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tildify/-/tildify-2.0.0.tgz" - integrity sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw== - time-stamp@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz" integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= -tiny-warning@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz" - integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz" @@ -10364,11 +8028,6 @@ to-object-path@^0.3.0: dependencies: kind-of "^3.0.2" -to-readable-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz" - integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== - to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz" @@ -10423,20 +8082,6 @@ tr46@^2.0.2: dependencies: punycode "^2.1.1" -truncate-utf8-bytes@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz" - integrity sha1-QFkjkJWS1W94pYGENLC3hInKXys= - dependencies: - utf8-byte-length "^1.0.1" - -ts-invariant@^0.4.0: - version "0.4.4" - resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz" - integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== - dependencies: - tslib "^1.9.3" - ts-toolbelt@^8.0.7: version "8.0.7" resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-8.0.7.tgz" @@ -10447,7 +8092,7 @@ tslib@1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz" integrity sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ== -tslib@^1.10.0, tslib@^1.13.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.3: +tslib@^1.13.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1: version "1.13.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== @@ -10567,11 +8212,6 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -tunnel@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz" - integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== - tween-functions@^1.0.1: version "1.2.0" resolved "https://registry.yarnpkg.com/tween-functions/-/tween-functions-1.2.0.tgz#1ae3a50e7c60bb3def774eac707acbca73bbc3ff" @@ -10599,11 +8239,6 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== -type-fest@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz" - integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== - type-fest@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz" @@ -10619,14 +8254,6 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" @@ -10649,10 +8276,10 @@ typescript@3.2.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz" integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg== -typescript@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz" - integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== +typescript@4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== ua-parser-js@^0.7.18: version "0.7.21" @@ -10667,21 +8294,11 @@ uglify-es@^3.1.9: commander "~2.13.0" source-map "~0.6.1" -uid-number@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz" - integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= - ultron@1.0.x: version "1.0.2" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz" integrity sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po= -unc-path-regex@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz" - integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= - unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz" @@ -10720,7 +8337,7 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= @@ -10745,17 +8362,10 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -use-debounce@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/use-debounce/-/use-debounce-5.1.0.tgz" - integrity sha512-fU7O7iel2bA19fxSiPfRkieVGxrow503phSUAGZ/EqiJtCPrU9AdUdrKOAdgh803IrjdIzhj+8eDsDGn4OPy8g== +use-debounce@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/use-debounce/-/use-debounce-5.2.0.tgz#3cb63f5c46f40092c570356e441dbc016ffb2f8b" + integrity sha512-lW4tbPsTnvPKYqOYXp5xZ7SP7No/ARLqqQqoyRKuSzP0HxR9arhSAhznXUZFoNPWDRij8fog+N6sYbjb8c3kzw== use-memo-one@^1.1.1: version "1.1.1" @@ -10774,11 +8384,6 @@ use@^3.1.0: resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== -utf8-byte-length@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz" - integrity sha1-9F8VDExm7uloGGUFq5P8u4rWv2E= - utf8@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz" @@ -10794,17 +8399,12 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz" - integrity sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g== - uuid@3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz" integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA== -uuid@^3.1.0, uuid@^3.3.2, uuid@^3.3.3: +uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -10823,13 +8423,6 @@ v8-to-istanbul@^7.0.0: convert-source-map "^1.6.0" source-map "^0.7.3" -v8flags@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz" - integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg== - dependencies: - homedir-polyfill "^1.0.1" - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" @@ -10845,7 +8438,7 @@ varuint-bitcoin@^1.0.4: dependencies: safe-buffer "^5.1.1" -vary@^1, vary@~1.1.2: +vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= @@ -10940,7 +8533,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1, which@^1.2.14, which@^1.2.9: +which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -10954,13 +8547,6 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - wif@^2.0.1: version "2.0.6" resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz" @@ -11095,16 +8681,6 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yaml@^1.7.2: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== - yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz" @@ -11195,24 +8771,3 @@ yargs@^15.1.0: which-module "^2.0.0" y18n "^4.0.0" yargs-parser "^18.1.1" - -yauzl@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - -zen-observable-ts@^0.8.21: - version "0.8.21" - resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz" - integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg== - dependencies: - tslib "^1.9.3" - zen-observable "^0.8.0" - -zen-observable@^0.8.0: - version "0.8.15" - resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz" - integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==