@keplr-wallet/background 0.12.313 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +1 -0
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/build/keyring-cosmos/service.d.ts +10 -0
- package/build/keyring-cosmos/service.js +100 -0
- package/build/keyring-cosmos/service.js.map +1 -1
- package/build/keyring-ethereum/service.d.ts +5 -0
- package/build/keyring-ethereum/service.js +66 -0
- package/build/keyring-ethereum/service.js.map +1 -1
- package/build/recent-send-history/api.d.ts +31 -0
- package/build/recent-send-history/api.js +97 -0
- package/build/recent-send-history/api.js.map +1 -0
- package/build/recent-send-history/handler.js +36 -0
- package/build/recent-send-history/handler.js.map +1 -1
- package/build/recent-send-history/init.js +5 -0
- package/build/recent-send-history/init.js.map +1 -1
- package/build/recent-send-history/messages.d.ts +76 -1
- package/build/recent-send-history/messages.js +121 -1
- package/build/recent-send-history/messages.js.map +1 -1
- package/build/recent-send-history/service.d.ts +262 -9
- package/build/recent-send-history/service.js +2103 -812
- package/build/recent-send-history/service.js.map +1 -1
- package/build/recent-send-history/types.d.ts +214 -22
- package/build/recent-send-history/types.js +21 -0
- package/build/recent-send-history/types.js.map +1 -1
- package/build/tx/service.d.ts +2 -0
- package/build/tx/service.js +35 -0
- package/build/tx/service.js.map +1 -1
- package/build/tx-ethereum/service.d.ts +2 -0
- package/build/tx-ethereum/service.js +42 -0
- package/build/tx-ethereum/service.js.map +1 -1
- package/build/tx-executor/constants.d.ts +1 -0
- package/build/tx-executor/constants.js +5 -0
- package/build/tx-executor/constants.js.map +1 -0
- package/build/tx-executor/handler.d.ts +3 -0
- package/build/tx-executor/handler.js +45 -0
- package/build/tx-executor/handler.js.map +1 -0
- package/build/tx-executor/index.d.ts +3 -0
- package/build/tx-executor/index.js +20 -0
- package/build/tx-executor/index.js.map +1 -0
- package/build/tx-executor/init.d.ts +3 -0
- package/build/tx-executor/init.js +14 -0
- package/build/tx-executor/init.js.map +1 -0
- package/build/tx-executor/internal.d.ts +4 -0
- package/build/tx-executor/internal.js +24 -0
- package/build/tx-executor/internal.js.map +1 -0
- package/build/tx-executor/messages.d.ts +53 -0
- package/build/tx-executor/messages.js +116 -0
- package/build/tx-executor/messages.js.map +1 -0
- package/build/tx-executor/service.d.ts +67 -0
- package/build/tx-executor/service.js +715 -0
- package/build/tx-executor/service.js.map +1 -0
- package/build/tx-executor/types.d.ts +105 -0
- package/build/tx-executor/types.js +33 -0
- package/build/tx-executor/types.js.map +1 -0
- package/build/tx-executor/utils/cosmos.d.ts +59 -0
- package/build/tx-executor/utils/cosmos.js +526 -0
- package/build/tx-executor/utils/cosmos.js.map +1 -0
- package/build/tx-executor/utils/evm.d.ts +4 -0
- package/build/tx-executor/utils/evm.js +236 -0
- package/build/tx-executor/utils/evm.js.map +1 -0
- package/package.json +13 -13
- package/src/index.ts +24 -1
- package/src/keyring-cosmos/service.ts +151 -0
- package/src/keyring-ethereum/service.ts +103 -6
- package/src/recent-send-history/api.ts +119 -0
- package/src/recent-send-history/handler.ts +84 -0
- package/src/recent-send-history/init.ts +10 -0
- package/src/recent-send-history/messages.ts +163 -1
- package/src/recent-send-history/service.ts +3042 -1153
- package/src/recent-send-history/types.ts +268 -31
- package/src/tx/service.ts +41 -0
- package/src/tx-ethereum/service.ts +57 -0
- package/src/tx-executor/constants.ts +1 -0
- package/src/tx-executor/handler.ts +71 -0
- package/src/tx-executor/index.ts +3 -0
- package/src/tx-executor/init.ts +20 -0
- package/src/tx-executor/internal.ts +9 -0
- package/src/tx-executor/messages.ts +157 -0
- package/src/tx-executor/service.ts +1025 -0
- package/src/tx-executor/types.ts +161 -0
- package/src/tx-executor/utils/cosmos.ts +771 -0
- package/src/tx-executor/utils/evm.ts +310 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Message } from "@keplr-wallet/router";
|
|
2
|
+
import { BackgroundTx, BackgroundTxStatus, TxExecutionType, TxExecution, ExecutionTypeToHistoryData, TxExecutionResult, IBCSwapMinimalTrackingData } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Record and execute multiple transactions
|
|
5
|
+
* execution id is returned if the transactions are recorded successfully
|
|
6
|
+
* and the execution will be started automatically after the transactions are recorded.
|
|
7
|
+
*/
|
|
8
|
+
export declare class RecordAndExecuteTxsMsg<T extends TxExecutionType = TxExecutionType> extends Message<TxExecutionResult> {
|
|
9
|
+
readonly vaultId: string;
|
|
10
|
+
readonly executionType: T;
|
|
11
|
+
readonly txs: (BackgroundTx & {
|
|
12
|
+
status: BackgroundTxStatus.PENDING | BackgroundTxStatus.CONFIRMED;
|
|
13
|
+
})[];
|
|
14
|
+
readonly executableChainIds: string[];
|
|
15
|
+
readonly historyData?: (T extends TxExecutionType.UNDEFINED ? undefined : ExecutionTypeToHistoryData[T]) | undefined;
|
|
16
|
+
readonly historyTxIndex?: number | undefined;
|
|
17
|
+
static type(): string;
|
|
18
|
+
constructor(vaultId: string, executionType: T, txs: (BackgroundTx & {
|
|
19
|
+
status: BackgroundTxStatus.PENDING | BackgroundTxStatus.CONFIRMED;
|
|
20
|
+
})[], executableChainIds: string[], historyData?: (T extends TxExecutionType.UNDEFINED ? undefined : ExecutionTypeToHistoryData[T]) | undefined, historyTxIndex?: number | undefined);
|
|
21
|
+
validateBasic(): void;
|
|
22
|
+
approveExternal(): boolean;
|
|
23
|
+
route(): string;
|
|
24
|
+
type(): string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Resume existing direct transactions by execution id and transaction index
|
|
28
|
+
* This message is used to resume the execution of direct transactions that were paused by waiting for the asset to be bridged or other reasons.
|
|
29
|
+
*/
|
|
30
|
+
export declare class ResumeTxMsg extends Message<TxExecutionResult> {
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly txIndex: number;
|
|
33
|
+
readonly signedTx: string;
|
|
34
|
+
readonly ibcSwapData?: IBCSwapMinimalTrackingData | undefined;
|
|
35
|
+
static type(): string;
|
|
36
|
+
constructor(id: string, txIndex: number, signedTx: string, ibcSwapData?: IBCSwapMinimalTrackingData | undefined);
|
|
37
|
+
validateBasic(): void;
|
|
38
|
+
approveExternal(): boolean;
|
|
39
|
+
route(): string;
|
|
40
|
+
type(): string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get execution data by execution id
|
|
44
|
+
*/
|
|
45
|
+
export declare class GetTxExecutionMsg extends Message<TxExecution | undefined> {
|
|
46
|
+
readonly id: string;
|
|
47
|
+
static type(): string;
|
|
48
|
+
constructor(id: string);
|
|
49
|
+
validateBasic(): void;
|
|
50
|
+
approveExternal(): boolean;
|
|
51
|
+
route(): string;
|
|
52
|
+
type(): string;
|
|
53
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTxExecutionMsg = exports.ResumeTxMsg = exports.RecordAndExecuteTxsMsg = void 0;
|
|
4
|
+
const router_1 = require("@keplr-wallet/router");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
/**
|
|
7
|
+
* Record and execute multiple transactions
|
|
8
|
+
* execution id is returned if the transactions are recorded successfully
|
|
9
|
+
* and the execution will be started automatically after the transactions are recorded.
|
|
10
|
+
*/
|
|
11
|
+
class RecordAndExecuteTxsMsg extends router_1.Message {
|
|
12
|
+
static type() {
|
|
13
|
+
return "record-and-execute-txs";
|
|
14
|
+
}
|
|
15
|
+
constructor(vaultId, executionType, txs, executableChainIds, historyData, historyTxIndex) {
|
|
16
|
+
super();
|
|
17
|
+
this.vaultId = vaultId;
|
|
18
|
+
this.executionType = executionType;
|
|
19
|
+
this.txs = txs;
|
|
20
|
+
this.executableChainIds = executableChainIds;
|
|
21
|
+
this.historyData = historyData;
|
|
22
|
+
this.historyTxIndex = historyTxIndex;
|
|
23
|
+
}
|
|
24
|
+
validateBasic() {
|
|
25
|
+
if (!this.vaultId) {
|
|
26
|
+
throw new router_1.KeplrError("direct-tx-executor", 110, "vaultId is empty");
|
|
27
|
+
}
|
|
28
|
+
if (!this.executionType) {
|
|
29
|
+
throw new router_1.KeplrError("direct-tx-executor", 111, "executionType is empty");
|
|
30
|
+
}
|
|
31
|
+
if (!this.txs || this.txs.length === 0) {
|
|
32
|
+
throw new router_1.KeplrError("direct-tx-executor", 112, "txs is empty");
|
|
33
|
+
}
|
|
34
|
+
if (!this.executableChainIds || this.executableChainIds.length === 0) {
|
|
35
|
+
throw new router_1.KeplrError("direct-tx-executor", 113, "executableChainIds is empty");
|
|
36
|
+
}
|
|
37
|
+
if (this.historyTxIndex != null && this.historyTxIndex < 0) {
|
|
38
|
+
throw new router_1.KeplrError("direct-tx-executor", 114, "historyTxIndex is invalid");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
approveExternal() {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
route() {
|
|
45
|
+
return constants_1.ROUTE;
|
|
46
|
+
}
|
|
47
|
+
type() {
|
|
48
|
+
return RecordAndExecuteTxsMsg.type();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.RecordAndExecuteTxsMsg = RecordAndExecuteTxsMsg;
|
|
52
|
+
/**
|
|
53
|
+
* Resume existing direct transactions by execution id and transaction index
|
|
54
|
+
* This message is used to resume the execution of direct transactions that were paused by waiting for the asset to be bridged or other reasons.
|
|
55
|
+
*/
|
|
56
|
+
class ResumeTxMsg extends router_1.Message {
|
|
57
|
+
static type() {
|
|
58
|
+
return "resume-tx";
|
|
59
|
+
}
|
|
60
|
+
constructor(id, txIndex, signedTx, ibcSwapData) {
|
|
61
|
+
super();
|
|
62
|
+
this.id = id;
|
|
63
|
+
this.txIndex = txIndex;
|
|
64
|
+
this.signedTx = signedTx;
|
|
65
|
+
this.ibcSwapData = ibcSwapData;
|
|
66
|
+
}
|
|
67
|
+
validateBasic() {
|
|
68
|
+
if (!this.id) {
|
|
69
|
+
throw new router_1.KeplrError("direct-tx-executor", 115, "id is empty");
|
|
70
|
+
}
|
|
71
|
+
if (this.txIndex != null && this.txIndex < 0) {
|
|
72
|
+
throw new router_1.KeplrError("direct-tx-executor", 116, "txIndex is invalid");
|
|
73
|
+
}
|
|
74
|
+
if (this.signedTx != null && this.signedTx.length === 0) {
|
|
75
|
+
throw new router_1.KeplrError("direct-tx-executor", 117, "signedTx is empty");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
approveExternal() {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
route() {
|
|
82
|
+
return constants_1.ROUTE;
|
|
83
|
+
}
|
|
84
|
+
type() {
|
|
85
|
+
return ResumeTxMsg.type();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.ResumeTxMsg = ResumeTxMsg;
|
|
89
|
+
/**
|
|
90
|
+
* Get execution data by execution id
|
|
91
|
+
*/
|
|
92
|
+
class GetTxExecutionMsg extends router_1.Message {
|
|
93
|
+
static type() {
|
|
94
|
+
return "get-tx-execution";
|
|
95
|
+
}
|
|
96
|
+
constructor(id) {
|
|
97
|
+
super();
|
|
98
|
+
this.id = id;
|
|
99
|
+
}
|
|
100
|
+
validateBasic() {
|
|
101
|
+
if (!this.id) {
|
|
102
|
+
throw new router_1.KeplrError("direct-tx-executor", 115, "id is empty");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
approveExternal() {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
route() {
|
|
109
|
+
return constants_1.ROUTE;
|
|
110
|
+
}
|
|
111
|
+
type() {
|
|
112
|
+
return GetTxExecutionMsg.type();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.GetTxExecutionMsg = GetTxExecutionMsg;
|
|
116
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/tx-executor/messages.ts"],"names":[],"mappings":";;;AAAA,iDAA2D;AA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,CAAC,IAAI;QAChB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,YAA4B,EAAU;QACpC,KAAK,EAAE,CAAC;QADkB,OAAE,GAAF,EAAE,CAAQ;IAEtC,CAAC;IAED,aAAa;QACX,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACZ,MAAM,IAAI,mBAAU,CAAC,oBAAoB,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC;SAChE;IACH,CAAC;IAEQ,eAAe;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK;QACH,OAAO,iBAAK,CAAC;IACf,CAAC;IAED,IAAI;QACF,OAAO,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;CACF;AA1BD,8CA0BC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { KVStore } from "@keplr-wallet/common";
|
|
2
|
+
import { ChainsService } from "../chains";
|
|
3
|
+
import { KeyRingCosmosService } from "../keyring-cosmos";
|
|
4
|
+
import { KeyRingEthereumService } from "../keyring-ethereum";
|
|
5
|
+
import { AnalyticsService } from "../analytics";
|
|
6
|
+
import { RecentSendHistoryService } from "../recent-send-history";
|
|
7
|
+
import { BackgroundTxService } from "../tx";
|
|
8
|
+
import { BackgroundTxEthereumService } from "../tx-ethereum";
|
|
9
|
+
import { Env } from "@keplr-wallet/router";
|
|
10
|
+
import { TxExecution, TxExecutionType, BackgroundTx, BackgroundTxStatus, ExecutionTypeToHistoryData, TxExecutionResult, PendingTxExecutionResult, IBCSwapMinimalTrackingData } from "./types";
|
|
11
|
+
import { EventBusSubscriber } from "@keplr-wallet/common";
|
|
12
|
+
import { TxExecutionEvent } from "./types";
|
|
13
|
+
export declare class BackgroundTxExecutorService {
|
|
14
|
+
protected readonly kvStore: KVStore;
|
|
15
|
+
protected readonly chainsService: ChainsService;
|
|
16
|
+
protected readonly keyRingCosmosService: KeyRingCosmosService;
|
|
17
|
+
protected readonly keyRingEthereumService: KeyRingEthereumService;
|
|
18
|
+
protected readonly backgroundTxService: BackgroundTxService;
|
|
19
|
+
protected readonly backgroundTxEthereumService: BackgroundTxEthereumService;
|
|
20
|
+
protected readonly analyticsService: AnalyticsService;
|
|
21
|
+
protected readonly recentSendHistoryService: RecentSendHistoryService;
|
|
22
|
+
protected readonly subscriber: EventBusSubscriber<TxExecutionEvent>;
|
|
23
|
+
protected recentTxExecutionSeq: number;
|
|
24
|
+
protected readonly recentTxExecutionMap: Map<string, TxExecution>;
|
|
25
|
+
constructor(kvStore: KVStore, chainsService: ChainsService, keyRingCosmosService: KeyRingCosmosService, keyRingEthereumService: KeyRingEthereumService, backgroundTxService: BackgroundTxService, backgroundTxEthereumService: BackgroundTxEthereumService, analyticsService: AnalyticsService, recentSendHistoryService: RecentSendHistoryService, subscriber: EventBusSubscriber<TxExecutionEvent>);
|
|
26
|
+
init(): Promise<void>;
|
|
27
|
+
protected handleTxExecutionEvent(event: TxExecutionEvent): void;
|
|
28
|
+
recordAndExecuteTxs<T extends TxExecutionType>(env: Env, vaultId: string, type: T, txs: (BackgroundTx & {
|
|
29
|
+
status: BackgroundTxStatus.PENDING | BackgroundTxStatus.CONFIRMED;
|
|
30
|
+
})[], executableChainIds: string[], historyData?: T extends TxExecutionType.UNDEFINED ? undefined : ExecutionTypeToHistoryData[T], historyTxIndex?: number): Promise<TxExecutionResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Execute blocked transactions by execution id and transaction index
|
|
33
|
+
*/
|
|
34
|
+
resumeTx(env: Env, id: string, txIndex: number, signedTx: string, ibcSwapData?: IBCSwapMinimalTrackingData): Promise<TxExecutionResult>;
|
|
35
|
+
protected executeTxs(id: string, options?: {
|
|
36
|
+
txIndex?: number;
|
|
37
|
+
signedTx?: string;
|
|
38
|
+
ibcSwapData?: IBCSwapMinimalTrackingData;
|
|
39
|
+
}): Promise<TxExecutionResult>;
|
|
40
|
+
/**
|
|
41
|
+
* Execute a pending transaction without modifying observable state.
|
|
42
|
+
* Returns the result which should be applied by the caller using runInAction.
|
|
43
|
+
* This reduces autorun trigger count by batching state updates.
|
|
44
|
+
*/
|
|
45
|
+
protected executePendingTx(vaultId: string, tx: BackgroundTx, executableChainIds: string[], preventAutoSign: boolean, providedSignedTx?: string): Promise<PendingTxExecutionResult>;
|
|
46
|
+
protected signTx(vaultId: string, tx: BackgroundTx): Promise<string>;
|
|
47
|
+
private signEvmTx;
|
|
48
|
+
private signCosmosTx;
|
|
49
|
+
protected broadcastTx(tx: BackgroundTx): Promise<string>;
|
|
50
|
+
private broadcastEvmTx;
|
|
51
|
+
private broadcastCosmosTx;
|
|
52
|
+
protected traceTx(tx: BackgroundTx): Promise<boolean>;
|
|
53
|
+
private traceEvmTx;
|
|
54
|
+
private traceCosmosTx;
|
|
55
|
+
/**
|
|
56
|
+
* Find the index of the most recent confirmed transaction with executable chain ids.
|
|
57
|
+
* Returns -1 if not found.
|
|
58
|
+
*/
|
|
59
|
+
private findHistoryTxIndex;
|
|
60
|
+
protected recordHistoryIfNeeded(execution: TxExecution): void;
|
|
61
|
+
getRecentTxExecutions(): TxExecution[];
|
|
62
|
+
getTxExecution(id: string): TxExecution | undefined;
|
|
63
|
+
protected removeTxExecution(id: string): void;
|
|
64
|
+
protected cleanupOldExecutions(): void;
|
|
65
|
+
private recordSwapV2HistoryErrorIfNeeded;
|
|
66
|
+
private clearSwapV2HistoryBackgroundExecutionIdIfNeeded;
|
|
67
|
+
}
|