diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bb5085..a45394f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## [0.31.0] + +#### APIs Changed: + +- `BumpFeeTxBuilder.allowShrinking()` now takes a `Script` as its argument. +- The `Address` constructor now takes a `Network` argument. +- The `Payload::PubkeyHash` and `Payload::ScriptHash` now have string arguments instead of byte arrays. + +#### APIs Added: + +- The `Address` type now has the `isValidForNetwork()` method. + +## [0.30.0] + +#### APIs added + +- Added `BIP-86` descriptor templates + ## [0.29.0] #### APIs added diff --git a/README.md b/README.md index 8ac598f..e4a430f 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ cd ios && pod install ```ts import { DescriptorSecretKey, Mnemonic, Blockchain, Wallet, DatabaseConfig, Descriptor } from 'bdk-rn'; -import { WordCount, Network } from 'bdk-rn/lib/lib/enums'; +import { WordCount, Network, KeychainKind } from 'bdk-rn/lib/lib/enums'; // .... @@ -69,7 +69,7 @@ const config: BlockchainElectrumConfig = { sock5: null, retry: 5, timeout: 5, - stopGap: 100, + stopGap: 500, validateDomain: false, }; @@ -111,8 +111,10 @@ const dbConfig = await new DatabaseConfig().sqlite(`${RNFS.DocumentDirectoryPath ``` ### References: + - Setting up a local Esplora instance for testing: -https://bitcoin.stackexchange.com/questions/116937/how-do-i-setup-an-esplora-instance-for-local-testing/116938#116938 + https://bitcoin.stackexchange.com/questions/116937/how-do-i-setup-an-esplora-instance-for-local-testing/116938#116938 + --- _Note: Caution this is an Alpha at this stage diff --git a/__tests__/classes/Address.spec.ts b/__tests__/classes/Address.spec.ts index a96e613..56cf1dd 100644 --- a/__tests__/classes/Address.spec.ts +++ b/__tests__/classes/Address.spec.ts @@ -15,7 +15,7 @@ describe('Address', () => { const addressString = 'tb1qccmtnhczmv3a6k4mtq8twm7ltj3e32qsntmamv'; beforeAll(async () => { - address = await new Address().create('address'); + address = await new Address().create('address', Network.Testnet); }); afterEach(() => { jest.clearAllMocks(); @@ -69,4 +69,11 @@ describe('Address', () => { expect(res).toBe(addressString); expect(mockBdkRnModule.addressAsString).toHaveBeenCalledWith(address.id); }); + + it('verify addressIsValidForNetwork()', async () => { + mockBdkRnModule.addressIsValidForNetwork.mockResolvedValueOnce(true); + let res = await address.isValidForNetwork(Network.Testnet); + expect(res).toBe(true); + expect(mockBdkRnModule.addressIsValidForNetwork).toHaveBeenCalledWith(address.id, Network.Testnet); + }); }); diff --git a/__tests__/classes/BumpFeeTxBuilder.spec.ts b/__tests__/classes/BumpFeeTxBuilder.spec.ts index 3bae428..3da1d86 100644 --- a/__tests__/classes/BumpFeeTxBuilder.spec.ts +++ b/__tests__/classes/BumpFeeTxBuilder.spec.ts @@ -1,6 +1,6 @@ import { BumpFeeTxBuilder, DatabaseConfig, Descriptor, PartiallySignedTransaction, Wallet } from '../../src'; import { Network } from '../../src/lib/enums'; -import { mockWallet } from '../mockData'; +import { mockScript, mockWallet } from '../mockData'; import { mockBdkRnModule } from '../setup'; const id = 'instanceId'; @@ -27,9 +27,8 @@ describe('BumpFeeTxBuilder', () => { expect(bumpFeeTxBuilder).toBeInstanceOf(BumpFeeTxBuilder); }); it('should allow shrinking', async () => { - const address = 'address'; - await bumpFeeTxBuilder.allowShrinking(address); - expect(mockBdkRnModule.bumpFeeTxBuilderAllowShrinking).toHaveBeenCalledWith(id, address); + await bumpFeeTxBuilder.allowShrinking(mockScript); + expect(mockBdkRnModule.bumpFeeTxBuilderAllowShrinking).toHaveBeenCalledWith(id, mockScript.id); }); it('should enable rbf', async () => { await bumpFeeTxBuilder.enableRbf(); diff --git a/__tests__/setup.ts b/__tests__/setup.ts index 13d05b4..f4714e3 100644 --- a/__tests__/setup.ts +++ b/__tests__/setup.ts @@ -48,6 +48,7 @@ export const mockBdkRnModule = { addressNetwork: jest.fn(), addressToQrUri: jest.fn(), addressAsString: jest.fn(), + addressIsValidForNetwork: jest.fn(), addRecipient: jest.fn(), finish: jest.fn(), diff --git a/android/.classpath b/android/.classpath new file mode 100644 index 0000000..44b427a --- /dev/null +++ b/android/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/android/.project b/android/.project new file mode 100644 index 0000000..d2aa961 --- /dev/null +++ b/android/.project @@ -0,0 +1,34 @@ + + + bdk-rn + Project bdk-rn created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1706000397923 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..7e4e543 --- /dev/null +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments=--init-script /var/folders/77/pwdxzmrn7p53dyts2cw8s2ch0000gn/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/77/pwdxzmrn7p53dyts2cw8s2ch0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.1.1)) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=/Library/Java/JavaVirtualMachines/jdk-18.0.2.jdk/Contents/Home +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/android/.settings/org.eclipse.jdt.core.prefs b/android/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..65de196 --- /dev/null +++ b/android/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=16 +org.eclipse.jdt.core.compiler.compliance=16 +org.eclipse.jdt.core.compiler.source=16 diff --git a/android/build.gradle b/android/build.gradle index 67d41c0..fa1ff87 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -41,5 +41,5 @@ dependencies { implementation 'com.facebook.react:react-native:+' // bitcoindevkit - implementation 'org.bitcoindevkit:bdk-android:0.29.0' + implementation 'org.bitcoindevkit:bdk-android:0.31.0' } diff --git a/android/src/main/java/io/ltbl/bdkrn/BdkRnModule.kt b/android/src/main/java/io/ltbl/bdkrn/BdkRnModule.kt index ab8954e..2d9b988 100644 --- a/android/src/main/java/io/ltbl/bdkrn/BdkRnModule.kt +++ b/android/src/main/java/io/ltbl/bdkrn/BdkRnModule.kt @@ -1,8 +1,6 @@ package io.ltbl.bdkrn import com.facebook.react.bridge.* -import com.facebook.react.bridge.ReadableType -import com.facebook.react.bridge.Dynamic import com.facebook.react.bridge.UiThreadUtil.runOnUiThread import org.bitcoindevkit.* import org.bitcoindevkit.Descriptor.Companion.newBip44 @@ -11,6 +9,8 @@ import org.bitcoindevkit.Descriptor.Companion.newBip49 import org.bitcoindevkit.Descriptor.Companion.newBip49Public import org.bitcoindevkit.Descriptor.Companion.newBip84 import org.bitcoindevkit.Descriptor.Companion.newBip84Public +import org.bitcoindevkit.Descriptor.Companion.newBip86 +import org.bitcoindevkit.Descriptor.Companion.newBip86Public class BdkRnModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) { @@ -38,41 +38,49 @@ class BdkRnModule(reactContext: ReactApplicationContext) : /** Mnemonic methods starts */ @ReactMethod fun generateSeedFromWordCount(wordCount: Int, result: Promise) { - val response = Mnemonic(setWordCount(wordCount)) - result.resolve(response.asString()) + Thread { + val response = Mnemonic(setWordCount(wordCount)) + result.resolve(response.asString()) + }.start() } @ReactMethod fun generateSeedFromString(mnemonic: String, result: Promise) { - try { - val response = Mnemonic.fromString(mnemonic) - result.resolve(response.asString()) - } catch (error: Throwable) { - return result.reject("Generate seed error", error.localizedMessage, error) - } + Thread { + try { + val response = Mnemonic.fromString(mnemonic) + result.resolve(response.asString()) + } catch (error: Throwable) { + result.reject("Generate seed error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun generateSeedFromEntropy(entropy: ReadableArray, result: Promise) { - try { - val response = Mnemonic.fromEntropy(getEntropy(entropy)) - result.resolve(response.asString()) - } catch (error: Throwable) { - return result.reject("Generate seed error", error.localizedMessage, error) - } + Thread { + try { + val response = Mnemonic.fromEntropy(getEntropy(entropy)) + result.resolve(response.asString()) + } catch (error: Throwable) { + result.reject("Generate seed error", error.localizedMessage, error) + } + }.start() } /** Mnemonic methods ends */ /** Derviation path methods starts */ @ReactMethod fun createDerivationPath(path: String, result: Promise) { - try { - val id = randomId() - _derivationPaths[id] = DerivationPath(path) - result.resolve(id) - } catch (error: Throwable) { - return result.reject("Create Derivation path error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _derivationPaths[id] = DerivationPath(path) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create Derivation path error", error.localizedMessage, error) + } + }.start() } /** Derviation path methods ends */ @@ -81,94 +89,118 @@ class BdkRnModule(reactContext: ReactApplicationContext) : fun createDescriptorSecret( network: String, mnemonic: String, password: String? = null, result: Promise ) { - try { - val id = randomId() - _descriptorSecretKeys[id] = - DescriptorSecretKey(setNetwork(network), Mnemonic.fromString(mnemonic), password) - result.resolve(id) - } catch (error: Throwable) { - return result.reject("DescriptorSecret create error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptorSecretKeys[id] = + DescriptorSecretKey( + setNetwork(network), + Mnemonic.fromString(mnemonic), + password + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("DescriptorSecret create error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun descriptorSecretDerive(secretKeyId: String, derivationPathId: String, result: Promise) { - try { - val keyInfo = - _descriptorSecretKeys[secretKeyId]!!.derive(_derivationPaths[derivationPathId]!!) - result.resolve(keyInfo.asString()) - } catch (error: Throwable) { - return result.reject("DescriptorSecret derive error", error.localizedMessage, error) - } + Thread { + try { + val keyInfo = + _descriptorSecretKeys[secretKeyId]!!.derive(_derivationPaths[derivationPathId]!!) + result.resolve(keyInfo.asString()) + } catch (error: Throwable) { + result.reject("DescriptorSecret derive error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun descriptorSecretExtend(secretKeyId: String, derivationPathId: String, result: Promise) { - try { - val keyInfo = - _descriptorSecretKeys[secretKeyId]!!.extend(_derivationPaths[derivationPathId]!!) - result.resolve(keyInfo.asString()) - } catch (error: Throwable) { - return result.reject("DescriptorSecret extend error", error.localizedMessage, error) - } + Thread { + try { + val keyInfo = + _descriptorSecretKeys[secretKeyId]!!.extend(_derivationPaths[derivationPathId]!!) + result.resolve(keyInfo.asString()) + } catch (error: Throwable) { + result.reject("DescriptorSecret extend error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun descriptorSecretAsPublic(secretKeyId: String, result: Promise) { - val id = randomId() - _descriptorPublicKeys[id] = _descriptorSecretKeys[secretKeyId]!!.asPublic() - result.resolve(id) + Thread { + val id = randomId() + _descriptorPublicKeys[id] = _descriptorSecretKeys[secretKeyId]!!.asPublic() + result.resolve(id) + }.start() } @ReactMethod fun descriptorSecretAsString(secretKeyId: String, result: Promise) { - result.resolve(_descriptorSecretKeys[secretKeyId]!!.asString()) + Thread { + result.resolve(_descriptorSecretKeys[secretKeyId]!!.asString()) + }.start() } @ReactMethod fun descriptorSecretAsSecretBytes(secretKeyId: String, result: Promise) { - val scretBytes = _descriptorSecretKeys[secretKeyId]!!.secretBytes() - result.resolve(makeNativeArray(scretBytes)) + Thread { + val secretBytes = _descriptorSecretKeys[secretKeyId]!!.secretBytes() + result.resolve(makeNativeArray(secretBytes)) + }.start() } /** Descriptor secret key methods ends */ /** Descriptor public key methods starts */ @ReactMethod fun createDescriptorPublic(publicKey: String, result: Promise) { - try { - val id = randomId() - _descriptorPublicKeys[id] = DescriptorPublicKey.fromString(publicKey) - result.resolve(id) - } catch (error: Throwable) { - return result.reject("DescriptorPublic create error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptorPublicKeys[id] = DescriptorPublicKey.fromString(publicKey) + result.resolve(id) + } catch (error: Throwable) { + result.reject("DescriptorPublic create error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun descriptorPublicDerive(publicKeyId: String, derivationPathId: String, result: Promise) { - try { - val keyInfo = - _descriptorPublicKeys[publicKeyId]!!.derive(_derivationPaths[derivationPathId]!!) - result.resolve(keyInfo.asString()) - } catch (error: Throwable) { - return result.reject("DescriptorPublic derive error", error.localizedMessage, error) - } + Thread { + try { + val keyInfo = + _descriptorPublicKeys[publicKeyId]!!.derive(_derivationPaths[derivationPathId]!!) + result.resolve(keyInfo.asString()) + } catch (error: Throwable) { + result.reject("DescriptorPublic derive error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun descriptorPublicExtend(publicKeyId: String, derivationPathId: String, result: Promise) { - try { - val keyInfo = - _descriptorPublicKeys[publicKeyId]!!.extend(_derivationPaths[derivationPathId]!!) - result.resolve(keyInfo.asString()) - } catch (error: Throwable) { - return result.reject("DescriptorPublic extend error", error.localizedMessage, error) - } + Thread { + try { + val keyInfo = + _descriptorPublicKeys[publicKeyId]!!.extend(_derivationPaths[derivationPathId]!!) + result.resolve(keyInfo.asString()) + } catch (error: Throwable) { + result.reject("DescriptorPublic extend error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun descriptorPublicAsString(publicKeyId: String, result: Promise) { - result.resolve(_descriptorPublicKeys[publicKeyId]!!.asString()) + Thread { + result.resolve(_descriptorPublicKeys[publicKeyId]!!.asString()) + }.start() } /** Descriptor public key methods ends */ @@ -188,23 +220,25 @@ class BdkRnModule(reactContext: ReactApplicationContext) : validateDomain: Boolean, result: Promise ) { - try { - val _blockchainConfig = BlockchainConfig.Electrum( - ElectrumConfig( - url, - sock5 ?: null, - retry.toUByte(), - timeout.toUByte(), - stopGap.toULong(), - validateDomain + Thread { + try { + val _blockchainConfig = BlockchainConfig.Electrum( + ElectrumConfig( + url, + sock5 ?: null, + retry.toUByte(), + timeout.toUByte(), + stopGap.toULong(), + validateDomain + ) ) - ) - val blockChainId = randomId() - _blockChains[blockChainId] = Blockchain(_blockchainConfig) - result.resolve(blockChainId) - } catch (error: Throwable) { - return result.reject("BlockchainElectrum init error", error.localizedMessage, error) - } + val blockChainId = randomId() + _blockChains[blockChainId] = Blockchain(_blockchainConfig) + result.resolve(blockChainId) + } catch (error: Throwable) { + result.reject("BlockchainElectrum init error", error.localizedMessage, error) + } + }.start() } @@ -217,103 +251,119 @@ class BdkRnModule(reactContext: ReactApplicationContext) : timeout: Int, result: Promise ) { - try { - val _blockchainConfig = BlockchainConfig.Esplora( - EsploraConfig( - baseUrl, - proxy ?: null, - concurrency.toUByte(), - stopGap.toULong(), - timeout.toULong(), + Thread { + try { + val _blockchainConfig = BlockchainConfig.Esplora( + EsploraConfig( + baseUrl, + proxy ?: null, + concurrency.toUByte(), + stopGap.toULong(), + timeout.toULong(), + ) ) - ) - val blockChainId = randomId() - _blockChains[blockChainId] = Blockchain(_blockchainConfig) - result.resolve(blockChainId) - } catch (error: Throwable) { - return result.reject("BlockchainEsplora init error", error.localizedMessage, error) - } + val blockChainId = randomId() + _blockChains[blockChainId] = Blockchain(_blockchainConfig) + result.resolve(blockChainId) + } catch (error: Throwable) { + result.reject("BlockchainEsplora init error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun initRpcBlockchain(config: ReadableMap, result: Promise) { - try { - var authType: Auth = Auth.None - if (config.getString("authCookie") != null) { - authType = Auth.Cookie(config.getString("authCookie")!!) - } + Thread { + try { + var authType: Auth = Auth.None + if (config.getString("authCookie") != null) { + authType = Auth.Cookie(config.getString("authCookie")!!) + } - if (config.getMap("authUserPass") != null) { - val userPass = config.getMap("authUserPass") as ReadableMap - authType = Auth.UserPass( - userPass.getString("username")!!, - userPass.getString("password")!! - ) - } - var syncParams: RpcSyncParams? = null - if (config.getMap("syncParams") != null) { - val syncParamsConfig = config.getMap("syncParams") as ReadableMap - syncParams = RpcSyncParams( - syncParamsConfig.getInt("startScriptCount").toULong()!!, - syncParamsConfig.getInt("startTime").toULong()!!, - syncParamsConfig.getBoolean("forceStartTime"), - syncParamsConfig.getInt("pollRateSec").toULong()!!, - ) - } + if (config.getMap("authUserPass") != null) { + val userPass = config.getMap("authUserPass") as ReadableMap + authType = Auth.UserPass( + userPass.getString("username")!!, + userPass.getString("password")!! + ) + } + var syncParams: RpcSyncParams? = null + if (config.getMap("syncParams") != null) { + val syncParamsConfig = config.getMap("syncParams") as ReadableMap + syncParams = RpcSyncParams( + syncParamsConfig.getInt("startScriptCount").toULong()!!, + syncParamsConfig.getInt("startTime").toULong()!!, + syncParamsConfig.getBoolean("forceStartTime"), + syncParamsConfig.getInt("pollRateSec").toULong()!!, + ) + } - val _blockchainConfig = BlockchainConfig.Rpc( - RpcConfig( - config.getString("url")!!, - authType, - setNetwork(config.getString("network")!!), - config.getString("walletName")!!, - syncParams + val _blockchainConfig = BlockchainConfig.Rpc( + RpcConfig( + config.getString("url")!!, + authType, + setNetwork(config.getString("network")!!), + config.getString("walletName")!!, + syncParams + ) ) - ) - val blockChainId = randomId() - _blockChains[blockChainId] = Blockchain(_blockchainConfig) - result.resolve(blockChainId) - } catch (error: Throwable) { - return result.reject("BlockchainRpc init error", error.localizedMessage, error) - } + val blockChainId = randomId() + _blockChains[blockChainId] = Blockchain(_blockchainConfig) + result.resolve(blockChainId) + } catch (error: Throwable) { + result.reject("BlockchainRpc init error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun getBlockchainHeight(id: String, result: Promise) { - try { - result.resolve(getBlockchainById(id).getHeight().toInt()) - } catch (error: Throwable) { - return result.reject("Blockchain get height error", error.localizedMessage, error) - } + Thread { + try { + result.resolve(getBlockchainById(id).getHeight().toInt()) + } catch (error: Throwable) { + result.reject("Blockchain get height error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun getBlockchainHash(id: String, height: Int, result: Promise) { - try { - result.resolve(getBlockchainById(id).getBlockHash(height.toUInt())) - } catch (error: Throwable) { - return result.reject("Blockchain get block hash error", error.localizedMessage, error) - } + Thread { + try { + result.resolve(getBlockchainById(id).getBlockHash(height.toUInt())) + } catch (error: Throwable) { + result.reject( + "Blockchain get block hash error", + error.localizedMessage, + error + ) + } + }.start() } @ReactMethod fun broadcast(id: String, txId: String, result: Promise) { - try { - getBlockchainById(id).broadcast(_transactions[txId]!!) - result.resolve(true) - } catch (error: Throwable) { - return result.reject("Broadcast transaction error", error.localizedMessage, error) - } + Thread { + try { + getBlockchainById(id).broadcast(_transactions[txId]!!) + result.resolve(true) + } catch (error: Throwable) { + result.reject("Broadcast transaction error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun estimateFee(id: String, target: Int, result: Promise) { - try { - val fee = getBlockchainById(id).estimateFee(target.toULong()) - result.resolve(fee.asSatPerVb()) - } catch (error: Throwable) { - return result.reject("Estimate Fee error", error.localizedMessage, error) - } + Thread { + try { + val fee = getBlockchainById(id).estimateFee(target.toULong()) + result.resolve(fee.asSatPerVb()) + } catch (error: Throwable) { + result.reject("Estimate Fee error", error.localizedMessage, error) + } + }.start() } /** Blockchain methods ends */ @@ -321,23 +371,29 @@ class BdkRnModule(reactContext: ReactApplicationContext) : /** DB configuration methods starts*/ @ReactMethod fun memoryDBInit(result: Promise) { - val id = randomId() - _databaseConfigs[id] = DatabaseConfig.Memory - result.resolve(id) + Thread { + val id = randomId() + _databaseConfigs[id] = DatabaseConfig.Memory + result.resolve(id) + }.start() } @ReactMethod fun sledDBInit(path: String, treeName: String, result: Promise) { - val id = randomId() - _databaseConfigs[id] = DatabaseConfig.Sled(SledDbConfiguration(path, treeName)) - result.resolve(id) + Thread { + val id = randomId() + _databaseConfigs[id] = DatabaseConfig.Sled(SledDbConfiguration(path, treeName)) + result.resolve(id) + }.start() } @ReactMethod fun sqliteDBInit(path: String, result: Promise) { - val id = randomId() - _databaseConfigs[id] = DatabaseConfig.Sqlite(SqliteDbConfiguration(path)) - result.resolve(id) + Thread { + val id = randomId() + _databaseConfigs[id] = DatabaseConfig.Sqlite(SqliteDbConfiguration(path)) + result.resolve(id) + }.start() } /** DB configuration methods ends*/ @@ -357,13 +413,17 @@ class BdkRnModule(reactContext: ReactApplicationContext) : ) { try { val id = randomId() - _wallets[id] = Wallet( - _descriptors[descriptor]!!, - if (changeDescriptor != null) _descriptors[changeDescriptor]!! else null, - setNetwork(network), - _databaseConfigs[dbConfigID]!! - ) - result.resolve(id) + val nativeDescriptor = _descriptors[descriptor]!! + val nativeChangeDescriptor = if (changeDescriptor != null) _descriptors[changeDescriptor]!! else null + Thread { + _wallets[id] = Wallet( + nativeDescriptor, + nativeChangeDescriptor, + setNetwork(network), + _databaseConfigs[dbConfigID]!! + ) + result.resolve(id) + }.start() } catch (error: Throwable) { result.reject("Init wallet error", error.localizedMessage, error) } @@ -386,18 +446,22 @@ class BdkRnModule(reactContext: ReactApplicationContext) : Thread { try { val randomId = randomId() + var resolvedIndex: Any = "new" when (val type = addressIndex.getType()) { ReadableType.String -> { resolvedIndex = (addressIndex as Dynamic).asString() ?: "new" } + ReadableType.Number -> { resolvedIndex = (addressIndex as Dynamic).asDouble() ?: "new" } + else -> { resolvedIndex = setAddressIndex("new") } } + val addressInfo = getWalletById(id).getAddress(setAddressIndex(resolvedIndex)) _addresses[randomId] = addressInfo.address val responseObject = mutableMapOf() @@ -421,13 +485,16 @@ class BdkRnModule(reactContext: ReactApplicationContext) : ReadableType.String -> { resolvedIndex = (addressIndex as Dynamic).asString() ?: "new" } + ReadableType.Number -> { resolvedIndex = (addressIndex as Dynamic).asDouble() ?: "new" } + else -> { resolvedIndex = setAddressIndex("new") } } + val addressInfo = getWalletById(id).getInternalAddress(setAddressIndex(resolvedIndex)) _addresses[randomId] = addressInfo.address val responseObject = mutableMapOf() @@ -443,11 +510,13 @@ class BdkRnModule(reactContext: ReactApplicationContext) : @ReactMethod fun isMine(id: String, scriptId: String, result: Promise) { - try { - result.resolve(getWalletById(id).isMine(_scripts[scriptId]!!)) - } catch (error: Throwable) { - result.reject("Get isMine error", error.localizedMessage, error) - } + Thread { + try { + result.resolve(getWalletById(id).isMine(_scripts[scriptId]!!)) + } catch (error: Throwable) { + result.reject("Get isMine error", error.localizedMessage, error) + } + }.start() } @ReactMethod @@ -456,11 +525,11 @@ class BdkRnModule(reactContext: ReactApplicationContext) : try { val balance = getWalletById(id).getBalance() val responseObject = mutableMapOf() - responseObject["trustedPending"] = balance.trustedPending.toInt() - responseObject["untrustedPending"] = balance.untrustedPending.toInt() - responseObject["confirmed"] = balance.confirmed.toInt() - responseObject["spendable"] = balance.spendable.toInt() - responseObject["total"] = balance.total.toInt() + responseObject["trustedPending"] = balance.trustedPending.toDouble() + responseObject["untrustedPending"] = balance.untrustedPending.toDouble() + responseObject["confirmed"] = balance.confirmed.toDouble() + responseObject["spendable"] = balance.spendable.toDouble() + responseObject["total"] = balance.total.toDouble() result.resolve(Arguments.makeNativeMap(responseObject)) } catch (error: Throwable) { result.reject("Get wallet balance error", error.localizedMessage, error) @@ -470,8 +539,10 @@ class BdkRnModule(reactContext: ReactApplicationContext) : @ReactMethod fun getNetwork(id: String, result: Promise) { - val network = getWalletById(id).network() - result.resolve(getNetworkString(network)) + Thread { + val network = getWalletById(id).network() + result.resolve(getNetworkString(network)) + }.start() } @ReactMethod @@ -497,95 +568,120 @@ class BdkRnModule(reactContext: ReactApplicationContext) : @ReactMethod fun listTransactions(id: String, includeRaw: Boolean, result: Promise) { - try { - val list = getWalletById(id).listTransactions(includeRaw) - val transactions: MutableList> = mutableListOf() - for (item in list) { - var txObject = getTransactionObject(item) - if (item.transaction != null) { - val randomId = randomId() - _transactions[randomId] = item.transaction!! - txObject["transaction"] = randomId - } else { - txObject["transaction"] = false + Thread { + try { + val list = getWalletById(id).listTransactions(includeRaw) + val transactions: MutableList> = mutableListOf() + for (item in list) { + var txObject = getTransactionObject(item) + if (item.transaction != null) { + val randomId = randomId() + _transactions[randomId] = item.transaction!! + txObject["transaction"] = randomId + } else { + txObject["transaction"] = false + } + transactions.add(txObject) } - transactions.add(txObject) + result.resolve(Arguments.makeNativeArray(transactions)) + } catch (error: Throwable) { + result.reject("List transactions error", error.localizedMessage, error) } - result.resolve(Arguments.makeNativeArray(transactions)) - } catch (error: Throwable) { - result.reject("List transactions error", error.localizedMessage, error) - } + }.start() } @ReactMethod fun sign(id: String, psbtBase64: String, signOptions: ReadableMap? = null, result: Promise) { - try { - var options: SignOptions? = null - if (signOptions != null) options = createSignOptions(signOptions) + Thread { + try { + var options: SignOptions? = null + if (signOptions != null) options = createSignOptions(signOptions) - val psbt = PartiallySignedTransaction(psbtBase64) - getWalletById(id).sign(psbt, options) - result.resolve(psbt.serialize()) - } catch (error: Throwable) { - result.reject("Sign PSBT error", error.localizedMessage, error) - } + val psbt = PartiallySignedTransaction(psbtBase64) + getWalletById(id).sign(psbt, options) + result.resolve(psbt.serialize()) + } catch (error: Throwable) { + result.reject("Sign PSBT error", error.localizedMessage, error) + } + }.start() } /** Wallet methods ends*/ /** Address methods starts*/ @ReactMethod - fun initAddress(address: String, result: Promise) { - try { - val id = randomId() - _addresses[id] = Address(address) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Address error", error.localizedMessage, error) - } + fun initAddress(address: String, network: String, result: Promise) { + Thread { + try { + val id = randomId() + _addresses[id] = Address(address, setNetwork(network)) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Address error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun addressFromScript(scriptId: String, network: String, result: Promise) { - try { - val id = randomId() - _addresses[id] = Address.fromScript(_scripts[scriptId]!!, setNetwork(network)) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Address from script error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _addresses[id] = Address.fromScript(_scripts[scriptId]!!, setNetwork(network)) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Address from script error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun addressToScriptPubkeyHex(id: String, result: Promise) { - val scriptId = randomId() - _scripts[scriptId] = _addresses[id]!!.scriptPubkey() - result.resolve(scriptId) + Thread { + val scriptId = randomId() + _scripts[scriptId] = _addresses[id]!!.scriptPubkey() + result.resolve(scriptId) + }.start() } @ReactMethod fun addressPayload(id: String, result: Promise) { - val pay = _addresses[id]!!.payload() - result.resolve(Arguments.makeNativeMap(getPayload(pay))) + Thread { + val pay = _addresses[id]!!.payload() + result.resolve(Arguments.makeNativeMap(getPayload(pay))) + }.start() } @ReactMethod fun addressNetwork(id: String, result: Promise) { - result.resolve(getNetworkString(_addresses[id]!!.network())) + Thread { + result.resolve(getNetworkString(_addresses[id]!!.network())) + }.start() } @ReactMethod fun addressToQrUri(id: String, result: Promise) { - result.resolve(_addresses[id]!!.toQrUri()) + Thread { + result.resolve(_addresses[id]!!.toQrUri()) + }.start() } @ReactMethod fun addressAsString(id: String, result: Promise) { - try { - result.resolve(_addresses[id]!!.asString()) - } catch (error: Throwable) { - result.reject("Couldn't parse address string", error.localizedMessage, error) - } + Thread { + try { + result.resolve(_addresses[id]!!.asString()) + } catch (error: Throwable) { + result.reject("Couldn't parse address string", error.localizedMessage, error) + } + }.start() + } + + @ReactMethod + fun addressIsValidForNetwork(id: String, network: String, result: Promise) { + Thread { + result.resolve(_addresses[id]!!.isValidForNetwork(setNetwork(network))) + }.start() } /** Address methods ends*/ @@ -594,186 +690,230 @@ class BdkRnModule(reactContext: ReactApplicationContext) : /** TxBuilder methods starts */ @ReactMethod fun createTxBuilder(result: Promise) { - val id = randomId() - _txBuilders[id] = TxBuilder() - result.resolve(id) + Thread { + val id = randomId() + _txBuilders[id] = TxBuilder() + result.resolve(id) + }.start() } @ReactMethod fun addRecipient(id: String, scriptId: String, amount: Int, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.addRecipient(_scripts[scriptId]!!, amount.toULong()) - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.addRecipient(_scripts[scriptId]!!, amount.toULong()) + result.resolve(true) + }.start() } // `addUnspendable` @ReactMethod fun addUnspendable(id: String, outPoint: ReadableMap, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.addUnspendable(createOutPoint(outPoint)) - result.resolve(true) - } + Thread { + _txBuilders[id] = _txBuilders[id]!!.addUnspendable(createOutPoint(outPoint)) + result.resolve(true) + }.start() + } // `addUtxo` @ReactMethod fun addUtxo(id: String, outPoint: ReadableMap, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.addUtxo(createOutPoint(outPoint)) - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.addUtxo(createOutPoint(outPoint)) + result.resolve(true) + }.start() } // `addUtxos` @ReactMethod fun addUtxos(id: String, outPoints: ReadableArray, result: Promise) { - val mappedOutPoints: MutableList = mutableListOf() - for (i in 0 until outPoints.size()) - mappedOutPoints.add(createOutPoint(outPoints.getMap(i))) - _txBuilders[id] = _txBuilders[id]!!.addUtxos(mappedOutPoints) - result.resolve(true) + Thread { + val mappedOutPoints: MutableList = mutableListOf() + for (i in 0 until outPoints.size()) + mappedOutPoints.add(createOutPoint(outPoints.getMap(i))) + _txBuilders[id] = _txBuilders[id]!!.addUtxos(mappedOutPoints) + result.resolve(true) + }.start() } // `doNotSpendChange` @ReactMethod fun doNotSpendChange(id: String, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.doNotSpendChange() - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.doNotSpendChange() + result.resolve(true) + }.start() } // `manuallySelectedOnly` @ReactMethod fun manuallySelectedOnly(id: String, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.manuallySelectedOnly() - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.manuallySelectedOnly() + result.resolve(true) + }.start() } // `onlySpendChange` @ReactMethod fun onlySpendChange(id: String, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.onlySpendChange() - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.onlySpendChange() + result.resolve(true) + }.start() } // `unspendable` @ReactMethod fun unspendable(id: String, outPoints: ReadableArray, result: Promise) { - val mappedOutPoints: MutableList = mutableListOf() - for (i in 0 until outPoints.size()) - mappedOutPoints.add(createOutPoint(outPoints.getMap(i))) - _txBuilders[id] = _txBuilders[id]!!.unspendable(mappedOutPoints) - result.resolve(true) + Thread { + val mappedOutPoints: MutableList = mutableListOf() + for (i in 0 until outPoints.size()) + mappedOutPoints.add(createOutPoint(outPoints.getMap(i))) + _txBuilders[id] = _txBuilders[id]!!.unspendable(mappedOutPoints) + result.resolve(true) + }.start() } // `feeRate` @ReactMethod fun feeRate(id: String, feeRate: Int, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.feeRate(feeRate.toFloat()) - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.feeRate(feeRate.toFloat()) + result.resolve(true) + }.start() } // `feeAbsolute` @ReactMethod fun feeAbsolute(id: String, feeRate: Int, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.feeAbsolute(feeRate.toULong()) - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.feeAbsolute(feeRate.toULong()) + result.resolve(true) + }.start() } // `drainWallet` @ReactMethod fun drainWallet(id: String, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.drainWallet() - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.drainWallet() + result.resolve(true) + }.start() } // `drainTo` @ReactMethod fun drainTo(id: String, scriptId: String, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.drainTo(_scripts[scriptId]!!) - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.drainTo(_scripts[scriptId]!!) + result.resolve(true) + }.start() } // `enableRbf` @ReactMethod fun enableRbf(id: String, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.enableRbf() - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.enableRbf() + result.resolve(true) + }.start() } // `enableRbfWithSequence` @ReactMethod fun enableRbfWithSequence(id: String, nsequence: Int, result: Promise) { - _txBuilders[id] = _txBuilders[id]!!.enableRbfWithSequence(nsequence.toUInt()) - result.resolve(true) + Thread { + _txBuilders[id] = _txBuilders[id]!!.enableRbfWithSequence(nsequence.toUInt()) + result.resolve(true) + }.start() } // `addData` @ReactMethod fun addData(id: String, data: ReadableArray, result: Promise) { - var dataList: MutableList = mutableListOf() - for (i in 0 until data.size()) dataList.add(data.getInt(i).toUByte()) - _txBuilders[id] = _txBuilders[id]!!.addData(dataList) - result.resolve(true) + Thread { + var dataList: MutableList = mutableListOf() + for (i in 0 until data.size()) dataList.add(data.getInt(i).toUByte()) + _txBuilders[id] = _txBuilders[id]!!.addData(dataList) + result.resolve(true) + }.start() } // `setRecipients` @ReactMethod fun setRecipients(id: String, recipients: ReadableArray, result: Promise) { - var scriptAmounts: MutableList = mutableListOf() - for (i in 0 until recipients.size()) { - val item = recipients.getMap(i) - val amount = item.getInt("amount").toULong() - val scriptId = item.getMap("script")!!.getString("id") - val scriptAmount = ScriptAmount(_scripts[scriptId]!!, amount) - scriptAmounts.add(scriptAmount) - } - _txBuilders[id] = _txBuilders[id]!!.setRecipients(scriptAmounts) - result.resolve(true) + Thread { + var scriptAmounts: MutableList = mutableListOf() + for (i in 0 until recipients.size()) { + val item = recipients.getMap(i) + val amount = item.getInt("amount").toULong() + val scriptId = item.getMap("script")!!.getString("id") + val scriptAmount = ScriptAmount(_scripts[scriptId]!!, amount) + scriptAmounts.add(scriptAmount) + } + _txBuilders[id] = _txBuilders[id]!!.setRecipients(scriptAmounts) + result.resolve(true) + }.start() } @ReactMethod fun finish(id: String, walletId: String, result: Promise) { - try { - val details = _txBuilders[id]?.finish(getWalletById(walletId)) - val responseObject = getPSBTObject(details) - result.resolve(Arguments.makeNativeMap(responseObject)) - } catch (error: Throwable) { - result.reject("Finish tx error", error.localizedMessage, error) - } + Thread { + try { + val details = _txBuilders[id]?.finish(getWalletById(walletId)) + val responseObject = getPSBTObject(details) + result.resolve(Arguments.makeNativeMap(responseObject)) + } catch (error: Throwable) { + result.reject("Finish tx error", error.localizedMessage, error) + } + }.start() } /** TxBuilder methods ends */ /** Descriptor Templates method starts */ @ReactMethod fun createDescriptor(descriptor: String, network: String, result: Promise) { - try { - val id = randomId() - _descriptors[id] = Descriptor(descriptor, setNetwork(network)) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Create Descriptor error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptors[id] = Descriptor(descriptor, setNetwork(network)) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create Descriptor error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun descriptorAsString(descriptorId: String, result: Promise) { - result.resolve(_descriptors[descriptorId]!!.asString()) + Thread { + result.resolve(_descriptors[descriptorId]!!.asString()) + }.start() } @ReactMethod fun descriptorAsStringPrivate(descriptorId: String, result: Promise) { - result.resolve(_descriptors[descriptorId]!!.asStringPrivate()) + Thread { + result.resolve(_descriptors[descriptorId]!!.asStringPrivate()) + }.start() } @ReactMethod fun newBip44(secretKeyId: String, keychain: String, network: String, result: Promise) { - try { - val id = randomId() - _descriptors[id] = newBip44( - _descriptorSecretKeys[secretKeyId]!!, - setKeychainKind(keychain), - setNetwork(network) - ) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Create bip44 error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptors[id] = newBip44( + _descriptorSecretKeys[secretKeyId]!!, + setKeychainKind(keychain), + setNetwork(network) + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create bip44 error", error.localizedMessage, error) + } + }.start() } @ReactMethod @@ -784,33 +924,37 @@ class BdkRnModule(reactContext: ReactApplicationContext) : network: String, result: Promise ) { - try { - val id = randomId() - _descriptors[id] = newBip44Public( - _descriptorPublicKeys[publicKeyId]!!, - fingerprint, - setKeychainKind(keychain), - setNetwork(network) - ) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Create bip44Public error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptors[id] = newBip44Public( + _descriptorPublicKeys[publicKeyId]!!, + fingerprint, + setKeychainKind(keychain), + setNetwork(network) + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create bip44Public error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun newBip49(secretKeyId: String, keychain: String, network: String, result: Promise) { - try { - val id = randomId() - _descriptors[id] = newBip49( - _descriptorSecretKeys[secretKeyId]!!, - setKeychainKind(keychain), - setNetwork(network) - ) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Create bip49 error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptors[id] = newBip49( + _descriptorSecretKeys[secretKeyId]!!, + setKeychainKind(keychain), + setNetwork(network) + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create bip49 error", error.localizedMessage, error) + } + }.start() } @ReactMethod @@ -821,33 +965,37 @@ class BdkRnModule(reactContext: ReactApplicationContext) : network: String, result: Promise ) { - try { - val id = randomId() - _descriptors[id] = newBip49Public( - _descriptorPublicKeys[publicKeyId]!!, - fingerprint, - setKeychainKind(keychain), - setNetwork(network) - ) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Create bip49Public error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptors[id] = newBip49Public( + _descriptorPublicKeys[publicKeyId]!!, + fingerprint, + setKeychainKind(keychain), + setNetwork(network) + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create bip49Public error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun newBip84(secretKeyId: String, keychain: String, network: String, result: Promise) { - try { - val id = randomId() - _descriptors[id] = newBip84( - _descriptorSecretKeys[secretKeyId]!!, - setKeychainKind(keychain), - setNetwork(network) - ) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Create bip84 error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptors[id] = newBip84( + _descriptorSecretKeys[secretKeyId]!!, + setKeychainKind(keychain), + setNetwork(network) + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create bip84 error", error.localizedMessage, error) + } + }.start() } @ReactMethod @@ -858,209 +1006,303 @@ class BdkRnModule(reactContext: ReactApplicationContext) : network: String, result: Promise ) { - try { - val id = randomId() - _descriptors[id] = newBip84Public( - _descriptorPublicKeys[publicKeyId]!!, - fingerprint, - setKeychainKind(keychain), - setNetwork(network) - ) - result.resolve(id) - } catch (error: Throwable) { - result.reject("Create bip84Public error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _descriptors[id] = newBip84Public( + _descriptorPublicKeys[publicKeyId]!!, + fingerprint, + setKeychainKind(keychain), + setNetwork(network) + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create bip84Public error", error.localizedMessage, error) + } + }.start() + } + + @ReactMethod + fun newBip86(secretKeyId: String, keychain: String, network: String, result: Promise) { + Thread { + try { + val id = randomId() + _descriptors[id] = newBip86( + _descriptorSecretKeys[secretKeyId]!!, + setKeychainKind(keychain), + setNetwork(network) + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create bip86 error", error.localizedMessage, error) + } + }.start() + } + + @ReactMethod + fun newBip86Public( + publicKeyId: String, + fingerprint: String, + keychain: String, + network: String, + result: Promise + ) { + Thread { + try { + val id = randomId() + _descriptors[id] = newBip86Public( + _descriptorPublicKeys[publicKeyId]!!, + fingerprint, + setKeychainKind(keychain), + setNetwork(network) + ) + result.resolve(id) + } catch (error: Throwable) { + result.reject("Create bip86Public error", error.localizedMessage, error) + } + }.start() } /** Descriptor Templates method ends */ /** PartiallySignedTransaction method starts */ @ReactMethod fun combine(base64: String, other: String, result: Promise) { - try { - val newPsbt = - PartiallySignedTransaction(base64).combine(PartiallySignedTransaction(other)) - result.resolve(newPsbt.serialize()) - } catch (error: Throwable) { - result.reject("PSBT combine error", error.localizedMessage, error) - } + Thread { + try { + val newPsbt = + PartiallySignedTransaction(base64).combine(PartiallySignedTransaction(other)) + result.resolve(newPsbt.serialize()) + } catch (error: Throwable) { + result.reject("PSBT combine error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun extractTx(base64: String, result: Promise) { - try { - val id = randomId() - _transactions[id] = PartiallySignedTransaction(base64).extractTx() - result.resolve(id) - } catch (error: Throwable) { - result.reject("PSBT extract error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _transactions[id] = PartiallySignedTransaction(base64).extractTx() + result.resolve(id) + } catch (error: Throwable) { + result.reject("PSBT extract error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun serialize(base64: String, result: Promise) { - try { - val bytes = PartiallySignedTransaction(base64).serialize(); - result.resolve(bytes) - } catch (error: Throwable) { - result.reject("PSBT serialize error", error.localizedMessage, error) - } + Thread { + try { + val bytes = PartiallySignedTransaction(base64).serialize(); + result.resolve(bytes) + } catch (error: Throwable) { + result.reject("PSBT serialize error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun txid(base64: String, result: Promise) { - try { - result.resolve(PartiallySignedTransaction(base64).txid()) - } catch (error: Throwable) { - result.reject("PSBT txid error", error.localizedMessage, error) - } + Thread { + try { + result.resolve(PartiallySignedTransaction(base64).txid()) + } catch (error: Throwable) { + result.reject("PSBT txid error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun feeAmount(base64: String, result: Promise) { - try { - result.resolve(PartiallySignedTransaction(base64).feeAmount()!!.toInt()) - } catch (error: Throwable) { - result.reject("PSBT feeAmount error", error.localizedMessage, error) - } + Thread { + try { + result.resolve(PartiallySignedTransaction(base64).feeAmount()!!.toDouble()) + } catch (error: Throwable) { + result.reject("PSBT feeAmount error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun psbtFeeRate(base64: String, result: Promise) { - try { - result.resolve(PartiallySignedTransaction(base64).feeRate()!!.asSatPerVb()) - } catch (error: Throwable) { - result.reject("PSBT feeRate error", error.localizedMessage, error) - } + Thread { + try { + result.resolve(PartiallySignedTransaction(base64).feeRate()!!.asSatPerVb()) + } catch (error: Throwable) { + result.reject("PSBT feeRate error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun jsonSerialize(base64: String, result: Promise) { - try { - result.resolve(PartiallySignedTransaction(base64).jsonSerialize()) - } catch (error: Throwable) { - result.reject("PSBT jsonSerialize error", error.localizedMessage, error) - } + Thread { + try { + result.resolve(PartiallySignedTransaction(base64).jsonSerialize()) + } catch (error: Throwable) { + result.reject("PSBT jsonSerialize error", error.localizedMessage, error) + } + }.start() } /** PartiallySignedTransaction method ends */ /** BumpFeeTxBuilder methods starts*/ @ReactMethod fun bumpFeeTxBuilderInit(txid: String, newFeeRate: Int, result: Promise) { - val id = randomId() - _bumpFeeTxBuilders[id] = BumpFeeTxBuilder(txid, newFeeRate.toFloat()) - result.resolve(id) + Thread { + val id = randomId() + _bumpFeeTxBuilders[id] = BumpFeeTxBuilder(txid, newFeeRate.toFloat()) + result.resolve(id) + }.start() } @ReactMethod - fun bumpFeeTxBuilderAllowShrinking(id: String, address: String, result: Promise) { - _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!!.allowShrinking(address) - result.resolve(true) + fun bumpFeeTxBuilderAllowShrinking(id: String, scriptId: String, result: Promise) { + Thread { + _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!!.allowShrinking(_scripts[scriptId]!!) + result.resolve(true) + }.start() } @ReactMethod fun bumpFeeTxBuilderEnableRbf(id: String, result: Promise) { - _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!!.enableRbf() - result.resolve(true) + Thread { + _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!!.enableRbf() + result.resolve(true) + }.start() } @ReactMethod fun bumpFeeTxBuilderEnableRbfWithSequence(id: String, nSequence: Int, result: Promise) { - _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!!.enableRbfWithSequence(nSequence.toUInt()) - result.resolve(true) + Thread { + _bumpFeeTxBuilders[id] = + _bumpFeeTxBuilders[id]!!.enableRbfWithSequence(nSequence.toUInt()) + result.resolve(true) + }.start() } @ReactMethod fun bumpFeeTxBuilderFinish(id: String, walletId: String, result: Promise) { - try { - val res = _bumpFeeTxBuilders[id]!!.finish(getWalletById(walletId)) - result.resolve(res.serialize()) - } catch (error: Throwable) { - result.reject("BumpFee Txbuilder finish error", error.localizedMessage, error) - } + Thread { + try { + val res = _bumpFeeTxBuilders[id]!!.finish(getWalletById(walletId)) + result.resolve(res.serialize()) + } catch (error: Throwable) { + result.reject("BumpFee Txbuilder finish error", error.localizedMessage, error) + } + }.start() } /** BumpFeeTxBuilder methods ends*/ /** Transaction methods starts*/ @ReactMethod fun createTransaction(bytes: ReadableArray, result: Promise) { - try { - val id = randomId() - _transactions[id] = Transaction(getTxBytes(bytes)) - result.resolve(id) - } catch (error: Throwable) { - result.reject("BumpFee Txbuilder finish error", error.localizedMessage, error) - } + Thread { + try { + val id = randomId() + _transactions[id] = Transaction(getTxBytes(bytes)) + result.resolve(id) + } catch (error: Throwable) { + result.reject("BumpFee Txbuilder finish error", error.localizedMessage, error) + } + }.start() } @ReactMethod fun serializeTransaction(id: String, result: Promise) { - val uBytes = _transactions[id]!!.serialize() - result.resolve(makeNativeArray(uBytes)) + Thread { + val uBytes = _transactions[id]!!.serialize() + result.resolve(makeNativeArray(uBytes)) + }.start() } @ReactMethod fun transactionTxid(id: String, result: Promise) { - result.resolve(_transactions[id]!!.txid()) + Thread { + result.resolve(_transactions[id]!!.txid()) + }.start() } @ReactMethod fun txWeight(id: String, result: Promise) { - result.resolve(_transactions[id]!!.weight().toInt()) + Thread { + result.resolve(_transactions[id]!!.weight().toDouble()) + }.start() } @ReactMethod fun txSize(id: String, result: Promise) { - result.resolve(_transactions[id]!!.size().toInt()) + Thread { + result.resolve(_transactions[id]!!.size().toDouble()) + }.start() } @ReactMethod fun txVsize(id: String, result: Promise) { - result.resolve(_transactions[id]!!.vsize().toInt()) + Thread { + result.resolve(_transactions[id]!!.vsize().toDouble()) + }.start() } @ReactMethod fun txIsCoinBase(id: String, result: Promise) { - result.resolve(_transactions[id]!!.isCoinBase()) + Thread { + result.resolve(_transactions[id]!!.isCoinBase()) + }.start() } @ReactMethod fun txIsExplicitlyRbf(id: String, result: Promise) { - result.resolve(_transactions[id]!!.isExplicitlyRbf()) + Thread { + result.resolve(_transactions[id]!!.isExplicitlyRbf()) + }.start() } @ReactMethod fun txIsLockTimeEnabled(id: String, result: Promise) { - result.resolve(_transactions[id]!!.isLockTimeEnabled()) + Thread { + result.resolve(_transactions[id]!!.isLockTimeEnabled()) + }.start() } @ReactMethod fun txVersion(id: String, result: Promise) { - result.resolve(_transactions[id]!!.version()) + Thread { + result.resolve(_transactions[id]!!.version()) + }.start() } @ReactMethod fun txLockTime(id: String, result: Promise) { - result.resolve(_transactions[id]!!.lockTime().toInt()) + Thread { + result.resolve(_transactions[id]!!.lockTime().toInt()) + }.start() } @ReactMethod fun txInput(id: String, result: Promise) { - val items = _transactions[id]!!.input() - val list: MutableList> = mutableListOf() - for (item in items) { - list.add(createTxIn(item, _scripts)) - } - result.resolve(Arguments.makeNativeArray(list)) + Thread { + val items = _transactions[id]!!.input() + val list: MutableList> = mutableListOf() + for (item in items) { + list.add(createTxIn(item, _scripts)) + } + result.resolve(Arguments.makeNativeArray(list)) + }.start() } @ReactMethod fun txOutput(id: String, result: Promise) { - val items = _transactions[id]!!.output() - val list: MutableList> = mutableListOf() - for (item in items) { - list.add(createTxOut(item, _scripts)) - } - result.resolve(Arguments.makeNativeArray(list)) + Thread { + val items = _transactions[id]!!.output() + val list: MutableList> = mutableListOf() + for (item in items) { + list.add(createTxOut(item, _scripts)) + } + result.resolve(Arguments.makeNativeArray(list)) + }.start() } /** Transaction methods ends*/ @@ -1068,7 +1310,9 @@ class BdkRnModule(reactContext: ReactApplicationContext) : /** Script methods starts*/ @ReactMethod fun toBytes(id: String, result: Promise) { - result.resolve(makeNativeArray(_scripts[id]!!.toBytes())) + Thread { + result.resolve(makeNativeArray(_scripts[id]!!.toBytes())) + }.start() } /** Script methods ends*/ } diff --git a/android/src/main/java/io/ltbl/bdkrn/Utils.kt b/android/src/main/java/io/ltbl/bdkrn/Utils.kt index e8fadfb..0f515a2 100644 --- a/android/src/main/java/io/ltbl/bdkrn/Utils.kt +++ b/android/src/main/java/io/ltbl/bdkrn/Utils.kt @@ -60,9 +60,11 @@ fun setAddressIndex(addressIndex: Any?): AddressIndex { "lastUnused" -> AddressIndex.LastUnused else -> AddressIndex.New } + is Double -> { AddressIndex.Peek(addressIndex.toUInt()) } + else -> AddressIndex.New } } @@ -71,13 +73,13 @@ fun randomId() = UUID.randomUUID().toString() fun getTransactionObject(transaction: TransactionDetails): MutableMap { return mutableMapOf( - "received" to transaction.received.toInt(), - "sent" to transaction.sent.toInt(), - "fee" to transaction.fee!!.toInt(), + "received" to transaction.received.toDouble(), + "sent" to transaction.sent.toDouble(), + "fee" to transaction.fee!!.toDouble(), "txid" to transaction.txid, "confirmationTime" to mutableMapOf( "height" to (transaction.confirmationTime?.height?.toInt() ?: 0), - "timestamp" to (transaction.confirmationTime?.timestamp?.toInt() ?: 0), + "timestamp" to (transaction.confirmationTime?.timestamp?.toDouble() ?: 0), ) ) } @@ -144,14 +146,14 @@ fun getPayload(payload: Payload): MutableMap { fun createTxOut(txOut: TxOut, _scripts: MutableMap): MutableMap { val randomId = randomId() _scripts[randomId] = txOut.scriptPubkey - return mutableMapOf("script" to randomId, "value" to txOut.value.toInt()) + return mutableMapOf("script" to randomId, "value" to txOut.value.toDouble()) } fun createTxIn(txIn: TxIn, _scripts: MutableMap): MutableMap { val randomId = randomId() _scripts[randomId] = txIn.scriptSig var witnessList = mutableListOf(); - for(item in txIn.witness) { + for (item in txIn.witness) { witnessList.add(makeNativeArray(item)) } return mutableMapOf( diff --git a/ios/BdkRnModule.m b/ios/BdkRnModule.m index 3f95b77..c04bb06 100644 --- a/ios/BdkRnModule.m +++ b/ios/BdkRnModule.m @@ -247,6 +247,7 @@ @interface RCT_EXTERN_MODULE(BdkRnModule, NSObject) /** Address methods */ RCT_EXTERN_METHOD( initAddress:(nonnull NSString*)address + network: (nonnull NSString*)network resolve: (RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject ) @@ -290,6 +291,14 @@ @interface RCT_EXTERN_MODULE(BdkRnModule, NSObject) reject:(RCTPromiseRejectBlock)reject ) +RCT_EXTERN_METHOD( + addressIsValidForNetwork:(nonnull NSString*)id + network: (nonnull NSString*)network + resolve: (RCTPromiseResolveBlock)resolve + reject:(RCTPromiseRejectBlock)reject +) + + /** TxBuilder methods */ RCT_EXTERN_METHOD(createTxBuilder:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) @@ -480,6 +489,23 @@ @interface RCT_EXTERN_MODULE(BdkRnModule, NSObject) reject:(RCTPromiseRejectBlock)reject ) +RCT_EXTERN_METHOD( + newBip86: (nonnull NSString*)secretKeyId + keychain:(nonnull NSString*)keychain + network:(nonnull NSString*)network + resolve: (RCTPromiseResolveBlock)resolve + reject:(RCTPromiseRejectBlock)reject +) + +RCT_EXTERN_METHOD( + newBip86Public: (nonnull NSString*)publicKeyId + fingerprint:(nonnull NSString*)fingerprint + keychain:(nonnull NSString*)keychain + network:(nonnull NSString*)network + resolve: (RCTPromiseResolveBlock)resolve + reject:(RCTPromiseRejectBlock)reject +) + /** PartiallySignedTransaction methods */ RCT_EXTERN_METHOD( combine: (nonnull NSString*)base64 @@ -534,7 +560,7 @@ @interface RCT_EXTERN_MODULE(BdkRnModule, NSObject) RCT_EXTERN_METHOD( bumpFeeTxBuilderAllowShrinking: (nonnull NSString*)id - address: (nonnull NSString*)address + scriptId: (nonnull NSString*)scriptId resolve: (RCTPromiseResolveBlock)resolve reject: (RCTPromiseRejectBlock)reject ) diff --git a/ios/BdkRnModule.swift b/ios/BdkRnModule.swift index e9ddcd2..030fc2a 100644 --- a/ios/BdkRnModule.swift +++ b/ios/BdkRnModule.swift @@ -36,8 +36,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let response = Mnemonic(wordCount: setWordCount(wordCount: wordCount)) - resolve(response.asString()) + DispatchQueue.global(qos: .userInteractive).async { + let response = Mnemonic(wordCount: setWordCount(wordCount: wordCount)) + DispatchQueue.main.async { + resolve(response.asString()) + } + } } @objc @@ -46,11 +50,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let response = try Mnemonic.fromString(mnemonic: mnemonic) - resolve(response.asString()) - } catch let error { - reject("Generate seed error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { + do { + let response = try Mnemonic.fromString(mnemonic: mnemonic) + DispatchQueue.main.async { + resolve(response.asString()) + } + } catch let error { + reject("Generate seed error", "\(error)", error) + } } } @@ -60,11 +68,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let response = try Mnemonic.fromEntropy(entropy: getEntropy(entropy: entropy)) - resolve(response.asString()) - } catch let error { - reject("Generate seed error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { + do { + let response = try Mnemonic.fromEntropy(entropy: getEntropy(entropy: entropy)) + DispatchQueue.main.async { + resolve(response.asString()) + } + } catch let error { + reject("Generate seed error", "\(error)", error) + } } } @@ -77,13 +89,18 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let id = randomId() - _derivationPaths[id] = try DerivationPath(path: path) - resolve(id) - } catch let error { - reject("Create Derivation path error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let id = randomId() + _derivationPaths[id] = try DerivationPath(path: path) + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("Create Derivation path error", "\(error)", error) + } } + } /** Derviation path methods ends */ @@ -96,16 +113,20 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let id = randomId() - _descriptorSecretKeys[id] = try DescriptorSecretKey( - network: setNetwork(networkStr: network), - mnemonic: Mnemonic.fromString(mnemonic: mnemonic), - password: password - ) - resolve(id) - } catch let error { - reject("DescriptorSecret create error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let id = randomId() + _descriptorSecretKeys[id] = try DescriptorSecretKey( + network: setNetwork(networkStr: network), + mnemonic: Mnemonic.fromString(mnemonic: mnemonic), + password: password + ) + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("DescriptorSecret create error", "\(error)", error) + } } } @@ -116,12 +137,17 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let keyInfo = try _descriptorSecretKeys[secretKeyId]!.derive(path: _derivationPaths[derivationPathId]!) - resolve(keyInfo.asString()) - } catch let error { - reject("DescriptorSecret derive error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let keyInfo = try _descriptorSecretKeys[secretKeyId]!.derive(path: _derivationPaths[derivationPathId]!) + DispatchQueue.main.async { + resolve(keyInfo.asString()) + } + } catch let error { + reject("DescriptorSecret derive error", "\(error)", error) + } } + } @objc @@ -131,11 +157,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let keyInfo = try _descriptorSecretKeys[secretKeyId]!.extend(path: _derivationPaths[derivationPathId]!) - resolve(keyInfo.asString()) - } catch let error { - reject("DescriptorSecret extend error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let keyInfo = try _descriptorSecretKeys[secretKeyId]!.extend(path: _derivationPaths[derivationPathId]!) + DispatchQueue.main.async { + resolve(keyInfo.asString()) + } + } catch let error { + reject("DescriptorSecret extend error", "\(error)", error) + } } } @@ -145,9 +175,13 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _descriptorPublicKeys[id] = _descriptorSecretKeys[secretKeyId]!.asPublic() - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptorPublicKeys[id] = _descriptorSecretKeys[secretKeyId]!.asPublic() + DispatchQueue.main.async { + resolve(id) + } + } } @objc @@ -156,7 +190,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_descriptorSecretKeys[secretKeyId]!.asString()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_descriptorSecretKeys[secretKeyId]!.asString()) + } + } } @objc @@ -165,7 +203,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_descriptorSecretKeys[secretKeyId]!.secretBytes()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_descriptorSecretKeys[secretKeyId]!.secretBytes()) + } + } } /** Descriptor secret key methods ends */ @@ -177,12 +219,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let id = randomId() - _descriptorPublicKeys[id] = try DescriptorPublicKey.fromString(publicKey: publicKey) - resolve(id) - } catch let error { - reject("DescriptorPublic create error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let id = randomId() + _descriptorPublicKeys[id] = try DescriptorPublicKey.fromString(publicKey: publicKey) + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("DescriptorPublic create error", "\(error)", error) + } } } @@ -193,11 +239,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let keyInfo = try _descriptorPublicKeys[publicKeyId]!.derive(path: _derivationPaths[derivationPathId]!) - resolve(keyInfo.asString()) - } catch let error { - reject("DescriptorPublic derive error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let keyInfo = try _descriptorPublicKeys[publicKeyId]!.derive(path: _derivationPaths[derivationPathId]!) + DispatchQueue.main.async { + resolve(keyInfo.asString()) + } + } catch let error { + reject("DescriptorPublic derive error", "\(error)", error) + } } } @@ -208,11 +258,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let keyInfo = try _descriptorPublicKeys[publicKeyId]!.extend(path: _derivationPaths[derivationPathId]!) - resolve(keyInfo.asString()) - } catch let error { - reject("DescriptorPublic extend error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let keyInfo = try _descriptorPublicKeys[publicKeyId]!.extend(path: _derivationPaths[derivationPathId]!) + DispatchQueue.main.async { + resolve(keyInfo.asString()) + } + } catch let error { + reject("DescriptorPublic extend error", "\(error)", error) + } } } @@ -222,7 +276,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_descriptorPublicKeys[publicKeyId]!.asString()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_descriptorPublicKeys[publicKeyId]!.asString()) + } + } } /** Descriptor public key methods ends */ @@ -243,22 +301,26 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let _blockchainConfig = BlockchainConfig.electrum( - config: ElectrumConfig( - url: url, - socks5: sock5.isEmpty ? nil : sock5, - retry: UInt8(truncating: retry), - timeout: UInt8(truncating: timeout), - stopGap: UInt64(truncating: stopGap), - validateDomain: validateDomain + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let _blockchainConfig = BlockchainConfig.electrum( + config: ElectrumConfig( + url: url, + socks5: sock5.isEmpty ? nil : sock5, + retry: UInt8(truncating: retry), + timeout: UInt8(truncating: timeout), + stopGap: UInt64(truncating: stopGap), + validateDomain: validateDomain + ) ) - ) - let blockChainId = randomId() - _blockChains[blockChainId] = try Blockchain(config: _blockchainConfig) - resolve(blockChainId) - } catch let error { - reject("BlockchainElectrum init error", "\(error)", error) + let blockChainId = randomId() + _blockChains[blockChainId] = try Blockchain(config: _blockchainConfig) + DispatchQueue.main.async { + resolve(blockChainId) + } + } catch let error { + reject("BlockchainElectrum init error", "\(error)", error) + } } } @@ -272,21 +334,25 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let _blockchainConfig = BlockchainConfig.esplora( - config: EsploraConfig( - baseUrl: baseUrl, - proxy: proxy.isEmpty ? nil : proxy, - concurrency: UInt8(truncating: concurrency), - stopGap: UInt64(truncating: stopGap), - timeout: UInt64(truncating: timeout) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let _blockchainConfig = BlockchainConfig.esplora( + config: EsploraConfig( + baseUrl: baseUrl, + proxy: proxy.isEmpty ? nil : proxy, + concurrency: UInt8(truncating: concurrency), + stopGap: UInt64(truncating: stopGap), + timeout: UInt64(truncating: timeout) + ) ) - ) - let blockChainId = randomId() - _blockChains[blockChainId] = try Blockchain(config: _blockchainConfig) - resolve(blockChainId) - } catch let error { - reject("BlockchainEsplora init error", "\(error)", error) + let blockChainId = randomId() + _blockChains[blockChainId] = try Blockchain(config: _blockchainConfig) + DispatchQueue.main.async { + resolve(blockChainId) + } + } catch let error { + reject("BlockchainEsplora init error", "\(error)", error) + } } } @@ -296,45 +362,49 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - var authType = Auth.none - if config["authCookie"] != nil { - authType = Auth.cookie(file: config["authCookie"] as! String) - } - - if config["authUserPass"] != nil { - let userPass = config["authUserPass"] as! NSDictionary - authType = Auth.userPass( - username: userPass["username"] as! String, - password: userPass["password"] as! String - ) - } - - var syncParams: RpcSyncParams? = nil - if config["syncParams"] != nil { - let syncParamsConfig = config["syncParams"] as! NSDictionary - syncParams = RpcSyncParams( - startScriptCount: syncParamsConfig["startScriptCount"] as! UInt64, - startTime: syncParamsConfig["startTime"] as! UInt64, - forceStartTime: syncParamsConfig["forceStartTime"] as! Bool, - pollRateSec: syncParamsConfig["pollRateSec"] as! UInt64 + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + var authType = Auth.none + if config["authCookie"] != nil { + authType = Auth.cookie(file: config["authCookie"] as! String) + } + + if config["authUserPass"] != nil { + let userPass = config["authUserPass"] as! NSDictionary + authType = Auth.userPass( + username: userPass["username"] as! String, + password: userPass["password"] as! String + ) + } + + var syncParams: RpcSyncParams? = nil + if config["syncParams"] != nil { + let syncParamsConfig = config["syncParams"] as! NSDictionary + syncParams = RpcSyncParams( + startScriptCount: syncParamsConfig["startScriptCount"] as! UInt64, + startTime: syncParamsConfig["startTime"] as! UInt64, + forceStartTime: syncParamsConfig["forceStartTime"] as! Bool, + pollRateSec: syncParamsConfig["pollRateSec"] as! UInt64 + ) + } + + let _blockchainConfig = BlockchainConfig.rpc( + config: RpcConfig( + url: config["url"] as! String, + auth: authType, + network: setNetwork(networkStr: config["network"] as? String), + walletName: config["walletName"] as! String, + syncParams: syncParams + ) ) + let blockChainId = randomId() + _blockChains[blockChainId] = try Blockchain(config: _blockchainConfig) + DispatchQueue.main.async { + resolve(blockChainId) + } + } catch let error { + reject("BlockchainRpc init error", "\(error)", error) } - - let _blockchainConfig = BlockchainConfig.rpc( - config: RpcConfig( - url: config["url"] as! String, - auth: authType, - network: setNetwork(networkStr: config["network"] as? String), - walletName: config["walletName"] as! String, - syncParams: syncParams - ) - ) - let blockChainId = randomId() - _blockChains[blockChainId] = try Blockchain(config: _blockchainConfig) - resolve(blockChainId) - } catch let error { - reject("BlockchainRpc init error", "\(error)", error) } } @@ -344,10 +414,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - resolve(try getBlockchainById(id: id).getHeight()) - } catch let error { - reject("Blockchain get height error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let height = try getBlockchainById(id: id).getHeight() + DispatchQueue.main.async { + resolve(height) + } + } catch let error { + reject("Blockchain get height error", "\(error)", error) + } } } @@ -359,10 +434,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - resolve(try getBlockchainById(id: id).getBlockHash(height: UInt32(truncating: height))) - } catch let error { - reject("Blockchain get block hash error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let hash = try getBlockchainById(id: id).getBlockHash(height: UInt32(truncating: height)) + DispatchQueue.main.async { + resolve(hash) + } + } catch let error { + reject("Blockchain get block hash error", "\(error)", error) + } } } @@ -373,11 +453,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - _ = try getBlockchainById(id: id).broadcast(transaction: _transactions[txId]!) - resolve(true) - } catch let error { - reject("Broadcast transaction error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + _ = try getBlockchainById(id: id).broadcast(transaction: _transactions[txId]!) + DispatchQueue.main.async { + resolve(true) + } + } catch let error { + reject("Broadcast transaction error", "\(error)", error) + } } } @@ -388,11 +472,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let fee = try getBlockchainById(id: id).estimateFee(target: UInt64(truncating: target)) - resolve(fee.asSatPerVb()) - } catch let error { - reject("Estimate Fee error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let fee = try getBlockchainById(id: id).estimateFee(target: UInt64(truncating: target)) + DispatchQueue.main.async { + resolve(fee.asSatPerVb()) + } + } catch let error { + reject("Estimate Fee error", "\(error)", error) + } } } /** Blockchain methods ends */ @@ -403,9 +491,13 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _databaseConfigs[id] = DatabaseConfig.memory - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _databaseConfigs[id] = DatabaseConfig.memory + DispatchQueue.main.async { + resolve(id) + } + } } @objc @@ -415,9 +507,13 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _databaseConfigs[id] = DatabaseConfig.sled(config: SledDbConfiguration(path: path, treeName: treeName)) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _databaseConfigs[id] = DatabaseConfig.sled(config: SledDbConfiguration(path: path, treeName: treeName)) + DispatchQueue.main.async { + resolve(id) + } + } } @objc @@ -426,9 +522,13 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _databaseConfigs[id] = DatabaseConfig.sqlite(config: SqliteDbConfiguration(path: path)) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _databaseConfigs[id] = DatabaseConfig.sqlite(config: SqliteDbConfiguration(path: path)) + DispatchQueue.main.async { + resolve(id) + } + } } /** DB configuration methods ends*/ @@ -446,21 +546,25 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - var changeDes: (Any)? = nil - if(changeDescriptor != nil) { - changeDes = _descriptors[changeDescriptor ?? ""]! + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + var changeDes: (Any)? = nil + if(changeDescriptor != nil) { + changeDes = _descriptors[changeDescriptor ?? ""]! + } + let id = randomId() + _wallets[id] = try Wallet.init( + descriptor: _descriptors[descriptor]!, + changeDescriptor: changeDes as? Descriptor, + network: setNetwork(networkStr: network), + databaseConfig: _databaseConfigs[dbConfigID]! + ) + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("Init wallet error", "\(error)", error) } - let id = randomId() - _wallets[id] = try Wallet.init( - descriptor: _descriptors[descriptor]!, - changeDescriptor: changeDes as? Descriptor, - network: setNetwork(networkStr: network), - databaseConfig: _databaseConfigs[dbConfigID]! - ) - resolve(id) - } catch let error { - reject("Init wallet error", "\(error)", error) } } @@ -472,16 +576,14 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - DispatchQueue.global().async { [self] in + DispatchQueue.global(qos: .userInteractive).async { do { - try getWalletById(id: id).sync(blockchain: self.getBlockchainById(id: blockChainId), progress: BdkProgress()) + try self.getWalletById(id: id).sync(blockchain: self.getBlockchainById(id: blockChainId), progress: BdkProgress()) DispatchQueue.main.async { resolve(true) } - } catch { - DispatchQueue.main.async { - reject("Sync wallet error", "\(error)", error) - } + } catch let error { + reject("Sync wallet error", "\(error)", error) } } } @@ -494,24 +596,19 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let resolvedIndex: AddressIndex - if let indexString = addressIndex as? String { - resolvedIndex = setAddressIndex(addressIndex: indexString) - } else if let indexInt = addressIndex as? Int { - resolvedIndex = setAddressIndex(addressIndex: indexInt) - } else { - resolvedIndex = setAddressIndex(addressIndex: "new") + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let addressInfo = try getWalletById(id: id).getAddress( + addressIndex: setAddressIndex(addressIndex: addressIndex) + ) + let randomId = randomId() + _addresses[randomId] = addressInfo.address + DispatchQueue.main.async { + resolve(["index": addressInfo.index, "address": randomId, "keychain": "\(addressInfo.keychain)"] as [String: Any]) + } + } catch let error { + reject("Get wallet address error", "\(error)", error) } - - let addressInfo = try getWalletById(id: id).getAddress( - addressIndex: resolvedIndex - ) - let randomId = randomId() - _addresses[randomId] = addressInfo.address - resolve(["index": addressInfo.index, "address": randomId, "keychain": "\(addressInfo.keychain)"] as [String: Any]) - } catch let error { - reject("Get wallet address error", "\(error)", error) } } @@ -522,23 +619,19 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let resolvedIndex: AddressIndex - if let indexString = addressIndex as? String { - resolvedIndex = setAddressIndex(addressIndex: indexString) - } else if let indexInt = addressIndex as? Int { - resolvedIndex = setAddressIndex(addressIndex: indexInt) - } else { - resolvedIndex = setAddressIndex(addressIndex: "new") + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let addressInfo = try getWalletById(id: id).getInternalAddress( + addressIndex: setAddressIndex(addressIndex: addressIndex) + ) + let randomId = randomId() + _addresses[randomId] = addressInfo.address + DispatchQueue.main.async { + resolve(["index": addressInfo.index, "address": randomId, "keychain": "\(addressInfo.keychain)"] as [String: Any]) + } + } catch let error { + reject("Get internal address error", "\(error)", error) } - let addressInfo = try getWalletById(id: id).getInternalAddress( - addressIndex: resolvedIndex - ) - let randomId = randomId() - _addresses[randomId] = addressInfo.address - resolve(["index": addressInfo.index, "address": randomId, "keychain": "\(addressInfo.keychain)"] as [String: Any]) - } catch let error { - reject("Get internal address error", "\(error)", error) } } @@ -550,10 +643,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - resolve(try getWalletById(id: id).isMine(script: _scripts[scriptId]!)) - } catch let error { - reject("Check wallet isMine error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + resolve(try getWalletById(id: id).isMine(script: _scripts[scriptId]!)) + } catch let error { + reject("Check wallet isMine error", "\(error)", error) + } } } @@ -563,18 +658,22 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let balance = try getWalletById(id: id).getBalance() - let responseBalance = [ - "trustedPending": balance.trustedPending, - "untrustedPending": balance.untrustedPending, - "confirmed": balance.confirmed, - "spendable": balance.spendable, - "total": balance.total, - ] as [String: Any] - resolve(responseBalance) - } catch let error { - reject("Get wallet balance error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let balance = try getWalletById(id: id).getBalance() + let responseBalance = [ + "trustedPending": balance.trustedPending, + "untrustedPending": balance.untrustedPending, + "confirmed": balance.confirmed, + "spendable": balance.spendable, + "total": balance.total, + ] as [String: Any] + DispatchQueue.main.async { + resolve(responseBalance) + } + } catch let error { + reject("Get wallet balance error", "\(error)", error) + } } } @@ -585,8 +684,10 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let network = getWalletById(id: id).network() - resolve(getNetworkString(network: network)) + DispatchQueue.main.async { [self] in + let network = getWalletById(id: id).network() + resolve(getNetworkString(network: network)) + } } @objc @@ -595,21 +696,25 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let unspent = try getWalletById(id: id).listUnspent() - var responseObject: [Any] = [] - for item in unspent { - let unspentObject = [ - "outpoint": getOutPoint(outPoint: item.outpoint), - "txout": createTxOut(txOut: item.txout, _scripts: &_scripts), - "isSpent": item.isSpent, - "keychain": "\(item.keychain)" - ] as [String: Any] - responseObject.append(unspentObject) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let unspent = try getWalletById(id: id).listUnspent() + var responseObject: [Any] = [] + for item in unspent { + let unspentObject = [ + "outpoint": getOutPoint(outPoint: item.outpoint), + "txout": createTxOut(txOut: item.txout, _scripts: &_scripts), + "isSpent": item.isSpent, + "keychain": "\(item.keychain)" + ] as [String: Any] + responseObject.append(unspentObject) + } + DispatchQueue.main.async { + resolve(responseObject) + } + } catch let error { + reject("List unspent outputs error", "\(error)", error) } - resolve(responseObject) - } catch let error { - reject("List unspent outputs error", "\(error)", error) } } @@ -620,23 +725,27 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let list = try getWalletById(id: id).listTransactions(includeRaw: includeRaw) - var responseObject: [Any] = [] - for item in list { - var txObject = getTransactionObject(transaction: item) - if(item.transaction != nil) { - let randomId = randomId() - _transactions[randomId] = item.transaction - txObject["transaction"] = randomId - } else { - txObject["transaction"] = false + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + do { + let list = try getWalletById(id: id).listTransactions(includeRaw: includeRaw) + var responseObject: [Any] = [] + for item in list { + var txObject = getTransactionObject(transaction: item) + if(item.transaction != nil) { + let randomId = randomId() + _transactions[randomId] = item.transaction + txObject["transaction"] = randomId + } else { + txObject["transaction"] = false + } + responseObject.append(txObject) + } + resolve(responseObject) + } catch let error { + reject("List transactions error", "\(error)", error) } - responseObject.append(txObject) } - resolve(responseObject) - } catch let error { - reject("List transactions error", "\(error)", error) } } @@ -648,18 +757,21 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - - var options: SignOptions? = nil - if signOptions != nil { - options = createSignOptions(options: signOptions as! NSDictionary) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + var options: SignOptions? = nil + if signOptions != nil { + options = createSignOptions(options: signOptions as! NSDictionary) + } + + let psbt = try PartiallySignedTransaction(psbtBase64: psbtBase64) + _ = try getWalletById(id: id).sign(psbt: psbt, signOptions: options) + DispatchQueue.main.async { [self] in + resolve(psbt.serialize()) + } + } catch let error { + reject("Sign PSBT error", "\(error)", error) } - - let psbt = try PartiallySignedTransaction(psbtBase64: psbtBase64) - _ = try getWalletById(id: id).sign(psbt: psbt, signOptions: options) - resolve(psbt.serialize()) - } catch let error { - reject("Sign PSBT error", "\(error)", error) } } @@ -671,15 +783,20 @@ class BdkRnModule: NSObject { @objc func initAddress(_ address: String, + network: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let id = randomId() - _addresses[id] = try Address(address: address) - resolve(id) - } catch let error { - reject("Address error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let id = randomId() + _addresses[id] = try Address(address: address, network: setNetwork(networkStr: network)) + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("Address error", "\(error)", error) + } } } @@ -690,12 +807,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let id = randomId() - _addresses[id] = try Address.fromScript(script: _scripts[scriptId]!, network: setNetwork(networkStr: network)) - resolve(id) - } catch let error { - reject("Address from script error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let id = randomId() + _addresses[id] = try Address.fromScript(script: _scripts[scriptId]!, network: setNetwork(networkStr: network)) + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("Address from script error", "\(error)", error) + } } } @@ -705,9 +826,13 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let scriptId = randomId() - _scripts[scriptId] = _addresses[id]?.scriptPubkey() - resolve(scriptId) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let scriptId = randomId() + _scripts[scriptId] = _addresses[id]?.scriptPubkey() + DispatchQueue.main.async { + resolve(scriptId) + } + } } @objc @@ -716,8 +841,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let pay = _addresses[id]?.payload() - resolve(getPayload(payload: pay!)) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let pay = _addresses[id]?.payload() + DispatchQueue.main.async { + resolve(getPayload(payload: pay!)) + } + } } @objc @@ -726,7 +855,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(getNetworkString(network: _addresses[id]!.network())) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { + resolve(getNetworkString(network: self._addresses[id]!.network())) + } + } } @@ -736,7 +869,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_addresses[id]!.toQrUri()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_addresses[id]!.toQrUri()) + } + } } @@ -746,9 +883,29 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_addresses[id]!.asString()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_addresses[id]!.asString()) + } + } + } + + + @objc + func addressIsValidForNetwork(_ + id: String, + network: String, + resolve: @escaping RCTPromiseResolveBlock, + reject: @escaping RCTPromiseRejectBlock + ) { + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_addresses[id]!.isValidForNetwork(network: setNetwork(networkStr: network))) + } + } } + /** Address methods ends*/ /** TxBuilder methods starts */ @@ -757,10 +914,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _txBuilders[id] = TxBuilder() - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _txBuilders[id] = TxBuilder() + DispatchQueue.main.async { + resolve(id) + } + } } + @objc func addRecipient(_ @@ -770,11 +932,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.addRecipient( - script: _scripts[scriptId]!, - amount: UInt64(truncating: amount) - ) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.addRecipient( + script: _scripts[scriptId]!, + amount: UInt64(truncating: amount) + ) + DispatchQueue.main.async { + resolve(true) + } + } } // `addUnspendable` @@ -785,8 +951,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.addUnspendable(unspendable: createOutPoint(outPoint: outPoint)) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.addUnspendable(unspendable: createOutPoint(outPoint: outPoint)) + DispatchQueue.main.async { + resolve(true) + } + } } // `addUtxo` @@ -797,8 +967,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.addUtxo(outpoint: createOutPoint(outPoint: outPoint)) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.addUtxo(outpoint: createOutPoint(outPoint: outPoint)) + DispatchQueue.main.async { + resolve(true) + } + } } @@ -810,12 +984,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - var mappedOutPoints: [OutPoint] = []; - for outPoint in outPoints { - mappedOutPoints.append(createOutPoint(outPoint: outPoint)) + DispatchQueue.global(qos: .userInteractive).async { [self] in + var mappedOutPoints: [OutPoint] = []; + for outPoint in outPoints { + mappedOutPoints.append(createOutPoint(outPoint: outPoint)) + } + _txBuilders[id] = _txBuilders[id]?.addUtxos(outpoints: mappedOutPoints) + DispatchQueue.main.async { + resolve(true) + } } - _txBuilders[id] = _txBuilders[id]?.addUtxos(outpoints: mappedOutPoints) - resolve(true) } @@ -826,8 +1004,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.doNotSpendChange() - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.doNotSpendChange() + DispatchQueue.main.async { + resolve(true) + } + } } // `manuallySelectedOnly` @@ -837,8 +1019,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.manuallySelectedOnly() - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.manuallySelectedOnly() + DispatchQueue.main.async { + resolve(true) + } + } } // `onlySpendChange` @@ -848,8 +1034,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.onlySpendChange() - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.onlySpendChange() + DispatchQueue.main.async { + resolve(true) + } + } } @@ -861,12 +1051,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - var mappedOutPoints: [OutPoint] = []; - for outPoint in outPoints { - mappedOutPoints.append(createOutPoint(outPoint: outPoint)) + DispatchQueue.global(qos: .userInteractive).async { [self] in + var mappedOutPoints: [OutPoint] = []; + for outPoint in outPoints { + mappedOutPoints.append(createOutPoint(outPoint: outPoint)) + } + _txBuilders[id] = _txBuilders[id]?.unspendable(unspendable: mappedOutPoints) + DispatchQueue.main.async { + resolve(true) + } } - _txBuilders[id] = _txBuilders[id]?.unspendable(unspendable: mappedOutPoints) - resolve(true) } // `feeRate` @@ -877,8 +1071,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.feeRate(satPerVbyte: Float(truncating: feeRate)) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.feeRate(satPerVbyte: Float(truncating: feeRate)) + DispatchQueue.main.async { + resolve(true) + } + } } // `feeAbsolute` @@ -889,8 +1087,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.feeAbsolute(feeAmount: UInt64(truncating: feeRate)) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.feeAbsolute(feeAmount: UInt64(truncating: feeRate)) + DispatchQueue.main.async { + resolve(true) + } + } } // `drainWallet` @@ -900,8 +1102,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.drainWallet() - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.drainWallet() + DispatchQueue.main.async { + resolve(true) + } + } } // `drainTo` @@ -912,8 +1118,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.drainTo(script: _scripts[scriptId]!) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.drainTo(script: _scripts[scriptId]!) + DispatchQueue.main.async { + resolve(true) + } + } } // `enableRbf` @@ -923,8 +1133,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.enableRbf() - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.enableRbf() + DispatchQueue.main.async { + resolve(true) + } + } } // `enableRbfWithSequence` @@ -935,8 +1149,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _txBuilders[id] = _txBuilders[id]?.enableRbfWithSequence(nsequence: UInt32(truncating: nsequence)) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _txBuilders[id] = _txBuilders[id]?.enableRbfWithSequence(nsequence: UInt32(truncating: nsequence)) + DispatchQueue.main.async { + resolve(true) + } + } } @@ -948,12 +1166,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - var dataList: [UInt8] = [] - for item in data { - dataList.append(UInt8(truncating: item as! NSNumber)) + DispatchQueue.global(qos: .userInteractive).async { [self] in + var dataList: [UInt8] = [] + for item in data { + dataList.append(UInt8(truncating: item as! NSNumber)) + } + _txBuilders[id] = _txBuilders[id]?.addData(data: dataList) + DispatchQueue.main.async { + resolve(true) + } } - _txBuilders[id] = _txBuilders[id]?.addData(data: dataList) - resolve(true) } @@ -965,15 +1187,19 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - var scriptAmounts: [ScriptAmount] = [] - for item in recipients { - let amount = UInt64(truncating: item["amount"] as! NSNumber) - let script: NSDictionary = item["script"] as! NSDictionary - let scriptAmount = ScriptAmount(script: _scripts[script["id"] as! String]!, amount: amount) - scriptAmounts.append(scriptAmount) + DispatchQueue.global(qos: .userInteractive).async { [self] in + var scriptAmounts: [ScriptAmount] = [] + for item in recipients { + let amount = UInt64(truncating: item["amount"] as! NSNumber) + let script: NSDictionary = item["script"] as! NSDictionary + let scriptAmount = ScriptAmount(script: _scripts[script["id"] as! String]!, amount: amount) + scriptAmounts.append(scriptAmount) + } + _txBuilders[id] = _txBuilders[id]?.setRecipients(recipients: scriptAmounts) + DispatchQueue.main.async { + resolve(true) + } } - _txBuilders[id] = _txBuilders[id]?.setRecipients(recipients: scriptAmounts) - resolve(true) } @objc @@ -983,12 +1209,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let details = try _txBuilders[id]?.finish(wallet: getWalletById(id: walletId)) - let responseObject = getPSBTObject(txResult: details) - resolve(responseObject) - } catch let error { - reject("Finish tx error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let details = try _txBuilders[id]?.finish(wallet: getWalletById(id: walletId)) + let responseObject = getPSBTObject(txResult: details) + DispatchQueue.main.async { + resolve(responseObject) + } + } catch let error { + reject("Finish tx error", "\(error)", error) + } } } @@ -1002,12 +1232,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let id = randomId() - _descriptors[id] = try Descriptor(descriptor: descriptor, network: setNetwork(networkStr: network)) - resolve(id) - } catch let error { - reject("Create Descriptor error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let id = randomId() + _descriptors[id] = try Descriptor(descriptor: descriptor, network: setNetwork(networkStr: network)) + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("Create Descriptor error", "\(error)", error) + } } } @@ -1017,7 +1251,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_descriptors[descriptorId]!.asString()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_descriptors[descriptorId]!.asString()) + } + } } @objc @@ -1026,7 +1264,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_descriptors[descriptorId]!.asStringPrivate()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_descriptors[descriptorId]!.asStringPrivate()) + } + } } @objc @@ -1037,13 +1279,17 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _descriptors[id] = Descriptor.newBip44( - secretKey: _descriptorSecretKeys[secretKeyId]!, - keychain: setKeychainKind(keychainKind: keychain), - network: setNetwork(networkStr: network) - ) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptors[id] = Descriptor.newBip44( + secretKey: _descriptorSecretKeys[secretKeyId]!, + keychain: setKeychainKind(keychainKind: keychain), + network: setNetwork(networkStr: network) + ) + DispatchQueue.main.async { + resolve(id) + } + } } @objc @@ -1055,14 +1301,18 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _descriptors[id] = Descriptor.newBip44Public( - publicKey: _descriptorPublicKeys[publicKeyId]!, - fingerprint: fingerprint, - keychain: setKeychainKind(keychainKind: keychain), - network: setNetwork(networkStr: network) - ) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptors[id] = Descriptor.newBip44Public( + publicKey: _descriptorPublicKeys[publicKeyId]!, + fingerprint: fingerprint, + keychain: setKeychainKind(keychainKind: keychain), + network: setNetwork(networkStr: network) + ) + DispatchQueue.main.async { + resolve(id) + } + } } @objc @@ -1073,13 +1323,17 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _descriptors[id] = Descriptor.newBip49( - secretKey: _descriptorSecretKeys[secretKeyId]!, - keychain: setKeychainKind(keychainKind: keychain), - network: setNetwork(networkStr: network) - ) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptors[id] = Descriptor.newBip49( + secretKey: _descriptorSecretKeys[secretKeyId]!, + keychain: setKeychainKind(keychainKind: keychain), + network: setNetwork(networkStr: network) + ) + DispatchQueue.main.async { + resolve(id) + } + } } @objc @@ -1091,14 +1345,18 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _descriptors[id] = Descriptor.newBip49Public( - publicKey: _descriptorPublicKeys[publicKeyId]!, - fingerprint: fingerprint, - keychain: setKeychainKind(keychainKind: keychain), - network: setNetwork(networkStr: network) - ) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptors[id] = Descriptor.newBip49Public( + publicKey: _descriptorPublicKeys[publicKeyId]!, + fingerprint: fingerprint, + keychain: setKeychainKind(keychainKind: keychain), + network: setNetwork(networkStr: network) + ) + DispatchQueue.main.async { + resolve(id) + } + } } @objc @@ -1109,13 +1367,17 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _descriptors[id] = Descriptor.newBip84( - secretKey: _descriptorSecretKeys[secretKeyId]!, - keychain: setKeychainKind(keychainKind: keychain), - network: setNetwork(networkStr: network) - ) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptors[id] = Descriptor.newBip84( + secretKey: _descriptorSecretKeys[secretKeyId]!, + keychain: setKeychainKind(keychainKind: keychain), + network: setNetwork(networkStr: network) + ) + DispatchQueue.main.async { + resolve(id) + } + } } @objc @@ -1127,14 +1389,62 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _descriptors[id] = Descriptor.newBip84Public( - publicKey: _descriptorPublicKeys[publicKeyId]!, - fingerprint: fingerprint, - keychain: setKeychainKind(keychainKind: keychain), - network: setNetwork(networkStr: network) - ) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptors[id] = Descriptor.newBip84Public( + publicKey: _descriptorPublicKeys[publicKeyId]!, + fingerprint: fingerprint, + keychain: setKeychainKind(keychainKind: keychain), + network: setNetwork(networkStr: network) + ) + DispatchQueue.main.async { + resolve(id) + } + } + } + + @objc + func newBip86(_ + secretKeyId: String, + keychain: String, + network: String, + resolve: @escaping RCTPromiseResolveBlock, + reject: @escaping RCTPromiseRejectBlock + ) { + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptors[id] = Descriptor.newBip86( + secretKey: _descriptorSecretKeys[secretKeyId]!, + keychain: setKeychainKind(keychainKind: keychain), + network: setNetwork(networkStr: network) + ) + DispatchQueue.main.async { + resolve(id) + } + } + } + + @objc + func newBip86Public(_ + publicKeyId: String, + fingerprint: String, + keychain: String, + network: String, + resolve: @escaping RCTPromiseResolveBlock, + reject: @escaping RCTPromiseRejectBlock + ) { + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _descriptors[id] = Descriptor.newBip86Public( + publicKey: _descriptorPublicKeys[publicKeyId]!, + fingerprint: fingerprint, + keychain: setKeychainKind(keychainKind: keychain), + network: setNetwork(networkStr: network) + ) + DispatchQueue.main.async { + resolve(id) + } + } } /** Descriptor Templates method ends */ @@ -1146,12 +1456,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let newPsbt = try PartiallySignedTransaction(psbtBase64: base64) - .combine(other: PartiallySignedTransaction(psbtBase64: other)) - resolve(newPsbt.serialize()) - } catch let error { - reject("PSBT combine error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { + do { + let newPsbt = try PartiallySignedTransaction(psbtBase64: base64) + .combine(other: PartiallySignedTransaction(psbtBase64: other)) + DispatchQueue.main.async { + resolve(newPsbt.serialize()) + } + } catch let error { + reject("PSBT combine error", "\(error)", error) + } } } @@ -1161,12 +1475,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let id = randomId() - _transactions[id] = try PartiallySignedTransaction(psbtBase64: base64).extractTx() - resolve(id) - } catch let error { - reject("PSBT extract error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let id = randomId() + _transactions[id] = try PartiallySignedTransaction(psbtBase64: base64).extractTx() + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("PSBT extract error", "\(error)", error) + } } } @@ -1176,10 +1494,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - resolve(try PartiallySignedTransaction(psbtBase64: base64).serialize()) - } catch let error { - reject("Bump TX finish error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { + do { + let hex = try PartiallySignedTransaction(psbtBase64: base64).serialize() + DispatchQueue.main.async { + resolve(hex) + } + } catch let error { + reject("Bump TX finish error", "\(error)", error) + } } } @@ -1189,10 +1512,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - resolve(try PartiallySignedTransaction(psbtBase64: base64).txid()) - } catch let error { - reject("PSBT txid error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { + do { + let txid = try PartiallySignedTransaction(psbtBase64: base64).txid() + DispatchQueue.main.async { + resolve(txid) + } + } catch let error { + reject("PSBT txid error", "\(error)", error) + } } } @@ -1202,10 +1530,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - resolve(try PartiallySignedTransaction(psbtBase64: base64).feeAmount()) - } catch let error { - reject("PSBT feeAmount error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { + do { + let feeAmount = try PartiallySignedTransaction(psbtBase64: base64).feeAmount() + DispatchQueue.main.async { + resolve(feeAmount) + } + } catch let error { + reject("PSBT feeAmount error", "\(error)", error) + } } } @@ -1215,10 +1548,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - resolve(try PartiallySignedTransaction(psbtBase64: base64).feeRate()?.asSatPerVb()) - } catch let error { - reject("PSBT feeRate error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { + do { + let psbtFeeRate = try PartiallySignedTransaction(psbtBase64: base64).feeRate()?.asSatPerVb() + DispatchQueue.main.async { + resolve(psbtFeeRate) + } + } catch let error { + reject("PSBT feeRate error", "\(error)", error) + } } } @@ -1228,10 +1566,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - resolve(try PartiallySignedTransaction(psbtBase64: base64).jsonSerialize()) - } catch let error { - reject("PSBT jsonSerialize error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { + do { + let serialized = try PartiallySignedTransaction(psbtBase64: base64).jsonSerialize() + DispatchQueue.main.async { + resolve(serialized) + } + } catch let error { + reject("PSBT jsonSerialize error", "\(error)", error) + } } } /** PartiallySignedTransaction method ends */ @@ -1245,20 +1588,28 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let id = randomId() - _bumpFeeTxBuilders[id] = BumpFeeTxBuilder(txid: txid, newFeeRate: newFeeRate.floatValue) - resolve(id) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let id = randomId() + _bumpFeeTxBuilders[id] = BumpFeeTxBuilder(txid: txid, newFeeRate: newFeeRate.floatValue) + DispatchQueue.main.async { + resolve(id) + } + } } @objc func bumpFeeTxBuilderAllowShrinking(_ id: String, - address: String, + scriptId: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!.allowShrinking(address: address) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!.allowShrinking(scriptPubkey: _scripts[scriptId]!) + DispatchQueue.main.async { + resolve(true) + } + } } @objc @@ -1267,8 +1618,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!.enableRbf() - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!.enableRbf() + DispatchQueue.main.async { + resolve(true) + } + } } @objc @@ -1278,8 +1633,12 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!.enableRbfWithSequence(nsequence: UInt32(truncating: nSequence)) - resolve(true) + DispatchQueue.global(qos: .userInteractive).async { [self] in + _bumpFeeTxBuilders[id] = _bumpFeeTxBuilders[id]!.enableRbfWithSequence(nsequence: UInt32(truncating: nSequence)) + DispatchQueue.main.async { + resolve(true) + } + } } @objc @@ -1289,11 +1648,15 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let res = try _bumpFeeTxBuilders[id]!.finish(wallet: getWalletById(id: walletId)) - resolve(res.serialize()) - } catch let error { - reject("BumpFee Txbuilder finish error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let res = try _bumpFeeTxBuilders[id]!.finish(wallet: getWalletById(id: walletId)) + DispatchQueue.main.async { + resolve(res.serialize()) + } + } catch let error { + reject("BumpFee Txbuilder finish error", "\(error)", error) + } } } /** BumpFeeTxBuilder methods ends*/ @@ -1306,12 +1669,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - do { - let id = randomId() - _transactions[id] = try Transaction(transactionBytes: getTxBytes(bytes: bytes)) - resolve(id) - } catch let error { - reject("Create transaction error", "\(error)", error) + DispatchQueue.global(qos: .userInteractive).async { [self] in + do { + let id = randomId() + _transactions[id] = try Transaction(transactionBytes: getTxBytes(bytes: bytes)) + DispatchQueue.main.async { + resolve(id) + } + } catch let error { + reject("Create transaction error", "\(error)", error) + } } } @@ -1322,7 +1689,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.serialize()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.serialize()) + } + } } @objc @@ -1331,7 +1702,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.txid()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.txid()) + } + } } @objc @@ -1340,7 +1715,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.weight()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.weight()) + } + } } @objc @@ -1349,7 +1728,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.size()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.size()) + } + } } @objc @@ -1358,7 +1741,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.vsize()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.vsize()) + } + } } @objc @@ -1367,7 +1754,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.isCoinBase()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.isCoinBase()) + } + } } @objc @@ -1376,7 +1767,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.isExplicitlyRbf()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.isExplicitlyRbf()) + } + } } @objc @@ -1385,7 +1780,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.isLockTimeEnabled()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.isLockTimeEnabled()) + } + } } @objc @@ -1394,7 +1793,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.version()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.version()) + } + } } @objc @@ -1403,7 +1806,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_transactions[id]!.lockTime()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { [self] in + resolve(_transactions[id]!.lockTime()) + } + } } @@ -1413,12 +1820,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let list = _transactions[id]!.input() - var mapped: [Any] = []; - for item in list { - mapped.append(createTxIn(txIn: item, _scripts: &_scripts)) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let list = _transactions[id]!.input() + var mapped: [Any] = []; + for item in list { + mapped.append(createTxIn(txIn: item, _scripts: &_scripts)) + } + DispatchQueue.main.async { + resolve(mapped) + } } - resolve(mapped) } @@ -1428,12 +1839,16 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - let list = _transactions[id]!.output() - var mapped: [Any] = []; - for item in list { - mapped.append(createTxOut(txOut: item, _scripts: &_scripts)) + DispatchQueue.global(qos: .userInteractive).async { [self] in + let list = _transactions[id]!.output() + var mapped: [Any] = []; + for item in list { + mapped.append(createTxOut(txOut: item, _scripts: &_scripts)) + } + DispatchQueue.main.async { + resolve(mapped) + } } - resolve(mapped) } /** Transaction methods ends*/ @@ -1445,7 +1860,11 @@ class BdkRnModule: NSObject { resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock ) { - resolve(_scripts[id]!.toBytes()) + DispatchQueue.global(qos: .userInteractive).async { [self] in + DispatchQueue.main.async { + resolve(self._scripts[id]!.toBytes()) + } + } } diff --git a/ios/BitcoinDevKit.swift b/ios/BitcoinDevKit.swift index a987c73..c6ae427 100644 --- a/ios/BitcoinDevKit.swift +++ b/ios/BitcoinDevKit.swift @@ -19,13 +19,13 @@ fileprivate extension RustBuffer { } static func from(_ ptr: UnsafeBufferPointer) -> RustBuffer { - try! rustCall { ffi_bdk_103c_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) } + try! rustCall { ffi_bdk_84_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) } } // Frees the buffer in place. // The buffer must not be used after this is called. func deallocate() { - try! rustCall { ffi_bdk_103c_rustbuffer_free(self, $0) } + try! rustCall { ffi_bdk_84_rustbuffer_free(self, $0) } } } @@ -410,6 +410,7 @@ public protocol AddressProtocol { func `network`() -> Network func `scriptPubkey`() -> Script func `toQrUri`() -> String + func `isValidForNetwork`(`network`: Network) -> Bool func `asString`() -> String } @@ -423,18 +424,19 @@ public class Address: AddressProtocol { required init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { self.pointer = pointer } - public convenience init(`address`: String) throws { + public convenience init(`address`: String, `network`: Network) throws { self.init(unsafeFromRawPointer: try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Address_new( - FfiConverterString.lower(`address`), $0) + bdk_84_Address_new( + FfiConverterString.lower(`address`), + FfiConverterTypeNetwork.lower(`network`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Address_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_Address_object_free(pointer, $0) } } @@ -443,7 +445,7 @@ public class Address: AddressProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Address_from_script( + bdk_84_Address_from_script( FfiConverterTypeScript.lower(`script`), FfiConverterTypeNetwork.lower(`network`), $0) }) @@ -456,7 +458,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_payload(self.pointer, $0 + bdk_84_Address_payload(self.pointer, $0 ) } ) @@ -466,7 +468,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_network(self.pointer, $0 + bdk_84_Address_network(self.pointer, $0 ) } ) @@ -476,7 +478,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_script_pubkey(self.pointer, $0 + bdk_84_Address_script_pubkey(self.pointer, $0 ) } ) @@ -486,7 +488,18 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_to_qr_uri(self.pointer, $0 + bdk_84_Address_to_qr_uri(self.pointer, $0 + ) +} + ) + } + public func `isValidForNetwork`(`network`: Network) -> Bool { + return try! FfiConverterBool.lift( + try! + rustCall() { + + bdk_84_Address_is_valid_for_network(self.pointer, + FfiConverterTypeNetwork.lower(`network`), $0 ) } ) @@ -496,7 +509,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_as_string(self.pointer, $0 + bdk_84_Address_as_string(self.pointer, $0 ) } ) @@ -558,13 +571,13 @@ public class Blockchain: BlockchainProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_new( + bdk_84_Blockchain_new( FfiConverterTypeBlockchainConfig.lower(`config`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Blockchain_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_Blockchain_object_free(pointer, $0) } } @@ -573,7 +586,7 @@ public class Blockchain: BlockchainProtocol { public func `broadcast`(`transaction`: Transaction) throws { try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_broadcast(self.pointer, + bdk_84_Blockchain_broadcast(self.pointer, FfiConverterTypeTransaction.lower(`transaction`), $0 ) } @@ -582,7 +595,7 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterTypeFeeRate.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_estimate_fee(self.pointer, + bdk_84_Blockchain_estimate_fee(self.pointer, FfiConverterUInt64.lower(`target`), $0 ) } @@ -592,7 +605,7 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterUInt32.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_get_height(self.pointer, $0 + bdk_84_Blockchain_get_height(self.pointer, $0 ) } ) @@ -601,7 +614,7 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterString.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_get_block_hash(self.pointer, + bdk_84_Blockchain_get_block_hash(self.pointer, FfiConverterUInt32.lower(`height`), $0 ) } @@ -643,7 +656,7 @@ public struct FfiConverterTypeBlockchain: FfiConverter { public protocol BumpFeeTxBuilderProtocol { - func `allowShrinking`(`address`: String) -> BumpFeeTxBuilder + func `allowShrinking`(`scriptPubkey`: Script) -> BumpFeeTxBuilder func `enableRbf`() -> BumpFeeTxBuilder func `enableRbfWithSequence`(`nsequence`: UInt32) -> BumpFeeTxBuilder func `finish`(`wallet`: Wallet) throws -> PartiallySignedTransaction @@ -664,26 +677,26 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { rustCall() { - bdk_103c_BumpFeeTxBuilder_new( + bdk_84_BumpFeeTxBuilder_new( FfiConverterString.lower(`txid`), FfiConverterFloat.lower(`newFeeRate`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_BumpFeeTxBuilder_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_BumpFeeTxBuilder_object_free(pointer, $0) } } - public func `allowShrinking`(`address`: String) -> BumpFeeTxBuilder { + public func `allowShrinking`(`scriptPubkey`: Script) -> BumpFeeTxBuilder { return try! FfiConverterTypeBumpFeeTxBuilder.lift( try! rustCall() { - bdk_103c_BumpFeeTxBuilder_allow_shrinking(self.pointer, - FfiConverterString.lower(`address`), $0 + bdk_84_BumpFeeTxBuilder_allow_shrinking(self.pointer, + FfiConverterTypeScript.lower(`scriptPubkey`), $0 ) } ) @@ -693,7 +706,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { try! rustCall() { - bdk_103c_BumpFeeTxBuilder_enable_rbf(self.pointer, $0 + bdk_84_BumpFeeTxBuilder_enable_rbf(self.pointer, $0 ) } ) @@ -703,7 +716,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { try! rustCall() { - bdk_103c_BumpFeeTxBuilder_enable_rbf_with_sequence(self.pointer, + bdk_84_BumpFeeTxBuilder_enable_rbf_with_sequence(self.pointer, FfiConverterUInt32.lower(`nsequence`), $0 ) } @@ -713,7 +726,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { return try FfiConverterTypePartiallySignedTransaction.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_BumpFeeTxBuilder_finish(self.pointer, + bdk_84_BumpFeeTxBuilder_finish(self.pointer, FfiConverterTypeWallet.lower(`wallet`), $0 ) } @@ -772,13 +785,13 @@ public class DerivationPath: DerivationPathProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DerivationPath_new( + bdk_84_DerivationPath_new( FfiConverterString.lower(`path`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_DerivationPath_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_DerivationPath_object_free(pointer, $0) } } @@ -839,14 +852,14 @@ public class Descriptor: DescriptorProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Descriptor_new( + bdk_84_Descriptor_new( FfiConverterString.lower(`descriptor`), FfiConverterTypeNetwork.lower(`network`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Descriptor_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_Descriptor_object_free(pointer, $0) } } @@ -855,7 +868,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip44( + bdk_84_Descriptor_new_bip44( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -867,7 +880,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip44_public( + bdk_84_Descriptor_new_bip44_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -880,7 +893,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip49( + bdk_84_Descriptor_new_bip49( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -892,7 +905,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip49_public( + bdk_84_Descriptor_new_bip49_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -905,7 +918,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip84( + bdk_84_Descriptor_new_bip84( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -917,7 +930,32 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip84_public( + bdk_84_Descriptor_new_bip84_public( + FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), + FfiConverterString.lower(`fingerprint`), + FfiConverterTypeKeychainKind.lower(`keychain`), + FfiConverterTypeNetwork.lower(`network`), $0) +}) + } + + public static func `newBip86`(`secretKey`: DescriptorSecretKey, `keychain`: KeychainKind, `network`: Network) -> Descriptor { + return Descriptor(unsafeFromRawPointer: try! + + rustCall() { + + bdk_84_Descriptor_new_bip86( + FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), + FfiConverterTypeKeychainKind.lower(`keychain`), + FfiConverterTypeNetwork.lower(`network`), $0) +}) + } + + public static func `newBip86Public`(`publicKey`: DescriptorPublicKey, `fingerprint`: String, `keychain`: KeychainKind, `network`: Network) -> Descriptor { + return Descriptor(unsafeFromRawPointer: try! + + rustCall() { + + bdk_84_Descriptor_new_bip86_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -932,7 +970,7 @@ public class Descriptor: DescriptorProtocol { try! rustCall() { - bdk_103c_Descriptor_as_string(self.pointer, $0 + bdk_84_Descriptor_as_string(self.pointer, $0 ) } ) @@ -942,7 +980,7 @@ public class Descriptor: DescriptorProtocol { try! rustCall() { - bdk_103c_Descriptor_as_string_private(self.pointer, $0 + bdk_84_Descriptor_as_string_private(self.pointer, $0 ) } ) @@ -1000,7 +1038,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { } deinit { - try! rustCall { ffi_bdk_103c_DescriptorPublicKey_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_DescriptorPublicKey_object_free(pointer, $0) } } @@ -1009,7 +1047,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorPublicKey_from_string( + bdk_84_DescriptorPublicKey_from_string( FfiConverterString.lower(`publicKey`), $0) }) } @@ -1020,7 +1058,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { return try FfiConverterTypeDescriptorPublicKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorPublicKey_derive(self.pointer, + bdk_84_DescriptorPublicKey_derive(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1030,7 +1068,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { return try FfiConverterTypeDescriptorPublicKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorPublicKey_extend(self.pointer, + bdk_84_DescriptorPublicKey_extend(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1041,7 +1079,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { try! rustCall() { - bdk_103c_DescriptorPublicKey_as_string(self.pointer, $0 + bdk_84_DescriptorPublicKey_as_string(self.pointer, $0 ) } ) @@ -1104,7 +1142,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { rustCall() { - bdk_103c_DescriptorSecretKey_new( + bdk_84_DescriptorSecretKey_new( FfiConverterTypeNetwork.lower(`network`), FfiConverterTypeMnemonic.lower(`mnemonic`), FfiConverterOptionString.lower(`password`), $0) @@ -1112,7 +1150,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { } deinit { - try! rustCall { ffi_bdk_103c_DescriptorSecretKey_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_DescriptorSecretKey_object_free(pointer, $0) } } @@ -1121,7 +1159,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorSecretKey_from_string( + bdk_84_DescriptorSecretKey_from_string( FfiConverterString.lower(`secretKey`), $0) }) } @@ -1132,7 +1170,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { return try FfiConverterTypeDescriptorSecretKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorSecretKey_derive(self.pointer, + bdk_84_DescriptorSecretKey_derive(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1142,7 +1180,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { return try FfiConverterTypeDescriptorSecretKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorSecretKey_extend(self.pointer, + bdk_84_DescriptorSecretKey_extend(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1153,7 +1191,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_103c_DescriptorSecretKey_as_public(self.pointer, $0 + bdk_84_DescriptorSecretKey_as_public(self.pointer, $0 ) } ) @@ -1163,7 +1201,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_103c_DescriptorSecretKey_secret_bytes(self.pointer, $0 + bdk_84_DescriptorSecretKey_secret_bytes(self.pointer, $0 ) } ) @@ -1173,7 +1211,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_103c_DescriptorSecretKey_as_string(self.pointer, $0 + bdk_84_DescriptorSecretKey_as_string(self.pointer, $0 ) } ) @@ -1229,7 +1267,7 @@ public class FeeRate: FeeRateProtocol { } deinit { - try! rustCall { ffi_bdk_103c_FeeRate_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_FeeRate_object_free(pointer, $0) } } @@ -1238,7 +1276,7 @@ public class FeeRate: FeeRateProtocol { rustCall() { - bdk_103c_FeeRate_from_sat_per_vb( + bdk_84_FeeRate_from_sat_per_vb( FfiConverterFloat.lower(`satPerVb`), $0) }) } @@ -1250,7 +1288,7 @@ public class FeeRate: FeeRateProtocol { try! rustCall() { - bdk_103c_FeeRate_as_sat_per_vb(self.pointer, $0 + bdk_84_FeeRate_as_sat_per_vb(self.pointer, $0 ) } ) @@ -1309,13 +1347,13 @@ public class Mnemonic: MnemonicProtocol { rustCall() { - bdk_103c_Mnemonic_new( + bdk_84_Mnemonic_new( FfiConverterTypeWordCount.lower(`wordCount`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Mnemonic_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_Mnemonic_object_free(pointer, $0) } } @@ -1324,7 +1362,7 @@ public class Mnemonic: MnemonicProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Mnemonic_from_string( + bdk_84_Mnemonic_from_string( FfiConverterString.lower(`mnemonic`), $0) }) } @@ -1334,7 +1372,7 @@ public class Mnemonic: MnemonicProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Mnemonic_from_entropy( + bdk_84_Mnemonic_from_entropy( FfiConverterSequenceUInt8.lower(`entropy`), $0) }) } @@ -1346,7 +1384,7 @@ public class Mnemonic: MnemonicProtocol { try! rustCall() { - bdk_103c_Mnemonic_as_string(self.pointer, $0 + bdk_84_Mnemonic_as_string(self.pointer, $0 ) } ) @@ -1411,13 +1449,13 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_PartiallySignedTransaction_new( + bdk_84_PartiallySignedTransaction_new( FfiConverterString.lower(`psbtBase64`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_PartiallySignedTransaction_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_PartiallySignedTransaction_object_free(pointer, $0) } } @@ -1428,7 +1466,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_serialize(self.pointer, $0 + bdk_84_PartiallySignedTransaction_serialize(self.pointer, $0 ) } ) @@ -1438,7 +1476,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_txid(self.pointer, $0 + bdk_84_PartiallySignedTransaction_txid(self.pointer, $0 ) } ) @@ -1448,7 +1486,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_extract_tx(self.pointer, $0 + bdk_84_PartiallySignedTransaction_extract_tx(self.pointer, $0 ) } ) @@ -1457,7 +1495,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { return try FfiConverterTypePartiallySignedTransaction.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_PartiallySignedTransaction_combine(self.pointer, + bdk_84_PartiallySignedTransaction_combine(self.pointer, FfiConverterTypePartiallySignedTransaction.lower(`other`), $0 ) } @@ -1468,7 +1506,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_fee_amount(self.pointer, $0 + bdk_84_PartiallySignedTransaction_fee_amount(self.pointer, $0 ) } ) @@ -1478,7 +1516,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_fee_rate(self.pointer, $0 + bdk_84_PartiallySignedTransaction_fee_rate(self.pointer, $0 ) } ) @@ -1488,7 +1526,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_json_serialize(self.pointer, $0 + bdk_84_PartiallySignedTransaction_json_serialize(self.pointer, $0 ) } ) @@ -1547,13 +1585,13 @@ public class Script: ScriptProtocol { rustCall() { - bdk_103c_Script_new( + bdk_84_Script_new( FfiConverterSequenceUInt8.lower(`rawOutputScript`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Script_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_Script_object_free(pointer, $0) } } @@ -1564,7 +1602,7 @@ public class Script: ScriptProtocol { try! rustCall() { - bdk_103c_Script_to_bytes(self.pointer, $0 + bdk_84_Script_to_bytes(self.pointer, $0 ) } ) @@ -1634,13 +1672,13 @@ public class Transaction: TransactionProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Transaction_new( + bdk_84_Transaction_new( FfiConverterSequenceUInt8.lower(`transactionBytes`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Transaction_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_Transaction_object_free(pointer, $0) } } @@ -1651,7 +1689,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_txid(self.pointer, $0 + bdk_84_Transaction_txid(self.pointer, $0 ) } ) @@ -1661,7 +1699,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_weight(self.pointer, $0 + bdk_84_Transaction_weight(self.pointer, $0 ) } ) @@ -1671,7 +1709,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_size(self.pointer, $0 + bdk_84_Transaction_size(self.pointer, $0 ) } ) @@ -1681,7 +1719,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_vsize(self.pointer, $0 + bdk_84_Transaction_vsize(self.pointer, $0 ) } ) @@ -1691,7 +1729,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_serialize(self.pointer, $0 + bdk_84_Transaction_serialize(self.pointer, $0 ) } ) @@ -1701,7 +1739,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_is_coin_base(self.pointer, $0 + bdk_84_Transaction_is_coin_base(self.pointer, $0 ) } ) @@ -1711,7 +1749,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_is_explicitly_rbf(self.pointer, $0 + bdk_84_Transaction_is_explicitly_rbf(self.pointer, $0 ) } ) @@ -1721,7 +1759,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_is_lock_time_enabled(self.pointer, $0 + bdk_84_Transaction_is_lock_time_enabled(self.pointer, $0 ) } ) @@ -1731,7 +1769,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_version(self.pointer, $0 + bdk_84_Transaction_version(self.pointer, $0 ) } ) @@ -1741,7 +1779,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_lock_time(self.pointer, $0 + bdk_84_Transaction_lock_time(self.pointer, $0 ) } ) @@ -1751,7 +1789,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_input(self.pointer, $0 + bdk_84_Transaction_input(self.pointer, $0 ) } ) @@ -1761,7 +1799,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_output(self.pointer, $0 + bdk_84_Transaction_output(self.pointer, $0 ) } ) @@ -1836,12 +1874,12 @@ public class TxBuilder: TxBuilderProtocol { rustCall() { - bdk_103c_TxBuilder_new($0) + bdk_84_TxBuilder_new($0) }) } deinit { - try! rustCall { ffi_bdk_103c_TxBuilder_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_TxBuilder_object_free(pointer, $0) } } @@ -1852,7 +1890,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_recipient(self.pointer, + bdk_84_TxBuilder_add_recipient(self.pointer, FfiConverterTypeScript.lower(`script`), FfiConverterUInt64.lower(`amount`), $0 ) @@ -1864,7 +1902,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_unspendable(self.pointer, + bdk_84_TxBuilder_add_unspendable(self.pointer, FfiConverterTypeOutPoint.lower(`unspendable`), $0 ) } @@ -1875,7 +1913,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_utxo(self.pointer, + bdk_84_TxBuilder_add_utxo(self.pointer, FfiConverterTypeOutPoint.lower(`outpoint`), $0 ) } @@ -1886,7 +1924,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_utxos(self.pointer, + bdk_84_TxBuilder_add_utxos(self.pointer, FfiConverterSequenceTypeOutPoint.lower(`outpoints`), $0 ) } @@ -1897,7 +1935,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_do_not_spend_change(self.pointer, $0 + bdk_84_TxBuilder_do_not_spend_change(self.pointer, $0 ) } ) @@ -1907,7 +1945,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_manually_selected_only(self.pointer, $0 + bdk_84_TxBuilder_manually_selected_only(self.pointer, $0 ) } ) @@ -1917,7 +1955,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_only_spend_change(self.pointer, $0 + bdk_84_TxBuilder_only_spend_change(self.pointer, $0 ) } ) @@ -1927,7 +1965,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_unspendable(self.pointer, + bdk_84_TxBuilder_unspendable(self.pointer, FfiConverterSequenceTypeOutPoint.lower(`unspendable`), $0 ) } @@ -1938,7 +1976,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_fee_rate(self.pointer, + bdk_84_TxBuilder_fee_rate(self.pointer, FfiConverterFloat.lower(`satPerVbyte`), $0 ) } @@ -1949,7 +1987,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_fee_absolute(self.pointer, + bdk_84_TxBuilder_fee_absolute(self.pointer, FfiConverterUInt64.lower(`feeAmount`), $0 ) } @@ -1960,7 +1998,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_drain_wallet(self.pointer, $0 + bdk_84_TxBuilder_drain_wallet(self.pointer, $0 ) } ) @@ -1970,7 +2008,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_drain_to(self.pointer, + bdk_84_TxBuilder_drain_to(self.pointer, FfiConverterTypeScript.lower(`script`), $0 ) } @@ -1981,7 +2019,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_enable_rbf(self.pointer, $0 + bdk_84_TxBuilder_enable_rbf(self.pointer, $0 ) } ) @@ -1991,7 +2029,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_enable_rbf_with_sequence(self.pointer, + bdk_84_TxBuilder_enable_rbf_with_sequence(self.pointer, FfiConverterUInt32.lower(`nsequence`), $0 ) } @@ -2002,7 +2040,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_data(self.pointer, + bdk_84_TxBuilder_add_data(self.pointer, FfiConverterSequenceUInt8.lower(`data`), $0 ) } @@ -2013,7 +2051,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_set_recipients(self.pointer, + bdk_84_TxBuilder_set_recipients(self.pointer, FfiConverterSequenceTypeScriptAmount.lower(`recipients`), $0 ) } @@ -2023,7 +2061,7 @@ public class TxBuilder: TxBuilderProtocol { return try FfiConverterTypeTxBuilderResult.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_TxBuilder_finish(self.pointer, + bdk_84_TxBuilder_finish(self.pointer, FfiConverterTypeWallet.lower(`wallet`), $0 ) } @@ -2091,7 +2129,7 @@ public class Wallet: WalletProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_new( + bdk_84_Wallet_new( FfiConverterTypeDescriptor.lower(`descriptor`), FfiConverterOptionTypeDescriptor.lower(`changeDescriptor`), FfiConverterTypeNetwork.lower(`network`), @@ -2100,7 +2138,7 @@ public class Wallet: WalletProtocol { } deinit { - try! rustCall { ffi_bdk_103c_Wallet_object_free(pointer, $0) } + try! rustCall { ffi_bdk_84_Wallet_object_free(pointer, $0) } } @@ -2111,7 +2149,7 @@ public class Wallet: WalletProtocol { try! rustCall() { - bdk_103c_Wallet_network(self.pointer, $0 + bdk_84_Wallet_network(self.pointer, $0 ) } ) @@ -2120,7 +2158,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeAddressInfo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_get_address(self.pointer, + bdk_84_Wallet_get_address(self.pointer, FfiConverterTypeAddressIndex.lower(`addressIndex`), $0 ) } @@ -2130,7 +2168,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeAddressInfo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_get_internal_address(self.pointer, + bdk_84_Wallet_get_internal_address(self.pointer, FfiConverterTypeAddressIndex.lower(`addressIndex`), $0 ) } @@ -2140,7 +2178,7 @@ public class Wallet: WalletProtocol { return try FfiConverterBool.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_is_mine(self.pointer, + bdk_84_Wallet_is_mine(self.pointer, FfiConverterTypeScript.lower(`script`), $0 ) } @@ -2150,7 +2188,7 @@ public class Wallet: WalletProtocol { return try FfiConverterSequenceTypeLocalUtxo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_list_unspent(self.pointer, $0 + bdk_84_Wallet_list_unspent(self.pointer, $0 ) } ) @@ -2159,7 +2197,7 @@ public class Wallet: WalletProtocol { return try FfiConverterSequenceTypeTransactionDetails.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_list_transactions(self.pointer, + bdk_84_Wallet_list_transactions(self.pointer, FfiConverterBool.lower(`includeRaw`), $0 ) } @@ -2169,7 +2207,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeBalance.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_get_balance(self.pointer, $0 + bdk_84_Wallet_get_balance(self.pointer, $0 ) } ) @@ -2178,7 +2216,7 @@ public class Wallet: WalletProtocol { return try FfiConverterBool.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_sign(self.pointer, + bdk_84_Wallet_sign(self.pointer, FfiConverterTypePartiallySignedTransaction.lower(`psbt`), FfiConverterOptionTypeSignOptions.lower(`signOptions`), $0 ) @@ -2188,7 +2226,7 @@ public class Wallet: WalletProtocol { public func `sync`(`blockchain`: Blockchain, `progress`: Progress?) throws { try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_sync(self.pointer, + bdk_84_Wallet_sync(self.pointer, FfiConverterTypeBlockchain.lower(`blockchain`), FfiConverterOptionCallbackInterfaceProgress.lower(`progress`), $0 ) @@ -3628,8 +3666,8 @@ extension Network: Equatable, Hashable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum Payload { - case `pubkeyHash`(`pubkeyHash`: [UInt8]) - case `scriptHash`(`scriptHash`: [UInt8]) + case `pubkeyHash`(`pubkeyHash`: String) + case `scriptHash`(`scriptHash`: String) case `witnessProgram`(`version`: WitnessVersion, `program`: [UInt8]) } @@ -3641,11 +3679,11 @@ public struct FfiConverterTypePayload: FfiConverterRustBuffer { switch variant { case 1: return .`pubkeyHash`( - `pubkeyHash`: try FfiConverterSequenceUInt8.read(from: &buf) + `pubkeyHash`: try FfiConverterString.read(from: &buf) ) case 2: return .`scriptHash`( - `scriptHash`: try FfiConverterSequenceUInt8.read(from: &buf) + `scriptHash`: try FfiConverterString.read(from: &buf) ) case 3: return .`witnessProgram`( @@ -3663,12 +3701,12 @@ public struct FfiConverterTypePayload: FfiConverterRustBuffer { case let .`pubkeyHash`(`pubkeyHash`): writeInt(&buf, Int32(1)) - FfiConverterSequenceUInt8.write(`pubkeyHash`, into: &buf) + FfiConverterString.write(`pubkeyHash`, into: &buf) case let .`scriptHash`(`scriptHash`): writeInt(&buf, Int32(2)) - FfiConverterSequenceUInt8.write(`scriptHash`, into: &buf) + FfiConverterString.write(`scriptHash`, into: &buf) case let .`witnessProgram`(`version`,`program`): @@ -4052,6 +4090,9 @@ public enum BdkError { // Simple error enums only carry a message case Rpc(message: String) + // Simple error enums only carry a message + case HardenedIndex(message: String) + } public struct FfiConverterTypeBdkError: FfiConverterRustBuffer { @@ -4232,6 +4273,10 @@ public struct FfiConverterTypeBdkError: FfiConverterRustBuffer { message: try FfiConverterString.read(from: &buf) ) + case 43: return .HardenedIndex( + message: try FfiConverterString.read(from: &buf) + ) + default: throw UniffiInternalError.unexpectedEnumCase } @@ -4369,6 +4414,9 @@ public struct FfiConverterTypeBdkError: FfiConverterRustBuffer { case let .Rpc(message): writeInt(&buf, Int32(42)) FfiConverterString.write(message, into: &buf) + case let .HardenedIndex(message): + writeInt(&buf, Int32(43)) + FfiConverterString.write(message, into: &buf) } @@ -4507,7 +4555,7 @@ fileprivate struct FfiConverterCallbackInterfaceProgress { private static var callbackInitialized = false private static func initCallback() { try! rustCall { (err: UnsafeMutablePointer) in - ffi_bdk_103c_Progress_init_callback(foreignCallbackCallbackInterfaceProgress, err) + ffi_bdk_84_Progress_init_callback(foreignCallbackCallbackInterfaceProgress, err) } } private static func ensureCallbackinitialized() { diff --git a/lib/classes/Address.d.ts b/lib/classes/Address.d.ts index f477060..c6ba83d 100644 --- a/lib/classes/Address.d.ts +++ b/lib/classes/Address.d.ts @@ -17,7 +17,7 @@ export declare class Address extends NativeLoader { * @param address * @returns {Promise
} */ - create(address: string): Promise
; + create(address: string, network: string): Promise
; /** * Create Address instance from script * @param script @@ -45,4 +45,8 @@ export declare class Address extends NativeLoader { * @returns {Promise} */ asString(): Promise; + /** + * @returns {Promise} + */ + isValidForNetwork(network: string): Promise; } diff --git a/lib/classes/Address.js b/lib/classes/Address.js index 5f81006..a7e08f7 100644 --- a/lib/classes/Address.js +++ b/lib/classes/Address.js @@ -22,8 +22,8 @@ export class Address extends NativeLoader { * @param address * @returns {Promise
} */ - async create(address) { - this.id = await this._bdk.initAddress(address); + async create(address, network) { + this.id = await this._bdk.initAddress(address, network); return this; } /** @@ -67,5 +67,11 @@ export class Address extends NativeLoader { async asString() { return await this._bdk.addressAsString(this.id); } + /** + * @returns {Promise} + */ + async isValidForNetwork(network) { + return await this._bdk.addressIsValidForNetwork(this.id, network); + } } //# sourceMappingURL=Address.js.map \ No newline at end of file diff --git a/lib/classes/Address.js.map b/lib/classes/Address.js.map index 8856f0d..f87022e 100644 --- a/lib/classes/Address.js.map +++ b/lib/classes/Address.js.map @@ -1 +1 @@ -{"version":3,"file":"Address.js","sourceRoot":"","sources":["../../src/classes/Address.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,YAAY;IAAzC;;QACE,OAAE,GAAW,EAAE,CAAC;IAmElB,CAAC;IAjEC;;;OAGG;IACH,WAAW,CAAC,EAAU;QACpB,IAAI,CAAC,EA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I,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1D,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO;QACX,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ;QACZ,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CAAC,OAAe;QACrC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF"} \ No newline at end of file diff --git a/lib/classes/Bindings.d.ts b/lib/classes/Bindings.d.ts index 1c6746c..834ce99 100644 --- a/lib/classes/Bindings.d.ts +++ b/lib/classes/Bindings.d.ts @@ -165,12 +165,12 @@ export declare class TxBuilderResult { constructor(psbt: PartiallySignedTransaction, txDetails: TransactionDetails); } export declare class PubkeyHash { - pubkeyHash: Array; - constructor(hash: Array); + pubkeyHash: string; + constructor(hash: string); } export declare class ScriptHash { - scriptHash: Array; - constructor(hash: Array); + scriptHash: string; + constructor(hash: string); } export declare class WitnessProgram { program: Array; diff --git a/lib/classes/Bindings.js.map b/lib/classes/Bindings.js.map index 44679c7..b8145b4 100644 --- a/lib/classes/Bindings.js.map +++ b/lib/classes/Bindings.js.map @@ -1 +1 @@ -{"version":3,"file":"Bindings.js","sourceRoot":"","sources":["../../src/classes/Bindings.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,OAAO,WAAW;IAgBtB,YAAY,KAAa,EAAE,OAAgB,EAAE,QAAsB;QACjE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,O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AC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,WAAW;IAqDtB,YACE,UAAmB,EACnB,gBAAyB,EACzB,YAAoB,EACpB,iBAA0B,EAC1B,iBAA0B,EAC1B,WAAoB,EACpB,sBAA+B,EAC/B,aAAsB;QAEtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACrD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;CACF"} \ No newline at end of file diff --git a/lib/classes/BumpFeeTxBuilder.d.ts b/lib/classes/BumpFeeTxBuilder.d.ts index 6847a90..10eeeab 100644 --- a/lib/classes/BumpFeeTxBuilder.d.ts +++ b/lib/classes/BumpFeeTxBuilder.d.ts @@ -1,3 +1,4 @@ +import { Script } from './Script'; import { NativeLoader } from './NativeLoader'; import { PartiallySignedTransaction } from './PartiallySignedTransaction'; import { Wallet } from './Wallet'; @@ -18,7 +19,7 @@ export declare class BumpFeeTxBuilder extends NativeLoader { * @param address * @returns {Promise} */ - allowShrinking(address: string): Promise; + allowShrinking(script: Script): Promise; /** * Enable signaling RBF * This will use the default nSequence value of `0xFFFFFFFD` diff --git a/lib/classes/BumpFeeTxBuilder.js b/lib/classes/BumpFeeTxBuilder.js index c2811cf..2bf4101 100644 --- a/lib/classes/BumpFeeTxBuilder.js +++ b/lib/classes/BumpFeeTxBuilder.js @@ -23,8 +23,8 @@ export class BumpFeeTxBuilder extends NativeLoader { * @param address * @returns {Promise} */ - async allowShrinking(address) { - await this._bdk.bumpFeeTxBuilderAllowShrinking(this.id, address); + async allowShrinking(script) { + await this._bdk.bumpFeeTxBuilderAllowShrinking(this.id, script.id); return this; } /** diff --git a/lib/classes/BumpFeeTxBuilder.js.map b/lib/classes/BumpFeeTxBuilder.js.map index 77c2f61..f3ef84c 100644 --- a/lib/classes/BumpFeeTxBuilder.js.map +++ b/lib/classes/BumpFeeTxBuilder.js.map @@ -1 +1 @@ -{"version":3,"file":"BumpFeeTxBuilder.js","sourceRoot":"","sources":["../../src/classes/BumpFeeTxBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E;;;GAGG;AACH,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAAlD;;QACE,OAAE,GAAW,EAAE,CAAC;IAwDlB,CAAC;IAtDC,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,UAAkB;QAC3C,IAAI,CAAC,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,cAAc,CAAC,OAAe;QAClC,MAAM,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAS;QACb,MAAM,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,qBAAqB,CAAC,SAAiB;QAC3C,MAAM,IAAI,CAAC,IAAI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qB,CAAC,SAAiB;QAC3C,MAAM,IAAI,CAAC,IAAI,CAAC,qCAAqC,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAC1E,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,IAAI,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QAC1E,OAAO,IAAI,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;CACF"} \ No newline at end of file diff --git a/lib/classes/Descriptor.d.ts b/lib/classes/Descriptor.d.ts index 2a5cf4d..9efd01c 100644 --- a/lib/classes/Descriptor.d.ts +++ b/lib/classes/Descriptor.d.ts @@ -63,4 +63,17 @@ export declare class Descriptor extends NativeLoader { * @returns {Promise} */ newBip84Public(publicKey: DescriptorPublicKey, fingerprint: string, keychain: KeychainKind, network: Network): Promise; + /** + * BIP86 template. Expands to `tr(key/86'/{0,1}'/0'/{0,1}/*)` + * Since there are hardened derivation steps, this template requires a private derivable key (generally a `xprv`/`tprv`). + * @returns {Promise} + */ + newBip86(secretKey: DescriptorSecretKey, keychain: KeychainKind, network: Network): Promise; + /** + * BIP86 public template. Expands to `tr(key/{0,1}/*)` + * This assumes that the key used has already been derived with `m/86'/0'/0'` for Mainnet or `m/86'/1'/0'` for Testnet. + * This template requires the parent fingerprint to populate correctly the metadata of PSBTs. + * @returns {Promise} + */ + newBip86Public(publicKey: DescriptorPublicKey, fingerprint: string, keychain: KeychainKind, network: Network): Promise; } diff --git a/lib/classes/Descriptor.js b/lib/classes/Descriptor.js index 56e8715..37beb8a 100644 --- a/lib/classes/Descriptor.js +++ b/lib/classes/Descriptor.js @@ -92,5 +92,24 @@ export class Descriptor extends NativeLoader { this.id = await this._bdk.newBip84Public(publicKey.id, fingerprint, keychain, network); return this; } + /** + * BIP86 template. Expands to `tr(key/86'/{0,1}'/0'/{0,1}/*)` + * Since there are hardened derivation steps, this template requires a private derivable key (generally a `xprv`/`tprv`). + * @returns {Promise} + */ + async newBip86(secretKey, keychain, network) { + this.id = await this._bdk.newBip86(secretKey.id, keychain, network); + return this; + } + /** + * BIP86 public template. Expands to `tr(key/{0,1}/*)` + * This assumes that the key used has already been derived with `m/86'/0'/0'` for Mainnet or `m/86'/1'/0'` for Testnet. + * This template requires the parent fingerprint to populate correctly the metadata of PSBTs. + * @returns {Promise} + */ + async newBip86Public(publicKey, fingerprint, keychain, network) { + this.id = await this._bdk.newBip86Public(publicKey.id, fingerprint, keychain, network); + return this; + } } //# sourceMappingURL=Descriptor.js.map \ No newline at end of file diff --git a/lib/classes/Descriptor.js.map b/lib/classes/Descriptor.js.map index 36730cf..eaac2bf 100644 --- a/lib/classes/Descriptor.js.map +++ b/lib/classes/Descriptor.js.map @@ -1 +1 @@ -{"version":3,"file":"Descriptor.js","sourceRoot":"","sources":["../../src/classes/Descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,OAAO,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,YAAY;IAA5C;;QACE,OAAE,GAAW,EAAE,CAAC;IA6GlB,CAAC;IA3GC;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,UAAkB,EAAE,OAAgB;QAC/C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YAC7C,MAAM,8CAA8C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;SAC9E;QACD,IAAI,CAAC,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OA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F,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,SAA8B,EAAE,QAAsB,EAAE,OAAgB;QACrF,IAAI,CAAC,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,SAA8B,EAC9B,WAAmB,EACnB,QAAsB,EACtB,OAAgB;QAEhB,IAAI,CAAC,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACvF,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,SAA8B,EAAE,QAAsB,EAAE,OAAgB;QACrF,IAAI,CAAC,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,SAA8B,EAC9B,WAAmB,EACnB,QAAsB,EACtB,OAAgB;QAEhB,IAAI,CAAC,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACvF,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/lib/classes/NativeLoader.d.ts b/lib/classes/NativeLoader.d.ts index e5fda47..5b627b1 100644 --- a/lib/classes/NativeLoader.d.ts +++ b/lib/classes/NativeLoader.d.ts @@ -26,7 +26,7 @@ export interface NativeBdkRn { sledDBInit(path: string, treeName: string): string; sqliteDBInit(path: string): string; walletInit(descriptor: string, changeDescriptor: string | null, network: Network, dbConfig: string): any; - getAddress(id: string, addressIndex: AddressIndex): any; + getAddress(id: string, addressIndex: AddressIndex | number): any; getInternalAddress(id: string, addressIndex: AddressIndex | number): any; isMine(id: string, scriptId: string): boolean; getBalance(id: string): Balance; @@ -35,13 +35,14 @@ export interface NativeBdkRn { sign(id: string, psbtBase64: string, signOptions?: SignOptions): string; listUnspent(id: string): Array; listTransactions(id: string, includeRaw: boolean): Array; - initAddress(address: string): string; + initAddress(address: string, network: string): string; addressFromScript(script: string, network: Network): string; addressToScriptPubkeyHex(id: string): string; addressPayload(id: string): Payload; addressNetwork(id: string): string; addressToQrUri(id: string): string; addressAsString(id: string): string; + addressIsValidForNetwork(id: string, network: string): boolean; createTxBuilder(): string; addRecipient(id: string, scriptId: string, amount: number): string; finish(id: string, walletId: string): { @@ -69,9 +70,11 @@ export interface NativeBdkRn { newBip44(id: string, keychain: KeychainKind, network: Network): string; newBip49(id: string, keychain: KeychainKind, network: Network): string; newBip84(id: string, keychain: KeychainKind, network: Network): string; + newBip86(id: string, keychain: KeychainKind, network: Network): string; newBip44Public(id: string, fingerprint: string, keychain: KeychainKind, network: Network): string; newBip49Public(id: string, fingerprint: string, keychain: KeychainKind, network: Network): string; newBip84Public(id: string, fingerprint: string, keychain: KeychainKind, network: Network): string; + newBip86Public(id: string, fingerprint: string, keychain: KeychainKind, network: Network): string; combine(psbt64: string, otherPsbt: string): string; extractTx(psbt64: string): string; serialize(psbt64: string): string; @@ -80,7 +83,7 @@ export interface NativeBdkRn { psbtFeeRate(psbt64: string): number; jsonSerialize(psbt64: string): string; bumpFeeTxBuilderInit(txid: string, newFeeRate: number): string; - bumpFeeTxBuilderAllowShrinking(id: string, address: string): string; + bumpFeeTxBuilderAllowShrinking(id: string, scriptId: string): string; bumpFeeTxBuilderEnableRbf(id: string): any; bumpFeeTxBuilderEnableRbfWithSequence(id: string, nsequence: number): any; bumpFeeTxBuilderFinish(id: string, walletId: string): any; diff --git a/lib/classes/NativeLoader.js.map b/lib/classes/NativeLoader.js.map index ac621cb..f22e088 100644 --- a/lib/classes/NativeLoader.js.map +++ b/lib/classes/NativeLoader.js.map @@ -1 +1 @@ -{"version":3,"file":"NativeLoader.js","sourceRoot":"","sources":["../../src/classes/NativeLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAuI7C,MAAM,OAAO,YAAY;IAGvB;QACE,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,WAAW,CAAC;IACxC,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"NativeLoader.js","sourceRoot":"","sources":["../../src/classes/NativeLoader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAuI7C,MAAM,OAAO,YAAY;IAGvB;QACE,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,WAAW,CAAC;IACxC,CAAC;CACF"} \ No newline at end of file diff --git a/lib/classes/Wallet.d.ts b/lib/classes/Wallet.d.ts index 5aa699b..b5eb73a 100644 --- a/lib/classes/Wallet.d.ts +++ b/lib/classes/Wallet.d.ts @@ -24,7 +24,7 @@ export declare class Wallet extends NativeLoader { * @param addressIndex * @returns {Promise} */ - getAddress(addressIndex: AddressIndex): Promise; + getAddress(addressIndex: AddressIndex | number): Promise; /** * Return a derived address using the internal descriptor. * @param addressIndex diff --git a/lib/classes/Wallet.js b/lib/classes/Wallet.js index 92291e2..85c89b3 100644 --- a/lib/classes/Wallet.js +++ b/lib/classes/Wallet.js @@ -1,6 +1,6 @@ +import { AddressInfo, Balance, LocalUtxo } from './Bindings'; import { createOutpoint, createTxDetailsObject, createTxOut, getKeychainKind, getNetwork } from '../lib/utils'; import { Address } from './Address'; -import { AddressInfo, Balance, LocalUtxo } from './Bindings'; import { NativeLoader } from './NativeLoader'; import { PartiallySignedTransaction } from './PartiallySignedTransaction'; /** diff --git a/lib/classes/Wallet.js.map b/lib/classes/Wallet.js.map index 7cacbbf..1f45c87 100644 --- a/lib/classes/Wallet.js.map +++ b/lib/classes/Wallet.js.map @@ -1 +1 @@ -{"version":3,"file":"Wallet.js","sourceRoot":"","sources":["../../src/classes/Wallet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/G,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAmC,MAAM,YAAY,CAAC;AAI9F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,YAAY;IAAxC;;QACE,WAAM,GAAY,KAAK,CAAC;QACxB,OAAE,GAAW,EAAE,CAAC;IAiIlB,CAAC;IA/HC;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,UAAsB,EACtB,mBAAsC,IAAI,EAC1C,OAAgB,EAChB,QAAwB;QAExB,IAAI,CAAC,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAClC,UAAU,CAAC,EAAE,EACb,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAC7C,OAAO,EACP,QAAQ,CAAC,EAAE,CACZ,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,UAAU,CAAC,YAA0B;QACzC,IAAI,WAAW,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QACpE,OAAO,IAAI,WAAW,CACpB,WAAW,C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D,CAAC;CACF"} \ No newline at end of file diff --git a/lib/lib/enums.d.ts b/lib/lib/enums.d.ts index 12737b9..e35028b 100644 --- a/lib/lib/enums.d.ts +++ b/lib/lib/enums.d.ts @@ -64,6 +64,6 @@ export interface BlockchainRpcConfig { } export interface Payload { type: string; - value: Array; + value: Array | string; version?: string; } diff --git a/lib/lib/utils.js.map b/lib/lib/utils.js.map index f4ed0da..cdce7b9 100644 --- a/lib/lib/utils.js.map +++ b/lib/lib/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,IAAI,EACJ,KAAK,EACL,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,OAAO,EAAW,MAAM,SAAS,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAWrD,uCAAuC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAW,EAAsB,EAAE;;IACvE,OAAO,IAAI,kBAAkB,CAC3B,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,IAAI,EACT,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EACT,IAAI,SAAS,CAAC,MAAA,IAAI,CAAC,gBAAgB,0CAAE,MAAM,EAAE,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,EAC9E,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAC/E,CAAC;AACJ,CAAC,CAAC;AAEF,uBAAuB;AACvB,MAAM,CAAC,MAAM,UAAU,GA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IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AAEzG,0BAA0B;AAC1B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAU,EAAS,EAAE,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAEnG,6BAA6B;AAC7B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAa,EAAY,EAAE,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AAEtG,4BAA4B;AAC5B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAgB,EAAE;IACnE,IAAI,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC;IACzC,QAAQ,WAAW,EAAE;QACnB,KAAK,UAAU;YACb,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC;YACrC,MAAM;KACT;IACD,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index e4fed08..07f6f5f 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "bdk-rn", - "version": "0.29.0", + "version": "0.31.0", "description": "A React Native library for the Bitcon Development Kit (https://bitcoindevkit.org/)", - "homepage": "https://github.com/LtbLightning/bdk-rn", + "homepage": "https://github.com/LtbLightning", "main": "src/index.ts", "types": "lib/index.d.ts", - "author": "Bitcoin Zavior ", + "author": "Hello ", "license": "MIT", "files": [ "android", @@ -25,7 +25,8 @@ "!local.properties", "!project.xcworkspace", "!xcshareddata", - "!xcuserdata" + "!xcuserdata", + "!ios/*.xcframework" ], "scripts": { "compile": "rm -rf lib && tsc -p .", diff --git a/src/classes/Address.ts b/src/classes/Address.ts index 137ad00..778e1de 100644 --- a/src/classes/Address.ts +++ b/src/classes/Address.ts @@ -25,8 +25,8 @@ export class Address extends NativeLoader { * @param address * @returns {Promise
} */ - async create(address: string): Promise
{ - this.id = await this._bdk.initAddress(address); + async create(address: string, network: string): Promise
{ + this.id = await this._bdk.initAddress(address, network); return this; } @@ -76,4 +76,11 @@ export class Address extends NativeLoader { async asString(): Promise { return await this._bdk.addressAsString(this.id); } + + /** + * @returns {Promise} + */ + async isValidForNetwork(network: string): Promise { + return await this._bdk.addressIsValidForNetwork(this.id, network); + } } diff --git a/src/classes/Bindings.ts b/src/classes/Bindings.ts index 7ad8615..7ee23d9 100644 --- a/src/classes/Bindings.ts +++ b/src/classes/Bindings.ts @@ -251,15 +251,15 @@ export class TxBuilderResult { } export class PubkeyHash { - pubkeyHash: Array; - constructor(hash: Array) { + pubkeyHash: string; + constructor(hash: string) { this.pubkeyHash = hash; } } export class ScriptHash { - scriptHash: Array; - constructor(hash: Array) { + scriptHash: string; + constructor(hash: string) { this.scriptHash = hash; } } diff --git a/src/classes/BumpFeeTxBuilder.ts b/src/classes/BumpFeeTxBuilder.ts index bab3b9b..1dd89af 100644 --- a/src/classes/BumpFeeTxBuilder.ts +++ b/src/classes/BumpFeeTxBuilder.ts @@ -1,3 +1,4 @@ +import { Script } from './Script'; import { NativeLoader } from './NativeLoader'; import { PartiallySignedTransaction } from './PartiallySignedTransaction'; import { Wallet } from './Wallet'; @@ -24,8 +25,8 @@ export class BumpFeeTxBuilder extends NativeLoader { * @param address * @returns {Promise} */ - async allowShrinking(address: string): Promise { - await this._bdk.bumpFeeTxBuilderAllowShrinking(this.id, address); + async allowShrinking(script: Script): Promise { + await this._bdk.bumpFeeTxBuilderAllowShrinking(this.id, script.id); return this; } diff --git a/src/classes/Descriptor.ts b/src/classes/Descriptor.ts index 04a8708..62591a0 100644 --- a/src/classes/Descriptor.ts +++ b/src/classes/Descriptor.ts @@ -116,4 +116,30 @@ export class Descriptor extends NativeLoader { this.id = await this._bdk.newBip84Public(publicKey.id, fingerprint, keychain, network); return this; } + + /** + * BIP86 template. Expands to `tr(key/86'/{0,1}'/0'/{0,1}/*)` + * Since there are hardened derivation steps, this template requires a private derivable key (generally a `xprv`/`tprv`). + * @returns {Promise} + */ + async newBip86(secretKey: DescriptorSecretKey, keychain: KeychainKind, network: Network): Promise { + this.id = await this._bdk.newBip86(secretKey.id, keychain, network); + return this; + } + + /** + * BIP86 public template. Expands to `tr(key/{0,1}/*)` + * This assumes that the key used has already been derived with `m/86'/0'/0'` for Mainnet or `m/86'/1'/0'` for Testnet. + * This template requires the parent fingerprint to populate correctly the metadata of PSBTs. + * @returns {Promise} + */ + async newBip86Public( + publicKey: DescriptorPublicKey, + fingerprint: string, + keychain: KeychainKind, + network: Network + ): Promise { + this.id = await this._bdk.newBip86Public(publicKey.id, fingerprint, keychain, network); + return this; + } } diff --git a/src/classes/NativeLoader.ts b/src/classes/NativeLoader.ts index 9ee500e..f11b69a 100644 --- a/src/classes/NativeLoader.ts +++ b/src/classes/NativeLoader.ts @@ -1,8 +1,8 @@ -import { NativeModules } from 'react-native'; - import { AddressIndex, BlockchainRpcConfig, KeychainKind, Network, Payload, WordCount } from '../lib/enums'; import { Balance, OutPoint, ScriptAmount, SignOptions, TransactionDetails } from './Bindings'; +import { NativeModules } from 'react-native'; + export interface NativeBdkRn { generateSeedFromWordCount(wordCount: WordCount): string; generateSeedFromString(mnemonic: string): string; @@ -61,13 +61,14 @@ export interface NativeBdkRn { listUnspent(id: string): Array; listTransactions(id: string, includeRaw: boolean): Array; - initAddress(address: string): string; + initAddress(address: string, network: string): string; addressFromScript(script: string, network: Network): string; addressToScriptPubkeyHex(id: string): string; addressPayload(id: string): Payload; addressNetwork(id: string): string; addressToQrUri(id: string): string; addressAsString(id: string): string; + addressIsValidForNetwork(id: string, network: string): boolean; createTxBuilder(): string; addRecipient(id: string, scriptId: string, amount: number): string; @@ -97,10 +98,12 @@ export interface NativeBdkRn { newBip44(id: string, keychain: KeychainKind, network: Network): string; newBip49(id: string, keychain: KeychainKind, network: Network): string; newBip84(id: string, keychain: KeychainKind, network: Network): string; + newBip86(id: string, keychain: KeychainKind, network: Network): string; newBip44Public(id: string, fingerprint: string, keychain: KeychainKind, network: Network): string; newBip49Public(id: string, fingerprint: string, keychain: KeychainKind, network: Network): string; newBip84Public(id: string, fingerprint: string, keychain: KeychainKind, network: Network): string; + newBip86Public(id: string, fingerprint: string, keychain: KeychainKind, network: Network): string; combine(psbt64: string, otherPsbt: string): string; extractTx(psbt64: string): string; @@ -111,7 +114,7 @@ export interface NativeBdkRn { jsonSerialize(psbt64: string): string; bumpFeeTxBuilderInit(txid: string, newFeeRate: number): string; - bumpFeeTxBuilderAllowShrinking(id: string, address: string): string; + bumpFeeTxBuilderAllowShrinking(id: string, scriptId: string): string; bumpFeeTxBuilderEnableRbf(id: string): any; bumpFeeTxBuilderEnableRbfWithSequence(id: string, nsequence: number): any; bumpFeeTxBuilderFinish(id: string, walletId: string): any; diff --git a/src/classes/Wallet.ts b/src/classes/Wallet.ts index 5a36653..9a61797 100644 --- a/src/classes/Wallet.ts +++ b/src/classes/Wallet.ts @@ -1,7 +1,8 @@ import { AddressIndex, Network } from '../lib/enums'; +import { AddressInfo, Balance, LocalUtxo, SignOptions, TransactionDetails } from './Bindings'; import { createOutpoint, createTxDetailsObject, createTxOut, getKeychainKind, getNetwork } from '../lib/utils'; + import { Address } from './Address'; -import { AddressInfo, Balance, LocalUtxo, SignOptions, TransactionDetails } from './Bindings'; import { Blockchain } from './Blockchain'; import { DatabaseConfig } from './DatabaseConfig'; import { Descriptor } from './Descriptor'; diff --git a/src/installer.js b/src/installer.js index 82fee01..cc9275c 100644 --- a/src/installer.js +++ b/src/installer.js @@ -2,7 +2,7 @@ const request = require('request'); const fs = require('fs'); var AdmZip = require('adm-zip'); -var fileUrl = 'https://github.com/bitcoindevkit/bdk-swift/releases/download/0.29.0/bdkFFI.xcframework.zip'; +var fileUrl = 'https://github.com/bitcoindevkit/bdk-swift/releases/download/0.31.0/bdkFFI.xcframework.zip'; const src = 'ios/bdkFFI.xcframework.zip'; const target = 'ios/'; diff --git a/src/lib/enums.ts b/src/lib/enums.ts index e45bb70..25c08db 100644 --- a/src/lib/enums.ts +++ b/src/lib/enums.ts @@ -73,6 +73,6 @@ export interface BlockchainRpcConfig { export interface Payload { type: string; - value: Array; + value: Array | string; version?: string; } diff --git a/src/lib/utils.ts b/src/lib/utils.ts index a44687b..9c8c4c0 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -59,13 +59,13 @@ export const getPayload = (payload: Payload): PubkeyHash | ScriptHash | WitnessP let returnObj; switch (payload.type) { case 'scriptHash': - returnObj = new ScriptHash(payload.value); + returnObj = new ScriptHash(payload.value as string); break; case 'witnessProgram': - returnObj = new WitnessProgram(payload.value, payload.version!); + returnObj = new WitnessProgram(payload.value as Array, payload.version!); break; default: - returnObj = new PubkeyHash(payload.value); + returnObj = new PubkeyHash(payload.value as string); } return returnObj; }; diff --git a/yarn.lock b/yarn.lock index d217cb7..623e130 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,7 +4,7 @@ "@ampproject/remapping@^2.2.0": version "2.2.1" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== dependencies: "@jridgewell/gen-mapping" "^0.3.0" @@ -26,7 +26,7 @@ "@babel/code-frame@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== dependencies: "@babel/highlight" "^7.18.6" @@ -38,12 +38,12 @@ "@babel/compat-data@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.4.tgz#457ffe647c480dff59c2be092fc3acf71195c87f" integrity sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g== "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.3", "@babel/core@^7.14.0", "@babel/core@^7.16.12", "@babel/core@^7.7.2", "@babel/core@^7.8.0": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.4.tgz#c6dc73242507b8e2a27fd13a9c1814f9fa34a659" integrity sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA== dependencies: "@ampproject/remapping" "^2.2.0" @@ -64,7 +64,7 @@ "@babel/eslint-parser@^7.18.2": version "7.21.3" - resolved "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.21.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.21.3.tgz#d79e822050f2de65d7f368a076846e7184234af7" integrity sha512-kfhmPimwo6k4P8zxNs8+T7yR44q1LdpsZdE1NkCsVlfiuTPRfnGgjaF8Qgug9q9Pou17u6wneYF0lDCZJATMFg== dependencies: "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" @@ -82,7 +82,7 @@ "@babel/generator@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.4.tgz#64a94b7448989f421f919d5239ef553b37bb26bc" integrity sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA== dependencies: "@babel/types" "^7.21.4" @@ -118,7 +118,7 @@ "@babel/helper-compilation-targets@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz#770cd1ce0889097ceacb99418ee6934ef0572656" integrity sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg== dependencies: "@babel/compat-data" "^7.21.4" @@ -142,7 +142,7 @@ "@babel/helper-create-class-features-plugin@^7.21.0": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.4.tgz#3a017163dc3c2ba7deb9a7950849a9586ea24c18" integrity sha512-46QrX2CQlaFRF4TkwfTt6nJD7IHq8539cCL7SDpqWSDeJKY1xylKKY5F/33mJhLZ3mFvKv2gGrVS6NkyF6qs+Q== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" @@ -196,7 +196,7 @@ "@babel/helper-function-name@^7.21.0": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== dependencies: "@babel/template" "^7.20.7" @@ -218,7 +218,7 @@ "@babel/helper-member-expression-to-functions@^7.21.0": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5" integrity sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q== dependencies: "@babel/types" "^7.21.0" @@ -232,7 +232,7 @@ "@babel/helper-module-imports@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af" integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg== dependencies: "@babel/types" "^7.21.4" @@ -253,7 +253,7 @@ "@babel/helper-module-transforms@^7.21.2": version "7.21.2" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== dependencies: "@babel/helper-environment-visitor" "^7.18.9" @@ -337,12 +337,12 @@ "@babel/helper-validator-option@^7.21.0": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== "@babel/helper-wrap-function@^7.18.9": version "7.20.5" - resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== dependencies: "@babel/helper-function-name" "^7.19.0" @@ -352,7 +352,7 @@ "@babel/helpers@^7.21.0": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA== dependencies: "@babel/template" "^7.20.7" @@ -375,7 +375,7 @@ "@babel/parser@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.4.tgz#94003fdfc520bbe2875d4ae557b43ddb6d880f17" integrity sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw== "@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.1.0": @@ -388,7 +388,7 @@ "@babel/plugin-proposal-export-default-from@^7.0.0": version "7.18.10" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.18.10.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.18.10.tgz#091f4794dbce4027c03cf4ebc64d3fb96b75c206" integrity sha512-5H2N3R2aQFxkV4PIBUR/i7PUSwgTZjouJKzI8eKswfIjT0PhvzkPn0t0wIS5zn6maQuvtT0t1oHtMUz61LOuow== dependencies: "@babel/helper-plugin-utils" "^7.18.9" @@ -460,14 +460,14 @@ "@babel/plugin-syntax-export-default-from@^7.0.0", "@babel/plugin-syntax-export-default-from@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.18.6.tgz#8df076711a4818c4ce4f23e61d622b0ba2ff84bc" integrity sha512-Kr//z3ujSVNx6E9z9ih5xXXMqK07VVTuqPmqGe6Mss/zW5XPeLZeSDZoP9ab/hT4wPKqAgjl2PnhPrcpk8Seew== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.18.6", "@babel/plugin-syntax-flow@^7.2.0": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.21.4.tgz#3e37fca4f06d93567c1cd9b75156422e90a67107" integrity sha512-l9xd3N+XG4fZRxEP3vXdK6RW7vN1Uf5dxzRC/09wV86wqZ/YYQooBIGNsiRdfNR3/q2/5pPzV4B54J/9ctX5jw== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -488,7 +488,7 @@ "@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.18.6", "@babel/plugin-syntax-jsx@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz#f264ed7bf40ffc9ec239edabc17a50c4f5b6fea2" integrity sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -544,21 +544,21 @@ "@babel/plugin-syntax-typescript@^7.20.0", "@babel/plugin-syntax-typescript@^7.7.2": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz#2751948e9b7c6d771a8efa59340c15d4a2891ff8" integrity sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-arrow-functions@^7.0.0": version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-async-to-generator@^7.0.0": version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== dependencies: "@babel/helper-module-imports" "^7.18.6" @@ -596,7 +596,7 @@ "@babel/plugin-transform-computed-properties@^7.0.0": version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -619,7 +619,7 @@ "@babel/plugin-transform-flow-strip-types@^7.0.0", "@babel/plugin-transform-flow-strip-types@^7.21.0": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.21.0.tgz#6aeca0adcb81dc627c8986e770bfaa4d9812aff5" integrity sha512-FlFA2Mj87a6sDkW4gfGrQQqwY/dLlBAyJa2dJEZ+FHXUVHBflO2wyKvg+OOEzXfrKYIa4HWl0mgmbCzt0cMb7w== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -666,7 +666,7 @@ "@babel/plugin-transform-modules-commonjs@^7.21.2": version "7.21.2" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz#6ff5070e71e3192ef2b7e39820a06fb78e3058e7" integrity sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA== dependencies: "@babel/helper-module-transforms" "^7.21.2" @@ -675,7 +675,7 @@ "@babel/plugin-transform-object-assign@^7.0.0": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.18.6.tgz#7830b4b6f83e1374a5afb9f6111bcfaea872cdd2" integrity sha512-mQisZ3JfqWh2gVXvfqYCAAyRs6+7oev+myBsTwW5RnPhYXOTuCEw2oe3YgxlXMViXUS53lG8koulI7mJ+8JE+A== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -704,28 +704,28 @@ "@babel/plugin-transform-react-display-name@^7.0.0": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-react-jsx-self@^7.0.0": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.21.0.tgz#ec98d4a9baafc5a1eb398da4cf94afbb40254a54" integrity sha512-f/Eq+79JEu+KUANFks9UZCcvydOOGMgF7jBrcwjHa5jTZD8JivnhCJYvmlhR/WTXBWonDExPoW0eO/CR4QJirA== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-react-jsx-source@^7.0.0": version "7.19.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.19.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.19.6.tgz#88578ae8331e5887e8ce28e4c9dc83fb29da0b86" integrity sha512-RpAi004QyMNisst/pvSanoRdJ4q+jMCWyk9zdw/CyLB9j8RXEahodR6l2GyttDRyEVWZtbN+TpLiHJ3t34LbsQ== dependencies: "@babel/helper-plugin-utils" "^7.19.0" "@babel/plugin-transform-react-jsx@^7.0.0": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.21.0.tgz#656b42c2fdea0a6d8762075d58ef9d4e3c4ab8a2" integrity sha512-6OAWljMvQrZjR2DaNhVfRz6dkCAVV+ymcLUmaf8bccGOHn2v5rHJK3tTpij0BuhdYWP4LLaqj5lwcdlpAAPuvg== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" @@ -736,7 +736,7 @@ "@babel/plugin-transform-regenerator@^7.0.0": version "7.20.5" - resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -744,7 +744,7 @@ "@babel/plugin-transform-runtime@^7.0.0": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.21.4.tgz#2e1da21ca597a7d01fc96b699b21d8d2023191aa" integrity sha512-1J4dhrw1h1PqnNNpzwxQ2UBymJUF8KuPjAAnlLwZcGhHAIqUigFW7cdK6GHoB64ubY4qXQNYknoUeks4Wz7CUA== dependencies: "@babel/helper-module-imports" "^7.21.4" @@ -785,7 +785,7 @@ "@babel/plugin-transform-typescript@^7.21.3", "@babel/plugin-transform-typescript@^7.5.0": version "7.21.3" - resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.21.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.21.3.tgz#316c5be579856ea890a57ebc5116c5d064658f2b" integrity sha512-RQxPz6Iqt8T0uw/WsJNReuBpWpBqs/n7mNo18sKLoTbMp+UrEekhH+pKSVC7gWz+DNjo9gryfV8YzCiT45RgMw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" @@ -803,7 +803,7 @@ "@babel/preset-flow@^7.0.0": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.21.4.tgz#a5de2a1cafa61f0e0b3af9b30ff0295d38d3608f" integrity sha512-F24cSq4DIBmhq4OzK3dE63NHagb27OPE3eWR+HLekt4Z3Y5MzIIUGF3LlLgV0gN8vzbDViSY7HnrReNVCJXTeA== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -812,7 +812,7 @@ "@babel/preset-typescript@^7.1.0": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.21.4.tgz#b913ac8e6aa8932e47c21b01b4368d8aa239a529" integrity sha512-sMLNWY37TCdRH/bJ6ZeeOH1nPuanED7Ai9Y/vH31IPqalioJ6ZNFUWONsakhv4r4n+I6gm5lmoE0olkgib/j/A== dependencies: "@babel/helper-plugin-utils" "^7.20.2" @@ -823,7 +823,7 @@ "@babel/register@^7.0.0": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/register/-/register-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.21.0.tgz#c97bf56c2472e063774f31d344c592ebdcefa132" integrity sha512-9nKsPmYDi5DidAqJaQooxIhsLJiNMkGr8ypQ8Uic7cIox7UCDsM7HuUGxdGT7mSDTYbqzIdsOWzfBton/YJrMw== dependencies: clone-deep "^4.0.1" @@ -834,7 +834,7 @@ "@babel/runtime@^7.16.7", "@babel/runtime@^7.8.4": version "7.21.0" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== dependencies: regenerator-runtime "^0.13.11" @@ -866,7 +866,7 @@ "@babel/traverse@^7.20.5", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.4.tgz#a836aca7b116634e97a6ed99976236b3282c9d36" integrity sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q== dependencies: "@babel/code-frame" "^7.21.4" @@ -891,7 +891,7 @@ "@babel/types@^7.20.5", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.4": version "7.21.4" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.4.tgz#2d5d6bb7908699b3b416409ffd3b5daa25b030d4" integrity sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA== dependencies: "@babel/helper-string-parser" "^7.19.4" @@ -913,14 +913,14 @@ "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" - resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.4.0": version "4.5.0" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.0.tgz#f6f729b02feee2c749f57e334b7a1b5f40a81724" integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== "@eslint/eslintrc@^0.4.3": @@ -940,7 +940,7 @@ "@hapi/hoek@^9.0.0": version "9.3.0" - resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== "@hapi/topo@^5.0.0": @@ -1028,7 +1028,7 @@ "@jest/create-cache-key-function@^27.0.1": version "27.5.1" - resolved "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz" + resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz#7448fae15602ea95c828f5eceed35c202a820b31" integrity sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ== dependencies: "@jest/types" "^27.5.1" @@ -1169,7 +1169,7 @@ "@jridgewell/gen-mapping@^0.3.0": version "0.3.3" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== dependencies: "@jridgewell/set-array" "^1.0.1" @@ -1187,7 +1187,7 @@ "@jridgewell/resolve-uri@3.1.0": version "3.1.0" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== "@jridgewell/set-array@^1.0.1": @@ -1202,7 +1202,7 @@ "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": version "0.3.18" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== dependencies: "@jridgewell/resolve-uri" "3.1.0" @@ -1210,7 +1210,7 @@ "@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": version "5.1.1-v1" - resolved "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz" + resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" integrity sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg== dependencies: eslint-scope "5.1.1" @@ -1238,14 +1238,14 @@ "@react-native-community/cli-debugger-ui@^6.0.0-rc.0": version "6.0.0" - resolved "https://registry.npmjs.org/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-6.0.0.tgz#ef9eb1268d85c1bd3caf2c4d36dc350bb080f254" integrity sha512-onf6vtvqSzOr6bNEWhPzgcJP2UQhA0VY6c8tXwNczIONC/ahnN93LPBB/uXDbn9d/kLMvE7oUJiqRadZWHk6aA== dependencies: serve-static "^1.13.1" "@react-native-community/cli-hermes@^6.3.0": version "6.3.1" - resolved "https://registry.npmjs.org/@react-native-community/cli-hermes/-/cli-hermes-6.3.1.tgz" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-6.3.1.tgz#a4c3b4b07a1775f7012baf6d5a0b059da2ffac00" integrity sha512-+tMJsEsVX0WyylnoFE7uPoMu1aTAChaA62Y32dwWgAa1Fx6YrpPkC9d6wvYSBe9md/4mTtRher+ooBcuov6JHw== dependencies: "@react-native-community/cli-platform-android" "^6.3.1" @@ -1256,7 +1256,7 @@ "@react-native-community/cli-platform-android@^6.0.0", "@react-native-community/cli-platform-android@^6.3.1": version "6.3.1" - resolved "https://registry.npmjs.org/@react-native-community/cli-platform-android/-/cli-platform-android-6.3.1.tgz" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-6.3.1.tgz#8d35c809ddaf3b6c5d4ef9ff9c814a25a55259aa" integrity sha512-n5A64RI1ty4ScZCel/3JYY9Anl857dPsUZ86Dwc1GxrbflSB5/+hcCMg5DCNcnJRa4Hdv95SAR5pMmtAjOXApA== dependencies: "@react-native-community/cli-tools" "^6.2.1" @@ -1272,7 +1272,7 @@ "@react-native-community/cli-platform-ios@^6.0.0": version "6.2.1" - resolved "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-6.2.1.tgz" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-6.2.1.tgz#852a7dc520071ac55fead3c78daa6a0060dde72f" integrity sha512-5vwLRfTbIVUsO86AUPmR5vkp+7t4gTH2+SwRo0DKqBGBQ3hraA3dlWu0nzh99eQKQhCiFLB1WJPAi3zY03lK4w== dependencies: "@react-native-community/cli-tools" "^6.2.1" @@ -1302,7 +1302,7 @@ "@react-native-community/cli-server-api@^6.4.0": version "6.4.3" - resolved "https://registry.npmjs.org/@react-native-community/cli-server-api/-/cli-server-api-6.4.3.tgz" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-6.4.3.tgz#b52444454f40bfb54a84ab52bf42e9f8002917f5" integrity sha512-Ywy2x+PhIUZXgE74YiCYXylSVnuEBcq5cNfYLR3AwOvrILjh03smXfCca8s2V2LWUlzmWN6+L85FJGsT92MUJA== dependencies: "@react-native-community/cli-debugger-ui" "^6.0.0-rc.0" @@ -1317,7 +1317,7 @@ "@react-native-community/cli-tools@^6.2.0", "@react-native-community/cli-tools@^6.2.1": version "6.2.1" - resolved "https://registry.npmjs.org/@react-native-community/cli-tools/-/cli-tools-6.2.1.tgz" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-6.2.1.tgz#6f7ada6559846b49fb9fcfed522399b232976ada" integrity sha512-7RbOkZLT/3YG8CAYYM70ajRKIOgVxK/b4t9KNsPq+2uen99MGezfeglC8s1cs3vBNVVxCo0a2JbXg18bUd8eqA== dependencies: appdirsjs "^1.2.4" @@ -1375,7 +1375,7 @@ "@react-native-community/eslint-config@^3.0.1": version "3.2.0" - resolved "https://registry.npmjs.org/@react-native-community/eslint-config/-/eslint-config-3.2.0.tgz" + resolved "https://registry.yarnpkg.com/@react-native-community/eslint-config/-/eslint-config-3.2.0.tgz#42f677d5fff385bccf1be1d3b8faa8c086cf998d" integrity sha512-ZjGvoeiBtCbd506hQqwjKmkWPgynGUoJspG8/MuV/EfKnkjCtBmeJvq2n+sWbWEvL9LWXDp2GJmPzmvU5RSvKQ== dependencies: "@babel/core" "^7.14.0" @@ -1394,7 +1394,7 @@ "@react-native-community/eslint-plugin@^1.1.0": version "1.3.0" - resolved "https://registry.npmjs.org/@react-native-community/eslint-plugin/-/eslint-plugin-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.3.0.tgz#9e558170c106bbafaa1ef502bd8e6d4651012bf9" integrity sha512-+zDZ20NUnSWghj7Ku5aFphMzuM9JulqCW+aPXT6IfIXFbb8tzYTTOSeRFOtuekJ99ibW2fUCSsjuKNlwDIbHFg== "@react-native/assets@1.0.0": @@ -1414,14 +1414,14 @@ "@sideway/address@^4.1.3": version "4.1.4" - resolved "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== dependencies: "@hapi/hoek" "^9.0.0" "@sideway/formula@^3.0.1": version "3.0.1" - resolved "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== "@sideway/pinpoint@^2.0.0": @@ -1481,7 +1481,7 @@ "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": version "7.18.3" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.3.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.3.tgz#dfc508a85781e5698d5b33443416b6268c4b3e8d" integrity sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w== dependencies: "@babel/types" "^7.3.0" @@ -1514,7 +1514,7 @@ "@types/jest@^27.4.0": version "27.5.2" - resolved "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== dependencies: jest-matcher-utils "^27.0.0" @@ -1522,12 +1522,12 @@ "@types/json-schema@^7.0.9": version "7.0.11" - resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== "@types/node@*": version "18.15.13" - resolved "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== "@types/prettier@^2.1.5": @@ -1537,26 +1537,26 @@ "@types/prop-types@*": version "15.7.5" - resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== "@types/react-native@^0.66.15": version "0.66.28" - resolved "https://registry.npmjs.org/@types/react-native/-/react-native-0.66.28.tgz" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.66.28.tgz#0a61cd9d066ada4be5b0317f01b4d37487f88f00" integrity sha512-Wh3oVcM4LtKi0ptIiIRnYuVlqRKqPxrkPL0AJslRUUCLz2jI7GXNCQ+Zzn3+68Y5Jy3zVD8lIM1QvJDR+fqGzQ== dependencies: "@types/react" "^17" "@types/react-test-renderer@^17.0.1": version "17.0.2" - resolved "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-17.0.2.tgz" + resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-17.0.2.tgz#5f800a39b12ac8d2a2149e7e1885215bcf4edbbf" integrity sha512-+F1KONQTBHDBBhbHuT2GNydeMpPuviduXIVJRB7Y4nma4NR5DrTJfMMZ+jbhEHbpwL+Uqhs1WXh4KHiyrtYTPg== dependencies: "@types/react" "^17" "@types/react@^17": version "17.0.58" - resolved "https://registry.npmjs.org/@types/react/-/react-17.0.58.tgz" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.58.tgz#c8bbc82114e5c29001548ebe8ed6c4ba4d3c9fb0" integrity sha512-c1GzVY97P0fGxwGxhYq989j4XwlcHQoto6wQISOC2v6wm3h0PORRWJFHlkRjfGsiG3y1609WdQ+J+tKxvrEd6A== dependencies: "@types/prop-types" "*" @@ -1570,7 +1570,7 @@ "@types/semver@^7.3.12": version "7.3.13" - resolved "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== "@types/stack-utils@^2.0.0": @@ -1580,7 +1580,7 @@ "@types/yargs-parser@*": version "21.0.0" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== "@types/yargs@^15.0.0": @@ -1599,7 +1599,7 @@ "@typescript-eslint/eslint-plugin@^5.30.5": version "5.59.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz#c0e10eeb936debe5d1c3433cf36206a95befefd0" integrity sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw== dependencies: "@eslint-community/regexpp" "^4.4.0" @@ -1615,7 +1615,7 @@ "@typescript-eslint/parser@^5.30.5": version "5.59.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.0.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.0.tgz#0ad7cd019346cc5d150363f64869eca10ca9977c" integrity sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w== dependencies: "@typescript-eslint/scope-manager" "5.59.0" @@ -1625,7 +1625,7 @@ "@typescript-eslint/scope-manager@5.59.0": version "5.59.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz#86501d7a17885710b6716a23be2e93fc54a4fe8c" integrity sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ== dependencies: "@typescript-eslint/types" "5.59.0" @@ -1633,7 +1633,7 @@ "@typescript-eslint/type-utils@5.59.0": version "5.59.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz#8e8d1420fc2265989fa3a0d897bde37f3851e8c9" integrity sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA== dependencies: "@typescript-eslint/typescript-estree" "5.59.0" @@ -1643,12 +1643,12 @@ "@typescript-eslint/types@5.59.0": version "5.59.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.0.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.0.tgz#3fcdac7dbf923ec5251545acdd9f1d42d7c4fe32" integrity sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA== "@typescript-eslint/typescript-estree@5.59.0": version "5.59.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz#8869156ee1dcfc5a95be3ed0e2809969ea28e965" integrity sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg== dependencies: "@typescript-eslint/types" "5.59.0" @@ -1661,7 +1661,7 @@ "@typescript-eslint/utils@5.59.0", "@typescript-eslint/utils@^5.10.0": version "5.59.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.0.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.0.tgz#063d066b3bc4850c18872649ed0da9ee72d833d5" integrity sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" @@ -1675,7 +1675,7 @@ "@typescript-eslint/visitor-keys@5.59.0": version "5.59.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz#a59913f2bf0baeb61b5cfcb6135d3926c3854365" integrity sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA== dependencies: "@typescript-eslint/types" "5.59.0" @@ -1700,7 +1700,7 @@ absolute-path@^0.0.0: accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.7: version "1.3.8" - resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== dependencies: mime-types "~2.1.34" @@ -1736,7 +1736,7 @@ acorn@^8.2.4: adm-zip@^0.5.9: version "0.5.10" - resolved "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.10.tgz#4a51d5ab544b1f5ce51e1b9043139b639afff45b" integrity sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ== agent-base@6: @@ -1758,7 +1758,7 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: ajv@^8.0.1: version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== dependencies: fast-deep-equal "^3.1.1" @@ -1773,7 +1773,7 @@ anser@^1.4.9: ansi-colors@^4.1.1: version "4.1.3" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-escapes@^4.2.1: @@ -1794,7 +1794,7 @@ ansi-fragments@^0.2.1: ansi-regex@^4.1.0: version "4.1.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== ansi-regex@^5.0.0, ansi-regex@^5.0.1: @@ -1831,7 +1831,7 @@ anymatch@^2.0.0: anymatch@^3.0.3: version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" @@ -1839,7 +1839,7 @@ anymatch@^3.0.3: appdirsjs@^1.2.4: version "1.2.7" - resolved "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.7.tgz" + resolved "https://registry.yarnpkg.com/appdirsjs/-/appdirsjs-1.2.7.tgz#50b4b7948a26ba6090d4aede2ae2dc2b051be3b3" integrity sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw== argparse@^1.0.7: @@ -1866,7 +1866,7 @@ arr-union@^3.1.0: array-buffer-byte-length@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== dependencies: call-bind "^1.0.2" @@ -1874,7 +1874,7 @@ array-buffer-byte-length@^1.0.0: array-includes@^3.1.5, array-includes@^3.1.6: version "3.1.6" - resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== dependencies: call-bind "^1.0.2" @@ -1895,7 +1895,7 @@ array-unique@^0.3.2: array.prototype.flatmap@^1.3.1: version "1.3.1" - resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== dependencies: call-bind "^1.0.2" @@ -1905,7 +1905,7 @@ array.prototype.flatmap@^1.3.1: array.prototype.tosorted@^1.1.1: version "1.1.1" - resolved "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz#ccf44738aa2b5ac56578ffda97c03fd3e23dd532" integrity sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ== dependencies: call-bind "^1.0.2" @@ -1960,7 +1960,7 @@ async-limiter@~1.0.0: async@^2.4.0: version "2.6.4" - resolved "https://registry.npmjs.org/async/-/async-2.6.4.tgz" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" @@ -1977,7 +1977,7 @@ atob@^2.1.2: available-typed-arrays@^1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== aws-sign2@~0.7.0: @@ -2162,7 +2162,7 @@ bplist-creator@0.1.0: bplist-parser@0.3.1: version "0.3.1" - resolved "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.1.tgz" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.3.1.tgz#e1c90b2ca2a9f9474cc72f6862bbf3fee8341fd1" integrity sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA== dependencies: big-integer "1.6.x" @@ -2193,7 +2193,7 @@ braces@^2.3.1: braces@^3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" @@ -2360,7 +2360,7 @@ cli-cursor@^2.1.0: cli-spinners@^2.0.0: version "2.8.0" - resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.8.0.tgz" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.8.0.tgz#e97a3e2bd00e6d85aa0c13d7f9e3ce236f7787fc" integrity sha512-/eG5sJcvEIwxcdYM86k5tPwn0MUzkX5YY3eImTGpJOZgVe4SdTMY14vQpcxgBzJ0wXwAYrS8E+c3uHeK4JNyzQ== cliui@^6.0.0: @@ -2516,7 +2516,7 @@ connect@^3.6.5: convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.9.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== copy-descriptor@^0.1.0: @@ -2590,7 +2590,7 @@ cssstyle@^2.3.0: csstype@^3.0.2: version "3.1.2" - resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== dashdash@^1.12.0: @@ -2611,7 +2611,7 @@ data-urls@^2.0.0: dayjs@^1.8.15: version "1.11.7" - resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2" integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ== debug@2.6.9, debug@^2.2.0, debug@^2.3.3: @@ -2623,7 +2623,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.4: version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" @@ -2640,7 +2640,7 @@ decimal.js@^10.2.1: decode-uri-component@^0.2.0: version "0.2.2" - resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== dedent@^0.7.0: @@ -2665,14 +2665,14 @@ deepmerge@^4.2.2: defaults@^1.0.3: version "1.0.4" - resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== dependencies: clone "^1.0.2" define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== dependencies: has-property-descriptors "^1.0.0" @@ -2712,12 +2712,12 @@ denodeify@^1.2.1: depd@2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== destroy@1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detect-newline@^3.0.0: @@ -2819,7 +2819,7 @@ error-ex@^1.3.1: error-stack-parser@^2.0.6: version "2.1.4" - resolved "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286" integrity sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ== dependencies: stackframe "^1.3.4" @@ -2834,7 +2834,7 @@ errorhandler@^1.5.0: es-abstract@^1.19.0, es-abstract@^1.20.4: version "1.21.2" - resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== dependencies: array-buffer-byte-length "^1.0.0" @@ -2874,7 +2874,7 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: es-set-tostringtag@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== dependencies: get-intrinsic "^1.1.3" @@ -2883,7 +2883,7 @@ es-set-tostringtag@^2.0.1: es-shim-unscopables@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== dependencies: has "^1.0.3" @@ -2936,12 +2936,12 @@ escodegen@^2.0.0: eslint-config-prettier@^8.5.0: version "8.8.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348" integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA== eslint-plugin-eslint-comments@^3.2.0: version "3.2.0" - resolved "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz#9e1cd7b4413526abb313933071d7aba05ca12ffa" integrity sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ== dependencies: escape-string-regexp "^1.0.5" @@ -2949,7 +2949,7 @@ eslint-plugin-eslint-comments@^3.2.0: eslint-plugin-ft-flow@^2.0.1: version "2.0.3" - resolved "https://registry.npmjs.org/eslint-plugin-ft-flow/-/eslint-plugin-ft-flow-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-ft-flow/-/eslint-plugin-ft-flow-2.0.3.tgz#3b3c113c41902bcbacf0e22b536debcfc3c819e8" integrity sha512-Vbsd/b+LYA99jUbsL6viEUWShFaYQt2YQs3QN3f+aeszOhh2sgdcU0mjzDyD4yyBvMc8qy2uwvBBWfMzEX06tg== dependencies: lodash "^4.17.21" @@ -2957,21 +2957,21 @@ eslint-plugin-ft-flow@^2.0.1: eslint-plugin-jest@^26.5.3: version "26.9.0" - resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz#7931c31000b1c19e57dbfb71bbf71b817d1bf949" integrity sha512-TWJxWGp1J628gxh2KhaH1H1paEdgE2J61BBF1I59c6xWeL5+D1BzMxGDN/nXAfX+aSkR5u80K+XhskK6Gwq9ng== dependencies: "@typescript-eslint/utils" "^5.10.0" eslint-plugin-prettier@^4.2.1: version "4.2.1" - resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: prettier-linter-helpers "^1.0.0" eslint-plugin-react-hooks@^4.6.0: version "4.6.0" - resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== eslint-plugin-react-native-globals@^0.1.1: @@ -2981,7 +2981,7 @@ eslint-plugin-react-native-globals@^0.1.1: eslint-plugin-react-native@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/eslint-plugin-react-native/-/eslint-plugin-react-native-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-native/-/eslint-plugin-react-native-4.0.0.tgz#eec41984abe4970bdd7c6082dff7a98a5e34d0bb" integrity sha512-kMmdxrSY7A1WgdqaGC+rY/28rh7kBGNBRsk48ovqkQmdg5j4K+DaFmegENDzMrdLkoufKGRNkKX6bgSwQTCAxQ== dependencies: "@babel/traverse" "^7.7.4" @@ -2989,7 +2989,7 @@ eslint-plugin-react-native@^4.0.0: eslint-plugin-react@^7.30.1: version "7.32.2" - resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz#e71f21c7c265ebce01bcbc9d0955170c55571f10" integrity sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg== dependencies: array-includes "^3.1.6" @@ -3010,12 +3010,12 @@ eslint-plugin-react@^7.30.1: eslint-plugin-simple-import-sort@^10.0.0: version "10.0.0" - resolved "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz#cc4ceaa81ba73252427062705b64321946f61351" integrity sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw== eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: esrecurse "^4.3.0" @@ -3035,12 +3035,12 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint-visitor-keys@^3.3.0: version "3.4.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== eslint@^7.32.0: @@ -3254,7 +3254,7 @@ fast-diff@^1.1.2: fast-glob@^3.2.9: version "3.2.12" - resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -3275,14 +3275,14 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: fastq@^1.6.0: version "1.15.0" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== dependencies: reusify "^1.0.4" fb-watchman@^2.0.0: version "2.0.2" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== dependencies: bser "2.1.1" @@ -3358,7 +3358,7 @@ flat-cache@^3.0.4: flatted@^3.1.0: version "3.2.7" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== flow-parser@0.*, flow-parser@^0.121.0: @@ -3368,7 +3368,7 @@ flow-parser@0.*, flow-parser@^0.121.0: for-each@^0.3.3: version "0.3.3" - resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== dependencies: is-callable "^1.1.3" @@ -3448,7 +3448,7 @@ function-bind@^1.1.1: function.prototype.name@^1.1.5: version "1.1.5" - resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== dependencies: call-bind "^1.0.2" @@ -3463,7 +3463,7 @@ functional-red-black-tree@^1.0.1: functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" - resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== gensync@^1.0.0-beta.2: @@ -3478,7 +3478,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== dependencies: function-bind "^1.1.1" @@ -3531,7 +3531,7 @@ glob-parent@^5.1.2: glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -3548,21 +3548,21 @@ globals@^11.1.0: globals@^13.6.0, globals@^13.9.0: version "13.20.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== dependencies: type-fest "^0.20.2" globalthis@^1.0.3: version "1.0.3" - resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== dependencies: define-properties "^1.1.3" globby@^11.1.0: version "11.1.0" - resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" @@ -3574,19 +3574,19 @@ globby@^11.1.0: gopd@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== dependencies: get-intrinsic "^1.1.3" graceful-fs@^4.1.11, 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, graceful-fs@^4.2.9: version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== grapheme-splitter@^1.0.4: version "1.0.4" - resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== har-schema@^2.0.0: @@ -3604,7 +3604,7 @@ har-validator@~5.1.3: has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== has-flag@^3.0.0: @@ -3619,19 +3619,19 @@ has-flag@^4.0.0: has-property-descriptors@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== dependencies: get-intrinsic "^1.1.1" has-proto@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== has-tostringtag@^1.0.0: @@ -3710,7 +3710,7 @@ html-escaper@^2.0.0: http-errors@2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: depd "2.0.0" @@ -3764,7 +3764,7 @@ ignore@^4.0.6: ignore@^5.0.5, ignore@^5.2.0: version "5.2.4" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== image-size@^0.6.0: @@ -3816,7 +3816,7 @@ inherits@2, inherits@2.0.4, inherits@~2.0.3: internal-slot@^1.0.3, internal-slot@^1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== dependencies: get-intrinsic "^1.2.0" @@ -3832,7 +3832,7 @@ invariant@^2.2.4: ip@^1.1.5: version "1.1.8" - resolved "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== is-accessor-descriptor@^0.1.6: @@ -3851,7 +3851,7 @@ is-accessor-descriptor@^1.0.0: is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== dependencies: call-bind "^1.0.2" @@ -3885,7 +3885,7 @@ is-buffer@^1.1.5: is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" - resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-ci@^2.0.0: @@ -3897,7 +3897,7 @@ is-ci@^2.0.0: is-core-module@^2.11.0, is-core-module@^2.9.0: version "2.12.0" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== dependencies: has "^1.0.3" @@ -3980,19 +3980,19 @@ is-generator-fn@^2.0.0: is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-negative-zero@^2.0.2: version "2.0.2" - resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== is-number-object@^1.0.4: version "1.0.7" - resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== dependencies: has-tostringtag "^1.0.0" @@ -4031,7 +4031,7 @@ is-regex@^1.1.4: is-shared-array-buffer@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== dependencies: call-bind "^1.0.2" @@ -4062,7 +4062,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: is-typed-array@^1.1.10, is-typed-array@^1.1.9: version "1.1.10" - resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== dependencies: available-typed-arrays "^1.0.5" @@ -4078,7 +4078,7 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: is-weakref@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== dependencies: call-bind "^1.0.2" @@ -4127,7 +4127,7 @@ istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: version "5.2.1" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" @@ -4381,7 +4381,7 @@ jest-leak-detector@^27.5.1: jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: version "27.5.1" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== dependencies: chalk "^4.0.0" @@ -4646,7 +4646,7 @@ jetifier@^1.6.2: joi@^17.2.1: version "17.9.1" - resolved "https://registry.npmjs.org/joi/-/joi-17.9.1.tgz" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.9.1.tgz#74899b9fa3646904afa984a11df648eca66c9018" integrity sha512-FariIi9j6QODKATGBrEX7HZcja8Bsh3rfdGYy/Sb65sGlZWK/QWesU1ghk7aJWDj95knjXlQfSmzFSPPkLVsfw== dependencies: "@hapi/hoek" "^9.0.0" @@ -4783,7 +4783,7 @@ json-stringify-safe@~5.0.1: json5@^2.2.2: version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonfile@^2.1.0: @@ -4812,7 +4812,7 @@ jsprim@^1.2.2: "jsx-ast-utils@^2.4.1 || ^3.0.0": version "3.3.3" - resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== dependencies: array-includes "^3.1.5" @@ -4917,7 +4917,7 @@ lodash.truncate@^4.4.2: lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== log-symbols@^2.2.0: @@ -5334,7 +5334,7 @@ micromatch@^3.1.10, micromatch@^3.1.4: micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: braces "^3.0.2" @@ -5342,12 +5342,12 @@ micromatch@^4.0.2, micromatch@^4.0.4: mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.19, mime-types@~2.1.34: version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" @@ -5374,14 +5374,14 @@ mimic-fn@^2.1.0: minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mixin-deep@^1.2.0: @@ -5394,7 +5394,7 @@ mixin-deep@^1.2.0: mkdirp@^0.5.1: version "0.5.6" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" @@ -5433,7 +5433,7 @@ nanomatch@^1.2.9: natural-compare-lite@^1.4.0: version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== natural-compare@^1.4.0: @@ -5443,7 +5443,7 @@ natural-compare@^1.4.0: negotiator@0.6.3: version "0.6.3" - resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== neo-async@^2.5.0: @@ -5482,7 +5482,7 @@ node-int64@^0.4.0: node-releases@^2.0.6: version "2.0.10" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== node-stream-zip@^1.9.1: @@ -5552,7 +5552,7 @@ object-copy@^0.1.0: object-inspect@^1.12.3, object-inspect@^1.9.0: version "1.12.3" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== object-keys@^1.1.1: @@ -5569,7 +5569,7 @@ object-visit@^1.0.0: object.assign@^4.1.3, object.assign@^4.1.4: version "4.1.4" - resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: call-bind "^1.0.2" @@ -5579,7 +5579,7 @@ object.assign@^4.1.3, object.assign@^4.1.4: object.entries@^1.1.6: version "1.1.6" - resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== dependencies: call-bind "^1.0.2" @@ -5588,7 +5588,7 @@ object.entries@^1.1.6: object.fromentries@^2.0.6: version "2.0.6" - resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== dependencies: call-bind "^1.0.2" @@ -5597,7 +5597,7 @@ object.fromentries@^2.0.6: object.hasown@^1.1.2: version "1.1.2" - resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.2.tgz#f919e21fad4eb38a57bc6345b3afd496515c3f92" integrity sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw== dependencies: define-properties "^1.1.4" @@ -5612,7 +5612,7 @@ object.pick@^1.3.0: object.values@^1.1.6: version "1.1.6" - resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== dependencies: call-bind "^1.0.2" @@ -5621,7 +5621,7 @@ object.values@^1.1.6: on-finished@2.4.1: version "2.4.1" - resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" @@ -5830,7 +5830,7 @@ picocolors@^1.0.0: picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pify@^4.0.1: @@ -5859,7 +5859,7 @@ pkg-dir@^4.2.0: plist@^3.0.2, plist@^3.0.5: version "3.0.6" - resolved "https://registry.npmjs.org/plist/-/plist-3.0.6.tgz" + resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.6.tgz#7cfb68a856a7834bca6dbfe3218eb9c7740145d3" integrity sha512-WiIVYyrp8TD4w8yCvyeIr+lkmrGRd5u0VbRnU+tP/aRLxP/YadJUYOMZJ/6hIa3oUyVCsycXvtNRgd5XBJIbiA== dependencies: base64-js "^1.5.1" @@ -5923,7 +5923,7 @@ progress@^2.0.0: promise@^8.0.3: version "8.3.0" - resolved "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== dependencies: asap "~2.0.6" @@ -5938,7 +5938,7 @@ prompts@^2.0.1, prompts@^2.4.0: prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" - resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== dependencies: loose-envify "^1.4.0" @@ -5947,7 +5947,7 @@ prop-types@^15.7.2, prop-types@^15.8.1: psl@^1.1.28, psl@^1.1.33: version "1.9.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== pump@^3.0.0: @@ -5993,7 +5993,7 @@ react-devtools-core@4.19.1: "react-is@^16.12.0 || ^17.0.0 || ^18.0.0": version "18.2.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== react-is@^16.13.1: @@ -6017,7 +6017,7 @@ react-native-codegen@^0.0.8: react-native@^0.67.1: version "0.67.5" - resolved "https://registry.npmjs.org/react-native/-/react-native-0.67.5.tgz" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.67.5.tgz#9f2aeabf0766fb4bd5385685f4f4f2406bcdf819" integrity sha512-/xEksthqImZGDfcqzEmbOw0KRkp9/x+cC8T8uTHhSKLLa8pOFLGdF190UOjnLammGmAmFy0+ZcJf0Ujm53IGeA== dependencies: "@jest/create-cache-key-function" "^27.0.1" @@ -6058,7 +6058,7 @@ react-refresh@^0.4.0: react-shallow-renderer@^16.13.1: version "16.15.0" - resolved "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz" + resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz#48fb2cf9b23d23cde96708fe5273a7d3446f4457" integrity sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA== dependencies: object-assign "^4.1.1" @@ -6124,12 +6124,12 @@ regenerate@^1.4.2: regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.2: version "0.13.11" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== regenerator-transform@^0.15.1: version "0.15.1" - resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== dependencies: "@babel/runtime" "^7.8.4" @@ -6144,7 +6144,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: regexp.prototype.flags@^1.4.3: version "1.5.0" - resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== dependencies: call-bind "^1.0.2" @@ -6275,7 +6275,7 @@ resolve.exports@^1.1.0: resolve@^1.14.2, resolve@^1.20.0: version "1.22.2" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== dependencies: is-core-module "^2.11.0" @@ -6284,7 +6284,7 @@ resolve@^1.14.2, resolve@^1.20.0: resolve@^2.0.0-next.4: version "2.0.0-next.4" - resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== dependencies: is-core-module "^2.9.0" @@ -6347,7 +6347,7 @@ safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, s safe-regex-test@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== dependencies: call-bind "^1.0.2" @@ -6383,7 +6383,7 @@ sane@^4.0.3: sax@^1.2.4: version "1.2.4" - resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== saxes@^5.0.1: @@ -6413,7 +6413,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: semver@^7.2.1, semver@^7.3.7: version "7.5.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0" integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== dependencies: lru-cache "^6.0.0" @@ -6427,7 +6427,7 @@ semver@^7.3.2: send@0.18.0: version "0.18.0" - resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== dependencies: debug "2.6.9" @@ -6451,7 +6451,7 @@ serialize-error@^2.1.0: serve-static@^1.13.1: version "1.15.0" - resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== dependencies: encodeurl "~1.0.2" @@ -6512,7 +6512,7 @@ shebang-regex@^3.0.0: shell-quote@^1.6.1, shell-quote@^1.7.3: version "1.8.1" - resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== side-channel@^1.0.4: @@ -6526,12 +6526,12 @@ side-channel@^1.0.4: signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== simple-plist@^1.0.0: version "1.3.1" - resolved "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.1.tgz" + resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.3.1.tgz#16e1d8f62c6c9b691b8383127663d834112fb017" integrity sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw== dependencies: bplist-creator "0.1.0" @@ -6632,7 +6632,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: source-map@^0.7.3: version "0.7.4" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== split-string@^3.0.1, split-string@^3.0.2: @@ -6671,7 +6671,7 @@ stack-utils@^2.0.3: stackframe@^1.3.4: version "1.3.4" - resolved "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310" integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw== stacktrace-parser@^0.1.3: @@ -6691,7 +6691,7 @@ static-extend@^0.1.1: statuses@2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== statuses@~1.5.0: @@ -6714,7 +6714,7 @@ string-length@^4.0.1: string-natural-compare@^3.0.1: version "3.0.1" - resolved "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: @@ -6728,7 +6728,7 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: string.prototype.matchall@^4.0.8: version "4.0.8" - resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" integrity sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg== dependencies: call-bind "^1.0.2" @@ -6742,7 +6742,7 @@ string.prototype.matchall@^4.0.8: string.prototype.trim@^1.2.7: version "1.2.7" - resolved "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== dependencies: call-bind "^1.0.2" @@ -6751,7 +6751,7 @@ string.prototype.trim@^1.2.7: string.prototype.trimend@^1.0.6: version "1.0.6" - resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== dependencies: call-bind "^1.0.2" @@ -6760,7 +6760,7 @@ string.prototype.trimend@^1.0.6: string.prototype.trimstart@^1.0.6: version "1.0.6" - resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== dependencies: call-bind "^1.0.2" @@ -6854,7 +6854,7 @@ symbol-tree@^3.2.4: table@^6.0.9: version "6.8.1" - resolved "https://registry.npmjs.org/table/-/table-6.8.1.tgz" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== dependencies: ajv "^8.0.1" @@ -6995,7 +6995,7 @@ tslib@^1.8.1: tslib@^2.0.1: version "2.5.0" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== tsutils@^3.21.0: @@ -7053,7 +7053,7 @@ type-fest@^0.7.1: typed-array-length@^1.0.4: version "1.0.4" - resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== dependencies: call-bind "^1.0.2" @@ -7069,7 +7069,7 @@ typedarray-to-buffer@^3.1.5: typescript@^4.5.5: version "4.9.5" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== uglify-es@^3.1.9: @@ -7087,7 +7087,7 @@ ultron@1.0.x: unbox-primitive@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== dependencies: call-bind "^1.0.2" @@ -7181,14 +7181,14 @@ url-parse@^1.5.3: use-subscription@^1.0.0: version "1.8.0" - resolved "https://registry.npmjs.org/use-subscription/-/use-subscription-1.8.0.tgz" + resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.8.0.tgz#f118938c29d263c2bce12fc5585d3fe694d4dbce" integrity sha512-LISuG0/TmmoDoCRmV5XAqYkd3UCBNM0ML3gGBndze65WITcsExCD3DTvXXTLyNcOC0heFQZzluW88bN/oC1DQQ== dependencies: use-sync-external-store "^1.2.0" use-sync-external-store@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== use@^3.1.0: @@ -7339,7 +7339,7 @@ which-module@^2.0.0: which-typed-array@^1.1.9: version "1.1.9" - resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== dependencies: available-typed-arrays "^1.0.5" @@ -7445,7 +7445,7 @@ xml-name-validator@^3.0.0: xmlbuilder@^15.1.1: version "15.1.1" - resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5" integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== xmlchars@^2.2.0: @@ -7455,7 +7455,7 @@ xmlchars@^2.2.0: xmldoc@^1.1.2: version "1.3.0" - resolved "https://registry.npmjs.org/xmldoc/-/xmldoc-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/xmldoc/-/xmldoc-1.3.0.tgz#7823225b096c74036347c9ec5924d06b6a3cebab" integrity sha512-y7IRWW6PvEnYQZNZFMRLNJw+p3pezM4nKYPfr15g4OOW9i8VpeydycFuipE2297OvZnh3jSb2pxOt9QpkZUVng== dependencies: sax "^1.2.4"