Logo

Solana Attestation Service

A public good program for associating offchain data with onchain accounts

Teams using SAS

Solana ID
Sumsub
Honeycomb Protocol
Trusta Labs
Civic
Wecan
PolyFlow
Solid Labs
Range
RNS
Roam

How does the service work?

Read More
Issuer

Issuer

Creates attestation schemas and issues attestations for users

SAS Program

SAS Program

Used to issue, verify, and manage attestations

Holder

Holder

Receives the attestation (push or pull), stores reference in their wallet

Verifier

Verifier

Requests presentation of attestations; Verifies and provides identity based workflows

Use Cases

View More

How to implement

More in docs
    // Create Attestation
    let attestation_data = TestData {
        name: "attest".to_string(),
        location: 11,
    };
    let clock: Clock = ctx.banks_client.get_sysvar().await.unwrap();
    let expiry: i64 = clock.unix_timestamp + 60;
    let mut serialized_attestation_data = Vec::new();
    attestation_data
        .serialize(&mut serialized_attestation_data)
        .unwrap();
    let nonce = Pubkey::new_unique();
    let attestation_pda = Pubkey::find_program_address(
        &[
            b"attestation",
            &credential.to_bytes(),
            &schema.to_bytes(),
            &nonce.to_bytes(),
        ],
        &solana_attestation_service_client::programs::SOLANA_ATTESTATION_SERVICE_ID,
    )
    .0;
    let create_attestation_ix = CreateAttestationBuilder::new()
        .payer(ctx.payer.pubkey())
        .authority(authority.pubkey())
        .credential(credential)
        .schema(schema)
        .attestation(attestation_pda)
        .system_program(system_program::ID)
        .data(serialized_attestation_data.clone())
        .expiry(expiry)
        .nonce(nonce)
        .instruction();

Learn with guides

View more

Start building on SAS today

A public good program for associating offchain data with onchain accounts