@33cn/chain33-rpc-api
Advanced tools
Comparing version 1.5.22 to 1.5.23
@@ -1,2 +0,2 @@ | ||
import { AccountObj } from "./commonGenerator"; | ||
import { AccountObj } from "./index"; | ||
/** | ||
@@ -3,0 +3,0 @@ * |
@@ -51,3 +51,3 @@ "use strict"; | ||
// import { sign } from "@33cn/wallet-base" | ||
var commonGenerator_1 = require("./commonGenerator"); | ||
var index_1 = require("./index"); | ||
// if(!window && typeof(window)=="object"){ | ||
@@ -318,4 +318,4 @@ var fetch = require('node-fetch'); | ||
txHexObj = _a.sent(); | ||
commonGenerator = new commonGenerator_1.CommonGenerator(); | ||
return [4 /*yield*/, commonGenerator.Trade23(item.sendUrl, commonGenerator_1.SignTypes.SignLocByWithhold, new commonGenerator_1.AccountObj(account.PriKey, account.Addr, this_1.WHTHHOLD_TOKENFINISHER_ACCOUNT_PRIKEY, this_1.WHTHHOLD_TOKENFINISHER_ACCOUNT_ADDR), { | ||
commonGenerator = new index_1.CommonGenerator(); | ||
return [4 /*yield*/, commonGenerator.Trade23(item.sendUrl, index_1.SignTypes.SignLocByWithhold, new index_1.AccountObj(account.PriKey, account.Addr, this_1.WHTHHOLD_TOKENFINISHER_ACCOUNT_PRIKEY, this_1.WHTHHOLD_TOKENFINISHER_ACCOUNT_ADDR), { | ||
error: "", | ||
@@ -322,0 +322,0 @@ result: [txHexObj.result] |
@@ -1,6 +0,5 @@ | ||
import { StructTradeGrpObj as TradeGrpObj, StructTradeGrp_CreateObj as TradeGrp_CreateObj } from "./structTradeGrpObj"; | ||
import { StructTradeObj as TradeObj } from "./structTradeObj"; | ||
import { StructAccountObj as AccountObj } from "./structAccountObj"; | ||
import { EnumSignTypes as SignTypes } from "./enumSignTypes"; | ||
export { TradeGrpObj, TradeGrp_CreateObj, TradeObj, AccountObj, SignTypes }; | ||
import { TradeGrpObj } from "./index"; | ||
import { TradeObj } from "./index"; | ||
import { AccountObj } from "./index"; | ||
import { SignTypes } from "./index"; | ||
/** | ||
@@ -7,0 +6,0 @@ * Chain33交易相关 |
@@ -51,11 +51,11 @@ "use strict"; | ||
var fetch = require('node-fetch'); | ||
var structTradeGrpObj_1 = require("./structTradeGrpObj"); | ||
exports.TradeGrpObj = structTradeGrpObj_1.StructTradeGrpObj; | ||
exports.TradeGrp_CreateObj = structTradeGrpObj_1.StructTradeGrp_CreateObj; | ||
var structTradeObj_1 = require("./structTradeObj"); | ||
exports.TradeObj = structTradeObj_1.StructTradeObj; | ||
var structAccountObj_1 = require("./structAccountObj"); | ||
exports.AccountObj = structAccountObj_1.StructAccountObj; | ||
var enumSignTypes_1 = require("./enumSignTypes"); | ||
exports.SignTypes = enumSignTypes_1.EnumSignTypes; | ||
var index_1 = require("./index"); | ||
var index_2 = require("./index"); | ||
// export { | ||
// TradeGrpObj, | ||
// TradeGrp_CreateObj, | ||
// TradeObj, | ||
// AccountObj, | ||
// SignTypes | ||
// } | ||
/** | ||
@@ -310,8 +310,8 @@ * Chain33交易相关 | ||
switch (_a) { | ||
case enumSignTypes_1.EnumSignTypes.SignRpc: return [3 /*break*/, 1]; | ||
case enumSignTypes_1.EnumSignTypes.SignLoc: return [3 /*break*/, 3]; | ||
case enumSignTypes_1.EnumSignTypes.SignLocByWithhold: return [3 /*break*/, 5]; | ||
case enumSignTypes_1.EnumSignTypes.SignLocGrp: return [3 /*break*/, 9]; | ||
case enumSignTypes_1.EnumSignTypes.SignLocGrpByWithhold: return [3 /*break*/, 12]; | ||
case enumSignTypes_1.EnumSignTypes.SignLocGrpByWithholdAndByAccounts: return [3 /*break*/, 16]; | ||
case index_2.SignTypes.SignRpc: return [3 /*break*/, 1]; | ||
case index_2.SignTypes.SignLoc: return [3 /*break*/, 3]; | ||
case index_2.SignTypes.SignLocByWithhold: return [3 /*break*/, 5]; | ||
case index_2.SignTypes.SignLocGrp: return [3 /*break*/, 9]; | ||
case index_2.SignTypes.SignLocGrpByWithhold: return [3 /*break*/, 12]; | ||
case index_2.SignTypes.SignLocGrpByWithholdAndByAccounts: return [3 /*break*/, 16]; | ||
} | ||
@@ -362,3 +362,3 @@ return [3 /*break*/, 20]; | ||
console.log("代扣本地签名"); | ||
if (!(account instanceof structAccountObj_1.StructAccountObj)) | ||
if (!(account instanceof index_1.AccountObj)) | ||
return [2 /*return*/, { error: "account类型不正确", result: null }]; | ||
@@ -370,3 +370,3 @@ return [4 /*yield*/, this.CreateEmptyTransferHex(chainUrl)]; | ||
emptyHexRlt.result = wallet_base_1.sign.resetTxExpire(emptyHexRlt.result, 120); | ||
return [4 /*yield*/, this.setTxByWithhold(chainUrl, { error: null, result: emptyHexRlt.result }, new structAccountObj_1.StructAccountObj(account.PayPriKey || '', account.PayAddr || ''))]; | ||
return [4 /*yield*/, this.setTxByWithhold(chainUrl, { error: null, result: emptyHexRlt.result }, new index_1.AccountObj(account.PayPriKey || '', account.PayAddr || ''))]; | ||
case 7: | ||
@@ -385,3 +385,3 @@ emptyHexRlt = _e.sent(); //nobalance包装"空交易" | ||
console.log("交易组本地签名"); | ||
if (!(account instanceof structAccountObj_1.StructAccountObj)) | ||
if (!(account instanceof index_1.AccountObj)) | ||
return [2 /*return*/, false]; | ||
@@ -403,3 +403,3 @@ _c = txHexObj.result; | ||
console.log("代扣交易组本地签名"); | ||
if (!(account instanceof structAccountObj_1.StructAccountObj)) | ||
if (!(account instanceof index_1.AccountObj)) | ||
return [2 /*return*/, { error: "account类型不正确", result: null }]; | ||
@@ -411,3 +411,3 @@ return [4 /*yield*/, this.CreateEmptyTransferHex(chainUrl)]; | ||
emptyHexRlt.result = wallet_base_1.sign.resetTxExpire(emptyHexRlt.result, 120); | ||
return [4 /*yield*/, this.setTxByWithhold(chainUrl, { error: null, result: emptyHexRlt.result }, new structAccountObj_1.StructAccountObj(account.PayPriKey || '', account.PayAddr || ''))]; | ||
return [4 /*yield*/, this.setTxByWithhold(chainUrl, { error: null, result: emptyHexRlt.result }, new index_1.AccountObj(account.PayPriKey || '', account.PayAddr || ''))]; | ||
case 14: | ||
@@ -432,3 +432,3 @@ emptyHexRlt = _e.sent(); //nobalance包装"空交易" | ||
emptyHexRlt.result = wallet_base_1.sign.resetTxExpire(emptyHexRlt.result, 120); | ||
return [4 /*yield*/, this.setTxByWithhold(chainUrl, { error: null, result: emptyHexRlt.result }, new structAccountObj_1.StructAccountObj(account[0].PayPriKey, account[0].PayAddr))]; | ||
return [4 /*yield*/, this.setTxByWithhold(chainUrl, { error: null, result: emptyHexRlt.result }, new index_1.AccountObj(account[0].PayPriKey, account[0].PayAddr))]; | ||
case 18: | ||
@@ -496,4 +496,4 @@ emptyHexRlt = _e.sent(); //nobalance包装"空交易" | ||
_TradeGrpObj = obj; | ||
if (!(obj.SignType === enumSignTypes_1.EnumSignTypes.SignLocGrpByWithhold | ||
|| obj.SignType === enumSignTypes_1.EnumSignTypes.SignLocGrp)) return [3 /*break*/, 5]; | ||
if (!(obj.SignType === index_2.SignTypes.SignLocGrpByWithhold | ||
|| obj.SignType === index_2.SignTypes.SignLocGrp)) return [3 /*break*/, 5]; | ||
results = []; | ||
@@ -500,0 +500,0 @@ i = 0; |
import { C2CCreator } from './c2cCreator'; | ||
import { Chain33AutomataItem, Chain33AutomataTransItem, Chain33AutomataGenerator, GetHistoryList, Check_ExecuteAutoMata, GetExecStatusByHashes } from './chain33AutomataGenerator'; | ||
import { EnumSignTypes } from './enumSignTypes'; | ||
import { LoanCreator } from './loanCreator'; | ||
import { StructAccountObj } from './structAccountObj'; | ||
import { StructTradeGrpObj, StructTradeGrp_CreateObj } from './StructTradeGrpObj'; | ||
import { StructTradeGrpObj, StructTradeGrp_CreateObj } from './structTradeGrpObj'; | ||
import { StructTradeObj } from './structTradeObj'; | ||
import { TokenCreator } from './tokenCreator'; | ||
export { C2CCreator, TokenCreator, LoanCreator, StructAccountObj, StructTradeObj, StructTradeGrpObj, StructTradeGrp_CreateObj, Chain33AutomataItem, Chain33AutomataTransItem, Chain33AutomataGenerator, GetHistoryList, Check_ExecuteAutoMata, GetExecStatusByHashes, }; | ||
import { CommonGenerator } from './commonGenerator'; | ||
export { C2CCreator, TokenCreator, LoanCreator, StructAccountObj as AccountObj, StructTradeObj as TradeObj, StructTradeGrpObj as TradeGrpObj, StructTradeGrp_CreateObj as TradeGrp_CreateObj, EnumSignTypes as SignTypes, CommonGenerator, Chain33AutomataItem, Chain33AutomataTransItem, Chain33AutomataGenerator, GetHistoryList, Check_ExecuteAutoMata, GetExecStatusByHashes, }; |
@@ -12,13 +12,17 @@ "use strict"; | ||
exports.GetExecStatusByHashes = chain33AutomataGenerator_1.GetExecStatusByHashes; | ||
var enumSignTypes_1 = require("./enumSignTypes"); | ||
exports.SignTypes = enumSignTypes_1.EnumSignTypes; | ||
var loanCreator_1 = require("./loanCreator"); | ||
exports.LoanCreator = loanCreator_1.LoanCreator; | ||
var structAccountObj_1 = require("./structAccountObj"); | ||
exports.StructAccountObj = structAccountObj_1.StructAccountObj; | ||
var StructTradeGrpObj_1 = require("./StructTradeGrpObj"); | ||
exports.StructTradeGrpObj = StructTradeGrpObj_1.StructTradeGrpObj; | ||
exports.StructTradeGrp_CreateObj = StructTradeGrpObj_1.StructTradeGrp_CreateObj; | ||
exports.AccountObj = structAccountObj_1.StructAccountObj; | ||
var structTradeGrpObj_1 = require("./structTradeGrpObj"); | ||
exports.TradeGrpObj = structTradeGrpObj_1.StructTradeGrpObj; | ||
exports.TradeGrp_CreateObj = structTradeGrpObj_1.StructTradeGrp_CreateObj; | ||
var structTradeObj_1 = require("./structTradeObj"); | ||
exports.StructTradeObj = structTradeObj_1.StructTradeObj; | ||
exports.TradeObj = structTradeObj_1.StructTradeObj; | ||
var tokenCreator_1 = require("./tokenCreator"); | ||
exports.TokenCreator = tokenCreator_1.TokenCreator; | ||
var commonGenerator_1 = require("./commonGenerator"); | ||
exports.CommonGenerator = commonGenerator_1.CommonGenerator; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { AccountObj, SignTypes } from "./commonGenerator"; | ||
import { AccountObj, SignTypes } from "./index"; | ||
/** | ||
@@ -3,0 +3,0 @@ * 交易对象(only for trade123) |
@@ -38,6 +38,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var commonGenerator_1 = require("./commonGenerator"); | ||
var index_1 = require("./index"); | ||
// import { biContractName, chainNamePrefix, biContractChainAddr } from "../api/config"; | ||
var fetch = require('node-fetch'); | ||
var comGen = new commonGenerator_1.CommonGenerator(); | ||
var comGen = new index_1.CommonGenerator(); | ||
/** | ||
@@ -44,0 +44,0 @@ * Token操作 |
{ | ||
"name": "@33cn/chain33-rpc-api", | ||
"version": "1.5.22", | ||
"version": "1.5.23", | ||
"description": "chain33 rpc 接口封装", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6619
380538