diff --git a/.jazzy.yaml b/.jazzy.yaml index ec7904d4..e0622246 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -10,4 +10,4 @@ github_url: https://github.com/ArcBlock/arcblock-ios-sdk github_file_prefix: https://github.com/ArcBlock/arcblock-ios-sdk/tree/master exclude: - ArcBlockSDK/ABSDKCoreKit/Network/ABSDKPagination.swift -module_version: 0.11.45 +module_version: 0.11.46 diff --git a/ArcBlockSDK.podspec b/ArcBlockSDK.podspec index a3956639..7d357ce6 100644 --- a/ArcBlockSDK.podspec +++ b/ArcBlockSDK.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'ArcBlockSDK' - s.version = '0.11.45' + s.version = '0.11.46' s.summary = 'Used to integrate iOS apps with ArcBlock Platform.' # This description is used to generate tags and improve search results. @@ -38,7 +38,7 @@ TODO: Add long description of the pod here. s.subspec 'CoreKit' do |sc| sc.source_files = 'ArcBlockSDK/ABSDKCoreKit/**/*.{h,m,swift}' sc.dependency 'ReachabilitySwift' - sc.dependency 'CryptoSwift', '~> 1.6.0' + sc.dependency 'CryptoSwift', '~> 1.4.0' sc.dependency 'BigInt', '~> 5.2.0' sc.dependency 'web3swift', '~> 2.3.0' diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/enum.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/enum.pb.swift index 86337806..d91dc0ec 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/enum.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/enum.pb.swift @@ -934,6 +934,19 @@ extension Ocap_ProtocolStatus: CaseIterable { #endif // swift(>=4.2) +#if swift(>=5.5) && canImport(_Concurrency) +extension Ocap_StatusCode: @unchecked Sendable {} +extension Ocap_KeyType: @unchecked Sendable {} +extension Ocap_HashType: @unchecked Sendable {} +extension Ocap_EncodingType: @unchecked Sendable {} +extension Ocap_RoleType: @unchecked Sendable {} +extension Ocap_UpgradeType: @unchecked Sendable {} +extension Ocap_UpgradeAction: @unchecked Sendable {} +extension Ocap_StateType: @unchecked Sendable {} +extension Ocap_StakeType: @unchecked Sendable {} +extension Ocap_ProtocolStatus: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + // MARK: - Code below here is support for the SwiftProtobuf runtime. extension Ocap_StatusCode: SwiftProtobuf._ProtoNameProviding { diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift index 0ceb8a1a..b403bd5c 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift @@ -1659,6 +1659,71 @@ public struct Ocap_ResponseListDelegations { fileprivate var _page: Ocap_PageInfo? = nil } +#if swift(>=5.5) && canImport(_Concurrency) +extension Ocap_RequestEmpty: @unchecked Sendable {} +extension Ocap_RequestPaginated: @unchecked Sendable {} +extension Ocap_RequestGetState: @unchecked Sendable {} +extension Ocap_RequestSendTx: @unchecked Sendable {} +extension Ocap_ResponseSendTx: @unchecked Sendable {} +extension Ocap_RequestGetTx: @unchecked Sendable {} +extension Ocap_ResponseGetTx: @unchecked Sendable {} +extension Ocap_RequestGetBlock: @unchecked Sendable {} +extension Ocap_ResponseGetBlock: @unchecked Sendable {} +extension Ocap_RequestGetBlocks: @unchecked Sendable {} +extension Ocap_ResponseGetBlocks: @unchecked Sendable {} +extension Ocap_RequestGetAccountState: @unchecked Sendable {} +extension Ocap_ResponseGetAccountState: @unchecked Sendable {} +extension Ocap_ResponseGetAssetState: @unchecked Sendable {} +extension Ocap_ResponseGetForgeState: @unchecked Sendable {} +extension Ocap_ResponseGetDelegateState: @unchecked Sendable {} +extension Ocap_ResponseGetChainInfo: @unchecked Sendable {} +extension Ocap_ResponseGetNodeInfo: @unchecked Sendable {} +extension Ocap_ResponseGetUnconfirmedTxs: @unchecked Sendable {} +extension Ocap_ResponseGetNetInfo: @unchecked Sendable {} +extension Ocap_ResponseGetValidatorsInfo: @unchecked Sendable {} +extension Ocap_RequestGetConfig: @unchecked Sendable {} +extension Ocap_ResponseGetConfig: @unchecked Sendable {} +extension Ocap_RequestListTransactions: @unchecked Sendable {} +extension Ocap_ResponseListTransactions: @unchecked Sendable {} +extension Ocap_RequestListAssets: @unchecked Sendable {} +extension Ocap_ResponseListAssets: @unchecked Sendable {} +extension Ocap_RequestListTopAccounts: @unchecked Sendable {} +extension Ocap_ResponseListTopAccounts: @unchecked Sendable {} +extension Ocap_RequestListAssetTransactions: @unchecked Sendable {} +extension Ocap_ResponseListAssetTransactions: @unchecked Sendable {} +extension Ocap_RequestListBlocks: @unchecked Sendable {} +extension Ocap_ResponseListBlocks: @unchecked Sendable {} +extension Ocap_ResponseGetTokenState: @unchecked Sendable {} +extension Ocap_RequestListTokens: @unchecked Sendable {} +extension Ocap_ResponseListTokens: @unchecked Sendable {} +extension Ocap_ResponseGetFactoryState: @unchecked Sendable {} +extension Ocap_RequestListFactories: @unchecked Sendable {} +extension Ocap_ResponseListFactories: @unchecked Sendable {} +extension Ocap_RequestGetAccountTokens: @unchecked Sendable {} +extension Ocap_ResponseGetAccountTokens: @unchecked Sendable {} +extension Ocap_ResponseGetStakeState: @unchecked Sendable {} +extension Ocap_RequestListStakes: @unchecked Sendable {} +extension Ocap_ResponseListStakes: @unchecked Sendable {} +extension Ocap_ResponseGetRollupState: @unchecked Sendable {} +extension Ocap_RequestListRollups: @unchecked Sendable {} +extension Ocap_ResponseListRollups: @unchecked Sendable {} +extension Ocap_RequestGetRollupBlock: @unchecked Sendable {} +extension Ocap_ResponseGetRollupBlock: @unchecked Sendable {} +extension Ocap_RequestListRollupBlocks: @unchecked Sendable {} +extension Ocap_ResponseListRollupBlocks: @unchecked Sendable {} +extension Ocap_RequestListRollupValidators: @unchecked Sendable {} +extension Ocap_ResponseListRollupValidators: @unchecked Sendable {} +extension Ocap_RequestSearch: @unchecked Sendable {} +extension Ocap_ResponseSearch: @unchecked Sendable {} +extension Ocap_RequestGetEvidenceState: @unchecked Sendable {} +extension Ocap_ResponseGetEvidenceState: @unchecked Sendable {} +extension Ocap_ResponseGetForgeStats: @unchecked Sendable {} +extension Ocap_RequestEstimateGas: @unchecked Sendable {} +extension Ocap_ResponseEstimateGas: @unchecked Sendable {} +extension Ocap_RequestListDelegations: @unchecked Sendable {} +extension Ocap_ResponseListDelegations: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "ocap" diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift index 0c9a7c7d..92dba42c 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift @@ -729,6 +729,12 @@ public struct Ocap_StakeState { set {_uniqueStorage()._slashers = newValue} } + /// Added in v1.18.222 + public var nonce: String { + get {return _storage._nonce} + set {_uniqueStorage()._nonce = newValue} + } + public var context: Ocap_StateContext { get {return _storage._context ?? Ocap_StateContext()} set {_uniqueStorage()._context = newValue} @@ -1172,6 +1178,21 @@ public struct Ocap_EvidenceState { fileprivate var _context: Ocap_StateContext? = nil } +#if swift(>=5.5) && canImport(_Concurrency) +extension Ocap_AccountState: @unchecked Sendable {} +extension Ocap_AssetState: @unchecked Sendable {} +extension Ocap_ForgeState: @unchecked Sendable {} +extension Ocap_RootState: @unchecked Sendable {} +extension Ocap_DelegateOpState: @unchecked Sendable {} +extension Ocap_DelegateState: @unchecked Sendable {} +extension Ocap_TokenState: @unchecked Sendable {} +extension Ocap_AssetFactoryState: @unchecked Sendable {} +extension Ocap_StakeState: @unchecked Sendable {} +extension Ocap_RollupState: @unchecked Sendable {} +extension Ocap_RollupBlock: @unchecked Sendable {} +extension Ocap_EvidenceState: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "ocap" @@ -2234,6 +2255,7 @@ extension Ocap_StakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen 9: .standard(proto: "revoked_tokens"), 10: .standard(proto: "revoked_assets"), 11: .same(proto: "slashers"), + 12: .same(proto: "nonce"), 30: .same(proto: "context"), 50: .same(proto: "data"), ] @@ -2250,6 +2272,7 @@ extension Ocap_StakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen var _revokedTokens: [Ocap_IndexedTokenInput] = [] var _revokedAssets: [String] = [] var _slashers: [String] = [] + var _nonce: String = String() var _context: Ocap_StateContext? = nil var _data: SwiftProtobuf.Google_Protobuf_Any? = nil @@ -2269,6 +2292,7 @@ extension Ocap_StakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen _revokedTokens = source._revokedTokens _revokedAssets = source._revokedAssets _slashers = source._slashers + _nonce = source._nonce _context = source._context _data = source._data } @@ -2300,6 +2324,7 @@ extension Ocap_StakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen case 9: try { try decoder.decodeRepeatedMessageField(value: &_storage._revokedTokens) }() case 10: try { try decoder.decodeRepeatedStringField(value: &_storage._revokedAssets) }() case 11: try { try decoder.decodeRepeatedStringField(value: &_storage._slashers) }() + case 12: try { try decoder.decodeSingularStringField(value: &_storage._nonce) }() case 30: try { try decoder.decodeSingularMessageField(value: &_storage._context) }() case 50: try { try decoder.decodeSingularMessageField(value: &_storage._data) }() default: break @@ -2347,6 +2372,9 @@ extension Ocap_StakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen if !_storage._slashers.isEmpty { try visitor.visitRepeatedStringField(value: _storage._slashers, fieldNumber: 11) } + if !_storage._nonce.isEmpty { + try visitor.visitSingularStringField(value: _storage._nonce, fieldNumber: 12) + } try { if let v = _storage._context { try visitor.visitSingularMessageField(value: v, fieldNumber: 30) } }() @@ -2373,6 +2401,7 @@ extension Ocap_StakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen if _storage._revokedTokens != rhs_storage._revokedTokens {return false} if _storage._revokedAssets != rhs_storage._revokedAssets {return false} if _storage._slashers != rhs_storage._slashers {return false} + if _storage._nonce != rhs_storage._nonce {return false} if _storage._context != rhs_storage._context {return false} if _storage._data != rhs_storage._data {return false} return true diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto index 61ff53c8..9143f296 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto @@ -209,6 +209,9 @@ message StakeState { // Who can slash assets from this stake repeated string slashers = 11; + // Added in v1.18.222 + string nonce = 12; + StateContext context = 30; google.protobuf.Any data = 50; } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.pb.swift index 7f782d48..abbd82ff 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.pb.swift @@ -888,6 +888,8 @@ public struct Ocap_IndexedStakeState { public var slashers: [String] = [] + public var nonce: String = String() + public var data: SwiftProtobuf.Google_Protobuf_Any { get {return _data ?? SwiftProtobuf.Google_Protobuf_Any()} set {_data = newValue} @@ -1403,6 +1405,44 @@ public struct Ocap_IndexedDelegationState { fileprivate var _data: SwiftProtobuf.Google_Protobuf_Any? = nil } +#if swift(>=5.5) && canImport(_Concurrency) +extension Ocap_Direction: @unchecked Sendable {} +extension Ocap_Validity: @unchecked Sendable {} +extension Ocap_PageOrder: @unchecked Sendable {} +extension Ocap_Page: @unchecked Sendable {} +extension Ocap_TypeFilter: @unchecked Sendable {} +extension Ocap_AssetFilter: @unchecked Sendable {} +extension Ocap_FactoryFilter: @unchecked Sendable {} +extension Ocap_DelegationFilter: @unchecked Sendable {} +extension Ocap_TokenFilter: @unchecked Sendable {} +extension Ocap_StakeFilter: @unchecked Sendable {} +extension Ocap_AccountFilter: @unchecked Sendable {} +extension Ocap_TxFilter: @unchecked Sendable {} +extension Ocap_RollupFilter: @unchecked Sendable {} +extension Ocap_ValidatorFilter: @unchecked Sendable {} +extension Ocap_TimeFilter: @unchecked Sendable {} +extension Ocap_AddressFilter: @unchecked Sendable {} +extension Ocap_PageInfo: @unchecked Sendable {} +extension Ocap_TokenInfo: @unchecked Sendable {} +extension Ocap_ValidityFilter: @unchecked Sendable {} +extension Ocap_RangeFilter: @unchecked Sendable {} +extension Ocap_AccountToken: @unchecked Sendable {} +extension Ocap_ByDay: @unchecked Sendable {} +extension Ocap_ByHour: @unchecked Sendable {} +extension Ocap_IndexedTransaction: @unchecked Sendable {} +extension Ocap_IndexedAccountState: @unchecked Sendable {} +extension Ocap_IndexedAssetState: @unchecked Sendable {} +extension Ocap_IndexedBlock: @unchecked Sendable {} +extension Ocap_IndexedTokenState: @unchecked Sendable {} +extension Ocap_IndexedFactoryState: @unchecked Sendable {} +extension Ocap_IndexedStakeState: @unchecked Sendable {} +extension Ocap_IndexedRollupState: @unchecked Sendable {} +extension Ocap_IndexedRollupBlock: @unchecked Sendable {} +extension Ocap_SearchResult: @unchecked Sendable {} +extension Ocap_IndexedRollupValidator: @unchecked Sendable {} +extension Ocap_IndexedDelegationState: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "ocap" @@ -3083,6 +3123,7 @@ extension Ocap_IndexedStakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageI 11: .standard(proto: "revoked_tokens"), 12: .standard(proto: "revoked_assets"), 13: .same(proto: "slashers"), + 14: .same(proto: "nonce"), 50: .same(proto: "data"), ] @@ -3105,6 +3146,7 @@ extension Ocap_IndexedStakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageI case 11: try { try decoder.decodeRepeatedMessageField(value: &self.revokedTokens) }() case 12: try { try decoder.decodeRepeatedStringField(value: &self.revokedAssets) }() case 13: try { try decoder.decodeRepeatedStringField(value: &self.slashers) }() + case 14: try { try decoder.decodeSingularStringField(value: &self.nonce) }() case 50: try { try decoder.decodeSingularMessageField(value: &self._data) }() default: break } @@ -3155,6 +3197,9 @@ extension Ocap_IndexedStakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageI if !self.slashers.isEmpty { try visitor.visitRepeatedStringField(value: self.slashers, fieldNumber: 13) } + if !self.nonce.isEmpty { + try visitor.visitSingularStringField(value: self.nonce, fieldNumber: 14) + } try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) } }() @@ -3175,6 +3220,7 @@ extension Ocap_IndexedStakeState: SwiftProtobuf.Message, SwiftProtobuf._MessageI if lhs.revokedTokens != rhs.revokedTokens {return false} if lhs.revokedAssets != rhs.revokedAssets {return false} if lhs.slashers != rhs.slashers {return false} + if lhs.nonce != rhs.nonce {return false} if lhs._data != rhs._data {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.proto b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.proto index a68c7921..d36e33f6 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.proto +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/trace-type.proto @@ -229,6 +229,7 @@ message IndexedStakeState { repeated TokenInfo revoked_tokens = 11; repeated string revoked_assets = 12; repeated string slashers = 13; + string nonce = 14; google.protobuf.Any data = 50; } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.pb.swift index 7d0f7093..db459df5 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.pb.swift @@ -908,7 +908,7 @@ public struct Ocap_StakeTx { public var address: String = String() - /// used to create stake address = createDid(tx.sender, itx.to) + /// used to create stake address = createDid(tx.sender, itx.to, nonce) public var receiver: String = String() /// Can stake any combination of tokens + assets @@ -926,6 +926,10 @@ public struct Ocap_StakeTx { /// Who can slash assets from this stake public var slashers: [String] = [] + /// Added in v1.18.222 + /// extra nonce used to calculate stake address + public var nonce: String = String() + /// ocap won't touch this field. Only app shall handle it. public var data: SwiftProtobuf.Google_Protobuf_Any { get {return _data ?? SwiftProtobuf.Google_Protobuf_Any()} @@ -2247,6 +2251,49 @@ public struct Ocap_ItxStub { public init() {} } +#if swift(>=5.5) && canImport(_Concurrency) +extension Ocap_AccountMigrateTx: @unchecked Sendable {} +extension Ocap_DeclareTx: @unchecked Sendable {} +extension Ocap_DelegateOp: @unchecked Sendable {} +extension Ocap_DelegateTx: @unchecked Sendable {} +extension Ocap_RevokeDelegateTx: @unchecked Sendable {} +extension Ocap_UpgradeNodeTx: @unchecked Sendable {} +extension Ocap_ExchangeInfo: @unchecked Sendable {} +extension Ocap_ExchangeInfoV2: @unchecked Sendable {} +extension Ocap_ExchangeTx: @unchecked Sendable {} +extension Ocap_ExchangeV2Tx: @unchecked Sendable {} +extension Ocap_TransferTx: @unchecked Sendable {} +extension Ocap_TransferV2Tx: @unchecked Sendable {} +extension Ocap_TransferV3Tx: @unchecked Sendable {} +extension Ocap_CreateTokenTx: @unchecked Sendable {} +extension Ocap_AssetFactoryInput: @unchecked Sendable {} +extension Ocap_AcquireAssetV2Tx: @unchecked Sendable {} +extension Ocap_AcquireAssetV3Tx: @unchecked Sendable {} +extension Ocap_MintAssetTx: @unchecked Sendable {} +extension Ocap_CreateAssetTx: @unchecked Sendable {} +extension Ocap_UpdateAssetTx: @unchecked Sendable {} +extension Ocap_ConsumeAssetTx: @unchecked Sendable {} +extension Ocap_CreateFactoryTx: @unchecked Sendable {} +extension Ocap_StakeTx: @unchecked Sendable {} +extension Ocap_RevokeStakeTx: @unchecked Sendable {} +extension Ocap_ClaimStakeTx: @unchecked Sendable {} +extension Ocap_SlashStakeTx: @unchecked Sendable {} +extension Ocap_CreateRollupTx: @unchecked Sendable {} +extension Ocap_UpdateRollupTx: @unchecked Sendable {} +extension Ocap_JoinRollupTx: @unchecked Sendable {} +extension Ocap_LeaveRollupTx: @unchecked Sendable {} +extension Ocap_CreateRollupBlockTx: @unchecked Sendable {} +extension Ocap_ClaimBlockRewardTx: @unchecked Sendable {} +extension Ocap_PauseRollupTx: @unchecked Sendable {} +extension Ocap_ResumeRollupTx: @unchecked Sendable {} +extension Ocap_CloseRollupTx: @unchecked Sendable {} +extension Ocap_MigrateRollupTx: @unchecked Sendable {} +extension Ocap_DepositTokenV2Tx: @unchecked Sendable {} +extension Ocap_WithdrawTokenV2Tx: @unchecked Sendable {} +extension Ocap_ItxStub: @unchecked Sendable {} +extension Ocap_ItxStub.OneOf_Value: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "ocap" @@ -3625,6 +3672,7 @@ extension Ocap_StakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat 5: .same(proto: "message"), 6: .standard(proto: "revoke_waiting_period"), 7: .same(proto: "slashers"), + 8: .same(proto: "nonce"), 50: .same(proto: "data"), ] @@ -3641,6 +3689,7 @@ extension Ocap_StakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat case 5: try { try decoder.decodeSingularStringField(value: &self.message) }() case 6: try { try decoder.decodeSingularUInt32Field(value: &self.revokeWaitingPeriod) }() case 7: try { try decoder.decodeRepeatedStringField(value: &self.slashers) }() + case 8: try { try decoder.decodeSingularStringField(value: &self.nonce) }() case 50: try { try decoder.decodeSingularMessageField(value: &self._data) }() default: break } @@ -3673,6 +3722,9 @@ extension Ocap_StakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat if !self.slashers.isEmpty { try visitor.visitRepeatedStringField(value: self.slashers, fieldNumber: 7) } + if !self.nonce.isEmpty { + try visitor.visitSingularStringField(value: self.nonce, fieldNumber: 8) + } try { if let v = self._data { try visitor.visitSingularMessageField(value: v, fieldNumber: 50) } }() @@ -3687,6 +3739,7 @@ extension Ocap_StakeTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementat if lhs.message != rhs.message {return false} if lhs.revokeWaitingPeriod != rhs.revokeWaitingPeriod {return false} if lhs.slashers != rhs.slashers {return false} + if lhs.nonce != rhs.nonce {return false} if lhs._data != rhs._data {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.proto b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.proto index 82d3426a..098bca46 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.proto +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/tx.proto @@ -311,7 +311,7 @@ message CreateFactoryTx { message StakeTx { string address = 1; - // used to create stake address = createDid(tx.sender, itx.to) + // used to create stake address = createDid(tx.sender, itx.to, nonce) string receiver = 2; // Can stake any combination of tokens + assets @@ -329,6 +329,10 @@ message StakeTx { // Who can slash assets from this stake repeated string slashers = 7; + // Added in v1.18.222 + // extra nonce used to calculate stake address + string nonce = 8; + // ocap won't touch this field. Only app shall handle it. google.protobuf.Any data = 50; } diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/type.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/type.pb.swift index 42efd3a9..25a2738b 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/type.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/type.pb.swift @@ -1702,6 +1702,64 @@ public struct Ocap_DelegateLimit { public init() {} } +#if swift(>=5.5) && canImport(_Concurrency) +extension Ocap_BigUint: @unchecked Sendable {} +extension Ocap_BigSint: @unchecked Sendable {} +extension Ocap_TokenSymbol: @unchecked Sendable {} +extension Ocap_WalletType: @unchecked Sendable {} +extension Ocap_WalletInfo: @unchecked Sendable {} +extension Ocap_ChainInfo: @unchecked Sendable {} +extension Ocap_NodeInfo: @unchecked Sendable {} +extension Ocap_Validator: @unchecked Sendable {} +extension Ocap_ConsensusParams: @unchecked Sendable {} +extension Ocap_UpgradeTask: @unchecked Sendable {} +extension Ocap_UpgradeTasks: @unchecked Sendable {} +extension Ocap_Multisig: @unchecked Sendable {} +extension Ocap_Transaction: @unchecked Sendable {} +extension Ocap_TransactionInfo: @unchecked Sendable {} +extension Ocap_TransactionReceipt: @unchecked Sendable {} +extension Ocap_ReceiptChange: @unchecked Sendable {} +extension Ocap_TokenInput: @unchecked Sendable {} +extension Ocap_TransactionInput: @unchecked Sendable {} +extension Ocap_VariableInput: @unchecked Sendable {} +extension Ocap_DelegateConfig: @unchecked Sendable {} +extension Ocap_VaultConfig: @unchecked Sendable {} +extension Ocap_TxFeeConfig: @unchecked Sendable {} +extension Ocap_TxGasConfig: @unchecked Sendable {} +extension Ocap_TransactionConfig: @unchecked Sendable {} +extension Ocap_BlockInfo: @unchecked Sendable {} +extension Ocap_BlockInfoSimple: @unchecked Sendable {} +extension Ocap_StateContext: @unchecked Sendable {} +extension Ocap_StakeSummary: @unchecked Sendable {} +extension Ocap_UnconfirmedTxs: @unchecked Sendable {} +extension Ocap_NetInfo: @unchecked Sendable {} +extension Ocap_GeoInfo: @unchecked Sendable {} +extension Ocap_PeerInfo: @unchecked Sendable {} +extension Ocap_ValidatorsInfo: @unchecked Sendable {} +extension Ocap_ValidatorInfo: @unchecked Sendable {} +extension Ocap_ForgeToken: @unchecked Sendable {} +extension Ocap_UpgradeInfo: @unchecked Sendable {} +extension Ocap_WithdrawItem: @unchecked Sendable {} +extension Ocap_AccountConfig: @unchecked Sendable {} +extension Ocap_Evidence: @unchecked Sendable {} +extension Ocap_NFTEndpoint: @unchecked Sendable {} +extension Ocap_NFTDisplay: @unchecked Sendable {} +extension Ocap_NFTIssuer: @unchecked Sendable {} +extension Ocap_AssetFactoryHook: @unchecked Sendable {} +extension Ocap_IndexedTokenInput: @unchecked Sendable {} +extension Ocap_IndexedFactoryInput: @unchecked Sendable {} +extension Ocap_RollupValidator: @unchecked Sendable {} +extension Ocap_RollupSignature: @unchecked Sendable {} +extension Ocap_ForeignToken: @unchecked Sendable {} +extension Ocap_RevokedStake: @unchecked Sendable {} +extension Ocap_ForgeStats: @unchecked Sendable {} +extension Ocap_GasEstimate: @unchecked Sendable {} +extension Ocap_RateLimit: @unchecked Sendable {} +extension Ocap_TokenLimit: @unchecked Sendable {} +extension Ocap_AssetLimit: @unchecked Sendable {} +extension Ocap_DelegateLimit: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "ocap" diff --git a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/vendor.pb.swift b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/vendor.pb.swift index 3b86b9f3..f077ba5f 100644 --- a/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/vendor.pb.swift +++ b/ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/vendor.pb.swift @@ -466,6 +466,26 @@ public struct Vendor_RequestEndBlock { public init() {} } +#if swift(>=5.5) && canImport(_Concurrency) +extension Vendor_KVPair: @unchecked Sendable {} +extension Vendor_BlockParams: @unchecked Sendable {} +extension Vendor_EvidenceParams: @unchecked Sendable {} +extension Vendor_ValidatorParams: @unchecked Sendable {} +extension Vendor_ConsensusParams: @unchecked Sendable {} +extension Vendor_LastCommitInfo: @unchecked Sendable {} +extension Vendor_Version: @unchecked Sendable {} +extension Vendor_BlockID: @unchecked Sendable {} +extension Vendor_PartSetHeader: @unchecked Sendable {} +extension Vendor_Validator: @unchecked Sendable {} +extension Vendor_ValidatorUpdate: @unchecked Sendable {} +extension Vendor_VoteInfo: @unchecked Sendable {} +extension Vendor_PubKey: @unchecked Sendable {} +extension Vendor_Evidence: @unchecked Sendable {} +extension Vendor_Header: @unchecked Sendable {} +extension Vendor_RequestBeginBlock: @unchecked Sendable {} +extension Vendor_RequestEndBlock: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "vendor" diff --git a/CHANGELOG.md b/CHANGELOG.md index a5118d5b..16fb5786 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.11.46 (June 03, 2024) + - update proto + ## 0.11.45 (May 06, 2024) - fix CryptoSwift version diff --git a/version b/version index d22656cc..94981ecc 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.11.45 +0.11.46