@ledgerhq/live-common 22.3.0-universal.0 → 23.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__tests__/test-helpers/setup.js +2 -0
- package/lib/__tests__/test-helpers/setup.js.map +1 -1
- package/lib/account/pending.d.ts +2 -1
- package/lib/account/pending.d.ts.map +1 -1
- package/lib/account/serialization.d.ts +3 -1
- package/lib/account/serialization.d.ts.map +1 -1
- package/lib/account/serialization.js +12 -3
- package/lib/account/serialization.js.map +1 -1
- package/lib/cross.d.ts.map +1 -1
- package/lib/cross.js +2 -1
- package/lib/cross.js.map +1 -1
- package/lib/derivation.d.ts +10 -1
- package/lib/derivation.d.ts.map +1 -1
- package/lib/derivation.js +28 -5
- package/lib/derivation.js.map +1 -1
- package/lib/env.d.ts +20 -5
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +16 -1
- package/lib/env.js.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/errors.d.ts +1 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -0
- package/lib/errors.js.map +1 -1
- package/lib/families/algorand/js-synchronization.d.ts +2 -2
- package/lib/families/bitcoin/exchange.d.ts +1 -1
- package/lib/families/bitcoin/js-synchronisation.d.ts +2 -2
- package/lib/families/cardano/api/api-types.d.ts +38 -0
- package/lib/families/cardano/api/api-types.d.ts.map +1 -0
- package/lib/families/cardano/api/api-types.js +3 -0
- package/lib/families/cardano/api/api-types.js.map +1 -0
- package/lib/families/cardano/api/getNetworkInfo.d.ts +4 -0
- package/lib/families/cardano/api/getNetworkInfo.d.ts.map +1 -0
- package/lib/families/cardano/api/getNetworkInfo.js +83 -0
- package/lib/families/cardano/api/getNetworkInfo.js.map +1 -0
- package/lib/families/cardano/api/getTransactions.d.ts +10 -0
- package/lib/families/cardano/api/getTransactions.d.ts.map +1 -0
- package/lib/families/cardano/api/getTransactions.js +257 -0
- package/lib/families/cardano/api/getTransactions.js.map +1 -0
- package/lib/families/cardano/api/submitTransaction.d.ts +7 -0
- package/lib/families/cardano/api/submitTransaction.d.ts.map +1 -0
- package/lib/families/cardano/api/submitTransaction.js +69 -0
- package/lib/families/cardano/api/submitTransaction.js.map +1 -0
- package/lib/families/cardano/bridge/js.d.ts +8 -0
- package/lib/families/cardano/bridge/js.d.ts.map +1 -0
- package/lib/families/cardano/bridge/js.js +69 -0
- package/lib/families/cardano/bridge/js.js.map +1 -0
- package/lib/families/cardano/bridge.test.d.ts +2 -0
- package/lib/families/cardano/bridge.test.d.ts.map +1 -0
- package/lib/families/cardano/bridge.test.js +11 -0
- package/lib/families/cardano/bridge.test.js.map +1 -0
- package/lib/families/cardano/buildSubAccounts.d.ts +25 -0
- package/lib/families/cardano/buildSubAccounts.d.ts.map +1 -0
- package/lib/families/cardano/buildSubAccounts.js +176 -0
- package/lib/families/cardano/buildSubAccounts.js.map +1 -0
- package/lib/families/cardano/cli-transaction.d.ts +19 -0
- package/lib/families/cardano/cli-transaction.d.ts.map +1 -0
- package/lib/families/cardano/cli-transaction.js +70 -0
- package/lib/families/cardano/cli-transaction.js.map +1 -0
- package/lib/families/cardano/constants.d.ts +8 -0
- package/lib/families/cardano/constants.d.ts.map +1 -0
- package/lib/families/cardano/constants.js +12 -0
- package/lib/families/cardano/constants.js.map +1 -0
- package/lib/families/cardano/datasets/rawAccount.1.d.ts +3 -0
- package/lib/families/cardano/datasets/rawAccount.1.d.ts.map +1 -0
- package/lib/families/cardano/datasets/rawAccount.1.js +27 -0
- package/lib/families/cardano/datasets/rawAccount.1.js.map +1 -0
- package/lib/families/cardano/datasets/scanAccounts.d.ts +5 -0
- package/lib/families/cardano/datasets/scanAccounts.d.ts.map +1 -0
- package/lib/families/cardano/datasets/scanAccounts.js +10 -0
- package/lib/families/cardano/datasets/scanAccounts.js.map +1 -0
- package/lib/families/cardano/errors.d.ts +7 -0
- package/lib/families/cardano/errors.d.ts.map +1 -0
- package/lib/families/cardano/errors.js +9 -0
- package/lib/families/cardano/errors.js.map +1 -0
- package/lib/families/cardano/hw-getAddress.d.ts +4 -0
- package/lib/families/cardano/hw-getAddress.d.ts.map +1 -0
- package/lib/families/cardano/hw-getAddress.js +126 -0
- package/lib/families/cardano/hw-getAddress.js.map +1 -0
- package/lib/families/cardano/js-broadcast.d.ts +8 -0
- package/lib/families/cardano/js-broadcast.d.ts.map +1 -0
- package/lib/families/cardano/js-broadcast.js +65 -0
- package/lib/families/cardano/js-broadcast.js.map +1 -0
- package/lib/families/cardano/js-buildTransaction.d.ts +12 -0
- package/lib/families/cardano/js-buildTransaction.d.ts.map +1 -0
- package/lib/families/cardano/js-buildTransaction.js +253 -0
- package/lib/families/cardano/js-buildTransaction.js.map +1 -0
- package/lib/families/cardano/js-estimateMaxSpendable.d.ts +15 -0
- package/lib/families/cardano/js-estimateMaxSpendable.d.ts.map +1 -0
- package/lib/families/cardano/js-estimateMaxSpendable.js +99 -0
- package/lib/families/cardano/js-estimateMaxSpendable.js.map +1 -0
- package/lib/families/cardano/js-getFeesForTransaction.d.ts +15 -0
- package/lib/families/cardano/js-getFeesForTransaction.d.ts.map +1 -0
- package/lib/families/cardano/js-getFeesForTransaction.js +61 -0
- package/lib/families/cardano/js-getFeesForTransaction.js.map +1 -0
- package/lib/families/cardano/js-getTransactionStatus.d.ts +5 -0
- package/lib/families/cardano/js-getTransactionStatus.d.ts.map +1 -0
- package/lib/families/cardano/js-getTransactionStatus.js +156 -0
- package/lib/families/cardano/js-getTransactionStatus.js.map +1 -0
- package/lib/families/cardano/js-signOperation.d.ts +13 -0
- package/lib/families/cardano/js-signOperation.d.ts.map +1 -0
- package/lib/families/cardano/js-signOperation.js +274 -0
- package/lib/families/cardano/js-signOperation.js.map +1 -0
- package/lib/families/cardano/js-synchronisation.d.ts +11 -0
- package/lib/families/cardano/js-synchronisation.d.ts.map +1 -0
- package/lib/families/cardano/js-synchronisation.js +247 -0
- package/lib/families/cardano/js-synchronisation.js.map +1 -0
- package/lib/families/cardano/js-transaction.d.ts +23 -0
- package/lib/families/cardano/js-transaction.d.ts.map +1 -0
- package/lib/families/cardano/js-transaction.js +112 -0
- package/lib/families/cardano/js-transaction.js.map +1 -0
- package/lib/families/cardano/logic.d.ts +92 -0
- package/lib/families/cardano/logic.d.ts.map +1 -0
- package/lib/families/cardano/logic.js +378 -0
- package/lib/families/cardano/logic.js.map +1 -0
- package/lib/families/cardano/networks.d.ts +3 -0
- package/lib/families/cardano/networks.d.ts.map +1 -0
- package/lib/families/cardano/networks.js +34 -0
- package/lib/families/cardano/networks.js.map +1 -0
- package/lib/families/cardano/postSyncPatch.d.ts +7 -0
- package/lib/families/cardano/postSyncPatch.d.ts.map +1 -0
- package/lib/families/cardano/postSyncPatch.js +37 -0
- package/lib/families/cardano/postSyncPatch.js.map +1 -0
- package/lib/families/cardano/serialization.d.ts +4 -0
- package/lib/families/cardano/serialization.d.ts.map +1 -0
- package/lib/families/cardano/serialization.js +121 -0
- package/lib/families/cardano/serialization.js.map +1 -0
- package/lib/families/cardano/specs.d.ts +7 -0
- package/lib/families/cardano/specs.d.ts.map +1 -0
- package/lib/families/cardano/specs.js +83 -0
- package/lib/families/cardano/specs.js.map +1 -0
- package/lib/families/cardano/speculos-deviceActions.d.ts +7 -0
- package/lib/families/cardano/speculos-deviceActions.d.ts.map +1 -0
- package/lib/families/cardano/speculos-deviceActions.js +69 -0
- package/lib/families/cardano/speculos-deviceActions.js.map +1 -0
- package/lib/families/cardano/test-dataset.d.ts +5 -0
- package/lib/families/cardano/test-dataset.d.ts.map +1 -0
- package/lib/families/cardano/test-dataset.js +42 -0
- package/lib/families/cardano/test-dataset.js.map +1 -0
- package/lib/families/cardano/transaction.d.ts +12 -0
- package/lib/families/cardano/transaction.d.ts.map +1 -0
- package/lib/families/cardano/transaction.js +47 -0
- package/lib/families/cardano/transaction.js.map +1 -0
- package/lib/families/cardano/types.d.ts +152 -0
- package/lib/families/cardano/types.d.ts.map +1 -0
- package/lib/families/cardano/types.js +18 -0
- package/lib/families/cardano/types.js.map +1 -0
- package/lib/families/celo/js-synchronisation.d.ts +2 -2
- package/lib/families/cosmos/js-synchronisation.d.ts +2 -2
- package/lib/families/crypto_org/js-synchronisation.d.ts +2 -2
- package/lib/families/elrond/js-synchronisation.d.ts +2 -2
- package/lib/families/ethereum/hw-signMessage.d.ts.map +1 -1
- package/lib/families/ethereum/hw-signMessage.js +10 -4
- package/lib/families/ethereum/hw-signMessage.js.map +1 -1
- package/lib/families/filecoin/bridge/account.js +18 -14
- package/lib/families/filecoin/bridge/account.js.map +1 -1
- package/lib/families/filecoin/bridge/utils/types.d.ts +1 -1
- package/lib/families/filecoin/bridge/utils/types.d.ts.map +1 -1
- package/lib/families/filecoin/bridge/utils/utils.d.ts +1 -1
- package/lib/families/filecoin/bridge/utils/utils.d.ts.map +1 -1
- package/lib/families/filecoin/bridge/utils/utils.js +9 -8
- package/lib/families/filecoin/bridge/utils/utils.js.map +1 -1
- package/lib/families/filecoin/bridge.test.d.ts +2 -0
- package/lib/families/filecoin/bridge.test.d.ts.map +1 -0
- package/lib/families/filecoin/bridge.test.js +92 -0
- package/lib/families/filecoin/bridge.test.js.map +1 -0
- package/lib/families/filecoin/specs.d.ts.map +1 -1
- package/lib/families/filecoin/specs.js +1 -2
- package/lib/families/filecoin/specs.js.map +1 -1
- package/lib/families/filecoin/test-dataset.d.ts.map +1 -1
- package/lib/families/filecoin/test-dataset.js +8 -9
- package/lib/families/filecoin/test-dataset.js.map +1 -1
- package/lib/families/hedera/js-synchronisation.d.ts +2 -2
- package/lib/families/polkadot/js-synchronisation.d.ts +2 -2
- package/lib/families/ripple/js-synchronization.d.ts +2 -2
- package/lib/families/stellar/js-synchronization.d.ts +2 -2
- package/lib/generated/bridge/js.d.ts +4 -0
- package/lib/generated/bridge/js.d.ts.map +1 -1
- package/lib/generated/bridge/js.js +30 -28
- package/lib/generated/bridge/js.js.map +1 -1
- package/lib/generated/cli-transaction.d.ts +15 -0
- package/lib/generated/cli-transaction.d.ts.map +1 -1
- package/lib/generated/cli-transaction.js +28 -26
- package/lib/generated/cli-transaction.js.map +1 -1
- package/lib/generated/exchange.d.ts +1 -1
- package/lib/generated/hw-getAddress.d.ts +1 -0
- package/lib/generated/hw-getAddress.d.ts.map +1 -1
- package/lib/generated/hw-getAddress.js +30 -28
- package/lib/generated/hw-getAddress.js.map +1 -1
- package/lib/generated/specs.d.ts +3 -0
- package/lib/generated/specs.d.ts.map +1 -1
- package/lib/generated/specs.js +28 -26
- package/lib/generated/specs.js.map +1 -1
- package/lib/generated/speculos-deviceActions.d.ts +3 -0
- package/lib/generated/speculos-deviceActions.d.ts.map +1 -1
- package/lib/generated/speculos-deviceActions.js +28 -26
- package/lib/generated/speculos-deviceActions.js.map +1 -1
- package/lib/generated/test-dataset.d.ts +1 -0
- package/lib/generated/test-dataset.d.ts.map +1 -1
- package/lib/generated/test-dataset.js +26 -24
- package/lib/generated/test-dataset.js.map +1 -1
- package/lib/generated/transaction.d.ts +5 -0
- package/lib/generated/transaction.d.ts.map +1 -1
- package/lib/generated/transaction.js +30 -28
- package/lib/generated/transaction.js.map +1 -1
- package/lib/generated/types.d.ts +4 -2
- package/lib/generated/types.d.ts.map +1 -1
- package/lib/reconciliation.d.ts.map +1 -1
- package/lib/reconciliation.js +6 -0
- package/lib/reconciliation.js.map +1 -1
- package/lib/types/account.d.ts +3 -0
- package/lib/types/account.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/__tests__/test-helpers/setup.ts +2 -0
- package/src/account/serialization.ts +15 -0
- package/src/cross.ts +2 -1
- package/src/derivation.ts +19 -2
- package/src/env.ts +16 -1
- package/src/errors.ts +1 -0
- package/src/families/cardano/__snapshots__/bridge.test.ts.snap +1667 -0
- package/src/families/cardano/api/api-types.ts +33 -0
- package/src/families/cardano/api/getNetworkInfo.ts +38 -0
- package/src/families/cardano/api/getTransactions.ts +240 -0
- package/src/families/cardano/api/submitTransaction.ts +27 -0
- package/src/families/cardano/bridge/js.ts +35 -0
- package/src/families/cardano/bridge.test.ts +6 -0
- package/src/families/cardano/buildSubAccounts.ts +182 -0
- package/src/families/cardano/cli-transaction.ts +78 -0
- package/src/families/cardano/constants.ts +12 -0
- package/src/families/cardano/datasets/rawAccount.1.ts +28 -0
- package/src/families/cardano/datasets/scanAccounts.ts +23 -0
- package/src/families/cardano/errors.ts +8 -0
- package/src/families/cardano/hw-getAddress.ts +61 -0
- package/src/families/cardano/js-broadcast.ts +25 -0
- package/src/families/cardano/js-buildTransaction.ts +293 -0
- package/src/families/cardano/js-estimateMaxSpendable.ts +60 -0
- package/src/families/cardano/js-getFeesForTransaction.ts +25 -0
- package/src/families/cardano/js-getTransactionStatus.ts +123 -0
- package/src/families/cardano/js-signOperation.ts +265 -0
- package/src/families/cardano/js-synchronisation.ts +255 -0
- package/src/families/cardano/js-transaction.ts +69 -0
- package/src/families/cardano/logic.ts +454 -0
- package/src/families/cardano/networks.ts +33 -0
- package/src/families/cardano/postSyncPatch.ts +45 -0
- package/src/families/cardano/serialization.ts +179 -0
- package/src/families/cardano/specs.ts +96 -0
- package/src/families/cardano/speculos-deviceActions.ts +66 -0
- package/src/families/cardano/test-dataset.ts +41 -0
- package/src/families/cardano/transaction.ts +55 -0
- package/src/families/cardano/types.ts +178 -0
- package/src/families/ethereum/hw-signMessage.ts +9 -5
- package/src/families/filecoin/__snapshots__/bridge.test.ts.snap +87 -0
- package/src/families/filecoin/bridge/account.ts +20 -20
- package/src/families/filecoin/bridge/utils/types.ts +1 -1
- package/src/families/filecoin/bridge/utils/utils.ts +8 -7
- package/src/families/filecoin/bridge.test.ts +39 -0
- package/src/families/filecoin/specs.ts +1 -2
- package/src/families/filecoin/test-dataset.ts +19 -15
- package/src/generated/bridge/js.ts +3 -0
- package/src/generated/cli-transaction.ts +3 -0
- package/src/generated/hw-getAddress.ts +3 -0
- package/src/generated/specs.ts +3 -0
- package/src/generated/speculos-deviceActions.ts +3 -0
- package/src/generated/test-dataset.ts +3 -0
- package/src/generated/transaction.ts +3 -0
- package/src/generated/types.ts +4 -0
- package/src/reconciliation.ts +10 -0
- package/src/types/account.ts +6 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
+
if (!m) return o;
|
|
41
|
+
var i = m.call(o), r, ar = [], e;
|
|
42
|
+
try {
|
|
43
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
+
}
|
|
45
|
+
catch (error) { e = { error: error }; }
|
|
46
|
+
finally {
|
|
47
|
+
try {
|
|
48
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
+
}
|
|
50
|
+
finally { if (e) throw e.error; }
|
|
51
|
+
}
|
|
52
|
+
return ar;
|
|
53
|
+
};
|
|
54
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
55
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
56
|
+
if (ar || !(i in from)) {
|
|
57
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
58
|
+
ar[i] = from[i];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
62
|
+
};
|
|
63
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
64
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
65
|
+
};
|
|
66
|
+
exports.__esModule = true;
|
|
67
|
+
exports.sync = exports.scanAccounts = exports.getAccountShape = void 0;
|
|
68
|
+
var jsHelpers_1 = require("../../bridge/jsHelpers");
|
|
69
|
+
var jsHelpers_2 = require("../../bridge/jsHelpers");
|
|
70
|
+
var account_1 = require("../../account");
|
|
71
|
+
var bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
72
|
+
var ledgerjs_hw_app_cardano_1 = __importDefault(require("@cardano-foundation/ledgerjs-hw-app-cardano"));
|
|
73
|
+
var utils_1 = require("@cardano-foundation/ledgerjs-hw-app-cardano/dist/utils");
|
|
74
|
+
var typhonjs_1 = require("@stricahq/typhonjs");
|
|
75
|
+
var logic_1 = require("./logic");
|
|
76
|
+
var operation_1 = require("../../operation");
|
|
77
|
+
var networks_1 = require("./networks");
|
|
78
|
+
var getNetworkInfo_1 = require("./api/getNetworkInfo");
|
|
79
|
+
var uniqBy_1 = __importDefault(require("lodash/uniqBy"));
|
|
80
|
+
var postSyncPatch_1 = __importDefault(require("./postSyncPatch"));
|
|
81
|
+
var getTransactions_1 = require("./api/getTransactions");
|
|
82
|
+
function mapTxToAccountOperation(tx, accountId, accountCredentialsMap, subAccounts) {
|
|
83
|
+
var accountChange = (0, logic_1.getAccountChange)(tx, accountCredentialsMap);
|
|
84
|
+
var mainOperationType = (0, logic_1.getOperationType)({
|
|
85
|
+
valueChange: accountChange.ada,
|
|
86
|
+
fees: new bignumber_js_1["default"](tx.fees)
|
|
87
|
+
});
|
|
88
|
+
var subOperations = (0, account_1.inferSubOperations)(tx.hash, subAccounts);
|
|
89
|
+
var memo = (0, logic_1.getMemoFromTx)(tx);
|
|
90
|
+
return {
|
|
91
|
+
accountId: accountId,
|
|
92
|
+
id: (0, operation_1.encodeOperationId)(accountId, tx.hash, mainOperationType),
|
|
93
|
+
hash: tx.hash,
|
|
94
|
+
type: mainOperationType,
|
|
95
|
+
fee: new bignumber_js_1["default"](tx.fees),
|
|
96
|
+
value: accountChange.ada.absoluteValue(),
|
|
97
|
+
senders: tx.inputs.map(function (i) {
|
|
98
|
+
return (0, logic_1.isHexString)(i.address)
|
|
99
|
+
? typhonjs_1.utils.getAddressFromHex(i.address).getBech32()
|
|
100
|
+
: i.address;
|
|
101
|
+
}),
|
|
102
|
+
recipients: tx.outputs.map(function (o) {
|
|
103
|
+
return (0, logic_1.isHexString)(o.address)
|
|
104
|
+
? typhonjs_1.utils.getAddressFromHex(o.address).getBech32()
|
|
105
|
+
: o.address;
|
|
106
|
+
}),
|
|
107
|
+
subOperations: subOperations,
|
|
108
|
+
blockHeight: tx.blockHeight,
|
|
109
|
+
date: new Date(tx.timestamp),
|
|
110
|
+
extra: {
|
|
111
|
+
memo: memo
|
|
112
|
+
},
|
|
113
|
+
blockHash: undefined
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function syncUtxos(newTransactions, stableUtxos, accountCredentialsMap) {
|
|
117
|
+
var newUtxos = [];
|
|
118
|
+
// spentUtxoKey = txId#index
|
|
119
|
+
var spentUtxoKeys = new Set();
|
|
120
|
+
newTransactions.forEach(function (t) {
|
|
121
|
+
t.inputs.forEach(function (i) {
|
|
122
|
+
var cred = accountCredentialsMap[i.paymentKey];
|
|
123
|
+
if (cred)
|
|
124
|
+
spentUtxoKeys.add("".concat(i.txId, "#").concat(i.index));
|
|
125
|
+
});
|
|
126
|
+
t.outputs.forEach(function (o, outputIndex) {
|
|
127
|
+
var cred = accountCredentialsMap[o.paymentKey];
|
|
128
|
+
if (cred) {
|
|
129
|
+
newUtxos.push({
|
|
130
|
+
hash: t.hash,
|
|
131
|
+
index: outputIndex,
|
|
132
|
+
address: o.address,
|
|
133
|
+
amount: new bignumber_js_1["default"](o.value),
|
|
134
|
+
tokens: o.tokens.map(function (token) { return ({
|
|
135
|
+
assetName: token.assetName,
|
|
136
|
+
policyId: token.policyId,
|
|
137
|
+
amount: new bignumber_js_1["default"](token.value)
|
|
138
|
+
}); }),
|
|
139
|
+
paymentCredential: {
|
|
140
|
+
key: o.paymentKey,
|
|
141
|
+
path: cred.path
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
var utxos = (0, uniqBy_1["default"])(__spreadArray(__spreadArray([], __read(stableUtxos), false), __read(newUtxos), false), function (u) { return "".concat(u.hash, "#").concat(u.index); }).filter(function (u) { return !spentUtxoKeys.has("".concat(u.hash, "#").concat(u.index)); });
|
|
148
|
+
return utxos;
|
|
149
|
+
}
|
|
150
|
+
var getAccountShape = function (info) { return __awaiter(void 0, void 0, void 0, function () {
|
|
151
|
+
var transport, currency, accountIndex, derivationPath, derivationMode, initialAccount, rootPath, accountPath, paramXpub, extendedPubKeyRes, ada, xpub, accountId, requiredConfirmations, syncFromBlockHeight, _a, newTransactions, blockHeight, externalCredentials, internalCredentials, accountCredentialsMap, stableOperationsByIds, stableUtxos, utxos, accountBalance, subAccounts, newOperations, operations, stakeCredential, networkParams, freshAddresses, cardanoNetworkInfo;
|
|
152
|
+
var _b;
|
|
153
|
+
return __generator(this, function (_c) {
|
|
154
|
+
switch (_c.label) {
|
|
155
|
+
case 0:
|
|
156
|
+
transport = info.transport, currency = info.currency, accountIndex = info.index, derivationPath = info.derivationPath, derivationMode = info.derivationMode, initialAccount = info.initialAccount;
|
|
157
|
+
rootPath = derivationPath.split("/", 2).join("/");
|
|
158
|
+
accountPath = "".concat(rootPath, "/").concat(accountIndex, "'");
|
|
159
|
+
paramXpub = initialAccount === null || initialAccount === void 0 ? void 0 : initialAccount.xpub;
|
|
160
|
+
if (!!paramXpub) return [3 /*break*/, 2];
|
|
161
|
+
if (!transport) {
|
|
162
|
+
// hwapp not provided
|
|
163
|
+
throw new Error("hwapp required to generate the xpub");
|
|
164
|
+
}
|
|
165
|
+
ada = new ledgerjs_hw_app_cardano_1["default"](transport);
|
|
166
|
+
return [4 /*yield*/, ada.getExtendedPublicKey({
|
|
167
|
+
path: (0, utils_1.str_to_path)(accountPath)
|
|
168
|
+
})];
|
|
169
|
+
case 1:
|
|
170
|
+
extendedPubKeyRes = _c.sent();
|
|
171
|
+
_c.label = 2;
|
|
172
|
+
case 2:
|
|
173
|
+
xpub = paramXpub ||
|
|
174
|
+
"".concat(extendedPubKeyRes.publicKeyHex).concat(extendedPubKeyRes.chainCodeHex);
|
|
175
|
+
accountId = (0, account_1.encodeAccountId)({
|
|
176
|
+
type: "js",
|
|
177
|
+
version: "2",
|
|
178
|
+
currencyId: currency.id,
|
|
179
|
+
xpubOrAddress: xpub,
|
|
180
|
+
derivationMode: derivationMode
|
|
181
|
+
});
|
|
182
|
+
requiredConfirmations = 90;
|
|
183
|
+
syncFromBlockHeight = (initialAccount === null || initialAccount === void 0 ? void 0 : initialAccount.blockHeight) &&
|
|
184
|
+
initialAccount.blockHeight > requiredConfirmations
|
|
185
|
+
? initialAccount.blockHeight - requiredConfirmations
|
|
186
|
+
: 0;
|
|
187
|
+
return [4 /*yield*/, (0, getTransactions_1.getTransactions)(xpub, accountIndex, initialAccount, syncFromBlockHeight, currency)];
|
|
188
|
+
case 3:
|
|
189
|
+
_a = _c.sent(), newTransactions = _a.transactions, blockHeight = _a.blockHeight, externalCredentials = _a.externalCredentials, internalCredentials = _a.internalCredentials;
|
|
190
|
+
accountCredentialsMap = __spreadArray(__spreadArray([], __read(externalCredentials), false), __read(internalCredentials), false).reduce(function (finalMap, cred) {
|
|
191
|
+
finalMap[cred.key] = cred;
|
|
192
|
+
return finalMap;
|
|
193
|
+
}, {});
|
|
194
|
+
stableOperationsByIds = {};
|
|
195
|
+
((initialAccount === null || initialAccount === void 0 ? void 0 : initialAccount.operations) || []).forEach(function (o) {
|
|
196
|
+
if (o.blockHeight < syncFromBlockHeight) {
|
|
197
|
+
stableOperationsByIds[o.hash] = o;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
stableUtxos = (((_b = initialAccount === null || initialAccount === void 0 ? void 0 : initialAccount.cardanoResources) === null || _b === void 0 ? void 0 : _b.utxos) || []).filter(function (u) { return stableOperationsByIds[u.hash]; });
|
|
201
|
+
utxos = syncUtxos(newTransactions, stableUtxos, accountCredentialsMap);
|
|
202
|
+
accountBalance = utxos.reduce(function (total, u) { return total.plus(u.amount); }, new bignumber_js_1["default"](0));
|
|
203
|
+
subAccounts = [];
|
|
204
|
+
newOperations = newTransactions.map(function (t) {
|
|
205
|
+
return mapTxToAccountOperation(t, accountId, accountCredentialsMap, subAccounts);
|
|
206
|
+
});
|
|
207
|
+
operations = (0, jsHelpers_1.mergeOps)(Object.values(stableOperationsByIds), newOperations);
|
|
208
|
+
stakeCredential = (0, logic_1.getAccountStakeCredential)(xpub, accountIndex);
|
|
209
|
+
networkParams = (0, networks_1.getNetworkParameters)(currency.id);
|
|
210
|
+
freshAddresses = externalCredentials
|
|
211
|
+
.filter(function (c) { return !c.isUsed; })
|
|
212
|
+
.map(function (c) { return ({
|
|
213
|
+
derivationPath: (0, logic_1.getBipPathString)(c.path),
|
|
214
|
+
address: (0, logic_1.getBaseAddress)({
|
|
215
|
+
networkId: networkParams.networkId,
|
|
216
|
+
paymentCred: c,
|
|
217
|
+
stakeCred: stakeCredential
|
|
218
|
+
}).getBech32()
|
|
219
|
+
}); });
|
|
220
|
+
return [4 /*yield*/, (0, getNetworkInfo_1.getNetworkInfo)(initialAccount, currency)];
|
|
221
|
+
case 4:
|
|
222
|
+
cardanoNetworkInfo = _c.sent();
|
|
223
|
+
return [2 /*return*/, {
|
|
224
|
+
id: accountId,
|
|
225
|
+
xpub: xpub,
|
|
226
|
+
balance: accountBalance,
|
|
227
|
+
spendableBalance: accountBalance,
|
|
228
|
+
operations: operations,
|
|
229
|
+
subAccounts: subAccounts,
|
|
230
|
+
freshAddresses: freshAddresses,
|
|
231
|
+
freshAddress: freshAddresses[0].address,
|
|
232
|
+
freshAddressPath: freshAddresses[0].derivationPath,
|
|
233
|
+
blockHeight: blockHeight,
|
|
234
|
+
cardanoResources: {
|
|
235
|
+
utxos: utxos,
|
|
236
|
+
externalCredentials: externalCredentials,
|
|
237
|
+
internalCredentials: internalCredentials,
|
|
238
|
+
protocolParams: cardanoNetworkInfo.protocolParams
|
|
239
|
+
}
|
|
240
|
+
}];
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}); };
|
|
244
|
+
exports.getAccountShape = getAccountShape;
|
|
245
|
+
exports.scanAccounts = (0, jsHelpers_1.makeScanAccounts)({ getAccountShape: exports.getAccountShape });
|
|
246
|
+
exports.sync = (0, jsHelpers_2.makeSync)({ getAccountShape: exports.getAccountShape, postSync: postSyncPatch_1["default"] });
|
|
247
|
+
//# sourceMappingURL=js-synchronisation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js-synchronisation.js","sourceRoot":"","sources":["../../../src/families/cardano/js-synchronisation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAIgC;AAChC,oDAAkD;AAClD,yCAAoE;AAEpE,8DAAqC;AACrC,wGAA8D;AAC9D,gFAAqF;AACrF,+CAA0D;AAG1D,iCAQiB;AACjB,6CAAoD;AACpD,uCAAkD;AAClD,uDAAsD;AACtD,yDAAmC;AACnC,kEAA4C;AAC5C,yDAAwD;AAExD,SAAS,uBAAuB,CAC9B,EAAkB,EAClB,SAAiB,EACjB,qBAAwD,EACxD,WAAgC;IAEhC,IAAM,aAAa,GAAG,IAAA,wBAAgB,EAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IAClE,IAAM,iBAAiB,GAAG,IAAA,wBAAgB,EAAC;QACzC,WAAW,EAAE,aAAa,CAAC,GAAG;QAC9B,IAAI,EAAE,IAAI,yBAAS,CAAC,EAAE,CAAC,IAAI,CAAC;KAC7B,CAAC,CAAC;IAEH,IAAM,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OV,CAAC,CAAC;gBACqB,qBAAM,IAAA,+BAAc,EAAC,cAAc,EAAE,QAAQ,CAAC,EAAA;;gBAAnE,kBAAkB,GAAG,SAA8C;gBAEzE,sBAAO;wBACL,EAAE,EAAE,SAAS;wBACb,IAAI,MAAA;wBACJ,OAAO,EAAE,cAAc;wBACvB,gBAAgB,EAAE,cAAc;wBAChC,UAAU,EAAE,UAAU;wBACtB,WAAW,aAAA;wBACX,cAAc,gBAAA;wBACd,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO;wBACvC,gBAAgB,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc;wBAClD,WAAW,aAAA;wBACX,gBAAgB,EAAE;4BAChB,KAAK,OAAA;4BACL,mBAAmB,qBAAA;4BACnB,mBAAmB,qBAAA;4BACnB,cAAc,EAAE,kBAAkB,CAAC,cAAc;yBAClD;qBACF,EAAC;;;KACH,CAAC;AApIW,QAAA,eAAe,mBAoI1B;AAEW,QAAA,YAAY,GAAG,IAAA,4BAAgB,EAAC,EAAE,eAAe,yBAAA,EAAE,CAAC,CAAC;AAErD,QAAA,IAAI,GAAG,IAAA,oBAAQ,EAAC,EAAE,eAAe,yBAAA,EAAE,QAAQ,EAAE,0BAAa,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Account } from "../../types";
|
|
2
|
+
import { Transaction } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Create an empty transaction
|
|
5
|
+
*
|
|
6
|
+
* @returns {Transaction}
|
|
7
|
+
*/
|
|
8
|
+
export declare const createTransaction: () => Transaction;
|
|
9
|
+
/**
|
|
10
|
+
* Apply patch to transaction
|
|
11
|
+
*
|
|
12
|
+
* @param {*} t
|
|
13
|
+
* @param {*} patch
|
|
14
|
+
*/
|
|
15
|
+
export declare const updateTransaction: (t: Transaction, patch: Partial<Transaction>) => Transaction;
|
|
16
|
+
/**
|
|
17
|
+
* Prepare transaction before checking status
|
|
18
|
+
*
|
|
19
|
+
* @param {Account} a
|
|
20
|
+
* @param {Transaction} t
|
|
21
|
+
*/
|
|
22
|
+
export declare const prepareTransaction: (a: Account, t: Transaction) => Promise<Transaction>;
|
|
23
|
+
//# sourceMappingURL=js-transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js-transaction.d.ts","sourceRoot":"","sources":["../../../src/families/cardano/js-transaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAQtC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAO,WAOnC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,MACzB,WAAW,SACP,QAAQ,WAAW,CAAC,KAC1B,WAAmC,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,MAC1B,OAAO,KACP,WAAW,KACb,QAAQ,WAAW,CAwBrB,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.__esModule = true;
|
|
50
|
+
exports.prepareTransaction = exports.updateTransaction = exports.createTransaction = void 0;
|
|
51
|
+
var bignumber_js_1 = require("bignumber.js");
|
|
52
|
+
var typhonjs_1 = require("@stricahq/typhonjs");
|
|
53
|
+
var js_buildTransaction_1 = require("./js-buildTransaction");
|
|
54
|
+
/**
|
|
55
|
+
* Create an empty transaction
|
|
56
|
+
*
|
|
57
|
+
* @returns {Transaction}
|
|
58
|
+
*/
|
|
59
|
+
var createTransaction = function () { return ({
|
|
60
|
+
family: "cardano",
|
|
61
|
+
mode: "send",
|
|
62
|
+
amount: new bignumber_js_1.BigNumber(0),
|
|
63
|
+
recipient: "",
|
|
64
|
+
useAllAmount: false,
|
|
65
|
+
fees: new bignumber_js_1.BigNumber(0)
|
|
66
|
+
}); };
|
|
67
|
+
exports.createTransaction = createTransaction;
|
|
68
|
+
/**
|
|
69
|
+
* Apply patch to transaction
|
|
70
|
+
*
|
|
71
|
+
* @param {*} t
|
|
72
|
+
* @param {*} patch
|
|
73
|
+
*/
|
|
74
|
+
var updateTransaction = function (t, patch) { return (__assign(__assign({}, t), patch)); };
|
|
75
|
+
exports.updateTransaction = updateTransaction;
|
|
76
|
+
/**
|
|
77
|
+
* Prepare transaction before checking status
|
|
78
|
+
*
|
|
79
|
+
* @param {Account} a
|
|
80
|
+
* @param {Transaction} t
|
|
81
|
+
*/
|
|
82
|
+
var prepareTransaction = function (a, t) { return __awaiter(void 0, void 0, void 0, function () {
|
|
83
|
+
var transaction, error_1, transactionFees, transactionAmount;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
_a.trys.push([0, 2, , 3]);
|
|
88
|
+
return [4 /*yield*/, (0, js_buildTransaction_1.buildTransaction)(a, t)];
|
|
89
|
+
case 1:
|
|
90
|
+
transaction = _a.sent();
|
|
91
|
+
return [3 /*break*/, 3];
|
|
92
|
+
case 2:
|
|
93
|
+
error_1 = _a.sent();
|
|
94
|
+
return [2 /*return*/, __assign(__assign({}, t), { fees: new bignumber_js_1.BigNumber(0), amount: new bignumber_js_1.BigNumber(0) })];
|
|
95
|
+
case 3:
|
|
96
|
+
transactionFees = transaction.getFee();
|
|
97
|
+
transactionAmount = t.subAccountId
|
|
98
|
+
? t.amount
|
|
99
|
+
: transaction
|
|
100
|
+
.getOutputs()
|
|
101
|
+
.filter(function (o) {
|
|
102
|
+
return !(o.address instanceof typhonjs_1.address.BaseAddress) ||
|
|
103
|
+
!(o.address.paymentCredential.type === typhonjs_1.types.HashType.ADDRESS) ||
|
|
104
|
+
o.address.paymentCredential.bipPath === undefined;
|
|
105
|
+
})
|
|
106
|
+
.reduce(function (total, o) { return total.plus(o.amount); }, new bignumber_js_1.BigNumber(0));
|
|
107
|
+
return [2 /*return*/, __assign(__assign({}, t), { fees: transactionFees, amount: transactionAmount })];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}); };
|
|
111
|
+
exports.prepareTransaction = prepareTransaction;
|
|
112
|
+
//# sourceMappingURL=js-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js-transaction.js","sourceRoot":"","sources":["../../../src/families/cardano/js-transaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC,+CAG4B;AAE5B,6DAAyD;AAEzD;;;;GAIG;AACI,IAAM,iBAAiB,GAAG,cAAmB,OAAA,CAAC;IACnD,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,IAAI,wBAAS,CAAC,CAAC,CAAC;IACxB,SAAS,EAAE,EAAE;IACb,Y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,CAAC,KAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,KAAG;;;KACnE,CAAC;AA3BW,QAAA,kBAAkB,sBA2B7B"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { types as TyphonTypes, address as TyphonAddress } from "@stricahq/typhonjs";
|
|
2
|
+
import { TxInput, TxOutput } from "@cardano-foundation/ledgerjs-hw-app-cardano";
|
|
3
|
+
import { BipPath, PaymentChain, PaymentCredential, StakeChain, StakeCredential, Token } from "./types";
|
|
4
|
+
import { Bip32PublicKey } from "@stricahq/bip32ed25519";
|
|
5
|
+
import BigNumber from "bignumber.js";
|
|
6
|
+
import { CryptoCurrency, OperationType } from "../../types";
|
|
7
|
+
import { APITransaction } from "./api/api-types";
|
|
8
|
+
/**
|
|
9
|
+
* returns BipPath object with account, chain and index field for cardano
|
|
10
|
+
*
|
|
11
|
+
* @param {string} path
|
|
12
|
+
*/
|
|
13
|
+
export declare function getBipPathFromString(path: string): BipPath;
|
|
14
|
+
/**
|
|
15
|
+
* returns complete bipPath with purpose, coin, account, chain and index for cardano
|
|
16
|
+
*/
|
|
17
|
+
export declare function getBipPath({ account, chain, index, }: {
|
|
18
|
+
account: number;
|
|
19
|
+
chain: PaymentChain | StakeChain;
|
|
20
|
+
index: number;
|
|
21
|
+
}): BipPath;
|
|
22
|
+
/**
|
|
23
|
+
* returns bipPathString from account, chain and index for cardano
|
|
24
|
+
*/
|
|
25
|
+
export declare function getBipPathString({ account, chain, index, }: {
|
|
26
|
+
account: number;
|
|
27
|
+
chain: number;
|
|
28
|
+
index: number;
|
|
29
|
+
}): string;
|
|
30
|
+
export declare function getExtendedPublicKeyFromHex(keyHex: string): Bip32PublicKey;
|
|
31
|
+
export declare function getCredentialKey(accountKey: Bip32PublicKey, path: BipPath): {
|
|
32
|
+
key: string;
|
|
33
|
+
path: BipPath;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* returns cardano base address by paymentKey and stakeKey
|
|
37
|
+
*/
|
|
38
|
+
export declare function getBaseAddress({ networkId, paymentCred, stakeCred, }: {
|
|
39
|
+
networkId: number;
|
|
40
|
+
paymentCred: PaymentCredential;
|
|
41
|
+
stakeCred: StakeCredential;
|
|
42
|
+
}): TyphonAddress.BaseAddress;
|
|
43
|
+
/**
|
|
44
|
+
* Returns true if address is a valid
|
|
45
|
+
*
|
|
46
|
+
* @param {string} address
|
|
47
|
+
*/
|
|
48
|
+
export declare const isValidAddress: (address: string, networkId: number) => boolean;
|
|
49
|
+
export declare const getAbsoluteSlot: (networkName: string, time: Date) => number;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the time to live for transaction
|
|
52
|
+
*
|
|
53
|
+
* @returns {number}
|
|
54
|
+
*/
|
|
55
|
+
export declare function getTTL(networkName: string): number;
|
|
56
|
+
export declare function getEpoch(networkName: string, time: Date): number;
|
|
57
|
+
export declare function mergeTokens(tokens: Array<TyphonTypes.Token>): Array<TyphonTypes.Token>;
|
|
58
|
+
/**
|
|
59
|
+
* @param { Array<TyphonTypes.Token> } b
|
|
60
|
+
* @param { Array<TyphonTypes.Token> } a
|
|
61
|
+
* @returns a - b
|
|
62
|
+
*/
|
|
63
|
+
export declare function getTokenDiff(a: Array<TyphonTypes.Token>, b: Array<TyphonTypes.Token>): Array<TyphonTypes.Token>;
|
|
64
|
+
/**
|
|
65
|
+
* returns the formatted transactionOutput for ledger cardano app
|
|
66
|
+
*
|
|
67
|
+
* @param output
|
|
68
|
+
* @param accountIndex
|
|
69
|
+
* @returns {TxOutput}
|
|
70
|
+
*/
|
|
71
|
+
export declare function prepareLedgerOutput(output: TyphonTypes.Output, accountIndex: number): TxOutput;
|
|
72
|
+
/**
|
|
73
|
+
* returns the formatted transactionInput for ledger cardano app
|
|
74
|
+
*
|
|
75
|
+
* @param {TyphonTypes.Input} input
|
|
76
|
+
* @param {number} accountIndex
|
|
77
|
+
* @returns {TxInput}
|
|
78
|
+
*/
|
|
79
|
+
export declare function prepareLedgerInput(input: TyphonTypes.Input, accountIndex: number): TxInput;
|
|
80
|
+
export declare function getAccountStakeCredential(xpub: string, index: number): StakeCredential;
|
|
81
|
+
export declare function getOperationType({ valueChange, fees, }: {
|
|
82
|
+
valueChange: BigNumber;
|
|
83
|
+
fees: BigNumber;
|
|
84
|
+
}): OperationType;
|
|
85
|
+
export declare function isTestnet(currency: CryptoCurrency): boolean;
|
|
86
|
+
export declare function getAccountChange(t: APITransaction, accountCredentialsMap: Record<string, PaymentCredential>): {
|
|
87
|
+
ada: BigNumber;
|
|
88
|
+
tokens: Array<Token>;
|
|
89
|
+
};
|
|
90
|
+
export declare function getMemoFromTx(tx: APITransaction): string | undefined;
|
|
91
|
+
export declare function isHexString(value: string): boolean;
|
|
92
|
+
//# sourceMappingURL=logic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../../../src/families/cardano/logic.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,IAAI,WAAW,EACpB,OAAO,IAAI,aAAa,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,OAAO,EACP,QAAQ,EAGT,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACL,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,KAAK,EACN,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAa1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,KAAK,GACN,EAAE;IACD,OAAO,EAAE,MAAM,CA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