Skip to content

Commit

Permalink
update rgb-lib to 0.3.0-alpha.8 + bump to 0.3.0-alpha.8
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedberg committed Sep 18, 2024
1 parent eb39d1e commit 92412b0
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 45 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ let package = Package(
// .binaryTarget(name: "rgb_libFFI", path: "./rgb_libFFI.xcframework"),
.binaryTarget(
name: "rgb_libFFI",
url: "https://github.com/RGB-Tools/rgb-lib-swift/releases/download/0.3.0-alpha.6/rgb_libFFI.xcframework.zip",
checksum: "e0892841c456cfc5f69b7c7e42889f1a51e71ae96d57a67ec5e999f7914ac245"),
url: "https://github.com/RGB-Tools/rgb-lib-swift/releases/download/0.3.0-alpha.8/rgb_libFFI.xcframework.zip",
checksum: "f8eec5c1839ac4f3b6a951324faebc25ec17ddd206b1034e9654d2828be8cc76"),
.target(
name: "RgbLib",
dependencies: ["rgb_libFFI"]),
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ For example:
```swift
.binaryTarget(
name: "rgb_libFFI",
url: "https://github.com/RGB-Tools/rgb-lib-swift/releases/download/0.3.0-alpha.6/rgb_libFFI.xcframework.zip",
checksum: "e0892841c456cfc5f69b7c7e42889f1a51e71ae96d57a67ec5e999f7914ac245"),
url: "https://github.com/RGB-Tools/rgb-lib-swift/releases/download/0.3.0-alpha.8/rgb_libFFI.xcframework.zip",
checksum: "f8eec5c1839ac4f3b6a951324faebc25ec17ddd206b1034e9654d2828be8cc76"),
```

Commit the changed `Package.swift` file, then tag the commit with the new
Expand Down
96 changes: 56 additions & 40 deletions Sources/RgbLib/RgbLib.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4195,9 +4195,12 @@ public enum RgbLibError {
)
case InvalidTransportEndpoints(details: String
)
case InvalidTxid
case InvalidVanillaKeychain
case MinFeeNotMet(txid: String
)
case Network(details: String
)
case NoConsignment
case NoIssuanceAmounts
case NoValidTransportEndpoint
Expand Down Expand Up @@ -4353,40 +4356,44 @@ public struct FfiConverterTypeRgbLibError: FfiConverterRustBuffer {
case 47: return .InvalidTransportEndpoints(
details: try FfiConverterString.read(from: &buf)
)
case 48: return .InvalidVanillaKeychain
case 49: return .MinFeeNotMet(
case 48: return .InvalidTxid
case 49: return .InvalidVanillaKeychain
case 50: return .MinFeeNotMet(
txid: try FfiConverterString.read(from: &buf)
)
case 50: return .NoConsignment
case 51: return .NoIssuanceAmounts
case 52: return .NoValidTransportEndpoint
case 53: return .Offline
case 54: return .OutputBelowDustLimit
case 55: return .Proxy(
case 51: return .Network(
details: try FfiConverterString.read(from: &buf)
)
case 52: return .NoConsignment
case 53: return .NoIssuanceAmounts
case 54: return .NoValidTransportEndpoint
case 55: return .Offline
case 56: return .OutputBelowDustLimit
case 57: return .Proxy(
details: try FfiConverterString.read(from: &buf)
)
case 56: return .RecipientIdAlreadyUsed
case 57: return .RecipientIdDuplicated
case 58: return .TooHighIssuanceAmounts
case 59: return .UnknownRgbInterface(
case 58: return .RecipientIdAlreadyUsed
case 59: return .RecipientIdDuplicated
case 60: return .TooHighIssuanceAmounts
case 61: return .UnknownRgbInterface(
interface: try FfiConverterString.read(from: &buf)
)
case 60: return .UnknownRgbSchema(
case 62: return .UnknownRgbSchema(
schemaId: try FfiConverterString.read(from: &buf)
)
case 61: return .UnsupportedBackupVersion(
case 63: return .UnsupportedBackupVersion(
version: try FfiConverterString.read(from: &buf)
)
case 62: return .UnsupportedInvoice
case 63: return .UnsupportedLayer1(
case 64: return .UnsupportedInvoice
case 65: return .UnsupportedLayer1(
layer1: try FfiConverterString.read(from: &buf)
)
case 64: return .UnsupportedTransportType
case 65: return .WalletDirAlreadyExists(
case 66: return .UnsupportedTransportType
case 67: return .WalletDirAlreadyExists(
path: try FfiConverterString.read(from: &buf)
)
case 66: return .WatchOnly
case 67: return .WrongPassword
case 68: return .WatchOnly
case 69: return .WrongPassword

default: throw UniffiInternalError.unexpectedEnumCase
}
Expand Down Expand Up @@ -4623,91 +4630,100 @@ public struct FfiConverterTypeRgbLibError: FfiConverterRustBuffer {
FfiConverterString.write(details, into: &buf)


case .InvalidVanillaKeychain:
case .InvalidTxid:
writeInt(&buf, Int32(48))


case let .MinFeeNotMet(txid):
case .InvalidVanillaKeychain:
writeInt(&buf, Int32(49))


case let .MinFeeNotMet(txid):
writeInt(&buf, Int32(50))
FfiConverterString.write(txid, into: &buf)


case let .Network(details):
writeInt(&buf, Int32(51))
FfiConverterString.write(details, into: &buf)


case .NoConsignment:
writeInt(&buf, Int32(50))
writeInt(&buf, Int32(52))


case .NoIssuanceAmounts:
writeInt(&buf, Int32(51))
writeInt(&buf, Int32(53))


case .NoValidTransportEndpoint:
writeInt(&buf, Int32(52))
writeInt(&buf, Int32(54))


case .Offline:
writeInt(&buf, Int32(53))
writeInt(&buf, Int32(55))


case .OutputBelowDustLimit:
writeInt(&buf, Int32(54))
writeInt(&buf, Int32(56))


case let .Proxy(details):
writeInt(&buf, Int32(55))
writeInt(&buf, Int32(57))
FfiConverterString.write(details, into: &buf)


case .RecipientIdAlreadyUsed:
writeInt(&buf, Int32(56))
writeInt(&buf, Int32(58))


case .RecipientIdDuplicated:
writeInt(&buf, Int32(57))
writeInt(&buf, Int32(59))


case .TooHighIssuanceAmounts:
writeInt(&buf, Int32(58))
writeInt(&buf, Int32(60))


case let .UnknownRgbInterface(interface):
writeInt(&buf, Int32(59))
writeInt(&buf, Int32(61))
FfiConverterString.write(interface, into: &buf)


case let .UnknownRgbSchema(schemaId):
writeInt(&buf, Int32(60))
writeInt(&buf, Int32(62))
FfiConverterString.write(schemaId, into: &buf)


case let .UnsupportedBackupVersion(version):
writeInt(&buf, Int32(61))
writeInt(&buf, Int32(63))
FfiConverterString.write(version, into: &buf)


case .UnsupportedInvoice:
writeInt(&buf, Int32(62))
writeInt(&buf, Int32(64))


case let .UnsupportedLayer1(layer1):
writeInt(&buf, Int32(63))
writeInt(&buf, Int32(65))
FfiConverterString.write(layer1, into: &buf)


case .UnsupportedTransportType:
writeInt(&buf, Int32(64))
writeInt(&buf, Int32(66))


case let .WalletDirAlreadyExists(path):
writeInt(&buf, Int32(65))
writeInt(&buf, Int32(67))
FfiConverterString.write(path, into: &buf)


case .WatchOnly:
writeInt(&buf, Int32(66))
writeInt(&buf, Int32(68))


case .WrongPassword:
writeInt(&buf, Int32(67))
writeInt(&buf, Int32(69))

}
}
Expand Down
2 changes: 1 addition & 1 deletion rgb-lib
Submodule rgb-lib updated 63 files
+570 −657 Cargo.lock
+27 −24 Cargo.toml
+509 −617 bindings/c-ffi/Cargo.lock
+1 −4 bindings/c-ffi/Cargo.toml
+534 −585 bindings/uniffi/Cargo.lock
+4 −4 bindings/uniffi/Cargo.toml
+2 −3 bindings/uniffi/build.rs
+8 −2 bindings/uniffi/src/lib.rs
+2 −0 bindings/uniffi/src/rgb-lib.udl
+0 −2,368 migration/Cargo.lock
+3 −3 migration/Cargo.toml
+75 −248 migration/src/m20230608_071249_init_db.rs
+2 −2 migration/src/main.rs
+6 −6 src/database/entities/asset.rs
+2 −2 src/database/entities/asset_transfer.rs
+3 −3 src/database/entities/backup_info.rs
+2 −2 src/database/entities/batch_transfer.rs
+2 −2 src/database/entities/coloring.rs
+3 −3 src/database/entities/media.rs
+1 −1 src/database/entities/mod.rs
+2 −2 src/database/entities/pending_witness_outpoint.rs
+2 −2 src/database/entities/pending_witness_script.rs
+1 −1 src/database/entities/prelude.rs
+4 −4 src/database/entities/token.rs
+1 −1 src/database/entities/token_media.rs
+3 −3 src/database/entities/transfer.rs
+1 −1 src/database/entities/transfer_transport_endpoint.rs
+2 −2 src/database/entities/transport_endpoint.rs
+3 −3 src/database/entities/txo.rs
+2 −2 src/database/entities/wallet_transaction.rs
+95 −25 src/error.rs
+31 −37 src/lib.rs
+148 −104 src/utils.rs
+104 −132 src/wallet/offline.rs
+253 −287 src/wallet/online.rs
+161 −82 src/wallet/rust_only.rs
+29 −33 src/wallet/test/backup.rs
+30 −30 src/wallet/test/blind_receive.rs
+10 −10 src/wallet/test/create_utxos.rs
+15 −15 src/wallet/test/delete_transfers.rs
+14 −16 src/wallet/test/drain_to.rs
+2 −2 src/wallet/test/export_contract.rs
+27 −31 src/wallet/test/fail_transfers.rs
+85 −122 src/wallet/test/get_asset_balance.rs
+7 −7 src/wallet/test/get_asset_metadata.rs
+8 −13 src/wallet/test/go_online.rs
+48 −37 src/wallet/test/issue_asset_cfa.rs
+64 −28 src/wallet/test/issue_asset_nia.rs
+57 −35 src/wallet/test/issue_asset_uda.rs
+3 −3 src/wallet/test/list_assets.rs
+17 −10 src/wallet/test/list_transactions.rs
+10 −10 src/wallet/test/list_transfers.rs
+14 −14 src/wallet/test/list_unspents.rs
+9 −8 src/wallet/test/mod.rs
+8 −8 src/wallet/test/new.rs
+85 −90 src/wallet/test/refresh.rs
+43 −37 src/wallet/test/rust_only.rs
+410 −391 src/wallet/test/send.rs
+41 −30 src/wallet/test/utils/api.rs
+21 −22 src/wallet/test/utils/chain.rs
+107 −10 src/wallet/test/utils/helpers.rs
+2 −2 src/wallet/test/witness_receive.rs
+7 −0 tests/regtest.sh

0 comments on commit 92412b0

Please sign in to comment.