@secondlayer/shared 15.6.0 → 16.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 +2 -0
- package/dist/src/archive/semantic-digest-builder.d.ts +2 -0
- package/dist/src/coverage/index.d.ts +2 -0
- package/dist/src/db/index.d.ts +7 -1
- package/dist/src/db/index.js +3 -1
- package/dist/src/db/index.js.map +4 -4
- package/dist/src/db/queries/chain-reorgs.d.ts +2 -0
- package/dist/src/db/queries/chain-reorgs.js +3 -1
- package/dist/src/db/queries/chain-reorgs.js.map +4 -4
- package/dist/src/db/queries/contracts.d.ts +2 -0
- package/dist/src/db/queries/contracts.js.map +2 -2
- package/dist/src/db/queries/instance.d.ts +2 -0
- package/dist/src/db/queries/integrity.d.ts +2 -0
- package/dist/src/db/queries/subgraph-gaps.d.ts +2 -0
- package/dist/src/db/queries/subgraph-operations.d.ts +2 -0
- package/dist/src/db/queries/subgraphs.d.ts +2 -0
- package/dist/src/db/queries/sync-scope.d.ts +2 -0
- package/dist/src/db/queries/webhook-replays.d.ts +2 -0
- package/dist/src/db/queries/webhooks.d.ts +2 -0
- package/dist/src/db/schema.d.ts +2 -0
- package/dist/src/db/schema.js.map +2 -2
- package/dist/src/index-http.d.ts +1 -0
- package/dist/src/index-http.js.map +2 -2
- package/dist/src/index.d.ts +11 -6
- package/dist/src/index.js +6 -11
- package/dist/src/index.js.map +6 -6
- package/dist/src/insights/index.d.ts +2 -0
- package/dist/src/leader.js +3 -1
- package/dist/src/leader.js.map +4 -4
- package/dist/src/node/local-client.d.ts +2 -0
- package/dist/src/queue/listener.js +3 -1
- package/dist/src/queue/listener.js.map +4 -4
- package/dist/src/schemas/chain-triggers.js +2 -8
- package/dist/src/schemas/chain-triggers.js.map +3 -3
- package/dist/src/schemas/index.d.ts +1 -2
- package/dist/src/schemas/index.js +4 -11
- package/dist/src/schemas/index.js.map +4 -4
- package/dist/src/schemas/webhooks.d.ts +1 -2
- package/dist/src/schemas/webhooks.js +4 -11
- package/dist/src/schemas/webhooks.js.map +4 -4
- package/migrations/0101_events_logical_unique_idx.ts +4 -1
- package/migrations/0204_usage_ledger_subgraph_read.ts +69 -0
- package/migrations/0205_sbtc_deposit_recipient.ts +75 -0
- package/package.json +2 -2
package/dist/src/index.d.ts
CHANGED
|
@@ -844,6 +844,8 @@ interface SbtcEventsTable {
|
|
|
844
844
|
request_id: number | null;
|
|
845
845
|
amount: string | null;
|
|
846
846
|
sender: string | null;
|
|
847
|
+
/** Stacks principal a `completed-deposit` minted sBTC to. */
|
|
848
|
+
recipient: string | null;
|
|
847
849
|
recipient_btc_version: number | null;
|
|
848
850
|
recipient_btc_hashbytes: string | null;
|
|
849
851
|
bitcoin_txid: string | null;
|
|
@@ -1916,7 +1918,7 @@ declare const SOURCE_READ_COLUMNS: {
|
|
|
1916
1918
|
readonly mempool_transactions: readonly ["contract_id", "function_args", "function_name", "raw_tx", "received_at", "sender", "seq", "tx_id", "type"]
|
|
1917
1919
|
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"]
|
|
1918
1920
|
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"]
|
|
1919
|
-
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_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"]
|
|
1921
|
+
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"]
|
|
1920
1922
|
readonly sbtc_token_events: readonly ["amount", "block_height", "block_time", "canonical", "cursor", "event_index", "event_type", "memo", "recipient", "sender", "tx_id", "tx_index"]
|
|
1921
1923
|
readonly bns_name_events: readonly ["block_height", "block_time", "bns_id", "canonical", "cursor", "event_index", "fqn", "hashed_salted_fqn_preorder", "imported_at", "name", "namespace", "owner", "preordered_by", "registered_at", "renewal_height", "stx_burn", "topic", "tx_id", "tx_index"]
|
|
1922
1924
|
readonly bns_namespace_events: readonly ["block_height", "block_time", "canonical", "cursor", "event_index", "launched_at", "lifetime", "manager", "manager_frozen", "manager_transfers_disabled", "namespace", "price_frozen", "price_function", "revealed_at", "status", "tx_id", "tx_index"]
|
|
@@ -2327,6 +2329,10 @@ declare const SOURCE_READ_TYPES: {
|
|
|
2327
2329
|
readonly type: "int"
|
|
2328
2330
|
readonly nullable: true
|
|
2329
2331
|
}
|
|
2332
|
+
readonly recipient: {
|
|
2333
|
+
readonly type: "text"
|
|
2334
|
+
readonly nullable: true
|
|
2335
|
+
}
|
|
2330
2336
|
readonly recipient_btc_hashbytes: {
|
|
2331
2337
|
readonly type: "text"
|
|
2332
2338
|
readonly nullable: true
|
|
@@ -3398,11 +3404,10 @@ type ChainTrigger = {
|
|
|
3398
3404
|
map?: string
|
|
3399
3405
|
} & TraitScoped) | {
|
|
3400
3406
|
type: "sbtc_deposit"
|
|
3401
|
-
|
|
3407
|
+
recipient?: string
|
|
3402
3408
|
minAmount?: ChainTriggerAmount
|
|
3403
3409
|
maxAmount?: ChainTriggerAmount
|
|
3404
3410
|
bitcoinTxid?: string
|
|
3405
|
-
requestId?: number
|
|
3406
3411
|
} | {
|
|
3407
3412
|
type: "sbtc_withdrawal_create"
|
|
3408
3413
|
sender?: string
|
|
@@ -3690,12 +3695,12 @@ type RuneEventPayload = {
|
|
|
3690
3695
|
};
|
|
3691
3696
|
/**
|
|
3692
3697
|
* Payload for `sbtc_deposit` (topic: completed-deposit).
|
|
3693
|
-
* `
|
|
3698
|
+
* `recipient` is the Stacks principal the deposit minted sBTC to (a wallet or
|
|
3699
|
+
* contract). Deposits have no request id; `bitcoin_txid` identifies one.
|
|
3694
3700
|
*/
|
|
3695
3701
|
interface SbtcDepositEvent {
|
|
3696
3702
|
topic: "completed-deposit";
|
|
3697
|
-
|
|
3698
|
-
sender: string | null;
|
|
3703
|
+
recipient: string | null;
|
|
3699
3704
|
amount: string;
|
|
3700
3705
|
bitcoin_txid: string | null;
|
|
3701
3706
|
block_height: number;
|
package/dist/src/index.js
CHANGED
|
@@ -451,6 +451,7 @@ var SOURCE_READ_COLUMNS = {
|
|
|
451
451
|
"governance_new_contract",
|
|
452
452
|
"max_fee",
|
|
453
453
|
"output_index",
|
|
454
|
+
"recipient",
|
|
454
455
|
"recipient_btc_hashbytes",
|
|
455
456
|
"recipient_btc_version",
|
|
456
457
|
"request_id",
|
|
@@ -694,6 +695,7 @@ var SOURCE_READ_TYPES = {
|
|
|
694
695
|
governance_new_contract: { type: "text", nullable: true },
|
|
695
696
|
max_fee: { type: "text", nullable: true },
|
|
696
697
|
output_index: { type: "int", nullable: true },
|
|
698
|
+
recipient: { type: "text", nullable: true },
|
|
697
699
|
recipient_btc_hashbytes: { type: "text", nullable: true },
|
|
698
700
|
recipient_btc_version: { type: "int", nullable: true },
|
|
699
701
|
request_id: { type: "int", nullable: true },
|
|
@@ -1570,13 +1572,7 @@ var CHAIN_TRIGGER_FIELDS = {
|
|
|
1570
1572
|
map_set: ["contractId", "map", "trait"],
|
|
1571
1573
|
map_insert: ["contractId", "map", "trait"],
|
|
1572
1574
|
map_delete: ["contractId", "map", "trait"],
|
|
1573
|
-
sbtc_deposit: [
|
|
1574
|
-
"sender",
|
|
1575
|
-
"minAmount",
|
|
1576
|
-
"maxAmount",
|
|
1577
|
-
"bitcoinTxid",
|
|
1578
|
-
"requestId"
|
|
1579
|
-
],
|
|
1575
|
+
sbtc_deposit: ["recipient", "minAmount", "maxAmount", "bitcoinTxid"],
|
|
1580
1576
|
sbtc_withdrawal_create: ["sender", "minAmount", "maxAmount", "requestId"],
|
|
1581
1577
|
sbtc_withdrawal_accept: ["requestId", "sweepTxid"],
|
|
1582
1578
|
sbtc_withdrawal_reject: ["requestId"],
|
|
@@ -1781,11 +1777,10 @@ var ChainTriggerSchema = z4.discriminatedUnion("type", [
|
|
|
1781
1777
|
}).strict(),
|
|
1782
1778
|
z4.object({
|
|
1783
1779
|
type: z4.literal("sbtc_deposit"),
|
|
1784
|
-
|
|
1780
|
+
recipient: triggerPattern.optional(),
|
|
1785
1781
|
minAmount: triggerAmount.optional(),
|
|
1786
1782
|
maxAmount: triggerAmount.optional(),
|
|
1787
|
-
bitcoinTxid: triggerPattern.optional()
|
|
1788
|
-
requestId: z4.number().int().nonnegative().optional()
|
|
1783
|
+
bitcoinTxid: triggerPattern.optional()
|
|
1789
1784
|
}).strict(),
|
|
1790
1785
|
z4.object({
|
|
1791
1786
|
type: z4.literal("sbtc_withdrawal_create"),
|
|
@@ -2544,5 +2539,5 @@ export {
|
|
|
2544
2539
|
syncState
|
|
2545
2540
|
};
|
|
2546
2541
|
|
|
2547
|
-
//# debugId=
|
|
2542
|
+
//# debugId=F28E3363E6B7914D64756E2164756E21
|
|
2548
2543
|
//# sourceMappingURL=index.js.map
|