diff --git a/README.md b/README.md index 817df0f..c2a93c1 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Output: In order to query the artifacts currently available on the EZKL Hub you can use the `getArtifacts` method. -This method accepts an options object which allows you to specify the `limit` (the max number of artifacts to return) and `skip` (the number of artifacts to skip). `skip` and `limit` can be used together for effective pagination. If no options are provided, the default values are `skip = 0` and `limit = 20`. +This method accepts an options object which allows you to specify the `first` (the max number of artifacts to return) and `skip` (the number of artifacts to skip). `skip` and `first` can be used together for effective pagination. If no options are provided, the default values are `skip = 0` and `first = 20`. ```typescript type Artifact = { @@ -76,13 +76,13 @@ type Artifact = { type PageOptions = | { skip?: number - limit?: number + first?: number } | undefined const pageOptions: PageOptions = { skip: 0, - limit: 2, + first: 2, } const artifacts: Artifact[] = await hub.artifacts(pageOptions) diff --git a/example/src/app/artifacts/page.tsx b/example/src/app/artifacts/page.tsx index 8b9303e..6463fa5 100644 --- a/example/src/app/artifacts/page.tsx +++ b/example/src/app/artifacts/page.tsx @@ -23,7 +23,7 @@ export default function Artifacts() { const handleClick = async () => { setFetching(true) - const artifacts = await hub.getArtifacts() + const artifacts = await hub.getArtifacts({ first: 20, skip: 0 }) setFetching(false) const validatedArtifacts = artifactsSchema.parse(artifacts) diff --git a/example/src/app/prove/page.tsx b/example/src/app/prove/page.tsx index 7362f70..1e01642 100644 --- a/example/src/app/prove/page.tsx +++ b/example/src/app/prove/page.tsx @@ -32,7 +32,6 @@ export default function Prove() { const [initiatedProof, setInitiatedProof] = useState() const [proof, setProof] = useState() - // Form submit handlers defined in parent scope to manage page alerts const handleSubmitInitiateProof = async ( e: React.FormEvent, ) => {