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

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/v4";
3
+ import { z } from "zod";
4
4
  import * as gql_tada0 from "gql.tada";
5
5
 
6
6
  //#region src/portal/portal-env.d.ts
@@ -3814,18 +3814,6 @@ 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
3829
3817
  //#region src/schema.d.ts
3830
3818
  /**
3831
3819
  * Common address constants
@@ -3862,7 +3850,18 @@ interface SchemaField {
3862
3850
  /**
3863
3851
  * Configuration options for the EAS client
3864
3852
  */
3865
- type EASClientOptions = z.infer<typeof EASClientOptionsSchema>;
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
+ }
3866
3865
  /**
3867
3866
  * Schema registration request
3868
3867
  */
@@ -3988,9 +3987,101 @@ interface DeploymentResult {
3988
3987
  }
3989
3988
  /**
3990
3989
  * @deprecated Use SchemaRequest instead
3991
- * @internal
3992
3990
  */
3993
3991
  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
+ }>;
3994
4085
  //#endregion
3995
4086
  //#region src/portal/operations.d.ts
3996
4087
  declare const GraphQLOperations: {
@@ -4120,11 +4211,6 @@ declare class EASClient {
4120
4211
  private readonly portalClient;
4121
4212
  private readonly portalGraphql;
4122
4213
  private deployedAddresses?;
4123
- /**
4124
- * Create a new EAS client instance
4125
- *
4126
- * @param options - Configuration options for the EAS client
4127
- */
4128
4214
  constructor(options: EASClientOptions);
4129
4215
  /**
4130
4216
  * Deploy EAS contracts via Portal
@@ -4375,5 +4461,5 @@ declare class EASClient {
4375
4461
  */
4376
4462
  declare function createEASClient(options: EASClientOptions): EASClient;
4377
4463
  //#endregion
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 };
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 };
4379
4465
  //# sourceMappingURL=eas.d.ts.map