Skip to main content

Installation

Contract Addresses


StellarAttestationClient

Main client for interacting with AttestProtocol on Stellar.

Core Methods

createSchema

Register a new schema on-chain.
Returns: Transaction result with schema UID

attest

Create a new attestation.
Returns: Transaction result with attestation UID

revoke

Revoke an existing attestation.
Returns: Transaction result

getSchema

Retrieve a schema by UID from the blockchain.
Returns: Schema object or null

getAttestation

Retrieve an attestation by UID from the blockchain.
Returns: Attestation object or null

Query Methods

fetchSchemas

Fetch latest schemas from the registry.

fetchAttestations

Fetch latest attestations from the registry.

fetchSchemasByWallet

Fetch schemas created by a specific wallet.

fetchAttestationsByWallet

Fetch attestations created by a specific wallet.

getSchemasByLedger

Fetch schemas from a specific ledger number.

getAttestationsByLedger

Fetch attestations from a specific ledger number.

Schema Encoding

SorobanSchemaEncoder

Encode and decode attestation data matching a schema definition.

encodeSchema

Encode schema to XDR format for blockchain storage.

decodeSchema

Decode XDR-encoded schema back to JavaScript object.

BLS Delegation

Delegated attestations allow authorities to sign off-chain while delegates submit on-chain.

generateBlsKeys

Generate a new BLS key pair.

registerBlsKey

Register a BLS public key on-chain.

getBlsKey

Get the registered BLS key for an attester.

attestByDelegation

Create an attestation using a delegated BLS signature.

revokeByDelegation

Revoke an attestation using a delegated BLS signature.

Helper Functions


UID Generation

generateSchemaUid

Generate deterministic schema UID.

generateAttestationUid

Generate deterministic attestation UID.

Indexer API

Standalone functions for querying the registry API.

Utility Methods

submitTransaction

Submit a signed transaction to the network.

getClientInstance

Get underlying protocol client for advanced usage.

getServerInstance

Get underlying RPC server instance.

Types

ClientOptions

TxOptions

TransactionSigner

ContractSchema

ContractAttestation

BlsKeyPair


Exports