fetchAttestation()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / fetchAttestation
Function: fetchAttestation()
Section titled “Function: fetchAttestation()”fetchAttestation(
uid,options?):Promise<RangeSASAttestation|null>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:11184
Fetch attestation from Range API
Retrieves a full attestation record by UID from Range’s attestation API. Supports both the REST API and on-chain queries.
Implementation Status
Section titled “Implementation Status”⚠️ PARTIAL IMPLEMENTATION: Basic HTTP fetch implemented. Full implementation requires:
- On-chain attestation queries via SAS program
- Websocket subscription for attestation updates
- Caching layer for performance
Parameters
Section titled “Parameters”string
Attestation UID to fetch
options?
Section titled “options?”Fetch options
apiEndpoint?
Section titled “apiEndpoint?”string
Range API endpoint
apiKey?
Section titled “apiKey?”string
API key for authenticated requests
timeout?
Section titled “timeout?”number
Request timeout in milliseconds
onChain?
Section titled “onChain?”boolean
Whether to query on-chain instead of API
Returns
Section titled “Returns”Promise<RangeSASAttestation | null>
The attestation if found, null otherwise
Example
Section titled “Example”const attestation = await fetchAttestation('sas_abc123', { apiEndpoint: 'https://api.range.org/v1', apiKey: 'your-api-key',})
if (attestation) { console.log('Found attestation:', attestation.schema)}- https://github.com/sip-protocol/sip-protocol/issues/661 for implementation tracking
- https://attest.solana.com/docs for SAS documentation