Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update proto #123

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions ArcBlockSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'

Expand Down
13 changes: 13 additions & 0 deletions ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/enum.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
65 changes: 65 additions & 0 deletions ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/rpc.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
29 changes: 29 additions & 0 deletions ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"),
]
Expand All @@ -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

Expand All @@ -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
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
} }()
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ArcBlockSDK/ABSDKCoreKit/ABSDKWalletKit/protobuf/state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"),
]

Expand All @@ -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
}
Expand Down Expand Up @@ -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)
} }()
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading
Loading