@hashgraph/hedera-wallet-connect 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/dist/browser-cjs-metafile.json +1 -1
  2. package/dist/browser-cjs.js +1 -1
  3. package/dist/browser-esm-metafile.json +1 -1
  4. package/dist/browser-esm.js +1 -1
  5. package/dist/node-cjs-metafile.json +1 -1
  6. package/dist/node-cjs.js +5 -4
  7. package/dist/node-esm-metafile.json +1 -1
  8. package/dist/node-esm.js +5 -4
  9. package/dist/types/src/index.d.ts +2 -0
  10. package/dist/types/src/index.d.ts.map +1 -0
  11. package/dist/types/src/lib/dapp/DAppSigner.d.ts +29 -0
  12. package/dist/types/src/lib/dapp/DAppSigner.d.ts.map +1 -0
  13. package/dist/types/src/lib/dapp/index.d.ts +177 -0
  14. package/dist/types/src/lib/dapp/index.d.ts.map +1 -0
  15. package/dist/types/src/lib/index.d.ts +4 -0
  16. package/dist/types/src/lib/index.d.ts.map +1 -0
  17. package/dist/types/src/lib/shared/chainIds.d.ts +12 -0
  18. package/dist/types/src/lib/shared/chainIds.d.ts.map +1 -0
  19. package/dist/types/src/lib/shared/errors.d.ts +49 -0
  20. package/dist/types/src/lib/shared/errors.d.ts.map +1 -0
  21. package/dist/types/src/lib/shared/events.d.ts +8 -0
  22. package/dist/types/src/lib/shared/events.d.ts.map +1 -0
  23. package/dist/types/src/lib/shared/index.d.ts +7 -0
  24. package/dist/types/src/lib/shared/index.d.ts.map +1 -0
  25. package/dist/types/src/lib/shared/methods.d.ts +13 -0
  26. package/dist/types/src/lib/shared/methods.d.ts.map +1 -0
  27. package/dist/types/src/lib/shared/payloads.d.ts +102 -0
  28. package/dist/types/src/lib/shared/payloads.d.ts.map +1 -0
  29. package/dist/types/src/lib/shared/utils.d.ts +269 -0
  30. package/dist/types/src/lib/shared/utils.d.ts.map +1 -0
  31. package/dist/types/src/lib/wallet/index.d.ts +40 -0
  32. package/dist/types/src/lib/wallet/index.d.ts.map +1 -0
  33. package/dist/types/src/lib/wallet/provider.d.ts +18 -0
  34. package/dist/types/src/lib/wallet/provider.d.ts.map +1 -0
  35. package/dist/types/src/lib/wallet/types.d.ts +32 -0
  36. package/dist/types/src/lib/wallet/types.d.ts.map +1 -0
  37. package/dist/types/test/_helpers.d.ts +35 -0
  38. package/dist/types/test/_helpers.d.ts.map +1 -0
  39. package/dist/types/test/dapp/DAppConnector.test.d.ts +2 -0
  40. package/dist/types/test/dapp/DAppConnector.test.d.ts.map +1 -0
  41. package/dist/types/test/utils.test.d.ts +2 -0
  42. package/dist/types/test/utils.test.d.ts.map +1 -0
  43. package/dist/types/test/wallet/methods/wallet-executeTransaction.test.d.ts +2 -0
  44. package/dist/types/test/wallet/methods/wallet-executeTransaction.test.d.ts.map +1 -0
  45. package/dist/types/test/wallet/methods/wallet-getNodeAddresses.test.d.ts +2 -0
  46. package/dist/types/test/wallet/methods/wallet-getNodeAddresses.test.d.ts.map +1 -0
  47. package/dist/types/test/wallet/methods/wallet-signAndExecuteQuery.test.d.ts +2 -0
  48. package/dist/types/test/wallet/methods/wallet-signAndExecuteQuery.test.d.ts.map +1 -0
  49. package/dist/types/test/wallet/methods/wallet-signAndExecuteTransaction.test.d.ts +2 -0
  50. package/dist/types/test/wallet/methods/wallet-signAndExecuteTransaction.test.d.ts.map +1 -0
  51. package/dist/types/test/wallet/methods/wallet-signMessage.test.d.ts +2 -0
  52. package/dist/types/test/wallet/methods/wallet-signMessage.test.d.ts.map +1 -0
  53. package/dist/types/test/wallet/methods/wallet-signTransaction.test.d.ts +2 -0
  54. package/dist/types/test/wallet/methods/wallet-signTransaction.test.d.ts.map +1 -0
  55. package/dist/types/test/wallet/wallet-init.test.d.ts +2 -0
  56. package/dist/types/test/wallet/wallet-init.test.d.ts.map +1 -0
  57. package/package.json +3 -3
  58. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -35
  59. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -17
  60. package/.github/ISSUE_TEMPLATE/hip_820.md +0 -16
  61. package/.github/dependabot.yml +0 -17
  62. package/.github/workflows/prettier.yml +0 -28
  63. package/.github/workflows/publish.yml +0 -35
  64. package/.github/workflows/test.yml +0 -32
  65. package/.husky/pre-commit +0 -4
  66. package/.lintstagedrc.json +0 -5
  67. package/.prettierignore +0 -3
  68. package/jest.config.ts +0 -33
  69. package/scripts/examples/build.mjs +0 -54
  70. package/scripts/examples/dev.mjs +0 -54
  71. package/scripts/lib/build.mjs +0 -40
  72. package/scripts/lib/context.mjs +0 -71
  73. package/scripts/lib/watch.mjs +0 -28
  74. package/typedoc.json +0 -10
@@ -1,28 +0,0 @@
1
- name: Prettier
2
-
3
- on:
4
- push:
5
- pull_request:
6
-
7
- permissions:
8
- contents: read
9
-
10
- jobs:
11
- formatting-check:
12
- name: Formatting Check
13
- runs-on: [self-hosted, Linux, medium, ephemeral]
14
-
15
- steps:
16
- - name: Checkout code
17
- uses: actions/checkout@v3
18
-
19
- - name: Use Node.js
20
- uses: actions/setup-node@v4
21
- with:
22
- node-version: '18'
23
-
24
- - name: Install dependencies
25
- run: npm install
26
-
27
- - name: Run Prettier Check
28
- run: npm run prettier:check
@@ -1,35 +0,0 @@
1
- name: Publishing
2
- on:
3
- release:
4
- types:
5
- - published
6
- jobs:
7
- publish:
8
- name: docker
9
- runs-on: [self-hosted, Linux, medium, ephemeral]
10
-
11
- permissions:
12
- contents: read
13
-
14
- steps:
15
- - name: Checkout repository
16
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
17
-
18
-
19
- - name: Setup NodeJS Environment
20
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
21
- with:
22
- node-version: 18.x
23
-
24
- - name: Install dependencies
25
- run: npm install
26
-
27
- - name: Create .npmrc
28
- run: |
29
- touch .npmrc
30
- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
31
-
32
- - name: Publish
33
- run: npm publish --public
34
- env:
35
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,32 +0,0 @@
1
- name: Test
2
- on:
3
- workflow_dispatch:
4
- pull_request:
5
- push:
6
- branches: [main]
7
- jobs:
8
- test-node:
9
- name: Unit Tests
10
- runs-on: [self-hosted, Linux, medium, ephemeral]
11
- permissions:
12
- checks: write
13
- pull-requests: write
14
- contents: read
15
-
16
- steps:
17
- - name: Setup NodeJS Environment
18
- uses: actions/setup-node@d86ebcd40b3cb50b156bfa44dd277faf38282d12
19
- with:
20
- node-version: 18.x
21
- - name: Checkout repository
22
- uses: actions/checkout@v3
23
- - name: Install dependencies
24
- run: npm install
25
- - name: Run tests (Forked PR)
26
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && !cancelled() && !failure() }}
27
- run: npm run test
28
- - name: Test
29
- uses: ArtiomTr/jest-coverage-report-action@v2
30
- if: ${{ ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push') && !cancelled() && !failure() }}
31
- with:
32
- test-script: npm run test
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npx lint-staged
@@ -1,5 +0,0 @@
1
- {
2
- "*.ts": ["prettier --write"],
3
- "*.html": ["prettier --write"],
4
- "*.css": "prettier --write"
5
- }
package/.prettierignore DELETED
@@ -1,3 +0,0 @@
1
- # Ignore artifacts:
2
- dist
3
- node_modules
package/jest.config.ts DELETED
@@ -1,33 +0,0 @@
1
- /*
2
- *
3
- * Hedera Wallet Connect
4
- *
5
- * Copyright (C) 2023 Hedera Hashgraph, LLC
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
-
21
- import type { Config } from 'jest'
22
-
23
- const config: Config = {
24
- preset: 'ts-jest/presets/js-with-ts',
25
- detectOpenHandles: true,
26
- fakeTimers: {
27
- enableGlobally: true,
28
- },
29
- testMatch: ['**/?(*.)+(spec|test).ts?(x)', '!**/DAppConnector.test.ts', '!**/wallet*/**'],
30
- transformIgnorePatterns: ['node_modules/(?!@walletconnect)'],
31
- }
32
-
33
- export default config
@@ -1,54 +0,0 @@
1
- /*
2
- *
3
- * Hedera Wallet Connect
4
- *
5
- * Copyright (C) 2023 Hedera Hashgraph, LLC
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
-
21
- import * as esbuild from 'esbuild'
22
- import copy from 'esbuild-plugin-copy'
23
-
24
- export const config = {
25
- bundle: true,
26
- minify: false,
27
- platform: 'browser',
28
- // format: 'esm',
29
- alias: {
30
- '@hashgraph/sdk': './node_modules/@hashgraph/sdk/src/index.js',
31
- '@hashgraph/proto': './node_modules/@hashgraph/proto',
32
- },
33
- plugins: [
34
- copy({
35
- assets: {
36
- from: ['src/examples/typescript/**/*.(html|css|ico|jpg|png)'],
37
- to: ['./'],
38
- },
39
- watch: true, // for ../dev.mjs
40
- }),
41
- ],
42
- outdir: 'dist/examples/typescript',
43
- entryPoints: [
44
- 'src/examples/typescript/main.ts',
45
- 'src/examples/typescript/dapp/main.ts',
46
- 'src/examples/typescript/wallet/main.ts',
47
- ],
48
- define: {
49
- 'process.env.dappUrl': '"https://wc.hgraph.app/dapp/index.html"',
50
- 'process.env.walletUrl': '"https://wallet.wc.hgraph.app/wallet/index.html"',
51
- },
52
- }
53
-
54
- esbuild.build(config)
@@ -1,54 +0,0 @@
1
- /*
2
- *
3
- * Hedera Wallet Connect
4
- *
5
- * Copyright (C) 2023 Hedera Hashgraph, LLC
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
-
21
- import * as esbuild from 'esbuild'
22
- import { config } from './build.mjs'
23
-
24
- const devConfig = {
25
- ...config,
26
- define: {
27
- 'process.env.dappUrl': '"http://localhost:8080/dapp/index.html"',
28
- 'process.env.walletUrl': '"http://localhost:8081/wallet/index.html"',
29
- },
30
- }
31
-
32
- let ctx8080 = await esbuild.context(devConfig)
33
- let ctx8081 = await esbuild.context(devConfig)
34
-
35
- /*
36
- * watches for file changes and serves most recent files
37
- */
38
- async function main() {
39
- const server1 = await ctx8080.serve({
40
- servedir: 'dist/examples/typescript',
41
- host: 'localhost',
42
- port: 8080,
43
- })
44
- const server2 = await ctx8081.serve({
45
- servedir: 'dist/examples/typescript',
46
- host: 'localhost',
47
- port: 8081,
48
- })
49
-
50
- console.log(`Server 1 is up ${server1.host}:${server1.port}`)
51
- console.log(`Server 2 is up ${server2.host}:${server2.port}`)
52
- }
53
-
54
- await main()
@@ -1,40 +0,0 @@
1
- /*
2
- *
3
- * Hedera Wallet Connect
4
- *
5
- * Copyright (C) 2023 Hedera Hashgraph, LLC
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
-
21
- import fs from 'node:fs'
22
- import * as esbuild from 'esbuild'
23
- import * as ctx from './context.mjs'
24
-
25
- /*
26
- * https://esbuild.github.io/analyze/
27
- * - metafiles.json files are generated by this script to analyze the build
28
- */
29
- esbuild.build(ctx.nodeCjs).then((result) => {
30
- fs.writeFileSync('dist/node-cjs-metafile.json', JSON.stringify(result.metafile))
31
- })
32
- esbuild.build(ctx.nodeEsm).then((result) => {
33
- fs.writeFileSync('dist/node-esm-metafile.json', JSON.stringify(result.metafile))
34
- })
35
- esbuild.build(ctx.browserCjs).then((result) => {
36
- fs.writeFileSync('dist/browser-cjs-metafile.json', JSON.stringify(result.metafile))
37
- })
38
- esbuild.build(ctx.browserEsm).then((result) => {
39
- fs.writeFileSync('dist/browser-esm-metafile.json', JSON.stringify(result.metafile))
40
- })
@@ -1,71 +0,0 @@
1
- /*
2
- *
3
- * Hedera Wallet Connect
4
- *
5
- * Copyright (C) 2023 Hedera Hashgraph, LLC
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
-
21
- import * as esbuild from 'esbuild'
22
-
23
- // https://esbuild.github.io/api/#main-fields-for-package-authors
24
- export const common = {
25
- entryPoints: ['src/index.ts'],
26
- bundle: true,
27
- minify: true,
28
- metafile: true,
29
- loader: {
30
- '.json': 'text',
31
- },
32
- // exports field in @hashgraph/sdk overwrites browser field
33
- // https://github.com/evanw/esbuild/issues/1275
34
- alias: {
35
- '@hashgraph/sdk': './node_modules/@hashgraph/sdk/src/index.js',
36
- '@hashgraph/proto': './node_modules/@hashgraph/proto',
37
- },
38
- // external: ['./node_modules/@hashgraph/sdk/src/index.js'],
39
- }
40
-
41
- export const nodeCjs = {
42
- ...common,
43
- format: 'cjs',
44
- platform: 'node',
45
- target: ['node18'],
46
- outfile: 'dist/node-cjs.js',
47
- }
48
-
49
- export const nodeEsm = {
50
- ...common,
51
- format: 'esm',
52
- platform: 'node',
53
- target: ['node18'],
54
- outfile: 'dist/node-esm.js',
55
- }
56
-
57
- export const browserEsm = {
58
- ...common,
59
- format: 'esm',
60
- platform: 'browser',
61
- target: ['chrome58', 'firefox57', 'safari11', 'edge88'],
62
- outfile: 'dist/browser-esm.js',
63
- }
64
-
65
- export const browserCjs = {
66
- ...common,
67
- format: 'cjs',
68
- platform: 'browser',
69
- target: ['chrome58', 'firefox57', 'safari11', 'edge88'],
70
- outfile: 'dist/browser-cjs.js',
71
- }
@@ -1,28 +0,0 @@
1
- /*
2
- *
3
- * Hedera Wallet Connect
4
- *
5
- * Copyright (C) 2023 Hedera Hashgraph, LLC
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
-
21
- import * as context from './context.mjs'
22
-
23
- await Promise.all([
24
- context.nodeCjs.watch(),
25
- context.nodeEsm.watch(),
26
- context.browserEsm.watch(),
27
- context.browserCjs.watch(),
28
- ])
package/typedoc.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "https://typedoc.org/schema.json",
3
- "entryPointStrategy": "expand",
4
- "entryPoints": ["./src/lib"],
5
- "plugin": ["typedoc-theme-hierarchy"],
6
- "theme": "hierarchy",
7
- "out": "dist/examples/typescript/docs",
8
- "sourceLinkExternal": true,
9
- "basePath": "./docs"
10
- }