Skip to content

Commit

Permalink
fix: Use the latest gnonative to call ClientSignTx (#9)
Browse files Browse the repository at this point in the history
* fix: In go.mod, use the latest gnonative. Fix the call to ClientSignTx

Signed-off-by: Jeff Thompson <[email protected]>

* chore: In GnokeyMobileService, update the doc for SignTx

Signed-off-by: Jeff Thompson <[email protected]>

---------

Signed-off-by: Jeff Thompson <[email protected]>
  • Loading branch information
jefft0 authored Sep 3, 2024
1 parent 88e9e83 commit 9942eff
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
20 changes: 10 additions & 10 deletions api/gen/csharp/GnokeyMobileRpcGrpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ public abstract partial class GnokeyMobileServiceBase
}

/// <summary>
/// Sign the transaction using the active account.
/// If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// Sign the transaction using the account with the given address.
/// If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
/// </summary>
/// <param name="request">The request received from the client.</param>
Expand Down Expand Up @@ -259,8 +259,8 @@ protected GnokeyMobileServiceClient(ClientBaseConfiguration configuration) : bas
return CallInvoker.AsyncUnaryCall(__Method_ListKeyInfo, null, options, request);
}
/// <summary>
/// Sign the transaction using the active account.
/// If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// Sign the transaction using the account with the given address.
/// If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
/// </summary>
/// <param name="request">The request to send to the server.</param>
Expand All @@ -274,8 +274,8 @@ protected GnokeyMobileServiceClient(ClientBaseConfiguration configuration) : bas
return SignTx(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
/// <summary>
/// Sign the transaction using the active account.
/// If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// Sign the transaction using the account with the given address.
/// If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
/// </summary>
/// <param name="request">The request to send to the server.</param>
Expand All @@ -287,8 +287,8 @@ protected GnokeyMobileServiceClient(ClientBaseConfiguration configuration) : bas
return CallInvoker.BlockingUnaryCall(__Method_SignTx, null, options, request);
}
/// <summary>
/// Sign the transaction using the active account.
/// If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// Sign the transaction using the account with the given address.
/// If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
/// </summary>
/// <param name="request">The request to send to the server.</param>
Expand All @@ -302,8 +302,8 @@ protected GnokeyMobileServiceClient(ClientBaseConfiguration configuration) : bas
return SignTxAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
/// <summary>
/// Sign the transaction using the active account.
/// If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// Sign the transaction using the account with the given address.
/// If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
/// If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
/// </summary>
/// <param name="request">The request to send to the server.</param>
Expand Down
4 changes: 2 additions & 2 deletions api/gen/es/gnokey_mobile_rpc_connect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export declare const GnokeyMobileService: {
readonly kind: MethodKind.Unary,
},
/**
* Sign the transaction using the active account.
* If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
* Sign the transaction using the account with the given address.
* If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
* If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
*
* @generated from rpc land.gno.gnokey_mobile.v1.GnokeyMobileService.SignTx
Expand Down
4 changes: 2 additions & 2 deletions api/gen/es/gnokey_mobile_rpc_connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const GnokeyMobileService = {
kind: MethodKind.Unary,
},
/**
* Sign the transaction using the active account.
* If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
* Sign the transaction using the account with the given address.
* If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
* If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
*
* @generated from rpc land.gno.gnokey_mobile.v1.GnokeyMobileService.SignTx
Expand Down
4 changes: 2 additions & 2 deletions api/gen/es/gnokey_mobile_rpc_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ export declare const GnokeyMobileService: GenService<{
output: typeof ListKeyInfoResponseSchema;
},
/**
* Sign the transaction using the active account.
* If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
* Sign the transaction using the account with the given address.
* If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
* If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
*
* @generated from rpc land.gno.gnokey_mobile.v1.GnokeyMobileService.SignTx
Expand Down
8 changes: 4 additions & 4 deletions api/gen/go/_goconnect/gnokey_mobile_rpc.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/gnokey_mobile_rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ service GnokeyMobileService {
// Get the information for all keys in the keybase
rpc ListKeyInfo(land.gno.gnonative.v1.ListKeyInfoRequest) returns (land.gno.gnonative.v1.ListKeyInfoResponse);

// Sign the transaction using the active account.
// If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
// Sign the transaction using the account with the given address.
// If there is no activated account with the given address, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount.
// If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed.
rpc SignTx(land.gno.gnonative.v1.SignTxRequest) returns (land.gno.gnonative.v1.SignTxResponse);
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
connectrpc.com/connect v1.16.2
connectrpc.com/grpchealth v1.3.0
connectrpc.com/grpcreflect v1.2.0
github.com/gnolang/gno v0.1.1
github.com/gnolang/gnonative v1.5.1-0.20240814142433-69d4f3e915b3
github.com/gnolang/gno v0.1.2-0.20240826090356-651f5aac3706
github.com/gnolang/gnonative v1.7.3-0.20240903142546-1a678ad07ce4
github.com/peterbourgon/ff/v3 v3.4.0
github.com/pkg/errors v0.9.1
github.com/rs/cors v1.11.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/gnolang/gnonative v1.5.1-0.20240814142433-69d4f3e915b3 h1:lwRzsEYnrKRRFkwjNvG/ocexS+o9HHy1j3QeBbRxf4o=
github.com/gnolang/gnonative v1.5.1-0.20240814142433-69d4f3e915b3/go.mod h1:i8Zh8GqixyzCq5ZKaitmgTCaDaMozSUgjk4XtRiguzw=
github.com/gnolang/gnonative v1.7.3-0.20240903142546-1a678ad07ce4 h1:9E3lEHVwNA8e5SAC0An3x0fWQ2aOu0CCzrQe1qPFhbs=
github.com/gnolang/gnonative v1.7.3-0.20240903142546-1a678ad07ce4/go.mod h1:M8AhlFKOWmJrgS2BWMcMu4h+1rFyMzLqBm5Ow3T9YMA=
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 h1:GKvsK3oLWG9B1GL7WP/VqwM6C92j5tIvB844oggL9Lk=
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216/go.mod h1:xJhtEL7ahjM1WJipt89gel8tHzfIl/LyMY+lCYh38d8=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
Expand Down
2 changes: 1 addition & 1 deletion service/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (s *gnokeyMobileService) SignTx(ctx context.Context, req *connect.Request[g
return nil, err
}

signedTx, err := s.gnoNativeService.ClientSignTx(tx, req.Msg.AccountNumber, req.Msg.SequenceNumber)
signedTx, err := s.gnoNativeService.ClientSignTx(tx, req.Msg.Address, req.Msg.AccountNumber, req.Msg.SequenceNumber)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9942eff

Please sign in to comment.