@beclab/olaresid 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLI.md +1300 -0
- package/README.md +37 -31
- package/TAG.md +589 -0
- package/dist/abi/RootResolver2ABI.d.ts +54 -0
- package/dist/abi/RootResolver2ABI.d.ts.map +1 -0
- package/dist/abi/RootResolver2ABI.js +240 -0
- package/dist/abi/RootResolver2ABI.js.map +1 -0
- package/dist/business/index.d.ts +302 -0
- package/dist/business/index.d.ts.map +1 -0
- package/dist/business/index.js +1209 -0
- package/dist/business/index.js.map +1 -0
- package/dist/business/tag-context.d.ts +219 -0
- package/dist/business/tag-context.d.ts.map +1 -0
- package/dist/business/tag-context.js +537 -0
- package/dist/business/tag-context.js.map +1 -0
- package/dist/cli.js +2085 -39
- package/dist/cli.js.map +1 -1
- package/dist/debug.d.ts.map +1 -1
- package/dist/debug.js +14 -2
- package/dist/debug.js.map +1 -1
- package/dist/index.d.ts +50 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +229 -9
- package/dist/index.js.map +1 -1
- package/dist/utils/crypto-utils.d.ts +130 -0
- package/dist/utils/crypto-utils.d.ts.map +1 -0
- package/dist/utils/crypto-utils.js +402 -0
- package/dist/utils/crypto-utils.js.map +1 -0
- package/dist/utils/error-parser.d.ts +35 -0
- package/dist/utils/error-parser.d.ts.map +1 -0
- package/dist/utils/error-parser.js +202 -0
- package/dist/utils/error-parser.js.map +1 -0
- package/dist/utils/tag-abi-codec.d.ts +69 -0
- package/dist/utils/tag-abi-codec.d.ts.map +1 -0
- package/dist/utils/tag-abi-codec.js +144 -0
- package/dist/utils/tag-abi-codec.js.map +1 -0
- package/dist/utils/tag-type-builder.d.ts +158 -0
- package/dist/utils/tag-type-builder.d.ts.map +1 -0
- package/dist/utils/tag-type-builder.js +410 -0
- package/dist/utils/tag-type-builder.js.map +1 -0
- package/examples/crypto-utilities.ts +140 -0
- package/examples/domain-context.ts +80 -0
- package/examples/generate-mnemonic.ts +149 -0
- package/examples/index.ts +1 -1
- package/examples/ip.ts +171 -0
- package/examples/legacy.ts +10 -10
- package/examples/list-wallets.ts +81 -0
- package/examples/quasar-demo/.eslintrc.js +23 -0
- package/examples/quasar-demo/.quasar/app.js +43 -0
- package/examples/quasar-demo/.quasar/client-entry.js +38 -0
- package/examples/quasar-demo/.quasar/client-prefetch.js +130 -0
- package/examples/quasar-demo/.quasar/quasar-user-options.js +16 -0
- package/examples/quasar-demo/README.md +49 -0
- package/examples/quasar-demo/index.html +11 -0
- package/examples/quasar-demo/package-lock.json +6407 -0
- package/examples/quasar-demo/package.json +36 -0
- package/examples/quasar-demo/quasar.config.js +73 -0
- package/examples/quasar-demo/src/App.vue +13 -0
- package/examples/quasar-demo/src/css/app.scss +1 -0
- package/examples/quasar-demo/src/layouts/MainLayout.vue +21 -0
- package/examples/quasar-demo/src/pages/IndexPage.vue +905 -0
- package/examples/quasar-demo/src/router/index.ts +25 -0
- package/examples/quasar-demo/src/router/routes.ts +11 -0
- package/examples/quasar-demo/tsconfig.json +28 -0
- package/examples/register-subdomain.ts +152 -0
- package/examples/rsa-keypair.ts +148 -0
- package/examples/tag-builder.ts +235 -0
- package/examples/tag-management.ts +534 -0
- package/examples/tag-nested-tuple.ts +190 -0
- package/examples/tag-simple.ts +149 -0
- package/examples/tag-tagger.ts +217 -0
- package/examples/test-nested-tuple-conversion.ts +143 -0
- package/examples/test-type-bytes-parser.ts +70 -0
- package/examples/transfer-domain.ts +197 -0
- package/examples/wallet-management.ts +196 -0
- package/package.json +24 -15
- package/src/abi/RootResolver2ABI.ts +237 -0
- package/src/business/index.ts +1490 -0
- package/src/business/tag-context.ts +713 -0
- package/src/cli.ts +2755 -39
- package/src/debug.ts +17 -2
- package/src/index.ts +300 -14
- package/src/utils/crypto-utils.ts +459 -0
- package/src/utils/error-parser.ts +225 -0
- package/src/utils/tag-abi-codec.ts +158 -0
- package/src/utils/tag-type-builder.ts +469 -0
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -1,93 +1,99 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OlaresID SDK & CLI
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Introduction
|
|
4
4
|
|
|
5
|
-
`olaresid`
|
|
5
|
+
`olaresid` is an SDK library and CLI tool for interacting with Olares ID contracts.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Quick Start
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### As a CLI Tool
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npm install -g @beclab/olaresid
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
did-cli
|
|
14
|
+
# Query Olares ID information on testnet
|
|
15
|
+
did-cli info example.olares.com
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
did-cli
|
|
17
|
+
# Query Olares ID information on mainnet
|
|
18
|
+
did-cli info example.olares.com --network mainnet
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
For detailed CLI usage, see [CLI.md](./CLI.md).
|
|
22
|
+
|
|
23
|
+
### As an SDK
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
26
|
npm install @beclab/olaresid
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
Refer to the [examples](./examples) directory.
|
|
30
|
+
|
|
31
|
+
For Tag System usage, see [TAG.md](./TAG.md).
|
|
28
32
|
|
|
29
33
|
---
|
|
30
34
|
|
|
31
|
-
##
|
|
35
|
+
## Contribution Guide
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
Contributions are welcome! Before submitting a PR, you can test your changes locally in the following ways:
|
|
34
38
|
|
|
35
|
-
###
|
|
39
|
+
### Environment Setup
|
|
36
40
|
|
|
37
41
|
```bash
|
|
38
|
-
#
|
|
42
|
+
# Clone the repository and install dependencies
|
|
39
43
|
git clone https://github.com/beclab/did-system.git
|
|
40
44
|
cd did-system/packages/olaresid
|
|
41
45
|
npm install
|
|
42
46
|
```
|
|
43
47
|
|
|
44
|
-
###
|
|
48
|
+
### Testing Method 1: Debug via CLI
|
|
45
49
|
|
|
46
|
-
|
|
50
|
+
After modifying the code, you can test your changes through the CLI tool:
|
|
47
51
|
|
|
48
52
|
```bash
|
|
49
|
-
#
|
|
53
|
+
# Compile the code
|
|
50
54
|
npm run build
|
|
51
55
|
|
|
52
|
-
#
|
|
56
|
+
# Link the local version globally
|
|
53
57
|
npm link
|
|
54
58
|
|
|
55
|
-
#
|
|
56
|
-
did-cli
|
|
57
|
-
did-cli
|
|
59
|
+
# Test CLI functionality
|
|
60
|
+
did-cli info tw7613781.olares.com
|
|
61
|
+
did-cli info pengpeng8.olares.com --network mainnet
|
|
58
62
|
```
|
|
59
63
|
|
|
60
|
-
###
|
|
64
|
+
### Testing Method 2: Debug via Example Code
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
You can also test by running example code in the [`examples`](./examples) directory:
|
|
63
67
|
|
|
64
68
|
```bash
|
|
65
|
-
#
|
|
69
|
+
# Compile the code
|
|
66
70
|
npm run build
|
|
67
71
|
|
|
68
|
-
#
|
|
72
|
+
# Run examples
|
|
69
73
|
npx ts-node ./examples/index.ts
|
|
70
74
|
|
|
71
|
-
#
|
|
75
|
+
# Or run other examples
|
|
72
76
|
npx ts-node ./examples/legacy.ts
|
|
73
77
|
```
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
After testing, feel free to submit a Pull Request!
|
|
76
80
|
|
|
77
81
|
---
|
|
78
82
|
|
|
79
|
-
##
|
|
83
|
+
## Network Configuration
|
|
80
84
|
|
|
81
|
-
#### Sepolia
|
|
85
|
+
#### Sepolia Testnet (Default)
|
|
82
86
|
|
|
83
87
|
- **RPC:** https://sepolia.optimism.io
|
|
84
88
|
- **DID Contract:** 0xe2D7c3a9013960E04d4E9F5F9B63fff37eEd97A8
|
|
85
89
|
- **Root Resolver:** 0xeF727cb066Fee98F88Db84555830063b4A24ddfc
|
|
90
|
+
- **Root Resolver2:** 0xcbC02aa08c77a374eC0D5A0403E108b7573d96e8
|
|
86
91
|
- **ABI Type:** 0x7386fCBae6Ad4CCE1499d9153D99bc950B589718
|
|
87
92
|
|
|
88
|
-
####
|
|
93
|
+
#### Mainnet
|
|
89
94
|
|
|
90
95
|
- **RPC:** https://optimism-rpc.publicnode.com
|
|
91
96
|
- **DID Contract:** 0x5DA4Fa8E567d86e52Ef8Da860de1be8f54cae97D
|
|
92
97
|
- **Root Resolver:** 0xE2EABA0979277A90511F8873ae1e8cA26B54E740
|
|
98
|
+
- **Root Resolver2:** 0x7e7961aB771cA942CE4DB6e79579e016a33Dc95B
|
|
93
99
|
- **ABI Type:** 0x9ae3F16bD99294Af1784beB1a0A5C84bf2636365
|