Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion example/src/app/artifacts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion example/src/app/prove/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default function Prove() {
const [initiatedProof, setInitiatedProof] = useState<InitiateProof>()
const [proof, setProof] = useState<GetProof>()

// Form submit handlers defined in parent scope to manage page alerts
const handleSubmitInitiateProof = async (
e: React.FormEvent<HTMLFormElement>,
) => {
Expand Down