@settlemint/sdk-eas 2.3.14-prfdf11875 → 2.4.0-main005a9b57

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.
@@ -1,6 +1,6 @@
1
1
  import { createPortalClient } from "@settlemint/sdk-portal";
2
2
  import { Address, Hex } from "viem";
3
- import { z } from "zod";
3
+ import { z } from "zod/v4";
4
4
  import * as gql_tada0 from "gql.tada";
5
5
 
6
6
  //#region src/portal/portal-env.d.ts
@@ -3814,6 +3814,18 @@ type PortalClient = ReturnType<typeof createPortalClient<{
3814
3814
  };
3815
3815
  }>>;
3816
3816
  //#endregion
3817
+ //#region src/utils/validation.d.ts
3818
+ /**
3819
+ * Zod schema for EASClientOptions.
3820
+ */
3821
+ declare const EASClientOptionsSchema: z.ZodObject<{
3822
+ instance: z.ZodString;
3823
+ accessToken: z.ZodOptional<z.ZodString>;
3824
+ easContractAddress: z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>;
3825
+ schemaRegistryContractAddress: z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>;
3826
+ debug: z.ZodOptional<z.ZodBoolean>;
3827
+ }, z.core.$strip>;
3828
+ //#endregion
3817
3829
  //#region src/schema.d.ts
3818
3830
  /**
3819
3831
  * Common address constants
@@ -3850,18 +3862,7 @@ interface SchemaField {
3850
3862
  /**
3851
3863
  * Configuration options for the EAS client
3852
3864
  */
3853
- interface EASClientOptions {
3854
- /** Portal GraphQL endpoint URL */
3855
- instance: string;
3856
- /** Portal access token */
3857
- accessToken?: string;
3858
- /** Optional EAS contract address (if already deployed) */
3859
- easContractAddress?: Address;
3860
- /** Optional Schema Registry contract address (if already deployed) */
3861
- schemaRegistryContractAddress?: Address;
3862
- /** Enable debug logging */
3863
- debug?: boolean;
3864
- }
3865
+ type EASClientOptions = z.infer<typeof EASClientOptionsSchema>;
3865
3866
  /**
3866
3867
  * Schema registration request
3867
3868
  */
@@ -3987,101 +3988,9 @@ interface DeploymentResult {
3987
3988
  }
3988
3989
  /**
3989
3990
  * @deprecated Use SchemaRequest instead
3990
- */
3991
- interface RegisterSchemaOptions extends SchemaRequest {}
3992
- /**
3993
3991
  * @internal
3994
- * Portal transaction response structure
3995
3992
  */
3996
- interface PortalTransactionResponse {
3997
- transactionHash?: string;
3998
- contractAddress?: string;
3999
- }
4000
- /**
4001
- * @internal
4002
- * Portal schema response structure
4003
- */
4004
- interface PortalSchemaResponse {
4005
- EASSchemaRegistry?: {
4006
- getSchema?: {
4007
- uid: string;
4008
- resolver: string;
4009
- revocable: boolean;
4010
- schema: string;
4011
- };
4012
- };
4013
- }
4014
- /**
4015
- * @internal
4016
- * Portal attestation response structure
4017
- */
4018
- interface PortalAttestationResponse {
4019
- EAS?: {
4020
- getAttestation?: {
4021
- uid: string;
4022
- schema: string;
4023
- attester: string;
4024
- recipient: string;
4025
- time: string;
4026
- expirationTime: string;
4027
- revocable: boolean;
4028
- refUID: string;
4029
- data: string;
4030
- };
4031
- isAttestationValid?: boolean;
4032
- getTimestamp?: string;
4033
- };
4034
- }
4035
- /**
4036
- * @internal
4037
- * Portal contracts response structure
4038
- */
4039
- interface PortalContractsResponse {
4040
- getContractsEasSchemaRegistry?: {
4041
- count: number;
4042
- records: Array<{
4043
- address: string;
4044
- abiName: string;
4045
- createdAt: string;
4046
- }>;
4047
- };
4048
- getContractsEas?: {
4049
- count: number;
4050
- records: Array<{
4051
- address: string;
4052
- abiName: string;
4053
- createdAt: string;
4054
- }>;
4055
- };
4056
- }
4057
- //#endregion
4058
- //#region src/utils/validation.d.ts
4059
- declare function validateFieldName(name: string): void;
4060
- declare function validateFieldType(type: string): asserts type is EASFieldType;
4061
- declare function validateSchemaFields(fields: SchemaField[]): void;
4062
- declare function buildSchemaString(fields: SchemaField[]): string;
4063
- /**
4064
- * @description Zod schema for EASClientOptions.
4065
- */
4066
- declare const EASClientOptionsSchema: z.ZodObject<{
4067
- instance: z.ZodString;
4068
- accessToken: z.ZodOptional<z.ZodString>;
4069
- easContractAddress: z.ZodOptional<z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
4070
- schemaRegistryContractAddress: z.ZodOptional<z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
4071
- debug: z.ZodOptional<z.ZodBoolean>;
4072
- }, "strip", z.ZodTypeAny, {
4073
- instance: string;
4074
- accessToken?: string | undefined;
4075
- easContractAddress?: `0x${string}` | undefined;
4076
- schemaRegistryContractAddress?: `0x${string}` | undefined;
4077
- debug?: boolean | undefined;
4078
- }, {
4079
- instance: string;
4080
- accessToken?: string | undefined;
4081
- easContractAddress?: `0x${string}` | undefined;
4082
- schemaRegistryContractAddress?: `0x${string}` | undefined;
4083
- debug?: boolean | undefined;
4084
- }>;
3993
+ interface RegisterSchemaOptions extends SchemaRequest {}
4085
3994
  //#endregion
4086
3995
  //#region src/portal/operations.d.ts
4087
3996
  declare const GraphQLOperations: {
@@ -4211,6 +4120,11 @@ declare class EASClient {
4211
4120
  private readonly portalClient;
4212
4121
  private readonly portalGraphql;
4213
4122
  private deployedAddresses?;
4123
+ /**
4124
+ * Create a new EAS client instance
4125
+ *
4126
+ * @param options - Configuration options for the EAS client
4127
+ */
4214
4128
  constructor(options: EASClientOptions);
4215
4129
  /**
4216
4130
  * Deploy EAS contracts via Portal
@@ -4461,5 +4375,5 @@ declare class EASClient {
4461
4375
  */
4462
4376
  declare function createEASClient(options: EASClientOptions): EASClient;
4463
4377
  //#endregion
4464
- export { AttestationData, AttestationInfo, AttestationRequest, DeploymentResult, EASClient, EASClientOptions, EASFieldType, EAS_FIELD_TYPES, GetAttestationsOptions, GetSchemasOptions, GraphQLOperations, RegisterSchemaOptions, SchemaData, SchemaField, SchemaRequest, TransactionResult, ZERO_ADDRESS, ZERO_BYTES32, buildSchemaString, createEASClient, validateSchemaFields };
4378
+ export { AttestationData, AttestationInfo, AttestationRequest, DeploymentResult, EASClient, EASClientOptions, EASClientOptionsSchema, EASFieldType, EAS_FIELD_TYPES, GetAttestationsOptions, GetSchemasOptions, GraphQLOperations, RegisterSchemaOptions, SchemaData, SchemaField, SchemaRequest, TransactionResult, ZERO_ADDRESS, ZERO_BYTES32, createEASClient };
4465
4379
  //# sourceMappingURL=eas.d.ts.map