@secondlayer/stacks 6.2.1 → 6.2.2
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/shared/stacks-esm-b54n1jdx.js.map +3 -3
- package/dist/src/filters/index.cjs.map +3 -3
- package/dist/src/filters/index.d.cts +22 -15
- package/dist/src/filters/index.d.ts +22 -15
- package/dist/src/index.cjs.map +3 -3
- package/dist/src/index.d.cts +14 -10
- package/dist/src/index.d.ts +14 -10
- package/package.json +1 -1
package/dist/src/index.d.cts
CHANGED
|
@@ -1591,21 +1591,22 @@ interface AbiContract {
|
|
|
1591
1591
|
defined_traits?: ReadonlyArray<AbiTraitDefinition>;
|
|
1592
1592
|
}
|
|
1593
1593
|
/**
|
|
1594
|
-
*
|
|
1595
|
-
*
|
|
1594
|
+
* A fungible or non-fungible asset identifier: `<contract>::<asset-name>`.
|
|
1595
|
+
*
|
|
1596
|
+
* This is the shape an asset filter takes, expressed so the compiler can check it.
|
|
1596
1597
|
*
|
|
1597
1598
|
* The most common mistake in this API is passing a CONTRACT ID
|
|
1598
1599
|
* (`SP….sbtc-token`) where an asset identifier (`SP….sbtc-token::sbtc-token`)
|
|
1599
1600
|
* belongs, and the failure mode is a query that quietly returns zero rows. The
|
|
1600
1601
|
* two differ structurally by `::`, so a template-literal type catches it at the
|
|
1601
|
-
* call site
|
|
1602
|
+
* call site. No brand, no cast, literals just work.
|
|
1602
1603
|
*
|
|
1603
1604
|
* A value that is only known at runtime (config, env) is not narrow enough on
|
|
1604
1605
|
* purpose; run it through {@link assetId} once, which validates and narrows.
|
|
1605
1606
|
*
|
|
1606
|
-
* Wildcard patterns (Webhooks/Subgraphs-only) are admitted by the second arm
|
|
1607
|
-
* are legitimately not full identifiers (`SPB.*`), and the runtime
|
|
1608
|
-
* short-circuits on them for the same reason.
|
|
1607
|
+
* Wildcard patterns (Webhooks/Subgraphs-only) are admitted by the second arm.
|
|
1608
|
+
* They are legitimately not full identifiers (`SPB.*`), and the runtime
|
|
1609
|
+
* validator short-circuits on them for the same reason.
|
|
1609
1610
|
*/
|
|
1610
1611
|
type AssetIdentifier = `${string}::${string}` | `${string}*${string}`;
|
|
1611
1612
|
/** Scalar print field types (structural mirror of the subgraphs `ColumnType`). */
|
|
@@ -1783,6 +1784,7 @@ interface SbtcWithdrawalSweptConfirmedSpec {
|
|
|
1783
1784
|
sweepTxid?: string;
|
|
1784
1785
|
}
|
|
1785
1786
|
type ChainEventFilterSpec = StxTransferSpec | StxMintSpec | StxBurnSpec | StxLockSpec | FtTransferSpec | FtMintSpec | FtBurnSpec | NftTransferSpec | NftMintSpec | NftBurnSpec | ContractCallSpec | ContractDeploySpec | NestedContractCallSpec | VarSetSpec | MapSetSpec | MapInsertSpec | MapDeleteSpec | PrintEventSpec | SbtcDepositSpec | SbtcWithdrawalCreateSpec | SbtcWithdrawalAcceptSpec | SbtcWithdrawalRejectSpec | SbtcWithdrawalSweptConfirmedSpec;
|
|
1787
|
+
/** The filter spec for one chain event type. */
|
|
1786
1788
|
type SpecFor<T extends ChainEventFilterType> = Extract<ChainEventFilterSpec, {
|
|
1787
1789
|
type: T
|
|
1788
1790
|
}>;
|
|
@@ -1858,10 +1860,11 @@ type ProjectionsFor<
|
|
|
1858
1860
|
toSubgraphSource(): S
|
|
1859
1861
|
} : {});
|
|
1860
1862
|
/**
|
|
1861
|
-
* A
|
|
1862
|
-
*
|
|
1863
|
-
*
|
|
1864
|
-
* (`
|
|
1863
|
+
* A chain-event filter: the spec fields plus its member's projections.
|
|
1864
|
+
*
|
|
1865
|
+
* Write the filter once; project it to a query (`toIndexParams`), a stream
|
|
1866
|
+
* (`toStreamsParams`), a webhook trigger (`toChainTrigger`), or a subgraph
|
|
1867
|
+
* source (`toSubgraphSource`).
|
|
1865
1868
|
*/
|
|
1866
1869
|
type ChainEventFilter<
|
|
1867
1870
|
T extends ChainEventFilterType = ChainEventFilterType,
|
|
@@ -1869,6 +1872,7 @@ type ChainEventFilter<
|
|
|
1869
1872
|
type: T
|
|
1870
1873
|
} = SpecFor<T>
|
|
1871
1874
|
> = S & ProjectionsFor<T, S>;
|
|
1875
|
+
/** The fields a filter factory takes for one event type, without `type`. */
|
|
1872
1876
|
type Fields<T extends ChainEventFilterType> = Omit<SpecFor<T>, "type">;
|
|
1873
1877
|
/** The `on.*` namespace, annotated explicitly — bunup's dts emitter needs an
|
|
1874
1878
|
* annotation on exported values (an inferred object of generic factories
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1591,21 +1591,22 @@ interface AbiContract {
|
|
|
1591
1591
|
defined_traits?: ReadonlyArray<AbiTraitDefinition>;
|
|
1592
1592
|
}
|
|
1593
1593
|
/**
|
|
1594
|
-
*
|
|
1595
|
-
*
|
|
1594
|
+
* A fungible or non-fungible asset identifier: `<contract>::<asset-name>`.
|
|
1595
|
+
*
|
|
1596
|
+
* This is the shape an asset filter takes, expressed so the compiler can check it.
|
|
1596
1597
|
*
|
|
1597
1598
|
* The most common mistake in this API is passing a CONTRACT ID
|
|
1598
1599
|
* (`SP….sbtc-token`) where an asset identifier (`SP….sbtc-token::sbtc-token`)
|
|
1599
1600
|
* belongs, and the failure mode is a query that quietly returns zero rows. The
|
|
1600
1601
|
* two differ structurally by `::`, so a template-literal type catches it at the
|
|
1601
|
-
* call site
|
|
1602
|
+
* call site. No brand, no cast, literals just work.
|
|
1602
1603
|
*
|
|
1603
1604
|
* A value that is only known at runtime (config, env) is not narrow enough on
|
|
1604
1605
|
* purpose; run it through {@link assetId} once, which validates and narrows.
|
|
1605
1606
|
*
|
|
1606
|
-
* Wildcard patterns (Webhooks/Subgraphs-only) are admitted by the second arm
|
|
1607
|
-
* are legitimately not full identifiers (`SPB.*`), and the runtime
|
|
1608
|
-
* short-circuits on them for the same reason.
|
|
1607
|
+
* Wildcard patterns (Webhooks/Subgraphs-only) are admitted by the second arm.
|
|
1608
|
+
* They are legitimately not full identifiers (`SPB.*`), and the runtime
|
|
1609
|
+
* validator short-circuits on them for the same reason.
|
|
1609
1610
|
*/
|
|
1610
1611
|
type AssetIdentifier = `${string}::${string}` | `${string}*${string}`;
|
|
1611
1612
|
/** Scalar print field types (structural mirror of the subgraphs `ColumnType`). */
|
|
@@ -1783,6 +1784,7 @@ interface SbtcWithdrawalSweptConfirmedSpec {
|
|
|
1783
1784
|
sweepTxid?: string;
|
|
1784
1785
|
}
|
|
1785
1786
|
type ChainEventFilterSpec = StxTransferSpec | StxMintSpec | StxBurnSpec | StxLockSpec | FtTransferSpec | FtMintSpec | FtBurnSpec | NftTransferSpec | NftMintSpec | NftBurnSpec | ContractCallSpec | ContractDeploySpec | NestedContractCallSpec | VarSetSpec | MapSetSpec | MapInsertSpec | MapDeleteSpec | PrintEventSpec | SbtcDepositSpec | SbtcWithdrawalCreateSpec | SbtcWithdrawalAcceptSpec | SbtcWithdrawalRejectSpec | SbtcWithdrawalSweptConfirmedSpec;
|
|
1787
|
+
/** The filter spec for one chain event type. */
|
|
1786
1788
|
type SpecFor<T extends ChainEventFilterType> = Extract<ChainEventFilterSpec, {
|
|
1787
1789
|
type: T
|
|
1788
1790
|
}>;
|
|
@@ -1858,10 +1860,11 @@ type ProjectionsFor<
|
|
|
1858
1860
|
toSubgraphSource(): S
|
|
1859
1861
|
} : {});
|
|
1860
1862
|
/**
|
|
1861
|
-
* A
|
|
1862
|
-
*
|
|
1863
|
-
*
|
|
1864
|
-
* (`
|
|
1863
|
+
* A chain-event filter: the spec fields plus its member's projections.
|
|
1864
|
+
*
|
|
1865
|
+
* Write the filter once; project it to a query (`toIndexParams`), a stream
|
|
1866
|
+
* (`toStreamsParams`), a webhook trigger (`toChainTrigger`), or a subgraph
|
|
1867
|
+
* source (`toSubgraphSource`).
|
|
1865
1868
|
*/
|
|
1866
1869
|
type ChainEventFilter<
|
|
1867
1870
|
T extends ChainEventFilterType = ChainEventFilterType,
|
|
@@ -1869,6 +1872,7 @@ type ChainEventFilter<
|
|
|
1869
1872
|
type: T
|
|
1870
1873
|
} = SpecFor<T>
|
|
1871
1874
|
> = S & ProjectionsFor<T, S>;
|
|
1875
|
+
/** The fields a filter factory takes for one event type, without `type`. */
|
|
1872
1876
|
type Fields<T extends ChainEventFilterType> = Omit<SpecFor<T>, "type">;
|
|
1873
1877
|
/** The `on.*` namespace, annotated explicitly — bunup's dts emitter needs an
|
|
1874
1878
|
* annotation on exported values (an inferred object of generic factories
|