From 92412b01e39f7446a6185b9c3b8507798462021c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Wed, 18 Sep 2024 16:56:05 +0200 Subject: [PATCH] update rgb-lib to 0.3.0-alpha.8 + bump to 0.3.0-alpha.8 --- Package.swift | 4 +- README.md | 4 +- Sources/RgbLib/RgbLib.swift | 96 +++++++++++++++++++++---------------- rgb-lib | 2 +- 4 files changed, 61 insertions(+), 45 deletions(-) diff --git a/Package.swift b/Package.swift index 635cbb7..9423cfd 100644 --- a/Package.swift +++ b/Package.swift @@ -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"]), diff --git a/README.md b/README.md index 56c33a2..1b8c8dc 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/Sources/RgbLib/RgbLib.swift b/Sources/RgbLib/RgbLib.swift index 6185a27..87e62af 100644 --- a/Sources/RgbLib/RgbLib.swift +++ b/Sources/RgbLib/RgbLib.swift @@ -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 @@ -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 } @@ -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)) } } diff --git a/rgb-lib b/rgb-lib index ae66c7b..c02320d 160000 --- a/rgb-lib +++ b/rgb-lib @@ -1 +1 @@ -Subproject commit ae66c7b7c0859dcafbf77db1d3dad26c5379bba3 +Subproject commit c02320deec6bd22c32fea0ee67029066af461145