@clonegod/ttd-base-common 1.0.5 → 1.0.7
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/dist/trade/send/ankr_base.d.ts +5 -0
- package/dist/trade/send/ankr_base.js +48 -0
- package/dist/trade/send/blockpi_base.d.ts +5 -0
- package/dist/trade/send/blockpi_base.js +48 -0
- package/dist/trade/send/chainstack_base.d.ts +5 -0
- package/dist/trade/send/chainstack_base.js +48 -0
- package/dist/trade/send/getblock_base.d.ts +5 -0
- package/dist/trade/send/getblock_base.js +48 -0
- package/dist/trade/send/index.d.ts +12 -0
- package/dist/trade/send/index.js +12 -0
- package/dist/trade/send/moralis_base.d.ts +5 -0
- package/dist/trade/send/moralis_base.js +48 -0
- package/dist/trade/send/onerpc_base.d.ts +5 -0
- package/dist/trade/send/onerpc_base.js +48 -0
- package/dist/trade/send/send_tx.d.ts +7 -1
- package/dist/trade/send/send_tx.js +55 -1
- package/package.json +2 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AnkrBase = void 0;
|
|
16
|
+
const dist_1 = require("@clonegod/ttd-core/dist");
|
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
|
18
|
+
class AnkrBase {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.endpoint = process.env.BASE_ANKR_RPC_ENDPOINT || '';
|
|
21
|
+
}
|
|
22
|
+
sendTransaction(signedTx) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
try {
|
|
25
|
+
const response = yield axios_1.default.post(this.endpoint, {
|
|
26
|
+
jsonrpc: '2.0',
|
|
27
|
+
method: 'eth_sendRawTransaction',
|
|
28
|
+
params: [signedTx],
|
|
29
|
+
id: 1
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json'
|
|
33
|
+
},
|
|
34
|
+
timeout: 3000
|
|
35
|
+
});
|
|
36
|
+
if (response.data.error) {
|
|
37
|
+
throw new Error(`Ankr RPC error: ${response.data.error.message}`);
|
|
38
|
+
}
|
|
39
|
+
return response.data.result;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
(0, dist_1.log_info)(`Ankr transaction sending failed`, { error: error.message });
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.AnkrBase = AnkrBase;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.BlockpiBase = void 0;
|
|
16
|
+
const dist_1 = require("@clonegod/ttd-core/dist");
|
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
|
18
|
+
class BlockpiBase {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.endpoint = process.env.BASE_BLOCKPI_RPC_ENDPOINT || '';
|
|
21
|
+
}
|
|
22
|
+
sendTransaction(signedTx) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
try {
|
|
25
|
+
const response = yield axios_1.default.post(this.endpoint, {
|
|
26
|
+
jsonrpc: '2.0',
|
|
27
|
+
method: 'eth_sendRawTransaction',
|
|
28
|
+
params: [signedTx],
|
|
29
|
+
id: 1
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json'
|
|
33
|
+
},
|
|
34
|
+
timeout: 3000
|
|
35
|
+
});
|
|
36
|
+
if (response.data.error) {
|
|
37
|
+
throw new Error(`BlockPI RPC error: ${response.data.error.message}`);
|
|
38
|
+
}
|
|
39
|
+
return response.data.result;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
(0, dist_1.log_info)(`BlockPI transaction sending failed`, { error: error.message });
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.BlockpiBase = BlockpiBase;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ChainstackBase = void 0;
|
|
16
|
+
const dist_1 = require("@clonegod/ttd-core/dist");
|
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
|
18
|
+
class ChainstackBase {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.endpoint = process.env.BASE_CHAINSTACK_RPC_ENDPOINT || '';
|
|
21
|
+
}
|
|
22
|
+
sendTransaction(signedTx) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
try {
|
|
25
|
+
const response = yield axios_1.default.post(this.endpoint, {
|
|
26
|
+
jsonrpc: '2.0',
|
|
27
|
+
method: 'eth_sendRawTransaction',
|
|
28
|
+
params: [signedTx],
|
|
29
|
+
id: 1
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json'
|
|
33
|
+
},
|
|
34
|
+
timeout: 3000
|
|
35
|
+
});
|
|
36
|
+
if (response.data.error) {
|
|
37
|
+
throw new Error(`Chainstack RPC error: ${response.data.error.message}`);
|
|
38
|
+
}
|
|
39
|
+
return response.data.result;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
(0, dist_1.log_info)(`Chainstack transaction sending failed`, { error: error.message });
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.ChainstackBase = ChainstackBase;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GetblockBase = void 0;
|
|
16
|
+
const dist_1 = require("@clonegod/ttd-core/dist");
|
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
|
18
|
+
class GetblockBase {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.endpoint = process.env.BASE_GETBLOCK_RPC_ENDPOINT || '';
|
|
21
|
+
}
|
|
22
|
+
sendTransaction(signedTx) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
try {
|
|
25
|
+
const response = yield axios_1.default.post(this.endpoint, {
|
|
26
|
+
jsonrpc: '2.0',
|
|
27
|
+
method: 'eth_sendRawTransaction',
|
|
28
|
+
params: [signedTx],
|
|
29
|
+
id: 1
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json'
|
|
33
|
+
},
|
|
34
|
+
timeout: 3000
|
|
35
|
+
});
|
|
36
|
+
if (response.data.error) {
|
|
37
|
+
throw new Error(`GetBlock RPC error: ${response.data.error.message}`);
|
|
38
|
+
}
|
|
39
|
+
return response.data.result;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
(0, dist_1.log_info)(`GetBlock transaction sending failed`, { error: error.message });
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.GetblockBase = GetblockBase;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
export * from './send_tx';
|
|
2
|
+
export * from './alchemy_base';
|
|
3
|
+
export * from './base_rpc';
|
|
4
|
+
export * from './bloxroute_base';
|
|
5
|
+
export * from './drpc_base';
|
|
6
|
+
export * from './quicknode_base';
|
|
7
|
+
export * from './infura_base';
|
|
8
|
+
export * from './blockpi_base';
|
|
9
|
+
export * from './getblock_base';
|
|
10
|
+
export * from './ankr_base';
|
|
11
|
+
export * from './chainstack_base';
|
|
12
|
+
export * from './moralis_base';
|
|
13
|
+
export * from './onerpc_base';
|
|
2
14
|
export declare enum BASE_EOA_ADDRESS {
|
|
3
15
|
}
|
package/dist/trade/send/index.js
CHANGED
|
@@ -16,6 +16,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.BASE_EOA_ADDRESS = void 0;
|
|
18
18
|
__exportStar(require("./send_tx"), exports);
|
|
19
|
+
__exportStar(require("./alchemy_base"), exports);
|
|
20
|
+
__exportStar(require("./base_rpc"), exports);
|
|
21
|
+
__exportStar(require("./bloxroute_base"), exports);
|
|
22
|
+
__exportStar(require("./drpc_base"), exports);
|
|
23
|
+
__exportStar(require("./quicknode_base"), exports);
|
|
24
|
+
__exportStar(require("./infura_base"), exports);
|
|
25
|
+
__exportStar(require("./blockpi_base"), exports);
|
|
26
|
+
__exportStar(require("./getblock_base"), exports);
|
|
27
|
+
__exportStar(require("./ankr_base"), exports);
|
|
28
|
+
__exportStar(require("./chainstack_base"), exports);
|
|
29
|
+
__exportStar(require("./moralis_base"), exports);
|
|
30
|
+
__exportStar(require("./onerpc_base"), exports);
|
|
19
31
|
var BASE_EOA_ADDRESS;
|
|
20
32
|
(function (BASE_EOA_ADDRESS) {
|
|
21
33
|
})(BASE_EOA_ADDRESS || (exports.BASE_EOA_ADDRESS = BASE_EOA_ADDRESS = {}));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MoralisBase = void 0;
|
|
16
|
+
const dist_1 = require("@clonegod/ttd-core/dist");
|
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
|
18
|
+
class MoralisBase {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.endpoint = process.env.BASE_MORALIS_RPC_ENDPOINT || '';
|
|
21
|
+
}
|
|
22
|
+
sendTransaction(signedTx) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
try {
|
|
25
|
+
const response = yield axios_1.default.post(this.endpoint, {
|
|
26
|
+
jsonrpc: '2.0',
|
|
27
|
+
method: 'eth_sendRawTransaction',
|
|
28
|
+
params: [signedTx],
|
|
29
|
+
id: 1
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json'
|
|
33
|
+
},
|
|
34
|
+
timeout: 3000
|
|
35
|
+
});
|
|
36
|
+
if (response.data.error) {
|
|
37
|
+
throw new Error(`Moralis RPC error: ${response.data.error.message}`);
|
|
38
|
+
}
|
|
39
|
+
return response.data.result;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
(0, dist_1.log_info)(`Moralis transaction sending failed`, { error: error.message });
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.MoralisBase = MoralisBase;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.OneRpcBase = void 0;
|
|
16
|
+
const dist_1 = require("@clonegod/ttd-core/dist");
|
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
|
18
|
+
class OneRpcBase {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.endpoint = process.env.BASE_1RPC_RPC_ENDPOINT || '';
|
|
21
|
+
}
|
|
22
|
+
sendTransaction(signedTx) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
try {
|
|
25
|
+
const response = yield axios_1.default.post(this.endpoint, {
|
|
26
|
+
jsonrpc: '2.0',
|
|
27
|
+
method: 'eth_sendRawTransaction',
|
|
28
|
+
params: [signedTx],
|
|
29
|
+
id: 1
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json'
|
|
33
|
+
},
|
|
34
|
+
timeout: 3000
|
|
35
|
+
});
|
|
36
|
+
if (response.data.error) {
|
|
37
|
+
throw new Error(`1RPC error: ${response.data.error.message}`);
|
|
38
|
+
}
|
|
39
|
+
return response.data.result;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
(0, dist_1.log_info)(`1RPC transaction sending failed`, { error: error.message });
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.OneRpcBase = OneRpcBase;
|
|
@@ -2,10 +2,16 @@ import { AppConfig } from "@clonegod/ttd-core/dist";
|
|
|
2
2
|
export declare class BaseTransactionSender {
|
|
3
3
|
private rpc;
|
|
4
4
|
private quicknode;
|
|
5
|
-
private bloxroute;
|
|
6
5
|
private alchemy;
|
|
7
6
|
private infura;
|
|
8
7
|
private drpc;
|
|
8
|
+
private blockpi;
|
|
9
|
+
private getblock;
|
|
10
|
+
private ankr;
|
|
11
|
+
private chainstack;
|
|
12
|
+
private oneRpc;
|
|
13
|
+
private moralis;
|
|
14
|
+
private bloxroute;
|
|
9
15
|
constructor(appConfig: AppConfig);
|
|
10
16
|
sendTransaction(signedMainTx: string, eoa_tip_transaction: (eoa_address: string) => Promise<string>, order_trace_id: string): Promise<string[]>;
|
|
11
17
|
}
|
|
@@ -17,14 +17,26 @@ const bloxroute_base_1 = require("./bloxroute_base");
|
|
|
17
17
|
const alchemy_base_1 = require("./alchemy_base");
|
|
18
18
|
const infura_base_1 = require("./infura_base");
|
|
19
19
|
const drpc_base_1 = require("./drpc_base");
|
|
20
|
+
const blockpi_base_1 = require("./blockpi_base");
|
|
21
|
+
const getblock_base_1 = require("./getblock_base");
|
|
22
|
+
const ankr_base_1 = require("./ankr_base");
|
|
23
|
+
const chainstack_base_1 = require("./chainstack_base");
|
|
24
|
+
const moralis_base_1 = require("./moralis_base");
|
|
25
|
+
const onerpc_base_1 = require("./onerpc_base");
|
|
20
26
|
class BaseTransactionSender {
|
|
21
27
|
constructor(appConfig) {
|
|
22
28
|
this.rpc = new base_rpc_1.BaseRpc(appConfig.env_args.rpc_endpoint);
|
|
23
29
|
this.quicknode = new quicknode_base_1.QuickNodeBase();
|
|
24
|
-
this.bloxroute = new bloxroute_base_1.BloxrouteBase();
|
|
25
30
|
this.alchemy = new alchemy_base_1.AlchemyBase();
|
|
26
31
|
this.infura = new infura_base_1.InfuraBase();
|
|
27
32
|
this.drpc = new drpc_base_1.DrpcBase();
|
|
33
|
+
this.blockpi = new blockpi_base_1.BlockpiBase();
|
|
34
|
+
this.getblock = new getblock_base_1.GetblockBase();
|
|
35
|
+
this.ankr = new ankr_base_1.AnkrBase();
|
|
36
|
+
this.chainstack = new chainstack_base_1.ChainstackBase();
|
|
37
|
+
this.oneRpc = new onerpc_base_1.OneRpcBase();
|
|
38
|
+
this.moralis = new moralis_base_1.MoralisBase();
|
|
39
|
+
this.bloxroute = new bloxroute_base_1.BloxrouteBase();
|
|
28
40
|
}
|
|
29
41
|
sendTransaction(signedMainTx, eoa_tip_transaction, order_trace_id) {
|
|
30
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -64,6 +76,48 @@ class BaseTransactionSender {
|
|
|
64
76
|
return yield this.infura.sendTransaction(signedMainTx);
|
|
65
77
|
})
|
|
66
78
|
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Base BlockPI RPC',
|
|
81
|
+
enable: process.env.SEND_TX_BASE_BLOCKPI_RPC === 'true',
|
|
82
|
+
send: () => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return yield this.blockpi.sendTransaction(signedMainTx);
|
|
84
|
+
})
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'Base GetBlock RPC',
|
|
88
|
+
enable: process.env.SEND_TX_BASE_GETBLOCK_RPC === 'true',
|
|
89
|
+
send: () => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
return yield this.getblock.sendTransaction(signedMainTx);
|
|
91
|
+
})
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'Base Ankr RPC',
|
|
95
|
+
enable: process.env.SEND_TX_BASE_ANKR_RPC === 'true',
|
|
96
|
+
send: () => __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
return yield this.ankr.sendTransaction(signedMainTx);
|
|
98
|
+
})
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'Base Chainstack RPC',
|
|
102
|
+
enable: process.env.SEND_TX_BASE_CHAINSTACK_RPC === 'true',
|
|
103
|
+
send: () => __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
return yield this.chainstack.sendTransaction(signedMainTx);
|
|
105
|
+
})
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'Base Moralis RPC',
|
|
109
|
+
enable: process.env.SEND_TX_BASE_MORALIS_RPC === 'true',
|
|
110
|
+
send: () => __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return yield this.moralis.sendTransaction(signedMainTx);
|
|
112
|
+
})
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'Base 1RPC',
|
|
116
|
+
enable: process.env.SEND_TX_BASE_1RPC_RPC === 'true',
|
|
117
|
+
send: () => __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
return yield this.oneRpc.sendTransaction(signedMainTx);
|
|
119
|
+
})
|
|
120
|
+
},
|
|
67
121
|
{
|
|
68
122
|
name: 'BloXroute - Private Transaction',
|
|
69
123
|
enable: process.env.SEND_TX_BLOXROUTE_PRIVATE === 'true',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clonegod/ttd-base-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Base common library",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"push": "npm run build && npm publish"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@clonegod/ttd-core": "2.0.
|
|
17
|
+
"@clonegod/ttd-core": "2.0.46",
|
|
18
18
|
"axios": "^1.11.00",
|
|
19
19
|
"dotenv": "^16.4.7",
|
|
20
20
|
"ethers": "^5.8.0"
|