diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..84380f6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# Changelog + +## 1.4.0 (2023-12-08) + +- Add customizable salt to offchain attestations to reduce the chance of predictable UIDs (which may be abused in some very specific use-cases) +- Remove unnecessary offchain attestation version input from the `signOffchainAttestation` API diff --git a/README.md b/README.md index 7419102..d5eaac0 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ const attestation = { }, uid: "0x5134f511e0533f997e569dac711952dde21daf14b316f3cce23835defc82c065", message: { - version: OffchainAttestationVersion.Version1, + version: OffchainAttestationVersion.Version2, schema: "0x27d06e3659317e9a4f8154d1e849eb53d43d91fb4f219884d1684f86d797804a", refUID: "0x0000000000000000000000000000000000000000000000000000000000000000", time: 1671219600, @@ -316,7 +316,7 @@ const EAS_CONFIG: PartialTypedDataConfig = { version: attestation.sig.domain.version, chainId: attestation.sig.domain.chainId, }; -const offchain = new Offchain(EAS_CONFIG, OffchainAttestationVersion.Version1); +const offchain = new Offchain(EAS_CONFIG, OffchainAttestationVersion.Version2); const isValidAttestation = offchain.verifyOffchainAttestationSignature( attestation.signer, attestation.sig diff --git a/dist/eas.js b/dist/eas.js index 501f1c6..91e49a1 100644 --- a/dist/eas.js +++ b/dist/eas.js @@ -293,7 +293,7 @@ class EAS extends transaction_1.Base { address: await this.contract.getAddress(), version: await this.getVersion(), chainId: await this.getChainId() - }, offchain_1.OffchainAttestationVersion.Version1, this); + }, offchain_1.OffchainAttestationVersion.Version2, this); return this.offchain; } } diff --git a/dist/offchain/offchain-utils.d.ts b/dist/offchain/offchain-utils.d.ts index 4b13124..170e995 100644 --- a/dist/offchain/offchain-utils.d.ts +++ b/dist/offchain/offchain-utils.d.ts @@ -1,13 +1,11 @@ import { SignedOffchainAttestation } from './offchain'; -export interface SignedOffchainAttestationV1 extends Omit { +export interface SignedOffchainAttestationV1 extends Omit { r: string; s: string; v: number; } export interface AttestationShareablePackageObject { - /** Signed typed data with attestation object */ sig: SignedOffchainAttestation; - /** Address of the signer */ signer: string; } export type CompactAttestationShareablePackageObject = [ @@ -27,7 +25,8 @@ export type CompactAttestationShareablePackageObject = [ revocable: boolean, data: string, nonce: number, - offchainVersion?: number + offchainVersion?: number, + salt?: string ]; export declare const createOffchainURL: (pkg: AttestationShareablePackageObject) => string; export declare const zipAndEncodeToBase64: (pkg: AttestationShareablePackageObject) => string; diff --git a/dist/offchain/offchain-utils.js b/dist/offchain/offchain-utils.js index f546f24..4a67b0c 100644 --- a/dist/offchain/offchain-utils.js +++ b/dist/offchain/offchain-utils.js @@ -5,6 +5,7 @@ const tslib_1 = require("tslib"); const ethers_1 = require("ethers"); const Base64 = tslib_1.__importStar(require("js-base64")); const pako_1 = tslib_1.__importDefault(require("pako")); +const offchain_1 = require("./offchain"); const createOffchainURL = (pkg) => { const base64 = (0, exports.zipAndEncodeToBase64)(pkg); return `/offchain/url/#attestation=${encodeURIComponent(base64)}`; @@ -25,8 +26,8 @@ const decodeBase64ZippedBase64 = (base64) => { }; exports.decodeBase64ZippedBase64 = decodeBase64ZippedBase64; const compactOffchainAttestationPackage = (pkg) => { - const signer = pkg.signer; - let sig = pkg.sig; + const { signer } = pkg; + let { sig } = pkg; if ((0, exports.isSignedOffchainAttestationV1)(sig)) { sig = convertV1AttestationToV2(sig); } @@ -47,12 +48,13 @@ const compactOffchainAttestationPackage = (pkg) => { sig.message.revocable, sig.message.data, Number(sig.message.nonce), - sig.message.version + sig.message.version, + sig.message.salt ]; }; exports.compactOffchainAttestationPackage = compactOffchainAttestationPackage; const uncompactOffchainAttestationPackage = (compacted) => { - const version = compacted[16] ? compacted[16] : 0; + const version = compacted[16] ? compacted[16] : offchain_1.OffchainAttestationVersion.Legacy; const attestTypes = { Attest: [ { @@ -85,21 +87,44 @@ const uncompactOffchainAttestationPackage = (compacted) => { } ] }; - if (version === 1) { - attestTypes.Attest.unshift({ - name: 'version', - type: 'uint16' - }); + switch (version) { + case offchain_1.OffchainAttestationVersion.Legacy: + break; + case offchain_1.OffchainAttestationVersion.Version1: + attestTypes.Attest = [ + { + name: 'version', + type: 'uint16' + }, + ...attestTypes.Attest + ]; + break; + case offchain_1.OffchainAttestationVersion.Version2: + attestTypes.Attest = [ + { + name: 'version', + type: 'uint16' + }, + ...attestTypes.Attest, + { + name: 'salt', + type: 'bytes32' + } + ]; + break; + default: + throw new Error(`Unsupported version: ${version}`); } return { sig: { + version, domain: { name: 'EAS Attestation', version: compacted[0], chainId: BigInt(compacted[1]), verifyingContract: compacted[2] }, - primaryType: version === 0 ? 'Attestation' : 'Attest', + primaryType: version === offchain_1.OffchainAttestationVersion.Legacy ? 'Attestation' : 'Attest', types: attestTypes, signature: { r: compacted[3], @@ -116,7 +141,8 @@ const uncompactOffchainAttestationPackage = (compacted) => { refUID: compacted[12] === '0' ? ethers_1.ZeroHash : compacted[12], revocable: compacted[13], data: compacted[14], - nonce: BigInt(compacted[15]) + nonce: BigInt(compacted[15]), + salt: compacted[17] } }, signer: compacted[6] @@ -131,6 +157,7 @@ function convertV1AttestationToV2(attestation) { const { v, r, s, ...rest } = attestation; return { ...rest, + version: offchain_1.OffchainAttestationVersion.Version1, signature: { v, r, diff --git a/dist/offchain/offchain-utils.js.map b/dist/offchain/offchain-utils.js.map index 116e507..5d219d0 100644 --- a/dist/offchain/offchain-utils.js.map +++ b/dist/offchain/offchain-utils.js.map @@ -1 +1 @@ -{"version":3,"file":"offchain-utils.js","sourceRoot":"","sources":["../../src/offchain/offchain-utils.ts"],"names":[],"mappings":";;;;AAAA,mCAA+C;AAC/C,0DAAoC;AACpC,wDAAwB;AAoCjB,MAAM,iBAAiB,GAAG,CAAC,GAAsC,EAAE,EAAE;IAC1E,MAAM,MAAM,GAAG,IAAA,4BAAoB,EAAC,GAAG,CAAC,CAAC;IACzC,OAAO,8BAA8B,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC;AACpE,CAAC,CAAC;AAHW,QAAA,iBAAiB,qBAG5B;AAEK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C,SAAS,CAAC,EAAE,CAAC,CAAC;gBACrC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,iBAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;gBACxD,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC;gBACxB,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;gBACnB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;aAC7B;SACF;QACD,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;KACrB,CAAC;AACJ,CAAC,CAAC;AA3EW,QAAA,mCAAmC,uCA2E9C;AAEK,MAAM,6BAA6B,GAAG,CAC3C,WAAoE,EACxB,EAAE;IAC9C,OAAO,GAAG,IAAI,WAAW,IAAI,GAAG,IAAI,WAAW,IAAI,GAAG,IAAI,WAAW,CAAC;AACxE,CAAC,CAAC;AAJW,QAAA,6BAA6B,iCAIxC;AAEF,SAAS,wBAAwB,CAAC,WAAwC;IACxE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,WAAW,CAAC;IACzC,OAAO;QACL,GAAG,IAAI;QACP,SAAS,EAAE;YACT,CAAC;YACD,CAAC;YACD,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"offchain-utils.js","sourceRoot":"","sources":["../../src/offchain/offchain-utils.ts"],"names":[],"mappings":";;;;AAAA,mCAA+C;AAC/C,0DAAoC;AACpC,wDAAwB;AACxB,yCAAuG;AAqChG,MAAM,iBAAiB,GAAG,CAAC,GAAsC,EAAE,EAAE;IAC1E,MAAM,MAAM,GAAG,IAAA,4BAAoB,EAAC,GAAG,CAAC,CAAC;IACzC,OAAO,8BAA8B,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC;AACpE,CAAC,CAAC;AAHW,QAAA,iBAAiB,qBAG5B;AAEK,MAAM,oBAAoB,GAAG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W,CAAC;IACzC,OAAO;QACL,GAAG,IAAI;QACP,OAAO,EAAE,qCAA0B,CAAC,QAAQ;QAC5C,SAAS,EAAE;YACT,CAAC;YACD,CAAC;YACD,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/offchain/offchain.d.ts b/dist/offchain/offchain.d.ts index 5fd4174..9289a1c 100644 --- a/dist/offchain/offchain.d.ts +++ b/dist/offchain/offchain.d.ts @@ -7,11 +7,11 @@ export interface OffchainAttestationType extends EIP712Types } export declare enum OffchainAttestationVersion { Legacy = 0, - Version1 = 1 + Version1 = 1, + Version2 = 2 } export declare const OFFCHAIN_ATTESTATION_TYPES: Record; export type OffchainAttestationParams = { - version: number; schema: string; recipient: string; time: bigint; @@ -19,22 +19,30 @@ export type OffchainAttestationParams = { revocable: boolean; refUID: string; data: string; + salt?: string; } & Partial; +export type OffchainAttestationTypedData = OffchainAttestationParams & { + version: OffchainAttestationVersion; +}; export type OffchainAttestationOptions = { + salt?: string; verifyOnchain: boolean; }; -export interface SignedOffchainAttestation extends EIP712Response { +export interface SignedOffchainAttestation extends EIP712Response { + version: OffchainAttestationVersion; uid: string; } +export declare const SALT_SIZE = 32; export declare class Offchain extends TypedDataHandler { readonly version: OffchainAttestationVersion; protected signingType: OffchainAttestationType; protected readonly verificationTypes: OffchainAttestationType[]; private readonly eas; - constructor(config: PartialTypedDataConfig, version: number, eas: EAS); + constructor(config: PartialTypedDataConfig, version: OffchainAttestationVersion, eas: EAS); getDomainSeparator(): string; getDomainTypedData(): DomainTypedData; signOffchainAttestation(params: OffchainAttestationParams, signer: Signer, options?: OffchainAttestationOptions): Promise; - verifyOffchainAttestationSignature(attester: string, request: SignedOffchainAttestation): boolean; - static getOffchainUID(params: OffchainAttestationParams): string; + verifyOffchainAttestationSignature(attester: string, attestation: SignedOffchainAttestation): boolean; + private getOffchainUID; + static getOffchainUID(version: OffchainAttestationVersion, attestation: SignedOffchainAttestation): string; } diff --git a/dist/offchain/offchain.js b/dist/offchain/offchain.js index 6b9c0af..1f44658 100644 --- a/dist/offchain/offchain.js +++ b/dist/offchain/offchain.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Offchain = exports.OFFCHAIN_ATTESTATION_TYPES = exports.OffchainAttestationVersion = void 0; +exports.Offchain = exports.SALT_SIZE = exports.OFFCHAIN_ATTESTATION_TYPES = exports.OffchainAttestationVersion = void 0; const ethers_1 = require("ethers"); const utils_1 = require("../utils"); const delegated_1 = require("./delegated"); @@ -9,6 +9,7 @@ var OffchainAttestationVersion; (function (OffchainAttestationVersion) { OffchainAttestationVersion[OffchainAttestationVersion["Legacy"] = 0] = "Legacy"; OffchainAttestationVersion[OffchainAttestationVersion["Version1"] = 1] = "Version1"; + OffchainAttestationVersion[OffchainAttestationVersion["Version2"] = 2] = "Version2"; })(OffchainAttestationVersion || (exports.OffchainAttestationVersion = OffchainAttestationVersion = {})); exports.OFFCHAIN_ATTESTATION_TYPES = { [OffchainAttestationVersion.Legacy]: [ @@ -75,18 +76,38 @@ exports.OFFCHAIN_ATTESTATION_TYPES = { ] } } + ], + [OffchainAttestationVersion.Version2]: [ + { + domain: 'EAS Attestation', + primaryType: 'Attest', + types: { + Attest: [ + { name: 'version', type: 'uint16' }, + { name: 'schema', type: 'bytes32' }, + { name: 'recipient', type: 'address' }, + { name: 'time', type: 'uint64' }, + { name: 'expirationTime', type: 'uint64' }, + { name: 'revocable', type: 'bool' }, + { name: 'refUID', type: 'bytes32' }, + { name: 'data', type: 'bytes' }, + { name: 'salt', type: 'bytes32' } + ] + } + } ] }; const DEFAULT_OFFCHAIN_ATTESTATION_OPTIONS = { verifyOnchain: false }; +exports.SALT_SIZE = 32; class Offchain extends typed_data_handler_1.TypedDataHandler { version; signingType; verificationTypes; eas; constructor(config, version, eas) { - if (version > OffchainAttestationVersion.Version1) { + if (version > OffchainAttestationVersion.Version2) { throw new Error('Unsupported version'); } super({ ...config, name: delegated_1.EIP712_NAME }); @@ -112,11 +133,15 @@ class Offchain extends typed_data_handler_1.TypedDataHandler { }; } async signOffchainAttestation(params, signer, options) { - const uid = Offchain.getOffchainUID(params); - const signedRequest = await this.signTypedDataRequest(params, { + const typedData = { version: this.version, ...params }; + // If no salt was provided - generate a random salt. + if (this.version >= OffchainAttestationVersion.Version2 && !typedData.salt) { + typedData.salt = (0, ethers_1.hexlify)((0, ethers_1.randomBytes)(exports.SALT_SIZE)); + } + const signedRequest = await this.signTypedDataRequest(typedData, { domain: this.getDomainTypedData(), primaryType: this.signingType.primaryType, - message: params, + message: typedData, types: this.signingType.types }, signer); const { verifyOnchain } = { ...DEFAULT_OFFCHAIN_ATTESTATION_OPTIONS, ...options }; @@ -132,18 +157,19 @@ class Offchain extends typed_data_handler_1.TypedDataHandler { } } return { - ...signedRequest, - uid + version: this.version, + uid: this.getOffchainUID(typedData), + ...signedRequest }; } - verifyOffchainAttestationSignature(attester, request) { - if (request.uid !== Offchain.getOffchainUID(request.message)) { + verifyOffchainAttestationSignature(attester, attestation) { + if (attestation.uid !== Offchain.getOffchainUID(this.version, attestation)) { return false; } const typeCount = this.verificationTypes.length; return this.verificationTypes.some((type, index) => { try { - return this.verifyTypedDataRequestSignature(attester, request, { + return this.verifyTypedDataRequestSignature(attester, attestation, { primaryType: type.primaryType, types: type.types }, false); @@ -156,8 +182,11 @@ class Offchain extends typed_data_handler_1.TypedDataHandler { } }); } - static getOffchainUID(params) { - return (0, utils_1.getOffchainUID)(params.version ?? OffchainAttestationVersion.Legacy, params.schema, params.recipient, params.time, params.expirationTime, params.revocable, params.refUID, params.data); + getOffchainUID(params) { + return (0, utils_1.getOffchainUID)(this.version, params.schema, params.recipient, params.time, params.expirationTime, params.revocable, params.refUID, params.data, params.salt); + } + static getOffchainUID(version, attestation) { + return (0, utils_1.getOffchainUID)(version, attestation.message.schema, attestation.message.recipient, attestation.message.time, attestation.message.expirationTime, attestation.message.revocable, attestation.message.refUID, attestation.message.data, attestation.message.salt); } } exports.Offchain = Offchain; diff --git a/dist/offchain/offchain.js.map b/dist/offchain/offchain.js.map index f8c5f8d..3bf2642 100644 --- a/dist/offchain/offchain.js.map +++ b/dist/offchain/offchain.js.map @@ -1 +1 @@ -{"version":3,"file":"offchain.js","sourceRoot":"","sources":["../../src/offchain/offchain.ts"],"names":[],"mappings":";;;AAAA,mCAAkE;AAElE,oCAAwD;AACxD,2CAA0C;AAC1C,6DAU8B;AAQ9B,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,+EAAU,CAAA;IACV,mFAAY,CAAA;AACd,CAAC,EAHW,0BAA0B,0CAA1B,0BAA0B,QAGrC;AAEY,QAAA,0BAA0B,GAAkE;IACvG,CAAC,0BAA0B,CAAC,MAAM,CAAC,EAAE;QACnC;YACE,MAAM,EAAE,iBAAiB;YACzB,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE;gBACL,WAAW,EAAE;oBACX,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;oBACnC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;oBACtC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAChC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC1C,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE;oBACnC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;oBACnC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;iBAChC;aACF;SACF;QACD;YACE,MAAM,EAAE,iBAAiB;YACzB,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE;gBACL,MAAM,EAAE;oBACN,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;oBACnC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;oBACtC,EA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,CAAC,SAAS,EAChB,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,cAAc,EACrB,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,IAAI,CACZ,CAAC;IACJ,CAAC;CACF;AAzHD,4BAyHC"} \ No newline at end of file +{"version":3,"file":"offchain.js","sourceRoot":"","sources":["../../src/offchain/offchain.ts"],"names":[],"mappings":";;;AAAA,mCAAwF;AAExF,oCAAwD;AACxD,2CAA0C;AAC1C,6DAU8B;AAQ9B,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,+EAAU,CAAA;IACV,mFAAY,CAAA;IACZ,mFAAY,CAAA;AACd,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAEY,QAAA,0BAA0B,GAAkE;IACvG,CAAC,0BAA0B,CAAC,MAAM,CAAC,EAAE;QACnC;YACE,MAAM,EAAE,iBAAiB;YACzB,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE;gBACL,WAAW,EAAE;oBACX,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;oBACnC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;oBACtC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAChC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC1C,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE;oBACnC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;oBACnC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;iBAChC;aACF;SACF;QACD;YACE,MAAM,EAAE,iBAAiB;YACzB,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE;gBACL,MAAM,EAAE;oBACN,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,E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AAM,EACb,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,IAAI,CACZ,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,OAAmC,EAAE,WAAsC;QACtG,OAAO,IAAA,sBAAc,EACnB,OAAO,EACP,WAAW,CAAC,OAAO,CAAC,MAAM,EAC1B,WAAW,CAAC,OAAO,CAAC,SAAS,EAC7B,WAAW,CAAC,OAAO,CAAC,IAAI,EACxB,WAAW,CAAC,OAAO,CAAC,cAAc,EAClC,WAAW,CAAC,OAAO,CAAC,SAAS,EAC7B,WAAW,CAAC,OAAO,CAAC,MAAM,EAC1B,WAAW,CAAC,OAAO,CAAC,IAAI,EACxB,WAAW,CAAC,OAAO,CAAC,IAAI,CACzB,CAAC;IACJ,CAAC;CACF;AA/ID,4BA+IC"} \ No newline at end of file diff --git a/dist/utils.d.ts b/dist/utils.d.ts index dec0b4b..105cebc 100644 --- a/dist/utils.d.ts +++ b/dist/utils.d.ts @@ -4,7 +4,7 @@ export declare const ZERO_BYTES = "0x"; export declare const ZERO_BYTES32 = "0x0000000000000000000000000000000000000000000000000000000000000000"; export declare const getSchemaUID: (schema: string, resolverAddress: string, revocable: boolean) => string; export declare const getUID: (schema: string, recipient: string, attester: string, time: bigint, expirationTime: bigint, revocable: boolean, refUID: string, data: string, bump: number) => string; -export declare const getOffchainUID: (version: number, schema: string, recipient: string, time: bigint, expirationTime: bigint, revocable: boolean, refUID: string, data: string) => string; +export declare const getOffchainUID: (version: number, schema: string, recipient: string, time: bigint, expirationTime: bigint, revocable: boolean, refUID: string, data: string, salt?: string) => string; export declare const getUIDFromAttestTx: (res: Promise | TransactionResponse) => Promise; export declare const getUIDsFromMultiAttestTx: (res: Promise | TransactionResponse) => Promise; export declare const getUIDsFromAttestReceipt: (receipt: TransactionReceipt) => string[]; diff --git a/dist/utils.js b/dist/utils.js index 85b45b1..80227d0 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getTimestampFromOffchainRevocationReceipt = exports.getTimestampFromTimestampReceipt = exports.getUIDsFromAttestReceipt = exports.getUIDsFromMultiAttestTx = exports.getUIDFromAttestTx = exports.getOffchainUID = exports.getUID = exports.getSchemaUID = exports.ZERO_BYTES32 = exports.ZERO_BYTES = exports.ZERO_ADDRESS = void 0; const eas_contracts_1 = require("@ethereum-attestation-service/eas-contracts"); const ethers_1 = require("ethers"); +const offchain_1 = require("./offchain"); exports.ZERO_ADDRESS = ethers_1.ZeroAddress; exports.ZERO_BYTES = '0x'; exports.ZERO_BYTES32 = '0x0000000000000000000000000000000000000000000000000000000000000000'; @@ -21,11 +22,11 @@ const getSchemaUID = (schema, resolverAddress, revocable) => (0, ethers_1.solidi exports.getSchemaUID = getSchemaUID; const getUID = (schema, recipient, attester, time, expirationTime, revocable, refUID, data, bump) => (0, ethers_1.solidityPackedKeccak256)(['bytes', 'address', 'address', 'uint64', 'uint64', 'bool', 'bytes32', 'bytes', 'uint32'], [(0, ethers_1.hexlify)((0, ethers_1.toUtf8Bytes)(schema)), recipient, attester, time, expirationTime, revocable, refUID, data, bump]); exports.getUID = getUID; -const getOffchainUID = (version, schema, recipient, time, expirationTime, revocable, refUID, data) => { +const getOffchainUID = (version, schema, recipient, time, expirationTime, revocable, refUID, data, salt) => { switch (version) { - case 0: + case offchain_1.OffchainAttestationVersion.Legacy: return (0, ethers_1.solidityPackedKeccak256)(['bytes', 'address', 'address', 'uint64', 'uint64', 'bool', 'bytes32', 'bytes', 'uint32'], [(0, ethers_1.hexlify)((0, ethers_1.toUtf8Bytes)(schema)), recipient, exports.ZERO_ADDRESS, time, expirationTime, revocable, refUID, data, 0]); - case 1: + case offchain_1.OffchainAttestationVersion.Version1: return (0, ethers_1.solidityPackedKeccak256)(['uint16', 'bytes', 'address', 'address', 'uint64', 'uint64', 'bool', 'bytes32', 'bytes', 'uint32'], [ version, (0, ethers_1.hexlify)((0, ethers_1.toUtf8Bytes)(schema)), @@ -38,6 +39,20 @@ const getOffchainUID = (version, schema, recipient, time, expirationTime, revoca data, 0 ]); + case offchain_1.OffchainAttestationVersion.Version2: + return (0, ethers_1.solidityPackedKeccak256)(['uint16', 'bytes', 'address', 'address', 'uint64', 'uint64', 'bool', 'bytes32', 'bytes', 'bytes32', 'uint32'], [ + version, + (0, ethers_1.hexlify)((0, ethers_1.toUtf8Bytes)(schema)), + recipient, + exports.ZERO_ADDRESS, + time, + expirationTime, + revocable, + refUID, + data, + salt, + 0 + ]); default: throw new Error('Unsupported version'); } diff --git a/dist/utils.js.map b/dist/utils.js.map index fd3ddb2..9196f85 100644 --- a/dist/utils.js.map +++ b/dist/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,+EAA2E;AAC3E,mCASgB;AAEH,QAAA,YAAY,GAAG,oBAAW,CAAC;AAC3B,QAAA,UAAU,GAAG,IAAI,CAAC;AAClB,QAAA,YAAY,GAAG,oEAAoE,CAAC;AAEjG,IAAK,KAIJ;AAJD,WAAK,KAAK;IACR,8BAAqB,CAAA;IACrB,oCAA2B,CAAA;IAC3B,4CAAmC,CAAA;AACrC,CAAC,EAJI,KAAK,KAAL,KAAK,QAIT;AAED,MAAM,MAAM,GAAG;IACb,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAA,kBAAS,EAAC,IAAA,oBAAW,EAAC,2CAA2C,CAAC,CAAC;IACrF,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,IAAA,kBAAS,EAAC,IAAA,oBAAW,EAAC,6BAA6B,CAAC,CAAC;IAC1E,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,IAAA,kBAAS,EAAC,IAAA,oBAAW,EAAC,yCAAyC,CAAC,CAAC;CAC3F,CAAC;AAEK,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,eAAuB,EAAE,SAAkB,EAAE,EAAE,CAC1F,IAAA,gCAAuB,EAAC,CAAC,QAAQ,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CAAC;AAVW,QAAA,wBAAwB,4BAUnC;AAEK,MAAM,wBAAwB,GAAG,CAAC,OAA2B,EAAY,EAAE,CAChF,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AADxC,QAAA,wBAAwB,4BACgB;AAE9C,MAAM,gCAAgC,GAAG,CAAC,OAA2B,EAAY,EAAE,CACxF,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AADvE,QAAA,gCAAgC,oCACuC;AAE7E,MAAM,yCAAyC,GAAG,CAAC,OAA2B,EAAY,EAAE,CACjG,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAD3E,QAAA,yCAAyC,6CACkC"} \ No newline at end of file diff --git a/package.json b/package.json index a14af50..e92e07f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ethereum-attestation-service/eas-sdk", - "version": "1.3.8", + "version": "1.4.0", "description": "Ethereum Attestation Service - TypeScript/JavaScript SDK", "repository": "git@github.com:ethereum-attestation-service/eas-sdk.git", "author": "Leonid Beder ", @@ -19,7 +19,7 @@ }, "dependencies": { "@ethereum-attestation-service/eas-contracts": "1.3.7", - "ethers": "^6.9.0", + "ethers": "^6.10.0", "js-base64": "^3.7.5", "lodash": "^4.17.21", "multiformats": "9.9.0", @@ -30,18 +30,18 @@ "@ianvs/prettier-plugin-sort-imports": "^4.1.1", "@metamask/eth-sig-util": "^7.0.1", "@types/lodash": "^4.14.202", - "@types/node": "^20.10.2", + "@types/node": "^20.11.1", "@types/pako": "^2.0.3", "@types/semver": "^7.5.6", - "@typescript-eslint/eslint-plugin": "^6.13.1", - "@typescript-eslint/parser": "^6.13.1", - "eslint": "^8.54.0", - "eslint-plugin-import": "^2.29.0", + "@typescript-eslint/eslint-plugin": "^6.18.1", + "@typescript-eslint/parser": "^6.18.1", + "eslint": "^8.56.0", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-prefer-arrow": "^1.2.3", - "prettier": "^3.1.0", + "prettier": "^3.2.2", "prettier-package-json": "^2.8.0", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "tslib": "^2.6.2", - "typescript": "^5.3.2" + "typescript": "^5.3.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e809a18..1a126b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,10 +7,10 @@ settings: dependencies: '@ethereum-attestation-service/eas-contracts': specifier: 1.3.7 - version: 1.3.7(ts-node@10.9.1)(typescript@5.3.2) + version: 1.3.7(ts-node@10.9.2)(typescript@5.3.3) ethers: - specifier: ^6.9.0 - version: 6.9.0 + specifier: ^6.10.0 + version: 6.10.0 js-base64: specifier: ^3.7.5 version: 3.7.5 @@ -30,7 +30,7 @@ dependencies: devDependencies: '@ianvs/prettier-plugin-sort-imports': specifier: ^4.1.1 - version: 4.1.1(prettier@3.1.0) + version: 4.1.1(prettier@3.2.2) '@metamask/eth-sig-util': specifier: ^7.0.1 version: 7.0.1 @@ -38,8 +38,8 @@ devDependencies: specifier: ^4.14.202 version: 4.14.202 '@types/node': - specifier: ^20.10.2 - version: 20.10.2 + specifier: ^20.11.1 + version: 20.11.1 '@types/pako': specifier: ^2.0.3 version: 2.0.3 @@ -47,35 +47,35 @@ devDependencies: specifier: ^7.5.6 version: 7.5.6 '@typescript-eslint/eslint-plugin': - specifier: ^6.13.1 - version: 6.13.1(@typescript-eslint/parser@6.13.1)(eslint@8.54.0)(typescript@5.3.2) + specifier: ^6.18.1 + version: 6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': - specifier: ^6.13.1 - version: 6.13.1(eslint@8.54.0)(typescript@5.3.2) + specifier: ^6.18.1 + version: 6.18.1(eslint@8.56.0)(typescript@5.3.3) eslint: - specifier: ^8.54.0 - version: 8.54.0 + specifier: ^8.56.0 + version: 8.56.0 eslint-plugin-import: - specifier: ^2.29.0 - version: 2.29.0(@typescript-eslint/parser@6.13.1)(eslint@8.54.0) + specifier: ^2.29.1 + version: 2.29.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0) eslint-plugin-prefer-arrow: specifier: ^1.2.3 - version: 1.2.3(eslint@8.54.0) + version: 1.2.3(eslint@8.56.0) prettier: - specifier: ^3.1.0 - version: 3.1.0 + specifier: ^3.2.2 + version: 3.2.2 prettier-package-json: specifier: ^2.8.0 version: 2.8.0 ts-node: - specifier: ^10.9.1 - version: 10.9.1(@types/node@20.10.2)(typescript@5.3.2) + specifier: ^10.9.2 + version: 10.9.2(@types/node@20.11.1)(typescript@5.3.3) tslib: specifier: ^2.6.2 version: 2.6.2 typescript: - specifier: ^5.3.2 - version: 5.3.2 + specifier: ^5.3.3 + version: 5.3.3 packages: @@ -93,36 +93,36 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 dev: true - /@babel/code-frame@7.23.4: - resolution: {integrity: sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA==} + /@babel/code-frame@7.23.5: + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.23.4 chalk: 2.4.2 dev: true - /@babel/compat-data@7.23.3: - resolution: {integrity: sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==} + /@babel/compat-data@7.23.5: + resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.23.3: - resolution: {integrity: sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==} + /@babel/core@7.23.7: + resolution: {integrity: sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.23.4 - '@babel/generator': 7.23.4 - '@babel/helper-compilation-targets': 7.22.15 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.3) - '@babel/helpers': 7.23.4 - '@babel/parser': 7.23.4 + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.7) + '@babel/helpers': 7.23.8 + '@babel/parser': 7.23.6 '@babel/template': 7.22.15 - '@babel/traverse': 7.23.4 - '@babel/types': 7.23.4 + '@babel/traverse': 7.23.7 + '@babel/types': 7.23.6 convert-source-map: 2.0.0 debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 @@ -132,23 +132,23 @@ packages: - supports-color dev: true - /@babel/generator@7.23.4: - resolution: {integrity: sha512-esuS49Cga3HcThFNebGhlgsrVLkvhqvYDTzgjfFFlHJcIfLe5jFmRRfCQ1KuBfc4Jrtn3ndLgKWAKjBE+IraYQ==} + /@babel/generator@7.23.6: + resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 jsesc: 2.5.2 dev: true - /@babel/helper-compilation-targets@7.22.15: - resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} + /@babel/helper-compilation-targets@7.23.6: + resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/compat-data': 7.23.3 - '@babel/helper-validator-option': 7.22.15 - browserslist: 4.22.1 + '@babel/compat-data': 7.23.5 + '@babel/helper-validator-option': 7.23.5 + browserslist: 4.22.2 lru-cache: 5.1.1 semver: 6.3.1 dev: true @@ -163,30 +163,30 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-module-imports@7.22.15: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true - /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.3): + /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.7): resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.23.3 + '@babel/core': 7.23.7 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 @@ -198,14 +198,14 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-string-parser@7.23.4: @@ -218,18 +218,18 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-option@7.22.15: - resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} + /@babel/helper-validator-option@7.23.5: + resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} dev: true - /@babel/helpers@7.23.4: - resolution: {integrity: sha512-HfcMizYz10cr3h29VqyfGL6ZWIjTwWfvYBMsBVGwpcbhNGe3wQ1ZXZRPzZoAHhd9OqHadHqjQ89iVKINXnbzuw==} + /@babel/helpers@7.23.8: + resolution: {integrity: sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/traverse': 7.23.4 - '@babel/types': 7.23.4 + '@babel/traverse': 7.23.7 + '@babel/types': 7.23.6 transitivePeerDependencies: - supports-color dev: true @@ -243,43 +243,43 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser@7.23.4: - resolution: {integrity: sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==} + /@babel/parser@7.23.6: + resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/template@7.22.15: resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.23.4 - '@babel/parser': 7.23.4 - '@babel/types': 7.23.4 + '@babel/code-frame': 7.23.5 + '@babel/parser': 7.23.6 + '@babel/types': 7.23.6 dev: true - /@babel/traverse@7.23.4: - resolution: {integrity: sha512-IYM8wSUwunWTB6tFC2dkKZhxbIjHoWemdK+3f8/wq8aKhbUscxD5MX72ubd90fxvFknaLPeGw5ycU84V1obHJg==} + /@babel/traverse@7.23.7: + resolution: {integrity: sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.23.4 - '@babel/generator': 7.23.4 + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.23.4 - '@babel/types': 7.23.4 + '@babel/parser': 7.23.6 + '@babel/types': 7.23.6 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types@7.23.4: - resolution: {integrity: sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==} + /@babel/types@7.23.6: + resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.23.4 @@ -324,13 +324,13 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.9 - /@eslint-community/eslint-utils@4.4.0(eslint@8.54.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.54.0 + eslint: 8.56.0 eslint-visitor-keys: 3.4.3 dev: true @@ -339,14 +339,14 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.3: - resolution: {integrity: sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==} + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 - globals: 13.23.0 + globals: 13.24.0 ignore: 5.3.0 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -356,15 +356,15 @@ packages: - supports-color dev: true - /@eslint/js@8.54.0: - resolution: {integrity: sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==} + /@eslint/js@8.56.0: + resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@ethereum-attestation-service/eas-contracts@1.3.7(ts-node@10.9.1)(typescript@5.3.2): + /@ethereum-attestation-service/eas-contracts@1.3.7(ts-node@10.9.2)(typescript@5.3.3): resolution: {integrity: sha512-msCKGDhqSjfkx0lbs0PPkf/Z6bWxaYT9ze/uLoRh1tM7W8N27mobX4g6AsjATqGC+eWHRfliK9eCwJQj7TU8WA==} dependencies: - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.19.1(ts-node@10.9.2)(typescript@5.3.3) transitivePeerDependencies: - bufferutil - supports-color @@ -725,11 +725,11 @@ packages: engines: {node: '>=14'} dev: false - /@humanwhocodes/config-array@0.11.13: - resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.1 + '@humanwhocodes/object-schema': 2.0.2 debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: @@ -741,11 +741,11 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.1: - resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + /@humanwhocodes/object-schema@2.0.2: + resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} dev: true - /@ianvs/prettier-plugin-sort-imports@4.1.1(prettier@3.1.0): + /@ianvs/prettier-plugin-sort-imports@4.1.1(prettier@3.2.2): resolution: {integrity: sha512-kJhXq63ngpTQ2dxgf5GasbPJWsJA3LgoOdd7WGhpUSzLgLgI4IsIzYkbJf9kmpOHe7Vdm/o3PcRA3jmizXUuAQ==} peerDependencies: '@vue/compiler-sfc': '>=3.0.0' @@ -754,12 +754,12 @@ packages: '@vue/compiler-sfc': optional: true dependencies: - '@babel/core': 7.23.3 - '@babel/generator': 7.23.4 - '@babel/parser': 7.23.4 - '@babel/traverse': 7.23.4 - '@babel/types': 7.23.4 - prettier: 3.1.0 + '@babel/core': 7.23.7 + '@babel/generator': 7.23.6 + '@babel/parser': 7.23.6 + '@babel/traverse': 7.23.7 + '@babel/types': 7.23.6 + prettier: 3.2.2 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -771,7 +771,7 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 dev: true /@jridgewell/resolve-uri@3.1.1: @@ -786,8 +786,8 @@ packages: /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - /@jridgewell/trace-mapping@0.3.20: - resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} + /@jridgewell/trace-mapping@0.3.21: + resolution: {integrity: sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==} dependencies: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 @@ -803,7 +803,7 @@ packages: resolution: {integrity: sha512-B/A1dY/w4F/t6cDHUscklO6ovb/ztFsrsTXFd8QlqSByk/vyy+QbPE3VVpmmyI/7RX+PA1AJcvBdzCIz+r9dVQ==} engines: {node: '>=16.0.0'} dependencies: - '@metamask/utils': 8.2.1 + '@metamask/utils': 8.3.0 superstruct: 1.0.3 transitivePeerDependencies: - supports-color @@ -826,7 +826,7 @@ packages: dependencies: '@ethereumjs/util': 8.1.0 '@metamask/abi-utils': 2.0.2 - '@metamask/utils': 8.2.1 + '@metamask/utils': 8.3.0 ethereum-cryptography: 2.1.2 tweetnacl: 1.0.3 tweetnacl-util: 0.15.1 @@ -834,13 +834,13 @@ packages: - supports-color dev: true - /@metamask/utils@8.2.1: - resolution: {integrity: sha512-dlnpow8r0YHDDL1xKCEwUoTGOAo9icdv+gaJG0EbgDnkD/BDqW2eH1XMtm9i7rPaiHWo/aLtcrh9WBhkCq/viw==} + /@metamask/utils@8.3.0: + resolution: {integrity: sha512-WFVcMPEkKKRCJ8DDkZUTVbLlpwgRn98F4VM/WzN89HM8PmHMnCyk/oG0AmK/seOxtik7uC7Bbi2YBC5Z5XB2zw==} engines: {node: '>=16.0.0'} dependencies: '@ethereumjs/tx': 4.2.0 - '@noble/hashes': 1.3.2 - '@scure/base': 1.1.3 + '@noble/hashes': 1.3.3 + '@scure/base': 1.1.5 '@types/debug': 4.1.12 debug: 4.3.4(supports-color@8.1.1) pony-cause: 2.1.10 @@ -874,6 +874,12 @@ packages: /@noble/hashes@1.3.2: resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} + dev: false + + /@noble/hashes@1.3.3: + resolution: {integrity: sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==} + engines: {node: '>= 16'} + dev: true /@noble/secp256k1@1.7.1: resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} @@ -897,7 +903,7 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 + fastq: 1.16.0 dev: true /@nomicfoundation/ethereumjs-block@5.0.2: @@ -1164,15 +1170,15 @@ packages: '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1 dev: false - /@scure/base@1.1.3: - resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} + /@scure/base@1.1.5: + resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} /@scure/bip32@1.1.5: resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} dependencies: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.3 + '@scure/base': 1.1.5 dev: false /@scure/bip32@1.3.1: @@ -1180,21 +1186,21 @@ packages: dependencies: '@noble/curves': 1.1.0 '@noble/hashes': 1.3.1 - '@scure/base': 1.1.3 + '@scure/base': 1.1.5 dev: true /@scure/bip39@1.1.1: resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} dependencies: '@noble/hashes': 1.2.0 - '@scure/base': 1.1.3 + '@scure/base': 1.1.5 dev: false /@scure/bip39@1.2.1: resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} dependencies: '@noble/hashes': 1.3.1 - '@scure/base': 1.1.3 + '@scure/base': 1.1.5 dev: true /@sentry/core@5.30.0: @@ -1282,13 +1288,13 @@ packages: /@types/bn.js@4.11.6: resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: false /@types/bn.js@5.1.5: resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: false /@types/debug@4.1.12: @@ -1321,8 +1327,8 @@ packages: resolution: {integrity: sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==} dev: false - /@types/node@20.10.2: - resolution: {integrity: sha512-37MXfxkb0vuIlRKHNxwCkb60PNBpR94u4efQuN4JgIAm66zfCDXGSAFCef9XUWFovX2R1ok6Z7MHhtdVXXkkIw==} + /@types/node@20.11.1: + resolution: {integrity: sha512-DsXojJUES2M+FE8CpptJTKpg+r54moV9ZEncPstni1WHFmTcCzeFLnMFfyhCVS8XNOy/OQG+8lVxRLRrVHmV5A==} dependencies: undici-types: 5.26.5 @@ -1341,28 +1347,28 @@ packages: /@types/pbkdf2@3.1.2: resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: false /@types/readable-stream@2.3.15: resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 safe-buffer: 5.1.2 dev: false /@types/secp256k1@4.0.6: resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: false /@types/semver@7.5.6: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true - /@typescript-eslint/eslint-plugin@6.13.1(@typescript-eslint/parser@6.13.1)(eslint@8.54.0)(typescript@5.3.2): - resolution: {integrity: sha512-5bQDGkXaxD46bPvQt08BUz9YSaO4S0fB1LB5JHQuXTfkGPI3+UUeS387C/e9jRie5GqT8u5kFTrMvAjtX4O5kA==} + /@typescript-eslint/eslint-plugin@6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-nISDRYnnIpk7VCFrGcu1rnZfM1Dh9LRHnfgdkjcbi/l7g16VYRri3TjXi9Ir4lOZSw5N/gnV/3H7jIPQ8Q4daA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -1373,25 +1379,25 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.13.1(eslint@8.54.0)(typescript@5.3.2) - '@typescript-eslint/scope-manager': 6.13.1 - '@typescript-eslint/type-utils': 6.13.1(eslint@8.54.0)(typescript@5.3.2) - '@typescript-eslint/utils': 6.13.1(eslint@8.54.0)(typescript@5.3.2) - '@typescript-eslint/visitor-keys': 6.13.1 + '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.18.1 + '@typescript-eslint/type-utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.18.1 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.54.0 + eslint: 8.56.0 graphemer: 1.4.0 ignore: 5.3.0 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.3.2) - typescript: 5.3.2 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.13.1(eslint@8.54.0)(typescript@5.3.2): - resolution: {integrity: sha512-fs2XOhWCzRhqMmQf0eicLa/CWSaYss2feXsy7xBD/pLyWke/jCIVc2s1ikEAtSW7ina1HNhv7kONoEfVNEcdDQ==} + /@typescript-eslint/parser@6.18.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1400,27 +1406,27 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.13.1 - '@typescript-eslint/types': 6.13.1 - '@typescript-eslint/typescript-estree': 6.13.1(typescript@5.3.2) - '@typescript-eslint/visitor-keys': 6.13.1 + '@typescript-eslint/scope-manager': 6.18.1 + '@typescript-eslint/types': 6.18.1 + '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.18.1 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.54.0 - typescript: 5.3.2 + eslint: 8.56.0 + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@6.13.1: - resolution: {integrity: sha512-BW0kJ7ceiKi56GbT2KKzZzN+nDxzQK2DS6x0PiSMPjciPgd/JRQGMibyaN2cPt2cAvuoH0oNvn2fwonHI+4QUQ==} + /@typescript-eslint/scope-manager@6.18.1: + resolution: {integrity: sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.13.1 - '@typescript-eslint/visitor-keys': 6.13.1 + '@typescript-eslint/types': 6.18.1 + '@typescript-eslint/visitor-keys': 6.18.1 dev: true - /@typescript-eslint/type-utils@6.13.1(eslint@8.54.0)(typescript@5.3.2): - resolution: {integrity: sha512-A2qPlgpxx2v//3meMqQyB1qqTg1h1dJvzca7TugM3Yc2USDY+fsRBiojAEo92HO7f5hW5mjAUF6qobOPzlBCBQ==} + /@typescript-eslint/type-utils@6.18.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-wyOSKhuzHeU/5pcRDP2G2Ndci+4g653V43gXTpt4nbyoIOAASkGDA9JIAgbQCdCkcr1MvpSYWzxTz0olCn8+/Q==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1429,23 +1435,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.13.1(typescript@5.3.2) - '@typescript-eslint/utils': 6.13.1(eslint@8.54.0)(typescript@5.3.2) + '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3) + '@typescript-eslint/utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3) debug: 4.3.4(supports-color@8.1.1) - eslint: 8.54.0 - ts-api-utils: 1.0.3(typescript@5.3.2) - typescript: 5.3.2 + eslint: 8.56.0 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@6.13.1: - resolution: {integrity: sha512-gjeEskSmiEKKFIbnhDXUyiqVma1gRCQNbVZ1C8q7Zjcxh3WZMbzWVfGE9rHfWd1msQtPS0BVD9Jz9jded44eKg==} + /@typescript-eslint/types@6.18.1: + resolution: {integrity: sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.13.1(typescript@5.3.2): - resolution: {integrity: sha512-sBLQsvOC0Q7LGcUHO5qpG1HxRgePbT6wwqOiGLpR8uOJvPJbfs0mW3jPA3ujsDvfiVwVlWUDESNXv44KtINkUQ==} + /@typescript-eslint/typescript-estree@6.18.1(typescript@5.3.3): + resolution: {integrity: sha512-fv9B94UAhywPRhUeeV/v+3SBDvcPiLxRZJw/xZeeGgRLQZ6rLMG+8krrJUyIf6s1ecWTzlsbp0rlw7n9sjufHA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1453,42 +1459,43 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.13.1 - '@typescript-eslint/visitor-keys': 6.13.1 + '@typescript-eslint/types': 6.18.1 + '@typescript-eslint/visitor-keys': 6.18.1 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 + minimatch: 9.0.3 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.3.2) - typescript: 5.3.2 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.13.1(eslint@8.54.0)(typescript@5.3.2): - resolution: {integrity: sha512-ouPn/zVoan92JgAegesTXDB/oUp6BP1v8WpfYcqh649ejNc9Qv+B4FF2Ff626kO1xg0wWwwG48lAJ4JuesgdOw==} + /@typescript-eslint/utils@6.18.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-zZmTuVZvD1wpoceHvoQpOiewmWu3uP9FuTWo8vqpy2ffsmfCE8mklRPi+vmnIYAIk9t/4kOThri2QCDgor+OpQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 6.13.1 - '@typescript-eslint/types': 6.13.1 - '@typescript-eslint/typescript-estree': 6.13.1(typescript@5.3.2) - eslint: 8.54.0 + '@typescript-eslint/scope-manager': 6.18.1 + '@typescript-eslint/types': 6.18.1 + '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3) + eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@6.13.1: - resolution: {integrity: sha512-NDhQUy2tg6XGNBGDRm1XybOHSia8mcXmlbKWoQP+nm1BIIMxa55shyJfZkHpEBN62KNPLrocSM2PdPcaLgDKMQ==} + /@typescript-eslint/visitor-keys@6.18.1: + resolution: {integrity: sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.13.1 + '@typescript-eslint/types': 6.18.1 eslint-visitor-keys: 3.4.3 dev: true @@ -1509,20 +1516,20 @@ packages: queue-microtask: 1.2.3 dev: false - /acorn-jsx@5.3.2(acorn@8.11.2): + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.11.2 + acorn: 8.11.3 dev: true - /acorn-walk@8.3.0: - resolution: {integrity: sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==} + /acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} - /acorn@8.11.2: - resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true @@ -1738,7 +1745,6 @@ packages: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 - dev: false /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} @@ -1774,15 +1780,15 @@ packages: safe-buffer: 5.2.1 dev: false - /browserslist@4.22.1: - resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} + /browserslist@4.22.2: + resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001565 - electron-to-chromium: 1.4.594 - node-releases: 2.0.13 - update-browserslist-db: 1.0.13(browserslist@4.22.1) + caniuse-lite: 1.0.30001576 + electron-to-chromium: 1.4.630 + node-releases: 2.0.14 + update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true /bs58@4.0.1: @@ -1824,7 +1830,7 @@ packages: dependencies: function-bind: 1.1.2 get-intrinsic: 1.2.2 - set-function-length: 1.1.1 + set-function-length: 1.2.0 dev: true /callsites@3.1.0: @@ -1837,8 +1843,8 @@ packages: engines: {node: '>=10'} dev: false - /caniuse-lite@1.0.30001565: - resolution: {integrity: sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==} + /caniuse-lite@1.0.30001576: + resolution: {integrity: sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==} dev: true /case@1.6.3: @@ -1901,7 +1907,7 @@ packages: catering: 2.1.1 module-error: 1.0.2 napi-macros: 2.2.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 dev: false /clean-stack@2.2.0: @@ -2093,8 +2099,8 @@ packages: esutils: 2.0.3 dev: true - /electron-to-chromium@1.4.594: - resolution: {integrity: sha512-xT1HVAu5xFn7bDfkjGQi9dNpMqGchUkebwf1GL7cZN32NSwwlHRPMSDJ1KN6HkS0bWUtndbSQZqvpQftKG2uFQ==} + /electron-to-chromium@1.4.630: + resolution: {integrity: sha512-osHqhtjojpCsACVnuD11xO5g9xaCyw7Qqn/C2KParkMv42i8jrJJgx3g7mkHfpxwhy9MnOJr8+pKOdZ7qzgizg==} dev: true /elliptic@6.5.4: @@ -2162,10 +2168,10 @@ packages: is-weakref: 1.0.2 object-inspect: 1.13.1 object-keys: 1.1.1 - object.assign: 4.1.4 + object.assign: 4.1.5 regexp.prototype.flags: 1.5.1 safe-array-concat: 1.0.1 - safe-regex-test: 1.0.0 + safe-regex-test: 1.0.2 string.prototype.trim: 1.2.8 string.prototype.trimend: 1.0.7 string.prototype.trimstart: 1.0.7 @@ -2223,7 +2229,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.13.1)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -2244,16 +2250,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.13.1(eslint@8.54.0)(typescript@5.3.2) + '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3) debug: 3.2.7 - eslint: 8.54.0 + eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.29.0(@typescript-eslint/parser@6.13.1)(eslint@8.54.0): - resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==} + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0): + resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -2262,16 +2268,16 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.13.1(eslint@8.54.0)(typescript@5.3.2) + '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.54.0 + eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.13.1)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -2280,19 +2286,19 @@ packages: object.groupby: 1.0.1 object.values: 1.1.7 semver: 6.3.1 - tsconfig-paths: 3.14.2 + tsconfig-paths: 3.15.0 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color dev: true - /eslint-plugin-prefer-arrow@1.2.3(eslint@8.54.0): + /eslint-plugin-prefer-arrow@1.2.3(eslint@8.56.0): resolution: {integrity: sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==} peerDependencies: eslint: '>=2.0.0' dependencies: - eslint: 8.54.0 + eslint: 8.56.0 dev: true /eslint-scope@7.2.2: @@ -2308,16 +2314,16 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.54.0: - resolution: {integrity: sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==} + /eslint@8.56.0: + resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.3 - '@eslint/js': 8.54.0 - '@humanwhocodes/config-array': 0.11.13 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.56.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 @@ -2336,7 +2342,7 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.23.0 + globals: 13.24.0 graphemer: 1.4.0 ignore: 5.3.0 imurmurhash: 0.1.4 @@ -2359,8 +2365,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.11.2 - acorn-jsx: 5.3.2(acorn@8.11.2) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 dev: true @@ -2483,8 +2489,8 @@ packages: - utf-8-validate dev: false - /ethers@6.9.0: - resolution: {integrity: sha512-pmfNyQzc2mseLe91FnT2vmNaTt8dDzhxZ/xItAV7uGsF4dI4ek2ufMu3rAkgQETL/TIs0GS5A+U05g9QyWnv3Q==} + /ethers@6.10.0: + resolution: {integrity: sha512-nMNwYHzs6V1FR3Y4cdfxSQmNgZsRj1RiTU25JwvnJLmyzw9z3SKxNc2XKDuiXXo/v9ds5Mp9m6HBabgYQQ26tA==} engines: {node: '>=14.0.0'} dependencies: '@adraffy/ens-normalize': 1.10.0 @@ -2537,8 +2543,8 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + /fastq@1.16.0: + resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==} dependencies: reusify: 1.0.4 dev: true @@ -2588,8 +2594,8 @@ packages: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true - /follow-redirects@1.15.3(debug@4.3.4): - resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} + /follow-redirects@1.15.5(debug@4.3.4): + resolution: {integrity: sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -2738,8 +2744,8 @@ packages: engines: {node: '>=4'} dev: true - /globals@13.23.0: - resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -2777,7 +2783,7 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /hardhat@2.19.1(ts-node@10.9.1)(typescript@5.3.2): + /hardhat@2.19.1(ts-node@10.9.2)(typescript@5.3.3): resolution: {integrity: sha512-bsWa63g1GB78ZyMN08WLhFElLPA+J+pShuKD1BFO2+88g3l+BL3R07vj9deIi9dMbssxgE714Gof1dBEDGqnCw==} hasBin: true peerDependencies: @@ -2833,9 +2839,9 @@ packages: solc: 0.7.3(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 - ts-node: 10.9.1(@types/node@20.10.2)(typescript@5.3.2) + ts-node: 10.9.2(@types/node@20.11.1)(typescript@5.3.3) tsort: 0.0.1 - typescript: 5.3.2 + typescript: 5.3.3 undici: 5.28.2 uuid: 8.3.2 ws: 7.5.9 @@ -3238,7 +3244,7 @@ packages: requiresBuild: true dependencies: node-addon-api: 2.0.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 readable-stream: 3.6.2 dev: false @@ -3399,6 +3405,13 @@ packages: brace-expansion: 2.0.1 dev: false + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true @@ -3470,13 +3483,13 @@ packages: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} dev: false - /node-gyp-build@4.7.1: - resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==} + /node-gyp-build@4.8.0: + resolution: {integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==} hasBin: true dev: false - /node-releases@2.0.13: - resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + /node-releases@2.0.14: + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true /normalize-path@3.0.0: @@ -3493,8 +3506,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + /object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.5 @@ -3616,7 +3629,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.23.4 + '@babel/code-frame': 7.23.5 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -3692,8 +3705,8 @@ packages: sort-order: 1.1.2 dev: true - /prettier@3.1.0: - resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + /prettier@3.2.2: + resolution: {integrity: sha512-HTByuKZzw7utPiDO523Tt2pLtEyK7OibUD9suEJQrPUCYQqrHr74GGX6VidMrovbf/I50mPqr8j/II6oBAuc5A==} engines: {node: '>=14'} hasBin: true dev: true @@ -3844,8 +3857,9 @@ packages: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: false - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + /safe-regex-test@1.0.2: + resolution: {integrity: sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 @@ -3867,7 +3881,7 @@ packages: dependencies: elliptic: 6.5.4 node-addon-api: 2.0.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 dev: false /semver@5.7.2: @@ -3892,11 +3906,12 @@ packages: randombytes: 2.1.0 dev: false - /set-function-length@1.1.1: - resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + /set-function-length@1.2.0: + resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==} engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.1 + function-bind: 1.1.2 get-intrinsic: 1.2.2 gopd: 1.0.1 has-property-descriptors: 1.0.1 @@ -3959,7 +3974,7 @@ packages: dependencies: command-exists: 1.2.9 commander: 3.0.2 - follow-redirects: 1.15.3(debug@4.3.4) + follow-redirects: 1.15.5(debug@4.3.4) fs-extra: 0.30.0 js-sha3: 0.8.0 memorystream: 0.3.1 @@ -4119,17 +4134,17 @@ packages: engines: {node: '>=0.6'} dev: false - /ts-api-utils@1.0.3(typescript@5.3.2): + /ts-api-utils@1.0.3(typescript@5.3.3): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.3.2 + typescript: 5.3.3 dev: true - /ts-node@10.9.1(@types/node@20.10.2)(typescript@5.3.2): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + /ts-node@10.9.2(@types/node@20.11.1)(typescript@5.3.3): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: '@swc/core': '>=1.2.50' @@ -4147,19 +4162,19 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.10.2 - acorn: 8.11.2 - acorn-walk: 8.3.0 + '@types/node': 20.11.1 + acorn: 8.11.3 + acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.3.2 + typescript: 5.3.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - /tsconfig-paths@3.14.2: - resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} + /tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: '@types/json5': 0.0.29 json5: 1.0.2 @@ -4249,8 +4264,8 @@ packages: is-typed-array: 1.1.12 dev: true - /typescript@5.3.2: - resolution: {integrity: sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==} + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true @@ -4288,13 +4303,13 @@ packages: engines: {node: '>= 0.8'} dev: false - /update-browserslist-db@1.0.13(browserslist@4.22.1): + /update-browserslist-db@1.0.13(browserslist@4.22.2): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.22.1 + browserslist: 4.22.2 escalade: 3.1.1 picocolors: 1.0.0 dev: true diff --git a/src/eas.ts b/src/eas.ts index b77a117..61da576 100644 --- a/src/eas.ts +++ b/src/eas.ts @@ -450,7 +450,7 @@ export class EAS extends Base { version: await this.getVersion(), chainId: await this.getChainId() }, - OffchainAttestationVersion.Version1, + OffchainAttestationVersion.Version2, this ); diff --git a/src/offchain/offchain-utils.ts b/src/offchain/offchain-utils.ts index f9a1748..cb94fc7 100644 --- a/src/offchain/offchain-utils.ts +++ b/src/offchain/offchain-utils.ts @@ -1,18 +1,19 @@ import { ZeroAddress, ZeroHash } from 'ethers'; import * as Base64 from 'js-base64'; import pako from 'pako'; -import { EIP712MessageTypes, SignedOffchainAttestation } from './offchain'; +import { EIP712MessageTypes, OffchainAttestationVersion, SignedOffchainAttestation } from './offchain'; -export interface SignedOffchainAttestationV1 extends Omit { +export interface SignedOffchainAttestationV1 extends Omit { r: string; s: string; v: number; } export interface AttestationShareablePackageObject { - /** Signed typed data with attestation object */ + // Signed typed data with attestation object sig: SignedOffchainAttestation; - /** Address of the signer */ + + // Address of the signer signer: string; } @@ -33,7 +34,8 @@ export type CompactAttestationShareablePackageObject = [ revocable: boolean, data: string, nonce: number, - offchainVersion?: number + offchainVersion?: number, + salt?: string ]; export const createOffchainURL = (pkg: AttestationShareablePackageObject) => { @@ -63,8 +65,8 @@ export const decodeBase64ZippedBase64 = (base64: string): AttestationShareablePa export const compactOffchainAttestationPackage = ( pkg: AttestationShareablePackageObject ): CompactAttestationShareablePackageObject => { - const signer = pkg.signer; - let sig = pkg.sig; + const { signer } = pkg; + let { sig } = pkg; if (isSignedOffchainAttestationV1(sig)) { sig = convertV1AttestationToV2(sig); @@ -87,14 +89,15 @@ export const compactOffchainAttestationPackage = ( sig.message.revocable, sig.message.data, Number(sig.message.nonce), - sig.message.version + sig.message.version, + sig.message.salt ]; }; export const uncompactOffchainAttestationPackage = ( compacted: CompactAttestationShareablePackageObject ): AttestationShareablePackageObject => { - const version = compacted[16] ? compacted[16] : 0; + const version = compacted[16] ? compacted[16] : OffchainAttestationVersion.Legacy; const attestTypes: EIP712MessageTypes = { Attest: [ @@ -129,22 +132,50 @@ export const uncompactOffchainAttestationPackage = ( ] }; - if (version === 1) { - attestTypes.Attest.unshift({ - name: 'version', - type: 'uint16' - }); + switch (version) { + case OffchainAttestationVersion.Legacy: + break; + + case OffchainAttestationVersion.Version1: + attestTypes.Attest = [ + { + name: 'version', + type: 'uint16' + }, + ...attestTypes.Attest + ]; + + break; + + case OffchainAttestationVersion.Version2: + attestTypes.Attest = [ + { + name: 'version', + type: 'uint16' + }, + ...attestTypes.Attest, + { + name: 'salt', + type: 'bytes32' + } + ]; + + break; + + default: + throw new Error(`Unsupported version: ${version}`); } return { sig: { + version, domain: { name: 'EAS Attestation', version: compacted[0], chainId: BigInt(compacted[1]), verifyingContract: compacted[2] }, - primaryType: version === 0 ? 'Attestation' : 'Attest', + primaryType: version === OffchainAttestationVersion.Legacy ? 'Attestation' : 'Attest', types: attestTypes, signature: { r: compacted[3], @@ -161,7 +192,8 @@ export const uncompactOffchainAttestationPackage = ( refUID: compacted[12] === '0' ? ZeroHash : compacted[12], revocable: compacted[13], data: compacted[14], - nonce: BigInt(compacted[15]) + nonce: BigInt(compacted[15]), + salt: compacted[17] } }, signer: compacted[6] @@ -178,6 +210,7 @@ function convertV1AttestationToV2(attestation: SignedOffchainAttestationV1): Sig const { v, r, s, ...rest } = attestation; return { ...rest, + version: OffchainAttestationVersion.Version1, signature: { v, r, diff --git a/src/offchain/offchain.ts b/src/offchain/offchain.ts index 1c4e311..a0f8da0 100644 --- a/src/offchain/offchain.ts +++ b/src/offchain/offchain.ts @@ -1,4 +1,4 @@ -import { AbiCoder, keccak256, Signer, toUtf8Bytes } from 'ethers'; +import { AbiCoder, hexlify, keccak256, randomBytes, Signer, toUtf8Bytes } from 'ethers'; import { EAS } from '../eas'; import { getOffchainUID, ZERO_BYTES32 } from '../utils'; import { EIP712_NAME } from './delegated'; @@ -22,7 +22,8 @@ export interface OffchainAttestationType extends EIP712Types export enum OffchainAttestationVersion { Legacy = 0, - Version1 = 1 + Version1 = 1, + Version2 = 2 } export const OFFCHAIN_ATTESTATION_TYPES: Record = { @@ -90,11 +91,29 @@ export const OFFCHAIN_ATTESTATION_TYPES: Record; +export type OffchainAttestationTypedData = OffchainAttestationParams & { version: OffchainAttestationVersion }; + export type OffchainAttestationOptions = { + salt?: string; verifyOnchain: boolean; }; @@ -112,18 +135,21 @@ const DEFAULT_OFFCHAIN_ATTESTATION_OPTIONS: OffchainAttestationOptions = { verifyOnchain: false }; -export interface SignedOffchainAttestation extends EIP712Response { +export interface SignedOffchainAttestation extends EIP712Response { + version: OffchainAttestationVersion; uid: string; } +export const SALT_SIZE = 32; + export class Offchain extends TypedDataHandler { public readonly version: OffchainAttestationVersion; protected signingType: OffchainAttestationType; protected readonly verificationTypes: OffchainAttestationType[]; private readonly eas: EAS; - constructor(config: PartialTypedDataConfig, version: number, eas: EAS) { - if (version > OffchainAttestationVersion.Version1) { + constructor(config: PartialTypedDataConfig, version: OffchainAttestationVersion, eas: EAS) { + if (version > OffchainAttestationVersion.Version2) { throw new Error('Unsupported version'); } @@ -132,6 +158,7 @@ export class Offchain extends TypedDataHandler { this.version = version; this.verificationTypes = OFFCHAIN_ATTESTATION_TYPES[this.version]; this.signingType = this.verificationTypes[0]; + this.eas = eas; } @@ -163,14 +190,19 @@ export class Offchain extends TypedDataHandler { signer: Signer, options?: OffchainAttestationOptions ): Promise { - const uid = Offchain.getOffchainUID(params); + const typedData = { version: this.version, ...params }; - const signedRequest = await this.signTypedDataRequest( - params, + // If no salt was provided - generate a random salt. + if (this.version >= OffchainAttestationVersion.Version2 && !typedData.salt) { + typedData.salt = hexlify(randomBytes(SALT_SIZE)); + } + + const signedRequest = await this.signTypedDataRequest( + typedData, { domain: this.getDomainTypedData(), primaryType: this.signingType.primaryType, - message: params, + message: typedData, types: this.signingType.types }, signer @@ -193,13 +225,14 @@ export class Offchain extends TypedDataHandler { } return { - ...signedRequest, - uid + version: this.version, + uid: this.getOffchainUID(typedData), + ...signedRequest }; } - public verifyOffchainAttestationSignature(attester: string, request: SignedOffchainAttestation): boolean { - if (request.uid !== Offchain.getOffchainUID(request.message)) { + public verifyOffchainAttestationSignature(attester: string, attestation: SignedOffchainAttestation): boolean { + if (attestation.uid !== Offchain.getOffchainUID(this.version, attestation)) { return false; } @@ -208,7 +241,7 @@ export class Offchain extends TypedDataHandler { try { return this.verifyTypedDataRequestSignature( attester, - request, + attestation, { primaryType: type.primaryType, types: type.types @@ -225,16 +258,31 @@ export class Offchain extends TypedDataHandler { }); } - public static getOffchainUID(params: OffchainAttestationParams): string { + private getOffchainUID(params: OffchainAttestationParams): string { return getOffchainUID( - params.version ?? OffchainAttestationVersion.Legacy, + this.version, params.schema, params.recipient, params.time, params.expirationTime, params.revocable, params.refUID, - params.data + params.data, + params.salt + ); + } + + public static getOffchainUID(version: OffchainAttestationVersion, attestation: SignedOffchainAttestation): string { + return getOffchainUID( + version, + attestation.message.schema, + attestation.message.recipient, + attestation.message.time, + attestation.message.expirationTime, + attestation.message.revocable, + attestation.message.refUID, + attestation.message.data, + attestation.message.salt ); } } diff --git a/src/utils.ts b/src/utils.ts index e5376e9..28becb9 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -9,6 +9,7 @@ import { TransactionResponse, ZeroAddress } from 'ethers'; +import { OffchainAttestationVersion } from './offchain'; export const ZERO_ADDRESS = ZeroAddress; export const ZERO_BYTES = '0x'; @@ -53,16 +54,17 @@ export const getOffchainUID = ( expirationTime: bigint, revocable: boolean, refUID: string, - data: string + data: string, + salt?: string ) => { switch (version) { - case 0: + case OffchainAttestationVersion.Legacy: return solidityPackedKeccak256( ['bytes', 'address', 'address', 'uint64', 'uint64', 'bool', 'bytes32', 'bytes', 'uint32'], [hexlify(toUtf8Bytes(schema)), recipient, ZERO_ADDRESS, time, expirationTime, revocable, refUID, data, 0] ); - case 1: + case OffchainAttestationVersion.Version1: return solidityPackedKeccak256( ['uint16', 'bytes', 'address', 'address', 'uint64', 'uint64', 'bool', 'bytes32', 'bytes', 'uint32'], [ @@ -79,6 +81,24 @@ export const getOffchainUID = ( ] ); + case OffchainAttestationVersion.Version2: + return solidityPackedKeccak256( + ['uint16', 'bytes', 'address', 'address', 'uint64', 'uint64', 'bool', 'bytes32', 'bytes', 'bytes32', 'uint32'], + [ + version, + hexlify(toUtf8Bytes(schema)), + recipient, + ZERO_ADDRESS, + time, + expirationTime, + revocable, + refUID, + data, + salt, + 0 + ] + ); + default: throw new Error('Unsupported version'); } diff --git a/test/package.json b/test/package.json index 4a8cd5a..2462674 100755 --- a/test/package.json +++ b/test/package.json @@ -18,28 +18,28 @@ "@types/chai": "^4.3.11", "@types/chai-as-promised": "^7.1.8", "@types/mocha": "^10.0.6", - "@types/node": "^20.10.2", + "@types/node": "^20.11.1", "chai-as-promised": "^7.1.1", "chai-bigint": "^0.2.0", "decimal.js": "^10.4.3", - "eslint": "^8.54.0", - "eslint-config-prettier": "^9.0.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.1.0", - "eslint-plugin-import": "^2.29.0", - "eslint-plugin-n": "^16.3.1", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-n": "^16.6.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.1.1", "ethereumjs-util": "^7.1.5", - "ethers": "^6.9.0", + "ethers": "^6.10.0", "glob": "^10.3.10", - "hardhat": "2.19.1", + "hardhat": "2.19.4", "hardhat-dependency-compiler": "^1.1.3", "mocha": "^10.2.0", - "prettier": "^3.1.0", + "prettier": "^3.2.2", "prettier-package-json": "^2.8.0", - "prettier-plugin-solidity": "^1.2.0", - "ts-node": "^10.9.1", + "prettier-plugin-solidity": "^1.3.1", + "ts-node": "^10.9.2", "typechain": "^8.3.2", - "typescript": "^5.3.2" + "typescript": "^5.3.3" } } diff --git a/test/pnpm-lock.yaml b/test/pnpm-lock.yaml index 3a6e596..d0410cb 100644 --- a/test/pnpm-lock.yaml +++ b/test/pnpm-lock.yaml @@ -7,25 +7,25 @@ settings: devDependencies: '@ethereum-attestation-service/eas-contracts': specifier: 1.3.7 - version: 1.3.7(ts-node@10.9.1)(typescript@5.3.2) + version: 1.3.7(ts-node@10.9.2)(typescript@5.3.3) '@ianvs/prettier-plugin-sort-imports': specifier: ^4.1.1 - version: 4.1.1(prettier@3.1.0) + version: 4.1.1(prettier@3.2.2) '@nomicfoundation/hardhat-ethers': specifier: ^3.0.5 - version: 3.0.5(ethers@6.9.0)(hardhat@2.19.1) + version: 3.0.5(ethers@6.10.0)(hardhat@2.19.4) '@nomicfoundation/hardhat-toolbox': specifier: ^4.0.0 - version: 4.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.2)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.9)(@nomicfoundation/hardhat-verify@2.0.1)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.11)(@types/mocha@10.0.6)(@types/node@20.10.2)(chai@4.3.10)(ethers@6.9.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.19.1)(solidity-coverage@0.8.5)(ts-node@10.9.1)(typechain@8.3.2)(typescript@5.3.2) + version: 4.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.3)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.10)(@nomicfoundation/hardhat-verify@2.0.3)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.11)(@types/mocha@10.0.6)(@types/node@20.11.1)(chai@4.4.1)(ethers@6.10.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.19.4)(solidity-coverage@0.8.5)(ts-node@10.9.2)(typechain@8.3.2)(typescript@5.3.3) '@openzeppelin/contracts': specifier: 4.9.3 version: 4.9.3 '@typechain/ethers-v6': specifier: ^0.5.1 - version: 0.5.1(ethers@6.9.0)(typechain@8.3.2)(typescript@5.3.2) + version: 0.5.1(ethers@6.10.0)(typechain@8.3.2)(typescript@5.3.3) '@typechain/hardhat': specifier: ^9.1.0 - version: 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.9.0)(hardhat@2.19.1)(typechain@8.3.2) + version: 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.19.4)(typechain@8.3.2) '@types/chai': specifier: ^4.3.11 version: 4.3.11 @@ -36,11 +36,11 @@ devDependencies: specifier: ^10.0.6 version: 10.0.6 '@types/node': - specifier: ^20.10.2 - version: 20.10.2 + specifier: ^20.11.1 + version: 20.11.1 chai-as-promised: specifier: ^7.1.1 - version: 7.1.1(chai@4.3.10) + version: 7.1.1(chai@4.4.1) chai-bigint: specifier: ^0.2.0 version: 0.2.0 @@ -48,62 +48,62 @@ devDependencies: specifier: ^10.4.3 version: 10.4.3 eslint: - specifier: ^8.54.0 - version: 8.54.0 + specifier: ^8.56.0 + version: 8.56.0 eslint-config-prettier: - specifier: ^9.0.0 - version: 9.0.0(eslint@8.54.0) + specifier: ^9.1.0 + version: 9.1.0(eslint@8.56.0) eslint-config-standard: specifier: ^17.1.0 - version: 17.1.0(eslint-plugin-import@2.29.0)(eslint-plugin-n@16.3.1)(eslint-plugin-promise@6.1.1)(eslint@8.54.0) + version: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0) eslint-plugin-import: - specifier: ^2.29.0 - version: 2.29.0(eslint@8.54.0) + specifier: ^2.29.1 + version: 2.29.1(eslint@8.56.0) eslint-plugin-n: - specifier: ^16.3.1 - version: 16.3.1(eslint@8.54.0) + specifier: ^16.6.2 + version: 16.6.2(eslint@8.56.0) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@8.54.0) + version: 11.1.0(eslint@8.56.0) eslint-plugin-promise: specifier: ^6.1.1 - version: 6.1.1(eslint@8.54.0) + version: 6.1.1(eslint@8.56.0) ethereumjs-util: specifier: ^7.1.5 version: 7.1.5 ethers: - specifier: ^6.9.0 - version: 6.9.0 + specifier: ^6.10.0 + version: 6.10.0 glob: specifier: ^10.3.10 version: 10.3.10 hardhat: - specifier: 2.19.1 - version: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + specifier: 2.19.4 + version: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) hardhat-dependency-compiler: specifier: ^1.1.3 - version: 1.1.3(hardhat@2.19.1) + version: 1.1.3(hardhat@2.19.4) mocha: specifier: ^10.2.0 version: 10.2.0 prettier: - specifier: ^3.1.0 - version: 3.1.0 + specifier: ^3.2.2 + version: 3.2.2 prettier-package-json: specifier: ^2.8.0 version: 2.8.0 prettier-plugin-solidity: - specifier: ^1.2.0 - version: 1.2.0(prettier@3.1.0) + specifier: ^1.3.1 + version: 1.3.1(prettier@3.2.2) ts-node: - specifier: ^10.9.1 - version: 10.9.1(@types/node@20.10.2)(typescript@5.3.2) + specifier: ^10.9.2 + version: 10.9.2(@types/node@20.11.1)(typescript@5.3.3) typechain: specifier: ^8.3.2 - version: 8.3.2(typescript@5.3.2) + version: 8.3.2(typescript@5.3.3) typescript: - specifier: ^5.3.2 - version: 5.3.2 + specifier: ^5.3.3 + version: 5.3.3 packages: @@ -121,36 +121,36 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 dev: true - /@babel/code-frame@7.23.4: - resolution: {integrity: sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA==} + /@babel/code-frame@7.23.5: + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.23.4 chalk: 2.4.2 dev: true - /@babel/compat-data@7.23.3: - resolution: {integrity: sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==} + /@babel/compat-data@7.23.5: + resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.23.3: - resolution: {integrity: sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==} + /@babel/core@7.23.7: + resolution: {integrity: sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.23.4 - '@babel/generator': 7.23.4 - '@babel/helper-compilation-targets': 7.22.15 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.3) - '@babel/helpers': 7.23.4 - '@babel/parser': 7.23.4 + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.7) + '@babel/helpers': 7.23.8 + '@babel/parser': 7.23.6 '@babel/template': 7.22.15 - '@babel/traverse': 7.23.4 - '@babel/types': 7.23.4 + '@babel/traverse': 7.23.7 + '@babel/types': 7.23.6 convert-source-map: 2.0.0 debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 @@ -160,23 +160,23 @@ packages: - supports-color dev: true - /@babel/generator@7.23.4: - resolution: {integrity: sha512-esuS49Cga3HcThFNebGhlgsrVLkvhqvYDTzgjfFFlHJcIfLe5jFmRRfCQ1KuBfc4Jrtn3ndLgKWAKjBE+IraYQ==} + /@babel/generator@7.23.6: + resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 jsesc: 2.5.2 dev: true - /@babel/helper-compilation-targets@7.22.15: - resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} + /@babel/helper-compilation-targets@7.23.6: + resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/compat-data': 7.23.3 - '@babel/helper-validator-option': 7.22.15 - browserslist: 4.22.1 + '@babel/compat-data': 7.23.5 + '@babel/helper-validator-option': 7.23.5 + browserslist: 4.22.2 lru-cache: 5.1.1 semver: 6.3.1 dev: true @@ -191,30 +191,30 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-module-imports@7.22.15: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true - /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.3): + /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.7): resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.23.3 + '@babel/core': 7.23.7 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 @@ -226,14 +226,14 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-string-parser@7.23.4: @@ -246,18 +246,18 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-option@7.22.15: - resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} + /@babel/helper-validator-option@7.23.5: + resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} dev: true - /@babel/helpers@7.23.4: - resolution: {integrity: sha512-HfcMizYz10cr3h29VqyfGL6ZWIjTwWfvYBMsBVGwpcbhNGe3wQ1ZXZRPzZoAHhd9OqHadHqjQ89iVKINXnbzuw==} + /@babel/helpers@7.23.8: + resolution: {integrity: sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/traverse': 7.23.4 - '@babel/types': 7.23.4 + '@babel/traverse': 7.23.7 + '@babel/types': 7.23.6 transitivePeerDependencies: - supports-color dev: true @@ -271,43 +271,43 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser@7.23.4: - resolution: {integrity: sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==} + /@babel/parser@7.23.6: + resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/template@7.22.15: resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.23.4 - '@babel/parser': 7.23.4 - '@babel/types': 7.23.4 + '@babel/code-frame': 7.23.5 + '@babel/parser': 7.23.6 + '@babel/types': 7.23.6 dev: true - /@babel/traverse@7.23.4: - resolution: {integrity: sha512-IYM8wSUwunWTB6tFC2dkKZhxbIjHoWemdK+3f8/wq8aKhbUscxD5MX72ubd90fxvFknaLPeGw5ycU84V1obHJg==} + /@babel/traverse@7.23.7: + resolution: {integrity: sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.23.4 - '@babel/generator': 7.23.4 + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.23.4 - '@babel/types': 7.23.4 + '@babel/parser': 7.23.6 + '@babel/types': 7.23.6 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types@7.23.4: - resolution: {integrity: sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==} + /@babel/types@7.23.6: + resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.23.4 @@ -353,13 +353,13 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.54.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.54.0 + eslint: 8.56.0 eslint-visitor-keys: 3.4.3 dev: true @@ -368,14 +368,14 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.3: - resolution: {integrity: sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==} + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 - globals: 13.23.0 + globals: 13.24.0 ignore: 5.3.0 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -385,15 +385,15 @@ packages: - supports-color dev: true - /@eslint/js@8.54.0: - resolution: {integrity: sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==} + /@eslint/js@8.56.0: + resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@ethereum-attestation-service/eas-contracts@1.3.7(ts-node@10.9.1)(typescript@5.3.2): + /@ethereum-attestation-service/eas-contracts@1.3.7(ts-node@10.9.2)(typescript@5.3.3): resolution: {integrity: sha512-msCKGDhqSjfkx0lbs0PPkf/Z6bWxaYT9ze/uLoRh1tM7W8N27mobX4g6AsjATqGC+eWHRfliK9eCwJQj7TU8WA==} dependencies: - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.19.1(ts-node@10.9.2)(typescript@5.3.3) transitivePeerDependencies: - bufferutil - supports-color @@ -737,11 +737,11 @@ packages: engines: {node: '>=14'} dev: true - /@humanwhocodes/config-array@0.11.13: - resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.1 + '@humanwhocodes/object-schema': 2.0.2 debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: @@ -753,11 +753,11 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.1: - resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + /@humanwhocodes/object-schema@2.0.2: + resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} dev: true - /@ianvs/prettier-plugin-sort-imports@4.1.1(prettier@3.1.0): + /@ianvs/prettier-plugin-sort-imports@4.1.1(prettier@3.2.2): resolution: {integrity: sha512-kJhXq63ngpTQ2dxgf5GasbPJWsJA3LgoOdd7WGhpUSzLgLgI4IsIzYkbJf9kmpOHe7Vdm/o3PcRA3jmizXUuAQ==} peerDependencies: '@vue/compiler-sfc': '>=3.0.0' @@ -766,12 +766,12 @@ packages: '@vue/compiler-sfc': optional: true dependencies: - '@babel/core': 7.23.3 - '@babel/generator': 7.23.4 - '@babel/parser': 7.23.4 - '@babel/traverse': 7.23.4 - '@babel/types': 7.23.4 - prettier: 3.1.0 + '@babel/core': 7.23.7 + '@babel/generator': 7.23.6 + '@babel/parser': 7.23.6 + '@babel/traverse': 7.23.7 + '@babel/types': 7.23.6 + prettier: 3.2.2 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -795,7 +795,7 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 dev: true /@jridgewell/resolve-uri@3.1.1: @@ -812,8 +812,8 @@ packages: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - /@jridgewell/trace-mapping@0.3.20: - resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} + /@jridgewell/trace-mapping@0.3.21: + resolution: {integrity: sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==} dependencies: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 @@ -885,7 +885,7 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 + fastq: 1.16.0 dev: true /@nomicfoundation/ethereumjs-block@5.0.2: @@ -1046,48 +1046,48 @@ packages: - utf-8-validate dev: true - /@nomicfoundation/hardhat-chai-matchers@2.0.2(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.3.10)(ethers@6.9.0)(hardhat@2.19.1): - resolution: {integrity: sha512-9Wu9mRtkj0U9ohgXYFbB/RQDa+PcEdyBm2suyEtsJf3PqzZEEjLUZgWnMjlFhATMk/fp3BjmnYVPrwl+gr8oEw==} + /@nomicfoundation/hardhat-chai-matchers@2.0.3(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.4.1)(ethers@6.10.0)(hardhat@2.19.4): + resolution: {integrity: sha512-A40s7EAK4Acr8UP1Yudgi9GGD9Cca/K3LHt3DzmRIje14lBfHtg9atGQ7qK56vdPcTwKmeaGn30FzxMUfPGEMw==} peerDependencies: '@nomicfoundation/hardhat-ethers': ^3.0.0 chai: ^4.2.0 ethers: ^6.1.0 hardhat: ^2.9.4 dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.9.0)(hardhat@2.19.1) + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.19.4) '@types/chai-as-promised': 7.1.8 - chai: 4.3.10 - chai-as-promised: 7.1.1(chai@4.3.10) + chai: 4.4.1 + chai-as-promised: 7.1.1(chai@4.4.1) deep-eql: 4.1.3 - ethers: 6.9.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + ethers: 6.10.0 + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) ordinal: 1.0.3 dev: true - /@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.9.0)(hardhat@2.19.1): + /@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.10.0)(hardhat@2.19.4): resolution: {integrity: sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw==} peerDependencies: ethers: ^6.1.0 hardhat: ^2.0.0 dependencies: debug: 4.3.4(supports-color@8.1.1) - ethers: 6.9.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + ethers: 6.10.0 + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) lodash.isequal: 4.5.0 transitivePeerDependencies: - supports-color dev: true - /@nomicfoundation/hardhat-network-helpers@1.0.9(hardhat@2.19.1): - resolution: {integrity: sha512-OXWCv0cHpwLUO2u7bFxBna6dQtCC2Gg/aN/KtJLO7gmuuA28vgmVKYFRCDUqrbjujzgfwQ2aKyZ9Y3vSmDqS7Q==} + /@nomicfoundation/hardhat-network-helpers@1.0.10(hardhat@2.19.4): + resolution: {integrity: sha512-R35/BMBlx7tWN5V6d/8/19QCwEmIdbnA4ZrsuXgvs8i2qFx5i7h6mH5pBS4Pwi4WigLH+upl6faYusrNPuzMrQ==} peerDependencies: hardhat: ^2.9.5 dependencies: ethereumjs-util: 7.1.5 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) dev: true - /@nomicfoundation/hardhat-toolbox@4.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.2)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.9)(@nomicfoundation/hardhat-verify@2.0.1)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.11)(@types/mocha@10.0.6)(@types/node@20.10.2)(chai@4.3.10)(ethers@6.9.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.19.1)(solidity-coverage@0.8.5)(ts-node@10.9.1)(typechain@8.3.2)(typescript@5.3.2): + /@nomicfoundation/hardhat-toolbox@4.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.3)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.10)(@nomicfoundation/hardhat-verify@2.0.3)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.11)(@types/mocha@10.0.6)(@types/node@20.11.1)(chai@4.4.1)(ethers@6.10.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.19.4)(solidity-coverage@0.8.5)(ts-node@10.9.2)(typechain@8.3.2)(typescript@5.3.3): resolution: {integrity: sha512-jhcWHp0aHaL0aDYj8IJl80v4SZXWMS1A2XxXa1CA6pBiFfJKuZinCkO6wb+POAt0LIfXB3gA3AgdcOccrcwBwA==} peerDependencies: '@nomicfoundation/hardhat-chai-matchers': ^2.0.0 @@ -1108,27 +1108,27 @@ packages: typechain: ^8.3.0 typescript: '>=4.5.0' dependencies: - '@nomicfoundation/hardhat-chai-matchers': 2.0.2(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.3.10)(ethers@6.9.0)(hardhat@2.19.1) - '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.9.0)(hardhat@2.19.1) - '@nomicfoundation/hardhat-network-helpers': 1.0.9(hardhat@2.19.1) - '@nomicfoundation/hardhat-verify': 2.0.1(hardhat@2.19.1) - '@typechain/ethers-v6': 0.5.1(ethers@6.9.0)(typechain@8.3.2)(typescript@5.3.2) - '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.9.0)(hardhat@2.19.1)(typechain@8.3.2) + '@nomicfoundation/hardhat-chai-matchers': 2.0.3(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.4.1)(ethers@6.10.0)(hardhat@2.19.4) + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.19.4) + '@nomicfoundation/hardhat-network-helpers': 1.0.10(hardhat@2.19.4) + '@nomicfoundation/hardhat-verify': 2.0.3(hardhat@2.19.4) + '@typechain/ethers-v6': 0.5.1(ethers@6.10.0)(typechain@8.3.2)(typescript@5.3.3) + '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.19.4)(typechain@8.3.2) '@types/chai': 4.3.11 '@types/mocha': 10.0.6 - '@types/node': 20.10.2 - chai: 4.3.10 - ethers: 6.9.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) - hardhat-gas-reporter: 1.0.9(hardhat@2.19.1) - solidity-coverage: 0.8.5(hardhat@2.19.1) - ts-node: 10.9.1(@types/node@20.10.2)(typescript@5.3.2) - typechain: 8.3.2(typescript@5.3.2) - typescript: 5.3.2 - dev: true - - /@nomicfoundation/hardhat-verify@2.0.1(hardhat@2.19.1): - resolution: {integrity: sha512-TuJrhW5p9x92wDRiRhNkGQ/wzRmOkfCLkoRg8+IRxyeLigOALbayQEmkNiGWR03vGlxZS4znXhKI7y97JwZ6Og==} + '@types/node': 20.11.1 + chai: 4.4.1 + ethers: 6.10.0 + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) + hardhat-gas-reporter: 1.0.9(hardhat@2.19.4) + solidity-coverage: 0.8.5(hardhat@2.19.4) + ts-node: 10.9.2(@types/node@20.11.1)(typescript@5.3.3) + typechain: 8.3.2(typescript@5.3.3) + typescript: 5.3.3 + dev: true + + /@nomicfoundation/hardhat-verify@2.0.3(hardhat@2.19.4): + resolution: {integrity: sha512-ESbRu9by53wu6VvgwtMtm108RSmuNsVqXtzg061D+/4R7jaWh/Wl/8ve+p6SdDX7vA1Z3L02hDO1Q3BY4luLXQ==} peerDependencies: hardhat: ^2.0.4 dependencies: @@ -1137,7 +1137,7 @@ packages: cbor: 8.1.0 chalk: 2.4.2 debug: 4.3.4(supports-color@8.1.1) - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) lodash.clonedeep: 4.5.0 semver: 6.3.1 table: 6.8.1 @@ -1263,8 +1263,8 @@ packages: dev: true optional: true - /@scure/base@1.1.3: - resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} + /@scure/base@1.1.5: + resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} dev: true /@scure/bip32@1.1.5: @@ -1272,29 +1272,29 @@ packages: dependencies: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.3 + '@scure/base': 1.1.5 dev: true /@scure/bip32@1.3.1: resolution: {integrity: sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==} dependencies: '@noble/curves': 1.1.0 - '@noble/hashes': 1.3.2 - '@scure/base': 1.1.3 + '@noble/hashes': 1.3.1 + '@scure/base': 1.1.5 dev: true /@scure/bip39@1.1.1: resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} dependencies: '@noble/hashes': 1.2.0 - '@scure/base': 1.1.3 + '@scure/base': 1.1.5 dev: true /@scure/bip39@1.2.1: resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} dependencies: - '@noble/hashes': 1.3.2 - '@scure/base': 1.1.3 + '@noble/hashes': 1.3.1 + '@scure/base': 1.1.5 dev: true /@sentry/core@5.30.0: @@ -1379,6 +1379,10 @@ packages: antlr4ts: 0.5.0-alpha.4 dev: true + /@solidity-parser/parser@0.17.0: + resolution: {integrity: sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw==} + dev: true + /@tsconfig/node10@1.0.9: resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} dev: true @@ -1395,21 +1399,21 @@ packages: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true - /@typechain/ethers-v6@0.5.1(ethers@6.9.0)(typechain@8.3.2)(typescript@5.3.2): + /@typechain/ethers-v6@0.5.1(ethers@6.10.0)(typechain@8.3.2)(typescript@5.3.3): resolution: {integrity: sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==} peerDependencies: ethers: 6.x typechain: ^8.3.2 typescript: '>=4.7.0' dependencies: - ethers: 6.9.0 + ethers: 6.10.0 lodash: 4.17.21 - ts-essentials: 7.0.3(typescript@5.3.2) - typechain: 8.3.2(typescript@5.3.2) - typescript: 5.3.2 + ts-essentials: 7.0.3(typescript@5.3.3) + typechain: 8.3.2(typescript@5.3.3) + typescript: 5.3.3 dev: true - /@typechain/hardhat@9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.9.0)(hardhat@2.19.1)(typechain@8.3.2): + /@typechain/hardhat@9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.19.4)(typechain@8.3.2): resolution: {integrity: sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==} peerDependencies: '@typechain/ethers-v6': ^0.5.1 @@ -1417,23 +1421,23 @@ packages: hardhat: ^2.9.9 typechain: ^8.3.2 dependencies: - '@typechain/ethers-v6': 0.5.1(ethers@6.9.0)(typechain@8.3.2)(typescript@5.3.2) - ethers: 6.9.0 + '@typechain/ethers-v6': 0.5.1(ethers@6.10.0)(typechain@8.3.2)(typescript@5.3.3) + ethers: 6.10.0 fs-extra: 9.1.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) - typechain: 8.3.2(typescript@5.3.2) + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) + typechain: 8.3.2(typescript@5.3.3) dev: true /@types/bn.js@4.11.6: resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: true /@types/bn.js@5.1.5: resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: true /@types/chai-as-promised@7.1.8: @@ -1449,20 +1453,20 @@ packages: /@types/concat-stream@1.6.1: resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: true /@types/form-data@0.0.33: resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: true /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: true /@types/json5@0.0.29: @@ -1489,8 +1493,8 @@ packages: resolution: {integrity: sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==} dev: true - /@types/node@20.10.2: - resolution: {integrity: sha512-37MXfxkb0vuIlRKHNxwCkb60PNBpR94u4efQuN4JgIAm66zfCDXGSAFCef9XUWFovX2R1ok6Z7MHhtdVXXkkIw==} + /@types/node@20.11.1: + resolution: {integrity: sha512-DsXojJUES2M+FE8CpptJTKpg+r54moV9ZEncPstni1WHFmTcCzeFLnMFfyhCVS8XNOy/OQG+8lVxRLRrVHmV5A==} dependencies: undici-types: 5.26.5 dev: true @@ -1510,28 +1514,28 @@ packages: /@types/pbkdf2@3.1.2: resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: true /@types/prettier@2.7.3: resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} dev: true - /@types/qs@6.9.10: - resolution: {integrity: sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==} + /@types/qs@6.9.11: + resolution: {integrity: sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==} dev: true /@types/readable-stream@2.3.15: resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 safe-buffer: 5.1.2 dev: true /@types/secp256k1@4.0.6: resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} dependencies: - '@types/node': 20.10.2 + '@types/node': 20.11.1 dev: true /@ungap/structured-clone@1.2.0: @@ -1555,21 +1559,21 @@ packages: queue-microtask: 1.2.3 dev: true - /acorn-jsx@5.3.2(acorn@8.11.2): + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.11.2 + acorn: 8.11.3 dev: true - /acorn-walk@8.3.0: - resolution: {integrity: sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==} + /acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} dev: true - /acorn@8.11.2: - resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -1829,10 +1833,10 @@ packages: engines: {node: '>= 0.4'} dev: true - /axios@1.6.2: - resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==} + /axios@1.6.5: + resolution: {integrity: sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==} dependencies: - follow-redirects: 1.15.3(debug@4.3.4) + follow-redirects: 1.15.5(debug@4.3.4) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -1931,15 +1935,15 @@ packages: safe-buffer: 5.2.1 dev: true - /browserslist@4.22.1: - resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} + /browserslist@4.22.2: + resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001565 - electron-to-chromium: 1.4.594 - node-releases: 2.0.13 - update-browserslist-db: 1.0.13(browserslist@4.22.1) + caniuse-lite: 1.0.30001576 + electron-to-chromium: 1.4.630 + node-releases: 2.0.14 + update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true /bs58@4.0.1: @@ -1992,7 +1996,7 @@ packages: dependencies: function-bind: 1.1.2 get-intrinsic: 1.2.2 - set-function-length: 1.1.1 + set-function-length: 1.2.0 dev: true /callsites@3.1.0: @@ -2005,8 +2009,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001565: - resolution: {integrity: sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==} + /caniuse-lite@1.0.30001576: + resolution: {integrity: sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==} dev: true /case@1.6.3: @@ -2030,12 +2034,12 @@ packages: nofilter: 3.1.0 dev: true - /chai-as-promised@7.1.1(chai@4.3.10): + /chai-as-promised@7.1.1(chai@4.4.1): resolution: {integrity: sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==} peerDependencies: chai: '>= 2.1.2 < 5' dependencies: - chai: 4.3.10 + chai: 4.4.1 check-error: 1.0.3 dev: true @@ -2045,8 +2049,8 @@ packages: yargs: 17.7.2 dev: true - /chai@4.3.10: - resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + /chai@4.4.1: + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 @@ -2120,7 +2124,7 @@ packages: catering: 2.1.1 module-error: 1.0.2 napi-macros: 2.2.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 dev: true /clean-stack@2.2.0: @@ -2435,8 +2439,8 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /electron-to-chromium@1.4.594: - resolution: {integrity: sha512-xT1HVAu5xFn7bDfkjGQi9dNpMqGchUkebwf1GL7cZN32NSwwlHRPMSDJ1KN6HkS0bWUtndbSQZqvpQftKG2uFQ==} + /electron-to-chromium@1.4.630: + resolution: {integrity: sha512-osHqhtjojpCsACVnuD11xO5g9xaCyw7Qqn/C2KParkMv42i8jrJJgx3g7mkHfpxwhy9MnOJr8+pKOdZ7qzgizg==} dev: true /elliptic@6.5.4: @@ -2508,10 +2512,10 @@ packages: is-weakref: 1.0.2 object-inspect: 1.13.1 object-keys: 1.1.1 - object.assign: 4.1.4 + object.assign: 4.1.5 regexp.prototype.flags: 1.5.1 safe-array-concat: 1.0.1 - safe-regex-test: 1.0.0 + safe-regex-test: 1.0.2 string.prototype.trim: 1.2.8 string.prototype.trimend: 1.0.7 string.prototype.trimstart: 1.0.7 @@ -2575,25 +2579,25 @@ packages: source-map: 0.2.0 dev: true - /eslint-compat-utils@0.1.2(eslint@8.54.0): + /eslint-compat-utils@0.1.2(eslint@8.56.0): resolution: {integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==} engines: {node: '>=12'} peerDependencies: eslint: '>=6.0.0' dependencies: - eslint: 8.54.0 + eslint: 8.56.0 dev: true - /eslint-config-prettier@9.0.0(eslint@8.54.0): - resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} + /eslint-config-prettier@9.1.0(eslint@8.56.0): + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.54.0 + eslint: 8.56.0 dev: true - /eslint-config-standard@17.1.0(eslint-plugin-import@2.29.0)(eslint-plugin-n@16.3.1)(eslint-plugin-promise@6.1.1)(eslint@8.54.0): + /eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0): resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==} engines: {node: '>=12.0.0'} peerDependencies: @@ -2602,10 +2606,10 @@ packages: eslint-plugin-n: '^15.0.0 || ^16.0.0 ' eslint-plugin-promise: ^6.0.0 dependencies: - eslint: 8.54.0 - eslint-plugin-import: 2.29.0(eslint@8.54.0) - eslint-plugin-n: 16.3.1(eslint@8.54.0) - eslint-plugin-promise: 6.1.1(eslint@8.54.0) + eslint: 8.56.0 + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 16.6.2(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) dev: true /eslint-import-resolver-node@0.3.9: @@ -2618,7 +2622,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(eslint-import-resolver-node@0.3.9)(eslint@8.54.0): + /eslint-module-utils@2.8.0(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -2640,37 +2644,37 @@ packages: optional: true dependencies: debug: 3.2.7 - eslint: 8.54.0 + eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es-x@7.4.0(eslint@8.54.0): - resolution: {integrity: sha512-WJa3RhYzBtl8I37ebY9p76s61UhZyi4KaFOnX2A5r32RPazkXj5yoT6PGnD02dhwzEUj0KwsUdqfKDd/OuvGsw==} + /eslint-plugin-es-x@7.5.0(eslint@8.56.0): + resolution: {integrity: sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@eslint-community/regexpp': 4.10.0 - eslint: 8.54.0 - eslint-compat-utils: 0.1.2(eslint@8.54.0) + eslint: 8.56.0 + eslint-compat-utils: 0.1.2(eslint@8.56.0) dev: true - /eslint-plugin-es@3.0.1(eslint@8.54.0): + /eslint-plugin-es@3.0.1(eslint@8.56.0): resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.54.0 + eslint: 8.56.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import@2.29.0(eslint@8.54.0): - resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==} + /eslint-plugin-import@2.29.1(eslint@8.56.0): + resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -2685,9 +2689,9 @@ packages: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.54.0 + eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint@8.54.0) + eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -2696,24 +2700,25 @@ packages: object.groupby: 1.0.1 object.values: 1.1.7 semver: 6.3.1 - tsconfig-paths: 3.14.2 + tsconfig-paths: 3.15.0 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color dev: true - /eslint-plugin-n@16.3.1(eslint@8.54.0): - resolution: {integrity: sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==} + /eslint-plugin-n@16.6.2(eslint@8.56.0): + resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==} engines: {node: '>=16.0.0'} peerDependencies: eslint: '>=7.0.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) builtins: 5.0.1 - eslint: 8.54.0 - eslint-plugin-es-x: 7.4.0(eslint@8.54.0) + eslint: 8.56.0 + eslint-plugin-es-x: 7.5.0(eslint@8.56.0) get-tsconfig: 4.7.2 + globals: 13.24.0 ignore: 5.3.0 is-builtin-module: 3.2.1 is-core-module: 2.13.1 @@ -2722,14 +2727,14 @@ packages: semver: 7.5.4 dev: true - /eslint-plugin-node@11.1.0(eslint@8.54.0): + /eslint-plugin-node@11.1.0(eslint@8.56.0): resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.54.0 - eslint-plugin-es: 3.0.1(eslint@8.54.0) + eslint: 8.56.0 + eslint-plugin-es: 3.0.1(eslint@8.56.0) eslint-utils: 2.1.0 ignore: 5.3.0 minimatch: 3.1.2 @@ -2737,13 +2742,13 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-promise@6.1.1(eslint@8.54.0): + /eslint-plugin-promise@6.1.1(eslint@8.56.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.54.0 + eslint: 8.56.0 dev: true /eslint-scope@7.2.2: @@ -2771,16 +2776,16 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.54.0: - resolution: {integrity: sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==} + /eslint@8.56.0: + resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.3 - '@eslint/js': 8.54.0 - '@humanwhocodes/config-array': 0.11.13 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.56.0 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 @@ -2799,7 +2804,7 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.23.0 + globals: 13.24.0 graphemer: 1.4.0 ignore: 5.3.0 imurmurhash: 0.1.4 @@ -2822,8 +2827,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.11.2 - acorn-jsx: 5.3.2(acorn@8.11.2) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 dev: true @@ -2877,7 +2882,7 @@ packages: optional: true dependencies: '@solidity-parser/parser': 0.14.5 - axios: 1.6.2 + axios: 1.6.5 cli-table3: 0.5.1 colors: 1.4.0 ethereum-cryptography: 1.2.0 @@ -3007,8 +3012,8 @@ packages: - utf-8-validate dev: true - /ethers@6.9.0: - resolution: {integrity: sha512-pmfNyQzc2mseLe91FnT2vmNaTt8dDzhxZ/xItAV7uGsF4dI4ek2ufMu3rAkgQETL/TIs0GS5A+U05g9QyWnv3Q==} + /ethers@6.10.0: + resolution: {integrity: sha512-nMNwYHzs6V1FR3Y4cdfxSQmNgZsRj1RiTU25JwvnJLmyzw9z3SKxNc2XKDuiXXo/v9ds5Mp9m6HBabgYQQ26tA==} engines: {node: '>=14.0.0'} dependencies: '@adraffy/ens-normalize': 1.10.0 @@ -3069,8 +3074,8 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + /fastq@1.16.0: + resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==} dependencies: reusify: 1.0.4 dev: true @@ -3129,8 +3134,8 @@ packages: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true - /follow-redirects@1.15.3(debug@4.3.4): - resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} + /follow-redirects@1.15.5(debug@4.3.4): + resolution: {integrity: sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -3402,8 +3407,8 @@ packages: engines: {node: '>=4'} dev: true - /globals@13.23.0: - resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -3457,23 +3462,23 @@ packages: uglify-js: 3.17.4 dev: true - /hardhat-dependency-compiler@1.1.3(hardhat@2.19.1): + /hardhat-dependency-compiler@1.1.3(hardhat@2.19.4): resolution: {integrity: sha512-bCDqsOxGST6WkbMvj4lPchYWidNSSBm5CFnkyAex1T11cGmr9otZTGl81W6f9pmrtBXbKCvr3OSuNJ6Q394sAw==} engines: {node: '>=14.14.0'} peerDependencies: hardhat: ^2.0.0 dependencies: - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) dev: true - /hardhat-gas-reporter@1.0.9(hardhat@2.19.1): + /hardhat-gas-reporter@1.0.9(hardhat@2.19.4): resolution: {integrity: sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==} peerDependencies: hardhat: ^2.0.2 dependencies: array-uniq: 1.0.3 eth-gas-reporter: 0.2.27 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) sha1: 1.1.1 transitivePeerDependencies: - '@codechecks/client' @@ -3482,7 +3487,7 @@ packages: - utf-8-validate dev: true - /hardhat@2.19.1(ts-node@10.9.1)(typescript@5.3.2): + /hardhat@2.19.1(ts-node@10.9.2)(typescript@5.3.3): resolution: {integrity: sha512-bsWa63g1GB78ZyMN08WLhFElLPA+J+pShuKD1BFO2+88g3l+BL3R07vj9deIi9dMbssxgE714Gof1dBEDGqnCw==} hasBin: true peerDependencies: @@ -3538,10 +3543,78 @@ packages: solc: 0.7.3(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 - ts-node: 10.9.1(@types/node@20.10.2)(typescript@5.3.2) + ts-node: 10.9.2(@types/node@20.11.1)(typescript@5.3.3) + tsort: 0.0.1 + typescript: 5.3.3 + undici: 5.28.2 + uuid: 8.3.2 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /hardhat@2.19.4(ts-node@10.9.2)(typescript@5.3.3): + resolution: {integrity: sha512-fTQJpqSt3Xo9Mn/WrdblNGAfcANM6XC3tAEi6YogB4s02DmTf93A8QsGb8uR0KR8TFcpcS8lgiW4ugAIYpnbrQ==} + hasBin: true + peerDependencies: + ts-node: '*' + typescript: '*' + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + dependencies: + '@ethersproject/abi': 5.7.0 + '@metamask/eth-sig-util': 4.0.1 + '@nomicfoundation/ethereumjs-block': 5.0.2 + '@nomicfoundation/ethereumjs-blockchain': 7.0.2 + '@nomicfoundation/ethereumjs-common': 4.0.2 + '@nomicfoundation/ethereumjs-evm': 2.0.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-statemanager': 2.0.2 + '@nomicfoundation/ethereumjs-trie': 6.0.2 + '@nomicfoundation/ethereumjs-tx': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + '@nomicfoundation/ethereumjs-vm': 7.0.2 + '@nomicfoundation/solidity-analyzer': 0.1.1 + '@sentry/node': 5.30.0 + '@types/bn.js': 5.1.5 + '@types/lru-cache': 5.1.1 + adm-zip: 0.4.16 + aggregate-error: 3.1.0 + ansi-escapes: 4.3.2 + chalk: 2.4.2 + chokidar: 3.5.3 + ci-info: 2.0.0 + debug: 4.3.4(supports-color@8.1.1) + enquirer: 2.4.1 + env-paths: 2.2.1 + ethereum-cryptography: 1.2.0 + ethereumjs-abi: 0.6.8 + find-up: 2.1.0 + fp-ts: 1.19.3 + fs-extra: 7.0.1 + glob: 7.2.0 + immutable: 4.3.4 + io-ts: 1.10.4 + keccak: 3.0.4 + lodash: 4.17.21 + mnemonist: 0.38.5 + mocha: 10.2.0 + p-map: 4.0.0 + raw-body: 2.5.2 + resolve: 1.17.0 + semver: 6.3.1 + solc: 0.7.3(debug@4.3.4) + source-map-support: 0.5.21 + stacktrace-parser: 0.1.10 + ts-node: 10.9.2(@types/node@20.11.1)(typescript@5.3.3) tsort: 0.0.1 - typescript: 5.3.2 - undici: 5.28.1 + typescript: 5.3.3 + undici: 5.28.2 uuid: 8.3.2 ws: 7.5.9 transitivePeerDependencies: @@ -4022,7 +4095,7 @@ packages: requiresBuild: true dependencies: node-addon-api: 2.0.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 readable-stream: 3.6.2 dev: true @@ -4348,13 +4421,13 @@ packages: lodash: 4.17.21 dev: true - /node-gyp-build@4.7.1: - resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==} + /node-gyp-build@4.8.0: + resolution: {integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==} hasBin: true dev: true - /node-releases@2.0.13: - resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + /node-releases@2.0.14: + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true /nofilter@3.1.0: @@ -4396,8 +4469,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + /object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.5 @@ -4538,7 +4611,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.23.4 + '@babel/code-frame': 7.23.5 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -4635,16 +4708,16 @@ packages: sort-order: 1.1.2 dev: true - /prettier-plugin-solidity@1.2.0(prettier@3.1.0): - resolution: {integrity: sha512-fgxcUZpVAP+LlRfy5JI5oaAkXGkmsje2VJ5krv/YMm+rcTZbIUwFguSw5f+WFuttMjpDm6wB4UL7WVkArEfiVA==} + /prettier-plugin-solidity@1.3.1(prettier@3.2.2): + resolution: {integrity: sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA==} engines: {node: '>=16'} peerDependencies: prettier: '>=2.3.0' dependencies: - '@solidity-parser/parser': 0.16.2 - prettier: 3.1.0 + '@solidity-parser/parser': 0.17.0 + prettier: 3.2.2 semver: 7.5.4 - solidity-comments-extractor: 0.0.7 + solidity-comments-extractor: 0.0.8 dev: true /prettier@2.8.8: @@ -4653,8 +4726,8 @@ packages: hasBin: true dev: true - /prettier@3.1.0: - resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + /prettier@3.2.2: + resolution: {integrity: sha512-HTByuKZzw7utPiDO523Tt2pLtEyK7OibUD9suEJQrPUCYQqrHr74GGX6VidMrovbf/I50mPqr8j/II6oBAuc5A==} engines: {node: '>=14'} hasBin: true dev: true @@ -4890,8 +4963,9 @@ packages: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + /safe-regex-test@1.0.2: + resolution: {integrity: sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 @@ -4933,7 +5007,7 @@ packages: dependencies: elliptic: 6.5.4 node-addon-api: 2.0.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 dev: true /semver@5.7.2: @@ -4960,11 +5034,12 @@ packages: randombytes: 2.1.0 dev: true - /set-function-length@1.1.1: - resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + /set-function-length@1.2.0: + resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==} engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.1 + function-bind: 1.1.2 get-intrinsic: 1.2.2 gopd: 1.0.1 has-property-descriptors: 1.0.1 @@ -5058,7 +5133,7 @@ packages: dependencies: command-exists: 1.2.9 commander: 3.0.2 - follow-redirects: 1.15.3(debug@4.3.4) + follow-redirects: 1.15.5(debug@4.3.4) fs-extra: 0.30.0 js-sha3: 0.8.0 memorystream: 0.3.1 @@ -5069,11 +5144,11 @@ packages: - debug dev: true - /solidity-comments-extractor@0.0.7: - resolution: {integrity: sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==} + /solidity-comments-extractor@0.0.8: + resolution: {integrity: sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g==} dev: true - /solidity-coverage@0.8.5(hardhat@2.19.1): + /solidity-coverage@0.8.5(hardhat@2.19.4): resolution: {integrity: sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==} hasBin: true peerDependencies: @@ -5089,7 +5164,7 @@ packages: ghost-testrpc: 0.0.2 global-modules: 2.0.0 globby: 10.0.2 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) jsonschema: 1.4.1 lodash: 4.17.21 mocha: 10.2.0 @@ -5334,7 +5409,7 @@ packages: '@types/concat-stream': 1.6.1 '@types/form-data': 0.0.33 '@types/node': 8.10.66 - '@types/qs': 6.9.10 + '@types/qs': 6.9.11 caseless: 0.12.0 concat-stream: 1.6.2 form-data: 2.5.1 @@ -5378,16 +5453,16 @@ packages: string-format: 2.0.0 dev: true - /ts-essentials@7.0.3(typescript@5.3.2): + /ts-essentials@7.0.3(typescript@5.3.3): resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} peerDependencies: typescript: '>=3.7.0' dependencies: - typescript: 5.3.2 + typescript: 5.3.3 dev: true - /ts-node@10.9.1(@types/node@20.10.2)(typescript@5.3.2): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + /ts-node@10.9.2(@types/node@20.11.1)(typescript@5.3.3): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: '@swc/core': '>=1.2.50' @@ -5405,20 +5480,20 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.10.2 - acorn: 8.11.2 - acorn-walk: 8.3.0 + '@types/node': 20.11.1 + acorn: 8.11.3 + acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.3.2 + typescript: 5.3.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true - /tsconfig-paths@3.14.2: - resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} + /tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: '@types/json5': 0.0.29 json5: 1.0.2 @@ -5480,7 +5555,7 @@ packages: engines: {node: '>=8'} dev: true - /typechain@8.3.2(typescript@5.3.2): + /typechain@8.3.2(typescript@5.3.3): resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} hasBin: true peerDependencies: @@ -5495,8 +5570,8 @@ packages: mkdirp: 1.0.4 prettier: 2.8.8 ts-command-line-args: 2.5.1 - ts-essentials: 7.0.3(typescript@5.3.2) - typescript: 5.3.2 + ts-essentials: 7.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true @@ -5543,8 +5618,8 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typescript@5.3.2: - resolution: {integrity: sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==} + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -5580,13 +5655,6 @@ packages: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true - /undici@5.28.1: - resolution: {integrity: sha512-xcIIvj1LOQH9zAL54iWFkuDEaIVEjLrru7qRpa3GrEEHk6OBhb/LycuUY2m7VCcTuDeLziXCxobQVyKExyGeIA==} - engines: {node: '>=14.0'} - dependencies: - '@fastify/busboy': 2.1.0 - dev: true - /undici@5.28.2: resolution: {integrity: sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==} engines: {node: '>=14.0'} @@ -5609,13 +5677,13 @@ packages: engines: {node: '>= 0.8'} dev: true - /update-browserslist-db@1.0.13(browserslist@4.22.1): + /update-browserslist-db@1.0.13(browserslist@4.22.2): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.22.1 + browserslist: 4.22.2 escalade: 3.1.1 picocolors: 1.0.0 dev: true diff --git a/test/test/eas.ts b/test/test/eas.ts index ebb5291..efefe20 100644 --- a/test/test/eas.ts +++ b/test/test/eas.ts @@ -594,75 +594,99 @@ describe('EAS API', () => { offchain = await eas.getOffchain(); }); - describe('versioning', () => { - it(`should support version ${OffchainAttestationVersion.Legacy}`, async () => { - const response = await offchain.signOffchainAttestation( - { - version: OffchainAttestationVersion.Legacy, - schema: schemaId, - recipient: await recipient.getAddress(), - time: await latest(), - expirationTime: NO_EXPIRATION, - revocable: false, - refUID: ZERO_BYTES32, - data: ZERO_BYTES - }, - sender - ); - expect(await offchain.verifyOffchainAttestationSignature(await sender.getAddress(), response)).to.be.true; + describe('salting', () => { + beforeEach(async () => { + await registry.register(schema, ZERO_ADDRESS, true); }); - it(`should support version ${OffchainAttestationVersion.Version1}`, async () => { - const response = await offchain.signOffchainAttestation( - { - version: OffchainAttestationVersion.Version1, - schema: schemaId, - recipient: await recipient.getAddress(), - time: await latest(), - expirationTime: NO_EXPIRATION, - revocable: false, - refUID: ZERO_BYTES32, - data: ZERO_BYTES - }, - sender + it('should support customizable salts', async () => { + const params = { + version: OffchainAttestationVersion.Version2, + schema: schemaId, + recipient: await recipient.getAddress(), + time: await latest(), + expirationTime: NO_EXPIRATION, + revocable: false, + refUID: ZERO_BYTES32, + data: ZERO_BYTES + }; + + const attestation = await offchain.signOffchainAttestation( + { ...params, salt: encodeBytes32String('SALT1') }, + sender, + { verifyOnchain: true } ); - expect(await offchain.verifyOffchainAttestationSignature(await sender.getAddress(), response)).to.be.true; + expect(await offchain.verifyOffchainAttestationSignature(await sender.getAddress(), attestation)).to.be.true; + + const attestation2 = await offchain.signOffchainAttestation( + { ...params, salt: encodeBytes32String('SALT2') }, + sender, + { verifyOnchain: true } + ); + expect(await offchain.verifyOffchainAttestationSignature(await sender.getAddress(), attestation2)).to.be.true; + + expect(attestation.uid).not.to.be.equal(attestation2.uid); + }); + + it('should generate a random salt by default', async () => { + const params = { + version: OffchainAttestationVersion.Version2, + schema: schemaId, + recipient: await recipient.getAddress(), + time: await latest(), + expirationTime: NO_EXPIRATION, + revocable: false, + refUID: ZERO_BYTES32, + data: ZERO_BYTES + }; + + const attestation = await offchain.signOffchainAttestation(params, sender, { verifyOnchain: true }); + expect(await offchain.verifyOffchainAttestationSignature(await sender.getAddress(), attestation)).to.be.true; + + const attestation2 = await offchain.signOffchainAttestation(params, sender, { verifyOnchain: true }); + expect(await offchain.verifyOffchainAttestationSignature(await sender.getAddress(), attestation2)).to.be.true; + + expect(attestation.message.salt).not.to.be.equal(attestation2.message.salt); + expect(attestation.uid).not.to.be.equal(attestation2.uid); }); }); describe('verification', () => { + const salt = encodeBytes32String('SALT'); + beforeEach(async () => { await registry.register(schema, ZERO_ADDRESS, true); }); it('should verify the attestation onchain', async () => { - const response = await offchain.signOffchainAttestation( + const attestation = await offchain.signOffchainAttestation( { - version: OffchainAttestationVersion.Version1, schema: schemaId, recipient: await recipient.getAddress(), time: await latest(), expirationTime: NO_EXPIRATION, revocable: false, refUID: ZERO_BYTES32, - data: ZERO_BYTES + data: ZERO_BYTES, + salt }, sender, { verifyOnchain: true } ); - expect(await offchain.verifyOffchainAttestationSignature(await sender.getAddress(), response)).to.be.true; + expect(await offchain.verifyOffchainAttestationSignature(await sender.getAddress(), attestation)).to.be.true; }); it('should throw on onchain verification of invalid attestations', async () => { const params = { - version: OffchainAttestationVersion.Version1, + version: OffchainAttestationVersion.Version2, schema: schemaId, recipient: await recipient.getAddress(), time: await latest(), expirationTime: NO_EXPIRATION, revocable: false, refUID: ZERO_BYTES32, - data: ZERO_BYTES + data: ZERO_BYTES, + salt }; // Invalid schema @@ -686,7 +710,7 @@ describe('EAS API', () => { it('should throw on offchain verification of invalid attestations', async () => { const params = { - version: OffchainAttestationVersion.Version1, + version: OffchainAttestationVersion.Version2, schema: schemaId, recipient: await recipient.getAddress(), time: await latest(), @@ -697,31 +721,31 @@ describe('EAS API', () => { }; const senderAddress = await sender.getAddress(); - const response = await offchain.signOffchainAttestation(params, sender); + const attestation = await offchain.signOffchainAttestation(params, sender); // Invalid attester - expect(() => offchain.verifyOffchainAttestationSignature(ZERO_ADDRESS, response)).to.throw(InvalidAddress); + expect(() => offchain.verifyOffchainAttestationSignature(ZERO_ADDRESS, attestation)).to.throw(InvalidAddress); // Invalid domains - const { domain } = response; + const { domain } = attestation; await expect(() => offchain.verifyOffchainAttestationSignature(senderAddress, { - ...response, + ...attestation, ...{ domain: { ...domain, chainId: domain.chainId + 100n } } }) ).to.throw(InvalidDomain); await expect(() => offchain.verifyOffchainAttestationSignature(senderAddress, { - ...response, + ...attestation, ...{ domain: { ...domain, verifyingContract: ZERO_ADDRESS } } }) ).to.throw(InvalidDomain); await expect(() => offchain.verifyOffchainAttestationSignature(senderAddress, { - ...response, + ...attestation, ...{ domain: { ...domain, name: `BAD${domain.name}BAD` } } }) ).to.throw(InvalidDomain); @@ -729,7 +753,7 @@ describe('EAS API', () => { // Invalid version verification won't throw, due to the check not being strict, but will fail on signature await expect( offchain.verifyOffchainAttestationSignature(senderAddress, { - ...response, + ...attestation, ...{ domain: { ...domain, version: '9999.9999.9999' } } }) ).to.be.false; @@ -737,26 +761,26 @@ describe('EAS API', () => { // Invalid primary type await expect(() => offchain.verifyOffchainAttestationSignature(senderAddress, { - ...response, - ...{ primaryType: `BAD${response.primaryType}BAD` } + ...attestation, + ...{ primaryType: `BAD${attestation.primaryType}BAD` } }) ).to.throw(InvalidPrimaryType); // Invalid types await expect(() => offchain.verifyOffchainAttestationSignature(senderAddress, { - ...response, + ...attestation, ...{ - types: { [response.primaryType]: [{ name: 'schema', type: 'bytes32' }] } + types: { [attestation.primaryType]: [{ name: 'schema', type: 'bytes32' }] } } }) ).to.throw(InvalidTypes); await expect(() => offchain.verifyOffchainAttestationSignature(senderAddress, { - ...response, + ...attestation, ...{ - types: { BAD: response.types.values } + types: { BAD: attestation.types.values } } }) ).to.throw(InvalidTypes); @@ -786,8 +810,8 @@ describe('EAS API', () => { new EAS(ZERO_ADDRESS) ); - let response = await customOffchain.signOffchainAttestation(params, sender); - await expect(legacyOffchain.verifyOffchainAttestationSignature(senderAddress, response)).to.be.true; + let attestation = await customOffchain.signOffchainAttestation(params, sender); + await expect(legacyOffchain.verifyOffchainAttestationSignature(senderAddress, attestation)).to.be.true; // Legacy types for (const type of OFFCHAIN_ATTESTATION_TYPES[OffchainAttestationVersion.Legacy].slice(1)) { @@ -801,8 +825,8 @@ describe('EAS API', () => { new EAS(ZERO_ADDRESS) ); - response = await customOffchain.signOffchainAttestation(params, sender); - await expect(legacyOffchain.verifyOffchainAttestationSignature(senderAddress, response)).to.be.true; + attestation = await customOffchain.signOffchainAttestation(params, sender); + await expect(legacyOffchain.verifyOffchainAttestationSignature(senderAddress, attestation)).to.be.true; } }); @@ -818,7 +842,6 @@ describe('EAS API', () => { await expect( offchain.signOffchainAttestation( { - version: 1, schema: schema2Id, recipient: await recipient.getAddress(), time: await latest(), diff --git a/test/test/helpers/eas.ts b/test/test/helpers/eas.ts index 18930a6..86cb937 100644 --- a/test/test/helpers/eas.ts +++ b/test/test/helpers/eas.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { Signer } from 'ethers'; +import { encodeBytes32String, Signer } from 'ethers'; import { AttestationRequestData, EAS, @@ -170,32 +170,35 @@ export const expectAttestation = async ( const offchain = await eas.getOffchain(); const now = await latest(); + const salt = encodeBytes32String('SALT'); const uid = getOffchainUID( - OffchainAttestationVersion.Version1, + OffchainAttestationVersion.Version2, schema, recipient, now, expirationTime, revocable, refUID, - data + data, + salt ); - const response = await offchain.signOffchainAttestation( + + const attestation = await offchain.signOffchainAttestation( { - version: OffchainAttestationVersion.Version1, schema, recipient, time: now, expirationTime, revocable, refUID, - data + data, + salt }, txSender ); - expect(response.uid).to.equal(uid); - expect(await offchain.verifyOffchainAttestationSignature(await txSender.getAddress(), response)).to.be.true; + expect(attestation.uid).to.equal(uid); + expect(await offchain.verifyOffchainAttestationSignature(await txSender.getAddress(), attestation)).to.be.true; return uid; } diff --git a/test/test/offchain-utils.ts b/test/test/offchain-utils.ts index 9d0df3c..0e78fbe 100644 --- a/test/test/offchain-utils.ts +++ b/test/test/offchain-utils.ts @@ -5,6 +5,7 @@ import { EAS, Offchain, OffchainAttestationVersion, + SignedOffchainAttestation, zipAndEncodeToBase64 } from '../../src'; import { ZERO_ADDRESS } from '../utils/Constants'; @@ -12,92 +13,164 @@ import chai from './helpers/chai'; const { expect } = chai; -const testAttestation: AttestationShareablePackageObject = { - sig: { - domain: { - name: 'EAS Attestation', - version: '1.0.0', - chainId: 31337n, - verifyingContract: '0x6f2E42BB4176e9A7352a8bF8886255Be9F3D2d13' - }, - primaryType: 'Attest', - types: { - Attest: [ - { name: 'version', type: 'uint16' }, - { - name: 'schema', - type: 'bytes32' +interface Spec { + attestation: AttestationShareablePackageObject; + encoded: string; + url: string; +} + +const TEST_ATTESTATIONS: Spec[] = [ + { + attestation: { + sig: { + version: OffchainAttestationVersion.Version2, + domain: { + name: 'EAS Attestation', + version: '1.3.0', + chainId: 31337n, + verifyingContract: '0x6f2E42BB4176e9A7352a8bF8886255Be9F3D2d13' }, - { name: 'recipient', type: 'address' }, - { name: 'time', type: 'uint64' }, - { - name: 'expirationTime', - type: 'uint64' + primaryType: 'Attest', + types: { + Attest: [ + { name: 'version', type: 'uint16' }, + { + name: 'schema', + type: 'bytes32' + }, + { name: 'recipient', type: 'address' }, + { name: 'time', type: 'uint64' }, + { + name: 'expirationTime', + type: 'uint64' + }, + { name: 'revocable', type: 'bool' }, + { name: 'refUID', type: 'bytes32' }, + { + name: 'data', + type: 'bytes' + }, + { + name: 'salt', + type: 'bytes32' + } + ] }, - { name: 'revocable', type: 'bool' }, - { name: 'refUID', type: 'bytes32' }, - { - name: 'data', - type: 'bytes' + signature: { + v: 28, + r: '0x086528faabfc6eafc046c711577b603f0123e79383469abaedd9ff7ce38028fd', + s: '0x22c1f437874575bf74936a7d1a114c789f2a53e7d986c2c46fa60b6ed43d7351' + }, + uid: '0x854d8e26b2bbdc3577fc78c6d2f512258fcc9b91a60858985a216c0ef526ee82', + message: { + version: OffchainAttestationVersion.Version2, + schema: '0x33e9094830a5cba5554d1954310e4fbed2ef5f859ec1404619adea4207f391fd', + recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', + time: 1690299812n, + expirationTime: 1692891810n, + revocable: true, + refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', + data: '0x', + salt: '0x0000000000000000000000000000000000000000000000000000000000000123', + nonce: 0n } - ] - }, - signature: { - v: 27, - r: '0x657d547ea6cd0833572aad8005d00e38f7ed179ab98f76af03209abc1b547445', - s: '0x39057cca4f279d3665882bb41087f281f4c82f8bc7289bd8692d1489516bbcfa' + }, + signer: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266' }, - uid: '0x35bcdfc396e713ace4513fb166b2ac2e5613f12e4aed5d5cdb637051750f6e0b', - message: { - version: 1, - schema: '0x33e9094830a5cba5554d1954310e4fbed2ef5f859ec1404619adea4207f391fd', - recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - time: 1690299812n, - expirationTime: 1692891810n, - revocable: true, - refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', - data: '0x', - nonce: 0n - } + encoded: + 'eNqlkUtuJTEIRfdS41JkvoZhnpLaRKsH2IYFRImU5cevlAW01ExgAOde4M8BL/TSjvMgIOo7t28tfGd8PBi6pr92Egwbl5kpijzSL3rDBXQ3N1NBq4hRUzNqNtbZAaT3oY2qAVJ2JyNWjxG5llf1mWRtz60bgjihmLp1li6jOjtp9AUBwLObF4ZszHLTiZO1QtvQXExr24PjRHtyivxamgIRy+zSi2dqPMywY/dZdQ1HVL1FTXhZog4cY03ahmtLTV1YAohiNacPhy1lYm4SCDpblqBmGt4QovTmbNRC5giRDQUXJmjJNXLh7i8Tzwm8TwMeK4Ox9e0Vftf/d9ug3tDdAJ8lmoNB24jj/Pz4yifrONuJ92P+J/bTjr8/dNmG8A==', + url: '/offchain/url/#attestation=eNqlkUtuJTEIRfdS41JkvoZhnpLaRKsH2IYFRImU5cevlAW01ExgAOde4M8BL%2FTSjvMgIOo7t28tfGd8PBi6pr92Egwbl5kpijzSL3rDBXQ3N1NBq4hRUzNqNtbZAaT3oY2qAVJ2JyNWjxG5llf1mWRtz60bgjihmLp1li6jOjtp9AUBwLObF4ZszHLTiZO1QtvQXExr24PjRHtyivxamgIRy%2BzSi2dqPMywY%2FdZdQ1HVL1FTXhZog4cY03ahmtLTV1YAohiNacPhy1lYm4SCDpblqBmGt4QovTmbNRC5giRDQUXJmjJNXLh7i8Tzwm8TwMeK4Ox9e0Vftf%2Fd9ug3tDdAJ8lmoNB24jj%2FPz4yifrONuJ92P%2BJ%2FbTjr8%2FdNmG8A%3D%3D' }, - signer: '0x8f80b8f45cA0F036da46fFA4D9e5e42D086fB302' -}; - -const testEncoded = - 'eNolkElqJEEMRe+S68RoDmlZSTkvYXoRg3SAxoY+fke5VvofpCd4Xwd+wAcc58HI3PaEf1b0KXRdgs0yHo2Vuo/b3Y1Ur4ybn7SQ38valkrLbnOBM2uj3pcD6AJI9mq5sEUfsaP1AibYbeLYVyL6C+EAbXN2KWqx2EzdaQxB8FbkWDKdysds5DGWW+z/4qFoY8zqx0ntxfFyGF6i8wE3sK0uVvdDnpGaQk9wq4uB3k91zFWTw7Ih95miyDXQbFCflGq7IqX0XLp0rmHcQLEplCWMN4QzIMQZus7RVVUWhgojpNTIRVlarpETBcQw+souBK04sNYvZMd7WSq+zPltt8y0fm0HbfuYVfcIIrPjRAugCEd6xS0DHWEjjvP770++WMcJJ/75D9TveT0='; -const testURL = - '/offchain/url/#attestation=eNolkElqJEEMRe%2BS68RoDmlZSTkvYXoRg3SAxoY%2Bfke5VvofpCd4Xwd%2BwAcc58HI3PaEf1b0KXRdgs0yHo2Vuo%2Fb3Y1Ur4ybn7SQ38valkrLbnOBM2uj3pcD6AJI9mq5sEUfsaP1AibYbeLYVyL6C%2BEAbXN2KWqx2EzdaQxB8FbkWDKdysds5DGWW%2Bz%2F4qFoY8zqx0ntxfFyGF6i8wE3sK0uVvdDnpGaQk9wq4uB3k91zFWTw7Ih95miyDXQbFCflGq7IqX0XLp0rmHcQLEplCWMN4QzIMQZus7RVVUWhgojpNTIRVlarpETBcQw%2BsouBK04sNYvZMd7WSq%2BzPltt8y0fm0HbfuYVfcIIrPjRAugCEd6xS0DHWEjjvP770%2B%2BWMcJJ%2F75D9TveT0%3D'; + { + attestation: { + sig: { + domain: { + name: 'EAS Attestation', + version: '1.0.0', + chainId: 31337n, + verifyingContract: '0x6f2E42BB4176e9A7352a8bF8886255Be9F3D2d13' + }, + primaryType: 'Attest', + types: { + Attest: [ + { name: 'version', type: 'uint16' }, + { + name: 'schema', + type: 'bytes32' + }, + { name: 'recipient', type: 'address' }, + { name: 'time', type: 'uint64' }, + { + name: 'expirationTime', + type: 'uint64' + }, + { name: 'revocable', type: 'bool' }, + { name: 'refUID', type: 'bytes32' }, + { + name: 'data', + type: 'bytes' + } + ] + }, + signature: { + v: 27, + r: '0x657d547ea6cd0833572aad8005d00e38f7ed179ab98f76af03209abc1b547445', + s: '0x39057cca4f279d3665882bb41087f281f4c82f8bc7289bd8692d1489516bbcfa' + }, + uid: '0x35bcdfc396e713ace4513fb166b2ac2e5613f12e4aed5d5cdb637051750f6e0b', + message: { + version: OffchainAttestationVersion.Version1, + schema: '0x33e9094830a5cba5554d1954310e4fbed2ef5f859ec1404619adea4207f391fd', + recipient: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', + time: 1690299812n, + expirationTime: 1692891810n, + revocable: true, + refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', + data: '0x', + nonce: 0n + } + } as unknown as SignedOffchainAttestation, + signer: '0x8f80b8f45cA0F036da46fFA4D9e5e42D086fB302' + }, + encoded: + 'eNolkLuKHEEMRf+l42bRu6RwmnH/hHFQDylaHBgv+PNdsxPpXpCO4Pw88AM+4DgPRua2J/yzoh9C1yXYLOPRWKn7uN3dSPXKuPlJC/m9rG2ptOw2FzizNup9OYAugGSvlgtb9BE7Wi9ggt0mjn0lot8QDtA2Z5eiFovN1J3GEARvRY4l06l8zEYeY7nF/i8eijbGrH6c1F4cL4fhJTofcAPb6mJ1P+QZqSn0BLe6GOj9VMdcNTksG3KfKYpcA80G9UmptitSSs+lS+caxg0Um0JZwnhDOANCnKHrHF1VZWGoMEJKjVyUpeUaOVFADKOv7ELQigNrfUN2vJel4suc33bLTOvXdtC2j1l1jyAyO060AIpwpFfcMtARNuI4//75yhfrOOHE8/fX5+ev/ziaeyQ=', + url: '/offchain/url/#attestation=eNolkLuKHEEMRf%2Bl42bRu6RwmnH%2FhHFQDylaHBgv%2BPNdsxPpXpCO4Pw88AM%2B4DgPRua2J%2Fyzoh9C1yXYLOPRWKn7uN3dSPXKuPlJC%2Fm9rG2ptOw2FzizNup9OYAugGSvlgtb9BE7Wi9ggt0mjn0lot8QDtA2Z5eiFovN1J3GEARvRY4l06l8zEYeY7nF%2Fi8eijbGrH6c1F4cL4fhJTofcAPb6mJ1P%2BQZqSn0BLe6GOj9VMdcNTksG3KfKYpcA80G9UmptitSSs%2BlS%2Bcaxg0Um0JZwnhDOANCnKHrHF1VZWGoMEJKjVyUpeUaOVFADKOv7ELQigNrfUN2vJel4suc33bLTOvXdtC2j1l1jyAyO060AIpwpFfcMtARNuI4%2F%2F75yhfrOOHE8%2FfX5%2Bev%2FziaeyQ%3D' + } +]; describe('offchain utils', () => { - describe('encode', () => { - it('should zip and encode an offchain attestation object', () => { - const encoded = zipAndEncodeToBase64(testAttestation); - expect(encoded).to.equal(testEncoded); - }); + for (const { attestation, encoded, url } of TEST_ATTESTATIONS) { + context(`version ${attestation.sig.message.version}`, () => { + describe('encode', () => { + it('should zip and encode an offchain attestation object', () => { + expect(zipAndEncodeToBase64(attestation)).to.equal(encoded); + }); - it('should encode into url', () => { - const url = createOffchainURL(testAttestation); - expect(url).to.equal(testURL); - }); - }); + it('should encode into a URL', () => { + expect(createOffchainURL(attestation)).to.equal(url); + }); + }); - describe('decode', () => { - it('should unzip and decode an an encoded attestation string', () => { - const decoded = decodeBase64ZippedBase64(testEncoded); - expect(decoded).to.not.be.null; + describe('decode', () => { + it('should unzip and decode an an encoded attestation string', () => { + const decoded = decodeBase64ZippedBase64(encoded); + expect(decoded).to.not.be.null; - const offchain = new Offchain( - { - chainId: testAttestation.sig.domain.chainId, - address: testAttestation.sig.domain.verifyingContract, - version: testAttestation.sig.domain.version - }, - OffchainAttestationVersion.Version1, - new EAS(ZERO_ADDRESS) - ); + const offchain = new Offchain( + { + chainId: attestation.sig.domain.chainId, + address: attestation.sig.domain.verifyingContract, + version: attestation.sig.domain.version + }, + attestation.sig.message.version, + new EAS(ZERO_ADDRESS) + ); - const verified = offchain.verifyOffchainAttestationSignature(testAttestation.signer, decoded.sig); - expect(verified).to.be.true; + expect( + offchain.verifyOffchainAttestationSignature(attestation.signer, decoded.sig as SignedOffchainAttestation) + ).to.be.true; + }); + }); }); - }); + } });