@settlemint/sdk-eas 2.3.14-prc6fb0514 → 2.3.14-prcc7d8818

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
+ * @description 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
  */
@@ -3989,99 +3990,6 @@ interface DeploymentResult {
3989
3990
  * @deprecated Use SchemaRequest instead
3990
3991
  */
3991
3992
  interface RegisterSchemaOptions extends SchemaRequest {}
3992
- /**
3993
- * @internal
3994
- * Portal transaction response structure
3995
- */
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
- }>;
4085
3993
  //#endregion
4086
3994
  //#region src/portal/operations.d.ts
4087
3995
  declare const GraphQLOperations: {
@@ -4461,5 +4369,5 @@ declare class EASClient {
4461
4369
  */
4462
4370
  declare function createEASClient(options: EASClientOptions): EASClient;
4463
4371
  //#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 };
4372
+ 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
4373
  //# sourceMappingURL=eas.d.ts.map