Skip to content

AttestationGatedDisclosure

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / AttestationGatedDisclosure

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:10999

new AttestationGatedDisclosure(config): AttestationGatedDisclosure

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:11008

Create a new attestation-gated disclosure manager

AttestationGatedConfig

Configuration options

AttestationGatedDisclosure

deriveViewingKeyForAuditor(attestation, scope?): Promise<ViewingKeyDerivationResult>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:11028

Derive a viewing key for a verified auditor

RangeSASAttestation

The auditor’s Range SAS attestation

ViewingKeyScope

Optional scope restrictions for the viewing key

Promise<ViewingKeyDerivationResult>

Derivation result with viewing key if granted

const result = await disclosure.deriveViewingKeyForAuditor(attestation, {
startTime: Date.now() / 1000 - 30 * 24 * 60 * 60, // Last 30 days
endTime: Date.now() / 1000,
})
if (result.granted) {
// Share result.viewingKey with auditor
}

verifyAttestation(attestation): Promise<AttestationVerificationResult>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:11035

Verify a Range SAS attestation

RangeSASAttestation

The attestation to verify

Promise<AttestationVerificationResult>

Verification result


revokeViewingKey(attestation): boolean

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:11042

Revoke a previously derived viewing key

RangeSASAttestation

The attestation whose key should be revoked

boolean

Whether revocation was successful


hasViewingKey(attestation): boolean

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:11049

Check if a viewing key has been derived for an attestation

RangeSASAttestation

The attestation to check

boolean

Whether a key exists


getCacheSize(): number

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:11055

Get the current cache size

number

Number of cached viewing keys


clearCache(): void

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:11059

Clear all cached viewing keys

void