@runflame/wallet-rn 0.0.1-rc.7 → 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 +238 -25
- 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 +227 -26
- package/ios/FlameWalletFFI.xcframework/ios-arm64/FlameWalletFFI.framework/FlameWalletFFI +0 -0
- package/ios/FlameWalletFFI.xcframework/ios-arm64/FlameWalletFFI.framework/Headers/FlameWalletFFI.h +33 -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 +33 -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(
|
|
@@ -707,6 +709,10 @@ internal object IntegrityCheckingUniffiLib {
|
|
|
707
709
|
): Int
|
|
708
710
|
external fun uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic(
|
|
709
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
|
|
710
716
|
external fun uniffi_flamewallet_ffi_checksum_constructor_wallet_new(
|
|
711
717
|
): Int
|
|
712
718
|
external fun ffi_flamewallet_ffi_uniffi_contract_version(
|
|
@@ -735,12 +741,18 @@ internal object UniffiLib {
|
|
|
735
741
|
): Unit
|
|
736
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,
|
|
737
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
|
|
738
748
|
external fun uniffi_flamewallet_ffi_fn_constructor_wallet_new(`seed`: RustBuffer.ByValue,`network`: RustBuffer.ByValue,`nextIndex`: Int,uniffi_out_err: UniffiRustCallStatus,
|
|
739
749
|
): Long
|
|
740
750
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_address(`ptr`: Long,`path`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
741
751
|
): RustBuffer.ByValue
|
|
742
752
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_build_transfer(`ptr`: Long,`request`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
743
753
|
): RustBuffer.ByValue
|
|
754
|
+
external fun uniffi_flamewallet_ffi_fn_method_wallet_kind(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
755
|
+
): RustBuffer.ByValue
|
|
744
756
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_network(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
745
757
|
): RustBuffer.ByValue
|
|
746
758
|
external fun uniffi_flamewallet_ffi_fn_method_wallet_next_address(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
@@ -907,7 +919,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
907
919
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_address() and 0xFFFF) != 24772) {
|
|
908
920
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
909
921
|
}
|
|
910
|
-
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) {
|
|
911
926
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
912
927
|
}
|
|
913
928
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_network() and 0xFFFF) != 6461) {
|
|
@@ -919,7 +934,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
919
934
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_next_index() and 0xFFFF) != 50043) {
|
|
920
935
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
921
936
|
}
|
|
922
|
-
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) {
|
|
923
938
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
924
939
|
}
|
|
925
940
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_owns() and 0xFFFF) != 34274) {
|
|
@@ -928,12 +943,18 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
|
|
|
928
943
|
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_receiving_key() and 0xFFFF) != 41950) {
|
|
929
944
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
930
945
|
}
|
|
931
|
-
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_view_key() and 0xFFFF) !=
|
|
946
|
+
if ((lib.uniffi_flamewallet_ffi_checksum_method_wallet_view_key() and 0xFFFF) != 51879) {
|
|
932
947
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
933
948
|
}
|
|
934
949
|
if ((lib.uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic() and 0xFFFF) != 19125) {
|
|
935
950
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
936
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
|
+
}
|
|
937
958
|
if ((lib.uniffi_flamewallet_ffi_checksum_constructor_wallet_new() and 0xFFFF) != 9773) {
|
|
938
959
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
939
960
|
}
|
|
@@ -1365,8 +1386,11 @@ public object FfiConverterByteArray: FfiConverterRustBuffer<ByteArray> {
|
|
|
1365
1386
|
/**
|
|
1366
1387
|
* One account, `m/35263'/network'/0'`, behind an opaque handle.
|
|
1367
1388
|
*
|
|
1368
|
-
* The handle
|
|
1369
|
-
*
|
|
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
|
|
1370
1394
|
* is safe to share across threads. Calls that read or advance the counter
|
|
1371
1395
|
* are serialized; [`Wallet::build_transfer`] works on a copy and holds no
|
|
1372
1396
|
* lock while it proves.
|
|
@@ -1386,9 +1410,17 @@ public interface WalletInterface {
|
|
|
1386
1410
|
* account with the lock released: other calls on this handle, from a
|
|
1387
1411
|
* UI thread say, do not wait for it. The build never touches the
|
|
1388
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.
|
|
1389
1416
|
*/
|
|
1390
1417
|
fun `buildTransfer`(`request`: TransferRequest): Transfer
|
|
1391
1418
|
|
|
1419
|
+
/**
|
|
1420
|
+
* What this wallet was built from, and so what it can do.
|
|
1421
|
+
*/
|
|
1422
|
+
fun `kind`(): WalletKind
|
|
1423
|
+
|
|
1392
1424
|
/**
|
|
1393
1425
|
* The network this wallet's addresses are encoded for.
|
|
1394
1426
|
*/
|
|
@@ -1409,6 +1441,7 @@ public interface WalletInterface {
|
|
|
1409
1441
|
* the pair; `note` is `None` when the scan served none. `path` is what
|
|
1410
1442
|
* [`Wallet::owns`] found for the contract's predicate. The opening it
|
|
1411
1443
|
* gives is what a later [`crate::TransferInput`] spends the output with.
|
|
1444
|
+
* A receive wallet cannot open notes.
|
|
1412
1445
|
*/
|
|
1413
1446
|
fun `openNote`(`contract`: kotlin.ByteArray, `note`: kotlin.ByteArray?, `path`: KeyPath): ReceivedNote
|
|
1414
1447
|
|
|
@@ -1429,9 +1462,9 @@ public interface WalletInterface {
|
|
|
1429
1462
|
|
|
1430
1463
|
/**
|
|
1431
1464
|
* The account's view key in bech32f (`view1…` / `testview1…`): what a
|
|
1432
|
-
*
|
|
1465
|
+
* view wallet is built from. It derives every address and opens every
|
|
1433
1466
|
* note, so it reads every amount and memo, but it cannot spend. Store
|
|
1434
|
-
* it as a secret.
|
|
1467
|
+
* it as a secret. A receive wallet has none to give.
|
|
1435
1468
|
*/
|
|
1436
1469
|
fun `viewKey`(): kotlin.String
|
|
1437
1470
|
|
|
@@ -1441,8 +1474,11 @@ public interface WalletInterface {
|
|
|
1441
1474
|
/**
|
|
1442
1475
|
* One account, `m/35263'/network'/0'`, behind an opaque handle.
|
|
1443
1476
|
*
|
|
1444
|
-
* The handle
|
|
1445
|
-
*
|
|
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
|
|
1446
1482
|
* is safe to share across threads. Calls that read or advance the counter
|
|
1447
1483
|
* are serialized; [`Wallet::build_transfer`] works on a copy and holds no
|
|
1448
1484
|
* lock while it proves.
|
|
@@ -1593,6 +1629,9 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1593
1629
|
* account with the lock released: other calls on this handle, from a
|
|
1594
1630
|
* UI thread say, do not wait for it. The build never touches the
|
|
1595
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.
|
|
1596
1635
|
*/
|
|
1597
1636
|
@Throws(FlameException::class)override fun `buildTransfer`(`request`: TransferRequest): Transfer {
|
|
1598
1637
|
return FfiConverterTypeTransfer.lift(
|
|
@@ -1609,6 +1648,22 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1609
1648
|
|
|
1610
1649
|
|
|
1611
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
|
+
|
|
1612
1667
|
/**
|
|
1613
1668
|
* The network this wallet's addresses are encoded for.
|
|
1614
1669
|
*/override fun `network`(): Network {
|
|
@@ -1663,6 +1718,7 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1663
1718
|
* the pair; `note` is `None` when the scan served none. `path` is what
|
|
1664
1719
|
* [`Wallet::owns`] found for the contract's predicate. The opening it
|
|
1665
1720
|
* gives is what a later [`crate::TransferInput`] spends the output with.
|
|
1721
|
+
* A receive wallet cannot open notes.
|
|
1666
1722
|
*/
|
|
1667
1723
|
@Throws(FlameException::class)override fun `openNote`(`contract`: kotlin.ByteArray, `note`: kotlin.ByteArray?, `path`: KeyPath): ReceivedNote {
|
|
1668
1724
|
return FfiConverterTypeReceivedNote.lift(
|
|
@@ -1723,13 +1779,14 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1723
1779
|
|
|
1724
1780
|
/**
|
|
1725
1781
|
* The account's view key in bech32f (`view1…` / `testview1…`): what a
|
|
1726
|
-
*
|
|
1782
|
+
* view wallet is built from. It derives every address and opens every
|
|
1727
1783
|
* note, so it reads every amount and memo, but it cannot spend. Store
|
|
1728
|
-
* it as a secret.
|
|
1729
|
-
*/
|
|
1784
|
+
* it as a secret. A receive wallet has none to give.
|
|
1785
|
+
*/
|
|
1786
|
+
@Throws(FlameException::class)override fun `viewKey`(): kotlin.String {
|
|
1730
1787
|
return FfiConverterString.lift(
|
|
1731
1788
|
callWithHandle {
|
|
1732
|
-
|
|
1789
|
+
uniffiRustCallWithError(FlameException) { _status ->
|
|
1733
1790
|
UniffiLib.uniffi_flamewallet_ffi_fn_method_wallet_view_key(
|
|
1734
1791
|
it,
|
|
1735
1792
|
_status)
|
|
@@ -1767,6 +1824,58 @@ open class Wallet: Disposable, AutoCloseable, WalletInterface
|
|
|
1767
1824
|
|
|
1768
1825
|
|
|
1769
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
|
+
|
|
1770
1879
|
}
|
|
1771
1880
|
|
|
1772
1881
|
}
|
|
@@ -2476,6 +2585,33 @@ sealed class FlameException: kotlin.Exception() {
|
|
|
2476
2585
|
get() = "reason=${ `reason` }"
|
|
2477
2586
|
}
|
|
2478
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
|
+
|
|
2479
2615
|
/**
|
|
2480
2616
|
* An address does not parse for the wallet's network.
|
|
2481
2617
|
*/
|
|
@@ -2574,24 +2710,31 @@ public object FfiConverterTypeFlameError : FfiConverterRustBuffer<FlameException
|
|
|
2574
2710
|
2 -> FlameException.InvalidSeed(
|
|
2575
2711
|
FfiConverterString.read(buf),
|
|
2576
2712
|
)
|
|
2577
|
-
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(
|
|
2578
2721
|
FfiConverterString.read(buf),
|
|
2579
2722
|
)
|
|
2580
|
-
|
|
2723
|
+
6 -> FlameException.InvalidKeyPath(
|
|
2581
2724
|
FfiConverterString.read(buf),
|
|
2582
2725
|
)
|
|
2583
|
-
|
|
2726
|
+
7 -> FlameException.InvalidBytes(
|
|
2584
2727
|
FfiConverterString.read(buf),
|
|
2585
2728
|
FfiConverterString.read(buf),
|
|
2586
2729
|
)
|
|
2587
|
-
|
|
2730
|
+
8 -> FlameException.KeyMismatch(
|
|
2588
2731
|
FfiConverterUInt.read(buf),
|
|
2589
2732
|
)
|
|
2590
|
-
|
|
2733
|
+
9 -> FlameException.Note(
|
|
2591
2734
|
FfiConverterTypeNoteFailure.read(buf),
|
|
2592
2735
|
FfiConverterString.read(buf),
|
|
2593
2736
|
)
|
|
2594
|
-
|
|
2737
|
+
10 -> FlameException.Transfer(
|
|
2595
2738
|
FfiConverterString.read(buf),
|
|
2596
2739
|
)
|
|
2597
2740
|
else -> throw RuntimeException("invalid error enum value, something is very wrong!!")
|
|
@@ -2610,6 +2753,17 @@ public object FfiConverterTypeFlameError : FfiConverterRustBuffer<FlameException
|
|
|
2610
2753
|
4UL
|
|
2611
2754
|
+ FfiConverterString.allocationSize(value.`reason`)
|
|
2612
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
|
+
)
|
|
2613
2767
|
is FlameException.InvalidAddress -> (
|
|
2614
2768
|
// Add the size for the Int that specifies the variant plus the size needed for all fields
|
|
2615
2769
|
4UL
|
|
@@ -2657,35 +2811,46 @@ public object FfiConverterTypeFlameError : FfiConverterRustBuffer<FlameException
|
|
|
2657
2811
|
FfiConverterString.write(value.`reason`, buf)
|
|
2658
2812
|
Unit
|
|
2659
2813
|
}
|
|
2660
|
-
is FlameException.
|
|
2814
|
+
is FlameException.InvalidKey -> {
|
|
2661
2815
|
buf.putInt(3)
|
|
2662
2816
|
FfiConverterString.write(value.`reason`, buf)
|
|
2663
2817
|
Unit
|
|
2664
2818
|
}
|
|
2665
|
-
is FlameException.
|
|
2819
|
+
is FlameException.NotPermitted -> {
|
|
2666
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)
|
|
2667
2832
|
FfiConverterString.write(value.`reason`, buf)
|
|
2668
2833
|
Unit
|
|
2669
2834
|
}
|
|
2670
2835
|
is FlameException.InvalidBytes -> {
|
|
2671
|
-
buf.putInt(
|
|
2836
|
+
buf.putInt(7)
|
|
2672
2837
|
FfiConverterString.write(value.`what`, buf)
|
|
2673
2838
|
FfiConverterString.write(value.`reason`, buf)
|
|
2674
2839
|
Unit
|
|
2675
2840
|
}
|
|
2676
2841
|
is FlameException.KeyMismatch -> {
|
|
2677
|
-
buf.putInt(
|
|
2842
|
+
buf.putInt(8)
|
|
2678
2843
|
FfiConverterUInt.write(value.`input`, buf)
|
|
2679
2844
|
Unit
|
|
2680
2845
|
}
|
|
2681
2846
|
is FlameException.Note -> {
|
|
2682
|
-
buf.putInt(
|
|
2847
|
+
buf.putInt(9)
|
|
2683
2848
|
FfiConverterTypeNoteFailure.write(value.`failure`, buf)
|
|
2684
2849
|
FfiConverterString.write(value.`reason`, buf)
|
|
2685
2850
|
Unit
|
|
2686
2851
|
}
|
|
2687
2852
|
is FlameException.Transfer -> {
|
|
2688
|
-
buf.putInt(
|
|
2853
|
+
buf.putInt(10)
|
|
2689
2854
|
FfiConverterString.write(value.`reason`, buf)
|
|
2690
2855
|
Unit
|
|
2691
2856
|
}
|
|
@@ -2797,6 +2962,54 @@ public object FfiConverterTypeNoteFailure: FfiConverterRustBuffer<NoteFailure> {
|
|
|
2797
2962
|
|
|
2798
2963
|
|
|
2799
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
|
+
|
|
2800
3013
|
|
|
2801
3014
|
/**
|
|
2802
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
|
|
|
@@ -668,18 +680,21 @@ public protocol WalletProtocol: AnyObject, Sendable {
|
|
|
668
680
|
|
|
669
681
|
/**
|
|
670
682
|
* The account's view key in bech32f (`view1…` / `testview1…`): what a
|
|
671
|
-
*
|
|
683
|
+
* view wallet is built from. It derives every address and opens every
|
|
672
684
|
* note, so it reads every amount and memo, but it cannot spend. Store
|
|
673
|
-
* it as a secret.
|
|
685
|
+
* it as a secret. A receive wallet has none to give.
|
|
674
686
|
*/
|
|
675
|
-
func viewKey() -> String
|
|
687
|
+
func viewKey() throws -> String
|
|
676
688
|
|
|
677
689
|
}
|
|
678
690
|
/**
|
|
679
691
|
* One account, `m/35263'/network'/0'`, behind an opaque handle.
|
|
680
692
|
*
|
|
681
|
-
* The handle
|
|
682
|
-
*
|
|
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
|
|
683
698
|
* is safe to share across threads. Calls that read or advance the counter
|
|
684
699
|
* are serialized; [`Wallet::build_transfer`] works on a copy and holds no
|
|
685
700
|
* lock while it proves.
|
|
@@ -769,6 +784,50 @@ public static func fromMnemonic(phrase: String, passphrase: String, network: Net
|
|
|
769
784
|
})
|
|
770
785
|
}
|
|
771
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
|
+
|
|
772
831
|
|
|
773
832
|
|
|
774
833
|
/**
|
|
@@ -792,6 +851,9 @@ open func address(path: KeyPath)throws -> IssuedAddress {
|
|
|
792
851
|
* account with the lock released: other calls on this handle, from a
|
|
793
852
|
* UI thread say, do not wait for it. The build never touches the
|
|
794
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.
|
|
795
857
|
*/
|
|
796
858
|
open func buildTransfer(request: TransferRequest)throws -> Transfer {
|
|
797
859
|
return try FfiConverterTypeTransfer_lift(try rustCallWithError(FfiConverterTypeFlameError_lift) {
|
|
@@ -801,6 +863,18 @@ open func buildTransfer(request: TransferRequest)throws -> Transfer {
|
|
|
801
863
|
FfiConverterTypeTransferRequest_lower(request),uniffiCallStatus
|
|
802
864
|
)
|
|
803
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
|
+
})
|
|
804
878
|
}
|
|
805
879
|
|
|
806
880
|
/**
|
|
@@ -844,6 +918,7 @@ open func nextIndex() -> UInt32 {
|
|
|
844
918
|
* the pair; `note` is `None` when the scan served none. `path` is what
|
|
845
919
|
* [`Wallet::owns`] found for the contract's predicate. The opening it
|
|
846
920
|
* gives is what a later [`crate::TransferInput`] spends the output with.
|
|
921
|
+
* A receive wallet cannot open notes.
|
|
847
922
|
*/
|
|
848
923
|
open func openNote(contract: Data, note: Data?, path: KeyPath)throws -> ReceivedNote {
|
|
849
924
|
return try FfiConverterTypeReceivedNote_lift(try rustCallWithError(FfiConverterTypeFlameError_lift) {
|
|
@@ -890,12 +965,12 @@ open func receivingKey() -> String {
|
|
|
890
965
|
|
|
891
966
|
/**
|
|
892
967
|
* The account's view key in bech32f (`view1…` / `testview1…`): what a
|
|
893
|
-
*
|
|
968
|
+
* view wallet is built from. It derives every address and opens every
|
|
894
969
|
* note, so it reads every amount and memo, but it cannot spend. Store
|
|
895
|
-
* it as a secret.
|
|
970
|
+
* it as a secret. A receive wallet has none to give.
|
|
896
971
|
*/
|
|
897
|
-
open func viewKey()
|
|
898
|
-
return try
|
|
972
|
+
open func viewKey()throws -> String {
|
|
973
|
+
return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeFlameError_lift) {
|
|
899
974
|
uniffiCallStatus in
|
|
900
975
|
uniffi_flamewallet_ffi_fn_method_wallet_view_key(
|
|
901
976
|
self.uniffiCloneHandle(),uniffiCallStatus
|
|
@@ -1822,6 +1897,19 @@ enum FlameError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError {
|
|
|
1822
1897
|
*/
|
|
1823
1898
|
case InvalidSeed(reason: String
|
|
1824
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
|
+
)
|
|
1825
1913
|
/**
|
|
1826
1914
|
* An address does not parse for the wallet's network.
|
|
1827
1915
|
*/
|
|
@@ -1890,24 +1978,31 @@ public struct FfiConverterTypeFlameError: FfiConverterRustBuffer {
|
|
|
1890
1978
|
case 2: return .InvalidSeed(
|
|
1891
1979
|
reason: try FfiConverterString.read(from: &buf)
|
|
1892
1980
|
)
|
|
1893
|
-
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(
|
|
1894
1989
|
reason: try FfiConverterString.read(from: &buf)
|
|
1895
1990
|
)
|
|
1896
|
-
case
|
|
1991
|
+
case 6: return .InvalidKeyPath(
|
|
1897
1992
|
reason: try FfiConverterString.read(from: &buf)
|
|
1898
1993
|
)
|
|
1899
|
-
case
|
|
1994
|
+
case 7: return .InvalidBytes(
|
|
1900
1995
|
what: try FfiConverterString.read(from: &buf),
|
|
1901
1996
|
reason: try FfiConverterString.read(from: &buf)
|
|
1902
1997
|
)
|
|
1903
|
-
case
|
|
1998
|
+
case 8: return .KeyMismatch(
|
|
1904
1999
|
input: try FfiConverterUInt32.read(from: &buf)
|
|
1905
2000
|
)
|
|
1906
|
-
case
|
|
2001
|
+
case 9: return .Note(
|
|
1907
2002
|
failure: try FfiConverterTypeNoteFailure.read(from: &buf),
|
|
1908
2003
|
reason: try FfiConverterString.read(from: &buf)
|
|
1909
2004
|
)
|
|
1910
|
-
case
|
|
2005
|
+
case 10: return .Transfer(
|
|
1911
2006
|
reason: try FfiConverterString.read(from: &buf)
|
|
1912
2007
|
)
|
|
1913
2008
|
|
|
@@ -1932,35 +2027,46 @@ public struct FfiConverterTypeFlameError: FfiConverterRustBuffer {
|
|
|
1932
2027
|
FfiConverterString.write(reason, into: &buf)
|
|
1933
2028
|
|
|
1934
2029
|
|
|
1935
|
-
case let .
|
|
2030
|
+
case let .InvalidKey(reason):
|
|
1936
2031
|
writeInt(&buf, Int32(3))
|
|
1937
2032
|
FfiConverterString.write(reason, into: &buf)
|
|
1938
2033
|
|
|
1939
2034
|
|
|
1940
|
-
case let .
|
|
2035
|
+
case let .NotPermitted(wallet,needs):
|
|
1941
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))
|
|
1942
2048
|
FfiConverterString.write(reason, into: &buf)
|
|
1943
2049
|
|
|
1944
2050
|
|
|
1945
2051
|
case let .InvalidBytes(what,reason):
|
|
1946
|
-
writeInt(&buf, Int32(
|
|
2052
|
+
writeInt(&buf, Int32(7))
|
|
1947
2053
|
FfiConverterString.write(what, into: &buf)
|
|
1948
2054
|
FfiConverterString.write(reason, into: &buf)
|
|
1949
2055
|
|
|
1950
2056
|
|
|
1951
2057
|
case let .KeyMismatch(input):
|
|
1952
|
-
writeInt(&buf, Int32(
|
|
2058
|
+
writeInt(&buf, Int32(8))
|
|
1953
2059
|
FfiConverterUInt32.write(input, into: &buf)
|
|
1954
2060
|
|
|
1955
2061
|
|
|
1956
2062
|
case let .Note(failure,reason):
|
|
1957
|
-
writeInt(&buf, Int32(
|
|
2063
|
+
writeInt(&buf, Int32(9))
|
|
1958
2064
|
FfiConverterTypeNoteFailure.write(failure, into: &buf)
|
|
1959
2065
|
FfiConverterString.write(reason, into: &buf)
|
|
1960
2066
|
|
|
1961
2067
|
|
|
1962
2068
|
case let .Transfer(reason):
|
|
1963
|
-
writeInt(&buf, Int32(
|
|
2069
|
+
writeInt(&buf, Int32(10))
|
|
1964
2070
|
FfiConverterString.write(reason, into: &buf)
|
|
1965
2071
|
|
|
1966
2072
|
}
|
|
@@ -2171,6 +2277,92 @@ public func FfiConverterTypeNoteFailure_lower(_ value: NoteFailure) -> RustBuffe
|
|
|
2171
2277
|
}
|
|
2172
2278
|
|
|
2173
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
|
+
|
|
2174
2366
|
#if swift(>=5.8)
|
|
2175
2367
|
@_documentation(visibility: private)
|
|
2176
2368
|
#endif
|
|
@@ -2429,7 +2621,10 @@ private let initializationResult: InitializationResult = {
|
|
|
2429
2621
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_address() != 24772) {
|
|
2430
2622
|
return InitializationResult.apiChecksumMismatch
|
|
2431
2623
|
}
|
|
2432
|
-
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) {
|
|
2433
2628
|
return InitializationResult.apiChecksumMismatch
|
|
2434
2629
|
}
|
|
2435
2630
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_network() != 6461) {
|
|
@@ -2441,7 +2636,7 @@ private let initializationResult: InitializationResult = {
|
|
|
2441
2636
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_next_index() != 50043) {
|
|
2442
2637
|
return InitializationResult.apiChecksumMismatch
|
|
2443
2638
|
}
|
|
2444
|
-
if (uniffi_flamewallet_ffi_checksum_method_wallet_open_note() !=
|
|
2639
|
+
if (uniffi_flamewallet_ffi_checksum_method_wallet_open_note() != 63642) {
|
|
2445
2640
|
return InitializationResult.apiChecksumMismatch
|
|
2446
2641
|
}
|
|
2447
2642
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_owns() != 34274) {
|
|
@@ -2450,12 +2645,18 @@ private let initializationResult: InitializationResult = {
|
|
|
2450
2645
|
if (uniffi_flamewallet_ffi_checksum_method_wallet_receiving_key() != 41950) {
|
|
2451
2646
|
return InitializationResult.apiChecksumMismatch
|
|
2452
2647
|
}
|
|
2453
|
-
if (uniffi_flamewallet_ffi_checksum_method_wallet_view_key() !=
|
|
2648
|
+
if (uniffi_flamewallet_ffi_checksum_method_wallet_view_key() != 51879) {
|
|
2454
2649
|
return InitializationResult.apiChecksumMismatch
|
|
2455
2650
|
}
|
|
2456
2651
|
if (uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic() != 19125) {
|
|
2457
2652
|
return InitializationResult.apiChecksumMismatch
|
|
2458
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
|
+
}
|
|
2459
2660
|
if (uniffi_flamewallet_ffi_checksum_constructor_wallet_new() != 9773) {
|
|
2460
2661
|
return InitializationResult.apiChecksumMismatch
|
|
2461
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
|
|
@@ -644,6 +659,12 @@ uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_address(void
|
|
|
644
659
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_BUILD_TRANSFER
|
|
645
660
|
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer(void
|
|
646
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
|
+
|
|
647
668
|
);
|
|
648
669
|
#endif
|
|
649
670
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_NETWORK
|
|
@@ -692,6 +713,18 @@ uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_view_key(void
|
|
|
692
713
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_MNEMONIC
|
|
693
714
|
uint16_t uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic(void
|
|
694
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
|
+
|
|
695
728
|
);
|
|
696
729
|
#endif
|
|
697
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
|
|
@@ -644,6 +659,12 @@ uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_address(void
|
|
|
644
659
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_BUILD_TRANSFER
|
|
645
660
|
uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_build_transfer(void
|
|
646
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
|
+
|
|
647
668
|
);
|
|
648
669
|
#endif
|
|
649
670
|
#ifndef UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_METHOD_WALLET_NETWORK
|
|
@@ -692,6 +713,18 @@ uint16_t uniffi_flamewallet_ffi_checksum_method_wallet_view_key(void
|
|
|
692
713
|
#define UNIFFI_FFIDEF_UNIFFI_FLAMEWALLET_FFI_CHECKSUM_CONSTRUCTOR_WALLET_FROM_MNEMONIC
|
|
693
714
|
uint16_t uniffi_flamewallet_ffi_checksum_constructor_wallet_from_mnemonic(void
|
|
694
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
|
+
|
|
695
728
|
);
|
|
696
729
|
#endif
|
|
697
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",
|