fix: 天河链对接修复 T1-T3/T6-T8(托管钱包注册与身份生命周期)
- TianheProvider 新增 registerUser/userInfo/ensureRegistered(接口1/8),attest 前幂等确保钱包已注册 - userDto 分段改为 application/json 类型 Blob,避免 Media Type Error - 严格校验 code===0 且必须返回 transactionHash,杜绝以本地 dataHash 冒充链上哈希的假上链 - upload 响应不再提取恒空的区块信息,注释固化"每物一条 proof、独立 txHash"不变量 - userKey 改为一次性随机生成并明文持久化(不再从 appKey 派生),明文存储保证备份跨重装可恢复 - 新增 /settings/tianhe/register|verify|identity 接口与设置页链上身份区(注册/显示地址/揭示复制/手动录入校验) - 单测扩至 27 个:新增注册、严格校验、userDto 类型、ensureRegistered 回退用例
This commit is contained in:
@@ -134,6 +134,10 @@ export const userApi = {
|
||||
export const settingsApi = {
|
||||
getAll: () => get<Record<string, string>>('/settings'),
|
||||
update: (data: object) => put('/settings', data),
|
||||
tianheRegister: () => post<{ userId: string; userKey: string; address: string }>('/settings/tianhe/register', {}),
|
||||
tianheVerify: (data: { userId: string; userKey: string }) =>
|
||||
post<{ userId: string; address: string }>('/settings/tianhe/verify', data),
|
||||
tianheIdentity: () => get<{ userId: string; userKey: string; address: string }>('/settings/tianhe/identity'),
|
||||
};
|
||||
|
||||
export const storageApi = {
|
||||
|
||||
Reference in New Issue
Block a user