Skip to content

Commit 188a048

Browse files
committed
chore(docs): add new sample credential
1 parent 9f043c4 commit 188a048

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

apps/docs/src/components/sample-data.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,25 @@ export const sampleCredential = {
2828
},
2929
};
3030

31+
export const sampleCredential1 = {
32+
version: "v0",
33+
witness: { type: "unsigned" },
34+
credential: {
35+
owner: {
36+
_type: "PublicKey",
37+
value: "B62qiVGZQdBJJrxnzhvqp7LKe6jDiFcpU3cF5xHoZof5Pz9qiL85KLx",
38+
},
39+
data: {
40+
age: { _type: "Field", value: "42" },
41+
name: {
42+
_type: "Bytes",
43+
value:
44+
"416c696365000000000000000000000000000000000000000000000000000000",
45+
},
46+
},
47+
},
48+
};
49+
3150
export const samplePresentationRequest = {
3251
type: "zk-app",
3352
spec: {

apps/docs/src/components/test-zkapp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createStore } from "@mina-js/connect";
22
import { useLocalStorage, useObjectState } from "@uidotdev/usehooks";
33
import { clsx } from "clsx";
44
import { useState, useSyncExternalStore } from "react";
5-
import { sampleCredential, samplePresentationRequest } from "./sample-data";
5+
import { sampleCredential1, samplePresentationRequest } from "./sample-data";
66

77
const store = createStore();
88

@@ -14,7 +14,7 @@ export const TestZkApp = () => {
1414
const [message, setMessage] = useState("A message to sign");
1515
const [fields, setFields] = useState('["1", "2", "3"]');
1616
const [credentialInput, setCredentialInput] = useState(
17-
JSON.stringify(sampleCredential, null, 2),
17+
JSON.stringify(sampleCredential1, null, 2),
1818
);
1919
const [presentationRequest, setPresentationRequest] = useState(
2020
JSON.stringify(samplePresentationRequest, null, 2),

0 commit comments

Comments
 (0)