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

Some changes to make manual claim PKP test work with latest node changes #227

Merged
merged 1 commit into from
Oct 5, 2023
Merged
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
4 changes: 2 additions & 2 deletions apps/html/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- (DO NOT EDIT!) (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Tue, 03 Oct 2023 19:34:00 GMT -->
<!-- (DO NOT EDIT!) (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Wed, 04 Oct 2023 23:44:06 GMT -->
<!DOCTYPE html>
<html lang="en">
<head>
Expand Down Expand Up @@ -62,7 +62,7 @@
</style>
</head>
<body>
(HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Tue, 03 Oct 2023 19:34:00 GMT
(HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Wed, 04 Oct 2023 23:44:06 GMT

<!-- ==================== ALL EXPORTED VANILLA LIBRARIES ==================== -->
<script src="dist/packages/access-control-conditions-vanilla/access-control-conditions.js"></script>
Expand Down
9 changes: 6 additions & 3 deletions apps/html/manual_tests_claim_pkp.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
var testSigningWithPkpSign = async () => {
console.log('testing sig with pkpSign...');
let sig = await litNodeClient.pkpSign({
toSign: [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100], // hello world in Uint8Array
toSign: [84, 104, 105, 115, 32, 109, 101, 115, 115, 97, 103, 101, 32, 105, 115, 32, 101, 120, 97, 99, 116, 108, 121, 32, 51, 50, 32, 98, 121, 116, 101, 115], // "This message is exactly 32 bytes" in Uint8Array
pubKey: claimResp.pubkey,
authMethods: [authMethod],
authSig,
Expand Down Expand Up @@ -104,8 +104,8 @@
authSig,
// all jsParams can be used anywhere in your litActionCode
jsParams: {
// this is the string "Hello World" for testing
toSign: [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100],
// this is the string "This message is exactly 32 bytes" for testing
toSign: [84, 104, 105, 115, 32, 109, 101, 115, 115, 97, 103, 101, 32, 105, 115, 32, 101, 120, 97, 99, 116, 108, 121, 32, 51, 50, 32, 98, 121, 116, 101, 115],
publicKey: "0x" + claimResp.pubkey,
sigName: "sig1",
},
Expand Down Expand Up @@ -211,6 +211,9 @@

// document.getElementById('status').innerText = `All passed: ${allPassed}`;

console.log('sleeping 20s for node to sync...');
await new Promise((resolve) => setTimeout(resolve, 20000));

let allPassed = true
let result = await testSigningWithPkpSign();
console.log(`test passed: `, result);
Expand Down
2 changes: 1 addition & 1 deletion apps/react/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ pre {
`,
}}
/>
(REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Tue, 03 Oct 2023 19:34:00 GMT
(REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Wed, 04 Oct 2023 23:44:07 GMT
<div id="root"></div>
<pre><code id="result"></code></pre>
</>
Expand Down
Loading