-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ac/payloads_to_sign_for_applying_shield_abw-…
…4012
- Loading branch information
Showing
122 changed files
with
1,197 additions
and
1,158 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 16 additions & 16 deletions
32
...s/Sargon/Extensions/Methods/Profile/Factor/FactorSourceIDFromAddress+Wrap+Functions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
extension FactorSourceIDFromAddress { | ||
public func toString() -> String { | ||
factorSourceIdFromAddressToString(factorSourceId: self) | ||
} | ||
|
||
public init(jsonData: some DataProtocol) throws { | ||
self = try newFactorSourceIDFromAddressFromJsonBytes(jsonBytes: Data(jsonData)) | ||
} | ||
|
||
public func jsonData() -> Data { | ||
factorSourceIDFromAddressToJsonBytes(factorSourceIDFromAddress: self) | ||
} | ||
} | ||
// import Foundation | ||
// import SargonUniFFI | ||
// | ||
// extension FactorSourceIDFromAddress { | ||
// public func toString() -> String { | ||
// factorSourceIdFromAddressToString(factorSourceId: self) | ||
// } | ||
// | ||
// public init(jsonData: some DataProtocol) throws { | ||
// self = try newFactorSourceIDFromAddressFromJsonBytes(jsonBytes: Data(jsonData)) | ||
// } | ||
// | ||
// public func jsonData() -> Data { | ||
// factorSourceIDFromAddressToJsonBytes(factorSourceIDFromAddress: self) | ||
// } | ||
// } |
36 changes: 18 additions & 18 deletions
36
...rgon/Extensions/Methods/Profile/Factor/SecurityQuestionsFactorSource+Wrap+Functions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
extension SecurityQuestionsNotProductionReadyFactorSource { | ||
public init( | ||
mnemonic: Mnemonic, | ||
questionsAndAnswers: [SecurityNotProductionReadyQuestionAndAnswer] | ||
) throws { | ||
self = try newSecurityQuestionsFactorSourceByEncryptingMnemonic( | ||
mnemonic: mnemonic, | ||
with: questionsAndAnswers | ||
) | ||
} | ||
|
||
public func decrypt(questionsAndAnswers: [SecurityNotProductionReadyQuestionAndAnswer]) throws -> Mnemonic { | ||
try securityQuestionsFactorSourceDecrypt(factorSource: self, with: questionsAndAnswers) | ||
} | ||
} | ||
// import Foundation | ||
// import SargonUniFFI | ||
// | ||
// extension SecurityQuestionsNotProductionReadyFactorSource { | ||
// public init( | ||
// mnemonic: Mnemonic, | ||
// questionsAndAnswers: [SecurityNotProductionReadyQuestionAndAnswer] | ||
// ) throws { | ||
// self = try newSecurityQuestionsFactorSourceByEncryptingMnemonic( | ||
// mnemonic: mnemonic, | ||
// with: questionsAndAnswers | ||
// ) | ||
// } | ||
// | ||
// public func decrypt(questionsAndAnswers: [SecurityNotProductionReadyQuestionAndAnswer]) throws -> Mnemonic { | ||
// try securityQuestionsFactorSourceDecrypt(factorSource: self, with: questionsAndAnswers) | ||
// } | ||
// } |
28 changes: 14 additions & 14 deletions
28
.../Sargon/Extensions/Methods/Profile/Factor/TrustedContactFactorSource+Wrap+Functions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
extension TrustedContactFactorSource { | ||
public init( | ||
accountAddress: AccountAddress, | ||
contact: TrustedContactFactorSourceContact | ||
) { | ||
self = newTrustedContactFactorSourceFromAddressAndContact( | ||
accountAddress: accountAddress, | ||
contact: contact | ||
) | ||
} | ||
} | ||
// import Foundation | ||
// import SargonUniFFI | ||
// | ||
// extension TrustedContactFactorSource { | ||
// public init( | ||
// accountAddress: AccountAddress, | ||
// contact: TrustedContactFactorSourceContact | ||
// ) { | ||
// self = newTrustedContactFactorSourceFromAddressAndContact( | ||
// accountAddress: accountAddress, | ||
// contact: contact | ||
// ) | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...dixConnect/WalletInteraction/WalletToDappInteractionProofOfOwnership+Wrap+Functions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
extension WalletToDappInteractionProofOfOwnership { | ||
public init(intentSignatureOfOwner: IntentSignatureOfOwner) { | ||
self = newWalletToDappInteractionProofOfOwnershipFromIntentSignatureOfOwner(intentSignatureOfOwner: intentSignatureOfOwner) | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
apple/Sources/Sargon/Extensions/SampleValues/Prelude/EmailAddress+SampleValues.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
#if DEBUG | ||
extension EmailAddress { | ||
public static let sample: Self = newEmailAddressSample() | ||
public static let sampleOther: Self = newEmailAddressSampleOther() | ||
} | ||
#endif // DEBUG |
18 changes: 9 additions & 9 deletions
18
...ons/SampleValues/Profile/Factor/FactorSource/FactorSourceIDFromAddress+SampleValues.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
#if DEBUG | ||
extension FactorSourceIDFromAddress { | ||
public static let sample: Self = newFactorSourceIdFromAddressSample() | ||
public static let sampleOther: Self = newFactorSourceIdFromAddressSampleOther() | ||
} | ||
#endif // DEBUG | ||
// import Foundation | ||
// import SargonUniFFI | ||
// | ||
// #if DEBUG | ||
// extension FactorSourceIDFromAddress { | ||
// public static let sample: Self = newFactorSourceIdFromAddressSample() | ||
// public static let sampleOther: Self = newFactorSourceIdFromAddressSampleOther() | ||
// } | ||
// #endif // DEBUG |
20 changes: 10 additions & 10 deletions
20
...SampleValues/Profile/Factor/FactorSource/SecurityQuestionsFactorSource+SampleValues.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
#if DEBUG | ||
extension SecurityQuestionsNotProductionReadyFactorSource { | ||
public static let sample: Self = newSecurityQuestionsFactorSourceSample() | ||
public static let sampleOther: Self = newSecurityQuestionsFactorSourceSampleOther() | ||
} | ||
|
||
#endif // DEBUG | ||
// import Foundation | ||
// import SargonUniFFI | ||
// | ||
// #if DEBUG | ||
// extension SecurityQuestionsNotProductionReadyFactorSource { | ||
// public static let sample: Self = newSecurityQuestionsFactorSourceSample() | ||
// public static let sampleOther: Self = newSecurityQuestionsFactorSourceSampleOther() | ||
// } | ||
// | ||
// #endif // DEBUG |
18 changes: 9 additions & 9 deletions
18
...ns/SampleValues/Profile/Factor/FactorSource/TrustedContactFactorSource+SampleValues.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
#if DEBUG | ||
extension TrustedContactFactorSource { | ||
public static let sample: Self = newTrustedContactFactorSourceSample() | ||
public static let sampleOther: Self = newTrustedContactFactorSourceSampleOther() | ||
} | ||
#endif // DEBUG | ||
// import Foundation | ||
// import SargonUniFFI | ||
// | ||
// #if DEBUG | ||
// extension TrustedContactFactorSource { | ||
// public static let sample: Self = newTrustedContactFactorSourceSample() | ||
// public static let sampleOther: Self = newTrustedContactFactorSourceSampleOther() | ||
// } | ||
// #endif // DEBUG |
29 changes: 11 additions & 18 deletions
29
...leValues/Profile/Factor/FactorSource/TrustedContactFactorSourceContact+SampleValues.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
#if DEBUG | ||
extension EmailAddress { | ||
public static let sample: Self = newEmailAddressSample() | ||
public static let sampleOther: Self = newEmailAddressSampleOther() | ||
} | ||
#endif // DEBUG | ||
|
||
#if DEBUG | ||
extension TrustedContactFactorSourceContact { | ||
// FIXME: replace with Sargon ones | ||
public static let sample: Self = newTrustedContactFactorSourceContactSample() | ||
public static let sampleOther: Self = newTrustedContactFactorSourceContactSampleOther() | ||
} | ||
|
||
#endif // DEBUG | ||
// import Foundation | ||
// import SargonUniFFI | ||
// | ||
// | ||
// #if DEBUG | ||
// extension TrustedContactFactorSourceContact { | ||
// public static let sample: Self = newTrustedContactFactorSourceContactSample() | ||
// public static let sampleOther: Self = newTrustedContactFactorSourceContactSampleOther() | ||
// } | ||
// | ||
// #endif // DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 22 additions & 22 deletions
44
...ensions/Swiftified/Profile/Factor/FactorSource/FactorSourceIDFromAddress+Swiftified.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import Foundation | ||
import SargonUniFFI | ||
|
||
public typealias FactorSourceIDFromAddress = FactorSourceIdFromAddress | ||
|
||
// MARK: - FactorSourceIDFromAddress + SargonModel | ||
extension FactorSourceIDFromAddress: SargonModel {} | ||
|
||
// MARK: - FactorSourceIDFromAddress + SargonObjectCodable | ||
extension FactorSourceIDFromAddress: SargonObjectCodable {} | ||
|
||
// MARK: - FactorSourceIDFromAddress + FactorSourceIDSpecificProtocol | ||
extension FactorSourceIDFromAddress: FactorSourceIDSpecificProtocol { | ||
public var asGeneral: FactorSourceID { | ||
.address(value: self) | ||
} | ||
|
||
public static func extract(from someFactorSourceID: some FactorSourceIDProtocol) -> Self? { | ||
guard case let .address(id) = someFactorSourceID.asGeneral else { return nil } | ||
return id | ||
} | ||
} | ||
// import Foundation | ||
// import SargonUniFFI | ||
// | ||
// public typealias FactorSourceIDFromAddress = FactorSourceIdFromAddress | ||
// | ||
//// MARK: - FactorSourceIDFromAddress + SargonModel | ||
// extension FactorSourceIDFromAddress: SargonModel {} | ||
// | ||
//// MARK: - FactorSourceIDFromAddress + SargonObjectCodable | ||
// extension FactorSourceIDFromAddress: SargonObjectCodable {} | ||
// | ||
//// MARK: - FactorSourceIDFromAddress + FactorSourceIDSpecificProtocol | ||
// extension FactorSourceIDFromAddress: FactorSourceIDSpecificProtocol { | ||
// public var asGeneral: FactorSourceID { | ||
// .address(value: self) | ||
// } | ||
// | ||
// public static func extract(from someFactorSourceID: some FactorSourceIDProtocol) -> Self? { | ||
// guard case let .address(id) = someFactorSourceID.asGeneral else { return nil } | ||
// return id | ||
// } | ||
// } |
Oops, something went wrong.