Skip to content

Commit

Permalink
chore: suggestion accepted. States and Signals to be in singular
Browse files Browse the repository at this point in the history
  • Loading branch information
x1m3 committed Nov 5, 2024
1 parent 0cc9524 commit 2c17268
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions authV2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 6 additions & 6 deletions circuits.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions credentialAtomicQueryMTPV2OnChain.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ type AtomicQueryMTPV2OnChainPubSignals struct {

func (ao *AtomicQueryMTPV2OnChainPubSignals) GetStatesInfo() StatesInfo {
return StatesInfo{
States: []States{
States: []State{
{
ID: ao.IssuerID,
State: ao.IssuerClaimIdenState,
Expand All @@ -279,7 +279,7 @@ func (ao *AtomicQueryMTPV2OnChainPubSignals) GetStatesInfo() StatesInfo {
State: ao.IssuerClaimNonRevState,
},
},
Gists: []Gists{
Gists: []Gist{
{
ID: ao.UserID,
Root: ao.GlobalRoot,
Expand Down
4 changes: 2 additions & 2 deletions credentialAtomicQuerySigV2OnChain.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ type AtomicQuerySigV2OnChainPubSignals struct {

func (ao *AtomicQuerySigV2OnChainPubSignals) GetStatesInfo() StatesInfo {
return StatesInfo{
States: []States{
States: []State{
{
ID: ao.IssuerID,
State: ao.IssuerAuthState,
Expand All @@ -322,7 +322,7 @@ func (ao *AtomicQuerySigV2OnChainPubSignals) GetStatesInfo() StatesInfo {
State: ao.IssuerClaimNonRevState,
},
},
Gists: []Gists{
Gists: []Gist{
{
ID: ao.UserID,
Root: ao.GlobalRoot,
Expand Down
4 changes: 2 additions & 2 deletions credentialAtomicQueryV3OnChain.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ type AtomicQueryV3OnChainPubSignals struct {

func (ao *AtomicQueryV3OnChainPubSignals) GetStatesInfo() StatesInfo {
return StatesInfo{
States: []States{
States: []State{
{
ID: ao.IssuerID,
State: ao.IssuerState,
Expand All @@ -476,7 +476,7 @@ func (ao *AtomicQueryV3OnChainPubSignals) GetStatesInfo() StatesInfo {
State: ao.IssuerClaimNonRevState,
},
},
Gists: []Gists{
Gists: []Gist{
{
ID: ao.UserID,
Root: ao.GlobalRoot,
Expand Down

0 comments on commit 2c17268

Please sign in to comment.