Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/webusb eth #25

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

Feature/webusb eth #25

wants to merge 45 commits into from

Conversation

fengweiqiang-coder
Copy link

No description provided.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
continue
}
}
const v = (rec_id + 27).toString(16);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signature 转成 rsv 如果抽象出一个函数,上面和这里就可以重用了。

message_to_sign = Buffer.from(message, "ascii");
}
let data
if (isPersonalSign) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以看看别的 API 是如何实现的, tcx 内部确实这么实现的,但是给到上层 API, personalSign 和 signMessage 应该也是区分开的。

}
}

function bindSignature(data: Buffer) :Buffer{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这部分代码删除吧。

// const deviceModel = devicesList.find(d => d.id === productId);
// return deviceModel;
// };
export async function requestimkeyDevice(): Promise<any> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在驼峰写法中可以考虑将 imKey 写作 ImKey 例如这里写作 requestImKeyDevice

src/index.ts Outdated
} else {
return num.toString();
}
}

export async function test33(){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index.ts 已经是正式的库文件代码了。这些没用的函数都删掉吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants