@mainsail/contracts 0.0.1-evm.2 → 0.0.1-evm.20
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/environment-variables.d.ts +4 -2
- package/distribution/constants/environment-variables.d.ts.map +1 -1
- package/distribution/constants/environment-variables.js +116 -113
- package/distribution/constants/environment-variables.js.map +1 -1
- package/distribution/contracts/api/api.d.ts +4 -1
- 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/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 -0
- package/distribution/contracts/crypto/index.d.ts.map +1 -1
- package/distribution/contracts/crypto/index.js +2 -0
- 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 -10
- package/distribution/contracts/crypto/networks.d.ts.map +1 -1
- package/distribution/contracts/crypto/transactions.d.ts +43 -85
- 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 +112 -25
- package/distribution/contracts/evm/evm.d.ts.map +1 -1
- package/distribution/contracts/evm/evm.js +0 -6
- 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 +28 -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 -9
- package/distribution/contracts/evm/worker.d.ts.map +1 -1
- package/distribution/contracts/index.d.ts +3 -3
- package/distribution/contracts/index.d.ts.map +1 -1
- package/distribution/contracts/index.js +3 -3
- 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 +20 -9
- 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 +57 -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/index.d.ts +0 -7
- package/distribution/contracts/state/index.d.ts.map +1 -1
- package/distribution/contracts/state/index.js +0 -7
- package/distribution/contracts/state/index.js.map +1 -1
- package/distribution/contracts/state/store.d.ts +3 -17
- package/distribution/contracts/state/store.d.ts.map +1 -1
- package/distribution/contracts/state/wallets.d.ts +9 -105
- package/distribution/contracts/state/wallets.d.ts.map +1 -1
- package/distribution/contracts/state/wallets.js +1 -15
- package/distribution/contracts/state/wallets.js.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 +4 -5
- 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 +3 -3
- package/distribution/contracts/transaction-pool/sender-mempool.d.ts.map +1 -1
- package/distribution/contracts/transaction-pool/sender-state.d.ts +3 -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 -13
- package/distribution/contracts/transaction-pool/worker.d.ts.map +1 -1
- package/distribution/contracts/transactions.d.ts +9 -28
- 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 +7 -5
- package/distribution/contracts/validator-set.d.ts.map +1 -1
- package/distribution/contracts/validator.d.ts +3 -3
- 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 +15 -10
- package/distribution/exceptions/crypto.d.ts.map +1 -1
- package/distribution/exceptions/crypto.js +19 -10
- 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 -7
- package/distribution/exceptions/pool.d.ts.map +1 -1
- package/distribution/exceptions/pool.js +16 -16
- 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/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 -47
- package/distribution/identifiers.d.ts.map +1 -1
- package/distribution/identifiers.js +38 -48
- 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 +10 -10
- 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/fees.d.ts +0 -10
- package/distribution/contracts/fees.d.ts.map +0 -1
- package/distribution/contracts/fees.js +0 -2
- package/distribution/contracts/fees.js.map +0 -1
- package/distribution/contracts/processor.d.ts +0 -37
- 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/state/attributes.d.ts +0 -22
- package/distribution/contracts/state/attributes.d.ts.map +0 -1
- package/distribution/contracts/state/attributes.js +0 -9
- package/distribution/contracts/state/attributes.js.map +0 -1
- package/distribution/contracts/state/block-state.d.ts +0 -12
- package/distribution/contracts/state/block-state.d.ts.map +0 -1
- package/distribution/contracts/state/block-state.js +0 -2
- package/distribution/contracts/state/block-state.js.map +0 -1
- package/distribution/contracts/state/index-set.d.ts +0 -5
- package/distribution/contracts/state/index-set.d.ts.map +0 -1
- package/distribution/contracts/state/index-set.js +0 -2
- package/distribution/contracts/state/index-set.js.map +0 -1
- package/distribution/contracts/state/repository.d.ts +0 -26
- package/distribution/contracts/state/repository.d.ts.map +0 -1
- package/distribution/contracts/state/repository.js +0 -2
- package/distribution/contracts/state/repository.js.map +0 -1
- package/distribution/contracts/state/service.d.ts +0 -11
- package/distribution/contracts/state/service.d.ts.map +0 -1
- package/distribution/contracts/state/service.js +0 -2
- package/distribution/contracts/state/service.js.map +0 -1
- package/distribution/contracts/state/snapshots.d.ts +0 -13
- package/distribution/contracts/state/snapshots.d.ts.map +0 -1
- package/distribution/contracts/state/snapshots.js +0 -2
- package/distribution/contracts/state/snapshots.js.map +0 -1
- package/distribution/contracts/state/state-verifier.d.ts +0 -4
- package/distribution/contracts/state/state-verifier.d.ts.map +0 -1
- package/distribution/contracts/state/state-verifier.js +0 -2
- package/distribution/contracts/state/state-verifier.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
@@ -1,11 +1,4 @@
|
|
1
|
-
export * from "./attributes.js";
|
2
|
-
export * from "./block-state.js";
|
3
|
-
export * from "./index-set.js";
|
4
|
-
export * from "./repository.js";
|
5
|
-
export * from "./service.js";
|
6
|
-
export * from "./snapshots.js";
|
7
1
|
export * from "./state.js";
|
8
|
-
export * from "./state-verifier.js";
|
9
2
|
export * from "./store.js";
|
10
3
|
export * from "./wallets.js";
|
11
4
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/contracts/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/contracts/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
|
@@ -1,11 +1,4 @@
|
|
1
|
-
export * from "./attributes.js";
|
2
|
-
export * from "./block-state.js";
|
3
|
-
export * from "./index-set.js";
|
4
|
-
export * from "./repository.js";
|
5
|
-
export * from "./service.js";
|
6
|
-
export * from "./snapshots.js";
|
7
1
|
export * from "./state.js";
|
8
|
-
export * from "./state-verifier.js";
|
9
2
|
export * from "./store.js";
|
10
3
|
export * from "./wallets.js";
|
11
4
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/contracts/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/contracts/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
|
@@ -1,27 +1,13 @@
|
|
1
1
|
import { Block, Commit, CommitHandler } from "../crypto/index.js";
|
2
|
-
import { JsonObject } from "../types/index.js";
|
3
|
-
import { StateRepositoryChange } from "./repository.js";
|
4
|
-
import { WalletRepository, WalletRepositoryChange } from "./wallets.js";
|
5
|
-
export type StoreChange = {
|
6
|
-
walletRepository: WalletRepositoryChange;
|
7
|
-
store: StateRepositoryChange;
|
8
|
-
};
|
9
2
|
export interface Store extends CommitHandler {
|
10
|
-
readonly walletRepository: WalletRepository;
|
11
3
|
getGenesisCommit(): Commit;
|
12
4
|
setGenesisCommit(block: Commit): void;
|
13
|
-
getLastHeight(): number;
|
14
5
|
getLastBlock(): Block;
|
15
6
|
setLastBlock(block: Block): void;
|
7
|
+
setBlockNumber(blockNumber: number): void;
|
8
|
+
getBlockNumber(): number;
|
9
|
+
setTotalRound(totalRound: number): void;
|
16
10
|
getTotalRound(): number;
|
17
|
-
hasAttribute(key: string): boolean;
|
18
|
-
getAttribute<T>(key: string): T;
|
19
|
-
setAttribute<T>(key: string, value: T): void;
|
20
|
-
commitChanges(): void;
|
21
|
-
toJson(): JsonObject;
|
22
|
-
fromJson(data: JsonObject): void;
|
23
|
-
changesToJson(): StoreChange;
|
24
|
-
applyChanges(changes: StoreChange): void;
|
25
11
|
}
|
26
12
|
export type StoreFactory = (originalStore?: Store) => Store;
|
27
13
|
//# sourceMappingURL=store.d.ts.map
|
@@ -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;
|
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"}
|
@@ -1,32 +1,6 @@
|
|
1
1
|
import { BigNumber } from "@mainsail/utils";
|
2
|
-
|
3
|
-
import { BlockData, MultiSignatureAsset } from "../crypto/index.js";
|
4
|
-
import { StateRepository, StateRepositoryChange } from "./repository.js";
|
5
|
-
export interface WalletIndex {
|
6
|
-
has(key: string): boolean;
|
7
|
-
get(key: string): Wallet | undefined;
|
8
|
-
set(key: string, wallet: Wallet): void;
|
9
|
-
forget(key: string): void;
|
10
|
-
entries(): ReadonlyArray<[string, Wallet]>;
|
11
|
-
values(): ReadonlyArray<Wallet>;
|
12
|
-
keys(): string[];
|
13
|
-
size(): number;
|
14
|
-
clear(): void;
|
15
|
-
}
|
16
|
-
export declare enum WalletIndexes {
|
17
|
-
Addresses = "addresses",
|
18
|
-
PublicKeys = "publicKeys",
|
19
|
-
Usernames = "usernames",
|
20
|
-
Resignations = "resignations",
|
21
|
-
Validators = "validators"
|
22
|
-
}
|
23
|
-
export interface WalletChange extends StateRepositoryChange {
|
24
|
-
address: string;
|
25
|
-
}
|
26
|
-
export interface Wallet extends Omit<StateRepository, "fromJson" | "commitChanges" | "changesToJson"> {
|
2
|
+
export interface Wallet {
|
27
3
|
getAddress(): string;
|
28
|
-
getPublicKey(): string | undefined;
|
29
|
-
setPublicKey(publicKey: string): void;
|
30
4
|
getBalance(): BigNumber;
|
31
5
|
setBalance(balance: BigNumber): void;
|
32
6
|
increaseBalance(balance: BigNumber): Wallet;
|
@@ -35,86 +9,16 @@ export interface Wallet extends Omit<StateRepository, "fromJson" | "commitChange
|
|
35
9
|
setNonce(nonce: BigNumber): void;
|
36
10
|
increaseNonce(): void;
|
37
11
|
decreaseNonce(): void;
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
clone(walletRepository: WalletRepository): Wallet;
|
42
|
-
getOriginal(): Wallet;
|
43
|
-
fromJson(data: JsonObject): Wallet;
|
44
|
-
commitChanges(walletRepository: WalletRepository): void;
|
45
|
-
changesToJson(): WalletChange;
|
46
|
-
toString(): string;
|
12
|
+
getLegacyAddress(): string | undefined;
|
13
|
+
hasLegacySecondPublicKey(): boolean;
|
14
|
+
legacySecondPublicKey(): string;
|
47
15
|
}
|
48
16
|
export interface ValidatorWallet {
|
49
|
-
|
50
|
-
|
51
|
-
getConsensusPublicKey(): string;
|
52
|
-
getVoteBalance(): BigNumber;
|
53
|
-
getRank(): number;
|
54
|
-
setRank(rank: number): void;
|
55
|
-
unsetRank(): void;
|
56
|
-
getApproval(): number;
|
57
|
-
setApproval(approval: number): void;
|
58
|
-
unsetApproval(): void;
|
59
|
-
isResigned(): boolean;
|
60
|
-
toString(): string;
|
61
|
-
}
|
62
|
-
export type WalletFactory = (address: string, walletRepository: WalletRepository, wallet?: Wallet) => Wallet;
|
63
|
-
export type ValidatorWalletFactory = (wallet: Wallet) => ValidatorWallet;
|
64
|
-
export interface WalletValidatorAttributes {
|
65
|
-
username: string;
|
17
|
+
address: string;
|
18
|
+
blsPublicKey: string;
|
66
19
|
voteBalance: BigNumber;
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
resigned?: boolean;
|
71
|
-
}
|
72
|
-
export type WalletMultiSignatureAttributes = MultiSignatureAsset & {
|
73
|
-
legacy?: boolean;
|
74
|
-
};
|
75
|
-
export type WalletRepositoryChange = {
|
76
|
-
wallets: WalletChange[];
|
77
|
-
indexes: {
|
78
|
-
[index: string]: {
|
79
|
-
forgets: string[];
|
80
|
-
sets: Record<string, string>;
|
81
|
-
};
|
82
|
-
};
|
83
|
-
};
|
84
|
-
export interface WalletRepository {
|
85
|
-
allByAddress(): ReadonlyArray<Wallet>;
|
86
|
-
allByPublicKey(): ReadonlyArray<Wallet>;
|
87
|
-
allValidators(): ReadonlyArray<Wallet>;
|
88
|
-
allByIndex(indexName: string): ReadonlyArray<Wallet>;
|
89
|
-
findByAddress(address: string): Wallet;
|
90
|
-
findByPublicKey(publicKey: string): Promise<Wallet>;
|
91
|
-
findByUsername(username: string): Wallet;
|
92
|
-
findByIndex(index: string, key: string): Wallet;
|
93
|
-
hasByAddress(address: string): boolean;
|
94
|
-
hasByPublicKey(publicKey: string): boolean;
|
95
|
-
hasByUsername(username: string): boolean;
|
96
|
-
hasByIndex(indexName: string, key: string): boolean;
|
97
|
-
getIndex(name: string): WalletIndex;
|
98
|
-
setOnIndex(index: string, key: string, wallet: Wallet): void;
|
99
|
-
forgetOnIndex(index: string, key: string): void;
|
100
|
-
sizeOfIndex(index: string): number;
|
101
|
-
setDirtyWallet(wallet: Wallet): void;
|
102
|
-
getDirtyWallets(): IterableIterator<Wallet>;
|
103
|
-
commitChanges(): void;
|
104
|
-
changesToJson(): WalletRepositoryChange;
|
105
|
-
applyChanges(changes: WalletRepositoryChange): void;
|
106
|
-
}
|
107
|
-
export type WalletRepositoryFactory = (originalWalletRepository?: WalletRepository) => WalletRepository;
|
108
|
-
export type WalletRepositoryBySenderFactory = (originalWalletRepository: WalletRepository, publicKey: string) => Promise<WalletRepository>;
|
109
|
-
export declare enum SearchScope {
|
110
|
-
Wallets = 0,
|
111
|
-
Validators = 1,
|
112
|
-
Locks = 2,
|
113
|
-
Entities = 3
|
114
|
-
}
|
115
|
-
export interface SearchContext<T = any> {
|
116
|
-
query: Record<string, string[]>;
|
117
|
-
entries: ReadonlyArray<T>;
|
118
|
-
defaultOrder: string[];
|
20
|
+
votersCount: number;
|
21
|
+
fee: BigNumber;
|
22
|
+
isResigned: boolean;
|
119
23
|
}
|
120
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;
|
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,16 +1,2 @@
|
|
1
|
-
export
|
2
|
-
(function (WalletIndexes) {
|
3
|
-
WalletIndexes["Addresses"] = "addresses";
|
4
|
-
WalletIndexes["PublicKeys"] = "publicKeys";
|
5
|
-
WalletIndexes["Usernames"] = "usernames";
|
6
|
-
WalletIndexes["Resignations"] = "resignations";
|
7
|
-
WalletIndexes["Validators"] = "validators";
|
8
|
-
})(WalletIndexes || (WalletIndexes = {}));
|
9
|
-
export var SearchScope;
|
10
|
-
(function (SearchScope) {
|
11
|
-
SearchScope[SearchScope["Wallets"] = 0] = "Wallets";
|
12
|
-
SearchScope[SearchScope["Validators"] = 1] = "Validators";
|
13
|
-
SearchScope[SearchScope["Locks"] = 2] = "Locks";
|
14
|
-
SearchScope[SearchScope["Entities"] = 3] = "Entities";
|
15
|
-
})(SearchScope || (SearchScope = {}));
|
1
|
+
export {};
|
16
2
|
//# sourceMappingURL=wallets.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wallets.js","sourceRoot":"","sources":["../../../source/contracts/state/wallets.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"wallets.js","sourceRoot":"","sources":["../../../source/contracts/state/wallets.ts"],"names":[],"mappings":""}
|
@@ -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"}
|
@@ -2,13 +2,12 @@ import { Transaction } from "../crypto/index.js";
|
|
2
2
|
import { SenderMempool } from "./sender-mempool.js";
|
3
3
|
export interface Mempool {
|
4
4
|
getSize(): number;
|
5
|
-
hasSenderMempool(
|
6
|
-
getSenderMempool(
|
5
|
+
hasSenderMempool(address: string): boolean;
|
6
|
+
getSenderMempool(address: string): SenderMempool;
|
7
7
|
getSenderMempools(): Iterable<SenderMempool>;
|
8
8
|
addTransaction(transaction: Transaction): Promise<void>;
|
9
|
-
removeTransaction(
|
10
|
-
|
11
|
-
fixInvalidStates(): Promise<Transaction[]>;
|
9
|
+
removeTransaction(address: string, id: string): 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,
|
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"}
|
@@ -5,8 +5,8 @@ export interface SenderMempool {
|
|
5
5
|
getFromEarliest(): Iterable<Transaction>;
|
6
6
|
getFromLatest(): Iterable<Transaction>;
|
7
7
|
addTransaction(transaction: Transaction): Promise<void>;
|
8
|
-
removeTransaction(
|
9
|
-
|
8
|
+
removeTransaction(hash: string): Transaction[];
|
9
|
+
reAddTransactions(): Promise<Transaction[]>;
|
10
10
|
}
|
11
|
-
export type SenderMempoolFactory = (
|
11
|
+
export type SenderMempoolFactory = (address: string, legacyAddress?: string) => Promise<SenderMempool>;
|
12
12
|
//# 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;IAElB,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,
|
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;IAElB,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,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,8 @@
|
|
1
1
|
import { Transaction } from "../crypto/transactions.js";
|
2
2
|
export interface SenderState {
|
3
|
-
configure(
|
3
|
+
configure(address: string, legacyAddress?: string): Promise<SenderState>;
|
4
|
+
reset(): Promise<void>;
|
4
5
|
apply(transaction: Transaction): Promise<void>;
|
6
|
+
revert(transaction: Transaction): void;
|
5
7
|
}
|
6
8
|
//# 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,
|
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,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;CACvC"}
|
@@ -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[]): 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,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,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): 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,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACrE,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,KAAK,IAAI,IAAI,CAAC;CACd"}
|
@@ -1,23 +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
|
-
import { StoreChange } from "../state/index.js";
|
6
4
|
import { KeyValuePair } from "../types/index.js";
|
7
|
-
export
|
8
|
-
}
|
5
|
+
export type WorkerFlags = KeyValuePair;
|
9
6
|
export interface WorkerScriptHandler {
|
10
7
|
boot(flags: WorkerFlags): Promise<void>;
|
11
8
|
getTransactions(): Promise<string[]>;
|
12
|
-
|
13
|
-
commit(
|
14
|
-
block: string;
|
15
|
-
failedTransactions: string[];
|
16
|
-
store: StoreChange;
|
17
|
-
}): Promise<void>;
|
9
|
+
removeTransaction(address: string, id: string): Promise<void>;
|
10
|
+
commit(height: number, sendersAddresses: string[]): Promise<void>;
|
18
11
|
setPeer(ip: string): Promise<void>;
|
19
12
|
forgetPeer(ip: string): Promise<void>;
|
20
|
-
start(): Promise<void>;
|
13
|
+
start(height: number): Promise<void>;
|
21
14
|
reloadWebhooks(): Promise<void>;
|
22
15
|
}
|
23
16
|
export type WorkerFactory = () => Worker;
|
@@ -26,7 +19,6 @@ export type WorkerSubprocessFactory = () => WorkerSubprocess;
|
|
26
19
|
export interface Worker extends Omit<WorkerScriptHandler, "commit" | "getTransactions">, CommitHandler, EventListener {
|
27
20
|
getQueueSize(): number;
|
28
21
|
kill(): Promise<number>;
|
29
|
-
setFailedTransactions(transactions: Transaction[]): void;
|
30
22
|
getTransactionBytes(): Promise<Buffer[]>;
|
31
23
|
registerEventHandler(event: string, callback: EventCallback<any>): void;
|
32
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,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,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,52 +1,36 @@
|
|
1
1
|
import { MultiSignatureAsset, Transaction, TransactionConstructor, TransactionData } from "./crypto/index.js";
|
2
2
|
import { BlockContext, CommitKey, Instance, TransactionReceipt } from "./evm/index.js";
|
3
|
-
import {
|
3
|
+
import { Wallet } from "./state/index.js";
|
4
4
|
export type TransactionHandlerConstructor = new () => TransactionHandler;
|
5
5
|
export type TransactionHandlerContext = {
|
6
|
-
walletRepository: WalletRepository;
|
7
6
|
evm: {
|
8
7
|
instance: Instance;
|
9
8
|
blockContext: BlockContext;
|
10
9
|
};
|
11
10
|
};
|
12
|
-
export interface TransactionApplyResult {
|
13
|
-
gasUsed: number;
|
14
|
-
receipt?: TransactionReceipt;
|
15
|
-
}
|
16
11
|
export interface TransactionHandler {
|
17
|
-
verify(
|
18
|
-
throwIfCannotBeApplied(
|
19
|
-
|
20
|
-
apply(context: TransactionHandlerContext, transaction: Transaction): Promise<TransactionApplyResult>;
|
21
|
-
applyToSender(context: TransactionHandlerContext, transaction: Transaction): Promise<TransactionApplyResult>;
|
22
|
-
applyToRecipient(context: TransactionHandlerContext, transaction: Transaction): Promise<TransactionApplyResult>;
|
12
|
+
verify(transaction: Transaction): Promise<boolean>;
|
13
|
+
throwIfCannotBeApplied(transaction: Transaction, sender: Wallet, evm: Instance): Promise<void>;
|
14
|
+
apply(context: TransactionHandlerContext, transaction: Transaction): Promise<TransactionReceipt>;
|
23
15
|
emitEvents(transaction: Transaction): void;
|
24
16
|
verifySignatures(wallet: Wallet, transaction: TransactionData, multiSignature?: MultiSignatureAsset): Promise<boolean>;
|
25
17
|
getConstructor(): TransactionConstructor;
|
26
18
|
dependencies(): ReadonlyArray<TransactionHandlerConstructor>;
|
27
|
-
walletAttributes(): ReadonlyArray<{
|
28
|
-
name: string;
|
29
|
-
type: AttributeType;
|
30
|
-
}>;
|
31
19
|
isActivated(): Promise<boolean>;
|
32
20
|
}
|
33
21
|
export interface TransactionHandlerRegistry {
|
34
|
-
initialize(): void;
|
35
22
|
getRegisteredHandlers(): TransactionHandler[];
|
36
|
-
getRegisteredHandlerByType(
|
23
|
+
getRegisteredHandlerByType(type: number, version?: number): TransactionHandler;
|
37
24
|
getActivatedHandlers(): Promise<TransactionHandler[]>;
|
38
|
-
getActivatedHandlerByType(
|
25
|
+
getActivatedHandlerByType(type: number, version?: number): Promise<TransactionHandler>;
|
39
26
|
getActivatedHandlerForData(transactionData: TransactionData): Promise<TransactionHandler>;
|
40
27
|
}
|
41
28
|
export interface TransactionHandlerProvider {
|
42
29
|
isRegistrationRequired(): boolean;
|
43
30
|
registerHandlers(): void;
|
44
31
|
}
|
45
|
-
export interface InternalTransactionType {
|
46
|
-
toString(): string;
|
47
|
-
}
|
48
32
|
export interface TransactionTypeFactory {
|
49
|
-
initialize(transactionTypes: Map<
|
33
|
+
initialize(transactionTypes: Map<number, TransactionConstructor>): any;
|
50
34
|
create(data: TransactionData): Transaction;
|
51
35
|
get(type: number, typeGroup?: number, version?: number): TransactionConstructor;
|
52
36
|
}
|
@@ -54,14 +38,11 @@ export interface TransactionValidatorContext {
|
|
54
38
|
commitKey: CommitKey;
|
55
39
|
gasLimit: number;
|
56
40
|
timestamp: number;
|
57
|
-
|
41
|
+
generatorAddress: string;
|
58
42
|
}
|
59
43
|
export interface TransactionValidator {
|
60
44
|
getEvm(): Instance;
|
61
|
-
validate(context: TransactionValidatorContext, transaction: Transaction): Promise<
|
62
|
-
}
|
63
|
-
export interface TransactionValidatorResult {
|
64
|
-
readonly gasUsed: number;
|
45
|
+
validate(context: TransactionValidatorContext, transaction: Transaction): Promise<TransactionReceipt>;
|
65
46
|
}
|
66
47
|
export type TransactionValidatorFactory = () => TransactionValidator;
|
67
48
|
//# sourceMappingURL=transactions.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../source/contracts/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../source/contracts/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9G,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;IAE3C,gBAAgB,CACf,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,eAAe,EAC5B,cAAc,CAAC,EAAE,mBAAmB,GAClC,OAAO,CAAC,OAAO,CAAC,CAAC;IAGpB,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"}
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import type { CacheStore
|
1
|
+
import type { CacheStore } from "../kernel/cache.js";
|
2
|
+
import type { Pipeline } from "../kernel/pipeline.js";
|
3
|
+
import type { Queue } from "../kernel/queue.js";
|
2
4
|
export type { Class, JsonObject, JsonValue, PackageJson, Primitive } from "type-fest";
|
3
5
|
export type KeyValuePair<T = any> = Record<string, T>;
|
4
6
|
export type ActionArguments = Record<string, any>;
|
5
7
|
export type CacheFactory<K, T> = <K, T>() => CacheStore<K, T>;
|
6
|
-
export type PipelineFactory = () => Pipeline
|
8
|
+
export type PipelineFactory<T> = () => Pipeline<T>;
|
7
9
|
export type QueueFactory = () => Queue;
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|