1+ /**
2+ * This file was automatically generated by @cosmwasm/ts-codegen@latest.
3+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4+ * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
5+ */
6+
7+ import { CosmWasmClient , SigningCosmWasmClient , ExecuteResult } from "@cosmjs/cosmwasm-stargate" ;
8+ import { StdFee } from "@cosmjs/amino" ;
9+ import { Uint128 , InstantiateMsg , Coin , ExecuteMsg , InstallableExecMsg , Binary , ExecMsg , QueryMsg , InstallableQueryMsg , QueryMsg1 , ConfigResponse , NullablePlugin , CanonicalAddr , Plugin , PluginsResponse } from "./98.types" ;
10+ export interface 98 ReadOnlyInterface {
11+ contractAddress : string ;
12+ getConfig : ( ) => Promise < ConfigResponse > ;
13+ getPlugins : ( {
14+ limit,
15+ startAfter
16+ } : {
17+ limit ?: number ;
18+ startAfter ?: number ;
19+ } ) => Promise < PluginsResponse > ;
20+ getPluginById : ( {
21+ id
22+ } : {
23+ id : number ;
24+ } ) => Promise < NullablePlugin > ;
25+ }
26+ export class 98 QueryClient implements 98 ReadOnlyInterface {
27+ client : CosmWasmClient ;
28+ contractAddress : string ;
29+
30+ constructor ( client : CosmWasmClient , contractAddress : string ) {
31+ this . client = client ;
32+ this . contractAddress = contractAddress ;
33+ this . getConfig = this . getConfig . bind ( this ) ;
34+ this . getPlugins = this . getPlugins . bind ( this ) ;
35+ this . getPluginById = this . getPluginById . bind ( this ) ;
36+ }
37+
38+ getConfig = async ( ) : Promise < ConfigResponse > => {
39+ return this . client . queryContractSmart ( this . contractAddress , {
40+ get_config : { }
41+ } ) ;
42+ } ;
43+ getPlugins = async ( {
44+ limit,
45+ startAfter
46+ } : {
47+ limit ?: number ;
48+ startAfter ?: number ;
49+ } ) : Promise < PluginsResponse > => {
50+ return this . client . queryContractSmart ( this . contractAddress , {
51+ get_plugins : {
52+ limit,
53+ start_after : startAfter
54+ }
55+ } ) ;
56+ } ;
57+ getPluginById = async ( {
58+ id
59+ } : {
60+ id : number ;
61+ } ) : Promise < NullablePlugin > => {
62+ return this . client . queryContractSmart ( this . contractAddress , {
63+ get_plugin_by_id : {
64+ id
65+ }
66+ } ) ;
67+ } ;
68+ }
69+ export interface 98 Interface extends 98 ReadOnlyInterface {
70+ contractAddress : string ;
71+ sender : string ;
72+ proxyInstallPlugin : ( {
73+ id,
74+ instantiateMsg
75+ } : {
76+ id : number ;
77+ instantiateMsg : Binary ;
78+ } , fee ?: number | StdFee | "auto" , memo ?: string , funds ?: Coin [ ] ) => Promise < ExecuteResult > ;
79+ registerPlugin : ( {
80+ checksum,
81+ codeId,
82+ creator,
83+ ipfsHash,
84+ name,
85+ version
86+ } : {
87+ checksum : string ;
88+ codeId : number ;
89+ creator : string ;
90+ ipfsHash : string ;
91+ name : string ;
92+ version : string ;
93+ } , fee ?: number | StdFee | "auto" , memo ?: string , funds ?: Coin [ ] ) => Promise < ExecuteResult > ;
94+ unregisterPlugin : ( {
95+ id
96+ } : {
97+ id : number ;
98+ } , fee ?: number | StdFee | "auto" , memo ?: string , funds ?: Coin [ ] ) => Promise < ExecuteResult > ;
99+ updatePlugin : ( {
100+ checksum,
101+ codeId,
102+ creator,
103+ id,
104+ ipfsHash,
105+ name,
106+ version
107+ } : {
108+ checksum ?: string ;
109+ codeId ?: number ;
110+ creator ?: string ;
111+ id : number ;
112+ ipfsHash ?: string ;
113+ name ?: string ;
114+ version ?: string ;
115+ } , fee ?: number | StdFee | "auto" , memo ?: string , funds ?: Coin [ ] ) => Promise < ExecuteResult > ;
116+ updateRegistryFee : ( {
117+ newFee
118+ } : {
119+ newFee : Coin ;
120+ } , fee ?: number | StdFee | "auto" , memo ?: string , funds ?: Coin [ ] ) => Promise < ExecuteResult > ;
121+ updateDaoAddr : ( {
122+ newAddr
123+ } : {
124+ newAddr : string ;
125+ } , fee ?: number | StdFee | "auto" , memo ?: string , funds ?: Coin [ ] ) => Promise < ExecuteResult > ;
126+ }
127+ export class 98 Client extends 98 QueryClient implements 98 Interface {
128+ client : SigningCosmWasmClient ;
129+ sender : string ;
130+ contractAddress : string ;
131+
132+ constructor ( client : SigningCosmWasmClient , sender : string , contractAddress : string ) {
133+ super ( client , contractAddress ) ;
134+ this . client = client ;
135+ this . sender = sender ;
136+ this . contractAddress = contractAddress ;
137+ this . proxyInstallPlugin = this . proxyInstallPlugin . bind ( this ) ;
138+ this . registerPlugin = this . registerPlugin . bind ( this ) ;
139+ this . unregisterPlugin = this . unregisterPlugin . bind ( this ) ;
140+ this . updatePlugin = this . updatePlugin . bind ( this ) ;
141+ this . updateRegistryFee = this . updateRegistryFee . bind ( this ) ;
142+ this . updateDaoAddr = this . updateDaoAddr . bind ( this ) ;
143+ }
144+
145+ proxyInstallPlugin = async ( {
146+ id,
147+ instantiateMsg
148+ } : {
149+ id : number ;
150+ instantiateMsg : Binary ;
151+ } , fee : number | StdFee | "auto" = "auto" , memo ?: string , funds ?: Coin [ ] ) : Promise < ExecuteResult > => {
152+ return await this . client . execute ( this . sender , this . contractAddress , {
153+ proxy_install_plugin : {
154+ id,
155+ instantiate_msg : instantiateMsg
156+ }
157+ } , fee , memo , funds ) ;
158+ } ;
159+ registerPlugin = async ( {
160+ checksum,
161+ codeId,
162+ creator,
163+ ipfsHash,
164+ name,
165+ version
166+ } : {
167+ checksum : string ;
168+ codeId : number ;
169+ creator : string ;
170+ ipfsHash : string ;
171+ name : string ;
172+ version : string ;
173+ } , fee : number | StdFee | "auto" = "auto" , memo ?: string , funds ?: Coin [ ] ) : Promise < ExecuteResult > => {
174+ return await this . client . execute ( this . sender , this . contractAddress , {
175+ register_plugin : {
176+ checksum,
177+ code_id : codeId ,
178+ creator,
179+ ipfs_hash : ipfsHash ,
180+ name,
181+ version
182+ }
183+ } , fee , memo , funds ) ;
184+ } ;
185+ unregisterPlugin = async ( {
186+ id
187+ } : {
188+ id : number ;
189+ } , fee : number | StdFee | "auto" = "auto" , memo ?: string , funds ?: Coin [ ] ) : Promise < ExecuteResult > => {
190+ return await this . client . execute ( this . sender , this . contractAddress , {
191+ unregister_plugin : {
192+ id
193+ }
194+ } , fee , memo , funds ) ;
195+ } ;
196+ updatePlugin = async ( {
197+ checksum,
198+ codeId,
199+ creator,
200+ id,
201+ ipfsHash,
202+ name,
203+ version
204+ } : {
205+ checksum ?: string ;
206+ codeId ?: number ;
207+ creator ?: string ;
208+ id : number ;
209+ ipfsHash ?: string ;
210+ name ?: string ;
211+ version ?: string ;
212+ } , fee : number | StdFee | "auto" = "auto" , memo ?: string , funds ?: Coin [ ] ) : Promise < ExecuteResult > => {
213+ return await this . client . execute ( this . sender , this . contractAddress , {
214+ update_plugin : {
215+ checksum,
216+ code_id : codeId ,
217+ creator,
218+ id,
219+ ipfs_hash : ipfsHash ,
220+ name,
221+ version
222+ }
223+ } , fee , memo , funds ) ;
224+ } ;
225+ updateRegistryFee = async ( {
226+ newFee
227+ } : {
228+ newFee : Coin ;
229+ } , fee : number | StdFee | "auto" = "auto" , memo ?: string , funds ?: Coin [ ] ) : Promise < ExecuteResult > => {
230+ return await this . client . execute ( this . sender , this . contractAddress , {
231+ update_registry_fee : {
232+ new_fee : newFee
233+ }
234+ } , fee , memo , funds ) ;
235+ } ;
236+ updateDaoAddr = async ( {
237+ newAddr
238+ } : {
239+ newAddr : string ;
240+ } , fee : number | StdFee | "auto" = "auto" , memo ?: string , funds ?: Coin [ ] ) : Promise < ExecuteResult > => {
241+ return await this . client . execute ( this . sender , this . contractAddress , {
242+ update_dao_addr : {
243+ new_addr : newAddr
244+ }
245+ } , fee , memo , funds ) ;
246+ } ;
247+ }
0 commit comments