Skip to content

Commit 9eab89f

Browse files
committed
feat(abstract-cosmos,sdk-coin-hash): support group proposals
Adding support for Figure Markets to integrate bitgo wallets to their tokenized equity exchange - Add support for base64-encoded pre-encoded messages in ContractCallBuilder - Add group proposal message support (MsgSubmitProposal) - Add ProposalCompiled protobuf definitions - Add test utilities for group proposal wrapping - Add ContractCallBuilder tests with pre-encoded messages The exchange module innermsg is wrapped inside a GroupProposal, hence currently we do not fully support decoding the messages to identify what asset is being transfered. This will be added in followup PRs. This is to exhit bitgo's ability to sign contract interactions Ticket-WIN-8842
1 parent ca9bdb3 commit 9eab89f

File tree

11 files changed

+1223
-21
lines changed

11 files changed

+1223
-21
lines changed
Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
import * as $protobuf from 'protobufjs';
2+
import Long = require('long');
3+
/** Namespace cosmos. */
4+
export namespace cosmos {
5+
/** Namespace group. */
6+
namespace group {
7+
/** Namespace v1. */
8+
namespace v1 {
9+
/** Properties of a MsgSubmitProposal. */
10+
interface IMsgSubmitProposal {
11+
/** MsgSubmitProposal groupPolicyAddress */
12+
groupPolicyAddress?: string | null;
13+
14+
/** MsgSubmitProposal proposers */
15+
proposers?: string[] | null;
16+
17+
/** MsgSubmitProposal metadata */
18+
metadata?: string | null;
19+
20+
/** MsgSubmitProposal messages */
21+
messages?: google.protobuf.IAny[] | null;
22+
23+
/** MsgSubmitProposal exec */
24+
exec?: cosmos.group.v1.Exec | null;
25+
26+
/** MsgSubmitProposal title */
27+
title?: string | null;
28+
29+
/** MsgSubmitProposal summary */
30+
summary?: string | null;
31+
}
32+
33+
/** Represents a MsgSubmitProposal. */
34+
class MsgSubmitProposal implements IMsgSubmitProposal {
35+
/**
36+
* Constructs a new MsgSubmitProposal.
37+
* @param [properties] Properties to set
38+
*/
39+
constructor(properties?: cosmos.group.v1.IMsgSubmitProposal);
40+
41+
/** MsgSubmitProposal groupPolicyAddress. */
42+
public groupPolicyAddress: string;
43+
44+
/** MsgSubmitProposal proposers. */
45+
public proposers: string[];
46+
47+
/** MsgSubmitProposal metadata. */
48+
public metadata: string;
49+
50+
/** MsgSubmitProposal messages. */
51+
public messages: google.protobuf.IAny[];
52+
53+
/** MsgSubmitProposal exec. */
54+
public exec: cosmos.group.v1.Exec;
55+
56+
/** MsgSubmitProposal title. */
57+
public title: string;
58+
59+
/** MsgSubmitProposal summary. */
60+
public summary: string;
61+
62+
/**
63+
* Creates a new MsgSubmitProposal instance using the specified properties.
64+
* @param [properties] Properties to set
65+
* @returns MsgSubmitProposal instance
66+
*/
67+
public static create(properties?: cosmos.group.v1.IMsgSubmitProposal): cosmos.group.v1.MsgSubmitProposal;
68+
69+
/**
70+
* Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.group.v1.MsgSubmitProposal.verify|verify} messages.
71+
* @param message MsgSubmitProposal message or plain object to encode
72+
* @param [writer] Writer to encode to
73+
* @returns Writer
74+
*/
75+
public static encode(message: cosmos.group.v1.IMsgSubmitProposal, writer?: $protobuf.Writer): $protobuf.Writer;
76+
77+
/**
78+
* Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.group.v1.MsgSubmitProposal.verify|verify} messages.
79+
* @param message MsgSubmitProposal message or plain object to encode
80+
* @param [writer] Writer to encode to
81+
* @returns Writer
82+
*/
83+
public static encodeDelimited(
84+
message: cosmos.group.v1.IMsgSubmitProposal,
85+
writer?: $protobuf.Writer
86+
): $protobuf.Writer;
87+
88+
/**
89+
* Decodes a MsgSubmitProposal message from the specified reader or buffer.
90+
* @param reader Reader or buffer to decode from
91+
* @param [length] Message length if known beforehand
92+
* @returns MsgSubmitProposal
93+
* @throws {Error} If the payload is not a reader or valid buffer
94+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
95+
*/
96+
public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos.group.v1.MsgSubmitProposal;
97+
98+
/**
99+
* Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited.
100+
* @param reader Reader or buffer to decode from
101+
* @returns MsgSubmitProposal
102+
* @throws {Error} If the payload is not a reader or valid buffer
103+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
104+
*/
105+
public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos.group.v1.MsgSubmitProposal;
106+
107+
/**
108+
* Verifies a MsgSubmitProposal message.
109+
* @param message Plain object to verify
110+
* @returns `null` if valid, otherwise the reason why it is not
111+
*/
112+
public static verify(message: { [k: string]: any }): string | null;
113+
114+
/**
115+
* Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types.
116+
* @param object Plain object
117+
* @returns MsgSubmitProposal
118+
*/
119+
public static fromObject(object: { [k: string]: any }): cosmos.group.v1.MsgSubmitProposal;
120+
121+
/**
122+
* Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified.
123+
* @param message MsgSubmitProposal
124+
* @param [options] Conversion options
125+
* @returns Plain object
126+
*/
127+
public static toObject(
128+
message: cosmos.group.v1.MsgSubmitProposal,
129+
options?: $protobuf.IConversionOptions
130+
): { [k: string]: any };
131+
132+
/**
133+
* Converts this MsgSubmitProposal to JSON.
134+
* @returns JSON object
135+
*/
136+
public toJSON(): { [k: string]: any };
137+
138+
/**
139+
* Gets the default type url for MsgSubmitProposal
140+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
141+
* @returns The default type url
142+
*/
143+
public static getTypeUrl(typeUrlPrefix?: string): string;
144+
}
145+
146+
/** Exec enum. */
147+
enum Exec {
148+
EXEC_UNSPECIFIED = 0,
149+
EXEC_TRY = 1,
150+
}
151+
}
152+
}
153+
}
154+
155+
/** Namespace google. */
156+
export namespace google {
157+
/** Namespace protobuf. */
158+
namespace protobuf {
159+
/** Properties of an Any. */
160+
interface IAny {
161+
/** Any type_url */
162+
type_url?: string | null;
163+
164+
/** Any value */
165+
value?: Uint8Array | null;
166+
}
167+
168+
/** Represents an Any. */
169+
class Any implements IAny {
170+
/**
171+
* Constructs a new Any.
172+
* @param [properties] Properties to set
173+
*/
174+
constructor(properties?: google.protobuf.IAny);
175+
176+
/** Any type_url. */
177+
public type_url: string;
178+
179+
/** Any value. */
180+
public value: Uint8Array;
181+
182+
/**
183+
* Creates a new Any instance using the specified properties.
184+
* @param [properties] Properties to set
185+
* @returns Any instance
186+
*/
187+
public static create(properties?: google.protobuf.IAny): google.protobuf.Any;
188+
189+
/**
190+
* Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
191+
* @param message Any message or plain object to encode
192+
* @param [writer] Writer to encode to
193+
* @returns Writer
194+
*/
195+
public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer;
196+
197+
/**
198+
* Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
199+
* @param message Any message or plain object to encode
200+
* @param [writer] Writer to encode to
201+
* @returns Writer
202+
*/
203+
public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer;
204+
205+
/**
206+
* Decodes an Any message from the specified reader or buffer.
207+
* @param reader Reader or buffer to decode from
208+
* @param [length] Message length if known beforehand
209+
* @returns Any
210+
* @throws {Error} If the payload is not a reader or valid buffer
211+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
212+
*/
213+
public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): google.protobuf.Any;
214+
215+
/**
216+
* Decodes an Any message from the specified reader or buffer, length delimited.
217+
* @param reader Reader or buffer to decode from
218+
* @returns Any
219+
* @throws {Error} If the payload is not a reader or valid buffer
220+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
221+
*/
222+
public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.Any;
223+
224+
/**
225+
* Verifies an Any message.
226+
* @param message Plain object to verify
227+
* @returns `null` if valid, otherwise the reason why it is not
228+
*/
229+
public static verify(message: { [k: string]: any }): string | null;
230+
231+
/**
232+
* Creates an Any message from a plain object. Also converts values to their respective internal types.
233+
* @param object Plain object
234+
* @returns Any
235+
*/
236+
public static fromObject(object: { [k: string]: any }): google.protobuf.Any;
237+
238+
/**
239+
* Creates a plain object from an Any message. Also converts values to other types if specified.
240+
* @param message Any
241+
* @param [options] Conversion options
242+
* @returns Plain object
243+
*/
244+
public static toObject(
245+
message: google.protobuf.Any,
246+
options?: $protobuf.IConversionOptions
247+
): { [k: string]: any };
248+
249+
/**
250+
* Converts this Any to JSON.
251+
* @returns JSON object
252+
*/
253+
public toJSON(): { [k: string]: any };
254+
255+
/**
256+
* Gets the default type url for Any
257+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
258+
* @returns The default type url
259+
*/
260+
public static getTypeUrl(typeUrlPrefix?: string): string;
261+
}
262+
}
263+
}

0 commit comments

Comments
 (0)