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

introduce wallet connect #713

Merged
merged 152 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 144 commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
19725d6
add back examples
shamilovtim May 24, 2024
125f453
add back authServer.js
shamilovtim May 24, 2024
efbe7af
add back json-rpc changes
shamilovtim May 24, 2024
b7c2e4d
add back rpcserver
shamilovtim May 24, 2024
106b7e2
add back utils
shamilovtim May 24, 2024
fc6a8a3
add back agent exports
shamilovtim May 24, 2024
0fa79e4
add back ws-rpc-server
shamilovtim May 24, 2024
14c1841
add back auth-api
shamilovtim May 24, 2024
ad5f030
add back level.js
shamilovtim May 24, 2024
6fb8fec
add back crypto randompin
shamilovtim May 24, 2024
446ce35
add back test for randomPin
shamilovtim May 24, 2024
65a2c71
simplify request-uri
shamilovtim Jun 13, 2024
7be2827
make testharness setup a little more readable
shamilovtim Jun 18, 2024
d78257f
add pollWithTTL
shamilovtim Jun 19, 2024
f804ad3
add abort to pollWithTTL
shamilovtim Jun 19, 2024
8d3d6d6
add jsdoc to pollWithTTL
shamilovtim Jun 20, 2024
4d014bd
WIP
shamilovtim Jun 20, 2024
6c36646
fix a couple of docs
shamilovtim Jun 21, 2024
3f65789
param style nit
shamilovtim Jun 21, 2024
7d47e51
fix signing and migrate kms code to newer agent code
shamilovtim Jun 21, 2024
1669ddc
use the word "claims" rather than payload
shamilovtim Jun 24, 2024
fa3256f
format authServer and update code
shamilovtim Jun 29, 2024
915a345
push up latest WIP
shamilovtim Jun 29, 2024
98b5c64
remove dead code
shamilovtim Jun 29, 2024
5a1afc9
Merge branch 'main' into tshamilov/connect-v2
shamilovtim Jun 29, 2024
4bc11fc
bump types/node
shamilovtim Jun 29, 2024
40a2b14
cleanup
shamilovtim Jun 29, 2024
b46bbdc
fix eslint
shamilovtim Jun 29, 2024
c9817f9
format test file
shamilovtim Jun 30, 2024
a077bb9
format with eslint
shamilovtim Jun 30, 2024
058cf67
cleanup
shamilovtim Jul 1, 2024
329e10d
format eslint config
shamilovtim Jul 8, 2024
f38718a
Update authServer.js
shamilovtim Jul 8, 2024
843b17c
Update tsconfig.json
shamilovtim Jul 8, 2024
4f2491b
check in wip
shamilovtim Jul 8, 2024
5cae467
add correct wallet uri
shamilovtim Jul 9, 2024
4bafc56
comment
shamilovtim Jul 9, 2024
48e2895
updates
shamilovtim Jul 10, 2024
b04c3cc
cleanup
shamilovtim Jul 10, 2024
5b406ce
cleanup
shamilovtim Jul 10, 2024
4e5fd5d
Merge branch 'main' into tshamilov/connect-v2
shamilovtim Jul 12, 2024
6e79b2e
add nearly finished latest wip
shamilovtim Jul 13, 2024
a5391db
cleanup. add walletUri.
shamilovtim Jul 13, 2024
718ded0
feedback
shamilovtim Jul 16, 2024
59e8535
feedback
shamilovtim Jul 17, 2024
785e12b
feedback
shamilovtim Jul 17, 2024
8017486
refactor out nonce
shamilovtim Jul 17, 2024
b2959cc
feedback
shamilovtim Jul 17, 2024
29009fb
feedback: add better docs for walletUri
shamilovtim Jul 17, 2024
4de6618
remove unnecessary clientUri
shamilovtim Jul 17, 2024
da32d29
feedback
shamilovtim Jul 17, 2024
1e3fbcb
Merge branch 'main' into tshamilov/connect-v2
shamilovtim Jul 22, 2024
e64dca5
resolve merge conflict
shamilovtim Jul 22, 2024
f18921b
feedback: client_id should contain the did
shamilovtim Jul 22, 2024
0dfd16c
improve comment about walletconnectoptions
shamilovtim Jul 22, 2024
8f08091
feedback: unabstract nonce creation
shamilovtim Jul 22, 2024
420a9e7
remove unused imports
shamilovtim Jul 22, 2024
10aa3e9
feedback: slim down queryparams
shamilovtim Jul 22, 2024
d0b09be
Merge branch 'main' into tshamilov/connect-v2
shamilovtim Jul 23, 2024
8adfb58
merged lockfile
shamilovtim Jul 23, 2024
7981ab0
clarify comment about the grants
shamilovtim Jul 23, 2024
bd646dc
feedback: fail fast and let users catch errors
shamilovtim Jul 23, 2024
94dcb14
feedback
shamilovtim Jul 25, 2024
065ecda
push up finalizations
shamilovtim Aug 4, 2024
85ee03a
bump crypto
shamilovtim Aug 4, 2024
69bc147
examples
shamilovtim Aug 4, 2024
d53bd82
bump sinon
shamilovtim Aug 4, 2024
d231207
fix dependabot mess
shamilovtim Aug 4, 2024
f57e605
Merge branch 'main' into tshamilov/connect-v2
shamilovtim Aug 4, 2024
3a58665
try to fix builds
shamilovtim Aug 4, 2024
d63c468
try to fix builds
shamilovtim Aug 4, 2024
0e3a881
use v9 lockfile
shamilovtim Aug 4, 2024
73af680
Revert "try to fix builds"
shamilovtim Aug 4, 2024
c6ed5b3
Revert "try to fix builds"
shamilovtim Aug 4, 2024
706752f
Create flat-students-compare.md
shamilovtim Aug 4, 2024
6585fb2
fix ci
shamilovtim Aug 4, 2024
775d15a
fix lockfile
shamilovtim Aug 4, 2024
c24870d
Revert "fix lockfile"
shamilovtim Aug 4, 2024
a4cae06
fix lockfile
shamilovtim Aug 4, 2024
7a882d3
cleanup
shamilovtim Aug 4, 2024
4dcd49a
fix ci
shamilovtim Aug 4, 2024
7c251fc
Delete authServer.js
shamilovtim Aug 4, 2024
b3c4dbc
test ci
shamilovtim Aug 4, 2024
0ebdcf8
fix build order
shamilovtim Aug 5, 2024
4e064cb
fix cve
shamilovtim Aug 5, 2024
bb648f9
fix eslint
shamilovtim Aug 5, 2024
e09f77f
bump lockfile
shamilovtim Aug 5, 2024
3c21f1f
feedback
shamilovtim Aug 5, 2024
f3ab1e2
use dwn server default port
shamilovtim Aug 5, 2024
616a429
Update flat-students-compare.md
shamilovtim Aug 5, 2024
a084f5b
Update docs-ci.yml
shamilovtim Aug 5, 2024
83c999a
Update flat-students-compare.md
shamilovtim Aug 5, 2024
83071fc
stub globalthis fetch
shamilovtim Aug 5, 2024
4faed25
Update tests-ci.yml
shamilovtim Aug 5, 2024
9b2e2d3
fix regex
shamilovtim Aug 5, 2024
8fa6d18
cleanup
shamilovtim Aug 5, 2024
c230899
cleanup
shamilovtim Aug 5, 2024
d281a69
add some patch tests
shamilovtim Aug 5, 2024
3141b22
cleanup some changes
shamilovtim Aug 5, 2024
f8472e5
satisfy codecov patch
shamilovtim Aug 5, 2024
3ef83fc
fix codecov bot
shamilovtim Aug 6, 2024
4620aa6
Update tests-ci.yml
shamilovtim Aug 6, 2024
db79454
latest
shamilovtim Aug 6, 2024
33a1f00
prettier fmt
shamilovtim Aug 6, 2024
b2d21bc
Update wallet-connect.html
shamilovtim Aug 6, 2024
2161594
Update codecov.yml
shamilovtim Aug 6, 2024
ce7a00a
add wallet connect example. change to portableDid data structure and …
shamilovtim Aug 7, 2024
44dfc39
Merge branch 'main' into tshamilov/connect-v2
shamilovtim Aug 7, 2024
b50a931
add connectedDid
shamilovtim Aug 7, 2024
f9d9842
cleanup example
shamilovtim Aug 7, 2024
98ce59c
cleanup
shamilovtim Aug 7, 2024
e1eb715
Update wallet-connect.html
shamilovtim Aug 8, 2024
a8382f0
add word wrap and viewport sizing
shamilovtim Aug 8, 2024
a3d7c2b
remove conditional returns in buildOidcUrl
shamilovtim Aug 8, 2024
56cd235
timeout
shamilovtim Aug 9, 2024
35a4d22
feedback
shamilovtim Aug 9, 2024
4a88f3f
Update oidc.ts
shamilovtim Aug 9, 2024
c52ce83
Update connect.ts
shamilovtim Aug 9, 2024
ce27402
Update connect.ts
shamilovtim Aug 9, 2024
ed710c7
only one did for selection
shamilovtim Aug 9, 2024
40988ce
feedback
shamilovtim Aug 9, 2024
caa0cbf
Update packages/crypto/tests/utils.spec.ts
shamilovtim Aug 9, 2024
5fd3142
Update packages/crypto/tests/utils.spec.ts
shamilovtim Aug 9, 2024
5b84240
fix flakes
shamilovtim Aug 9, 2024
619c09b
Merge branch 'tshamilov/connect-v2' of github.com:TBD54566975/web5-js…
shamilovtim Aug 9, 2024
5f7e5f4
Update connect.ts
shamilovtim Aug 9, 2024
8819144
Update connect.ts
shamilovtim Aug 9, 2024
0727a7b
run prettier and eslint
shamilovtim Aug 9, 2024
b7f6572
remove corepack
shamilovtim Aug 9, 2024
d987b96
delegate did should use a did jwk
shamilovtim Aug 11, 2024
ee661ce
client should use a did jwk
shamilovtim Aug 11, 2024
ac5447a
better comments
shamilovtim Aug 11, 2024
3214905
Update oidc.ts
shamilovtim Aug 11, 2024
c9dd462
add comments
shamilovtim Aug 12, 2024
c2601d6
Update oidc.ts
shamilovtim Aug 12, 2024
290ae24
cleanup comments
shamilovtim Aug 13, 2024
cc0602c
add some coverage
shamilovtim Aug 13, 2024
3334149
reorganize
shamilovtim Aug 13, 2024
5343d64
Update web5.spec.ts
shamilovtim Aug 13, 2024
0cf9661
feedback: dont encrypt with the code challenge
shamilovtim Aug 13, 2024
5d03bc7
feedback disable code challenge
shamilovtim Aug 13, 2024
70cfa50
clean out todo
shamilovtim Aug 13, 2024
f4d5d6f
Update connect.spec.ts
shamilovtim Aug 13, 2024
cfb05a9
feedback didjwk
shamilovtim Aug 13, 2024
fc234c3
cleanup crypto utils (#830)
shamilovtim Aug 13, 2024
8a3c645
add docs errors back
shamilovtim Aug 13, 2024
3f21c08
disable rule until typedoc is bumped
shamilovtim Aug 13, 2024
9b8cfa7
Revert "cleanup crypto utils (#830)"
shamilovtim Aug 13, 2024
729ae89
renable typedoc
shamilovtim Aug 13, 2024
347d1c3
Update docs-ci.yml
shamilovtim Aug 13, 2024
ab59af9
update codeowners
shamilovtim Aug 13, 2024
19bd7b6
Update CODEOWNERS
shamilovtim Aug 13, 2024
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
14 changes: 14 additions & 0 deletions .changeset/flat-students-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@web5/agent": minor
"@web5/api": patch
"@web5/credentials": patch
"@web5/crypto": patch
"@web5/crypto-aws-kms": patch
"@web5/dids": patch
"@web5/identity-agent": patch
"@web5/proxy-agent": patch
"@web5/user-agent": patch
---

introduce initial web5 connect implementation
bump crypto
4 changes: 2 additions & 2 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
report_changed_scope_only: false
fail_on_warnings: true
fail_on_error: true
thehenrytsai marked this conversation as resolved.
Show resolved Hide resolved
fail_on_warnings: false
fail_on_error: false
group_docs: true
entry_points: |
- file: packages/api/src/index.ts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
echo "DWN_SERVER_BACKGROUND_PROCESS=$!" >> $GITHUB_ENV

- name: Build tests for all packages
run: pnpm --recursive --stream --sequential build:tests:node
run: pnpm --recursive --stream build:tests:node

- name: Run tests for all packages
run: pnpm --recursive --stream exec c8 mocha -- --color --reporter mocha-junit-reporter --reporter-options mochaFile=./results.xml
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Run dwn-server (background)
run: |
node node_modules/@web5/dwn-server/dist/esm/src/main.js &
npx @web5/dwn-server &
echo "DWN_SERVER_BACKGROUND_PROCESS=$!" >> $GITHUB_ENV

- name: Build tests for all packages
Expand Down Expand Up @@ -106,12 +106,6 @@ jobs:
with:
cache: "true"

- name: Print Node.js, npm, & pnpm versions for debugging if needed
run: |
node -v
npm -v
pnpm -v

thehenrytsai marked this conversation as resolved.
Show resolved Hide resolved
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

Expand Down
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"npm.packageManager": "pnpm"
"npm.packageManager": "pnpm",
"editor.formatOnSave":true,
"eslint.useFlatConfig": true,
"eslint.lintTask.enable": true,
"eslint.workingDirectories": [{ "mode": "auto" }],
"eslint.format.enable": true,
"[javascript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
"[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
}
1 change: 0 additions & 1 deletion bin/corepack

This file was deleted.

3 changes: 2 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ component_management:
target: auto # auto compares coverage to the previous base commit
threshold: 5% # allows a 5% drop from the previous base commit coverage
- type: patch
target: 90 # every PR opened should strive for at least 90% coverage
target: 90

individual_components:
- component_id: package-agent
Expand Down Expand Up @@ -59,3 +59,4 @@ coverage:
patch:
default:
informational: true # Don't gate PRs based on Codecov passing thresholds
if_ci_failed: success
shamilovtim marked this conversation as resolved.
Show resolved Hide resolved
158 changes: 76 additions & 82 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,92 +1,86 @@
const eslint = require('@eslint/js');
const globals = require('globals');
const tsParser = require('@typescript-eslint/parser');
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const mochaPlugin = require('eslint-plugin-mocha');
const eslint = require("@eslint/js");
const globals = require("globals");
const tsParser = require("@typescript-eslint/parser");
const tsPlugin = require("@typescript-eslint/eslint-plugin");
const mochaPlugin = require("eslint-plugin-mocha");

shamilovtim marked this conversation as resolved.
Show resolved Hide resolved
/** @type {import('eslint').ESLint.ConfigData} */
module.exports = [
eslint.configs.recommended,
mochaPlugin.configs.flat.recommended,
// tsPlugin.configs.flat.recommended, // @typescript-eslint v7.9.0 doesn't have a recommended config yet, v8 alpha build has it, so should be available soon.
{
// extends : ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: { modules: true },
ecmaVersion: '2022',
project: [
'tests/tsconfig.json'// this is the config that includes both `src` and `tests` directories
]
// extends : ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: { modules: true },
ecmaVersion: "2022",
project: [
"tests/tsconfig.json", // this is the config that includes both `src` and `tests` directories
],
},
globals: {
...globals.node,
...globals.es2021,
...globals.browser,
console: "readonly",
},
},
plugins: {
"@typescript-eslint": tsPlugin,
mocha: mochaPlugin,
},
files: ["**/*.ts"],
// IMPORTANT and confusing: `ignores` only exclude files from the `files` setting.
// To exclude *.js files entirely, you need to have a separate config object altogether. (See another `ignores` below.)
ignores: ["**/*.d.ts"],
rules: {
"no-undef": "off",
"no-redeclare": "off",
"key-spacing": [
"error",
{
align: {
afterColon: true,
beforeColon: true,
on: "colon",
},
},
],
quotes: ["error", "single", { allowTemplateLiterals: true }],
semi: ["error", "always"],
indent: ["error", 2, { SwitchCase: 1 }],
"no-unused-vars": "off",
"prefer-const": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
vars: "all",
args: "after-used",
ignoreRestSiblings: true,
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"no-dupe-class-members": "off",
"no-trailing-spaces": ["error"],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-vars": "off",
// TODO: Revisit new default mocha rules that were disabled in #579 - https://github.com/TBD54566975/web5-js/issues/580
"mocha/no-exclusive-tests": "warn",
"mocha/no-setup-in-describe": "off",
"mocha/no-mocha-arrows": "off",
"mocha/max-top-level-suites": "off",
"mocha/no-identical-title": "off",
"mocha/no-pending-tests": "off",
"mocha/no-skipped-tests": "off",
"mocha/no-sibling-hooks": "off",
},
globals: {
...globals.node,
...globals.es2021,
...globals.browser
}
},
plugins: {
'@typescript-eslint': tsPlugin,
'mocha': mochaPlugin
{
ignores: ["**/*.js", "**/*.cjs", "**/*.mjs"],
},
files: [
'**/*.ts'
],
// IMPORTANT and confusing: `ignores` only exclude files from the `files` setting.
// To exclude *.js files entirely, you need to have a separate config object altogether. (See another `ignores` below.)
ignores: [
'**/*.d.ts',
],
rules: {
'key-spacing': [
'error',
{
'align': {
'afterColon' : true,
'beforeColon' : true,
'on' : 'colon'
}
}
],
'quotes': [
'error',
'single',
{ 'allowTemplateLiterals': true }
],
'semi' : ['error', 'always'],
'indent' : ['error', 2, { 'SwitchCase': 1 }],
'no-unused-vars' : 'off',
'prefer-const' : 'off',
'@typescript-eslint/no-unused-vars' : [
'error',
{
'vars' : 'all',
'args' : 'after-used',
'ignoreRestSiblings' : true,
'argsIgnorePattern' : '^_',
'varsIgnorePattern' : '^_'
}
],
'no-dupe-class-members' : 'off',
'no-trailing-spaces' : ['error'],
'@typescript-eslint/no-explicit-any' : 'off',
'@typescript-eslint/no-non-null-assertion' : 'off',
'@typescript-eslint/ban-ts-comment' : 'off',
// TODO: Revisit new default mocha rules that were disabled in #579 - https://github.com/TBD54566975/web5-js/issues/580
'mocha/no-exclusive-tests' : 'warn',
'mocha/no-setup-in-describe' : 'off',
'mocha/no-mocha-arrows' : 'off',
'mocha/max-top-level-suites' : 'off',
'mocha/no-identical-title' : 'off',
'mocha/no-pending-tests' : 'off',
'mocha/no-skipped-tests' : 'off',
'mocha/no-sibling-hooks' : 'off',
}
}, {
ignores: [
'**/*.js',
'**/*.cjs',
'**/*.mjs',
],
}];
];
Loading
Loading