@ledgerhq/coin-concordium 0.2.0-nightly.20251209140356
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/.env.integ.test.example +2 -0
- package/.eslintrc.js +37 -0
- package/.turbo/turbo-build.log +4 -0
- package/.unimportedrc.json +29 -0
- package/CHANGELOG.md +18 -0
- package/LICENSE.txt +21 -0
- package/jest.config.js +21 -0
- package/jest.integ.config.js +8 -0
- package/lib/api/index.d.ts +4 -0
- package/lib/api/index.d.ts.map +1 -0
- package/lib/api/index.js +56 -0
- package/lib/api/index.js.map +1 -0
- package/lib/bridge/broadcast.d.ts +4 -0
- package/lib/bridge/broadcast.d.ts.map +1 -0
- package/lib/bridge/broadcast.js +11 -0
- package/lib/bridge/broadcast.js.map +1 -0
- package/lib/bridge/createTransaction.d.ts +4 -0
- package/lib/bridge/createTransaction.d.ts.map +1 -0
- package/lib/bridge/createTransaction.js +19 -0
- package/lib/bridge/createTransaction.js.map +1 -0
- package/lib/bridge/deviceTransactionConfig.d.ts +11 -0
- package/lib/bridge/deviceTransactionConfig.d.ts.map +1 -0
- package/lib/bridge/deviceTransactionConfig.js +21 -0
- package/lib/bridge/deviceTransactionConfig.js.map +1 -0
- package/lib/bridge/estimateMaxSpendable.d.ts +4 -0
- package/lib/bridge/estimateMaxSpendable.d.ts.map +1 -0
- package/lib/bridge/estimateMaxSpendable.js +26 -0
- package/lib/bridge/estimateMaxSpendable.js.map +1 -0
- package/lib/bridge/getTransactionStatus.d.ts +4 -0
- package/lib/bridge/getTransactionStatus.d.ts.map +1 -0
- package/lib/bridge/getTransactionStatus.js +78 -0
- package/lib/bridge/getTransactionStatus.js.map +1 -0
- package/lib/bridge/index.d.ts +11 -0
- package/lib/bridge/index.d.ts.map +1 -0
- package/lib/bridge/index.js +54 -0
- package/lib/bridge/index.js.map +1 -0
- package/lib/bridge/prepareTransaction.d.ts +4 -0
- package/lib/bridge/prepareTransaction.d.ts.map +1 -0
- package/lib/bridge/prepareTransaction.js +20 -0
- package/lib/bridge/prepareTransaction.js.map +1 -0
- package/lib/bridge/signOperation.d.ts +5 -0
- package/lib/bridge/signOperation.d.ts.map +1 -0
- package/lib/bridge/signOperation.js +75 -0
- package/lib/bridge/signOperation.js.map +1 -0
- package/lib/bridge/sync.d.ts +3 -0
- package/lib/bridge/sync.d.ts.map +1 -0
- package/lib/bridge/sync.js +86 -0
- package/lib/bridge/sync.js.map +1 -0
- package/lib/bridge/transaction.d.ts +15 -0
- package/lib/bridge/transaction.d.ts.map +1 -0
- package/lib/bridge/transaction.js +50 -0
- package/lib/bridge/transaction.js.map +1 -0
- package/lib/bridge/updateTransaction.d.ts +4 -0
- package/lib/bridge/updateTransaction.d.ts.map +1 -0
- package/lib/bridge/updateTransaction.js +17 -0
- package/lib/bridge/updateTransaction.js.map +1 -0
- package/lib/common-logic/account/getBalance.d.ts +3 -0
- package/lib/common-logic/account/getBalance.d.ts.map +1 -0
- package/lib/common-logic/account/getBalance.js +10 -0
- package/lib/common-logic/account/getBalance.js.map +1 -0
- package/lib/common-logic/account/getNextSequence.d.ts +2 -0
- package/lib/common-logic/account/getNextSequence.d.ts.map +1 -0
- package/lib/common-logic/account/getNextSequence.js +9 -0
- package/lib/common-logic/account/getNextSequence.js.map +1 -0
- package/lib/common-logic/common.d.ts +3 -0
- package/lib/common-logic/common.d.ts.map +1 -0
- package/lib/common-logic/common.js +11 -0
- package/lib/common-logic/common.js.map +1 -0
- package/lib/common-logic/history/lastBlock.d.ts +3 -0
- package/lib/common-logic/history/lastBlock.d.ts.map +1 -0
- package/lib/common-logic/history/lastBlock.js +13 -0
- package/lib/common-logic/history/lastBlock.js.map +1 -0
- package/lib/common-logic/history/listOperations.d.ts +11 -0
- package/lib/common-logic/history/listOperations.d.ts.map +1 -0
- package/lib/common-logic/history/listOperations.js +53 -0
- package/lib/common-logic/history/listOperations.js.map +1 -0
- package/lib/common-logic/index.d.ts +11 -0
- package/lib/common-logic/index.d.ts.map +1 -0
- package/lib/common-logic/index.js +24 -0
- package/lib/common-logic/index.js.map +1 -0
- package/lib/common-logic/transaction/broadcast.d.ts +2 -0
- package/lib/common-logic/transaction/broadcast.d.ts.map +1 -0
- package/lib/common-logic/transaction/broadcast.js +9 -0
- package/lib/common-logic/transaction/broadcast.js.map +1 -0
- package/lib/common-logic/transaction/combine.d.ts +2 -0
- package/lib/common-logic/transaction/combine.d.ts.map +1 -0
- package/lib/common-logic/transaction/combine.js +9 -0
- package/lib/common-logic/transaction/combine.js.map +1 -0
- package/lib/common-logic/transaction/craftTransaction.d.ts +15 -0
- package/lib/common-logic/transaction/craftTransaction.d.ts.map +1 -0
- package/lib/common-logic/transaction/craftTransaction.js +20 -0
- package/lib/common-logic/transaction/craftTransaction.js.map +1 -0
- package/lib/common-logic/transaction/estimateFees.d.ts +2 -0
- package/lib/common-logic/transaction/estimateFees.d.ts.map +1 -0
- package/lib/common-logic/transaction/estimateFees.js +21 -0
- package/lib/common-logic/transaction/estimateFees.js.map +1 -0
- package/lib/common-logic/utils.d.ts +6 -0
- package/lib/common-logic/utils.d.ts.map +1 -0
- package/lib/common-logic/utils.js +22 -0
- package/lib/common-logic/utils.js.map +1 -0
- package/lib/config.d.ts +12 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +9 -0
- package/lib/config.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +21 -0
- package/lib/index.js.map +1 -0
- package/lib/network/indexer.d.ts +6 -0
- package/lib/network/indexer.d.ts.map +1 -0
- package/lib/network/indexer.js +19 -0
- package/lib/network/indexer.js.map +1 -0
- package/lib/network/mock-network.d.ts +5 -0
- package/lib/network/mock-network.d.ts.map +1 -0
- package/lib/network/mock-network.js +29 -0
- package/lib/network/mock-network.js.map +1 -0
- package/lib/network/node.d.ts +12 -0
- package/lib/network/node.d.ts.map +1 -0
- package/lib/network/node.js +92 -0
- package/lib/network/node.js.map +1 -0
- package/lib/network/types.d.ts +47 -0
- package/lib/network/types.d.ts.map +1 -0
- package/lib/network/types.js +7 -0
- package/lib/network/types.js.map +1 -0
- package/lib/signer/getAddress.d.ts +6 -0
- package/lib/signer/getAddress.d.ts.map +1 -0
- package/lib/signer/getAddress.js +14 -0
- package/lib/signer/getAddress.js.map +1 -0
- package/lib/signer/index.d.ts +6 -0
- package/lib/signer/index.d.ts.map +1 -0
- package/lib/signer/index.js +11 -0
- package/lib/signer/index.js.map +1 -0
- package/lib/test/bot-deviceActions.d.ts +4 -0
- package/lib/test/bot-deviceActions.d.ts.map +1 -0
- package/lib/test/bot-deviceActions.js +44 -0
- package/lib/test/bot-deviceActions.js.map +1 -0
- package/lib/test/bot-specs.d.ts +2 -0
- package/lib/test/bot-specs.d.ts.map +1 -0
- package/lib/test/bot-specs.js +79 -0
- package/lib/test/bot-specs.js.map +1 -0
- package/lib/test/bridgeDatasetTest.d.ts +5 -0
- package/lib/test/bridgeDatasetTest.d.ts.map +1 -0
- package/lib/test/bridgeDatasetTest.js +148 -0
- package/lib/test/bridgeDatasetTest.js.map +1 -0
- package/lib/test/cli.d.ts +26 -0
- package/lib/test/cli.d.ts.map +1 -0
- package/lib/test/cli.js +36 -0
- package/lib/test/cli.js.map +1 -0
- package/lib/test/index.d.ts +5 -0
- package/lib/test/index.d.ts.map +1 -0
- package/lib/test/index.js +26 -0
- package/lib/test/index.js.map +1 -0
- package/lib/types/assets.d.ts +3 -0
- package/lib/types/assets.d.ts.map +1 -0
- package/lib/types/assets.js +3 -0
- package/lib/types/assets.js.map +1 -0
- package/lib/types/bridge.d.ts +23 -0
- package/lib/types/bridge.d.ts.map +1 -0
- package/lib/types/bridge.js +3 -0
- package/lib/types/bridge.js.map +1 -0
- package/lib/types/errors.d.ts +4 -0
- package/lib/types/errors.d.ts.map +1 -0
- package/lib/types/errors.js +6 -0
- package/lib/types/errors.js.map +1 -0
- package/lib/types/index.d.ts +13 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +19 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/signer.d.ts +10 -0
- package/lib/types/signer.d.ts.map +1 -0
- package/lib/types/signer.js +3 -0
- package/lib/types/signer.js.map +1 -0
- package/lib-es/api/index.d.ts +4 -0
- package/lib-es/api/index.d.ts.map +1 -0
- package/lib-es/api/index.js +50 -0
- package/lib-es/api/index.js.map +1 -0
- package/lib-es/bridge/broadcast.d.ts +4 -0
- package/lib-es/bridge/broadcast.d.ts.map +1 -0
- package/lib-es/bridge/broadcast.js +7 -0
- package/lib-es/bridge/broadcast.js.map +1 -0
- package/lib-es/bridge/createTransaction.d.ts +4 -0
- package/lib-es/bridge/createTransaction.d.ts.map +1 -0
- package/lib-es/bridge/createTransaction.js +12 -0
- package/lib-es/bridge/createTransaction.js.map +1 -0
- package/lib-es/bridge/deviceTransactionConfig.d.ts +11 -0
- package/lib-es/bridge/deviceTransactionConfig.d.ts.map +1 -0
- package/lib-es/bridge/deviceTransactionConfig.js +19 -0
- package/lib-es/bridge/deviceTransactionConfig.js.map +1 -0
- package/lib-es/bridge/estimateMaxSpendable.d.ts +4 -0
- package/lib-es/bridge/estimateMaxSpendable.d.ts.map +1 -0
- package/lib-es/bridge/estimateMaxSpendable.js +19 -0
- package/lib-es/bridge/estimateMaxSpendable.js.map +1 -0
- package/lib-es/bridge/getTransactionStatus.d.ts +4 -0
- package/lib-es/bridge/getTransactionStatus.d.ts.map +1 -0
- package/lib-es/bridge/getTransactionStatus.js +71 -0
- package/lib-es/bridge/getTransactionStatus.js.map +1 -0
- package/lib-es/bridge/index.d.ts +11 -0
- package/lib-es/bridge/index.d.ts.map +1 -0
- package/lib-es/bridge/index.js +48 -0
- package/lib-es/bridge/index.js.map +1 -0
- package/lib-es/bridge/prepareTransaction.d.ts +4 -0
- package/lib-es/bridge/prepareTransaction.d.ts.map +1 -0
- package/lib-es/bridge/prepareTransaction.js +13 -0
- package/lib-es/bridge/prepareTransaction.js.map +1 -0
- package/lib-es/bridge/signOperation.d.ts +5 -0
- package/lib-es/bridge/signOperation.d.ts.map +1 -0
- package/lib-es/bridge/signOperation.js +68 -0
- package/lib-es/bridge/signOperation.js.map +1 -0
- package/lib-es/bridge/sync.d.ts +3 -0
- package/lib-es/bridge/sync.d.ts.map +1 -0
- package/lib-es/bridge/sync.js +79 -0
- package/lib-es/bridge/sync.js.map +1 -0
- package/lib-es/bridge/transaction.d.ts +15 -0
- package/lib-es/bridge/transaction.d.ts.map +1 -0
- package/lib-es/bridge/transaction.js +44 -0
- package/lib-es/bridge/transaction.js.map +1 -0
- package/lib-es/bridge/updateTransaction.d.ts +4 -0
- package/lib-es/bridge/updateTransaction.d.ts.map +1 -0
- package/lib-es/bridge/updateTransaction.js +13 -0
- package/lib-es/bridge/updateTransaction.js.map +1 -0
- package/lib-es/common-logic/account/getBalance.d.ts +3 -0
- package/lib-es/common-logic/account/getBalance.d.ts.map +1 -0
- package/lib-es/common-logic/account/getBalance.js +7 -0
- package/lib-es/common-logic/account/getBalance.js.map +1 -0
- package/lib-es/common-logic/account/getNextSequence.d.ts +2 -0
- package/lib-es/common-logic/account/getNextSequence.d.ts.map +1 -0
- package/lib-es/common-logic/account/getNextSequence.js +6 -0
- package/lib-es/common-logic/account/getNextSequence.js.map +1 -0
- package/lib-es/common-logic/common.d.ts +3 -0
- package/lib-es/common-logic/common.d.ts.map +1 -0
- package/lib-es/common-logic/common.js +7 -0
- package/lib-es/common-logic/common.js.map +1 -0
- package/lib-es/common-logic/history/lastBlock.d.ts +3 -0
- package/lib-es/common-logic/history/lastBlock.d.ts.map +1 -0
- package/lib-es/common-logic/history/lastBlock.js +10 -0
- package/lib-es/common-logic/history/lastBlock.js.map +1 -0
- package/lib-es/common-logic/history/listOperations.d.ts +11 -0
- package/lib-es/common-logic/history/listOperations.d.ts.map +1 -0
- package/lib-es/common-logic/history/listOperations.js +50 -0
- package/lib-es/common-logic/history/listOperations.js.map +1 -0
- package/lib-es/common-logic/index.d.ts +11 -0
- package/lib-es/common-logic/index.d.ts.map +1 -0
- package/lib-es/common-logic/index.js +11 -0
- package/lib-es/common-logic/index.js.map +1 -0
- package/lib-es/common-logic/transaction/broadcast.d.ts +2 -0
- package/lib-es/common-logic/transaction/broadcast.d.ts.map +1 -0
- package/lib-es/common-logic/transaction/broadcast.js +6 -0
- package/lib-es/common-logic/transaction/broadcast.js.map +1 -0
- package/lib-es/common-logic/transaction/combine.d.ts +2 -0
- package/lib-es/common-logic/transaction/combine.d.ts.map +1 -0
- package/lib-es/common-logic/transaction/combine.js +6 -0
- package/lib-es/common-logic/transaction/combine.js.map +1 -0
- package/lib-es/common-logic/transaction/craftTransaction.d.ts +15 -0
- package/lib-es/common-logic/transaction/craftTransaction.d.ts.map +1 -0
- package/lib-es/common-logic/transaction/craftTransaction.js +17 -0
- package/lib-es/common-logic/transaction/craftTransaction.js.map +1 -0
- package/lib-es/common-logic/transaction/estimateFees.d.ts +2 -0
- package/lib-es/common-logic/transaction/estimateFees.d.ts.map +1 -0
- package/lib-es/common-logic/transaction/estimateFees.js +18 -0
- package/lib-es/common-logic/transaction/estimateFees.js.map +1 -0
- package/lib-es/common-logic/utils.d.ts +6 -0
- package/lib-es/common-logic/utils.d.ts.map +1 -0
- package/lib-es/common-logic/utils.js +13 -0
- package/lib-es/common-logic/utils.js.map +1 -0
- package/lib-es/config.d.ts +12 -0
- package/lib-es/config.d.ts.map +1 -0
- package/lib-es/config.js +4 -0
- package/lib-es/config.js.map +1 -0
- package/lib-es/index.d.ts +4 -0
- package/lib-es/index.d.ts.map +1 -0
- package/lib-es/index.js +3 -0
- package/lib-es/index.js.map +1 -0
- package/lib-es/network/indexer.d.ts +6 -0
- package/lib-es/network/indexer.d.ts.map +1 -0
- package/lib-es/network/indexer.js +12 -0
- package/lib-es/network/indexer.js.map +1 -0
- package/lib-es/network/mock-network.d.ts +5 -0
- package/lib-es/network/mock-network.d.ts.map +1 -0
- package/lib-es/network/mock-network.js +25 -0
- package/lib-es/network/mock-network.js.map +1 -0
- package/lib-es/network/node.d.ts +12 -0
- package/lib-es/network/node.d.ts.map +1 -0
- package/lib-es/network/node.js +80 -0
- package/lib-es/network/node.js.map +1 -0
- package/lib-es/network/types.d.ts +47 -0
- package/lib-es/network/types.d.ts.map +1 -0
- package/lib-es/network/types.js +4 -0
- package/lib-es/network/types.js.map +1 -0
- package/lib-es/signer/getAddress.d.ts +6 -0
- package/lib-es/signer/getAddress.d.ts.map +1 -0
- package/lib-es/signer/getAddress.js +12 -0
- package/lib-es/signer/getAddress.js.map +1 -0
- package/lib-es/signer/index.d.ts +6 -0
- package/lib-es/signer/index.d.ts.map +1 -0
- package/lib-es/signer/index.js +6 -0
- package/lib-es/signer/index.js.map +1 -0
- package/lib-es/test/bot-deviceActions.d.ts +4 -0
- package/lib-es/test/bot-deviceActions.d.ts.map +1 -0
- package/lib-es/test/bot-deviceActions.js +41 -0
- package/lib-es/test/bot-deviceActions.js.map +1 -0
- package/lib-es/test/bot-specs.d.ts +1 -0
- package/lib-es/test/bot-specs.d.ts.map +1 -0
- package/lib-es/test/bot-specs.js +78 -0
- package/lib-es/test/bot-specs.js.map +1 -0
- package/lib-es/test/bridgeDatasetTest.d.ts +5 -0
- package/lib-es/test/bridgeDatasetTest.d.ts.map +1 -0
- package/lib-es/test/bridgeDatasetTest.js +142 -0
- package/lib-es/test/bridgeDatasetTest.js.map +1 -0
- package/lib-es/test/cli.d.ts +26 -0
- package/lib-es/test/cli.d.ts.map +1 -0
- package/lib-es/test/cli.js +30 -0
- package/lib-es/test/cli.js.map +1 -0
- package/lib-es/test/index.d.ts +5 -0
- package/lib-es/test/index.d.ts.map +1 -0
- package/lib-es/test/index.js +6 -0
- package/lib-es/test/index.js.map +1 -0
- package/lib-es/types/assets.d.ts +3 -0
- package/lib-es/types/assets.d.ts.map +1 -0
- package/lib-es/types/assets.js +2 -0
- package/lib-es/types/assets.js.map +1 -0
- package/lib-es/types/bridge.d.ts +23 -0
- package/lib-es/types/bridge.d.ts.map +1 -0
- package/lib-es/types/bridge.js +2 -0
- package/lib-es/types/bridge.js.map +1 -0
- package/lib-es/types/errors.d.ts +4 -0
- package/lib-es/types/errors.d.ts.map +1 -0
- package/lib-es/types/errors.js +3 -0
- package/lib-es/types/errors.js.map +1 -0
- package/lib-es/types/index.d.ts +13 -0
- package/lib-es/types/index.d.ts.map +1 -0
- package/lib-es/types/index.js +3 -0
- package/lib-es/types/index.js.map +1 -0
- package/lib-es/types/signer.d.ts +10 -0
- package/lib-es/types/signer.d.ts.map +1 -0
- package/lib-es/types/signer.js +2 -0
- package/lib-es/types/signer.js.map +1 -0
- package/package.json +137 -0
- package/src/api/index.test.ts +22 -0
- package/src/api/index.ts +88 -0
- package/src/bridge/broadcast.test.ts +36 -0
- package/src/bridge/broadcast.ts +11 -0
- package/src/bridge/createTransaction.test.ts +12 -0
- package/src/bridge/createTransaction.ts +14 -0
- package/src/bridge/deviceTransactionConfig.test.ts +20 -0
- package/src/bridge/deviceTransactionConfig.ts +34 -0
- package/src/bridge/estimateMaxSpendable.ts +25 -0
- package/src/bridge/getTransactionStatus.ts +88 -0
- package/src/bridge/index.test.ts +26 -0
- package/src/bridge/index.ts +65 -0
- package/src/bridge/prepareTransaction.test.ts +29 -0
- package/src/bridge/prepareTransaction.ts +25 -0
- package/src/bridge/signOperation.ts +94 -0
- package/src/bridge/sync.ts +106 -0
- package/src/bridge/transaction.ts +61 -0
- package/src/bridge/updateTransaction.ts +17 -0
- package/src/common-logic/account/getBalance.ts +8 -0
- package/src/common-logic/account/getNextSequence.ts +6 -0
- package/src/common-logic/common.ts +8 -0
- package/src/common-logic/history/lastBlock.ts +11 -0
- package/src/common-logic/history/listOperations.ts +65 -0
- package/src/common-logic/index.ts +11 -0
- package/src/common-logic/transaction/broadcast.ts +6 -0
- package/src/common-logic/transaction/combine.ts +6 -0
- package/src/common-logic/transaction/craftTransaction.ts +36 -0
- package/src/common-logic/transaction/estimateFees.ts +16 -0
- package/src/common-logic/utils.ts +18 -0
- package/src/config.ts +12 -0
- package/src/index.ts +4 -0
- package/src/network/indexer.ts +17 -0
- package/src/network/mock-network.ts +25 -0
- package/src/network/node.ts +94 -0
- package/src/network/types.ts +51 -0
- package/src/signer/getAddress.ts +20 -0
- package/src/signer/index.ts +7 -0
- package/src/test/bot-deviceActions.ts +48 -0
- package/src/test/bot-specs.ts +76 -0
- package/src/test/bridgeDatasetTest.ts +147 -0
- package/src/test/cli.ts +44 -0
- package/src/test/index.ts +6 -0
- package/src/types/assets.ts +3 -0
- package/src/types/bridge.ts +33 -0
- package/src/types/errors.ts +3 -0
- package/src/types/index.ts +13 -0
- package/src/types/signer.ts +11 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"estimateFees.d.ts","sourceRoot":"","sources":["../../../src/common-logic/transaction/estimateFees.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAYjF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.estimateFees = estimateFees;
|
|
4
|
+
const node_1 = require("../../network/node");
|
|
5
|
+
const errors_1 = require("../../types/errors");
|
|
6
|
+
async function estimateFees(serializedTransaction) {
|
|
7
|
+
try {
|
|
8
|
+
// We call the node to do a dry run and estimate fees
|
|
9
|
+
return BigInt(await (0, node_1.simulate)(serializedTransaction));
|
|
10
|
+
}
|
|
11
|
+
catch (e) {
|
|
12
|
+
// default value is required in case of simulation error, else user will encounter an error in the flow
|
|
13
|
+
if (e instanceof errors_1.SimulationError) {
|
|
14
|
+
return BigInt(1000);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Unexpected error while estimating fees.");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=estimateFees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"estimateFees.js","sourceRoot":"","sources":["../../../src/common-logic/transaction/estimateFees.ts"],"names":[],"mappings":";;AAGA,oCAYC;AAfD,6CAA8C;AAC9C,+CAAqD;AAE9C,KAAK,UAAU,YAAY,CAAC,qBAA6B;IAC9D,IAAI,CAAC;QACH,qDAAqD;QACrD,OAAO,MAAM,CAAC,MAAM,IAAA,eAAQ,EAAC,qBAAqB,CAAC,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,uGAAuG;QACvG,IAAI,CAAC,YAAY,wBAAe,EAAE,CAAC;YACjC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BigNumber from "bignumber.js";
|
|
2
|
+
export declare const UINT32_MAX: BigNumber;
|
|
3
|
+
export declare const validateTag: (tag: BigNumber) => boolean;
|
|
4
|
+
export declare function isRecipientValid(recipient: string): boolean;
|
|
5
|
+
export declare const encode: (transaction: string, signature: string, publicKey?: string) => string;
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/common-logic/utils.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,eAAO,MAAM,UAAU,WAAoC,CAAC;AAE5D,eAAO,MAAM,WAAW,QAAS,SAAS,YAIzC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,eAAO,MAAM,MAAM,gBAAiB,MAAM,aAAa,MAAM,cAAc,MAAM,WAGhF,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.encode = exports.validateTag = exports.UINT32_MAX = void 0;
|
|
7
|
+
exports.isRecipientValid = isRecipientValid;
|
|
8
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
9
|
+
exports.UINT32_MAX = new bignumber_js_1.default(2).pow(32).minus(1);
|
|
10
|
+
const validateTag = (tag) => {
|
|
11
|
+
return (!tag.isNaN() && tag.isFinite() && tag.isInteger() && tag.isPositive() && tag.lte(exports.UINT32_MAX));
|
|
12
|
+
};
|
|
13
|
+
exports.validateTag = validateTag;
|
|
14
|
+
function isRecipientValid(recipient) {
|
|
15
|
+
return recipient.length > 0;
|
|
16
|
+
}
|
|
17
|
+
const encode = (transaction, signature, publicKey) => {
|
|
18
|
+
// sample encoding
|
|
19
|
+
return `${transaction}${publicKey}${signature}encodedTx`;
|
|
20
|
+
};
|
|
21
|
+
exports.encode = encode;
|
|
22
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/common-logic/utils.ts"],"names":[],"mappings":";;;;;;AAUA,4CAEC;AAZD,gEAAqC;AAExB,QAAA,UAAU,GAAG,IAAI,sBAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAErD,MAAM,WAAW,GAAG,CAAC,GAAc,EAAE,EAAE;IAC5C,OAAO,CACL,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,SAAS,EAAE,IAAI,GAAG,CAAC,UAAU,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,kBAAU,CAAC,CAC7F,CAAC;AACJ,CAAC,CAAC;AAJW,QAAA,WAAW,eAItB;AAEF,SAAgB,gBAAgB,CAAC,SAAiB;IAChD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9B,CAAC;AAEM,MAAM,MAAM,GAAG,CAAC,WAAmB,EAAE,SAAiB,EAAE,SAAkB,EAAE,EAAE;IACnF,kBAAkB;IAClB,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,WAAW,CAAC;AAC3D,CAAC,CAAC;AAHW,QAAA,MAAM,UAGjB"}
|
package/lib/config.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CurrencyConfig } from "@ledgerhq/coin-framework/config";
|
|
2
|
+
export type ConcordiumConfig = {
|
|
3
|
+
nodeUrl: string;
|
|
4
|
+
minReserve: number;
|
|
5
|
+
};
|
|
6
|
+
export type ConcordiumCoinConfig = CurrencyConfig & ConcordiumConfig;
|
|
7
|
+
declare const coinConfig: {
|
|
8
|
+
setCoinConfig: (config: import("@ledgerhq/coin-framework/config").CoinConfig<ConcordiumCoinConfig>) => void;
|
|
9
|
+
getCoinConfig: (currency?: import("@ledgerhq/types-cryptoassets").CryptoCurrency) => ConcordiumCoinConfig;
|
|
10
|
+
};
|
|
11
|
+
export default coinConfig;
|
|
12
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAwB,EAAE,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEvF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAErE,QAAA,MAAM,UAAU;;;CAA0C,CAAC;AAE3D,eAAe,UAAU,CAAC"}
|
package/lib/config.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const config_1 = __importDefault(require("@ledgerhq/coin-framework/config"));
|
|
7
|
+
const coinConfig = (0, config_1.default)();
|
|
8
|
+
exports.default = coinConfig;
|
|
9
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;AAAA,6EAAuF;AASvF,MAAM,UAAU,GAAG,IAAA,gBAAe,GAAwB,CAAC;AAE3D,kBAAe,UAAU,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.createBridges = void 0;
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
var index_1 = require("./bridge/index");
|
|
20
|
+
Object.defineProperty(exports, "createBridges", { enumerable: true, get: function () { return index_1.createBridges; } });
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AAExB,wCAA+C;AAAtC,sGAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../../src/network/indexer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,eAAe,YACjB,MAAM,UACP;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KACtC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAS3C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getTransactions = void 0;
|
|
7
|
+
const network_1 = __importDefault(require("@ledgerhq/live-network/network"));
|
|
8
|
+
const live_env_1 = require("@ledgerhq/live-env");
|
|
9
|
+
const getTransactions = async (address, params) => {
|
|
10
|
+
const { data } = await (0, network_1.default)({
|
|
11
|
+
// NOTE: add INDEXER_BOILERPLATE to libs/env/src/env.ts
|
|
12
|
+
// @ts-expect-error: add INDEXER_BOILERPLATE to libs/env/src/env.ts
|
|
13
|
+
url: `${(0, live_env_1.getEnv)("INDEXER_BOILERPLATE")}/account/${address}/transactions`,
|
|
14
|
+
method: "GET",
|
|
15
|
+
});
|
|
16
|
+
return data.transactions;
|
|
17
|
+
};
|
|
18
|
+
exports.getTransactions = getTransactions;
|
|
19
|
+
//# sourceMappingURL=indexer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexer.js","sourceRoot":"","sources":["../../src/network/indexer.ts"],"names":[],"mappings":";;;;;;AAAA,6EAAqD;AACrD,iDAA4C;AAGrC,MAAM,eAAe,GAAG,KAAK,EAClC,OAAe,EACf,MAAuC,EACK,EAAE;IAC9C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,iBAAO,EAAoB;QAChD,uDAAuD;QACvD,mEAAmE;QACnE,GAAG,EAAE,GAAG,IAAA,iBAAM,EAAC,qBAAqB,CAAC,YAAY,OAAO,eAAe;QACvE,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC,YAAY,CAAC;AAC3B,CAAC,CAAC;AAZW,QAAA,eAAe,mBAY1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-network.d.ts","sourceRoot":"","sources":["../../src/network/mock-network.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO,WAAY;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAAA;CAAE,SAatE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
|
|
4
|
+
In a real use case you should use live-network library like this :
|
|
5
|
+
|
|
6
|
+
import network from "@ledgerhq/live-network/network";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
instead of this mocked method
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.network = void 0;
|
|
14
|
+
const network = (params) => {
|
|
15
|
+
switch (true) {
|
|
16
|
+
case params.url.includes("simulate"):
|
|
17
|
+
break;
|
|
18
|
+
case params.url.includes("submit"):
|
|
19
|
+
break;
|
|
20
|
+
case params.url.includes("account_info"):
|
|
21
|
+
break;
|
|
22
|
+
case params.url.includes("transactions"):
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
throw new Error("Mock network 404");
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.network = network;
|
|
29
|
+
//# sourceMappingURL=mock-network.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-network.js","sourceRoot":"","sources":["../../src/network/mock-network.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;AAEK,MAAM,OAAO,GAAG,CAAC,MAA+C,EAAE,EAAE;IACzE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC;YAClC,MAAM;QACR,KAAK,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAChC,MAAM;QACR,KAAK,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC;YACtC,MAAM;QACR,KAAK,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC;YACtC,MAAM;QACR;YACE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;AACH,CAAC,CAAC;AAbW,QAAA,OAAO,WAalB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AccountInfoResponse, SubmitReponse } from "./types";
|
|
2
|
+
export declare const simulate: (serializedTx: string) => Promise<number>;
|
|
3
|
+
export declare const getNextSequence: (address: string) => Promise<number>;
|
|
4
|
+
export declare const getBlockHeight: () => Promise<number>;
|
|
5
|
+
export declare const getLastBlock: () => Promise<{
|
|
6
|
+
blockHeight: number;
|
|
7
|
+
blockHash: string;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const submit: (signedTx: string) => Promise<SubmitReponse>;
|
|
11
|
+
export declare const getAccountInfo: (address: string) => Promise<AccountInfoResponse>;
|
|
12
|
+
//# sourceMappingURL=node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/network/node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAO7D,eAAO,MAAM,QAAQ,iBAAwB,MAAM,KAAG,OAAO,CAAC,MAAM,CAcnE,CAAC;AAGF,eAAO,MAAM,eAAe,YAAmB,MAAM,KAAG,OAAO,CAAC,MAAM,CAYrE,CAAC;AAEF,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,MAAM,CAQrD,CAAC;AAEF,eAAO,MAAM,YAAY,QAAa,OAAO,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAQA,CAAC;AAEF,eAAO,MAAM,MAAM,aAAoB,MAAM,KAAG,OAAO,CAAC,aAAa,CAQpE,CAAC;AAEF,eAAO,MAAM,cAAc,YAAmB,MAAM,KAAG,OAAO,CAAC,mBAAmB,CAiBjF,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getAccountInfo = exports.submit = exports.getLastBlock = exports.getBlockHeight = exports.getNextSequence = exports.simulate = void 0;
|
|
7
|
+
const network_1 = __importDefault(require("@ledgerhq/live-network/network"));
|
|
8
|
+
const live_env_1 = require("@ledgerhq/live-env");
|
|
9
|
+
const errors_1 = require("../types/errors");
|
|
10
|
+
const config_1 = __importDefault(require("../config"));
|
|
11
|
+
const getNodeUrl = () => config_1.default.getCoinConfig().nodeUrl;
|
|
12
|
+
// NOTE: add NODE_BOILERPLATE to libs/env/src/env.ts
|
|
13
|
+
// txPayload needs to be unsigned
|
|
14
|
+
const simulate = async (serializedTx) => {
|
|
15
|
+
// @ts-expect-error: add NODE_BOILERPLATE to libs/env/src/env.ts
|
|
16
|
+
const url = `${(0, live_env_1.getEnv)("NODE_BOILERPLATE")}/simulate`;
|
|
17
|
+
const { data } = await (0, network_1.default)({
|
|
18
|
+
url,
|
|
19
|
+
method: "POST",
|
|
20
|
+
data: {
|
|
21
|
+
txPayload: serializedTx,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
if (data.error) {
|
|
25
|
+
throw new errors_1.SimulationError();
|
|
26
|
+
}
|
|
27
|
+
return data.fees;
|
|
28
|
+
};
|
|
29
|
+
exports.simulate = simulate;
|
|
30
|
+
// can be called nonce or sequence
|
|
31
|
+
const getNextSequence = async (address) => {
|
|
32
|
+
// @ts-expect-error: add NODE_BOILERPLATE to libs/env/src/env.ts
|
|
33
|
+
const url = `${(0, live_env_1.getEnv)("NODE_BOILERPLATE")}/${address}/sequence`;
|
|
34
|
+
try {
|
|
35
|
+
const { data } = await (0, network_1.default)({
|
|
36
|
+
url,
|
|
37
|
+
method: "GET",
|
|
38
|
+
});
|
|
39
|
+
return data.sequence;
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.getNextSequence = getNextSequence;
|
|
46
|
+
const getBlockHeight = async () => {
|
|
47
|
+
// @ts-expect-error: add NODE_BOILERPLATE to libs/env/src/env.ts
|
|
48
|
+
const url = `${(0, live_env_1.getEnv)("NODE_BOILERPLATE")}/blockheight`;
|
|
49
|
+
const { data } = await (0, network_1.default)({
|
|
50
|
+
url,
|
|
51
|
+
method: "GET",
|
|
52
|
+
});
|
|
53
|
+
return data.blockHeight;
|
|
54
|
+
};
|
|
55
|
+
exports.getBlockHeight = getBlockHeight;
|
|
56
|
+
const getLastBlock = async () => {
|
|
57
|
+
// @ts-expect-error: add NODE_BOILERPLATE to libs/env/src/env.ts
|
|
58
|
+
const url = `${(0, live_env_1.getEnv)("NODE_BOILERPLATE")}/block/current`;
|
|
59
|
+
const { data } = await (0, network_1.default)({
|
|
60
|
+
url,
|
|
61
|
+
method: "GET",
|
|
62
|
+
});
|
|
63
|
+
return data;
|
|
64
|
+
};
|
|
65
|
+
exports.getLastBlock = getLastBlock;
|
|
66
|
+
const submit = async (signedTx) => {
|
|
67
|
+
// @ts-expect-error: add NODE_BOILERPLATE to libs/env/src/env.ts
|
|
68
|
+
const url = `${(0, live_env_1.getEnv)("NODE_BOILERPLATE")}/submit`;
|
|
69
|
+
const { data } = await (0, network_1.default)({
|
|
70
|
+
url,
|
|
71
|
+
method: "GET",
|
|
72
|
+
});
|
|
73
|
+
return data;
|
|
74
|
+
};
|
|
75
|
+
exports.submit = submit;
|
|
76
|
+
const getAccountInfo = async (address) => {
|
|
77
|
+
const { data: { result }, } = await (0, network_1.default)({
|
|
78
|
+
method: "POST",
|
|
79
|
+
url: getNodeUrl(),
|
|
80
|
+
data: {
|
|
81
|
+
method: "account_info",
|
|
82
|
+
params: [
|
|
83
|
+
{
|
|
84
|
+
account: address,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
return result;
|
|
90
|
+
};
|
|
91
|
+
exports.getAccountInfo = getAccountInfo;
|
|
92
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/network/node.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type ConcordiumOperation = {
|
|
2
|
+
meta: {
|
|
3
|
+
delivered_amount: string;
|
|
4
|
+
};
|
|
5
|
+
tx: {
|
|
6
|
+
Account: string;
|
|
7
|
+
Amount: string;
|
|
8
|
+
Destination: string;
|
|
9
|
+
Fee: string;
|
|
10
|
+
Memo: string;
|
|
11
|
+
Sequence: number;
|
|
12
|
+
SigningPubKey: string;
|
|
13
|
+
TransactionType: string;
|
|
14
|
+
TxnSignature: string;
|
|
15
|
+
date: number;
|
|
16
|
+
hash: string;
|
|
17
|
+
inLedger: number;
|
|
18
|
+
};
|
|
19
|
+
validated: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type ResponseStatus = {
|
|
22
|
+
status: string;
|
|
23
|
+
error?: never;
|
|
24
|
+
} | {
|
|
25
|
+
status?: never;
|
|
26
|
+
error: string;
|
|
27
|
+
};
|
|
28
|
+
export declare function isResponseStatus(obj: object): obj is ResponseStatus;
|
|
29
|
+
export type NewAccount = "NewAccount";
|
|
30
|
+
export type AccountInfoResponse = {
|
|
31
|
+
account_data: {
|
|
32
|
+
Account: string;
|
|
33
|
+
Balance: string;
|
|
34
|
+
};
|
|
35
|
+
ledger_hash: string;
|
|
36
|
+
ledger_index: number;
|
|
37
|
+
validated: boolean;
|
|
38
|
+
} & ResponseStatus;
|
|
39
|
+
export type SubmitReponse = {
|
|
40
|
+
accepted: boolean;
|
|
41
|
+
tx_hash: string;
|
|
42
|
+
};
|
|
43
|
+
export type AccountTxResponse = {
|
|
44
|
+
account: string;
|
|
45
|
+
transactions: ConcordiumOperation[];
|
|
46
|
+
} & ResponseStatus;
|
|
47
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/network/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE;QACJ,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,EAAE,EAAE;QACF,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GACtB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACjC;IACE,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AACN,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,cAAc,CAEnE;AAED,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC;AACtC,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG,cAAc,CAAC;AAEnB,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,mBAAmB,EAAE,CAAC;CACrC,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/network/types.ts"],"names":[],"mappings":";;AA2BA,4CAEC;AAFD,SAAgB,gBAAgB,CAAC,GAAW;IAC1C,OAAO,QAAQ,IAAI,GAAG,IAAI,OAAO,IAAI,GAAG,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GetAddressFn } from "@ledgerhq/coin-framework/bridge/getAddressWrapper";
|
|
2
|
+
import { SignerContext } from "@ledgerhq/coin-framework/signer";
|
|
3
|
+
import { ConcordiumSigner } from "../types";
|
|
4
|
+
declare const getAddress: (signerContext: SignerContext<ConcordiumSigner>) => GetAddressFn;
|
|
5
|
+
export default getAddress;
|
|
6
|
+
//# sourceMappingURL=getAddress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAddress.d.ts","sourceRoot":"","sources":["../../src/signer/getAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAqB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE/D,QAAA,MAAM,UAAU,kBAAmB,aAAa,CAAC,gBAAgB,CAAC,KAAG,YAYpE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getAddress = (signerContext) => {
|
|
4
|
+
return async (deviceId, { path, verify }) => {
|
|
5
|
+
const { address, publicKey } = (await signerContext(deviceId, signer => signer.getAddress(path)));
|
|
6
|
+
return {
|
|
7
|
+
path,
|
|
8
|
+
address,
|
|
9
|
+
publicKey,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
exports.default = getAddress;
|
|
14
|
+
//# sourceMappingURL=getAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAddress.js","sourceRoot":"","sources":["../../src/signer/getAddress.ts"],"names":[],"mappings":";;AAKA,MAAM,UAAU,GAAG,CAAC,aAA8C,EAAgB,EAAE;IAClF,OAAO,KAAK,EAAE,QAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAqB,EAAE,EAAE;QACrE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CACrE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CACxB,CAAsB,CAAC;QAExB,OAAO;YACL,IAAI;YACJ,OAAO;YACP,SAAS;SACV,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signer/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This directory is the home for all types and logic based on Ledgers signer.
|
|
4
|
+
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const getAddress_1 = __importDefault(require("./getAddress"));
|
|
10
|
+
exports.default = getAddress_1.default;
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/signer/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAEH,8DAAsC;AAEtC,kBAAe,oBAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-deviceActions.d.ts","sourceRoot":"","sources":["../../src/test/bot-deviceActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAMvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,EAAE,GAAG,CAuC3D,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.acceptTransaction = void 0;
|
|
4
|
+
const specs_1 = require("@ledgerhq/coin-framework/bot/specs");
|
|
5
|
+
exports.acceptTransaction = (0, specs_1.deviceActionFlow)({
|
|
6
|
+
steps: [
|
|
7
|
+
{
|
|
8
|
+
title: "Transaction Type",
|
|
9
|
+
button: specs_1.SpeculosButton.RIGHT,
|
|
10
|
+
expectedValue: () => "Payment",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
title: "Amount",
|
|
14
|
+
button: specs_1.SpeculosButton.RIGHT,
|
|
15
|
+
expectedValue: ({ account, status }) => (0, specs_1.formatDeviceAmount)(account.currency, status.amount),
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: "Fee",
|
|
19
|
+
button: specs_1.SpeculosButton.RIGHT,
|
|
20
|
+
expectedValue: ({ account, status }) => (0, specs_1.formatDeviceAmount)(account.currency, status.estimatedFees),
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: "Destination",
|
|
24
|
+
button: specs_1.SpeculosButton.RIGHT,
|
|
25
|
+
trimValue: true,
|
|
26
|
+
expectedValue: ({ transaction }) => transaction.recipient,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: "Account",
|
|
30
|
+
button: specs_1.SpeculosButton.RIGHT,
|
|
31
|
+
trimValue: true,
|
|
32
|
+
expectedValue: ({ account }) => account.freshAddress,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: "Accept",
|
|
36
|
+
button: specs_1.SpeculosButton.BOTH,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: "Sign transaction",
|
|
40
|
+
button: specs_1.SpeculosButton.BOTH,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=bot-deviceActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-deviceActions.js","sourceRoot":"","sources":["../../src/test/bot-deviceActions.ts"],"names":[],"mappings":";;;AACA,8DAI4C;AAG/B,QAAA,iBAAiB,GAAmC,IAAA,wBAAgB,EAAC;IAChF,KAAK,EAAE;QACL;YACE,KAAK,EAAE,kBAAkB;YACzB,MAAM,EAAE,sBAAc,CAAC,KAAK;YAC5B,aAAa,EAAE,GAAG,EAAE,CAAC,SAAS;SAC/B;QACD;YACE,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,sBAAc,CAAC,KAAK;YAC5B,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,IAAA,0BAAkB,EAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;SAC5F;QACD;YACE,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,sBAAc,CAAC,KAAK;YAC5B,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CACrC,IAAA,0BAAkB,EAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,aAAa,CAAC;SAC7D;QACD;YACE,KAAK,EAAE,aAAa;YACpB,MAAM,EAAE,sBAAc,CAAC,KAAK;YAC5B,SAAS,EAAE,IAAI;YACf,aAAa,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS;SAC1D;QACD;YACE,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,sBAAc,CAAC,KAAK;YAC5B,SAAS,EAAE,IAAI;YACf,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY;SACrD;QACD;YACE,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,sBAAc,CAAC,IAAI;SAC5B;QACD;YACE,KAAK,EAAE,kBAAkB;YACzB,MAAM,EAAE,sBAAc,CAAC,IAAI;SAC5B;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-specs.d.ts","sourceRoot":"","sources":["../../src/test/bot-specs.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
|
|
5
|
+
import invariant from "invariant";
|
|
6
|
+
import expect from "expect";
|
|
7
|
+
import { DeviceModelId } from "@ledgerhq/devices";
|
|
8
|
+
import type { AppSpec } from "@ledgerhq/coin-framework/bot/types";
|
|
9
|
+
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
|
|
10
|
+
import { parseCurrencyUnit } from "@ledgerhq/coin-framework/currencies/index";
|
|
11
|
+
import { botTest, genericTestDestination, pickSiblings } from "@ledgerhq/coin-framework/bot/specs";
|
|
12
|
+
import { acceptTransaction } from "./bot-deviceActions";
|
|
13
|
+
import type { Transaction } from "../types";
|
|
14
|
+
|
|
15
|
+
const currency = getCryptoCurrencyById("concordium");
|
|
16
|
+
const minAmountCutoff = parseCurrencyUnit(currency.units[0], "0.1");
|
|
17
|
+
const reserve = parseCurrencyUnit(currency.units[0], "20");
|
|
18
|
+
|
|
19
|
+
const concordiumSpec: AppSpec<Transaction> = {
|
|
20
|
+
name: "BOILERPLATE",
|
|
21
|
+
currency,
|
|
22
|
+
appQuery: {
|
|
23
|
+
model: DeviceModelId.nanoS,
|
|
24
|
+
appName: "BOILERPLATE_APP_NAME",
|
|
25
|
+
},
|
|
26
|
+
genericDeviceAction: acceptTransaction,
|
|
27
|
+
minViableAmount: minAmountCutoff,
|
|
28
|
+
mutations: [
|
|
29
|
+
{
|
|
30
|
+
name: "move ~50%",
|
|
31
|
+
maxRun: 2,
|
|
32
|
+
testDestination: genericTestDestination,
|
|
33
|
+
transaction: ({ account, siblings, bridge, maxSpendable }) => {
|
|
34
|
+
invariant(maxSpendable.gt(minAmountCutoff), "balance is too low");
|
|
35
|
+
const transaction = bridge.createTransaction(account);
|
|
36
|
+
const sibling = pickSiblings(siblings, 3);
|
|
37
|
+
const recipient = sibling.freshAddress;
|
|
38
|
+
let amount = maxSpendable.div(1.9 + 0.2 * Math.random()).integerValue();
|
|
39
|
+
|
|
40
|
+
if (!sibling.used && amount.lt(reserve)) {
|
|
41
|
+
invariant(
|
|
42
|
+
maxSpendable.gt(reserve.plus(minAmountCutoff)),
|
|
43
|
+
"not enough funds to send to new account",
|
|
44
|
+
);
|
|
45
|
+
amount = reserve;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
transaction,
|
|
50
|
+
updates: [
|
|
51
|
+
{
|
|
52
|
+
amount,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
recipient,
|
|
56
|
+
},
|
|
57
|
+
Math.random() > 0.5
|
|
58
|
+
? {
|
|
59
|
+
tag: 123,
|
|
60
|
+
}
|
|
61
|
+
: null,
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
test: ({ account, accountBeforeTransaction, operation }) => {
|
|
66
|
+
botTest("account balance moved with operation.value", () =>
|
|
67
|
+
expect(account.balance.toString()).toBe(
|
|
68
|
+
accountBeforeTransaction.balance.minus(operation.value).toString(),
|
|
69
|
+
),
|
|
70
|
+
);
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
export default {
|
|
76
|
+
concordiumSpec,
|
|
77
|
+
};
|
|
78
|
+
*/
|
|
79
|
+
//# sourceMappingURL=bot-specs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-specs.js","sourceRoot":"","sources":["../../src/test/bot-specs.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DatasetTest } from "@ledgerhq/types-live";
|
|
2
|
+
import { Transaction } from "../types";
|
|
3
|
+
export declare const newAddress1 = "rZvBc5e2YR1A9otS3r9DyGh3NDP8XLLp4";
|
|
4
|
+
export declare const dataset: DatasetTest<Transaction>;
|
|
5
|
+
//# sourceMappingURL=bridgeDatasetTest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridgeDatasetTest.d.ts","sourceRoot":"","sources":["../../src/test/bridgeDatasetTest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,WAAW,sCAAsC,CAAC;AAE/D,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,WAAW,CA0I5C,CAAC"}
|