Attestation Service
getDigitalAssetClassId()
getDigitalAssetClassId(Gets the current classId of a digital asset. The classId is selected by the digital asset minter during attestation and determines both the initial bond requirement and the thresholds for verified rights promotion.digitalAssetAddress,digitalAssetId):Promise<number>
Parameters
digitalAssetAddress
`0x${string}`
Address of the digital asset contract
digitalAssetId
bigint
Token ID of the digital asset to check
Returns
Promise<number>
Remarks
The classId cannot be changed after attestation and determines the requirements for verified rights level. Currently, there is one asset class defined, with each class having its own specific requirements for initial bonds, verification thresholds, and trust factors in the verification process.getAttestation()
getAttestation(Retrieves detailed information about an attestation by its unique identifier. Use this method to get complete information about a specific attestation, including the recipient, verifier, schema reference, and associated data.uid):Promise<{uid:`0x${string}`;schema:`0x${string}`;time:bigint;expirationTime:bigint;revocationTime:bigint;refUID:`0x${string}`;recipient:`0x${string}`;attester:`0x${string}`;verifierCount:bigint;revocable:boolean;data:`0x${string}`;bondedAmount:bigint;digitalAssetAddress:`0x${string}`;digitalAssetId:bigint;communityUserCount:bigint;WLVerifierCount:bigint; }>
Parameters
uid
`0x${string}`
Unique identifier of the attestation to retrieve
Returns
Promise<{ uid: `0x${string}`; schema: `0x${string}`; time: bigint; expirationTime: bigint; revocationTime: bigint; refUID: `0x${string}`; recipient: `0x${string}`; attester: `0x${string}`; verifierCount: bigint; revocable: boolean; data: `0x${string}`; bondedAmount: bigint; digitalAssetAddress: `0x${string}`; digitalAssetId: bigint; communityUserCount: bigint; WLVerifierCount: bigint; }>
Complete attestation data including recipient, verifier, schema, digital asset details, and bond amounts
Example
new AttestationServiceClient()
new AttestationServiceClient(publicClient,walletClient,contractAddress):AttestationServiceClient
Parameters
publicClient
walletClient
contractAddress
`0x${string}`
Returns
AttestationServiceClient
Methods
attest()
attest(Create an attestation for a digital assetattestationRequest,digitalAssetAddress,digitalAssetId,assetClass,bondAmount):Promise<{attestationUid:`0x${string}`;rightsBoundAccount:`0x${string}`; }>
Parameters
attestationRequest
AttestationRequest
Object containing attestation details
digitalAssetAddress
`0x${string}`
Address of the digital asset token contract
digitalAssetId
bigint
Token ID of the digital asset being attested
assetClass
bigint
Asset class ID for the attestation (affects fees and requirements)
bondAmount
bigint
Amount of tokens to bond for the attestation
Returns
Promise<{ attestationUid: `0x${string}`; rightsBoundAccount: `0x${string}`; }>
An object containing the unique identifier (UID) of the created attestation and the address of the deployed Rights Bound Account.
Example
sponsoredAttest()
sponsoredAttest(Create a sponsored attestation for a digital asset paid by a third partyattestationRequest,digitalAssetAddress,digitalAssetId,assetClass,bondAmount,payer):Promise<{attestationUid:`0x${string}`;rightsBoundAccount:`0x${string}`; }>
Parameters
attestationRequest
AttestationRequest
Object containing attestation details
digitalAssetAddress
`0x${string}`
Address of the digital asset token contract
digitalAssetId
bigint
Token ID of the digital asset being attested
assetClass
bigint
Asset class ID for the attestation (affects fees and requirements)
bondAmount
bigint
Amount of tokens to bond for the attestation
payer
`0x${string}`
Address of the sponsor/payer
Returns
Promise<{ attestationUid: `0x${string}`; rightsBoundAccount: `0x${string}`; }>
An object containing the unique identifier (UID) of the created attestation and the address of the deployed Rights Bound Account.
Example
delegatedAttest()
delegatedAttest(Create a delegated attestation This method allows a user to create an attestation on behalf of another account, using a signature from that account for authorization.signatureParams,attestationRequest,digitalAssetAddress,digitalAssetId,assetClass,bondAmount,delegatedAddress):Promise<{attestationUid:`0x${string}`;rightsBoundAccount:`0x${string}`; }>
Parameters
signatureParams
SignatureParams
Parameters for the signature verification
attestationRequest
AttestationRequest
Object containing attestation details
digitalAssetAddress
`0x${string}`
Address of the digital asset token contract
digitalAssetId
bigint
Token ID of the digital asset being attested
assetClass
bigint
Asset class ID for the attestation (affects fees and requirements)
bondAmount
bigint
Amount of tokens to bond for the attestation
delegatedAddress
`0x${string}`
Address that will perform the attestation on behalf of the signer
Returns
Promise<{ attestationUid: `0x${string}`; rightsBoundAccount: `0x${string}`; }>
An object containing the unique identifier (UID) of the created attestation and the address of the deployed Rights Bound Account.
sponsoredDelegatedAttest()
sponsoredDelegatedAttest(Create a delegated attestation This method allows a user to create an attestation on behalf of another account, using a signature from that account for authorization.signatureParams,attestationRequest,digitalAssetAddress,digitalAssetId,assetClass,bondAmount,delegatedAddress,payer):Promise<{attestationUid:`0x${string}`;rightsBoundAccount:`0x${string}`; }>
Parameters
signatureParams
SignatureParams
Parameters for the signature verification
attestationRequest
AttestationRequest
Object containing attestation details
digitalAssetAddress
`0x${string}`
Address of the digital asset token contract
digitalAssetId
bigint
Token ID of the digital asset being attested
assetClass
bigint
Asset class ID for the attestation (affects fees and requirements)
bondAmount
bigint
Amount of tokens to bond for the attestation
delegatedAddress
`0x${string}`
Address that will perform the attestation on behalf of the signer
payer
`0x${string}`
Returns
Promise<{ attestationUid: `0x${string}`; rightsBoundAccount: `0x${string}`; }>
An object containing the unique identifier (UID) of the created attestation and the address of the deployed Rights Bound Account.
verifyAttestation()
verifyAttestation(Verify an attestation by bonding tokens This method allows a verifier to stake tokens against an attestation, supporting its validity. Verifiers receive rewards for accurate verifications. A digital asset can achieve Verified Rights status when it meets either of these thresholds:attestationUID,bondAmount):Promise<`0x${string}`>
- Total bonded tokens reach the level requirement
- Number of unique verifiers reaches the minimum threshold
Parameters
attestationUID
`0x${string}`
Unique identifier of the attestation to verify
bondAmount
bigint
Amount of tokens to bond for the verification
Returns
Promise<`0x${string}`>
Transaction hash of the verification transaction
Remarks
Important notes about the Verified Rights promotion process:- Only one endorsement per address is counted towards the verifier threshold
- Endorsement amounts are cumulative for the token threshold
- Once Verified Rights level 2 is achieved, the digital asset can be used in licensing and other trust-dependent transactions
- Professional verifiers’ endorsements may carry additional weight in the verification process
- The level system reflects the trust and verification achieved by the digital asset
Example
isWhitelistedVerifier()
isWhitelistedVerifier(Check if an address is a whitelisted verifieraddress):Promise<boolean>
Parameters
address
`0x${string}`
The address to check
Returns
Promise<boolean>
True if the address is a whitelisted verifier, false otherwise
addWhitelistVerifier()
addWhitelistVerifier(Add a new whitelisted verifierverifierAddress):Promise<`0x${string}`>
Parameters
verifierAddress
`0x${string}`
The address to add as a whitelisted verifier
Returns
Promise<`0x${string}`>
The transaction hash
isOwner()
isOwner(Check if an address is the owner of the contractaddress):Promise<boolean>
Parameters
address
`0x${string}`
The address to check
Returns
Promise<boolean>
True if the address is the owner, false otherwise
getNonce()
getNonce(Get the current nonce for an addressaddress):Promise<bigint>
Parameters
address
`0x${string}`
The address to get the nonce for
Returns
Promise<bigint>
The current nonce as a bigint
getDigitalAssetLevel()
getDigitalAssetLevel(Get the level of a digital assetdigitalAssetAddress,digitalAssetId):Promise<number>
Parameters
digitalAssetAddress
`0x${string}`
The address of the digital asset contract
digitalAssetId
bigint
The token ID of the digital asset
Returns
Promise<number>
The level of the digital asset (0 = unverified, 1 = basic, 2 = verified/licensable)
Remarks
The level system represents the verification status of a digital asset:- Level 0: Just minted - Initial state of any newly minted digital asset
- Level 1: Attested - Digital asset creator has completed attestation, initial bond and fee paid
- Level 2: Verified Rights - Achieved through community endorsements, meets token threshold or unique verifiers requirement
- All digital assets, regardless of classId, can achieve Verified Rights status
- Verified Rights level 2 is required for licensing and other trust-dependent operations
- Level status is independent of the digital asset’s classId
Example
removeWhitelistedVerifier()
removeWhitelistedVerifier(Remove a whitelisted verifierverifierAddress):Promise<`0x${string}`>
Parameters
verifierAddress
`0x${string}`
The address to remove from the whitelist
Returns
Promise<`0x${string}`>
The transaction hash
getRightsBoundAccountFromReceipt()
getRightsBoundAccountFromReceipt(Extracts the rights bound account from a transaction receipt.receipt):`0x${string}`
Parameters
receipt
The transaction receipt to extract the rights bound account fromlogs
object[]
Returns
`0x${string}`
The rights bound account address if found, zero address otherwise
getAttestationDataFromReceipt()
getAttestationDataFromReceipt(Extracts attestation data from a transaction receipt.receipt):object
Parameters
receipt
The transaction receipt to extract the attestation data fromlogs
object[]
Returns
object
The attestation data including UID and rights bound account
attestationUid
attestationUid: `0x${string}`
rightsBoundAccount
rightsBoundAccount: `0x${string}`
Throws
Error if the attestation UID is not found in the logsgenerateSignatureParams()
generateSignatureParams(Generates signature parameters required for delegated attestationsignature,signerAddress):object
Parameters
signature
`0x${string}`
The signed message signature
signerAddress
`0x${string}`
The address of the signer
Returns
object
Signature parameters object with signature, signer, v, r, and s values
signature
signature: `0x${string}`
signer
signer: `0x${string}`
v
v: number
r
r: `0x${string}`
s
s: `0x${string}`
signForDelegatedAttestation()
signForDelegatedAttestation(Signs a message for delegated attestation and returns the signature parametersaccount):Promise<{signature:`0x${string}`;signer:`0x${string}`;v:number;r:`0x${string}`;s:`0x${string}`; }>
Parameters
account
`0x${string}`
The account performing the signature
Returns
Promise<{ signature: `0x${string}`; signer: `0x${string}`; v: number; r: `0x${string}`; s: `0x${string}`; }>
Signature parameters object with signature, signer, v, r, and s values
signForBulkDelegatedAttestations()
signForBulkDelegatedAttestations(Generates multiple signatures for delegated attestations in bulk. This is useful when you need to sign for several attestations upfront, as each signature will use an incrementing nonce starting from the signer’s current nonce.account,numberOfSignatures):Promise<object[]>
Parameters
account
`0x${string}`
The account performing the signatures.
numberOfSignatures
number
The total number of signatures to generate.
Returns
Promise<object[]>
A promise that resolves to an array of signature parameters objects.
Each object contains the signature, signer, v, r, and s values.
These signatures must be used in the order they are returned,
as they correspond to sequential nonces.

