= T extends T ? keyof T : never;
74 | export type Exact = P extends Builtin ? P
75 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
76 |
77 | function isSet(value: any): boolean {
78 | return value !== null && value !== undefined;
79 | }
80 |
--------------------------------------------------------------------------------
/public/images/pages/icon-document.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/AppSubmenu.vue:
--------------------------------------------------------------------------------
1 |
2 |
30 |
31 |
75 |
--------------------------------------------------------------------------------
/src/store/generated/zigbeealliance.distributedcomplianceledger.dclgenutil/index.ts:
--------------------------------------------------------------------------------
1 | import { Client, registry, MissingWalletError } from 'zigbee-alliance-distributed-compliance-ledger-client-ts'
2 |
3 |
4 |
5 | export { };
6 |
7 | function initClient(vuexGetters) {
8 | return new Client({
9 | apiURL: vuexGetters['common/env/apiCosmos'],
10 | rpcURL: vuexGetters['common/env/apiTendermint'],
11 | prefix: vuexGetters['common/env/addrPrefix']
12 | }, vuexGetters['keplrSigner'])
13 | }
14 |
15 | function mergeResults(value, next_values) {
16 | for (let prop of Object.keys(next_values)) {
17 | if (Array.isArray(next_values[prop])) {
18 | value[prop]=[...value[prop], ...next_values[prop]]
19 | }else{
20 | value[prop]=next_values[prop]
21 | }
22 | }
23 | return value
24 | }
25 |
26 | type Field = {
27 | name: string;
28 | type: unknown;
29 | }
30 | function getStructure(template) {
31 | let structure: {fields: Field[]} = { fields: [] }
32 | for (const [key, value] of Object.entries(template)) {
33 | let field = { name: key, type: typeof value }
34 | structure.fields.push(field)
35 | }
36 | return structure
37 | }
38 | const getDefaultState = () => {
39 | return {
40 |
41 | _Structure: {
42 |
43 | },
44 | _Registry: registry,
45 | _Subscriptions: new Set(),
46 | }
47 | }
48 |
49 | // initial state
50 | const state = getDefaultState()
51 |
52 | export default {
53 | namespaced: true,
54 | state,
55 | mutations: {
56 | RESET_STATE(state) {
57 | Object.assign(state, getDefaultState())
58 | },
59 | QUERY(state, { query, key, value }) {
60 | state[query][JSON.stringify(key)] = value
61 | },
62 | SUBSCRIBE(state, subscription) {
63 | state._Subscriptions.add(JSON.stringify(subscription))
64 | },
65 | UNSUBSCRIBE(state, subscription) {
66 | state._Subscriptions.delete(JSON.stringify(subscription))
67 | }
68 | },
69 | getters: {
70 |
71 | getTypeStructure: (state) => (type) => {
72 | return state._Structure[type].fields
73 | },
74 | getRegistry: (state) => {
75 | return state._Registry
76 | }
77 | },
78 | actions: {
79 | init({ dispatch, rootGetters }) {
80 | console.log('Vuex module: zigbeealliance.distributedcomplianceledger.dclgenutil initialized!')
81 | if (rootGetters['common/env/client']) {
82 | rootGetters['common/env/client'].on('newblock', () => {
83 | dispatch('StoreUpdate')
84 | })
85 | }
86 | },
87 | resetState({ commit }) {
88 | commit('RESET_STATE')
89 | },
90 | unsubscribe({ commit }, subscription) {
91 | commit('UNSUBSCRIBE', subscription)
92 | },
93 | async StoreUpdate({ state, dispatch }) {
94 | state._Subscriptions.forEach(async (subscription) => {
95 | try {
96 | const sub=JSON.parse(subscription)
97 | await dispatch(sub.action, sub.payload)
98 | }catch(e) {
99 | throw new Error('Subscriptions: ' + e.message)
100 | }
101 | })
102 | },
103 |
104 |
105 |
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/types/zigbeealliance/distributedcomplianceledger/vendorinfo/genesis.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 | import { VendorInfo } from "./vendor_info";
4 |
5 | export const protobufPackage = "zigbeealliance.distributedcomplianceledger.vendorinfo";
6 |
7 | /** GenesisState defines the vendorinfo module's genesis state. */
8 | export interface GenesisState {
9 | /** this line is used by starport scaffolding # genesis/proto/state */
10 | vendorInfoList: VendorInfo[];
11 | }
12 |
13 | function createBaseGenesisState(): GenesisState {
14 | return { vendorInfoList: [] };
15 | }
16 |
17 | export const GenesisState = {
18 | encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
19 | for (const v of message.vendorInfoList) {
20 | VendorInfo.encode(v!, writer.uint32(10).fork()).ldelim();
21 | }
22 | return writer;
23 | },
24 |
25 | decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState {
26 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
27 | let end = length === undefined ? reader.len : reader.pos + length;
28 | const message = createBaseGenesisState();
29 | while (reader.pos < end) {
30 | const tag = reader.uint32();
31 | switch (tag >>> 3) {
32 | case 1:
33 | message.vendorInfoList.push(VendorInfo.decode(reader, reader.uint32()));
34 | break;
35 | default:
36 | reader.skipType(tag & 7);
37 | break;
38 | }
39 | }
40 | return message;
41 | },
42 |
43 | fromJSON(object: any): GenesisState {
44 | return {
45 | vendorInfoList: Array.isArray(object?.vendorInfoList)
46 | ? object.vendorInfoList.map((e: any) => VendorInfo.fromJSON(e))
47 | : [],
48 | };
49 | },
50 |
51 | toJSON(message: GenesisState): unknown {
52 | const obj: any = {};
53 | if (message.vendorInfoList) {
54 | obj.vendorInfoList = message.vendorInfoList.map((e) => e ? VendorInfo.toJSON(e) : undefined);
55 | } else {
56 | obj.vendorInfoList = [];
57 | }
58 | return obj;
59 | },
60 |
61 | fromPartial, I>>(object: I): GenesisState {
62 | const message = createBaseGenesisState();
63 | message.vendorInfoList = object.vendorInfoList?.map((e) => VendorInfo.fromPartial(e)) || [];
64 | return message;
65 | },
66 | };
67 |
68 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
69 |
70 | export type DeepPartial = T extends Builtin ? T
71 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
72 | : T extends {} ? { [K in keyof T]?: DeepPartial }
73 | : Partial;
74 |
75 | type KeysOfUnion = T extends T ? keyof T : never;
76 | export type Exact = P extends Builtin ? P
77 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
78 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DCL UI Web-based App for Managing CSA-DCL
2 |
3 | DCL-UI is a [Vue.js](https://vuejs.org/)-based web application for managing the CSA Distributed Compliance Ledger. This app provides a web interface to view and manage data in the Ledger.
4 |
5 | ## Overview
6 | The DCL-UI provides features for:
7 | - Viewing and managing compliance records
8 | - Interacting with the distributed ledger
9 | - Managing user access and permissions
10 | - Monitoring ledger status and transactions
11 |
12 | ## Prerequisites
13 | - [Node.js](https://nodejs.org) version 20.x
14 | - Git
15 | - Modern web browser (Chrome, Firefox, Safari, or Edge)
16 | - Basic knowledge of Vue.js and blockchain concepts
17 |
18 | ## Project Setup
19 |
20 | ### Getting Started
21 | Clone the repository:
22 | ```bash
23 | git clone https://github.com/Comcast/dcl-ui.git
24 | cd dcl-ui
25 | ```
26 |
27 | Install dependencies:
28 | ```bash
29 | npm install
30 | ```
31 |
32 | ### Development
33 | Start the development server with hot-reload:
34 | ```bash
35 | npm run dev
36 | ```
37 |
38 | Build for production:
39 | ```bash
40 | npm run build
41 | ```
42 |
43 | ### Project Structure
44 | ```
45 | dcl-ui/
46 | ├── src/ # Source code
47 | ├── public/ # Static assets
48 | ├── dist/ # Production build output
49 | ├── tests/ # Test files
50 | └── vite.config.js # Vite configuration
51 | ```
52 |
53 | ## Configuration
54 |
55 | ### Development Environment
56 | The default configuration connects to the CSA Testnet Observer Node. The development environment uses a proxy server for CORS-disabled endpoints.
57 |
58 | Environment variables (.env.development):
59 | ```env
60 | VITE_APP_DCL_API_NODE=http://localhost:8080/api
61 | VITE_APP_DCL_RPC_NODE=http://localhost:8080/rpc
62 | VITE_APP_DCL_WEBSOCKET_NODE=ws://localhost:8080/websocket
63 | VITE_APP_DCL_CHAIN_ID=testnet-2.0
64 | VITE_APP_DCL_CHAIN_NAME=DCL-Chain-Testnet
65 | VITE_APP_DCL_ADDR_PREFIX=cosmos
66 | VITE_APP_DCL_SDK_VERSION=Stargate
67 | VITE_APP_DCL_TX_API=/rpc/tx?hash=0x
68 | VITE_APP_DCL_REFRESH=500000
69 | ```
70 |
71 | ### Production Deployment
72 |
73 | 1. Create a `.env` file for production settings (use `.env.sample` as reference)
74 | 2. Build the application:
75 | ```bash
76 | npm run build
77 | ```
78 | 3. Deploy the contents of the `/dist` folder to your web server
79 |
80 | ## Troubleshooting
81 |
82 | Common issues and solutions:
83 | 1. **CORS Issues**: Ensure proxy settings are correct in development
84 | 2. **Build Errors**: Check Node.js version and dependencies
85 | 3. **API Connection**: Verify environment variables and network connectivity
86 |
87 | ## Contributing
88 | 1. Fork the repository
89 | 2. Create a feature branch
90 | 3. Submit a pull request
91 |
92 | ## Additional Resources
93 | - [Vue.js Documentation](https://vuejs.org/guide/introduction.html)
94 | - [Vite Documentation](https://vitejs.dev/guide/)
95 | - [CSA DCL](https://github.com/zigbee-alliance/distributed-compliance-ledger)
96 |
97 |
98 | ## Support
99 | For issues and feature requests, please use the GitHub issue tracker.
--------------------------------------------------------------------------------
/src/layout/AppLayout.vue:
--------------------------------------------------------------------------------
1 |
58 |
59 |
60 |
61 |
62 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/ts-client/cosmos.params.v1beta1/module.ts:
--------------------------------------------------------------------------------
1 | // Generated by Ignite ignite.com/cli
2 |
3 | import { StdFee } from "@cosmjs/launchpad";
4 | import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate";
5 | import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
6 | import { msgTypes } from './registry';
7 | import { IgniteClient } from "../client"
8 | import { MissingWalletError } from "../helpers"
9 | import { Api } from "./rest";
10 |
11 | import { ParameterChangeProposal as typeParameterChangeProposal} from "./types"
12 | import { ParamChange as typeParamChange} from "./types"
13 | import { Subspace as typeSubspace} from "./types"
14 |
15 | export { };
16 |
17 |
18 |
19 | export const registry = new Registry(msgTypes);
20 |
21 | type Field = {
22 | name: string;
23 | type: unknown;
24 | }
25 | function getStructure(template) {
26 | const structure: {fields: Field[]} = { fields: [] }
27 | for (let [key, value] of Object.entries(template)) {
28 | let field = { name: key, type: typeof value }
29 | structure.fields.push(field)
30 | }
31 | return structure
32 | }
33 | const defaultFee = {
34 | amount: [],
35 | gas: "200000",
36 | };
37 |
38 | interface TxClientOptions {
39 | addr: string
40 | prefix: string
41 | signer?: OfflineSigner
42 | }
43 |
44 | export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
45 |
46 | return {
47 |
48 |
49 | }
50 | };
51 |
52 | interface QueryClientOptions {
53 | addr: string
54 | }
55 |
56 | export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
57 | return new Api({ baseURL: addr });
58 | };
59 |
60 | class SDKModule {
61 | public query: ReturnType;
62 | public tx: ReturnType;
63 | public structure: Record;
64 | public registry: Array<[string, GeneratedType]> = [];
65 |
66 | constructor(client: IgniteClient) {
67 |
68 | this.query = queryClient({ addr: client.env.apiURL });
69 | this.updateTX(client);
70 | this.structure = {
71 | ParameterChangeProposal: getStructure(typeParameterChangeProposal.fromPartial({})),
72 | ParamChange: getStructure(typeParamChange.fromPartial({})),
73 | Subspace: getStructure(typeSubspace.fromPartial({})),
74 |
75 | };
76 | client.on('signer-changed',(signer) => {
77 | this.updateTX(client);
78 | })
79 | }
80 | updateTX(client: IgniteClient) {
81 | const methods = txClient({
82 | signer: client.signer,
83 | addr: client.env.rpcURL,
84 | prefix: client.env.prefix ?? "cosmos",
85 | })
86 |
87 | this.tx = methods;
88 | for (let m in methods) {
89 | this.tx[m] = methods[m].bind(this.tx);
90 | }
91 | }
92 | };
93 |
94 | const Module = (test: IgniteClient) => {
95 | return {
96 | module: {
97 | CosmosParamsV1Beta1: new SDKModule(test)
98 | },
99 | registry: msgTypes
100 | }
101 | }
102 | export default Module;
--------------------------------------------------------------------------------
/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/certificate_identifier.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 |
4 | export const protobufPackage = "zigbeealliance.distributedcomplianceledger.pki";
5 |
6 | export interface CertificateIdentifier {
7 | subject: string;
8 | subjectKeyId: string;
9 | }
10 |
11 | function createBaseCertificateIdentifier(): CertificateIdentifier {
12 | return { subject: "", subjectKeyId: "" };
13 | }
14 |
15 | export const CertificateIdentifier = {
16 | encode(message: CertificateIdentifier, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
17 | if (message.subject !== "") {
18 | writer.uint32(10).string(message.subject);
19 | }
20 | if (message.subjectKeyId !== "") {
21 | writer.uint32(18).string(message.subjectKeyId);
22 | }
23 | return writer;
24 | },
25 |
26 | decode(input: _m0.Reader | Uint8Array, length?: number): CertificateIdentifier {
27 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
28 | let end = length === undefined ? reader.len : reader.pos + length;
29 | const message = createBaseCertificateIdentifier();
30 | while (reader.pos < end) {
31 | const tag = reader.uint32();
32 | switch (tag >>> 3) {
33 | case 1:
34 | message.subject = reader.string();
35 | break;
36 | case 2:
37 | message.subjectKeyId = reader.string();
38 | break;
39 | default:
40 | reader.skipType(tag & 7);
41 | break;
42 | }
43 | }
44 | return message;
45 | },
46 |
47 | fromJSON(object: any): CertificateIdentifier {
48 | return {
49 | subject: isSet(object.subject) ? String(object.subject) : "",
50 | subjectKeyId: isSet(object.subjectKeyId) ? String(object.subjectKeyId) : "",
51 | };
52 | },
53 |
54 | toJSON(message: CertificateIdentifier): unknown {
55 | const obj: any = {};
56 | message.subject !== undefined && (obj.subject = message.subject);
57 | message.subjectKeyId !== undefined && (obj.subjectKeyId = message.subjectKeyId);
58 | return obj;
59 | },
60 |
61 | fromPartial, I>>(object: I): CertificateIdentifier {
62 | const message = createBaseCertificateIdentifier();
63 | message.subject = object.subject ?? "";
64 | message.subjectKeyId = object.subjectKeyId ?? "";
65 | return message;
66 | },
67 | };
68 |
69 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
70 |
71 | export type DeepPartial = T extends Builtin ? T
72 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
73 | : T extends {} ? { [K in keyof T]?: DeepPartial }
74 | : Partial;
75 |
76 | type KeysOfUnion = T extends T ? keyof T : never;
77 | export type Exact = P extends Builtin ? P
78 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
79 |
80 | function isSet(value: any): boolean {
81 | return value !== null && value !== undefined;
82 | }
83 |
--------------------------------------------------------------------------------
/public/layout/images/icon.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/ts-client/cosmos.auth.v1beta1/module.ts:
--------------------------------------------------------------------------------
1 | // Generated by Ignite ignite.com/cli
2 |
3 | import { StdFee } from "@cosmjs/launchpad";
4 | import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate";
5 | import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
6 | import { msgTypes } from './registry';
7 | import { IgniteClient } from "../client"
8 | import { MissingWalletError } from "../helpers"
9 | import { Api } from "./rest";
10 |
11 | import { BaseAccount as typeBaseAccount} from "./types"
12 | import { ModuleAccount as typeModuleAccount} from "./types"
13 | import { ModuleCredential as typeModuleCredential} from "./types"
14 | import { Params as typeParams} from "./types"
15 |
16 | export { };
17 |
18 |
19 |
20 | export const registry = new Registry(msgTypes);
21 |
22 | type Field = {
23 | name: string;
24 | type: unknown;
25 | }
26 | function getStructure(template) {
27 | const structure: {fields: Field[]} = { fields: [] }
28 | for (let [key, value] of Object.entries(template)) {
29 | let field = { name: key, type: typeof value }
30 | structure.fields.push(field)
31 | }
32 | return structure
33 | }
34 | const defaultFee = {
35 | amount: [],
36 | gas: "200000",
37 | };
38 |
39 | interface TxClientOptions {
40 | addr: string
41 | prefix: string
42 | signer?: OfflineSigner
43 | }
44 |
45 | export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
46 |
47 | return {
48 |
49 |
50 | }
51 | };
52 |
53 | interface QueryClientOptions {
54 | addr: string
55 | }
56 |
57 | export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
58 | return new Api({ baseURL: addr });
59 | };
60 |
61 | class SDKModule {
62 | public query: ReturnType;
63 | public tx: ReturnType;
64 | public structure: Record;
65 | public registry: Array<[string, GeneratedType]> = [];
66 |
67 | constructor(client: IgniteClient) {
68 |
69 | this.query = queryClient({ addr: client.env.apiURL });
70 | this.updateTX(client);
71 | this.structure = {
72 | BaseAccount: getStructure(typeBaseAccount.fromPartial({})),
73 | ModuleAccount: getStructure(typeModuleAccount.fromPartial({})),
74 | ModuleCredential: getStructure(typeModuleCredential.fromPartial({})),
75 | Params: getStructure(typeParams.fromPartial({})),
76 |
77 | };
78 | client.on('signer-changed',(signer) => {
79 | this.updateTX(client);
80 | })
81 | }
82 | updateTX(client: IgniteClient) {
83 | const methods = txClient({
84 | signer: client.signer,
85 | addr: client.env.rpcURL,
86 | prefix: client.env.prefix ?? "cosmos",
87 | })
88 |
89 | this.tx = methods;
90 | for (let m in methods) {
91 | this.tx[m] = methods[m].bind(this.tx);
92 | }
93 | }
94 | };
95 |
96 | const Module = (test: IgniteClient) => {
97 | return {
98 | module: {
99 | CosmosAuthV1Beta1: new SDKModule(test)
100 | },
101 | registry: msgTypes
102 | }
103 | }
104 | export default Module;
--------------------------------------------------------------------------------
/src/AppMenu.vue:
--------------------------------------------------------------------------------
1 |
67 |
68 |
69 |
75 |
76 | DCL UI Version {{ appVersion }}
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/src/layout/AppTopbar.vue:
--------------------------------------------------------------------------------
1 |
62 |
63 |
64 |
65 |
66 |
67 | SAKAI
68 |
69 |
70 |
73 |
74 |
77 |
78 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/ts-client/cosmos.base.tendermint.v1beta1/module.ts:
--------------------------------------------------------------------------------
1 | // Generated by Ignite ignite.com/cli
2 |
3 | import { StdFee } from "@cosmjs/launchpad";
4 | import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate";
5 | import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
6 | import { msgTypes } from './registry';
7 | import { IgniteClient } from "../client"
8 | import { MissingWalletError } from "../helpers"
9 | import { Api } from "./rest";
10 |
11 | import { Validator as typeValidator} from "./types"
12 | import { VersionInfo as typeVersionInfo} from "./types"
13 | import { Module as typeModule} from "./types"
14 | import { ProofOp as typeProofOp} from "./types"
15 | import { ProofOps as typeProofOps} from "./types"
16 | import { Block as typeBlock} from "./types"
17 | import { Header as typeHeader} from "./types"
18 |
19 | export { };
20 |
21 |
22 |
23 | export const registry = new Registry(msgTypes);
24 |
25 | type Field = {
26 | name: string;
27 | type: unknown;
28 | }
29 | function getStructure(template) {
30 | const structure: {fields: Field[]} = { fields: [] }
31 | for (let [key, value] of Object.entries(template)) {
32 | let field = { name: key, type: typeof value }
33 | structure.fields.push(field)
34 | }
35 | return structure
36 | }
37 | const defaultFee = {
38 | amount: [],
39 | gas: "200000",
40 | };
41 |
42 | interface TxClientOptions {
43 | addr: string
44 | prefix: string
45 | signer?: OfflineSigner
46 | }
47 |
48 | export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
49 |
50 | return {
51 |
52 |
53 | }
54 | };
55 |
56 | interface QueryClientOptions {
57 | addr: string
58 | }
59 |
60 | export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
61 | return new Api({ baseURL: addr });
62 | };
63 |
64 | class SDKModule {
65 | public query: ReturnType;
66 | public tx: ReturnType;
67 | public structure: Record;
68 | public registry: Array<[string, GeneratedType]> = [];
69 |
70 | constructor(client: IgniteClient) {
71 |
72 | this.query = queryClient({ addr: client.env.apiURL });
73 | this.updateTX(client);
74 | this.structure = {
75 | Validator: getStructure(typeValidator.fromPartial({})),
76 | VersionInfo: getStructure(typeVersionInfo.fromPartial({})),
77 | Module: getStructure(typeModule.fromPartial({})),
78 | ProofOp: getStructure(typeProofOp.fromPartial({})),
79 | ProofOps: getStructure(typeProofOps.fromPartial({})),
80 | Block: getStructure(typeBlock.fromPartial({})),
81 | Header: getStructure(typeHeader.fromPartial({})),
82 |
83 | };
84 | client.on('signer-changed',(signer) => {
85 | this.updateTX(client);
86 | })
87 | }
88 | updateTX(client: IgniteClient) {
89 | const methods = txClient({
90 | signer: client.signer,
91 | addr: client.env.rpcURL,
92 | prefix: client.env.prefix ?? "cosmos",
93 | })
94 |
95 | this.tx = methods;
96 | for (let m in methods) {
97 | this.tx[m] = methods[m].bind(this.tx);
98 | }
99 | }
100 | };
101 |
102 | const Module = (test: IgniteClient) => {
103 | return {
104 | module: {
105 | CosmosBaseTendermintV1Beta1: new SDKModule(test)
106 | },
107 | registry: msgTypes
108 | }
109 | }
110 | export default Module;
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, gender identity and expression, level of experience,
9 | nationality, personal appearance, race, religion, or sexual identity and
10 | orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at [Comcast_Open_Source_Services@comcast.com](mailto:Comcast_Open_Source_Services@comcast.com).
59 | All complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at [contributor-covenant.org/version/1/4][version]
72 |
73 | [homepage]: http://contributor-covenant.org
74 | [version]: http://contributor-covenant.org/version/1/4/
--------------------------------------------------------------------------------
/ts-client/zigbeealliance.distributedcomplianceledger.validator/types/zigbeealliance/distributedcomplianceledger/validator/last_validator_power.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 |
4 | export const protobufPackage = "zigbeealliance.distributedcomplianceledger.validator";
5 |
6 | export interface LastValidatorPower {
7 | owner: string;
8 | power: number;
9 | schemaVersion: number;
10 | }
11 |
12 | function createBaseLastValidatorPower(): LastValidatorPower {
13 | return { owner: "", power: 0, schemaVersion: 0 };
14 | }
15 |
16 | export const LastValidatorPower = {
17 | encode(message: LastValidatorPower, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
18 | if (message.owner !== "") {
19 | writer.uint32(10).string(message.owner);
20 | }
21 | if (message.power !== 0) {
22 | writer.uint32(16).int32(message.power);
23 | }
24 | if (message.schemaVersion !== 0) {
25 | writer.uint32(24).uint32(message.schemaVersion);
26 | }
27 | return writer;
28 | },
29 |
30 | decode(input: _m0.Reader | Uint8Array, length?: number): LastValidatorPower {
31 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
32 | let end = length === undefined ? reader.len : reader.pos + length;
33 | const message = createBaseLastValidatorPower();
34 | while (reader.pos < end) {
35 | const tag = reader.uint32();
36 | switch (tag >>> 3) {
37 | case 1:
38 | message.owner = reader.string();
39 | break;
40 | case 2:
41 | message.power = reader.int32();
42 | break;
43 | case 3:
44 | message.schemaVersion = reader.uint32();
45 | break;
46 | default:
47 | reader.skipType(tag & 7);
48 | break;
49 | }
50 | }
51 | return message;
52 | },
53 |
54 | fromJSON(object: any): LastValidatorPower {
55 | return {
56 | owner: isSet(object.owner) ? String(object.owner) : "",
57 | power: isSet(object.power) ? Number(object.power) : 0,
58 | schemaVersion: isSet(object.schemaVersion) ? Number(object.schemaVersion) : 0,
59 | };
60 | },
61 |
62 | toJSON(message: LastValidatorPower): unknown {
63 | const obj: any = {};
64 | message.owner !== undefined && (obj.owner = message.owner);
65 | message.power !== undefined && (obj.power = Math.round(message.power));
66 | message.schemaVersion !== undefined && (obj.schemaVersion = Math.round(message.schemaVersion));
67 | return obj;
68 | },
69 |
70 | fromPartial, I>>(object: I): LastValidatorPower {
71 | const message = createBaseLastValidatorPower();
72 | message.owner = object.owner ?? "";
73 | message.power = object.power ?? 0;
74 | message.schemaVersion = object.schemaVersion ?? 0;
75 | return message;
76 | },
77 | };
78 |
79 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
80 |
81 | export type DeepPartial = T extends Builtin ? T
82 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
83 | : T extends {} ? { [K in keyof T]?: DeepPartial }
84 | : Partial;
85 |
86 | type KeysOfUnion = T extends T ? keyof T : never;
87 | export type Exact = P extends Builtin ? P
88 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
89 |
90 | function isSet(value: any): boolean {
91 | return value !== null && value !== undefined;
92 | }
93 |
--------------------------------------------------------------------------------
/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/revoked_root_certificates.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 | import { CertificateIdentifier } from "./certificate_identifier";
4 |
5 | export const protobufPackage = "zigbeealliance.distributedcomplianceledger.pki";
6 |
7 | export interface RevokedRootCertificates {
8 | certs: CertificateIdentifier[];
9 | schemaVersion: number;
10 | }
11 |
12 | function createBaseRevokedRootCertificates(): RevokedRootCertificates {
13 | return { certs: [], schemaVersion: 0 };
14 | }
15 |
16 | export const RevokedRootCertificates = {
17 | encode(message: RevokedRootCertificates, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
18 | for (const v of message.certs) {
19 | CertificateIdentifier.encode(v!, writer.uint32(10).fork()).ldelim();
20 | }
21 | if (message.schemaVersion !== 0) {
22 | writer.uint32(16).uint32(message.schemaVersion);
23 | }
24 | return writer;
25 | },
26 |
27 | decode(input: _m0.Reader | Uint8Array, length?: number): RevokedRootCertificates {
28 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
29 | let end = length === undefined ? reader.len : reader.pos + length;
30 | const message = createBaseRevokedRootCertificates();
31 | while (reader.pos < end) {
32 | const tag = reader.uint32();
33 | switch (tag >>> 3) {
34 | case 1:
35 | message.certs.push(CertificateIdentifier.decode(reader, reader.uint32()));
36 | break;
37 | case 2:
38 | message.schemaVersion = reader.uint32();
39 | break;
40 | default:
41 | reader.skipType(tag & 7);
42 | break;
43 | }
44 | }
45 | return message;
46 | },
47 |
48 | fromJSON(object: any): RevokedRootCertificates {
49 | return {
50 | certs: Array.isArray(object?.certs) ? object.certs.map((e: any) => CertificateIdentifier.fromJSON(e)) : [],
51 | schemaVersion: isSet(object.schemaVersion) ? Number(object.schemaVersion) : 0,
52 | };
53 | },
54 |
55 | toJSON(message: RevokedRootCertificates): unknown {
56 | const obj: any = {};
57 | if (message.certs) {
58 | obj.certs = message.certs.map((e) => e ? CertificateIdentifier.toJSON(e) : undefined);
59 | } else {
60 | obj.certs = [];
61 | }
62 | message.schemaVersion !== undefined && (obj.schemaVersion = Math.round(message.schemaVersion));
63 | return obj;
64 | },
65 |
66 | fromPartial, I>>(object: I): RevokedRootCertificates {
67 | const message = createBaseRevokedRootCertificates();
68 | message.certs = object.certs?.map((e) => CertificateIdentifier.fromPartial(e)) || [];
69 | message.schemaVersion = object.schemaVersion ?? 0;
70 | return message;
71 | },
72 | };
73 |
74 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
75 |
76 | export type DeepPartial = T extends Builtin ? T
77 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
78 | : T extends {} ? { [K in keyof T]?: DeepPartial }
79 | : Partial;
80 |
81 | type KeysOfUnion = T extends T ? keyof T : never;
82 | export type Exact = P extends Builtin ? P
83 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
84 |
85 | function isSet(value: any): boolean {
86 | return value !== null && value !== undefined;
87 | }
88 |
--------------------------------------------------------------------------------
/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/approved_root_certificates.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 | import { CertificateIdentifier } from "./certificate_identifier";
4 |
5 | export const protobufPackage = "zigbeealliance.distributedcomplianceledger.pki";
6 |
7 | export interface ApprovedRootCertificates {
8 | certs: CertificateIdentifier[];
9 | schemaVersion: number;
10 | }
11 |
12 | function createBaseApprovedRootCertificates(): ApprovedRootCertificates {
13 | return { certs: [], schemaVersion: 0 };
14 | }
15 |
16 | export const ApprovedRootCertificates = {
17 | encode(message: ApprovedRootCertificates, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
18 | for (const v of message.certs) {
19 | CertificateIdentifier.encode(v!, writer.uint32(10).fork()).ldelim();
20 | }
21 | if (message.schemaVersion !== 0) {
22 | writer.uint32(16).uint32(message.schemaVersion);
23 | }
24 | return writer;
25 | },
26 |
27 | decode(input: _m0.Reader | Uint8Array, length?: number): ApprovedRootCertificates {
28 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
29 | let end = length === undefined ? reader.len : reader.pos + length;
30 | const message = createBaseApprovedRootCertificates();
31 | while (reader.pos < end) {
32 | const tag = reader.uint32();
33 | switch (tag >>> 3) {
34 | case 1:
35 | message.certs.push(CertificateIdentifier.decode(reader, reader.uint32()));
36 | break;
37 | case 2:
38 | message.schemaVersion = reader.uint32();
39 | break;
40 | default:
41 | reader.skipType(tag & 7);
42 | break;
43 | }
44 | }
45 | return message;
46 | },
47 |
48 | fromJSON(object: any): ApprovedRootCertificates {
49 | return {
50 | certs: Array.isArray(object?.certs) ? object.certs.map((e: any) => CertificateIdentifier.fromJSON(e)) : [],
51 | schemaVersion: isSet(object.schemaVersion) ? Number(object.schemaVersion) : 0,
52 | };
53 | },
54 |
55 | toJSON(message: ApprovedRootCertificates): unknown {
56 | const obj: any = {};
57 | if (message.certs) {
58 | obj.certs = message.certs.map((e) => e ? CertificateIdentifier.toJSON(e) : undefined);
59 | } else {
60 | obj.certs = [];
61 | }
62 | message.schemaVersion !== undefined && (obj.schemaVersion = Math.round(message.schemaVersion));
63 | return obj;
64 | },
65 |
66 | fromPartial, I>>(object: I): ApprovedRootCertificates {
67 | const message = createBaseApprovedRootCertificates();
68 | message.certs = object.certs?.map((e) => CertificateIdentifier.fromPartial(e)) || [];
69 | message.schemaVersion = object.schemaVersion ?? 0;
70 | return message;
71 | },
72 | };
73 |
74 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
75 |
76 | export type DeepPartial = T extends Builtin ? T
77 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
78 | : T extends {} ? { [K in keyof T]?: DeepPartial }
79 | : Partial;
80 |
81 | type KeysOfUnion = T extends T ? keyof T : never;
82 | export type Exact = P extends Builtin ? P
83 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
84 |
85 | function isSet(value: any): boolean {
86 | return value !== null && value !== undefined;
87 | }
88 |
--------------------------------------------------------------------------------
/src/AppMenuItem.vue:
--------------------------------------------------------------------------------
1 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/src/layout/AppMenuItem.vue:
--------------------------------------------------------------------------------
1 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/ts-client/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 | import { Any } from "../../../google/protobuf/any";
4 | import { Params } from "./auth";
5 |
6 | export const protobufPackage = "cosmos.auth.v1beta1";
7 |
8 | /** GenesisState defines the auth module's genesis state. */
9 | export interface GenesisState {
10 | /** params defines all the parameters of the module. */
11 | params:
12 | | Params
13 | | undefined;
14 | /** accounts are the accounts present at genesis. */
15 | accounts: Any[];
16 | }
17 |
18 | function createBaseGenesisState(): GenesisState {
19 | return { params: undefined, accounts: [] };
20 | }
21 |
22 | export const GenesisState = {
23 | encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
24 | if (message.params !== undefined) {
25 | Params.encode(message.params, writer.uint32(10).fork()).ldelim();
26 | }
27 | for (const v of message.accounts) {
28 | Any.encode(v!, writer.uint32(18).fork()).ldelim();
29 | }
30 | return writer;
31 | },
32 |
33 | decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState {
34 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
35 | let end = length === undefined ? reader.len : reader.pos + length;
36 | const message = createBaseGenesisState();
37 | while (reader.pos < end) {
38 | const tag = reader.uint32();
39 | switch (tag >>> 3) {
40 | case 1:
41 | message.params = Params.decode(reader, reader.uint32());
42 | break;
43 | case 2:
44 | message.accounts.push(Any.decode(reader, reader.uint32()));
45 | break;
46 | default:
47 | reader.skipType(tag & 7);
48 | break;
49 | }
50 | }
51 | return message;
52 | },
53 |
54 | fromJSON(object: any): GenesisState {
55 | return {
56 | params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
57 | accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Any.fromJSON(e)) : [],
58 | };
59 | },
60 |
61 | toJSON(message: GenesisState): unknown {
62 | const obj: any = {};
63 | message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
64 | if (message.accounts) {
65 | obj.accounts = message.accounts.map((e) => e ? Any.toJSON(e) : undefined);
66 | } else {
67 | obj.accounts = [];
68 | }
69 | return obj;
70 | },
71 |
72 | fromPartial, I>>(object: I): GenesisState {
73 | const message = createBaseGenesisState();
74 | message.params = (object.params !== undefined && object.params !== null)
75 | ? Params.fromPartial(object.params)
76 | : undefined;
77 | message.accounts = object.accounts?.map((e) => Any.fromPartial(e)) || [];
78 | return message;
79 | },
80 | };
81 |
82 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
83 |
84 | export type DeepPartial = T extends Builtin ? T
85 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
86 | : T extends {} ? { [K in keyof T]?: DeepPartial }
87 | : Partial;
88 |
89 | type KeysOfUnion = T extends T ? keyof T : never;
90 | export type Exact = P extends Builtin ? P
91 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
92 |
93 | function isSet(value: any): boolean {
94 | return value !== null && value !== undefined;
95 | }
96 |
--------------------------------------------------------------------------------
/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/types/zigbeealliance/distributedcomplianceledger/dclauth/rejected_account.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 | import { Account } from "./account";
4 |
5 | export const protobufPackage = "zigbeealliance.distributedcomplianceledger.dclauth";
6 |
7 | export interface RejectedAccount {
8 | account: Account | undefined;
9 | rejectedAccountSchemaVersion: number;
10 | }
11 |
12 | function createBaseRejectedAccount(): RejectedAccount {
13 | return { account: undefined, rejectedAccountSchemaVersion: 0 };
14 | }
15 |
16 | export const RejectedAccount = {
17 | encode(message: RejectedAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
18 | if (message.account !== undefined) {
19 | Account.encode(message.account, writer.uint32(10).fork()).ldelim();
20 | }
21 | if (message.rejectedAccountSchemaVersion !== 0) {
22 | writer.uint32(16).uint32(message.rejectedAccountSchemaVersion);
23 | }
24 | return writer;
25 | },
26 |
27 | decode(input: _m0.Reader | Uint8Array, length?: number): RejectedAccount {
28 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
29 | let end = length === undefined ? reader.len : reader.pos + length;
30 | const message = createBaseRejectedAccount();
31 | while (reader.pos < end) {
32 | const tag = reader.uint32();
33 | switch (tag >>> 3) {
34 | case 1:
35 | message.account = Account.decode(reader, reader.uint32());
36 | break;
37 | case 2:
38 | message.rejectedAccountSchemaVersion = reader.uint32();
39 | break;
40 | default:
41 | reader.skipType(tag & 7);
42 | break;
43 | }
44 | }
45 | return message;
46 | },
47 |
48 | fromJSON(object: any): RejectedAccount {
49 | return {
50 | account: isSet(object.account) ? Account.fromJSON(object.account) : undefined,
51 | rejectedAccountSchemaVersion: isSet(object.rejectedAccountSchemaVersion)
52 | ? Number(object.rejectedAccountSchemaVersion)
53 | : 0,
54 | };
55 | },
56 |
57 | toJSON(message: RejectedAccount): unknown {
58 | const obj: any = {};
59 | message.account !== undefined && (obj.account = message.account ? Account.toJSON(message.account) : undefined);
60 | message.rejectedAccountSchemaVersion !== undefined
61 | && (obj.rejectedAccountSchemaVersion = Math.round(message.rejectedAccountSchemaVersion));
62 | return obj;
63 | },
64 |
65 | fromPartial, I>>(object: I): RejectedAccount {
66 | const message = createBaseRejectedAccount();
67 | message.account = (object.account !== undefined && object.account !== null)
68 | ? Account.fromPartial(object.account)
69 | : undefined;
70 | message.rejectedAccountSchemaVersion = object.rejectedAccountSchemaVersion ?? 0;
71 | return message;
72 | },
73 | };
74 |
75 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
76 |
77 | export type DeepPartial = T extends Builtin ? T
78 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
79 | : T extends {} ? { [K in keyof T]?: DeepPartial }
80 | : Partial;
81 |
82 | type KeysOfUnion = T extends T ? keyof T : never;
83 | export type Exact = P extends Builtin ? P
84 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
85 |
86 | function isSet(value: any): boolean {
87 | return value !== null && value !== undefined;
88 | }
89 |
--------------------------------------------------------------------------------
/ts-client/zigbeealliance.distributedcomplianceledger.model/types/zigbeealliance/distributedcomplianceledger/model/vendor_products.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 | import { Product } from "./product";
4 |
5 | export const protobufPackage = "zigbeealliance.distributedcomplianceledger.model";
6 |
7 | export interface VendorProducts {
8 | vid: number;
9 | products: Product[];
10 | schemaVersion: number;
11 | }
12 |
13 | function createBaseVendorProducts(): VendorProducts {
14 | return { vid: 0, products: [], schemaVersion: 0 };
15 | }
16 |
17 | export const VendorProducts = {
18 | encode(message: VendorProducts, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
19 | if (message.vid !== 0) {
20 | writer.uint32(8).int32(message.vid);
21 | }
22 | for (const v of message.products) {
23 | Product.encode(v!, writer.uint32(18).fork()).ldelim();
24 | }
25 | if (message.schemaVersion !== 0) {
26 | writer.uint32(24).uint32(message.schemaVersion);
27 | }
28 | return writer;
29 | },
30 |
31 | decode(input: _m0.Reader | Uint8Array, length?: number): VendorProducts {
32 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
33 | let end = length === undefined ? reader.len : reader.pos + length;
34 | const message = createBaseVendorProducts();
35 | while (reader.pos < end) {
36 | const tag = reader.uint32();
37 | switch (tag >>> 3) {
38 | case 1:
39 | message.vid = reader.int32();
40 | break;
41 | case 2:
42 | message.products.push(Product.decode(reader, reader.uint32()));
43 | break;
44 | case 3:
45 | message.schemaVersion = reader.uint32();
46 | break;
47 | default:
48 | reader.skipType(tag & 7);
49 | break;
50 | }
51 | }
52 | return message;
53 | },
54 |
55 | fromJSON(object: any): VendorProducts {
56 | return {
57 | vid: isSet(object.vid) ? Number(object.vid) : 0,
58 | products: Array.isArray(object?.products) ? object.products.map((e: any) => Product.fromJSON(e)) : [],
59 | schemaVersion: isSet(object.schemaVersion) ? Number(object.schemaVersion) : 0,
60 | };
61 | },
62 |
63 | toJSON(message: VendorProducts): unknown {
64 | const obj: any = {};
65 | message.vid !== undefined && (obj.vid = Math.round(message.vid));
66 | if (message.products) {
67 | obj.products = message.products.map((e) => e ? Product.toJSON(e) : undefined);
68 | } else {
69 | obj.products = [];
70 | }
71 | message.schemaVersion !== undefined && (obj.schemaVersion = Math.round(message.schemaVersion));
72 | return obj;
73 | },
74 |
75 | fromPartial, I>>(object: I): VendorProducts {
76 | const message = createBaseVendorProducts();
77 | message.vid = object.vid ?? 0;
78 | message.products = object.products?.map((e) => Product.fromPartial(e)) || [];
79 | message.schemaVersion = object.schemaVersion ?? 0;
80 | return message;
81 | },
82 | };
83 |
84 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
85 |
86 | export type DeepPartial = T extends Builtin ? T
87 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
88 | : T extends {} ? { [K in keyof T]?: DeepPartial }
89 | : Partial;
90 |
91 | type KeysOfUnion = T extends T ? keyof T : never;
92 | export type Exact = P extends Builtin ? P
93 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
94 |
95 | function isSet(value: any): boolean {
96 | return value !== null && value !== undefined;
97 | }
98 |
--------------------------------------------------------------------------------
/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/types/zigbeealliance/distributedcomplianceledger/dclauth/pending_account.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import _m0 from "protobufjs/minimal";
3 | import { Account } from "./account";
4 |
5 | export const protobufPackage = "zigbeealliance.distributedcomplianceledger.dclauth";
6 |
7 | /**
8 | * TODO issue 99: do we need that ???
9 | * option (gogoproto.goproto_getters) = false;
10 | * option (gogoproto.goproto_stringer) = false;
11 | */
12 | export interface PendingAccount {
13 | account: Account | undefined;
14 | pendingAccountSchemaVersion: number;
15 | }
16 |
17 | function createBasePendingAccount(): PendingAccount {
18 | return { account: undefined, pendingAccountSchemaVersion: 0 };
19 | }
20 |
21 | export const PendingAccount = {
22 | encode(message: PendingAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
23 | if (message.account !== undefined) {
24 | Account.encode(message.account, writer.uint32(10).fork()).ldelim();
25 | }
26 | if (message.pendingAccountSchemaVersion !== 0) {
27 | writer.uint32(16).uint32(message.pendingAccountSchemaVersion);
28 | }
29 | return writer;
30 | },
31 |
32 | decode(input: _m0.Reader | Uint8Array, length?: number): PendingAccount {
33 | const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
34 | let end = length === undefined ? reader.len : reader.pos + length;
35 | const message = createBasePendingAccount();
36 | while (reader.pos < end) {
37 | const tag = reader.uint32();
38 | switch (tag >>> 3) {
39 | case 1:
40 | message.account = Account.decode(reader, reader.uint32());
41 | break;
42 | case 2:
43 | message.pendingAccountSchemaVersion = reader.uint32();
44 | break;
45 | default:
46 | reader.skipType(tag & 7);
47 | break;
48 | }
49 | }
50 | return message;
51 | },
52 |
53 | fromJSON(object: any): PendingAccount {
54 | return {
55 | account: isSet(object.account) ? Account.fromJSON(object.account) : undefined,
56 | pendingAccountSchemaVersion: isSet(object.pendingAccountSchemaVersion)
57 | ? Number(object.pendingAccountSchemaVersion)
58 | : 0,
59 | };
60 | },
61 |
62 | toJSON(message: PendingAccount): unknown {
63 | const obj: any = {};
64 | message.account !== undefined && (obj.account = message.account ? Account.toJSON(message.account) : undefined);
65 | message.pendingAccountSchemaVersion !== undefined
66 | && (obj.pendingAccountSchemaVersion = Math.round(message.pendingAccountSchemaVersion));
67 | return obj;
68 | },
69 |
70 | fromPartial, I>>(object: I): PendingAccount {
71 | const message = createBasePendingAccount();
72 | message.account = (object.account !== undefined && object.account !== null)
73 | ? Account.fromPartial(object.account)
74 | : undefined;
75 | message.pendingAccountSchemaVersion = object.pendingAccountSchemaVersion ?? 0;
76 | return message;
77 | },
78 | };
79 |
80 | type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
81 |
82 | export type DeepPartial = T extends Builtin ? T
83 | : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray>
84 | : T extends {} ? { [K in keyof T]?: DeepPartial }
85 | : Partial;
86 |
87 | type KeysOfUnion = T extends T ? keyof T : never;
88 | export type Exact = P extends Builtin ? P
89 | : P & { [K in keyof P]: Exact
} & { [K in Exclude>]: never };
90 |
91 | function isSet(value: any): boolean {
92 | return value !== null && value !== undefined;
93 | }
94 |
--------------------------------------------------------------------------------