From 2c17268a79d5bab6ab8f861fcd9b955803809f08 Mon Sep 17 00:00:00 2001 From: x1m3 Date: Tue, 5 Nov 2024 10:11:41 +0100 Subject: [PATCH] chore: suggestion accepted. States and Signals to be in singular --- authV2.go | 4 ++-- circuits.go | 12 ++++++------ credentialAtomicQueryMTPV2OnChain.go | 4 ++-- credentialAtomicQuerySigV2OnChain.go | 4 ++-- credentialAtomicQueryV3OnChain.go | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/authV2.go b/authV2.go index a3e87c2..d36bc7e 100644 --- a/authV2.go +++ b/authV2.go @@ -144,8 +144,8 @@ type AuthV2PubSignals struct { func (ao *AuthV2PubSignals) GetStatesInfo() StatesInfo { return StatesInfo{ - States: []States{}, - Gists: []Gists{ + States: []State{}, + Gists: []Gist{ { ID: ao.UserID, Root: ao.GISTRoot, diff --git a/circuits.go b/circuits.go index 5bc3c1b..488d447 100644 --- a/circuits.go +++ b/circuits.go @@ -205,18 +205,18 @@ type StateInfoPubSignals interface { // StatesInfo struct. A collection of states and gists type StatesInfo struct { - States []States - Gists []Gists + States []State + Gists []Gist } -// States information -type States struct { +// State information +type State struct { ID *core.ID State *merkletree.Hash } -// Gists information -type Gists struct { +// Gist information +type Gist struct { ID *core.ID Root *merkletree.Hash } diff --git a/credentialAtomicQueryMTPV2OnChain.go b/credentialAtomicQueryMTPV2OnChain.go index a00ea63..5e74c8a 100644 --- a/credentialAtomicQueryMTPV2OnChain.go +++ b/credentialAtomicQueryMTPV2OnChain.go @@ -269,7 +269,7 @@ type AtomicQueryMTPV2OnChainPubSignals struct { func (ao *AtomicQueryMTPV2OnChainPubSignals) GetStatesInfo() StatesInfo { return StatesInfo{ - States: []States{ + States: []State{ { ID: ao.IssuerID, State: ao.IssuerClaimIdenState, @@ -279,7 +279,7 @@ func (ao *AtomicQueryMTPV2OnChainPubSignals) GetStatesInfo() StatesInfo { State: ao.IssuerClaimNonRevState, }, }, - Gists: []Gists{ + Gists: []Gist{ { ID: ao.UserID, Root: ao.GlobalRoot, diff --git a/credentialAtomicQuerySigV2OnChain.go b/credentialAtomicQuerySigV2OnChain.go index c23a6e9..a8e53af 100644 --- a/credentialAtomicQuerySigV2OnChain.go +++ b/credentialAtomicQuerySigV2OnChain.go @@ -312,7 +312,7 @@ type AtomicQuerySigV2OnChainPubSignals struct { func (ao *AtomicQuerySigV2OnChainPubSignals) GetStatesInfo() StatesInfo { return StatesInfo{ - States: []States{ + States: []State{ { ID: ao.IssuerID, State: ao.IssuerAuthState, @@ -322,7 +322,7 @@ func (ao *AtomicQuerySigV2OnChainPubSignals) GetStatesInfo() StatesInfo { State: ao.IssuerClaimNonRevState, }, }, - Gists: []Gists{ + Gists: []Gist{ { ID: ao.UserID, Root: ao.GlobalRoot, diff --git a/credentialAtomicQueryV3OnChain.go b/credentialAtomicQueryV3OnChain.go index dbecc1e..8ad3bb2 100644 --- a/credentialAtomicQueryV3OnChain.go +++ b/credentialAtomicQueryV3OnChain.go @@ -466,7 +466,7 @@ type AtomicQueryV3OnChainPubSignals struct { func (ao *AtomicQueryV3OnChainPubSignals) GetStatesInfo() StatesInfo { return StatesInfo{ - States: []States{ + States: []State{ { ID: ao.IssuerID, State: ao.IssuerState, @@ -476,7 +476,7 @@ func (ao *AtomicQueryV3OnChainPubSignals) GetStatesInfo() StatesInfo { State: ao.IssuerClaimNonRevState, }, }, - Gists: []Gists{ + Gists: []Gist{ { ID: ao.UserID, Root: ao.GlobalRoot,