ETH钱包
/**
创建钱包
@parampwd 密码
@paramblock 创建成功回调
*/
+(void)createETHWithPwd:(NSString*)pwd
block:(void(^)(NSString*address,NSString*keyStore,NSString*mnemonicPhrase,NSString*privateKey))block;
/**
助记词导入
@parammnemonics 助记词 12个英文单词 空格分割
@parampwd 密码
@paramblock 导入回调
*/
+(void)inportMnemonicsETH:(NSString*)mnemonics
pwd:(NSString*)pwd
block:(void(^)(NSString*address,NSString*keyStore,NSString*mnemonicPhrase,NSString*privateKey,BOOLsuc,HSWalletErrorerror))block;
/**
KeyStore 导入
@paramkeyStore keyStore文本,类似json
@parampwd 密码
@paramblock 导入回调
*/
+(void)importKeyStoreETH:(NSString*)keyStore
pwd:(NSString*)pwd
block:(void(^)(NSString*address,NSString*keyStore,NSString*mnemonicPhrase,NSString*privateKey,BOOLsuc,HSWalletErrorerror))block;
/**
私钥导入
@paramprivateKey 私钥
@parampwd 密码
@paramblock 导入回调
*/
+(void)importWalletForPrivateKeyETH:(NSString*)privateKey
pwd:(NSString*)pwd
block:(void(^)(NSString*address,NSString*keyStore,NSString*mnemonicPhrase,NSString*privateKey,BOOLsuc,HSWalletErrorerror))block;
/**
查询余额
@paramarrayToken 查询的代币所有token
@paramaddress eth地址
@paramblock 回调
*/
+(void)getBalanceWithTokensETH:(NSArray *)arrayToken
withAddress:(NSString*)address
block:(void(^)(NSArray*arrayBanlance,BOOLsuc))block;
/**
转账
@paramtoAddress 转入地址
@parammoney 转入金额
@paramtokenETH 代币token 传nil默认为eth
@paramdecimal 小数位数
@paramkeyStore keyStore
@parampwd 密码
@paramgasPrice gasPrice (建议10-20)建议传nil,默认位当前节点安全gasPrice
@paramgasLimit gasLimit 不传 默认eth 21000 token 60000
@paramblock 回调
*/
+(void)sendToAssressETH:(NSString*)toAddress money:(NSString*)money tokenETH:(NSString*)tokenETH decimal:(NSString*)decimal currentKeyStore:(NSString*)keyStore pwd:(NSString*)pwd gasPrice:(NSString*)gasPrice gasLimit:(NSString*)gasLimit block:(void(^)(NSString*hashStr,BOOLsuc,HSWalletErrorerror))block;
BTC钱包
/**
创建钱包
*/
+(void)createWalletWithNewworkBTC:(Network)net
Path:(Bip44Path)path
password:(NSString*)pwd
resultBlock:(void(^)(NSString*privates,NSString*address,NSString*words))block;
/**
导入钱包:通过私钥
*/
+(void)importWalletByPrivateKeyBTC:(NSString*)privateKey
Newwork:(Network)net
resultBlock:(void(^)(NSString*privates,NSString*address))block
error:(void(^)(void))errorblock;
/**
导入钱包:通过助记词
*/
+(void)importWalletByMnemonicBTC:(NSString*)mnemonicStr
Newwork:(Network)net
Path:(Bip44Path)path
password:(NSString*)pwd
resultBlock:(void(^)(NSString*privates,NSString*address))block
error:(void(^)(void))errorblock;
/**
查询余额
*/
+(void)getBalanceByAddressBTC:(NSString*)address
Network:(Network)net
resultBlock:(void(^)(NSDictionary*dict,BOOLsuc))block;
/**
查询交易记录
*/
+(void)getTradListByAddressBTC:(NSString*)address
Network:(Network)net
Path:(Bip44Path)path
Page:(NSInteger)page
resultBlock:(void(^)(NSArray*array,BOOLsuc))block;
/**
发起交易
*/
+(void)TransferByhTradingBTC:(Network)net
Path:(Bip44Path)path
PayAddress:(NSString*)payAdd //付款地址
collectAddress:(NSString*)colectAdd //收款地址
Money:(NSString*)money
PrivateKey:(NSString*)privateKey
Fee:(NSInteger)fee //手续费
resultBlock:(void(^)(NSString*hashStr,BOOLsuc))block;
开发功能目前有:
1 离线创建钱包 生成对应算法助记词、私钥(生成钱包)
2 验证私钥(私钥导入钱包)
3 查询余额
4 查询交易记录
5 交易功能
提供 OC开发的非静态库源码
提供 IOS技术支持
需要源码请联系QQ:753428092
网友评论