Skip to content

AttestationGatedDisclosure

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / AttestationGatedDisclosure

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:11072

new AttestationGatedDisclosure(config): AttestationGatedDisclosure

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:11081

Create a new attestation-gated disclosure manager

AttestationGatedConfig

Configuration options

AttestationGatedDisclosure

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

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:11101

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-GLbkPPho.d.ts:11108

Verify a Range SAS attestation

RangeSASAttestation

The attestation to verify

Promise<AttestationVerificationResult>

Verification result


revokeViewingKey(attestation): boolean

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:11115

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-GLbkPPho.d.ts:11122

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-GLbkPPho.d.ts:11128

Get the current cache size

number

Number of cached viewing keys


clearCache(): void

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:11132

Clear all cached viewing keys

void