Schemas
Types
Schema (Onchain)
Name | Type | Description |
---|---|---|
name |
| Schema name. |
description? |
| Schema description. |
revocable? |
| Whether Attestations that adopt this Schema can be revoked. |
maxValidFor? |
| The maximum number of seconds that an Attestation can remain valid. 0 means Attestations can be valid forever. This is enforced through |
hook? |
| The contract address of the hook for this schema. |
registrant |
| The wallet address of the user that registered this schema. |
dataLocation? |
| Where |
data |
| The data format defining this schema's data structure. When |
Schema (Offchain)
Name | Type | Description |
---|---|---|
name |
| Schema name. |
description? |
| Schema description. |
revocable? |
| Whether Attestations that adopt this Schema can be revoked. |
maxValidFor? |
| The maximum number of seconds that an Attestation can remain valid. 0 means Attestations can be valid forever. This is enforced through |
dataLocation? |
| Where |
data |
| The data format defining this schema's data structure. |
Usage
Registering a Schema
Parameters
Name | Type | Description |
---|---|---|
schema |
| The schema being registered. |
options? |
| Options for creating a schema. |
CreateSchemaOptions
Name | Type | Description |
---|---|---|
delegationSignature? | string | The user's delegate signature for creating a schema on their behalf. Call |
getTxHash? |
| An optional callback that immediately returns the transaction hash. |
Example
Retrieving a Schema
Parameters
Name | Type | Description |
---|---|---|
schemaId |
| The ID of the schema we are trying to retrieve. |
Example
Delegating On-chain Schema Registration via ECDSA
Parameters
Name | Type | Description |
---|---|---|
schema |
| An on-chain schema. |
options |
| Options for delegate signing the schema. |
DelegateSignSchemaOptions
Name | Type | |
---|---|---|
chain |
| The EVM chain you are targetting. |
delegationAccount? |
| The signer account that signs the message. See |
rpcUrl? |
| Optional RPC URL. |
walletClient? |
| Optional |
Last updated