From 635278107a6223f4d36ce6fba444e27c2f24d879 Mon Sep 17 00:00:00 2001 From: Nazeim Date: Thu, 23 Nov 2023 12:05:46 +0300 Subject: [PATCH 01/10] update --- .../report-spam.md | 0 .../spam-detection.md | 0 .../evm/stream-security/stream-security.md | 11 +++++++++ .../{ => stream-security}/webhook-security.md | 0 .../error-handling.md | 0 .../mandatory-test-webhook.md | 0 .../response-body.md | 0 .../streams-configuration.md | 11 +++++++++ .../webhooks-transactions.md | 0 ...certain-amount-sent-by-specific-address.md | 24 ++++++++----------- ...sten-all-events-from-a-contract-factory.md | 23 +++++++----------- .../how-to-listen-all-nft-transfers.md | 16 ++++++++----- ...-transfers-sent-from-a-specific-address.md | 24 +++++++++---------- ...how-to-monitor-ens-domain-registrations.md | 8 ++++--- ...monitor-for-er-c20-token-burns-or-mints.md | 6 ++--- .../tutorials/how-to-monitor-specific-nfts.md | 6 ++--- 16 files changed, 73 insertions(+), 56 deletions(-) rename docs/02-streams-api/evm/{spam-detection => stream-security}/report-spam.md (100%) rename docs/02-streams-api/evm/{spam-detection => stream-security}/spam-detection.md (100%) create mode 100644 docs/02-streams-api/evm/stream-security/stream-security.md rename docs/02-streams-api/evm/{ => stream-security}/webhook-security.md (100%) rename docs/02-streams-api/evm/{ => streams-configuration}/error-handling.md (100%) rename docs/02-streams-api/evm/{ => streams-configuration}/mandatory-test-webhook.md (100%) rename docs/02-streams-api/evm/{ => streams-configuration}/response-body.md (100%) create mode 100644 docs/02-streams-api/evm/streams-configuration/streams-configuration.md rename docs/02-streams-api/evm/{ => streams-configuration}/webhooks-transactions.md (100%) diff --git a/docs/02-streams-api/evm/spam-detection/report-spam.md b/docs/02-streams-api/evm/stream-security/report-spam.md similarity index 100% rename from docs/02-streams-api/evm/spam-detection/report-spam.md rename to docs/02-streams-api/evm/stream-security/report-spam.md diff --git a/docs/02-streams-api/evm/spam-detection/spam-detection.md b/docs/02-streams-api/evm/stream-security/spam-detection.md similarity index 100% rename from docs/02-streams-api/evm/spam-detection/spam-detection.md rename to docs/02-streams-api/evm/stream-security/spam-detection.md diff --git a/docs/02-streams-api/evm/stream-security/stream-security.md b/docs/02-streams-api/evm/stream-security/stream-security.md new file mode 100644 index 00000000..9b10aada --- /dev/null +++ b/docs/02-streams-api/evm/stream-security/stream-security.md @@ -0,0 +1,11 @@ +--- +title: "Stream Security" +description: "learn how to secure Webhook and spam detection." +sidebar_position: 14 +slug: "../stream-security" +sidebar_class_name: "sidebar-stream-security" +--- + +import DocCardList from '@theme/DocCardList'; + + diff --git a/docs/02-streams-api/evm/webhook-security.md b/docs/02-streams-api/evm/stream-security/webhook-security.md similarity index 100% rename from docs/02-streams-api/evm/webhook-security.md rename to docs/02-streams-api/evm/stream-security/webhook-security.md diff --git a/docs/02-streams-api/evm/error-handling.md b/docs/02-streams-api/evm/streams-configuration/error-handling.md similarity index 100% rename from docs/02-streams-api/evm/error-handling.md rename to docs/02-streams-api/evm/streams-configuration/error-handling.md diff --git a/docs/02-streams-api/evm/mandatory-test-webhook.md b/docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md similarity index 100% rename from docs/02-streams-api/evm/mandatory-test-webhook.md rename to docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md diff --git a/docs/02-streams-api/evm/response-body.md b/docs/02-streams-api/evm/streams-configuration/response-body.md similarity index 100% rename from docs/02-streams-api/evm/response-body.md rename to docs/02-streams-api/evm/streams-configuration/response-body.md diff --git a/docs/02-streams-api/evm/streams-configuration/streams-configuration.md b/docs/02-streams-api/evm/streams-configuration/streams-configuration.md new file mode 100644 index 00000000..4fae168f --- /dev/null +++ b/docs/02-streams-api/evm/streams-configuration/streams-configuration.md @@ -0,0 +1,11 @@ +--- +title: "Streams Configuration" +description: "learn how to handle errors, testing Webhooks, and handlinng transactions of a Webhook." +sidebar_position: 3 +slug: "../streams-configuration" +sidebar_class_name: "sidebar-streams-configuration" +--- + +import DocCardList from '@theme/DocCardList'; + + diff --git a/docs/02-streams-api/evm/webhooks-transactions.md b/docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md similarity index 100% rename from docs/02-streams-api/evm/webhooks-transactions.md rename to docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md diff --git a/docs/02-streams-api/evm/tutorials/how-to-listen-all-er-c20-token-transfers-over-certain-amount-sent-by-specific-address.md b/docs/02-streams-api/evm/tutorials/how-to-listen-all-er-c20-token-transfers-over-certain-amount-sent-by-specific-address.md index 65155679..22627599 100644 --- a/docs/02-streams-api/evm/tutorials/how-to-listen-all-er-c20-token-transfers-over-certain-amount-sent-by-specific-address.md +++ b/docs/02-streams-api/evm/tutorials/how-to-listen-all-er-c20-token-transfers-over-certain-amount-sent-by-specific-address.md @@ -1,17 +1,15 @@ --- -title: "How to listen to all ERC20 contract transfers over certain amount sent by specific address" +title: "Monitor High-Value ERC20 Transfers by Address" slug: "../how-to-listen-to-all-erc20-contract-transfers-over-certain-amount-sent-by-specific-address" -description: "Learn how to listen all ERC20 token transfers over certain amount sent by specific address using Moralis Streams API." +description: "Learn how to listen to all ERC20 token transfers over certain amount sent by specific address using Moralis Streams API." --- Let's create a stream that monitors all the ERC20 contract transfers where sender is a specific address and the number of coins transferred is over 1000. -Note: This stream uses listen to all addresses feature that is available only on Business and Enterprise plans. +:::tip +This stream uses listen to all addresses feature that is available only on Business and Enterprise plans. There could be few ERC20 contracts that don't follow the standards, and they may use a different ABI for transfers. You will use the ABI specific to ERC20 transfers, the one that doesn't have indexed for third parameter. +::: -Note: There could be few ERC20 contracts that don't follow the standards, and they may use a different ABI for transfers. - -Note: You will use the ABI specific to ERC20 transfers, the one that doesn't have indexed for third parameter. - -### Programmatically +## Programmatically ```javascript const ERC20_transfer_ABI = [{ @@ -28,7 +26,7 @@ const ERC20_transfer_ABI = [{ const filter_ERC20 = { "and": \[ { "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] }, - { "gt": ["value", "1000000000"] }, // Example of USDT (6 Decimals) + { "gt": ["value", "1000000000"] }, // Example of USDT (6 Decimals) ], }; // only receive ERC20 contract transfers where sender is a specific address and the number of coins transferred is over 1000 @@ -53,9 +51,7 @@ const stream = await Moralis.Streams.add(options); ``` - - -### Via WebUI +## Via WebUI 1. Create a new Stream 2. Fill out the form @@ -69,10 +65,10 @@ const stream = await Moralis.Streams.add(options); "filter": { "and": [ { "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] }, - { "gt": ["value", "1000000000"] } // Example of USDT (6 Decimals) + { "gt": ["value", "1000000000"] } // Example of USDT (6 Decimals) ] } } ] ``` -7. Click on create stream button. \ No newline at end of file +7. Click on create stream button. diff --git a/docs/02-streams-api/evm/tutorials/how-to-listen-all-events-from-a-contract-factory.md b/docs/02-streams-api/evm/tutorials/how-to-listen-all-events-from-a-contract-factory.md index c862bc5f..cc6d2fba 100644 --- a/docs/02-streams-api/evm/tutorials/how-to-listen-all-events-from-a-contract-factory.md +++ b/docs/02-streams-api/evm/tutorials/how-to-listen-all-events-from-a-contract-factory.md @@ -1,23 +1,20 @@ --- -title: "How to listen all events from a contract factory" +title: "Track Smart Contract Events in Real-Time with Web3" slug: "../how-to-listen-all-events-from-a-contract-factory" -description: "Learn how to listen all events from a contract factory using Moralis Streams API." +description: "Learn how to listen to all events from a contract factory using Moralis Streams API." --- -Let's create a stream that monitors all the events specific to a contract factory. -:::info +Let's create a stream that monitors all the events specific to a contract factory. +:::tip This stream uses listen to all addresses feature that is available only on Business and Enterprise plans. - ::: -:::info - +:::tipe You will need an ABI that is used only on your contracts in order to not receive the events from other contracts that use the same ABI. - ::: -### Programmatically +## Programmatically: How to Listen to event from a contract factory ```javascript const Contract_Factory_ABI = [{ @@ -43,16 +40,12 @@ const options = { }; const stream = await Moralis.Streams.add(options); - - ``` - - -### Via WebUI +## WebUI: How to Listen to event from a contract factory 1. Create a new Stream 2. Fill out the form 3. Switch on Event Emittance and Add the Abi and select the topic 4. Select `Listen to all addresses` and `Contract interactions (logs)` -5. Click on create stream button. \ No newline at end of file +5. Click on create stream button. diff --git a/docs/02-streams-api/evm/tutorials/how-to-listen-all-nft-transfers.md b/docs/02-streams-api/evm/tutorials/how-to-listen-all-nft-transfers.md index f31002f5..f6239acb 100644 --- a/docs/02-streams-api/evm/tutorials/how-to-listen-all-nft-transfers.md +++ b/docs/02-streams-api/evm/tutorials/how-to-listen-all-nft-transfers.md @@ -1,15 +1,19 @@ --- -title: "How to listen all NFT transfers" +title: "Track NFT transfers" slug: "../how-to-listen-all-nft-transfers" description: "Learn how to listen to all NFT transfers using Moralis Streams API." --- Lets create a stream that monitors all the NFT contract transfers. -Note: This stream uses listen to all addresses feature that is available only on Business and Enterprise plans. +:::tip +This stream uses listen to all addresses feature that is available only on Business and Enterprise plans. +::: -Note: There will be few NFT contracts that don't follow the standards like CryptoPunks that have a different ABI and you will not receive webhook requests from those non standard NFT contracts. +:::tip +There will be few NFT contracts that don't follow the standards like CryptoPunks that have a different ABI and you will not receive webhook requests from those non standard NFT contracts. +::: -### Programmatically +## Programmatically ```javascript const NFT_transfer_ABI = [{ @@ -41,10 +45,10 @@ const stream = await Moralis.Streams.add(options); -### Via WebUI +## Via WebUI 1. Create a new Stream 2. Fill out the form 3. Switch on Event Emittance and Add the Abi and select the topic 4. Select `Listen to all addresses` and `Contract interactions (logs)` -5. Click on create stream button. \ No newline at end of file +5. Click on create stream button. diff --git a/docs/02-streams-api/evm/tutorials/how-to-listen-to-all-nft-transfers-sent-from-a-specific-address.md b/docs/02-streams-api/evm/tutorials/how-to-listen-to-all-nft-transfers-sent-from-a-specific-address.md index df100f78..22bf26cf 100644 --- a/docs/02-streams-api/evm/tutorials/how-to-listen-to-all-nft-transfers-sent-from-a-specific-address.md +++ b/docs/02-streams-api/evm/tutorials/how-to-listen-to-all-nft-transfers-sent-from-a-specific-address.md @@ -1,17 +1,21 @@ --- -title: "How to listen to all NFT transfers sent from a specific address" +title: "Monitoring NFT Transfers from Specific Wallet Addresses" slug: "../how-to-listen-to-all-nft-transfers-sent-from-a-specific-address" description: "Learn how to listen to all NFT transfers sent from a specific address using Moralis Streams API." --- -Lets create a stream that monitors all the NFT contract transfers from a specific sender address. -Note: This stream uses listen to all addresses feature that is available only on Business and Enterprise plans. +Lets create a stream that monitors all the NFT contract transfers from a specific sender address. -Note: There will be few NFT contracts that don't follow the standards like CryptoPunks that have a different ABI and you will not receive webhook requests from those non standard NFT contracts. +:::tip +This stream uses listen to all addresses feature that is available only on Business and Enterprise plans. +There will be few NFT contracts that don't follow the standards like CryptoPunks that have a different ABI and you will not receive webhook requests from those non standard NFT contracts. +::: -Note: You will use the ABI specific to NFT transfers, the one that has indexed for tokenId +:::tip +You will use the ABI specific to NFT transfers, the one that has indexed for tokenId +::: -### Programmatically +## Programmatically ```javascript const NFT_transfer_ABI = [{ @@ -42,13 +46,9 @@ const options = { }; const stream = await Moralis.Streams.add(options); - - ``` - - -### Via WebUI +## Via WebUI 1. Create a new Stream 2. Fill out the form @@ -61,4 +61,4 @@ const stream = await Moralis.Streams.add(options); "filter": { "eq": ["from", "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5"] } }] ``` -7. Click on create stream button. \ No newline at end of file +7. Click on create stream button. diff --git a/docs/02-streams-api/evm/tutorials/how-to-monitor-ens-domain-registrations.md b/docs/02-streams-api/evm/tutorials/how-to-monitor-ens-domain-registrations.md index f538e2bc..c6b1acd7 100644 --- a/docs/02-streams-api/evm/tutorials/how-to-monitor-ens-domain-registrations.md +++ b/docs/02-streams-api/evm/tutorials/how-to-monitor-ens-domain-registrations.md @@ -1,10 +1,12 @@ --- -title: "How to monitor ENS Domain Registrations" +title: "Monitor High-Value ENS Domain Registrations" slug: "../how-to-monitor-ens-domain-registrations" description: "Learn how to monitor ENS domain registrations that costs higher than 1 ETH using Moralis Streams API." --- -### Programatically +Learn how to monitor ENS domain registrations that costs higher than 1 ETH using Moralis Streams API. + +## Programatically import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -193,7 +195,7 @@ print(result) -### Via WebUI +## Via WebUI 1. Create a new Stream 2. Fill out the form diff --git a/docs/02-streams-api/evm/tutorials/how-to-monitor-for-er-c20-token-burns-or-mints.md b/docs/02-streams-api/evm/tutorials/how-to-monitor-for-er-c20-token-burns-or-mints.md index 6e7a6a7c..3adc2768 100644 --- a/docs/02-streams-api/evm/tutorials/how-to-monitor-for-er-c20-token-burns-or-mints.md +++ b/docs/02-streams-api/evm/tutorials/how-to-monitor-for-er-c20-token-burns-or-mints.md @@ -1,12 +1,12 @@ --- -title: "How to monitor for ERC20 token burns or mints" +title: "Track ERC20 Token Burns and Mints" slug: "../how-to-monitor-for-erc20-token-burns-or-mints" description: "Learn how to monitor ERC20 token burns or mints using Moralis Streams API." --- Lets check all USDC transfers but filter transaction where the recipient or the sender is the zero address and if the amount is greater or equal to 10000 USDC. -### Programatically +## Programatically ```javascript JavaScript const transferUsdcAbi = [ @@ -82,7 +82,7 @@ await Moralis.Streams.addAddress({ }); ``` -### Via WebUI +## Via WebUI 1. Create a new Stream 2. Fill out the form diff --git a/docs/02-streams-api/evm/tutorials/how-to-monitor-specific-nfts.md b/docs/02-streams-api/evm/tutorials/how-to-monitor-specific-nfts.md index 8955324a..8a49b674 100644 --- a/docs/02-streams-api/evm/tutorials/how-to-monitor-specific-nfts.md +++ b/docs/02-streams-api/evm/tutorials/how-to-monitor-specific-nfts.md @@ -1,12 +1,12 @@ --- -title: "How to monitor specific NFTs" +title: "Track Specific CryptoPunk NFTs by Token IDs" slug: "../how-to-monitor-specific-nfts" description: "Learn how to monitor specific CryptoPunk NFTs Based on an array of Token IDs using Moralis Streams API." --- Lets create a stream that monitor specific CryptoPunk NFTs based on an array of Token IDs. -### Programmatically +## Programmatically import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -103,7 +103,7 @@ print(result) -### Via WebUI +## Via WebUI 1. Create a new Stream 2. Fill out the form From 5d9279520bc3cd1993da3821c59e44334ffbb8c5 Mon Sep 17 00:00:00 2001 From: Nazeim Date: Thu, 23 Nov 2023 20:14:43 +0300 Subject: [PATCH 02/10] update --- .../evm/stream-security/webhook-security.md | 10 +-- .../streams-configuration/error-handling.md | 2 +- .../mandatory-test-webhook.md | 4 +- .../streams-configuration/response-body.md | 68 +++++++++---------- .../webhooks-transactions.md | 2 +- 5 files changed, 43 insertions(+), 43 deletions(-) diff --git a/docs/02-streams-api/evm/stream-security/webhook-security.md b/docs/02-streams-api/evm/stream-security/webhook-security.md index 1f52d230..42d5eed1 100644 --- a/docs/02-streams-api/evm/stream-security/webhook-security.md +++ b/docs/02-streams-api/evm/stream-security/webhook-security.md @@ -1,6 +1,6 @@ --- title: "Webhook Security" -slug: "webhook-security" +slug: "../webhook-security" sidebar_position: 9 description: "Keep your webhook requests secure with our implementation that signs every request with the web3api key. The signature is included in the request headers and can be easily verified by using our provided JavaScript function or adapting it for your preferred programming language." --- @@ -42,13 +42,13 @@ def verify_Signature(req, secret): provided_signature = req.headers.get("x-signature") if not provided_signature: raise TypeError("Signature not provided") - + data = req.data+secret.encode() signature = Web3.keccak(text=data.decode()).hex() - - if provided_signature != signature: + + if provided_signature != signature: raise ValueError("Invalid Signature") ``` - \ No newline at end of file + diff --git a/docs/02-streams-api/evm/streams-configuration/error-handling.md b/docs/02-streams-api/evm/streams-configuration/error-handling.md index b04c11fc..f18f1566 100644 --- a/docs/02-streams-api/evm/streams-configuration/error-handling.md +++ b/docs/02-streams-api/evm/streams-configuration/error-handling.md @@ -1,6 +1,6 @@ --- title: "Error handling" -slug: "error-handling" +slug: "../error-handling" sidebar_position: 14 --- diff --git a/docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md b/docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md index 0979b2aa..e188e89d 100644 --- a/docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md +++ b/docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md @@ -1,6 +1,6 @@ --- title: "Mandatory Test Webhook" -slug: "mandatory-test-webhook" +slug: "../mandatory-test-webhook" sidebar_position: 7 --- @@ -31,4 +31,4 @@ The test body will look like this: "nftApprovals": \[ ERC721: \[], ERC1155: \[] ], "nftTransfers": \[] } -``` \ No newline at end of file +``` diff --git a/docs/02-streams-api/evm/streams-configuration/response-body.md b/docs/02-streams-api/evm/streams-configuration/response-body.md index ea406716..89d49b48 100644 --- a/docs/02-streams-api/evm/streams-configuration/response-body.md +++ b/docs/02-streams-api/evm/streams-configuration/response-body.md @@ -1,6 +1,6 @@ --- title: "Response body" -slug: "response-body" +slug: "../response-body" sidebar_position: 10 --- @@ -35,11 +35,11 @@ def verify_Signature(req, secret): provided_signature = req.headers.get("x-signature") if not provided_signature: raise TypeError("Signature not provided") - + data = req.data+secret.encode() signature = Web3.keccak(text=data.decode()).hex() - - if provided_signature != signature: + + if provided_signature != signature: raise ValueError("Invalid Signature") ``` @@ -55,7 +55,7 @@ For native transaction you have to set `Native Transactions (txs)` in admin inte "confirmed":false, "chainId":"0x1", "abi":[ - + ], "streamId":"c28d9e2e-ae9d-4fe6-9fc0-5fcde2dcdd17", "tag":"native_transactions", @@ -66,7 +66,7 @@ For native transaction you have to set `Native Transactions (txs)` in admin inte "timestamp":"1668676247" }, "logs":[ - + ], "txs":[ { @@ -91,24 +91,24 @@ For native transaction you have to set `Native Transactions (txs)` in admin inte } ], "txsInternal":[ - + ], "erc20Transfers":[ - + ], "erc20Approvals":[ - + ], "nftApprovals":{ "ERC1155":[ - + ], "ERC721":[ - + ] }, "nftTransfers":[ - + ] } ``` @@ -122,7 +122,7 @@ For native transactions there is also the option to get automatically the logs/e "confirmed":true, "chainId":"0x1", "abi":[ - + ], "streamId":"c28d9e2e-ae9d-4fe6-9fc0-5fcde2dcdd17", "tag":"native_transactions_with_logs", @@ -167,10 +167,10 @@ For native transactions there is also the option to get automatically the logs/e } ], "txsInternal":[ - + ], "erc20Transfers":[ - + ], "erc20Approvals":[ { @@ -188,14 +188,14 @@ For native transactions there is also the option to get automatically the logs/e ], "nftApprovals":{ "ERC1155":[ - + ], "ERC721":[ - + ] }, "nftTransfers":[ - + ] } ``` @@ -393,27 +393,27 @@ For smart contract events (logs) you select `Contract interactions (logs)` and ` } ], "txs":[ - + ], "txsInternal":[ - + ], "erc20Transfers":[ - + ], "erc20Approvals":[ - + ], "nftApprovals":{ "ERC1155":[ - + ], "ERC721":[ - + ] }, "nftTransfers":[ - + ] } ``` @@ -427,7 +427,7 @@ For internal transactions you select `Internal Transactions (txsInternal)` in Ad "confirmed":false, "chainId":"0x1", "abi":[ - + ], "streamId":"c28d9e2e-ae9d-4fe6-9fc0-5fcde2dcdd17", "tag":"internal transactions", @@ -438,10 +438,10 @@ For internal transactions you select `Internal Transactions (txsInternal)` in Ad "timestamp":"1668672659" }, "logs":[ - + ], "txs":[ - + ], "txsInternal":[ { @@ -453,21 +453,21 @@ For internal transactions you select `Internal Transactions (txsInternal)` in Ad } ], "erc20Transfers":[ - + ], "erc20Approvals":[ - + ], "nftApprovals":{ "ERC1155":[ - + ], "ERC721":[ - + ] }, "nftTransfers":[ - + ] } -``` \ No newline at end of file +``` diff --git a/docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md b/docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md index d0745ff1..cbfc6994 100644 --- a/docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md +++ b/docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md @@ -1,6 +1,6 @@ --- title: "Webhooks Transactions" -slug: "webhooks-transactions" +slug: "../webhooks-transactions" description: "Now whenever an ingoing or outgoing transaction involving the address you are monitoring occurs, you will receive a webhook with the transaction details." sidebar_position: 8 --- From c2c165d2373c3fea432a68921683054f577058a8 Mon Sep 17 00:00:00 2001 From: Nazeim Date: Thu, 23 Nov 2023 21:44:57 +0300 Subject: [PATCH 03/10] update --- docs/02-streams-api/evm/addresses/addresses.md | 11 +++++++++++ .../evm/{ => addresses}/get-native-balances.md | 6 +++--- .../evm/{ => addresses}/listen-to-all-addresses.md | 4 ++-- .../{ => addresses}/monitor-multiple-addresses.md | 6 +++--- .../evm/{getting-started => }/faq.md | 4 ++-- .../evm/getting-started/setup-secret-key.md | 8 +------- .../evm/getting-started/using-node-js-sdk.md | 14 +++++++------- .../evm/getting-started/using-webui.md | 2 +- .../evm/integrations/integrations.md | 10 ---------- docs/02-streams-api/evm/records-and-pricing.md | 4 ++-- docs/02-streams-api/evm/reference/reference.md | 2 +- .../evm/stream-security/stream-security.md | 4 ++-- .../evm/streams-configuration/error-handling.md | 4 ++-- .../{ => streams-configuration}/filter-streams.md | 4 ++-- .../firebase.md | 5 +++-- .../evm/{ => streams-configuration}/parse-data.md | 10 +++++----- .../stream-management.md | 6 +++--- .../streams-configuration/streams-configuration.md | 4 ++-- .../useful-streams-options.md | 4 ++-- docs/02-streams-api/evm/tutorials/tutorials.md | 4 ++-- .../mandatory-test-webhook.md | 4 ++-- .../response-body.md | 4 ++-- docs/02-streams-api/evm/{ => webhooks}/triggers.md | 8 +++----- .../webhook-security.md | 4 ++-- .../webhooks-transactions.md | 4 ++-- docs/02-streams-api/evm/webhooks/webhooks.md | 11 +++++++++++ docusaurus.config.js | 2 +- 27 files changed, 79 insertions(+), 74 deletions(-) create mode 100644 docs/02-streams-api/evm/addresses/addresses.md rename docs/02-streams-api/evm/{ => addresses}/get-native-balances.md (97%) rename docs/02-streams-api/evm/{ => addresses}/listen-to-all-addresses.md (97%) rename docs/02-streams-api/evm/{ => addresses}/monitor-multiple-addresses.md (90%) rename docs/02-streams-api/evm/{getting-started => }/faq.md (99%) delete mode 100644 docs/02-streams-api/evm/integrations/integrations.md rename docs/02-streams-api/evm/{ => streams-configuration}/filter-streams.md (99%) rename docs/02-streams-api/evm/{integrations => streams-configuration}/firebase.md (98%) rename docs/02-streams-api/evm/{ => streams-configuration}/parse-data.md (97%) rename docs/02-streams-api/evm/{ => streams-configuration}/stream-management.md (97%) rename docs/02-streams-api/evm/{ => streams-configuration}/useful-streams-options.md (98%) rename docs/02-streams-api/evm/{streams-configuration => webhooks}/mandatory-test-webhook.md (92%) rename docs/02-streams-api/evm/{streams-configuration => webhooks}/response-body.md (99%) rename docs/02-streams-api/evm/{ => webhooks}/triggers.md (99%) rename docs/02-streams-api/evm/{stream-security => webhooks}/webhook-security.md (98%) rename docs/02-streams-api/evm/{streams-configuration => webhooks}/webhooks-transactions.md (97%) create mode 100644 docs/02-streams-api/evm/webhooks/webhooks.md diff --git a/docs/02-streams-api/evm/addresses/addresses.md b/docs/02-streams-api/evm/addresses/addresses.md new file mode 100644 index 00000000..8e1c8e29 --- /dev/null +++ b/docs/02-streams-api/evm/addresses/addresses.md @@ -0,0 +1,11 @@ +--- +title: "Addresses" +description: "learn how to monitor, list to addresses and getting native balance." +sidebar_position: 6 +slug: "../webhooks" +sidebar_class_name: "sidebar-streams-configuration" +--- + +import DocCardList from '@theme/DocCardList'; + + diff --git a/docs/02-streams-api/evm/get-native-balances.md b/docs/02-streams-api/evm/addresses/get-native-balances.md similarity index 97% rename from docs/02-streams-api/evm/get-native-balances.md rename to docs/02-streams-api/evm/addresses/get-native-balances.md index a3787c18..a39dcbfe 100644 --- a/docs/02-streams-api/evm/get-native-balances.md +++ b/docs/02-streams-api/evm/addresses/get-native-balances.md @@ -1,12 +1,12 @@ --- title: "Get Native Balances" -slug: "get-native-balances" +slug: "../get-native-balances" sidebar_position: 21 --- -There is an option `getNativeBalances` when creating or editing a Stream. It is a list of native balances calls for specific addresses. +There is an option `getNativeBalances` when creating or editing a Stream. It is a list of native balances calls for specific addresses. -You can get Native Balances (ETH/BNB/MATIC and many more) of addresses that appear in your Webhook. They are very similar to [Triggers](/streams-api/evm/triggers). +You can get Native Balances (ETH/BNB/MATIC and many more) of addresses that appear in your Webhook. They are very similar to [Triggers](/streams-api/evm/triggers). `getNativeBalances` trigger is currently available to use with a business plan or higher. diff --git a/docs/02-streams-api/evm/listen-to-all-addresses.md b/docs/02-streams-api/evm/addresses/listen-to-all-addresses.md similarity index 97% rename from docs/02-streams-api/evm/listen-to-all-addresses.md rename to docs/02-streams-api/evm/addresses/listen-to-all-addresses.md index 9dff3e20..df1211ce 100644 --- a/docs/02-streams-api/evm/listen-to-all-addresses.md +++ b/docs/02-streams-api/evm/addresses/listen-to-all-addresses.md @@ -1,6 +1,6 @@ --- -title: "Listen to all addresses" -slug: "listen-to-all-addresses" +title: "Listen to all Addresses" +slug: "../listen-to-all-addresses" description: "Learn how to listen to all addresses, NFT contract transfers, events from new contracts specific to a contract factory, NFT contracts transfers where sender is a specific address." sidebar_position: 5 --- diff --git a/docs/02-streams-api/evm/monitor-multiple-addresses.md b/docs/02-streams-api/evm/addresses/monitor-multiple-addresses.md similarity index 90% rename from docs/02-streams-api/evm/monitor-multiple-addresses.md rename to docs/02-streams-api/evm/addresses/monitor-multiple-addresses.md index bf4894a8..73bc53a4 100644 --- a/docs/02-streams-api/evm/monitor-multiple-addresses.md +++ b/docs/02-streams-api/evm/addresses/monitor-multiple-addresses.md @@ -1,11 +1,11 @@ --- -title: "Monitor multiple addresses" -slug: "monitor-multiple-addresses" +title: "Monitor Multiple Addresses" +slug: "../monitor-multiple-addresses" description: "Learn best practices for handling multiple addresses in your streams." sidebar_position: 11 --- -You do not have to create a separate stream for each address. Instead, you can attach multiple addresses to the same stream. The best practice is to create as few streams as possible and instead attach addresses to existing streams whenever it makes sense. You can attach any number of addresses to a stream. +You do not have to create a separate stream for each address. Instead, you can attach multiple addresses to the same stream. The best practice is to create as few streams as possible and instead attach addresses to existing streams whenever it makes sense. You can attach any number of addresses to a stream. > If you really need more streams update to a paid plan or contact support (hello@moralis.io) if you are already a paying client. diff --git a/docs/02-streams-api/evm/getting-started/faq.md b/docs/02-streams-api/evm/faq.md similarity index 99% rename from docs/02-streams-api/evm/getting-started/faq.md rename to docs/02-streams-api/evm/faq.md index 26ead33e..e5d51ea1 100644 --- a/docs/02-streams-api/evm/getting-started/faq.md +++ b/docs/02-streams-api/evm/faq.md @@ -1,6 +1,6 @@ --- -title: "🙋 FAQ" -sidebar_position: 20 +title: "FAQ" +sidebar_position: 21 description: "This FAQ page helps you to get answers about our Web3 API, Streams, and product features, enhancing your API integration experience." --- diff --git a/docs/02-streams-api/evm/getting-started/setup-secret-key.md b/docs/02-streams-api/evm/getting-started/setup-secret-key.md index a13d5d11..ed689905 100644 --- a/docs/02-streams-api/evm/getting-started/setup-secret-key.md +++ b/docs/02-streams-api/evm/getting-started/setup-secret-key.md @@ -5,13 +5,7 @@ description: "Learn how to set up the Streams secret key, essential for webhook sidebar_position: 0 --- -## Introduction - -Welcome to the guide on setting up the Streams secret key. - -## What is a Secret Key in Streams? - -The Streams `secret key` is a unique string used to identify the sender of a webhook through webhook signature verification. +The Streams `secret key` is a unique string that is used to identify the sender of a webhook through webhook signature verification. ## Updating the Secret Key diff --git a/docs/02-streams-api/evm/getting-started/using-node-js-sdk.md b/docs/02-streams-api/evm/getting-started/using-node-js-sdk.md index 3dfc6448..8a83d41e 100644 --- a/docs/02-streams-api/evm/getting-started/using-node-js-sdk.md +++ b/docs/02-streams-api/evm/getting-started/using-node-js-sdk.md @@ -1,5 +1,5 @@ --- -title: "Using the SDK" +title: "Manage Streams via SDK" slug: "../using-node-js-sdk" description: "Learn how to use the Moralis Streams API to monitor a wallet with the SDK. Create a stream, install the SDK, attach an address, and receive webhooks with transaction details." sidebar_position: 1 @@ -9,11 +9,11 @@ In these examples, we will learn how to create and manage a Stream. In order to use the Moralis Streams API, you can either use the SDK (programmatically) or via our UI dashboard. -## Using the SDK - +:::tip Read the article [Setting Up Moralis: Getting Started](/web3-data-api/evm/get-your-api-key) and make sure to finish all the steps. +::: -### Step 1: Create a Stream +## Step 1: Create a Stream In order to create a stream, Moralis provides you with a [add](/streams-api/evm/reference/create-stream) endpoint to do so. @@ -77,7 +77,7 @@ print(results["id"]) # print the stream id -### Step 2: Update a Stream +## Step 2: Update a Stream Now that we have the stream id from the previous step, we can update the stream with additional parameters. In this example, we will add the `includeContractLogs` parameter to the stream and make it listen for ERC20 transfers, but you can add any other parameter you want. @@ -178,7 +178,7 @@ print(results) -### Step 3: Delete a Stream +## Step 3: Delete a Stream If you want to delete a stream, you can use the [delete](/streams-api/evm/reference/delete-stream) endpoint. @@ -223,7 +223,7 @@ print(results) -### Step 4: Add an Address to a Stream +## Step 4: Add an Address to a Stream Now that we have a stream, we can add an address to it. You can either add individual addresses or a batch. In this example, we will add a list of addresses to the stream. diff --git a/docs/02-streams-api/evm/getting-started/using-webui.md b/docs/02-streams-api/evm/getting-started/using-webui.md index ff77ff7c..21ed4c91 100644 --- a/docs/02-streams-api/evm/getting-started/using-webui.md +++ b/docs/02-streams-api/evm/getting-started/using-webui.md @@ -1,5 +1,5 @@ --- -title: "Using the Admin Panel" +title: "Manage Streams via Admin Panel" slug: "../using-webui" description: "Learn how to create a new stream on the Admin Panel of Moralis.io. Follow the step-by-step instructions to monitor your chosen address and receive data through a webhook URL." sidebar_position: 1 diff --git a/docs/02-streams-api/evm/integrations/integrations.md b/docs/02-streams-api/evm/integrations/integrations.md deleted file mode 100644 index 5d790529..00000000 --- a/docs/02-streams-api/evm/integrations/integrations.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Integrations" -sidebar_position: 23 -slug: "../integrations" -sidebar_class_name: "sidebar-integrations" ---- - -import DocCardList from '@theme/DocCardList'; - - diff --git a/docs/02-streams-api/evm/records-and-pricing.md b/docs/02-streams-api/evm/records-and-pricing.md index d67f6546..efc7321d 100644 --- a/docs/02-streams-api/evm/records-and-pricing.md +++ b/docs/02-streams-api/evm/records-and-pricing.md @@ -1,7 +1,7 @@ --- -title: "Records and Pricing" +title: "Pricing & Records" slug: "records-and-pricing" -sidebar_position: 4 +sidebar_position: 8 description: "How Records are used in Streams API to determine usage and pricing. Records are either a transaction, log, or internal transactions in the webhook response." --- diff --git a/docs/02-streams-api/evm/reference/reference.md b/docs/02-streams-api/evm/reference/reference.md index e7785feb..d9ae84f2 100644 --- a/docs/02-streams-api/evm/reference/reference.md +++ b/docs/02-streams-api/evm/reference/reference.md @@ -3,7 +3,7 @@ title: "Streams - API Reference" sidebar_label: "API Reference" slug: "/streams-api/evm/evm/reference" sidebar_class_name: "sidebar-api-reference" -sidebar_position: 22 +sidebar_position: 20 --- ## History diff --git a/docs/02-streams-api/evm/stream-security/stream-security.md b/docs/02-streams-api/evm/stream-security/stream-security.md index 9b10aada..b9b8af6b 100644 --- a/docs/02-streams-api/evm/stream-security/stream-security.md +++ b/docs/02-streams-api/evm/stream-security/stream-security.md @@ -1,7 +1,7 @@ --- -title: "Stream Security" +title: "Streams Security" description: "learn how to secure Webhook and spam detection." -sidebar_position: 14 +sidebar_position: 6 slug: "../stream-security" sidebar_class_name: "sidebar-stream-security" --- diff --git a/docs/02-streams-api/evm/streams-configuration/error-handling.md b/docs/02-streams-api/evm/streams-configuration/error-handling.md index f18f1566..bd985133 100644 --- a/docs/02-streams-api/evm/streams-configuration/error-handling.md +++ b/docs/02-streams-api/evm/streams-configuration/error-handling.md @@ -1,7 +1,7 @@ --- -title: "Error handling" +title: "Error Handling" slug: "../error-handling" -sidebar_position: 14 +sidebar_position: 5 --- Moralis guarantees 100% delivery of webhooks. Still, you can have errors in your streams for example if your server is down. Moralis will retry to send the webhook in intervals. If the webhook is not delivered after 24 hours and you still want to receive the failed webhooks after some time you can manually replay the failed webhooks. diff --git a/docs/02-streams-api/evm/filter-streams.md b/docs/02-streams-api/evm/streams-configuration/filter-streams.md similarity index 99% rename from docs/02-streams-api/evm/filter-streams.md rename to docs/02-streams-api/evm/streams-configuration/filter-streams.md index f5a54c37..bd84f04c 100644 --- a/docs/02-streams-api/evm/filter-streams.md +++ b/docs/02-streams-api/evm/streams-configuration/filter-streams.md @@ -1,7 +1,7 @@ --- -title: "Filter Streams" +title: "Filters" slug: "filter-streams" -sidebar_position: 12 +sidebar_position: 3 description: "In some cases you might want to filter the data you receive from the webhook. You can do this by adding a filter to the stream." --- diff --git a/docs/02-streams-api/evm/integrations/firebase.md b/docs/02-streams-api/evm/streams-configuration/firebase.md similarity index 98% rename from docs/02-streams-api/evm/integrations/firebase.md rename to docs/02-streams-api/evm/streams-configuration/firebase.md index 4f094068..92c5aebc 100644 --- a/docs/02-streams-api/evm/integrations/firebase.md +++ b/docs/02-streams-api/evm/streams-configuration/firebase.md @@ -1,7 +1,8 @@ --- -title: "Firebase" -slug: "firebase" +title: "Integration with Firebase" +slug: "../firebase" description: "Moralis Streams can be used to monitor a blockchain wallet or a smart contract. This tutorial shows how you can easily plug in the Moralis Streams extension to your Firebase project and let your dapp handle blockchain events." +sidebar_position: 5 --- Moralis Streams can be used to monitor a blockchain wallet or a smart contract. This tutorial shows how you can easily plug in the Moralis Streams extension to your Firebase project and let your dapp handle blockchain events. diff --git a/docs/02-streams-api/evm/parse-data.md b/docs/02-streams-api/evm/streams-configuration/parse-data.md similarity index 97% rename from docs/02-streams-api/evm/parse-data.md rename to docs/02-streams-api/evm/streams-configuration/parse-data.md index a6027706..3f31fc80 100644 --- a/docs/02-streams-api/evm/parse-data.md +++ b/docs/02-streams-api/evm/streams-configuration/parse-data.md @@ -1,8 +1,8 @@ --- -title: "Parse data" -slug: "parse-data" -sidebar_position: 15 -description: "Moralis makes it easy to parse data from ERC20 Transfers and Approvals, NFT Transfers and Approvals, and Smart Contract Events. Stream your smart contract events and use our code as a guide to quickly and accurately extract the data into a typed data structure." +title: "Parse Data" +slug: "../parse-data" +sidebar_position: 1 +description: "Moralis makes it easy to parse data from ERC20 Transfers and Approvals, NFT Transfers and Approvals, and Smart Contract Events. Stream your smart contract events and use our code as a guide to quickly and accurately extract the data into a typed data structure." --- Moralis makes it easy to parse data from ERC20 Transfers and Approvals, NFT Transfers and Approvals, and Smart Contract Events. Stream your smart contract events and use our code as a guide to quickly and accurately extract the data into a typed data structure. @@ -90,4 +90,4 @@ const test = async () => { test(); -``` \ No newline at end of file +``` diff --git a/docs/02-streams-api/evm/stream-management.md b/docs/02-streams-api/evm/streams-configuration/stream-management.md similarity index 97% rename from docs/02-streams-api/evm/stream-management.md rename to docs/02-streams-api/evm/streams-configuration/stream-management.md index 0df0095a..12328944 100644 --- a/docs/02-streams-api/evm/stream-management.md +++ b/docs/02-streams-api/evm/streams-configuration/stream-management.md @@ -1,7 +1,7 @@ --- -title: "Stream Management" -slug: "stream-management" -sidebar_position: 13 +title: "Monitor, Update, & Pause" +slug: "../stream-management" +sidebar_position: 2 description: "Moralis Stream Management allows you to monitor, update, and pause streams with ease. Programmatically or via the web UI, you can get a list of all your streams, set settings, and update the status of a stream. Get started with Moralis Stream Management today!" --- diff --git a/docs/02-streams-api/evm/streams-configuration/streams-configuration.md b/docs/02-streams-api/evm/streams-configuration/streams-configuration.md index 4fae168f..7ea44b49 100644 --- a/docs/02-streams-api/evm/streams-configuration/streams-configuration.md +++ b/docs/02-streams-api/evm/streams-configuration/streams-configuration.md @@ -1,7 +1,7 @@ --- -title: "Streams Configuration" +title: "Streams Fundamentals" description: "learn how to handle errors, testing Webhooks, and handlinng transactions of a Webhook." -sidebar_position: 3 +sidebar_position: 4 slug: "../streams-configuration" sidebar_class_name: "sidebar-streams-configuration" --- diff --git a/docs/02-streams-api/evm/useful-streams-options.md b/docs/02-streams-api/evm/streams-configuration/useful-streams-options.md similarity index 98% rename from docs/02-streams-api/evm/useful-streams-options.md rename to docs/02-streams-api/evm/streams-configuration/useful-streams-options.md index 8cc1cc69..64b86e23 100644 --- a/docs/02-streams-api/evm/useful-streams-options.md +++ b/docs/02-streams-api/evm/streams-configuration/useful-streams-options.md @@ -1,5 +1,5 @@ --- -title: "Useful Streams options" +title: "Advanced Options" slug: "useful-streams-options" sidebar_position: 6 description: "This page provides information about the various options available when creating a stream with Useful Streams. Learn more about the includeContractLogs, includeInternalTxs, and advanced options to customize your stream." @@ -57,4 +57,4 @@ To use the advancedOptions object, you must specify a `topic0` that you want to } ``` -In this example, we are listening to the ERC20-Transfer `Transfer(address,address,uint256)`. We are also using the `filter` field to specify that we only want to include transfers where the from field is equal to the address `0x283af0b28c62c092c9727f1ee09c02ca627eb7f5` and the amount that was sent is greater than `100` (converted to wei). Finally, we are using the includeNativeTxs field to specify that we do not want to include native transactions in the stream. \ No newline at end of file +In this example, we are listening to the ERC20-Transfer `Transfer(address,address,uint256)`. We are also using the `filter` field to specify that we only want to include transfers where the from field is equal to the address `0x283af0b28c62c092c9727f1ee09c02ca627eb7f5` and the amount that was sent is greater than `100` (converted to wei). Finally, we are using the includeNativeTxs field to specify that we do not want to include native transactions in the stream. diff --git a/docs/02-streams-api/evm/tutorials/tutorials.md b/docs/02-streams-api/evm/tutorials/tutorials.md index d76df938..1682d4e3 100644 --- a/docs/02-streams-api/evm/tutorials/tutorials.md +++ b/docs/02-streams-api/evm/tutorials/tutorials.md @@ -1,10 +1,10 @@ --- title: "Tutorials" description: "Learn how to apply and utilize the full potential of Streams API with our more advanced examples." -sidebar_position: 3 +sidebar_position: 4 slug: "../tutorials" --- import DocCardList from '@theme/DocCardList'; - \ No newline at end of file + diff --git a/docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md b/docs/02-streams-api/evm/webhooks/mandatory-test-webhook.md similarity index 92% rename from docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md rename to docs/02-streams-api/evm/webhooks/mandatory-test-webhook.md index e188e89d..6b18992d 100644 --- a/docs/02-streams-api/evm/streams-configuration/mandatory-test-webhook.md +++ b/docs/02-streams-api/evm/webhooks/mandatory-test-webhook.md @@ -1,7 +1,7 @@ --- -title: "Mandatory Test Webhook" +title: "Mandatory Test" slug: "../mandatory-test-webhook" -sidebar_position: 7 +sidebar_position: 4 --- Whenever you create or update a stream, you will receive a test webhook. diff --git a/docs/02-streams-api/evm/streams-configuration/response-body.md b/docs/02-streams-api/evm/webhooks/response-body.md similarity index 99% rename from docs/02-streams-api/evm/streams-configuration/response-body.md rename to docs/02-streams-api/evm/webhooks/response-body.md index 89d49b48..b450fddd 100644 --- a/docs/02-streams-api/evm/streams-configuration/response-body.md +++ b/docs/02-streams-api/evm/webhooks/response-body.md @@ -1,7 +1,7 @@ --- -title: "Response body" +title: "Response Body" slug: "../response-body" -sidebar_position: 10 +sidebar_position: 3 --- The body contains the data you are interested in. Logs is in array containing raw events and stream information such as tag and the streamId. The body also contains a chainId, the blocknumber, internal transactions, the abis and a confirmed field that indicates if the block is confirmed. diff --git a/docs/02-streams-api/evm/triggers.md b/docs/02-streams-api/evm/webhooks/triggers.md similarity index 99% rename from docs/02-streams-api/evm/triggers.md rename to docs/02-streams-api/evm/webhooks/triggers.md index b4b136e4..9594fd43 100644 --- a/docs/02-streams-api/evm/triggers.md +++ b/docs/02-streams-api/evm/webhooks/triggers.md @@ -1,12 +1,10 @@ --- -title: "Moralis Triggers" -slug: "triggers" -sidebar_position: 10 +title: "Triggers" +slug: "../triggers" +sidebar_position: 2 description: "Moralis Streams Triggers. Run smart contract functions against Blockchain Events." --- -## Introduction - With Moralis Triggers you can run (read-only) smart contract functions and have the result be part of your Webhook. Let us dive into an example right away. Imagine you have a stream that listens to a bunch of addresses and in particular, you are interested in the "erc20Transfers" part of your Webhook. Because you are maintaining a database with all the token balances of the monitored addresses, you normally get the balances after receiving a Webhook with the Moralis API. But what if you can have the balances be part of each token transfer in your Webhook right away? That is now possible with Moralis Triggers! diff --git a/docs/02-streams-api/evm/stream-security/webhook-security.md b/docs/02-streams-api/evm/webhooks/webhook-security.md similarity index 98% rename from docs/02-streams-api/evm/stream-security/webhook-security.md rename to docs/02-streams-api/evm/webhooks/webhook-security.md index 42d5eed1..49083bee 100644 --- a/docs/02-streams-api/evm/stream-security/webhook-security.md +++ b/docs/02-streams-api/evm/webhooks/webhook-security.md @@ -1,7 +1,7 @@ --- -title: "Webhook Security" +title: "Security" slug: "../webhook-security" -sidebar_position: 9 +sidebar_position: 5 description: "Keep your webhook requests secure with our implementation that signs every request with the web3api key. The signature is included in the request headers and can be easily verified by using our provided JavaScript function or adapting it for your preferred programming language." --- diff --git a/docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md b/docs/02-streams-api/evm/webhooks/webhooks-transactions.md similarity index 97% rename from docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md rename to docs/02-streams-api/evm/webhooks/webhooks-transactions.md index cbfc6994..31ef6733 100644 --- a/docs/02-streams-api/evm/streams-configuration/webhooks-transactions.md +++ b/docs/02-streams-api/evm/webhooks/webhooks-transactions.md @@ -1,8 +1,8 @@ --- -title: "Webhooks Transactions" +title: "Transactions" slug: "../webhooks-transactions" description: "Now whenever an ingoing or outgoing transaction involving the address you are monitoring occurs, you will receive a webhook with the transaction details." -sidebar_position: 8 +sidebar_position: 1 --- Now whenever an ingoing or outgoing transaction involving the address you are monitoring occurs, you will receive a webhook with the transaction details. diff --git a/docs/02-streams-api/evm/webhooks/webhooks.md b/docs/02-streams-api/evm/webhooks/webhooks.md new file mode 100644 index 00000000..b06de36a --- /dev/null +++ b/docs/02-streams-api/evm/webhooks/webhooks.md @@ -0,0 +1,11 @@ +--- +title: "Webhooks" +description: "learn how to configure Webhooks." +sidebar_position: 5 +slug: "../webhooks" +sidebar_class_name: "sidebar-streams-configuration" +--- + +import DocCardList from '@theme/DocCardList'; + + diff --git a/docusaurus.config.js b/docusaurus.config.js index 5491ba37..b25bce16 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -192,7 +192,7 @@ const config = { label: "Changelog", }, { - to: "streams-api/evm/getting-started/faq", + to: "streams-api/evm/faq", position: "left", label: "FAQ", }, From a93c7a1b4b117750299dc9b209f6057033e0188c Mon Sep 17 00:00:00 2001 From: Nazeim Date: Fri, 24 Nov 2023 15:36:10 +0300 Subject: [PATCH 04/10] Fix broken links --- api/data/redirects.ts | 2 +- .../evm/integrations/firebase-api-calls-from-the-frontend.md | 2 +- docs/02-streams-api/evm/getting-started/using-webui.md | 2 +- .../evm/integrations/firebase-api-calls-from-the-frontend.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/data/redirects.ts b/api/data/redirects.ts index 8864f4c8..3f849eca 100644 --- a/api/data/redirects.ts +++ b/api/data/redirects.ts @@ -6541,7 +6541,7 @@ export const redirects = [ }, { source: "/streams-api/integrations/firebase", - destination: "/streams-api/evm/integrations/firebase", + destination: "/streams-api/evm/streams-configuration/firebase", permanent: true, }, { diff --git a/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md b/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md index 98b4a541..e7497506 100644 --- a/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md +++ b/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md @@ -10,7 +10,7 @@ If you want to call the Moralis API from your frontend app, don't do this direct -First, check out our tutorial, [Your First Dapp using Firebase](/streams-api/evm/integrations/firebase), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". +First, check out our tutorial, [Your First Dapp using Firebase](/streams-api/evm/streams-configuration/firebase), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". Moreover, in this tutorial, we will use three Firebase services: diff --git a/docs/02-streams-api/evm/getting-started/using-webui.md b/docs/02-streams-api/evm/getting-started/using-webui.md index 21ed4c91..96ef9055 100644 --- a/docs/02-streams-api/evm/getting-started/using-webui.md +++ b/docs/02-streams-api/evm/getting-started/using-webui.md @@ -63,7 +63,7 @@ When a transaction occurs on the wallet it will appear on the right hand termina ![](/img/content/211853590-a71f84ab-ab8c-40ca-9d28-452ba64e1de6.webp) -4. Select the events you want to track by selecting from options `Contract Interaction`, `Native Transactions`, `Internal Transactions` under `Stream Options`. To read more on each options take a look at Streams options in our [documentation](/streams-api/evm/useful-streams-options). +4. Select the events you want to track by selecting from options `Contract Interaction`, `Native Transactions`, `Internal Transactions` under `Stream Options`. To read more on each options take a look at Streams options in our [documentation](/streams-api/evm/streams-configuration/useful-streams-options). ![](/img/content/211854294-e4507fe0-6995-4bfe-a995-a0c815b3da9d.webp) diff --git a/versioned_docs/version-2.0/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md b/versioned_docs/version-2.0/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md index 98b4a541..e7497506 100644 --- a/versioned_docs/version-2.0/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md +++ b/versioned_docs/version-2.0/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md @@ -10,7 +10,7 @@ If you want to call the Moralis API from your frontend app, don't do this direct -First, check out our tutorial, [Your First Dapp using Firebase](/streams-api/evm/integrations/firebase), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". +First, check out our tutorial, [Your First Dapp using Firebase](/streams-api/evm/streams-configuration/firebase), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". Moreover, in this tutorial, we will use three Firebase services: From e1df3da6237617a72631259b90d95567ae825530 Mon Sep 17 00:00:00 2001 From: Nazeim Date: Fri, 24 Nov 2023 15:58:06 +0300 Subject: [PATCH 05/10] update --- api/data/redirects.ts | 4 ++-- docs/04-guides/streams-api-full-guide-walkthrough.md | 2 +- docs/configs/guides/guides.json | 2 +- .../02-streams-api/evm/getting-started/using-webui.md | 2 +- .../04-guides/streams-api-full-guide-walkthrough.md | 2 +- versioned_docs/version-2.0/configs/guides/guides.json | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/data/redirects.ts b/api/data/redirects.ts index 3f849eca..ef1f440b 100644 --- a/api/data/redirects.ts +++ b/api/data/redirects.ts @@ -6326,7 +6326,7 @@ export const redirects = [ }, { source: "/streams-api/useful-streams-options", - destination: "/streams-api/evm/useful-streams-options", + destination: "/streams-configuration/useful-streams-options", permanent: true, }, { @@ -6361,7 +6361,7 @@ export const redirects = [ }, { source: "/streams-api/filter-streams", - destination: "/streams-api/evm/filter-streams", + destination: "/streams-api/evm/streams-configuration/filter-streams", permanent: true, }, { diff --git a/docs/04-guides/streams-api-full-guide-walkthrough.md b/docs/04-guides/streams-api-full-guide-walkthrough.md index e57e81dd..4985808a 100644 --- a/docs/04-guides/streams-api-full-guide-walkthrough.md +++ b/docs/04-guides/streams-api-full-guide-walkthrough.md @@ -316,7 +316,7 @@ streams.evm_streams.add_address_to_stream( Once the code has been added, you can run the script to create a second [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new USDT transfers occuring on either Ethereum. -For listening to smart contracts, you can also add the [Filters feature](/streams-api/evm/filter-streams) to filter out results that only fulfills certain criteria. This can be relevant in more specific use cases, such as whale monitoring, and can simply be supplemented to our existing code. +For listening to smart contracts, you can also add the [Filters feature](/streams-api/evm/streams-configuration/filter-streams) to filter out results that only fulfills certain criteria. This can be relevant in more specific use cases, such as whale monitoring, and can simply be supplemented to our existing code. For example, we'd like to monitor all USDT transaction on Ethereum that is over $1M, then we can modify our code as follows: diff --git a/docs/configs/guides/guides.json b/docs/configs/guides/guides.json index 7a88f613..668cb1c0 100644 --- a/docs/configs/guides/guides.json +++ b/docs/configs/guides/guides.json @@ -169,7 +169,7 @@ "excerpt": "" }, { - "content": "\n## What is an Streams API?\n\n![](/img/content/d06bbe5-Moralis-Streams-API.webp)\n\nThe [Streams API](https://moralis.io/streams/) is a collection of APIs that can be used to setup Streams for listening to real-time events from contracts, native transactions, and internal transactions on multiple [EVM chains](/streams-api/evm#supported-chains) that we support.\n\nThe [Streams API](https://moralis.io/streams/) is designed to stream real-time blockchain data to application through webhooks that help developers to improves the user experience.\n\nTherefore, the ideal use cases for the [Streams API](https://moralis.io/streams/) are listed as below, but not limited to:\n\n- Web3 alerts (e.g. whale alerts monitoring)\n- Real-time transaction & crypto wallet notifications\n- Monitoring wallet balances\n- etc.\n\n## How to get started?\n\nTo get started with [Moralis Streams API](https://moralis.io/streams/), there are two methods that can be used to create [Streams](https://moralis.io/streams/), depending on the programming language that you are using:\n\n| Programming Languages | Method |\n| ------------------------------------- | ------------ |\n| JavaScript/TypeScript, Python | Moralis SDKs |\n| Others (e.g. Java, C/C++, Ruby, etc.) | REST API |\n\nFor this guide, we'll particularly use the Moralis SDK for examples.\n\nIf you would like to use other languages calling the [Moralis Streams API](https://moralis.io/streams/) using regular REST API call, then make sure to check the [Streams API reference pages](/streams-api/evm/reference/get-history) to get all the parameters and responses type.\n\nIn production, you should have your own webhook setup, but for the scope of this tutorial, we will be using [https://webhook.site](https://webhook.site) to get your test webhook. To get your test webhook, simply go to the site and copy the given unique URL.\n\n### Step 1: Install Moralis SDK\n\nimport SetupMoralis from '/docs/partials/\\_install-moralis-sdk.mdx';\n\n\n\n### Step 2: Monitor On-Chain Wallet Transactions\n\nOnce you have [your API key](/web3-data-api/evm/get-your-api-key) and [webhook URL](https://webhook.site), let's set up our first stream to monitor on-chain crypto wallet transactions. In this instance, let's monitor the `0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4` address.\n\nTo do so, copy the following code:\n\nimport Tabs from '@theme/Tabs';\nimport TabItem from '@theme/TabItem';\n\n\n \n\n```javascript index.js\nconst Moralis = require(\"moralis\").default;\nconst { EvmChain } = require(\"@moralisweb3/common-evm-utils\");\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],\n description: \"monitor Bobs wallet\",\n tag: \"bob\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n includeNativeTxs: true,\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach bobs address to the stream\n const address = \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\nimport Moralis from \"moralis\";\nimport { EvmChain } from \"@moralisweb3/common-evm-utils\";\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],\n description: \"monitor Bobs wallet\",\n tag: \"bob\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n includeNativeTxs: true,\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach bobs address to the stream\n const address = \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\nfrom moralis import streams\n\napi_key = \"04u5XkBCRyoxrAM89MeOSV055R6QpRxTWGw431jWd8ydCJtq0TpY6jErerZ9FN3u\"\n\ncreate_stream_body = {\n \"description\": \"monitor Bobs wallet\",\n \"tag\": \"bob\",\n \"webhook_url\": \"https://YOUR_WEBHOOK_URL\",\n \"include_native_txs\": True,\n \"chain_ids\": [\n \"0x1\",\n \"0x89\"\n ]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach bobs address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce the code has been added, you can run the script to create the [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new transactions occuring on either Ethereum or Polygon.\n\n### Step 3: Listen to Smart Contract Events\n\nOther than monitoring crypto wallet transactions in real-time, you can also use [Streams](https://moralis.io/streams/) to listen to real-time smart contract events whenever it is emitted on the particular blockchain you are listening to.\n\nSuppose we'd like to listen to all ERC20 transfers for a [USDT](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7). Then, the streams setup shall be as follows:\n\n\n \n\n```javascript index.js\nconst Moralis = require(\"moralis\").default;\nconst { EvmChain } = require(\"@moralisweb3/common-evm-utils\");\n\nconst ERC20_transfer_ABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: \"from\", type: \"address\" },\n { indexed: true, name: \"to\", type: \"address\" },\n { indexed: false, name: \"value\", type: \"uint256\" },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM],\n description: \"monitor USDT transfers\",\n tag: \"USDT\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n abi: ERC20_transfer_ABI,\n includeContractLogs: true,\n topic0: [\"Transfer(address,address,uint256)\"],\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\nimport Moralis from \"moralis\";\nimport { EvmChain } from \"@moralisweb3/common-evm-utils\";\n\nconst ERC20_transfer_ABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: \"from\", type: \"address\" },\n { indexed: true, name: \"to\", type: \"address\" },\n { indexed: false, name: \"value\", type: \"uint256\" },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM],\n description: \"monitor USDT transfers\",\n tag: \"USDT\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n abi: ERC20_transfer_ABI,\n includeContractLogs: true,\n topic0: [\"Transfer(address,address,uint256)\"],\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\nfrom moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nERC20_transfer_ABI = [{\n \"anonymous\": false,\n \"inputs\": [\n { \"indexed\": true, \"name\": \"from\", \"type\": \"address\" },\n { \"indexed\": true, \"name\": \"to\", \"type\": \"address\" },\n { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" },\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\",\n}]\n\ncreate_stream_body = {\n \"description\": \"monitor USDT transfers\",\n \"tag\": \"USDT\",\n \"webhook_url\": \"https://YOUR_WEBHOOK_URL\",\n \"include_contract_logs\": True,\n \"chain_ids\": [\n \"0x1\"\n ],\n \"abi\": ERC20_transfer_ABI,\n \"topic0\": [\"Transfer(address,address,uint256)\"]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach USDT address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce the code has been added, you can run the script to create a second [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new USDT transfers occuring on either Ethereum.\n\nFor listening to smart contracts, you can also add the [Filters feature](/streams-api/evm/filter-streams) to filter out results that only fulfills certain criteria. This can be relevant in more specific use cases, such as whale monitoring, and can simply be supplemented to our existing code.\n\nFor example, we'd like to monitor all USDT transaction on Ethereum that is over $1M, then we can modify our code as follows:\n\n\n \n\n```javascript index.js\n// Above code is same as prior\n\nconst filter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n};\n\nconst runApp = async () => {\n const stream = {\n // same parameters as prior\n advancedOptions: [\n {\n topic0: \"Transfer(address,address,uint256)\",\n filter: filter_ERC20\n },\n ]\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\n// Above code is same as prior\n\nconst filter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n};\n\nconst runApp = async () => {\n const stream = {\n // same parameters as prior\n advancedOptions: [\n {\n topic0: \"Transfer(address,address,uint256)\",\n filter: filter_ERC20\n },\n ]\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\n# Above code is same as prior\n\nfilter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n}\n\ncreate_stream_body = {\n # same parameters as prior\n \"advanced_options\": [\n {\n \"topic0\": \"Transfer(address,address,uint256)\",\n \"filter\": filter_ERC20\n }\n ]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach USDT address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce modified, you will only receive all USDT transfers on Ethereum over $1M real-time on your webhooks.\n", + "content": "\n## What is an Streams API?\n\n![](/img/content/d06bbe5-Moralis-Streams-API.webp)\n\nThe [Streams API](https://moralis.io/streams/) is a collection of APIs that can be used to setup Streams for listening to real-time events from contracts, native transactions, and internal transactions on multiple [EVM chains](/streams-api/evm#supported-chains) that we support.\n\nThe [Streams API](https://moralis.io/streams/) is designed to stream real-time blockchain data to application through webhooks that help developers to improves the user experience.\n\nTherefore, the ideal use cases for the [Streams API](https://moralis.io/streams/) are listed as below, but not limited to:\n\n- Web3 alerts (e.g. whale alerts monitoring)\n- Real-time transaction & crypto wallet notifications\n- Monitoring wallet balances\n- etc.\n\n## How to get started?\n\nTo get started with [Moralis Streams API](https://moralis.io/streams/), there are two methods that can be used to create [Streams](https://moralis.io/streams/), depending on the programming language that you are using:\n\n| Programming Languages | Method |\n| ------------------------------------- | ------------ |\n| JavaScript/TypeScript, Python | Moralis SDKs |\n| Others (e.g. Java, C/C++, Ruby, etc.) | REST API |\n\nFor this guide, we'll particularly use the Moralis SDK for examples.\n\nIf you would like to use other languages calling the [Moralis Streams API](https://moralis.io/streams/) using regular REST API call, then make sure to check the [Streams API reference pages](/streams-api/evm/reference/get-history) to get all the parameters and responses type.\n\nIn production, you should have your own webhook setup, but for the scope of this tutorial, we will be using [https://webhook.site](https://webhook.site) to get your test webhook. To get your test webhook, simply go to the site and copy the given unique URL.\n\n### Step 1: Install Moralis SDK\n\nimport SetupMoralis from '/docs/partials/\\_install-moralis-sdk.mdx';\n\n\n\n### Step 2: Monitor On-Chain Wallet Transactions\n\nOnce you have [your API key](/web3-data-api/evm/get-your-api-key) and [webhook URL](https://webhook.site), let's set up our first stream to monitor on-chain crypto wallet transactions. In this instance, let's monitor the `0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4` address.\n\nTo do so, copy the following code:\n\nimport Tabs from '@theme/Tabs';\nimport TabItem from '@theme/TabItem';\n\n\n \n\n```javascript index.js\nconst Moralis = require(\"moralis\").default;\nconst { EvmChain } = require(\"@moralisweb3/common-evm-utils\");\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],\n description: \"monitor Bobs wallet\",\n tag: \"bob\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n includeNativeTxs: true,\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach bobs address to the stream\n const address = \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\nimport Moralis from \"moralis\";\nimport { EvmChain } from \"@moralisweb3/common-evm-utils\";\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],\n description: \"monitor Bobs wallet\",\n tag: \"bob\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n includeNativeTxs: true,\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach bobs address to the stream\n const address = \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\nfrom moralis import streams\n\napi_key = \"04u5XkBCRyoxrAM89MeOSV055R6QpRxTWGw431jWd8ydCJtq0TpY6jErerZ9FN3u\"\n\ncreate_stream_body = {\n \"description\": \"monitor Bobs wallet\",\n \"tag\": \"bob\",\n \"webhook_url\": \"https://YOUR_WEBHOOK_URL\",\n \"include_native_txs\": True,\n \"chain_ids\": [\n \"0x1\",\n \"0x89\"\n ]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach bobs address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce the code has been added, you can run the script to create the [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new transactions occuring on either Ethereum or Polygon.\n\n### Step 3: Listen to Smart Contract Events\n\nOther than monitoring crypto wallet transactions in real-time, you can also use [Streams](https://moralis.io/streams/) to listen to real-time smart contract events whenever it is emitted on the particular blockchain you are listening to.\n\nSuppose we'd like to listen to all ERC20 transfers for a [USDT](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7). Then, the streams setup shall be as follows:\n\n\n \n\n```javascript index.js\nconst Moralis = require(\"moralis\").default;\nconst { EvmChain } = require(\"@moralisweb3/common-evm-utils\");\n\nconst ERC20_transfer_ABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: \"from\", type: \"address\" },\n { indexed: true, name: \"to\", type: \"address\" },\n { indexed: false, name: \"value\", type: \"uint256\" },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM],\n description: \"monitor USDT transfers\",\n tag: \"USDT\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n abi: ERC20_transfer_ABI,\n includeContractLogs: true,\n topic0: [\"Transfer(address,address,uint256)\"],\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\nimport Moralis from \"moralis\";\nimport { EvmChain } from \"@moralisweb3/common-evm-utils\";\n\nconst ERC20_transfer_ABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: \"from\", type: \"address\" },\n { indexed: true, name: \"to\", type: \"address\" },\n { indexed: false, name: \"value\", type: \"uint256\" },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM],\n description: \"monitor USDT transfers\",\n tag: \"USDT\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n abi: ERC20_transfer_ABI,\n includeContractLogs: true,\n topic0: [\"Transfer(address,address,uint256)\"],\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\nfrom moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nERC20_transfer_ABI = [{\n \"anonymous\": false,\n \"inputs\": [\n { \"indexed\": true, \"name\": \"from\", \"type\": \"address\" },\n { \"indexed\": true, \"name\": \"to\", \"type\": \"address\" },\n { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" },\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\",\n}]\n\ncreate_stream_body = {\n \"description\": \"monitor USDT transfers\",\n \"tag\": \"USDT\",\n \"webhook_url\": \"https://YOUR_WEBHOOK_URL\",\n \"include_contract_logs\": True,\n \"chain_ids\": [\n \"0x1\"\n ],\n \"abi\": ERC20_transfer_ABI,\n \"topic0\": [\"Transfer(address,address,uint256)\"]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach USDT address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce the code has been added, you can run the script to create a second [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new USDT transfers occuring on either Ethereum.\n\nFor listening to smart contracts, you can also add the [Filters feature](/streams-api/evm/streams-configuration/filter-streams) to filter out results that only fulfills certain criteria. This can be relevant in more specific use cases, such as whale monitoring, and can simply be supplemented to our existing code.\n\nFor example, we'd like to monitor all USDT transaction on Ethereum that is over $1M, then we can modify our code as follows:\n\n\n \n\n```javascript index.js\n// Above code is same as prior\n\nconst filter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n};\n\nconst runApp = async () => {\n const stream = {\n // same parameters as prior\n advancedOptions: [\n {\n topic0: \"Transfer(address,address,uint256)\",\n filter: filter_ERC20\n },\n ]\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\n// Above code is same as prior\n\nconst filter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n};\n\nconst runApp = async () => {\n const stream = {\n // same parameters as prior\n advancedOptions: [\n {\n topic0: \"Transfer(address,address,uint256)\",\n filter: filter_ERC20\n },\n ]\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\n# Above code is same as prior\n\nfilter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n}\n\ncreate_stream_body = {\n # same parameters as prior\n \"advanced_options\": [\n {\n \"topic0\": \"Transfer(address,address,uint256)\",\n \"filter\": filter_ERC20\n }\n ]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach USDT address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce modified, you will only receive all USDT transfers on Ethereum over $1M real-time on your webhooks.\n", "data": { "title": "Streams API - Full Guide & Walkthrough", "slug": "/guides/streams-api-full-guide-walkthrough", diff --git a/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md b/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md index ff77ff7c..1b4a40ff 100644 --- a/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md +++ b/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md @@ -63,7 +63,7 @@ When a transaction occurs on the wallet it will appear on the right hand termina ![](/img/content/211853590-a71f84ab-ab8c-40ca-9d28-452ba64e1de6.webp) -4. Select the events you want to track by selecting from options `Contract Interaction`, `Native Transactions`, `Internal Transactions` under `Stream Options`. To read more on each options take a look at Streams options in our [documentation](/streams-api/evm/useful-streams-options). +4. Select the events you want to track by selecting from options `Contract Interaction`, `Native Transactions`, `Internal Transactions` under `Stream Options`. To read more on each options take a look at Streams options in our [documentation](/streams-configuration/useful-streams-options). ![](/img/content/211854294-e4507fe0-6995-4bfe-a995-a0c815b3da9d.webp) diff --git a/versioned_docs/version-2.0/04-guides/streams-api-full-guide-walkthrough.md b/versioned_docs/version-2.0/04-guides/streams-api-full-guide-walkthrough.md index e57e81dd..4985808a 100644 --- a/versioned_docs/version-2.0/04-guides/streams-api-full-guide-walkthrough.md +++ b/versioned_docs/version-2.0/04-guides/streams-api-full-guide-walkthrough.md @@ -316,7 +316,7 @@ streams.evm_streams.add_address_to_stream( Once the code has been added, you can run the script to create a second [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new USDT transfers occuring on either Ethereum. -For listening to smart contracts, you can also add the [Filters feature](/streams-api/evm/filter-streams) to filter out results that only fulfills certain criteria. This can be relevant in more specific use cases, such as whale monitoring, and can simply be supplemented to our existing code. +For listening to smart contracts, you can also add the [Filters feature](/streams-api/evm/streams-configuration/filter-streams) to filter out results that only fulfills certain criteria. This can be relevant in more specific use cases, such as whale monitoring, and can simply be supplemented to our existing code. For example, we'd like to monitor all USDT transaction on Ethereum that is over $1M, then we can modify our code as follows: diff --git a/versioned_docs/version-2.0/configs/guides/guides.json b/versioned_docs/version-2.0/configs/guides/guides.json index 7a88f613..668cb1c0 100644 --- a/versioned_docs/version-2.0/configs/guides/guides.json +++ b/versioned_docs/version-2.0/configs/guides/guides.json @@ -169,7 +169,7 @@ "excerpt": "" }, { - "content": "\n## What is an Streams API?\n\n![](/img/content/d06bbe5-Moralis-Streams-API.webp)\n\nThe [Streams API](https://moralis.io/streams/) is a collection of APIs that can be used to setup Streams for listening to real-time events from contracts, native transactions, and internal transactions on multiple [EVM chains](/streams-api/evm#supported-chains) that we support.\n\nThe [Streams API](https://moralis.io/streams/) is designed to stream real-time blockchain data to application through webhooks that help developers to improves the user experience.\n\nTherefore, the ideal use cases for the [Streams API](https://moralis.io/streams/) are listed as below, but not limited to:\n\n- Web3 alerts (e.g. whale alerts monitoring)\n- Real-time transaction & crypto wallet notifications\n- Monitoring wallet balances\n- etc.\n\n## How to get started?\n\nTo get started with [Moralis Streams API](https://moralis.io/streams/), there are two methods that can be used to create [Streams](https://moralis.io/streams/), depending on the programming language that you are using:\n\n| Programming Languages | Method |\n| ------------------------------------- | ------------ |\n| JavaScript/TypeScript, Python | Moralis SDKs |\n| Others (e.g. Java, C/C++, Ruby, etc.) | REST API |\n\nFor this guide, we'll particularly use the Moralis SDK for examples.\n\nIf you would like to use other languages calling the [Moralis Streams API](https://moralis.io/streams/) using regular REST API call, then make sure to check the [Streams API reference pages](/streams-api/evm/reference/get-history) to get all the parameters and responses type.\n\nIn production, you should have your own webhook setup, but for the scope of this tutorial, we will be using [https://webhook.site](https://webhook.site) to get your test webhook. To get your test webhook, simply go to the site and copy the given unique URL.\n\n### Step 1: Install Moralis SDK\n\nimport SetupMoralis from '/docs/partials/\\_install-moralis-sdk.mdx';\n\n\n\n### Step 2: Monitor On-Chain Wallet Transactions\n\nOnce you have [your API key](/web3-data-api/evm/get-your-api-key) and [webhook URL](https://webhook.site), let's set up our first stream to monitor on-chain crypto wallet transactions. In this instance, let's monitor the `0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4` address.\n\nTo do so, copy the following code:\n\nimport Tabs from '@theme/Tabs';\nimport TabItem from '@theme/TabItem';\n\n\n \n\n```javascript index.js\nconst Moralis = require(\"moralis\").default;\nconst { EvmChain } = require(\"@moralisweb3/common-evm-utils\");\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],\n description: \"monitor Bobs wallet\",\n tag: \"bob\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n includeNativeTxs: true,\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach bobs address to the stream\n const address = \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\nimport Moralis from \"moralis\";\nimport { EvmChain } from \"@moralisweb3/common-evm-utils\";\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],\n description: \"monitor Bobs wallet\",\n tag: \"bob\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n includeNativeTxs: true,\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach bobs address to the stream\n const address = \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\nfrom moralis import streams\n\napi_key = \"04u5XkBCRyoxrAM89MeOSV055R6QpRxTWGw431jWd8ydCJtq0TpY6jErerZ9FN3u\"\n\ncreate_stream_body = {\n \"description\": \"monitor Bobs wallet\",\n \"tag\": \"bob\",\n \"webhook_url\": \"https://YOUR_WEBHOOK_URL\",\n \"include_native_txs\": True,\n \"chain_ids\": [\n \"0x1\",\n \"0x89\"\n ]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach bobs address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce the code has been added, you can run the script to create the [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new transactions occuring on either Ethereum or Polygon.\n\n### Step 3: Listen to Smart Contract Events\n\nOther than monitoring crypto wallet transactions in real-time, you can also use [Streams](https://moralis.io/streams/) to listen to real-time smart contract events whenever it is emitted on the particular blockchain you are listening to.\n\nSuppose we'd like to listen to all ERC20 transfers for a [USDT](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7). Then, the streams setup shall be as follows:\n\n\n \n\n```javascript index.js\nconst Moralis = require(\"moralis\").default;\nconst { EvmChain } = require(\"@moralisweb3/common-evm-utils\");\n\nconst ERC20_transfer_ABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: \"from\", type: \"address\" },\n { indexed: true, name: \"to\", type: \"address\" },\n { indexed: false, name: \"value\", type: \"uint256\" },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM],\n description: \"monitor USDT transfers\",\n tag: \"USDT\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n abi: ERC20_transfer_ABI,\n includeContractLogs: true,\n topic0: [\"Transfer(address,address,uint256)\"],\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\nimport Moralis from \"moralis\";\nimport { EvmChain } from \"@moralisweb3/common-evm-utils\";\n\nconst ERC20_transfer_ABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: \"from\", type: \"address\" },\n { indexed: true, name: \"to\", type: \"address\" },\n { indexed: false, name: \"value\", type: \"uint256\" },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM],\n description: \"monitor USDT transfers\",\n tag: \"USDT\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n abi: ERC20_transfer_ABI,\n includeContractLogs: true,\n topic0: [\"Transfer(address,address,uint256)\"],\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\nfrom moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nERC20_transfer_ABI = [{\n \"anonymous\": false,\n \"inputs\": [\n { \"indexed\": true, \"name\": \"from\", \"type\": \"address\" },\n { \"indexed\": true, \"name\": \"to\", \"type\": \"address\" },\n { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" },\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\",\n}]\n\ncreate_stream_body = {\n \"description\": \"monitor USDT transfers\",\n \"tag\": \"USDT\",\n \"webhook_url\": \"https://YOUR_WEBHOOK_URL\",\n \"include_contract_logs\": True,\n \"chain_ids\": [\n \"0x1\"\n ],\n \"abi\": ERC20_transfer_ABI,\n \"topic0\": [\"Transfer(address,address,uint256)\"]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach USDT address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce the code has been added, you can run the script to create a second [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new USDT transfers occuring on either Ethereum.\n\nFor listening to smart contracts, you can also add the [Filters feature](/streams-api/evm/filter-streams) to filter out results that only fulfills certain criteria. This can be relevant in more specific use cases, such as whale monitoring, and can simply be supplemented to our existing code.\n\nFor example, we'd like to monitor all USDT transaction on Ethereum that is over $1M, then we can modify our code as follows:\n\n\n \n\n```javascript index.js\n// Above code is same as prior\n\nconst filter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n};\n\nconst runApp = async () => {\n const stream = {\n // same parameters as prior\n advancedOptions: [\n {\n topic0: \"Transfer(address,address,uint256)\",\n filter: filter_ERC20\n },\n ]\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\n// Above code is same as prior\n\nconst filter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n};\n\nconst runApp = async () => {\n const stream = {\n // same parameters as prior\n advancedOptions: [\n {\n topic0: \"Transfer(address,address,uint256)\",\n filter: filter_ERC20\n },\n ]\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\n# Above code is same as prior\n\nfilter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n}\n\ncreate_stream_body = {\n # same parameters as prior\n \"advanced_options\": [\n {\n \"topic0\": \"Transfer(address,address,uint256)\",\n \"filter\": filter_ERC20\n }\n ]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach USDT address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce modified, you will only receive all USDT transfers on Ethereum over $1M real-time on your webhooks.\n", + "content": "\n## What is an Streams API?\n\n![](/img/content/d06bbe5-Moralis-Streams-API.webp)\n\nThe [Streams API](https://moralis.io/streams/) is a collection of APIs that can be used to setup Streams for listening to real-time events from contracts, native transactions, and internal transactions on multiple [EVM chains](/streams-api/evm#supported-chains) that we support.\n\nThe [Streams API](https://moralis.io/streams/) is designed to stream real-time blockchain data to application through webhooks that help developers to improves the user experience.\n\nTherefore, the ideal use cases for the [Streams API](https://moralis.io/streams/) are listed as below, but not limited to:\n\n- Web3 alerts (e.g. whale alerts monitoring)\n- Real-time transaction & crypto wallet notifications\n- Monitoring wallet balances\n- etc.\n\n## How to get started?\n\nTo get started with [Moralis Streams API](https://moralis.io/streams/), there are two methods that can be used to create [Streams](https://moralis.io/streams/), depending on the programming language that you are using:\n\n| Programming Languages | Method |\n| ------------------------------------- | ------------ |\n| JavaScript/TypeScript, Python | Moralis SDKs |\n| Others (e.g. Java, C/C++, Ruby, etc.) | REST API |\n\nFor this guide, we'll particularly use the Moralis SDK for examples.\n\nIf you would like to use other languages calling the [Moralis Streams API](https://moralis.io/streams/) using regular REST API call, then make sure to check the [Streams API reference pages](/streams-api/evm/reference/get-history) to get all the parameters and responses type.\n\nIn production, you should have your own webhook setup, but for the scope of this tutorial, we will be using [https://webhook.site](https://webhook.site) to get your test webhook. To get your test webhook, simply go to the site and copy the given unique URL.\n\n### Step 1: Install Moralis SDK\n\nimport SetupMoralis from '/docs/partials/\\_install-moralis-sdk.mdx';\n\n\n\n### Step 2: Monitor On-Chain Wallet Transactions\n\nOnce you have [your API key](/web3-data-api/evm/get-your-api-key) and [webhook URL](https://webhook.site), let's set up our first stream to monitor on-chain crypto wallet transactions. In this instance, let's monitor the `0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4` address.\n\nTo do so, copy the following code:\n\nimport Tabs from '@theme/Tabs';\nimport TabItem from '@theme/TabItem';\n\n\n \n\n```javascript index.js\nconst Moralis = require(\"moralis\").default;\nconst { EvmChain } = require(\"@moralisweb3/common-evm-utils\");\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],\n description: \"monitor Bobs wallet\",\n tag: \"bob\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n includeNativeTxs: true,\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach bobs address to the stream\n const address = \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\nimport Moralis from \"moralis\";\nimport { EvmChain } from \"@moralisweb3/common-evm-utils\";\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM, EvmChain.POLYGON],\n description: \"monitor Bobs wallet\",\n tag: \"bob\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n includeNativeTxs: true,\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach bobs address to the stream\n const address = \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\nfrom moralis import streams\n\napi_key = \"04u5XkBCRyoxrAM89MeOSV055R6QpRxTWGw431jWd8ydCJtq0TpY6jErerZ9FN3u\"\n\ncreate_stream_body = {\n \"description\": \"monitor Bobs wallet\",\n \"tag\": \"bob\",\n \"webhook_url\": \"https://YOUR_WEBHOOK_URL\",\n \"include_native_txs\": True,\n \"chain_ids\": [\n \"0x1\",\n \"0x89\"\n ]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach bobs address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce the code has been added, you can run the script to create the [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new transactions occuring on either Ethereum or Polygon.\n\n### Step 3: Listen to Smart Contract Events\n\nOther than monitoring crypto wallet transactions in real-time, you can also use [Streams](https://moralis.io/streams/) to listen to real-time smart contract events whenever it is emitted on the particular blockchain you are listening to.\n\nSuppose we'd like to listen to all ERC20 transfers for a [USDT](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7). Then, the streams setup shall be as follows:\n\n\n \n\n```javascript index.js\nconst Moralis = require(\"moralis\").default;\nconst { EvmChain } = require(\"@moralisweb3/common-evm-utils\");\n\nconst ERC20_transfer_ABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: \"from\", type: \"address\" },\n { indexed: true, name: \"to\", type: \"address\" },\n { indexed: false, name: \"value\", type: \"uint256\" },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM],\n description: \"monitor USDT transfers\",\n tag: \"USDT\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n abi: ERC20_transfer_ABI,\n includeContractLogs: true,\n topic0: [\"Transfer(address,address,uint256)\"],\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\nimport Moralis from \"moralis\";\nimport { EvmChain } from \"@moralisweb3/common-evm-utils\";\n\nconst ERC20_transfer_ABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: \"from\", type: \"address\" },\n { indexed: true, name: \"to\", type: \"address\" },\n { indexed: false, name: \"value\", type: \"uint256\" },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n\nconst runApp = async () => {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\",\n });\n\n const stream = {\n chains: [EvmChain.ETHEREUM],\n description: \"monitor USDT transfers\",\n tag: \"USDT\",\n webhookUrl: \"https://YOUR_WEBHOOK_URL\",\n abi: ERC20_transfer_ABI,\n includeContractLogs: true,\n topic0: [\"Transfer(address,address,uint256)\"],\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\nfrom moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nERC20_transfer_ABI = [{\n \"anonymous\": false,\n \"inputs\": [\n { \"indexed\": true, \"name\": \"from\", \"type\": \"address\" },\n { \"indexed\": true, \"name\": \"to\", \"type\": \"address\" },\n { \"indexed\": false, \"name\": \"value\", \"type\": \"uint256\" },\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\",\n}]\n\ncreate_stream_body = {\n \"description\": \"monitor USDT transfers\",\n \"tag\": \"USDT\",\n \"webhook_url\": \"https://YOUR_WEBHOOK_URL\",\n \"include_contract_logs\": True,\n \"chain_ids\": [\n \"0x1\"\n ],\n \"abi\": ERC20_transfer_ABI,\n \"topic0\": [\"Transfer(address,address,uint256)\"]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach USDT address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce the code has been added, you can run the script to create a second [Streams](https://moralis.io/streams/). This will be reflected on your Moralis Dashboard as well. From here, you shall receive new real-time responses on your attached webhook for any new USDT transfers occuring on either Ethereum.\n\nFor listening to smart contracts, you can also add the [Filters feature](/streams-api/evm/streams-configuration/filter-streams) to filter out results that only fulfills certain criteria. This can be relevant in more specific use cases, such as whale monitoring, and can simply be supplemented to our existing code.\n\nFor example, we'd like to monitor all USDT transaction on Ethereum that is over $1M, then we can modify our code as follows:\n\n\n \n\n```javascript index.js\n// Above code is same as prior\n\nconst filter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n};\n\nconst runApp = async () => {\n const stream = {\n // same parameters as prior\n advancedOptions: [\n {\n topic0: \"Transfer(address,address,uint256)\",\n filter: filter_ERC20\n },\n ]\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```typescript index.ts\n// Above code is same as prior\n\nconst filter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n};\n\nconst runApp = async () => {\n const stream = {\n // same parameters as prior\n advancedOptions: [\n {\n topic0: \"Transfer(address,address,uint256)\",\n filter: filter_ERC20\n },\n ]\n };\n\n const newStream = await Moralis.Streams.add(stream);\n const { id } = newStream.toJSON();\n\n // Now we attach USDT address to the stream\n const address = \"0xdAC17F958D2ee523a2206206994597C13D831ec7\";\n\n await Moralis.Streams.addAddress({ address, id });\n};\n\nrunApp();\n```\n\n\n\n\n```python index.py\n# Above code is same as prior\n\nfilter_ERC20 = {\n \"and\": \\[\n { \"eq\": [\"from\", \"0x283af0b28c62c092c9727f1ee09c02ca627eb7f5\"] },\n { \"gt\": [\"value\", \"1000000000\"] }, // Example of USDT (6 Decimals)\n ],\n}\n\ncreate_stream_body = {\n # same parameters as prior\n \"advanced_options\": [\n {\n \"topic0\": \"Transfer(address,address,uint256)\",\n \"filter\": filter_ERC20\n }\n ]\n}\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=create_stream_body,\n)\n\nadd_address_body = {\n \"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"\n}\n\nparams = {\n \"id\": result.id\n}\n\n# Now we attach USDT address to the stream\nstreams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=add_address_body,\n params=params,\n)\n```\n\n\n\n\nOnce modified, you will only receive all USDT transfers on Ethereum over $1M real-time on your webhooks.\n", "data": { "title": "Streams API - Full Guide & Walkthrough", "slug": "/guides/streams-api-full-guide-walkthrough", From 75a0c84986e5e203827d2eda68d72b26e8f66372 Mon Sep 17 00:00:00 2001 From: Nazeim Date: Fri, 24 Nov 2023 16:14:32 +0300 Subject: [PATCH 06/10] update --- api/data/redirects.ts | 5 ----- docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md | 2 +- .../evm/integrations/firebase-api-calls-from-the-frontend.md | 4 ++-- docs/01-web3-data-api/evm/integrations/firebase-nodejs.md | 2 +- .../evm/integrations/firebase-api-calls-from-the-frontend.md | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/api/data/redirects.ts b/api/data/redirects.ts index ef1f440b..44acc116 100644 --- a/api/data/redirects.ts +++ b/api/data/redirects.ts @@ -5925,11 +5925,6 @@ export const redirects = [ destination: "/web3-data-api/evm/integrations/aws-lambda-nodejs", permanent: true, }, - { - source: "/web3-data-api/integrations/firebase-advanced-nodejs", - destination: "/web3-data-api/evm/integrations/firebase-advanced-nodejs", - permanent: true, - }, { source: "/web3-data-api/integrations/firebase-nodejs", destination: "/web3-data-api/evm/integrations/firebase-nodejs", diff --git a/docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md b/docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md index 1f4ee2e5..46eaa4a0 100644 --- a/docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md +++ b/docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md @@ -1,6 +1,6 @@ --- title: "AWS Lambda (NodeJS)" -slug: "aws-lambda-nodejs" +slug: "../aws-lambda-nodejs" description: "This tutorial shows how to easily integrate our [NodeJS SDK](/web3-data-api/evm/moralis-sdk) with AWS Lambda. We're going to cover two ways of doing it:\n* Develop and deploy a [Lambda App with multiple functions](#lambda-app-with-multiple-functions).\n* Develop and deploy a [Lambda NodeJS Express API](#lambda-nodejs-express-api).\n\nTo make everything easier, we're going to use _[Serverless Framework](https://www.serverless.com/)_." --- diff --git a/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md b/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md index e7497506..23ff807c 100644 --- a/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md +++ b/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md @@ -1,6 +1,6 @@ --- title: "Firebase Advanced (NodeJS)" -slug: "firebase-advanced-nodejs" +slug: "../firebase-advanced-nodejs" description: "If you want to call the Moralis API from your frontend app, don't do this directly. Please note that your Moralis API key should be secured against theft or abuse. Almost anyone can extract your key by the HTTP monitor, even if your code is obfuscated. Thus, you should keep your API key secure on the backend. This tutorial demonstrates how you can do it for Firebase." --- @@ -10,7 +10,7 @@ If you want to call the Moralis API from your frontend app, don't do this direct -First, check out our tutorial, [Your First Dapp using Firebase](/streams-api/evm/streams-configuration/firebase), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". +First, check out our tutorial, [Your First Dapp using Firebase](/web3-data-api/evm/integrations/firebase-nodejs), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". Moreover, in this tutorial, we will use three Firebase services: diff --git a/docs/01-web3-data-api/evm/integrations/firebase-nodejs.md b/docs/01-web3-data-api/evm/integrations/firebase-nodejs.md index 462abc29..ebda910b 100644 --- a/docs/01-web3-data-api/evm/integrations/firebase-nodejs.md +++ b/docs/01-web3-data-api/evm/integrations/firebase-nodejs.md @@ -1,6 +1,6 @@ --- title: "Firebase (NodeJS)" -slug: "firebase-nodejs" +slug: "../firebase-nodejs" description: "Learn how to set up a Firebase dapp that can query blockchain data, such as NFTs, tokens, balances, transfers, transactions, and more, from any Firebase application. This tutorial works on almost any blockchain, including Ethereum, Polygon, BNB Chain, Avalanche, Cronos, and many more!" --- diff --git a/versioned_docs/version-2.0/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md b/versioned_docs/version-2.0/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md index e7497506..0a9cbb8f 100644 --- a/versioned_docs/version-2.0/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md +++ b/versioned_docs/version-2.0/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md @@ -10,7 +10,7 @@ If you want to call the Moralis API from your frontend app, don't do this direct -First, check out our tutorial, [Your First Dapp using Firebase](/streams-api/evm/streams-configuration/firebase), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". +First, check out our tutorial, [Your First Dapp using Firebase](/web3-data-api/evm/integrations/firebase-nodejs), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". Moreover, in this tutorial, we will use three Firebase services: From b7a13d2f2c4a8efd36d2c2cb4f2bcbfc6de7600e Mon Sep 17 00:00:00 2001 From: Nazeim Date: Fri, 24 Nov 2023 16:28:50 +0300 Subject: [PATCH 07/10] update --- docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md | 2 +- .../evm/integrations/firebase-api-calls-from-the-frontend.md | 4 +--- docs/01-web3-data-api/evm/integrations/firebase-nodejs.md | 2 +- docs/02-streams-api/evm/streams-configuration/firebase.md | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md b/docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md index 46eaa4a0..1f4ee2e5 100644 --- a/docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md +++ b/docs/01-web3-data-api/evm/integrations/aws-lambda-nodejs.md @@ -1,6 +1,6 @@ --- title: "AWS Lambda (NodeJS)" -slug: "../aws-lambda-nodejs" +slug: "aws-lambda-nodejs" description: "This tutorial shows how to easily integrate our [NodeJS SDK](/web3-data-api/evm/moralis-sdk) with AWS Lambda. We're going to cover two ways of doing it:\n* Develop and deploy a [Lambda App with multiple functions](#lambda-app-with-multiple-functions).\n* Develop and deploy a [Lambda NodeJS Express API](#lambda-nodejs-express-api).\n\nTo make everything easier, we're going to use _[Serverless Framework](https://www.serverless.com/)_." --- diff --git a/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md b/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md index 23ff807c..7d076b3c 100644 --- a/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md +++ b/docs/01-web3-data-api/evm/integrations/firebase-api-calls-from-the-frontend.md @@ -1,6 +1,6 @@ --- title: "Firebase Advanced (NodeJS)" -slug: "../firebase-advanced-nodejs" +slug: "firebase-advanced-nodejs" description: "If you want to call the Moralis API from your frontend app, don't do this directly. Please note that your Moralis API key should be secured against theft or abuse. Almost anyone can extract your key by the HTTP monitor, even if your code is obfuscated. Thus, you should keep your API key secure on the backend. This tutorial demonstrates how you can do it for Firebase." --- @@ -10,8 +10,6 @@ If you want to call the Moralis API from your frontend app, don't do this direct -First, check out our tutorial, [Your First Dapp using Firebase](/web3-data-api/evm/integrations/firebase-nodejs), because, in this section, we won't explain the basics, such as "how to create a project", or "how to run the Firebase emulator". - Moreover, in this tutorial, we will use three Firebase services: - [Hosting](https://firebase.google.com/docs/hosting) diff --git a/docs/01-web3-data-api/evm/integrations/firebase-nodejs.md b/docs/01-web3-data-api/evm/integrations/firebase-nodejs.md index ebda910b..462abc29 100644 --- a/docs/01-web3-data-api/evm/integrations/firebase-nodejs.md +++ b/docs/01-web3-data-api/evm/integrations/firebase-nodejs.md @@ -1,6 +1,6 @@ --- title: "Firebase (NodeJS)" -slug: "../firebase-nodejs" +slug: "firebase-nodejs" description: "Learn how to set up a Firebase dapp that can query blockchain data, such as NFTs, tokens, balances, transfers, transactions, and more, from any Firebase application. This tutorial works on almost any blockchain, including Ethereum, Polygon, BNB Chain, Avalanche, Cronos, and many more!" --- diff --git a/docs/02-streams-api/evm/streams-configuration/firebase.md b/docs/02-streams-api/evm/streams-configuration/firebase.md index 92c5aebc..0f51b27f 100644 --- a/docs/02-streams-api/evm/streams-configuration/firebase.md +++ b/docs/02-streams-api/evm/streams-configuration/firebase.md @@ -11,7 +11,7 @@ Moralis Streams can be used to monitor a blockchain wallet or a smart contract. -If you're not familiar with the basics of creating a project or running the Firebase emulator, we recommend checking out the **[Your First Dapp for Firebase](/web3-data-api/evm/integrations/firebase-nodejs)** tutorial first. +If you're not familiar with the basics of creating a project or running the Firebase emulator, we recommend checking out the **[Your First Dapp for Firebase](/streams-api/evm/streams-configuration/firebase)** tutorial first. In this tutorial, we will use the following services: From e99e313264e3a37f7768514d5efe4c17cf314649 Mon Sep 17 00:00:00 2001 From: Nazeim Date: Fri, 24 Nov 2023 16:44:52 +0300 Subject: [PATCH 08/10] update --- docs/02-streams-api/evm/streams-configuration/firebase.md | 2 +- .../02-streams-api/evm/getting-started/using-webui.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/02-streams-api/evm/streams-configuration/firebase.md b/docs/02-streams-api/evm/streams-configuration/firebase.md index 0f51b27f..92c5aebc 100644 --- a/docs/02-streams-api/evm/streams-configuration/firebase.md +++ b/docs/02-streams-api/evm/streams-configuration/firebase.md @@ -11,7 +11,7 @@ Moralis Streams can be used to monitor a blockchain wallet or a smart contract. -If you're not familiar with the basics of creating a project or running the Firebase emulator, we recommend checking out the **[Your First Dapp for Firebase](/streams-api/evm/streams-configuration/firebase)** tutorial first. +If you're not familiar with the basics of creating a project or running the Firebase emulator, we recommend checking out the **[Your First Dapp for Firebase](/web3-data-api/evm/integrations/firebase-nodejs)** tutorial first. In this tutorial, we will use the following services: diff --git a/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md b/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md index 1b4a40ff..d19d0ba1 100644 --- a/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md +++ b/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md @@ -63,7 +63,7 @@ When a transaction occurs on the wallet it will appear on the right hand termina ![](/img/content/211853590-a71f84ab-ab8c-40ca-9d28-452ba64e1de6.webp) -4. Select the events you want to track by selecting from options `Contract Interaction`, `Native Transactions`, `Internal Transactions` under `Stream Options`. To read more on each options take a look at Streams options in our [documentation](/streams-configuration/useful-streams-options). +4. Select the events you want to track by selecting from options `Contract Interaction`, `Native Transactions`, `Internal Transactions` under `Stream Options`. To read more on each options take a look at Streams options in our [documentation](/useful-streams-options). ![](/img/content/211854294-e4507fe0-6995-4bfe-a995-a0c815b3da9d.webp) From 7f58da58dadb5f24eb927bc90bdbbfc70a34f20a Mon Sep 17 00:00:00 2001 From: Nazeim Date: Fri, 24 Nov 2023 17:13:28 +0300 Subject: [PATCH 09/10] update --- .../02-streams-api/evm/getting-started/using-webui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md b/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md index d19d0ba1..a386c67a 100644 --- a/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md +++ b/versioned_docs/version-2.0/02-streams-api/evm/getting-started/using-webui.md @@ -63,7 +63,7 @@ When a transaction occurs on the wallet it will appear on the right hand termina ![](/img/content/211853590-a71f84ab-ab8c-40ca-9d28-452ba64e1de6.webp) -4. Select the events you want to track by selecting from options `Contract Interaction`, `Native Transactions`, `Internal Transactions` under `Stream Options`. To read more on each options take a look at Streams options in our [documentation](/useful-streams-options). +4. Select the events you want to track by selecting from options `Contract Interaction`, `Native Transactions`, `Internal Transactions` under `Stream Options`. To read more on each options take a look at Streams options in our [documentation](/streams-api/evm/streams-configuration/useful-streams-options). ![](/img/content/211854294-e4507fe0-6995-4bfe-a995-a0c815b3da9d.webp) From 9a16f0eebcbc558d86737808edd56cfde15230e4 Mon Sep 17 00:00:00 2001 From: Nazeim Date: Wed, 29 Nov 2023 01:49:26 +0300 Subject: [PATCH 10/10] update security --- .../evm/{webhooks => stream-security}/webhook-security.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/02-streams-api/evm/{webhooks => stream-security}/webhook-security.md (100%) diff --git a/docs/02-streams-api/evm/webhooks/webhook-security.md b/docs/02-streams-api/evm/stream-security/webhook-security.md similarity index 100% rename from docs/02-streams-api/evm/webhooks/webhook-security.md rename to docs/02-streams-api/evm/stream-security/webhook-security.md