@secondlayer/sdk 6.34.0 → 6.35.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/index.d.ts +40 -14
- package/dist/index.js +30 -2
- package/dist/index.js.map +3 -3
- package/dist/subgraphs/index.d.ts +39 -13
- package/dist/subgraphs/index.js +30 -2
- package/dist/subgraphs/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1107,19 +1107,27 @@ type IndexPrint = IndexEventBase & {
|
|
|
1107
1107
|
/** Decoded chain event, discriminated by `event_type`. */
|
|
1108
1108
|
type IndexEvent = IndexFtTransfer | IndexNftTransfer | IndexStxTransfer | IndexStxMint | IndexStxBurn | IndexStxLock | IndexFtMint | IndexFtBurn | IndexNftMint | IndexNftBurn | IndexPrint;
|
|
1109
1109
|
type IndexEventType = IndexEvent["event_type"];
|
|
1110
|
-
type EventsEnvelope = {
|
|
1111
|
-
events:
|
|
1110
|
+
type EventsEnvelope<T extends IndexEventType = IndexEventType> = {
|
|
1111
|
+
events: IndexEventOf<T>[]
|
|
1112
1112
|
next_cursor: string | null
|
|
1113
1113
|
tip: IndexTip
|
|
1114
1114
|
reorgs: IndexReorg[]
|
|
1115
1115
|
};
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1116
|
+
/** The single decoded-event member matching one `event_type` literal.
|
|
1117
|
+
* `IndexEventOf<"ft_transfer">` is `IndexFtTransfer`. */
|
|
1118
|
+
type IndexEventOf<T extends IndexEventType> = Extract<IndexEvent, {
|
|
1119
|
+
event_type: T
|
|
1120
|
+
}>;
|
|
1121
|
+
type EventsListParams<T extends IndexEventType = IndexEventType> = {
|
|
1122
|
+
/** Required. One of the decoded event types. Passing a literal narrows the
|
|
1123
|
+
* rows every surface hands back to that event's own shape. */
|
|
1124
|
+
eventType: T
|
|
1119
1125
|
cursor?: string | null
|
|
1120
1126
|
fromCursor?: string | null
|
|
1121
1127
|
limit?: number
|
|
1122
|
-
|
|
1128
|
+
/** One id, or several to scope the sweep to a set of contracts (max 20).
|
|
1129
|
+
* Mutually exclusive with `trait`. */
|
|
1130
|
+
contractId?: string | readonly string[]
|
|
1123
1131
|
assetIdentifier?: string
|
|
1124
1132
|
sender?: string
|
|
1125
1133
|
recipient?: string
|
|
@@ -1134,11 +1142,11 @@ type EventsListParams = {
|
|
|
1134
1142
|
* the only source of the submitting sender. */
|
|
1135
1143
|
txContext?: boolean
|
|
1136
1144
|
};
|
|
1137
|
-
type EventsWalkParams = Omit<EventsListParams
|
|
1145
|
+
type EventsWalkParams<T extends IndexEventType = IndexEventType> = Omit<EventsListParams<T>, "limit"> & {
|
|
1138
1146
|
batchSize?: number
|
|
1139
1147
|
signal?: AbortSignal
|
|
1140
1148
|
};
|
|
1141
|
-
type EventsConsumeParams = Omit<EventsListParams
|
|
1149
|
+
type EventsConsumeParams<T extends IndexEventType = IndexEventType> = Omit<EventsListParams<T>, "cursor" | "fromCursor" | "limit"> & IndexConsumeOptions<IndexEventOf<T>, EventsEnvelope<T>>;
|
|
1142
1150
|
type IndexContractCall = {
|
|
1143
1151
|
cursor: string
|
|
1144
1152
|
block_height: number
|
|
@@ -1163,7 +1171,9 @@ type ContractCallsListParams = {
|
|
|
1163
1171
|
cursor?: string | null
|
|
1164
1172
|
fromCursor?: string | null
|
|
1165
1173
|
limit?: number
|
|
1166
|
-
|
|
1174
|
+
/** One id, or several to scope the sweep to a set of contracts (max 20).
|
|
1175
|
+
* Mutually exclusive with `trait`. */
|
|
1176
|
+
contractId?: string | readonly string[]
|
|
1167
1177
|
functionName?: string
|
|
1168
1178
|
sender?: string
|
|
1169
1179
|
fromHeight?: number
|
|
@@ -1649,12 +1659,21 @@ type SbtcEventsWalkParams = Omit<SbtcEventsListParams, "limit"> & {
|
|
|
1649
1659
|
batchSize?: number
|
|
1650
1660
|
signal?: AbortSignal
|
|
1651
1661
|
};
|
|
1662
|
+
type SbtcEventsConsumeParams = Omit<SbtcEventsListParams, "cursor" | "fromCursor" | "limit"> & IndexConsumeOptions<IndexSbtcEvent, SbtcEventsEnvelope>;
|
|
1663
|
+
type SbtcDepositsConsumeParams = Omit<SbtcDepositsListParams, "cursor" | "fromCursor" | "limit"> & IndexConsumeOptions<IndexSbtcDeposit, SbtcDepositsEnvelope>;
|
|
1652
1664
|
/** `index.sbtc` — the decoded sBTC peg surface (deposits, withdrawals, raw
|
|
1653
1665
|
* events, scoreboard). The only productized decoded sBTC peg feed on Stacks. */
|
|
1654
1666
|
interface SbtcResource {
|
|
1655
1667
|
deposits: {
|
|
1656
1668
|
list(params?: SbtcDepositsListParams): Promise<SbtcDepositsEnvelope>
|
|
1657
1669
|
walk(params?: SbtcDepositsWalkParams): AsyncIterable<IndexSbtcDeposit>
|
|
1670
|
+
/** Checkpointed sweep of completed deposits — append-only, so safe to
|
|
1671
|
+
* mirror. See {@link IndexConsumeOptions}. */
|
|
1672
|
+
consume(params: SbtcDepositsConsumeParams): Promise<{
|
|
1673
|
+
cursor: string | null
|
|
1674
|
+
pages: number
|
|
1675
|
+
emptyPolls: number
|
|
1676
|
+
}>
|
|
1658
1677
|
/** Fetch a completed deposit by Bitcoin txid; 404 → null. */
|
|
1659
1678
|
get(bitcoinTxid: string): Promise<SbtcDepositEnvelope | null>
|
|
1660
1679
|
};
|
|
@@ -1667,6 +1686,13 @@ interface SbtcResource {
|
|
|
1667
1686
|
events: {
|
|
1668
1687
|
list(params?: SbtcEventsListParams): Promise<SbtcEventsEnvelope>
|
|
1669
1688
|
walk(params?: SbtcEventsWalkParams): AsyncIterable<IndexSbtcEvent>
|
|
1689
|
+
/** Checkpointed sweep of the raw peg event log — append-only across all
|
|
1690
|
+
* six topics. See {@link IndexConsumeOptions}. */
|
|
1691
|
+
consume(params: SbtcEventsConsumeParams): Promise<{
|
|
1692
|
+
cursor: string | null
|
|
1693
|
+
pages: number
|
|
1694
|
+
emptyPolls: number
|
|
1695
|
+
}>
|
|
1670
1696
|
};
|
|
1671
1697
|
/** The peg scoreboard — a single all-time aggregate (no pagination). */
|
|
1672
1698
|
summary(): Promise<SbtcSummaryEnvelope>;
|
|
@@ -1809,10 +1835,10 @@ interface NftTransfersResource {
|
|
|
1809
1835
|
}
|
|
1810
1836
|
/** `index.events` — callable shorthand for `.list()`; `eventType` is required. */
|
|
1811
1837
|
interface IndexEventsResource {
|
|
1812
|
-
(params: EventsListParams): Promise<EventsEnvelope
|
|
1813
|
-
list(params: EventsListParams): Promise<EventsEnvelope
|
|
1814
|
-
walk(params: EventsWalkParams): AsyncIterable<
|
|
1815
|
-
consume(params: EventsConsumeParams): Promise<{
|
|
1838
|
+
<T extends IndexEventType>(params: EventsListParams<T>): Promise<EventsEnvelope<T>>;
|
|
1839
|
+
list<T extends IndexEventType>(params: EventsListParams<T>): Promise<EventsEnvelope<T>>;
|
|
1840
|
+
walk<T extends IndexEventType>(params: EventsWalkParams<T>): AsyncIterable<IndexEventOf<T>>;
|
|
1841
|
+
consume<T extends IndexEventType>(params: EventsConsumeParams<T>): Promise<{
|
|
1816
1842
|
cursor: string | null
|
|
1817
1843
|
pages: number
|
|
1818
1844
|
emptyPolls: number
|
|
@@ -2869,4 +2895,4 @@ declare function toJsonSafe(value: unknown): unknown;
|
|
|
2869
2895
|
/** Decode a hex-encoded Clarity value to JSON-safe JS (uints as strings,
|
|
2870
2896
|
* buffers as `0x…` hex, tuples as objects). Returns the input hex on failure. */
|
|
2871
2897
|
declare function decodeClarityValue(hex: string): unknown;
|
|
2872
|
-
export { withX402, verifyWebhookSignature, verifyTransactionProof, verify as verifyStandardWebhooksHeaders, verifySecondlayerSignature, trigger, toJsonSafe, selectOffer, resolveApiKey, resolveAccountNonce, readX402Receipt, readX402Challenge, payAndRetry, isStxTransfer, isStxMint, isStxLock, isStxBurn, isPrint, isNftTransfer, isNftMint, isNftBurn, isFtTransfer, isFtMint, isFtBurn, getSubgraph, fetchRewardSet, decodeStxTransfer, decodeStxMint, decodeStxLock, decodeStxBurn, decodePrint, decodeNftTransfer, decodeNftMint, decodeNftBurn, decodeFtTransfer, decodeFtMint, decodeFtBurn, decodeClarityValue, decodeChainWebhook, createX402Client, createStreamsClient, consumeIndexFeed, buildSignedX402Payment, X402SpendGuardError, X402Result, X402Receipt, X402Fetch, X402ClientOptions, X402Client, X402Challenge, X402Accept, WithX402Options, WebhookHeaderInput, VersionConflictError, ValidationError, UpdateSubscriptionRequest2 as UpdateSubscriptionRequest, UpdateProjectParams, TransactionsWalkParams, TransactionsListParams, TransactionsEnvelope, TransactionProofVerifyResult, TransactionProof, TransactionEnvelope, Subscriptions, SubscriptionSummary2 as SubscriptionSummary, SubscriptionStatus, SubscriptionRuntime, SubscriptionKind, SubscriptionFormat, SubscriptionDetail2 as SubscriptionDetail, Subgraphs, SubgraphSpecOptions3 as SubgraphSpecOptions, SubgraphSpecFormat2 as SubgraphSpecFormat, SubgraphOperationStatus, SubgraphAgentSchema3 as SubgraphAgentSchema, StreamsUsage, StreamsTip, StreamsSignatureError, StreamsServerError, StreamsReorgsListParams, StreamsReorgsListEnvelope, StreamsReorgContext, StreamsReorg, StreamsEventsSubscribeParams, StreamsEventsStreamParams, StreamsEventsListParams, StreamsEventsListEnvelope, StreamsEventsEnvelope, StreamsEventsConsumeResult, StreamsEventsConsumeParams, StreamsEventType, StreamsEventPayload, StreamsEvent, StreamsDumpsManifest, StreamsDumps, StreamsDumpFile, StreamsConsumeParams, StreamsClient, StreamsCanonicalBlock, StreamsBatchContext, StreamsBatch, StandardWebhooksHeaders2 as StandardWebhooksHeaders, StackingWalkParams, StackingListParams, StackingEnvelope, SelectOfferOptions, SecondLayerOptions, SecondLayer, ScopedKeyProduct, SbtcWithdrawalsWalkParams, SbtcWithdrawalsListParams, SbtcWithdrawalsEnvelope, SbtcWithdrawalSweptConfirmedEvent, SbtcWithdrawalStatus, SbtcWithdrawalEvent, SbtcWithdrawalEnvelope, SbtcSummaryEnvelope, SbtcResource, SbtcEventsWalkParams, SbtcEventsListParams, SbtcEventsEnvelope, SbtcEventTopic, SbtcDepositsWalkParams, SbtcDepositsListParams, SbtcDepositsEnvelope, SbtcDepositEvent, SbtcDepositEnvelope, RotateSecretResponse2 as RotateSecretResponse, RewardSet2 as RewardSet, ReplayResult2 as ReplayResult, RateLimitError, Projects, ProjectTeamMember, ProjectTeam, ProjectInvitation, Project, PrintSchemaResponse, PoxResource, PoxCyclesWalkParams, PoxCyclesListParams, PoxCyclesEnvelope, PoxCycleEnvelope, Pox5Resource, Pox5EventsWalkParams, Pox5EventsListParams, Pox5EventsEnvelope, PayAndRetryOptions, NftTransfersWalkParams, NftTransfersResource, NftTransfersListParams, NftTransfersEnvelope, NftTransferPayload, NftTransferEvent, NftTransfer, MempoolWalkParams, MempoolTransactionEnvelope, MempoolListParams, MempoolEnvelope, IndexUsage, IndexTransaction, IndexTip, IndexStxTransfer, IndexStxMint, IndexStxLock, IndexStxBurn, IndexStackingAction, IndexSbtcWithdrawalPhase, IndexSbtcWithdrawalDetail, IndexSbtcWithdrawal, IndexSbtcSummary, IndexSbtcEvent, IndexSbtcDepositDetail, IndexSbtcDeposit, IndexReorg, IndexPrint, IndexPoxFunctionCount, IndexPoxCycle, IndexPox5EventTopic, IndexPox5Event, IndexPostCondition, IndexNftTransfer, IndexNftMint, IndexNftBurn, IndexMempoolTransaction, IndexFtTransfer, IndexFtMint, IndexFtBurn, IndexFeedItem, IndexFeedFetcher, IndexFeedEnvelope, IndexEventsResource, IndexEventTypeFilters, IndexEventType, IndexEvent, IndexDiscovery, IndexContractCall, IndexConsumeOptions, IndexCanonicalBlock, IndexBlock, Index, FtTransfersWalkParams, FtTransfersResource, FtTransfersListParams, FtTransfersEnvelope, FtTransferPayload, FtTransferEvent, FtTransfer, FetchLike2 as FetchLike, EventsWalkParams, EventsListParams, EventsEnvelope, EventsConsumeParams, DeliveryRow2 as DeliveryRow, DecodedStxTransferPayload, DecodedStxTransfer, DecodedStxMintPayload, DecodedStxMint, DecodedStxLockPayload, DecodedStxLock, DecodedStxBurnPayload, DecodedStxBurn, DecodedPrintValue, DecodedPrintPayload, DecodedPrint, DecodedNftTransferPayload, DecodedNftTransfer, DecodedNftMintPayload, DecodedNftMint, DecodedNftBurnPayload, DecodedNftBurn, DecodedFtTransferPayload, DecodedFtTransfer, DecodedFtMintPayload, DecodedFtMint, DecodedFtBurnPayload, DecodedFtBurn, DecodedEventRow, DecodedEventColumns, DeadRow2 as DeadRow, DEFAULT_PREFER_ASSETS, Cursor, CreateSubscriptionResponse2 as CreateSubscriptionResponse, CreateSubscriptionRequest2 as CreateSubscriptionRequest, CreateProjectParams, CreateApiKeyResponse, CreateApiKeyParams, ContractsListParams, ContractsEnvelope, Contracts, ContractSummary, ContractConformance, ContractCallsWalkParams, ContractCallsListParams, ContractCallsEnvelope, ContractCallsConsumeParams, ContextSnapshot, ContextProject, ContextApiKey, ContextAccount, ConsumerBatchContext, ChainWebhookEnvelope, ChainWebhookDelivery2 as ChainWebhookDelivery, ChainTxLevelEvent, ChainTriggerType, ChainTrigger, ChainTestDelivery, ChainStxTransferData, ChainStxMintData, ChainStxLockData, ChainStxBurnData, ChainReorgRollbackEnvelope, ChainReorgRollbackDelivery, ChainReorgOrphanedEntry, ChainPrintEventData, ChainNftTransferData, ChainNftMintData, ChainNftBurnData, ChainFtTransferData, ChainFtMintData, ChainFtBurnData, ChainEventEnvelope, ChainApplyEnvelopeOf, ChainApplyEnvelope, ChainApplyDeliveryOf, CanonicalWalkParams, CanonicalListParams, CanonicalEnvelope, ByoBreakingChangeError, ByoBreakingChangeDetails, BuildSignedX402PaymentOptions, BlocksWalkParams, BlocksListParams, BlocksEnvelope, BlockEnvelope, AuthError, ApiKeys, ApiKeySummary, ApiError, ActiveSubgraphOperation };
|
|
2898
|
+
export { withX402, verifyWebhookSignature, verifyTransactionProof, verify as verifyStandardWebhooksHeaders, verifySecondlayerSignature, trigger, toJsonSafe, selectOffer, resolveApiKey, resolveAccountNonce, readX402Receipt, readX402Challenge, payAndRetry, isStxTransfer, isStxMint, isStxLock, isStxBurn, isPrint, isNftTransfer, isNftMint, isNftBurn, isFtTransfer, isFtMint, isFtBurn, getSubgraph, fetchRewardSet, decodeStxTransfer, decodeStxMint, decodeStxLock, decodeStxBurn, decodePrint, decodeNftTransfer, decodeNftMint, decodeNftBurn, decodeFtTransfer, decodeFtMint, decodeFtBurn, decodeClarityValue, decodeChainWebhook, createX402Client, createStreamsClient, consumeIndexFeed, buildSignedX402Payment, X402SpendGuardError, X402Result, X402Receipt, X402Fetch, X402ClientOptions, X402Client, X402Challenge, X402Accept, WithX402Options, WebhookHeaderInput, VersionConflictError, ValidationError, UpdateSubscriptionRequest2 as UpdateSubscriptionRequest, UpdateProjectParams, TransactionsWalkParams, TransactionsListParams, TransactionsEnvelope, TransactionProofVerifyResult, TransactionProof, TransactionEnvelope, Subscriptions, SubscriptionSummary2 as SubscriptionSummary, SubscriptionStatus, SubscriptionRuntime, SubscriptionKind, SubscriptionFormat, SubscriptionDetail2 as SubscriptionDetail, Subgraphs, SubgraphSpecOptions3 as SubgraphSpecOptions, SubgraphSpecFormat2 as SubgraphSpecFormat, SubgraphOperationStatus, SubgraphAgentSchema3 as SubgraphAgentSchema, StreamsUsage, StreamsTip, StreamsSignatureError, StreamsServerError, StreamsReorgsListParams, StreamsReorgsListEnvelope, StreamsReorgContext, StreamsReorg, StreamsEventsSubscribeParams, StreamsEventsStreamParams, StreamsEventsListParams, StreamsEventsListEnvelope, StreamsEventsEnvelope, StreamsEventsConsumeResult, StreamsEventsConsumeParams, StreamsEventType, StreamsEventPayload, StreamsEvent, StreamsDumpsManifest, StreamsDumps, StreamsDumpFile, StreamsConsumeParams, StreamsClient, StreamsCanonicalBlock, StreamsBatchContext, StreamsBatch, StandardWebhooksHeaders2 as StandardWebhooksHeaders, StackingWalkParams, StackingListParams, StackingEnvelope, SelectOfferOptions, SecondLayerOptions, SecondLayer, ScopedKeyProduct, SbtcWithdrawalsWalkParams, SbtcWithdrawalsListParams, SbtcWithdrawalsEnvelope, SbtcWithdrawalSweptConfirmedEvent, SbtcWithdrawalStatus, SbtcWithdrawalEvent, SbtcWithdrawalEnvelope, SbtcSummaryEnvelope, SbtcResource, SbtcEventsWalkParams, SbtcEventsListParams, SbtcEventsEnvelope, SbtcEventsConsumeParams, SbtcEventTopic, SbtcDepositsWalkParams, SbtcDepositsListParams, SbtcDepositsEnvelope, SbtcDepositsConsumeParams, SbtcDepositEvent, SbtcDepositEnvelope, RotateSecretResponse2 as RotateSecretResponse, RewardSet2 as RewardSet, ReplayResult2 as ReplayResult, RateLimitError, Projects, ProjectTeamMember, ProjectTeam, ProjectInvitation, Project, PrintSchemaResponse, PoxResource, PoxCyclesWalkParams, PoxCyclesListParams, PoxCyclesEnvelope, PoxCycleEnvelope, Pox5Resource, Pox5EventsWalkParams, Pox5EventsListParams, Pox5EventsEnvelope, PayAndRetryOptions, NftTransfersWalkParams, NftTransfersResource, NftTransfersListParams, NftTransfersEnvelope, NftTransferPayload, NftTransferEvent, NftTransfer, MempoolWalkParams, MempoolTransactionEnvelope, MempoolListParams, MempoolEnvelope, IndexUsage, IndexTransaction, IndexTip, IndexStxTransfer, IndexStxMint, IndexStxLock, IndexStxBurn, IndexStackingAction, IndexSbtcWithdrawalPhase, IndexSbtcWithdrawalDetail, IndexSbtcWithdrawal, IndexSbtcSummary, IndexSbtcEvent, IndexSbtcDepositDetail, IndexSbtcDeposit, IndexReorg, IndexPrint, IndexPoxFunctionCount, IndexPoxCycle, IndexPox5EventTopic, IndexPox5Event, IndexPostCondition, IndexNftTransfer, IndexNftMint, IndexNftBurn, IndexMempoolTransaction, IndexFtTransfer, IndexFtMint, IndexFtBurn, IndexFeedItem, IndexFeedFetcher, IndexFeedEnvelope, IndexEventsResource, IndexEventTypeFilters, IndexEventType, IndexEventOf, IndexEvent, IndexDiscovery, IndexContractCall, IndexConsumeOptions, IndexCanonicalBlock, IndexBlock, Index, FtTransfersWalkParams, FtTransfersResource, FtTransfersListParams, FtTransfersEnvelope, FtTransferPayload, FtTransferEvent, FtTransfer, FetchLike2 as FetchLike, EventsWalkParams, EventsListParams, EventsEnvelope, EventsConsumeParams, DeliveryRow2 as DeliveryRow, DecodedStxTransferPayload, DecodedStxTransfer, DecodedStxMintPayload, DecodedStxMint, DecodedStxLockPayload, DecodedStxLock, DecodedStxBurnPayload, DecodedStxBurn, DecodedPrintValue, DecodedPrintPayload, DecodedPrint, DecodedNftTransferPayload, DecodedNftTransfer, DecodedNftMintPayload, DecodedNftMint, DecodedNftBurnPayload, DecodedNftBurn, DecodedFtTransferPayload, DecodedFtTransfer, DecodedFtMintPayload, DecodedFtMint, DecodedFtBurnPayload, DecodedFtBurn, DecodedEventRow, DecodedEventColumns, DeadRow2 as DeadRow, DEFAULT_PREFER_ASSETS, Cursor, CreateSubscriptionResponse2 as CreateSubscriptionResponse, CreateSubscriptionRequest2 as CreateSubscriptionRequest, CreateProjectParams, CreateApiKeyResponse, CreateApiKeyParams, ContractsListParams, ContractsEnvelope, Contracts, ContractSummary, ContractConformance, ContractCallsWalkParams, ContractCallsListParams, ContractCallsEnvelope, ContractCallsConsumeParams, ContextSnapshot, ContextProject, ContextApiKey, ContextAccount, ConsumerBatchContext, ChainWebhookEnvelope, ChainWebhookDelivery2 as ChainWebhookDelivery, ChainTxLevelEvent, ChainTriggerType, ChainTrigger, ChainTestDelivery, ChainStxTransferData, ChainStxMintData, ChainStxLockData, ChainStxBurnData, ChainReorgRollbackEnvelope, ChainReorgRollbackDelivery, ChainReorgOrphanedEntry, ChainPrintEventData, ChainNftTransferData, ChainNftMintData, ChainNftBurnData, ChainFtTransferData, ChainFtMintData, ChainFtBurnData, ChainEventEnvelope, ChainApplyEnvelopeOf, ChainApplyEnvelope, ChainApplyDeliveryOf, CanonicalWalkParams, CanonicalListParams, CanonicalEnvelope, ByoBreakingChangeError, ByoBreakingChangeDetails, BuildSignedX402PaymentOptions, BlocksWalkParams, BlocksListParams, BlocksEnvelope, BlockEnvelope, AuthError, ApiKeys, ApiKeySummary, ApiError, ActiveSubgraphOperation };
|
package/dist/index.js
CHANGED
|
@@ -807,6 +807,19 @@ class Index extends BaseClient {
|
|
|
807
807
|
deposits: {
|
|
808
808
|
list: (params = {}) => this.listSbtcDeposits(params),
|
|
809
809
|
walk: (params = {}) => this.walkSbtcDeposits(params),
|
|
810
|
+
consume: (params) => consumeIndexFeed({
|
|
811
|
+
...params,
|
|
812
|
+
fetchPage: ({ cursor, fromHeight, limit }) => this.listSbtcDeposits({
|
|
813
|
+
confirmed: params.confirmed,
|
|
814
|
+
sender: params.sender,
|
|
815
|
+
bitcoinTxid: params.bitcoinTxid,
|
|
816
|
+
toHeight: params.toHeight,
|
|
817
|
+
cursor,
|
|
818
|
+
fromHeight,
|
|
819
|
+
limit
|
|
820
|
+
}),
|
|
821
|
+
itemsOf: (envelope) => envelope.deposits
|
|
822
|
+
}),
|
|
810
823
|
get: (bitcoinTxid) => this.getSbtcDeposit(bitcoinTxid)
|
|
811
824
|
},
|
|
812
825
|
withdrawals: {
|
|
@@ -816,7 +829,22 @@ class Index extends BaseClient {
|
|
|
816
829
|
},
|
|
817
830
|
events: {
|
|
818
831
|
list: (params = {}) => this.listSbtcEvents(params),
|
|
819
|
-
walk: (params = {}) => this.walkSbtcEvents(params)
|
|
832
|
+
walk: (params = {}) => this.walkSbtcEvents(params),
|
|
833
|
+
consume: (params) => consumeIndexFeed({
|
|
834
|
+
...params,
|
|
835
|
+
fetchPage: ({ cursor, fromHeight, limit }) => this.listSbtcEvents({
|
|
836
|
+
confirmed: params.confirmed,
|
|
837
|
+
topic: params.topic,
|
|
838
|
+
sender: params.sender,
|
|
839
|
+
requestId: params.requestId,
|
|
840
|
+
bitcoinTxid: params.bitcoinTxid,
|
|
841
|
+
toHeight: params.toHeight,
|
|
842
|
+
cursor,
|
|
843
|
+
fromHeight,
|
|
844
|
+
limit
|
|
845
|
+
}),
|
|
846
|
+
itemsOf: (envelope) => envelope.events
|
|
847
|
+
})
|
|
820
848
|
},
|
|
821
849
|
summary: () => this.getSbtcSummary()
|
|
822
850
|
};
|
|
@@ -2468,5 +2496,5 @@ export {
|
|
|
2468
2496
|
ApiError
|
|
2469
2497
|
};
|
|
2470
2498
|
|
|
2471
|
-
//# debugId=
|
|
2499
|
+
//# debugId=D5B171025CDFC80A64756E2164756E21
|
|
2472
2500
|
//# sourceMappingURL=index.js.map
|