@beclab/olaresid 0.1.1
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/LICENSE.md +49 -0
- package/README.md +93 -0
- package/dist/abi/ABITypeABI.d.ts +88 -0
- package/dist/abi/ABITypeABI.d.ts.map +1 -0
- package/dist/abi/ABITypeABI.js +382 -0
- package/dist/abi/ABITypeABI.js.map +1 -0
- package/dist/abi/RegistryABI.d.ts +77 -0
- package/dist/abi/RegistryABI.d.ts.map +1 -0
- package/dist/abi/RegistryABI.js +462 -0
- package/dist/abi/RegistryABI.js.map +1 -0
- package/dist/abi/RootResolverABI.d.ts +78 -0
- package/dist/abi/RootResolverABI.d.ts.map +1 -0
- package/dist/abi/RootResolverABI.js +372 -0
- package/dist/abi/RootResolverABI.js.map +1 -0
- package/dist/abi/TerminusDIDABI.d.ts +80 -0
- package/dist/abi/TerminusDIDABI.d.ts.map +1 -0
- package/dist/abi/TerminusDIDABI.js +1877 -0
- package/dist/abi/TerminusDIDABI.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +199 -0
- package/dist/cli.js.map +1 -0
- package/dist/debug.d.ts +46 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +129 -0
- package/dist/debug.js.map +1 -0
- package/dist/domain/index.d.ts +59 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +431 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/index.d.ts +193 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +166 -0
- package/dist/index.js.map +1 -0
- package/dist/tag/address.d.ts +11 -0
- package/dist/tag/address.d.ts.map +1 -0
- package/dist/tag/address.js +44 -0
- package/dist/tag/address.js.map +1 -0
- package/dist/tag/array.d.ts +14 -0
- package/dist/tag/array.d.ts.map +1 -0
- package/dist/tag/array.js +72 -0
- package/dist/tag/array.js.map +1 -0
- package/dist/tag/bool.d.ts +11 -0
- package/dist/tag/bool.d.ts.map +1 -0
- package/dist/tag/bool.js +43 -0
- package/dist/tag/bool.js.map +1 -0
- package/dist/tag/bytes.d.ts +11 -0
- package/dist/tag/bytes.d.ts.map +1 -0
- package/dist/tag/bytes.js +37 -0
- package/dist/tag/bytes.js.map +1 -0
- package/dist/tag/flarray.d.ts +15 -0
- package/dist/tag/flarray.d.ts.map +1 -0
- package/dist/tag/flarray.js +81 -0
- package/dist/tag/flarray.js.map +1 -0
- package/dist/tag/flbytes.d.ts +11 -0
- package/dist/tag/flbytes.d.ts.map +1 -0
- package/dist/tag/flbytes.js +47 -0
- package/dist/tag/flbytes.js.map +1 -0
- package/dist/tag/index.d.ts +32 -0
- package/dist/tag/index.d.ts.map +1 -0
- package/dist/tag/index.js +121 -0
- package/dist/tag/index.js.map +1 -0
- package/dist/tag/int.d.ts +12 -0
- package/dist/tag/int.d.ts.map +1 -0
- package/dist/tag/int.js +49 -0
- package/dist/tag/int.js.map +1 -0
- package/dist/tag/string.d.ts +11 -0
- package/dist/tag/string.d.ts.map +1 -0
- package/dist/tag/string.js +37 -0
- package/dist/tag/string.js.map +1 -0
- package/dist/tag/tag.d.ts +67 -0
- package/dist/tag/tag.d.ts.map +1 -0
- package/dist/tag/tag.js +157 -0
- package/dist/tag/tag.js.map +1 -0
- package/dist/tag/tuple.d.ts +17 -0
- package/dist/tag/tuple.d.ts.map +1 -0
- package/dist/tag/tuple.js +162 -0
- package/dist/tag/tuple.js.map +1 -0
- package/dist/tag/uint.d.ts +12 -0
- package/dist/tag/uint.d.ts.map +1 -0
- package/dist/tag/uint.js +49 -0
- package/dist/tag/uint.js.map +1 -0
- package/dist/test/did.d.ts +2 -0
- package/dist/test/did.d.ts.map +1 -0
- package/dist/test/did.js +177 -0
- package/dist/test/did.js.map +1 -0
- package/examples/index.ts +15 -0
- package/examples/legacy.ts +33 -0
- package/package.json +50 -0
- package/project.json +6 -0
- package/src/abi/ABITypeABI.ts +379 -0
- package/src/abi/RegistryABI.ts +459 -0
- package/src/abi/RootResolverABI.ts +369 -0
- package/src/abi/TerminusDIDABI.ts +1874 -0
- package/src/cli.ts +230 -0
- package/src/debug.ts +170 -0
- package/src/domain/index.ts +659 -0
- package/src/index.ts +302 -0
- package/src/tag/address.ts +48 -0
- package/src/tag/array.ts +80 -0
- package/src/tag/bool.ts +43 -0
- package/src/tag/bytes.ts +38 -0
- package/src/tag/flarray.ts +99 -0
- package/src/tag/flbytes.ts +48 -0
- package/src/tag/index.ts +170 -0
- package/src/tag/int.ts +51 -0
- package/src/tag/string.ts +38 -0
- package/src/tag/tag.ts +229 -0
- package/src/tag/tuple.ts +193 -0
- package/src/tag/uint.ts +51 -0
- package/src/test/did.ts +346 -0
- package/tsconfig.json +9 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Terminus License
|
|
2
|
+
|
|
3
|
+
## Acceptance
|
|
4
|
+
|
|
5
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
6
|
+
|
|
7
|
+
## Copyright License
|
|
8
|
+
|
|
9
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations below.
|
|
10
|
+
|
|
11
|
+
## Limitations
|
|
12
|
+
|
|
13
|
+
You may use or modify the software only for your own internal business purposes or for non-commercial or personal use. You may distribute the software or provide it to others only if you do so free of charge for non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
14
|
+
|
|
15
|
+
## Patents
|
|
16
|
+
|
|
17
|
+
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
18
|
+
|
|
19
|
+
## Notices
|
|
20
|
+
|
|
21
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. If you modify the software, you must include in any modified copies of the software a prominent notice stating that you have modified the software.
|
|
22
|
+
|
|
23
|
+
## No Other Rights
|
|
24
|
+
|
|
25
|
+
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
26
|
+
|
|
27
|
+
## Termination
|
|
28
|
+
|
|
29
|
+
If you use the software in violation of these terms, such use is not licensed, and your license will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your license will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your license to terminate automatically and permanently.
|
|
30
|
+
|
|
31
|
+
## No Liability
|
|
32
|
+
|
|
33
|
+
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
34
|
+
|
|
35
|
+
## Definitions
|
|
36
|
+
|
|
37
|
+
The “licensor” is the entity offering these terms.
|
|
38
|
+
|
|
39
|
+
The “software” is the software the licensor makes available under these terms, including any portion of it.
|
|
40
|
+
|
|
41
|
+
“You” refers to the individual or entity agreeing to these terms.
|
|
42
|
+
|
|
43
|
+
“Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
44
|
+
|
|
45
|
+
“Your license” is the license granted to you for the software under these terms.
|
|
46
|
+
|
|
47
|
+
“Use” means anything you do with the software requiring your license.
|
|
48
|
+
|
|
49
|
+
“Trademark” means trademarks, service marks, and similar rights.
|
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# DID Contract Developer Components
|
|
2
|
+
|
|
3
|
+
## 介绍
|
|
4
|
+
|
|
5
|
+
`olaresid` 是一个用来和 Olares ID 合约交互的 SDK 库和 CLI 工具.
|
|
6
|
+
|
|
7
|
+
## 快速开始
|
|
8
|
+
|
|
9
|
+
### 作为 CLI 工具
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @beclab/olaresid
|
|
13
|
+
|
|
14
|
+
## 在测试网查询 olares id 信息
|
|
15
|
+
did-cli fetch tw7613781.olares.com
|
|
16
|
+
|
|
17
|
+
## 在主网查询 olares id 信息
|
|
18
|
+
did-cli fetch pengpeng8.olares.com --network mainnet
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 作为 SDK 使用
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @beclab/olaresid
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
参考 [`examples`](./examples) 目录
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 贡献指南
|
|
32
|
+
|
|
33
|
+
欢迎为本项目贡献代码!在提交 PR 之前,你可以通过以下方式在本地测试你的修改:
|
|
34
|
+
|
|
35
|
+
### 环境准备
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# 克隆仓库并安装依赖
|
|
39
|
+
git clone https://github.com/beclab/did-system.git
|
|
40
|
+
cd did-system/packages/olaresid
|
|
41
|
+
npm install
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 测试方式 1:通过 CLI 调试
|
|
45
|
+
|
|
46
|
+
修改代码后,可以通过 CLI 工具测试你的改动:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# 编译代码
|
|
50
|
+
npm run build
|
|
51
|
+
|
|
52
|
+
# 将本地版本链接到全局
|
|
53
|
+
npm link
|
|
54
|
+
|
|
55
|
+
# 测试 CLI 功能
|
|
56
|
+
did-cli fetch tw7613781.olares.com
|
|
57
|
+
did-cli fetch pengpeng8.olares.com --network mainnet
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 测试方式 2:通过示例代码调试
|
|
61
|
+
|
|
62
|
+
也可以通过运行 [`examples`](./examples) 目录中的示例代码来测试:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 编译代码
|
|
66
|
+
npm run build
|
|
67
|
+
|
|
68
|
+
# 运行示例
|
|
69
|
+
npx ts-node ./examples/index.ts
|
|
70
|
+
|
|
71
|
+
# 或运行其他示例
|
|
72
|
+
npx ts-node ./examples/legacy.ts
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
完成测试后,欢迎提交 Pull Request!
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 网络配置
|
|
80
|
+
|
|
81
|
+
#### Sepolia 测试网(默认)
|
|
82
|
+
|
|
83
|
+
- **RPC:** https://sepolia.optimism.io
|
|
84
|
+
- **DID Contract:** 0xe2D7c3a9013960E04d4E9F5F9B63fff37eEd97A8
|
|
85
|
+
- **Root Resolver:** 0xeF727cb066Fee98F88Db84555830063b4A24ddfc
|
|
86
|
+
- **ABI Type:** 0x7386fCBae6Ad4CCE1499d9153D99bc950B589718
|
|
87
|
+
|
|
88
|
+
#### 主网
|
|
89
|
+
|
|
90
|
+
- **RPC:** https://optimism-rpc.publicnode.com
|
|
91
|
+
- **DID Contract:** 0x5DA4Fa8E567d86e52Ef8Da860de1be8f54cae97D
|
|
92
|
+
- **Root Resolver:** 0xE2EABA0979277A90511F8873ae1e8cA26B54E740
|
|
93
|
+
- **ABI Type:** 0x9ae3F16bD99294Af1784beB1a0A5C84bf2636365
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
abi: ({
|
|
3
|
+
inputs: never[];
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
outputs?: undefined;
|
|
7
|
+
stateMutability?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
inputs: {
|
|
10
|
+
internalType: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
}[];
|
|
14
|
+
name: string;
|
|
15
|
+
outputs: {
|
|
16
|
+
internalType: string;
|
|
17
|
+
name: string;
|
|
18
|
+
type: string;
|
|
19
|
+
}[];
|
|
20
|
+
stateMutability: string;
|
|
21
|
+
type: string;
|
|
22
|
+
} | {
|
|
23
|
+
inputs: ({
|
|
24
|
+
components: {
|
|
25
|
+
internalType: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
}[];
|
|
29
|
+
internalType: string;
|
|
30
|
+
name: string;
|
|
31
|
+
type: string;
|
|
32
|
+
} | {
|
|
33
|
+
internalType: string;
|
|
34
|
+
name: string;
|
|
35
|
+
type: string;
|
|
36
|
+
components?: undefined;
|
|
37
|
+
})[];
|
|
38
|
+
name: string;
|
|
39
|
+
outputs: {
|
|
40
|
+
components: {
|
|
41
|
+
internalType: string;
|
|
42
|
+
name: string;
|
|
43
|
+
type: string;
|
|
44
|
+
}[];
|
|
45
|
+
internalType: string;
|
|
46
|
+
name: string;
|
|
47
|
+
type: string;
|
|
48
|
+
}[];
|
|
49
|
+
stateMutability: string;
|
|
50
|
+
type: string;
|
|
51
|
+
} | {
|
|
52
|
+
inputs: {
|
|
53
|
+
components: {
|
|
54
|
+
internalType: string;
|
|
55
|
+
name: string;
|
|
56
|
+
type: string;
|
|
57
|
+
}[];
|
|
58
|
+
internalType: string;
|
|
59
|
+
name: string;
|
|
60
|
+
type: string;
|
|
61
|
+
}[];
|
|
62
|
+
name: string;
|
|
63
|
+
outputs: {
|
|
64
|
+
internalType: string;
|
|
65
|
+
name: string;
|
|
66
|
+
type: string;
|
|
67
|
+
}[];
|
|
68
|
+
stateMutability: string;
|
|
69
|
+
type: string;
|
|
70
|
+
})[];
|
|
71
|
+
abiHaveCount: {
|
|
72
|
+
inputs: {
|
|
73
|
+
internalType: string;
|
|
74
|
+
name: string;
|
|
75
|
+
type: string;
|
|
76
|
+
}[];
|
|
77
|
+
name: string;
|
|
78
|
+
outputs: {
|
|
79
|
+
internalType: string;
|
|
80
|
+
name: string;
|
|
81
|
+
type: string;
|
|
82
|
+
}[];
|
|
83
|
+
stateMutability: string;
|
|
84
|
+
type: string;
|
|
85
|
+
}[];
|
|
86
|
+
};
|
|
87
|
+
export default _default;
|
|
88
|
+
//# sourceMappingURL=ABITypeABI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ABITypeABI.d.ts","sourceRoot":"","sources":["../../src/abi/ABITypeABI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA0XE"}
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
abi: [
|
|
5
|
+
{
|
|
6
|
+
inputs: [],
|
|
7
|
+
name: 'InvalidIndex',
|
|
8
|
+
type: 'error'
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
inputs: [],
|
|
12
|
+
name: 'InvalidOp',
|
|
13
|
+
type: 'error'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
inputs: [],
|
|
17
|
+
name: 'InvalidType',
|
|
18
|
+
type: 'error'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
inputs: [],
|
|
22
|
+
name: 'InvalidValue',
|
|
23
|
+
type: 'error'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
inputs: [],
|
|
27
|
+
name: 'addressT',
|
|
28
|
+
outputs: [
|
|
29
|
+
{
|
|
30
|
+
internalType: 'bytes1',
|
|
31
|
+
name: '',
|
|
32
|
+
type: 'bytes1'
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
stateMutability: 'pure',
|
|
36
|
+
type: 'function'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
inputs: [
|
|
40
|
+
{
|
|
41
|
+
internalType: 'bytes',
|
|
42
|
+
name: 'elem',
|
|
43
|
+
type: 'bytes'
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
name: 'arrayT',
|
|
47
|
+
outputs: [
|
|
48
|
+
{
|
|
49
|
+
internalType: 'bytes',
|
|
50
|
+
name: '',
|
|
51
|
+
type: 'bytes'
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
stateMutability: 'pure',
|
|
55
|
+
type: 'function'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
inputs: [
|
|
59
|
+
{
|
|
60
|
+
components: [
|
|
61
|
+
{
|
|
62
|
+
internalType: 'bytes32',
|
|
63
|
+
name: 'slot',
|
|
64
|
+
type: 'bytes32'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
internalType: 'uint256',
|
|
68
|
+
name: 'offset',
|
|
69
|
+
type: 'uint256'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
internalType: 'bytes',
|
|
73
|
+
name: 'typ',
|
|
74
|
+
type: 'bytes'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
internalType: 'uint256',
|
|
78
|
+
name: 'i',
|
|
79
|
+
type: 'uint256'
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
internalType: 'struct ABI.ReflectVar',
|
|
83
|
+
name: 'self',
|
|
84
|
+
type: 'tuple'
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
internalType: 'uint256',
|
|
88
|
+
name: 'index',
|
|
89
|
+
type: 'uint256'
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
name: 'at',
|
|
93
|
+
outputs: [
|
|
94
|
+
{
|
|
95
|
+
components: [
|
|
96
|
+
{
|
|
97
|
+
internalType: 'bytes32',
|
|
98
|
+
name: 'slot',
|
|
99
|
+
type: 'bytes32'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
internalType: 'uint256',
|
|
103
|
+
name: 'offset',
|
|
104
|
+
type: 'uint256'
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
internalType: 'bytes',
|
|
108
|
+
name: 'typ',
|
|
109
|
+
type: 'bytes'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
internalType: 'uint256',
|
|
113
|
+
name: 'i',
|
|
114
|
+
type: 'uint256'
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
internalType: 'struct ABI.ReflectVar',
|
|
118
|
+
name: '',
|
|
119
|
+
type: 'tuple'
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
stateMutability: 'view',
|
|
123
|
+
type: 'function'
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
inputs: [],
|
|
127
|
+
name: 'boolT',
|
|
128
|
+
outputs: [
|
|
129
|
+
{
|
|
130
|
+
internalType: 'bytes1',
|
|
131
|
+
name: '',
|
|
132
|
+
type: 'bytes1'
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
stateMutability: 'pure',
|
|
136
|
+
type: 'function'
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
inputs: [],
|
|
140
|
+
name: 'bytesT',
|
|
141
|
+
outputs: [
|
|
142
|
+
{
|
|
143
|
+
internalType: 'bytes1',
|
|
144
|
+
name: '',
|
|
145
|
+
type: 'bytes1'
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
stateMutability: 'pure',
|
|
149
|
+
type: 'function'
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
inputs: [
|
|
153
|
+
{
|
|
154
|
+
internalType: 'bytes',
|
|
155
|
+
name: 'typ',
|
|
156
|
+
type: 'bytes'
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
name: 'countTupleFieldsPreorder',
|
|
160
|
+
outputs: [
|
|
161
|
+
{
|
|
162
|
+
internalType: 'uint16[]',
|
|
163
|
+
name: '',
|
|
164
|
+
type: 'uint16[]'
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
stateMutability: 'pure',
|
|
168
|
+
type: 'function'
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
inputs: [
|
|
172
|
+
{
|
|
173
|
+
components: [
|
|
174
|
+
{
|
|
175
|
+
internalType: 'bytes32',
|
|
176
|
+
name: 'slot',
|
|
177
|
+
type: 'bytes32'
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
internalType: 'uint256',
|
|
181
|
+
name: 'offset',
|
|
182
|
+
type: 'uint256'
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
internalType: 'bytes',
|
|
186
|
+
name: 'typ',
|
|
187
|
+
type: 'bytes'
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
internalType: 'uint256',
|
|
191
|
+
name: 'i',
|
|
192
|
+
type: 'uint256'
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
internalType: 'struct ABI.ReflectVar',
|
|
196
|
+
name: 'self',
|
|
197
|
+
type: 'tuple'
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
name: 'get',
|
|
201
|
+
outputs: [
|
|
202
|
+
{
|
|
203
|
+
internalType: 'bytes',
|
|
204
|
+
name: '',
|
|
205
|
+
type: 'bytes'
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
stateMutability: 'view',
|
|
209
|
+
type: 'function'
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
inputs: [
|
|
213
|
+
{
|
|
214
|
+
internalType: 'uint16',
|
|
215
|
+
name: 'bits',
|
|
216
|
+
type: 'uint16'
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
name: 'intT',
|
|
220
|
+
outputs: [
|
|
221
|
+
{
|
|
222
|
+
internalType: 'bytes2',
|
|
223
|
+
name: '',
|
|
224
|
+
type: 'bytes2'
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
stateMutability: 'pure',
|
|
228
|
+
type: 'function'
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
inputs: [
|
|
232
|
+
{
|
|
233
|
+
components: [
|
|
234
|
+
{
|
|
235
|
+
internalType: 'bytes32',
|
|
236
|
+
name: 'slot',
|
|
237
|
+
type: 'bytes32'
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
internalType: 'uint256',
|
|
241
|
+
name: 'offset',
|
|
242
|
+
type: 'uint256'
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
internalType: 'bytes',
|
|
246
|
+
name: 'typ',
|
|
247
|
+
type: 'bytes'
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
internalType: 'uint256',
|
|
251
|
+
name: 'i',
|
|
252
|
+
type: 'uint256'
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
internalType: 'struct ABI.ReflectVar',
|
|
256
|
+
name: 'self',
|
|
257
|
+
type: 'tuple'
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
name: 'length',
|
|
261
|
+
outputs: [
|
|
262
|
+
{
|
|
263
|
+
internalType: 'uint256',
|
|
264
|
+
name: '',
|
|
265
|
+
type: 'uint256'
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
stateMutability: 'view',
|
|
269
|
+
type: 'function'
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
inputs: [],
|
|
273
|
+
name: 'stringT',
|
|
274
|
+
outputs: [
|
|
275
|
+
{
|
|
276
|
+
internalType: 'bytes1',
|
|
277
|
+
name: '',
|
|
278
|
+
type: 'bytes1'
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
stateMutability: 'pure',
|
|
282
|
+
type: 'function'
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
inputs: [
|
|
286
|
+
{
|
|
287
|
+
internalType: 'bytes',
|
|
288
|
+
name: 'elems',
|
|
289
|
+
type: 'bytes'
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
name: 'tupleT',
|
|
293
|
+
outputs: [
|
|
294
|
+
{
|
|
295
|
+
internalType: 'bytes',
|
|
296
|
+
name: '',
|
|
297
|
+
type: 'bytes'
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
stateMutability: 'pure',
|
|
301
|
+
type: 'function'
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
inputs: [
|
|
305
|
+
{
|
|
306
|
+
internalType: 'uint16',
|
|
307
|
+
name: 'bits',
|
|
308
|
+
type: 'uint16'
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
name: 'uintT',
|
|
312
|
+
outputs: [
|
|
313
|
+
{
|
|
314
|
+
internalType: 'bytes2',
|
|
315
|
+
name: '',
|
|
316
|
+
type: 'bytes2'
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
stateMutability: 'pure',
|
|
320
|
+
type: 'function'
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
inputs: [
|
|
324
|
+
{
|
|
325
|
+
internalType: 'bytes',
|
|
326
|
+
name: 'typ',
|
|
327
|
+
type: 'bytes'
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
name: 'validateType',
|
|
331
|
+
outputs: [],
|
|
332
|
+
stateMutability: 'pure',
|
|
333
|
+
type: 'function'
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
abiHaveCount: [
|
|
337
|
+
{
|
|
338
|
+
inputs: [
|
|
339
|
+
{
|
|
340
|
+
internalType: 'bytes',
|
|
341
|
+
name: 'elem',
|
|
342
|
+
type: 'bytes'
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
internalType: 'uint16',
|
|
346
|
+
name: 'count',
|
|
347
|
+
type: 'uint16'
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
name: 'arrayT',
|
|
351
|
+
outputs: [
|
|
352
|
+
{
|
|
353
|
+
internalType: 'bytes',
|
|
354
|
+
name: '',
|
|
355
|
+
type: 'bytes'
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
stateMutability: 'pure',
|
|
359
|
+
type: 'function'
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
inputs: [
|
|
363
|
+
{
|
|
364
|
+
internalType: 'uint8',
|
|
365
|
+
name: 'size',
|
|
366
|
+
type: 'uint8'
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
name: 'bytesT',
|
|
370
|
+
outputs: [
|
|
371
|
+
{
|
|
372
|
+
internalType: 'bytes2',
|
|
373
|
+
name: '',
|
|
374
|
+
type: 'bytes2'
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
stateMutability: 'pure',
|
|
378
|
+
type: 'function'
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
};
|
|
382
|
+
//# sourceMappingURL=ABITypeABI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ABITypeABI.js","sourceRoot":"","sources":["../../src/abi/ABITypeABI.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACd,GAAG,EAAE;QACJ;YACC,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,OAAO;SACb;QACD;YACC,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,OAAO;SACb;QACD;YACC,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,OAAO;SACb;QACD;YACC,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,OAAO;SACb;QACD;YACC,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE;gBACR;oBACC,YAAY,EAAE,QAAQ;oBACtB,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,QAAQ;iBACd;aACD;YACD,eAAe,EAAE,MAAM;YACvB,IAAI,EAAE,UAAU;SAChB;QACD;YACC,MAAM,EAAE;gBACP;oBACC,YAAY,EAAE,OAAO;oBACrB,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,OAAO;iBACb;aACD;YACD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;g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Y,EAAE,OAAO;oBACrB,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,OAAO;iBACb;aACD;YACD,eAAe,EAAE,MAAM;YACvB,IAAI,EAAE,UAAU;SAChB;QACD;YACC,MAAM,EAAE;gBACP;oBACC,YAAY,EAAE,OAAO;oBACrB,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,OAAO;iBACb;aACD;YACD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACR;oBACC,YAAY,EAAE,QAAQ;oBACtB,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,QAAQ;iBACd;aACD;YACD,eAAe,EAAE,MAAM;YACvB,IAAI,EAAE,UAAU;SAChB;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
abi: ({
|
|
3
|
+
inputs: {
|
|
4
|
+
internalType: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
}[];
|
|
8
|
+
stateMutability: string;
|
|
9
|
+
type: string;
|
|
10
|
+
name?: undefined;
|
|
11
|
+
anonymous?: undefined;
|
|
12
|
+
outputs?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
inputs: {
|
|
15
|
+
internalType: string;
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}[];
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
stateMutability?: undefined;
|
|
22
|
+
anonymous?: undefined;
|
|
23
|
+
outputs?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
anonymous: boolean;
|
|
26
|
+
inputs: {
|
|
27
|
+
indexed: boolean;
|
|
28
|
+
internalType: string;
|
|
29
|
+
name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
}[];
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
stateMutability?: undefined;
|
|
35
|
+
outputs?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
inputs: {
|
|
38
|
+
internalType: string;
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
}[];
|
|
42
|
+
name: string;
|
|
43
|
+
outputs: {
|
|
44
|
+
type: string;
|
|
45
|
+
}[];
|
|
46
|
+
stateMutability: string;
|
|
47
|
+
type: string;
|
|
48
|
+
anonymous?: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
inputs: ({
|
|
51
|
+
internalType: string;
|
|
52
|
+
name: string;
|
|
53
|
+
type: string;
|
|
54
|
+
components?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
components: {
|
|
57
|
+
internalType: string;
|
|
58
|
+
name: string;
|
|
59
|
+
type: string;
|
|
60
|
+
}[];
|
|
61
|
+
internalType: string;
|
|
62
|
+
name: string;
|
|
63
|
+
type: string;
|
|
64
|
+
})[];
|
|
65
|
+
name: string;
|
|
66
|
+
outputs: {
|
|
67
|
+
internalType: string;
|
|
68
|
+
name: string;
|
|
69
|
+
type: string;
|
|
70
|
+
}[];
|
|
71
|
+
stateMutability: string;
|
|
72
|
+
type: string;
|
|
73
|
+
anonymous?: undefined;
|
|
74
|
+
})[];
|
|
75
|
+
};
|
|
76
|
+
export default _default;
|
|
77
|
+
//# sourceMappingURL=RegistryABI.d.ts.map
|