Skip to content

Commit 8eac7f5

Browse files
committed
Updated ts-client
1 parent 7b59c21 commit 8eac7f5

File tree

16 files changed

+470
-432
lines changed

16 files changed

+470
-432
lines changed

ts-client/zigbeealliance.distributedcomplianceledger.compliance/module.ts

+36-36
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { msgTypes } from './registry';
77
import { IgniteClient } from "../client"
88
import { MissingWalletError } from "../helpers"
99
import { Api } from "./rest";
10-
import { MsgUpdateComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
11-
import { MsgCertifyModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
1210
import { MsgDeleteComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
11+
import { MsgCertifyModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
1312
import { MsgProvisionModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
13+
import { MsgUpdateComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
1414
import { MsgRevokeModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
1515

1616
import { CertifiedModel as typeCertifiedModel} from "./types"
@@ -20,10 +20,10 @@ import { DeviceSoftwareCompliance as typeDeviceSoftwareCompliance} from "./types
2020
import { ProvisionalModel as typeProvisionalModel} from "./types"
2121
import { RevokedModel as typeRevokedModel} from "./types"
2222

23-
export { MsgUpdateComplianceInfo, MsgCertifyModel, MsgDeleteComplianceInfo, MsgProvisionModel, MsgRevokeModel };
23+
export { MsgDeleteComplianceInfo, MsgCertifyModel, MsgProvisionModel, MsgUpdateComplianceInfo, MsgRevokeModel };
2424

25-
type sendMsgUpdateComplianceInfoParams = {
26-
value: MsgUpdateComplianceInfo,
25+
type sendMsgDeleteComplianceInfoParams = {
26+
value: MsgDeleteComplianceInfo,
2727
fee?: StdFee,
2828
memo?: string
2929
};
@@ -34,14 +34,14 @@ type sendMsgCertifyModelParams = {
3434
memo?: string
3535
};
3636

37-
type sendMsgDeleteComplianceInfoParams = {
38-
value: MsgDeleteComplianceInfo,
37+
type sendMsgProvisionModelParams = {
38+
value: MsgProvisionModel,
3939
fee?: StdFee,
4040
memo?: string
4141
};
4242

43-
type sendMsgProvisionModelParams = {
44-
value: MsgProvisionModel,
43+
type sendMsgUpdateComplianceInfoParams = {
44+
value: MsgUpdateComplianceInfo,
4545
fee?: StdFee,
4646
memo?: string
4747
};
@@ -53,22 +53,22 @@ type sendMsgRevokeModelParams = {
5353
};
5454

5555

56-
type msgUpdateComplianceInfoParams = {
57-
value: MsgUpdateComplianceInfo,
56+
type msgDeleteComplianceInfoParams = {
57+
value: MsgDeleteComplianceInfo,
5858
};
5959

6060
type msgCertifyModelParams = {
6161
value: MsgCertifyModel,
6262
};
6363

64-
type msgDeleteComplianceInfoParams = {
65-
value: MsgDeleteComplianceInfo,
66-
};
67-
6864
type msgProvisionModelParams = {
6965
value: MsgProvisionModel,
7066
};
7167

68+
type msgUpdateComplianceInfoParams = {
69+
value: MsgUpdateComplianceInfo,
70+
};
71+
7272
type msgRevokeModelParams = {
7373
value: MsgRevokeModel,
7474
};
@@ -103,17 +103,17 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
103103

104104
return {
105105

106-
async sendMsgUpdateComplianceInfo({ value, fee, memo }: sendMsgUpdateComplianceInfoParams): Promise<DeliverTxResponse> {
106+
async sendMsgDeleteComplianceInfo({ value, fee, memo }: sendMsgDeleteComplianceInfoParams): Promise<DeliverTxResponse> {
107107
if (!signer) {
108-
throw new Error('TxClient:sendMsgUpdateComplianceInfo: Unable to sign Tx. Signer is not present.')
108+
throw new Error('TxClient:sendMsgDeleteComplianceInfo: Unable to sign Tx. Signer is not present.')
109109
}
110110
try {
111111
const { address } = (await signer.getAccounts())[0];
112112
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
113-
let msg = this.msgUpdateComplianceInfo({ value: MsgUpdateComplianceInfo.fromPartial(value) })
113+
let msg = this.msgDeleteComplianceInfo({ value: MsgDeleteComplianceInfo.fromPartial(value) })
114114
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
115115
} catch (e: any) {
116-
throw new Error('TxClient:sendMsgUpdateComplianceInfo: Could not broadcast Tx: '+ e.message)
116+
throw new Error('TxClient:sendMsgDeleteComplianceInfo: Could not broadcast Tx: '+ e.message)
117117
}
118118
},
119119

@@ -131,31 +131,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
131131
}
132132
},
133133

134-
async sendMsgDeleteComplianceInfo({ value, fee, memo }: sendMsgDeleteComplianceInfoParams): Promise<DeliverTxResponse> {
134+
async sendMsgProvisionModel({ value, fee, memo }: sendMsgProvisionModelParams): Promise<DeliverTxResponse> {
135135
if (!signer) {
136-
throw new Error('TxClient:sendMsgDeleteComplianceInfo: Unable to sign Tx. Signer is not present.')
136+
throw new Error('TxClient:sendMsgProvisionModel: Unable to sign Tx. Signer is not present.')
137137
}
138138
try {
139139
const { address } = (await signer.getAccounts())[0];
140140
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
141-
let msg = this.msgDeleteComplianceInfo({ value: MsgDeleteComplianceInfo.fromPartial(value) })
141+
let msg = this.msgProvisionModel({ value: MsgProvisionModel.fromPartial(value) })
142142
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
143143
} catch (e: any) {
144-
throw new Error('TxClient:sendMsgDeleteComplianceInfo: Could not broadcast Tx: '+ e.message)
144+
throw new Error('TxClient:sendMsgProvisionModel: Could not broadcast Tx: '+ e.message)
145145
}
146146
},
147147

148-
async sendMsgProvisionModel({ value, fee, memo }: sendMsgProvisionModelParams): Promise<DeliverTxResponse> {
148+
async sendMsgUpdateComplianceInfo({ value, fee, memo }: sendMsgUpdateComplianceInfoParams): Promise<DeliverTxResponse> {
149149
if (!signer) {
150-
throw new Error('TxClient:sendMsgProvisionModel: Unable to sign Tx. Signer is not present.')
150+
throw new Error('TxClient:sendMsgUpdateComplianceInfo: Unable to sign Tx. Signer is not present.')
151151
}
152152
try {
153153
const { address } = (await signer.getAccounts())[0];
154154
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
155-
let msg = this.msgProvisionModel({ value: MsgProvisionModel.fromPartial(value) })
155+
let msg = this.msgUpdateComplianceInfo({ value: MsgUpdateComplianceInfo.fromPartial(value) })
156156
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
157157
} catch (e: any) {
158-
throw new Error('TxClient:sendMsgProvisionModel: Could not broadcast Tx: '+ e.message)
158+
throw new Error('TxClient:sendMsgUpdateComplianceInfo: Could not broadcast Tx: '+ e.message)
159159
}
160160
},
161161

@@ -174,11 +174,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
174174
},
175175

176176

177-
msgUpdateComplianceInfo({ value }: msgUpdateComplianceInfoParams): EncodeObject {
177+
msgDeleteComplianceInfo({ value }: msgDeleteComplianceInfoParams): EncodeObject {
178178
try {
179-
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgUpdateComplianceInfo", value: MsgUpdateComplianceInfo.fromPartial( value ) }
179+
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgDeleteComplianceInfo", value: MsgDeleteComplianceInfo.fromPartial( value ) }
180180
} catch (e: any) {
181-
throw new Error('TxClient:MsgUpdateComplianceInfo: Could not create message: ' + e.message)
181+
throw new Error('TxClient:MsgDeleteComplianceInfo: Could not create message: ' + e.message)
182182
}
183183
},
184184

@@ -190,19 +190,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
190190
}
191191
},
192192

193-
msgDeleteComplianceInfo({ value }: msgDeleteComplianceInfoParams): EncodeObject {
193+
msgProvisionModel({ value }: msgProvisionModelParams): EncodeObject {
194194
try {
195-
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgDeleteComplianceInfo", value: MsgDeleteComplianceInfo.fromPartial( value ) }
195+
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgProvisionModel", value: MsgProvisionModel.fromPartial( value ) }
196196
} catch (e: any) {
197-
throw new Error('TxClient:MsgDeleteComplianceInfo: Could not create message: ' + e.message)
197+
throw new Error('TxClient:MsgProvisionModel: Could not create message: ' + e.message)
198198
}
199199
},
200200

201-
msgProvisionModel({ value }: msgProvisionModelParams): EncodeObject {
201+
msgUpdateComplianceInfo({ value }: msgUpdateComplianceInfoParams): EncodeObject {
202202
try {
203-
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgProvisionModel", value: MsgProvisionModel.fromPartial( value ) }
203+
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgUpdateComplianceInfo", value: MsgUpdateComplianceInfo.fromPartial( value ) }
204204
} catch (e: any) {
205-
throw new Error('TxClient:MsgProvisionModel: Could not create message: ' + e.message)
205+
throw new Error('TxClient:MsgUpdateComplianceInfo: Could not create message: ' + e.message)
206206
}
207207
},
208208

ts-client/zigbeealliance.distributedcomplianceledger.compliance/registry.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { GeneratedType } from "@cosmjs/proto-signing";
2-
import { MsgUpdateComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
3-
import { MsgCertifyModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
42
import { MsgDeleteComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
3+
import { MsgCertifyModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
54
import { MsgProvisionModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
5+
import { MsgUpdateComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
66
import { MsgRevokeModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
77

88
const msgTypes: Array<[string, GeneratedType]> = [
9-
["/zigbeealliance.distributedcomplianceledger.compliance.MsgUpdateComplianceInfo", MsgUpdateComplianceInfo],
10-
["/zigbeealliance.distributedcomplianceledger.compliance.MsgCertifyModel", MsgCertifyModel],
119
["/zigbeealliance.distributedcomplianceledger.compliance.MsgDeleteComplianceInfo", MsgDeleteComplianceInfo],
10+
["/zigbeealliance.distributedcomplianceledger.compliance.MsgCertifyModel", MsgCertifyModel],
1211
["/zigbeealliance.distributedcomplianceledger.compliance.MsgProvisionModel", MsgProvisionModel],
12+
["/zigbeealliance.distributedcomplianceledger.compliance.MsgUpdateComplianceInfo", MsgUpdateComplianceInfo],
1313
["/zigbeealliance.distributedcomplianceledger.compliance.MsgRevokeModel", MsgRevokeModel],
1414

1515
];

ts-client/zigbeealliance.distributedcomplianceledger.dclauth/module.ts

+24-24
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { msgTypes } from './registry';
77
import { IgniteClient } from "../client"
88
import { MissingWalletError } from "../helpers"
99
import { Api } from "./rest";
10-
import { MsgProposeAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
1110
import { MsgApproveRevokeAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
11+
import { MsgProposeAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
1212
import { MsgProposeRevokeAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
1313
import { MsgRejectAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
1414
import { MsgApproveAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
@@ -21,16 +21,16 @@ import { PendingAccountRevocation as typePendingAccountRevocation} from "./types
2121
import { RejectedAccount as typeRejectedAccount} from "./types"
2222
import { RevokedAccount as typeRevokedAccount} from "./types"
2323

24-
export { MsgProposeAddAccount, MsgApproveRevokeAccount, MsgProposeRevokeAccount, MsgRejectAddAccount, MsgApproveAddAccount };
24+
export { MsgApproveRevokeAccount, MsgProposeAddAccount, MsgProposeRevokeAccount, MsgRejectAddAccount, MsgApproveAddAccount };
2525

26-
type sendMsgProposeAddAccountParams = {
27-
value: MsgProposeAddAccount,
26+
type sendMsgApproveRevokeAccountParams = {
27+
value: MsgApproveRevokeAccount,
2828
fee?: StdFee,
2929
memo?: string
3030
};
3131

32-
type sendMsgApproveRevokeAccountParams = {
33-
value: MsgApproveRevokeAccount,
32+
type sendMsgProposeAddAccountParams = {
33+
value: MsgProposeAddAccount,
3434
fee?: StdFee,
3535
memo?: string
3636
};
@@ -54,14 +54,14 @@ type sendMsgApproveAddAccountParams = {
5454
};
5555

5656

57-
type msgProposeAddAccountParams = {
58-
value: MsgProposeAddAccount,
59-
};
60-
6157
type msgApproveRevokeAccountParams = {
6258
value: MsgApproveRevokeAccount,
6359
};
6460

61+
type msgProposeAddAccountParams = {
62+
value: MsgProposeAddAccount,
63+
};
64+
6565
type msgProposeRevokeAccountParams = {
6666
value: MsgProposeRevokeAccount,
6767
};
@@ -104,31 +104,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
104104

105105
return {
106106

107-
async sendMsgProposeAddAccount({ value, fee, memo }: sendMsgProposeAddAccountParams): Promise<DeliverTxResponse> {
107+
async sendMsgApproveRevokeAccount({ value, fee, memo }: sendMsgApproveRevokeAccountParams): Promise<DeliverTxResponse> {
108108
if (!signer) {
109-
throw new Error('TxClient:sendMsgProposeAddAccount: Unable to sign Tx. Signer is not present.')
109+
throw new Error('TxClient:sendMsgApproveRevokeAccount: Unable to sign Tx. Signer is not present.')
110110
}
111111
try {
112112
const { address } = (await signer.getAccounts())[0];
113113
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
114-
let msg = this.msgProposeAddAccount({ value: MsgProposeAddAccount.fromPartial(value) })
114+
let msg = this.msgApproveRevokeAccount({ value: MsgApproveRevokeAccount.fromPartial(value) })
115115
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
116116
} catch (e: any) {
117-
throw new Error('TxClient:sendMsgProposeAddAccount: Could not broadcast Tx: '+ e.message)
117+
throw new Error('TxClient:sendMsgApproveRevokeAccount: Could not broadcast Tx: '+ e.message)
118118
}
119119
},
120120

121-
async sendMsgApproveRevokeAccount({ value, fee, memo }: sendMsgApproveRevokeAccountParams): Promise<DeliverTxResponse> {
121+
async sendMsgProposeAddAccount({ value, fee, memo }: sendMsgProposeAddAccountParams): Promise<DeliverTxResponse> {
122122
if (!signer) {
123-
throw new Error('TxClient:sendMsgApproveRevokeAccount: Unable to sign Tx. Signer is not present.')
123+
throw new Error('TxClient:sendMsgProposeAddAccount: Unable to sign Tx. Signer is not present.')
124124
}
125125
try {
126126
const { address } = (await signer.getAccounts())[0];
127127
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
128-
let msg = this.msgApproveRevokeAccount({ value: MsgApproveRevokeAccount.fromPartial(value) })
128+
let msg = this.msgProposeAddAccount({ value: MsgProposeAddAccount.fromPartial(value) })
129129
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
130130
} catch (e: any) {
131-
throw new Error('TxClient:sendMsgApproveRevokeAccount: Could not broadcast Tx: '+ e.message)
131+
throw new Error('TxClient:sendMsgProposeAddAccount: Could not broadcast Tx: '+ e.message)
132132
}
133133
},
134134

@@ -175,19 +175,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
175175
},
176176

177177

178-
msgProposeAddAccount({ value }: msgProposeAddAccountParams): EncodeObject {
178+
msgApproveRevokeAccount({ value }: msgApproveRevokeAccountParams): EncodeObject {
179179
try {
180-
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeAddAccount", value: MsgProposeAddAccount.fromPartial( value ) }
180+
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.dclauth.MsgApproveRevokeAccount", value: MsgApproveRevokeAccount.fromPartial( value ) }
181181
} catch (e: any) {
182-
throw new Error('TxClient:MsgProposeAddAccount: Could not create message: ' + e.message)
182+
throw new Error('TxClient:MsgApproveRevokeAccount: Could not create message: ' + e.message)
183183
}
184184
},
185185

186-
msgApproveRevokeAccount({ value }: msgApproveRevokeAccountParams): EncodeObject {
186+
msgProposeAddAccount({ value }: msgProposeAddAccountParams): EncodeObject {
187187
try {
188-
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.dclauth.MsgApproveRevokeAccount", value: MsgApproveRevokeAccount.fromPartial( value ) }
188+
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeAddAccount", value: MsgProposeAddAccount.fromPartial( value ) }
189189
} catch (e: any) {
190-
throw new Error('TxClient:MsgApproveRevokeAccount: Could not create message: ' + e.message)
190+
throw new Error('TxClient:MsgProposeAddAccount: Could not create message: ' + e.message)
191191
}
192192
},
193193

ts-client/zigbeealliance.distributedcomplianceledger.dclauth/registry.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { GeneratedType } from "@cosmjs/proto-signing";
2-
import { MsgProposeAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
32
import { MsgApproveRevokeAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
3+
import { MsgProposeAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
44
import { MsgProposeRevokeAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
55
import { MsgRejectAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
66
import { MsgApproveAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
77

88
const msgTypes: Array<[string, GeneratedType]> = [
9-
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeAddAccount", MsgProposeAddAccount],
109
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgApproveRevokeAccount", MsgApproveRevokeAccount],
10+
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeAddAccount", MsgProposeAddAccount],
1111
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeRevokeAccount", MsgProposeRevokeAccount],
1212
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgRejectAddAccount", MsgRejectAddAccount],
1313
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgApproveAddAccount", MsgApproveAddAccount],

0 commit comments

Comments
 (0)