@agnocon/piece-blockscout 0.1.6
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/LICENSE.MIT-AP +24 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/addresses/address-blocks-validated.d.ts +4 -0
- package/dist/lib/actions/addresses/address-blocks-validated.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-blocks-validated.js +36 -0
- package/dist/lib/actions/addresses/address-blocks-validated.js.map +1 -0
- package/dist/lib/actions/addresses/address-by-hash.d.ts +4 -0
- package/dist/lib/actions/addresses/address-by-hash.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-by-hash.js +36 -0
- package/dist/lib/actions/addresses/address-by-hash.js.map +1 -0
- package/dist/lib/actions/addresses/address-coin-balance-history-by-day.d.ts +4 -0
- package/dist/lib/actions/addresses/address-coin-balance-history-by-day.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-coin-balance-history-by-day.js +36 -0
- package/dist/lib/actions/addresses/address-coin-balance-history-by-day.js.map +1 -0
- package/dist/lib/actions/addresses/address-coin-balance-history.d.ts +4 -0
- package/dist/lib/actions/addresses/address-coin-balance-history.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-coin-balance-history.js +36 -0
- package/dist/lib/actions/addresses/address-coin-balance-history.js.map +1 -0
- package/dist/lib/actions/addresses/address-counters.d.ts +4 -0
- package/dist/lib/actions/addresses/address-counters.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-counters.js +36 -0
- package/dist/lib/actions/addresses/address-counters.js.map +1 -0
- package/dist/lib/actions/addresses/address-internal-transactions.d.ts +4 -0
- package/dist/lib/actions/addresses/address-internal-transactions.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-internal-transactions.js +36 -0
- package/dist/lib/actions/addresses/address-internal-transactions.js.map +1 -0
- package/dist/lib/actions/addresses/address-logs.d.ts +4 -0
- package/dist/lib/actions/addresses/address-logs.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-logs.js +36 -0
- package/dist/lib/actions/addresses/address-logs.js.map +1 -0
- package/dist/lib/actions/addresses/address-token-balances.d.ts +4 -0
- package/dist/lib/actions/addresses/address-token-balances.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-token-balances.js +36 -0
- package/dist/lib/actions/addresses/address-token-balances.js.map +1 -0
- package/dist/lib/actions/addresses/address-token-transfers.d.ts +4 -0
- package/dist/lib/actions/addresses/address-token-transfers.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-token-transfers.js +36 -0
- package/dist/lib/actions/addresses/address-token-transfers.js.map +1 -0
- package/dist/lib/actions/addresses/address-tokens.d.ts +4 -0
- package/dist/lib/actions/addresses/address-tokens.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-tokens.js +36 -0
- package/dist/lib/actions/addresses/address-tokens.js.map +1 -0
- package/dist/lib/actions/addresses/address-transactions.d.ts +4 -0
- package/dist/lib/actions/addresses/address-transactions.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-transactions.js +36 -0
- package/dist/lib/actions/addresses/address-transactions.js.map +1 -0
- package/dist/lib/actions/addresses/address-withdrawals.d.ts +4 -0
- package/dist/lib/actions/addresses/address-withdrawals.d.ts.map +1 -0
- package/dist/lib/actions/addresses/address-withdrawals.js +36 -0
- package/dist/lib/actions/addresses/address-withdrawals.js.map +1 -0
- package/dist/lib/actions/addresses/addresses.d.ts +2 -0
- package/dist/lib/actions/addresses/addresses.d.ts.map +1 -0
- package/dist/lib/actions/addresses/addresses.js +30 -0
- package/dist/lib/actions/addresses/addresses.js.map +1 -0
- package/dist/lib/actions/addresses/index.d.ts +14 -0
- package/dist/lib/actions/addresses/index.d.ts.map +1 -0
- package/dist/lib/actions/addresses/index.js +19 -0
- package/dist/lib/actions/addresses/index.js.map +1 -0
- package/dist/lib/actions/blocks/block-by-hash.d.ts +4 -0
- package/dist/lib/actions/blocks/block-by-hash.d.ts.map +1 -0
- package/dist/lib/actions/blocks/block-by-hash.js +36 -0
- package/dist/lib/actions/blocks/block-by-hash.js.map +1 -0
- package/dist/lib/actions/blocks/block-transactions.d.ts +4 -0
- package/dist/lib/actions/blocks/block-transactions.d.ts.map +1 -0
- package/dist/lib/actions/blocks/block-transactions.js +36 -0
- package/dist/lib/actions/blocks/block-transactions.js.map +1 -0
- package/dist/lib/actions/blocks/block-withdrawals.d.ts +4 -0
- package/dist/lib/actions/blocks/block-withdrawals.d.ts.map +1 -0
- package/dist/lib/actions/blocks/block-withdrawals.js +36 -0
- package/dist/lib/actions/blocks/block-withdrawals.js.map +1 -0
- package/dist/lib/actions/blocks/blocks.d.ts +2 -0
- package/dist/lib/actions/blocks/blocks.d.ts.map +1 -0
- package/dist/lib/actions/blocks/blocks.js +30 -0
- package/dist/lib/actions/blocks/blocks.js.map +1 -0
- package/dist/lib/actions/blocks/index.d.ts +6 -0
- package/dist/lib/actions/blocks/index.d.ts.map +1 -0
- package/dist/lib/actions/blocks/index.js +11 -0
- package/dist/lib/actions/blocks/index.js.map +1 -0
- package/dist/lib/actions/blocks/main-page-blocks.d.ts +2 -0
- package/dist/lib/actions/blocks/main-page-blocks.d.ts.map +1 -0
- package/dist/lib/actions/blocks/main-page-blocks.js +30 -0
- package/dist/lib/actions/blocks/main-page-blocks.js.map +1 -0
- package/dist/lib/actions/index.d.ts +7 -0
- package/dist/lib/actions/index.d.ts.map +1 -0
- package/dist/lib/actions/index.js +12 -0
- package/dist/lib/actions/index.js.map +1 -0
- package/dist/lib/actions/search/index.d.ts +2 -0
- package/dist/lib/actions/search/index.d.ts.map +1 -0
- package/dist/lib/actions/search/index.js +7 -0
- package/dist/lib/actions/search/index.js.map +1 -0
- package/dist/lib/actions/search/search.d.ts +4 -0
- package/dist/lib/actions/search/search.d.ts.map +1 -0
- package/dist/lib/actions/search/search.js +39 -0
- package/dist/lib/actions/search/search.js.map +1 -0
- package/dist/lib/actions/search-redirect/check-redirect.d.ts +4 -0
- package/dist/lib/actions/search-redirect/check-redirect.d.ts.map +1 -0
- package/dist/lib/actions/search-redirect/check-redirect.js +39 -0
- package/dist/lib/actions/search-redirect/check-redirect.js.map +1 -0
- package/dist/lib/actions/search-redirect/index.d.ts +2 -0
- package/dist/lib/actions/search-redirect/index.d.ts.map +1 -0
- package/dist/lib/actions/search-redirect/index.js +7 -0
- package/dist/lib/actions/search-redirect/index.js.map +1 -0
- package/dist/lib/actions/tokens/index.d.ts +7 -0
- package/dist/lib/actions/tokens/index.d.ts.map +1 -0
- package/dist/lib/actions/tokens/index.js +12 -0
- package/dist/lib/actions/tokens/index.js.map +1 -0
- package/dist/lib/actions/tokens/token-by-address.d.ts +4 -0
- package/dist/lib/actions/tokens/token-by-address.d.ts.map +1 -0
- package/dist/lib/actions/tokens/token-by-address.js +36 -0
- package/dist/lib/actions/tokens/token-by-address.js.map +1 -0
- package/dist/lib/actions/tokens/token-counters.d.ts +4 -0
- package/dist/lib/actions/tokens/token-counters.d.ts.map +1 -0
- package/dist/lib/actions/tokens/token-counters.js +36 -0
- package/dist/lib/actions/tokens/token-counters.js.map +1 -0
- package/dist/lib/actions/tokens/token-holders.d.ts +4 -0
- package/dist/lib/actions/tokens/token-holders.d.ts.map +1 -0
- package/dist/lib/actions/tokens/token-holders.js +36 -0
- package/dist/lib/actions/tokens/token-holders.js.map +1 -0
- package/dist/lib/actions/tokens/token-instances.d.ts +4 -0
- package/dist/lib/actions/tokens/token-instances.d.ts.map +1 -0
- package/dist/lib/actions/tokens/token-instances.js +36 -0
- package/dist/lib/actions/tokens/token-instances.js.map +1 -0
- package/dist/lib/actions/tokens/token-transfers.d.ts +4 -0
- package/dist/lib/actions/tokens/token-transfers.d.ts.map +1 -0
- package/dist/lib/actions/tokens/token-transfers.js +36 -0
- package/dist/lib/actions/tokens/token-transfers.js.map +1 -0
- package/dist/lib/actions/tokens/tokens.d.ts +2 -0
- package/dist/lib/actions/tokens/tokens.d.ts.map +1 -0
- package/dist/lib/actions/tokens/tokens.js +30 -0
- package/dist/lib/actions/tokens/tokens.js.map +1 -0
- package/dist/lib/actions/transactions/index.d.ts +10 -0
- package/dist/lib/actions/transactions/index.d.ts.map +1 -0
- package/dist/lib/actions/transactions/index.js +15 -0
- package/dist/lib/actions/transactions/index.js.map +1 -0
- package/dist/lib/actions/transactions/main-page-transactions.d.ts +2 -0
- package/dist/lib/actions/transactions/main-page-transactions.d.ts.map +1 -0
- package/dist/lib/actions/transactions/main-page-transactions.js +30 -0
- package/dist/lib/actions/transactions/main-page-transactions.js.map +1 -0
- package/dist/lib/actions/transactions/transaction-by-hash.d.ts +4 -0
- package/dist/lib/actions/transactions/transaction-by-hash.d.ts.map +1 -0
- package/dist/lib/actions/transactions/transaction-by-hash.js +36 -0
- package/dist/lib/actions/transactions/transaction-by-hash.js.map +1 -0
- package/dist/lib/actions/transactions/transaction-internal-transactions.d.ts +4 -0
- package/dist/lib/actions/transactions/transaction-internal-transactions.d.ts.map +1 -0
- package/dist/lib/actions/transactions/transaction-internal-transactions.js +36 -0
- package/dist/lib/actions/transactions/transaction-internal-transactions.js.map +1 -0
- package/dist/lib/actions/transactions/transaction-logs.d.ts +4 -0
- package/dist/lib/actions/transactions/transaction-logs.d.ts.map +1 -0
- package/dist/lib/actions/transactions/transaction-logs.js +36 -0
- package/dist/lib/actions/transactions/transaction-logs.js.map +1 -0
- package/dist/lib/actions/transactions/transaction-raw-trace.d.ts +4 -0
- package/dist/lib/actions/transactions/transaction-raw-trace.d.ts.map +1 -0
- package/dist/lib/actions/transactions/transaction-raw-trace.js +36 -0
- package/dist/lib/actions/transactions/transaction-raw-trace.js.map +1 -0
- package/dist/lib/actions/transactions/transaction-state-changes.d.ts +4 -0
- package/dist/lib/actions/transactions/transaction-state-changes.d.ts.map +1 -0
- package/dist/lib/actions/transactions/transaction-state-changes.js +36 -0
- package/dist/lib/actions/transactions/transaction-state-changes.js.map +1 -0
- package/dist/lib/actions/transactions/transaction-summary.d.ts +4 -0
- package/dist/lib/actions/transactions/transaction-summary.d.ts.map +1 -0
- package/dist/lib/actions/transactions/transaction-summary.js +36 -0
- package/dist/lib/actions/transactions/transaction-summary.js.map +1 -0
- package/dist/lib/actions/transactions/transaction-token-transfers.d.ts +4 -0
- package/dist/lib/actions/transactions/transaction-token-transfers.d.ts.map +1 -0
- package/dist/lib/actions/transactions/transaction-token-transfers.js +36 -0
- package/dist/lib/actions/transactions/transaction-token-transfers.js.map +1 -0
- package/dist/lib/actions/transactions/transactions.d.ts +2 -0
- package/dist/lib/actions/transactions/transactions.d.ts.map +1 -0
- package/dist/lib/actions/transactions/transactions.js +30 -0
- package/dist/lib/actions/transactions/transactions.js.map +1 -0
- package/package.json +46 -0
- package/src/index.ts +84 -0
- package/src/lib/actions/addresses/address-blocks-validated.ts +28 -0
- package/src/lib/actions/addresses/address-by-hash.ts +28 -0
- package/src/lib/actions/addresses/address-coin-balance-history-by-day.ts +28 -0
- package/src/lib/actions/addresses/address-coin-balance-history.ts +28 -0
- package/src/lib/actions/addresses/address-counters.ts +28 -0
- package/src/lib/actions/addresses/address-internal-transactions.ts +28 -0
- package/src/lib/actions/addresses/address-logs.ts +28 -0
- package/src/lib/actions/addresses/address-token-balances.ts +28 -0
- package/src/lib/actions/addresses/address-token-transfers.ts +28 -0
- package/src/lib/actions/addresses/address-tokens.ts +28 -0
- package/src/lib/actions/addresses/address-transactions.ts +28 -0
- package/src/lib/actions/addresses/address-withdrawals.ts +28 -0
- package/src/lib/actions/addresses/addresses.ts +22 -0
- package/src/lib/actions/addresses/index.ts +13 -0
- package/src/lib/actions/blocks/block-by-hash.ts +28 -0
- package/src/lib/actions/blocks/block-transactions.ts +28 -0
- package/src/lib/actions/blocks/block-withdrawals.ts +28 -0
- package/src/lib/actions/blocks/blocks.ts +22 -0
- package/src/lib/actions/blocks/index.ts +5 -0
- package/src/lib/actions/blocks/main-page-blocks.ts +22 -0
- package/src/lib/actions/index.ts +6 -0
- package/src/lib/actions/search/index.ts +1 -0
- package/src/lib/actions/search/search.ts +31 -0
- package/src/lib/actions/search-redirect/check-redirect.ts +31 -0
- package/src/lib/actions/search-redirect/index.ts +1 -0
- package/src/lib/actions/tokens/index.ts +6 -0
- package/src/lib/actions/tokens/token-by-address.ts +28 -0
- package/src/lib/actions/tokens/token-counters.ts +28 -0
- package/src/lib/actions/tokens/token-holders.ts +28 -0
- package/src/lib/actions/tokens/token-instances.ts +28 -0
- package/src/lib/actions/tokens/token-transfers.ts +28 -0
- package/src/lib/actions/tokens/tokens.ts +23 -0
- package/src/lib/actions/transactions/index.ts +9 -0
- package/src/lib/actions/transactions/main-page-transactions.ts +22 -0
- package/src/lib/actions/transactions/transaction-by-hash.ts +28 -0
- package/src/lib/actions/transactions/transaction-internal-transactions.ts +28 -0
- package/src/lib/actions/transactions/transaction-logs.ts +28 -0
- package/src/lib/actions/transactions/transaction-raw-trace.ts +28 -0
- package/src/lib/actions/transactions/transaction-state-changes.ts +28 -0
- package/src/lib/actions/transactions/transaction-summary.ts +28 -0
- package/src/lib/actions/transactions/transaction-token-transfers.ts +28 -0
- package/src/lib/actions/transactions/transactions.ts +22 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTransactionLogs = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/blockscout/src/lib/actions/transactions/transaction-logs.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
exports.getTransactionLogs = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'get_transaction_logs',
|
|
11
|
+
displayName: 'Get Transaction Logs',
|
|
12
|
+
description: 'Get list of logs generated by a transaction',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: { description: 'List the event logs emitted by one Ethereum transaction, identified by its hash (decoded contract events with topics and data). Read-only. Use this to inspect what events a transaction fired; for the resulting account/storage changes use Get Transaction State Changes instead.', idempotent: true },
|
|
15
|
+
// category: 'Transactions',
|
|
16
|
+
props: {
|
|
17
|
+
transactionHash: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Transaction Hash',
|
|
19
|
+
description: 'Hash of the transaction to fetch logs for',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
run(context) {
|
|
24
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
26
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
27
|
+
url: `https://eth.blockscout.com/api/v2/transactions/${context.propsValue.transactionHash}/logs`,
|
|
28
|
+
});
|
|
29
|
+
if (response.status !== 200) {
|
|
30
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
31
|
+
}
|
|
32
|
+
return response.body;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=transaction-logs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-logs.js","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-logs.ts"],"names":[],"mappings":";;;;AAAA,0HAA0H;AAC1H,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AAEnD,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,sRAAsR,EAAE,UAAU,EAAE,IAAI,EAAE;IACrU,4BAA4B;IAC5B,KAAK,EAAE;QACL,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,2CAA2C;YACxD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,kDAAkD,OAAO,CAAC,UAAU,CAAC,eAAe,OAAO;aACjG,CAAC,CAAC;YACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getTransactionRawTrace: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").PieceAuthProperty, {
|
|
2
|
+
transactionHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=transaction-raw-trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-raw-trace.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-raw-trace.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB;;EAwBjC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTransactionRawTrace = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/blockscout/src/lib/actions/transactions/transaction-raw-trace.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
exports.getTransactionRawTrace = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'get_transaction_raw_trace',
|
|
11
|
+
displayName: 'Get Transaction Raw Trace',
|
|
12
|
+
description: 'Get raw trace data for a transaction',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: { description: 'Get the low-level raw execution trace (opcode-level call frames) for one Ethereum transaction by hash. Read-only and intended for deep debugging of contract execution. Prefer the higher-level Get Transaction Internal Transactions or Get Transaction by Hash actions for ordinary lookups; reach for this only when you need the full unprocessed trace.', idempotent: true },
|
|
15
|
+
// category: 'Transactions',
|
|
16
|
+
props: {
|
|
17
|
+
transactionHash: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Transaction Hash',
|
|
19
|
+
description: 'Hash of the transaction to fetch raw trace for',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
run(context) {
|
|
24
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
26
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
27
|
+
url: `https://eth.blockscout.com/api/v2/transactions/${context.propsValue.transactionHash}/raw-trace`,
|
|
28
|
+
});
|
|
29
|
+
if (response.status !== 200) {
|
|
30
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
31
|
+
}
|
|
32
|
+
return response.body;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=transaction-raw-trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-raw-trace.js","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-raw-trace.ts"],"names":[],"mappings":";;;;AAAA,+HAA+H;AAC/H,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AAEnD,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,8VAA8V,EAAE,UAAU,EAAE,IAAI,EAAE;IAC7Y,4BAA4B;IAC5B,KAAK,EAAE;QACL,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,kDAAkD,OAAO,CAAC,UAAU,CAAC,eAAe,YAAY;aACtG,CAAC,CAAC;YACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getTransactionStateChanges: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").PieceAuthProperty, {
|
|
2
|
+
transactionHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=transaction-state-changes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-state-changes.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-state-changes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,0BAA0B;;EAyBrC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTransactionStateChanges = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/blockscout/src/lib/actions/transactions/transaction-state-changes.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
exports.getTransactionStateChanges = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'get_transaction_state_changes',
|
|
11
|
+
displayName: 'Get Transaction State Changes',
|
|
12
|
+
description: 'Get list of state changes in a transaction',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: { description: 'List the account balance and storage state changes (before/after values) caused by one Ethereum transaction, identified by its hash. Read-only. Use this to see how a transaction altered account or contract state; for the events it emitted use Get Transaction Logs instead.', idempotent: true },
|
|
15
|
+
// category: 'Transactions',
|
|
16
|
+
props: {
|
|
17
|
+
transactionHash: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Transaction Hash',
|
|
19
|
+
description: 'Hash of the transaction to fetch state changes for',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
run(context) {
|
|
24
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
26
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
27
|
+
url: `https://eth.blockscout.com/api/v2/transactions/${context.propsValue.transactionHash}/state-changes`,
|
|
28
|
+
});
|
|
29
|
+
if (response.status !== 200) {
|
|
30
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
31
|
+
}
|
|
32
|
+
return response.body;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=transaction-state-changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-state-changes.js","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-state-changes.ts"],"names":[],"mappings":";;;;AAAA,mIAAmI;AACnI,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AACnD,QAAA,0BAA0B,GAAG,IAAA,+BAAY,EAAC;IACrD,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE,4CAA4C;IACzD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,kRAAkR,EAAE,UAAU,EAAE,IAAI,EAAE;IAEjU,4BAA4B;IAC5B,KAAK,EAAE;QACL,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,oDAAoD;YACjE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,kDAAkD,OAAO,CAAC,UAAU,CAAC,eAAe,gBAAgB;aAC1G,CAAC,CAAC;YACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getTransactionSummary: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").PieceAuthProperty, {
|
|
2
|
+
transactionHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=transaction-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-summary.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-summary.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;EAwBhC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTransactionSummary = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/blockscout/src/lib/actions/transactions/transaction-summary.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
exports.getTransactionSummary = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'get_transaction_summary',
|
|
11
|
+
displayName: 'Get Transaction Summary',
|
|
12
|
+
description: 'Get a human-readable summary of a transaction',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: { description: "Get Blockscout's interpreted, human-readable summary of one Ethereum transaction by hash (e.g. a plain-language description of what the transaction did, such as a swap or transfer). Read-only. Use this for a quick natural-language explanation; for the structured raw fields use Get Transaction by Hash instead.", idempotent: true },
|
|
15
|
+
// category: 'Transactions',
|
|
16
|
+
props: {
|
|
17
|
+
transactionHash: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Transaction Hash',
|
|
19
|
+
description: 'Hash of the transaction to fetch summary for',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
run(context) {
|
|
24
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
26
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
27
|
+
url: `https://eth.blockscout.com/api/v2/transactions/${context.propsValue.transactionHash}/summary`,
|
|
28
|
+
});
|
|
29
|
+
if (response.status !== 200) {
|
|
30
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
31
|
+
}
|
|
32
|
+
return response.body;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=transaction-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-summary.js","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-summary.ts"],"names":[],"mappings":";;;;AAAA,6HAA6H;AAC7H,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AAEnD,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,+CAA+C;IAC5D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,wTAAwT,EAAE,UAAU,EAAE,IAAI,EAAE;IACvW,4BAA4B;IAC5B,KAAK,EAAE;QACL,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,kDAAkD,OAAO,CAAC,UAAU,CAAC,eAAe,UAAU;aACpG,CAAC,CAAC;YACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getTransactionTokenTransfers: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").PieceAuthProperty, {
|
|
2
|
+
transactionHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=transaction-token-transfers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-token-transfers.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-token-transfers.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,4BAA4B;;EAwBvC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTransactionTokenTransfers = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/blockscout/src/lib/actions/transactions/transaction-token-transfers.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
exports.getTransactionTokenTransfers = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'get_transaction_token_transfers',
|
|
11
|
+
displayName: 'Get Transaction Token Transfers',
|
|
12
|
+
description: 'Get list of token transfers in a transaction',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: { description: 'List the ERC-20/721/1155 token transfers that occurred within one Ethereum transaction, identified by its hash. Read-only. Use this when you have a transaction hash and want the tokens it moved; for token transfers across a token contract over time use the Tokens Get Token Transfers action instead.', idempotent: true },
|
|
15
|
+
// category: 'Transactions',
|
|
16
|
+
props: {
|
|
17
|
+
transactionHash: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Transaction Hash',
|
|
19
|
+
description: 'Hash of the transaction to fetch token transfers for',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
run(context) {
|
|
24
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
26
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
27
|
+
url: `https://eth.blockscout.com/api/v2/transactions/${context.propsValue.transactionHash}/token-transfers`,
|
|
28
|
+
});
|
|
29
|
+
if (response.status !== 200) {
|
|
30
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
31
|
+
}
|
|
32
|
+
return response.body;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=transaction-token-transfers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-token-transfers.js","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transaction-token-transfers.ts"],"names":[],"mappings":";;;;AAAA,qIAAqI;AACrI,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AAEnD,QAAA,4BAA4B,GAAG,IAAA,+BAAY,EAAC;IACvD,IAAI,EAAE,iCAAiC;IACvC,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE,8CAA8C;IAC3D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,6SAA6S,EAAE,UAAU,EAAE,IAAI,EAAE;IAC5V,4BAA4B;IAC5B,KAAK,EAAE;QACL,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,kDAAkD,OAAO,CAAC,UAAU,CAAC,eAAe,kBAAkB;aAC5G,CAAC,CAAC;YACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transactions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,wGAkB1B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTransactions = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/blockscout/src/lib/actions/transactions/transactions.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
exports.getTransactions = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'get_transactions',
|
|
11
|
+
displayName: 'Get Transactions',
|
|
12
|
+
description: 'Get list of transactions',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: { description: 'List recent Ethereum transactions across the whole chain (validated mainnet transactions, newest first). Read-only and takes no inputs. Use this for chain-wide browsing; to fetch one known transaction use Get Transaction by Hash, and to scope to a single block use Get Block Transactions.', idempotent: true },
|
|
15
|
+
// category: 'Transactions',
|
|
16
|
+
props: {},
|
|
17
|
+
run(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
20
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
21
|
+
url: `https://eth.blockscout.com/api/v2/transactions`,
|
|
22
|
+
});
|
|
23
|
+
if (response.status !== 200) {
|
|
24
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
25
|
+
}
|
|
26
|
+
return response.body;
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=transactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../../src/lib/actions/transactions/transactions.ts"],"names":[],"mappings":";;;;AAAA,sHAAsH;AACtH,qEAAqE;AACrE,gEAAyD;AACzD,0DAAgE;AAEnD,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,0BAA0B;IACvC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,kSAAkS,EAAE,UAAU,EAAE,IAAI,EAAE;IACjV,4BAA4B;IAC5B,KAAK,EAAE,EAAE;IACH,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,gDAAgD;aACtD,CAAC,CAAC;YACH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agnocon/piece-blockscout",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "AgnoCon blockscout connector",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"src",
|
|
17
|
+
"LICENSE.MIT-AP"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc -p tsconfig.json",
|
|
21
|
+
"vendor": "node ../scripts/vendor-ap.mjs piece-blockscout"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@agnocon/core-utils": "0.2.0",
|
|
25
|
+
"@agnocon/piece-types": "0.3.1",
|
|
26
|
+
"@agnocon/pieces-common": "0.12.8",
|
|
27
|
+
"@agnocon/pieces-framework": "0.36.0",
|
|
28
|
+
"tslib": "2.6.2"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "20.17.6",
|
|
32
|
+
"typescript": "5.5.4"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"agnocon": {
|
|
36
|
+
"originVersion": "0.1.6"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "restricted",
|
|
40
|
+
"tag": "latest"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"agnocon",
|
|
44
|
+
"connector"
|
|
45
|
+
]
|
|
46
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
import { createPiece, PieceAuth } from '@agnocon/pieces-framework';
|
|
3
|
+
import {
|
|
4
|
+
search,
|
|
5
|
+
checkRedirect,
|
|
6
|
+
getBlocks,
|
|
7
|
+
getMainPageBlocks,
|
|
8
|
+
getBlockByHash,
|
|
9
|
+
getBlockTransactions,
|
|
10
|
+
getBlockWithdrawals,
|
|
11
|
+
getTransactions,
|
|
12
|
+
getMainPageTransactions,
|
|
13
|
+
getTransactionByHash,
|
|
14
|
+
getTransactionTokenTransfers,
|
|
15
|
+
getTransactionInternalTransactions,
|
|
16
|
+
getTransactionLogs,
|
|
17
|
+
getTransactionRawTrace,
|
|
18
|
+
getTransactionStateChanges,
|
|
19
|
+
getTransactionSummary,
|
|
20
|
+
getAddresses,
|
|
21
|
+
getAddressByHash,
|
|
22
|
+
getAddressCounters,
|
|
23
|
+
getAddressTransactions,
|
|
24
|
+
getAddressTokenTransfers,
|
|
25
|
+
getAddressLogs,
|
|
26
|
+
getAddressBlocksValidated,
|
|
27
|
+
getAddressTokenBalances,
|
|
28
|
+
getAddressTokens,
|
|
29
|
+
getAddressWithdrawals,
|
|
30
|
+
getAddressCoinBalanceHistory,
|
|
31
|
+
getAddressCoinBalanceHistoryByDay,
|
|
32
|
+
getTokens,
|
|
33
|
+
getTokenByAddress,
|
|
34
|
+
getTokenTransfers,
|
|
35
|
+
getTokenHolders,
|
|
36
|
+
getTokenCounters,
|
|
37
|
+
getTokenInstances
|
|
38
|
+
} from './lib/actions';
|
|
39
|
+
|
|
40
|
+
export const blockscout = createPiece({
|
|
41
|
+
displayName: "Blockscout",
|
|
42
|
+
description: "Blockscout is a tool for inspecting and analyzing EVM chains.",
|
|
43
|
+
auth: PieceAuth.None(),
|
|
44
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/blockscout.png',
|
|
45
|
+
authors: ['reemayoush'],
|
|
46
|
+
actions: [
|
|
47
|
+
search,
|
|
48
|
+
checkRedirect,
|
|
49
|
+
getBlocks,
|
|
50
|
+
getMainPageBlocks,
|
|
51
|
+
getBlockByHash,
|
|
52
|
+
getBlockTransactions,
|
|
53
|
+
getBlockWithdrawals,
|
|
54
|
+
getTransactions,
|
|
55
|
+
getMainPageTransactions,
|
|
56
|
+
getTransactionByHash,
|
|
57
|
+
getTransactionTokenTransfers,
|
|
58
|
+
getTransactionInternalTransactions,
|
|
59
|
+
getTransactionLogs,
|
|
60
|
+
getTransactionRawTrace,
|
|
61
|
+
getTransactionStateChanges,
|
|
62
|
+
getTransactionSummary,
|
|
63
|
+
getAddresses,
|
|
64
|
+
getAddressByHash,
|
|
65
|
+
getAddressCounters,
|
|
66
|
+
getAddressTransactions,
|
|
67
|
+
getAddressTokenTransfers,
|
|
68
|
+
getAddressLogs,
|
|
69
|
+
getAddressBlocksValidated,
|
|
70
|
+
getAddressTokenBalances,
|
|
71
|
+
getAddressTokens,
|
|
72
|
+
getAddressWithdrawals,
|
|
73
|
+
getAddressCoinBalanceHistory,
|
|
74
|
+
getAddressCoinBalanceHistoryByDay,
|
|
75
|
+
getTokens,
|
|
76
|
+
getTokenByAddress,
|
|
77
|
+
getTokenTransfers,
|
|
78
|
+
getTokenHolders,
|
|
79
|
+
getTokenCounters,
|
|
80
|
+
getTokenInstances
|
|
81
|
+
],
|
|
82
|
+
triggers: []
|
|
83
|
+
});
|
|
84
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createAction, Property } from '@agnocon/pieces-framework';
|
|
2
|
+
import { httpClient, HttpMethod } from '@agnocon/pieces-common';
|
|
3
|
+
|
|
4
|
+
export const getAddressBlocksValidated = createAction({
|
|
5
|
+
name: 'get_address_blocks_validated',
|
|
6
|
+
displayName: 'Get Address Blocks Validated',
|
|
7
|
+
description: 'Get list of blocks validated by an address',
|
|
8
|
+
audience: 'both',
|
|
9
|
+
aiMetadata: { description: 'List the blocks an address validated or produced (relevant for validator/miner addresses). Choose this to inspect an account’s block-production history rather than its transactions or balances. Read-only lookup on eth.blockscout.com; requires a 0x address hash and returns empty for non-validator addresses.', idempotent: true },
|
|
10
|
+
// category: 'Addresses',
|
|
11
|
+
props: {
|
|
12
|
+
addressHash: Property.ShortText({
|
|
13
|
+
displayName: 'Address Hash',
|
|
14
|
+
description: 'Hash of the address to fetch validated blocks for',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
async run(context) {
|
|
19
|
+
const response = await httpClient.sendRequest({
|
|
20
|
+
method: HttpMethod.GET,
|
|
21
|
+
url: `https://eth.blockscout.com/api/v2/addresses/${context.propsValue.addressHash}/blocks-validated`,
|
|
22
|
+
});
|
|
23
|
+
if (response.status !== 200) {
|
|
24
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
25
|
+
}
|
|
26
|
+
return response.body;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createAction, Property } from '@agnocon/pieces-framework';
|
|
2
|
+
import { httpClient, HttpMethod } from '@agnocon/pieces-common';
|
|
3
|
+
|
|
4
|
+
export const getAddressByHash = createAction({
|
|
5
|
+
name: 'get_address_by_hash',
|
|
6
|
+
displayName: 'Get Address by Hash',
|
|
7
|
+
description: 'Get address info by its hash',
|
|
8
|
+
audience: 'both',
|
|
9
|
+
aiMetadata: { description: 'Look up the core profile of a single address: current balance, contract/EOA status, name tags, and implementation details. Pick this as the first lookup for one known address before drilling into its transactions, tokens, or logs. Read-only lookup on eth.blockscout.com; requires a 0x address hash.', idempotent: true },
|
|
10
|
+
// category: 'Addresses',
|
|
11
|
+
props: {
|
|
12
|
+
addressHash: Property.ShortText({
|
|
13
|
+
displayName: 'Address Hash',
|
|
14
|
+
description: 'Hash of the address to fetch info for',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
async run(context) {
|
|
19
|
+
const response = await httpClient.sendRequest({
|
|
20
|
+
method: HttpMethod.GET,
|
|
21
|
+
url: `https://eth.blockscout.com/api/v2/addresses/${context.propsValue.addressHash}`,
|
|
22
|
+
});
|
|
23
|
+
if (response.status !== 200) {
|
|
24
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
25
|
+
}
|
|
26
|
+
return response.body;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createAction, Property } from '@agnocon/pieces-framework';
|
|
2
|
+
import { httpClient, HttpMethod } from '@agnocon/pieces-common';
|
|
3
|
+
|
|
4
|
+
export const getAddressCoinBalanceHistoryByDay = createAction({
|
|
5
|
+
name: 'get_address_coin_balance_history_by_day',
|
|
6
|
+
displayName: 'Get Address Coin Balance History By Day',
|
|
7
|
+
description: 'Get list of coin balance changes for an address grouped by day',
|
|
8
|
+
audience: 'both',
|
|
9
|
+
aiMetadata: { description: 'Get an address’s native-coin (ETH) balance aggregated into one value per day, suited for charting or trend analysis. Pick this over Get Address Coin Balance History when you want a daily time series rather than every individual balance-changing event. Read-only lookup on eth.blockscout.com; requires a 0x address hash.', idempotent: true },
|
|
10
|
+
// category: 'Addresses',
|
|
11
|
+
props: {
|
|
12
|
+
addressHash: Property.ShortText({
|
|
13
|
+
displayName: 'Address Hash',
|
|
14
|
+
description: 'Hash of the address to fetch daily coin balance history for',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
async run(context) {
|
|
19
|
+
const response = await httpClient.sendRequest({
|
|
20
|
+
method: HttpMethod.GET,
|
|
21
|
+
url: `https://eth.blockscout.com/api/v2/addresses/${context.propsValue.addressHash}/coin-balance-history-by-day`,
|
|
22
|
+
});
|
|
23
|
+
if (response.status !== 200) {
|
|
24
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
25
|
+
}
|
|
26
|
+
return response.body;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createAction, Property } from '@agnocon/pieces-framework';
|
|
2
|
+
import { httpClient, HttpMethod } from '@agnocon/pieces-common';
|
|
3
|
+
|
|
4
|
+
export const getAddressCoinBalanceHistory = createAction({
|
|
5
|
+
name: 'get_address_coin_balance_history',
|
|
6
|
+
displayName: 'Get Address Coin Balance History',
|
|
7
|
+
description: 'Get list of coin balance changes for an address',
|
|
8
|
+
audience: 'both',
|
|
9
|
+
aiMetadata: { description: 'List per-event native-coin (ETH) balance changes for an address, one entry per balance-altering block. Pick this for fine-grained balance history; use Get Address Coin Balance History By Day for a daily-aggregated series instead. Read-only lookup on eth.blockscout.com; requires a 0x address hash.', idempotent: true },
|
|
10
|
+
// category: 'Addresses',
|
|
11
|
+
props: {
|
|
12
|
+
addressHash: Property.ShortText({
|
|
13
|
+
displayName: 'Address Hash',
|
|
14
|
+
description: 'Hash of the address to fetch coin balance history for',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
async run(context) {
|
|
19
|
+
const response = await httpClient.sendRequest({
|
|
20
|
+
method: HttpMethod.GET,
|
|
21
|
+
url: `https://eth.blockscout.com/api/v2/addresses/${context.propsValue.addressHash}/coin-balance-history`,
|
|
22
|
+
});
|
|
23
|
+
if (response.status !== 200) {
|
|
24
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
25
|
+
}
|
|
26
|
+
return response.body;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createAction, Property } from '@agnocon/pieces-framework';
|
|
2
|
+
import { httpClient, HttpMethod } from '@agnocon/pieces-common';
|
|
3
|
+
|
|
4
|
+
export const getAddressCounters = createAction({
|
|
5
|
+
name: 'get_address_counters',
|
|
6
|
+
displayName: 'Get Address Counters',
|
|
7
|
+
description: 'Get counters (transactions count, token transfers count, etc.) for an address',
|
|
8
|
+
audience: 'both',
|
|
9
|
+
aiMetadata: { description: 'Fetch aggregate activity counts for an Ethereum address (total transactions, token transfers, gas usage). Pick this for a quick summary of how active an address is rather than retrieving the underlying records. Read-only lookup on eth.blockscout.com; requires a 0x address hash.', idempotent: true },
|
|
10
|
+
// category: 'Addresses',
|
|
11
|
+
props: {
|
|
12
|
+
addressHash: Property.ShortText({
|
|
13
|
+
displayName: 'Address Hash',
|
|
14
|
+
description: 'Hash of the address to fetch counters for',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
async run(context) {
|
|
19
|
+
const response = await httpClient.sendRequest({
|
|
20
|
+
method: HttpMethod.GET,
|
|
21
|
+
url: `https://eth.blockscout.com/api/v2/addresses/${context.propsValue.addressHash}/counters`,
|
|
22
|
+
});
|
|
23
|
+
if (response.status !== 200) {
|
|
24
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
25
|
+
}
|
|
26
|
+
return response.body;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createAction, Property } from '@agnocon/pieces-framework';
|
|
2
|
+
import { httpClient, HttpMethod } from '@agnocon/pieces-common';
|
|
3
|
+
|
|
4
|
+
export const getAddressInternalTransactions = createAction({
|
|
5
|
+
name: 'get_address_internal_transactions',
|
|
6
|
+
displayName: 'Get Address Internal Transactions',
|
|
7
|
+
description: 'Get list of internal transactions for an address',
|
|
8
|
+
audience: 'both',
|
|
9
|
+
aiMetadata: { description: 'List the internal (contract-to-contract) transactions touching an Ethereum address. Choose this for value movements triggered within smart-contract calls rather than the top-level transactions an account submitted (use Get Address Transactions for those). Read-only lookup on eth.blockscout.com; requires a 0x address hash.', idempotent: true },
|
|
10
|
+
// category: 'Addresses',
|
|
11
|
+
props: {
|
|
12
|
+
addressHash: Property.ShortText({
|
|
13
|
+
displayName: 'Address Hash',
|
|
14
|
+
description: 'Hash of the address to fetch internal transactions for',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
async run(context) {
|
|
19
|
+
const response = await httpClient.sendRequest({
|
|
20
|
+
method: HttpMethod.GET,
|
|
21
|
+
url: `https://eth.blockscout.com/api/v2/addresses/${context.propsValue.addressHash}/internal-transactions`,
|
|
22
|
+
});
|
|
23
|
+
if (response.status !== 200) {
|
|
24
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
25
|
+
}
|
|
26
|
+
return response.body;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createAction, Property } from '@agnocon/pieces-framework';
|
|
2
|
+
import { httpClient, HttpMethod } from '@agnocon/pieces-common';
|
|
3
|
+
|
|
4
|
+
export const getAddressLogs = createAction({
|
|
5
|
+
name: 'get_address_logs',
|
|
6
|
+
displayName: 'Get Address Logs',
|
|
7
|
+
description: 'Get list of logs generated by an address',
|
|
8
|
+
audience: 'both',
|
|
9
|
+
aiMetadata: { description: 'List the event logs emitted by a contract address (decoded where an ABI is known). Pick this to read smart-contract events such as Transfer or Approval for a given contract rather than its transactions or token balances. Read-only lookup on eth.blockscout.com; requires a 0x address hash.', idempotent: true },
|
|
10
|
+
// category: 'Addresses',
|
|
11
|
+
props: {
|
|
12
|
+
addressHash: Property.ShortText({
|
|
13
|
+
displayName: 'Address Hash',
|
|
14
|
+
description: 'Hash of the address to fetch logs for',
|
|
15
|
+
required: true,
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
async run(context) {
|
|
19
|
+
const response = await httpClient.sendRequest({
|
|
20
|
+
method: HttpMethod.GET,
|
|
21
|
+
url: `https://eth.blockscout.com/api/v2/addresses/${context.propsValue.addressHash}/logs`,
|
|
22
|
+
});
|
|
23
|
+
if (response.status !== 200) {
|
|
24
|
+
throw new Error(`Blockscout API request failed with status ${response.status}`);
|
|
25
|
+
}
|
|
26
|
+
return response.body;
|
|
27
|
+
},
|
|
28
|
+
});
|