Skip to content

Commit e1aec09

Browse files
authored
ZKP library (#232)
* ZKP library * Updating lint configs * Ignore submodules * Updating lefthook * Updating Bitrise * Updating CI
1 parent 8b5ff8d commit e1aec09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3646
-2289
lines changed

.swiftformat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
# file options
3737
--swiftversion 5
3838
--exclude .build
39+
--exclude Submodules
40+
--exclude Sources/**/Digest.swift
41+
--exclude Sources/**/PrettyBytes.swift
42+
--exclude Sources/**/RNG_boring.swift
43+
--exclude Sources/**/SecureBytes.swift
44+
--exclude Sources/**/Signature.swift
3945

4046
# rules
4147
# --disable elseOnSameLine,semicolons

.swiftlint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ included: # paths to include during linting. `--path` is ignored if present.
132132
- Sources
133133
- Tests
134134
excluded: # paths to ignore during linting. Takes precedence over `included`.
135-
- Sources/secp256k1/Digest.swift
136-
- Sources/secp256k1/PrettyBytes.swift
137-
- Sources/secp256k1/RNG_boring.swift
138-
- Sources/secp256k1/SecureBytes.swift
139-
- Sources/secp256k1/Signature.swift
135+
- Sources/**/Digest.swift
136+
- Sources/**/PrettyBytes.swift
137+
- Sources/**/RNG_boring.swift
138+
- Sources/**/SecureBytes.swift
139+
- Sources/**/Signature.swift
140140
analyzer_rules: # Rules run by `swiftlint analyze`
141141
- explicit_self
142142

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ ADD . /LinuxTests
88
WORKDIR /LinuxTests
99

1010
# Execute Linux test suite
11-
RUN swift test
11+
RUN swift test && swift build --target zkp --use-integrated-swift-driver

Package.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ let package = Package(
2525
targets: [
2626
"secp256k1"
2727
]
28+
),
29+
.library(
30+
name: "zkp",
31+
targets: [
32+
"zkp"
33+
]
2834
)
2935
],
3036
dependencies: dependencies,
@@ -35,6 +41,12 @@ let package = Package(
3541
"secp256k1_bindings"
3642
]
3743
),
44+
.target(
45+
name: "zkp",
46+
dependencies: [
47+
"secp256k1_zkp_bindings"
48+
]
49+
),
3850
.target(
3951
name: "secp256k1_bindings",
4052
cSettings: [
@@ -81,6 +93,13 @@ let package = Package(
8193
"secp256k1"
8294
]
8395
)
96+
// Breaks CI
97+
// .testTarget(
98+
// name: "zkpTests",
99+
// dependencies: [
100+
// "zkp"
101+
// ]
102+
// )
84103
],
85104
swiftLanguageVersions: [.v5],
86105
cLanguageStandard: .c89

Sources/secp256k1/Asymmetric.swift

Lines changed: 0 additions & 142 deletions
This file was deleted.

Sources/secp256k1/Asymmetric.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../zkp/Asymmetric.swift

Sources/secp256k1/DH.swift

Lines changed: 0 additions & 81 deletions
This file was deleted.

Sources/secp256k1/DH.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../zkp/DH.swift

0 commit comments

Comments
 (0)