@secondlayer/shared 16.0.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/archive/range-digest.d.ts +0 -36
- package/dist/src/archive/semantic-digest-builder.d.ts +0 -36
- package/dist/src/classify/index.js +1 -4
- package/dist/src/classify/index.js.map +3 -3
- package/dist/src/coverage/index.d.ts +0 -36
- package/dist/src/crypto/secondlayer-webhook.js +1 -4
- package/dist/src/crypto/secondlayer-webhook.js.map +3 -3
- package/dist/src/db/index.d.ts +1 -151
- package/dist/src/db/index.js +1 -70
- package/dist/src/db/index.js.map +6 -6
- package/dist/src/db/queries/chain-reorgs.d.ts +0 -36
- package/dist/src/db/queries/chain-reorgs.js +1 -70
- package/dist/src/db/queries/chain-reorgs.js.map +6 -6
- package/dist/src/db/queries/contracts.d.ts +0 -36
- package/dist/src/db/queries/contracts.js.map +2 -2
- package/dist/src/db/queries/instance.d.ts +0 -36
- package/dist/src/db/queries/instance.js +1 -4
- package/dist/src/db/queries/instance.js.map +3 -3
- package/dist/src/db/queries/integrity.d.ts +0 -36
- package/dist/src/db/queries/integrity.js +1 -4
- package/dist/src/db/queries/integrity.js.map +3 -3
- package/dist/src/db/queries/subgraph-gaps.d.ts +0 -36
- package/dist/src/db/queries/subgraph-operations.d.ts +0 -36
- package/dist/src/db/queries/subgraphs.d.ts +0 -36
- package/dist/src/db/queries/sync-scope.d.ts +0 -36
- package/dist/src/db/queries/webhook-replays.d.ts +0 -36
- package/dist/src/db/queries/webhooks.d.ts +0 -36
- package/dist/src/db/schema.d.ts +1 -37
- package/dist/src/db/schema.js.map +2 -2
- package/dist/src/email/index.js +1 -4
- package/dist/src/email/index.js.map +3 -3
- package/dist/src/env.d.ts +2 -8
- package/dist/src/env.js +1 -5
- package/dist/src/env.js.map +3 -3
- package/dist/src/index.d.ts +2 -158
- package/dist/src/index.js +1 -71
- package/dist/src/index.js.map +6 -6
- package/dist/src/insights/index.d.ts +0 -36
- package/dist/src/insights/index.js +1 -4
- package/dist/src/insights/index.js.map +3 -3
- package/dist/src/leader.js +1 -70
- package/dist/src/leader.js.map +6 -6
- package/dist/src/logger.js +1 -4
- package/dist/src/logger.js.map +3 -3
- package/dist/src/node/local-client.d.ts +0 -36
- package/dist/src/node/tx-summary.js +1 -4
- package/dist/src/node/tx-summary.js.map +3 -3
- package/dist/src/queue/listener.js +1 -70
- package/dist/src/queue/listener.js.map +6 -6
- package/dist/src/runtime/index.js +1 -2
- package/dist/src/runtime/index.js.map +3 -3
- package/migrations/0206_drop_pox4_calls.ts +32 -0
- package/package.json +1 -1
|
@@ -486,41 +486,6 @@ interface ChainReorgsTable {
|
|
|
486
486
|
new_canonical_event_index: number;
|
|
487
487
|
created_at: Generated<Date>;
|
|
488
488
|
}
|
|
489
|
-
type Pox4FunctionName = "stack-stx" | "delegate-stx" | "stack-extend" | "stack-increase" | "revoke-delegate-stx" | "delegate-stack-stx" | "delegate-stack-extend" | "delegate-stack-increase" | "stack-aggregation-commit" | "stack-aggregation-commit-indexed" | "stack-aggregation-increase" | "set-signer-key-authorization";
|
|
490
|
-
interface Pox4CallsTable {
|
|
491
|
-
cursor: string;
|
|
492
|
-
block_height: number;
|
|
493
|
-
block_time: Date;
|
|
494
|
-
burn_block_height: number;
|
|
495
|
-
tx_id: string;
|
|
496
|
-
tx_index: number;
|
|
497
|
-
function_name: Pox4FunctionName;
|
|
498
|
-
caller: string;
|
|
499
|
-
stacker: string | null;
|
|
500
|
-
delegate_to: string | null;
|
|
501
|
-
amount_ustx: string | null;
|
|
502
|
-
lock_period: number | null;
|
|
503
|
-
pox_addr_version: number | null;
|
|
504
|
-
pox_addr_hashbytes: string | null;
|
|
505
|
-
pox_addr_btc: string | null;
|
|
506
|
-
start_cycle: number | null;
|
|
507
|
-
end_cycle: number | null;
|
|
508
|
-
signer_key: string | null;
|
|
509
|
-
signer_signature: string | null;
|
|
510
|
-
auth_id: string | null;
|
|
511
|
-
max_amount: string | null;
|
|
512
|
-
reward_cycle: number | null;
|
|
513
|
-
aggregated_amount_ustx: string | null;
|
|
514
|
-
aggregated_signer_index: number | null;
|
|
515
|
-
auth_period: number | null;
|
|
516
|
-
auth_topic: string | null;
|
|
517
|
-
auth_allowed: boolean | null;
|
|
518
|
-
result_ok: boolean;
|
|
519
|
-
result_raw: string;
|
|
520
|
-
canonical: Generated<boolean>;
|
|
521
|
-
source_cursor: string;
|
|
522
|
-
created_at: Generated<Date>;
|
|
523
|
-
}
|
|
524
489
|
type Pox5EventTopic = "set-bond-admin" | "set-pause-admin" | "pause-rewards" | "setup-bond" | "add-to-allowlist" | "register-for-bond" | "update-bond-registration" | "register-signer" | "stake" | "stake-update" | "announce-l1-early-exit" | "unstake-sbtc" | "unstake" | "calculate-rewards" | "bond-distribution" | "claim-rewards" | "claim-staker-rewards-for-signer" | "grant-signer-key" | "revoke-signer-grant";
|
|
525
490
|
interface Pox5EventsTable {
|
|
526
491
|
cursor: string;
|
|
@@ -938,7 +903,6 @@ interface Database {
|
|
|
938
903
|
decoded_events: DecodedEventsTable;
|
|
939
904
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
940
905
|
chain_reorgs: ChainReorgsTable;
|
|
941
|
-
pox4_calls: Pox4CallsTable;
|
|
942
906
|
pox5_events: Pox5EventsTable;
|
|
943
907
|
pox5_cycles: Pox5CyclesTable;
|
|
944
908
|
pox5_cycle_signers: Pox5CycleSignersTable;
|
|
@@ -486,41 +486,6 @@ interface ChainReorgsTable {
|
|
|
486
486
|
new_canonical_event_index: number;
|
|
487
487
|
created_at: Generated<Date>;
|
|
488
488
|
}
|
|
489
|
-
type Pox4FunctionName = "stack-stx" | "delegate-stx" | "stack-extend" | "stack-increase" | "revoke-delegate-stx" | "delegate-stack-stx" | "delegate-stack-extend" | "delegate-stack-increase" | "stack-aggregation-commit" | "stack-aggregation-commit-indexed" | "stack-aggregation-increase" | "set-signer-key-authorization";
|
|
490
|
-
interface Pox4CallsTable {
|
|
491
|
-
cursor: string;
|
|
492
|
-
block_height: number;
|
|
493
|
-
block_time: Date;
|
|
494
|
-
burn_block_height: number;
|
|
495
|
-
tx_id: string;
|
|
496
|
-
tx_index: number;
|
|
497
|
-
function_name: Pox4FunctionName;
|
|
498
|
-
caller: string;
|
|
499
|
-
stacker: string | null;
|
|
500
|
-
delegate_to: string | null;
|
|
501
|
-
amount_ustx: string | null;
|
|
502
|
-
lock_period: number | null;
|
|
503
|
-
pox_addr_version: number | null;
|
|
504
|
-
pox_addr_hashbytes: string | null;
|
|
505
|
-
pox_addr_btc: string | null;
|
|
506
|
-
start_cycle: number | null;
|
|
507
|
-
end_cycle: number | null;
|
|
508
|
-
signer_key: string | null;
|
|
509
|
-
signer_signature: string | null;
|
|
510
|
-
auth_id: string | null;
|
|
511
|
-
max_amount: string | null;
|
|
512
|
-
reward_cycle: number | null;
|
|
513
|
-
aggregated_amount_ustx: string | null;
|
|
514
|
-
aggregated_signer_index: number | null;
|
|
515
|
-
auth_period: number | null;
|
|
516
|
-
auth_topic: string | null;
|
|
517
|
-
auth_allowed: boolean | null;
|
|
518
|
-
result_ok: boolean;
|
|
519
|
-
result_raw: string;
|
|
520
|
-
canonical: Generated<boolean>;
|
|
521
|
-
source_cursor: string;
|
|
522
|
-
created_at: Generated<Date>;
|
|
523
|
-
}
|
|
524
489
|
type Pox5EventTopic = "set-bond-admin" | "set-pause-admin" | "pause-rewards" | "setup-bond" | "add-to-allowlist" | "register-for-bond" | "update-bond-registration" | "register-signer" | "stake" | "stake-update" | "announce-l1-early-exit" | "unstake-sbtc" | "unstake" | "calculate-rewards" | "bond-distribution" | "claim-rewards" | "claim-staker-rewards-for-signer" | "grant-signer-key" | "revoke-signer-grant";
|
|
525
490
|
interface Pox5EventsTable {
|
|
526
491
|
cursor: string;
|
|
@@ -938,7 +903,6 @@ interface Database {
|
|
|
938
903
|
decoded_events: DecodedEventsTable;
|
|
939
904
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
940
905
|
chain_reorgs: ChainReorgsTable;
|
|
941
|
-
pox4_calls: Pox4CallsTable;
|
|
942
906
|
pox5_events: Pox5EventsTable;
|
|
943
907
|
pox5_cycles: Pox5CyclesTable;
|
|
944
908
|
pox5_cycle_signers: Pox5CycleSignersTable;
|
|
@@ -58,9 +58,6 @@ function stacksNetwork(env = process.env) {
|
|
|
58
58
|
function isProductionEnv() {
|
|
59
59
|
return process.env["NODE_ENV"] === "production";
|
|
60
60
|
}
|
|
61
|
-
function isPox4DecoderEnabled(env = process.env) {
|
|
62
|
-
return env.POX4_DECODER_ENABLED !== "false";
|
|
63
|
-
}
|
|
64
61
|
function isPox5DecoderEnabled(env = process.env) {
|
|
65
62
|
return env.POX5_DECODER_ENABLED !== "false";
|
|
66
63
|
}
|
|
@@ -474,5 +471,5 @@ export {
|
|
|
474
471
|
scoreConfidence
|
|
475
472
|
};
|
|
476
473
|
|
|
477
|
-
//# debugId=
|
|
474
|
+
//# debugId=5FC6CC3812F1D71A64756E2164756E21
|
|
478
475
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/env.ts", "../src/logger.ts", "../src/classify/confidence.ts", "../src/classify/types.ts", "../src/classify/limits.ts", "../src/classify/system-one.ts", "../src/classify/providers.ts", "../src/classify/rules.ts", "../src/classify/classify.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { z } from \"zod\";\n\n// Parse comma-separated networks\nconst networksSchema = z.string().transform((val) => {\n\tconst networks = val\n\t\t.split(\",\")\n\t\t.map((n) => n.trim())\n\t\t.filter(Boolean);\n\tconst valid = [\"mainnet\", \"testnet\"];\n\tfor (const n of networks) {\n\t\tif (!valid.includes(n)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invalid network: ${n}. Must be one of: ${valid.join(\", \")}`,\n\t\t\t);\n\t\t}\n\t}\n\treturn networks as (\"mainnet\" | \"testnet\")[];\n});\n\ninterface EnvSchemaOutput {\n\tDATABASE_URL?: string;\n\t/**\n\t * Shared indexer DB (blocks/txs/events). Falls back to DATABASE_URL.\n\t * Set this alongside TARGET_DATABASE_URL to enable dual-DB mode.\n\t */\n\tSOURCE_DATABASE_URL?: string;\n\t/**\n\t * Tenant DB (subgraph schemas + subgraphs table). Falls back to DATABASE_URL.\n\t * Set this alongside SOURCE_DATABASE_URL to enable dual-DB mode.\n\t */\n\tTARGET_DATABASE_URL?: string;\n\tNETWORK?: \"mainnet\" | \"testnet\";\n\tNETWORKS?: (\"mainnet\" | \"testnet\")[];\n\tLOG_LEVEL: \"debug\" | \"info\" | \"warn\" | \"error\";\n\tNODE_ENV: \"development\" | \"production\" | \"test\";\n}\n\n// Cast needed: z.preprocess / z.default create different _input vs _output types\n// that z.ZodType<T> can't represent without explicit input type param\nconst envSchema: z.ZodType<EnvSchemaOutput> = z.object({\n\tDATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tSOURCE_DATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tTARGET_DATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tNETWORK: z.enum([\"mainnet\", \"testnet\"]).optional(),\n\tNETWORKS: networksSchema.optional(),\n\tLOG_LEVEL: z.enum([\"debug\", \"info\", \"warn\", \"error\"]).default(\"info\"),\n\tNODE_ENV: z\n\t\t.enum([\"development\", \"production\", \"test\"])\n\t\t.default(\"development\"),\n}) as unknown as z.ZodType<EnvSchemaOutput>;\n\nexport type Env = EnvSchemaOutput & {\n\tenabledNetworks: (\"mainnet\" | \"testnet\")[];\n};\n\nlet cachedEnv: Env | null = null;\n\nexport function getEnv(): Env {\n\tif (cachedEnv) {\n\t\treturn cachedEnv;\n\t}\n\n\tconst result = envSchema.safeParse(process.env);\n\n\tif (!result.success) {\n\t\tconsole.error(\"❌ Invalid environment configuration:\");\n\t\tconsole.error(z.treeifyError(result.error));\n\t\tthrow new Error(\"Invalid environment configuration\");\n\t}\n\n\t// Compute enabled networks from NETWORKS or NETWORK\n\tlet enabledNetworks: (\"mainnet\" | \"testnet\")[];\n\tif (result.data.NETWORKS && result.data.NETWORKS.length > 0) {\n\t\tenabledNetworks = result.data.NETWORKS;\n\t} else if (result.data.NETWORK) {\n\t\tenabledNetworks = [result.data.NETWORK];\n\t} else {\n\t\tconst named = stacksNetwork();\n\t\tenabledNetworks = named === \"testnet\" ? [\"testnet\"] : [\"mainnet\"];\n\t}\n\n\tcachedEnv = { ...result.data, enabledNetworks };\n\treturn cachedEnv;\n}\n\nlet warnedNetworkFallback = false;\n\n/**\n * The Stacks network this process serves, and the only place that decides it:\n * `STACKS_NETWORK`, else the deprecated `NETWORK` (warned once so a deployment\n * that only sets it is not silently re-keyed), else mainnet. Not validated;\n * `instanceNetworkFromEnv` is the strict form.\n */\nexport function stacksNetwork(env: NodeJS.ProcessEnv = process.env): string {\n\tif (env.STACKS_NETWORK) return env.STACKS_NETWORK;\n\tif (env.NETWORK) {\n\t\tif (!warnedNetworkFallback) {\n\t\t\twarnedNetworkFallback = true;\n\t\t\tconsole.warn(\"NETWORK is deprecated: set STACKS_NETWORK instead\");\n\t\t}\n\t\treturn env.NETWORK;\n\t}\n\treturn \"mainnet\";\n}\n\n/**\n * True when `NODE_ENV=production`, read at RUNTIME — the single source of truth\n * for prod-vs-dev branching in this package.\n *\n * Why a helper instead of inlining `process.env.NODE_ENV === \"production\"`:\n * bunup/esbuild constant-folds the dot-access `process.env.NODE_ENV` to its\n * BUILD-time value. `@secondlayer/shared` is consumed by other services as its\n * built `dist`, so an inlined check freezes to a literal in the shipped bundle\n * (e.g. `const isProd = false`) and silently ignores the container's real\n * NODE_ENV. The bracket access below is NOT folded, so it stays a runtime read.\n * Route every prod check through here so the footgun lives in exactly one place.\n */\nexport function isProductionEnv(): boolean {\n\t// biome-ignore lint/complexity/useLiteralKeys: bracket access is deliberate — dot-access gets constant-folded by the bundler, freezing this to a build-time literal in the shipped dist.\n\treturn process.env[\"NODE_ENV\"] === \"production\";\n}\n\ntype EnvMap = NodeJS.ProcessEnv;\n\n/**\n * PoX-
|
|
5
|
+
"import { z } from \"zod\";\n\n// Parse comma-separated networks\nconst networksSchema = z.string().transform((val) => {\n\tconst networks = val\n\t\t.split(\",\")\n\t\t.map((n) => n.trim())\n\t\t.filter(Boolean);\n\tconst valid = [\"mainnet\", \"testnet\"];\n\tfor (const n of networks) {\n\t\tif (!valid.includes(n)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invalid network: ${n}. Must be one of: ${valid.join(\", \")}`,\n\t\t\t);\n\t\t}\n\t}\n\treturn networks as (\"mainnet\" | \"testnet\")[];\n});\n\ninterface EnvSchemaOutput {\n\tDATABASE_URL?: string;\n\t/**\n\t * Shared indexer DB (blocks/txs/events). Falls back to DATABASE_URL.\n\t * Set this alongside TARGET_DATABASE_URL to enable dual-DB mode.\n\t */\n\tSOURCE_DATABASE_URL?: string;\n\t/**\n\t * Tenant DB (subgraph schemas + subgraphs table). Falls back to DATABASE_URL.\n\t * Set this alongside SOURCE_DATABASE_URL to enable dual-DB mode.\n\t */\n\tTARGET_DATABASE_URL?: string;\n\tNETWORK?: \"mainnet\" | \"testnet\";\n\tNETWORKS?: (\"mainnet\" | \"testnet\")[];\n\tLOG_LEVEL: \"debug\" | \"info\" | \"warn\" | \"error\";\n\tNODE_ENV: \"development\" | \"production\" | \"test\";\n}\n\n// Cast needed: z.preprocess / z.default create different _input vs _output types\n// that z.ZodType<T> can't represent without explicit input type param\nconst envSchema: z.ZodType<EnvSchemaOutput> = z.object({\n\tDATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tSOURCE_DATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tTARGET_DATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tNETWORK: z.enum([\"mainnet\", \"testnet\"]).optional(),\n\tNETWORKS: networksSchema.optional(),\n\tLOG_LEVEL: z.enum([\"debug\", \"info\", \"warn\", \"error\"]).default(\"info\"),\n\tNODE_ENV: z\n\t\t.enum([\"development\", \"production\", \"test\"])\n\t\t.default(\"development\"),\n}) as unknown as z.ZodType<EnvSchemaOutput>;\n\nexport type Env = EnvSchemaOutput & {\n\tenabledNetworks: (\"mainnet\" | \"testnet\")[];\n};\n\nlet cachedEnv: Env | null = null;\n\nexport function getEnv(): Env {\n\tif (cachedEnv) {\n\t\treturn cachedEnv;\n\t}\n\n\tconst result = envSchema.safeParse(process.env);\n\n\tif (!result.success) {\n\t\tconsole.error(\"❌ Invalid environment configuration:\");\n\t\tconsole.error(z.treeifyError(result.error));\n\t\tthrow new Error(\"Invalid environment configuration\");\n\t}\n\n\t// Compute enabled networks from NETWORKS or NETWORK\n\tlet enabledNetworks: (\"mainnet\" | \"testnet\")[];\n\tif (result.data.NETWORKS && result.data.NETWORKS.length > 0) {\n\t\tenabledNetworks = result.data.NETWORKS;\n\t} else if (result.data.NETWORK) {\n\t\tenabledNetworks = [result.data.NETWORK];\n\t} else {\n\t\tconst named = stacksNetwork();\n\t\tenabledNetworks = named === \"testnet\" ? [\"testnet\"] : [\"mainnet\"];\n\t}\n\n\tcachedEnv = { ...result.data, enabledNetworks };\n\treturn cachedEnv;\n}\n\nlet warnedNetworkFallback = false;\n\n/**\n * The Stacks network this process serves, and the only place that decides it:\n * `STACKS_NETWORK`, else the deprecated `NETWORK` (warned once so a deployment\n * that only sets it is not silently re-keyed), else mainnet. Not validated;\n * `instanceNetworkFromEnv` is the strict form.\n */\nexport function stacksNetwork(env: NodeJS.ProcessEnv = process.env): string {\n\tif (env.STACKS_NETWORK) return env.STACKS_NETWORK;\n\tif (env.NETWORK) {\n\t\tif (!warnedNetworkFallback) {\n\t\t\twarnedNetworkFallback = true;\n\t\t\tconsole.warn(\"NETWORK is deprecated: set STACKS_NETWORK instead\");\n\t\t}\n\t\treturn env.NETWORK;\n\t}\n\treturn \"mainnet\";\n}\n\n/**\n * True when `NODE_ENV=production`, read at RUNTIME — the single source of truth\n * for prod-vs-dev branching in this package.\n *\n * Why a helper instead of inlining `process.env.NODE_ENV === \"production\"`:\n * bunup/esbuild constant-folds the dot-access `process.env.NODE_ENV` to its\n * BUILD-time value. `@secondlayer/shared` is consumed by other services as its\n * built `dist`, so an inlined check freezes to a literal in the shipped bundle\n * (e.g. `const isProd = false`) and silently ignores the container's real\n * NODE_ENV. The bracket access below is NOT folded, so it stays a runtime read.\n * Route every prod check through here so the footgun lives in exactly one place.\n */\nexport function isProductionEnv(): boolean {\n\t// biome-ignore lint/complexity/useLiteralKeys: bracket access is deliberate — dot-access gets constant-folded by the bundler, freezing this to a build-time literal in the shipped dist.\n\treturn process.env[\"NODE_ENV\"] === \"production\";\n}\n\ntype EnvMap = NodeJS.ProcessEnv;\n\n/**\n * PoX-5 print-event decoder is ON by default (mirrors the sBTC policy).\n * No activation gating needed: pox-5 events cannot exist before the Epoch 4.0\n * hard fork (Bitcoin block 960,230), so pre-activation the decoder idles at\n * tip. Opt out with `POX5_DECODER_ENABLED=false`.\n */\nexport function isPox5DecoderEnabled(env: EnvMap = process.env): boolean {\n\treturn env.POX5_DECODER_ENABLED !== \"false\";\n}\n\n/** Default ON. Opt out with `SBTC_DECODER_ENABLED=false`. */\nexport function isSbtcDecoderEnabled(env: EnvMap = process.env): boolean {\n\treturn env.SBTC_DECODER_ENABLED !== \"false\";\n}\n\n/** Default OFF. Opt in with `BNS_DECODER_ENABLED=true`. */\nexport function isBnsDecoderEnabled(env: EnvMap = process.env): boolean {\n\treturn env.BNS_DECODER_ENABLED === \"true\";\n}\n\n// Export for testing\nexport { envSchema };\n",
|
|
6
6
|
"import { getEnv } from \"./env.ts\";\n\ntype LogLevel = \"debug\" | \"info\" | \"warn\" | \"error\";\n\nconst LOG_LEVELS: Record<LogLevel, number> = {\n\tdebug: 0,\n\tinfo: 1,\n\twarn: 2,\n\terror: 3,\n};\n\nclass Logger {\n\tprivate _level?: LogLevel;\n\tprivate _isProduction?: boolean;\n\tprivate _initialized = false;\n\n\tprivate init() {\n\t\tif (this._initialized) return;\n\t\tthis._initialized = true;\n\t\ttry {\n\t\t\tconst env = getEnv();\n\t\t\tthis._level = env.LOG_LEVEL;\n\t\t\tthis._isProduction = env.NODE_ENV === \"production\";\n\t\t} catch {\n\t\t\t// Fallback when env is unavailable (e.g. tests without DATABASE_URL)\n\t\t\tthis._level = \"info\";\n\t\t\tthis._isProduction = false;\n\t\t}\n\t}\n\n\tprivate get level(): LogLevel {\n\t\tthis.init();\n\t\t// biome-ignore lint/style/noNonNullAssertion: value is non-null after preceding check or by construction; TS narrowing limitation\n\t\treturn this._level!;\n\t}\n\n\tprivate get isProduction(): boolean {\n\t\tthis.init();\n\t\t// biome-ignore lint/style/noNonNullAssertion: value is non-null after preceding check or by construction; TS narrowing limitation\n\t\treturn this._isProduction!;\n\t}\n\n\tprivate shouldLog(level: LogLevel): boolean {\n\t\treturn LOG_LEVELS[level] >= LOG_LEVELS[this.level];\n\t}\n\n\tprivate formatMessage(\n\t\tlevel: LogLevel,\n\t\tmessage: string,\n\t\t// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety\n\t\tmeta?: Record<string, any>,\n\t) {\n\t\tconst timestamp = new Date().toISOString();\n\n\t\tif (this.isProduction) {\n\t\t\t// JSON output for production\n\t\t\treturn JSON.stringify({\n\t\t\t\ttimestamp,\n\t\t\t\tlevel,\n\t\t\t\tmessage,\n\t\t\t\t...meta,\n\t\t\t});\n\t\t}\n\n\t\t// Human-readable output for development\n\t\tconst metaStr = meta ? ` ${JSON.stringify(meta)}` : \"\";\n\t\treturn `[${timestamp}] ${level.toUpperCase()}: ${message}${metaStr}`;\n\t}\n\n\t// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety\n\tdebug(message: string, meta?: Record<string, any>): void {\n\t\tif (this.shouldLog(\"debug\")) {\n\t\t\tconsole.debug(this.formatMessage(\"debug\", message, meta));\n\t\t}\n\t}\n\n\t// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety\n\tinfo(message: string, meta?: Record<string, any>): void {\n\t\tif (this.shouldLog(\"info\")) {\n\t\t\tconsole.info(this.formatMessage(\"info\", message, meta));\n\t\t}\n\t}\n\n\t// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety\n\twarn(message: string, meta?: Record<string, any>): void {\n\t\tif (this.shouldLog(\"warn\")) {\n\t\t\tconsole.warn(this.formatMessage(\"warn\", message, meta));\n\t\t}\n\t}\n\n\t// biome-ignore lint/suspicious/noExplicitAny: interop boundary or dynamic-shape value where typing adds friction without runtime safety\n\terror(message: string, meta?: Record<string, any>): void {\n\t\tif (this.shouldLog(\"error\")) {\n\t\t\tconsole.error(this.formatMessage(\"error\", message, meta));\n\t\t}\n\t}\n}\n\n// Export singleton instance\nexport const logger: Logger = new Logger();\n",
|
|
7
7
|
"import type { Answer, Question } from \"./types.ts\";\n\nconst clamp01 = (n: number) => Math.min(1, Math.max(0, n));\n\n/** (p_max - 1/K) / (1 - 1/K). One option gives 1. */\nexport function choiceConfidence(\n\tprobabilities: Record<string, number>,\n): number {\n\tconst ps = Object.values(probabilities);\n\tconst k = ps.length;\n\tif (k <= 1) return 1;\n\tconst pmax = Math.max(...ps);\n\treturn clamp01((pmax - 1 / k) / (1 - 1 / k));\n}\n\n/** max(0, 1 - E|level - mode| / D); D = mean distance of a uniform\n * distribution over the levels from the middle level. */\nexport function scoreConfidence(\n\tprobabilities: Record<string, number>,\n\tlevels: number,\n): number {\n\tif (levels <= 1) return 1;\n\tlet mode = 0;\n\tlet best = -1;\n\tfor (let i = 0; i < levels; i++) {\n\t\tconst p = probabilities[String(i)] ?? 0;\n\t\tif (p > best) {\n\t\t\tbest = p;\n\t\t\tmode = i;\n\t\t}\n\t}\n\tlet e = 0;\n\tlet d = 0;\n\tfor (let i = 0; i < levels; i++) {\n\t\te += (probabilities[String(i)] ?? 0) * Math.abs(i - mode);\n\t\td += Math.abs(i - (levels - 1) / 2);\n\t}\n\td /= levels;\n\treturn clamp01(1 - e / d);\n}\n\n/** Host-defined: |2p - 1|. Not comparable with choice/score confidence. */\nexport function booleanConfidence(p: number): number {\n\treturn Math.abs(2 * p - 1);\n}\n\n/** Shape of an `ai` DecisionAnswer, or the rules output, before normalizing. */\nexport type RawAnswer =\n\t| { type: \"choice\"; choice: string; probabilities?: Record<string, number> }\n\t| { type: \"score\"; score: number; probabilities?: Record<string, number> }\n\t| { type: \"boolean\"; probability: number }\n\t| { type: \"refusal\" };\n\nexport function normalizeAnswer(question: Question, raw: RawAnswer): Answer {\n\tif (raw.type === \"refusal\") return { type: \"refusal\" };\n\tif (raw.type === \"boolean\" && question.type === \"boolean\") {\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tprobability: raw.probability,\n\t\t\tconfidence: booleanConfidence(raw.probability),\n\t\t};\n\t}\n\tif (raw.type === \"choice\" && question.type === \"choice\") {\n\t\tconst probabilities = raw.probabilities ?? {};\n\t\t// Never fabricate a distribution: no probabilities means confidence 0.\n\t\treturn {\n\t\t\ttype: \"choice\",\n\t\t\tchoice: raw.choice,\n\t\t\tprobabilities,\n\t\t\tconfidence: raw.probabilities ? choiceConfidence(probabilities) : 0,\n\t\t};\n\t}\n\tif (raw.type === \"score\" && question.type === \"score\") {\n\t\tconst probabilities = raw.probabilities ?? {};\n\t\treturn {\n\t\t\ttype: \"score\",\n\t\t\tscore: raw.score,\n\t\t\tprobabilities,\n\t\t\tconfidence: raw.probabilities\n\t\t\t\t? scoreConfidence(probabilities, question.criteria.length)\n\t\t\t\t: 0,\n\t\t};\n\t}\n\treturn { type: \"refusal\" };\n}\n",
|
|
8
8
|
"export type ClassifierName = \"jev\" | \"kev\" | \"clef\" | \"rules\";\n\nexport type Question =\n\t| { type: \"choice\"; instructions: string; criteria: Record<string, string> }\n\t| { type: \"score\"; instructions: string; criteria: readonly string[] }\n\t| {\n\t\t\ttype: \"boolean\";\n\t\t\tinstructions: string;\n\t\t\tcriteria: { true: string; false: string };\n\t };\n\nexport type Answer =\n\t| {\n\t\t\ttype: \"choice\";\n\t\t\tchoice: string;\n\t\t\tprobabilities: Record<string, number>;\n\t\t\tconfidence: number;\n\t }\n\t| {\n\t\t\ttype: \"score\";\n\t\t\tscore: number;\n\t\t\tprobabilities: Record<string, number>;\n\t\t\tconfidence: number;\n\t }\n\t| { type: \"boolean\"; probability: number; confidence: number }\n\t| { type: \"refusal\" };\n\nexport type Answers<Q extends Record<string, Question>> = {\n\t[K in keyof Q]: Answer;\n};\n\nexport type ClassifyResult<Q extends Record<string, Question>> = {\n\tprovider: ClassifierName;\n\t/** response.modelId when the backend reports one. */\n\tmodelId: string;\n\tanswers: Answers<Q>;\n};\n\n/** Deterministic answers for the offline provider. Return a value per question\n * it can decide; omitted questions come back as `{ type: \"refusal\" }`. */\nexport type RuleValue =\n\t| string /* choice option */\n\t| number /* score level index */\n\t| boolean;\nexport type RulesFn<Q extends Record<string, Question>> = (\n\tstate: string | Record<string, unknown>,\n) => { [K in keyof Q]?: RuleValue } | null;\n\nexport class ClassifierInputError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"ClassifierInputError\";\n\t}\n}\n",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"import type { Answer, Answers, Question, RuleValue, RulesFn } from \"./types.ts\";\n\nfunction answerFor(question: Question, value: RuleValue | undefined): Answer {\n\tif (value === undefined) return { type: \"refusal\" };\n\tif (question.type === \"choice\") {\n\t\tif (typeof value !== \"string\" || !(value in question.criteria)) {\n\t\t\treturn { type: \"refusal\" };\n\t\t}\n\t\tconst probabilities = Object.fromEntries(\n\t\t\tObject.keys(question.criteria).map((k) => [k, k === value ? 1 : 0]),\n\t\t);\n\t\treturn { type: \"choice\", choice: value, probabilities, confidence: 1 };\n\t}\n\tif (question.type === \"score\") {\n\t\tconst n = question.criteria.length;\n\t\tif (typeof value !== \"number\" || !Number.isInteger(value)) {\n\t\t\treturn { type: \"refusal\" };\n\t\t}\n\t\tif (value < 0 || value >= n) return { type: \"refusal\" };\n\t\tconst probabilities = Object.fromEntries(\n\t\t\tArray.from({ length: n }, (_, i) => [String(i), i === value ? 1 : 0]),\n\t\t);\n\t\treturn { type: \"score\", score: value, probabilities, confidence: 1 };\n\t}\n\tif (typeof value !== \"boolean\") return { type: \"refusal\" };\n\treturn { type: \"boolean\", probability: value ? 1 : 0, confidence: 1 };\n}\n\n/** Offline provider: deterministic, never touches the network. */\nexport function runRules<Q extends Record<string, Question>>(\n\tquestions: Q,\n\tfn: RulesFn<Q>,\n\tstate: string | Record<string, unknown>,\n): Answers<Q> {\n\tconst values = fn(state) ?? {};\n\tconst out: Record<string, Answer> = {};\n\tfor (const id of Object.keys(questions)) {\n\t\tout[id] = answerFor(\n\t\t\tquestions[id] as Question,\n\t\t\t(values as Record<string, RuleValue | undefined>)[id],\n\t\t);\n\t}\n\treturn out as Answers<Q>;\n}\n",
|
|
13
13
|
"import { logger } from \"../logger.ts\";\nimport { type RawAnswer, normalizeAnswer } from \"./confidence.ts\";\nimport { MAX_STATE_CHARS, stateSize, validateQuestions } from \"./limits.ts\";\nimport {\n\tDEFAULT_MODEL,\n\tbuildModel,\n\tenvModel,\n\tresolveProvider,\n} from \"./providers.ts\";\nimport { runRules } from \"./rules.ts\";\nimport type {\n\tAnswers,\n\tClassifierName,\n\tClassifyResult,\n\tQuestion,\n\tRulesFn,\n} from \"./types.ts\";\n\n/**\n * One classifier call over jev, kev, clef or offline rules.\n * Returns null on any provider failure (fail-open: callers decide what null\n * means). Only ClassifierInputError, a bad question definition, escapes.\n * Never logs state or response bodies.\n */\nexport async function classify<\n\tconst Q extends Record<string, Question>,\n>(input: {\n\tstate: string | Record<string, unknown>;\n\tquestions: Q;\n\trules?: RulesFn<Q>;\n\t/** Overrides resolveProvider(); used by classifier-compare. */\n\tprovider?: ClassifierName;\n\t/** Overrides CLASSIFIER_MODEL / the provider default. */\n\tmodelId?: string;\n\t/** Default 5000. */\n\ttimeoutMs?: number;\n\tenv?: Record<string, string | undefined>;\n\t/** Tests only (kev/clef). */\n\tfetchImpl?: typeof fetch;\n}): Promise<ClassifyResult<Q> | null> {\n\tvalidateQuestions(input.questions);\n\tconst env = input.env ?? process.env;\n\tconst resolved = resolveProvider(env);\n\tconst name = input.provider ?? resolved.name;\n\tif (name === \"rules\") {\n\t\tif (!input.rules) return null;\n\t\treturn {\n\t\t\tprovider: \"rules\",\n\t\t\tmodelId: \"rules\",\n\t\t\tanswers: runRules(input.questions, input.rules, input.state),\n\t\t};\n\t}\n\t// An explicit provider override ignores CLASSIFIER_MODEL (it pins one backend).\n\tconst modelId =\n\t\tinput.modelId ??\n\t\t(input.provider ? undefined : envModel(env)) ??\n\t\tDEFAULT_MODEL[name];\n\n\tif (stateSize(input.state) > MAX_STATE_CHARS) {\n\t\tlogger.warn(`classifier: state over ${MAX_STATE_CHARS} chars; skipped`);\n\t\treturn null;\n\t}\n\ttry {\n\t\tconst { experimental_decide: decide } = await import(\"ai\");\n\t\tconst r = await decide({\n\t\t\tmodel: buildModel(name, modelId, env, input.fetchImpl),\n\t\t\tstate: input.state as string,\n\t\t\t// Our Question is a structural subset of the SDK's question type.\n\t\t\tquestions: input.questions as Parameters<typeof decide>[0][\"questions\"],\n\t\t\tmaxRetries: 1,\n\t\t\tabortSignal: AbortSignal.timeout(input.timeoutMs ?? 5000),\n\t\t});\n\t\tconst answers: Record<string, ReturnType<typeof normalizeAnswer>> = {};\n\t\tfor (const id of Object.keys(input.questions)) {\n\t\t\tanswers[id] = normalizeAnswer(\n\t\t\t\tinput.questions[id] as Question,\n\t\t\t\t(r.answers as Record<string, RawAnswer>)[id] ?? { type: \"refusal\" },\n\t\t\t);\n\t\t}\n\t\treturn {\n\t\t\tprovider: name,\n\t\t\tmodelId: r.response.modelId ?? modelId,\n\t\t\tanswers: answers as Answers<Q>,\n\t\t};\n\t} catch (err) {\n\t\tlogger.warn(\n\t\t\t`classifier: ${name} failed: ${err instanceof Error ? err.name : \"error\"}`,\n\t\t);\n\t\treturn null;\n\t}\n}\n"
|
|
14
14
|
],
|
|
15
|
-
"mappings": ";AAAA;AAGA,IAAM,iBAAiB,EAAE,OAAO,EAAE,UAAU,CAAC,QAAQ;AAAA,EACpD,MAAM,WAAW,IACf,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,OAAO,OAAO;AAAA,EAChB,MAAM,QAAQ,CAAC,WAAW,SAAS;AAAA,EACnC,WAAW,KAAK,UAAU;AAAA,IACzB,IAAI,CAAC,MAAM,SAAS,CAAC,GAAG;AAAA,MACvB,MAAM,IAAI,MACT,oBAAoB,sBAAsB,MAAM,KAAK,IAAI,GAC1D;AAAA,IACD;AAAA,EACD;AAAA,EACA,OAAO;AAAA,CACP;AAsBD,IAAM,YAAwC,EAAE,OAAO;AAAA,EACtD,cAAc,EAAE,WACf,CAAC,QAAS,OAAO,QAAQ,YAAY,IAAI,WAAW,IAAI,YAAY,KACpE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAC3B;AAAA,EACA,qBAAqB,EAAE,WACtB,CAAC,QAAS,OAAO,QAAQ,YAAY,IAAI,WAAW,IAAI,YAAY,KACpE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAC3B;AAAA,EACA,qBAAqB,EAAE,WACtB,CAAC,QAAS,OAAO,QAAQ,YAAY,IAAI,WAAW,IAAI,YAAY,KACpE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAC3B;AAAA,EACA,SAAS,EAAE,KAAK,CAAC,WAAW,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UAAU,CACnE;AAAA,IACD;AAAA,IACA,OAAO;AAAA,MACN,UAAU;AAAA,MACV,SAAS,EAAE,SAAS,WAAW;AAAA,MAC/B;AAAA,IACD;AAAA,IACC,OAAO,KAAK;AAAA,IACb,OAAO,KACN,eAAe,gBAAgB,eAAe,QAAQ,IAAI,OAAO,SAClE;AAAA,IACA,OAAO;AAAA;AAAA;",
|
|
16
|
+
"debugId": "5FC6CC3812F1D71A64756E2164756E21",
|
|
17
17
|
"names": []
|
|
18
18
|
}
|
|
@@ -803,41 +803,6 @@ interface ChainReorgsTable {
|
|
|
803
803
|
new_canonical_event_index: number;
|
|
804
804
|
created_at: Generated<Date>;
|
|
805
805
|
}
|
|
806
|
-
type Pox4FunctionName = "stack-stx" | "delegate-stx" | "stack-extend" | "stack-increase" | "revoke-delegate-stx" | "delegate-stack-stx" | "delegate-stack-extend" | "delegate-stack-increase" | "stack-aggregation-commit" | "stack-aggregation-commit-indexed" | "stack-aggregation-increase" | "set-signer-key-authorization";
|
|
807
|
-
interface Pox4CallsTable {
|
|
808
|
-
cursor: string;
|
|
809
|
-
block_height: number;
|
|
810
|
-
block_time: Date;
|
|
811
|
-
burn_block_height: number;
|
|
812
|
-
tx_id: string;
|
|
813
|
-
tx_index: number;
|
|
814
|
-
function_name: Pox4FunctionName;
|
|
815
|
-
caller: string;
|
|
816
|
-
stacker: string | null;
|
|
817
|
-
delegate_to: string | null;
|
|
818
|
-
amount_ustx: string | null;
|
|
819
|
-
lock_period: number | null;
|
|
820
|
-
pox_addr_version: number | null;
|
|
821
|
-
pox_addr_hashbytes: string | null;
|
|
822
|
-
pox_addr_btc: string | null;
|
|
823
|
-
start_cycle: number | null;
|
|
824
|
-
end_cycle: number | null;
|
|
825
|
-
signer_key: string | null;
|
|
826
|
-
signer_signature: string | null;
|
|
827
|
-
auth_id: string | null;
|
|
828
|
-
max_amount: string | null;
|
|
829
|
-
reward_cycle: number | null;
|
|
830
|
-
aggregated_amount_ustx: string | null;
|
|
831
|
-
aggregated_signer_index: number | null;
|
|
832
|
-
auth_period: number | null;
|
|
833
|
-
auth_topic: string | null;
|
|
834
|
-
auth_allowed: boolean | null;
|
|
835
|
-
result_ok: boolean;
|
|
836
|
-
result_raw: string;
|
|
837
|
-
canonical: Generated<boolean>;
|
|
838
|
-
source_cursor: string;
|
|
839
|
-
created_at: Generated<Date>;
|
|
840
|
-
}
|
|
841
806
|
type Pox5EventTopic = "set-bond-admin" | "set-pause-admin" | "pause-rewards" | "setup-bond" | "add-to-allowlist" | "register-for-bond" | "update-bond-registration" | "register-signer" | "stake" | "stake-update" | "announce-l1-early-exit" | "unstake-sbtc" | "unstake" | "calculate-rewards" | "bond-distribution" | "claim-rewards" | "claim-staker-rewards-for-signer" | "grant-signer-key" | "revoke-signer-grant";
|
|
842
807
|
interface Pox5EventsTable {
|
|
843
808
|
cursor: string;
|
|
@@ -1255,7 +1220,6 @@ interface Database {
|
|
|
1255
1220
|
decoded_events: DecodedEventsTable;
|
|
1256
1221
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
1257
1222
|
chain_reorgs: ChainReorgsTable;
|
|
1258
|
-
pox4_calls: Pox4CallsTable;
|
|
1259
1223
|
pox5_events: Pox5EventsTable;
|
|
1260
1224
|
pox5_cycles: Pox5CyclesTable;
|
|
1261
1225
|
pox5_cycle_signers: Pox5CycleSignersTable;
|
|
@@ -86,9 +86,6 @@ function stacksNetwork(env = process.env) {
|
|
|
86
86
|
function isProductionEnv() {
|
|
87
87
|
return process.env["NODE_ENV"] === "production";
|
|
88
88
|
}
|
|
89
|
-
function isPox4DecoderEnabled(env = process.env) {
|
|
90
|
-
return env.POX4_DECODER_ENABLED !== "false";
|
|
91
|
-
}
|
|
92
89
|
function isPox5DecoderEnabled(env = process.env) {
|
|
93
90
|
return env.POX5_DECODER_ENABLED !== "false";
|
|
94
91
|
}
|
|
@@ -216,5 +213,5 @@ export {
|
|
|
216
213
|
verifySecondlayerSignatureValues
|
|
217
214
|
};
|
|
218
215
|
|
|
219
|
-
//# debugId=
|
|
216
|
+
//# debugId=04F4D799DC9A287B64756E2164756E21
|
|
220
217
|
//# sourceMappingURL=secondlayer-webhook.js.map
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/env.ts", "../src/crypto/ed25519.ts", "../src/crypto/secondlayer-webhook.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { z } from \"zod\";\n\n// Parse comma-separated networks\nconst networksSchema = z.string().transform((val) => {\n\tconst networks = val\n\t\t.split(\",\")\n\t\t.map((n) => n.trim())\n\t\t.filter(Boolean);\n\tconst valid = [\"mainnet\", \"testnet\"];\n\tfor (const n of networks) {\n\t\tif (!valid.includes(n)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invalid network: ${n}. Must be one of: ${valid.join(\", \")}`,\n\t\t\t);\n\t\t}\n\t}\n\treturn networks as (\"mainnet\" | \"testnet\")[];\n});\n\ninterface EnvSchemaOutput {\n\tDATABASE_URL?: string;\n\t/**\n\t * Shared indexer DB (blocks/txs/events). Falls back to DATABASE_URL.\n\t * Set this alongside TARGET_DATABASE_URL to enable dual-DB mode.\n\t */\n\tSOURCE_DATABASE_URL?: string;\n\t/**\n\t * Tenant DB (subgraph schemas + subgraphs table). Falls back to DATABASE_URL.\n\t * Set this alongside SOURCE_DATABASE_URL to enable dual-DB mode.\n\t */\n\tTARGET_DATABASE_URL?: string;\n\tNETWORK?: \"mainnet\" | \"testnet\";\n\tNETWORKS?: (\"mainnet\" | \"testnet\")[];\n\tLOG_LEVEL: \"debug\" | \"info\" | \"warn\" | \"error\";\n\tNODE_ENV: \"development\" | \"production\" | \"test\";\n}\n\n// Cast needed: z.preprocess / z.default create different _input vs _output types\n// that z.ZodType<T> can't represent without explicit input type param\nconst envSchema: z.ZodType<EnvSchemaOutput> = z.object({\n\tDATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tSOURCE_DATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tTARGET_DATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tNETWORK: z.enum([\"mainnet\", \"testnet\"]).optional(),\n\tNETWORKS: networksSchema.optional(),\n\tLOG_LEVEL: z.enum([\"debug\", \"info\", \"warn\", \"error\"]).default(\"info\"),\n\tNODE_ENV: z\n\t\t.enum([\"development\", \"production\", \"test\"])\n\t\t.default(\"development\"),\n}) as unknown as z.ZodType<EnvSchemaOutput>;\n\nexport type Env = EnvSchemaOutput & {\n\tenabledNetworks: (\"mainnet\" | \"testnet\")[];\n};\n\nlet cachedEnv: Env | null = null;\n\nexport function getEnv(): Env {\n\tif (cachedEnv) {\n\t\treturn cachedEnv;\n\t}\n\n\tconst result = envSchema.safeParse(process.env);\n\n\tif (!result.success) {\n\t\tconsole.error(\"❌ Invalid environment configuration:\");\n\t\tconsole.error(z.treeifyError(result.error));\n\t\tthrow new Error(\"Invalid environment configuration\");\n\t}\n\n\t// Compute enabled networks from NETWORKS or NETWORK\n\tlet enabledNetworks: (\"mainnet\" | \"testnet\")[];\n\tif (result.data.NETWORKS && result.data.NETWORKS.length > 0) {\n\t\tenabledNetworks = result.data.NETWORKS;\n\t} else if (result.data.NETWORK) {\n\t\tenabledNetworks = [result.data.NETWORK];\n\t} else {\n\t\tconst named = stacksNetwork();\n\t\tenabledNetworks = named === \"testnet\" ? [\"testnet\"] : [\"mainnet\"];\n\t}\n\n\tcachedEnv = { ...result.data, enabledNetworks };\n\treturn cachedEnv;\n}\n\nlet warnedNetworkFallback = false;\n\n/**\n * The Stacks network this process serves, and the only place that decides it:\n * `STACKS_NETWORK`, else the deprecated `NETWORK` (warned once so a deployment\n * that only sets it is not silently re-keyed), else mainnet. Not validated;\n * `instanceNetworkFromEnv` is the strict form.\n */\nexport function stacksNetwork(env: NodeJS.ProcessEnv = process.env): string {\n\tif (env.STACKS_NETWORK) return env.STACKS_NETWORK;\n\tif (env.NETWORK) {\n\t\tif (!warnedNetworkFallback) {\n\t\t\twarnedNetworkFallback = true;\n\t\t\tconsole.warn(\"NETWORK is deprecated: set STACKS_NETWORK instead\");\n\t\t}\n\t\treturn env.NETWORK;\n\t}\n\treturn \"mainnet\";\n}\n\n/**\n * True when `NODE_ENV=production`, read at RUNTIME — the single source of truth\n * for prod-vs-dev branching in this package.\n *\n * Why a helper instead of inlining `process.env.NODE_ENV === \"production\"`:\n * bunup/esbuild constant-folds the dot-access `process.env.NODE_ENV` to its\n * BUILD-time value. `@secondlayer/shared` is consumed by other services as its\n * built `dist`, so an inlined check freezes to a literal in the shipped bundle\n * (e.g. `const isProd = false`) and silently ignores the container's real\n * NODE_ENV. The bracket access below is NOT folded, so it stays a runtime read.\n * Route every prod check through here so the footgun lives in exactly one place.\n */\nexport function isProductionEnv(): boolean {\n\t// biome-ignore lint/complexity/useLiteralKeys: bracket access is deliberate — dot-access gets constant-folded by the bundler, freezing this to a build-time literal in the shipped dist.\n\treturn process.env[\"NODE_ENV\"] === \"production\";\n}\n\ntype EnvMap = NodeJS.ProcessEnv;\n\n/**\n * PoX-
|
|
5
|
+
"import { z } from \"zod\";\n\n// Parse comma-separated networks\nconst networksSchema = z.string().transform((val) => {\n\tconst networks = val\n\t\t.split(\",\")\n\t\t.map((n) => n.trim())\n\t\t.filter(Boolean);\n\tconst valid = [\"mainnet\", \"testnet\"];\n\tfor (const n of networks) {\n\t\tif (!valid.includes(n)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invalid network: ${n}. Must be one of: ${valid.join(\", \")}`,\n\t\t\t);\n\t\t}\n\t}\n\treturn networks as (\"mainnet\" | \"testnet\")[];\n});\n\ninterface EnvSchemaOutput {\n\tDATABASE_URL?: string;\n\t/**\n\t * Shared indexer DB (blocks/txs/events). Falls back to DATABASE_URL.\n\t * Set this alongside TARGET_DATABASE_URL to enable dual-DB mode.\n\t */\n\tSOURCE_DATABASE_URL?: string;\n\t/**\n\t * Tenant DB (subgraph schemas + subgraphs table). Falls back to DATABASE_URL.\n\t * Set this alongside SOURCE_DATABASE_URL to enable dual-DB mode.\n\t */\n\tTARGET_DATABASE_URL?: string;\n\tNETWORK?: \"mainnet\" | \"testnet\";\n\tNETWORKS?: (\"mainnet\" | \"testnet\")[];\n\tLOG_LEVEL: \"debug\" | \"info\" | \"warn\" | \"error\";\n\tNODE_ENV: \"development\" | \"production\" | \"test\";\n}\n\n// Cast needed: z.preprocess / z.default create different _input vs _output types\n// that z.ZodType<T> can't represent without explicit input type param\nconst envSchema: z.ZodType<EnvSchemaOutput> = z.object({\n\tDATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tSOURCE_DATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tTARGET_DATABASE_URL: z.preprocess(\n\t\t(val) => (typeof val === \"string\" && val.length === 0 ? undefined : val),\n\t\tz.string().url().optional(),\n\t),\n\tNETWORK: z.enum([\"mainnet\", \"testnet\"]).optional(),\n\tNETWORKS: networksSchema.optional(),\n\tLOG_LEVEL: z.enum([\"debug\", \"info\", \"warn\", \"error\"]).default(\"info\"),\n\tNODE_ENV: z\n\t\t.enum([\"development\", \"production\", \"test\"])\n\t\t.default(\"development\"),\n}) as unknown as z.ZodType<EnvSchemaOutput>;\n\nexport type Env = EnvSchemaOutput & {\n\tenabledNetworks: (\"mainnet\" | \"testnet\")[];\n};\n\nlet cachedEnv: Env | null = null;\n\nexport function getEnv(): Env {\n\tif (cachedEnv) {\n\t\treturn cachedEnv;\n\t}\n\n\tconst result = envSchema.safeParse(process.env);\n\n\tif (!result.success) {\n\t\tconsole.error(\"❌ Invalid environment configuration:\");\n\t\tconsole.error(z.treeifyError(result.error));\n\t\tthrow new Error(\"Invalid environment configuration\");\n\t}\n\n\t// Compute enabled networks from NETWORKS or NETWORK\n\tlet enabledNetworks: (\"mainnet\" | \"testnet\")[];\n\tif (result.data.NETWORKS && result.data.NETWORKS.length > 0) {\n\t\tenabledNetworks = result.data.NETWORKS;\n\t} else if (result.data.NETWORK) {\n\t\tenabledNetworks = [result.data.NETWORK];\n\t} else {\n\t\tconst named = stacksNetwork();\n\t\tenabledNetworks = named === \"testnet\" ? [\"testnet\"] : [\"mainnet\"];\n\t}\n\n\tcachedEnv = { ...result.data, enabledNetworks };\n\treturn cachedEnv;\n}\n\nlet warnedNetworkFallback = false;\n\n/**\n * The Stacks network this process serves, and the only place that decides it:\n * `STACKS_NETWORK`, else the deprecated `NETWORK` (warned once so a deployment\n * that only sets it is not silently re-keyed), else mainnet. Not validated;\n * `instanceNetworkFromEnv` is the strict form.\n */\nexport function stacksNetwork(env: NodeJS.ProcessEnv = process.env): string {\n\tif (env.STACKS_NETWORK) return env.STACKS_NETWORK;\n\tif (env.NETWORK) {\n\t\tif (!warnedNetworkFallback) {\n\t\t\twarnedNetworkFallback = true;\n\t\t\tconsole.warn(\"NETWORK is deprecated: set STACKS_NETWORK instead\");\n\t\t}\n\t\treturn env.NETWORK;\n\t}\n\treturn \"mainnet\";\n}\n\n/**\n * True when `NODE_ENV=production`, read at RUNTIME — the single source of truth\n * for prod-vs-dev branching in this package.\n *\n * Why a helper instead of inlining `process.env.NODE_ENV === \"production\"`:\n * bunup/esbuild constant-folds the dot-access `process.env.NODE_ENV` to its\n * BUILD-time value. `@secondlayer/shared` is consumed by other services as its\n * built `dist`, so an inlined check freezes to a literal in the shipped bundle\n * (e.g. `const isProd = false`) and silently ignores the container's real\n * NODE_ENV. The bracket access below is NOT folded, so it stays a runtime read.\n * Route every prod check through here so the footgun lives in exactly one place.\n */\nexport function isProductionEnv(): boolean {\n\t// biome-ignore lint/complexity/useLiteralKeys: bracket access is deliberate — dot-access gets constant-folded by the bundler, freezing this to a build-time literal in the shipped dist.\n\treturn process.env[\"NODE_ENV\"] === \"production\";\n}\n\ntype EnvMap = NodeJS.ProcessEnv;\n\n/**\n * PoX-5 print-event decoder is ON by default (mirrors the sBTC policy).\n * No activation gating needed: pox-5 events cannot exist before the Epoch 4.0\n * hard fork (Bitcoin block 960,230), so pre-activation the decoder idles at\n * tip. Opt out with `POX5_DECODER_ENABLED=false`.\n */\nexport function isPox5DecoderEnabled(env: EnvMap = process.env): boolean {\n\treturn env.POX5_DECODER_ENABLED !== \"false\";\n}\n\n/** Default ON. Opt out with `SBTC_DECODER_ENABLED=false`. */\nexport function isSbtcDecoderEnabled(env: EnvMap = process.env): boolean {\n\treturn env.SBTC_DECODER_ENABLED !== \"false\";\n}\n\n/** Default OFF. Opt in with `BNS_DECODER_ENABLED=true`. */\nexport function isBnsDecoderEnabled(env: EnvMap = process.env): boolean {\n\treturn env.BNS_DECODER_ENABLED === \"true\";\n}\n\n// Export for testing\nexport { envSchema };\n",
|
|
6
6
|
"import {\n\ttype KeyObject,\n\tcreateHash,\n\tcreatePrivateKey,\n\tcreatePublicKey,\n\tgenerateKeyPairSync,\n\tsign as nodeSign,\n\tverify as nodeVerify,\n} from \"node:crypto\";\n\n/**\n * Asymmetric ed25519 signing for Streams response proofs.\n *\n * Asymmetric (not HMAC) so the proof is real: only the server holds the private\n * key, and any consumer verifies with the published public key — no shared\n * secret to leak. ed25519 uses node's `sign`/`verify` with a `null` algorithm.\n * Keys are PEM (PKCS8 private / SPKI public) for env transport; load once and\n * reuse the KeyObject on hot paths.\n */\n\nexport function generateEd25519KeyPair(): {\n\tprivateKeyPem: string;\n\tpublicKeyPem: string;\n} {\n\tconst { privateKey, publicKey } = generateKeyPairSync(\"ed25519\");\n\treturn {\n\t\tprivateKeyPem: privateKey\n\t\t\t.export({ format: \"pem\", type: \"pkcs8\" })\n\t\t\t.toString(),\n\t\tpublicKeyPem: publicKey.export({ format: \"pem\", type: \"spki\" }).toString(),\n\t};\n}\n\nexport function loadEd25519PrivateKey(pem: string): KeyObject {\n\treturn createPrivateKey(pem);\n}\n\nexport function loadEd25519PublicKey(pem: string): KeyObject {\n\treturn createPublicKey(pem);\n}\n\nexport function publicKeyPemFromPrivate(privateKeyPem: string): string {\n\treturn createPublicKey(createPrivateKey(privateKeyPem))\n\t\t.export({ format: \"pem\", type: \"spki\" })\n\t\t.toString();\n}\n\n/** Stable short id for a public key (rotation hint via X-Signature-KeyId). */\nexport function ed25519KeyId(publicKeyPem: string): string {\n\tconst der = createPublicKey(publicKeyPem).export({\n\t\tformat: \"der\",\n\t\ttype: \"spki\",\n\t});\n\treturn createHash(\"sha256\").update(der).digest(\"base64url\").slice(0, 16);\n}\n\nexport function signEd25519(payload: string, privateKey: KeyObject): string {\n\treturn nodeSign(null, Buffer.from(payload, \"utf8\"), privateKey).toString(\n\t\t\"base64\",\n\t);\n}\n\nexport function verifyEd25519(\n\tpayload: string,\n\tsignatureBase64: string,\n\tpublicKey: KeyObject,\n): boolean {\n\ttry {\n\t\treturn nodeVerify(\n\t\t\tnull,\n\t\t\tBuffer.from(payload, \"utf8\"),\n\t\t\tpublicKey,\n\t\t\tBuffer.from(signatureBase64, \"base64\"),\n\t\t);\n\t} catch {\n\t\treturn false;\n\t}\n}\n",
|
|
7
7
|
"import { isProductionEnv } from \"../env.ts\";\nimport {\n\ted25519KeyId,\n\tloadEd25519PrivateKey,\n\tloadEd25519PublicKey,\n\tpublicKeyPemFromPrivate,\n\tsignEd25519,\n\tverifyEd25519,\n} from \"./ed25519.ts\";\n\n/**\n * Universal Secondlayer webhook authenticity — an ed25519 signature attached to\n * EVERY delivery regardless of body format.\n *\n * Only the `standard-webhooks` format carries an HMAC; `raw`/`cloudevents`/etc.\n * carried no Secondlayer proof, so a receiver had no way to know a payload came\n * from us. This signs each delivery with a single platform ed25519 key so any\n * receiver verifies with the published public key — no per-webhook secret,\n * and the body shape stays format-specific.\n *\n * Header names are lowercase to match the format builders' header maps (HTTP\n * header names are case-insensitive on the wire).\n */\nexport const WEBHOOK_ID_HEADER = \"webhook-id\";\nexport const SECONDLAYER_SIGNATURE_HEADER = \"x-secondlayer-signature\";\nexport const SECONDLAYER_KEY_ID_HEADER = \"x-secondlayer-signature-keyid\";\n\nexport type SecondlayerWebhookSigner = {\n\tkeyId: string;\n\tpublicKeyPem: string;\n\tsign(payload: string): string;\n};\n\nlet cached: SecondlayerWebhookSigner | null | undefined;\n\nfunction signingKeyFromEnv(): string | undefined {\n\t// A dedicated webhook key if provided, else the platform Streams key — both\n\t// are the same ed25519 \"single platform identity\", so reusing it keeps key\n\t// distribution to one published public key.\n\treturn (\n\t\tprocess.env.SECONDLAYER_WEBHOOK_SIGNING_PRIVATE_KEY ||\n\t\tprocess.env.STREAMS_SIGNING_PRIVATE_KEY ||\n\t\tundefined\n\t);\n}\n\n/**\n * Memoized webhook signer, or null when no key is configured (signing is then a\n * no-op, so the universal header is safe to ship before a key is provisioned).\n */\nexport function getSecondlayerWebhookSigner(): SecondlayerWebhookSigner | null {\n\tif (cached !== undefined) return cached;\n\tconst raw = signingKeyFromEnv();\n\tif (!raw) {\n\t\tcached = null;\n\t\treturn null;\n\t}\n\t// Env transport often escapes newlines; restore real PEM line breaks.\n\tconst pem = raw.includes(\"\\\\n\") ? raw.replace(/\\\\n/g, \"\\n\") : raw;\n\tconst privateKey = loadEd25519PrivateKey(pem);\n\tconst publicKeyPem = publicKeyPemFromPrivate(pem);\n\tcached = {\n\t\tkeyId: ed25519KeyId(publicKeyPem),\n\t\tpublicKeyPem,\n\t\tsign: (payload) => signEd25519(payload, privateKey),\n\t};\n\treturn cached;\n}\n\n/** Reset the memoized signer. Tests only. */\nexport function resetSecondlayerWebhookSignerForTest(): void {\n\tcached = undefined;\n}\n\n/**\n * Boot-time guard for any service whose job is to DELIVER signed webhooks (the\n * webhook-processor). We market every delivery as carrying a verifiable\n * ed25519 signature; if no signing key is configured the signer is a silent\n * no-op and deliveries ship UNSIGNED. That's worse than a missing feature — a\n * partner's verify step fails on data we told them was signed.\n *\n * Unlike `assertDbSplit` (fail-soft: only ever logs), this is fail-HARD in prod:\n * refuse to boot so the misconfig surfaces as a crash-loop instead of unsigned\n * traffic. Keep the throw — don't \"soften\" it back to a warning. Set\n * `ALLOW_UNSIGNED_WEBHOOKS=true` to opt out (self-host / intentional unsigned),\n * which logs the posture loudly in every env so it's never silent.\n */\nexport function assertWebhookSigningConfigured(): void {\n\tif (getSecondlayerWebhookSigner()) return;\n\n\tconst optedOut = process.env.ALLOW_UNSIGNED_WEBHOOKS === \"true\";\n\t// isProductionEnv() reads NODE_ENV at runtime; do NOT inline a\n\t// `process.env.NODE_ENV` check — the bundler constant-folds it and the prod\n\t// throw would silently die in the shipped dist. See env.ts for the why.\n\tconst isProd = isProductionEnv();\n\tconst msg =\n\t\t\"No webhook signing key (SECONDLAYER_WEBHOOK_SIGNING_PRIVATE_KEY / STREAMS_SIGNING_PRIVATE_KEY) — deliveries would ship UNSIGNED while we market signed webhooks\";\n\n\tif (optedOut) {\n\t\tconsole.warn(`⚠️ ${msg}; continuing because ALLOW_UNSIGNED_WEBHOOKS=true`);\n\t\treturn;\n\t}\n\tif (isProd) {\n\t\tthrow new Error(\n\t\t\t`${msg}. Refusing to boot. Set the signing key, or ALLOW_UNSIGNED_WEBHOOKS=true to override.`,\n\t\t);\n\t}\n\tconsole.warn(`⚠️ ${msg} (non-prod: continuing)`);\n}\n\n/**\n * The exact bytes the signature covers: `${webhookId}.${body}`. Binding the id\n * into the signed content stops a captured body from being replayed under a\n * different delivery id.\n */\nfunction signedContent(webhookId: string, body: string): string {\n\treturn `${webhookId}.${body}`;\n}\n\n/**\n * Build the universal authenticity headers for a delivery. Returns null when no\n * signing key is configured (caller leaves the delivery unsigned).\n */\nexport function signSecondlayerWebhook(\n\twebhookId: string,\n\tbody: string,\n): Record<string, string> | null {\n\tconst signer = getSecondlayerWebhookSigner();\n\tif (!signer) return null;\n\treturn {\n\t\t[WEBHOOK_ID_HEADER]: webhookId,\n\t\t[SECONDLAYER_SIGNATURE_HEADER]: signer.sign(signedContent(webhookId, body)),\n\t\t[SECONDLAYER_KEY_ID_HEADER]: signer.keyId,\n\t};\n}\n\n/**\n * Verify a delivery's ed25519 signature over `${webhookId}.${rawBody}` against\n * the published public key. Low-level (raw values); receivers use the SDK's\n * `verifySecondlayerSignature`, which extracts the headers ergonomically.\n */\nexport function verifySecondlayerSignatureValues(\n\trawBody: string,\n\twebhookId: string | undefined,\n\tsignatureBase64: string | undefined,\n\tpublicKeyPem: string,\n): boolean {\n\tif (!webhookId || !signatureBase64) return false;\n\tconst publicKey = loadEd25519PublicKey(publicKeyPem);\n\treturn verifyEd25519(\n\t\tsignedContent(webhookId, rawBody),\n\t\tsignatureBase64,\n\t\tpublicKey,\n\t);\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA,IAAM,iBAAiB,EAAE,OAAO,EAAE,UAAU,CAAC,QAAQ;AAAA,EACpD,MAAM,WAAW,IACf,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,OAAO,OAAO;AAAA,EAChB,MAAM,QAAQ,CAAC,WAAW,SAAS;AAAA,EACnC,WAAW,KAAK,UAAU;AAAA,IACzB,IAAI,CAAC,MAAM,SAAS,CAAC,GAAG;AAAA,MACvB,MAAM,IAAI,MACT,oBAAoB,sBAAsB,MAAM,KAAK,IAAI,GAC1D;AAAA,IACD;AAAA,EACD;AAAA,EACA,OAAO;AAAA,CACP;AAsBD,IAAM,YAAwC,EAAE,OAAO;AAAA,EACtD,cAAc,EAAE,WACf,CAAC,QAAS,OAAO,QAAQ,YAAY,IAAI,WAAW,IAAI,YAAY,KACpE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAC3B;AAAA,EACA,qBAAqB,EAAE,WACtB,CAAC,QAAS,OAAO,QAAQ,YAAY,IAAI,WAAW,IAAI,YAAY,KACpE,EAAE,OAAO,E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AED,IAAI,UAAU;AAAA,IACb,QAAQ,KAAK,OAAO,sDAAsD;AAAA,IAC1E;AAAA,EACD;AAAA,EACA,IAAI,QAAQ;AAAA,IACX,MAAM,IAAI,MACT,GAAG,0FACJ;AAAA,EACD;AAAA,EACA,QAAQ,KAAK,OAAO,4BAA4B;AAAA;AAQjD,SAAS,aAAa,CAAC,WAAmB,MAAsB;AAAA,EAC/D,OAAO,GAAG,aAAa;AAAA;AAOjB,SAAS,sBAAsB,CACrC,WACA,MACgC;AAAA,EAChC,MAAM,SAAS,4BAA4B;AAAA,EAC3C,IAAI,CAAC;AAAA,IAAQ,OAAO;AAAA,EACpB,OAAO;AAAA,KACL,oBAAoB;AAAA,KACpB,+BAA+B,OAAO,KAAK,cAAc,WAAW,IAAI,CAAC;AAAA,KACzE,4BAA4B,OAAO;AAAA,EACrC;AAAA;AAQM,SAAS,gCAAgC,CAC/C,SACA,WACA,iBACA,cACU;AAAA,EACV,IAAI,CAAC,aAAa,CAAC;AAAA,IAAiB,OAAO;AAAA,EAC3C,MAAM,YAAY,qBAAqB,YAAY;AAAA,EACnD,OAAO,cACN,cAAc,WAAW,OAAO,GAChC,iBACA,SACD;AAAA;",
|
|
10
|
+
"debugId": "04F4D799DC9A287B64756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
package/dist/src/db/index.d.ts
CHANGED
|
@@ -487,41 +487,6 @@ interface ChainReorgsTable {
|
|
|
487
487
|
new_canonical_event_index: number;
|
|
488
488
|
created_at: Generated<Date>;
|
|
489
489
|
}
|
|
490
|
-
type Pox4FunctionName = "stack-stx" | "delegate-stx" | "stack-extend" | "stack-increase" | "revoke-delegate-stx" | "delegate-stack-stx" | "delegate-stack-extend" | "delegate-stack-increase" | "stack-aggregation-commit" | "stack-aggregation-commit-indexed" | "stack-aggregation-increase" | "set-signer-key-authorization";
|
|
491
|
-
interface Pox4CallsTable {
|
|
492
|
-
cursor: string;
|
|
493
|
-
block_height: number;
|
|
494
|
-
block_time: Date;
|
|
495
|
-
burn_block_height: number;
|
|
496
|
-
tx_id: string;
|
|
497
|
-
tx_index: number;
|
|
498
|
-
function_name: Pox4FunctionName;
|
|
499
|
-
caller: string;
|
|
500
|
-
stacker: string | null;
|
|
501
|
-
delegate_to: string | null;
|
|
502
|
-
amount_ustx: string | null;
|
|
503
|
-
lock_period: number | null;
|
|
504
|
-
pox_addr_version: number | null;
|
|
505
|
-
pox_addr_hashbytes: string | null;
|
|
506
|
-
pox_addr_btc: string | null;
|
|
507
|
-
start_cycle: number | null;
|
|
508
|
-
end_cycle: number | null;
|
|
509
|
-
signer_key: string | null;
|
|
510
|
-
signer_signature: string | null;
|
|
511
|
-
auth_id: string | null;
|
|
512
|
-
max_amount: string | null;
|
|
513
|
-
reward_cycle: number | null;
|
|
514
|
-
aggregated_amount_ustx: string | null;
|
|
515
|
-
aggregated_signer_index: number | null;
|
|
516
|
-
auth_period: number | null;
|
|
517
|
-
auth_topic: string | null;
|
|
518
|
-
auth_allowed: boolean | null;
|
|
519
|
-
result_ok: boolean;
|
|
520
|
-
result_raw: string;
|
|
521
|
-
canonical: Generated<boolean>;
|
|
522
|
-
source_cursor: string;
|
|
523
|
-
created_at: Generated<Date>;
|
|
524
|
-
}
|
|
525
490
|
type Pox5EventTopic = "set-bond-admin" | "set-pause-admin" | "pause-rewards" | "setup-bond" | "add-to-allowlist" | "register-for-bond" | "update-bond-registration" | "register-signer" | "stake" | "stake-update" | "announce-l1-early-exit" | "unstake-sbtc" | "unstake" | "calculate-rewards" | "bond-distribution" | "claim-rewards" | "claim-staker-rewards-for-signer" | "grant-signer-key" | "revoke-signer-grant";
|
|
526
491
|
interface Pox5EventsTable {
|
|
527
492
|
cursor: string;
|
|
@@ -939,7 +904,6 @@ interface Database {
|
|
|
939
904
|
decoded_events: DecodedEventsTable;
|
|
940
905
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
941
906
|
chain_reorgs: ChainReorgsTable;
|
|
942
|
-
pox4_calls: Pox4CallsTable;
|
|
943
907
|
pox5_events: Pox5EventsTable;
|
|
944
908
|
pox5_cycles: Pox5CyclesTable;
|
|
945
909
|
pox5_cycle_signers: Pox5CycleSignersTable;
|
|
@@ -1591,7 +1555,6 @@ declare const SOURCE_READ_COLUMNS: {
|
|
|
1591
1555
|
readonly decoded_events: readonly ["amount", "asset_identifier", "block_height", "canonical", "contract_id", "cursor", "event_index", "event_type", "memo", "payload", "recipient", "sender", "tx_id", "tx_index", "value"]
|
|
1592
1556
|
readonly transactions: readonly ["block_height", "contract_id", "function_args", "function_name", "raw_result", "raw_tx", "sender", "status", "tx_id", "tx_index", "type"]
|
|
1593
1557
|
readonly mempool_transactions: readonly ["contract_id", "function_args", "function_name", "raw_tx", "received_at", "sender", "seq", "tx_id", "type"]
|
|
1594
|
-
readonly pox4_calls: readonly ["aggregated_amount_ustx", "aggregated_signer_index", "amount_ustx", "auth_allowed", "auth_id", "auth_period", "auth_topic", "block_height", "block_time", "burn_block_height", "caller", "canonical", "cursor", "delegate_to", "end_cycle", "function_name", "lock_period", "max_amount", "pox_addr_btc", "pox_addr_hashbytes", "pox_addr_version", "result_ok", "reward_cycle", "signer_key", "signer_signature", "source_cursor", "stacker", "start_cycle", "tx_id", "tx_index"]
|
|
1595
1558
|
readonly pox5_events: readonly ["amount_sats", "amount_ustx", "block_height", "block_time", "bond_index", "canonical", "cursor", "data", "event_index", "first_reward_cycle", "is_l1_lock", "reward_cycle", "signer", "signer_key", "signer_manager", "staker", "topic", "tx_id", "tx_index", "unlock_burn_height", "unlock_cycle"]
|
|
1596
1559
|
readonly sbtc_events: readonly ["amount", "bitcoin_txid", "block_height", "block_time", "burn_hash", "burn_height", "canonical", "cursor", "event_index", "fee", "governance_contract_type", "governance_new_contract", "max_fee", "output_index", "recipient", "recipient_btc_hashbytes", "recipient_btc_version", "request_id", "sender", "signer_address", "signer_aggregate_pubkey", "signer_bitmap", "signer_keys_count", "signer_threshold", "sweep_txid", "topic", "tx_id", "tx_index"]
|
|
1597
1560
|
readonly sbtc_token_events: readonly ["amount", "block_height", "block_time", "canonical", "cursor", "event_index", "event_type", "memo", "recipient", "sender", "tx_id", "tx_index"]
|
|
@@ -1763,117 +1726,6 @@ declare const SOURCE_READ_TYPES: {
|
|
|
1763
1726
|
readonly type: "text"
|
|
1764
1727
|
}
|
|
1765
1728
|
}
|
|
1766
|
-
readonly pox4_calls: {
|
|
1767
|
-
readonly aggregated_amount_ustx: {
|
|
1768
|
-
readonly type: "text"
|
|
1769
|
-
readonly nullable: true
|
|
1770
|
-
}
|
|
1771
|
-
readonly aggregated_signer_index: {
|
|
1772
|
-
readonly type: "int"
|
|
1773
|
-
readonly nullable: true
|
|
1774
|
-
}
|
|
1775
|
-
readonly amount_ustx: {
|
|
1776
|
-
readonly type: "text"
|
|
1777
|
-
readonly nullable: true
|
|
1778
|
-
}
|
|
1779
|
-
readonly auth_allowed: {
|
|
1780
|
-
readonly type: "boolean"
|
|
1781
|
-
readonly nullable: true
|
|
1782
|
-
}
|
|
1783
|
-
readonly auth_id: {
|
|
1784
|
-
readonly type: "text"
|
|
1785
|
-
readonly nullable: true
|
|
1786
|
-
}
|
|
1787
|
-
readonly auth_period: {
|
|
1788
|
-
readonly type: "int"
|
|
1789
|
-
readonly nullable: true
|
|
1790
|
-
}
|
|
1791
|
-
readonly auth_topic: {
|
|
1792
|
-
readonly type: "text"
|
|
1793
|
-
readonly nullable: true
|
|
1794
|
-
}
|
|
1795
|
-
readonly block_height: {
|
|
1796
|
-
readonly type: "int"
|
|
1797
|
-
}
|
|
1798
|
-
readonly block_time: {
|
|
1799
|
-
readonly type: "timestamp"
|
|
1800
|
-
}
|
|
1801
|
-
readonly burn_block_height: {
|
|
1802
|
-
readonly type: "int"
|
|
1803
|
-
}
|
|
1804
|
-
readonly caller: {
|
|
1805
|
-
readonly type: "text"
|
|
1806
|
-
}
|
|
1807
|
-
readonly canonical: {
|
|
1808
|
-
readonly type: "boolean"
|
|
1809
|
-
}
|
|
1810
|
-
readonly cursor: {
|
|
1811
|
-
readonly type: "text"
|
|
1812
|
-
}
|
|
1813
|
-
readonly delegate_to: {
|
|
1814
|
-
readonly type: "text"
|
|
1815
|
-
readonly nullable: true
|
|
1816
|
-
}
|
|
1817
|
-
readonly end_cycle: {
|
|
1818
|
-
readonly type: "int"
|
|
1819
|
-
readonly nullable: true
|
|
1820
|
-
}
|
|
1821
|
-
readonly function_name: {
|
|
1822
|
-
readonly type: "text"
|
|
1823
|
-
}
|
|
1824
|
-
readonly lock_period: {
|
|
1825
|
-
readonly type: "int"
|
|
1826
|
-
readonly nullable: true
|
|
1827
|
-
}
|
|
1828
|
-
readonly max_amount: {
|
|
1829
|
-
readonly type: "text"
|
|
1830
|
-
readonly nullable: true
|
|
1831
|
-
}
|
|
1832
|
-
readonly pox_addr_btc: {
|
|
1833
|
-
readonly type: "text"
|
|
1834
|
-
readonly nullable: true
|
|
1835
|
-
}
|
|
1836
|
-
readonly pox_addr_hashbytes: {
|
|
1837
|
-
readonly type: "text"
|
|
1838
|
-
readonly nullable: true
|
|
1839
|
-
}
|
|
1840
|
-
readonly pox_addr_version: {
|
|
1841
|
-
readonly type: "int"
|
|
1842
|
-
readonly nullable: true
|
|
1843
|
-
}
|
|
1844
|
-
readonly result_ok: {
|
|
1845
|
-
readonly type: "boolean"
|
|
1846
|
-
}
|
|
1847
|
-
readonly reward_cycle: {
|
|
1848
|
-
readonly type: "int"
|
|
1849
|
-
readonly nullable: true
|
|
1850
|
-
}
|
|
1851
|
-
readonly signer_key: {
|
|
1852
|
-
readonly type: "text"
|
|
1853
|
-
readonly nullable: true
|
|
1854
|
-
}
|
|
1855
|
-
readonly signer_signature: {
|
|
1856
|
-
readonly type: "text"
|
|
1857
|
-
readonly nullable: true
|
|
1858
|
-
}
|
|
1859
|
-
readonly source_cursor: {
|
|
1860
|
-
readonly type: "text"
|
|
1861
|
-
}
|
|
1862
|
-
readonly stacker: {
|
|
1863
|
-
readonly type: "text"
|
|
1864
|
-
readonly nullable: true
|
|
1865
|
-
}
|
|
1866
|
-
readonly start_cycle: {
|
|
1867
|
-
readonly type: "int"
|
|
1868
|
-
readonly nullable: true
|
|
1869
|
-
}
|
|
1870
|
-
readonly tx_id: {
|
|
1871
|
-
readonly type: "text"
|
|
1872
|
-
}
|
|
1873
|
-
readonly tx_index: {
|
|
1874
|
-
readonly type: "int"
|
|
1875
|
-
}
|
|
1876
|
-
}
|
|
1877
1729
|
readonly pox5_events: {
|
|
1878
1730
|
readonly amount_sats: {
|
|
1879
1731
|
readonly type: "text"
|
|
@@ -2395,7 +2247,6 @@ declare const SOURCE_READ_PKS: {
|
|
|
2395
2247
|
readonly decoded_events: readonly ["cursor"]
|
|
2396
2248
|
readonly transactions: readonly ["tx_id"]
|
|
2397
2249
|
readonly mempool_transactions: readonly ["seq"]
|
|
2398
|
-
readonly pox4_calls: readonly ["cursor"]
|
|
2399
2250
|
readonly pox5_events: readonly ["cursor"]
|
|
2400
2251
|
readonly sbtc_events: readonly ["cursor"]
|
|
2401
2252
|
readonly sbtc_token_events: readonly ["cursor"]
|
|
@@ -2501,7 +2352,6 @@ declare const TABLE_TO_DB: {
|
|
|
2501
2352
|
stage_failures: string
|
|
2502
2353
|
decoded_events: string
|
|
2503
2354
|
decoder_checkpoints: string
|
|
2504
|
-
pox4_calls: string
|
|
2505
2355
|
pox5_events: string
|
|
2506
2356
|
pox5_cycles: string
|
|
2507
2357
|
pox5_cycle_signers: string
|
|
@@ -2661,4 +2511,4 @@ declare function closeDb(): Promise<void>;
|
|
|
2661
2511
|
* actual work is done.
|
|
2662
2512
|
*/
|
|
2663
2513
|
declare function closeDbOrTimeout(timeoutMs?: number, closeFn?: () => Promise<void>): Promise<void>;
|
|
2664
|
-
export { ABI_STATUSES, AbiStatus, Account, AccountBalanceAlerts, AccountBalanceAlertsTable, AccountCredits, AccountCreditsTable, AccountSpendCap, AccountSpendCapsTable, AccountsTable, ApiFailedRequest, ApiFailedRequestsTable, ApiKey, ApiKeyStatus, ApiKeysTable, ApiRequestLogRow, ApiRequestLogTable, ArchiveFetch, ArchiveFetchesTable, Block, BlocksTable, BnsMarketplaceAction, BnsMarketplaceEventsTable, BnsNameEventTopic, BnsNameEventsTable, BnsNamesTable, BnsNamespaceEventStatus, BnsNamespaceEventsTable, BnsNamespacesTable, BurnBlockRewardSlotsTable, BurnBlockRewardsTable, ChainReadCacheTable, ChainReorgsTable, CliDeviceLogin, CliDeviceLoginStatus, CliDeviceLoginsTable, CliDeviceProduct, ContactRequest, ContactRequestsTable, Contract, ContractsTable, CoverageSegmentsTable, Database, DbPlane, DbReadRow, DbSplitStatus, DeadLetterEventsTable, DeadReason, DecodedEventsTable, DecoderCheckpointsTable, Event, EventsArchiveTable, EventsTable, FailureClass, FailureUnit, FeedbackTicket, FeedbackTicketsTable, GapReason, HostedStackStateTable, IndexColumn, IndexColumnType, IndexPrimaryKey, IndexProgress, IndexProgressTable, InsertAccount, InsertAccountBalanceAlerts, InsertAccountCredits, InsertAccountSpendCap, InsertApiFailedRequest, InsertApiKey, InsertApiRequestLogRow, InsertArchiveFetch, InsertBlock, InsertContactRequest, InsertContract, InsertEvent, InsertFeedbackTicket, InsertIndexProgress, InsertMagicLink, InsertMempoolTransaction, InsertSession, InsertStateWrite, InsertSubgraph, InsertSubgraphGap, InsertSubgraphHealthSnapshot, InsertSubgraphOperation, InsertTransaction, InsertUpdateSubscriber, InsertUsageLedgerRow, InsertVmEvent, InsertWaitlistSignup, InsertWebhook, InsertWebhookDelivery, InsertWebhookOutbox, InsightMutesTable, InsightsTable, InstancesTable, MagicLink, MagicLinksTable, MempoolTransaction, MempoolTransactionsTable, MigrationRole, NativeClock, NumericAsText, OBSERVER_JOURNAL_STATUSES, OauthClient, OauthClientsTable, OauthCodesTable, OauthGrant, OauthGrantsTable, OauthRefreshRetiredTable, OauthRequestStatus, OauthRequestsTable, OauthTokenKind, OauthTokensTable, ObserverJournalStatus, ObserverJournalTable, OutboxStatus, PendingForkBlocksTable,
|
|
2514
|
+
export { ABI_STATUSES, AbiStatus, Account, AccountBalanceAlerts, AccountBalanceAlertsTable, AccountCredits, AccountCreditsTable, AccountSpendCap, AccountSpendCapsTable, AccountsTable, ApiFailedRequest, ApiFailedRequestsTable, ApiKey, ApiKeyStatus, ApiKeysTable, ApiRequestLogRow, ApiRequestLogTable, ArchiveFetch, ArchiveFetchesTable, Block, BlocksTable, BnsMarketplaceAction, BnsMarketplaceEventsTable, BnsNameEventTopic, BnsNameEventsTable, BnsNamesTable, BnsNamespaceEventStatus, BnsNamespaceEventsTable, BnsNamespacesTable, BurnBlockRewardSlotsTable, BurnBlockRewardsTable, ChainReadCacheTable, ChainReorgsTable, CliDeviceLogin, CliDeviceLoginStatus, CliDeviceLoginsTable, CliDeviceProduct, ContactRequest, ContactRequestsTable, Contract, ContractsTable, CoverageSegmentsTable, Database, DbPlane, DbReadRow, DbSplitStatus, DeadLetterEventsTable, DeadReason, DecodedEventsTable, DecoderCheckpointsTable, Event, EventsArchiveTable, EventsTable, FailureClass, FailureUnit, FeedbackTicket, FeedbackTicketsTable, GapReason, HostedStackStateTable, IndexColumn, IndexColumnType, IndexPrimaryKey, IndexProgress, IndexProgressTable, InsertAccount, InsertAccountBalanceAlerts, InsertAccountCredits, InsertAccountSpendCap, InsertApiFailedRequest, InsertApiKey, InsertApiRequestLogRow, InsertArchiveFetch, InsertBlock, InsertContactRequest, InsertContract, InsertEvent, InsertFeedbackTicket, InsertIndexProgress, InsertMagicLink, InsertMempoolTransaction, InsertSession, InsertStateWrite, InsertSubgraph, InsertSubgraphGap, InsertSubgraphHealthSnapshot, InsertSubgraphOperation, InsertTransaction, InsertUpdateSubscriber, InsertUsageLedgerRow, InsertVmEvent, InsertWaitlistSignup, InsertWebhook, InsertWebhookDelivery, InsertWebhookOutbox, InsightMutesTable, InsightsTable, InstancesTable, MagicLink, MagicLinksTable, MempoolTransaction, MempoolTransactionsTable, MigrationRole, NativeClock, NumericAsText, OBSERVER_JOURNAL_STATUSES, OauthClient, OauthClientsTable, OauthCodesTable, OauthGrant, OauthGrantsTable, OauthRefreshRetiredTable, OauthRequestStatus, OauthRequestsTable, OauthTokenKind, OauthTokensTable, ObserverJournalStatus, ObserverJournalTable, OutboxStatus, PendingForkBlocksTable, Pox5CycleSignersTable, Pox5CyclesTable, Pox5EventTopic, Pox5EventsTable, ProcessedStripeEventsTable, PushPrefs, PushPrefsTable, PushSentTable, PushSubscription, PushSubscriptionsTable, RepairMode, RetryState, RunStatus, SOURCE_READ_COLUMNS, SOURCE_READ_PKS, SOURCE_READ_TYPES, SbtcEventTopic, SbtcEventsTable, SbtcSettlementsTable, SbtcTokenEventType, SbtcTokenEventsTable, SentinelAccount, SentinelAccountsTable, ServiceHeartbeatsTable, Session, SessionsTable, StageBlockReceiptsTable, StageFailuresTable, StageKind, StageRegistryTable, StageRunsTable, StateWrite, StateWritesArchiveTable, StateWritesTable, Subgraph, SubgraphErrorGroupsTable, SubgraphGap, SubgraphGapsTable, SubgraphHealthSnapshot, SubgraphHealthSnapshotsTable, SubgraphOperation, SubgraphOperationKind, SubgraphOperationStatus, SubgraphOperationsTable, SubgraphProcessingStatsTable, SubgraphViolationsTable, SubgraphsTable, SyncScopesTable, TABLE_TO_DB, Transaction, TransactionsArchiveTable, TransactionsTable, TriggerEvaluatorState, TriggerEvaluatorStateTable, UpdateAccountBalanceAlerts, UpdateAccountCredits, UpdateAccountSpendCap, UpdateApiKey, UpdateArchiveFetch, UpdateBlock, UpdateContract, UpdateEvent, UpdateIndexProgress, UpdateSendsTable, UpdateSubgraph, UpdateSubgraphOperation, UpdateSubscriber, UpdateSubscribersTable, UpdateTransaction, UpdateUsageLedgerRow, UpdateVmEvent, UpdateWebhook, UpdateWebhookOutbox, UsageLedgerRow, UsageLedgerTable, VmEvent, VmEventsArchiveTable, VmEventsTable, Waitlist, WaitlistSignup, WaitlistSignupsTable, WaitlistsTable, Webhook, WebhookDeliveriesTable, WebhookDelivery, WebhookDeliveryHoursTable, WebhookFormat, WebhookIncidentAlert, WebhookIncidentAlertsTable, WebhookKind, WebhookOutbox, WebhookOutboxTable, WebhookPauseReason, WebhookReplay, WebhookReplayStatus, WebhookReplaysTable, WebhookStatus, WebhooksTable, applicationDatabaseUrl, assertDbSplit, closeDb, closeDbOrTimeout, configuredSourceUrl, configuredTargetUrl, describeDbUrl, getDb, getDbSplitStatus, getMigrationRole, getRawClient, getSourceDb, getTargetDb, jsonb, onChainPlane, onControlPlane, parseJsonb, resolveSourceUrl, resolveTargetUrl, setMigrationRole, sql };
|