Files
self/sdk/sdk-go/types.go
Nesopie 729ee76e8f Feat/aadhaar sdk (#1082)
* feat: add aadhaar support to the ts sdk

* feat: aadhaar support to go sdk

* chore: refactor

* move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041)

* Move self app store to mobile sdk (#1040)

* chore(mobile-sdk-alpha): remove unused tslib dependency (#1053)

* remove tslib -- seems unused

* remove deps accidentally added to root

* build file

* remove unused imports (#1055)

* fix: sha256 signed attr tests (#1058)

* fix mock screen launch (#1059)

* Hotfix: Belgium ID cards (#1061)

* feat: parse belgium TD1 mrz android

* feat: Parse Belgium TD1 MRZ IOS

* fix: OFAC trees not found (#1060)

* fix: relax OFAC tree response validation

* test: cover OFAC tree edge cases

* fix stateless

* revert and fix types

* fix tests

* [SELF-723] feat: add structured NFC and Proof logging (#1048)

* feat: add structured NFC logging

* fix ci

* Fix: add deps

* logging fixes. use breadcrumbs

* fix android build

* update SeverityLevel

* [SELF-705] feat: add proof event logging (#1057)

* feat: add proof event logging

* refactor: unify sentry event logging

* fix types

* fix mock

* simplify

* code rabbit feedback

* fix tests

---------

Co-authored-by: seshanthS <seshanth@protonmail.com>

* skip on dev (#1063)

* don't get fancy just disable (#1064)

* saw it building so gonna try (#1065)

* chore: bump v2.6.5 rd2 (#1067)

* commit wip version bump

* remove from building

* chore: update tooling dependencies (#1069)

* chore: update tooling dependencies

* chore: align react typings and node types

* update lock

* chore: minor fixes across monorepo (#1068)

* small fixes

* fixes

* fix gesture handler error

* ci fixes

* fix yarn build; add workflow ci (#1075)

* add new workspace ci

* disable package version check for now

* build before checks

* format

* fix in future pr

* feat: add functions for disclosing aadhaar attributes (#1033)

* feat: add functions for disclosing aadhaar attributes

* format

* chore: update monorepo artifacts (#1079)

* remove unneeded artifacts, skip building circuits

* update md files

* chore: update hub contract address

* format

* fix: add aadhaar in AllIds

* chore: bump to v1.1.0-beta

---------

Co-authored-by: vishal <vishalkoolkarni0045@gmail.com>
Co-authored-by: Leszek Stachowski <leszek.stachowski@self.xyz>
Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: seshanthS <seshanth@protonmail.com>
2025-09-17 16:43:35 +05:30

68 lines
2.4 KiB
Go

package self
import (
"github.com/selfxyz/self/sdk/sdk-go/common"
)
// AttestationId represents the type for attestation identifiers
type AttestationId int
// VcAndDiscloseProof represents the zero-knowledge proof structure
type VcAndDiscloseProof struct {
A [2]string `json:"a"`
B [2][2]string `json:"b"`
C [2]string `json:"c"`
}
// VerificationConfig represents the configuration for verification
type VerificationConfig struct {
MinimumAge int `json:"minimumAge,omitempty"`
ExcludedCountries []common.Country3LetterCode `json:"excludedCountries,omitempty"`
Ofac bool `json:"ofac,omitempty"`
}
// IsValidDetails contains the validation results
type IsValidDetails struct {
IsValid bool `json:"isValid"`
IsMinimumAgeValid bool `json:"isMinimumAgeValid"`
IsOfacValid bool `json:"isOfacValid"`
}
// UserData contains user-specific data
type UserData struct {
UserIdentifier string `json:"userIdentifier"`
UserDefinedData string `json:"userDefinedData"`
}
// GenericDiscloseOutput contains the disclosed information from verification
type GenericDiscloseOutput struct {
Nullifier string `json:"nullifier"`
ForbiddenCountriesListPacked []string `json:"forbiddenCountriesListPacked"`
IssuingState string `json:"issuingState"`
Name string `json:"name"`
IdNumber string `json:"idNumber"`
Nationality string `json:"nationality"`
DateOfBirth string `json:"dateOfBirth"`
Gender string `json:"gender"`
ExpiryDate string `json:"expiryDate"`
MinimumAge string `json:"minimumAge"`
Ofac []bool `json:"ofac"`
}
// VerificationResult represents the complete result of a verification
type VerificationResult struct {
AttestationId AttestationId `json:"attestationId"`
IsValidDetails IsValidDetails `json:"isValidDetails"`
ForbiddenCountriesList []string `json:"forbiddenCountriesList"`
DiscloseOutput GenericDiscloseOutput `json:"discloseOutput"`
UserData UserData `json:"userData"`
}
// UserIDType represents the type of user identifier
type UserIDType string
const (
UserIDTypeHex UserIDType = "hex"
UserIDTypeUUID UserIDType = "uuid"
)