Skip to content

Commit

Permalink
Upgrade github.com/iden3/go-iden3-core to v2 and bump self version to…
Browse files Browse the repository at this point in the history
… v2 (#62)

* Upgrade github.com/iden3/go-iden3-core to v2 and bump self version to v2.

* Upgrade go-iden3-core to latest version

* Modify NewPathFromDocument function to support nested fields

* Pass MerklizeOption[s] to MerklizeJSONLD

* Add merklizer options to ParseClaim method

* add Iden3StateInfo to resolvement info

* Sync with did resolver driver (#72)

* add stateContractAddress field to Vm

* Make FieldPathFromContext method for Options (#74)

* Slot serialization (#75)

* Remove ParseSlots public method. Should use ParseClaim and get slots from there.

* jsonSchemaBytes parameter is non-neded in ParseClaim, we get @serialization data from @context of the credential.

* find a credential type not only looking at crentialSubject.@type, but also looking at top level @type field

* drop credentialType parameter from ParseClaim method, it should be calculated from VerifiableCredential document

* make struct ParsedSlots private

* Rewrite GetFieldSlotIndex function to work with @serialization attribute in json-ld schema

* Upgrade go version

* Rename @serialization to iden3_serialization to prevent safe mode warning about reserved keys

* return error is MerklizedRootPosition is set for non-merklized claims

* Move DocumentLoader to loaders module* Update README

* Negative and big integers (#76)

* Handle negative and big numbers in merklizer

---------

Co-authored-by: vmidyllic <[email protected]>
Co-authored-by: Ilya <[email protected]>
  • Loading branch information
3 people authored Aug 21, 2023
1 parent 084196a commit 72eb16c
Show file tree
Hide file tree
Showing 31 changed files with 1,277 additions and 978 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.20.1
go-version: 1.21.0
- uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2
version: v1.52.2
5 changes: 3 additions & 2 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
matrix:
containers:
- 1.18.10-bullseye
- 1.19.6-bullseye
- 1.20.1-bullseye
- 1.19.12-bullseye
- 1.20.7-bullseye
- 1.21.0-bullseye
runs-on: ubuntu-latest
container: golang:${{ matrix.containers }}
steps:
Expand Down
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,8 @@ Repository of claim schema vocabulary: https://github.com/iden3/claim-schema-voc

The library includes three main components of any processor:

1. Schema Loaders
2. Data Validators
3. Data Parsers

**Schema loader's** purpose is to load schema (JSON / JSON-LD) from a given address.

Implemented loaders:

- [x] HTTP loaders
- [x] IPFS loader
1. Data Validators
2. Data Parsers

**Schemas:**

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/iden3/go-schema-processor
module github.com/iden3/go-schema-processor/v2

go 1.18

require (
github.com/iden3/go-iden3-core v1.0.2
github.com/iden3/go-iden3-core/v2 v2.0.0-20230519124718-42b31ff46f37
github.com/iden3/go-iden3-crypto v0.0.15
github.com/iden3/go-merkletree-sql/v2 v2.0.4
github.com/ipfs/go-ipfs-api v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/iden3/go-iden3-core v1.0.2 h1:HwNDFeqcUv4ybZj5tH+58JKWKarn/qqBpNCqTLxGP0Y=
github.com/iden3/go-iden3-core v1.0.2/go.mod h1:X4PjlJG8OsEQEsSbzzYqqAk2olYGZ2nuGqiUPyEYjOo=
github.com/iden3/go-iden3-core/v2 v2.0.0-20230519124718-42b31ff46f37 h1:JPH0tMr8geJO0vLhwTZkopHqm35ARCjCIKNab9rc6QI=
github.com/iden3/go-iden3-core/v2 v2.0.0-20230519124718-42b31ff46f37/go.mod h1:L9PxhWPvoS9qTb3inEkZBm1RpjHBt+VTwvxssdzbAdw=
github.com/iden3/go-iden3-crypto v0.0.15 h1:4MJYlrot1l31Fzlo2sF56u7EVFeHHJkxGXXZCtESgK4=
github.com/iden3/go-iden3-crypto v0.0.15/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBeOT/3UEhXsEsP3E=
github.com/iden3/go-merkletree-sql/v2 v2.0.4 h1:Dp089P3YNX1BE8+T1tKQHWTtnk84Y/Kr7ZAGTqwscoY=
Expand Down
Loading

0 comments on commit 72eb16c

Please sign in to comment.