Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@33cn/wallet-api

Package Overview
Dependencies
Maintainers
7
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@33cn/wallet-api - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

dist/androidJsBridge.d.ts
export declare function callAndroidHandler(event: any, params?: any): Promise<{}>;
export declare function androidGetCurrentBTYAddress(): Promise<{}>;
export declare function androidSignRawTransaction(tx: string): Promise<{}>;
export declare function androidSignTransactionGroup(tx: string): Promise<{}>;
export declare function androidSignTransactionGroup(tx: string, exer?: string): Promise<{}>;

@@ -40,5 +40,5 @@ var bridgeName = 'WebViewJavascriptBridge';

}
export function androidSignTransactionGroup(tx) {
return callAndroidHandler('signTxGroup', { createHash: tx });
export function androidSignTransactionGroup(tx, exer) {
return callAndroidHandler('signTxGroup', { createHash: tx, exer: exer });
}
//# sourceMappingURL=androidJsBridge.js.map

@@ -11,2 +11,2 @@ export declare function getCurrentBTYAddress(): Promise<any>;

*/
export declare function signTxGroup(tx: string, title: string, address: string): Promise<any>;
export declare function signTxGroup(tx: string, exer?: string): Promise<any>;

@@ -81,6 +81,6 @@ import { Environment, getDappEnvironment, getDappEnvironmentDelay } from './dappEnvironment';

*/
export function signTxGroup(tx, title, address) {
export function signTxGroup(tx, exer) {
switch (getDappEnvironment()) {
case Environment.androidBiWallet:
return androidSignTransactionGroup(tx).then(function (res) {
return androidSignTransactionGroup(tx, exer).then(function (res) {
console.log('打印Android签名结果', res);

@@ -95,3 +95,3 @@ if (res.error) {

case Environment.iosBiWallet:
return iosSignTransactionGroup(tx).then(function (res) {
return iosSignTransactionGroup(tx, exer).then(function (res) {
console.log('打印IOS签名结果', res);

@@ -98,0 +98,0 @@ if (res.error) {

export declare function callIOSHandler(event: any, params?: any): Promise<{}>;
export declare function iosGetCurrentBTYAddress(): Promise<{}>;
export declare function iosSignRawTransaction(tx: string): Promise<{}>;
export declare function iosSignTransactionGroup(tx: string): Promise<{}>;
export declare function iosSignTransactionGroup(tx: string, exer?: string): Promise<{}>;

@@ -36,5 +36,5 @@ /** disale tslint */

}
export function iosSignTransactionGroup(tx) {
return callIOSHandler('signTxGroup', { createHash: tx });
export function iosSignTransactionGroup(tx, exer) {
return callIOSHandler('signTxGroup', { createHash: tx, exer: exer });
}
//# sourceMappingURL=iosJsBridge.js.map
{
"name": "@33cn/wallet-api",
"version": "1.2.0",
"version": "1.3.0",
"description": "提供各种比特元钱包的获取地址、签名接口",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# bityuan钱包 接口调用工具
- 封装了比特元桌面钱包、比特元轻钱包、 币钱包(未完成) 提供的获取地址、交易签名接口
### Install
```
yarn add @33cn/wallet-api
```
### Usage
#### getCurrentBTYAddress
- 功能:获取地址
- 环境:轻钱包、electron比特元钱包、币钱包及其各个项目方的拷贝版本
#### signTx
- 功能:普通交易签名
- 环境:轻钱包、electron比特元钱包、币钱包及其各个项目方的拷贝版本
#### signTxGroup
- 功能:构造交易组、签名
- 环境:币钱包及其各个项目方的拷贝版本
```
signTxGroup("0x1848959835460954609", "user.p.xxx.none")
// 可以用逗号分隔多比交易,接口会将它们打包成一个交易组
signTxGroup("0x9834894906090964509,0x93893548289256a678", "user.p.xxx.none")
```
### 各个环境接口负责人
- [轻钱包代码仓库](https://gitlab.33.cn/bityuan/wallet-in-chrome)
- [electron桌面钱包代码仓库](https://gitlab.33.cn/bityuan/wallet-with-electron)
- 币钱包:找移动端相关负责人对接

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc