@secondts/bark-react-native 0.6.3 → 0.8.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 +191 -9
- package/cpp/generated/bark.hpp +10 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +274 -18
- 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 +273 -17
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +13 -3
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +200 -17
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +13 -3
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +200 -17
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/bark-ffi.ts +30 -3
- package/src/generated/bark.ts +493 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AA2wBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAChC,eAAeF,MAAM;;AAErB;;AAyKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
|
|
@@ -673,18 +673,20 @@ const FfiConverterTypeLightningSend = (() => {
|
|
|
673
673
|
return {
|
|
674
674
|
invoice: FfiConverterString.read(from),
|
|
675
675
|
amountSats: FfiConverterUInt64.read(from),
|
|
676
|
+
feeSats: FfiConverterUInt64.read(from),
|
|
676
677
|
htlcVtxoCount: FfiConverterUInt32.read(from),
|
|
677
|
-
|
|
678
|
+
hasFailedRevocation: FfiConverterBool.read(from)
|
|
678
679
|
};
|
|
679
680
|
}
|
|
680
681
|
write(value, into) {
|
|
681
682
|
FfiConverterString.write(value.invoice, into);
|
|
682
683
|
FfiConverterUInt64.write(value.amountSats, into);
|
|
684
|
+
FfiConverterUInt64.write(value.feeSats, into);
|
|
683
685
|
FfiConverterUInt32.write(value.htlcVtxoCount, into);
|
|
684
|
-
|
|
686
|
+
FfiConverterBool.write(value.hasFailedRevocation, into);
|
|
685
687
|
}
|
|
686
688
|
allocationSize(value) {
|
|
687
|
-
return FfiConverterString.allocationSize(value.invoice) + FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterUInt32.allocationSize(value.htlcVtxoCount) +
|
|
689
|
+
return FfiConverterString.allocationSize(value.invoice) + FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterUInt64.allocationSize(value.feeSats) + FfiConverterUInt32.allocationSize(value.htlcVtxoCount) + FfiConverterBool.allocationSize(value.hasFailedRevocation);
|
|
688
690
|
}
|
|
689
691
|
}
|
|
690
692
|
return new FFIConverter();
|
|
@@ -1667,6 +1669,179 @@ const FfiConverterTypeBarkError = (() => {
|
|
|
1667
1669
|
return new FFIConverter();
|
|
1668
1670
|
})();
|
|
1669
1671
|
|
|
1672
|
+
// Enum: LightningSendStatus
|
|
1673
|
+
export let LightningSendStatus_Tags = /*#__PURE__*/function (LightningSendStatus_Tags) {
|
|
1674
|
+
LightningSendStatus_Tags["Unknown"] = "Unknown";
|
|
1675
|
+
LightningSendStatus_Tags["InProgress"] = "InProgress";
|
|
1676
|
+
LightningSendStatus_Tags["Paid"] = "Paid";
|
|
1677
|
+
return LightningSendStatus_Tags;
|
|
1678
|
+
}({});
|
|
1679
|
+
/**
|
|
1680
|
+
* Terminal/in-flight state of an outgoing lightning send.
|
|
1681
|
+
*
|
|
1682
|
+
* Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
|
|
1683
|
+
* `check_lightning_payment` now return this so callers can drive the
|
|
1684
|
+
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
1685
|
+
*/
|
|
1686
|
+
export const LightningSendStatus = (() => {
|
|
1687
|
+
/**
|
|
1688
|
+
* No record of this payment (never started, or already pruned).
|
|
1689
|
+
*/
|
|
1690
|
+
class Unknown_ extends UniffiEnum {
|
|
1691
|
+
/**
|
|
1692
|
+
* @private
|
|
1693
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1694
|
+
*/
|
|
1695
|
+
[uniffiTypeNameSymbol] = "LightningSendStatus";
|
|
1696
|
+
tag = LightningSendStatus_Tags.Unknown;
|
|
1697
|
+
constructor() {
|
|
1698
|
+
super("LightningSendStatus", "Unknown");
|
|
1699
|
+
}
|
|
1700
|
+
static new() {
|
|
1701
|
+
return new Unknown_();
|
|
1702
|
+
}
|
|
1703
|
+
static instanceOf(obj) {
|
|
1704
|
+
return obj.tag === LightningSendStatus_Tags.Unknown;
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Send is in flight; HTLC VTXOs are locked.
|
|
1709
|
+
*/
|
|
1710
|
+
class InProgress_ extends UniffiEnum {
|
|
1711
|
+
/**
|
|
1712
|
+
* @private
|
|
1713
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1714
|
+
*/
|
|
1715
|
+
[uniffiTypeNameSymbol] = "LightningSendStatus";
|
|
1716
|
+
tag = LightningSendStatus_Tags.InProgress;
|
|
1717
|
+
constructor(inner) {
|
|
1718
|
+
super("LightningSendStatus", "InProgress");
|
|
1719
|
+
this.inner = Object.freeze(inner);
|
|
1720
|
+
}
|
|
1721
|
+
static new(inner) {
|
|
1722
|
+
return new InProgress_(inner);
|
|
1723
|
+
}
|
|
1724
|
+
static instanceOf(obj) {
|
|
1725
|
+
return obj.tag === LightningSendStatus_Tags.InProgress;
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
/**
|
|
1729
|
+
* Send has settled; the preimage proves payment.
|
|
1730
|
+
*/
|
|
1731
|
+
class Paid_ extends UniffiEnum {
|
|
1732
|
+
/**
|
|
1733
|
+
* @private
|
|
1734
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1735
|
+
*/
|
|
1736
|
+
[uniffiTypeNameSymbol] = "LightningSendStatus";
|
|
1737
|
+
tag = LightningSendStatus_Tags.Paid;
|
|
1738
|
+
constructor(inner) {
|
|
1739
|
+
super("LightningSendStatus", "Paid");
|
|
1740
|
+
this.inner = Object.freeze(inner);
|
|
1741
|
+
}
|
|
1742
|
+
static new(inner) {
|
|
1743
|
+
return new Paid_(inner);
|
|
1744
|
+
}
|
|
1745
|
+
static instanceOf(obj) {
|
|
1746
|
+
return obj.tag === LightningSendStatus_Tags.Paid;
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
function instanceOf(obj) {
|
|
1750
|
+
return obj[uniffiTypeNameSymbol] === "LightningSendStatus";
|
|
1751
|
+
}
|
|
1752
|
+
return Object.freeze({
|
|
1753
|
+
instanceOf,
|
|
1754
|
+
Unknown: Unknown_,
|
|
1755
|
+
InProgress: InProgress_,
|
|
1756
|
+
Paid: Paid_
|
|
1757
|
+
});
|
|
1758
|
+
})();
|
|
1759
|
+
|
|
1760
|
+
/**
|
|
1761
|
+
* Terminal/in-flight state of an outgoing lightning send.
|
|
1762
|
+
*
|
|
1763
|
+
* Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
|
|
1764
|
+
* `check_lightning_payment` now return this so callers can drive the
|
|
1765
|
+
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
1766
|
+
*/
|
|
1767
|
+
|
|
1768
|
+
// FfiConverter for enum LightningSendStatus
|
|
1769
|
+
const FfiConverterTypeLightningSendStatus = (() => {
|
|
1770
|
+
const ordinalConverter = FfiConverterInt32;
|
|
1771
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1772
|
+
read(from) {
|
|
1773
|
+
switch (ordinalConverter.read(from)) {
|
|
1774
|
+
case 1:
|
|
1775
|
+
return new LightningSendStatus.Unknown();
|
|
1776
|
+
case 2:
|
|
1777
|
+
return new LightningSendStatus.InProgress({
|
|
1778
|
+
send: FfiConverterTypeLightningSend.read(from)
|
|
1779
|
+
});
|
|
1780
|
+
case 3:
|
|
1781
|
+
return new LightningSendStatus.Paid({
|
|
1782
|
+
paymentHash: FfiConverterString.read(from),
|
|
1783
|
+
preimage: FfiConverterString.read(from)
|
|
1784
|
+
});
|
|
1785
|
+
default:
|
|
1786
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
write(value, into) {
|
|
1790
|
+
switch (value.tag) {
|
|
1791
|
+
case LightningSendStatus_Tags.Unknown:
|
|
1792
|
+
{
|
|
1793
|
+
ordinalConverter.write(1, into);
|
|
1794
|
+
return;
|
|
1795
|
+
}
|
|
1796
|
+
case LightningSendStatus_Tags.InProgress:
|
|
1797
|
+
{
|
|
1798
|
+
ordinalConverter.write(2, into);
|
|
1799
|
+
const inner = value.inner;
|
|
1800
|
+
FfiConverterTypeLightningSend.write(inner.send, into);
|
|
1801
|
+
return;
|
|
1802
|
+
}
|
|
1803
|
+
case LightningSendStatus_Tags.Paid:
|
|
1804
|
+
{
|
|
1805
|
+
ordinalConverter.write(3, into);
|
|
1806
|
+
const inner = value.inner;
|
|
1807
|
+
FfiConverterString.write(inner.paymentHash, into);
|
|
1808
|
+
FfiConverterString.write(inner.preimage, into);
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1811
|
+
default:
|
|
1812
|
+
// Throwing from here means that LightningSendStatus_Tags hasn't matched an ordinal.
|
|
1813
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
allocationSize(value) {
|
|
1817
|
+
switch (value.tag) {
|
|
1818
|
+
case LightningSendStatus_Tags.Unknown:
|
|
1819
|
+
{
|
|
1820
|
+
return ordinalConverter.allocationSize(1);
|
|
1821
|
+
}
|
|
1822
|
+
case LightningSendStatus_Tags.InProgress:
|
|
1823
|
+
{
|
|
1824
|
+
const inner = value.inner;
|
|
1825
|
+
let size = ordinalConverter.allocationSize(2);
|
|
1826
|
+
size += FfiConverterTypeLightningSend.allocationSize(inner.send);
|
|
1827
|
+
return size;
|
|
1828
|
+
}
|
|
1829
|
+
case LightningSendStatus_Tags.Paid:
|
|
1830
|
+
{
|
|
1831
|
+
const inner = value.inner;
|
|
1832
|
+
let size = ordinalConverter.allocationSize(3);
|
|
1833
|
+
size += FfiConverterString.allocationSize(inner.paymentHash);
|
|
1834
|
+
size += FfiConverterString.allocationSize(inner.preimage);
|
|
1835
|
+
return size;
|
|
1836
|
+
}
|
|
1837
|
+
default:
|
|
1838
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
return new FFIConverter();
|
|
1843
|
+
})();
|
|
1844
|
+
|
|
1670
1845
|
/**
|
|
1671
1846
|
* Severity of a log record.
|
|
1672
1847
|
*/
|
|
@@ -2810,6 +2985,19 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
2810
2985
|
throw __error;
|
|
2811
2986
|
}
|
|
2812
2987
|
}
|
|
2988
|
+
async allowLightningSendToExit(paymentHash, asyncOpts_) /*throws*/{
|
|
2989
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2990
|
+
try {
|
|
2991
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
2992
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_allow_lightning_send_to_exit(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
|
|
2993
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
2994
|
+
} catch (__error) {
|
|
2995
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
2996
|
+
__error.stack = __stack;
|
|
2997
|
+
}
|
|
2998
|
+
throw __error;
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
2813
3001
|
async arkInfo(asyncOpts_) {
|
|
2814
3002
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2815
3003
|
try {
|
|
@@ -2823,6 +3011,19 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
2823
3011
|
throw __error;
|
|
2824
3012
|
}
|
|
2825
3013
|
}
|
|
3014
|
+
async attemptLightningReceiveExit(paymentHash, asyncOpts_) /*throws*/{
|
|
3015
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3016
|
+
try {
|
|
3017
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3018
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_attempt_lightning_receive_exit(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
|
|
3019
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
3020
|
+
} catch (__error) {
|
|
3021
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3022
|
+
__error.stack = __stack;
|
|
3023
|
+
}
|
|
3024
|
+
throw __error;
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
2826
3027
|
async balance(asyncOpts_) /*throws*/{
|
|
2827
3028
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
2828
3029
|
try {
|
|
@@ -2932,7 +3133,7 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
2932
3133
|
try {
|
|
2933
3134
|
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
2934
3135
|
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_check_lightning_payment(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash), FfiConverterBool.lower(wait));
|
|
2935
|
-
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/
|
|
3136
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
2936
3137
|
} catch (__error) {
|
|
2937
3138
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
2938
3139
|
__error.stack = __stack;
|
|
@@ -3231,6 +3432,19 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
3231
3432
|
throw __error;
|
|
3232
3433
|
}
|
|
3233
3434
|
}
|
|
3435
|
+
async isInvoicePaid(paymentHash, asyncOpts_) /*throws*/{
|
|
3436
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3437
|
+
try {
|
|
3438
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3439
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_is_invoice_paid(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
|
|
3440
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_i8, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_i8, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_i8, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_i8, /*liftFunc:*/FfiConverterBool.lift.bind(FfiConverterBool), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
3441
|
+
} catch (__error) {
|
|
3442
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3443
|
+
__error.stack = __stack;
|
|
3444
|
+
}
|
|
3445
|
+
throw __error;
|
|
3446
|
+
}
|
|
3447
|
+
}
|
|
3234
3448
|
async lightningReceiveStatus(paymentHash, asyncOpts_) /*throws*/{
|
|
3235
3449
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3236
3450
|
try {
|
|
@@ -3244,6 +3458,19 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
3244
3458
|
throw __error;
|
|
3245
3459
|
}
|
|
3246
3460
|
}
|
|
3461
|
+
async lightningSendState(paymentHash, asyncOpts_) /*throws*/{
|
|
3462
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3463
|
+
try {
|
|
3464
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3465
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_send_state(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
|
|
3466
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
3467
|
+
} catch (__error) {
|
|
3468
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
3469
|
+
__error.stack = __stack;
|
|
3470
|
+
}
|
|
3471
|
+
throw __error;
|
|
3472
|
+
}
|
|
3473
|
+
}
|
|
3247
3474
|
async listClaimableExits(asyncOpts_) /*throws*/{
|
|
3248
3475
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3249
3476
|
try {
|
|
@@ -3432,12 +3659,12 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
3432
3659
|
/**
|
|
3433
3660
|
* Pay to a Lightning Address (LNURL). UniFFI-only — lnurl-rs is not wasm-compatible.
|
|
3434
3661
|
*/
|
|
3435
|
-
async payLightningAddress(lightningAddress, amountSats, comment, asyncOpts_) /*throws*/{
|
|
3662
|
+
async payLightningAddress(lightningAddress, amountSats, comment, wait, asyncOpts_) /*throws*/{
|
|
3436
3663
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3437
3664
|
try {
|
|
3438
3665
|
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3439
|
-
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(lightningAddress), FfiConverterUInt64.lower(amountSats), FfiConverterOptionalString.lower(comment));
|
|
3440
|
-
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/
|
|
3666
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(lightningAddress), FfiConverterUInt64.lower(amountSats), FfiConverterOptionalString.lower(comment), FfiConverterBool.lower(wait));
|
|
3667
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
3441
3668
|
} catch (__error) {
|
|
3442
3669
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
3443
3670
|
__error.stack = __stack;
|
|
@@ -3445,12 +3672,12 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
3445
3672
|
throw __error;
|
|
3446
3673
|
}
|
|
3447
3674
|
}
|
|
3448
|
-
async payLightningInvoice(invoice, amountSats, asyncOpts_) /*throws*/{
|
|
3675
|
+
async payLightningInvoice(invoice, amountSats, wait, asyncOpts_) /*throws*/{
|
|
3449
3676
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3450
3677
|
try {
|
|
3451
3678
|
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3452
|
-
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(invoice), FfiConverterOptionalUInt64.lower(amountSats));
|
|
3453
|
-
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/
|
|
3679
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(invoice), FfiConverterOptionalUInt64.lower(amountSats), FfiConverterBool.lower(wait));
|
|
3680
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
3454
3681
|
} catch (__error) {
|
|
3455
3682
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
3456
3683
|
__error.stack = __stack;
|
|
@@ -3458,12 +3685,12 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
3458
3685
|
throw __error;
|
|
3459
3686
|
}
|
|
3460
3687
|
}
|
|
3461
|
-
async payLightningOffer(offer, amountSats, asyncOpts_) /*throws*/{
|
|
3688
|
+
async payLightningOffer(offer, amountSats, wait, asyncOpts_) /*throws*/{
|
|
3462
3689
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3463
3690
|
try {
|
|
3464
3691
|
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3465
|
-
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(offer), FfiConverterOptionalUInt64.lower(amountSats));
|
|
3466
|
-
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/
|
|
3692
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(offer), FfiConverterOptionalUInt64.lower(amountSats), FfiConverterBool.lower(wait));
|
|
3693
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
3467
3694
|
} catch (__error) {
|
|
3468
3695
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
3469
3696
|
__error.stack = __stack;
|
|
@@ -3770,6 +3997,19 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
3770
3997
|
throw __error;
|
|
3771
3998
|
}
|
|
3772
3999
|
}
|
|
4000
|
+
async stuckFailedLightningSends(asyncOpts_) /*throws*/{
|
|
4001
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
4002
|
+
try {
|
|
4003
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
4004
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_stuck_failed_lightning_sends(uniffiTypeWalletObjectFactory.clonePointer(this));
|
|
4005
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterArrayTypeLightningSend.lift.bind(FfiConverterArrayTypeLightningSend), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
|
|
4006
|
+
} catch (__error) {
|
|
4007
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
4008
|
+
__error.stack = __stack;
|
|
4009
|
+
}
|
|
4010
|
+
throw __error;
|
|
4011
|
+
}
|
|
4012
|
+
}
|
|
3773
4013
|
async sync(asyncOpts_) /*throws*/{
|
|
3774
4014
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3775
4015
|
try {
|
|
@@ -4073,9 +4313,15 @@ function uniffiEnsureInitialized() {
|
|
|
4073
4313
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_vtxos() !== 38449) {
|
|
4074
4314
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_vtxos");
|
|
4075
4315
|
}
|
|
4316
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit() !== 44140) {
|
|
4317
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit");
|
|
4318
|
+
}
|
|
4076
4319
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_ark_info() !== 37357) {
|
|
4077
4320
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_ark_info");
|
|
4078
4321
|
}
|
|
4322
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit() !== 32877) {
|
|
4323
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit");
|
|
4324
|
+
}
|
|
4079
4325
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance() !== 26361) {
|
|
4080
4326
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance");
|
|
4081
4327
|
}
|
|
@@ -4100,7 +4346,7 @@ function uniffiEnsureInitialized() {
|
|
|
4100
4346
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round() !== 21817) {
|
|
4101
4347
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round");
|
|
4102
4348
|
}
|
|
4103
|
-
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment() !==
|
|
4349
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment() !== 33087) {
|
|
4104
4350
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment");
|
|
4105
4351
|
}
|
|
4106
4352
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats() !== 57824) {
|
|
@@ -4172,9 +4418,15 @@ function uniffiEnsureInitialized() {
|
|
|
4172
4418
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo() !== 58528) {
|
|
4173
4419
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxo");
|
|
4174
4420
|
}
|
|
4421
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid() !== 43344) {
|
|
4422
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid");
|
|
4423
|
+
}
|
|
4175
4424
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status() !== 37213) {
|
|
4176
4425
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status");
|
|
4177
4426
|
}
|
|
4427
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state() !== 37487) {
|
|
4428
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_send_state");
|
|
4429
|
+
}
|
|
4178
4430
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits() !== 46928) {
|
|
4179
4431
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits");
|
|
4180
4432
|
}
|
|
@@ -4223,13 +4475,13 @@ function uniffiEnsureInitialized() {
|
|
|
4223
4475
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos() !== 45323) {
|
|
4224
4476
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");
|
|
4225
4477
|
}
|
|
4226
|
-
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !==
|
|
4478
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !== 2440) {
|
|
4227
4479
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address");
|
|
4228
4480
|
}
|
|
4229
|
-
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice() !==
|
|
4481
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice() !== 18714) {
|
|
4230
4482
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice");
|
|
4231
4483
|
}
|
|
4232
|
-
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer() !==
|
|
4484
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer() !== 31129) {
|
|
4233
4485
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer");
|
|
4234
4486
|
}
|
|
4235
4487
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_peek_address() !== 55042) {
|
|
@@ -4301,6 +4553,9 @@ function uniffiEnsureInitialized() {
|
|
|
4301
4553
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon() !== 27848) {
|
|
4302
4554
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");
|
|
4303
4555
|
}
|
|
4556
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends() !== 51351) {
|
|
4557
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends");
|
|
4558
|
+
}
|
|
4304
4559
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync() !== 38360) {
|
|
4305
4560
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync");
|
|
4306
4561
|
}
|
|
@@ -4367,6 +4622,7 @@ export default Object.freeze({
|
|
|
4367
4622
|
FfiConverterTypeLightningInvoice,
|
|
4368
4623
|
FfiConverterTypeLightningReceive,
|
|
4369
4624
|
FfiConverterTypeLightningSend,
|
|
4625
|
+
FfiConverterTypeLightningSendStatus,
|
|
4370
4626
|
FfiConverterTypeLogLevel,
|
|
4371
4627
|
FfiConverterTypeMovement,
|
|
4372
4628
|
FfiConverterTypeNetwork,
|