-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[render preview][FEAT] support for signature 1 & 2 (#32)
* wip * nonce rename to ticket * doc * WIP * update DDL for airaccount_chains * precisely reg by email; for supporting other ways * refactor passkey * sigin refactor * bugfix: restore wallet to user * support customer challenge * bugfix: txdata empty * bugfix: duplicated response * support discoverable login * demo support discoverable login * support discoverable signin * update swagger * update swagger * support one user multiple passkeys * update passkey * WIP * bugfix: txSigRlt address * WIP * one chain support multip aa by alias * update pkg * bugfix: signup in different PASSKEY for each User * bugfix: creat_aa with alias * WIP: more hd wallets for one email * support more hdwallets for one account * update unit tests * WIP: 1:N wallets and account * Fix wallet usage check for specific network * bugfix: re-use wallet if network is different * bugfix and code clean * changelog add * update demo * specify -7 and -257 only in registration session * Update dependencies in go.mod file; fix critical vul * replace http 404 to biz code 404 but http code 200
- Loading branch information
1 parent
9224d41
commit 38d1520
Showing
66 changed files
with
5,335 additions
and
978 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Change Logs | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
[TOC] | ||
|
||
> Unrelease | ||
## [变更逻辑] | ||
|
||
1. 注册成功后,不会自动创建AA钱包,需要调用新增接口 [POST /api/passkey/v1/account/chain](#post-apipasskeyv1accountchain) | ||
2. 同一个邮件,在不同设备允许再次注册(本质是注册该账户的Passkey),注册成功后依然是原用户 | ||
3. 登录不再需要输入邮箱,现在会自动发现当前设备在该origin下的Passkeys | ||
|
||
## [变更接口] | ||
|
||
### GET /api/passkey/v1/account/info | ||
|
||
1. query增加参数:alias, 默认为空 | ||
|
||
### POST /api/passkey/v1/reg/verify | ||
|
||
1. query增加参数:alias, 默认为空 | ||
|
||
### POST /api/passkey/v1/sign | ||
|
||
1. body移除email,只保留origin | ||
|
||
### POST /api/passkey/v1/sign/verify | ||
|
||
1. query参数只保留origin | ||
|
||
### POST /api/passkey/v1/tx/sign | ||
|
||
1. body参数中nonce改名为ticket | ||
2. body参数中增加network,表示链名称,必填 | ||
3. body参数中增加network_alias,表示链别名,非必填参数 | ||
|
||
### POST /api/passkey/v1/tx/sign/verify | ||
|
||
1. query参数中nonce改名为ticket | ||
2. query参数中增加network,表示链名称,必填 | ||
3. query参数中增加network_alias,表示链别名,非必填参数 | ||
|
||
## [新增接口] | ||
|
||
### GET /api/passkey/v1/chains/support | ||
|
||
> 获取支持的链名称 | ||
入参:无 | ||
|
||
*data*对象里的key表示链名称,在其他接口参数中的network需符合该键名,value为true时表示支持,*data*中没有列出的链表示不支持 | ||
|
||
出参: | ||
|
||
```json | ||
{ | ||
"code": 200, | ||
"message": "", | ||
"data": { | ||
"base-sepolia": true, | ||
"ethereum-sepolia": true, | ||
"optimism-sepolia": true | ||
}, | ||
"cost": "2562047h47m16.854775807s" | ||
} | ||
``` | ||
|
||
### POST /api/passkey/v1/account/chain | ||
|
||
> 创建指定链的AA钱包 | ||
入参: | ||
|
||
body: | ||
|
||
```json | ||
{ | ||
"alias": "string", | ||
"network": "ethereum-mainnet" | ||
} | ||
``` | ||
|
||
alias: 别名,允许为空,同一个链支持不同别名的钱包,目前上限为10个 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.