@mainsail/contracts 0.0.1-evm.3 → 0.0.1-evm.31
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/distribution/constants/channels.d.ts.map +1 -1
- package/distribution/constants/channels.js +1 -1
- package/distribution/constants/channels.js.map +1 -1
- package/distribution/constants/environment-variables.d.ts +4 -2
- package/distribution/constants/environment-variables.d.ts.map +1 -1
- package/distribution/constants/environment-variables.js +105 -116
- package/distribution/constants/environment-variables.js.map +1 -1
- package/distribution/contracts/api/api.d.ts +4 -4
- package/distribution/contracts/api/api.d.ts.map +1 -1
- package/distribution/contracts/api/api.js.map +1 -1
- package/distribution/contracts/api/rpc.d.ts +1 -1
- package/distribution/contracts/api/rpc.d.ts.map +1 -1
- package/distribution/contracts/api-sync.d.ts +1 -2
- package/distribution/contracts/api-sync.d.ts.map +1 -1
- package/distribution/contracts/blockchain-utils.d.ts +19 -0
- package/distribution/contracts/blockchain-utils.d.ts.map +1 -0
- package/distribution/contracts/blockchain-utils.js +2 -0
- package/distribution/contracts/blockchain-utils.js.map +1 -0
- package/distribution/contracts/consensus/consensus.d.ts +12 -13
- package/distribution/contracts/consensus/consensus.d.ts.map +1 -1
- package/distribution/contracts/consensus-storage.d.ts +6 -5
- package/distribution/contracts/consensus-storage.d.ts.map +1 -1
- package/distribution/contracts/crypto/block.d.ts +25 -34
- package/distribution/contracts/crypto/block.d.ts.map +1 -1
- package/distribution/contracts/crypto/commit-handler.d.ts +5 -0
- package/distribution/contracts/crypto/commit-handler.d.ts.map +1 -0
- package/distribution/contracts/crypto/commit-handler.js +2 -0
- package/distribution/contracts/crypto/commit-handler.js.map +1 -0
- package/distribution/contracts/crypto/commit.d.ts +0 -6
- package/distribution/contracts/crypto/commit.d.ts.map +1 -1
- package/distribution/contracts/crypto/config.d.ts +2 -1
- package/distribution/contracts/crypto/config.d.ts.map +1 -1
- package/distribution/contracts/crypto/crypto.d.ts +0 -1
- package/distribution/contracts/crypto/crypto.d.ts.map +1 -1
- package/distribution/contracts/crypto/hash.d.ts +0 -1
- package/distribution/contracts/crypto/hash.d.ts.map +1 -1
- package/distribution/contracts/crypto/identities.d.ts +9 -2
- package/distribution/contracts/crypto/identities.d.ts.map +1 -1
- package/distribution/contracts/crypto/index.d.ts +2 -1
- package/distribution/contracts/crypto/index.d.ts.map +1 -1
- package/distribution/contracts/crypto/index.js +2 -1
- package/distribution/contracts/crypto/index.js.map +1 -1
- package/distribution/contracts/crypto/legacy.d.ts +10 -0
- package/distribution/contracts/crypto/legacy.d.ts.map +1 -0
- package/distribution/contracts/crypto/legacy.js +2 -0
- package/distribution/contracts/crypto/legacy.js.map +1 -0
- package/distribution/contracts/crypto/messages.d.ts +13 -16
- package/distribution/contracts/crypto/messages.d.ts.map +1 -1
- package/distribution/contracts/crypto/networks.d.ts +10 -6
- package/distribution/contracts/crypto/networks.d.ts.map +1 -1
- package/distribution/contracts/crypto/transactions.d.ts +50 -88
- package/distribution/contracts/crypto/transactions.d.ts.map +1 -1
- package/distribution/contracts/crypto/worker.d.ts +3 -1
- package/distribution/contracts/crypto/worker.d.ts.map +1 -1
- package/distribution/contracts/database.d.ts +22 -9
- package/distribution/contracts/database.d.ts.map +1 -1
- package/distribution/contracts/evm/contract-service.d.ts +33 -0
- package/distribution/contracts/evm/contract-service.d.ts.map +1 -0
- package/distribution/contracts/evm/contract-service.js +2 -0
- package/distribution/contracts/evm/contract-service.js.map +1 -0
- package/distribution/contracts/evm/evm.d.ts +100 -32
- package/distribution/contracts/evm/evm.d.ts.map +1 -1
- package/distribution/contracts/evm/evm.js +0 -5
- package/distribution/contracts/evm/evm.js.map +1 -1
- package/distribution/contracts/evm/index.d.ts +3 -1
- package/distribution/contracts/evm/index.d.ts.map +1 -1
- package/distribution/contracts/evm/index.js +3 -1
- package/distribution/contracts/evm/index.js.map +1 -1
- package/distribution/contracts/evm/instance.d.ts +30 -0
- package/distribution/contracts/evm/instance.d.ts.map +1 -0
- package/distribution/contracts/evm/instance.js +2 -0
- package/distribution/contracts/evm/instance.js.map +1 -0
- package/distribution/contracts/evm/storage.d.ts +13 -0
- package/distribution/contracts/evm/storage.d.ts.map +1 -0
- package/distribution/contracts/evm/storage.js +2 -0
- package/distribution/contracts/evm/storage.js.map +1 -0
- package/distribution/contracts/evm/worker.d.ts +4 -6
- package/distribution/contracts/evm/worker.d.ts.map +1 -1
- package/distribution/contracts/index.d.ts +3 -2
- package/distribution/contracts/index.d.ts.map +1 -1
- package/distribution/contracts/index.js +3 -2
- package/distribution/contracts/index.js.map +1 -1
- package/distribution/contracts/kernel/application.d.ts +10 -10
- package/distribution/contracts/kernel/application.d.ts.map +1 -1
- package/distribution/contracts/kernel/container.d.ts +1 -1
- package/distribution/contracts/kernel/container.d.ts.map +1 -1
- package/distribution/contracts/kernel/filesystem.d.ts +0 -2
- package/distribution/contracts/kernel/filesystem.d.ts.map +1 -1
- package/distribution/contracts/kernel/index.d.ts +1 -1
- package/distribution/contracts/kernel/index.d.ts.map +1 -1
- package/distribution/contracts/kernel/index.js +1 -1
- package/distribution/contracts/kernel/index.js.map +1 -1
- package/distribution/contracts/kernel/ipc.d.ts +6 -6
- package/distribution/contracts/kernel/ipc.d.ts.map +1 -1
- package/distribution/contracts/kernel/log.d.ts +1 -0
- package/distribution/contracts/kernel/log.d.ts.map +1 -1
- package/distribution/contracts/kernel/pipeline.d.ts +6 -6
- package/distribution/contracts/kernel/pipeline.d.ts.map +1 -1
- package/distribution/contracts/kernel/queue.d.ts +0 -1
- package/distribution/contracts/kernel/queue.d.ts.map +1 -1
- package/distribution/contracts/network-generator.d.ts +21 -2
- package/distribution/contracts/network-generator.d.ts.map +1 -1
- package/distribution/contracts/p2p/endpoints.d.ts +5 -9
- package/distribution/contracts/p2p/endpoints.d.ts.map +1 -1
- package/distribution/contracts/p2p/header.d.ts +3 -3
- package/distribution/contracts/p2p/header.d.ts.map +1 -1
- package/distribution/contracts/p2p/peer-communicator.d.ts +2 -3
- package/distribution/contracts/p2p/peer-communicator.d.ts.map +1 -1
- package/distribution/contracts/p2p/peer.d.ts +5 -5
- package/distribution/contracts/p2p/peer.d.ts.map +1 -1
- package/distribution/contracts/p2p/service.d.ts +1 -1
- package/distribution/contracts/p2p/service.d.ts.map +1 -1
- package/distribution/contracts/processor/block-processor-result.d.ts +7 -0
- package/distribution/contracts/processor/block-processor-result.d.ts.map +1 -0
- package/distribution/contracts/processor/block-processor-result.js +2 -0
- package/distribution/contracts/processor/block-processor-result.js.map +1 -0
- package/distribution/contracts/processor/block-processor.d.ts +7 -0
- package/distribution/contracts/processor/block-processor.d.ts.map +1 -0
- package/distribution/contracts/processor/block-processor.js +2 -0
- package/distribution/contracts/processor/block-processor.js.map +1 -0
- package/distribution/contracts/processor/handler.d.ts +5 -0
- package/distribution/contracts/processor/handler.d.ts.map +1 -0
- package/distribution/contracts/processor/handler.js +2 -0
- package/distribution/contracts/processor/handler.js.map +1 -0
- package/distribution/contracts/processor/index.d.ts +7 -0
- package/distribution/contracts/processor/index.d.ts.map +1 -0
- package/distribution/contracts/processor/index.js +7 -0
- package/distribution/contracts/processor/index.js.map +1 -0
- package/distribution/contracts/processor/processable-unit.d.ts +16 -0
- package/distribution/contracts/processor/processable-unit.d.ts.map +1 -0
- package/distribution/contracts/processor/processable-unit.js +2 -0
- package/distribution/contracts/processor/processable-unit.js.map +1 -0
- package/distribution/contracts/processor/transaction-processor.d.ts +7 -0
- package/distribution/contracts/processor/transaction-processor.d.ts.map +1 -0
- package/distribution/contracts/processor/transaction-processor.js +2 -0
- package/distribution/contracts/processor/transaction-processor.js.map +1 -0
- package/distribution/contracts/processor/verifier.d.ts +5 -0
- package/distribution/contracts/processor/verifier.d.ts.map +1 -0
- package/distribution/contracts/processor/verifier.js +2 -0
- package/distribution/contracts/processor/verifier.js.map +1 -0
- package/distribution/contracts/serializer.d.ts +1 -2
- package/distribution/contracts/serializer.d.ts.map +1 -1
- package/distribution/contracts/snapshot.d.ts +58 -0
- package/distribution/contracts/snapshot.d.ts.map +1 -0
- package/distribution/contracts/snapshot.js +2 -0
- package/distribution/contracts/snapshot.js.map +1 -0
- package/distribution/contracts/state/store.d.ts +3 -2
- package/distribution/contracts/state/store.d.ts.map +1 -1
- package/distribution/contracts/state/wallets.d.ts +6 -0
- package/distribution/contracts/state/wallets.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/client.d.ts +1 -5
- package/distribution/contracts/transaction-pool/client.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/index.d.ts +0 -2
- package/distribution/contracts/transaction-pool/index.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/index.js +0 -2
- package/distribution/contracts/transaction-pool/index.js.map +1 -1
- package/distribution/contracts/transaction-pool/mempool.d.ts +1 -2
- package/distribution/contracts/transaction-pool/mempool.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/processor.d.ts +0 -1
- package/distribution/contracts/transaction-pool/processor.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/query.d.ts +1 -5
- package/distribution/contracts/transaction-pool/query.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/sender-mempool.d.ts +6 -3
- package/distribution/contracts/transaction-pool/sender-mempool.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/sender-state.d.ts +6 -1
- package/distribution/contracts/transaction-pool/sender-state.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/service.d.ts +2 -2
- package/distribution/contracts/transaction-pool/service.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/storage.d.ts +5 -6
- package/distribution/contracts/transaction-pool/storage.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/worker.d.ts +5 -10
- package/distribution/contracts/transaction-pool/worker.d.ts.map +1 -1
- package/distribution/contracts/transactions.d.ts +5 -10
- package/distribution/contracts/transactions.d.ts.map +1 -1
- package/distribution/contracts/types/container.d.ts +1 -1
- package/distribution/contracts/types/container.d.ts.map +1 -1
- package/distribution/contracts/types/index.d.ts +4 -2
- package/distribution/contracts/types/index.d.ts.map +1 -1
- package/distribution/contracts/validator-set.d.ts +4 -2
- package/distribution/contracts/validator-set.d.ts.map +1 -1
- package/distribution/contracts/validator.d.ts +2 -2
- package/distribution/contracts/validator.d.ts.map +1 -1
- package/distribution/events.d.ts +5 -1
- package/distribution/events.d.ts.map +1 -1
- package/distribution/events.js +5 -0
- package/distribution/events.js.map +1 -1
- package/distribution/exceptions/consensus.d.ts +1 -1
- package/distribution/exceptions/consensus.d.ts.map +1 -1
- package/distribution/exceptions/consensus.js +2 -2
- package/distribution/exceptions/consensus.js.map +1 -1
- package/distribution/exceptions/crypto.d.ts +14 -9
- package/distribution/exceptions/crypto.d.ts.map +1 -1
- package/distribution/exceptions/crypto.js +17 -7
- package/distribution/exceptions/crypto.js.map +1 -1
- package/distribution/exceptions/p2p.js +1 -1
- package/distribution/exceptions/p2p.js.map +1 -1
- package/distribution/exceptions/pool.d.ts +6 -10
- package/distribution/exceptions/pool.d.ts.map +1 -1
- package/distribution/exceptions/pool.js +22 -20
- package/distribution/exceptions/pool.js.map +1 -1
- package/distribution/exceptions/processor.d.ts +27 -0
- package/distribution/exceptions/processor.d.ts.map +1 -1
- package/distribution/exceptions/processor.js +52 -7
- package/distribution/exceptions/processor.js.map +1 -1
- package/distribution/exceptions/rpc.js +1 -0
- package/distribution/exceptions/rpc.js.map +1 -1
- package/distribution/exceptions/runtime.d.ts.map +1 -1
- package/distribution/exceptions/runtime.js +1 -0
- package/distribution/exceptions/runtime.js.map +1 -1
- package/distribution/identifiers.d.ts +37 -12
- package/distribution/identifiers.d.ts.map +1 -1
- package/distribution/identifiers.js +37 -12
- package/distribution/identifiers.js.map +1 -1
- package/distribution/index.d.ts +1 -1
- package/distribution/index.d.ts.map +1 -1
- package/distribution/index.js +1 -1
- package/distribution/index.js.map +1 -1
- package/distribution/{utils.d.ts → utilities.d.ts} +1 -1
- package/distribution/utilities.d.ts.map +1 -0
- package/distribution/utilities.js +2 -0
- package/distribution/utilities.js.map +1 -0
- package/package.json +12 -12
- package/distribution/contracts/crypto/enums.d.ts +0 -17
- package/distribution/contracts/crypto/enums.d.ts.map +0 -1
- package/distribution/contracts/crypto/enums.js +0 -20
- package/distribution/contracts/crypto/enums.js.map +0 -1
- package/distribution/contracts/evm/gas-fee.d.ts +0 -10
- package/distribution/contracts/evm/gas-fee.d.ts.map +0 -1
- package/distribution/contracts/evm/gas-fee.js +0 -2
- package/distribution/contracts/evm/gas-fee.js.map +0 -1
- package/distribution/contracts/processor.d.ts +0 -33
- package/distribution/contracts/processor.d.ts.map +0 -1
- package/distribution/contracts/processor.js +0 -2
- package/distribution/contracts/processor.js.map +0 -1
- package/distribution/contracts/proposer.d.ts +0 -5
- package/distribution/contracts/proposer.d.ts.map +0 -1
- package/distribution/contracts/proposer.js +0 -2
- package/distribution/contracts/proposer.js.map +0 -1
- package/distribution/contracts/transaction-pool/dynamic-fee-matcher.d.ts +0 -6
- package/distribution/contracts/transaction-pool/dynamic-fee-matcher.d.ts.map +0 -1
- package/distribution/contracts/transaction-pool/dynamic-fee-matcher.js +0 -2
- package/distribution/contracts/transaction-pool/dynamic-fee-matcher.js.map +0 -1
- package/distribution/contracts/transaction-pool/expiration-service.d.ts +0 -7
- package/distribution/contracts/transaction-pool/expiration-service.d.ts.map +0 -1
- package/distribution/contracts/transaction-pool/expiration-service.js +0 -2
- package/distribution/contracts/transaction-pool/expiration-service.js.map +0 -1
- package/distribution/utils.d.ts.map +0 -1
- package/distribution/utils.js +0 -2
- package/distribution/utils.js.map +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BlockProcessorResult } from "./block-processor-result.js";
|
|
2
|
+
import { ProcessableUnit } from "./processable-unit.js";
|
|
3
|
+
export interface BlockProcessor {
|
|
4
|
+
process(unit: ProcessableUnit): Promise<BlockProcessorResult>;
|
|
5
|
+
commit(unit: ProcessableUnit): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=block-processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-processor.d.ts","sourceRoot":"","sources":["../../../source/contracts/processor/block-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,WAAW,cAAc;IAC9B,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-processor.js","sourceRoot":"","sources":["../../../source/contracts/processor/block-processor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../source/contracts/processor/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,WAAW,OAAO;IACvB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../source/contracts/processor/handler.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./block-processor.js";
|
|
2
|
+
export * from "./block-processor-result.js";
|
|
3
|
+
export * from "./handler.js";
|
|
4
|
+
export * from "./processable-unit.js";
|
|
5
|
+
export * from "./transaction-processor.js";
|
|
6
|
+
export * from "./verifier.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/contracts/processor/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./block-processor.js";
|
|
2
|
+
export * from "./block-processor-result.js";
|
|
3
|
+
export * from "./handler.js";
|
|
4
|
+
export * from "./processable-unit.js";
|
|
5
|
+
export * from "./transaction-processor.js";
|
|
6
|
+
export * from "./verifier.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/contracts/processor/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Block } from "../crypto/block.js";
|
|
2
|
+
import { Commit } from "../crypto/commit.js";
|
|
3
|
+
import { AccountUpdate } from "../evm/evm.js";
|
|
4
|
+
import { BlockProcessorResult } from "./block-processor-result.js";
|
|
5
|
+
export interface ProcessableUnit {
|
|
6
|
+
readonly blockNumber: number;
|
|
7
|
+
readonly round: number;
|
|
8
|
+
hasProcessorResult(): boolean;
|
|
9
|
+
getProcessorResult(): BlockProcessorResult;
|
|
10
|
+
setProcessorResult(processorResult: BlockProcessorResult): void;
|
|
11
|
+
setAccountUpdates(accounts: Array<AccountUpdate>): void;
|
|
12
|
+
getAccountUpdates(): Array<AccountUpdate>;
|
|
13
|
+
getBlock(): Block;
|
|
14
|
+
getCommit(): Promise<Commit>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=processable-unit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processable-unit.d.ts","sourceRoot":"","sources":["../../../source/contracts/processor/processable-unit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kBAAkB,IAAI,OAAO,CAAC;IAC9B,kBAAkB,IAAI,oBAAoB,CAAC;IAC3C,kBAAkB,CAAC,eAAe,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChE,iBAAiB,CAAC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IACxD,iBAAiB,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IAC1C,QAAQ,IAAI,KAAK,CAAC;IAClB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processable-unit.js","sourceRoot":"","sources":["../../../source/contracts/processor/processable-unit.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Transaction } from "../crypto/index.js";
|
|
2
|
+
import { TransactionReceipt } from "../evm/index.js";
|
|
3
|
+
import { ProcessableUnit } from "./processable-unit.js";
|
|
4
|
+
export interface TransactionProcessor {
|
|
5
|
+
process(unit: ProcessableUnit, transaction: Transaction): Promise<TransactionReceipt>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=transaction-processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-processor.d.ts","sourceRoot":"","sources":["../../../source/contracts/processor/transaction-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACpC,OAAO,CAAC,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACtF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-processor.js","sourceRoot":"","sources":["../../../source/contracts/processor/transaction-processor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifier.d.ts","sourceRoot":"","sources":["../../../source/contracts/processor/verifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,WAAW,QAAQ;IACxB,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifier.js","sourceRoot":"","sources":["../../../source/contracts/processor/verifier.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
1
|
import { ByteBuffer } from "@mainsail/utils";
|
|
3
2
|
export type MandatoryPropertyType = "hash" | "publicKey" | "hex" | "signature" | "transactions" | "consensusSignature" | "validatorSet";
|
|
4
|
-
export type OptionalPropertyType = "uint8" | "uint16" | "uint32" | "uint48" | "uint64" | "uint256" | "address" | "bigint" | "
|
|
3
|
+
export type OptionalPropertyType = "uint8" | "uint16" | "uint32" | "uint48" | "uint64" | "uint256" | "address" | "bigint" | "blockHash";
|
|
5
4
|
export type SerializationSchema = {
|
|
6
5
|
type: MandatoryPropertyType;
|
|
7
6
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../source/contracts/serializer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../source/contracts/serializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAC9B,MAAM,GACN,WAAW,GACX,KAAK,GACL,WAAW,GACX,cAAc,GACd,oBAAoB,GACpB,cAAc,CAAC;AAElB,MAAM,MAAM,oBAAoB,GAC7B,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,WAAW,CAAC;AAEf,MAAM,MAAM,mBAAmB,GAAG;IAAE,IAAI,EAAE,qBAAqB,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,QAAQ,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAEpH,MAAM,WAAW,0BAA0B;IAC1C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,qBAAqB,GAC9B;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,QAAQ,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAEnD,MAAM,WAAW,4BAA4B;IAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IAC1B,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,aAAa,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElF,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,4BAA4B,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACvG"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Commit } from "./crypto/index.js";
|
|
2
|
+
import { CommitKey } from "./evm/evm.js";
|
|
3
|
+
export interface LegacyImporter {
|
|
4
|
+
run(genesisBlock: Commit): Promise<LegacyImportResult>;
|
|
5
|
+
prepare(snapshotPath: string): Promise<void>;
|
|
6
|
+
prepareRestore(): Promise<void>;
|
|
7
|
+
import(options: LegacyImportOptions): Promise<LegacyImportResult>;
|
|
8
|
+
wallets: ImportedLegacyWallet[];
|
|
9
|
+
validators: ImportedLegacyValidator[];
|
|
10
|
+
voters: ImportedLegacyVoter[];
|
|
11
|
+
snapshotHash: string;
|
|
12
|
+
genesisBlockNumber: bigint;
|
|
13
|
+
previousGenesisBlockHash: string;
|
|
14
|
+
totalSupply: bigint;
|
|
15
|
+
result: LegacyImportResult | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface LegacyImportOptions {
|
|
18
|
+
readonly timestamp: number;
|
|
19
|
+
readonly commitKey: CommitKey;
|
|
20
|
+
readonly mockFakeValidatorBlsKeys?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface LegacyImportResult {
|
|
23
|
+
readonly initialTotalSupply: bigint;
|
|
24
|
+
readonly importedValidatorsWithBlsKey: number;
|
|
25
|
+
readonly importedValidatorsWithoutBlsKey: number;
|
|
26
|
+
readonly importedUsernames: number;
|
|
27
|
+
readonly importedVoters: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ImportedLegacyWallet {
|
|
30
|
+
readonly arkAddress: string;
|
|
31
|
+
readonly ethAddress?: string;
|
|
32
|
+
readonly publicKey?: string;
|
|
33
|
+
readonly balance: bigint;
|
|
34
|
+
readonly legacyAttributes: ImportedLegacyWalletAttributes;
|
|
35
|
+
}
|
|
36
|
+
export interface ImportedLegacyWalletAttributes {
|
|
37
|
+
readonly secondPublicKey?: string;
|
|
38
|
+
readonly multiSignature?: ImportedLegacyMultiSignatureAttribute;
|
|
39
|
+
}
|
|
40
|
+
export interface ImportedLegacyMultiSignatureAttribute {
|
|
41
|
+
readonly min: number;
|
|
42
|
+
readonly publicKeys: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface ImportedLegacyVoter {
|
|
45
|
+
readonly arkAddress: string;
|
|
46
|
+
readonly ethAddress?: string;
|
|
47
|
+
readonly publicKey: string;
|
|
48
|
+
readonly vote: string;
|
|
49
|
+
}
|
|
50
|
+
export interface ImportedLegacyValidator {
|
|
51
|
+
readonly arkAddress: string;
|
|
52
|
+
readonly ethAddress?: string;
|
|
53
|
+
readonly publicKey: string;
|
|
54
|
+
readonly isResigned: boolean;
|
|
55
|
+
username: string;
|
|
56
|
+
blsPublicKey?: string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../source/contracts/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,cAAc;IAC9B,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACvD,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAElE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,UAAU,EAAE,uBAAuB,EAAE,CAAC;IACtC,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wBAAwB,EAAE,MAAM,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CAC5C;AAED,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,4BAA4B,EAAE,MAAM,CAAC;IAC9C,QAAQ,CAAC,+BAA+B,EAAE,MAAM,CAAC;IACjD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAGzB,QAAQ,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;CAC1D;AAED,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,qCAAqC,CAAC;CAChE;AAED,MAAM,WAAW,qCAAqC;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../source/contracts/snapshot.ts"],"names":[],"mappings":""}
|
|
@@ -2,10 +2,11 @@ import { Block, Commit, CommitHandler } from "../crypto/index.js";
|
|
|
2
2
|
export interface Store extends CommitHandler {
|
|
3
3
|
getGenesisCommit(): Commit;
|
|
4
4
|
setGenesisCommit(block: Commit): void;
|
|
5
|
-
getLastHeight(): number;
|
|
6
5
|
getLastBlock(): Block;
|
|
7
6
|
setLastBlock(block: Block): void;
|
|
8
|
-
|
|
7
|
+
setBlockNumber(blockNumber: number): void;
|
|
8
|
+
getBlockNumber(): number;
|
|
9
|
+
setTotalRound(totalRound: number): void;
|
|
9
10
|
getTotalRound(): number;
|
|
10
11
|
}
|
|
11
12
|
export type StoreFactory = (originalStore?: Store) => Store;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../source/contracts/state/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,KAAM,SAAQ,aAAa;IAC3C,gBAAgB,IAAI,MAAM,CAAC;IAC3B,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../source/contracts/state/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,KAAM,SAAQ,aAAa;IAC3C,gBAAgB,IAAI,MAAM,CAAC;IAC3B,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC,YAAY,IAAI,KAAK,CAAC;IACtB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEjC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,cAAc,IAAI,MAAM,CAAC;IAEzB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,aAAa,IAAI,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,aAAa,CAAC,EAAE,KAAK,KAAK,KAAK,CAAC"}
|
|
@@ -9,10 +9,16 @@ export interface Wallet {
|
|
|
9
9
|
setNonce(nonce: BigNumber): void;
|
|
10
10
|
increaseNonce(): void;
|
|
11
11
|
decreaseNonce(): void;
|
|
12
|
+
getLegacyAddress(): string | undefined;
|
|
13
|
+
hasLegacySecondPublicKey(): boolean;
|
|
14
|
+
legacySecondPublicKey(): string;
|
|
12
15
|
}
|
|
13
16
|
export interface ValidatorWallet {
|
|
14
17
|
address: string;
|
|
15
18
|
blsPublicKey: string;
|
|
16
19
|
voteBalance: BigNumber;
|
|
20
|
+
votersCount: number;
|
|
21
|
+
fee: BigNumber;
|
|
22
|
+
isResigned: boolean;
|
|
17
23
|
}
|
|
18
24
|
//# sourceMappingURL=wallets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../../source/contracts/state/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,MAAM;IACtB,UAAU,IAAI,MAAM,CAAC;IAErB,UAAU,IAAI,SAAS,CAAC;IACxB,UAAU,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5C,eAAe,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAE5C,QAAQ,IAAI,SAAS,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,aAAa,IAAI,IAAI,CAAC;IACtB,aAAa,IAAI,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../../source/contracts/state/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,MAAM;IACtB,UAAU,IAAI,MAAM,CAAC;IAErB,UAAU,IAAI,SAAS,CAAC;IACxB,UAAU,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5C,eAAe,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAE5C,QAAQ,IAAI,SAAS,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,aAAa,IAAI,IAAI,CAAC;IACtB,aAAa,IAAI,IAAI,CAAC;IAGtB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAAC;IACvC,wBAAwB,IAAI,OAAO,CAAC;IACpC,qBAAqB,IAAI,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,SAAS,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { CommitHandler, Transaction } from "../crypto/index.js";
|
|
1
|
+
import { CommitHandler } from "../crypto/index.js";
|
|
3
2
|
export interface Client extends CommitHandler {
|
|
4
|
-
setFailedTransactions(transactions: Transaction[]): void;
|
|
5
3
|
getTransactionBytes(): Promise<Buffer[]>;
|
|
6
|
-
listSnapshots(): Promise<number[]>;
|
|
7
|
-
importSnapshot(height: number): Promise<void>;
|
|
8
4
|
getStatus(): Promise<{
|
|
9
5
|
height: number;
|
|
10
6
|
version: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,MAAM,WAAW,MAAO,SAAQ,aAAa;IAC5C,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,SAAS,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -7,8 +7,7 @@ export interface Mempool {
|
|
|
7
7
|
getSenderMempools(): Iterable<SenderMempool>;
|
|
8
8
|
addTransaction(transaction: Transaction): Promise<void>;
|
|
9
9
|
removeTransaction(address: string, id: string): Promise<Transaction[]>;
|
|
10
|
-
|
|
11
|
-
fixInvalidStates(): Promise<Transaction[]>;
|
|
10
|
+
reAddTransactions(addresses: string[]): Promise<Transaction[]>;
|
|
12
11
|
flush(): void;
|
|
13
12
|
}
|
|
14
13
|
//# sourceMappingURL=mempool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mempool.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/mempool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,OAAO;IACvB,OAAO,IAAI,MAAM,CAAC;IAElB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC;IACjD,iBAAiB,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC;IAE7C,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvE,
|
|
1
|
+
{"version":3,"file":"mempool.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/mempool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,OAAO;IACvB,OAAO,IAAI,MAAM,CAAC;IAElB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC;IACjD,iBAAiB,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC;IAE7C,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvE,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAE/D,KAAK,IAAI,IAAI,CAAC;CACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/processor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAAA;KAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,MAAM,WAAW,SAAS;IACzB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAClD;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction
|
|
1
|
+
import { Transaction } from "../crypto/index.js";
|
|
2
2
|
export type QueryPredicate = (transaction: Transaction) => Promise<boolean>;
|
|
3
3
|
export interface Query {
|
|
4
4
|
getAll(): QueryIterable;
|
|
@@ -9,10 +9,6 @@ export interface Query {
|
|
|
9
9
|
export interface QueryIterable {
|
|
10
10
|
wherePredicate(predicate: QueryPredicate): QueryIterable;
|
|
11
11
|
whereId(id: string): QueryIterable;
|
|
12
|
-
whereType(type: TransactionType | number): QueryIterable;
|
|
13
|
-
whereTypeGroup(typeGroup: TransactionTypeGroup | number): QueryIterable;
|
|
14
|
-
whereVersion(version: number): QueryIterable;
|
|
15
|
-
whereKind(transaction: Transaction): QueryIterable;
|
|
16
12
|
has(): Promise<boolean>;
|
|
17
13
|
first(): Promise<Transaction>;
|
|
18
14
|
all(): Promise<Transaction[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAE5E,MAAM,WAAW,KAAK;IACrB,MAAM,IAAI,aAAa,CAAC;IACxB,cAAc,CAAC,eAAe,EAAE,MAAM,GAAG,aAAa,CAAC;IACvD,qBAAqB,IAAI,aAAa,CAAC;IACvC,sBAAsB,IAAI,aAAa,CAAC;CACxC;AAED,MAAM,WAAW,aAAa;IAC7B,cAAc,CAAC,SAAS,EAAE,cAAc,GAAG,aAAa,CAAC;IACzD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAAC;IAEnC,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACxB,KAAK,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9B,GAAG,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CAC9B"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { BigNumber } from "@mainsail/utils";
|
|
1
2
|
import { Transaction } from "../crypto/transactions.js";
|
|
2
3
|
export interface SenderMempool {
|
|
3
4
|
isDisposable(): boolean;
|
|
4
5
|
getSize(): number;
|
|
6
|
+
getNonce(): BigNumber;
|
|
5
7
|
getFromEarliest(): Iterable<Transaction>;
|
|
6
8
|
getFromLatest(): Iterable<Transaction>;
|
|
7
9
|
addTransaction(transaction: Transaction): Promise<void>;
|
|
8
|
-
removeTransaction(
|
|
9
|
-
|
|
10
|
+
removeTransaction(hash: string): Transaction[];
|
|
11
|
+
replaceTransaction(transaction: Transaction): Promise<Transaction[]>;
|
|
12
|
+
reAddTransactions(): Promise<Transaction[]>;
|
|
10
13
|
}
|
|
11
|
-
export type SenderMempoolFactory = (address: string) => Promise<SenderMempool>;
|
|
14
|
+
export type SenderMempoolFactory = (address: string, legacyAddress?: string) => Promise<SenderMempool>;
|
|
12
15
|
//# sourceMappingURL=sender-mempool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sender-mempool.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/sender-mempool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,WAAW,aAAa;IAC7B,YAAY,IAAI,OAAO,CAAC;IACxB,OAAO,IAAI,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"sender-mempool.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/sender-mempool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,WAAW,aAAa;IAC7B,YAAY,IAAI,OAAO,CAAC;IACxB,OAAO,IAAI,MAAM,CAAC;IAClB,QAAQ,IAAI,SAAS,CAAC;IAEtB,eAAe,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;IACzC,aAAa,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEvC,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAAC;IAC/C,kBAAkB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACrE,iBAAiB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CAC5C;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { BigNumber } from "@mainsail/utils";
|
|
1
2
|
import { Transaction } from "../crypto/transactions.js";
|
|
2
3
|
export interface SenderState {
|
|
3
|
-
configure(address: string): Promise<SenderState>;
|
|
4
|
+
configure(address: string, legacyAddress?: string): Promise<SenderState>;
|
|
5
|
+
reset(): Promise<void>;
|
|
4
6
|
apply(transaction: Transaction): Promise<void>;
|
|
7
|
+
revert(transaction: Transaction): void;
|
|
8
|
+
replace(oldTransaction: Transaction, newTransaction: Transaction, nonceOffset: BigNumber): Promise<boolean>;
|
|
9
|
+
getNonce(): BigNumber;
|
|
5
10
|
}
|
|
6
11
|
//# sourceMappingURL=sender-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sender-state.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/sender-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,WAAW,WAAW;IAC3B,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"sender-state.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/sender-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,WAAW,WAAW;IAC3B,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACzE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,KAAK,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IACvC,OAAO,CAAC,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5G,QAAQ,IAAI,SAAS,CAAC;CACtB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "../crypto/index.js";
|
|
2
2
|
export interface Service {
|
|
3
3
|
getPoolSize(): number;
|
|
4
4
|
addTransaction(transaction: Transaction): Promise<void>;
|
|
5
5
|
reAddTransactions(): Promise<void>;
|
|
6
|
-
commit(
|
|
6
|
+
commit(sendersAddresses: string[], consumedGas: number, isSyncing: boolean): Promise<void>;
|
|
7
7
|
flush(): Promise<void>;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,WAAW,OAAO;IACvB,WAAW,IAAI,MAAM,CAAC;IAEtB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,CAAC,gBAAgB,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3F,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
1
|
export type StoredTransaction = {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
blockNumber: number;
|
|
3
|
+
hash: string;
|
|
5
4
|
senderPublicKey: string;
|
|
6
5
|
serialized: Buffer;
|
|
7
6
|
};
|
|
8
7
|
export interface Storage {
|
|
9
8
|
addTransaction(storedTransaction: StoredTransaction): void;
|
|
10
|
-
hasTransaction(
|
|
9
|
+
hasTransaction(hash: string): boolean;
|
|
11
10
|
getAllTransactions(): Iterable<StoredTransaction>;
|
|
12
|
-
getOldTransactions(
|
|
13
|
-
removeTransaction(
|
|
11
|
+
getOldTransactions(blockNumber: number, limit?: number): Iterable<StoredTransaction>;
|
|
12
|
+
removeTransaction(hash: string): void;
|
|
14
13
|
flush(): void;
|
|
15
14
|
}
|
|
16
15
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/storage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,OAAO;IACvB,cAAc,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3D,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC,kBAAkB,IAAI,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAClD,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACrF,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,KAAK,IAAI,IAAI,CAAC;CACd"}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import { CommitHandler, Transaction } from "../crypto/index.js";
|
|
1
|
+
import { CommitHandler } from "../crypto/index.js";
|
|
3
2
|
import { EventListener } from "../kernel/index.js";
|
|
4
3
|
import { EventCallback, Subprocess } from "../kernel/ipc.js";
|
|
5
4
|
import { KeyValuePair } from "../types/index.js";
|
|
6
|
-
export
|
|
7
|
-
}
|
|
5
|
+
export type WorkerFlags = KeyValuePair;
|
|
8
6
|
export interface WorkerScriptHandler {
|
|
9
7
|
boot(flags: WorkerFlags): Promise<void>;
|
|
10
8
|
getTransactions(): Promise<string[]>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
failedTransactions: string[];
|
|
14
|
-
}): Promise<void>;
|
|
9
|
+
removeTransaction(address: string, id: string): Promise<void>;
|
|
10
|
+
commit(height: number, sendersAddresses: string[], consumedGas: number, isSyncing: boolean): Promise<void>;
|
|
15
11
|
setPeer(ip: string): Promise<void>;
|
|
16
12
|
forgetPeer(ip: string): Promise<void>;
|
|
17
|
-
start(): Promise<void>;
|
|
13
|
+
start(height: number): Promise<void>;
|
|
18
14
|
reloadWebhooks(): Promise<void>;
|
|
19
15
|
}
|
|
20
16
|
export type WorkerFactory = () => Worker;
|
|
@@ -23,7 +19,6 @@ export type WorkerSubprocessFactory = () => WorkerSubprocess;
|
|
|
23
19
|
export interface Worker extends Omit<WorkerScriptHandler, "commit" | "getTransactions">, CommitHandler, EventListener {
|
|
24
20
|
getQueueSize(): number;
|
|
25
21
|
kill(): Promise<number>;
|
|
26
|
-
setFailedTransactions(transactions: Transaction[]): void;
|
|
27
22
|
getTransactionBytes(): Promise<Buffer[]>;
|
|
28
23
|
registerEventHandler(event: string, callback: EventCallback<any>): void;
|
|
29
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/worker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../source/contracts/transaction-pool/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC;AAEvC,MAAM,WAAW,mBAAmB;IACnC,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,eAAe,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACrC,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3G,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;AAE/D,MAAM,MAAM,uBAAuB,GAAG,MAAM,gBAAgB,CAAC;AAE7D,MAAM,WAAW,MAAO,SAAQ,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,iBAAiB,CAAC,EAAE,aAAa,EAAE,aAAa;IACpH,YAAY,IAAI,MAAM,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACxE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction, TransactionConstructor, TransactionData } from "./crypto/index.js";
|
|
2
2
|
import { BlockContext, CommitKey, Instance, TransactionReceipt } from "./evm/index.js";
|
|
3
3
|
import { Wallet } from "./state/index.js";
|
|
4
4
|
export type TransactionHandlerConstructor = new () => TransactionHandler;
|
|
@@ -10,31 +10,26 @@ export type TransactionHandlerContext = {
|
|
|
10
10
|
};
|
|
11
11
|
export interface TransactionHandler {
|
|
12
12
|
verify(transaction: Transaction): Promise<boolean>;
|
|
13
|
-
throwIfCannotBeApplied(transaction: Transaction, sender: Wallet): Promise<void>;
|
|
13
|
+
throwIfCannotBeApplied(transaction: Transaction, sender: Wallet, evm: Instance): Promise<void>;
|
|
14
14
|
apply(context: TransactionHandlerContext, transaction: Transaction): Promise<TransactionReceipt>;
|
|
15
15
|
emitEvents(transaction: Transaction): void;
|
|
16
|
-
verifySignatures(wallet: Wallet, transaction: TransactionData, multiSignature?: MultiSignatureAsset): Promise<boolean>;
|
|
17
16
|
getConstructor(): TransactionConstructor;
|
|
18
17
|
dependencies(): ReadonlyArray<TransactionHandlerConstructor>;
|
|
19
18
|
isActivated(): Promise<boolean>;
|
|
20
19
|
}
|
|
21
20
|
export interface TransactionHandlerRegistry {
|
|
22
|
-
initialize(): void;
|
|
23
21
|
getRegisteredHandlers(): TransactionHandler[];
|
|
24
|
-
getRegisteredHandlerByType(
|
|
22
|
+
getRegisteredHandlerByType(type: number, version?: number): TransactionHandler;
|
|
25
23
|
getActivatedHandlers(): Promise<TransactionHandler[]>;
|
|
26
|
-
getActivatedHandlerByType(
|
|
24
|
+
getActivatedHandlerByType(type: number, version?: number): Promise<TransactionHandler>;
|
|
27
25
|
getActivatedHandlerForData(transactionData: TransactionData): Promise<TransactionHandler>;
|
|
28
26
|
}
|
|
29
27
|
export interface TransactionHandlerProvider {
|
|
30
28
|
isRegistrationRequired(): boolean;
|
|
31
29
|
registerHandlers(): void;
|
|
32
30
|
}
|
|
33
|
-
export interface InternalTransactionType {
|
|
34
|
-
toString(): string;
|
|
35
|
-
}
|
|
36
31
|
export interface TransactionTypeFactory {
|
|
37
|
-
initialize(transactionTypes: Map<
|
|
32
|
+
initialize(transactionTypes: Map<number, TransactionConstructor>): any;
|
|
38
33
|
create(data: TransactionData): Transaction;
|
|
39
34
|
get(type: number, typeGroup?: number, version?: number): TransactionConstructor;
|
|
40
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../source/contracts/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../source/contracts/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,MAAM,6BAA6B,GAAG,UAAU,kBAAkB,CAAC;AAEzE,MAAM,MAAM,yBAAyB,GAAG;IACvC,GAAG,EAAE;QACJ,QAAQ,EAAE,QAAQ,CAAC;QACnB,YAAY,EAAE,YAAY,CAAC;KAC3B,CAAC;CACF,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC,MAAM,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnD,sBAAsB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/F,KAAK,CAAC,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAEjG,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAG3C,cAAc,IAAI,sBAAsB,CAAC;IAEzC,YAAY,IAAI,aAAa,CAAC,6BAA6B,CAAC,CAAC;IAE7D,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,0BAA0B;IAC1C,qBAAqB,IAAI,kBAAkB,EAAE,CAAC;IAE9C,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAAC;IAE/E,oBAAoB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAEtD,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAEvF,0BAA0B,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC1F;AAED,MAAM,WAAW,0BAA0B;IAC1C,sBAAsB,IAAI,OAAO,CAAC;IAElC,gBAAgB,IAAI,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACtC,UAAU,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,OAAE;IAElE,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAAC;IAE3C,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAChF;AAED,MAAM,WAAW,2BAA2B;IAC3C,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACpC,MAAM,IAAI,QAAQ,CAAC;IACnB,QAAQ,CAAC,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACtG;AAED,MAAM,MAAM,2BAA2B,GAAG,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type Constructor<T =
|
|
1
|
+
export type Constructor<T = Record<string, any>> = new (...arguments_: any[]) => T;
|
|
2
2
|
export type FunctionReturning<T> = (...arguments_: Array<any>) => T;
|
|
3
3
|
export type ClassOrFunctionReturning<T> = FunctionReturning<T> | Constructor<T>;
|
|
4
4
|
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../source/contracts/types/container.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,GAAG,UAAU,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../source/contracts/types/container.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,KAAK,GAAG,UAAU,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAEnF,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAEpE,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC"}
|