@settlemint/sdk-eas 2.3.2 → 2.3.3-pr0702b3ed
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/README.md +41 -19
- package/dist/browser/eas.d.ts +97 -0
- package/dist/browser/eas.js +10401 -0
- package/dist/browser/eas.js.map +1 -0
- package/dist/eas.cjs +10420 -1
- package/dist/eas.cjs.map +1 -1
- package/dist/eas.d.cts +43 -42
- package/dist/eas.d.ts +43 -42
- package/dist/eas.js +10402 -0
- package/dist/eas.js.map +1 -0
- package/package.json +7 -7
- package/dist/eas.mjs +0 -2
- package/dist/eas.mjs.map +0 -1
package/dist/eas.d.cts
CHANGED
|
@@ -1,72 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z } from 'zod/v4';
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
schemaRegistryAddress: z.ZodString;
|
|
14
|
+
attestationAddress: z.ZodString;
|
|
15
|
+
accessToken: z.ZodString;
|
|
16
|
+
chainId: z.ZodString;
|
|
17
|
+
chainName: z.ZodString;
|
|
18
|
+
rpcUrl: z.ZodString;
|
|
15
19
|
}, z.core.$strip>;
|
|
16
20
|
/**
|
|
17
21
|
* Configuration options for creating an EAS client.
|
|
18
22
|
* Combines EAS-specific options with base Viem client options.
|
|
19
|
-
*
|
|
20
|
-
* @property schemaRegistryAddress - The address of the EAS Schema Registry contract
|
|
21
|
-
* @property attestationAddress - The address of the EAS Attestation contract
|
|
22
|
-
* @property accessToken - Access token for the RPC provider (must start with 'sm_aat_' or 'sm_pat_')
|
|
23
|
-
* @property chainId - The chain ID to connect to
|
|
24
|
-
* @property chainName - The name of the chain to connect to
|
|
25
|
-
* @property rpcUrl - The RPC URL to connect to (must be a valid URL)
|
|
26
23
|
*/
|
|
27
|
-
type ClientOptions = z.infer<typeof ClientOptionsSchema
|
|
24
|
+
type ClientOptions = z.infer<typeof ClientOptionsSchema>;
|
|
28
25
|
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/types.d.ts
|
|
29
28
|
/**
|
|
30
29
|
* Supported field types for EAS schema fields.
|
|
31
30
|
* Maps to the Solidity types that can be used in EAS schemas.
|
|
32
31
|
*/
|
|
33
32
|
declare const EAS_FIELD_TYPES: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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";
|
|
43
42
|
};
|
|
44
43
|
type EASFieldType = keyof typeof EAS_FIELD_TYPES;
|
|
45
44
|
/**
|
|
46
45
|
* Represents a single field in an EAS schema.
|
|
47
|
-
*
|
|
48
|
-
* @property name - The name of the field
|
|
49
|
-
* @property type - The Solidity type of the field
|
|
50
|
-
* @property description - Optional description of the field's purpose
|
|
51
46
|
*/
|
|
52
47
|
interface SchemaField {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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;
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
58
56
|
* Options for registering a new schema in the EAS Schema Registry.
|
|
59
|
-
*
|
|
60
|
-
* @property fields - Array of fields that make up the schema
|
|
61
|
-
* @property resolverAddress - Address of the resolver contract that will handle attestations
|
|
62
|
-
* @property revocable - Whether attestations using this schema can be revoked
|
|
63
57
|
*/
|
|
64
58
|
interface RegisterSchemaOptions {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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;
|
|
68
65
|
}
|
|
69
66
|
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/eas.d.ts
|
|
70
69
|
/**
|
|
71
70
|
* Creates an EAS client for interacting with the Ethereum Attestation Service.
|
|
72
71
|
*
|
|
@@ -89,8 +88,10 @@ interface RegisterSchemaOptions {
|
|
|
89
88
|
* ```
|
|
90
89
|
*/
|
|
91
90
|
declare function createEASClient(options: ClientOptions): {
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
registerSchema: (options: RegisterSchemaOptions) => Promise<string>;
|
|
92
|
+
getSchema: (uid: string) => Promise<string>;
|
|
94
93
|
};
|
|
95
94
|
|
|
96
|
-
|
|
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,72 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z } from 'zod/v4';
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
schemaRegistryAddress: z.ZodString;
|
|
14
|
+
attestationAddress: z.ZodString;
|
|
15
|
+
accessToken: z.ZodString;
|
|
16
|
+
chainId: z.ZodString;
|
|
17
|
+
chainName: z.ZodString;
|
|
18
|
+
rpcUrl: z.ZodString;
|
|
15
19
|
}, z.core.$strip>;
|
|
16
20
|
/**
|
|
17
21
|
* Configuration options for creating an EAS client.
|
|
18
22
|
* Combines EAS-specific options with base Viem client options.
|
|
19
|
-
*
|
|
20
|
-
* @property schemaRegistryAddress - The address of the EAS Schema Registry contract
|
|
21
|
-
* @property attestationAddress - The address of the EAS Attestation contract
|
|
22
|
-
* @property accessToken - Access token for the RPC provider (must start with 'sm_aat_' or 'sm_pat_')
|
|
23
|
-
* @property chainId - The chain ID to connect to
|
|
24
|
-
* @property chainName - The name of the chain to connect to
|
|
25
|
-
* @property rpcUrl - The RPC URL to connect to (must be a valid URL)
|
|
26
23
|
*/
|
|
27
|
-
type ClientOptions = z.infer<typeof ClientOptionsSchema
|
|
24
|
+
type ClientOptions = z.infer<typeof ClientOptionsSchema>;
|
|
28
25
|
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/types.d.ts
|
|
29
28
|
/**
|
|
30
29
|
* Supported field types for EAS schema fields.
|
|
31
30
|
* Maps to the Solidity types that can be used in EAS schemas.
|
|
32
31
|
*/
|
|
33
32
|
declare const EAS_FIELD_TYPES: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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";
|
|
43
42
|
};
|
|
44
43
|
type EASFieldType = keyof typeof EAS_FIELD_TYPES;
|
|
45
44
|
/**
|
|
46
45
|
* Represents a single field in an EAS schema.
|
|
47
|
-
*
|
|
48
|
-
* @property name - The name of the field
|
|
49
|
-
* @property type - The Solidity type of the field
|
|
50
|
-
* @property description - Optional description of the field's purpose
|
|
51
46
|
*/
|
|
52
47
|
interface SchemaField {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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;
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
58
56
|
* Options for registering a new schema in the EAS Schema Registry.
|
|
59
|
-
*
|
|
60
|
-
* @property fields - Array of fields that make up the schema
|
|
61
|
-
* @property resolverAddress - Address of the resolver contract that will handle attestations
|
|
62
|
-
* @property revocable - Whether attestations using this schema can be revoked
|
|
63
57
|
*/
|
|
64
58
|
interface RegisterSchemaOptions {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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;
|
|
68
65
|
}
|
|
69
66
|
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/eas.d.ts
|
|
70
69
|
/**
|
|
71
70
|
* Creates an EAS client for interacting with the Ethereum Attestation Service.
|
|
72
71
|
*
|
|
@@ -89,8 +88,10 @@ interface RegisterSchemaOptions {
|
|
|
89
88
|
* ```
|
|
90
89
|
*/
|
|
91
90
|
declare function createEASClient(options: ClientOptions): {
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
registerSchema: (options: RegisterSchemaOptions) => Promise<string>;
|
|
92
|
+
getSchema: (uid: string) => Promise<string>;
|
|
94
93
|
};
|
|
95
94
|
|
|
96
|
-
|
|
95
|
+
//#endregion
|
|
96
|
+
export { ClientOptions, ClientOptionsSchema, EASFieldType, EAS_FIELD_TYPES, RegisterSchemaOptions, SchemaField, createEASClient };
|
|
97
|
+
//# sourceMappingURL=eas.d.ts.map
|