Skip to content

Commit

Permalink
feat: add signature to sign record
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZexiao committed Feb 27, 2023
1 parent d8cb07f commit 4354d91
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 63 deletions.
2 changes: 1 addition & 1 deletion venus-shared/api/wallet/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +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
ListSignedRecord(ctx context.Context, param *types.QuerySignRecordParams) ([]types.SignRecord, error) //perm:read

api.Version
}
68 changes: 36 additions & 32 deletions venus-shared/api/wallet/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ curl http://<ip>:<port>/rpc/v0 -X POST -H "Content-Type: application/json" -H "
* [Common](#common)
* [AuthNew](#authnew)
* [AuthVerify](#authverify)
* [ListSignedRecord](#listsignedrecord)
* [LogList](#loglist)
* [LogSetLevel](#logsetlevel)
* [QuerySignRecord](#querysignrecord)
* [Version](#version)
* [Wallet](#wallet)
* [WalletDelete](#walletdelete)
Expand Down Expand Up @@ -69,36 +69,7 @@ Response:
]
```

### LogList


Perms: read

Inputs: `[]`

Response:
```json
[
"string value"
]
```

### LogSetLevel


Perms: write

Inputs:
```json
[
"string value",
"string value"
]
```

Response: `{}`

### QuerySignRecord
### ListSignedRecord


Perms: read
Expand Down Expand Up @@ -127,12 +98,45 @@ Response:
"Type": "message",
"Signer": "f01234",
"Err": {},
"Msg": "Ynl0ZSBhcnJheQ==",
"RawMsg": "Ynl0ZSBhcnJheQ==",
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"CreateAt": "0001-01-01T00:00:00Z"
}
]
```

### LogList


Perms: read

Inputs: `[]`

Response:
```json
[
"string value"
]
```

### LogSetLevel


Perms: write

Inputs:
```json
[
"string value",
"string value"
]
```

Response: `{}`

### Version
Version provides information about API provider

Expand Down
30 changes: 15 additions & 15 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.

18 changes: 9 additions & 9 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.

14 changes: 8 additions & 6 deletions venus-shared/types/msg_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"time"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/crypto"
)

type MsgType string
Expand Down Expand Up @@ -59,10 +60,11 @@ type QuerySignRecordParams struct {
}

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

0 comments on commit 4354d91

Please sign in to comment.