conseiljs
Advanced tools
Comparing version 5.0.9-3 to 5.0.9-4
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BabylonDelegationHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -41,3 +54,3 @@ const TezosTypes = __importStar(require("../../../types/tezos/TezosChainTypes")); | ||
const storageResult = yield TezosNodeReader_1.TezosNodeReader.getContractStorage(server, address); | ||
return { administrator: jsonpath_plus_1.JSONPath({ path: '$.string', json: storageResult })[0] }; | ||
return { administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.string', json: storageResult })[0] }; | ||
}); | ||
@@ -44,0 +57,0 @@ } |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CryptonomicNameServiceHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -128,3 +141,3 @@ const TezosTypes = __importStar(require("../../../types/tezos/TezosChainTypes")); | ||
const mapResult = yield TezosNodeReader_1.TezosNodeReader.getValueForBigMapKey(server, mapid, packedKey); | ||
return jsonpath_plus_1.JSONPath({ path: '$.string', json: mapResult })[0]; | ||
return (0, jsonpath_plus_1.JSONPath)({ path: '$.string', json: mapResult })[0]; | ||
} | ||
@@ -141,7 +154,7 @@ catch (_a) { } | ||
return { | ||
name: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].string', json: mapResult })[0], | ||
modified: Boolean(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].prim', json: mapResult })[0]), | ||
owner: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].string', json: mapResult })[0], | ||
registeredAt: new Date(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[0].string', json: mapResult })[0]), | ||
registrationPeriod: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[1].int', json: mapResult })[0] | ||
name: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].string', json: mapResult })[0], | ||
modified: Boolean((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].prim', json: mapResult })[0]), | ||
owner: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].string', json: mapResult })[0], | ||
registeredAt: new Date((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[0].string', json: mapResult })[0]), | ||
registrationPeriod: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[1].int', json: mapResult })[0] | ||
}; | ||
@@ -155,11 +168,11 @@ }); | ||
return { | ||
addressMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].int', json: storageResult })[0]), | ||
commitmentMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0]), | ||
manager: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].args[0].string', json: storageResult })[0], | ||
interval: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].args[1].int', json: storageResult })[0]), | ||
maxCommitTime: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].args[0].int', json: storageResult })[0]), | ||
maxDuration: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].args[1].int', json: storageResult })[0]), | ||
minCommitTime: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[0].int', json: storageResult })[0]), | ||
nameMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[1].args[0].int', json: storageResult })[0]), | ||
intervalFee: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[1].args[1].int', json: storageResult })[0]) | ||
addressMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].int', json: storageResult })[0]), | ||
commitmentMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0]), | ||
manager: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].args[0].string', json: storageResult })[0], | ||
interval: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].args[1].int', json: storageResult })[0]), | ||
maxCommitTime: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].args[0].int', json: storageResult })[0]), | ||
maxDuration: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].args[1].int', json: storageResult })[0]), | ||
minCommitTime: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[0].int', json: storageResult })[0]), | ||
nameMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[1].args[0].int', json: storageResult })[0]), | ||
intervalFee: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[1].args[1].int', json: storageResult })[0]) | ||
}; | ||
@@ -166,0 +179,0 @@ }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -14,10 +33,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DexterPoolHelper = void 0; | ||
const big_integer_1 = __importDefault(require("big-integer")); | ||
@@ -51,10 +64,10 @@ const jsonpath_plus_1 = require("jsonpath-plus"); | ||
return { | ||
balanceMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: storageResult })[0]), | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[2].args[0].string', json: storageResult })[0], | ||
token: jsonpath_plus_1.JSONPath({ path: '$.args[2].args[1].string', json: storageResult })[0], | ||
tokenBalance: Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]), | ||
xtzBalance: Number(jsonpath_plus_1.JSONPath({ path: '$.args[4].int', json: storageResult })[0]), | ||
selfIsUpdatingTokenPool: (jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
freeze_baker: (jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
lqt_total: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[2].int', json: storageResult })[0]) | ||
balanceMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: storageResult })[0]), | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].args[0].string', json: storageResult })[0], | ||
token: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].args[1].string', json: storageResult })[0], | ||
tokenBalance: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]), | ||
xtzBalance: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[4].int', json: storageResult })[0]), | ||
selfIsUpdatingTokenPool: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
freeze_baker: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
lqt_total: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[2].int', json: storageResult })[0]) | ||
}; | ||
@@ -72,3 +85,3 @@ }); | ||
} | ||
const jsonresult = jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: mapResult }); | ||
const jsonresult = (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: mapResult }); | ||
return Number(jsonresult[0]); | ||
@@ -91,6 +104,6 @@ } | ||
} | ||
const poolBalance = big_integer_1.default(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: mapResult })[0]); | ||
const poolTotal = big_integer_1.default(storage.lqt_total); | ||
const tokenBalance = big_integer_1.default(storage.tokenBalance); | ||
const xtzBalance = big_integer_1.default(storage.xtzBalance); | ||
const poolBalance = (0, big_integer_1.default)((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: mapResult })[0]); | ||
const poolTotal = (0, big_integer_1.default)(storage.lqt_total); | ||
const tokenBalance = (0, big_integer_1.default)(storage.tokenBalance); | ||
const xtzBalance = (0, big_integer_1.default)(storage.xtzBalance); | ||
return { token: tokenBalance.multiply(poolBalance).divide(poolTotal).toJSNumber(), xtz: xtzBalance.multiply(poolBalance).divide(poolTotal).toJSNumber() }; | ||
@@ -112,3 +125,3 @@ } | ||
let allowances = new Map(); | ||
jsonpath_plus_1.JSONPath({ path: '$.args[1][*].args', json: mapResult }).forEach(v => allowances[v[0]['string']] = Number(v[1]['int'])); | ||
(0, jsonpath_plus_1.JSONPath)({ path: '$.args[1][*].args', json: mapResult }).forEach(v => allowances[v[0]['string']] = Number(v[1]['int'])); | ||
return allowances[spender] || 0; | ||
@@ -172,11 +185,11 @@ }); | ||
function calcTokenLiquidityRequirement(xtzDeposit, tokenBalance, xtzBalance) { | ||
return big_integer_1.default(xtzDeposit).multiply(big_integer_1.default(tokenBalance)).divide(big_integer_1.default(xtzBalance)).toJSNumber(); | ||
return (0, big_integer_1.default)(xtzDeposit).multiply((0, big_integer_1.default)(tokenBalance)).divide((0, big_integer_1.default)(xtzBalance)).toJSNumber(); | ||
} | ||
DexterPoolHelper.calcTokenLiquidityRequirement = calcTokenLiquidityRequirement; | ||
function getTokenExchangeRate(xtzAmount, tokenBalance, xtzBalance, xtzDecimals = 6) { | ||
const n = big_integer_1.default(xtzAmount).multiply(big_integer_1.default(tokenBalance)).multiply(big_integer_1.default(ExchangeMultiplier)); | ||
const d = big_integer_1.default(xtzBalance).multiply(big_integer_1.default(1000)).add(big_integer_1.default(xtzAmount).multiply(big_integer_1.default(ExchangeMultiplier))); | ||
const n = (0, big_integer_1.default)(xtzAmount).multiply((0, big_integer_1.default)(tokenBalance)).multiply((0, big_integer_1.default)(ExchangeMultiplier)); | ||
const d = (0, big_integer_1.default)(xtzBalance).multiply((0, big_integer_1.default)(1000)).add((0, big_integer_1.default)(xtzAmount).multiply((0, big_integer_1.default)(ExchangeMultiplier))); | ||
const tokenAmount = n.divide(d); | ||
const dm = tokenAmount.divmod(big_integer_1.default(xtzAmount)); | ||
const f = dm.remainder.multiply(big_integer_1.default(10 ** xtzDecimals)).divide(big_integer_1.default(xtzAmount)); | ||
const dm = tokenAmount.divmod((0, big_integer_1.default)(xtzAmount)); | ||
const f = dm.remainder.multiply((0, big_integer_1.default)(10 ** xtzDecimals)).divide((0, big_integer_1.default)(xtzAmount)); | ||
return { tokenAmount: tokenAmount.toJSNumber(), rate: parseFloat(`${dm.quotient.toJSNumber()}.${f.toJSNumber()}`) }; | ||
@@ -186,7 +199,7 @@ } | ||
function getXTZExchangeRate(tokenAmount, tokenBalance, xtzBalance, tokenDecimals = 6) { | ||
const n = big_integer_1.default(tokenAmount).multiply(big_integer_1.default(xtzBalance)).multiply(big_integer_1.default(ExchangeMultiplier)); | ||
const d = big_integer_1.default(tokenBalance).multiply(big_integer_1.default(1000)).add(big_integer_1.default(tokenAmount).multiply(big_integer_1.default(ExchangeMultiplier))); | ||
const n = (0, big_integer_1.default)(tokenAmount).multiply((0, big_integer_1.default)(xtzBalance)).multiply((0, big_integer_1.default)(ExchangeMultiplier)); | ||
const d = (0, big_integer_1.default)(tokenBalance).multiply((0, big_integer_1.default)(1000)).add((0, big_integer_1.default)(tokenAmount).multiply((0, big_integer_1.default)(ExchangeMultiplier))); | ||
const xtzAmount = n.divide(d); | ||
const dm = xtzAmount.divmod(big_integer_1.default(tokenAmount)); | ||
const f = dm.remainder.multiply(big_integer_1.default(10 ** tokenDecimals)).divide(big_integer_1.default(tokenAmount)); | ||
const dm = xtzAmount.divmod((0, big_integer_1.default)(tokenAmount)); | ||
const f = dm.remainder.multiply((0, big_integer_1.default)(10 ** tokenDecimals)).divide((0, big_integer_1.default)(tokenAmount)); | ||
return { xtzAmount: xtzAmount.toJSNumber(), rate: parseFloat(`${dm.quotient.toJSNumber()}.${f.toJSNumber()}`) }; | ||
@@ -196,7 +209,7 @@ } | ||
function estimateLiquidityAmount(xtzDeposit, liquidityBalance, xtzBalance) { | ||
return big_integer_1.default(xtzDeposit).multiply(big_integer_1.default(liquidityBalance)).divide(big_integer_1.default(xtzBalance)).toJSNumber(); | ||
return (0, big_integer_1.default)(xtzDeposit).multiply((0, big_integer_1.default)(liquidityBalance)).divide((0, big_integer_1.default)(xtzBalance)).toJSNumber(); | ||
} | ||
DexterPoolHelper.estimateLiquidityAmount = estimateLiquidityAmount; | ||
function estimateShareCost(xtzBalance, tokenBalance, liquidityBalance) { | ||
const xtzShare = big_integer_1.default(xtzBalance).divide(big_integer_1.default(99)).toJSNumber(); | ||
const xtzShare = (0, big_integer_1.default)(xtzBalance).divide((0, big_integer_1.default)(99)).toJSNumber(); | ||
const tokenShare = calcTokenLiquidityRequirement(xtzShare, tokenBalance, xtzBalance); | ||
@@ -203,0 +216,0 @@ return { xtzCost: xtzShare, tokenCost: tokenShare }; |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HicNFTHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -29,9 +30,9 @@ const bignumber_js_1 = require("bignumber.js"); | ||
return { | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].string', json: storageResult })[0], | ||
tokens: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].int', json: storageResult })[0]), | ||
ledger: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[2].int', json: storageResult })[0]), | ||
metadata: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].int', json: storageResult })[0]), | ||
operators: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].int', json: storageResult })[0]), | ||
paused: (jsonpath_plus_1.JSONPath({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
tokenMetadata: Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]) | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].string', json: storageResult })[0], | ||
tokens: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].int', json: storageResult })[0]), | ||
ledger: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[2].int', json: storageResult })[0]), | ||
metadata: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].int', json: storageResult })[0]), | ||
operators: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].int', json: storageResult })[0]), | ||
paused: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
tokenMetadata: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]) | ||
}; | ||
@@ -124,3 +125,3 @@ }); | ||
const balanceResult = yield TezosNodeReader_1.TezosNodeReader.getValueForBigMapKey(server, mapId, packedTokenKey); | ||
balance = new bignumber_js_1.BigNumber(jsonpath_plus_1.JSONPath({ path: '$.int', json: balanceResult })[0]).toNumber(); | ||
balance = new bignumber_js_1.BigNumber((0, jsonpath_plus_1.JSONPath)({ path: '$.int', json: balanceResult })[0]).toNumber(); | ||
} | ||
@@ -161,3 +162,3 @@ catch (err) { | ||
const nftInfo = yield TezosNodeReader_1.TezosNodeReader.getValueForBigMapKey(server, 514, packedNftId); | ||
const ipfsUrlBytes = jsonpath_plus_1.JSONPath({ path: '$.args[1][0].args[1].bytes', json: nftInfo })[0]; | ||
const ipfsUrlBytes = (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1][0].args[1].bytes', json: nftInfo })[0]; | ||
const ipfsHash = Buffer.from(ipfsUrlBytes, 'hex').toString().slice(7); | ||
@@ -164,0 +165,0 @@ const nftDetails = yield fetch(`https://cloudflare-ipfs.com/ipfs/${ipfsHash}`, { cache: 'no-store' }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,9 +30,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -23,2 +35,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.KalamintHelper = void 0; | ||
const TezosNodeReader_1 = require("../TezosNodeReader"); | ||
@@ -46,3 +59,3 @@ const TezosNodeWriter_1 = require("../TezosNodeWriter"); | ||
const storageResult = yield TezosNodeReader_1.TezosNodeReader.getContractStorage(server, address); | ||
const auctionsArray = jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[3]', json: storageResult })[0]; | ||
const auctionsArray = (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[3]', json: storageResult })[0]; | ||
let auctions = {}; | ||
@@ -53,22 +66,22 @@ for (const elt of auctionsArray) { | ||
return { | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[0].string', json: storageResult })[0], | ||
allCollections: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].int', json: storageResult })[0], | ||
allTokens: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0], | ||
auctionsFactory: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[2].string', json: storageResult })[0], | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[0].string', json: storageResult })[0], | ||
allCollections: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].int', json: storageResult })[0], | ||
allTokens: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0], | ||
auctionsFactory: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[2].string', json: storageResult })[0], | ||
auctions: auctions, | ||
biddingFee: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].args[0].int', json: storageResult })[0], | ||
collections: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].args[1].int', json: storageResult })[0], | ||
idMaxIncrement: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[2].int', json: storageResult })[0], | ||
ipfsRegistry: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[3].string', json: storageResult })[0], | ||
ledger: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[4].int', json: storageResult })[0], | ||
maxEditions: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].args[0].int', json: storageResult })[0], | ||
maxRoyalty: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].args[1].int', json: storageResult })[0], | ||
metadata: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].int', json: storageResult })[0], | ||
operators: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[3].int', json: storageResult })[0], | ||
paused: JSON.parse(jsonpath_plus_1.JSONPath({ path: '$.args[2].args[0].prim', json: storageResult })[0].toLowerCase()), | ||
tokenMetadata: jsonpath_plus_1.JSONPath({ path: '$.args[2].args[1].int', json: storageResult })[0], | ||
tokens: jsonpath_plus_1.JSONPath({ path: '$.args[2].args[2].int', json: storageResult })[0], | ||
tradingFee: jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0], | ||
tradingFeeCollector: jsonpath_plus_1.JSONPath({ path: '$.args[4].int', json: storageResult })[0], | ||
x: jsonpath_plus_1.JSONPath({ path: '$.args[5].int', json: storageResult })[0] | ||
biddingFee: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].args[0].int', json: storageResult })[0], | ||
collections: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].args[1].int', json: storageResult })[0], | ||
idMaxIncrement: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[2].int', json: storageResult })[0], | ||
ipfsRegistry: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[3].string', json: storageResult })[0], | ||
ledger: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[4].int', json: storageResult })[0], | ||
maxEditions: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].args[0].int', json: storageResult })[0], | ||
maxRoyalty: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].args[1].int', json: storageResult })[0], | ||
metadata: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].int', json: storageResult })[0], | ||
operators: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[3].int', json: storageResult })[0], | ||
paused: JSON.parse((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].args[0].prim', json: storageResult })[0].toLowerCase()), | ||
tokenMetadata: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].args[1].int', json: storageResult })[0], | ||
tokens: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].args[2].int', json: storageResult })[0], | ||
tradingFee: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0], | ||
tradingFeeCollector: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[4].int', json: storageResult })[0], | ||
x: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[5].int', json: storageResult })[0] | ||
}; | ||
@@ -75,0 +88,0 @@ }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.KolibriTokenHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -46,3 +59,3 @@ const TezosTypes = __importStar(require("../../../types/tezos/TezosChainTypes")); | ||
} | ||
const jsonresult = jsonpath_plus_1.JSONPath({ path: '$.args[1].int', json: mapResult }); | ||
const jsonresult = (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].int', json: mapResult }); | ||
return Number(jsonresult[0]); | ||
@@ -60,3 +73,3 @@ }); | ||
let allowances = new Map(); | ||
jsonpath_plus_1.JSONPath({ path: '$.args[1][*].args', json: mapResult }).forEach(v => allowances[v[0]['string']] = Number(v[1]['int'])); | ||
(0, jsonpath_plus_1.JSONPath)({ path: '$.args[1][*].args', json: mapResult }).forEach(v => allowances[v[0]['string']] = Number(v[1]['int'])); | ||
return allowances[account]; | ||
@@ -70,6 +83,6 @@ }); | ||
return { | ||
mapid: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0]), | ||
supply: Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]), | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].string', json: storageResult })[0], | ||
paused: (jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t') | ||
mapid: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0]), | ||
supply: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]), | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].string', json: storageResult })[0], | ||
paused: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t') | ||
}; | ||
@@ -82,3 +95,3 @@ }); | ||
const storageResult = yield TezosNodeReader_1.TezosNodeReader.getContractStorage(server, address); | ||
return Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]); | ||
return Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]); | ||
}); | ||
@@ -90,3 +103,3 @@ } | ||
const storageResult = yield TezosNodeReader_1.TezosNodeReader.getContractStorage(server, address); | ||
return jsonpath_plus_1.JSONPath({ path: '$.args[1].string', json: storageResult })[0]; | ||
return (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].string', json: storageResult })[0]; | ||
}); | ||
@@ -98,3 +111,3 @@ } | ||
const storageResult = yield TezosNodeReader_1.TezosNodeReader.getContractStorage(server, address); | ||
return (jsonpath_plus_1.JSONPath({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'); | ||
return ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'); | ||
}); | ||
@@ -101,0 +114,0 @@ } |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MurbardMultisigHelper = void 0; | ||
const blakejs = __importStar(require("blakejs")); | ||
@@ -54,5 +67,5 @@ const jsonpath_plus_1 = require("jsonpath-plus"); | ||
return { | ||
counter: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: storageResult })[0]), | ||
threshold: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].int', json: storageResult })[0]), | ||
keys: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1]..string', json: storageResult }) | ||
counter: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: storageResult })[0]), | ||
threshold: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].int', json: storageResult })[0]), | ||
keys: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1]..string', json: storageResult }) | ||
}; | ||
@@ -59,0 +72,0 @@ }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TCFBakerRegistryHelper = void 0; | ||
const blakejs = __importStar(require("blakejs")); | ||
@@ -44,6 +57,6 @@ const jsonpath_plus_1 = require("jsonpath-plus"); | ||
return { | ||
mapid: parseInt(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: storageResult })[0]), | ||
owner: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].string', json: storageResult })[0], | ||
signupFee: parseInt(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[0].int', json: storageResult })[0]), | ||
updateFee: parseInt(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[1].int', json: storageResult })[0]) | ||
mapid: parseInt((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: storageResult })[0]), | ||
owner: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].string', json: storageResult })[0], | ||
signupFee: parseInt((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[0].int', json: storageResult })[0]), | ||
updateFee: parseInt((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[1].int', json: storageResult })[0]) | ||
}; | ||
@@ -66,15 +79,15 @@ }); | ||
const textDecoder = new TextDecoder(); | ||
const paymentConfigMask = Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].args[0].args[1].int', json: mapResult })[0]); | ||
const paymentConfigMask = Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].args[0].args[1].int', json: mapResult })[0]); | ||
return { | ||
name: textDecoder.decode(Buffer.from(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[0].args[0].args[0].bytes', json: mapResult })[0], 'hex')), | ||
isAcceptingDelegation: Boolean(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[0].args[0].args[1].prim', json: mapResult })[0]), | ||
externalDataURL: textDecoder.decode(Buffer.from(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[0].args[1].bytes', json: mapResult })[0], 'hex')), | ||
split: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[0].args[0].int', json: mapResult })[0]) / 10000, | ||
paymentAccounts: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[0].args[1]..string', json: mapResult }), | ||
minimumDelegation: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[0].args[0].int', json: mapResult })[0]), | ||
isGreedy: Boolean(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[0].args[1].prim', json: mapResult })[0]), | ||
payoutDelay: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[1].args[0].int', json: mapResult })[0]), | ||
payoutFrequency: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[1].args[1].args[0].int', json: mapResult })[0]), | ||
minimumPayout: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[1].args[1].args[1].int', json: mapResult })[0]), | ||
isCheap: Boolean(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].args[0].args[0].prim', json: mapResult })[0]), | ||
name: textDecoder.decode(Buffer.from((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[0].args[0].args[0].bytes', json: mapResult })[0], 'hex')), | ||
isAcceptingDelegation: Boolean((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[0].args[0].args[1].prim', json: mapResult })[0]), | ||
externalDataURL: textDecoder.decode(Buffer.from((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[0].args[1].bytes', json: mapResult })[0], 'hex')), | ||
split: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[0].args[0].int', json: mapResult })[0]) / 10000, | ||
paymentAccounts: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[0].args[1]..string', json: mapResult }), | ||
minimumDelegation: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[0].args[0].int', json: mapResult })[0]), | ||
isGreedy: Boolean((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[0].args[1].prim', json: mapResult })[0]), | ||
payoutDelay: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[1].args[0].int', json: mapResult })[0]), | ||
payoutFrequency: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[1].args[1].args[0].int', json: mapResult })[0]), | ||
minimumPayout: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].args[1].args[1].args[1].int', json: mapResult })[0]), | ||
isCheap: Boolean((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].args[0].args[0].prim', json: mapResult })[0]), | ||
paymentConfig: { | ||
@@ -96,6 +109,6 @@ payForOwnBlocks: Boolean(paymentConfigMask & 1), | ||
}, | ||
overdelegationThreshold: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].args[1].args[0].int', json: mapResult })[0]), | ||
subtractRewardsFromUninvitedDelegation: Boolean(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].args[1].args[1].prim', json: mapResult })[0]), | ||
recordManager: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].args[0].string', json: mapResult })[0], | ||
timestamp: new Date(jsonpath_plus_1.JSONPath({ path: '$.args[1].string', json: mapResult })[0]) | ||
overdelegationThreshold: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].args[1].args[0].int', json: mapResult })[0]), | ||
subtractRewardsFromUninvitedDelegation: Boolean((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].args[1].args[1].prim', json: mapResult })[0]), | ||
recordManager: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].args[0].string', json: mapResult })[0], | ||
timestamp: new Date((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].string', json: mapResult })[0]) | ||
}; | ||
@@ -102,0 +115,0 @@ }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosContractUtils = void 0; | ||
const blakejs = __importStar(require("blakejs")); | ||
@@ -21,0 +34,0 @@ const TezosLanguageUtil_1 = require("../TezosLanguageUtil"); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TzbtcTokenHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -43,3 +56,3 @@ const TezosConstants_1 = require("../../../types/tezos/TezosConstants"); | ||
const value = yield queryMap(server, mapid, `(Pair "ledger" 0x${TezosMessageUtil_1.TezosMessageUtils.writeAddress(account)})`); | ||
return Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: value })[0]); | ||
return Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: value })[0]); | ||
}); | ||
@@ -69,3 +82,3 @@ } | ||
return { | ||
mapid: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: storageResult })[0]), | ||
mapid: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: storageResult })[0]), | ||
scale: 8 | ||
@@ -79,3 +92,3 @@ }; | ||
const r = yield queryMap(server, mapid, '"totalSupply"'); | ||
return Number(jsonpath_plus_1.JSONPath({ path: '$.int', json: r })[0]); | ||
return Number((0, jsonpath_plus_1.JSONPath)({ path: '$.int', json: r })[0]); | ||
}); | ||
@@ -87,3 +100,3 @@ } | ||
const r = yield queryMap(server, mapid, '"paused"'); | ||
return (jsonpath_plus_1.JSONPath({ path: '$.prim', json: r })[0]).toLowerCase().startsWith('t'); | ||
return ((0, jsonpath_plus_1.JSONPath)({ path: '$.prim', json: r })[0]).toLowerCase().startsWith('t'); | ||
}); | ||
@@ -133,3 +146,3 @@ } | ||
} | ||
const bytes = jsonpath_plus_1.JSONPath({ path: '$.bytes', json: mapResult })[0]; | ||
const bytes = (0, jsonpath_plus_1.JSONPath)({ path: '$.bytes', json: mapResult })[0]; | ||
return JSON.parse(TezosLanguageUtil_1.TezosLanguageUtil.hexToMicheline(bytes.slice(2)).code); | ||
@@ -136,0 +149,0 @@ }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ChainlinkTokenHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -42,8 +55,8 @@ const TezosTypes = __importStar(require("../../../../types/tezos/TezosChainTypes")); | ||
return { | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].string', json: storageResult })[0], | ||
tokens: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].args[0].int', json: storageResult })[0]), | ||
balanceMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].args[1].int', json: storageResult })[0]), | ||
operatorMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].args[1].int', json: storageResult })[0]), | ||
paused: (jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[0].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
metadataMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[1].int', json: storageResult })[0]), | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].string', json: storageResult })[0], | ||
tokens: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].args[0].int', json: storageResult })[0]), | ||
balanceMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].args[1].int', json: storageResult })[0]), | ||
operatorMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].args[1].int', json: storageResult })[0]), | ||
paused: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[0].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
metadataMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[1].int', json: storageResult })[0]), | ||
}; | ||
@@ -61,6 +74,6 @@ }); | ||
return { | ||
tokenid: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: mapResult })[0]), | ||
symbol: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].string', json: mapResult })[0], | ||
name: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[0].string', json: mapResult })[0], | ||
scale: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].args[1].args[0].int', json: mapResult })[0]), | ||
tokenid: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: mapResult })[0]), | ||
symbol: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].string', json: mapResult })[0], | ||
name: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[0].string', json: mapResult })[0], | ||
scale: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].args[1].args[0].int', json: mapResult })[0]), | ||
}; | ||
@@ -87,3 +100,3 @@ }); | ||
} | ||
const jsonresult = jsonpath_plus_1.JSONPath({ path: '$.int', json: mapResult }); | ||
const jsonresult = (0, jsonpath_plus_1.JSONPath)({ path: '$.int', json: mapResult }); | ||
return Number(jsonresult[0]); | ||
@@ -90,0 +103,0 @@ }); |
@@ -44,7 +44,7 @@ import { KeyStore, Signer } from '../../../../types/ExternalInterfaces'; | ||
function transfer(server: string, address: string, signer: Signer, keystore: KeyStore, fee: number, transfers: TransferPair[], gas?: number, freight?: number): Promise<string>; | ||
function AddOperatorsOperation(address: string, counter: number, keystore: KeyStore, fee: number, updateOps: UpdateOperator[], gas?: number, freight?: number): Transaction; | ||
function AddOperatorsOperation(address: string, counter: number, pkh: string, fee: number, updateOps: UpdateOperator[], gas?: number, freight?: number): Transaction; | ||
function addOperators(server: string, address: string, signer: Signer, keystore: KeyStore, fee: number, updateOps: UpdateOperator[], gas?: number, freight?: number): Promise<string>; | ||
function RemoveOperatorsOperation(address: string, counter: number, keystore: KeyStore, fee: number, updateOps: UpdateOperator[], gas?: number, freight?: number): Transaction; | ||
function RemoveOperatorsOperation(address: string, counter: number, pkh: string, fee: number, updateOps: UpdateOperator[], gas?: number, freight?: number): Transaction; | ||
function removeOperators(server: string, address: string, signer: Signer, keystore: KeyStore, fee: number, updateOps: UpdateOperator[], gas?: number, freight?: number): Promise<string>; | ||
function getAccountBalance(server: string, mapid: number, account: string, tokenid: number, balancePath?: string): Promise<number>; | ||
} |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MultiAssetTokenHelper = exports.TransferPairMichelson = exports.TokenTransactionMichelson = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -67,10 +80,10 @@ const TezosConstants_1 = require("../../../../types/tezos/TezosConstants"); | ||
return { | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].string', json: storageResult })[0], | ||
tokens: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].int', json: storageResult })[0]), | ||
ledger: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[2].int', json: storageResult })[0]), | ||
metadata: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[2].int', json: storageResult })[0]), | ||
paused: (jsonpath_plus_1.JSONPath({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
operators: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].int', json: storageResult })[0]), | ||
tokenMetadata: Number(jsonpath_plus_1.JSONPath({ path: '$.args[2].int', json: storageResult })[0]), | ||
totalSupply: Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]) | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].string', json: storageResult })[0], | ||
tokens: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].int', json: storageResult })[0]), | ||
ledger: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[2].int', json: storageResult })[0]), | ||
metadata: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[2].int', json: storageResult })[0]), | ||
paused: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
operators: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].int', json: storageResult })[0]), | ||
tokenMetadata: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].int', json: storageResult })[0]), | ||
totalSupply: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]) | ||
}; | ||
@@ -88,3 +101,3 @@ }); | ||
const tokenData = { | ||
tokenid: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: mapResult })[0]), | ||
tokenid: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: mapResult })[0]), | ||
metadata: {} | ||
@@ -151,3 +164,3 @@ }; | ||
MultiAssetTokenHelper.transfer = transfer; | ||
function AddOperatorsOperation(address, counter, keystore, fee, updateOps, gas = 800000, freight = 20000) { | ||
function AddOperatorsOperation(address, counter, pkh, fee, updateOps, gas = 800000, freight = 20000) { | ||
const entryPoint = 'update_operators'; | ||
@@ -161,3 +174,3 @@ let parameters = "{"; | ||
parameters += "}"; | ||
return TezosNodeWriter_1.TezosNodeWriter.constructContractInvocationOperation(keystore.publicKeyHash, counter, address, 0, fee, freight, gas, entryPoint, parameters, TezosTypes.TezosParameterFormat.Michelson); | ||
return TezosNodeWriter_1.TezosNodeWriter.constructContractInvocationOperation(pkh, counter, address, 0, fee, freight, gas, entryPoint, parameters, TezosTypes.TezosParameterFormat.Michelson); | ||
} | ||
@@ -180,3 +193,3 @@ MultiAssetTokenHelper.AddOperatorsOperation = AddOperatorsOperation; | ||
MultiAssetTokenHelper.addOperators = addOperators; | ||
function RemoveOperatorsOperation(address, counter, keystore, fee, updateOps, gas = 800000, freight = 20000) { | ||
function RemoveOperatorsOperation(address, counter, pkh, fee, updateOps, gas = 800000, freight = 20000) { | ||
const entryPoint = 'update_operators'; | ||
@@ -190,3 +203,3 @@ let parameters = "{"; | ||
parameters += "}"; | ||
return TezosNodeWriter_1.TezosNodeWriter.constructContractInvocationOperation(keystore.publicKeyHash, counter, address, 0, fee, freight, gas, entryPoint, parameters, TezosTypes.TezosParameterFormat.Michelson); | ||
return TezosNodeWriter_1.TezosNodeWriter.constructContractInvocationOperation(pkh, counter, address, 0, fee, freight, gas, entryPoint, parameters, TezosTypes.TezosParameterFormat.Michelson); | ||
} | ||
@@ -217,3 +230,3 @@ MultiAssetTokenHelper.RemoveOperatorsOperation = RemoveOperatorsOperation; | ||
} | ||
const jsonresult = jsonpath_plus_1.JSONPath({ path: balancePath, json: mapResult }); | ||
const jsonresult = (0, jsonpath_plus_1.JSONPath)({ path: balancePath, json: mapResult }); | ||
return Number(jsonresult[0]); | ||
@@ -220,0 +233,0 @@ }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SingleAssetTokenHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -55,10 +68,10 @@ const TezosMessageUtil_1 = require("../../TezosMessageUtil"); | ||
return { | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[0].string', json: storageResult })[0], | ||
tokens: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0]), | ||
ledger: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].int', json: storageResult })[0]), | ||
metadata: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[2].int', json: storageResult })[0]), | ||
paused: (jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
operators: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].int', json: storageResult })[0]), | ||
tokenMetadata: Number(jsonpath_plus_1.JSONPath({ path: '$.args[2].int', json: storageResult })[0]), | ||
totalSupply: Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]), | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[0].string', json: storageResult })[0], | ||
tokens: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0]), | ||
ledger: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].int', json: storageResult })[0]), | ||
metadata: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[2].int', json: storageResult })[0]), | ||
paused: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
operators: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].int', json: storageResult })[0]), | ||
tokenMetadata: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].int', json: storageResult })[0]), | ||
totalSupply: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]), | ||
}; | ||
@@ -76,3 +89,3 @@ }); | ||
const tokenData = { | ||
tokenid: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: mapResult })[0]), | ||
tokenid: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: mapResult })[0]), | ||
metadata: {} | ||
@@ -176,3 +189,3 @@ }; | ||
} | ||
const balance = Number(jsonpath_plus_1.JSONPath({ path: balancePath, json: mapResult })[0]); | ||
const balance = Number((0, jsonpath_plus_1.JSONPath)({ path: balancePath, json: mapResult })[0]); | ||
return balance; | ||
@@ -179,0 +192,0 @@ }); |
@@ -19,3 +19,3 @@ import { KeyStore, Signer } from '../../../types/ExternalInterfaces'; | ||
function transferBalance(server: string, signer: Signer, keystore: KeyStore, contract: string, fee: number, source: string, destination: string, amount: number, gas: number, freight: number): Promise<string>; | ||
function ApproveBalanceOperation(amount: number, spender: string, counter: number, address: string, keystore: KeyStore, fee: number, gas: number | undefined, freight: number): Transaction; | ||
function ApproveBalanceOperation(amount: number, spender: string, counter: number, address: string, pkh: string, fee: number, gas: number | undefined, freight: number): Transaction; | ||
function approveBalance(server: string, signer: Signer, keystore: KeyStore, contract: string, fee: number, destination: string, amount: number, gas: number, freight: number): Promise<string>; | ||
@@ -22,0 +22,0 @@ function activateLedger(server: string, signer: Signer, keystore: KeyStore, contract: string, fee: number, gas: number, freight: number): Promise<string>; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Tzip7ReferenceTokenHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -57,3 +70,3 @@ const TezosTypes = __importStar(require("../../../types/tezos/TezosChainTypes")); | ||
} | ||
const jsonresult = jsonpath_plus_1.JSONPath({ path: balancePath, json: mapResult }); | ||
const jsonresult = (0, jsonpath_plus_1.JSONPath)({ path: balancePath, json: mapResult }); | ||
return Number(jsonresult[0]); | ||
@@ -71,3 +84,3 @@ }); | ||
let allowances = new Map(); | ||
jsonpath_plus_1.JSONPath({ path: '$.args[1][*].args', json: mapResult }).forEach(v => allowances[v[0]['string']] = Number(v[1]['int'])); | ||
(0, jsonpath_plus_1.JSONPath)({ path: '$.args[1][*].args', json: mapResult }).forEach(v => allowances[v[0]['string']] = Number(v[1]['int'])); | ||
return allowances[account]; | ||
@@ -81,6 +94,6 @@ }); | ||
return { | ||
mapid: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].int', json: storageResult })[0]), | ||
supply: Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]), | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[1].string', json: storageResult })[0], | ||
paused: (jsonpath_plus_1.JSONPath({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t') | ||
mapid: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].int', json: storageResult })[0]), | ||
supply: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]), | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].string', json: storageResult })[0], | ||
paused: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t') | ||
}; | ||
@@ -93,3 +106,3 @@ }); | ||
const storageResult = yield TezosNodeReader_1.TezosNodeReader.getContractStorage(server, address); | ||
return Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]); | ||
return Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]); | ||
}); | ||
@@ -101,3 +114,3 @@ } | ||
const storageResult = yield TezosNodeReader_1.TezosNodeReader.getContractStorage(server, address); | ||
return jsonpath_plus_1.JSONPath({ path: '$.args[1].string', json: storageResult })[0]; | ||
return (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].string', json: storageResult })[0]; | ||
}); | ||
@@ -109,3 +122,3 @@ } | ||
const storageResult = yield TezosNodeReader_1.TezosNodeReader.getContractStorage(server, address); | ||
return (jsonpath_plus_1.JSONPath({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'); | ||
return ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'); | ||
}); | ||
@@ -122,6 +135,6 @@ } | ||
Tzip7ReferenceTokenHelper.transferBalance = transferBalance; | ||
function ApproveBalanceOperation(amount, spender, counter, address, keystore, fee, gas = 800000, freight) { | ||
function ApproveBalanceOperation(amount, spender, counter, address, pkh, fee, gas = 800000, freight) { | ||
const entrypoint = 'approve'; | ||
const parameters = `(Pair "${spender}" ${amount})`; | ||
return TezosNodeWriter_1.TezosNodeWriter.constructContractInvocationOperation(keystore.publicKeyHash, counter, address, 0, fee, freight, gas, entrypoint, parameters, TezosTypes.TezosParameterFormat.Michelson); | ||
return TezosNodeWriter_1.TezosNodeWriter.constructContractInvocationOperation(pkh, counter, address, 0, fee, freight, gas, entrypoint, parameters, TezosTypes.TezosParameterFormat.Michelson); | ||
} | ||
@@ -128,0 +141,0 @@ Tzip7ReferenceTokenHelper.ApproveBalanceOperation = ApproveBalanceOperation; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WrappedTezosHelper = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -61,10 +74,10 @@ const TezosTypes = __importStar(require("../../../types/tezos/TezosChainTypes")); | ||
return { | ||
balanceMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[1].int', json: storageResult })[0]), | ||
approvalsMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].args[1].int', json: storageResult })[0]), | ||
supply: Number(jsonpath_plus_1.JSONPath({ path: '$.args[3].int', json: storageResult })[0]), | ||
administrator: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[0].args[0].string', json: storageResult })[0], | ||
paused: (jsonpath_plus_1.JSONPath({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
pauseGuardian: jsonpath_plus_1.JSONPath({ path: '$.args[1].args[2].string', json: storageResult })[0], | ||
outcomeMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0]), | ||
swapMap: Number(jsonpath_plus_1.JSONPath({ path: '$.args[0].args[1].int', json: storageResult })[0]) | ||
balanceMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[1].int', json: storageResult })[0]), | ||
approvalsMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].args[1].int', json: storageResult })[0]), | ||
supply: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[3].int', json: storageResult })[0]), | ||
administrator: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[0].args[0].string', json: storageResult })[0], | ||
paused: ((0, jsonpath_plus_1.JSONPath)({ path: '$.args[2].prim', json: storageResult })[0]).toString().toLowerCase().startsWith('t'), | ||
pauseGuardian: (0, jsonpath_plus_1.JSONPath)({ path: '$.args[1].args[2].string', json: storageResult })[0], | ||
outcomeMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[0].args[1].int', json: storageResult })[0]), | ||
swapMap: Number((0, jsonpath_plus_1.JSONPath)({ path: '$.args[0].args[1].int', json: storageResult })[0]) | ||
}; | ||
@@ -81,3 +94,3 @@ }); | ||
} | ||
const numberString = jsonpath_plus_1.JSONPath({ path: '$.int', json: mapResult }); | ||
const numberString = (0, jsonpath_plus_1.JSONPath)({ path: '$.int', json: mapResult }); | ||
return Number(numberString); | ||
@@ -84,0 +97,0 @@ }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getKeywordForCode = exports.getCodeForKeyword = exports.setKeywordList = exports.DefaultMichelsonKeywords = void 0; | ||
function id(d) { return d[0]; } | ||
@@ -15,11 +28,14 @@ const TezosMessageUtil_1 = require("../TezosMessageUtil"); | ||
let _languageKeywords = [...exports.DefaultMichelsonKeywords]; | ||
exports.setKeywordList = list => { | ||
const setKeywordList = list => { | ||
_languageKeywords = list; | ||
}; | ||
exports.getCodeForKeyword = word => { | ||
exports.setKeywordList = setKeywordList; | ||
const getCodeForKeyword = word => { | ||
return _languageKeywords.indexOf(word); | ||
}; | ||
exports.getKeywordForCode = code => { | ||
exports.getCodeForKeyword = getCodeForKeyword; | ||
const getKeywordForCode = code => { | ||
return _languageKeywords[code]; | ||
}; | ||
exports.getKeywordForCode = getKeywordForCode; | ||
const lexer = moo.compile({ | ||
@@ -120,3 +136,3 @@ lbrace: '{', | ||
const encodePrimitive = p => { | ||
return ('00' + exports.getCodeForKeyword(p).toString(16)).slice(-2); | ||
return ('00' + (0, exports.getCodeForKeyword)(p).toString(16)).slice(-2); | ||
}; | ||
@@ -123,0 +139,0 @@ const encodeLength = l => { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +30,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosContractIntrospector = void 0; | ||
const TezosConseilClient_1 = require("../../reporting/tezos/TezosConseilClient"); | ||
@@ -21,0 +34,0 @@ const TezosLanguageUtil_1 = require("./TezosLanguageUtil"); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosLanguageUtil = void 0; | ||
const Micheline = __importStar(require("./lexer/Micheline")); | ||
@@ -11,0 +24,0 @@ const Michelson = __importStar(require("./lexer/Michelson")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosMessageCodec = void 0; | ||
const TezosMessageUtil_1 = require("./TezosMessageUtil"); | ||
@@ -4,0 +5,0 @@ const TezosLanguageUtil_1 = require("./TezosLanguageUtil"); |
@@ -29,3 +29,3 @@ /// <reference types="node" /> | ||
function writeSignatureWithHint(sig: string, hint: string | SignerCurve): Buffer; | ||
function readBufferWithHint(b: Buffer | Uint8Array, hint: string): string; | ||
function readBufferWithHint(b: Buffer | Uint8Array, hint?: string): string; | ||
function writeBufferWithHint(b: string, hint?: string): Buffer; | ||
@@ -32,0 +32,0 @@ function computeOperationHash(signedOpGroup: SignedOperationGroup): string; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosMessageUtils = void 0; | ||
const bs58check_1 = __importDefault(require("bs58check")); | ||
@@ -40,3 +53,3 @@ const big_integer_1 = __importDefault(require("big-integer")); | ||
} | ||
let n = big_integer_1.default(value).abs(); | ||
let n = (0, big_integer_1.default)(value).abs(); | ||
const l = n.bitLength().toJSNumber(); | ||
@@ -83,3 +96,3 @@ let arr = []; | ||
else { | ||
n = n.or(big_integer_1.default(arr[i]).shiftLeft(7 * i - 1)); | ||
n = n.or((0, big_integer_1.default)(arr[i]).shiftLeft(7 * i - 1)); | ||
} | ||
@@ -290,3 +303,3 @@ } | ||
TezosMessageUtils.writeSignatureWithHint = writeSignatureWithHint; | ||
function readBufferWithHint(b, hint) { | ||
function readBufferWithHint(b, hint = '') { | ||
const buffer = !(b instanceof Buffer) ? Buffer.from(b) : b; | ||
@@ -422,3 +435,3 @@ if (hint === 'op') { | ||
if (n > 2147483648) { | ||
let r = big_integer_1.default(n); | ||
let r = (0, big_integer_1.default)(n); | ||
while (r.greater(0)) { | ||
@@ -449,5 +462,5 @@ h = ('0' + (r.and(127)).toString(16)).slice(-2) + h; | ||
} | ||
let n = big_integer_1.default(parseInt(s.slice(-2), 16)); | ||
let n = (0, big_integer_1.default)(parseInt(s.slice(-2), 16)); | ||
for (let i = 1; i < s.length / 2; i++) { | ||
n = n.add(big_integer_1.default(parseInt(s.slice(-2 * i - 2, -2 * i), 16)).shiftLeft(7 * i)); | ||
n = n.add((0, big_integer_1.default)(parseInt(s.slice(-2 * i - 2, -2 * i), 16)).shiftLeft(7 * i)); | ||
} | ||
@@ -454,0 +467,0 @@ return n.toJSNumber(); |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosNodeReader = void 0; | ||
const jsonpath_plus_1 = require("jsonpath-plus"); | ||
@@ -121,3 +122,3 @@ const TezosErrorTypes_1 = require("../../types/tezos/TezosErrorTypes"); | ||
const mempoolContent = yield performGetRequest(server, `chains/${chainid}/mempool/pending_operations`).catch(() => undefined); | ||
const jsonresult = jsonpath_plus_1.JSONPath({ path: `$.applied[?(@.hash=='${operationGroupId}')]`, json: mempoolContent }); | ||
const jsonresult = (0, jsonpath_plus_1.JSONPath)({ path: `$.applied[?(@.hash=='${operationGroupId}')]`, json: mempoolContent }); | ||
return jsonresult[0]; | ||
@@ -124,0 +125,0 @@ }); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,9 +30,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -23,2 +35,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosNodeWriter = void 0; | ||
const blakejs = __importStar(require("blakejs")); | ||
@@ -25,0 +38,0 @@ const TezosTypes = __importStar(require("../../types/tezos/TezosChainTypes")); |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosOperationQueue = void 0; | ||
const TezosConstants_1 = require("../../types/tezos/TezosConstants"); | ||
@@ -17,0 +18,0 @@ const TezosNodeReader_1 = require("./TezosNodeReader"); |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -13,32 +20,34 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
LoggerSelector_1.default.setLogger(console); | ||
__export(require("./chain/tezos/TezosContractIntrospector")); | ||
__export(require("./chain/tezos/TezosLanguageUtil")); | ||
__export(require("./chain/tezos/TezosMessageCodec")); | ||
__export(require("./chain/tezos/TezosMessageUtil")); | ||
__export(require("./chain/tezos/TezosNodeReader")); | ||
__export(require("./chain/tezos/TezosNodeWriter")); | ||
__export(require("./chain/tezos/contracts/TezosContractUtils")); | ||
__export(require("./chain/tezos/contracts/BabylonDelegationHelper")); | ||
__export(require("./chain/tezos/contracts/CryptonomicNameServiceHelper")); | ||
__export(require("./chain/tezos/contracts/DexterPoolHelper")); | ||
__export(require("./chain/tezos/contracts/HicNFT")); | ||
__export(require("./chain/tezos/contracts/KolibriTokenHelper")); | ||
__export(require("./chain/tezos/contracts/MurbardMultisigHelper")); | ||
__export(require("./chain/tezos/contracts/TCFBakerRegistryHelper")); | ||
__export(require("./chain/tezos/contracts/Tzip7ReferenceTokenHelper")); | ||
__export(require("./chain/tezos/contracts/tzip12/ChainlinkTokenHelper")); | ||
__export(require("./chain/tezos/contracts/tzip12/MultiAssetTokenHelper")); | ||
__export(require("./chain/tezos/contracts/tzip12/SingleAssetTokenHelper")); | ||
__export(require("./chain/tezos/contracts/TzbtcTokenHelper")); | ||
__export(require("./chain/tezos/contracts/WrappedTezosHelper")); | ||
__export(require("./reporting/tezos/TezosConseilClient")); | ||
__export(require("./reporting/ConseilDataClient")); | ||
__export(require("./reporting/ConseilMetadataClient")); | ||
__export(require("./reporting/ConseilQueryBuilder")); | ||
__export(require("./types/conseil/MetadataTypes")); | ||
__export(require("./types/conseil/QueryTypes")); | ||
__export(require("./types/tezos/TezosConstants")); | ||
__export(require("./types/tezos/TezosChainTypes")); | ||
__export(require("./types/tezos/TezosP2PMessageTypes")); | ||
__export(require("./types/ExternalInterfaces")); | ||
__exportStar(require("./chain/tezos/TezosContractIntrospector"), exports); | ||
__exportStar(require("./chain/tezos/TezosLanguageUtil"), exports); | ||
__exportStar(require("./chain/tezos/TezosMessageCodec"), exports); | ||
__exportStar(require("./chain/tezos/TezosMessageUtil"), exports); | ||
__exportStar(require("./chain/tezos/TezosNodeReader"), exports); | ||
__exportStar(require("./chain/tezos/TezosNodeWriter"), exports); | ||
__exportStar(require("./chain/tezos/contracts/TezosContractUtils"), exports); | ||
__exportStar(require("./chain/tezos/contracts/BabylonDelegationHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/CryptonomicNameServiceHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/DexterPoolHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/HicNFT"), exports); | ||
__exportStar(require("./chain/tezos/contracts/KolibriTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/MurbardMultisigHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/TCFBakerRegistryHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/Tzip7ReferenceTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/tzip12/ChainlinkTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/tzip12/MultiAssetTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/tzip12/SingleAssetTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/TzbtcTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/WrappedTezosHelper"), exports); | ||
__exportStar(require("./reporting/tezos/TezosConseilClient"), exports); | ||
__exportStar(require("./reporting/ConseilDataClient"), exports); | ||
__exportStar(require("./reporting/ConseilMetadataClient"), exports); | ||
__exportStar(require("./reporting/ConseilQueryBuilder"), exports); | ||
__exportStar(require("./types/conseil/MetadataTypes"), exports); | ||
__exportStar(require("./types/conseil/QueryTypes"), exports); | ||
__exportStar(require("./types/tezos/TezosConstants"), exports); | ||
__exportStar(require("./types/tezos/ContractIntrospectionTypes"), exports); | ||
__exportStar(require("./types/tezos/TezosChainTypes"), exports); | ||
__exportStar(require("./types/tezos/TezosP2PMessageTypes"), exports); | ||
__exportStar(require("./types/tezos/TezosRPCResponseTypes"), exports); | ||
__exportStar(require("./types/ExternalInterfaces"), exports); | ||
//# sourceMappingURL=index-web.js.map |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -9,2 +16,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.registerFetch = exports.registerLogger = void 0; | ||
const FetchSelector_1 = __importDefault(require("./utils/FetchSelector")); | ||
@@ -20,33 +28,35 @@ const LoggerSelector_1 = __importDefault(require("./utils/LoggerSelector")); | ||
exports.registerFetch = registerFetch; | ||
__export(require("./chain/tezos/TezosContractIntrospector")); | ||
__export(require("./chain/tezos/TezosLanguageUtil")); | ||
__export(require("./chain/tezos/TezosMessageCodec")); | ||
__export(require("./chain/tezos/TezosMessageUtil")); | ||
__export(require("./chain/tezos/TezosNodeReader")); | ||
__export(require("./chain/tezos/TezosNodeWriter")); | ||
__export(require("./chain/tezos/contracts/TezosContractUtils")); | ||
__export(require("./chain/tezos/contracts/BabylonDelegationHelper")); | ||
__export(require("./chain/tezos/contracts/CryptonomicNameServiceHelper")); | ||
__export(require("./chain/tezos/contracts/DexterPoolHelper")); | ||
__export(require("./chain/tezos/contracts/HicNFT")); | ||
__export(require("./chain/tezos/contracts/Kalamint")); | ||
__export(require("./chain/tezos/contracts/KolibriTokenHelper")); | ||
__export(require("./chain/tezos/contracts/MurbardMultisigHelper")); | ||
__export(require("./chain/tezos/contracts/TCFBakerRegistryHelper")); | ||
__export(require("./chain/tezos/contracts/Tzip7ReferenceTokenHelper")); | ||
__export(require("./chain/tezos/contracts/tzip12/ChainlinkTokenHelper")); | ||
__export(require("./chain/tezos/contracts/tzip12/MultiAssetTokenHelper")); | ||
__export(require("./chain/tezos/contracts/tzip12/SingleAssetTokenHelper")); | ||
__export(require("./chain/tezos/contracts/TzbtcTokenHelper")); | ||
__export(require("./chain/tezos/contracts/WrappedTezosHelper")); | ||
__export(require("./reporting/tezos/TezosConseilClient")); | ||
__export(require("./reporting/ConseilDataClient")); | ||
__export(require("./reporting/ConseilMetadataClient")); | ||
__export(require("./reporting/ConseilQueryBuilder")); | ||
__export(require("./types/conseil/MetadataTypes")); | ||
__export(require("./types/conseil/QueryTypes")); | ||
__export(require("./types/tezos/TezosConstants")); | ||
__export(require("./types/tezos/TezosChainTypes")); | ||
__export(require("./types/tezos/TezosP2PMessageTypes")); | ||
__export(require("./types/ExternalInterfaces")); | ||
__exportStar(require("./chain/tezos/TezosContractIntrospector"), exports); | ||
__exportStar(require("./chain/tezos/TezosLanguageUtil"), exports); | ||
__exportStar(require("./chain/tezos/TezosMessageCodec"), exports); | ||
__exportStar(require("./chain/tezos/TezosMessageUtil"), exports); | ||
__exportStar(require("./chain/tezos/TezosNodeReader"), exports); | ||
__exportStar(require("./chain/tezos/TezosNodeWriter"), exports); | ||
__exportStar(require("./chain/tezos/contracts/TezosContractUtils"), exports); | ||
__exportStar(require("./chain/tezos/contracts/BabylonDelegationHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/CryptonomicNameServiceHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/DexterPoolHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/HicNFT"), exports); | ||
__exportStar(require("./chain/tezos/contracts/Kalamint"), exports); | ||
__exportStar(require("./chain/tezos/contracts/KolibriTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/MurbardMultisigHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/TCFBakerRegistryHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/Tzip7ReferenceTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/tzip12/ChainlinkTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/tzip12/MultiAssetTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/tzip12/SingleAssetTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/TzbtcTokenHelper"), exports); | ||
__exportStar(require("./chain/tezos/contracts/WrappedTezosHelper"), exports); | ||
__exportStar(require("./reporting/tezos/TezosConseilClient"), exports); | ||
__exportStar(require("./reporting/ConseilDataClient"), exports); | ||
__exportStar(require("./reporting/ConseilMetadataClient"), exports); | ||
__exportStar(require("./reporting/ConseilQueryBuilder"), exports); | ||
__exportStar(require("./types/conseil/MetadataTypes"), exports); | ||
__exportStar(require("./types/conseil/QueryTypes"), exports); | ||
__exportStar(require("./types/tezos/TezosConstants"), exports); | ||
__exportStar(require("./types/tezos/ContractIntrospectionTypes"), exports); | ||
__exportStar(require("./types/tezos/TezosChainTypes"), exports); | ||
__exportStar(require("./types/tezos/TezosP2PMessageTypes"), exports); | ||
__exportStar(require("./types/tezos/TezosRPCResponseTypes"), exports); | ||
__exportStar(require("./types/ExternalInterfaces"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConseilDataClient = void 0; | ||
const ConseilErrorTypes_1 = require("../types/conseil/ConseilErrorTypes"); | ||
@@ -17,0 +18,0 @@ const FetchSelector_1 = __importDefault(require("../utils/FetchSelector")); |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConseilMetadataClient = void 0; | ||
const ConseilErrorTypes_1 = require("../types/conseil/ConseilErrorTypes"); | ||
@@ -17,0 +18,0 @@ const FetchSelector_1 = __importDefault(require("../utils/FetchSelector")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConseilQueryBuilder = void 0; | ||
const QueryTypes_1 = require("../types/conseil/QueryTypes"); | ||
@@ -4,0 +5,0 @@ var ConseilQueryBuilder; |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosConseilClient = void 0; | ||
const QueryTypes_1 = require("../../types/conseil/QueryTypes"); | ||
@@ -17,0 +18,0 @@ const LoggerSelector_1 = __importDefault(require("../../utils/LoggerSelector")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConseilResponseError = exports.ConseilRequestError = void 0; | ||
const ErrorTypes_1 = require("../ErrorTypes"); | ||
@@ -4,0 +5,0 @@ class ConseilRequestError extends ErrorTypes_1.ServiceRequestError { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AttrbuteKeyType = exports.AttrbuteDataType = void 0; | ||
var AttrbuteDataType; | ||
@@ -4,0 +5,0 @@ (function (AttrbuteDataType) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConseilOutput = exports.ConseilFunction = exports.ConseilOperator = exports.ConseilSortDirection = void 0; | ||
var ConseilSortDirection; | ||
@@ -4,0 +5,0 @@ (function (ConseilSortDirection) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ServiceResponseError = exports.ServiceRequestError = void 0; | ||
class ServiceRequestError extends Error { | ||
@@ -4,0 +5,0 @@ constructor(httpStatus, httpMessage, serverURL, request) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.KeyStoreCurve = exports.KeyStoreType = exports.SignerCurve = void 0; | ||
var SignerCurve; | ||
@@ -4,0 +5,0 @@ (function (SignerCurve) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosParameterFormat = exports.OperationKindType = void 0; | ||
var OperationKindType; | ||
@@ -4,0 +5,0 @@ (function (OperationKindType) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosConstants = void 0; | ||
var TezosConstants; | ||
@@ -4,0 +5,0 @@ (function (TezosConstants) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TezosResponseErrorKind = exports.TezosResponseError = exports.TezosRequestError = void 0; | ||
const ErrorTypes_1 = require("../ErrorTypes"); | ||
@@ -4,0 +5,0 @@ class TezosRequestError extends ErrorTypes_1.ServiceRequestError { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BallotVote = void 0; | ||
var BallotVote; | ||
@@ -4,0 +5,0 @@ (function (BallotVote) { |
{ | ||
"name": "conseiljs", | ||
"version": "5.0.9-3", | ||
"version": "5.0.9-4", | ||
"description": "Client-side library for Tezos dApp development.", | ||
@@ -70,3 +70,3 @@ "browser": "dist/index-web.js", | ||
"dependencies": { | ||
"big-integer": "1.6.50", | ||
"big-integer": "1.6.51", | ||
"bignumber.js": "9.0.1", | ||
@@ -103,5 +103,3 @@ "blakejs": "1.1.0", | ||
"tsconfig-paths-webpack-plugin": "3.3.0", | ||
"typedoc": "0.18.0", | ||
"typedoc-plugin-markdown": "2.4.2", | ||
"typescript": "3.8.3", | ||
"typescript": "4.4.4", | ||
"webpack": "4.44.2", | ||
@@ -108,0 +106,0 @@ "webpack-cli": "3.3.12" |
@@ -62,3 +62,3 @@ # ConseilJS-core | ||
<script src="https://cdn.jsdelivr.net/gh/cryptonomic/conseiljs/dist-web/conseiljs.min.js" | ||
integrity="sha384-bRH9Mt6UHYBnIDaoxe48FZvDI58yN1oktXpCpzrAqBVEf0hXtLfMusOdJcWFGYnq" | ||
integrity="sha384-e7cmTCJqOYCathLxlrdD5HV7q9H99xjqegb7UBxidKjw15ZhTze8syE8sgHJmVSt" | ||
crossorigin="anonymous"></script> | ||
@@ -65,0 +65,0 @@ <script src="https://cdn.jsdelivr.net/gh/cryptonomic/conseiljs-softsigner/dist-web/conseiljs-softsigner.min.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
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
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
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
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
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
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
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
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
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
887000
26
8661
+ Addedbig-integer@1.6.51(transitive)
- Removedbig-integer@1.6.50(transitive)
Updatedbig-integer@1.6.51