Skip to content

Commit

Permalink
[WIP] Minor release 2.2.0: PKP Client/library & Cosmos Signer (#57)
Browse files Browse the repository at this point in the history
* hotfix: add sessionSigs as a field and use it in PKPWallet

* workflow: added dev:target watch mode

* fix: jest setup configs to polyfill

* feat: add pkp-cosmos

* script: add publish script for pkp

* feat: new library

* Published version 2.1.95 --pkp tag

* chore: update .gitignore

* feat: update dev tools to watch build in order

* feat: update gitignore

* feat: pkp-ethers to extend from pkp-base

* feat: test settings to send real tx

* refactor: rewrote uint8arrays to be compatible with specs.ts

* feat: unit8arrays test works

* feat: make test:e2e run on react only

* feat: add console.log test snippet

* fix: uint8arrayToString to cast arg as Uint8Array

* fix: use cosmos bundled sdk

* Published version 2.1.97 --pkp

* Published version 2.1.98 --pkp

* chore: add test cases to crypto

* feat: add cosmosBunbledSdk test

* feat: add draft pkp client

* feat: add pkp client

* feat: added some executeJs tests

* feat: add verify tool

* feat: add types to 3rd party libs & updated tests

* feat: add jsParams setter to PKP base

* WIP: eth_signTypedData

* chore: update types

* feat: new pkg with pkp auth helpers

* bump: published version 2.1.101 --dev

* fix: nanoid dependency

* bump: published version 2.1.103 --dev

* docs: readme

* docs: update

* docs: update readme

* fix: add webpack to react so it loads crypto

* feat: restructure pkp-cosmos

* gitignore update

* wip: update handler

* chore: add note

* fix: handler.mjs

* feat: add .spec.mjs tools

* feat: added some dev styling

* chore: update style

* feat: add ts json handlers

* Squashed commit of the following:

commit c285143
Author: Ansonhkg <ansonox@gmail.com>
Date:   Tue Apr 4 15:58:08 2023 +0100

    Published version 2.1.108 --dev

commit 58d507c
Author: Ansonhkg <ansonox@gmail.com>
Date:   Tue Apr 4 15:48:55 2023 +0100

    chore: update test

commit 94deb7b
Author: Ansonhkg <ansonox@gmail.com>
Date:   Tue Apr 4 15:46:25 2023 +0100

    feat: complete lit-pkp-sdk integration

commit 6d765b2
Author: Ansonhkg <ansonox@gmail.com>
Date:   Mon Apr 3 22:16:02 2023 +0100

    feat: sendtx test cases

commit 19c0b5e
Author: Ansonhkg <ansonox@gmail.com>
Date:   Mon Apr 3 16:10:23 2023 +0100

    feat: add ts json handlers

commit dac9af0
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 22:27:44 2023 +0100

    chore: update style

commit 73b08c4
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 22:26:20 2023 +0100

    feat: added some dev styling

commit 619acd2
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 22:16:33 2023 +0100

    feat: add .spec.mjs tools

commit 25558c5
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 20:34:10 2023 +0100

    fix: handler.mjs

commit 69ae254
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 19:55:54 2023 +0100

    chore: add note

commit a5ffc19
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 19:42:29 2023 +0100

    wip: update handler

commit f72eb13
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 17:45:47 2023 +0100

    gitignore update

commit 9ea014a
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 17:40:28 2023 +0100

    feat: restructure pkp-cosmos

commit 2a32099
Author: Ansonhkg <ansonox@gmail.com>
Date:   Fri Mar 31 17:35:21 2023 +0100

    fix: add webpack to react so it loads crypto

commit b0d0b9a
Author: Ansonhkg <ansonox@gmail.com>
Date:   Thu Mar 30 18:05:10 2023 +0100

    chore: update types

commit 2e680bf
Author: Ansonhkg <ansonox@gmail.com>
Date:   Thu Mar 30 17:56:24 2023 +0100

    WIP: eth_signTypedData

commit 3d08446
Author: Ansonhkg <ansonox@gmail.com>
Date:   Thu Mar 30 13:35:21 2023 +0100

    feat: add jsParams setter to PKP base

commit f4b7b01
Author: Ansonhkg <ansonox@gmail.com>
Date:   Thu Mar 30 13:16:30 2023 +0100

    feat: add types to 3rd party libs & updated tests

* Feat pkp client merge master (#71)

* chore: Change logs for sessionSigs support to remaining functions (#64)

* Published version 2.1.104

* juno works nicely (#68)

* Feature/juno network (#69)

* juno works nicely

* published latest version 2.1.106

* Squashed commit of the following:

commit 849e2f2
Author: Ansonhkg <ansonox@gmail.com>
Date:   Tue Apr 4 14:16:42 2023 +0100

    fix: re-export disconnectWeb3

* Published version 2.1.107

* feat: e2e & unit tests passed

---------

Co-authored-by: Adarsh-Kumar28 <115020815+Adarsh-Kumar28@users.noreply.github.com>
Co-authored-by: Chris Cassano <1285652+glitch003@users.noreply.github.com>

* feat: add sessionSigs helper in PKPBase

* refactor: make rpc optional on PKPBase, check for provider in PKPEthers

* feat: add demo-pkp-social-auth

* fix: type annotation

* fix: type annotation

* feat: added some test cases

* fix: siwe message optional domain

* feat: update PKPClient constructor & test cases

* feat: add msg & tx signing without rpc

* feat: test to send cosmos tx in pkpClient

* refactor: flatten wallet props, track sigs expiry, handle connect rpc

* Published version 2.1.110 --pkp

* fix: remove pkpPubKey

* [wip] update PKPBase props (#75)

* feat: add types to 3rd party libs & updated tests

* feat: add jsParams setter to PKP base

* WIP: eth_signTypedData

* chore: update types

* fix: add webpack to react so it loads crypto

* feat: restructure pkp-cosmos

* gitignore update

* wip: update handler

* chore: add note

* fix: handler.mjs

* feat: add .spec.mjs tools

* feat: added some dev styling

* chore: update style

* feat: add ts json handlers

* feat: add sessionSigs helper in PKPBase

* refactor: make rpc optional on PKPBase, check for provider in PKPEthers

* refactor: flatten wallet props, track sigs expiry, handle connect rpc

* fix: remove pkpPubKey

---------

Co-authored-by: Ansonhkg <ansonox@gmail.com>

* fix: remove yarn.lock, use env var

* feat: add session sigs wrapper, pass relay url to LitRelay

* chore: eslint

* temp: comment methods

* fix: types

* refactor: improve handling of provided keypair in getSessionKey

* feat: ensure parsed key pair is of correct type

* fix: consistent with throwing error

* fix: wrong property

* refactor: getSessionSigs wrapper in LitAuthClient and make expiration optional in signSessionKey prop, chore: remove unused funcs, types

* feat: update demo with new litauthclient and use new chronicle chain

* chore: update litauthclient init options in demo app

* docs: update readme

* fix: import TextEncoder in lit-auth-client spec

* feat: make relay api key optional in type interface

* bump: published version 2.1.120 --dev

* chore: update pkg in demo, clean up unused

* refactor: move auth, session, and relay logic into providers

* update: types

* refactor: one initProvider method, abstract authenticate method

* fix: initProvider return type, rename eth provider

* WIP: build works

* refactor: initProvider, provider options, tests, use dynamic import

* feat: turned off nx cloud

* fix: pkp-ethers test cases

* fix: pkp-client specs works

* fix: contracts-sdk spec works

* feat: use node16 moduleResolution to work with dynamic imports

* docs: readme

* fix: because of THIS, circular dependency error

* fix: uncomment some tests, docs

* feat: add extra test PKP for nonce won't get block

* demo: use published pkg

* fix: expiration not used

* fix: test cases finally f-ing passes

* feat: update pkp-ethers to use default rpc from constants

* feat: change test case order

* Feat/tx handler for test cases (#91)

* feat: add tx handler server to avoid nonce

* feat: launch server before unit tests

* feat: increase retries

* feat: use remote tx handling server instead

* chore: some notes on tx handler server

* feat: update contracts-sdk

---------

Co-authored-by: Ansonhkg <ansonox@gmail.com>
Co-authored-by: Adarsh-Kumar28 <115020815+Adarsh-Kumar28@users.noreply.github.com>
Co-authored-by: Chris Cassano <1285652+glitch003@users.noreply.github.com>
  • Loading branch information
4 people committed May 1, 2023
1 parent bbb2814 commit a2d58ac
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 26 deletions.
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 Sun, 30 Apr 2023 14:06:21 GMT -->
<!-- (DO NOT EDIT!) (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Mon, 01 May 2023 01:15:07 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 Sun, 30 Apr 2023 14:06:21 GMT
(HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Mon, 01 May 2023 01:15:07 GMT

<!-- ==================== ALL EXPORTED VANILLA LIBRARIES ==================== -->
<script src="dist/packages/access-control-conditions-vanilla/access-control-conditions.js"></script>
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 @@ -1648,7 +1648,7 @@ pre {
`,
}}
/>
(REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Sun, 30 Apr 2023 14:06:21 GMT
(REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Mon, 01 May 2023 01:15:08 GMT
<div id="root"></div>
<pre><code id="result"></code></pre>
</>
Expand Down
2 changes: 1 addition & 1 deletion packages/constants/src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '2.1.138';
export const version = '2.1.138';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const accessControlConditions = {
"address": "0x54D9b06686e4d009E59B0271da4358FEE5500E26",
"address": "0x8b353Bb9E26F2c2B8155f377982537C39AD01A1B",
"abi": [
{
"inputs": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/Allowlist.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const allowlist = {
"address": "0xc45edF68A6d335c3DbC9BcdDD58baB4eC70B5a0a",
"address": "0x81FB8e997E0908AD5792e6F8737245A1D78706E6",
"abi": [
{
"inputs": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/ContractResolver.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const contractResolver = {
"address": "0x18C94A4D9f7Add1bB4333542807aD41a15390e2f",
"address": "0xFCB3d8a54680e9337e3c8E60adC02F2aE8455A71",
"abi": [
{
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/Multisender.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const multisender = {
"address": "0x94Ac3Ee177D34E4DA9D46e90DfF1bAaCe474deEb",
"address": "0x0EdD020f421adbB57D3efa5d2045a75E40385464",
"abi": [
{
"anonymous": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/PKPHelper.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const pkpHelper = {
"address": "0x5a8e445BCFE85264566c32Be50A172F3d14F53Fc",
"address": "0x8bB62077437D918891F12c7F35d9e1B78468bF11",
"abi": [
{
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/PKPNFT.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const pkpNft = {
"address": "0xF5cB699652cED3781Dd75575EDBe075d6212DF98",
"address": "0x8F75a53F65e31DD0D2e40d0827becAaE2299D111",
"abi": [
{
"inputs": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/PKPNFTMetadata.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const pkpNftMetadata = {
"address": "0xfBdFFFeAd35A1A85086CfAfeF93Dd888E9527a52",
"address": "0x4f7dBAfD2D9fF2bD4b2B00D470eCbe673e49c4D3",
"abi": [
{
"inputs": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/PKPPermissions.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const pkpPermissions = {
"address": "0xE34eAB00607E6817327d575B26E8de29c320D6e9",
"address": "0x4Aed2F242E806c58758677059340e29E6B5b7619",
"abi": [
{
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/PubkeyRouter.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const pubkeyRouter = {
"address": "0xB46EbbD0F543811fC97e979fbCa62FEAB6C7E6B4",
"address": "0xB35cC6CaB1501d5F3b6b8fcF3215898C9d03E981",
"abi": [
{
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/RateLimitNFT.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const rateLimitNft = {
"address": "0x6378Bf57C2c75d9524FE2601275214C0EE3Cf1B8",
"address": "0x2D0f767eff47b44626832EcD2fda705eB9797c38",
"abi": [
{
"inputs": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-sdk/src/abis/Staking.data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const staking = {
"address": "0x1D672d7188D970158554F5B0965480256585A071",
"address": "0x433357a14c35815E6A32758fe95c93380D194aaf",
"abi": [
{
"inputs": [
Expand Down
22 changes: 11 additions & 11 deletions packages/contracts-sdk/src/deployed-contracts.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"correctedName": "Staking",
"exportName": "staking",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/Staking.json",
"address": "0x1D672d7188D970158554F5B0965480256585A071"
"address": "0x433357a14c35815E6A32758fe95c93380D194aaf"
},
{
"name": "multisenderContractAddress",
"correctedName": "Multisender",
"exportName": "multisender",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/Multisender.json",
"address": "0x94Ac3Ee177D34E4DA9D46e90DfF1bAaCe474deEb"
"address": "0x0EdD020f421adbB57D3efa5d2045a75E40385464"
},
{
"name": "litTokenContractAddress",
Expand All @@ -25,62 +25,62 @@
"correctedName": "AccessControlConditions",
"exportName": "accessControlConditions",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/AccessControlConditions.json",
"address": "0x54D9b06686e4d009E59B0271da4358FEE5500E26"
"address": "0x8b353Bb9E26F2c2B8155f377982537C39AD01A1B"
},
{
"name": "pubkeyRouterContractAddress",
"correctedName": "PubkeyRouter",
"exportName": "pubkeyRouter",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/PubkeyRouter.json",
"address": "0xB46EbbD0F543811fC97e979fbCa62FEAB6C7E6B4"
"address": "0xB35cC6CaB1501d5F3b6b8fcF3215898C9d03E981"
},
{
"name": "pkpNftContractAddress",
"correctedName": "PKPNFT",
"exportName": "pkpNft",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/PKPNFT.json",
"address": "0xF5cB699652cED3781Dd75575EDBe075d6212DF98"
"address": "0x8F75a53F65e31DD0D2e40d0827becAaE2299D111"
},
{
"name": "rateLimitNftContractAddress",
"correctedName": "RateLimitNFT",
"exportName": "rateLimitNft",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/RateLimitNFT.json",
"address": "0x6378Bf57C2c75d9524FE2601275214C0EE3Cf1B8"
"address": "0x2D0f767eff47b44626832EcD2fda705eB9797c38"
},
{
"name": "pkpHelperContractAddress",
"correctedName": "PKPHelper",
"exportName": "pkpHelper",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/PKPHelper.json",
"address": "0x5a8e445BCFE85264566c32Be50A172F3d14F53Fc"
"address": "0x8bB62077437D918891F12c7F35d9e1B78468bF11"
},
{
"name": "pkpPermissionsContractAddress",
"correctedName": "PKPPermissions",
"exportName": "pkpPermissions",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/PKPPermissions.json",
"address": "0xE34eAB00607E6817327d575B26E8de29c320D6e9"
"address": "0x4Aed2F242E806c58758677059340e29E6B5b7619"
},
{
"name": "pkpNftMetadataContractAddress",
"correctedName": "PKPNFTMetadata",
"exportName": "pkpNftMetadata",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/PKPNFTMetadata.json",
"address": "0xfBdFFFeAd35A1A85086CfAfeF93Dd888E9527a52"
"address": "0x4f7dBAfD2D9fF2bD4b2B00D470eCbe673e49c4D3"
},
{
"name": "allowlistContractAddress",
"correctedName": "Allowlist",
"exportName": "allowlist",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/Allowlist.json",
"address": "0xc45edF68A6d335c3DbC9BcdDD58baB4eC70B5a0a"
"address": "0x81FB8e997E0908AD5792e6F8737245A1D78706E6"
},
{
"name": "resolverContractAddress",
"correctedName": "ContractResolver",
"exportName": "contractResolver",
"abiPath": "https://raw.githubusercontent.com/LIT-Protocol/LitNodeContracts/main/deployments/mumbai_80001/ContractResolver.json",
"address": "0x18C94A4D9f7Add1bB4333542807aD41a15390e2f"
"address": "0xFCB3d8a54680e9337e3c8E60adC02F2aE8455A71"
}
]

1 comment on commit a2d58ac

@vercel
Copy link

@vercel vercel bot commented on a2d58ac May 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.