Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Use gnoclient #22

Merged
merged 5 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gen.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bf136469c875db1905eba66bc35779a3d750fa0c Makefile
11b9d30ab7ad5cf94b7904892f6dd6a835a4d20d service/gnomobiletypes/gnomobiletypes.go
18863723f267e160b6a0baf5f59da4b128885d27 service/gnomobiletypes/package.go
219395a8454e4bc5d315b1189651159042164737 service/rpc/gnomobiletypes.proto
f418f5a2c90ee624bd27e80d59b158c163b52ca1 service/rpc/rpc.proto
59987ede22af12d66d6af006fdfdb28690d049c9 service/gnomobiletypes/gnomobiletypes.go
e665f858002fb1b90fdc0beaebb262d7ae5a35fc service/gnomobiletypes/package.go
eb42181cdf147d0a3507942e9c4c6790e25b6e4c service/rpc/gnomobiletypes.proto
f5e115930ae4be5ffdc3c1df9d348479e45a6853 service/rpc/rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,36 @@ land.gno.gnomobile.v1.Gnomobiletypes.SetPassword_Reply> getSetPasswordMethod() {
return getSetPasswordMethod;
}

private static volatile io.grpc.MethodDescriptor<land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request,
land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply> getGenerateRecoveryPhraseMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GenerateRecoveryPhrase",
requestType = land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request.class,
responseType = land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request,
land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply> getGenerateRecoveryPhraseMethod() {
io.grpc.MethodDescriptor<land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request, land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply> getGenerateRecoveryPhraseMethod;
if ((getGenerateRecoveryPhraseMethod = GnomobileServiceGrpc.getGenerateRecoveryPhraseMethod) == null) {
synchronized (GnomobileServiceGrpc.class) {
if ((getGenerateRecoveryPhraseMethod = GnomobileServiceGrpc.getGenerateRecoveryPhraseMethod) == null) {
GnomobileServiceGrpc.getGenerateRecoveryPhraseMethod = getGenerateRecoveryPhraseMethod =
io.grpc.MethodDescriptor.<land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request, land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateRecoveryPhrase"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply.getDefaultInstance()))
.build();
}
}
}
return getGenerateRecoveryPhraseMethod;
}

private static volatile io.grpc.MethodDescriptor<land.gno.gnomobile.v1.Rpc.ListKeyInfo.Request,
land.gno.gnomobile.v1.Rpc.ListKeyInfo.Reply> getListKeyInfoMethod;

Expand Down Expand Up @@ -382,6 +412,17 @@ default void setPassword(land.gno.gnomobile.v1.Gnomobiletypes.SetPassword_Reques
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetPasswordMethod(), responseObserver);
}

/**
* <pre>
* Generate a recovery phrase of BIP39 mnemonic words using entropy from the crypto library
* random number generator. This can be used as the mnemonic in CreateAccount.
* </pre>
*/
default void generateRecoveryPhrase(land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request request,
io.grpc.stub.StreamObserver<land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGenerateRecoveryPhraseMethod(), responseObserver);
}

/**
* <pre>
* Get the keys informations in the keybase
Expand Down Expand Up @@ -514,6 +555,18 @@ public void setPassword(land.gno.gnomobile.v1.Gnomobiletypes.SetPassword_Request
getChannel().newCall(getSetPasswordMethod(), getCallOptions()), request, responseObserver);
}

/**
* <pre>
* Generate a recovery phrase of BIP39 mnemonic words using entropy from the crypto library
* random number generator. This can be used as the mnemonic in CreateAccount.
* </pre>
*/
public void generateRecoveryPhrase(land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request request,
io.grpc.stub.StreamObserver<land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGenerateRecoveryPhraseMethod(), getCallOptions()), request, responseObserver);
}

/**
* <pre>
* Get the keys informations in the keybase
Expand Down Expand Up @@ -633,6 +686,17 @@ public land.gno.gnomobile.v1.Gnomobiletypes.SetPassword_Reply setPassword(land.g
getChannel(), getSetPasswordMethod(), getCallOptions(), request);
}

/**
* <pre>
* Generate a recovery phrase of BIP39 mnemonic words using entropy from the crypto library
* random number generator. This can be used as the mnemonic in CreateAccount.
* </pre>
*/
public land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply generateRecoveryPhrase(land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGenerateRecoveryPhraseMethod(), getCallOptions(), request);
}

/**
* <pre>
* Get the keys informations in the keybase
Expand Down Expand Up @@ -751,6 +815,18 @@ public com.google.common.util.concurrent.ListenableFuture<land.gno.gnomobile.v1.
getChannel().newCall(getSetPasswordMethod(), getCallOptions()), request);
}

/**
* <pre>
* Generate a recovery phrase of BIP39 mnemonic words using entropy from the crypto library
* random number generator. This can be used as the mnemonic in CreateAccount.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply> generateRecoveryPhrase(
land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGenerateRecoveryPhraseMethod(), getCallOptions()), request);
}

/**
* <pre>
* Get the keys informations in the keybase
Expand Down Expand Up @@ -812,11 +888,12 @@ public com.google.common.util.concurrent.ListenableFuture<land.gno.gnomobile.v1.
private static final int METHODID_SET_CHAIN_ID = 1;
private static final int METHODID_SET_NAME_OR_BECH32 = 2;
private static final int METHODID_SET_PASSWORD = 3;
private static final int METHODID_LIST_KEY_INFO = 4;
private static final int METHODID_CREATE_ACCOUNT = 5;
private static final int METHODID_SELECT_ACCOUNT = 6;
private static final int METHODID_QUERY = 7;
private static final int METHODID_CALL = 8;
private static final int METHODID_GENERATE_RECOVERY_PHRASE = 4;
private static final int METHODID_LIST_KEY_INFO = 5;
private static final int METHODID_CREATE_ACCOUNT = 6;
private static final int METHODID_SELECT_ACCOUNT = 7;
private static final int METHODID_QUERY = 8;
private static final int METHODID_CALL = 9;

private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand Down Expand Up @@ -851,6 +928,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
serviceImpl.setPassword((land.gno.gnomobile.v1.Gnomobiletypes.SetPassword_Request) request,
(io.grpc.stub.StreamObserver<land.gno.gnomobile.v1.Gnomobiletypes.SetPassword_Reply>) responseObserver);
break;
case METHODID_GENERATE_RECOVERY_PHRASE:
serviceImpl.generateRecoveryPhrase((land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request) request,
(io.grpc.stub.StreamObserver<land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply>) responseObserver);
break;
case METHODID_LIST_KEY_INFO:
serviceImpl.listKeyInfo((land.gno.gnomobile.v1.Rpc.ListKeyInfo.Request) request,
(io.grpc.stub.StreamObserver<land.gno.gnomobile.v1.Rpc.ListKeyInfo.Reply>) responseObserver);
Expand Down Expand Up @@ -917,6 +998,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
land.gno.gnomobile.v1.Gnomobiletypes.SetPassword_Request,
land.gno.gnomobile.v1.Gnomobiletypes.SetPassword_Reply>(
service, METHODID_SET_PASSWORD)))
.addMethod(
getGenerateRecoveryPhraseMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Request,
land.gno.gnomobile.v1.Gnomobiletypes.GenerateRecoveryPhrase_Reply>(
service, METHODID_GENERATE_RECOVERY_PHRASE)))
.addMethod(
getListKeyInfoMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
Expand Down Expand Up @@ -968,6 +1056,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getSetChainIDMethod())
.addMethod(getSetNameOrBech32Method())
.addMethod(getSetPasswordMethod())
.addMethod(getGenerateRecoveryPhraseMethod())
.addMethod(getListKeyInfoMethod())
.addMethod(getCreateAccountMethod())
.addMethod(getSelectAccountMethod())
Expand Down
Loading