@@ -20,6 +20,13 @@ export interface MsgCommitSolution {
2020
2121export interface MsgCommitSolutionResponse { }
2222
23+ export interface MsgRevealSolution {
24+ creator : string ;
25+ solution : string ;
26+ }
27+
28+ export interface MsgRevealSolutionResponse { }
29+
2330const baseMsgSubmitScavenge : object = {
2431 creator : "" ,
2532 solutionHash : "" ,
@@ -338,15 +345,142 @@ export const MsgCommitSolutionResponse = {
338345 } ,
339346} ;
340347
348+ const baseMsgRevealSolution : object = { creator : "" , solution : "" } ;
349+
350+ export const MsgRevealSolution = {
351+ encode ( message : MsgRevealSolution , writer : Writer = Writer . create ( ) ) : Writer {
352+ if ( message . creator !== "" ) {
353+ writer . uint32 ( 10 ) . string ( message . creator ) ;
354+ }
355+ if ( message . solution !== "" ) {
356+ writer . uint32 ( 18 ) . string ( message . solution ) ;
357+ }
358+ return writer ;
359+ } ,
360+
361+ decode ( input : Reader | Uint8Array , length ?: number ) : MsgRevealSolution {
362+ const reader = input instanceof Uint8Array ? new Reader ( input ) : input ;
363+ let end = length === undefined ? reader . len : reader . pos + length ;
364+ const message = { ...baseMsgRevealSolution } as MsgRevealSolution ;
365+ while ( reader . pos < end ) {
366+ const tag = reader . uint32 ( ) ;
367+ switch ( tag >>> 3 ) {
368+ case 1 :
369+ message . creator = reader . string ( ) ;
370+ break ;
371+ case 2 :
372+ message . solution = reader . string ( ) ;
373+ break ;
374+ default :
375+ reader . skipType ( tag & 7 ) ;
376+ break ;
377+ }
378+ }
379+ return message ;
380+ } ,
381+
382+ fromJSON ( object : any ) : MsgRevealSolution {
383+ const message = { ...baseMsgRevealSolution } as MsgRevealSolution ;
384+ if ( object . creator !== undefined && object . creator !== null ) {
385+ message . creator = String ( object . creator ) ;
386+ } else {
387+ message . creator = "" ;
388+ }
389+ if ( object . solution !== undefined && object . solution !== null ) {
390+ message . solution = String ( object . solution ) ;
391+ } else {
392+ message . solution = "" ;
393+ }
394+ return message ;
395+ } ,
396+
397+ toJSON ( message : MsgRevealSolution ) : unknown {
398+ const obj : any = { } ;
399+ message . creator !== undefined && ( obj . creator = message . creator ) ;
400+ message . solution !== undefined && ( obj . solution = message . solution ) ;
401+ return obj ;
402+ } ,
403+
404+ fromPartial ( object : DeepPartial < MsgRevealSolution > ) : MsgRevealSolution {
405+ const message = { ...baseMsgRevealSolution } as MsgRevealSolution ;
406+ if ( object . creator !== undefined && object . creator !== null ) {
407+ message . creator = object . creator ;
408+ } else {
409+ message . creator = "" ;
410+ }
411+ if ( object . solution !== undefined && object . solution !== null ) {
412+ message . solution = object . solution ;
413+ } else {
414+ message . solution = "" ;
415+ }
416+ return message ;
417+ } ,
418+ } ;
419+
420+ const baseMsgRevealSolutionResponse : object = { } ;
421+
422+ export const MsgRevealSolutionResponse = {
423+ encode (
424+ _ : MsgRevealSolutionResponse ,
425+ writer : Writer = Writer . create ( )
426+ ) : Writer {
427+ return writer ;
428+ } ,
429+
430+ decode (
431+ input : Reader | Uint8Array ,
432+ length ?: number
433+ ) : MsgRevealSolutionResponse {
434+ const reader = input instanceof Uint8Array ? new Reader ( input ) : input ;
435+ let end = length === undefined ? reader . len : reader . pos + length ;
436+ const message = {
437+ ...baseMsgRevealSolutionResponse ,
438+ } as MsgRevealSolutionResponse ;
439+ while ( reader . pos < end ) {
440+ const tag = reader . uint32 ( ) ;
441+ switch ( tag >>> 3 ) {
442+ default :
443+ reader . skipType ( tag & 7 ) ;
444+ break ;
445+ }
446+ }
447+ return message ;
448+ } ,
449+
450+ fromJSON ( _ : any ) : MsgRevealSolutionResponse {
451+ const message = {
452+ ...baseMsgRevealSolutionResponse ,
453+ } as MsgRevealSolutionResponse ;
454+ return message ;
455+ } ,
456+
457+ toJSON ( _ : MsgRevealSolutionResponse ) : unknown {
458+ const obj : any = { } ;
459+ return obj ;
460+ } ,
461+
462+ fromPartial (
463+ _ : DeepPartial < MsgRevealSolutionResponse >
464+ ) : MsgRevealSolutionResponse {
465+ const message = {
466+ ...baseMsgRevealSolutionResponse ,
467+ } as MsgRevealSolutionResponse ;
468+ return message ;
469+ } ,
470+ } ;
471+
341472/** Msg defines the Msg service. */
342473export interface Msg {
343474 SubmitScavenge (
344475 request : MsgSubmitScavenge
345476 ) : Promise < MsgSubmitScavengeResponse > ;
346- /** this line is used by starport scaffolding # proto/tx/rpc */
347477 CommitSolution (
348478 request : MsgCommitSolution
349479 ) : Promise < MsgCommitSolutionResponse > ;
480+ /** this line is used by starport scaffolding # proto/tx/rpc */
481+ RevealSolution (
482+ request : MsgRevealSolution
483+ ) : Promise < MsgRevealSolutionResponse > ;
350484}
351485
352486export class MsgClientImpl implements Msg {
@@ -381,6 +515,20 @@ export class MsgClientImpl implements Msg {
381515 MsgCommitSolutionResponse . decode ( new Reader ( data ) )
382516 ) ;
383517 }
518+
519+ RevealSolution (
520+ request : MsgRevealSolution
521+ ) : Promise < MsgRevealSolutionResponse > {
522+ const data = MsgRevealSolution . encode ( request ) . finish ( ) ;
523+ const promise = this . rpc . request (
524+ "scavenge.scavenge.Msg" ,
525+ "RevealSolution" ,
526+ data
527+ ) ;
528+ return promise . then ( ( data ) =>
529+ MsgRevealSolutionResponse . decode ( new Reader ( data ) )
530+ ) ;
531+ }
384532}
385533
386534interface Rpc {
0 commit comments