Electric-Coin-Company / MnemonicSwift

MnemonicSwift provides a Swift implementation of BIP39 using CriptoKit
Other
21 stars 9 forks source link

SwiftPM Support #10

Closed adamstener closed 2 years ago

adamstener commented 2 years ago

Closes #3

This PR adds SwiftPM support to MnemonicSwift.

Some important changes needed to happen to make this work.

Namely, we had to increase to swift 5.3 in order to allow SPM to copy resources into the testing bundle.

CryptoKit was also not supporting SPM so this PR moves us to Apples swift-crypto or "Crypto" instead of the previous CryptoKit.

All tests are passing, whether you open the project or the package, and I've cleaned up some of the various formatting issues. Happy to squash after approval if needed, I kept these as separate commits to more easily review what changed to obtain SPM support.

pacu commented 2 years ago

LGTM, deferring to @defuse to take a look from Sec PoV

daira commented 2 years ago

Swift-Crypto is Apache 2.0-licensed only. MnemonicSwift is MIT-licensed. Apache 2.0 is a permissive license and section 4 allows relicensing as long as the conditions of the Apache 2.0 license are complied with. My reading is that to be sure to have complied with clause 4 d), you should copy NOTICE.txt from Swift-Crypto into NOTICE.SwiftCrypto.txt in this repo.

I would also recommend to consider dual-licensing this repo as "MIT or Apache-2.0".

adamstener commented 2 years ago

Swift-Crypto is Apache 2.0-licensed only. MnemonicSwift is MIT-licensed. Apache 2.0 is a permissive license and section 4 allows relicensing as long as the conditions of the Apache 2.0 license are complied with. My reading is that to be sure to have complied with clause 4 d), you should copy NOTICE.txt from Swift-Crypto into NOTICE.SwiftCrypto.txt in this repo.

I would also recommend to consider dual-licensing this repo as "MIT or Apache-2.0".

@daira I believe this is done, can you double check that I've addressed your concerns properly though? Thanks!

pacu commented 2 years ago

Approved. Just waiting on licensing changes to be reviewed by @daira

pacu commented 2 years ago

Opened a new issue in order to not block this PR https://github.com/zcash-hackworks/MnemonicSwift/issues/12