From 08ace96d406fc4791c9e47f1e071fe4f4787a28c Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 11 Nov 2025 18:20:29 -0600 Subject: [PATCH 01/14] update redirects --- vercel.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index aa7f61cc4..81bf70afb 100644 --- a/vercel.json +++ b/vercel.json @@ -52,7 +52,13 @@ "destination": "https://docs.stacks.co/reference", "permanent": true }, - { "source": "/stacks/chainhook/:path*", "destination": "/tools/chainhook", "permanent": true }, + { "source": "/stacks/chainhook/:path*", "destination": "/tools/chainhooks", "permanent": true }, + { "source": "/tools/chainhook", "destination": "/tools/chainhooks", "permanent": true }, + { + "source": "/:locale/tools/chainhook", + "destination": "/:locale/tools/chainhooks", + "permanent": true + }, { "source": "/stacks/stacks.js/:path*", "destination": "https://docs.stacks.co/reference", From c32218a58936b7853f3d86b9263832c189895200 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 11 Nov 2025 18:20:54 -0600 Subject: [PATCH 02/14] update locale configurations --- app/[locale]/(home)/_pages/page.en.tsx | 4 ++-- app/[locale]/(home)/_pages/page.es.tsx | 4 ++-- app/[locale]/(home)/tools/_pages/page.en.tsx | 4 ++-- app/[locale]/(home)/tools/_pages/page.es.tsx | 2 +- app/layout.config.tsx | 8 ++++---- hooks/use-localized-navigation.tsx | 4 ++-- lib/api-config.ts | 2 +- lib/metadata.ts | 8 ++++---- lib/translations/en.ts | 6 +++--- lib/translations/es.ts | 8 ++++---- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/[locale]/(home)/_pages/page.en.tsx b/app/[locale]/(home)/_pages/page.en.tsx index f0968fd8b..666328fb2 100644 --- a/app/[locale]/(home)/_pages/page.en.tsx +++ b/app/[locale]/(home)/_pages/page.en.tsx @@ -58,8 +58,8 @@ export default function HomePage() { } badge="beta" - href="/tools/chainhook" - title="Chainhook" + href="/tools/chainhooks" + title="Chainhooks" description="Create custom event streams and triggers for real-time blockchain data processing." /> } badge="beta" - href="/tools/chainhook" - title="Chainhook" + href="/tools/chainhooks" + title="Chainhooks" description="Crea flujos de eventos personalizados y desencadenantes para el procesamiento de datos de blockchain en tiempo real." /> diff --git a/app/[locale]/(home)/tools/_pages/page.en.tsx b/app/[locale]/(home)/tools/_pages/page.en.tsx index 01db002dd..8914139a8 100644 --- a/app/[locale]/(home)/tools/_pages/page.en.tsx +++ b/app/[locale]/(home)/tools/_pages/page.en.tsx @@ -13,8 +13,8 @@ export default function ToolsPage() { } badge="beta" tag="Stacks" diff --git a/app/[locale]/(home)/tools/_pages/page.es.tsx b/app/[locale]/(home)/tools/_pages/page.es.tsx index 0e47b0df2..ad910159f 100644 --- a/app/[locale]/(home)/tools/_pages/page.es.tsx +++ b/app/[locale]/(home)/tools/_pages/page.es.tsx @@ -13,7 +13,7 @@ export default function ToolsPage() { } badge="beta" diff --git a/app/layout.config.tsx b/app/layout.config.tsx index 67ea03d1b..3c70eb4a6 100644 --- a/app/layout.config.tsx +++ b/app/layout.config.tsx @@ -22,9 +22,9 @@ export const baseOptions: BaseLayoutProps = { text: 'Tools', items: [ { - text: 'Chainhook', + text: 'Chainhooks', description: 'Monitor and analyze Clarity smart contract activity.', - url: '/tools/chainhook', + url: '/tools/chainhooks', isBeta: true, }, { @@ -70,9 +70,9 @@ export const baseOptions: BaseLayoutProps = { url: '/apis/token-metadata-api', }, { - text: 'Chainhook API', + text: 'Chainhooks API', description: 'RESTful API for accessing Chainhook', - url: '/apis/chainhook-api', + url: '/apis/chainhooks-api', isNew: true, }, { diff --git a/hooks/use-localized-navigation.tsx b/hooks/use-localized-navigation.tsx index 562f6c703..7a9b7b08d 100644 --- a/hooks/use-localized-navigation.tsx +++ b/hooks/use-localized-navigation.tsx @@ -29,7 +29,7 @@ export function useLocalizedNavigation(): BaseLayoutProps['links'] { description: string; } >([ - ['/tools/chainhook', t.tools.chainhook], + ['/tools/chainhooks', t.tools.chainhook], ['/tools/contract-monitoring', t.tools.contractMonitoring], ['/tools/bitcoin-indexer', t.tools.bitcoinIndexer], ['/resources/guides/api-keys', t.apis.apiKeys], @@ -37,7 +37,7 @@ export function useLocalizedNavigation(): BaseLayoutProps['links'] { ['/apis/stacks-blockchain-api', t.apis.stacksApi], ['/apis/stacks-node-rpc-api', t.apis.stacksNodeRpcApi], ['/apis/token-metadata-api', t.apis.tokenMetadata], - ['/apis/chainhook-api', t.apis.chainhook], + ['/apis/chainhooks-api', t.apis.chainhook], ['/apis/platform-api', t.apis.platform], ['/apis/ordinals-api', t.apis.ordinals], ['/apis/runes-api', t.apis.runes], diff --git a/lib/api-config.ts b/lib/api-config.ts index d92b51a8c..6ba51abd6 100644 --- a/lib/api-config.ts +++ b/lib/api-config.ts @@ -10,7 +10,7 @@ export const apiConfig = { }, }, - // Chainhook API endpoints (use spec-provided servers) + // Chainhooks API endpoints (use spec-provided servers) chainhook: { clarityConversion: false, enablePlayground: true, diff --git a/lib/metadata.ts b/lib/metadata.ts index 5c16bfe5d..bea0e9512 100644 --- a/lib/metadata.ts +++ b/lib/metadata.ts @@ -72,15 +72,15 @@ const hiroHacksMetadata: Partial = { }; const chainhookMetadata: Partial = { - title: 'Chainhook', + title: 'Chainhooks', description: 'Learn how to use Chainhook for blockchain event streaming.', openGraph: { - title: 'Chainhook', + title: 'Chainhooks', description: 'Learn how to use Chainhook for blockchain event streaming.', images: [{ url: '/images/chainhook-og.jpg', width: 800, height: 600 }], }, twitter: { - title: 'Chainhook', + title: 'Chainhooks', description: 'Learn how to use Chainhook for blockchain event streaming.', images: ['/images/chainhook-og.jpg'], }, @@ -237,7 +237,7 @@ export function getRouteMetadata(path: string): Partial { return apiKeysMetadata; } if (path.startsWith('/stacks/hacks')) return hiroHacksMetadata; - if (path.startsWith('/tools/chainhook')) return chainhookMetadata; + if (path.startsWith('/tools/chainhooks')) return chainhookMetadata; if (path.startsWith('/resources/guides')) return guidesMetadata; if (path.startsWith('/apis/ordinals')) return ordinalsApiMetadata; if (path.startsWith('/apis/platform')) return platformApiMetadata; diff --git a/lib/translations/en.ts b/lib/translations/en.ts index a451596ac..a3f1baa85 100644 --- a/lib/translations/en.ts +++ b/lib/translations/en.ts @@ -52,7 +52,7 @@ export const en: Translations = { auth: 'Auth', // Tools - chainhook: 'Chainhook', + chainhook: 'Chainhooks', // Specific pages/sections guides: 'Guides', @@ -60,7 +60,7 @@ export const en: Translations = { }, tools: { chainhook: { - title: 'Chainhook', + title: 'Chainhooks', description: 'Monitor and analyze Clarity smart contract activity.', }, contractMonitoring: { @@ -95,7 +95,7 @@ export const en: Translations = { description: 'API for retrieving NFT and fungible token metadata.', }, chainhook: { - title: 'Chainhook API', + title: 'Chainhooks API', description: 'RESTful API for accessing Chainhook.', }, platform: { diff --git a/lib/translations/es.ts b/lib/translations/es.ts index ac9df3003..b9d7347a2 100644 --- a/lib/translations/es.ts +++ b/lib/translations/es.ts @@ -52,7 +52,7 @@ export const es: Translations = { auth: 'Auth', // Tools - chainhook: 'Chainhook', + chainhook: 'Chainhooks', // Specific pages/sections guides: 'Guías', @@ -60,7 +60,7 @@ export const es: Translations = { }, tools: { chainhook: { - title: 'Chainhook', + title: 'Chainhooks', description: 'Monitorear y analizar la actividad de contratos inteligentes Clarity.', }, contractMonitoring: { @@ -95,8 +95,8 @@ export const es: Translations = { description: 'API para obtener metadatos de tokens NFT y fungibles.', }, chainhook: { - title: 'API de Chainhook', - description: 'API RESTful para acceder a Chainhook.', + title: 'API de Chainhooks', + description: 'API RESTful para acceder a Chainhooks.', }, platform: { title: 'API de Plataforma', From db74eb35a9d44fed338d7db6144d5950cd51336c Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 11 Nov 2025 18:21:03 -0600 Subject: [PATCH 03/14] update copy --- components/filter-popover.tsx | 2 -- components/search-dialog.tsx | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/filter-popover.tsx b/components/filter-popover.tsx index 49f8778ae..b9255e4bf 100644 --- a/components/filter-popover.tsx +++ b/components/filter-popover.tsx @@ -9,9 +9,7 @@ const CATEGORIES = [ { label: 'Stacks.js', value: 'stacks.js' }, { label: 'Clarity', value: 'clarity' }, { label: 'Bitcoin', value: 'bitcoin' }, - // { label: "Chainhook", value: "chainhook" }, { label: 'API', value: 'api' }, - // { label: "Clarinet", value: "clarinet" }, ]; interface FilterPopoverProps { diff --git a/components/search-dialog.tsx b/components/search-dialog.tsx index e9aef6745..5b8adca45 100644 --- a/components/search-dialog.tsx +++ b/components/search-dialog.tsx @@ -247,9 +247,9 @@ function extractSnippet(text: string | undefined, maxLength = 80): string { const navigateItems = [ { id: 'chainhook', - title: 'Chainhook', + title: 'Chainhooks', icon: Webhook, - href: '/tools/chainhook', + href: '/tools/chainhooks', }, { id: 'bitcoin-indexer', From 6bdbdf65ac4178d735acff9aaf3a4e4bba7a1ff5 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 11 Nov 2025 18:21:22 -0600 Subject: [PATCH 04/14] update refs to chainhook -> chainhooks --- .../reference/chainhooks/index.mdx | 6 -- .../chainhook-api/reference/info/index.mdx | 6 -- .../index.mdx | 16 ++--- .../apis/chainhooks-api}/meta.json | 2 +- .../chainhooks/bulk-enable-chainhooks.mdx | 0 .../reference/chainhooks/delete-chainhook.mdx | 0 .../chainhooks/evaluate-chainhook.mdx | 0 .../reference/chainhooks/get-chainhook.mdx | 0 .../reference/chainhooks/get-chainhooks.mdx | 0 .../reference/chainhooks/index.mdx | 6 ++ .../reference/chainhooks/meta.json | 0 .../chainhooks/register-chainhook.mdx | 0 .../chainhooks/update-chainhook-enabled.mdx | 0 .../reference/chainhooks/update-chainhook.mdx | 0 .../chainhooks-api/reference/info/index.mdx | 6 ++ .../reference/info/meta.json | 0 .../reference/info/status.mdx | 0 .../secrets/delete-consumer-secret.mdx | 0 .../reference/secrets/index.mdx | 0 .../reference/secrets/meta.json | 0 .../secrets/rotate-consumer-secret.mdx | 0 .../usage.mdx | 10 +-- .../reference/chainhooks/update.mdx | 4 +- content/docs/en/tools/chainhook/index.mdx | 40 ------------ content/docs/en/tools/chainhook/meta.json | 5 -- .../(chainhook-sdk)/create.mdx | 12 ++-- .../(chainhook-sdk)/evaluate.mdx | 4 +- .../(chainhook-sdk)/fetch.mdx | 8 +-- .../(chainhook-sdk)/introduction.mdx | 10 +-- .../chainhooks}/(chainhook-sdk)/meta.json | 6 +- .../(chainhook-sdk)/secrets.mdx} | 8 +-- .../(chainhook-sdk)/update.mdx | 17 ++--- .../(overview)/faq.mdx | 26 ++++---- .../tools/chainhooks}/(overview)/meta.json | 2 +- .../(overview)/migration.mdx | 10 +-- .../create-enable-chainhooks.mdx | 0 .../(platform-usage)/manage-api-keys.mdx | 0 .../(platform-usage)/meta.json | 0 .../(platform-usage)/platform-quickstart.mdx | 0 .../(platform-usage)/platform-usage.mdx | 8 +-- .../(platform-usage)/view-chainhooks.mdx | 0 content/docs/en/tools/chainhooks/index.mdx | 40 ++++++++++++ content/docs/en/tools/chainhooks/meta.json | 5 ++ .../reference/filters.mdx | 4 +- .../reference/meta.json | 0 .../reference/options.mdx | 2 +- .../reference/payload-anatomy.mdx | 6 +- .../contract-monitoring/create-alert.mdx | 2 +- .../en/tools/contract-monitoring/index.mdx | 2 +- .../index.mdx | 8 +-- .../apis/chainhooks-api}/meta.json | 0 .../chainhooks/bulk-enable-chainhooks.mdx | 0 .../reference/chainhooks/delete-chainhook.mdx | 0 .../chainhooks/evaluate-chainhook.mdx | 0 .../reference/chainhooks/get-chainhook.mdx | 0 .../reference/chainhooks/get-chainhooks.mdx | 0 .../reference/chainhooks/index.mdx | 0 .../chainhooks/register-chainhook.mdx | 0 .../chainhooks/update-chainhook-enabled.mdx | 0 .../reference/chainhooks/update-chainhook.mdx | 0 .../reference/info/index.mdx | 0 .../reference/info/status.mdx | 0 .../secrets/delete-consumer-secret.mdx | 0 .../reference/secrets/index.mdx | 0 .../secrets/rotate-consumer-secret.mdx | 0 .../usage.mdx | 4 +- .../tools/chainhook/(chainhook-sdk)/keys.mdx | 65 ------------------- content/docs/es/tools/chainhook/meta.json | 5 -- .../(chainhook-sdk)/create.mdx | 4 +- .../(chainhook-sdk)/edit-update.mdx | 4 +- .../(chainhook-sdk)/evaluate.mdx | 4 +- .../(chainhook-sdk)/fetch.mdx | 4 +- .../(chainhook-sdk)/introduction.mdx | 4 +- .../(chainhook-sdk)/list-fetch.mdx | 4 +- .../(chainhook-sdk)/manage-keys.mdx | 0 .../chainhooks}/(chainhook-sdk)/meta.json | 4 +- .../(chainhook-sdk)/register-enable.mdx | 4 +- .../(chainhook-sdk)/update.mdx | 4 +- .../(overview)/faq.mdx | 16 ++--- .../tools/chainhooks}/(overview)/meta.json | 2 +- .../(overview)/migration.mdx | 8 +-- .../(overview)/quickstart.mdx | 6 +- .../(overview)/usage.mdx | 4 +- .../create-enable-chainhooks.mdx | 0 .../(platform-usage)/manage-api-keys.mdx | 0 .../(platform-usage)/meta.json | 0 .../(platform-usage)/platform-quickstart.mdx | 0 .../(platform-usage)/platform-usage.mdx | 6 +- .../(platform-usage)/view-chainhooks.mdx | 0 .../tools/{chainhook => chainhooks}/index.mdx | 8 +-- content/docs/es/tools/chainhooks/meta.json | 5 ++ .../reference/bitcoin-scopes.mdx | 0 .../reference/filters.mdx | 0 .../reference/meta.json | 0 .../reference/options.mdx | 0 .../reference/payload-anatomy.mdx | 0 .../reference/stacks-scopes.mdx | 0 .../contract-monitoring/create-alert.mdx | 2 +- .../es/tools/contract-monitoring/index.mdx | 2 +- 99 files changed, 190 insertions(+), 260 deletions(-) delete mode 100644 content/docs/en/apis/chainhook-api/reference/chainhooks/index.mdx delete mode 100644 content/docs/en/apis/chainhook-api/reference/info/index.mdx rename content/docs/en/apis/{chainhook-api => chainhooks-api}/index.mdx (79%) rename content/docs/{es/apis/chainhook-api => en/apis/chainhooks-api}/meta.json (74%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/bulk-enable-chainhooks.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/delete-chainhook.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/evaluate-chainhook.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/get-chainhook.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/get-chainhooks.mdx (100%) create mode 100644 content/docs/en/apis/chainhooks-api/reference/chainhooks/index.mdx rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/meta.json (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/register-chainhook.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/update-chainhook-enabled.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/update-chainhook.mdx (100%) create mode 100644 content/docs/en/apis/chainhooks-api/reference/info/index.mdx rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/info/meta.json (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/info/status.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/secrets/delete-consumer-secret.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/secrets/index.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/secrets/meta.json (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/reference/secrets/rotate-consumer-secret.mdx (100%) rename content/docs/en/apis/{chainhook-api => chainhooks-api}/usage.mdx (94%) delete mode 100644 content/docs/en/tools/chainhook/index.mdx delete mode 100644 content/docs/en/tools/chainhook/meta.json rename content/docs/en/tools/{chainhook => chainhooks}/(chainhook-sdk)/create.mdx (90%) rename content/docs/en/tools/{chainhook => chainhooks}/(chainhook-sdk)/evaluate.mdx (91%) rename content/docs/en/tools/{chainhook => chainhooks}/(chainhook-sdk)/fetch.mdx (88%) rename content/docs/en/tools/{chainhook => chainhooks}/(chainhook-sdk)/introduction.mdx (89%) rename content/docs/{es/tools/chainhook => en/tools/chainhooks}/(chainhook-sdk)/meta.json (56%) rename content/docs/en/tools/{chainhook/(chainhook-sdk)/keys.mdx => chainhooks/(chainhook-sdk)/secrets.mdx} (85%) rename content/docs/en/tools/{chainhook => chainhooks}/(chainhook-sdk)/update.mdx (79%) rename content/docs/en/tools/{chainhook => chainhooks}/(overview)/faq.mdx (76%) rename content/docs/{es/tools/chainhook => en/tools/chainhooks}/(overview)/meta.json (59%) rename content/docs/en/tools/{chainhook => chainhooks}/(overview)/migration.mdx (93%) rename content/docs/en/tools/{chainhook => chainhooks}/(platform-usage)/create-enable-chainhooks.mdx (100%) rename content/docs/en/tools/{chainhook => chainhooks}/(platform-usage)/manage-api-keys.mdx (100%) rename content/docs/en/tools/{chainhook => chainhooks}/(platform-usage)/meta.json (100%) rename content/docs/en/tools/{chainhook => chainhooks}/(platform-usage)/platform-quickstart.mdx (100%) rename content/docs/en/tools/{chainhook => chainhooks}/(platform-usage)/platform-usage.mdx (82%) rename content/docs/en/tools/{chainhook => chainhooks}/(platform-usage)/view-chainhooks.mdx (100%) create mode 100644 content/docs/en/tools/chainhooks/index.mdx create mode 100644 content/docs/en/tools/chainhooks/meta.json rename content/docs/en/tools/{chainhook => chainhooks}/reference/filters.mdx (97%) rename content/docs/en/tools/{chainhook => chainhooks}/reference/meta.json (100%) rename content/docs/en/tools/{chainhook => chainhooks}/reference/options.mdx (98%) rename content/docs/en/tools/{chainhook => chainhooks}/reference/payload-anatomy.mdx (93%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/index.mdx (90%) rename content/docs/{en/apis/chainhook-api => es/apis/chainhooks-api}/meta.json (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/bulk-enable-chainhooks.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/delete-chainhook.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/evaluate-chainhook.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/get-chainhook.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/get-chainhooks.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/index.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/register-chainhook.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/update-chainhook-enabled.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/chainhooks/update-chainhook.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/info/index.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/info/status.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/secrets/delete-consumer-secret.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/secrets/index.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/reference/secrets/rotate-consumer-secret.mdx (100%) rename content/docs/es/apis/{chainhook-api => chainhooks-api}/usage.mdx (97%) delete mode 100644 content/docs/es/tools/chainhook/(chainhook-sdk)/keys.mdx delete mode 100644 content/docs/es/tools/chainhook/meta.json rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/create.mdx (94%) rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/edit-update.mdx (91%) rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/evaluate.mdx (93%) rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/fetch.mdx (87%) rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/introduction.mdx (95%) rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/list-fetch.mdx (86%) rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/manage-keys.mdx (100%) rename content/docs/{en/tools/chainhook => es/tools/chainhooks}/(chainhook-sdk)/meta.json (64%) rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/register-enable.mdx (94%) rename content/docs/es/tools/{chainhook => chainhooks}/(chainhook-sdk)/update.mdx (91%) rename content/docs/es/tools/{chainhook => chainhooks}/(overview)/faq.mdx (88%) rename content/docs/{en/tools/chainhook => es/tools/chainhooks}/(overview)/meta.json (59%) rename content/docs/es/tools/{chainhook => chainhooks}/(overview)/migration.mdx (96%) rename content/docs/es/tools/{chainhook => chainhooks}/(overview)/quickstart.mdx (88%) rename content/docs/es/tools/{chainhook => chainhooks}/(overview)/usage.mdx (98%) rename content/docs/es/tools/{chainhook => chainhooks}/(platform-usage)/create-enable-chainhooks.mdx (100%) rename content/docs/es/tools/{chainhook => chainhooks}/(platform-usage)/manage-api-keys.mdx (100%) rename content/docs/es/tools/{chainhook => chainhooks}/(platform-usage)/meta.json (100%) rename content/docs/es/tools/{chainhook => chainhooks}/(platform-usage)/platform-quickstart.mdx (100%) rename content/docs/es/tools/{chainhook => chainhooks}/(platform-usage)/platform-usage.mdx (86%) rename content/docs/es/tools/{chainhook => chainhooks}/(platform-usage)/view-chainhooks.mdx (100%) rename content/docs/es/tools/{chainhook => chainhooks}/index.mdx (79%) create mode 100644 content/docs/es/tools/chainhooks/meta.json rename content/docs/es/tools/{chainhook => chainhooks}/reference/bitcoin-scopes.mdx (100%) rename content/docs/es/tools/{chainhook => chainhooks}/reference/filters.mdx (100%) rename content/docs/es/tools/{chainhook => chainhooks}/reference/meta.json (100%) rename content/docs/es/tools/{chainhook => chainhooks}/reference/options.mdx (100%) rename content/docs/es/tools/{chainhook => chainhooks}/reference/payload-anatomy.mdx (100%) rename content/docs/es/tools/{chainhook => chainhooks}/reference/stacks-scopes.mdx (100%) diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/index.mdx b/content/docs/en/apis/chainhook-api/reference/chainhooks/index.mdx deleted file mode 100644 index ad838a5df..000000000 --- a/content/docs/en/apis/chainhook-api/reference/chainhooks/index.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Chainhooks -index: true -full: true -description: Manage Chainhook API endpoints for creating, updating, and evaluating chainhooks. ---- diff --git a/content/docs/en/apis/chainhook-api/reference/info/index.mdx b/content/docs/en/apis/chainhook-api/reference/info/index.mdx deleted file mode 100644 index 03549d682..000000000 --- a/content/docs/en/apis/chainhook-api/reference/info/index.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Info -index: true -full: true -description: Check the current status of the Chainhook API. ---- diff --git a/content/docs/en/apis/chainhook-api/index.mdx b/content/docs/en/apis/chainhooks-api/index.mdx similarity index 79% rename from content/docs/en/apis/chainhook-api/index.mdx rename to content/docs/en/apis/chainhooks-api/index.mdx index e33a56769..56a05e9c4 100644 --- a/content/docs/en/apis/chainhook-api/index.mdx +++ b/content/docs/en/apis/chainhooks-api/index.mdx @@ -1,14 +1,14 @@ --- -title: Chainhook API +title: Chainhooks API sidebarTitle: Overview description: REST API for managing Chainhooks programmatically --- ## Overview -The Chainhook API is a REST API that allows you to programmatically manage chainhooks, configure event filters, and control webhook delivery. It provides the same functionality as the [Chainhook SDK](/tools/chainhook/chainhook-sdk) through direct HTTP requests. +The Chainhooks API is a REST API that allows you to programmatically manage chainhooks, configure event filters, and control webhook delivery. It provides the same functionality as the [Chainhook SDK](/tools/chainhooks/chainhook-sdk) through direct HTTP requests. -Use the Chainhook API when: +Use the Chainhooks API when: - You're working in a language without SDK support - You need direct HTTP control over chainhook operations - You're building custom integrations or automation workflows @@ -25,7 +25,7 @@ Use the Chainhook API when: ## Base URLs -The Chainhook API is available on both mainnet and testnet: +The Chainhooks API is available on both mainnet and testnet: ``` Testnet: https://api.testnet.hiro.so/chainhooks/v1 @@ -84,17 +84,17 @@ Both the SDK and REST API provide identical functionality: | Error Handling | Built-in | Custom | | Best For | Node.js/Bun apps | Other languages, scripts | -For TypeScript/JavaScript projects, we recommend using the [Chainhook SDK](/tools/chainhook/chainhook-sdk) for better developer experience. +For TypeScript/JavaScript projects, we recommend using the [Chainhook SDK](/tools/chainhooks/chainhook-sdk) for better developer experience. ## Next Steps :::next-steps -* [Usage Guide](/apis/chainhook-api/usage): Authentication and best practices -* [API Reference](/apis/chainhook-api/reference): Complete endpoint documentation +* [Usage Guide](/apis/chainhooks-api/usage): Authentication and best practices +* [API Reference](/apis/chainhooks-api/reference): Complete endpoint documentation ::: :::callout type: help -### Need help building with the Chainhook API? +### Need help building with the Chainhooks API? Reach out to us on the **#chainhook** channel on [Discord](https://stacks.chat/) under Hiro Developer Tools. There's also a [weekly office hours](https://www.addevent.com/event/oL21905919) call every Thursday at 11am ET. ::: diff --git a/content/docs/es/apis/chainhook-api/meta.json b/content/docs/en/apis/chainhooks-api/meta.json similarity index 74% rename from content/docs/es/apis/chainhook-api/meta.json rename to content/docs/en/apis/chainhooks-api/meta.json index ed8d35b52..5d212aacb 100644 --- a/content/docs/es/apis/chainhook-api/meta.json +++ b/content/docs/en/apis/chainhooks-api/meta.json @@ -1,5 +1,5 @@ { - "title": "Chainhook API", + "title": "Chainhooks API", "root": true, "pages": ["index", "usage", "---Reference---", "...reference"] } diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/bulk-enable-chainhooks.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/bulk-enable-chainhooks.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/bulk-enable-chainhooks.mdx rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/bulk-enable-chainhooks.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/delete-chainhook.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/delete-chainhook.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/delete-chainhook.mdx rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/delete-chainhook.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/evaluate-chainhook.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/evaluate-chainhook.mdx rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/get-chainhook.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/get-chainhook.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/get-chainhook.mdx rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/get-chainhook.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/get-chainhooks.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/get-chainhooks.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/get-chainhooks.mdx rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/get-chainhooks.mdx diff --git a/content/docs/en/apis/chainhooks-api/reference/chainhooks/index.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/index.mdx new file mode 100644 index 000000000..71704faab --- /dev/null +++ b/content/docs/en/apis/chainhooks-api/reference/chainhooks/index.mdx @@ -0,0 +1,6 @@ +--- +title: Chainhooks +index: true +full: true +description: Manage Chainhooks API endpoints for creating, updating, and evaluating chainhooks. +--- diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/meta.json b/content/docs/en/apis/chainhooks-api/reference/chainhooks/meta.json similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/meta.json rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/meta.json diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/register-chainhook.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/register-chainhook.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/register-chainhook.mdx rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/register-chainhook.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/update-chainhook-enabled.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/update-chainhook-enabled.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/update-chainhook-enabled.mdx rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/update-chainhook-enabled.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/chainhooks/update-chainhook.mdx b/content/docs/en/apis/chainhooks-api/reference/chainhooks/update-chainhook.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/chainhooks/update-chainhook.mdx rename to content/docs/en/apis/chainhooks-api/reference/chainhooks/update-chainhook.mdx diff --git a/content/docs/en/apis/chainhooks-api/reference/info/index.mdx b/content/docs/en/apis/chainhooks-api/reference/info/index.mdx new file mode 100644 index 000000000..580628c9f --- /dev/null +++ b/content/docs/en/apis/chainhooks-api/reference/info/index.mdx @@ -0,0 +1,6 @@ +--- +title: Info +index: true +full: true +description: Check the current status of the Chainhooks API. +--- diff --git a/content/docs/en/apis/chainhook-api/reference/info/meta.json b/content/docs/en/apis/chainhooks-api/reference/info/meta.json similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/info/meta.json rename to content/docs/en/apis/chainhooks-api/reference/info/meta.json diff --git a/content/docs/en/apis/chainhook-api/reference/info/status.mdx b/content/docs/en/apis/chainhooks-api/reference/info/status.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/info/status.mdx rename to content/docs/en/apis/chainhooks-api/reference/info/status.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/secrets/delete-consumer-secret.mdx b/content/docs/en/apis/chainhooks-api/reference/secrets/delete-consumer-secret.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/secrets/delete-consumer-secret.mdx rename to content/docs/en/apis/chainhooks-api/reference/secrets/delete-consumer-secret.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/secrets/index.mdx b/content/docs/en/apis/chainhooks-api/reference/secrets/index.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/secrets/index.mdx rename to content/docs/en/apis/chainhooks-api/reference/secrets/index.mdx diff --git a/content/docs/en/apis/chainhook-api/reference/secrets/meta.json b/content/docs/en/apis/chainhooks-api/reference/secrets/meta.json similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/secrets/meta.json rename to content/docs/en/apis/chainhooks-api/reference/secrets/meta.json diff --git a/content/docs/en/apis/chainhook-api/reference/secrets/rotate-consumer-secret.mdx b/content/docs/en/apis/chainhooks-api/reference/secrets/rotate-consumer-secret.mdx similarity index 100% rename from content/docs/en/apis/chainhook-api/reference/secrets/rotate-consumer-secret.mdx rename to content/docs/en/apis/chainhooks-api/reference/secrets/rotate-consumer-secret.mdx diff --git a/content/docs/en/apis/chainhook-api/usage.mdx b/content/docs/en/apis/chainhooks-api/usage.mdx similarity index 94% rename from content/docs/en/apis/chainhook-api/usage.mdx rename to content/docs/en/apis/chainhooks-api/usage.mdx index 2c7408dbe..fee355f2f 100644 --- a/content/docs/en/apis/chainhook-api/usage.mdx +++ b/content/docs/en/apis/chainhooks-api/usage.mdx @@ -1,11 +1,11 @@ --- title: Usage -description: Learn how to authenticate, make requests, and handle responses with the Chainhook API +description: Learn how to authenticate, make requests, and handle responses with the Chainhooks API --- ## Authentication -All Chainhook API requests require authentication using a Hiro API key. +All Chainhooks API requests require authentication using a Hiro API key. ### Get Your API Key @@ -186,7 +186,7 @@ curl -X PATCH https://api.testnet.hiro.so/chainhooks/v1/me/enabled \ ## Rate Limits -The Chainhook API enforces rate limits based on your subscription tier: +The Chainhooks API enforces rate limits based on your subscription tier: - Free tier: 100 requests per minute - Pro tier: 1000 requests per minute @@ -282,6 +282,6 @@ Response includes pagination metadata: ## Next Steps :::next-steps -* [API Reference](/apis/chainhook-api/reference): Complete endpoint documentation -* [Filter Reference](/tools/chainhook/reference/filters): Event filter syntax +* [API Reference](/apis/chainhooks-api/reference): Complete endpoint documentation +* [Filter Reference](/tools/chainhooks/reference/filters): Event filter syntax ::: diff --git a/content/docs/en/apis/platform-api/reference/chainhooks/update.mdx b/content/docs/en/apis/platform-api/reference/chainhooks/update.mdx index e457b4c40..a3a96b55c 100644 --- a/content/docs/en/apis/platform-api/reference/chainhooks/update.mdx +++ b/content/docs/en/apis/platform-api/reference/chainhooks/update.mdx @@ -9,4 +9,6 @@ full: true document="./openapi/platform-api.json" operations={[{ path: '/v1/ext/{apiKey}/chainhooks/{chainhookUuid}', method: 'put' }]} hasHead={false} -/> \ No newline at end of file +/> + +With `updateChainhook`, you can adjust an existing definition without downtime: change the webhook URL, capture new events, or fine-tune configuration options as requirements evolve. diff --git a/content/docs/en/tools/chainhook/index.mdx b/content/docs/en/tools/chainhook/index.mdx deleted file mode 100644 index 7066b2a18..000000000 --- a/content/docs/en/tools/chainhook/index.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Chainhook -sidebarTitle: Overview -description: Chainhook is a webhook service for the Stacks blockchain that lets you register event streams and define precise filters to capture on-chain data as it happens. -llm: false ---- - -:::callout -type: warn -### Chainhook 2.0 (Beta) -Chainhook is currently in beta. If you encounter issues or have feedback, please reach out to [beta@hiro.so](mailto:beta@hiro.so). -::: - -## Overview - -Chainhook makes it easy to subscribe to blockchain activity on Stacks by registering event streams, filtering for exactly the data you care about, and sending it straight to your app in real time. - -With Chainhook 2.0 (Beta), you can manage chainhooks through: -- **[Chainhook SDK](/tools/chainhook/introduction)** - TypeScript/JavaScript client for programmatic management -- **[Hiro Platform](https://platform.hiro.so)** - Web-based UI for visual chainhook creation -- **[Chainhook API](/apis/chainhook-api)** - Direct REST API access - -## Key Features - -- **Reorg-aware indexing** - Automatically handles blockchain forks and reorganizations -- **Event filtering** - Define custom logic to trigger actions on specific blockchain events -- **Historical evaluation** - Test chainhooks against past blocks for indexing or debugging - -## Next steps - -:::next-steps -- [SDK introduction](/tools/chainhook/introduction): Get started with the Chainhook SDK -- [Migration guide](/tools/chainhook/migration): Migration guide for upgrading to Chainhook 2.0 (Beta) -::: - -:::callout -type: help -### Need help with Chainhook? -Reach out to us on the #chainhook channel on [Discord](https://stacks.chat/) under the Hiro Developer Tools section. -::: diff --git a/content/docs/en/tools/chainhook/meta.json b/content/docs/en/tools/chainhook/meta.json deleted file mode 100644 index 31a8590c4..000000000 --- a/content/docs/en/tools/chainhook/meta.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "Chainhook", - "root": true, - "pages": ["---Chainhook|beta---", "index", "...(overview)", "...(chainhook-sdk)", "...reference"] -} diff --git a/content/docs/en/tools/chainhook/(chainhook-sdk)/create.mdx b/content/docs/en/tools/chainhooks/(chainhook-sdk)/create.mdx similarity index 90% rename from content/docs/en/tools/chainhook/(chainhook-sdk)/create.mdx rename to content/docs/en/tools/chainhooks/(chainhook-sdk)/create.mdx index 201bef7eb..b1b72a0e4 100644 --- a/content/docs/en/tools/chainhook/(chainhook-sdk)/create.mdx +++ b/content/docs/en/tools/chainhooks/(chainhook-sdk)/create.mdx @@ -1,12 +1,12 @@ --- title: Create chainhooks -description: Create and activate chainhooks using the Chainhook SDK +description: Create and activate chainhooks using the Chainhooks SDK --- -## registerChainhook - Creates a new chainhook configuration. By default, new chainhooks are created in a disabled state unless `enable_on_registration` is set to `true`. +## registerChainhook + ### Example ```ts -nc @@ -41,7 +41,7 @@ const chainhook = await client.registerChainhook({ }, }); -console.log('Chainhook UUID:', chainhook.uuid); +console.log('Chainhooks UUID:', chainhook.uuid); console.log('Enabled:', chainhook.status.enabled); // true ``` @@ -138,6 +138,6 @@ This will disable all active chainhooks that POST to the old webhook URL. ## Next steps :::next-steps -- [Evaluate](/tools/chainhook/evaluate): Test chainhooks against past blocks -- [Filter Reference](/tools/chainhook/reference/filters): Explore all filter options +- [Evaluate](/tools/chainhooks/evaluate): Test chainhooks against past blocks +- [Filter Reference](/tools/chainhooks/reference/filters): Explore all filter options ::: diff --git a/content/docs/en/tools/chainhook/(chainhook-sdk)/evaluate.mdx b/content/docs/en/tools/chainhooks/(chainhook-sdk)/evaluate.mdx similarity index 91% rename from content/docs/en/tools/chainhook/(chainhook-sdk)/evaluate.mdx rename to content/docs/en/tools/chainhooks/(chainhook-sdk)/evaluate.mdx index 4615143c5..4a3ced2db 100644 --- a/content/docs/en/tools/chainhook/(chainhook-sdk)/evaluate.mdx +++ b/content/docs/en/tools/chainhooks/(chainhook-sdk)/evaluate.mdx @@ -63,6 +63,6 @@ Returns HTTP `204 No Content`. If filters match, webhook payload is sent to your ## Next steps :::next-steps -- [Register & Enable](/tools/chainhook/create): Create chainhooks to evaluate -- [Filter Reference](/tools/chainhook/reference/filters): Configure which events to match +- [Register & Enable](/tools/chainhooks/create): Create chainhooks to evaluate +- [Filter Reference](/tools/chainhooks/reference/filters): Configure which events to match ::: diff --git a/content/docs/en/tools/chainhook/(chainhook-sdk)/fetch.mdx b/content/docs/en/tools/chainhooks/(chainhook-sdk)/fetch.mdx similarity index 88% rename from content/docs/en/tools/chainhook/(chainhook-sdk)/fetch.mdx rename to content/docs/en/tools/chainhooks/(chainhook-sdk)/fetch.mdx index 65746af05..bdd0dd7d3 100644 --- a/content/docs/en/tools/chainhook/(chainhook-sdk)/fetch.mdx +++ b/content/docs/en/tools/chainhooks/(chainhook-sdk)/fetch.mdx @@ -3,7 +3,7 @@ title: Fetch chainhooks description: Retrieve chainhook information using the SDK --- -## getChainhooks +## getChainhook Retrieve a paginated list of all your chainhooks. @@ -38,7 +38,7 @@ const chainhooks = await client.getChainhooks({ --- -## getChainhook +## getChainhooks Retrieve a specific chainhook by UUID. @@ -51,6 +51,6 @@ const chainhook = await client.getChainhook('be4ab3ed-b606-4fe0-97c4-6c0b1ac9b18 ## Next steps :::next-steps -- [Edit & Update](/tools/chainhook/update): Modify existing chainhooks -- [Register & Enable](/tools/chainhook/create): Create new chainhooks +- [Edit & Update](/tools/chainhooks/update): Modify existing chainhooks +- [Register & Enable](/tools/chainhooks/create): Create new chainhooks ::: diff --git a/content/docs/en/tools/chainhook/(chainhook-sdk)/introduction.mdx b/content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx similarity index 89% rename from content/docs/en/tools/chainhook/(chainhook-sdk)/introduction.mdx rename to content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx index cde83813c..580103131 100644 --- a/content/docs/en/tools/chainhook/(chainhook-sdk)/introduction.mdx +++ b/content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx @@ -5,7 +5,7 @@ description: TypeScript/JavaScript SDK for managing chainhooks programmatically ## Overview -The Chainhook SDK (`@hirosystems/chainhooks-client`) provides a TypeScript/JavaScript client for programmatically managing chainhooks. +The Chainhooks SDK (`@hirosystems/chainhooks-client`) provides a TypeScript/JavaScript client for programmatically managing chainhooks. ## Installation @@ -62,7 +62,7 @@ const chainhook = await client.registerChainhook({ }, }); -console.log('Chainhook created:', chainhook.uuid); +console.log('Chainhooks created:', chainhook.uuid); ``` ## Base URLs @@ -150,7 +150,7 @@ The SDK provides full TypeScript type definitions: ```typescript -nc import type { - ChainhookDefinitionSchema, // Chainhook configuration + ChainhookDefinitionSchema, // Chainhooks configuration ChainhookStatusSchema, // Status and activity info EvaluateChainhookRequest, // Evaluation parameters BulkEnableChainhooksRequest, // Bulk operation filters @@ -160,6 +160,6 @@ import type { ## Next Steps :::next-steps -- [Create chainhooks](/tools/chainhook/create): Create and activate chainhooks -- [Manage consumer secrets](/tools/chainhook/keys): Learn how to validate Chainhook delivery +- [Create chainhooks](/tools/chainhooks/create): Create and activate chainhooks +- [Manage consumer secrets](/tools/chainhooks/keys): Learn how to validate Chainhooks delivery ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/meta.json b/content/docs/en/tools/chainhooks/(chainhook-sdk)/meta.json similarity index 56% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/meta.json rename to content/docs/en/tools/chainhooks/(chainhook-sdk)/meta.json index 8a3e71f8f..f48f918cf 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/meta.json +++ b/content/docs/en/tools/chainhooks/(chainhook-sdk)/meta.json @@ -1,12 +1,12 @@ { - "title": "Chainhook SDK", + "title": "Chainhooks SDK", "pages": [ - "---Chainhook SDK|new---", + "---Chainhooks SDK|new---", "introduction", "create", "fetch", "update", "evaluate", - "keys" + "secrets" ] } diff --git a/content/docs/en/tools/chainhook/(chainhook-sdk)/keys.mdx b/content/docs/en/tools/chainhooks/(chainhook-sdk)/secrets.mdx similarity index 85% rename from content/docs/en/tools/chainhook/(chainhook-sdk)/keys.mdx rename to content/docs/en/tools/chainhooks/(chainhook-sdk)/secrets.mdx index 9148b9f14..042f26dfc 100644 --- a/content/docs/en/tools/chainhook/(chainhook-sdk)/keys.mdx +++ b/content/docs/en/tools/chainhooks/(chainhook-sdk)/secrets.mdx @@ -1,12 +1,12 @@ --- -title: Manage Keys -description: Rotate consumer secrets and validate every Chainhook delivery +title: Manage secrets +description: Rotate consumer secrets and validate every Chainhooks delivery --- ## What you'll learn :::objectives -- Create/rotate a Chainhook consumer secret. +- Create/rotate a Chainhooks consumer secret. - Validate webhook requests by checking the `Authorization` header. ::: @@ -19,7 +19,7 @@ description: Rotate consumer secrets and validate every Chainhook delivery ## Validating webhook requests with a consumer secret -When you create a secret, our Chainhook service attaches an `Authorization: Bearer ` header to every webhook attempt, giving you a simple shared-secret handshake. Here's how to get started: +When you create a secret, our Chainhooks service attaches an `Authorization: Bearer ` header to every webhook attempt, giving you a simple shared-secret handshake. Here's how to get started: 1. Rotate the secret with `rotateConsumerSecret` (or the `/chainhooks/{uuid}/secret` API) whenever you need to initialize or create a new token. 2. Reject webhook deliveries whose `Authorization` header does not equal `Bearer `. diff --git a/content/docs/en/tools/chainhook/(chainhook-sdk)/update.mdx b/content/docs/en/tools/chainhooks/(chainhook-sdk)/update.mdx similarity index 79% rename from content/docs/en/tools/chainhook/(chainhook-sdk)/update.mdx rename to content/docs/en/tools/chainhooks/(chainhook-sdk)/update.mdx index 0a1950cfd..e7f36c7c6 100644 --- a/content/docs/en/tools/chainhook/(chainhook-sdk)/update.mdx +++ b/content/docs/en/tools/chainhooks/(chainhook-sdk)/update.mdx @@ -1,22 +1,15 @@ --- title: Edit chainhooks -description: Modify existing chainhooks including filters, actions, and options +description: Modify existing chainhooks --- :::callout The Platform UI does not currently support editing chainhooks. You must use the SDK or API to make updates. ::: -## updateChainhook - -### Mutable vs Immutable fields +With `updateChainhook`, you can adjust an existing definition without downtime: change the webhook URL, capture new events, or fine-tune configuration options as requirements evolve. -| Mutable | Immutable | -|---------------------|---------------------------| -| `name` | `chain` | -| `filters` | `network` | -| `action` | | -| `options` | | +## updateChainhook ### Basic Update Example @@ -75,6 +68,6 @@ console.log('Updated:', updated.definition.name); ## Next steps :::next-steps -- [Get chainhooks](/tools/chainhook/fetch): Retrieve chainhook information before updating -- [Filter Reference](/tools/chainhook/reference/filters): Explore all filter options +- [Get chainhooks](/tools/chainhooks/fetch): Retrieve chainhook information before updating +- [Filter Reference](/tools/chainhooks/reference/filters): Explore all filter options ::: diff --git a/content/docs/en/tools/chainhook/(overview)/faq.mdx b/content/docs/en/tools/chainhooks/(overview)/faq.mdx similarity index 76% rename from content/docs/en/tools/chainhook/(overview)/faq.mdx rename to content/docs/en/tools/chainhooks/(overview)/faq.mdx index 0ef8acd4f..cdcded0e9 100644 --- a/content/docs/en/tools/chainhook/(overview)/faq.mdx +++ b/content/docs/en/tools/chainhooks/(overview)/faq.mdx @@ -1,20 +1,20 @@ --- title: FAQ -description: Frequently asked questions about Chainhook 2.0 (Beta) +description: Frequently asked questions about Chainhooks 2.0 (Beta) --- -## Chainhook 2.0 (Beta) +## Chainhooks 2.0 (Beta) - What is the goal/purpose of the Chainhook 2.0 (Beta)? + What is the goal/purpose of the Chainhooks 2.0 (Beta)? Our goal during the Beta is to learn as much as possible about the reliability, performance and developer experience of Chainhooks 2.0 in anticipation of the full release. If you encounter any issues, have any questions, or would like to share feedback during the Beta, please reach out to [beta@hiro.so](mailto:beta@hiro.so). - Is the Chainhook 2.0 (Beta) free? + Is the Chainhooks 2.0 (Beta) free? Yes! The Chainhooks 2.0 Beta is free for all participants. @@ -23,7 +23,7 @@ Yes! The Chainhooks 2.0 Beta is free for all participants. Will there be configuration or rate limits imposed during the Beta? -All Beta users will initially be constrained to a limit of 10 Chainhook configurations. +All Beta users will initially be constrained to a limit of 10 Chainhooks configurations. @@ -46,7 +46,7 @@ Users with Chainhooks running on v1.0 will still be able to view them and receiv The API will also not support Chainhooks running on v1.0. :::callout -Learn how to migrate your v1 chainhooks to v2 in the [Migration Guide](/tools/chainhook/migration). +Learn how to migrate your v1 chainhooks to v2 in the [Migration Guide](/tools/chainhooks/migration). ::: @@ -56,14 +56,14 @@ Learn how to migrate your v1 chainhooks to v2 in the [Migration Guide](/tools/ch In the Platform, v1 chainhooks are read-only. You can view them and they will continue to deliver events, but you cannot modify them through the Platform UI. -To modify v1 chainhooks programmatically, use the [Platform API](/apis/platform-api). However, we recommend migrating to v2 chainhooks instead. See the [Migration Guide](/tools/chainhook/migration) for a complete walkthrough. +To modify v1 chainhooks programmatically, use the [Platform API](/apis/platform-api). However, we recommend migrating to v2 chainhooks instead. See the [Migration Guide](/tools/chainhooks/migration) for a complete walkthrough. How do I migrate my v1 chainhooks to v2? - To migrate your v1 chainhooks to v2, follow the steps outlined in the [Migration Guide](/tools/chainhook/migration). + To migrate your v1 chainhooks to v2, follow the steps outlined in the [Migration Guide](/tools/chainhooks/migration). @@ -74,7 +74,7 @@ To modify v1 chainhooks programmatically, use the [Platform API](/apis/platform- Can I edit my v2 Chainhooks? -Yes! you can edit your v2 Chainhooks using the [Chainhook SDK](/tools/chainhook/update) or [Chainhook API](/apis/chainhook-api). The Platform does not currently support editing v2 Chainhooks. +Yes! you can edit your v2 Chainhooks using the [Chainhooks SDK](/tools/chainhooks/update) or [Chainhooks API](/apis/chainhooks-api). The Platform does not currently support editing v2 Chainhooks. @@ -85,14 +85,14 @@ Yes! you can edit your v2 Chainhooks using the [Chainhook SDK](/tools/chainhook/ Can I filter by multiple event types? - Yes! See examples in the [Filter reference](/tools/chainhook/reference/filters#combining-filters) guide for examples of combining filters. + Yes! See examples in the [Filter reference](/tools/chainhooks/reference/filters#combining-filters) guide for examples of combining filters. What happens if my webhook endpoint is down? -Chainhook will retry webhook deliveries and then "pause" your Chainhook, giving you time to fix the issue and re-enable. Extended downtime may result in missed events, but you can use the [Evaluate](/tools/chainhook/evaluate) feature to replay missed blocks. +Chainhooks will retry webhook deliveries and then "pause" your Chainhooks, giving you time to fix the issue and re-enable. Extended downtime may result in missed events, but you can use the [Evaluate](/tools/chainhooks/evaluate) feature to replay missed blocks. @@ -116,6 +116,6 @@ Chainhook will retry webhook deliveries and then "pause" your Chainhook, giving ## Next Steps :::next-steps -- [Create chainhooks](/tools/chainhook/create): Register and enable chainhooks -- [Payload anatomy](/tools/chainhook/payload-anatomy): Dive into the anatomy of a chainhook payload +- [Create chainhooks](/tools/chainhooks/create): Register and enable chainhooks +- [Payload anatomy](/tools/chainhooks/reference/payload-anatomy): Dive into the anatomy of a chainhook payload ::: diff --git a/content/docs/es/tools/chainhook/(overview)/meta.json b/content/docs/en/tools/chainhooks/(overview)/meta.json similarity index 59% rename from content/docs/es/tools/chainhook/(overview)/meta.json rename to content/docs/en/tools/chainhooks/(overview)/meta.json index 1d584866a..350453c06 100644 --- a/content/docs/es/tools/chainhook/(overview)/meta.json +++ b/content/docs/en/tools/chainhooks/(overview)/meta.json @@ -1,4 +1,4 @@ { - "title": "Chainhook", + "title": "Chainhooks", "pages": ["migration", "faq"] } diff --git a/content/docs/en/tools/chainhook/(overview)/migration.mdx b/content/docs/en/tools/chainhooks/(overview)/migration.mdx similarity index 93% rename from content/docs/en/tools/chainhook/(overview)/migration.mdx rename to content/docs/en/tools/chainhooks/(overview)/migration.mdx index ae45ed5e7..c65781de3 100644 --- a/content/docs/en/tools/chainhook/(overview)/migration.mdx +++ b/content/docs/en/tools/chainhooks/(overview)/migration.mdx @@ -19,7 +19,7 @@ Legacy v1 chainhooks remain read-only in the Platform UI, but you manage them th ## Prerequisites :::prerequisites -- Hiro API key for access to both the Platform and Chainhook API. +- Hiro API key for access to both the Platform and Chainhooks API. ::: @@ -89,7 +89,7 @@ Translate v1 structures to v2 formats before creating new hooks. The following t ``` -For more details on the format changes, see the [Filters](/tools/chainhook/reference/filters) reference guide. +For more details on the format changes, see the [Filters](/tools/chainhooks/reference/filters) reference guide. @@ -221,11 +221,11 @@ await response.json(); | `ft_event` | `transfer` | `ft_transfer` | Specify `asset_identifier`. | | `nft_event` | `transfer`, `mint` | `nft_transfer` · `nft_mint` | Provide `asset_identifier`. | -For more details, check out the [Filters](/tools/chainhook/reference/filters) reference page. +For more details, check out the [Filters](/tools/chainhooks/reference/filters) reference page. ## Next steps :::next-steps -- [FAQ](/tools/chainhook/faq): Chainhook 2.0 (Beta) FAQ -- [Filter Reference](/tools/chainhook/reference/filters): Filter Reference +- [FAQ](/tools/chainhooks/faq): Chainhooks 2.0 (Beta) FAQ +- [Filter Reference](/tools/chainhooks/reference/filters): Filter Reference ::: diff --git a/content/docs/en/tools/chainhook/(platform-usage)/create-enable-chainhooks.mdx b/content/docs/en/tools/chainhooks/(platform-usage)/create-enable-chainhooks.mdx similarity index 100% rename from content/docs/en/tools/chainhook/(platform-usage)/create-enable-chainhooks.mdx rename to content/docs/en/tools/chainhooks/(platform-usage)/create-enable-chainhooks.mdx diff --git a/content/docs/en/tools/chainhook/(platform-usage)/manage-api-keys.mdx b/content/docs/en/tools/chainhooks/(platform-usage)/manage-api-keys.mdx similarity index 100% rename from content/docs/en/tools/chainhook/(platform-usage)/manage-api-keys.mdx rename to content/docs/en/tools/chainhooks/(platform-usage)/manage-api-keys.mdx diff --git a/content/docs/en/tools/chainhook/(platform-usage)/meta.json b/content/docs/en/tools/chainhooks/(platform-usage)/meta.json similarity index 100% rename from content/docs/en/tools/chainhook/(platform-usage)/meta.json rename to content/docs/en/tools/chainhooks/(platform-usage)/meta.json diff --git a/content/docs/en/tools/chainhook/(platform-usage)/platform-quickstart.mdx b/content/docs/en/tools/chainhooks/(platform-usage)/platform-quickstart.mdx similarity index 100% rename from content/docs/en/tools/chainhook/(platform-usage)/platform-quickstart.mdx rename to content/docs/en/tools/chainhooks/(platform-usage)/platform-quickstart.mdx diff --git a/content/docs/en/tools/chainhook/(platform-usage)/platform-usage.mdx b/content/docs/en/tools/chainhooks/(platform-usage)/platform-usage.mdx similarity index 82% rename from content/docs/en/tools/chainhook/(platform-usage)/platform-usage.mdx rename to content/docs/en/tools/chainhooks/(platform-usage)/platform-usage.mdx index ba8cc5d7b..bf003d17e 100644 --- a/content/docs/en/tools/chainhook/(platform-usage)/platform-usage.mdx +++ b/content/docs/en/tools/chainhooks/(platform-usage)/platform-usage.mdx @@ -7,7 +7,7 @@ description: Manage chainhooks visually with the Hiro Platform web interface The Hiro Platform provides a web-based interface for managing chainhooks without writing code. -| Feature | Platform UI | Chainhook SDK | +| Feature | Platform UI | Chainhooks SDK | |---------|------------|---------------| | Create chainhooks | ✓ Visual builder | ✓ Programmatic | | View status & activity | ✓ Dashboard view | ✓ API calls | @@ -24,7 +24,7 @@ The Hiro Platform provides a web-based interface for managing chainhooks without - Are managing API keys - Want to get started quickly -**Choose the [Chainhook SDK](/tools/chainhook/chainhook-sdk) when you:** +**Choose the [Chainhooks SDK](/tools/chainhooks/chainhook-sdk) when you:** - Need to edit existing chainhooks (not available in Platform UI) - Want to automate chainhook operations - Are integrating chainhook management into your application @@ -54,6 +54,6 @@ The Platform UI provides: ## Next Steps :::next-steps -* [Platform Quickstart](/tools/chainhook/platform-quickstart): Create your first chainhook in minutes -* [Create & Enable Chainhooks](/tools/chainhook/create-enable-chainhooks): Learn how to set up chainhooks in the UI +* [Platform Quickstart](/tools/chainhooks/platform-quickstart): Create your first chainhook in minutes +* [Create & Enable Chainhooks](/tools/chainhooks/create-enable-chainhooks): Learn how to set up chainhooks in the UI ::: diff --git a/content/docs/en/tools/chainhook/(platform-usage)/view-chainhooks.mdx b/content/docs/en/tools/chainhooks/(platform-usage)/view-chainhooks.mdx similarity index 100% rename from content/docs/en/tools/chainhook/(platform-usage)/view-chainhooks.mdx rename to content/docs/en/tools/chainhooks/(platform-usage)/view-chainhooks.mdx diff --git a/content/docs/en/tools/chainhooks/index.mdx b/content/docs/en/tools/chainhooks/index.mdx new file mode 100644 index 000000000..b58fab979 --- /dev/null +++ b/content/docs/en/tools/chainhooks/index.mdx @@ -0,0 +1,40 @@ +--- +title: Chainhooks +sidebarTitle: Overview +description: Chainhooks is a webhook service for the Stacks blockchain that lets you register event streams and define precise filters to capture on-chain data as it happens. +llm: false +--- + +:::callout +type: warn +### Chainhooks 2.0 (Beta) +Chainhooks is currently in beta. If you encounter issues or have feedback, please reach out to [beta@hiro.so](mailto:beta@hiro.so). +::: + +## Overview + +Chainhooks makes it easy to subscribe to blockchain activity on Stacks by registering event streams, filtering for exactly the data you care about, and sending it straight to your app in real time. + +With Chainhooks 2.0 (Beta), you can manage chainhooks through: +- **[Chainhooks SDK](/tools/chainhooks/introduction)** - TypeScript/JavaScript client for programmatic management +- **[Hiro Platform](https://platform.hiro.so)** - Web-based UI for visual chainhook creation +- **[Chainhooks API](/apis/chainhooks-api)** - Direct REST API access + +## Key Features + +- **Reorg-aware indexing** - Automatically handles blockchain forks and reorganizations +- **Event filtering** - Define custom logic to trigger actions on specific blockchain events +- **Historical evaluation** - Test chainhooks against past blocks for indexing or debugging + +## Next steps + +:::next-steps +- [SDK introduction](/tools/chainhooks/introduction): Get started with the Chainhooks SDK +- [Migration guide](/tools/chainhooks/migration): Migration guide for upgrading to Chainhooks 2.0 (Beta) +::: + +:::callout +type: help +### Need help with Chainhooks? +Reach out to us on the #chainhook channel on [Discord](https://stacks.chat/) under the Hiro Developer Tools section. +::: diff --git a/content/docs/en/tools/chainhooks/meta.json b/content/docs/en/tools/chainhooks/meta.json new file mode 100644 index 000000000..d9a71c27e --- /dev/null +++ b/content/docs/en/tools/chainhooks/meta.json @@ -0,0 +1,5 @@ +{ + "title": "Chainhooks", + "root": true, + "pages": ["---Chainhooks|beta---", "index", "...(overview)", "...(chainhook-sdk)", "...reference"] +} diff --git a/content/docs/en/tools/chainhook/reference/filters.mdx b/content/docs/en/tools/chainhooks/reference/filters.mdx similarity index 97% rename from content/docs/en/tools/chainhook/reference/filters.mdx rename to content/docs/en/tools/chainhooks/reference/filters.mdx index fb8a824b9..ff1b76e3b 100644 --- a/content/docs/en/tools/chainhook/reference/filters.mdx +++ b/content/docs/en/tools/chainhooks/reference/filters.mdx @@ -1,11 +1,11 @@ --- title: Filters -description: Complete reference for all Chainhook filter types +description: Complete reference for all Chainhooks filter types --- Filters define which blockchain events will trigger your chainhook. -Here is a complete reference for all Chainhook filter types: +Here is a complete reference for all Chainhooks filter types: | Filter | When to use | |--------|-------------| diff --git a/content/docs/en/tools/chainhook/reference/meta.json b/content/docs/en/tools/chainhooks/reference/meta.json similarity index 100% rename from content/docs/en/tools/chainhook/reference/meta.json rename to content/docs/en/tools/chainhooks/reference/meta.json diff --git a/content/docs/en/tools/chainhook/reference/options.mdx b/content/docs/en/tools/chainhooks/reference/options.mdx similarity index 98% rename from content/docs/en/tools/chainhook/reference/options.mdx rename to content/docs/en/tools/chainhooks/reference/options.mdx index d81ac963c..f1e16a7ce 100644 --- a/content/docs/en/tools/chainhook/reference/options.mdx +++ b/content/docs/en/tools/chainhooks/reference/options.mdx @@ -1,6 +1,6 @@ --- title: Options -description: Complete reference for all Chainhook configuration options +description: Complete reference for all Chainhooks configuration options --- Options control payload enrichment and evaluation windows for your chainhook. The `options` field is optional and can be omitted or set to `null`. diff --git a/content/docs/en/tools/chainhook/reference/payload-anatomy.mdx b/content/docs/en/tools/chainhooks/reference/payload-anatomy.mdx similarity index 93% rename from content/docs/en/tools/chainhook/reference/payload-anatomy.mdx rename to content/docs/en/tools/chainhooks/reference/payload-anatomy.mdx index 3acd76cf2..47187cfbf 100644 --- a/content/docs/en/tools/chainhook/reference/payload-anatomy.mdx +++ b/content/docs/en/tools/chainhooks/reference/payload-anatomy.mdx @@ -1,11 +1,11 @@ --- title: Payload anatomy -description: Understanding the structure of Chainhook webhook payloads +description: Understanding the structure of Chainhooks webhook payloads --- ## Payload Overview -A Chainhook payload consists of two main sections: **event** and **chainhook**: +A Chainhooks payload consists of two main sections: **event** and **chainhook**: - `event` contains the blockchain data (blocks, transactions, operations) - `chainhook` contains metadata about the chainhook that triggered @@ -57,7 +57,7 @@ The `apply` array contains blocks being added to the canonical chain. Each block The `rollback` array contains blocks being removed during a chain reorganization. Same structure as `apply`. :::callout -Chainhook automatically handles reorgs by sending rollback events. Your application should reverse any state changes from rolled-back blocks. +Chainhooks automatically handles reorgs by sending rollback events. Your application should reverse any state changes from rolled-back blocks. ::: --- diff --git a/content/docs/en/tools/contract-monitoring/create-alert.mdx b/content/docs/en/tools/contract-monitoring/create-alert.mdx index 8d8e719e4..c50b74315 100644 --- a/content/docs/en/tools/contract-monitoring/create-alert.mdx +++ b/content/docs/en/tools/contract-monitoring/create-alert.mdx @@ -174,5 +174,5 @@ The `tx_status` will always return "pending" for monitor alerts. Notifications a :::next-steps - [Hiro Platform](https://platform.hiro.so): Create and manage new webhooks in the Platform. -- [Chainhook](/tools/chainhook): Learn about advanced event monitoring with Chainhook +- [Chainhook](/tools/chainhooks): Learn about advanced event monitoring with Chainhook ::: \ No newline at end of file diff --git a/content/docs/en/tools/contract-monitoring/index.mdx b/content/docs/en/tools/contract-monitoring/index.mdx index 8ad4b527c..e845abcdb 100644 --- a/content/docs/en/tools/contract-monitoring/index.mdx +++ b/content/docs/en/tools/contract-monitoring/index.mdx @@ -16,7 +16,7 @@ llm: false :::next-steps - [Create an alert](/tools/contract-monitoring/create-alert): Set up your first alert for function calls. -- [Chainhooks](/tools/chainhook): Learn more about Chainhooks and how they differ from contract monitoring. +- [Chainhooks](/tools/chainhooks): Learn more about Chainhooks and how they differ from contract monitoring. ::: :::callout diff --git a/content/docs/es/apis/chainhook-api/index.mdx b/content/docs/es/apis/chainhooks-api/index.mdx similarity index 90% rename from content/docs/es/apis/chainhook-api/index.mdx rename to content/docs/es/apis/chainhooks-api/index.mdx index 1525d4c06..7452212e0 100644 --- a/content/docs/es/apis/chainhook-api/index.mdx +++ b/content/docs/es/apis/chainhooks-api/index.mdx @@ -5,7 +5,7 @@ description: API REST para gestionar Chainhooks programáticamente --- ## Descripción general -The Chainhook API is a REST API that allows you to programmatically manage chainhooks, configure event filters, and control webhook delivery. It provides the same functionality as the [SDK de Chainhook](/tools/chainhook/chainhook-sdk) through direct HTTP requests. +The Chainhook API is a REST API that allows you to programmatically manage chainhooks, configure event filters, and control webhook delivery. It provides the same functionality as the [SDK de Chainhook](/tools/chainhooks/chainhook-sdk) through direct HTTP requests. Usa la API de Chainhook cuando: @@ -84,13 +84,13 @@ Both the SDK and REST API provide identical functionality: | Error Handling | Built-in | Custom | | Best For | Node.js/Bun apps | Other languages, scripts | -Para proyectos de TypeScript/JavaScript, recomendamos usar el [SDK de Chainhook](/tools/chainhook/chainhook-sdk) para una mejor experiencia de desarrollador. +Para proyectos de TypeScript/JavaScript, recomendamos usar el [SDK de Chainhook](/tools/chainhooks/chainhook-sdk) para una mejor experiencia de desarrollador. ## Próximos Pasos :::next-steps -* [Guía de Uso](/apis/chainhook-api/usage): Autenticación y mejores prácticas -* [Referencia de API](/apis/chainhook-api/reference): Documentación completa del endpoint +* [Guía de Uso](/apis/chainhooks-api/usage): Autenticación y mejores prácticas +* [Referencia de API](/apis/chainhooks-api/reference): Documentación completa del endpoint ::: :::callout diff --git a/content/docs/en/apis/chainhook-api/meta.json b/content/docs/es/apis/chainhooks-api/meta.json similarity index 100% rename from content/docs/en/apis/chainhook-api/meta.json rename to content/docs/es/apis/chainhooks-api/meta.json diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/bulk-enable-chainhooks.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/bulk-enable-chainhooks.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/bulk-enable-chainhooks.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/bulk-enable-chainhooks.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/delete-chainhook.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/delete-chainhook.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/delete-chainhook.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/delete-chainhook.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/evaluate-chainhook.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/evaluate-chainhook.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/get-chainhook.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/get-chainhook.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/get-chainhook.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/get-chainhook.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/get-chainhooks.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/get-chainhooks.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/get-chainhooks.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/get-chainhooks.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/index.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/index.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/index.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/index.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/register-chainhook.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/register-chainhook.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/register-chainhook.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/register-chainhook.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/update-chainhook-enabled.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/update-chainhook-enabled.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/update-chainhook-enabled.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/update-chainhook-enabled.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/chainhooks/update-chainhook.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/update-chainhook.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/chainhooks/update-chainhook.mdx rename to content/docs/es/apis/chainhooks-api/reference/chainhooks/update-chainhook.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/info/index.mdx b/content/docs/es/apis/chainhooks-api/reference/info/index.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/info/index.mdx rename to content/docs/es/apis/chainhooks-api/reference/info/index.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/info/status.mdx b/content/docs/es/apis/chainhooks-api/reference/info/status.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/info/status.mdx rename to content/docs/es/apis/chainhooks-api/reference/info/status.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/secrets/delete-consumer-secret.mdx b/content/docs/es/apis/chainhooks-api/reference/secrets/delete-consumer-secret.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/secrets/delete-consumer-secret.mdx rename to content/docs/es/apis/chainhooks-api/reference/secrets/delete-consumer-secret.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/secrets/index.mdx b/content/docs/es/apis/chainhooks-api/reference/secrets/index.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/secrets/index.mdx rename to content/docs/es/apis/chainhooks-api/reference/secrets/index.mdx diff --git a/content/docs/es/apis/chainhook-api/reference/secrets/rotate-consumer-secret.mdx b/content/docs/es/apis/chainhooks-api/reference/secrets/rotate-consumer-secret.mdx similarity index 100% rename from content/docs/es/apis/chainhook-api/reference/secrets/rotate-consumer-secret.mdx rename to content/docs/es/apis/chainhooks-api/reference/secrets/rotate-consumer-secret.mdx diff --git a/content/docs/es/apis/chainhook-api/usage.mdx b/content/docs/es/apis/chainhooks-api/usage.mdx similarity index 97% rename from content/docs/es/apis/chainhook-api/usage.mdx rename to content/docs/es/apis/chainhooks-api/usage.mdx index 1b75cd042..5d0dcb250 100644 --- a/content/docs/es/apis/chainhook-api/usage.mdx +++ b/content/docs/es/apis/chainhooks-api/usage.mdx @@ -282,6 +282,6 @@ La respuesta incluye metadatos de paginación: ## Próximos Pasos :::next-steps -* [Referencia de API](/apis/chainhook-api/reference): Documentación completa del endpoint -* [Referencia de Filtros](/tools/chainhook/reference/filters): Sintaxis de filtro de eventos +* [Referencia de API](/apis/chainhooks-api/reference): Documentación completa del endpoint +* [Referencia de Filtros](/tools/chainhooks/reference/filters): Sintaxis de filtro de eventos ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/keys.mdx b/content/docs/es/tools/chainhook/(chainhook-sdk)/keys.mdx deleted file mode 100644 index ef25c9b05..000000000 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/keys.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Gestionar Claves -description: Rotar secretos de consumidor y validar cada entrega de Chainhook ---- -## Qué aprenderás - -:::objectives -* Crear/rotar un secreto de consumidor de Chainhook. -* Valida las solicitudes de webhook verificando el `Authorization` header. -::: - -## Requisitos previos - -:::prerequisites -* Clave API de Hiro -* Node.js (el ejemplo del servidor usa Fastify). -::: - -## Validación de solicitudes de webhook con un secreto de consumidor - -Cuando creas un secreto, nuestro servicio Chainhook adjunta un `Authorization: Bearer ` encabezado a cada intento de webhook, proporcionándote un simple intercambio de secreto compartido. Aquí te explicamos cómo empezar: - -1. Rotar el secreto con `rotateConsumerSecret` (o el `/chainhooks/{uuid}/secret` API) siempre que necesites inicializar o crear un nuevo token. -2. Rechazar entregas de webhook cuya `Authorization` el encabezado no es igual a `Bearer `. - -### Crear/rotar secreto del consumidor - -```ts -nc server.ts -import { ChainhooksClient, CHAINHOOKS_BASE_URL } from '@hirosystems/chainhooks-client'; - -const client = new ChainhooksClient({ - baseUrl: CHAINHOOKS_BASE_URL.mainnet, // or .testnet / custom URL - apiKey: process.env.HIRO_API_KEY!, -}); - -// Store this value securely and use it to validate webhook requests -const secret = await client.rotateConsumerSecret(chainhookUuid).secret; -``` - -### Servidor Fastify de ejemplo - -```ts -nc -n -import Fastify from 'fastify'; - -const server = Fastify(); - -server.post('/webhook', async (request, reply) => { - if (!secret) { - reply.code(503).send({ error: 'consumer secret unavailable' }); - return; - } - - const authHeader = request.headers.authorization; - if (authHeader !== `Bearer ${secret}`) { - reply.code(401).send({ error: 'invalid consumer secret' }); - return; - } - - const event = request.body; - console.log(`received chainhook ${event.chainhook.uuid}`); - reply.code(204).send(); -}); - -await server.listen({ port: Number(process.env.PORT) || 3000 }); -``` diff --git a/content/docs/es/tools/chainhook/meta.json b/content/docs/es/tools/chainhook/meta.json deleted file mode 100644 index 31a8590c4..000000000 --- a/content/docs/es/tools/chainhook/meta.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "Chainhook", - "root": true, - "pages": ["---Chainhook|beta---", "index", "...(overview)", "...(chainhook-sdk)", "...reference"] -} diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/create.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/create.mdx similarity index 94% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/create.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/create.mdx index 3b6fd2474..5b65559a0 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/create.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/create.mdx @@ -137,6 +137,6 @@ This will disable all active chainhooks that POST to the old webhook URL. ## Siguientes pasos :::next-steps -* [Evaluar](/tools/chainhook/evaluate): Probar chainhooks contra bloques pasados -* [Referencia de Filtros](/tools/chainhook/reference/filters): Explora todas las opciones de filtro +* [Evaluar](/tools/chainhooks/evaluate): Probar chainhooks contra bloques pasados +* [Referencia de Filtros](/tools/chainhooks/reference/filters): Explora todas las opciones de filtro ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/edit-update.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/edit-update.mdx similarity index 91% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/edit-update.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/edit-update.mdx index b5b496ec4..f7a632da7 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/edit-update.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/edit-update.mdx @@ -74,6 +74,6 @@ console.log('Updated:', updated.definition.name); ``` :::next-steps -* [Lista y Obtener](/tools/chainhook/fetch): Recuperar información de chainhook antes de actualizar -* [Referencia de Filtros](/tools/chainhook/reference/filters): Explorar todas las opciones de filtro +* [Lista y Obtener](/tools/chainhooks/fetch): Recuperar información de chainhook antes de actualizar +* [Referencia de Filtros](/tools/chainhooks/reference/filters): Explorar todas las opciones de filtro ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/evaluate.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/evaluate.mdx similarity index 93% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/evaluate.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/evaluate.mdx index 2af86949d..d9cc93297 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/evaluate.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/evaluate.mdx @@ -64,6 +64,6 @@ Returns HTTP `204 No Content`. Si los filtros coinciden, la carga útil del webh ## Próximos pasos :::next-steps -* [Registrar y Habilitar](/tools/chainhook/create): Crear chainhooks para evaluar -* [Referencia de Filtros](/tools/chainhook/reference/filters): Configurar qué eventos coincidir +* [Registrar y Habilitar](/tools/chainhooks/create): Crear chainhooks para evaluar +* [Referencia de Filtros](/tools/chainhooks/reference/filters): Configurar qué eventos coincidir ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/fetch.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/fetch.mdx similarity index 87% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/fetch.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/fetch.mdx index 4b83595f3..1ce750b5d 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/fetch.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/fetch.mdx @@ -50,6 +50,6 @@ const chainhook = await client.getChainhook('be4ab3ed-b606-4fe0-97c4-6c0b1ac9b18 ## Siguientes pasos :::next-steps -* [Editar y Actualizar](/tools/chainhook/update): Modificar chainhooks existentes -* [Registrar y Habilitar](/tools/chainhook/create): Crear nuevos chainhooks +* [Editar y Actualizar](/tools/chainhooks/update): Modificar chainhooks existentes +* [Registrar y Habilitar](/tools/chainhooks/create): Crear nuevos chainhooks ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/introduction.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/introduction.mdx similarity index 95% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/introduction.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/introduction.mdx index 0ebfea5b9..520dbf782 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/introduction.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/introduction.mdx @@ -161,6 +161,6 @@ import type { ## Próximos Pasos :::next-steps -* [Crear chainhooks](/tools/chainhook/create): Crear y activar chainhooks -* [Administrar secretos del consumidor](/tools/chainhook/keys): Aprende cómo validar la entrega de Chainhook +* [Crear chainhooks](/tools/chainhooks/create): Crear y activar chainhooks +* [Administrar secretos del consumidor](/tools/chainhooks/keys): Aprende cómo validar la entrega de Chainhook ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/list-fetch.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/list-fetch.mdx similarity index 86% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/list-fetch.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/list-fetch.mdx index acb0fd501..a5d2a814c 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/list-fetch.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/list-fetch.mdx @@ -48,6 +48,6 @@ const chainhook = await client.getChainhook('be4ab3ed-b606-4fe0-97c4-6c0b1ac9b18 ``` :::next-steps -* [Editar y Actualizar](/tools/chainhook/update): Modificar chainhooks existentes -* [Registrar y Habilitar](/tools/chainhook/create): Crear nuevos chainhooks +* [Editar y Actualizar](/tools/chainhooks/update): Modificar chainhooks existentes +* [Registrar y Habilitar](/tools/chainhooks/create): Crear nuevos chainhooks ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/manage-keys.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/manage-keys.mdx similarity index 100% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/manage-keys.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/manage-keys.mdx diff --git a/content/docs/en/tools/chainhook/(chainhook-sdk)/meta.json b/content/docs/es/tools/chainhooks/(chainhook-sdk)/meta.json similarity index 64% rename from content/docs/en/tools/chainhook/(chainhook-sdk)/meta.json rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/meta.json index 8a3e71f8f..9a8e9ee55 100644 --- a/content/docs/en/tools/chainhook/(chainhook-sdk)/meta.json +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/meta.json @@ -1,7 +1,7 @@ { - "title": "Chainhook SDK", + "title": "Chainhooks SDK", "pages": [ - "---Chainhook SDK|new---", + "---Chainhooks SDK|new---", "introduction", "create", "fetch", diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/register-enable.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/register-enable.mdx similarity index 94% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/register-enable.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/register-enable.mdx index 166f8aeb8..6a48c4614 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/register-enable.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/register-enable.mdx @@ -139,6 +139,6 @@ await client.bulkEnableChainhooks({ This will disable all active chainhooks that POST to the old webhook URL. :::next-steps -* [Evaluar](/tools/chainhook/evaluate): Probar chainhooks contra bloques pasados -* [Referencia de Filtros](/tools/chainhook/reference/filters): Explora todas las opciones de filtro +* [Evaluar](/tools/chainhooks/evaluate): Probar chainhooks contra bloques pasados +* [Referencia de Filtros](/tools/chainhooks/reference/filters): Explora todas las opciones de filtro ::: diff --git a/content/docs/es/tools/chainhook/(chainhook-sdk)/update.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/update.mdx similarity index 91% rename from content/docs/es/tools/chainhook/(chainhook-sdk)/update.mdx rename to content/docs/es/tools/chainhooks/(chainhook-sdk)/update.mdx index 3297f9a7a..a51852b66 100644 --- a/content/docs/es/tools/chainhook/(chainhook-sdk)/update.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/update.mdx @@ -74,6 +74,6 @@ console.log('Updated:', updated.definition.name); ## Próximos pasos :::next-steps -* [Obtener chainhooks](/tools/chainhook/fetch): Recuperar información de chainhook antes de actualizar -* [Referencia de Filtros](/tools/chainhook/reference/filters): Explora todas las opciones de filtro +* [Obtener chainhooks](/tools/chainhooks/fetch): Recuperar información de chainhook antes de actualizar +* [Referencia de Filtros](/tools/chainhooks/reference/filters): Explora todas las opciones de filtro ::: diff --git a/content/docs/es/tools/chainhook/(overview)/faq.mdx b/content/docs/es/tools/chainhooks/(overview)/faq.mdx similarity index 88% rename from content/docs/es/tools/chainhook/(overview)/faq.mdx rename to content/docs/es/tools/chainhooks/(overview)/faq.mdx index 0cb80f7a0..93679ea4c 100644 --- a/content/docs/es/tools/chainhook/(overview)/faq.mdx +++ b/content/docs/es/tools/chainhooks/(overview)/faq.mdx @@ -50,7 +50,7 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) La API tampoco admitirá Chainhooks ejecutándose en v1.0. :::callout - Aprende cómo migrar tus chainhooks v1 a v2 en el [Guía de Migración](/tools/chainhook/migration). + Aprende cómo migrar tus chainhooks v1 a v2 en el [Guía de Migración](/tools/chainhooks/migration). ::: @@ -61,7 +61,7 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) En la Plataforma, los chainhooks v1 son de solo lectura. Puedes verlos y continuarán entregando eventos, pero no puedes modificarlos a través de la interfaz de usuario de la Plataforma. - Para modificar v1 chainhooks programáticamente, usa el [API de Plataforma](/apis/platform-api). Sin embargo, recomendamos migrar a chainhooks v2 en su lugar. Consulte el [Guía de Migración](/tools/chainhook/migration) para un tutorial completo. + Para modificar v1 chainhooks programáticamente, usa el [API de Plataforma](/apis/platform-api). Sin embargo, recomendamos migrar a chainhooks v2 en su lugar. Consulte el [Guía de Migración](/tools/chainhooks/migration) para un tutorial completo. @@ -69,7 +69,7 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) ¿Cómo migro mis chainhooks v1 a v2? - Para migrar tus chainhooks de v1 a v2, sigue los pasos descritos en el [Guía de Migración](/tools/chainhook/migration). + Para migrar tus chainhooks de v1 a v2, sigue los pasos descritos en el [Guía de Migración](/tools/chainhooks/migration). @@ -81,7 +81,7 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) ¿Puedo editar mis v2 Chainhooks? - ¡Sí! puedes editar tus Chainhooks v2 usando el [SDK de Chainhook](/tools/chainhook/update) o [API de Chainhook](/apis/chainhook-api). La Plataforma actualmente no admite la edición de Chainhooks v2. + ¡Sí! puedes editar tus Chainhooks v2 usando el [SDK de Chainhook](/tools/chainhooks/update) o [API de Chainhook](/apis/chainhooks-api). La Plataforma actualmente no admite la edición de Chainhooks v2. @@ -93,7 +93,7 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) ¿Puedo filtrar por múltiples tipos de eventos? - ¡Sí! Ve ejemplos en el [Referencia de filtros](/tools/chainhook/reference/filters#combining-filters) guía para ejemplos de combinación de filtros. + ¡Sí! Ve ejemplos en el [Referencia de filtros](/tools/chainhooks/reference/filters#combining-filters) guía para ejemplos de combinación de filtros. @@ -101,7 +101,7 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) ¿Qué pasa si mi endpoint de webhook no funciona? - Chainhook volverá a intentar las entregas de webhook y luego "pausará" tu Chainhook, dándote tiempo para solucionar el problema y reactivarlo. Un tiempo de inactividad prolongado puede resultar en eventos perdidos, pero puedes usar el [Evaluar](/tools/chainhook/evaluate) función para reproducir bloques perdidos. + Chainhook volverá a intentar las entregas de webhook y luego "pausará" tu Chainhook, dándote tiempo para solucionar el problema y reactivarlo. Un tiempo de inactividad prolongado puede resultar en eventos perdidos, pero puedes usar el [Evaluar](/tools/chainhooks/evaluate) función para reproducir bloques perdidos. @@ -128,6 +128,6 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) ## Próximos Pasos :::next-steps -* [Crear chainhooks](/tools/chainhook/create): Registrar y habilitar chainhooks -* [Anatomía del payload](/tools/chainhook/payload-anatomy): Sumérgete en la anatomía de una carga útil de chainhook +* [Crear chainhooks](/tools/chainhooks/create): Registrar y habilitar chainhooks +* [Anatomía del payload](/tools/chainhooks/payload-anatomy): Sumérgete en la anatomía de una carga útil de chainhook ::: diff --git a/content/docs/en/tools/chainhook/(overview)/meta.json b/content/docs/es/tools/chainhooks/(overview)/meta.json similarity index 59% rename from content/docs/en/tools/chainhook/(overview)/meta.json rename to content/docs/es/tools/chainhooks/(overview)/meta.json index 1d584866a..350453c06 100644 --- a/content/docs/en/tools/chainhook/(overview)/meta.json +++ b/content/docs/es/tools/chainhooks/(overview)/meta.json @@ -1,4 +1,4 @@ { - "title": "Chainhook", + "title": "Chainhooks", "pages": ["migration", "faq"] } diff --git a/content/docs/es/tools/chainhook/(overview)/migration.mdx b/content/docs/es/tools/chainhooks/(overview)/migration.mdx similarity index 96% rename from content/docs/es/tools/chainhook/(overview)/migration.mdx rename to content/docs/es/tools/chainhooks/(overview)/migration.mdx index d4ab9d3e9..7867c73bb 100644 --- a/content/docs/es/tools/chainhook/(overview)/migration.mdx +++ b/content/docs/es/tools/chainhooks/(overview)/migration.mdx @@ -90,7 +90,7 @@ Los chainhooks heredados v1 permanecen de solo lectura en la UI de la Plataforma ``` - Para más detalles sobre los cambios de formato, consulta el [Filtros](/tools/chainhook/reference/filters) guía de referencia. + Para más detalles sobre los cambios de formato, consulta el [Filtros](/tools/chainhooks/reference/filters) guía de referencia. @@ -230,11 +230,11 @@ Could you please provide the complete text that you'd like me to translate from Once you provide the full text, I'll return only the translated version following your guidelines. `ft_transfer` | Especificar `asset_identifier`. | | `nft_event` | `transfer`, `mint` I don't see any text to translate. You've provided the translation rules but the actual text content appears to be missing after "Text to translate:" - there's only a "|" character. Please provide the text you'd like me to translate from English to Spanish. `nft_transfer` · `nft_mint` | Proporcionar `asset_identifier`. | -Para más detalles, consulta el [Filtros](/tools/chainhook/reference/filters) página de referencia. +Para más detalles, consulta el [Filtros](/tools/chainhooks/reference/filters) página de referencia. ## Próximos pasos :::next-steps -* [FAQ](/tools/chainhook/faq): FAQ de Chainhook 2.0 (Beta) -* [Referencia de Filtros](/tools/chainhook/reference/filters): Referencia de Filtros +* [FAQ](/tools/chainhooks/faq): FAQ de Chainhook 2.0 (Beta) +* [Referencia de Filtros](/tools/chainhooks/reference/filters): Referencia de Filtros ::: diff --git a/content/docs/es/tools/chainhook/(overview)/quickstart.mdx b/content/docs/es/tools/chainhooks/(overview)/quickstart.mdx similarity index 88% rename from content/docs/es/tools/chainhook/(overview)/quickstart.mdx rename to content/docs/es/tools/chainhooks/(overview)/quickstart.mdx index 8700e8e37..ec0ce632a 100644 --- a/content/docs/es/tools/chainhook/(overview)/quickstart.mdx +++ b/content/docs/es/tools/chainhooks/(overview)/quickstart.mdx @@ -12,7 +12,7 @@ description: En esta guía, crearás tu primer predicado Chainhook para monitore ## Requisitos previos :::prerequisites -* Para instrucciones de instalación, visite el [Guía de instalación de Chainhook](/tools/chainhook#installation). +* Para instrucciones de instalación, visite el [Guía de instalación de Chainhook](/tools/chainhooks#installation). ::: ## Inicio rápido @@ -95,6 +95,6 @@ description: En esta guía, crearás tu primer predicado Chainhook para monitore ## Próximos pasos :::next-steps -* [Diseñar predicados personalizados](/tools/chainhook/usage): Aprende a crear predicados para llamadas de contratos, transferencias de NFT y más -* [Ejecutar Chainhook como un servicio](/tools/chainhook/service-mode): Configurar monitoreo continuo de blockchain con entrega por webhook +* [Diseñar predicados personalizados](/tools/chainhooks/usage): Aprende a crear predicados para llamadas de contratos, transferencias de NFT y más +* [Ejecutar Chainhook como un servicio](/tools/chainhooks/service-mode): Configurar monitoreo continuo de blockchain con entrega por webhook ::: diff --git a/content/docs/es/tools/chainhook/(overview)/usage.mdx b/content/docs/es/tools/chainhooks/(overview)/usage.mdx similarity index 98% rename from content/docs/es/tools/chainhook/(overview)/usage.mdx rename to content/docs/es/tools/chainhooks/(overview)/usage.mdx index c65d88099..90303c321 100644 --- a/content/docs/es/tools/chainhook/(overview)/usage.mdx +++ b/content/docs/es/tools/chainhooks/(overview)/usage.mdx @@ -260,5 +260,5 @@ Configura los predicados de manera diferente para cada entorno de red: ## Lecturas adicionales -* [Diseñar predicados](/tools/chainhook/usage) -* [Ejecutar Chainhook como un servicio](/tools/chainhook/service-mode) +* [Diseñar predicados](/tools/chainhooks/usage) +* [Ejecutar Chainhook como un servicio](/tools/chainhooks/service-mode) diff --git a/content/docs/es/tools/chainhook/(platform-usage)/create-enable-chainhooks.mdx b/content/docs/es/tools/chainhooks/(platform-usage)/create-enable-chainhooks.mdx similarity index 100% rename from content/docs/es/tools/chainhook/(platform-usage)/create-enable-chainhooks.mdx rename to content/docs/es/tools/chainhooks/(platform-usage)/create-enable-chainhooks.mdx diff --git a/content/docs/es/tools/chainhook/(platform-usage)/manage-api-keys.mdx b/content/docs/es/tools/chainhooks/(platform-usage)/manage-api-keys.mdx similarity index 100% rename from content/docs/es/tools/chainhook/(platform-usage)/manage-api-keys.mdx rename to content/docs/es/tools/chainhooks/(platform-usage)/manage-api-keys.mdx diff --git a/content/docs/es/tools/chainhook/(platform-usage)/meta.json b/content/docs/es/tools/chainhooks/(platform-usage)/meta.json similarity index 100% rename from content/docs/es/tools/chainhook/(platform-usage)/meta.json rename to content/docs/es/tools/chainhooks/(platform-usage)/meta.json diff --git a/content/docs/es/tools/chainhook/(platform-usage)/platform-quickstart.mdx b/content/docs/es/tools/chainhooks/(platform-usage)/platform-quickstart.mdx similarity index 100% rename from content/docs/es/tools/chainhook/(platform-usage)/platform-quickstart.mdx rename to content/docs/es/tools/chainhooks/(platform-usage)/platform-quickstart.mdx diff --git a/content/docs/es/tools/chainhook/(platform-usage)/platform-usage.mdx b/content/docs/es/tools/chainhooks/(platform-usage)/platform-usage.mdx similarity index 86% rename from content/docs/es/tools/chainhook/(platform-usage)/platform-usage.mdx rename to content/docs/es/tools/chainhooks/(platform-usage)/platform-usage.mdx index 9ba466720..c4deebe1d 100644 --- a/content/docs/es/tools/chainhook/(platform-usage)/platform-usage.mdx +++ b/content/docs/es/tools/chainhooks/(platform-usage)/platform-usage.mdx @@ -24,7 +24,7 @@ La Plataforma Hiro proporciona una interfaz basada en web para gestionar chainho * Están gestionando claves de API * Quiere empezar rápidamente -**Elige el [SDK de Chainhook](/tools/chainhook/chainhook-sdk) cuando tú:** +**Elige el [SDK de Chainhook](/tools/chainhooks/chainhook-sdk) cuando tú:** * Necesito editar chainhooks existentes (no disponible en la interfaz de la plataforma) * Quiere automatizar las operaciones de chainhook @@ -55,6 +55,6 @@ La interfaz de usuario de la plataforma proporciona: ## Próximos Pasos :::next-steps -* [Inicio Rápido de la Plataforma](/tools/chainhook/platform-quickstart): Crea tu primer chainhook en minutos -* [Crear y Habilitar Chainhooks](/tools/chainhook/create-enable-chainhooks): Aprende cómo configurar chainhooks en la UI +* [Inicio Rápido de la Plataforma](/tools/chainhooks/platform-quickstart): Crea tu primer chainhook en minutos +* [Crear y Habilitar Chainhooks](/tools/chainhooks/create-enable-chainhooks): Aprende cómo configurar chainhooks en la UI ::: diff --git a/content/docs/es/tools/chainhook/(platform-usage)/view-chainhooks.mdx b/content/docs/es/tools/chainhooks/(platform-usage)/view-chainhooks.mdx similarity index 100% rename from content/docs/es/tools/chainhook/(platform-usage)/view-chainhooks.mdx rename to content/docs/es/tools/chainhooks/(platform-usage)/view-chainhooks.mdx diff --git a/content/docs/es/tools/chainhook/index.mdx b/content/docs/es/tools/chainhooks/index.mdx similarity index 79% rename from content/docs/es/tools/chainhook/index.mdx rename to content/docs/es/tools/chainhooks/index.mdx index 3b81d8801..692672aaa 100644 --- a/content/docs/es/tools/chainhook/index.mdx +++ b/content/docs/es/tools/chainhooks/index.mdx @@ -18,9 +18,9 @@ Chainhook facilita la suscripción a la actividad de blockchain en Stacks median Con Chainhook 2.0 (Beta), puedes gestionar chainhooks a través de: -* **[SDK Chainhook](/tools/chainhook/introduction)** - Cliente TypeScript/JavaScript para gestión programática +* **[SDK Chainhook](/tools/chainhooks/introduction)** - Cliente TypeScript/JavaScript para gestión programática * **[Plataforma Hiro](https://platform.hiro.so)** - UI basada en web para la creación visual de chainhook -* **[API de Chainhook](/apis/chainhook-api)** - Direct REST API access +* **[API de Chainhook](/apis/chainhooks-api)** - Direct REST API access ## Características Clave @@ -31,8 +31,8 @@ Con Chainhook 2.0 (Beta), puedes gestionar chainhooks a través de: ## Próximos pasos :::next-steps -* [Introducción al SDK](/tools/chainhook/introduction): Comience con el SDK de Chainhook -* [Guía de migración](/tools/chainhook/migration): Guía de migración para actualizar a Chainhook 2.0 (Beta) +* [Introducción al SDK](/tools/chainhooks/introduction): Comience con el SDK de Chainhook +* [Guía de migración](/tools/chainhooks/migration): Guía de migración para actualizar a Chainhook 2.0 (Beta) ::: :::callout diff --git a/content/docs/es/tools/chainhooks/meta.json b/content/docs/es/tools/chainhooks/meta.json new file mode 100644 index 000000000..d9a71c27e --- /dev/null +++ b/content/docs/es/tools/chainhooks/meta.json @@ -0,0 +1,5 @@ +{ + "title": "Chainhooks", + "root": true, + "pages": ["---Chainhooks|beta---", "index", "...(overview)", "...(chainhook-sdk)", "...reference"] +} diff --git a/content/docs/es/tools/chainhook/reference/bitcoin-scopes.mdx b/content/docs/es/tools/chainhooks/reference/bitcoin-scopes.mdx similarity index 100% rename from content/docs/es/tools/chainhook/reference/bitcoin-scopes.mdx rename to content/docs/es/tools/chainhooks/reference/bitcoin-scopes.mdx diff --git a/content/docs/es/tools/chainhook/reference/filters.mdx b/content/docs/es/tools/chainhooks/reference/filters.mdx similarity index 100% rename from content/docs/es/tools/chainhook/reference/filters.mdx rename to content/docs/es/tools/chainhooks/reference/filters.mdx diff --git a/content/docs/es/tools/chainhook/reference/meta.json b/content/docs/es/tools/chainhooks/reference/meta.json similarity index 100% rename from content/docs/es/tools/chainhook/reference/meta.json rename to content/docs/es/tools/chainhooks/reference/meta.json diff --git a/content/docs/es/tools/chainhook/reference/options.mdx b/content/docs/es/tools/chainhooks/reference/options.mdx similarity index 100% rename from content/docs/es/tools/chainhook/reference/options.mdx rename to content/docs/es/tools/chainhooks/reference/options.mdx diff --git a/content/docs/es/tools/chainhook/reference/payload-anatomy.mdx b/content/docs/es/tools/chainhooks/reference/payload-anatomy.mdx similarity index 100% rename from content/docs/es/tools/chainhook/reference/payload-anatomy.mdx rename to content/docs/es/tools/chainhooks/reference/payload-anatomy.mdx diff --git a/content/docs/es/tools/chainhook/reference/stacks-scopes.mdx b/content/docs/es/tools/chainhooks/reference/stacks-scopes.mdx similarity index 100% rename from content/docs/es/tools/chainhook/reference/stacks-scopes.mdx rename to content/docs/es/tools/chainhooks/reference/stacks-scopes.mdx diff --git a/content/docs/es/tools/contract-monitoring/create-alert.mdx b/content/docs/es/tools/contract-monitoring/create-alert.mdx index cc3b2f5ab..a9e292b39 100644 --- a/content/docs/es/tools/contract-monitoring/create-alert.mdx +++ b/content/docs/es/tools/contract-monitoring/create-alert.mdx @@ -175,5 +175,5 @@ El `tx_status` siempre devolverá "pending" para las alertas de monitoreo. Las n :::next-steps * [Plataforma Hiro](https://platform.hiro.so): Crea y gestiona nuevos webhooks en la Plataforma. -* [Chainhook](/tools/chainhook): Aprende sobre el monitoreo avanzado de eventos con Chainhook +* [Chainhook](/tools/chainhooks): Aprende sobre el monitoreo avanzado de eventos con Chainhook ::: diff --git a/content/docs/es/tools/contract-monitoring/index.mdx b/content/docs/es/tools/contract-monitoring/index.mdx index 8c8d30a36..bc2e86978 100644 --- a/content/docs/es/tools/contract-monitoring/index.mdx +++ b/content/docs/es/tools/contract-monitoring/index.mdx @@ -15,7 +15,7 @@ llm: false :::next-steps * [Crear una alerta](/tools/contract-monitoring/create-alert): Configura tu primera alerta para llamadas de función. -* [Chainhooks](/tools/chainhook): Aprende más sobre Chainhooks y cómo difieren del monitoreo de contratos. +* [Chainhooks](/tools/chainhooks): Aprende más sobre Chainhooks y cómo difieren del monitoreo de contratos. ::: :::callout From 3f228f207e9db1c8d47a6877e8de5e588b741e3b Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 11 Nov 2025 19:37:58 -0600 Subject: [PATCH 05/14] fix link validation for locale --- lint.ts | 77 +++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 18 deletions(-) diff --git a/lint.ts b/lint.ts index 754f530e9..968b690d1 100644 --- a/lint.ts +++ b/lint.ts @@ -3,33 +3,74 @@ import path from 'node:path'; import { getTableOfContents } from 'fumadocs-core/server'; import { getSlugs, parseFilePath } from 'fumadocs-core/source'; import { printErrors, readFiles, scanURLs, validateFiles } from 'next-validate-link'; +import { i18n } from './lib/i18n'; async function checkLinks() { const docsFiles = await readFiles('content/docs/**/*.{md,mdx}'); + const defaultLocale = i18n.defaultLanguage ?? 'en'; + const supportedLocales = new Set(i18n.languages ?? [defaultLocale]); + + const docRoutes = docsFiles + .map((file) => { + const info = parseFilePath(path.relative('content/docs', file.path)); + const slugs = getSlugs(info); + const [possibleLocale, ...rest] = slugs; + const hasLocale = possibleLocale && supportedLocales.has(possibleLocale); + const locale = hasLocale ? possibleLocale : defaultLocale; + const slugSegments = hasLocale ? rest : slugs; + + if (slugSegments.length === 0) { + console.warn(`Skipping doc with empty slug: ${file.path}`); + return null; + } + + const urlSegments = slugSegments.filter(Boolean); + + // Attach URL without locale so baseline routes (e.g. /tools/foo) get validated. + file.url = `/${urlSegments.join('/')}`; + + return { + locale, + slugSegments, + hashes: getTableOfContents(file.content).map((item) => item.url.slice(1)), + }; + }) + .filter((entry): entry is NonNullable => entry !== null); + const scanned = await scanURLs({ populate: { - // "(home)/blog/[slug]": blogFiles.map((file) => { - // const info = parseFilePath(path.relative("content/blog", file.path)); - - // return { - // value: getSlugs(info)[0], - // hashes: getTableOfContents(file.content).map((item) => - // item.url.slice(1) - // ), - // }; - // }), - '(docs)/[...slug]': docsFiles.map((file) => { - const info = parseFilePath(path.relative('content/docs', file.path)); - - return { - value: getSlugs(info), - hashes: getTableOfContents(file.content).map((item) => item.url.slice(1)), - }; - }), + '[locale]/[...slug]': docRoutes.map((route) => ({ + value: { + locale: route.locale, + slug: route.slugSegments, + }, + hashes: route.hashes, + })), }, }); + // Register locale-less aliases (default locale only) so `/tools/...` links validate without locale prefixes. + const localeLessEntries: Array<{ basePath: string; localizedPath: string }> = docRoutes + .filter((route) => route.locale === defaultLocale) + .map((route) => { + const slugPath = route.slugSegments.join('/'); + return { + basePath: `/${slugPath}`, + localizedPath: `/${route.locale}/${slugPath}`, + }; + }); + + for (const entry of localeLessEntries) { + const meta = scanned.urls.get(entry.localizedPath); + if (meta && !scanned.urls.has(entry.basePath)) { + scanned.urls.set(entry.basePath, meta); + } + } + + // Disable broad fallback patterns so invalid doc links don't slip through. + scanned.fallbackUrls = []; + printErrors( await validateFiles([...docsFiles], { scanned, From ba99c34edf3daa6ca405ce651ea9ff9689899fd1 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 11 Nov 2025 19:38:24 -0600 Subject: [PATCH 06/14] update locale content --- app/[locale]/(home)/_pages/page.en.tsx | 13 +++++++++++ app/[locale]/(home)/_pages/page.es.tsx | 26 ++++++++++----------- app/[locale]/(home)/apis/_pages/page.en.tsx | 9 ++++++- app/[locale]/(home)/apis/_pages/page.es.tsx | 15 ++++++------ components/card.tsx | 4 ++-- 5 files changed, 44 insertions(+), 23 deletions(-) diff --git a/app/[locale]/(home)/_pages/page.en.tsx b/app/[locale]/(home)/_pages/page.en.tsx index 666328fb2..15a5699e2 100644 --- a/app/[locale]/(home)/_pages/page.en.tsx +++ b/app/[locale]/(home)/_pages/page.en.tsx @@ -90,6 +90,19 @@ export default function HomePage() { title="Stacks Blockchain API" description="Comprehensive REST API for interacting with the Stacks blockchain and network data." /> + } + href="/apis/stacks-node-rpc-api" + title="Stacks Node RPC API" + description="Raw blockchain node methods: submit txs, call read-only contracts, query mempool/state." + /> + } + href="/apis/chainhooks-api" + title="Chainhooks API" + badge="new" + description="RESTful API for accessing Chainhook." + /> } href="/apis/token-metadata-api" diff --git a/app/[locale]/(home)/_pages/page.es.tsx b/app/[locale]/(home)/_pages/page.es.tsx index 025e3b351..98e3397c1 100644 --- a/app/[locale]/(home)/_pages/page.es.tsx +++ b/app/[locale]/(home)/_pages/page.es.tsx @@ -93,35 +93,43 @@ export default function HomePage() { title="API de la cadena de bloques Stacks" description="API REST completa para interactuar con la cadena de bloques Stacks y los datos de la red." /> - + } + href="/apis/stacks-node-rpc-api" + title="API RPC del Nodo Stacks" + description="Métodos de nodo sin procesar: enviar transacciones, llamar contratos de solo lectura, consultar mempool/estado." + /> + } + href="/apis/chainhooks-api" + title="API de Chainhooks" + badge="new" + description="API REST para acceder y administrar Chainhook." + /> } href="/apis/token-metadata-api" title="API de Metadatos de Tokens" description="Metadatos rápidos y confiables para tokens fungibles y no fungibles en Stacks." /> - } href="/apis/platform-api" title="API de la plataforma" description="Administre programáticamente devnets y chainhooks a través de la interfaz REST." /> - } href="/apis/ordinals-api" title="API de Ordinales" description="Datos completos de ordinales de Bitcoin y tokens BRC-20 con optimización de caché." /> - } href="/apis/runes-api" title="API de Runas" description="Datos rápidos y confiables para Bitcoin Runes a través de una interfaz REST fácil de usar." /> - } href="/apis/signer-metrics-api" @@ -144,14 +152,6 @@ export default function HomePage() { title="Guías" description="Instrucciones paso a paso para construir en capas de Bitcoin." /> - - } - href="/resources/snippets" - title="Fragmentos" - description="Ejemplos de código reutilizables para tareas comunes en Stacks y Bitcoin." - /> - } href="/resources/archive" diff --git a/app/[locale]/(home)/apis/_pages/page.en.tsx b/app/[locale]/(home)/apis/_pages/page.en.tsx index 61fff8141..bad1d189a 100644 --- a/app/[locale]/(home)/apis/_pages/page.en.tsx +++ b/app/[locale]/(home)/apis/_pages/page.en.tsx @@ -1,5 +1,5 @@ import { Cards, IndexCard } from '@/components/card'; -import { API, Hiro, Ordinals, Runes, StacksIcon } from '@/components/ui/icon'; +import { API, Chainhook, Hiro, Ordinals, Runes, StacksIcon } from '@/components/ui/icon'; export default function APIsPage() { return ( @@ -23,6 +23,13 @@ export default function APIsPage() { title="Stacks Node RPC API" description="Raw blockchain node methods: submit txs, call read-only contracts, query mempool/state." /> + } + href="/apis/chainhooks-api" + title="Chainhooks API" + badge="new" + description="RESTful API for accessing Chainhook." + /> } href="/apis/token-metadata-api" diff --git a/app/[locale]/(home)/apis/_pages/page.es.tsx b/app/[locale]/(home)/apis/_pages/page.es.tsx index 82e0bb19a..d4f88f177 100644 --- a/app/[locale]/(home)/apis/_pages/page.es.tsx +++ b/app/[locale]/(home)/apis/_pages/page.es.tsx @@ -1,5 +1,5 @@ import { Cards, IndexCard } from '@/components/card'; -import { API, Hiro, Ordinals, Runes, StacksIcon } from '@/components/ui/icon'; +import { API, Chainhook, Hiro, Ordinals, Runes, StacksIcon } from '@/components/ui/icon'; export default function APIsPage() { return ( @@ -17,28 +17,31 @@ export default function APIsPage() { title="API de la cadena de bloques Stacks" description="API REST completa para interactuar con la cadena de bloques de Stacks y los datos de la red." /> - } href="/apis/stacks-node-rpc-api" title="API RPC del Nodo Stacks" description="Métodos de nodo de blockchain sin procesar: enviar transacciones, llamar contratos de solo lectura, consultar mempool/estado." /> - + } + href="/apis/chainhooks-api" + title="API de Chainhooks" + badge="new" + description="API REST para gestionar y acceder a Chainhook." + /> } href="/apis/token-metadata-api" title="API de Metadatos de Tokens" description="Metadatos rápidos y confiables para tokens fungibles y no fungibles en Stacks." /> - } href="/apis/platform-api" title="API de la plataforma" description="Gestione programáticamente devnets y chainhooks a través de la interfaz REST." /> - } href="/apis/ordinals-api" @@ -46,7 +49,6 @@ export default function APIsPage() { tag="Bitcoin L1" description="Datos completos de ordinales de Bitcoin y tokens BRC-20 con optimización de caché." /> - } href="/apis/runes-api" @@ -54,7 +56,6 @@ export default function APIsPage() { tag="Bitcoin L1" description="Datos rápidos y confiables para Bitcoin Runes a través de una interfaz REST fácil de usar." /> - } href="/apis/signer-metrics-api" diff --git a/components/card.tsx b/components/card.tsx index e966f8081..4c29120e0 100644 --- a/components/card.tsx +++ b/components/card.tsx @@ -272,8 +272,8 @@ export function SmallCard({ )}
-
-

+
+

{title}

{badge && ( From 014988cf34a5f75dcb7fd2dd3f583f5c101c439f Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 11 Nov 2025 19:38:35 -0600 Subject: [PATCH 07/14] update chainhook copy --- content/docs/en/apis/chainhooks-api/index.mdx | 67 +---- content/docs/en/apis/chainhooks-api/usage.mdx | 2 +- content/docs/en/start/index.mdx | 2 +- .../(chainhook-sdk)/introduction.mdx | 2 +- .../(platform-usage)/platform-usage.mdx | 2 +- content/docs/es/apis/chainhooks-api/index.mdx | 78 +----- .../reference/chainhooks/index.mdx | 2 +- .../chainhooks-api/reference/info/index.mdx | 4 +- content/docs/es/apis/chainhooks-api/usage.mdx | 50 ++-- .../reference/chainhooks/update.mdx | 6 +- content/docs/es/start/index.mdx | 32 +-- .../chainhooks/(chainhook-sdk)/create.mdx | 18 +- .../chainhooks/(chainhook-sdk)/evaluate.mdx | 18 +- .../chainhooks/(chainhook-sdk)/fetch.mdx | 8 +- .../(chainhook-sdk)/introduction.mdx | 28 +- .../chainhooks/(chainhook-sdk)/secrets.mdx | 65 +++++ .../chainhooks/(chainhook-sdk)/update.mdx | 19 +- .../es/tools/chainhooks/(overview)/faq.mdx | 48 ++-- .../tools/chainhooks/(overview)/migration.mdx | 45 ++- .../chainhooks/(overview)/quickstart.mdx | 100 ------- .../es/tools/chainhooks/(overview)/usage.mdx | 264 ------------------ .../(platform-usage)/platform-usage.mdx | 40 +-- content/docs/es/tools/chainhooks/index.mdx | 30 +- .../es/tools/chainhooks/reference/filters.mdx | 70 ++--- .../es/tools/chainhooks/reference/options.mdx | 48 ++-- .../chainhooks/reference/payload-anatomy.mdx | 24 +- .../contract-monitoring/create-alert.mdx | 56 ++-- .../es/tools/contract-monitoring/index.mdx | 10 +- 28 files changed, 351 insertions(+), 787 deletions(-) create mode 100644 content/docs/es/tools/chainhooks/(chainhook-sdk)/secrets.mdx delete mode 100644 content/docs/es/tools/chainhooks/(overview)/quickstart.mdx delete mode 100644 content/docs/es/tools/chainhooks/(overview)/usage.mdx diff --git a/content/docs/en/apis/chainhooks-api/index.mdx b/content/docs/en/apis/chainhooks-api/index.mdx index 56a05e9c4..b22fc045f 100644 --- a/content/docs/en/apis/chainhooks-api/index.mdx +++ b/content/docs/en/apis/chainhooks-api/index.mdx @@ -6,22 +6,13 @@ description: REST API for managing Chainhooks programmatically ## Overview -The Chainhooks API is a REST API that allows you to programmatically manage chainhooks, configure event filters, and control webhook delivery. It provides the same functionality as the [Chainhook SDK](/tools/chainhooks/chainhook-sdk) through direct HTTP requests. - -Use the Chainhooks API when: -- You're working in a language without SDK support -- You need direct HTTP control over chainhook operations -- You're building custom integrations or automation workflows -- You prefer REST APIs over client libraries +The Chainhooks API is a REST API that allows you to programmatically manage chainhooks, configure event filters, and control webhook delivery. It provides the same functionality covered in the [Chainhooks SDK introduction](/tools/chainhooks/introduction) through direct HTTP requests. ## Key Features - **Full chainhook management** - Create, read, update, and delete chainhooks -- **Event filtering** - Configure filters for FT, NFT, STX, contract, and system events - **Webhook configuration** - Set up HTTP POST endpoints for event delivery - **Evaluation endpoints** - Test chainhooks against historical blocks -- **Bulk operations** - Enable or disable multiple chainhooks at once -- **Secret management** - Rotate webhook consumer secrets for security ## Base URLs @@ -32,65 +23,11 @@ Testnet: https://api.testnet.hiro.so/chainhooks/v1 Mainnet: https://api.mainnet.hiro.so/chainhooks/v1 ``` -## Authentication - -All API requests require authentication using a Hiro API key in the `x-api-key` header: - -```bash -curl https://api.testnet.hiro.so/chainhooks/v1/me/ \ - -H "x-api-key: YOUR_API_KEY" -``` - -Get your API key from [platform.hiro.so](https://platform.hiro.so). - -## Quick Example - -Register a new chainhook to monitor FT transfers: - -```bash -curl -X POST https://api.testnet.hiro.so/chainhooks/v1/me/ \ - -H "x-api-key: YOUR_API_KEY" \ - -H "Content-Type: application/json" \ - -d '{ - "name": "ft-transfer-monitor", - "version": "1", - "chain": "stacks", - "network": "testnet", - "filters": { - "events": [{ - "type": "ft_transfer", - "asset_identifier": "SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.usda-token::usda" - }] - }, - "action": { - "type": "http_post", - "url": "https://example.com/webhooks" - }, - "options": { - "enable_on_registration": true - } - }' -``` - -## SDK vs REST API - -Both the SDK and REST API provide identical functionality: - -| Feature | SDK | REST API | -|---------|-----|----------| -| Language | TypeScript/JavaScript | Any language | -| Type Safety | Yes | No | -| Authentication | Automatic | Manual headers | -| Error Handling | Built-in | Custom | -| Best For | Node.js/Bun apps | Other languages, scripts | - -For TypeScript/JavaScript projects, we recommend using the [Chainhook SDK](/tools/chainhooks/chainhook-sdk) for better developer experience. - ## Next Steps :::next-steps * [Usage Guide](/apis/chainhooks-api/usage): Authentication and best practices -* [API Reference](/apis/chainhooks-api/reference): Complete endpoint documentation +* [API Reference](/apis/chainhooks-api): Complete endpoint documentation ::: :::callout diff --git a/content/docs/en/apis/chainhooks-api/usage.mdx b/content/docs/en/apis/chainhooks-api/usage.mdx index fee355f2f..bf2504316 100644 --- a/content/docs/en/apis/chainhooks-api/usage.mdx +++ b/content/docs/en/apis/chainhooks-api/usage.mdx @@ -282,6 +282,6 @@ Response includes pagination metadata: ## Next Steps :::next-steps -* [API Reference](/apis/chainhooks-api/reference): Complete endpoint documentation +* [API Reference](/apis/chainhooks-api): Complete endpoint documentation * [Filter Reference](/tools/chainhooks/reference/filters): Event filter syntax ::: diff --git a/content/docs/en/start/index.mdx b/content/docs/en/start/index.mdx index 09a0efd21..d04dd311d 100644 --- a/content/docs/en/start/index.mdx +++ b/content/docs/en/start/index.mdx @@ -179,4 +179,4 @@ import heroImage from '@/public/stacks-hero.svg';

- \ No newline at end of file + diff --git a/content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx b/content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx index 580103131..cdcb585c1 100644 --- a/content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx +++ b/content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx @@ -161,5 +161,5 @@ import type { :::next-steps - [Create chainhooks](/tools/chainhooks/create): Create and activate chainhooks -- [Manage consumer secrets](/tools/chainhooks/keys): Learn how to validate Chainhooks delivery +- [Manage consumer secrets](/tools/chainhooks/secrets): Learn how to validate Chainhooks delivery ::: diff --git a/content/docs/en/tools/chainhooks/(platform-usage)/platform-usage.mdx b/content/docs/en/tools/chainhooks/(platform-usage)/platform-usage.mdx index bf003d17e..0eead6c4b 100644 --- a/content/docs/en/tools/chainhooks/(platform-usage)/platform-usage.mdx +++ b/content/docs/en/tools/chainhooks/(platform-usage)/platform-usage.mdx @@ -24,7 +24,7 @@ The Hiro Platform provides a web-based interface for managing chainhooks without - Are managing API keys - Want to get started quickly -**Choose the [Chainhooks SDK](/tools/chainhooks/chainhook-sdk) when you:** +**Start with the [Chainhooks SDK introduction](/tools/chainhooks/introduction) when you:** - Need to edit existing chainhooks (not available in Platform UI) - Want to automate chainhook operations - Are integrating chainhook management into your application diff --git a/content/docs/es/apis/chainhooks-api/index.mdx b/content/docs/es/apis/chainhooks-api/index.mdx index 7452212e0..36dd7d54d 100644 --- a/content/docs/es/apis/chainhooks-api/index.mdx +++ b/content/docs/es/apis/chainhooks-api/index.mdx @@ -1,102 +1,38 @@ --- -title: Chainhook API +title: API de Chainhooks sidebarTitle: Descripción general description: API REST para gestionar Chainhooks programáticamente --- -## Descripción general +## Resumen -The Chainhook API is a REST API that allows you to programmatically manage chainhooks, configure event filters, and control webhook delivery. It provides the same functionality as the [SDK de Chainhook](/tools/chainhooks/chainhook-sdk) through direct HTTP requests. - -Usa la API de Chainhook cuando: - -* Estás trabajando en un lenguaje sin soporte de SDK -* You need direct HTTP control over chainhook operations -* Estás construyendo integraciones personalizadas o flujos de trabajo de automatización -* You prefer REST APIs over client libraries +The Chainhooks API is a REST API that allows you to programmatically manage chainhooks, configure event filters, and control webhook delivery. It provides the same functionality covered in the [Introducción al SDK de Chainhooks](/tools/chainhooks/introduction) through direct HTTP requests. ## Características Principales * **Gestión completa de chainhook** - Crear, leer, actualizar y eliminar chainhooks -* **Filtrado de eventos** - Configurar filtros para eventos FT, NFT, STX, de contrato y del sistema * **Configuración de webhook** - Set up HTTP POST endpoints for event delivery * **Endpoints de evaluación** - Probar chainhooks contra bloques históricos -* **Operaciones en lote** - Habilitar o deshabilitar múltiples chainhooks a la vez -* **Gestión de secretos** - Rotar secretos del consumidor de webhook por seguridad ## URLs Base -La API de Chainhook está disponible tanto en mainnet como en testnet: +La API de Chainhooks está disponible tanto en mainnet como en testnet: ``` Testnet: https://api.testnet.hiro.so/chainhooks/v1 Mainnet: https://api.mainnet.hiro.so/chainhooks/v1 ``` -## Autenticación - -Todas las solicitudes de API requieren autenticación usando una clave API de Hiro en el `x-api-key` header: - -```bash -curl https://api.testnet.hiro.so/chainhooks/v1/me/ \ - -H "x-api-key: YOUR_API_KEY" -``` - -Obtén tu clave de API de [platform.hiro.so](https://platform.hiro.so). - -## Ejemplo Rápido - -Registrar un nuevo chainhook para monitorear transferencias de FT: - -```bash -curl -X POST https://api.testnet.hiro.so/chainhooks/v1/me/ \ - -H "x-api-key: YOUR_API_KEY" \ - -H "Content-Type: application/json" \ - -d '{ - "name": "ft-transfer-monitor", - "version": "1", - "chain": "stacks", - "network": "testnet", - "filters": { - "events": [{ - "type": "ft_transfer", - "asset_identifier": "SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.usda-token::usda" - }] - }, - "action": { - "type": "http_post", - "url": "https://example.com/webhooks" - }, - "options": { - "enable_on_registration": true - } - }' -``` - -## SDK vs REST API - -Both the SDK and REST API provide identical functionality: - -| Feature | SDK | REST API | -|---------|-----|----------| -| Language | TypeScript/JavaScript | Any language | -| Type Safety | Yes | No | -| Authentication | Automatic | Manual headers | -| Error Handling | Built-in | Custom | -| Best For | Node.js/Bun apps | Other languages, scripts | - -Para proyectos de TypeScript/JavaScript, recomendamos usar el [SDK de Chainhook](/tools/chainhooks/chainhook-sdk) para una mejor experiencia de desarrollador. - ## Próximos Pasos :::next-steps * [Guía de Uso](/apis/chainhooks-api/usage): Autenticación y mejores prácticas -* [Referencia de API](/apis/chainhooks-api/reference): Documentación completa del endpoint +* [Referencia de API](/apis/chainhooks-api): Documentación completa del endpoint ::: :::callout type: help -### ¿Necesitas ayuda construyendo con la API de Chainhook? +### ¿Necesitas ayuda construyendo con la API de Chainhooks? -Contáctanos en el **#chainhook** canal activado [Discord](https://stacks.chat/) bajo Herramientas de Desarrollador de Hiro. También hay un [horario de oficina semanal](https://www.addevent.com/event/oL21905919) llamada todos los jueves a las 11am ET. +Comunícate con nosotros en el **#chainhook** canal encendido [Discord](https://stacks.chat/) bajo Hiro Developer Tools. También hay un [horario de oficina semanal](https://www.addevent.com/event/oL21905919) llamada todos los jueves a las 11am ET. ::: diff --git a/content/docs/es/apis/chainhooks-api/reference/chainhooks/index.mdx b/content/docs/es/apis/chainhooks-api/reference/chainhooks/index.mdx index c23248ba7..8c35ccc0a 100644 --- a/content/docs/es/apis/chainhooks-api/reference/chainhooks/index.mdx +++ b/content/docs/es/apis/chainhooks-api/reference/chainhooks/index.mdx @@ -2,5 +2,5 @@ title: Chainhooks index: true full: true -description: Gestionar endpoints de la API Chainhook para crear, actualizar y evaluar chainhooks. +description: Administrar endpoints de la API de Chainhooks para crear, actualizar y evaluar chainhooks. --- diff --git a/content/docs/es/apis/chainhooks-api/reference/info/index.mdx b/content/docs/es/apis/chainhooks-api/reference/info/index.mdx index 51d7272c9..dda383f98 100644 --- a/content/docs/es/apis/chainhooks-api/reference/info/index.mdx +++ b/content/docs/es/apis/chainhooks-api/reference/info/index.mdx @@ -1,6 +1,6 @@ --- -title: Información +title: Info index: true full: true -description: Verificar el estado actual de la API Chainhook. +description: Verifica el estado actual de la API de Chainhooks. --- diff --git a/content/docs/es/apis/chainhooks-api/usage.mdx b/content/docs/es/apis/chainhooks-api/usage.mdx index 5d0dcb250..6bdded985 100644 --- a/content/docs/es/apis/chainhooks-api/usage.mdx +++ b/content/docs/es/apis/chainhooks-api/usage.mdx @@ -1,19 +1,19 @@ --- title: Uso -description: Aprende cómo autenticar, realizar solicitudes y manejar respuestas con la API de Chainhook +description: Aprende cómo autenticar, hacer solicitudes y manejar respuestas con la API de Chainhooks --- ## Autenticación -Todas las solicitudes de la API de Chainhook requieren autenticación usando una clave API de Hiro. +Todas las solicitudes de la API Chainhooks requieren autenticación utilizando una clave de API de Hiro. -### Obtén Tu Clave API +### Obtén tu Clave API -1. Visita [platform.hiro.so](https://platform.hiro.so) +1. Visitar [platform.hiro.so](https://platform.hiro.so) 2. Inicia sesión o crea una cuenta -3. Navegar a Claves de API +3. Navegar a Claves API 4. Genera o copia tu clave API -### Usando tu Clave de API +### Usando Tu Clave de API Incluye tu clave de API en el `x-api-key` encabezado para todas las solicitudes: @@ -25,8 +25,8 @@ curl https://api.testnet.hiro.so/chainhooks/v1/me/ \ **Mejores prácticas de seguridad:** * Almacena las claves de API en variables de entorno, nunca en el código -* Use diferentes claves para desarrollo y producción -* Rotar claves periódicamente +* Utiliza diferentes claves para desarrollo y producción +* Rote las claves periódicamente * Nunca confirmes claves al control de versiones ## URLs Base @@ -38,7 +38,7 @@ Testnet: https://api.testnet.hiro.so/chainhooks/v1 Mainnet: https://api.mainnet.hiro.so/chainhooks/v1 ``` -**Siempre prueba primero en testnet** antes de hacer el despliegue en la red principal. +**Siempre prueba primero en testnet** antes de implementar en mainnet. ## Formato de Solicitud @@ -51,7 +51,7 @@ Content-Type: application/json x-api-key: YOUR_API_KEY ``` -### Cuerpo de la Solicitud +### Cuerpo de Solicitud Most endpoints accept JSON request bodies. Example for registering a chainhook: @@ -116,7 +116,7 @@ Successful responses return JSON with relevant data: ### Respuestas de Error -Las respuestas de error incluyen detalles sobre lo que salió mal: +Las respuestas de error incluyen detalles sobre qué salió mal: ```json { @@ -168,9 +168,9 @@ curl -X POST https://api.testnet.hiro.so/chainhooks/v1/me/{uuid}/evaluate \ -d '{"block_height": 150000}' ``` -### Activar/Desactivar en Lote +### Habilitar/Deshabilitar en Lote -Habilitar o deshabilitar múltiples chainhooks que coinciden con filtros: +Habilitar o deshabilitar múltiples filtros de coincidencia de chainhooks: ```bash curl -X PATCH https://api.testnet.hiro.so/chainhooks/v1/me/enabled \ @@ -184,15 +184,15 @@ curl -X PATCH https://api.testnet.hiro.so/chainhooks/v1/me/enabled \ }' ``` -## Límites de Tasa +## Límites de Velocidad -La API de Chainhook aplica límites de velocidad basados en tu nivel de suscripción: +La API de Chainhooks aplica límites de velocidad basados en tu nivel de suscripción: * Nivel gratuito: 100 solicitudes por minuto * Nivel Pro: 1000 solicitudes por minuto -* Enterprise: Límites personalizados +* Empresa: Límites personalizados -Cuando esté limitado por la tasa, recibirá un `429 Too Many Requests` respuesta. Implementa retroceso exponencial en tu aplicación: +Cuando esté limitado por velocidad, recibirá un `429 Too Many Requests` respuesta. Implemente el retroceso exponencial en su aplicación: ```javascript async function makeRequestWithRetry(url, options, maxRetries = 3) { @@ -216,7 +216,7 @@ async function makeRequestWithRetry(url, options, maxRetries = 3) { ### Secreto del Consumidor -Cuando registras un chainhook, las cargas útiles del webhook incluyen un `x-chainhook-consumer-secret` header. Valida este secreto en tu endpoint de webhook: +Cuando registras un chainhook, las cargas útiles del webhook incluyen un `x-chainhook-consumer-secret` header. Valida este secreto en tu punto final de webhook: ```javascript app.post('/webhooks', (req, res) => { @@ -245,18 +245,18 @@ Almacena el nuevo secreto de forma segura y actualiza tu endpoint de webhook. ## Mejores Prácticas -1. **Comenzar en testnet** - Siempre prueba los chainhooks en testnet antes de mainnet +1. **Comienza en testnet** - Siempre prueba los chainhooks en testnet antes de mainnet 2. **Habilitar gradualmente** - Crear chainhooks deshabilitados, probar con `evaluate`, luego habilita -3. **Manejar errores** - Implementar manejo adecuado de errores y reintentos -4. **Validar webhooks** - Siempre verificar el encabezado del secreto del consumidor +3. **Manejar errores** - Implementar manejo de errores adecuado y reintentos +4. **Validar webhooks** - Siempre verifica el encabezado del secreto del consumidor 5. **Use HTTPS** - Webhook URLs must use HTTPS for security -6. **Supervisar uso** - Rastrea el uso de la API para mantenerte dentro de los límites de velocidad +6. **Monitorear uso** - Rastrea el uso de la API para mantenerte dentro de los límites de velocidad 7. **Control de versiones** - Documenta tus configuraciones de chainhook 8. **Limpiar** - Eliminar chainhooks no utilizados para reducir costos ## Paginación -Los endpoints de lista admiten paginación a través de parámetros de consulta: +Los endpoints de lista admiten paginación mediante parámetros de consulta: ```bash # Get first page (default: 20 results) @@ -282,6 +282,6 @@ La respuesta incluye metadatos de paginación: ## Próximos Pasos :::next-steps -* [Referencia de API](/apis/chainhooks-api/reference): Documentación completa del endpoint -* [Referencia de Filtros](/tools/chainhooks/reference/filters): Sintaxis de filtro de eventos +* [Referencia de API](/apis/chainhooks-api): Documentación completa de endpoints +* [Referencia de Filtro](/tools/chainhooks/reference/filters): Sintaxis de filtro de eventos ::: diff --git a/content/docs/es/apis/platform-api/reference/chainhooks/update.mdx b/content/docs/es/apis/platform-api/reference/chainhooks/update.mdx index 23d8d0e7c..4aad60338 100644 --- a/content/docs/es/apis/platform-api/reference/chainhooks/update.mdx +++ b/content/docs/es/apis/platform-api/reference/chainhooks/update.mdx @@ -1,7 +1,9 @@ --- title: Actualizar un chainhook -sidebarTitle: Actualizar -description: Actualiza un chainhook a través de la Plataforma Hiro. +sidebarTitle: Actualización +description: Actualizar un chainhook a través de la Plataforma Hiro. full: true --- + +Con `updateChainhook`, puedes ajustar una definición existente sin tiempo de inactividad: cambiar la URL del webhook, capturar nuevos eventos, o ajustar las opciones de configuración según evolucionen los requisitos. diff --git a/content/docs/es/start/index.mdx b/content/docs/es/start/index.mdx index 27252732a..b8a0d808a 100644 --- a/content/docs/es/start/index.mdx +++ b/content/docs/es/start/index.mdx @@ -1,7 +1,7 @@ --- -title: Empezar +title: Comenzar description: Comienza a construir aplicaciones descentralizadas en Stacks con las herramientas de Hiro. -sidebarTitle: Visión general +sidebarTitle: Resumen full: true llm: false --- @@ -14,9 +14,9 @@ import heroImage from '@/public/stacks-hero.svg';
- } tag="Hiro" description="Aprende más sobre las características que ofrecen nuestras herramientas." /> + } tag="Hiro" description="Aprende más sobre las características que proporcionan nuestras herramientas." /> - } tag="Resources" description="Comienza con una colección de recursos seleccionados en todo el ecosistema de Stacks." /> + } tag="Recursos" description="Comienza con una colección de recursos seleccionados a través del ecosistema de Stacks." />
@@ -35,14 +35,14 @@ import heroImage from '@/public/stacks-hero.svg'; } href="/contract-monitoring" title="Quiero monitorear datos de blockchain" description="Configura el monitoreo e indexación en tiempo real." /> - } href="/building-transactions" title="Quiero interactuar con contratos" description="Aprende cómo construir y enviar transacciones de forma programática." /> + } href="/building-transactions" title="Quiero interactuar con contratos" description="Aprende cómo construir y enviar transacciones programáticamente." />

- Flujo de trabajo de desarrollo + Flujo de Trabajo de Desarrollo

@@ -51,9 +51,9 @@ import heroImage from '@/public/stacks-hero.svg'; } href="/creating-a-clarinet-project" title="Crea Tu Primer Proyecto" description="Configura un nuevo proyecto de Clarinet y comienza a construir contratos inteligentes localmente." /> - } href="/configuring-clarity-vscode-extension" title="Configura Tu IDE" description="Configure VS Code con la extensión Clarity para una experiencia de desarrollo mejorada." /> + } href="/configuring-clarity-vscode-extension" title="Configura tu IDE" description="Configura VS Code con la extensión Clarity para una experiencia de desarrollo mejorada." /> - } href="/using-local-accounts" title="Administrar Cuentas Locales" description="Trabaja con cuentas y billeteras de prueba en tu entorno de desarrollo local." /> + } href="/using-local-accounts" title="Gestionar Cuentas Locales" description="Trabaja con cuentas de prueba y billeteras en tu entorno de desarrollo local." /> } href="/working-with-devnet" title="Configuración de Red Local" description="Ejecuta y configura una blockchain local de Stacks para pruebas." /> @@ -69,31 +69,31 @@ import heroImage from '@/public/stacks-hero.svg';
- } href="/unit-testing" title="Pruebas Unitarias" description="Escriba pruebas unitarias exhaustivas para asegurarse de que la lógica de su contrato sea correcta." /> + } href="/unit-testing" title="Pruebas Unitarias" description="Escriba pruebas unitarias integrales para asegurar que la lógica de su contrato sea correcta." /> - } href="/integration-testing" title="Pruebas de Integración" description="Prueba las interacciones del contrato y los escenarios complejos con pruebas de integración." /> + } href="/integration-testing" title="Pruebas de Integración" description="Prueba las interacciones de contratos y escenarios complejos con pruebas de integración." /> - } href="/cost-analysis-and-debugging" title="Análisis de Costos" description="Analizar los costos de transacción y depurar problemas de rendimiento del contrato." /> + } href="/cost-analysis-and-debugging" title="Análisis de Costos" description="Analiza los costos de transacción y depura problemas de rendimiento del contrato." />

- Datos y eventos en tiempo real + Datos y Eventos en Tiempo Real


- } href="/contract-monitoring" title="Monitorear Contratos" description="Rastrea la actividad y los eventos de contratos inteligentes en tiempo real." /> + } href="/contract-monitoring" title="Monitorear Contratos" description="Rastrea la actividad y eventos de contratos inteligentes en tiempo real." /> - } href="/creating-predicates" title="Crear Filtros de Eventos" description="Construye predicados personalizados para filtrar eventos de blockchain." /> + } href="/creating-predicates" title="Crear Filtros de Eventos" description="Crea predicados personalizados para filtrar eventos de blockchain." /> - } href="/building-a-simple-indexer" title="Construir un Indexador" description="Crea tu propio indexador de datos de blockchain para aplicaciones personalizadas." /> + } href="/building-a-simple-indexer" title="Construir un Indexador" description="Crea tu propio indexador de datos blockchain para aplicaciones personalizadas." /> - } href="/working-with-events-and-transaction-payloads" title="Cargas útiles de eventos" description="Analiza y trabaja con datos de transacciones y cargas útiles de eventos." /> + } href="/working-with-events-and-transaction-payloads" title="Cargas útiles de eventos" description="Analizar y trabajar con datos de transacciones y cargas útiles de eventos." />
diff --git a/content/docs/es/tools/chainhooks/(chainhook-sdk)/create.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/create.mdx index 5b65559a0..724074dca 100644 --- a/content/docs/es/tools/chainhooks/(chainhook-sdk)/create.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/create.mdx @@ -1,10 +1,10 @@ --- title: Crear chainhooks -description: Crear y activar chainhooks usando el SDK Chainhook +description: Crear y activar chainhooks usando el SDK de Chainhooks --- -## registerChainhook +Crea una nueva configuración de chainhook. Por defecto, los nuevos chainhooks se crean en un estado deshabilitado a menos que `enable_on_registration` está configurado en `true`. -Crea una nueva configuración de chainhook. Por defecto, los nuevos chainhooks se crean en un estado deshabilitado a menos que `enable_on_registration` está configurado como `true`. +## registerChainhook ### Ejemplo @@ -40,11 +40,11 @@ const chainhook = await client.registerChainhook({ }, }); -console.log('Chainhook UUID:', chainhook.uuid); +console.log('Chainhooks UUID:', chainhook.uuid); console.log('Enabled:', chainhook.status.enabled); // true ``` -No proporcionaste el texto completo para traducir. Solo veo "If you don't set" pero parece que falta el resto del contenido. Por favor, proporciona el texto completo que necesitas traducir. `enable_on_registration`, el chainhook se creará pero estará deshabilitado por defecto. +Si no estableces `enable_on_registration`, el chainhook será creado pero deshabilitado por defecto. *** @@ -68,7 +68,7 @@ Returns HTTP `204 No Content` en caso de éxito. ## bulkEnableChainhooks -Habilite o deshabilite múltiples chainhooks a la vez usando filtros. Esto es útil para gestionar muchos chainhooks de manera programática. +Habilita o deshabilita múltiples chainhooks a la vez usando filtros. Esto es útil para gestionar muchos chainhooks programáticamente. ### Por UUIDs @@ -119,7 +119,7 @@ await client.bulkEnableChainhooks({ ### Filtros Combinados -Usar múltiples filtros juntos: +Utiliza múltiples filtros juntos: ```typescript -nc await client.bulkEnableChainhooks({ @@ -134,9 +134,9 @@ await client.bulkEnableChainhooks({ This will disable all active chainhooks that POST to the old webhook URL. -## Siguientes pasos +## Próximos pasos :::next-steps -* [Evaluar](/tools/chainhooks/evaluate): Probar chainhooks contra bloques pasados +* [Evaluar](/tools/chainhooks/evaluate): Prueba chainhooks contra bloques pasados * [Referencia de Filtros](/tools/chainhooks/reference/filters): Explora todas las opciones de filtro ::: diff --git a/content/docs/es/tools/chainhooks/(chainhook-sdk)/evaluate.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/evaluate.mdx index d9cc93297..5a04a5f30 100644 --- a/content/docs/es/tools/chainhooks/(chainhook-sdk)/evaluate.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/evaluate.mdx @@ -1,10 +1,10 @@ --- -title: Evalúa un bloque específico +title: Evaluar un bloque específico description: Ejecuta tus chainhooks contra bloques específicos para pruebas, depuración e indexación histórica. --- El endpoint evaluate reproduce un solo bloque contra uno de tus chainhooks registrados para que puedas validar filtros sin esperar tráfico en vivo. -Úselo para reproducir entregas perdidas, inspeccionar esquemas de carga útil después de cambios de filtro, o probar la infraestructura de webhooks con bloques conocidos antes de habilitar un hook en producción. +Úsalo para reproducir entregas perdidas, inspeccionar esquemas de carga útil después de cambios de filtro, o probar infraestructura de webhooks con bloques conocidos antes de habilitar un hook en producción. ## evaluateChainhook @@ -12,12 +12,10 @@ El endpoint evaluate reproduce un solo bloque contra uno de tus chainhooks regis | Method | Parameter | Example | |--------|-----------|---------| -| **Por altura** I notice you've provided the translation rules but the actual text to translate appears to be just a single "|" character. Since this is just a pipe symbol (vertical bar), it doesn't need translation and should remain as: +| **Por altura** | `block_height` I don't see any text to translate. You've provided the rules and instructions, but the actual text content appears to be missing after "Text to translate:" - there's only a "|" symbol. -| `block_height` | `{ block_height: 100000 }` | -| **Por hash** I notice that you've provided the translation rules and indicated there's text to translate, but the actual text appears to be missing. You've only included a "|" character at the end. - -Could you please provide the actual text content that needs to be translated from English to Spanish? `index_block_hash` | `{ index_block_hash: '0xa204...' }` | +Could you please provide the actual text you'd like me to translate from English to Spanish? `{ block_height: 100000 }` | +| **Por hash** | `index_block_hash` | `{ index_block_hash: '0xa204...' }` | ### Ejemplo @@ -57,9 +55,9 @@ Returns HTTP `204 No Content`. Si los filtros coinciden, la carga útil del webh | Caso de Uso | Descripción | Ejemplo | |----------|-------------|---------| -| **Debug** | Investigar eventos perdidos | Evaluar bloque específico que debería haber disparado | -| **Rellenar** | Indexar datos históricos | Procesar bloques pasados después de crear chainhook | -| **Reprocesar** | Solucionar problemas del manejador de webhook | Re-evaluar después de corregir errores | +| **Debug** | Investigar eventos perdidos | Evaluar bloque específico que debería haber activado | +| **Rellenar** | Indexar datos históricos | Procesar bloques pasados después de crear el chainhook | +| **Reprocesar** | Solucionar problemas del controlador de webhook | Reevaluar después de corregir errores | ## Próximos pasos diff --git a/content/docs/es/tools/chainhooks/(chainhook-sdk)/fetch.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/fetch.mdx index 1ce750b5d..1302bfd61 100644 --- a/content/docs/es/tools/chainhooks/(chainhook-sdk)/fetch.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/fetch.mdx @@ -1,8 +1,8 @@ --- title: Obtener chainhooks -description: Recuperar información del chainhook usando el SDK +description: Recuperar información de chainhook usando el SDK --- -## getChainhooks +## getChainhook Recupera una lista paginada de todos tus chainhooks. @@ -37,7 +37,7 @@ const chainhooks = await client.getChainhooks({ *** -## getChainhook +## getChainhooks Retrieve a specific chainhook by UUID. @@ -47,7 +47,7 @@ Retrieve a specific chainhook by UUID. const chainhook = await client.getChainhook('be4ab3ed-b606-4fe0-97c4-6c0b1ac9b185'); ``` -## Siguientes pasos +## Próximos pasos :::next-steps * [Editar y Actualizar](/tools/chainhooks/update): Modificar chainhooks existentes diff --git a/content/docs/es/tools/chainhooks/(chainhook-sdk)/introduction.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/introduction.mdx index 520dbf782..bb0c5c3ec 100644 --- a/content/docs/es/tools/chainhooks/(chainhook-sdk)/introduction.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/introduction.mdx @@ -4,7 +4,7 @@ description: SDK de TypeScript/JavaScript para gestionar chainhooks programátic --- ## Descripción general -El SDK de Chainhook (`@hirosystems/chainhooks-client`) proporciona un cliente TypeScript/JavaScript para gestionar chainhooks de forma programática. +El SDK de Chainhooks (`@hirosystems/chainhooks-client`) proporciona un cliente TypeScript/JavaScript para gestionar chainhooks programáticamente. ## Instalación @@ -61,14 +61,14 @@ const chainhook = await client.registerChainhook({ }, }); -console.log('Chainhook created:', chainhook.uuid); +console.log('Chainhooks created:', chainhook.uuid); ``` ## URLs base -El SDK proporciona constantes específicas de red: +El SDK proporciona constantes específicas de la red: -| Network | Constante | URL | +| Network | Constant | URL | |---------|----------|-----| | Testnet | `CHAINHOOKS_BASE_URL.testnet` | https://api.testnet.hiro.so | | Red principal | `CHAINHOOKS_BASE_URL.mainnet` | https://api.mainnet.hiro.so | @@ -91,12 +91,12 @@ const mainnetClient = new ChainhooksClient({ ## Autenticación -### Obtén Tu Clave de API +### Obtén tu clave API 1. Visitar [platform.hiro.so](https://platform.hiro.so) -2. Iniciar sesión o crear una cuenta +2. Inicia sesión o crea una cuenta 3. Navegar a la sección de Claves API -4. Genera o copia tu clave API +4. Genera o copia tu clave de API ### Configurar Cliente @@ -110,7 +110,7 @@ const client = new ChainhooksClient({ :::callout type: warn -### Claves de API +### claves API Nunca confirmes claves API al control de versiones. Siempre usa variables de entorno o gestión segura de secretos. ::: @@ -140,18 +140,18 @@ El SDK proporciona los siguientes métodos: | Method | Description | |--------|-------------| -| `evaluateChainhook()` | Evaluar un chainhook contra bloques específicos del pasado | -| `rotateConsumerSecret()` | Rotar el secreto del webhook para verificación de carga útil | +| `evaluateChainhook()` | Evaluar un chainhook contra bloques pasados específicos | +| `rotateConsumerSecret()` | Rota el secreto del webhook para verificación de carga útil | -## Soporte de TypeScript +## Soporte para TypeScript ### Tipos Disponibles -El SDK proporciona definiciones de tipos TypeScript completas: +El SDK proporciona definiciones de tipos completas de TypeScript: ```typescript -nc import type { - ChainhookDefinitionSchema, // Chainhook configuration + ChainhookDefinitionSchema, // Chainhooks configuration ChainhookStatusSchema, // Status and activity info EvaluateChainhookRequest, // Evaluation parameters BulkEnableChainhooksRequest, // Bulk operation filters @@ -162,5 +162,5 @@ import type { :::next-steps * [Crear chainhooks](/tools/chainhooks/create): Crear y activar chainhooks -* [Administrar secretos del consumidor](/tools/chainhooks/keys): Aprende cómo validar la entrega de Chainhook +* [Gestionar secretos del consumidor](/tools/chainhooks/secrets): Aprende cómo validar la entrega de Chainhooks ::: diff --git a/content/docs/es/tools/chainhooks/(chainhook-sdk)/secrets.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/secrets.mdx new file mode 100644 index 000000000..d1b33c293 --- /dev/null +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/secrets.mdx @@ -0,0 +1,65 @@ +--- +title: Gestionar secretos +description: Rotar secretos de consumidor y validar cada entrega de Chainhooks +--- +## Lo que aprenderás + +:::objectives +* Crear/rotar un secreto de consumidor de Chainhooks. +* Valida las solicitudes de webhook verificando el `Authorization` cabecera. +::: + +## Prerrequisitos + +:::prerequisites +* Clave API de Hiro +* Node.js (el ejemplo del servidor utiliza Fastify). +::: + +## Validando solicitudes de webhook con un secreto de consumidor + +Cuando creas un secreto, nuestro servicio Chainhooks adjunta un `Authorization: Bearer ` encabezado a cada intento de webhook, dándote un simple intercambio de secreto compartido. Aquí te explicamos cómo empezar: + +1. Rotar el secreto con `rotateConsumerSecret` (o el `/chainhooks/{uuid}/secret` API) cada vez que necesites inicializar o crear un nuevo token. +2. Rechazar las entregas de webhook cuyas `Authorization` el encabezado no es igual a `Bearer `. + +### Crear/rotar secreto de consumidor + +```ts -nc server.ts +import { ChainhooksClient, CHAINHOOKS_BASE_URL } from '@hirosystems/chainhooks-client'; + +const client = new ChainhooksClient({ + baseUrl: CHAINHOOKS_BASE_URL.mainnet, // or .testnet / custom URL + apiKey: process.env.HIRO_API_KEY!, +}); + +// Store this value securely and use it to validate webhook requests +const secret = await client.rotateConsumerSecret(chainhookUuid).secret; +``` + +### Ejemplo de servidor Fastify + +```ts -nc -n +import Fastify from 'fastify'; + +const server = Fastify(); + +server.post('/webhook', async (request, reply) => { + if (!secret) { + reply.code(503).send({ error: 'consumer secret unavailable' }); + return; + } + + const authHeader = request.headers.authorization; + if (authHeader !== `Bearer ${secret}`) { + reply.code(401).send({ error: 'invalid consumer secret' }); + return; + } + + const event = request.body; + console.log(`received chainhook ${event.chainhook.uuid}`); + reply.code(204).send(); +}); + +await server.listen({ port: Number(process.env.PORT) || 3000 }); +``` diff --git a/content/docs/es/tools/chainhooks/(chainhook-sdk)/update.mdx b/content/docs/es/tools/chainhooks/(chainhook-sdk)/update.mdx index a51852b66..1da8bbe93 100644 --- a/content/docs/es/tools/chainhooks/(chainhook-sdk)/update.mdx +++ b/content/docs/es/tools/chainhooks/(chainhook-sdk)/update.mdx @@ -1,21 +1,14 @@ --- title: Editar chainhooks -description: Modificar chainhooks existentes incluyendo filtros, acciones y opciones +description: Modificar chainhooks existentes --- :::callout -La interfaz de usuario de la plataforma no admite actualmente la edición de chainhooks. Debe usar el SDK o API para realizar actualizaciones. +La interfaz de usuario de la plataforma actualmente no admite la edición de chainhooks. Debes usar el SDK o la API para realizar actualizaciones. ::: -## updateChainhook - -### Campos mutables vs inmutables +Con `updateChainhook`, puedes ajustar una definición existente sin tiempo de inactividad: cambiar la URL del webhook, capturar nuevos eventos, o afinar las opciones de configuración a medida que evolucionen los requisitos. -| Mutable | Immutable | -|---------------------|---------------------------| -| `name` | `chain` | -| `filters` | `network` | -| `action` | | -| `options` | | +## updateChainhook ### Ejemplo de Actualización Básica @@ -35,9 +28,9 @@ await client.updateChainhook('chainhook-uuid', { }); ``` -### Agregar filtro de eventos (preservando eventos existentes) +### Agregar filtro de eventos (preservando los eventos existentes) -Para agregar un nuevo filtro de evento a un chainhook existente, puedes obtener la definición actual, modificarla y luego actualizarla. +Para agregar un nuevo filtro de eventos a un chainhook existente, puedes obtener la definición actual, modificarla, y luego actualizarla. ```typescript -nc // ✅ Good: Fetch first diff --git a/content/docs/es/tools/chainhooks/(overview)/faq.mdx b/content/docs/es/tools/chainhooks/(overview)/faq.mdx index 93679ea4c..a97a549a2 100644 --- a/content/docs/es/tools/chainhooks/(overview)/faq.mdx +++ b/content/docs/es/tools/chainhooks/(overview)/faq.mdx @@ -1,20 +1,20 @@ --- -title: Preguntas Frecuentes -description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) +title: FAQ +description: Preguntas frecuentes sobre Chainhooks 2.0 (Beta) --- -## Chainhook 2.0 (Beta) +## Chainhooks 2.0 (Beta) - ¿Cuál es el objetivo/propósito del Chainhook 2.0 (Beta)? + ¿Cuál es el objetivo/propósito de Chainhooks 2.0 (Beta)? Nuestro objetivo durante la Beta es aprender tanto como sea posible sobre la confiabilidad, rendimiento y experiencia del desarrollador de Chainhooks 2.0 en anticipación del lanzamiento completo. Si encuentras algún problema, tienes alguna pregunta, o te gustaría compartir comentarios durante la Beta, por favor contacta a [beta@hiro.so](mailto\:beta@hiro.so). - - ¿Es gratuito el Chainhook 2.0 (Beta)? + + ¿El Chainhooks 2.0 (Beta) es gratuito? ¡Sí! La Beta de Chainhooks 2.0 es gratuita para todos los participantes. @@ -25,15 +25,15 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) ¿Habrá configuración o límites de velocidad impuestos durante la Beta? - Todos los usuarios Beta estarán inicialmente limitados a un máximo de 10 configuraciones de Chainhook. + Todos los usuarios Beta estarán inicialmente limitados a un máximo de 10 configuraciones de Chainhooks. - ¿Cómo se establecerá el precio de Chainhooks después de la Beta? + ¿Cómo se establecerán los precios de Chainhooks después de la Beta? - Chainhooks será facturado usando un modelo de crédito por cada entrega, con usuarios capaces de seleccionar diferentes límites de crédito dependiendo de su uso. Para usuarios de Chainhooks 2.0 Beta, sus límites post-beta serán inicialmente determinados por su nivel de suscripción Hiro existente. + Los Chainhooks se cobrarán utilizando un modelo de créditos por cada entrega, permitiendo a los usuarios seleccionar diferentes límites de crédito según su uso. Para los usuarios de Chainhooks 2.0 Beta, sus límites post-beta serán determinados inicialmente por su nivel de suscripción existente en Hiro. @@ -42,7 +42,7 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) - ¿Qué pasará con los Chainhooks heredados existentes que ejecutan en v1.0? + ¿Qué pasará con los Chainhooks heredados existentes que se ejecutan en v1.0? Los usuarios con Chainhooks ejecutándose en v1.0 aún podrán verlos y recibir entregas, pero una vez que se lance la beta, todos los nuevos Chainhooks creados en la Plataforma se ejecutarán en v2.0. @@ -61,7 +61,7 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) En la Plataforma, los chainhooks v1 son de solo lectura. Puedes verlos y continuarán entregando eventos, pero no puedes modificarlos a través de la interfaz de usuario de la Plataforma. - Para modificar v1 chainhooks programáticamente, usa el [API de Plataforma](/apis/platform-api). Sin embargo, recomendamos migrar a chainhooks v2 en su lugar. Consulte el [Guía de Migración](/tools/chainhooks/migration) para un tutorial completo. + Para modificar v1 chainhooks programáticamente, usa el [API de Plataforma](/apis/platform-api). Sin embargo, recomendamos migrar a chainhooks v2 en su lugar. Ver el [Guía de Migración](/tools/chainhooks/migration) para un tutorial completo. @@ -78,38 +78,38 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) - ¿Puedo editar mis v2 Chainhooks? + ¿Puedo editar mis Chainhooks v2? - ¡Sí! puedes editar tus Chainhooks v2 usando el [SDK de Chainhook](/tools/chainhooks/update) o [API de Chainhook](/apis/chainhooks-api). La Plataforma actualmente no admite la edición de Chainhooks v2. + ¡Sí! puedes editar tus Chainhooks v2 usando el [SDK de Chainhooks](/tools/chainhooks/update) o [API de Chainhooks](/apis/chainhooks-api). La Plataforma actualmente no admite la edición de v2 Chainhooks. -## Preguntas Comunes +## Preguntas Frecuentes ¿Puedo filtrar por múltiples tipos de eventos? - ¡Sí! Ve ejemplos en el [Referencia de filtros](/tools/chainhooks/reference/filters#combining-filters) guía para ejemplos de combinación de filtros. + ¡Sí! Ver ejemplos en el [Referencia de filtros](/tools/chainhooks/reference/filters#combining-filters) guía para ejemplos de combinación de filtros. - - ¿Qué pasa si mi endpoint de webhook no funciona? + + ¿Qué pasa si mi endpoint de webhook está inactivo? - Chainhook volverá a intentar las entregas de webhook y luego "pausará" tu Chainhook, dándote tiempo para solucionar el problema y reactivarlo. Un tiempo de inactividad prolongado puede resultar en eventos perdidos, pero puedes usar el [Evaluar](/tools/chainhooks/evaluate) función para reproducir bloques perdidos. + Chainhooks reintentará las entregas de webhook y luego "pausará" sus Chainhooks, dándole tiempo para solucionar el problema y volver a habilitarlos. El tiempo de inactividad prolongado puede resultar en eventos perdidos, pero puede usar el [Evaluar](/tools/chainhooks/evaluate) funcionalidad para reproducir bloques perdidos. - + ¿Puedo probar chainhooks localmente? - Actualmente, no. Pero estamos trabajando en una nueva función que te ayudará a probar rápidamente los payloads de chainhook localmente sin requerir mucha configuración. + Actualmente, no. Pero estamos trabajando en una nueva función que te ayudará a probar rápidamente las cargas útiles de chainhook localmente sin requerir mucha configuración. @@ -118,10 +118,8 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) ## Dónde Obtener Ayuda -* **Discord**: Únete al **#chainhook** canal activado [Discord](https://stacks.chat/) bajo Hiro Developer Tools -* **Soporte por Correo Electrónico**I notice that you've provided only a colon ":" as the text to translate. Since there's no actual content to translate, I'll return the same: - - : [beta@hiro.so](mailto\:beta@hiro.so) +* **Discord**: Únete al **#chainhook** canal encendido [Discord](https://stacks.chat/) bajo Hiro Developer Tools +* **Soporte por Email**: [beta@hiro.so](mailto\:beta@hiro.so) *** @@ -129,5 +127,5 @@ description: Preguntas frecuentes sobre Chainhook 2.0 (Beta) :::next-steps * [Crear chainhooks](/tools/chainhooks/create): Registrar y habilitar chainhooks -* [Anatomía del payload](/tools/chainhooks/payload-anatomy): Sumérgete en la anatomía de una carga útil de chainhook +* [Anatomía del payload](/tools/chainhooks/reference/payload-anatomy): Sumérgete en la anatomía de una carga útil de chainhook ::: diff --git a/content/docs/es/tools/chainhooks/(overview)/migration.mdx b/content/docs/es/tools/chainhooks/(overview)/migration.mdx index 7867c73bb..cada98c2a 100644 --- a/content/docs/es/tools/chainhooks/(overview)/migration.mdx +++ b/content/docs/es/tools/chainhooks/(overview)/migration.mdx @@ -5,28 +5,28 @@ description: Guía para migrar chainhooks heredados a v2 :::callout ### Gestión de chainhooks v1 -Los chainhooks heredados v1 permanecen de solo lectura en la UI de la Plataforma, pero los gestionas a través del [API de Plataforma](/apis/platform-api/reference/chainhooks/list). +Los chainhooks legacy v1 permanecen de solo lectura en la interfaz de usuario de la plataforma, pero puedes gestionarlos a través del [API de Plataforma](/apis/platform-api/reference/chainhooks/list). ::: ## Qué aprenderás :::objectives -* Captura y analiza todos los chainhooks v1 existentes. -* Convertir filtros basados en predicados en definiciones explícitas de eventos v2. -* Registra chainhooks v2, prueba la entrega y retira los originales de forma segura. +* Capturar y analizar todos los chainhooks v1 existentes. +* Convertir filtros basados en predicados en definiciones de eventos v2 explícitas. +* Registrar chainhooks v2, probar la entrega y retirar los originales de forma segura. ::: ## Requisitos previos :::prerequisites -* Clave API de Hiro para acceso tanto a la API de la Plataforma como a la API de Chainhook. +* Clave API de Hiro para acceso tanto a la Plataforma como a la API de Chainhooks. ::: ### Obtener una lista de chainhooks v1 - Utiliza la API de la plataforma para obtener los chainhooks que deseas migrar. + Usa la API de la Plataforma para obtener los chainhooks que quieres migrar. ```ts index.ts -c const response = await fetch(`https://api.platform.hiro.so/v1/ext/${process.env.HIRO_API_KEY}/chainhooks`, { @@ -42,14 +42,16 @@ Los chainhooks heredados v1 permanecen de solo lectura en la UI de la Plataforma ### Comenzar a mapear al nuevo formato v2 - Traduce las estructuras v1 a formatos v2 antes de crear nuevos hooks. La siguiente tabla muestra la correspondencia entre las estructuras v1 y v2: + Traduce las estructuras v1 a formatos v2 antes de crear nuevos hooks. La siguiente tabla muestra el mapeo entre las estructuras v1 y v2: | v1 | v2 | Notes | |------------|-----------|-------| - | `if_this.scope` I don't see any text to translate in your message. You've provided the rules and formatting requirements, but the actual text content appears to be missing after "Text to translate:" - there's only a "|" symbol. + | `if_this.scope` I don't see any text to translate in your message. You've provided detailed translation rules but no actual content to translate from English to Spanish. Please provide the text you'd like me to translate. `filters.events[].type` | Reemplazar `scope/action` combos con un solo tipo de evento. | + | `if_this.actions` | `type` I notice that you've provided the translation rules and instructions, but the actual text to translate appears to be just a single vertical bar "|" character. - Please provide the text you'd like me to translate from English to Spanish, and I'll follow all the rules you've specified. `filters.events[].type` | Reemplazar `scope/action` combos con un solo tipo de evento. | - | `if_this.actions` | `type` | `transfer` se mapea a `*_transfer`. | + Since this is just a formatting character and not text content, the translation would be: + + | `transfer` se asigna a `*_transfer`. | | `then_that.http_post.url` | `action.url` | v2 maneja secretos automáticamente. | | `networks.mainnet` | `network: "mainnet"` | Crea un hook v2 por red. | | `authorization_header` | Gestión de secretos de webhook | Usar `rotateConsumerSecret()` después del registro. | @@ -208,33 +210,28 @@ Los chainhooks heredados v1 permanecen de solo lectura en la UI de la Plataforma -## Referencia de filtros +## Referencia de filtro ### Ámbitos comunes | v1 | Acciones Típicas | v2 | Extras | |----------|-----------------|-----------|--------| -| `stx_event` | `transfer` I don't see any text to translate in your message. You've provided the critical rules and formatting instructions, but the actual text content appears to be missing after "Text to translate:" - there's only a vertical bar "|" character. +| `stx_event` I notice that you've provided the translation rules but the actual text to translate appears to be just a single vertical bar "|". -Could you please provide the text you'd like me to translate from English to Spanish? `stx_transfer` | Incluir `sender` o `recipient` filtros según sea necesario. | -| `contract_call` | n/a | `contract_call` | Añadir `contract_identifier` y `function_name`. | -| `ft_event` | `transfer` I notice that you've provided the critical rules for translation, but the actual text to translate appears to be missing or incomplete. You've only provided a single vertical bar "|" after "Text to translate:". +| `transfer` | `stx_transfer` | Incluir `sender` o `recipient` filtros según sea necesario. | +| `contract_call` | n/a | `contract_call` | Agregar `contract_identifier` y `function_name`. | +| `ft_event` | `transfer` I don't see any text provided to translate. Could you please share the text you'd like me to translate from English to Spanish? `ft_transfer` | Especificar `asset_identifier`. | +| `nft_event` I notice that you've provided the translation rules but the actual text to translate appears to be just a single vertical bar "|". -Could you please provide the complete text that you'd like me to translate from English to Spanish? I'm ready to follow all the rules you've specified: -\- Keep "---" exactly as is -\- Don't translate field names like "title:", "description:", etc. -\- Only translate the values after colons -\- Preserve all formatting -\- Keep "Clarinet", "Stacks", and "Clarity" untranslated +| `transfer`, `mint` I notice that you've provided the translation rules but the actual text to translate appears to be just a single vertical bar "|". -Once you provide the full text, I'll return only the translated version following your guidelines. `ft_transfer` | Especificar `asset_identifier`. | -| `nft_event` | `transfer`, `mint` I don't see any text to translate. You've provided the translation rules but the actual text content appears to be missing after "Text to translate:" - there's only a "|" character. Please provide the text you'd like me to translate from English to Spanish. `nft_transfer` · `nft_mint` | Proporcionar `asset_identifier`. | +| `nft_transfer` · `nft_mint` | Proporcionar `asset_identifier`. | Para más detalles, consulta el [Filtros](/tools/chainhooks/reference/filters) página de referencia. ## Próximos pasos :::next-steps -* [FAQ](/tools/chainhooks/faq): FAQ de Chainhook 2.0 (Beta) +* [FAQ](/tools/chainhooks/faq): FAQ de Chainhooks 2.0 (Beta) * [Referencia de Filtros](/tools/chainhooks/reference/filters): Referencia de Filtros ::: diff --git a/content/docs/es/tools/chainhooks/(overview)/quickstart.mdx b/content/docs/es/tools/chainhooks/(overview)/quickstart.mdx deleted file mode 100644 index ec0ce632a..000000000 --- a/content/docs/es/tools/chainhooks/(overview)/quickstart.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Inicio rápido -description: En esta guía, crearás tu primer predicado Chainhook para monitorear transferencias de STX en la blockchain de Stacks. ---- -## Lo que aprenderás - -:::objectives -* Cómo crear un predicado Chainhook para rastrear transferencias de STX -* Cómo escanear datos históricos de blockchain utilizando Chainhook -::: - -## Requisitos previos - -:::prerequisites -* Para instrucciones de instalación, visite el [Guía de instalación de Chainhook](/tools/chainhooks#installation). -::: - -## Inicio rápido - - - - ### Generar un archivo de predicado - - Chainhook utiliza predicados para definir qué eventos de la cadena de bloques se deben rastrear. Genere un archivo de predicado de plantilla: - - ```terminal - $ chainhook predicates new stx-transfer.json --stacks - ``` - - Esto crea un archivo JSON de plantilla con la estructura básica del predicado. El `--stacks` flag especifica que estás rastreando eventos de Stacks (usa `--bitcoin` para Bitcoin). - - - - ### Configurar el seguimiento de eventos - - Abrir `stx-transfer.json` y actualizar el `if_this` sección para rastrear eventos de transferencia de STX: - - ```json stx-transfer.json - { - "chain": "stacks", - "uuid": "87ac9bff-1052-4d02-9c79-3768a6f08a09", - "name": "STX Transfer", - "version": 1, - "networks": { - "mainnet": { - "start_block": 154670, - "if_this": { - "scope": "stx_event", - "actions": ["transfer"] - }, - "then_that": { - "file_append": { - "path": "stx-transfers.txt" - } - } - } - } - } - ``` - - Este predicado: - - * Rastrea todos los eventos de transferencia de STX (`scope: "stx_event"`, `actions: ["transfer"]`) - * Comience a escanear desde el bloque 154670 - * Agregar eventos coincidentes a `stx-transfers.txt` - - - - ### Escanear eventos - - Ejecute el comando de escaneo para buscar datos históricos de la cadena de bloques: - - ```terminal - $ chainhook predicates scan stx-transfer.json --mainnet - ``` - - :::callout - El primero `scan` descarga un archivo de estado de cadena desde el Archivo Hiro. Los escaneos posteriores utilizan los datos almacenados en caché para un rendimiento más rápido. - ::: - - - - ### Ver resultados - - Verifique el archivo de salida para ver los eventos de transferencia: - - ```terminal - $ head -5 stx-transfers.txt - ``` - - Cada línea contiene una carga útil JSON con detalles de transferencia que incluyen remitente, destinatario, cantidad e información del bloque. - - - -## Próximos pasos - -:::next-steps -* [Diseñar predicados personalizados](/tools/chainhooks/usage): Aprende a crear predicados para llamadas de contratos, transferencias de NFT y más -* [Ejecutar Chainhook como un servicio](/tools/chainhooks/service-mode): Configurar monitoreo continuo de blockchain con entrega por webhook -::: diff --git a/content/docs/es/tools/chainhooks/(overview)/usage.mdx b/content/docs/es/tools/chainhooks/(overview)/usage.mdx deleted file mode 100644 index 90303c321..000000000 --- a/content/docs/es/tools/chainhooks/(overview)/usage.mdx +++ /dev/null @@ -1,264 +0,0 @@ ---- -title: Ejemplos de uso -sidebarTitle: Uso -description: Aprende la funcionalidad central de Chainhook a través de ejemplos prácticos - predicados, ámbitos de eventos, manejo de reorganizaciones y modos de operación. ---- -## Predicados - -Los predicados son especificaciones JSON que indican a Chainhook qué eventos de blockchain monitorear y cómo responder. Siguen un patrón de si-esto-entonces-aquello. - -```json stx-transfer-predicate.json -{ - "chain": "stacks", - "uuid": "1", - "name": "Monitor STX Transfers", - "version": 1, - "networks": { - "mainnet": { - "if_this": { - "scope": "stx_event", - "actions": ["transfer"] - }, - "then_that": { - "http_post": { - "url": "https://api.example.com/stx-transfers", - "authorization_header": "Bearer secret-token" - } - }, - "start_block": 100000 - } - } -} -``` - -Este predicado monitorea todos los eventos de transferencia de STX a partir del bloque 100,000 y los envía a tu punto final de webhook. - -### Componentes del predicado - -```json -{ - "chain": "bitcoin", // Target blockchain: "bitcoin" or "stacks" - "uuid": "unique-id-123", // Unique identifier for tracking - "name": "My Bitcoin Monitor", // Human-readable name - "version": 1, // Predicate version - "networks": { // Network-specific configurations - "mainnet": { ... }, - "testnet": { ... } - } -} -``` - -## Ámbitos de eventos - -Cada blockchain admite diferentes tipos de eventos. Los ámbitos definen qué eventos específicos coincidirán con tu predicado. - -### Eventos de Stacks - -```json contract-call-predicate.json -{ - "if_this": { - "scope": "contract_call", - "contract_identifier": "SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.arkadiko-oracle-v2-3", - "method": "update-price" - } -} -``` - -Monitorea llamadas a funciones específicas de contratos. Ámbitos de Stacks disponibles: - -* `stx_event` - Transferencias de STX, acuñaciones, quemas -* `contract_call` - Llamadas a funciones de contratos inteligentes -* `contract_deployment` - Nuevos despliegues de contratos -* `print_event` - Declaraciones de impresión del contrato -* `ft_event` - Operaciones de tokens fungibles -* `nft_event` - Operaciones de tokens no fungibles - -### Eventos de Bitcoin - -```json bitcoin-ordinals-predicate.json -{ - "if_this": { - "scope": "ordinals_protocol", - "operation": "inscription_feed" - } -} -``` - -Rastrea inscripciones ordinales de Bitcoin. Ámbitos de Bitcoin disponibles: - -* `p2pkh`, `p2sh`, `p2wpkh`, `p2tr` - Tipos de dirección -* `ordinals_protocol` - Inscripciones ordinales -* `stacks_protocol` - Operaciones de Bitcoin específicas de Stacks - -## Manejadores de acciones - -Define cómo Chainhook responde cuando los eventos coinciden con tus criterios de predicado. - -### Entrega de webhook - -```json webhook-config.json -{ - "then_that": { - "http_post": { - "url": "https://api.myapp.com/events", - "authorization_header": "Bearer ${WEBHOOK_SECRET}" - } - } -} -``` - -Chainhook envía eventos coincidentes a tu endpoint mediante POST con el encabezado de autorización. - -### Salida de archivo - -```json file-output-config.json -{ - "then_that": { - "file_append": { - "path": "/data/blockchain-events.jsonl" - } - } -} -``` - -Agregar eventos a un archivo local, un objeto JSON por línea. - -## Reorganizaciones de blockchain - -Chainhook maneja automáticamente las reorganizaciones de la cadena de bloques (reorgs) enviando eventos tanto de retroceso como de aplicación. - -```json reorg-event.json -{ - "apply": [ - { - "block_identifier": { - "index": 792101, - "hash": "0x123..." - }, - "transactions": [ - // New canonical chain transactions - ] - } - ], - "rollback": [ - { - "block_identifier": { - "index": 792100, - "hash": "0x456..." - }, - "transactions": [ - // Transactions to rollback - ] - } - ] -} -``` - -Su aplicación debe manejar ambos tipos de eventos para mantener la consistencia de los datos durante las reorganizaciones. - -### Manejo de eventos de reorganización - -```typescript webhook-handler.ts -app.post('/chainhook-events', (req, res) => { - const { apply, rollback } = req.body; - - // First, rollback orphaned transactions - if (rollback) { - for (const block of rollback) { - await removeTransactions(block.transactions); - } - } - - // Then apply new canonical transactions - if (apply) { - for (const block of apply) { - await processTransactions(block.transactions); - } - } - - res.status(200).send('OK'); -}); -``` - -## Modos de operación - -Chainhook opera en dos modos principales según su caso de uso. - -### Modo de escaneo - -Analiza datos históricos de blockchain escaneando bloques archivados: - -```terminal -$ chainhook predicates scan my-predicate.json --mainnet -``` - -Utiliza el modo de escaneo para: - -* Probando predicados antes del despliegue -* Analizando eventos pasados de blockchain -* Rellenando datos históricos - -### Modo de servicio - -Monitorea eventos de blockchain en vivo en tiempo real: - -```terminal -$ chainhook service start --config-path=config.toml -``` - -```toml config.toml -[http_api] -http_port = 20456 -database_uri = "redis://localhost:6379" - -[network] -mode = "mainnet" -bitcoind_rpc_url = "http://localhost:8332" -stacks_node_rpc_url = "http://localhost:20443" -``` - -El modo de servicio mantiene conexiones persistentes con los nodos de la cadena de bloques y procesa nuevos bloques a medida que llegan. - -## Configuración de red - -Configura los predicados de manera diferente para cada entorno de red: - -```json multi-network-predicate.json -{ - "networks": { - "mainnet": { - "start_block": 100000, - "if_this": { - "scope": "stx_event", - "actions": ["transfer", "mint"] - } - }, - "testnet": { - "start_block": 1, - "decode_clarity_values": true, - "include_proof": true, - "if_this": { - "scope": "print_event" - } - } - } -} -``` - -### Opciones de configuración - -```json -{ - "start_block": 100000, // Begin scanning from this block - "end_block": 200000, // Stop at this block (optional) - "expire_after_occurrence": 5000, // Stop after N matches - "decode_clarity_values": true, // Decode Clarity data types - "include_proof": false, // Include merkle proofs - "include_contract_abi": true // Include contract interfaces -} -``` - -## Lecturas adicionales - -* [Diseñar predicados](/tools/chainhooks/usage) -* [Ejecutar Chainhook como un servicio](/tools/chainhooks/service-mode) diff --git a/content/docs/es/tools/chainhooks/(platform-usage)/platform-usage.mdx b/content/docs/es/tools/chainhooks/(platform-usage)/platform-usage.mdx index c4deebe1d..ee35d8e03 100644 --- a/content/docs/es/tools/chainhooks/(platform-usage)/platform-usage.mdx +++ b/content/docs/es/tools/chainhooks/(platform-usage)/platform-usage.mdx @@ -1,46 +1,46 @@ --- title: Uso de la Plataforma -description: Gestione los chainhooks visualmente con la interfaz web de Hiro Platform +description: Administra chainhooks visualmente con la interfaz web de la Plataforma Hiro --- -## Resumen +## Descripción general La Plataforma Hiro proporciona una interfaz basada en web para gestionar chainhooks sin escribir código. -| Característica | IU de Plataforma | SDK de Chainhook | +| Característica | Interfaz de plataforma | Chainhooks SDK | |---------|------------|---------------| | Crear chainhooks | ✓ Constructor visual | ✓ Programático | | Ver estado y actividad | ✓ Vista de panel | ✓ Llamadas API | -| Gestionar claves API | ✓ Gestión de IU | - | -| Editar chainhooks | - | ✓ Control completo | +| Gestionar claves API | ✓ Gestión de interfaz | - | +| Editar chainhooks | - | ✓ Control total | | Automatización | - | ✓ Integración CI/CD | | Comenzar rápidamente | ✓ No se necesita código | Requiere configuración | ## Cuándo Usar la Interfaz de Usuario de la Plataforma -**Elige la Platform UI cuando:** +**Elige la UI de la Plataforma cuando:** -* Quieres crear chainhooks visualmente sin código -* Necesita ver el estado y actividad de chainhook en un panel de control +* Quiere crear chainhooks visualmente sin código +* Necesita ver el estado y la actividad del chainhook en un panel de control * Están gestionando claves de API -* Quiere empezar rápidamente +* Quieres empezar rápidamente -**Elige el [SDK de Chainhook](/tools/chainhooks/chainhook-sdk) cuando tú:** +**I don't see any text to translate after "Start with the". Could you please provide the complete text you'd like me to translate from English to Spanish? [Introducción al SDK de Chainhooks](/tools/chainhooks/introduction) cuando tú:** -* Necesito editar chainhooks existentes (no disponible en la interfaz de la plataforma) +* Necesita editar chainhooks existentes (no disponible en la interfaz de usuario de la Plataforma) * Quiere automatizar las operaciones de chainhook -* Estás integrando la gestión de chainhook en tu aplicación -* Gestionar chainhooks programáticamente a escala +* Están integrando la gestión de chainhook en su aplicación +* Administrar chainhooks programáticamente a escala ## Accediendo a la Plataforma ### Iniciar Sesión 1. Visitar [platform.hiro.so](https://platform.hiro.so) -2. Iniciar sesión con tu cuenta -3. Navegar a la sección Chainhooks +2. Inicia sesión con tu cuenta +3. Navega a la sección de Chainhooks :::callout -Si no tienes una cuenta, regístrate en [platform.hiro.so](https://platform.hiro.so) para comenzar. +Si no tienes una cuenta, regístrate en [platform.hiro.so](https://platform.hiro.so) para empezar. ::: ### Características de la Plataforma @@ -48,13 +48,13 @@ Si no tienes una cuenta, regístrate en [platform.hiro.so](https://platform.hiro La interfaz de usuario de la plataforma proporciona: * **Constructor visual de chainhook** - Crear chainhooks con entradas de formulario y menús desplegables -* **Panel de actividad** - Monitorear el estado del chainhook y conteos de activadores -* **Gestión de claves de API** - Generar y rotar claves API +* **Panel de actividad** - Monitorear el estado de chainhook y los conteos de activación +* **Gestión de claves API** - Generar y rotar claves API * **Pruebas de webhook** - Prueba tus endpoints de webhook -## Próximos Pasos +## Siguientes Pasos :::next-steps * [Inicio Rápido de la Plataforma](/tools/chainhooks/platform-quickstart): Crea tu primer chainhook en minutos -* [Crear y Habilitar Chainhooks](/tools/chainhooks/create-enable-chainhooks): Aprende cómo configurar chainhooks en la UI +* [Crear y Habilitar Chainhooks](/tools/chainhooks/create-enable-chainhooks): Aprende cómo configurar chainhooks en la interfaz de usuario ::: diff --git a/content/docs/es/tools/chainhooks/index.mdx b/content/docs/es/tools/chainhooks/index.mdx index 692672aaa..1b173ce68 100644 --- a/content/docs/es/tools/chainhooks/index.mdx +++ b/content/docs/es/tools/chainhooks/index.mdx @@ -1,44 +1,44 @@ --- -title: Chainhook +title: Chainhooks sidebarTitle: Descripción general -description: Chainhook es un servicio de webhook para la blockchain de Stacks que te permite registrar flujos de eventos y definir filtros precisos para capturar datos en cadena mientras ocurren. +description: Chainhooks es un servicio de webhook para la blockchain de Stacks que te permite registrar flujos de eventos y definir filtros precisos para capturar datos en cadena mientras ocurren. llm: false --- :::callout type: warn -### Chainhook 2.0 (Beta) +### Chainhooks 2.0 (Beta) -Chainhook está actualmente en beta. Si encuentras problemas o tienes comentarios, por favor ponte en contacto con [beta@hiro.so](mailto\:beta@hiro.so). +Chainhooks está actualmente en beta. Si encuentras problemas o tienes comentarios, por favor contacta con [beta@hiro.so](mailto\:beta@hiro.so). ::: -## Descripción general +## Resumen -Chainhook facilita la suscripción a la actividad de blockchain en Stacks mediante el registro de flujos de eventos, filtrando exactamente los datos que te importan y enviándolos directamente a tu aplicación en tiempo real. +Chainhooks facilita la suscripción a la actividad de blockchain en Stacks registrando flujos de eventos, filtrando exactamente los datos que te interesan, y enviándolos directamente a tu aplicación en tiempo real. -Con Chainhook 2.0 (Beta), puedes gestionar chainhooks a través de: +Con Chainhooks 2.0 (Beta), puedes gestionar chainhooks a través de: -* **[SDK Chainhook](/tools/chainhooks/introduction)** - Cliente TypeScript/JavaScript para gestión programática -* **[Plataforma Hiro](https://platform.hiro.so)** - UI basada en web para la creación visual de chainhook -* **[API de Chainhook](/apis/chainhooks-api)** - Direct REST API access +* **[SDK de Chainhooks](/tools/chainhooks/introduction)** - Cliente TypeScript/JavaScript para gestión programática +* **[Plataforma Hiro](https://platform.hiro.so)** - Interfaz de usuario web para la creación visual de chainhooks +* **[API de Chainhooks](/apis/chainhooks-api)** - Direct REST API access ## Características Clave -* **Indexación consciente de reorganización** - Maneja automáticamente bifurcaciones y reorganizaciones de blockchain +* **Indexación consciente de reorganización** - Maneja automáticamente las bifurcaciones y reorganizaciones de blockchain * **Filtrado de eventos** - Define lógica personalizada para activar acciones en eventos específicos de blockchain * **Evaluación histórica** - Probar chainhooks contra bloques pasados para indexación o depuración ## Próximos pasos :::next-steps -* [Introducción al SDK](/tools/chainhooks/introduction): Comience con el SDK de Chainhook -* [Guía de migración](/tools/chainhooks/migration): Guía de migración para actualizar a Chainhook 2.0 (Beta) +* [Introducción del SDK](/tools/chainhooks/introduction): Comienza con el SDK de Chainhooks +* [Guía de migración](/tools/chainhooks/migration): Guía de migración para actualizar a Chainhooks 2.0 (Beta) ::: :::callout type: help -### ¿Necesitas ayuda con Chainhook? +### ¿Necesitas ayuda con Chainhooks? -Contáctanos en el #chainhook canal en [Discord](https://stacks.chat/) bajo la sección Hiro Developer Tools. +Contáctanos en el #chainhook canal encendido [Discord](https://stacks.chat/) bajo la sección Hiro Developer Tools. ::: diff --git a/content/docs/es/tools/chainhooks/reference/filters.mdx b/content/docs/es/tools/chainhooks/reference/filters.mdx index eb04f40ed..26189b928 100644 --- a/content/docs/es/tools/chainhooks/reference/filters.mdx +++ b/content/docs/es/tools/chainhooks/reference/filters.mdx @@ -1,34 +1,34 @@ --- title: Filtros -description: Referencia completa para todos los tipos de filtros de Chainhook +description: Referencia completa para todos los tipos de filtros de Chainhooks --- Los filtros definen qué eventos de blockchain activarán tu chainhook. -Aquí tienes una referencia completa para todos los tipos de filtros de Chainhook: +Aquí tienes una referencia completa para todos los tipos de filtros de Chainhooks: -| Filtro | Cuándo usar | +| Filter | Cuándo usar | |--------|-------------| -| `ft_event` | Capturar *cada* transferencia, acuñación o quema SIP-010 entre activos. | -| `ft_transfer` | Follow a single asset such as USDC; optionally add `sender`/`receiver` para activadores a nivel de billetera. | -| `ft_mint` | Seguimiento de expansiones de suministro o flujos de entrada de puente para un activo (configurar `asset_identifier`). | -| `ft_burn` | Rastrea redenciones o contracciones de suministro para un activo (conjunto `asset_identifier`). | -| `nft_event` | Supervisa cada transferencia, acuñación o quema para todas las colecciones. | -| `nft_transfer` | Sigue una colección SIP-009; añadir `sender`, `receiver`, o `value` para dirigirse a propietario/token. | -| `nft_mint` | Ve cada nueva acuñación para una colección (conjunto `asset_identifier`). | -| `nft_burn` | Capturar quemas o canjes (establecer `asset_identifier`). | +| `ft_event` | Capturar *cada* SIP-010 transferir, acuñar o quemar a través de activos. | +| `ft_transfer` | Follow a single asset such as USDC; optionally add `sender`/`receiver` para disparadores a nivel de cartera. | +| `ft_mint` | Rastrea expansiones de suministro o flujos de entrada del puente para un activo (establecer `asset_identifier`). | +| `ft_burn` | Rastrea canjes o contracciones de suministro para un activo (conjunto `asset_identifier`). | +| `nft_event` | Monitorear cada transferencia, acuñación o quema para todas las colecciones. | +| `nft_transfer` | Seguir una colección SIP-009; agregar `sender`, `receiver`, o `value` para la orientación propietario/token. | +| `nft_mint` | Observa cada nuevo mint para una colección (establecer `asset_identifier`). | +| `nft_burn` | Detectar quemaduras o canjes (set `asset_identifier`). | | `stx_event` | Captura todas las transferencias nativas, acuñaciones o quemas. | -| `stx_transfer` | Rastrea cada transferencia de STX; añade `sender` o `receiver` para destacar directores específicos. | +| `stx_transfer` | Rastrea cada transferencia de STX; agrega `sender` o `receiver` para destacar directores específicos. | | `contract_deploy` | Reacciona a nuevos contratos que ingresan a la red. | | `contract_call` | Observa cada invocación; reduce con `contract_identifier` y `function_name`. | -| `contract_log` | Capturar `print`salida de /log de un contrato (establecer `contract_identifier`). | -| `coinbase` | Observa las recompensas de los mineros llegando a la cadena. | -| `tenure_change` | Seguir las actualizaciones de tenencia de Proof-of-Transfer; agregar `cause` I don't see any text provided to translate. Could you please share the text you'd like me to translate from English to Spanish?`"block_found"` o `"extended"`) para especificidad. | +| `contract_log` | Capturar `print`/log output desde un contrato (set `contract_identifier`). | +| `coinbase` | Observa las recompensas del minero llegando a la cadena. | +| `tenure_change` | Seguimiento de las actualizaciones de tenencia de Proof-of-Transfer; agregar `cause` I don't see any text provided to translate. Please provide the text you'd like me to translate from English to Spanish, and I'll follow the critical rules you've outlined.`"block_found"` o `"extended"`) para especificidad. | ## Eventos de Tokens Fungibles (FT) ### Cualquier Evento FT -Coincide con cualquier evento de token fungible (transferencia, quema o acuñación): +Coincidir con cualquier evento de token fungible (transferencia, quema o acuñación): ```json { @@ -38,7 +38,7 @@ Coincide con cualquier evento de token fungible (transferencia, quema o acuñaci ### Transferencia FT -Coincidir transferencias FT para un activo específico: +Emparejar transferencias FT para un activo específico: ```json { @@ -70,9 +70,9 @@ Filtrar por receptor: } ``` -### Acuñación FT +### FT Mint -Coincidir eventos de mint de FT: +Coincidir eventos de acuñación FT: ```json { @@ -81,9 +81,9 @@ Coincidir eventos de mint de FT: } ``` -### FT Burn +### Quemado de FT -Hacer coincidir eventos de quema de FT: +Emparejar eventos de quema de FT: ```json { @@ -94,7 +94,7 @@ Hacer coincidir eventos de quema de FT: *** -## Eventos de Token No Fungible (NFT) +## Eventos de Tokens No Fungibles (NFT) ### Cualquier Evento NFT @@ -108,7 +108,7 @@ Coincidir con cualquier evento NFT (transferencia, quema o acuñación): ### Transferencia de NFT -Coincide con las transferencias de NFT para una colección específica: +Hacer coincidir transferencias de NFT para una colección específica: ```json { @@ -162,9 +162,9 @@ Coincidir eventos de mint de NFT: } ``` -### Quema de NFT +### NFT Quemado -Eventos de quemado de NFT coincidentes: +Coincidir eventos de quema de NFT: ```json { @@ -179,7 +179,7 @@ Eventos de quemado de NFT coincidentes: ### Cualquier Evento STX -Coincidir con cualquier evento de STX (transferencia, quema o acuñación): +Coincidir con cualquier evento STX (transferencia, quema o acuñación): ```json { @@ -223,7 +223,7 @@ Filtrar por receptor: ### Despliegue de Contrato -Coincidir con cualquier despliegue de contrato: +Coincida con cualquier despliegue de contrato: ```json { @@ -231,7 +231,7 @@ Coincidir con cualquier despliegue de contrato: } ``` -Filtrar por desplegador: +Filtrar por implementador: ```json { @@ -243,7 +243,7 @@ Filtrar por desplegador: ### Llamada de Contrato -Coincide con cualquier llamada de contrato: +Coincidir con cualquier llamada de contrato: ```json { @@ -294,7 +294,7 @@ Coincidir con cualquier evento de impresión: } ``` -Coincide con eventos de impresión de contratos: +Coincide con eventos de impresión de contrato: ```json { @@ -321,7 +321,7 @@ Filtrar por remitente de transacción: ### Coinbase -Coincidir con eventos de coinbase (recompensas de bloque): +Coincidir eventos de coinbase (recompensas de bloque): ```json { @@ -331,7 +331,7 @@ Coincidir con eventos de coinbase (recompensas de bloque): ### Cambio de Tenencia -Coincidir con cualquier cambio de permanencia: +Coincidir con cualquier cambio de tenencia: ```json { @@ -339,7 +339,7 @@ Coincidir con cualquier cambio de permanencia: } ``` -Coincidir cambios de tenencia por causa (bloque encontrado): +Coincidencias de cambios de tenencia por causa (bloque encontrado): ```json { @@ -349,7 +349,7 @@ Coincidir cambios de tenencia por causa (bloque encontrado): } ``` -Coincidir cambios de tenencia por causa (extendido): +Igualar cambios de tenencia por causa (extendido): ```json { @@ -363,7 +363,7 @@ Coincidir cambios de tenencia por causa (extendido): ## Combinando Filtros -Puedes combinar múltiples filtros en el `filters.events` matriz. Un chainhook se activará si **any** de los filtros coinciden: +Puedes combinar múltiples filtros en el `filters.events` arreglo. Un chainhook se activará si **any** de los filtros coinciden: ```json { diff --git a/content/docs/es/tools/chainhooks/reference/options.mdx b/content/docs/es/tools/chainhooks/reference/options.mdx index 3330c1518..d4e09121f 100644 --- a/content/docs/es/tools/chainhooks/reference/options.mdx +++ b/content/docs/es/tools/chainhooks/reference/options.mdx @@ -1,11 +1,11 @@ --- title: Opciones -description: Referencia completa para todas las opciones de configuración de Chainhook +description: Referencia completa para todas las opciones de configuración de Chainhooks --- -Las opciones controlan el enriquecimiento de carga útil y las ventanas de evaluación para tu chainhook. El `options` el campo es opcional y puede ser omitido o establecido en `null`. +Las opciones controlan el enriquecimiento de carga útil y las ventanas de evaluación para tu chainhook. El `options` el campo es opcional y puede omitirse o establecerse en `null`. :::callout -Todas las opciones booleanas tienen como valor predeterminado `false` si se omite. Las opciones enteras son opcionales. +Todas las opciones booleanas tienen como valor predeterminado `false` si se omite. Las opciones de enteros son opcionales. ::: *** @@ -15,24 +15,24 @@ Todas las opciones booleanas tienen como valor predeterminado `false` si se omit | Option | Type | Default | Description | |--------|------|---------|-------------| | `decode_clarity_values` | boolean | `false` | Incluir valores de Clarity legibles para humanos | -| `include_contract_abi` | boolean | `false` | Incluir ABI del contrato en despliegues | -| `include_contract_source_code` | boolean | `false` | Incluir código fuente en las implementaciones | +| `include_contract_abi` | boolean | `false` | Incluir ABI del contrato en los despliegues | +| `include_contract_source_code` | boolean | `false` | Incluir código fuente en despliegues | | `include_post_conditions` | boolean | `false` | Incluir post-condiciones en metadatos | | `include_raw_transactions` | boolean | `false` | Incluir hex de transacción sin procesar | -| `include_block_metadata` | boolean | `false` | Incluir metadatos de bloque (Stacks & Bitcoin) | +| `include_block_metadata` | boolean | `false` | Incluir metadatos de bloque (Stacks y Bitcoin) | | `include_block_signatures` | boolean | `false` | Incluir firmas de bloque y firmantes | | `enable_on_registration` | boolean | `false` | Habilitar chainhook inmediatamente al crearlo | | `expire_after_evaluations` | integer | ninguno | Expira después de N bloques evaluados | -| `expire_after_occurrences` | entero | ninguno | Expira después de N coincidencias | +| `expire_after_occurrences` | entero | ninguno | Expirar después de N coincidencias | ### decode\_clarity\_values Incluir legible para humanos `repr` (y tipos inferidos) junto a `hex` para argumentos, registros y resultados. -* **Tipo**I don't see any text to translate. You've provided the translation rules and instructions, but the actual text content appears to be missing after "Text to translate:" - there's only a colon (:) there. +* **Tipo**I notice you've provided the translation rules but the actual text to translate appears to be just a single colon ":". Since there's no content to translate, I'll return the same: - Could you please provide the actual text you'd like me to translate from English to Spanish? `boolean` -* **Default**: `false` + : `boolean` +* **Default**I notice that you've provided the translation rules but the actual text to translate appears to be just a colon ":" or is missing. Could you please provide the English text that you'd like me to translate to Spanish? I'm ready to follow all the rules you've specified regarding preserving "---", field names, and specific terms like Clarinet, Stacks, and Clarity. `false` ```json { @@ -46,7 +46,7 @@ Incluir legible para humanos `repr` (y tipos inferidos) junto a `hex` para argum ### include\_contract\_abi -Incluir el ABI del contrato en las operaciones de despliegue. Esto mejora el tipado de argumentos al decodificar. +Incluye el ABI del contrato en las operaciones de despliegue. Esto mejora el tipado de argumentos al decodificar. * **Tipo**: `boolean` * **Predeterminado**: `false` @@ -65,7 +65,7 @@ Incluir el ABI del contrato en las operaciones de despliegue. Esto mejora el tip Incluye el código fuente del contrato en las operaciones de despliegue. -* **Type**: `boolean` +* **Tipo**: `boolean` * **Predeterminado**: `false` ```json @@ -97,7 +97,7 @@ Incluir post-condiciones decodificadas en los metadatos de la transacción. ### include\_raw\_transactions -Incluir hex de transacción sin procesar en los metadatos de transacción. +Incluir hexadecimal de transacción sin procesar en metadatos de transacción. * **Tipo**: `boolean` * **Predeterminado**: `false` @@ -114,7 +114,7 @@ Incluir hex de transacción sin procesar en los metadatos de transacción. ### include\_block\_metadata -Incluir metadatos de bloques tanto para bloques de Stacks como de Bitcoin, con costos de ejecución, conteo de transacciones, etc. +Incluye metadatos de bloques tanto para bloques de Stacks como de Bitcoin, con costos de ejecución, cantidad de transacciones, etc. * **Tipo**: `boolean` * **Predeterminado**: `false` @@ -148,14 +148,12 @@ Incluir información del firmante y firmas en los metadatos del bloque. ## Opciones de Activación -### habilitar\_en\_registro +### enable\_on\_registration -Habilita el chainhook inmediatamente al registrarse/crearse. Por defecto, un nuevo chainhook está deshabilitado al crearse. +Habilitar el chainhook inmediatamente después del registro/creación. Por defecto, un nuevo chainhook está deshabilitado al momento de la creación. * **Tipo**: `boolean` -* **Por defecto**I notice that you've provided only a colon ":" as the text to translate. Since there's no actual content to translate, I'll return the same: - - : `false` +* **Predeterminado**: `false` ```json { @@ -173,10 +171,10 @@ Cuando se establece en `true`, la respuesta incluirá `status.enabled = true` y ### expire\_after\_evaluations -Vencerá automáticamente el chainhook después de evaluar esta cantidad de bloques. +Expira automáticamente el chainhook después de evaluar esta cantidad de bloques. * **Tipo**: `integer` -* **Predeterminado**: Ninguno (sin expiración) +* **Predeterminado**: Ninguno (sin caducidad) ```json { @@ -186,15 +184,15 @@ Vencerá automáticamente el chainhook después de evaluar esta cantidad de bloq } ``` -Este chainhook expirará después de evaluar 10,000 bloques. +Esta chainhook expirará después de evaluar 10,000 bloques. *** ### expire\_after\_occurrences -Expira automáticamente el chainhook después de esta cantidad de ocurrencias coincidentes. +Caducar automáticamente el chainhook después de esta cantidad de ocurrencias coincidentes. -* **Tipo**: `integer` +* **Tipo**I notice that you've provided an empty text to translate (just a colon ":"). Since there's no actual content to translate from English to Spanish, I cannot provide a translation. Please provide the actual text you'd like me to translate. `integer` * **Predeterminado**: Ninguno (sin expiración) ```json @@ -205,4 +203,4 @@ Expira automáticamente el chainhook después de esta cantidad de ocurrencias co } ``` -Esta chainhook expirará después de activarse 250 veces. +Este chainhook expirará después de activarse 250 veces. diff --git a/content/docs/es/tools/chainhooks/reference/payload-anatomy.mdx b/content/docs/es/tools/chainhooks/reference/payload-anatomy.mdx index 68ece1350..da45fa798 100644 --- a/content/docs/es/tools/chainhooks/reference/payload-anatomy.mdx +++ b/content/docs/es/tools/chainhooks/reference/payload-anatomy.mdx @@ -1,10 +1,14 @@ --- title: Anatomía del payload -description: Comprender la estructura de las cargas útiles de webhook de Chainhook +description: Comprender la estructura de las cargas útiles de webhook de Chainhooks --- -## Descripción General del Payload +## Resumen de Payload -Un payload de Chainhook consiste en dos secciones principales: **evento** y **chainhook**: +Un payload de Chainhooks consta de dos secciones principales: **evento** y **chainhook**I see that you've provided the critical rules for translation, but the actual text to translate appears to be just a single colon ":". + +Since there's no substantive text content to translate, I'll return: + +: * `event` contiene los datos de la blockchain (bloques, transacciones, operaciones) * `chainhook` contiene metadatos sobre el chainhook que se activó @@ -32,9 +36,9 @@ Un payload de Chainhook consiste en dos secciones principales: **evento** y **ch ## Sección de Eventos -### Apply Array +### Aplicar Array -El `apply` la matriz contiene bloques que se están agregando a la cadena canónica. Cada bloque incluye: +El `apply` el arreglo contiene bloques que se están agregando a la cadena canónica. Cada bloque incluye: ```json { @@ -51,19 +55,19 @@ El `apply` la matriz contiene bloques que se están agregando a la cadena canón } ``` -### Array de Rollback +### Rollback de Array El `rollback` array contiene bloques que se están eliminando durante una reorganización de cadena. Misma estructura que `apply`. :::callout -Chainhook maneja automáticamente las reorganizaciones enviando eventos de reversión. Tu aplicación debe revertir cualquier cambio de estado de los bloques revertidos. +Chainhooks maneja automáticamente las reorganizaciones enviando eventos de reversión. Su aplicación debe revertir cualquier cambio de estado de los bloques revertidos. ::: *** ## Estructura de Transacción -Cada transacción en el `transactions` array contiene: +Cada transacción en el `transactions` la matriz contiene: ### Metadatos @@ -114,7 +118,7 @@ Identificador único para la transacción: *** -## Arreglo de Operaciones +## Matriz de Operaciones Cada transacción incluye un `operations` array que describe los cambios de estado. Las operaciones están indexadas secuencialmente. @@ -193,7 +197,7 @@ Invocación de función de contrato: ``` :::callout -La `args` incluye arreglo `repr` y `type` campos cuando `decode_clarity_values` está habilitado en las opciones. +El `args` array incluye `repr` y `type` campos cuando `decode_clarity_values` está habilitado en las opciones. ::: ### Operación de Transferencia de Token diff --git a/content/docs/es/tools/contract-monitoring/create-alert.mdx b/content/docs/es/tools/contract-monitoring/create-alert.mdx index a9e292b39..47c61637a 100644 --- a/content/docs/es/tools/contract-monitoring/create-alert.mdx +++ b/content/docs/es/tools/contract-monitoring/create-alert.mdx @@ -1,77 +1,77 @@ --- title: Crear una alerta -description: Aprende cómo crear una alerta para monitorear las llamadas a funciones de un contrato. +description: Aprende cómo crear una alerta para monitorear llamadas de función para un contrato. --- ## Lo que aprenderás :::objectives -* Configurar alertas para funciones de contrato -* Configurar notificaciones por correo electrónico y webhook +* Configurar alertas para funciones de contratos +* Configura notificaciones de correo electrónico y webhook * Monitorear patrones de uso de contratos ::: ## Requisitos previos :::prerequisites -* Contratos implementados en la red principal de Stacks (o use cualquier contrato público) -* Una cuenta de la Plataforma Hiro - [Regístrate gratis](https://platform.hiro.so) +* Contratos desplegados en la red principal de Stacks (o usa cualquier contrato público) +* Una cuenta de Hiro Platform - [Regístrate gratis](https://platform.hiro.so) ::: -## Configurar el monitoreo de contratos +## Configurar monitoreo de contratos - ### Navegar a monitoreo + ### Navegar al monitoreo - Inicie sesión en el [Plataforma Hiro](https://platform.hiro.so) y cambia a la **Monitor** pestaña. + Inicia sesión en el [Plataforma Hiro](https://platform.hiro.so) y alternar al **Monitor** pestaña. - Puedes configurar monitoreo de alertas para cualquier contrato en la red principal. + Puedes configurar monitoreo de alertas para cualquier contrato en mainnet. ### Agregar contrato para monitoreo - Hacer clic **Agregar contrato** para abrir el modal de búsqueda de contratos. + Hacer clic **Añadir contrato** para abrir el modal de búsqueda de contratos. Tienes dos opciones: - * **Entrada manual**: Ingrese el principal del contrato y el nombre del contrato - * **Conexión de billetera**: Conecta tu billetera para ver tu historial de implementación + * **Entrada manual**: Ingresa el principal del contrato y el nombre del contrato + * **Conexión de cartera**: Conecta tu billetera para ver tu historial de despliegues - Todos los contratos implementados en la red principal son públicos, por lo que puedes monitorear cualquiera de ellos independientemente de quién los haya implementado. + Todos los contratos desplegados en la red principal son públicos, por lo que puedes monitorear cualquiera de ellos sin importar quién los haya desplegado. ### Ver actividad del contrato - Una vez agregado, su contrato aparece en Monitoreo de Contratos donde puede: + Una vez agregado, tu contrato aparece bajo Monitoreo de Contratos donde puedes: * Ver historial de transacciones * Ver transacciones pendientes en el mempool - * Hacer clic **Crear una alerta** para configurar un monitoreo específico + * Clic **Crear una alerta** para configurar monitoreo específico ### Configurar alertas personalizadas - Configura alertas para cualquier llamada a función de contrato con condiciones específicas: + Configurar alertas para cualquier llamada de función de contrato con condiciones específicas: - * **Función llamada**: Alertar cuando se llama a una función específica - * **Con argumentos**: Alertar solo cuando se llame con valores de argumento especificados + * **Función llamada**: Alerta cuando una función particular es llamada + * **Con argumentos**: Alerta solo cuando se llama con valores de argumento especificados * **Por dirección**: Alertar solo cuando sea llamado por una dirección de billetera específica - Por ejemplo, monitorear `set-contract-owner`, funciones de transferencia/acuñación/quemado, o cualquier función personalizada que hayas implementado. + Por ejemplo, monitorear `set-contract-owner`, funciones de transferencia/acuñación/quema, o cualquier función personalizada que hayas implementado. - ### Elegir método de notificación + ### Elija el método de notificación - Seleccione cómo desea recibir alertas: + Selecciona cómo quieres recibir alertas: - * **Notificaciones por correo electrónico**: Reciba alertas en su dirección de correo electrónico - * **Llamadas de webhook**: Envía a tu punto final de API para flujos de trabajo personalizados + * **Notificaciones por correo electrónico**: Recibe alertas en tu dirección de correo electrónico + * **Llamadas de webhook**: Enviar a tu endpoint de API para flujos de trabajo personalizados - Puede habilitar varios métodos de notificación para la misma alerta. + Puedes habilitar múltiples métodos de notificación para la misma alerta. @@ -79,9 +79,9 @@ description: Aprende cómo crear una alerta para monitorear las llamadas a funci Las notificaciones por correo electrónico provienen de Hiro Platform ``. -Los payloads de webhook siguen esta estructura: +Las cargas útiles de webhook siguen esta estructura: - + ```json !! sample.json { "tx_id": "0xa7f511b3f379efef6fe71d0de57712ed13a89c5b6e24dd049eb2cc9a7c24fcb5", @@ -168,12 +168,12 @@ Los payloads de webhook siguen esta estructura: :::callout -El `tx_status` siempre devolverá "pending" para las alertas de monitoreo. Las notificaciones se envían cuando las transacciones llegan al mempool, no cuando se confirman en la blockchain. +El `tx_status` siempre devolverá "pending" para alertas de monitoreo. Las notificaciones se envían cuando las transacciones llegan al mempool, no cuando se confirman en la blockchain. ::: ## Próximos pasos :::next-steps -* [Plataforma Hiro](https://platform.hiro.so): Crea y gestiona nuevos webhooks en la Plataforma. +* [Plataforma Hiro](https://platform.hiro.so): Crear y gestionar nuevos webhooks en la Plataforma. * [Chainhook](/tools/chainhooks): Aprende sobre el monitoreo avanzado de eventos con Chainhook ::: diff --git a/content/docs/es/tools/contract-monitoring/index.mdx b/content/docs/es/tools/contract-monitoring/index.mdx index bc2e86978..d3418840d 100644 --- a/content/docs/es/tools/contract-monitoring/index.mdx +++ b/content/docs/es/tools/contract-monitoring/index.mdx @@ -1,17 +1,17 @@ --- title: Monitoreo de contratos -sidebarTitle: Descripción general -description: El monitoreo de contratos te permite rastrear eventos de contratos inteligentes en tiempo real y recibir notificaciones webhook cuando ocurren actividades específicas. +sidebarTitle: Visión general +description: La monitorización de contratos te permite rastrear eventos de contratos inteligentes en tiempo real y recibir notificaciones webhook cuando ocurren actividades específicas. llm: false --- ## Descripción general -## Características principales +## Características clave * **Notificaciones en tiempo real** - Dirige eventos específicos y recibe webhooks en segundos * **Configuración sin código** - Configurar monitores a través de la interfaz de usuario de la plataforma sin escribir código -## Próximos pasos +## Siguientes pasos :::next-steps * [Crear una alerta](/tools/contract-monitoring/create-alert): Configura tu primera alerta para llamadas de función. @@ -23,5 +23,5 @@ type: help ### ¿Necesitas ayuda con el monitoreo de contratos? -Contáctanos en el #api canal encendido [Discord](https://stacks.chat/) bajo la sección Hiro Developer Tools. +Contáctanos en el #api canal activado [Discord](https://stacks.chat/) bajo la sección de Herramientas para Desarrolladores de Hiro. ::: From 1841a34884ed22ee8446aed576e97aea98ba85b1 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Tue, 11 Nov 2025 19:38:45 -0600 Subject: [PATCH 08/14] update locale lockfile --- idioma.lock | 220 ++++++++++++++-------------------------------------- 1 file changed, 58 insertions(+), 162 deletions(-) diff --git a/idioma.lock b/idioma.lock index fe5375b52..fa7ad6dee 100644 --- a/idioma.lock +++ b/idioma.lock @@ -1,15 +1,15 @@ version: 1 files: content/docs/en/start/index.mdx: - content: 2b7c1c210ad85ab529ddf2a3231eadb5 + content: bc5521fbd71e5a6da62b8185d7080098 translations: es: true content/docs/en/tools/contract-monitoring/index.mdx: - content: c2f9ae2b76ffa1869fa47be00c0df949 + content: 9caf87be1894a67f4c018d00fac2661b translations: es: true content/docs/en/tools/contract-monitoring/create-alert.mdx: - content: dbcf487653ba34bb5eaf3acdd3898591 + content: 267c0e5edfb16ba5a22d68564718d7a1 translations: es: true content/docs/en/tools/bitcoin-indexer/index.mdx: @@ -64,110 +64,6 @@ files: content: fa6bdb5c34bd2f8419f8845fc088ab78 translations: es: true - content/docs/en/resources/snippets/transfer-stx.mdx: - content: 361a5b414b0a83941b4bb46ac462ed37 - translations: - es: true - content/docs/en/resources/snippets/transfer-a-sip10-token.mdx: - content: 44f4482d4e755166f06f328cc24c176d - translations: - es: true - content/docs/en/resources/snippets/return-an-entry-from-a-map.mdx: - content: c42b14ee4e6e6ca628f9533760b242a2 - translations: - es: true - content/docs/en/resources/snippets/integrate-api-keys-using-stacksjs.mdx: - content: b710dc1b51753fa595e005ac2459aa90 - translations: - es: true - content/docs/en/resources/snippets/index.mdx: - content: f7f8e5a8e292e3c532b2cb013a253cce - translations: - es: true - content/docs/en/resources/snippets/helper-function-to-restrict-contract-calls.mdx: - content: 85e59878c4d6b518e4c6738974173c36 - translations: - es: true - content/docs/en/resources/snippets/get-account-details-from-wallet.mdx: - content: 8442bdb229a9927b1fc9ecb4f47e12f8 - translations: - es: true - content/docs/en/resources/snippets/generate-random-number.mdx: - content: 798675b7f6f24e7ce3c977eff911596c - translations: - es: true - content/docs/en/resources/snippets/generate-a-wallet.mdx: - content: b2b9ef884fdc9e0e64eac0043cecd08b - translations: - es: true - content/docs/en/resources/snippets/generate-a-secret-key.mdx: - content: 671db3a092caeba45414f8cb97e40fcb - translations: - es: true - content/docs/en/resources/snippets/filter-items-from-a-list.mdx: - content: 981f03094e936316432056863c19dbbd - translations: - es: true - content/docs/en/resources/snippets/fetch-testnet-bitcoin-on-regtest.mdx: - content: a0d66d826d40d2828a8ed2bed19cf0fa - translations: - es: true - content/docs/en/resources/snippets/derive-stacks-address-from-keys.mdx: - content: beff47ff834b3aa1ac4265059da2fc7a - translations: - es: true - content/docs/en/resources/snippets/derive-principal-addresses-between-networks.mdx: - content: d5cefec5cbde907ab62e77b322a3b6a1 - translations: - es: true - content/docs/en/resources/snippets/deploy-a-contract.mdx: - content: ed6d5f55ccf7b0de6cbfbc4a2b801b6a - translations: - es: true - content/docs/en/resources/snippets/create-sha256-hash-stacks-js.mdx: - content: 122a9fe757785c005724f5c7cd9e269f - translations: - es: true - content/docs/en/resources/snippets/create-sha256-hash-clarity.mdx: - content: efb0060e63ca3ccb503532064f453194 - translations: - es: true - content/docs/en/resources/snippets/create-a-sponsored-tx.mdx: - content: cf2253b094a9c255ad8a860daf3595a5 - translations: - es: true - content/docs/en/resources/snippets/create-a-random-burn-address.mdx: - content: 5bed2ed84ccec09ff69485b947d87a27 - translations: - es: true - content/docs/en/resources/snippets/convert-string-to-principal.mdx: - content: 821d82afd38459afd1b2a7f7ffbcdfe5 - translations: - es: true - content/docs/en/resources/snippets/convert-btc-to-stx-address.mdx: - content: 067fd4f7c6422182a62473f1e02694b0 - translations: - es: true - content/docs/en/resources/snippets/check-for-duplicates.mdx: - content: 633c920cd53a6a5cb57df0545293cedf - translations: - es: true - content/docs/en/resources/snippets/build-an-unsigned-tx.mdx: - content: 47874b25fcc5ddf23be9667497aff9b2 - translations: - es: true - content/docs/en/resources/snippets/build-an-nft-pc.mdx: - content: bb83105f0f9130e31da483932592bf84 - translations: - es: true - content/docs/en/resources/snippets/build-an-ft-pc.mdx: - content: 6e3b9f8e57345f21ef1119fabb7301a1 - translations: - es: true - content/docs/en/resources/snippets/build-a-stx-pc.mdx: - content: e89d98015c15638434a14285d39c96cc - translations: - es: true content/docs/en/resources/archive/verify-archive-data.mdx: content: 48934f74c2ce1e0a430ab03632271351 translations: @@ -945,7 +841,7 @@ files: translations: es: true content/docs/en/apis/platform-api/reference/chainhooks/update.mdx: - content: a03a36cea5f1c11f502ebc40f65ea6b0 + content: f2deefec6c6f3d3110f194e1c8f6bef8 translations: es: true content/docs/en/apis/platform-api/reference/chainhooks/status.mdx: @@ -1276,151 +1172,151 @@ files: content: 830654f26dc77cad2d5a56a7ba9aa849 translations: es: true - content/docs/en/tools/chainhook/index.mdx: - content: 81cfbfb7a519c885af2144146ca2b977 + content/docs/en/tools/chainhooks/index.mdx: + content: 0057c3bda3de7544372b73991277b040 translations: es: true - content/docs/en/apis/chainhook-api/usage.mdx: - content: 874f2946f0eca159b8b51d5ad4462e82 + content/docs/en/apis/chainhooks-api/usage.mdx: + content: 7d6b019d37f184f0dc9cdd5a56576bcd translations: es: true - content/docs/en/apis/chainhook-api/index.mdx: - content: 79b4de59ff6ecd996b0188e9a0349bcb + content/docs/en/apis/chainhooks-api/index.mdx: + content: 2982530e94c4dac8e2607e3563f48bb2 translations: es: true - content/docs/en/tools/chainhook/reference/payload-anatomy.mdx: - content: 53170bac10bbb83bbc497834b8447148 + content/docs/en/tools/chainhooks/reference/payload-anatomy.mdx: + content: 013546282b61926f4e63423abfe3a810 translations: es: true - content/docs/en/tools/chainhook/reference/options.mdx: - content: 058907f6cd5f2f9b9797b6cd069b3e2a + content/docs/en/tools/chainhooks/reference/options.mdx: + content: ce013e5f40ba30d67c883236161dc039 translations: es: true - content/docs/en/tools/chainhook/reference/filters.mdx: - content: 2112e6b5b41291346e2dd40e50af4bf9 + content/docs/en/tools/chainhooks/reference/filters.mdx: + content: fa1338c93265c62300057fde9cc6f596 translations: es: true - content/docs/en/tools/chainhook/(platform-usage)/view-chainhooks.mdx: + content/docs/en/tools/chainhooks/(platform-usage)/view-chainhooks.mdx: content: 881a49bed2b09c9e31d1158a89c9d074 translations: es: true - content/docs/en/tools/chainhook/(platform-usage)/platform-usage.mdx: - content: d3aa2bbc6d52e9befdf6f330a86fac8b + content/docs/en/tools/chainhooks/(platform-usage)/platform-usage.mdx: + content: 237e8316f7e6ea1571fc98ddc329bd2b translations: es: true - content/docs/en/tools/chainhook/(platform-usage)/platform-quickstart.mdx: + content/docs/en/tools/chainhooks/(platform-usage)/platform-quickstart.mdx: content: d1b82394672a71836d0c87c2c43236eb translations: es: true - content/docs/en/tools/chainhook/(platform-usage)/manage-api-keys.mdx: + content/docs/en/tools/chainhooks/(platform-usage)/manage-api-keys.mdx: content: f1bc3ebaacdc75c667e096cf86ea6975 translations: es: true - content/docs/en/tools/chainhook/(platform-usage)/create-enable-chainhooks.mdx: + content/docs/en/tools/chainhooks/(platform-usage)/create-enable-chainhooks.mdx: content: 2e3573b59e73a3d96d8f4f38257d89c6 translations: es: true - content/docs/en/tools/chainhook/(overview)/migration.mdx: - content: 9986eb82087e0eb18f06cde0fc63adf3 + content/docs/en/tools/chainhooks/(overview)/migration.mdx: + content: c65eab8fa649158aa57c411682ed6824 translations: es: true - content/docs/en/tools/chainhook/(overview)/faq.mdx: - content: 8f225175d0dc6473300bd8c73de7369e + content/docs/en/tools/chainhooks/(overview)/faq.mdx: + content: fdfedb759ed693e5b3b359be40f54ea4 translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/register-enable.mdx: + content/docs/en/tools/chainhooks/(chainhook-sdk)/register-enable.mdx: content: b861f167b666720118ac005efe9b6e33 translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/manage-keys.mdx: + content/docs/en/tools/chainhooks/(chainhook-sdk)/manage-keys.mdx: content: b960ab63639590bdb4540047c2797314 translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/list-fetch.mdx: + content/docs/en/tools/chainhooks/(chainhook-sdk)/list-fetch.mdx: content: ff642f5bbe3cc936dec794be10cadbd3 translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/introduction.mdx: - content: 545346c5744fedd32064259fa298c8c4 + content/docs/en/tools/chainhooks/(chainhook-sdk)/introduction.mdx: + content: 6fd296ea8ef3989d915b37465c47f9e4 translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/evaluate.mdx: - content: dfc544b373e2e2d8a61b0254a3c6506b + content/docs/en/tools/chainhooks/(chainhook-sdk)/evaluate.mdx: + content: 4e8763e800f7fe0322a15f3c549255e0 translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/edit-update.mdx: + content/docs/en/tools/chainhooks/(chainhook-sdk)/edit-update.mdx: content: 8c334f53e455abe0c5f9e565c01ba8b6 translations: es: true - content/docs/en/apis/chainhook-api/reference/info/status.mdx: + content/docs/en/apis/chainhooks-api/reference/info/status.mdx: content: 0a5769e1d1ab9ebfc85b0b9e394a2d5f translations: es: true - content/docs/en/apis/chainhook-api/reference/info/index.mdx: - content: 9bd2cbf38a0954ef2050725a2702be71 + content/docs/en/apis/chainhooks-api/reference/info/index.mdx: + content: 8da433d23b556e2247d1362697fe87a6 translations: es: true - content/docs/en/apis/chainhook-api/reference/secrets/rotate-consumer-secret.mdx: + content/docs/en/apis/chainhooks-api/reference/secrets/rotate-consumer-secret.mdx: content: 3318dbeaac1826727ba7e558de2ca6e3 translations: es: true - content/docs/en/apis/chainhook-api/reference/secrets/index.mdx: + content/docs/en/apis/chainhooks-api/reference/secrets/index.mdx: content: bf6bfdf7cd696535836ea9a6455f7123 translations: es: true - content/docs/en/apis/chainhook-api/reference/secrets/delete-consumer-secret.mdx: + content/docs/en/apis/chainhooks-api/reference/secrets/delete-consumer-secret.mdx: content: dd30629de045d14c23634ecb1babd7a3 translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/update-chainhook.mdx: + content/docs/en/apis/chainhooks-api/reference/chainhooks/update-chainhook.mdx: content: acbf559fb562ac4621e60174fca84f21 translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/update-chainhook-enabled.mdx: + content/docs/en/apis/chainhooks-api/reference/chainhooks/update-chainhook-enabled.mdx: content: ed34022de212168d18e1b754be0df7de translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/register-chainhook.mdx: + content/docs/en/apis/chainhooks-api/reference/chainhooks/register-chainhook.mdx: content: d24f38b45ed23c68257059464da97e74 translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/index.mdx: - content: feedad04052a1c25c0a80ba7f2a29445 + content/docs/en/apis/chainhooks-api/reference/chainhooks/index.mdx: + content: 85c02ef6effc39c535a9ae0f818d62e5 translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/get-chainhooks.mdx: + content/docs/en/apis/chainhooks-api/reference/chainhooks/get-chainhooks.mdx: content: b9a51ee7aacfe302e175242a3d2250a2 translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/get-chainhook.mdx: + content/docs/en/apis/chainhooks-api/reference/chainhooks/get-chainhook.mdx: content: 705e66075357bceecdfda43610ff24fc translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/evaluate-chainhook.mdx: + content/docs/en/apis/chainhooks-api/reference/chainhooks/evaluate-chainhook.mdx: content: 49e2de023b9933082fec7968c7afbd8e translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/delete-chainhook.mdx: + content/docs/en/apis/chainhooks-api/reference/chainhooks/delete-chainhook.mdx: content: cc5f9a34fb8ba69f6558f28518dc2119 translations: es: true - content/docs/en/apis/chainhook-api/reference/chainhooks/bulk-enable-chainhooks.mdx: + content/docs/en/apis/chainhooks-api/reference/chainhooks/bulk-enable-chainhooks.mdx: content: 170efd0c995ccff40d41c36a9d237b93 translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/update.mdx: - content: 33eaaaa565f80f2c49a51e0dba8d2d2e + content/docs/en/tools/chainhooks/(chainhook-sdk)/update.mdx: + content: cf9ff6c43252efffc8a7471ca74d2e7e translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/keys.mdx: - content: 1902d1cb37e65b4bfa04df80444799fd + content/docs/en/tools/chainhooks/(chainhook-sdk)/fetch.mdx: + content: eed5cf8878583371b3e2b5375aef719c translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/fetch.mdx: - content: c16c1fee0a0684e1b3db754133d334cf + content/docs/en/tools/chainhooks/(chainhook-sdk)/create.mdx: + content: 21edf03ddd77c902998d33cec4d93ab7 translations: es: true - content/docs/en/tools/chainhook/(chainhook-sdk)/create.mdx: - content: 2c1cfca67eba98b220997612c0927337 + content/docs/en/tools/chainhooks/(chainhook-sdk)/secrets.mdx: + content: c6ecc8fc0f88adea91073a9b00e2014a translations: es: true From 61bd64ec9f2e4a06df342a90a4e67894f5916d05 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Wed, 12 Nov 2025 11:59:39 -0600 Subject: [PATCH 09/14] fix(api-playground): fix body schema and skip empty JSON headers --- components/openapi/api-playground/index.tsx | 34 ++++- .../api-playground/request-builder.tsx | 76 +++++++++-- .../api-playground/request-executor.tsx | 9 +- .../openapi/api-playground/schema-utils.ts | 120 ++++++++++++++++++ 4 files changed, 224 insertions(+), 15 deletions(-) create mode 100644 components/openapi/api-playground/schema-utils.ts diff --git a/components/openapi/api-playground/index.tsx b/components/openapi/api-playground/index.tsx index ed7f67213..2fe7826bd 100644 --- a/components/openapi/api-playground/index.tsx +++ b/components/openapi/api-playground/index.tsx @@ -14,6 +14,7 @@ import { useApiCredentials } from '@/providers/api-credentials-provider'; import type { OpenAPIOperation } from '../types'; import { RequestBuilder } from './request-builder'; import { executeRequest } from './request-executor'; +import { coerceValueForSchema } from './schema-utils'; interface APIPlaygroundProps { operation: OpenAPIOperation; @@ -230,6 +231,8 @@ export function APIPlayground({ } let finalFormData = { ...formData }; + let bodyFieldErrors: string[] = []; + if (operation.requestBody) { const bodySchema = operation.requestBody.content?.['application/json']?.schema; if (bodySchema?.type === 'object' && bodySchema.properties) { @@ -294,18 +297,43 @@ export function APIPlayground({ }); } catch (error) { console.error('Failed to convert arguments:', error); - bodyObject[propName] = fieldValue; + bodyFieldErrors.push( + error instanceof Error + ? error.message + : `Invalid value provided for ${propName}`, + ); } } else if (propName === 'sender') { // Sender stays as string bodyObject[propName] = fieldValue; } else { - // Other fields - no conversion for now - bodyObject[propName] = fieldValue; + try { + bodyObject[propName] = coerceValueForSchema(fieldValue, propSchema, { + strict: true, + fieldName: propName, + }); + } catch (error) { + bodyFieldErrors.push( + error instanceof Error + ? error.message + : `Invalid value provided for ${propName}`, + ); + } } } } + if (bodyFieldErrors.length > 0) { + if (!openSections.includes('body')) { + setOpenSections((prev) => [...prev, 'body']); + } + setResponse({ + status: 0, + error: bodyFieldErrors[0], + }); + return; + } + finalFormData = { ...finalFormData, body: JSON.stringify(bodyObject, null, 2), diff --git a/components/openapi/api-playground/request-builder.tsx b/components/openapi/api-playground/request-builder.tsx index 0ad8ee6b1..7fbb0a5eb 100644 --- a/components/openapi/api-playground/request-builder.tsx +++ b/components/openapi/api-playground/request-builder.tsx @@ -10,6 +10,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/comp import { cn } from '@/lib/utils'; import type { OpenAPIOperation, OpenAPIParameter } from '../types'; import { ClarityConverter, type ClarityTypeHint } from './clarity-converter'; +import { coerceValueForSchema, resolveEffectiveSchema } from './schema-utils'; interface RequestBuilderProps { operation: OpenAPIOperation; @@ -135,12 +136,14 @@ export const RequestBuilder = forwardRef( const bodySchema = operation.requestBody.content?.['application/json']?.schema; if (bodySchema?.type === 'object' && bodySchema.properties) { const bodyObject: Record = {}; + const parseErrors: Record = {}; for (const [propName, propSchema] of Object.entries(bodySchema.properties) as [ string, any, ][]) { const fieldValue = formData[`body.${propName}`]; + const fieldName = `body.${propName}`; if (fieldValue !== undefined && fieldValue !== '') { if (clarityConversion) { if (propName === 'arguments' && propSchema.type === 'array') { @@ -152,7 +155,10 @@ export const RequestBuilder = forwardRef( }); } catch (error) { console.error('Failed to convert arguments:', error); - bodyObject[propName] = fieldValue; + parseErrors[fieldName] = + error instanceof Error + ? error.message + : `Invalid value provided for ${propName}`; } } else { if (propName === 'sender') { @@ -167,19 +173,54 @@ export const RequestBuilder = forwardRef( ); bodyObject[propName] = cvToHex(clarityValue); } catch (error) { - bodyObject[propName] = fieldValue; + try { + bodyObject[propName] = coerceValueForSchema(fieldValue, propSchema, { + strict: true, + fieldName: propName, + }); + } catch (coerceError) { + parseErrors[fieldName] = + coerceError instanceof Error + ? coerceError.message + : `Invalid value provided for ${propName}`; + } } } else { - bodyObject[propName] = fieldValue; + try { + bodyObject[propName] = coerceValueForSchema(fieldValue, propSchema, { + strict: true, + fieldName: propName, + }); + } catch (error) { + parseErrors[fieldName] = + error instanceof Error + ? error.message + : `Invalid value provided for ${propName}`; + } } } } } else { - bodyObject[propName] = fieldValue; + try { + bodyObject[propName] = coerceValueForSchema(fieldValue, propSchema, { + strict: true, + fieldName: propName, + }); + } catch (error) { + parseErrors[fieldName] = + error instanceof Error + ? error.message + : `Invalid value provided for ${propName}`; + } } } } + if (Object.keys(parseErrors).length > 0) { + setErrors((prev) => ({ ...prev, ...parseErrors })); + return; + } + finalFormData = { ...finalFormData, body: JSON.stringify(bodyObject, null, 2), @@ -422,9 +463,26 @@ export const RequestBuilder = forwardRef( const fieldName = `body.${propName}`; const isRequired = bodySchema.required?.includes(propName); const hasError = !!errors[fieldName]; + const resolvedPropSchema = resolveEffectiveSchema(propSchema) || propSchema; + const schemaType = resolvedPropSchema?.type || propSchema.type; const clarityType = clarityConversion ? detectClarityType(propName, propSchema, formData[fieldName] || '') : null; + const exampleValue = + typeof propSchema.example === 'string' + ? propSchema.example + : propSchema.example + ? JSON.stringify(propSchema.example, null, 2) + : undefined; + const placeholder = + exampleValue || + propSchema.description || + (schemaType === 'object' + ? 'Enter JSON object' + : schemaType === 'array' + ? 'Enter array values as JSON array' + : undefined); + const shouldUseTextarea = schemaType === 'array' || schemaType === 'object'; return (
@@ -451,19 +509,17 @@ export const RequestBuilder = forwardRef( )}
- {propSchema.type === 'array' ? ( + {shouldUseTextarea ? (