@settlemint/sdk-eas 2.3.1 → 2.3.2-main3c010da3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/eas.d.cts CHANGED
@@ -1,86 +1,71 @@
1
- import { ClientOptions as ClientOptions$1 } from '@settlemint/sdk-viem';
2
- import { z } from 'zod';
1
+ import { z } from "zod/v4";
3
2
 
3
+ //#region src/client-options.schema.d.ts
4
+ /**
5
+ * Schema for validating EAS client configuration options.
6
+ * Extends the base Viem client options with EAS-specific requirements.
7
+ */
4
8
  /**
5
9
  * Schema for validating EAS client configuration options.
6
10
  * Extends the base Viem client options with EAS-specific requirements.
7
11
  */
8
12
  declare const ClientOptionsSchema: z.ZodObject<{
9
- accessToken: z.ZodString;
10
- chainId: z.ZodString;
11
- chainName: z.ZodString;
12
- rpcUrl: z.ZodString;
13
- schemaRegistryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
14
- attestationAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
15
- }, "strip", z.ZodTypeAny, {
16
- schemaRegistryAddress: `0x${string}`;
17
- attestationAddress: `0x${string}`;
18
- accessToken: string;
19
- chainId: string;
20
- chainName: string;
21
- rpcUrl: string;
22
- }, {
23
- schemaRegistryAddress: string;
24
- attestationAddress: string;
25
- accessToken: string;
26
- chainId: string;
27
- chainName: string;
28
- rpcUrl: string;
29
- }>;
13
+ schemaRegistryAddress: z.ZodString;
14
+ attestationAddress: z.ZodString;
15
+ accessToken: z.ZodString;
16
+ chainId: z.ZodString;
17
+ chainName: z.ZodString;
18
+ rpcUrl: z.ZodString;
19
+ }, z.core.$strip>;
30
20
  /**
31
21
  * Configuration options for creating an EAS client.
32
22
  * Combines EAS-specific options with base Viem client options.
33
- *
34
- * @property schemaRegistryAddress - The address of the EAS Schema Registry contract
35
- * @property attestationAddress - The address of the EAS Attestation contract
36
- * @property accessToken - Access token for the RPC provider (must start with 'sm_aat_' or 'sm_pat_')
37
- * @property chainId - The chain ID to connect to
38
- * @property chainName - The name of the chain to connect to
39
- * @property rpcUrl - The RPC URL to connect to (must be a valid URL)
40
23
  */
41
- type ClientOptions = z.infer<typeof ClientOptionsSchema> & Pick<ClientOptions$1, "accessToken" | "chainId" | "chainName" | "rpcUrl">;
24
+ type ClientOptions = z.infer<typeof ClientOptionsSchema>;
42
25
 
26
+ //#endregion
27
+ //#region src/types.d.ts
43
28
  /**
44
29
  * Supported field types for EAS schema fields.
45
30
  * Maps to the Solidity types that can be used in EAS schemas.
46
31
  */
47
32
  declare const EAS_FIELD_TYPES: {
48
- readonly string: "string";
49
- readonly address: "address";
50
- readonly bool: "bool";
51
- readonly bytes: "bytes";
52
- readonly bytes32: "bytes32";
53
- readonly uint256: "uint256";
54
- readonly int256: "int256";
55
- readonly uint8: "uint8";
56
- readonly int8: "int8";
33
+ readonly string: "string";
34
+ readonly address: "address";
35
+ readonly bool: "bool";
36
+ readonly bytes: "bytes";
37
+ readonly bytes32: "bytes32";
38
+ readonly uint256: "uint256";
39
+ readonly int256: "int256";
40
+ readonly uint8: "uint8";
41
+ readonly int8: "int8";
57
42
  };
58
43
  type EASFieldType = keyof typeof EAS_FIELD_TYPES;
59
44
  /**
60
45
  * Represents a single field in an EAS schema.
61
- *
62
- * @property name - The name of the field
63
- * @property type - The Solidity type of the field
64
- * @property description - Optional description of the field's purpose
65
46
  */
66
47
  interface SchemaField {
67
- name: string;
68
- type: EASFieldType;
69
- description?: string;
48
+ /** The name of the field */
49
+ name: string;
50
+ /** The Solidity type of the field */
51
+ type: EASFieldType;
52
+ /** Optional description of the field's purpose */
53
+ description?: string;
70
54
  }
71
55
  /**
72
56
  * Options for registering a new schema in the EAS Schema Registry.
73
- *
74
- * @property fields - Array of fields that make up the schema
75
- * @property resolverAddress - Address of the resolver contract that will handle attestations
76
- * @property revocable - Whether attestations using this schema can be revoked
77
57
  */
78
58
  interface RegisterSchemaOptions {
79
- fields: SchemaField[];
80
- resolverAddress: string;
81
- revocable: boolean;
59
+ /** Array of fields that make up the schema */
60
+ fields: SchemaField[];
61
+ /** Address of the resolver contract that will handle attestations */
62
+ resolverAddress: string;
63
+ /** Whether attestations using this schema can be revoked */
64
+ revocable: boolean;
82
65
  }
83
66
 
67
+ //#endregion
68
+ //#region src/eas.d.ts
84
69
  /**
85
70
  * Creates an EAS client for interacting with the Ethereum Attestation Service.
86
71
  *
@@ -103,8 +88,10 @@ interface RegisterSchemaOptions {
103
88
  * ```
104
89
  */
105
90
  declare function createEASClient(options: ClientOptions): {
106
- registerSchema: (options: RegisterSchemaOptions) => Promise<string>;
107
- getSchema: (uid: string) => Promise<string>;
91
+ registerSchema: (options: RegisterSchemaOptions) => Promise<string>;
92
+ getSchema: (uid: string) => Promise<string>;
108
93
  };
109
94
 
110
- export { type ClientOptions, ClientOptionsSchema, type EASFieldType, EAS_FIELD_TYPES, type RegisterSchemaOptions, type SchemaField, createEASClient };
95
+ //#endregion
96
+ export { ClientOptions, ClientOptionsSchema, EASFieldType, EAS_FIELD_TYPES, RegisterSchemaOptions, SchemaField, createEASClient };
97
+ //# sourceMappingURL=eas.d.cts.map
package/dist/eas.d.ts CHANGED
@@ -1,86 +1,71 @@
1
- import { ClientOptions as ClientOptions$1 } from '@settlemint/sdk-viem';
2
- import { z } from 'zod';
1
+ import { z } from "zod/v4";
3
2
 
3
+ //#region src/client-options.schema.d.ts
4
+ /**
5
+ * Schema for validating EAS client configuration options.
6
+ * Extends the base Viem client options with EAS-specific requirements.
7
+ */
4
8
  /**
5
9
  * Schema for validating EAS client configuration options.
6
10
  * Extends the base Viem client options with EAS-specific requirements.
7
11
  */
8
12
  declare const ClientOptionsSchema: z.ZodObject<{
9
- accessToken: z.ZodString;
10
- chainId: z.ZodString;
11
- chainName: z.ZodString;
12
- rpcUrl: z.ZodString;
13
- schemaRegistryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
14
- attestationAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
15
- }, "strip", z.ZodTypeAny, {
16
- schemaRegistryAddress: `0x${string}`;
17
- attestationAddress: `0x${string}`;
18
- accessToken: string;
19
- chainId: string;
20
- chainName: string;
21
- rpcUrl: string;
22
- }, {
23
- schemaRegistryAddress: string;
24
- attestationAddress: string;
25
- accessToken: string;
26
- chainId: string;
27
- chainName: string;
28
- rpcUrl: string;
29
- }>;
13
+ schemaRegistryAddress: z.ZodString;
14
+ attestationAddress: z.ZodString;
15
+ accessToken: z.ZodString;
16
+ chainId: z.ZodString;
17
+ chainName: z.ZodString;
18
+ rpcUrl: z.ZodString;
19
+ }, z.core.$strip>;
30
20
  /**
31
21
  * Configuration options for creating an EAS client.
32
22
  * Combines EAS-specific options with base Viem client options.
33
- *
34
- * @property schemaRegistryAddress - The address of the EAS Schema Registry contract
35
- * @property attestationAddress - The address of the EAS Attestation contract
36
- * @property accessToken - Access token for the RPC provider (must start with 'sm_aat_' or 'sm_pat_')
37
- * @property chainId - The chain ID to connect to
38
- * @property chainName - The name of the chain to connect to
39
- * @property rpcUrl - The RPC URL to connect to (must be a valid URL)
40
23
  */
41
- type ClientOptions = z.infer<typeof ClientOptionsSchema> & Pick<ClientOptions$1, "accessToken" | "chainId" | "chainName" | "rpcUrl">;
24
+ type ClientOptions = z.infer<typeof ClientOptionsSchema>;
42
25
 
26
+ //#endregion
27
+ //#region src/types.d.ts
43
28
  /**
44
29
  * Supported field types for EAS schema fields.
45
30
  * Maps to the Solidity types that can be used in EAS schemas.
46
31
  */
47
32
  declare const EAS_FIELD_TYPES: {
48
- readonly string: "string";
49
- readonly address: "address";
50
- readonly bool: "bool";
51
- readonly bytes: "bytes";
52
- readonly bytes32: "bytes32";
53
- readonly uint256: "uint256";
54
- readonly int256: "int256";
55
- readonly uint8: "uint8";
56
- readonly int8: "int8";
33
+ readonly string: "string";
34
+ readonly address: "address";
35
+ readonly bool: "bool";
36
+ readonly bytes: "bytes";
37
+ readonly bytes32: "bytes32";
38
+ readonly uint256: "uint256";
39
+ readonly int256: "int256";
40
+ readonly uint8: "uint8";
41
+ readonly int8: "int8";
57
42
  };
58
43
  type EASFieldType = keyof typeof EAS_FIELD_TYPES;
59
44
  /**
60
45
  * Represents a single field in an EAS schema.
61
- *
62
- * @property name - The name of the field
63
- * @property type - The Solidity type of the field
64
- * @property description - Optional description of the field's purpose
65
46
  */
66
47
  interface SchemaField {
67
- name: string;
68
- type: EASFieldType;
69
- description?: string;
48
+ /** The name of the field */
49
+ name: string;
50
+ /** The Solidity type of the field */
51
+ type: EASFieldType;
52
+ /** Optional description of the field's purpose */
53
+ description?: string;
70
54
  }
71
55
  /**
72
56
  * Options for registering a new schema in the EAS Schema Registry.
73
- *
74
- * @property fields - Array of fields that make up the schema
75
- * @property resolverAddress - Address of the resolver contract that will handle attestations
76
- * @property revocable - Whether attestations using this schema can be revoked
77
57
  */
78
58
  interface RegisterSchemaOptions {
79
- fields: SchemaField[];
80
- resolverAddress: string;
81
- revocable: boolean;
59
+ /** Array of fields that make up the schema */
60
+ fields: SchemaField[];
61
+ /** Address of the resolver contract that will handle attestations */
62
+ resolverAddress: string;
63
+ /** Whether attestations using this schema can be revoked */
64
+ revocable: boolean;
82
65
  }
83
66
 
67
+ //#endregion
68
+ //#region src/eas.d.ts
84
69
  /**
85
70
  * Creates an EAS client for interacting with the Ethereum Attestation Service.
86
71
  *
@@ -103,8 +88,10 @@ interface RegisterSchemaOptions {
103
88
  * ```
104
89
  */
105
90
  declare function createEASClient(options: ClientOptions): {
106
- registerSchema: (options: RegisterSchemaOptions) => Promise<string>;
107
- getSchema: (uid: string) => Promise<string>;
91
+ registerSchema: (options: RegisterSchemaOptions) => Promise<string>;
92
+ getSchema: (uid: string) => Promise<string>;
108
93
  };
109
94
 
110
- export { type ClientOptions, ClientOptionsSchema, type EASFieldType, EAS_FIELD_TYPES, type RegisterSchemaOptions, type SchemaField, createEASClient };
95
+ //#endregion
96
+ export { ClientOptions, ClientOptionsSchema, EASFieldType, EAS_FIELD_TYPES, RegisterSchemaOptions, SchemaField, createEASClient };
97
+ //# sourceMappingURL=eas.d.ts.map