Skip to content

Commit

Permalink
feat: add QuerySignRecord method
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZexiao committed Feb 16, 2023
1 parent d40314c commit a225c71
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 5 deletions.
3 changes: 3 additions & 0 deletions venus-shared/api/wallet/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/venus/venus-shared/api"
"github.com/filecoin-project/venus/venus-shared/types"
)

type ICommon interface {
Expand All @@ -15,5 +16,7 @@ type ICommon interface {
LogList(context.Context) ([]string, error) //perm:read
LogSetLevel(context.Context, string, string) error //perm:write

QuerySignRecord(ctx context.Context, param *types.QuerySignRecordParams) ([]types.SignRecord, error) //perm:read

api.Version
}
36 changes: 36 additions & 0 deletions venus-shared/api/wallet/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* [AuthVerify](#authverify)
* [LogList](#loglist)
* [LogSetLevel](#logsetlevel)
* [QuerySignRecord](#querysignrecord)
* [Version](#version)
* [Wallet](#wallet)
* [WalletDelete](#walletdelete)
Expand Down Expand Up @@ -91,6 +92,41 @@ Inputs:

Response: `{}`

### QuerySignRecord


Perms: read

Inputs:
```json
[
{
"ID": "string value",
"Type": "message",
"Signer": "f01234",
"IsError": true,
"Skip": 123,
"Limit": 123,
"After": "0001-01-01T00:00:00Z",
"Before": "0001-01-01T00:00:00Z"
}
]
```

Response:
```json
[
{
"ID": "string value",
"Type": "message",
"Signer": "f01234",
"Err": {},
"Msg": "Ynl0ZSBhcnJheQ==",
"CreateAt": "0001-01-01T00:00:00Z"
}
]
```

### Version
Version provides information about API provider

Expand Down
15 changes: 15 additions & 0 deletions venus-shared/api/wallet/mock/mock_ifullapi.go

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

14 changes: 9 additions & 5 deletions venus-shared/api/wallet/proxy_gen.go

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

26 changes: 26 additions & 0 deletions venus-shared/types/msg_meta.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package types

import (
"time"

"github.com/filecoin-project/go-address"
)

type MsgType string

const (
Expand Down Expand Up @@ -40,3 +46,23 @@ type MsgMeta struct {
// signed bytes (e.g. CID(Extra).Bytes() == toSign)
Extra []byte
}

type QuerySignRecordParams struct {
ID string
Type MsgType
Signer address.Address
IsError bool
Skip int
Limit int
After time.Time
Before time.Time
}

type SignRecord struct {
ID string
Type MsgType
Signer address.Address
Err error
Msg []byte
CreateAt time.Time
}

0 comments on commit a225c71

Please sign in to comment.