@secondts/bark-react-native 0.16.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cpp/generated/bark.cpp +146 -0
- package/cpp/generated/bark.hpp +8 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +362 -6
- package/lib/commonjs/generated/bark.js.map +1 -1
- package/lib/module/generated/bark-ffi.js.map +1 -1
- package/lib/module/generated/bark.js +361 -5
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +8 -0
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +217 -3
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +8 -0
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +217 -3
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/bark-ffi.ts +22 -0
- package/src/generated/bark.ts +536 -8
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.WalletTransaction = exports.WalletProperties = exports.WalletOpenArgs = exports.WalletNotification_Tags = exports.WalletNotification = exports.Wallet = exports.VtxoState_Tags = exports.VtxoState = exports.VtxoLockHolder_Tags = exports.VtxoLockHolder = exports.Vtxo = exports.RoundState = exports.RefreshFees = exports.RecoveryReport = exports.RecoveryBucket = exports.PpmExpiryFeeEntry = exports.PendingBoard = exports.OutPoint = exports.OnchainWallet = exports.OnchainUtxo_Tags = exports.OnchainUtxo = exports.OnchainBalance = exports.OffboardResult = exports.OffboardFees = exports.NotificationHolder = exports.Network = exports.Movement = exports.LogLevel = exports.LightningSendStatus_Tags = exports.LightningSendStatus = exports.LightningSendFees = exports.LightningSend = exports.LightningReceiveFees = exports.LightningReceive = exports.LightningInvoice = exports.FeeSchedule = exports.FeeRates = exports.FeeEstimate = exports.ExitVtxo = exports.ExitTxStatus_Tags = exports.ExitTxStatus = exports.ExitTxOrigin_Tags = exports.ExitTxOrigin = exports.ExitTx = exports.ExitTransactionStatus = exports.ExitState_Tags = exports.ExitState = exports.ExitProgressStatus = exports.ExitClaimTransaction = exports.Exception_Tags = exports.Exception = exports.Destination = exports.CustomOnchainWalletCallbacksImpl = exports.CpfpParams = exports.Config = exports.BoardFees = exports.BlockRef = exports.BarkLoggerImpl = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
|
|
6
|
+
exports.default = exports.WalletTransaction = exports.WalletProperties = exports.WalletOpenArgs = exports.WalletNotification_Tags = exports.WalletNotification = exports.Wallet = exports.VtxoState_Tags = exports.VtxoState = exports.VtxoLockHolder_Tags = exports.VtxoLockHolder = exports.Vtxo = exports.RoundState = exports.RefreshFees = exports.RecoveryReport = exports.RecoveryBucket = exports.PpmExpiryFeeEntry = exports.PendingBoard = exports.OutPoint = exports.OnchainWallet = exports.OnchainUtxo_Tags = exports.OnchainUtxo = exports.OnchainBalance = exports.OffboardResult = exports.OffboardFees = exports.NotificationHolder = exports.Network = exports.Movement = exports.LogLevel = exports.LightningSendStatus_Tags = exports.LightningSendStatus = exports.LightningSendFees = exports.LightningSend = exports.LightningReceiveFees = exports.LightningReceive = exports.LightningInvoice = exports.FeeSchedule = exports.FeeRates = exports.FeeEstimate = exports.ExitVtxo = exports.ExitTxStatus_Tags = exports.ExitTxStatus = exports.ExitTxOrigin_Tags = exports.ExitTxOrigin = exports.ExitTx = exports.ExitTransactionStatus = exports.ExitState_Tags = exports.ExitStateKind = exports.ExitState = exports.ExitProgressStatus = exports.ExitClaimTransaction = exports.ExitCancelResult = exports.ExitCancelFailure_Tags = exports.ExitCancelFailure = exports.Exception_Tags = exports.Exception = exports.Destination = exports.CustomOnchainWalletCallbacksImpl = exports.CpfpParams = exports.Config = exports.BoardFees = exports.BlockRef = exports.BarkLoggerImpl = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
|
|
7
7
|
exports.extractTxFromPsbt = extractTxFromPsbt;
|
|
8
8
|
exports.generateMnemonic = generateMnemonic;
|
|
9
9
|
exports.initWallet = initWallet;
|
|
@@ -454,6 +454,47 @@ const FfiConverterTypeDestination = (() => {
|
|
|
454
454
|
return new FFIConverter();
|
|
455
455
|
})();
|
|
456
456
|
|
|
457
|
+
/**
|
|
458
|
+
* Outcome of a cancellation request.
|
|
459
|
+
*
|
|
460
|
+
* `canceled` is `true` when the exit is now canceled — including when it was
|
|
461
|
+
* already canceled by an earlier call, since cancellation is idempotent.
|
|
462
|
+
* When `false`, `reason` says why.
|
|
463
|
+
*/
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Generated factory for {@link ExitCancelResult} record objects.
|
|
467
|
+
*/
|
|
468
|
+
const ExitCancelResult = exports.ExitCancelResult = (() => {
|
|
469
|
+
const defaults = () => ({});
|
|
470
|
+
const create = (() => {
|
|
471
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
472
|
+
})();
|
|
473
|
+
return Object.freeze({
|
|
474
|
+
create,
|
|
475
|
+
new: create,
|
|
476
|
+
defaults: () => Object.freeze(defaults())
|
|
477
|
+
});
|
|
478
|
+
})();
|
|
479
|
+
const FfiConverterTypeExitCancelResult = (() => {
|
|
480
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
481
|
+
read(from) {
|
|
482
|
+
return {
|
|
483
|
+
canceled: _uniffiBindgenReactNative.FfiConverterBool.read(from),
|
|
484
|
+
reason: FfiConverterOptionalTypeExitCancelFailure.read(from)
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
write(value, into) {
|
|
488
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.canceled, into);
|
|
489
|
+
FfiConverterOptionalTypeExitCancelFailure.write(value.reason, into);
|
|
490
|
+
}
|
|
491
|
+
allocationSize(value) {
|
|
492
|
+
return _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.canceled) + FfiConverterOptionalTypeExitCancelFailure.allocationSize(value.reason);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return new FFIConverter();
|
|
496
|
+
})();
|
|
497
|
+
|
|
457
498
|
/**
|
|
458
499
|
* Claim transaction for exited funds
|
|
459
500
|
*/
|
|
@@ -1082,14 +1123,14 @@ const FfiConverterTypeOffboardResult = (() => {
|
|
|
1082
1123
|
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1083
1124
|
read(from) {
|
|
1084
1125
|
return {
|
|
1085
|
-
|
|
1126
|
+
txid: FfiConverterString.read(from)
|
|
1086
1127
|
};
|
|
1087
1128
|
}
|
|
1088
1129
|
write(value, into) {
|
|
1089
|
-
FfiConverterString.write(value.
|
|
1130
|
+
FfiConverterString.write(value.txid, into);
|
|
1090
1131
|
}
|
|
1091
1132
|
allocationSize(value) {
|
|
1092
|
-
return FfiConverterString.allocationSize(value.
|
|
1133
|
+
return FfiConverterString.allocationSize(value.txid);
|
|
1093
1134
|
}
|
|
1094
1135
|
}
|
|
1095
1136
|
return new FFIConverter();
|
|
@@ -1669,6 +1710,180 @@ const FfiConverterTypeError = (() => {
|
|
|
1669
1710
|
return new FfiConverter();
|
|
1670
1711
|
})();
|
|
1671
1712
|
|
|
1713
|
+
// Enum: ExitCancelFailure
|
|
1714
|
+
let ExitCancelFailure_Tags = exports.ExitCancelFailure_Tags = /*#__PURE__*/function (ExitCancelFailure_Tags) {
|
|
1715
|
+
ExitCancelFailure_Tags["NotExiting"] = "NotExiting";
|
|
1716
|
+
ExitCancelFailure_Tags["TooLate"] = "TooLate";
|
|
1717
|
+
ExitCancelFailure_Tags["AlreadyBroadcast"] = "AlreadyBroadcast";
|
|
1718
|
+
return ExitCancelFailure_Tags;
|
|
1719
|
+
}({});
|
|
1720
|
+
/**
|
|
1721
|
+
* Why a [`Wallet::cancel_exit`](crate::core::Wallet::cancel_exit) did not
|
|
1722
|
+
* cancel the exit.
|
|
1723
|
+
*
|
|
1724
|
+
* These are the *expected* negative outcomes of asking to cancel, not faults:
|
|
1725
|
+
* each is a normal state the exit can legitimately be in. Genuine failures
|
|
1726
|
+
* (database, chain source unreachable) still surface as `Err`.
|
|
1727
|
+
*/
|
|
1728
|
+
const ExitCancelFailure = exports.ExitCancelFailure = (() => {
|
|
1729
|
+
/**
|
|
1730
|
+
* No exit was ever started for this VTXO.
|
|
1731
|
+
*/
|
|
1732
|
+
class NotExiting_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
1733
|
+
/**
|
|
1734
|
+
* @private
|
|
1735
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1736
|
+
*/
|
|
1737
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitCancelFailure";
|
|
1738
|
+
tag = ExitCancelFailure_Tags.NotExiting;
|
|
1739
|
+
constructor() {
|
|
1740
|
+
super("ExitCancelFailure", "NotExiting");
|
|
1741
|
+
}
|
|
1742
|
+
static new() {
|
|
1743
|
+
return new NotExiting_();
|
|
1744
|
+
}
|
|
1745
|
+
static instanceOf(obj) {
|
|
1746
|
+
return obj.tag === ExitCancelFailure_Tags.NotExiting;
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* The exit has progressed past its abortable window. `state` is the
|
|
1751
|
+
* state that blocked the cancellation.
|
|
1752
|
+
*/
|
|
1753
|
+
class TooLate_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
1754
|
+
/**
|
|
1755
|
+
* @private
|
|
1756
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1757
|
+
*/
|
|
1758
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitCancelFailure";
|
|
1759
|
+
tag = ExitCancelFailure_Tags.TooLate;
|
|
1760
|
+
constructor(inner) {
|
|
1761
|
+
super("ExitCancelFailure", "TooLate");
|
|
1762
|
+
this.inner = Object.freeze(inner);
|
|
1763
|
+
}
|
|
1764
|
+
static new(inner) {
|
|
1765
|
+
return new TooLate_(inner);
|
|
1766
|
+
}
|
|
1767
|
+
static instanceOf(obj) {
|
|
1768
|
+
return obj.tag === ExitCancelFailure_Tags.TooLate;
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
/**
|
|
1772
|
+
* The final exit transaction is already in the mempool or a block, so
|
|
1773
|
+
* the exit can no longer be called off.
|
|
1774
|
+
*/
|
|
1775
|
+
class AlreadyBroadcast_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
1776
|
+
/**
|
|
1777
|
+
* @private
|
|
1778
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1779
|
+
*/
|
|
1780
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitCancelFailure";
|
|
1781
|
+
tag = ExitCancelFailure_Tags.AlreadyBroadcast;
|
|
1782
|
+
constructor(inner) {
|
|
1783
|
+
super("ExitCancelFailure", "AlreadyBroadcast");
|
|
1784
|
+
this.inner = Object.freeze(inner);
|
|
1785
|
+
}
|
|
1786
|
+
static new(inner) {
|
|
1787
|
+
return new AlreadyBroadcast_(inner);
|
|
1788
|
+
}
|
|
1789
|
+
static instanceOf(obj) {
|
|
1790
|
+
return obj.tag === ExitCancelFailure_Tags.AlreadyBroadcast;
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
function instanceOf(obj) {
|
|
1794
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "ExitCancelFailure";
|
|
1795
|
+
}
|
|
1796
|
+
return Object.freeze({
|
|
1797
|
+
instanceOf,
|
|
1798
|
+
NotExiting: NotExiting_,
|
|
1799
|
+
TooLate: TooLate_,
|
|
1800
|
+
AlreadyBroadcast: AlreadyBroadcast_
|
|
1801
|
+
});
|
|
1802
|
+
})();
|
|
1803
|
+
|
|
1804
|
+
/**
|
|
1805
|
+
* Why a [`Wallet::cancel_exit`](crate::core::Wallet::cancel_exit) did not
|
|
1806
|
+
* cancel the exit.
|
|
1807
|
+
*
|
|
1808
|
+
* These are the *expected* negative outcomes of asking to cancel, not faults:
|
|
1809
|
+
* each is a normal state the exit can legitimately be in. Genuine failures
|
|
1810
|
+
* (database, chain source unreachable) still surface as `Err`.
|
|
1811
|
+
*/
|
|
1812
|
+
|
|
1813
|
+
// FfiConverter for enum ExitCancelFailure
|
|
1814
|
+
const FfiConverterTypeExitCancelFailure = (() => {
|
|
1815
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
1816
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1817
|
+
read(from) {
|
|
1818
|
+
switch (ordinalConverter.read(from)) {
|
|
1819
|
+
case 1:
|
|
1820
|
+
return new ExitCancelFailure.NotExiting();
|
|
1821
|
+
case 2:
|
|
1822
|
+
return new ExitCancelFailure.TooLate({
|
|
1823
|
+
state: FfiConverterTypeExitStateKind.read(from)
|
|
1824
|
+
});
|
|
1825
|
+
case 3:
|
|
1826
|
+
return new ExitCancelFailure.AlreadyBroadcast({
|
|
1827
|
+
txid: FfiConverterString.read(from)
|
|
1828
|
+
});
|
|
1829
|
+
default:
|
|
1830
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
write(value, into) {
|
|
1834
|
+
switch (value.tag) {
|
|
1835
|
+
case ExitCancelFailure_Tags.NotExiting:
|
|
1836
|
+
{
|
|
1837
|
+
ordinalConverter.write(1, into);
|
|
1838
|
+
return;
|
|
1839
|
+
}
|
|
1840
|
+
case ExitCancelFailure_Tags.TooLate:
|
|
1841
|
+
{
|
|
1842
|
+
ordinalConverter.write(2, into);
|
|
1843
|
+
const inner = value.inner;
|
|
1844
|
+
FfiConverterTypeExitStateKind.write(inner.state, into);
|
|
1845
|
+
return;
|
|
1846
|
+
}
|
|
1847
|
+
case ExitCancelFailure_Tags.AlreadyBroadcast:
|
|
1848
|
+
{
|
|
1849
|
+
ordinalConverter.write(3, into);
|
|
1850
|
+
const inner = value.inner;
|
|
1851
|
+
FfiConverterString.write(inner.txid, into);
|
|
1852
|
+
return;
|
|
1853
|
+
}
|
|
1854
|
+
default:
|
|
1855
|
+
// Throwing from here means that ExitCancelFailure_Tags hasn't matched an ordinal.
|
|
1856
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
allocationSize(value) {
|
|
1860
|
+
switch (value.tag) {
|
|
1861
|
+
case ExitCancelFailure_Tags.NotExiting:
|
|
1862
|
+
{
|
|
1863
|
+
return ordinalConverter.allocationSize(1);
|
|
1864
|
+
}
|
|
1865
|
+
case ExitCancelFailure_Tags.TooLate:
|
|
1866
|
+
{
|
|
1867
|
+
const inner = value.inner;
|
|
1868
|
+
let size = ordinalConverter.allocationSize(2);
|
|
1869
|
+
size += FfiConverterTypeExitStateKind.allocationSize(inner.state);
|
|
1870
|
+
return size;
|
|
1871
|
+
}
|
|
1872
|
+
case ExitCancelFailure_Tags.AlreadyBroadcast:
|
|
1873
|
+
{
|
|
1874
|
+
const inner = value.inner;
|
|
1875
|
+
let size = ordinalConverter.allocationSize(3);
|
|
1876
|
+
size += FfiConverterString.allocationSize(inner.txid);
|
|
1877
|
+
return size;
|
|
1878
|
+
}
|
|
1879
|
+
default:
|
|
1880
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
return new FFIConverter();
|
|
1885
|
+
})();
|
|
1886
|
+
|
|
1672
1887
|
// Enum: ExitState
|
|
1673
1888
|
let ExitState_Tags = exports.ExitState_Tags = /*#__PURE__*/function (ExitState_Tags) {
|
|
1674
1889
|
ExitState_Tags["Start"] = "Start";
|
|
@@ -2081,6 +2296,77 @@ const FfiConverterTypeExitState = (() => {
|
|
|
2081
2296
|
return new FFIConverter();
|
|
2082
2297
|
})();
|
|
2083
2298
|
|
|
2299
|
+
/**
|
|
2300
|
+
* Lightweight discriminator for [`ExitState`], mirroring
|
|
2301
|
+
* `bark::exit::ExitStateKind`.
|
|
2302
|
+
*
|
|
2303
|
+
* Carries no payload — use it where only the variant matters (e.g. reporting
|
|
2304
|
+
* which state blocked a cancellation). Serde/TS tags match upstream's
|
|
2305
|
+
* kebab-case serialization.
|
|
2306
|
+
*/
|
|
2307
|
+
let ExitStateKind = exports.ExitStateKind = /*#__PURE__*/function (ExitStateKind) {
|
|
2308
|
+
ExitStateKind[ExitStateKind["Start"] = 0] = "Start";
|
|
2309
|
+
ExitStateKind[ExitStateKind["Processing"] = 1] = "Processing";
|
|
2310
|
+
ExitStateKind[ExitStateKind["AwaitingDelta"] = 2] = "AwaitingDelta";
|
|
2311
|
+
ExitStateKind[ExitStateKind["Claimable"] = 3] = "Claimable";
|
|
2312
|
+
ExitStateKind[ExitStateKind["ClaimInProgress"] = 4] = "ClaimInProgress";
|
|
2313
|
+
ExitStateKind[ExitStateKind["Claimed"] = 5] = "Claimed";
|
|
2314
|
+
ExitStateKind[ExitStateKind["VtxoAlreadySpent"] = 6] = "VtxoAlreadySpent";
|
|
2315
|
+
ExitStateKind[ExitStateKind["Canceled"] = 7] = "Canceled";
|
|
2316
|
+
return ExitStateKind;
|
|
2317
|
+
}({});
|
|
2318
|
+
const FfiConverterTypeExitStateKind = (() => {
|
|
2319
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
2320
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2321
|
+
read(from) {
|
|
2322
|
+
switch (ordinalConverter.read(from)) {
|
|
2323
|
+
case 1:
|
|
2324
|
+
return ExitStateKind.Start;
|
|
2325
|
+
case 2:
|
|
2326
|
+
return ExitStateKind.Processing;
|
|
2327
|
+
case 3:
|
|
2328
|
+
return ExitStateKind.AwaitingDelta;
|
|
2329
|
+
case 4:
|
|
2330
|
+
return ExitStateKind.Claimable;
|
|
2331
|
+
case 5:
|
|
2332
|
+
return ExitStateKind.ClaimInProgress;
|
|
2333
|
+
case 6:
|
|
2334
|
+
return ExitStateKind.Claimed;
|
|
2335
|
+
case 7:
|
|
2336
|
+
return ExitStateKind.VtxoAlreadySpent;
|
|
2337
|
+
case 8:
|
|
2338
|
+
return ExitStateKind.Canceled;
|
|
2339
|
+
default:
|
|
2340
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
write(value, into) {
|
|
2344
|
+
switch (value) {
|
|
2345
|
+
case ExitStateKind.Start:
|
|
2346
|
+
return ordinalConverter.write(1, into);
|
|
2347
|
+
case ExitStateKind.Processing:
|
|
2348
|
+
return ordinalConverter.write(2, into);
|
|
2349
|
+
case ExitStateKind.AwaitingDelta:
|
|
2350
|
+
return ordinalConverter.write(3, into);
|
|
2351
|
+
case ExitStateKind.Claimable:
|
|
2352
|
+
return ordinalConverter.write(4, into);
|
|
2353
|
+
case ExitStateKind.ClaimInProgress:
|
|
2354
|
+
return ordinalConverter.write(5, into);
|
|
2355
|
+
case ExitStateKind.Claimed:
|
|
2356
|
+
return ordinalConverter.write(6, into);
|
|
2357
|
+
case ExitStateKind.VtxoAlreadySpent:
|
|
2358
|
+
return ordinalConverter.write(7, into);
|
|
2359
|
+
case ExitStateKind.Canceled:
|
|
2360
|
+
return ordinalConverter.write(8, into);
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
allocationSize(value) {
|
|
2364
|
+
return ordinalConverter.allocationSize(0);
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
return new FFIConverter();
|
|
2368
|
+
})();
|
|
2369
|
+
|
|
2084
2370
|
// Enum: ExitTxOrigin
|
|
2085
2371
|
let ExitTxOrigin_Tags = exports.ExitTxOrigin_Tags = /*#__PURE__*/function (ExitTxOrigin_Tags) {
|
|
2086
2372
|
ExitTxOrigin_Tags["Wallet"] = "Wallet";
|
|
@@ -4451,6 +4737,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
4451
4737
|
throw __error;
|
|
4452
4738
|
}
|
|
4453
4739
|
}
|
|
4740
|
+
async cancelExit(vtxoId, asyncOpts_) /*throws*/{
|
|
4741
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
4742
|
+
try {
|
|
4743
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
4744
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_cancel_exit(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(vtxoId));
|
|
4745
|
+
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeExitCancelResult.lift.bind(FfiConverterTypeExitCancelResult), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
4746
|
+
} catch (__error) {
|
|
4747
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
4748
|
+
__error.stack = __stack;
|
|
4749
|
+
}
|
|
4750
|
+
throw __error;
|
|
4751
|
+
}
|
|
4752
|
+
}
|
|
4454
4753
|
async cancelLightningReceive(paymentHash, asyncOpts_) /*throws*/{
|
|
4455
4754
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
4456
4755
|
try {
|
|
@@ -4846,6 +5145,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
4846
5145
|
throw __error;
|
|
4847
5146
|
}
|
|
4848
5147
|
}
|
|
5148
|
+
async lockVtxos(vtxoIds, holder, asyncOpts_) /*throws*/{
|
|
5149
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5150
|
+
try {
|
|
5151
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
5152
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_lock_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), FfiConverterOptionalTypeVtxoLockHolder.lower(holder));
|
|
5153
|
+
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
5154
|
+
} catch (__error) {
|
|
5155
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
5156
|
+
__error.stack = __stack;
|
|
5157
|
+
}
|
|
5158
|
+
throw __error;
|
|
5159
|
+
}
|
|
5160
|
+
}
|
|
4849
5161
|
mailboxAuthorization() /*throws*/{
|
|
4850
5162
|
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError), /*caller:*/callStatus => {
|
|
4851
5163
|
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_mailbox_authorization(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
@@ -4970,7 +5282,7 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
4970
5282
|
try {
|
|
4971
5283
|
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
4972
5284
|
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_offboard_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), FfiConverterString.lower(bitcoinAddress));
|
|
4973
|
-
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/
|
|
5285
|
+
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeOffboardResult.lift.bind(FfiConverterTypeOffboardResult), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
4974
5286
|
} catch (__error) {
|
|
4975
5287
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
4976
5288
|
__error.stack = __stack;
|
|
@@ -5388,6 +5700,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
5388
5700
|
throw __error;
|
|
5389
5701
|
}
|
|
5390
5702
|
}
|
|
5703
|
+
async startExitForVtxosIncludingNonStandard(vtxoIds, asyncOpts_) /*throws*/{
|
|
5704
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5705
|
+
try {
|
|
5706
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
5707
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_vtxos_including_non_standard(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds));
|
|
5708
|
+
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
5709
|
+
} catch (__error) {
|
|
5710
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
5711
|
+
__error.stack = __stack;
|
|
5712
|
+
}
|
|
5713
|
+
throw __error;
|
|
5714
|
+
}
|
|
5715
|
+
}
|
|
5391
5716
|
async stopDaemon(asyncOpts_) /*throws*/{
|
|
5392
5717
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5393
5718
|
try {
|
|
@@ -5500,6 +5825,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
5500
5825
|
throw __error;
|
|
5501
5826
|
}
|
|
5502
5827
|
}
|
|
5828
|
+
async unlockVtxos(vtxoIds, expectedHolder, asyncOpts_) /*throws*/{
|
|
5829
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5830
|
+
try {
|
|
5831
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
5832
|
+
return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_unlock_vtxos(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), FfiConverterOptionalTypeVtxoLockHolder.lower(expectedHolder));
|
|
5833
|
+
}, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
5834
|
+
} catch (__error) {
|
|
5835
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
5836
|
+
__error.stack = __stack;
|
|
5837
|
+
}
|
|
5838
|
+
throw __error;
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5503
5841
|
async validateArkoorAddress(address, asyncOpts_) /*throws*/{
|
|
5504
5842
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5505
5843
|
try {
|
|
@@ -5674,6 +6012,9 @@ const FfiConverterArrayTypeWalletTransaction = new _uniffiBindgenReactNative.Ffi
|
|
|
5674
6012
|
// FfiConverter for Array<string>
|
|
5675
6013
|
const FfiConverterArrayString = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterString);
|
|
5676
6014
|
|
|
6015
|
+
// FfiConverter for ExitCancelFailure | undefined
|
|
6016
|
+
const FfiConverterOptionalTypeExitCancelFailure = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeExitCancelFailure);
|
|
6017
|
+
|
|
5677
6018
|
// FfiConverter for VtxoLockHolder | undefined
|
|
5678
6019
|
const FfiConverterOptionalTypeVtxoLockHolder = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeVtxoLockHolder);
|
|
5679
6020
|
|
|
@@ -5824,6 +6165,9 @@ function uniffiEnsureInitialized() {
|
|
|
5824
6165
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds() !== 53455) {
|
|
5825
6166
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds");
|
|
5826
6167
|
}
|
|
6168
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_exit() !== 1772) {
|
|
6169
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_exit");
|
|
6170
|
+
}
|
|
5827
6171
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive() !== 49444) {
|
|
5828
6172
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive");
|
|
5829
6173
|
}
|
|
@@ -5914,6 +6258,9 @@ function uniffiEnsureInitialized() {
|
|
|
5914
6258
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits() !== 58660) {
|
|
5915
6259
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits");
|
|
5916
6260
|
}
|
|
6261
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lock_vtxos() !== 25205) {
|
|
6262
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lock_vtxos");
|
|
6263
|
+
}
|
|
5917
6264
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization() !== 52372) {
|
|
5918
6265
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization");
|
|
5919
6266
|
}
|
|
@@ -5947,7 +6294,7 @@ function uniffiEnsureInitialized() {
|
|
|
5947
6294
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_all() !== 7986) {
|
|
5948
6295
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_all");
|
|
5949
6296
|
}
|
|
5950
|
-
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos() !==
|
|
6297
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos() !== 64605) {
|
|
5951
6298
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");
|
|
5952
6299
|
}
|
|
5953
6300
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !== 43061) {
|
|
@@ -6037,6 +6384,9 @@ function uniffiEnsureInitialized() {
|
|
|
6037
6384
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos() !== 56154) {
|
|
6038
6385
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos");
|
|
6039
6386
|
}
|
|
6387
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard() !== 29239) {
|
|
6388
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard");
|
|
6389
|
+
}
|
|
6040
6390
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon() !== 7109) {
|
|
6041
6391
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");
|
|
6042
6392
|
}
|
|
@@ -6061,6 +6411,9 @@ function uniffiEnsureInitialized() {
|
|
|
6061
6411
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive() !== 43209) {
|
|
6062
6412
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive");
|
|
6063
6413
|
}
|
|
6414
|
+
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos() !== 42168) {
|
|
6415
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos");
|
|
6416
|
+
}
|
|
6064
6417
|
if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !== 10861) {
|
|
6065
6418
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");
|
|
6066
6419
|
}
|
|
@@ -6096,9 +6449,12 @@ var _default = exports.default = Object.freeze({
|
|
|
6096
6449
|
FfiConverterTypeCustomOnchainWalletCallbacks,
|
|
6097
6450
|
FfiConverterTypeDestination,
|
|
6098
6451
|
FfiConverterTypeError,
|
|
6452
|
+
FfiConverterTypeExitCancelFailure,
|
|
6453
|
+
FfiConverterTypeExitCancelResult,
|
|
6099
6454
|
FfiConverterTypeExitClaimTransaction,
|
|
6100
6455
|
FfiConverterTypeExitProgressStatus,
|
|
6101
6456
|
FfiConverterTypeExitState,
|
|
6457
|
+
FfiConverterTypeExitStateKind,
|
|
6102
6458
|
FfiConverterTypeExitTransactionStatus,
|
|
6103
6459
|
FfiConverterTypeExitTx,
|
|
6104
6460
|
FfiConverterTypeExitTxOrigin,
|