@runflame/wallet-rn 0.0.1-rc.6 → 0.0.1-rc.8
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/FlameWalletNative.podspec +2 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/flame/wallet/flamewallet_ffi.kt +265 -18
- package/android/src/main/jniLibs/arm64-v8a/libflamewallet_ffi.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libflamewallet_ffi.so +0 -0
- package/android/src/main/jniLibs/x86_64/libflamewallet_ffi.so +0 -0
- package/ios/FlameWallet.swift +245 -18
- package/ios/FlameWalletFFI.xcframework/ios-arm64/FlameWalletFFI.framework/FlameWalletFFI +0 -0
- package/ios/FlameWalletFFI.xcframework/ios-arm64/FlameWalletFFI.framework/Headers/FlameWalletFFI.h +44 -0
- package/ios/FlameWalletFFI.xcframework/ios-arm64_x86_64-simulator/FlameWalletFFI.framework/FlameWalletFFI +0 -0
- package/ios/FlameWalletFFI.xcframework/ios-arm64_x86_64-simulator/FlameWalletFFI.framework/Headers/FlameWalletFFI.h +44 -0
- package/package.json +1 -1
- package/sbom.cdx.json +2 -2
|
@@ -2,12 +2,12 @@ Pod::Spec.new do |s|
|
|
|
2
2
|
s.name = 'FlameWalletNative'
|
|
3
3
|
# Swift code imports the bindings as `FlameWallet`.
|
|
4
4
|
s.module_name = 'FlameWallet'
|
|
5
|
-
s.version = '0.0.1-rc.
|
|
5
|
+
s.version = '0.0.1-rc.8'
|
|
6
6
|
s.summary = 'Flame wallet keys and confidential transfers, with UniFFI Swift bindings'
|
|
7
7
|
s.homepage = 'https://github.com/runflame/flame-lib'
|
|
8
8
|
s.license = { :type => 'Apache-2.0', :file => 'LICENSE.txt' }
|
|
9
9
|
s.author = 'Runflame'
|
|
10
|
-
s.source = { :git => 'https://github.com/runflame/flame-lib.git', :tag => 'flamewallet-v0.0.1-rc.
|
|
10
|
+
s.source = { :git => 'https://github.com/runflame/flame-lib.git', :tag => 'flamewallet-v0.0.1-rc.8' }
|
|
11
11
|
s.platforms = { :ios => '15.1' }
|
|
12
12
|
s.swift_version = '5.9'
|
|
13
13
|
s.source_files = 'ios/FlameWallet.swift'
|
package/android/build.gradle
CHANGED
|
@@ -691,6 +691,8 @@ internal object IntegrityCheckingUniffiLib {
|
|
|
691
691
|
): Int
|
|
692
692
|
external fun uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer(
|
|
693
693
|
): Int
|
|
694
|
+
external fun uniffi_flamewallet_ffi_checksum_method_wallet_kind(
|
|
695
|
+
): Int
|
|
694
696
|
external fun uniffi_flamewallet_ffi_checksum_method_wallet_network(
|
|
695
697
|
): Int
|
|
696
698
|
external fun uniffi_flamewallet_ffi_checksum_method_wallet_next_address(
|
|
@@ -703,8 +705,14 @@ internal object IntegrityCheckingUniffiLib {
|
|
|
703
705
|
): Int
|
|
704
706
|
external fun uniffi_flamewallet_ffi_checksum_method_wallet_receiving_key(
|
|
705
707
|
): Int
|
|
708
|
+
external fun uniffi_flamewallet_ffi_checksum_method_wallet_view_key(
|
|
709
|
+
): Int
|
|
706
710
|
external fun uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic(
|
|
707
711
|
): Int
|
|
712
|
+
external fun uniffi_flamewallet_ffi_checksum_constructor_wallet_from_receiving_key(
|
|
713
|
+
): Int
|
|
714
|
+
external fun uniffi_flamewallet_ffi_checksum_constructor_wallet_from_view_key(
|
|
715
|
+
): Int
|
|
708
716
|
external fun uniffi_flamewallet_ffi_checksum_constructor_wallet_new(
|
|
709
717
|
): Int
|
|
710
718
|
external fun ffi_flamewallet_ffi_uniffi_contract_version(
|
|
@@ -733,12 +741,18 @@ internal object UniffiLib {
|
|
|
733
741
|
): Unit
|
|
734
742
|
external fun uniffi_flamewallet_ffi_fn_constructor_wallet_from_mnemonic(`phrase`: RustBuffer.ByValue,`passphrase`: RustBuffer.ByValue,`network`: RustBuffer.ByValue,`nextIndex`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
735
743
|
): Long
|
|
744
|
+
external fun uniffi_flamewallet_ffi_fn_constructor_wallet_from_receiving_key(`receivingKey`: RustBuffer.ByValue,`network`: RustBuffer.ByValue,`nextIndex`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
745
|
+
): Long
|
|
746
|
+
external fun uniffi_flamewallet_ffi_fn_constructor_wallet_from_view_key(`viewKey`: RustBuffer.ByValue,`network`: RustBuffer.ByValue,`nextIndex`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
747
|
+
): Long
|
|
736
748
|
external fun uniffi_flamewallet_ffi_fn_constructor_wallet_new(`seed`: RustBuffer.ByValue,`network`: RustBuffer.ByValue,`nextIndex`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
737
749
|
): Long
|
|
738
750
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_address(`ptr`: Long,`path`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
739
751
|
): RustBuffer.ByValue
|
|
740
752
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_build_transfer(`ptr`: Long,`request`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
741
753
|
): RustBuffer.ByValue
|
|
754
|
+
external fun uniffi_flamewallet_ffi_fn_method_wallet_kind(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
755
|
+
): RustBuffer.ByValue
|
|
742
756
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_network(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
743
757
|
): RustBuffer.ByValue
|
|
744
758
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_next_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
@@ -751,6 +765,8 @@ internal object UniffiLib {
|
|
|
751
765
|
): RustBuffer.ByValue
|
|
752
766
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_receiving_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
753
767
|
): RustBuffer.ByValue
|
|
768
|
+
external fun uniffi_flamewallet_ffi_fn_method_wallet_view_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
769
|
+
): RustBuffer.ByValue
|
|
754
770
|
external fun uniffi_flamewallet_ffi_fn_func_decode_contract(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
755
771
|
): RustBuffer.ByValue
|
|
756
772
|
external fun uniffi_flamewallet_ffi_fn_func_opening_matches(`contract`: RustBuffer.ByValue,`opening`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
@@ -903,7 +919,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
903
919
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_address() and 0xFFFF) != 24772) {
|
|
904
920
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
905
921
|
}
|
|
906
|
-
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer() and 0xFFFF) !=
|
|
922
|
+
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer() and 0xFFFF) != 38498) {
|
|
923
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
924
|
+
}
|
|
925
|
+
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_kind() and 0xFFFF) != 48257) {
|
|
907
926
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
908
927
|
}
|
|
909
928
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_network() and 0xFFFF) != 6461) {
|
|
@@ -915,7 +934,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
915
934
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_next_index() and 0xFFFF) != 50043) {
|
|
916
935
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
917
936
|
}
|
|
918
|
-
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_open_note() and 0xFFFF) !=
|
|
937
|
+
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_open_note() and 0xFFFF) != 63642) {
|
|
919
938
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
920
939
|
}
|
|
921
940
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_owns() and 0xFFFF) != 34274) {
|
|
@@ -924,9 +943,18 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
924
943
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_receiving_key() and 0xFFFF) != 41950) {
|
|
925
944
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
926
945
|
}
|
|
946
|
+
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_view_key() and 0xFFFF) != 51879) {
|
|
947
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
948
|
+
}
|
|
927
949
|
if ((lib.uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic() and 0xFFFF) != 19125) {
|
|
928
950
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
929
951
|
}
|
|
952
|
+
if ((lib.uniffi_flamewallet_ffi_checksum_constructor_wallet_from_receiving_key() and 0xFFFF) != 30262) {
|
|
953
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
954
|
+
}
|
|
955
|
+
if ((lib.uniffi_flamewallet_ffi_checksum_constructor_wallet_from_view_key() and 0xFFFF) != 5669) {
|
|
956
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
957
|
+
}
|
|
930
958
|
if ((lib.uniffi_flamewallet_ffi_checksum_constructor_wallet_new() and 0xFFFF) != 9773) {
|
|
931
959
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
932
960
|
}
|
|
@@ -1358,8 +1386,11 @@ public object FfiConverterByteArray: FfiConverterRustBuffer<ByteArray> {
|
|
|
1358
1386
|
/**
|
|
1359
1387
|
* One account, `m/35263'/network'/0'`, behind an opaque handle.
|
|
1360
1388
|
*
|
|
1361
|
-
* The handle
|
|
1362
|
-
*
|
|
1389
|
+
* The handle holds the account key, and every child key is derived inside
|
|
1390
|
+
* a call and dropped before it returns. Two calls hand key material out,
|
|
1391
|
+
* and the caller must keep what they return as secret as the wallet
|
|
1392
|
+
* itself: [`Wallet::view_key`] reads every amount and memo, and
|
|
1393
|
+
* [`Wallet::receiving_key`] links every address. Neither can spend. It
|
|
1363
1394
|
* is safe to share across threads. Calls that read or advance the counter
|
|
1364
1395
|
* are serialized; [`Wallet::build_transfer`] works on a copy and holds no
|
|
1365
1396
|
* lock while it proves.
|
|
@@ -1379,9 +1410,17 @@ public interface WalletInterface {
|
|
|
1379
1410
|
* account with the lock released: other calls on this handle, from a
|
|
1380
1411
|
* UI thread say, do not wait for it. The build never touches the
|
|
1381
1412
|
* counter, so nothing the copy does needs writing back.
|
|
1413
|
+
*
|
|
1414
|
+
* Only a spend wallet builds; the others refuse with
|
|
1415
|
+
* [`FlameError::NotPermitted`] before reading the request.
|
|
1382
1416
|
*/
|
|
1383
1417
|
fun `buildTransfer`(`request`: TransferRequest): Transfer
|
|
1384
1418
|
|
|
1419
|
+
/**
|
|
1420
|
+
* What this wallet was built from, and so what it can do.
|
|
1421
|
+
*/
|
|
1422
|
+
fun `kind`(): WalletKind
|
|
1423
|
+
|
|
1385
1424
|
/**
|
|
1386
1425
|
* The network this wallet's addresses are encoded for.
|
|
1387
1426
|
*/
|
|
@@ -1402,6 +1441,7 @@ public interface WalletInterface {
|
|
|
1402
1441
|
* the pair; `note` is `None` when the scan served none. `path` is what
|
|
1403
1442
|
* [`Wallet::owns`] found for the contract's predicate. The opening it
|
|
1404
1443
|
* gives is what a later [`crate::TransferInput`] spends the output with.
|
|
1444
|
+
* A receive wallet cannot open notes.
|
|
1405
1445
|
*/
|
|
1406
1446
|
fun `openNote`(`contract`: kotlin.ByteArray, `note`: kotlin.ByteArray?, `path`: KeyPath): ReceivedNote
|
|
1407
1447
|
|
|
@@ -1420,14 +1460,25 @@ public interface WalletInterface {
|
|
|
1420
1460
|
*/
|
|
1421
1461
|
fun `receivingKey`(): kotlin.String
|
|
1422
1462
|
|
|
1463
|
+
/**
|
|
1464
|
+
* The account's view key in bech32f (`view1…` / `testview1…`): what a
|
|
1465
|
+
* view wallet is built from. It derives every address and opens every
|
|
1466
|
+
* note, so it reads every amount and memo, but it cannot spend. Store
|
|
1467
|
+
* it as a secret. A receive wallet has none to give.
|
|
1468
|
+
*/
|
|
1469
|
+
fun `viewKey`(): kotlin.String
|
|
1470
|
+
|
|
1423
1471
|
companion object
|
|
1424
1472
|
}
|
|
1425
1473
|
|
|
1426
1474
|
/**
|
|
1427
1475
|
* One account, `m/35263'/network'/0'`, behind an opaque handle.
|
|
1428
1476
|
*
|
|
1429
|
-
* The handle
|
|
1430
|
-
*
|
|
1477
|
+
* The handle holds the account key, and every child key is derived inside
|
|
1478
|
+
* a call and dropped before it returns. Two calls hand key material out,
|
|
1479
|
+
* and the caller must keep what they return as secret as the wallet
|
|
1480
|
+
* itself: [`Wallet::view_key`] reads every amount and memo, and
|
|
1481
|
+
* [`Wallet::receiving_key`] links every address. Neither can spend. It
|
|
1431
1482
|
* is safe to share across threads. Calls that read or advance the counter
|
|
1432
1483
|
* are serialized; [`Wallet::build_transfer`] works on a copy and holds no
|
|
1433
1484
|
* lock while it proves.
|
|
@@ -1578,6 +1629,9 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1578
1629
|
* account with the lock released: other calls on this handle, from a
|
|
1579
1630
|
* UI thread say, do not wait for it. The build never touches the
|
|
1580
1631
|
* counter, so nothing the copy does needs writing back.
|
|
1632
|
+
*
|
|
1633
|
+
* Only a spend wallet builds; the others refuse with
|
|
1634
|
+
* [`FlameError::NotPermitted`] before reading the request.
|
|
1581
1635
|
*/
|
|
1582
1636
|
@Throws(FlameException::class)override fun `buildTransfer`(`request`: TransferRequest): Transfer {
|
|
1583
1637
|
return FfiConverterTypeTransfer.lift(
|
|
@@ -1594,6 +1648,22 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1594
1648
|
|
|
1595
1649
|
|
|
1596
1650
|
|
|
1651
|
+
/**
|
|
1652
|
+
* What this wallet was built from, and so what it can do.
|
|
1653
|
+
*/override fun `kind`(): WalletKind {
|
|
1654
|
+
return FfiConverterTypeWalletKind.lift(
|
|
1655
|
+
callWithHandle {
|
|
1656
|
+
uniffiRustCall() { _status ->
|
|
1657
|
+
UniffiLib.uniffi_flamewallet_ffi_fn_method_wallet_kind(
|
|
1658
|
+
it,
|
|
1659
|
+
_status)
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
)
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1597
1667
|
/**
|
|
1598
1668
|
* The network this wallet's addresses are encoded for.
|
|
1599
1669
|
*/override fun `network`(): Network {
|
|
@@ -1648,6 +1718,7 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1648
1718
|
* the pair; `note` is `None` when the scan served none. `path` is what
|
|
1649
1719
|
* [`Wallet::owns`] found for the contract's predicate. The opening it
|
|
1650
1720
|
* gives is what a later [`crate::TransferInput`] spends the output with.
|
|
1721
|
+
* A receive wallet cannot open notes.
|
|
1651
1722
|
*/
|
|
1652
1723
|
@Throws(FlameException::class)override fun `openNote`(`contract`: kotlin.ByteArray, `note`: kotlin.ByteArray?, `path`: KeyPath): ReceivedNote {
|
|
1653
1724
|
return FfiConverterTypeReceivedNote.lift(
|
|
@@ -1706,6 +1777,26 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1706
1777
|
|
|
1707
1778
|
|
|
1708
1779
|
|
|
1780
|
+
/**
|
|
1781
|
+
* The account's view key in bech32f (`view1…` / `testview1…`): what a
|
|
1782
|
+
* view wallet is built from. It derives every address and opens every
|
|
1783
|
+
* note, so it reads every amount and memo, but it cannot spend. Store
|
|
1784
|
+
* it as a secret. A receive wallet has none to give.
|
|
1785
|
+
*/
|
|
1786
|
+
@Throws(FlameException::class)override fun `viewKey`(): kotlin.String {
|
|
1787
|
+
return FfiConverterString.lift(
|
|
1788
|
+
callWithHandle {
|
|
1789
|
+
uniffiRustCallWithError(FlameException) { _status ->
|
|
1790
|
+
UniffiLib.uniffi_flamewallet_ffi_fn_method_wallet_view_key(
|
|
1791
|
+
it,
|
|
1792
|
+
_status)
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
)
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
|
|
1709
1800
|
|
|
1710
1801
|
|
|
1711
1802
|
|
|
@@ -1733,6 +1824,58 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1733
1824
|
|
|
1734
1825
|
|
|
1735
1826
|
|
|
1827
|
+
/**
|
|
1828
|
+
* A receive wallet from the account's receiving key in bech32f, as
|
|
1829
|
+
* [`Wallet::receiving_key`] gives it, for `network`; `next_index` as
|
|
1830
|
+
* in [`Wallet::new`]. It issues addresses and finds payments;
|
|
1831
|
+
* [`Wallet::view_key`], [`Wallet::open_note`] and
|
|
1832
|
+
* [`Wallet::build_transfer`] refuse with [`FlameError::NotPermitted`].
|
|
1833
|
+
*
|
|
1834
|
+
* As with [`Wallet::from_view_key`], it must be the account node's
|
|
1835
|
+
* key: one from any other node is accepted and silently owns nothing.
|
|
1836
|
+
*/
|
|
1837
|
+
@Throws(FlameException::class) fun `fromReceivingKey`(`receivingKey`: kotlin.String, `network`: Network, `nextIndex`: kotlin.UInt): Wallet {
|
|
1838
|
+
return FfiConverterTypeWallet.lift(
|
|
1839
|
+
uniffiRustCallWithError(FlameException) { _status ->
|
|
1840
|
+
UniffiLib.uniffi_flamewallet_ffi_fn_constructor_wallet_from_receiving_key(
|
|
1841
|
+
|
|
1842
|
+
|
|
1843
|
+
FfiConverterString.lower(`receivingKey`),
|
|
1844
|
+
FfiConverterTypeNetwork.lower(`network`),
|
|
1845
|
+
FfiConverterUInt.lower(`nextIndex`),_status)
|
|
1846
|
+
}
|
|
1847
|
+
)
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* A view wallet from the account's view key in bech32f, as
|
|
1854
|
+
* [`Wallet::view_key`] gives it, for `network`; `next_index` as in
|
|
1855
|
+
* [`Wallet::new`]. Every call works except
|
|
1856
|
+
* [`Wallet::build_transfer`], which refuses with
|
|
1857
|
+
* [`FlameError::NotPermitted`].
|
|
1858
|
+
*
|
|
1859
|
+
* It must be the key of the account node, `m/35263'/network'/0'`,
|
|
1860
|
+
* exactly as [`Wallet::view_key`] exports it. The encoding carries no
|
|
1861
|
+
* depth, so a key from any other node is accepted too, and that
|
|
1862
|
+
* wallet silently owns nothing: every `owns` is `None`.
|
|
1863
|
+
*/
|
|
1864
|
+
@Throws(FlameException::class) fun `fromViewKey`(`viewKey`: kotlin.String, `network`: Network, `nextIndex`: kotlin.UInt): Wallet {
|
|
1865
|
+
return FfiConverterTypeWallet.lift(
|
|
1866
|
+
uniffiRustCallWithError(FlameException) { _status ->
|
|
1867
|
+
UniffiLib.uniffi_flamewallet_ffi_fn_constructor_wallet_from_view_key(
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
FfiConverterString.lower(`viewKey`),
|
|
1871
|
+
FfiConverterTypeNetwork.lower(`network`),
|
|
1872
|
+
FfiConverterUInt.lower(`nextIndex`),_status)
|
|
1873
|
+
}
|
|
1874
|
+
)
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
|
|
1736
1879
|
}
|
|
1737
1880
|
|
|
1738
1881
|
}
|
|
@@ -2442,6 +2585,33 @@ sealed class FlameException: kotlin.Exception() {
|
|
|
2442
2585
|
get() = "reason=${ `reason` }"
|
|
2443
2586
|
}
|
|
2444
2587
|
|
|
2588
|
+
/**
|
|
2589
|
+
* A view or receiving key does not parse for the wallet's network, or
|
|
2590
|
+
* flamekd refused to derive from the key a wallet holds.
|
|
2591
|
+
*/
|
|
2592
|
+
class InvalidKey(
|
|
2593
|
+
|
|
2594
|
+
val `reason`: kotlin.String
|
|
2595
|
+
) : FlameException() {
|
|
2596
|
+
override val message
|
|
2597
|
+
get() = "reason=${ `reason` }"
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* The wallet's key does not allow the call: a view wallet cannot
|
|
2602
|
+
* spend, and a receive wallet can neither spend nor open notes.
|
|
2603
|
+
* `wallet` is this wallet's kind, `needs` the least kind that could.
|
|
2604
|
+
*/
|
|
2605
|
+
class NotPermitted(
|
|
2606
|
+
|
|
2607
|
+
val `wallet`: WalletKind,
|
|
2608
|
+
|
|
2609
|
+
val `needs`: WalletKind
|
|
2610
|
+
) : FlameException() {
|
|
2611
|
+
override val message
|
|
2612
|
+
get() = "wallet=${ `wallet` }, needs=${ `needs` }"
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2445
2615
|
/**
|
|
2446
2616
|
* An address does not parse for the wallet's network.
|
|
2447
2617
|
*/
|
|
@@ -2540,24 +2710,31 @@ public object FfiConverterTypeFlameError : FfiConverterRustBuffer<FlameException
|
|
|
2540
2710
|
2 -> FlameException.InvalidSeed(
|
|
2541
2711
|
FfiConverterString.read(buf),
|
|
2542
2712
|
)
|
|
2543
|
-
3 -> FlameException.
|
|
2713
|
+
3 -> FlameException.InvalidKey(
|
|
2714
|
+
FfiConverterString.read(buf),
|
|
2715
|
+
)
|
|
2716
|
+
4 -> FlameException.NotPermitted(
|
|
2717
|
+
FfiConverterTypeWalletKind.read(buf),
|
|
2718
|
+
FfiConverterTypeWalletKind.read(buf),
|
|
2719
|
+
)
|
|
2720
|
+
5 -> FlameException.InvalidAddress(
|
|
2544
2721
|
FfiConverterString.read(buf),
|
|
2545
2722
|
)
|
|
2546
|
-
|
|
2723
|
+
6 -> FlameException.InvalidKeyPath(
|
|
2547
2724
|
FfiConverterString.read(buf),
|
|
2548
2725
|
)
|
|
2549
|
-
|
|
2726
|
+
7 -> FlameException.InvalidBytes(
|
|
2550
2727
|
FfiConverterString.read(buf),
|
|
2551
2728
|
FfiConverterString.read(buf),
|
|
2552
2729
|
)
|
|
2553
|
-
|
|
2730
|
+
8 -> FlameException.KeyMismatch(
|
|
2554
2731
|
FfiConverterUInt.read(buf),
|
|
2555
2732
|
)
|
|
2556
|
-
|
|
2733
|
+
9 -> FlameException.Note(
|
|
2557
2734
|
FfiConverterTypeNoteFailure.read(buf),
|
|
2558
2735
|
FfiConverterString.read(buf),
|
|
2559
2736
|
)
|
|
2560
|
-
|
|
2737
|
+
10 -> FlameException.Transfer(
|
|
2561
2738
|
FfiConverterString.read(buf),
|
|
2562
2739
|
)
|
|
2563
2740
|
else -> throw RuntimeException("invalid error enum value, something is very wrong!!")
|
|
@@ -2576,6 +2753,17 @@ public object FfiConverterTypeFlameError : FfiConverterRustBuffer<FlameException
|
|
|
2576
2753
|
4UL
|
|
2577
2754
|
+ FfiConverterString.allocationSize(value.`reason`)
|
|
2578
2755
|
)
|
|
2756
|
+
is FlameException.InvalidKey -> (
|
|
2757
|
+
// Add the size for the Int that specifies the variant plus the size needed for all fields
|
|
2758
|
+
4UL
|
|
2759
|
+
+ FfiConverterString.allocationSize(value.`reason`)
|
|
2760
|
+
)
|
|
2761
|
+
is FlameException.NotPermitted -> (
|
|
2762
|
+
// Add the size for the Int that specifies the variant plus the size needed for all fields
|
|
2763
|
+
4UL
|
|
2764
|
+
+ FfiConverterTypeWalletKind.allocationSize(value.`wallet`)
|
|
2765
|
+
+ FfiConverterTypeWalletKind.allocationSize(value.`needs`)
|
|
2766
|
+
)
|
|
2579
2767
|
is FlameException.InvalidAddress -> (
|
|
2580
2768
|
// Add the size for the Int that specifies the variant plus the size needed for all fields
|
|
2581
2769
|
4UL
|
|
@@ -2623,35 +2811,46 @@ public object FfiConverterTypeFlameError : FfiConverterRustBuffer<FlameException
|
|
|
2623
2811
|
FfiConverterString.write(value.`reason`, buf)
|
|
2624
2812
|
Unit
|
|
2625
2813
|
}
|
|
2626
|
-
is FlameException.
|
|
2814
|
+
is FlameException.InvalidKey -> {
|
|
2627
2815
|
buf.putInt(3)
|
|
2628
2816
|
FfiConverterString.write(value.`reason`, buf)
|
|
2629
2817
|
Unit
|
|
2630
2818
|
}
|
|
2631
|
-
is FlameException.
|
|
2819
|
+
is FlameException.NotPermitted -> {
|
|
2632
2820
|
buf.putInt(4)
|
|
2821
|
+
FfiConverterTypeWalletKind.write(value.`wallet`, buf)
|
|
2822
|
+
FfiConverterTypeWalletKind.write(value.`needs`, buf)
|
|
2823
|
+
Unit
|
|
2824
|
+
}
|
|
2825
|
+
is FlameException.InvalidAddress -> {
|
|
2826
|
+
buf.putInt(5)
|
|
2827
|
+
FfiConverterString.write(value.`reason`, buf)
|
|
2828
|
+
Unit
|
|
2829
|
+
}
|
|
2830
|
+
is FlameException.InvalidKeyPath -> {
|
|
2831
|
+
buf.putInt(6)
|
|
2633
2832
|
FfiConverterString.write(value.`reason`, buf)
|
|
2634
2833
|
Unit
|
|
2635
2834
|
}
|
|
2636
2835
|
is FlameException.InvalidBytes -> {
|
|
2637
|
-
buf.putInt(
|
|
2836
|
+
buf.putInt(7)
|
|
2638
2837
|
FfiConverterString.write(value.`what`, buf)
|
|
2639
2838
|
FfiConverterString.write(value.`reason`, buf)
|
|
2640
2839
|
Unit
|
|
2641
2840
|
}
|
|
2642
2841
|
is FlameException.KeyMismatch -> {
|
|
2643
|
-
buf.putInt(
|
|
2842
|
+
buf.putInt(8)
|
|
2644
2843
|
FfiConverterUInt.write(value.`input`, buf)
|
|
2645
2844
|
Unit
|
|
2646
2845
|
}
|
|
2647
2846
|
is FlameException.Note -> {
|
|
2648
|
-
buf.putInt(
|
|
2847
|
+
buf.putInt(9)
|
|
2649
2848
|
FfiConverterTypeNoteFailure.write(value.`failure`, buf)
|
|
2650
2849
|
FfiConverterString.write(value.`reason`, buf)
|
|
2651
2850
|
Unit
|
|
2652
2851
|
}
|
|
2653
2852
|
is FlameException.Transfer -> {
|
|
2654
|
-
buf.putInt(
|
|
2853
|
+
buf.putInt(10)
|
|
2655
2854
|
FfiConverterString.write(value.`reason`, buf)
|
|
2656
2855
|
Unit
|
|
2657
2856
|
}
|
|
@@ -2763,6 +2962,54 @@ public object FfiConverterTypeNoteFailure: FfiConverterRustBuffer<NoteFailure> {
|
|
|
2763
2962
|
|
|
2764
2963
|
|
|
2765
2964
|
|
|
2965
|
+
/**
|
|
2966
|
+
* What a [`Wallet`] was built from, and so what it can do. Each kind can
|
|
2967
|
+
* do everything the next one can.
|
|
2968
|
+
*/
|
|
2969
|
+
|
|
2970
|
+
enum class WalletKind {
|
|
2971
|
+
|
|
2972
|
+
/**
|
|
2973
|
+
* From a seed or mnemonic: finds, opens and spends.
|
|
2974
|
+
*/
|
|
2975
|
+
SPEND,
|
|
2976
|
+
/**
|
|
2977
|
+
* From a view key: finds and opens every payment, cannot spend.
|
|
2978
|
+
*/
|
|
2979
|
+
VIEW,
|
|
2980
|
+
/**
|
|
2981
|
+
* From a receiving key: finds every payment, cannot open or spend.
|
|
2982
|
+
*/
|
|
2983
|
+
RECEIVE;
|
|
2984
|
+
|
|
2985
|
+
|
|
2986
|
+
|
|
2987
|
+
|
|
2988
|
+
companion object
|
|
2989
|
+
}
|
|
2990
|
+
|
|
2991
|
+
|
|
2992
|
+
/**
|
|
2993
|
+
* @suppress
|
|
2994
|
+
*/
|
|
2995
|
+
public object FfiConverterTypeWalletKind: FfiConverterRustBuffer<WalletKind> {
|
|
2996
|
+
override fun read(buf: ByteBuffer) = try {
|
|
2997
|
+
WalletKind.values()[buf.getInt() - 1]
|
|
2998
|
+
} catch (e: IndexOutOfBoundsException) {
|
|
2999
|
+
throw RuntimeException("invalid enum value, something is very wrong!!", e)
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
override fun allocationSize(value: WalletKind) = 4UL
|
|
3003
|
+
|
|
3004
|
+
override fun write(value: WalletKind, buf: ByteBuffer) {
|
|
3005
|
+
buf.putInt(value.ordinal + 1)
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
|
|
2766
3013
|
|
|
2767
3014
|
/**
|
|
2768
3015
|
* @suppress
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/ios/FlameWallet.swift
CHANGED
|
@@ -604,8 +604,11 @@ fileprivate struct FfiConverterData: FfiConverterRustBuffer {
|
|
|
604
604
|
/**
|
|
605
605
|
* One account, `m/35263'/network'/0'`, behind an opaque handle.
|
|
606
606
|
*
|
|
607
|
-
* The handle
|
|
608
|
-
*
|
|
607
|
+
* The handle holds the account key, and every child key is derived inside
|
|
608
|
+
* a call and dropped before it returns. Two calls hand key material out,
|
|
609
|
+
* and the caller must keep what they return as secret as the wallet
|
|
610
|
+
* itself: [`Wallet::view_key`] reads every amount and memo, and
|
|
611
|
+
* [`Wallet::receiving_key`] links every address. Neither can spend. It
|
|
609
612
|
* is safe to share across threads. Calls that read or advance the counter
|
|
610
613
|
* are serialized; [`Wallet::build_transfer`] works on a copy and holds no
|
|
611
614
|
* lock while it proves.
|
|
@@ -625,9 +628,17 @@ public protocol WalletProtocol: AnyObject, Sendable {
|
|
|
625
628
|
* account with the lock released: other calls on this handle, from a
|
|
626
629
|
* UI thread say, do not wait for it. The build never touches the
|
|
627
630
|
* counter, so nothing the copy does needs writing back.
|
|
631
|
+
*
|
|
632
|
+
* Only a spend wallet builds; the others refuse with
|
|
633
|
+
* [`FlameError::NotPermitted`] before reading the request.
|
|
628
634
|
*/
|
|
629
635
|
func buildTransfer(request: TransferRequest) throws -> Transfer
|
|
630
636
|
|
|
637
|
+
/**
|
|
638
|
+
* What this wallet was built from, and so what it can do.
|
|
639
|
+
*/
|
|
640
|
+
func kind() -> WalletKind
|
|
641
|
+
|
|
631
642
|
/**
|
|
632
643
|
* The network this wallet's addresses are encoded for.
|
|
633
644
|
*/
|
|
@@ -648,6 +659,7 @@ public protocol WalletProtocol: AnyObject, Sendable {
|
|
|
648
659
|
* the pair; `note` is `None` when the scan served none. `path` is what
|
|
649
660
|
* [`Wallet::owns`] found for the contract's predicate. The opening it
|
|
650
661
|
* gives is what a later [`crate::TransferInput`] spends the output with.
|
|
662
|
+
* A receive wallet cannot open notes.
|
|
651
663
|
*/
|
|
652
664
|
func openNote(contract: Data, note: Data?, path: KeyPath) throws -> ReceivedNote
|
|
653
665
|
|
|
@@ -666,12 +678,23 @@ public protocol WalletProtocol: AnyObject, Sendable {
|
|
|
666
678
|
*/
|
|
667
679
|
func receivingKey() -> String
|
|
668
680
|
|
|
681
|
+
/**
|
|
682
|
+
* The account's view key in bech32f (`view1…` / `testview1…`): what a
|
|
683
|
+
* view wallet is built from. It derives every address and opens every
|
|
684
|
+
* note, so it reads every amount and memo, but it cannot spend. Store
|
|
685
|
+
* it as a secret. A receive wallet has none to give.
|
|
686
|
+
*/
|
|
687
|
+
func viewKey() throws -> String
|
|
688
|
+
|
|
669
689
|
}
|
|
670
690
|
/**
|
|
671
691
|
* One account, `m/35263'/network'/0'`, behind an opaque handle.
|
|
672
692
|
*
|
|
673
|
-
* The handle
|
|
674
|
-
*
|
|
693
|
+
* The handle holds the account key, and every child key is derived inside
|
|
694
|
+
* a call and dropped before it returns. Two calls hand key material out,
|
|
695
|
+
* and the caller must keep what they return as secret as the wallet
|
|
696
|
+
* itself: [`Wallet::view_key`] reads every amount and memo, and
|
|
697
|
+
* [`Wallet::receiving_key`] links every address. Neither can spend. It
|
|
675
698
|
* is safe to share across threads. Calls that read or advance the counter
|
|
676
699
|
* are serialized; [`Wallet::build_transfer`] works on a copy and holds no
|
|
677
700
|
* lock while it proves.
|
|
@@ -761,6 +784,50 @@ public static func fromMnemonic(phrase: String, passphrase: String, network: Net
|
|
|
761
784
|
})
|
|
762
785
|
}
|
|
763
786
|
|
|
787
|
+
/**
|
|
788
|
+
* A receive wallet from the account's receiving key in bech32f, as
|
|
789
|
+
* [`Wallet::receiving_key`] gives it, for `network`; `next_index` as
|
|
790
|
+
* in [`Wallet::new`]. It issues addresses and finds payments;
|
|
791
|
+
* [`Wallet::view_key`], [`Wallet::open_note`] and
|
|
792
|
+
* [`Wallet::build_transfer`] refuse with [`FlameError::NotPermitted`].
|
|
793
|
+
*
|
|
794
|
+
* As with [`Wallet::from_view_key`], it must be the account node's
|
|
795
|
+
* key: one from any other node is accepted and silently owns nothing.
|
|
796
|
+
*/
|
|
797
|
+
public static func fromReceivingKey(receivingKey: String, network: Network, nextIndex: UInt32)throws -> Wallet {
|
|
798
|
+
return try FfiConverterTypeWallet_lift(try rustCallWithError(FfiConverterTypeFlameError_lift) {
|
|
799
|
+
uniffiCallStatus in
|
|
800
|
+
uniffi_flamewallet_ffi_fn_constructor_wallet_from_receiving_key(
|
|
801
|
+
FfiConverterString.lower(receivingKey),
|
|
802
|
+
FfiConverterTypeNetwork_lower(network),
|
|
803
|
+
FfiConverterUInt32.lower(nextIndex),uniffiCallStatus
|
|
804
|
+
)
|
|
805
|
+
})
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* A view wallet from the account's view key in bech32f, as
|
|
810
|
+
* [`Wallet::view_key`] gives it, for `network`; `next_index` as in
|
|
811
|
+
* [`Wallet::new`]. Every call works except
|
|
812
|
+
* [`Wallet::build_transfer`], which refuses with
|
|
813
|
+
* [`FlameError::NotPermitted`].
|
|
814
|
+
*
|
|
815
|
+
* It must be the key of the account node, `m/35263'/network'/0'`,
|
|
816
|
+
* exactly as [`Wallet::view_key`] exports it. The encoding carries no
|
|
817
|
+
* depth, so a key from any other node is accepted too, and that
|
|
818
|
+
* wallet silently owns nothing: every `owns` is `None`.
|
|
819
|
+
*/
|
|
820
|
+
public static func fromViewKey(viewKey: String, network: Network, nextIndex: UInt32)throws -> Wallet {
|
|
821
|
+
return try FfiConverterTypeWallet_lift(try rustCallWithError(FfiConverterTypeFlameError_lift) {
|
|
822
|
+
uniffiCallStatus in
|
|
823
|
+
uniffi_flamewallet_ffi_fn_constructor_wallet_from_view_key(
|
|
824
|
+
FfiConverterString.lower(viewKey),
|
|
825
|
+
FfiConverterTypeNetwork_lower(network),
|
|
826
|
+
FfiConverterUInt32.lower(nextIndex),uniffiCallStatus
|
|
827
|
+
)
|
|
828
|
+
})
|
|
829
|
+
}
|
|
830
|
+
|
|
764
831
|
|
|
765
832
|
|
|
766
833
|
/**
|
|
@@ -784,6 +851,9 @@ open func address(path: KeyPath)throws -> IssuedAddress {
|
|
|
784
851
|
* account with the lock released: other calls on this handle, from a
|
|
785
852
|
* UI thread say, do not wait for it. The build never touches the
|
|
786
853
|
* counter, so nothing the copy does needs writing back.
|
|
854
|
+
*
|
|
855
|
+
* Only a spend wallet builds; the others refuse with
|
|
856
|
+
* [`FlameError::NotPermitted`] before reading the request.
|
|
787
857
|
*/
|
|
788
858
|
open func buildTransfer(request: TransferRequest)throws -> Transfer {
|
|
789
859
|
return try FfiConverterTypeTransfer_lift(try rustCallWithError(FfiConverterTypeFlameError_lift) {
|
|
@@ -793,6 +863,18 @@ open func buildTransfer(request: TransferRequest)throws -> Transfer {
|
|
|
793
863
|
FfiConverterTypeTransferRequest_lower(request),uniffiCallStatus
|
|
794
864
|
)
|
|
795
865
|
})
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* What this wallet was built from, and so what it can do.
|
|
870
|
+
*/
|
|
871
|
+
open func kind() -> WalletKind {
|
|
872
|
+
return try! FfiConverterTypeWalletKind_lift(try! rustCall() {
|
|
873
|
+
uniffiCallStatus in
|
|
874
|
+
uniffi_flamewallet_ffi_fn_method_wallet_kind(
|
|
875
|
+
self.uniffiCloneHandle(),uniffiCallStatus
|
|
876
|
+
)
|
|
877
|
+
})
|
|
796
878
|
}
|
|
797
879
|
|
|
798
880
|
/**
|
|
@@ -836,6 +918,7 @@ open func nextIndex() -> UInt32 {
|
|
|
836
918
|
* the pair; `note` is `None` when the scan served none. `path` is what
|
|
837
919
|
* [`Wallet::owns`] found for the contract's predicate. The opening it
|
|
838
920
|
* gives is what a later [`crate::TransferInput`] spends the output with.
|
|
921
|
+
* A receive wallet cannot open notes.
|
|
839
922
|
*/
|
|
840
923
|
open func openNote(contract: Data, note: Data?, path: KeyPath)throws -> ReceivedNote {
|
|
841
924
|
return try FfiConverterTypeReceivedNote_lift(try rustCallWithError(FfiConverterTypeFlameError_lift) {
|
|
@@ -880,6 +963,21 @@ open func receivingKey() -> String {
|
|
|
880
963
|
})
|
|
881
964
|
}
|
|
882
965
|
|
|
966
|
+
/**
|
|
967
|
+
* The account's view key in bech32f (`view1…` / `testview1…`): what a
|
|
968
|
+
* view wallet is built from. It derives every address and opens every
|
|
969
|
+
* note, so it reads every amount and memo, but it cannot spend. Store
|
|
970
|
+
* it as a secret. A receive wallet has none to give.
|
|
971
|
+
*/
|
|
972
|
+
open func viewKey()throws -> String {
|
|
973
|
+
return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeFlameError_lift) {
|
|
974
|
+
uniffiCallStatus in
|
|
975
|
+
uniffi_flamewallet_ffi_fn_method_wallet_view_key(
|
|
976
|
+
self.uniffiCloneHandle(),uniffiCallStatus
|
|
977
|
+
)
|
|
978
|
+
})
|
|
979
|
+
}
|
|
980
|
+
|
|
883
981
|
|
|
884
982
|
|
|
885
983
|
}
|
|
@@ -1799,6 +1897,19 @@ enum FlameError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError {
|
|
|
1799
1897
|
*/
|
|
1800
1898
|
case InvalidSeed(reason: String
|
|
1801
1899
|
)
|
|
1900
|
+
/**
|
|
1901
|
+
* A view or receiving key does not parse for the wallet's network, or
|
|
1902
|
+
* flamekd refused to derive from the key a wallet holds.
|
|
1903
|
+
*/
|
|
1904
|
+
case InvalidKey(reason: String
|
|
1905
|
+
)
|
|
1906
|
+
/**
|
|
1907
|
+
* The wallet's key does not allow the call: a view wallet cannot
|
|
1908
|
+
* spend, and a receive wallet can neither spend nor open notes.
|
|
1909
|
+
* `wallet` is this wallet's kind, `needs` the least kind that could.
|
|
1910
|
+
*/
|
|
1911
|
+
case NotPermitted(wallet: WalletKind, needs: WalletKind
|
|
1912
|
+
)
|
|
1802
1913
|
/**
|
|
1803
1914
|
* An address does not parse for the wallet's network.
|
|
1804
1915
|
*/
|
|
@@ -1867,24 +1978,31 @@ public struct FfiConverterTypeFlameError: FfiConverterRustBuffer {
|
|
|
1867
1978
|
case 2: return .InvalidSeed(
|
|
1868
1979
|
reason: try FfiConverterString.read(from: &buf)
|
|
1869
1980
|
)
|
|
1870
|
-
case 3: return .
|
|
1981
|
+
case 3: return .InvalidKey(
|
|
1982
|
+
reason: try FfiConverterString.read(from: &buf)
|
|
1983
|
+
)
|
|
1984
|
+
case 4: return .NotPermitted(
|
|
1985
|
+
wallet: try FfiConverterTypeWalletKind.read(from: &buf),
|
|
1986
|
+
needs: try FfiConverterTypeWalletKind.read(from: &buf)
|
|
1987
|
+
)
|
|
1988
|
+
case 5: return .InvalidAddress(
|
|
1871
1989
|
reason: try FfiConverterString.read(from: &buf)
|
|
1872
1990
|
)
|
|
1873
|
-
case
|
|
1991
|
+
case 6: return .InvalidKeyPath(
|
|
1874
1992
|
reason: try FfiConverterString.read(from: &buf)
|
|
1875
1993
|
)
|
|
1876
|
-
case
|
|
1994
|
+
case 7: return .InvalidBytes(
|
|
1877
1995
|
what: try FfiConverterString.read(from: &buf),
|
|
1878
1996
|
reason: try FfiConverterString.read(from: &buf)
|
|
1879
1997
|
)
|
|
1880
|
-
case
|
|
1998
|
+
case 8: return .KeyMismatch(
|
|
1881
1999
|
input: try FfiConverterUInt32.read(from: &buf)
|
|
1882
2000
|
)
|
|
1883
|
-
case
|
|
2001
|
+
case 9: return .Note(
|
|
1884
2002
|
failure: try FfiConverterTypeNoteFailure.read(from: &buf),
|
|
1885
2003
|
reason: try FfiConverterString.read(from: &buf)
|
|
1886
2004
|
)
|
|
1887
|
-
case
|
|
2005
|
+
case 10: return .Transfer(
|
|
1888
2006
|
reason: try FfiConverterString.read(from: &buf)
|
|
1889
2007
|
)
|
|
1890
2008
|
|
|
@@ -1909,35 +2027,46 @@ public struct FfiConverterTypeFlameError: FfiConverterRustBuffer {
|
|
|
1909
2027
|
FfiConverterString.write(reason, into: &buf)
|
|
1910
2028
|
|
|
1911
2029
|
|
|
1912
|
-
case let .
|
|
2030
|
+
case let .InvalidKey(reason):
|
|
1913
2031
|
writeInt(&buf, Int32(3))
|
|
1914
2032
|
FfiConverterString.write(reason, into: &buf)
|
|
1915
2033
|
|
|
1916
2034
|
|
|
1917
|
-
case let .
|
|
2035
|
+
case let .NotPermitted(wallet,needs):
|
|
1918
2036
|
writeInt(&buf, Int32(4))
|
|
2037
|
+
FfiConverterTypeWalletKind.write(wallet, into: &buf)
|
|
2038
|
+
FfiConverterTypeWalletKind.write(needs, into: &buf)
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
case let .InvalidAddress(reason):
|
|
2042
|
+
writeInt(&buf, Int32(5))
|
|
2043
|
+
FfiConverterString.write(reason, into: &buf)
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
case let .InvalidKeyPath(reason):
|
|
2047
|
+
writeInt(&buf, Int32(6))
|
|
1919
2048
|
FfiConverterString.write(reason, into: &buf)
|
|
1920
2049
|
|
|
1921
2050
|
|
|
1922
2051
|
case let .InvalidBytes(what,reason):
|
|
1923
|
-
writeInt(&buf, Int32(
|
|
2052
|
+
writeInt(&buf, Int32(7))
|
|
1924
2053
|
FfiConverterString.write(what, into: &buf)
|
|
1925
2054
|
FfiConverterString.write(reason, into: &buf)
|
|
1926
2055
|
|
|
1927
2056
|
|
|
1928
2057
|
case let .KeyMismatch(input):
|
|
1929
|
-
writeInt(&buf, Int32(
|
|
2058
|
+
writeInt(&buf, Int32(8))
|
|
1930
2059
|
FfiConverterUInt32.write(input, into: &buf)
|
|
1931
2060
|
|
|
1932
2061
|
|
|
1933
2062
|
case let .Note(failure,reason):
|
|
1934
|
-
writeInt(&buf, Int32(
|
|
2063
|
+
writeInt(&buf, Int32(9))
|
|
1935
2064
|
FfiConverterTypeNoteFailure.write(failure, into: &buf)
|
|
1936
2065
|
FfiConverterString.write(reason, into: &buf)
|
|
1937
2066
|
|
|
1938
2067
|
|
|
1939
2068
|
case let .Transfer(reason):
|
|
1940
|
-
writeInt(&buf, Int32(
|
|
2069
|
+
writeInt(&buf, Int32(10))
|
|
1941
2070
|
FfiConverterString.write(reason, into: &buf)
|
|
1942
2071
|
|
|
1943
2072
|
}
|
|
@@ -2148,6 +2277,92 @@ public func FfiConverterTypeNoteFailure_lower(_ value: NoteFailure) -> RustBuffe
|
|
|
2148
2277
|
}
|
|
2149
2278
|
|
|
2150
2279
|
|
|
2280
|
+
|
|
2281
|
+
/**
|
|
2282
|
+
* What a [`Wallet`] was built from, and so what it can do. Each kind can
|
|
2283
|
+
* do everything the next one can.
|
|
2284
|
+
*/
|
|
2285
|
+
|
|
2286
|
+
public enum WalletKind: Equatable, Hashable {
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* From a seed or mnemonic: finds, opens and spends.
|
|
2290
|
+
*/
|
|
2291
|
+
case spend
|
|
2292
|
+
/**
|
|
2293
|
+
* From a view key: finds and opens every payment, cannot spend.
|
|
2294
|
+
*/
|
|
2295
|
+
case view
|
|
2296
|
+
/**
|
|
2297
|
+
* From a receiving key: finds every payment, cannot open or spend.
|
|
2298
|
+
*/
|
|
2299
|
+
case receive
|
|
2300
|
+
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
#if compiler(>=6)
|
|
2308
|
+
extension WalletKind: Sendable {}
|
|
2309
|
+
#endif
|
|
2310
|
+
|
|
2311
|
+
#if swift(>=5.8)
|
|
2312
|
+
@_documentation(visibility: private)
|
|
2313
|
+
#endif
|
|
2314
|
+
public struct FfiConverterTypeWalletKind: FfiConverterRustBuffer {
|
|
2315
|
+
typealias SwiftType = WalletKind
|
|
2316
|
+
|
|
2317
|
+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WalletKind {
|
|
2318
|
+
let variant: Int32 = try readInt(&buf)
|
|
2319
|
+
switch variant {
|
|
2320
|
+
|
|
2321
|
+
case 1: return .spend
|
|
2322
|
+
|
|
2323
|
+
case 2: return .view
|
|
2324
|
+
|
|
2325
|
+
case 3: return .receive
|
|
2326
|
+
|
|
2327
|
+
default: throw UniffiInternalError.unexpectedEnumCase
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
public static func write(_ value: WalletKind, into buf: inout [UInt8]) {
|
|
2332
|
+
switch value {
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
case .spend:
|
|
2336
|
+
writeInt(&buf, Int32(1))
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
case .view:
|
|
2340
|
+
writeInt(&buf, Int32(2))
|
|
2341
|
+
|
|
2342
|
+
|
|
2343
|
+
case .receive:
|
|
2344
|
+
writeInt(&buf, Int32(3))
|
|
2345
|
+
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
|
|
2351
|
+
#if swift(>=5.8)
|
|
2352
|
+
@_documentation(visibility: private)
|
|
2353
|
+
#endif
|
|
2354
|
+
public func FfiConverterTypeWalletKind_lift(_ buf: RustBuffer) throws -> WalletKind {
|
|
2355
|
+
return try FfiConverterTypeWalletKind.lift(buf)
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
#if swift(>=5.8)
|
|
2359
|
+
@_documentation(visibility: private)
|
|
2360
|
+
#endif
|
|
2361
|
+
public func FfiConverterTypeWalletKind_lower(_ value: WalletKind) -> RustBuffer {
|
|
2362
|
+
return FfiConverterTypeWalletKind.lower(value)
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
|
|
2151
2366
|
#if swift(>=5.8)
|
|
2152
2367
|
@_documentation(visibility: private)
|
|
2153
2368
|
#endif
|
|
@@ -2406,7 +2621,10 @@ private let initializationResult: InitializationResult = {
|
|
|
2406
2621
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_address() != 24772) {
|
|
2407
2622
|
return InitializationResult.apiChecksumMismatch
|
|
2408
2623
|
}
|
|
2409
|
-
if (uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer() !=
|
|
2624
|
+
if (uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer() != 38498) {
|
|
2625
|
+
return InitializationResult.apiChecksumMismatch
|
|
2626
|
+
}
|
|
2627
|
+
if (uniffi_flamewallet_ffi_checksum_method_wallet_kind() != 48257) {
|
|
2410
2628
|
return InitializationResult.apiChecksumMismatch
|
|
2411
2629
|
}
|
|
2412
2630
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_network() != 6461) {
|
|
@@ -2418,7 +2636,7 @@ private let initializationResult: InitializationResult = {
|
|
|
2418
2636
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_next_index() != 50043) {
|
|
2419
2637
|
return InitializationResult.apiChecksumMismatch
|
|
2420
2638
|
}
|
|
2421
|
-
if (uniffi_flamewallet_ffi_checksum_method_wallet_open_note() !=
|
|
2639
|
+
if (uniffi_flamewallet_ffi_checksum_method_wallet_open_note() != 63642) {
|
|
2422
2640
|
return InitializationResult.apiChecksumMismatch
|
|
2423
2641
|
}
|
|
2424
2642
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_owns() != 34274) {
|
|
@@ -2427,9 +2645,18 @@ private let initializationResult: InitializationResult = {
|
|
|
2427
2645
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_receiving_key() != 41950) {
|
|
2428
2646
|
return InitializationResult.apiChecksumMismatch
|
|
2429
2647
|
}
|
|
2648
|
+
if (uniffi_flamewallet_ffi_checksum_method_wallet_view_key() != 51879) {
|
|
2649
|
+
return InitializationResult.apiChecksumMismatch
|
|
2650
|
+
}
|
|
2430
2651
|
if (uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic() != 19125) {
|
|
2431
2652
|
return InitializationResult.apiChecksumMismatch
|
|
2432
2653
|
}
|
|
2654
|
+
if (uniffi_flamewallet_ffi_checksum_constructor_wallet_from_receiving_key() != 30262) {
|
|
2655
|
+
return InitializationResult.apiChecksumMismatch
|
|
2656
|
+
}
|
|
2657
|
+
if (uniffi_flamewallet_ffi_checksum_constructor_wallet_from_view_key() != 5669) {
|
|
2658
|
+
return InitializationResult.apiChecksumMismatch
|
|
2659
|
+
}
|
|
2433
2660
|
if (uniffi_flamewallet_ffi_checksum_constructor_wallet_new() != 9773) {
|
|
2434
2661
|
return InitializationResult.apiChecksumMismatch
|
|
2435
2662
|
}
|
|
Binary file
|
package/ios/FlameWalletFFI.xcframework/ios-arm64/FlameWalletFFI.framework/Headers/FlameWalletFFI.h
CHANGED
|
@@ -258,6 +258,16 @@ void uniffi_flamewallet_ffi_fn_free_wallet(uint64_t handle, RustCallStatus *_Non
|
|
|
258
258
|
uint64_t uniffi_flamewallet_ffi_fn_constructor_wallet_from_mnemonic(RustBuffer phrase, RustBuffer passphrase, RustBuffer network, uint32_t next_index, RustCallStatus *_Nonnull out_status
|
|
259
259
|
);
|
|
260
260
|
#endif
|
|
261
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_FROM_RECEIVING_KEY
|
|
262
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_FROM_RECEIVING_KEY
|
|
263
|
+
uint64_t uniffi_flamewallet_ffi_fn_constructor_wallet_from_receiving_key(RustBuffer receiving_key, RustBuffer network, uint32_t next_index, RustCallStatus *_Nonnull out_status
|
|
264
|
+
);
|
|
265
|
+
#endif
|
|
266
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_FROM_VIEW_KEY
|
|
267
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_FROM_VIEW_KEY
|
|
268
|
+
uint64_t uniffi_flamewallet_ffi_fn_constructor_wallet_from_view_key(RustBuffer view_key, RustBuffer network, uint32_t next_index, RustCallStatus *_Nonnull out_status
|
|
269
|
+
);
|
|
270
|
+
#endif
|
|
261
271
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_NEW
|
|
262
272
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_NEW
|
|
263
273
|
uint64_t uniffi_flamewallet_ffi_fn_constructor_wallet_new(RustBuffer seed, RustBuffer network, uint32_t next_index, RustCallStatus *_Nonnull out_status
|
|
@@ -273,6 +283,11 @@ RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_address(uint64_t ptr, RustBuf
|
|
|
273
283
|
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_build_transfer(uint64_t ptr, RustBuffer request, RustCallStatus *_Nonnull out_status
|
|
274
284
|
);
|
|
275
285
|
#endif
|
|
286
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_KIND
|
|
287
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_KIND
|
|
288
|
+
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_kind(uint64_t ptr, RustCallStatus *_Nonnull out_status
|
|
289
|
+
);
|
|
290
|
+
#endif
|
|
276
291
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_NETWORK
|
|
277
292
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_NETWORK
|
|
278
293
|
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_network(uint64_t ptr, RustCallStatus *_Nonnull out_status
|
|
@@ -303,6 +318,11 @@ RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_owns(uint64_t ptr, RustBuffer
|
|
|
303
318
|
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_receiving_key(uint64_t ptr, RustCallStatus *_Nonnull out_status
|
|
304
319
|
);
|
|
305
320
|
#endif
|
|
321
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_VIEW_KEY
|
|
322
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_VIEW_KEY
|
|
323
|
+
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_view_key(uint64_t ptr, RustCallStatus *_Nonnull out_status
|
|
324
|
+
);
|
|
325
|
+
#endif
|
|
306
326
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_FUNC_DECODE_CONTRACT
|
|
307
327
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_FUNC_DECODE_CONTRACT
|
|
308
328
|
RustBuffer uniffi_flamewallet_ffi_fn_func_decode_contract(RustBuffer bytes, RustCallStatus *_Nonnull out_status
|
|
@@ -639,6 +659,12 @@ uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_address(void
|
|
|
639
659
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_BUILD_TRANSFER
|
|
640
660
|
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer(void
|
|
641
661
|
|
|
662
|
+
);
|
|
663
|
+
#endif
|
|
664
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_KIND
|
|
665
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_KIND
|
|
666
|
+
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_kind(void
|
|
667
|
+
|
|
642
668
|
);
|
|
643
669
|
#endif
|
|
644
670
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_NETWORK
|
|
@@ -675,12 +701,30 @@ uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_owns(void
|
|
|
675
701
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_RECEIVING_KEY
|
|
676
702
|
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_receiving_key(void
|
|
677
703
|
|
|
704
|
+
);
|
|
705
|
+
#endif
|
|
706
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_VIEW_KEY
|
|
707
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_VIEW_KEY
|
|
708
|
+
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_view_key(void
|
|
709
|
+
|
|
678
710
|
);
|
|
679
711
|
#endif
|
|
680
712
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_MNEMONIC
|
|
681
713
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_MNEMONIC
|
|
682
714
|
uint16_t uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic(void
|
|
683
715
|
|
|
716
|
+
);
|
|
717
|
+
#endif
|
|
718
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_RECEIVING_KEY
|
|
719
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_RECEIVING_KEY
|
|
720
|
+
uint16_t uniffi_flamewallet_ffi_checksum_constructor_wallet_from_receiving_key(void
|
|
721
|
+
|
|
722
|
+
);
|
|
723
|
+
#endif
|
|
724
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_VIEW_KEY
|
|
725
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_VIEW_KEY
|
|
726
|
+
uint16_t uniffi_flamewallet_ffi_checksum_constructor_wallet_from_view_key(void
|
|
727
|
+
|
|
684
728
|
);
|
|
685
729
|
#endif
|
|
686
730
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_NEW
|
|
Binary file
|
|
@@ -258,6 +258,16 @@ void uniffi_flamewallet_ffi_fn_free_wallet(uint64_t handle, RustCallStatus *_Non
|
|
|
258
258
|
uint64_t uniffi_flamewallet_ffi_fn_constructor_wallet_from_mnemonic(RustBuffer phrase, RustBuffer passphrase, RustBuffer network, uint32_t next_index, RustCallStatus *_Nonnull out_status
|
|
259
259
|
);
|
|
260
260
|
#endif
|
|
261
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_FROM_RECEIVING_KEY
|
|
262
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_FROM_RECEIVING_KEY
|
|
263
|
+
uint64_t uniffi_flamewallet_ffi_fn_constructor_wallet_from_receiving_key(RustBuffer receiving_key, RustBuffer network, uint32_t next_index, RustCallStatus *_Nonnull out_status
|
|
264
|
+
);
|
|
265
|
+
#endif
|
|
266
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_FROM_VIEW_KEY
|
|
267
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_FROM_VIEW_KEY
|
|
268
|
+
uint64_t uniffi_flamewallet_ffi_fn_constructor_wallet_from_view_key(RustBuffer view_key, RustBuffer network, uint32_t next_index, RustCallStatus *_Nonnull out_status
|
|
269
|
+
);
|
|
270
|
+
#endif
|
|
261
271
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_NEW
|
|
262
272
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_CONSTRUCTOR_WALLET_NEW
|
|
263
273
|
uint64_t uniffi_flamewallet_ffi_fn_constructor_wallet_new(RustBuffer seed, RustBuffer network, uint32_t next_index, RustCallStatus *_Nonnull out_status
|
|
@@ -273,6 +283,11 @@ RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_address(uint64_t ptr, RustBuf
|
|
|
273
283
|
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_build_transfer(uint64_t ptr, RustBuffer request, RustCallStatus *_Nonnull out_status
|
|
274
284
|
);
|
|
275
285
|
#endif
|
|
286
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_KIND
|
|
287
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_KIND
|
|
288
|
+
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_kind(uint64_t ptr, RustCallStatus *_Nonnull out_status
|
|
289
|
+
);
|
|
290
|
+
#endif
|
|
276
291
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_NETWORK
|
|
277
292
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_NETWORK
|
|
278
293
|
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_network(uint64_t ptr, RustCallStatus *_Nonnull out_status
|
|
@@ -303,6 +318,11 @@ RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_owns(uint64_t ptr, RustBuffer
|
|
|
303
318
|
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_receiving_key(uint64_t ptr, RustCallStatus *_Nonnull out_status
|
|
304
319
|
);
|
|
305
320
|
#endif
|
|
321
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_VIEW_KEY
|
|
322
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_METHOD_WALLET_VIEW_KEY
|
|
323
|
+
RustBuffer uniffi_flamewallet_ffi_fn_method_wallet_view_key(uint64_t ptr, RustCallStatus *_Nonnull out_status
|
|
324
|
+
);
|
|
325
|
+
#endif
|
|
306
326
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_FUNC_DECODE_CONTRACT
|
|
307
327
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_FN_FUNC_DECODE_CONTRACT
|
|
308
328
|
RustBuffer uniffi_flamewallet_ffi_fn_func_decode_contract(RustBuffer bytes, RustCallStatus *_Nonnull out_status
|
|
@@ -639,6 +659,12 @@ uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_address(void
|
|
|
639
659
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_BUILD_TRANSFER
|
|
640
660
|
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer(void
|
|
641
661
|
|
|
662
|
+
);
|
|
663
|
+
#endif
|
|
664
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_KIND
|
|
665
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_KIND
|
|
666
|
+
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_kind(void
|
|
667
|
+
|
|
642
668
|
);
|
|
643
669
|
#endif
|
|
644
670
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_NETWORK
|
|
@@ -675,12 +701,30 @@ uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_owns(void
|
|
|
675
701
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_RECEIVING_KEY
|
|
676
702
|
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_receiving_key(void
|
|
677
703
|
|
|
704
|
+
);
|
|
705
|
+
#endif
|
|
706
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_VIEW_KEY
|
|
707
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_VIEW_KEY
|
|
708
|
+
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_view_key(void
|
|
709
|
+
|
|
678
710
|
);
|
|
679
711
|
#endif
|
|
680
712
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_MNEMONIC
|
|
681
713
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_MNEMONIC
|
|
682
714
|
uint16_t uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic(void
|
|
683
715
|
|
|
716
|
+
);
|
|
717
|
+
#endif
|
|
718
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_RECEIVING_KEY
|
|
719
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_RECEIVING_KEY
|
|
720
|
+
uint16_t uniffi_flamewallet_ffi_checksum_constructor_wallet_from_receiving_key(void
|
|
721
|
+
|
|
722
|
+
);
|
|
723
|
+
#endif
|
|
724
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_VIEW_KEY
|
|
725
|
+
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_VIEW_KEY
|
|
726
|
+
uint16_t uniffi_flamewallet_ffi_checksum_constructor_wallet_from_view_key(void
|
|
727
|
+
|
|
684
728
|
);
|
|
685
729
|
#endif
|
|
686
730
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_NEW
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runflame/wallet-rn",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
3
|
+
"version": "0.0.1-rc.8",
|
|
4
4
|
"description": "Flame wallet keys and confidential transfers for iOS and Android: prebuilt libraries with UniFFI Swift and Kotlin bindings",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
package/sbom.cdx.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.3",
|
|
4
4
|
"version": 1,
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:62ec18a0-f6b6-4ac4-97c3-37ec6f64c927",
|
|
6
6
|
"metadata": {
|
|
7
|
-
"timestamp": "2026-10-
|
|
7
|
+
"timestamp": "2026-10-08T12:25:09.621829000Z",
|
|
8
8
|
"tools": [
|
|
9
9
|
{
|
|
10
10
|
"vendor": "CycloneDX",
|