UNPKG

@hirosystems/chainhook-client

Version:
108 lines 5.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BitcoinIfThisThenThatSchema = exports.BitcoinIfThisSchema = exports.BitcoinIfThisOptionsSchema = exports.BitcoinIfThisOrdinalsFeedSchema = exports.BitcoinIfThisOrdinalsMetaProtocolSchema = exports.BitcoinIfThisStacksStxLockedSchema = exports.BitcoinIfThisStacksStxTransferredSchema = exports.BitcoinIfThisStacksLeaderKeyRegisteredSchema = exports.BitcoinIfThisStacksBlockCommittedSchema = exports.BitcoinIfThisP2WSHSchema = exports.BitcoinIfThisP2WPKHSchema = exports.BitcoinIfThisP2SHSchema = exports.BitcoinIfThisP2PKHSchema = exports.BitcoinIfThisOpReturnEndsWithSchema = exports.BitcoinIfThisOpReturnEqualsSchema = exports.BitcoinIfThisOpReturnStartsWithSchema = exports.BitcoinIfThisTxIdSchema = void 0; const typebox_1 = require("@sinclair/typebox"); const predicate_1 = require("../predicate"); exports.BitcoinIfThisTxIdSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('txid'), equals: typebox_1.Type.String(), }); exports.BitcoinIfThisOpReturnStartsWithSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('outputs'), op_return: typebox_1.Type.Object({ starts_with: typebox_1.Type.String(), }), }); exports.BitcoinIfThisOpReturnEqualsSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('outputs'), op_return: typebox_1.Type.Object({ equals: typebox_1.Type.String(), }), }); exports.BitcoinIfThisOpReturnEndsWithSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('outputs'), op_return: typebox_1.Type.Object({ ends_with: typebox_1.Type.String(), }), }); exports.BitcoinIfThisP2PKHSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('outputs'), p2pkh: typebox_1.Type.Object({ equals: typebox_1.Type.String(), }), }); exports.BitcoinIfThisP2SHSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('outputs'), p2sh: typebox_1.Type.Object({ equals: typebox_1.Type.String(), }), }); exports.BitcoinIfThisP2WPKHSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('outputs'), p2wpkh: typebox_1.Type.Object({ equals: typebox_1.Type.String(), }), }); exports.BitcoinIfThisP2WSHSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('outputs'), p2wsh: typebox_1.Type.Object({ equals: typebox_1.Type.String(), }), }); exports.BitcoinIfThisStacksBlockCommittedSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('stacks_protocol'), operation: typebox_1.Type.Literal('block_committed'), }); exports.BitcoinIfThisStacksLeaderKeyRegisteredSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('stacks_protocol'), operation: typebox_1.Type.Literal('leader_registered'), }); exports.BitcoinIfThisStacksStxTransferredSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('stacks_protocol'), operation: typebox_1.Type.Literal('stx_transfered'), }); exports.BitcoinIfThisStacksStxLockedSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('stacks_protocol'), operation: typebox_1.Type.Literal('stx_locked'), }); exports.BitcoinIfThisOrdinalsMetaProtocolSchema = typebox_1.Type.Union([ typebox_1.Type.Literal('all'), typebox_1.Type.Literal('brc-20'), ]); exports.BitcoinIfThisOrdinalsFeedSchema = typebox_1.Type.Object({ scope: typebox_1.Type.Literal('ordinals_protocol'), operation: typebox_1.Type.Literal('inscription_feed'), meta_protocols: typebox_1.Type.Optional(typebox_1.Type.Array(exports.BitcoinIfThisOrdinalsMetaProtocolSchema)), }); exports.BitcoinIfThisOptionsSchema = typebox_1.Type.Object({ start_block: typebox_1.Type.Optional(typebox_1.Type.Integer()), end_block: typebox_1.Type.Optional(typebox_1.Type.Integer()), expire_after_occurrence: typebox_1.Type.Optional(typebox_1.Type.Integer()), include_proof: typebox_1.Type.Optional(typebox_1.Type.Boolean()), include_inputs: typebox_1.Type.Optional(typebox_1.Type.Boolean()), include_outputs: typebox_1.Type.Optional(typebox_1.Type.Boolean()), include_witness: typebox_1.Type.Optional(typebox_1.Type.Boolean()), }); exports.BitcoinIfThisSchema = typebox_1.Type.Union([ exports.BitcoinIfThisTxIdSchema, exports.BitcoinIfThisOpReturnStartsWithSchema, exports.BitcoinIfThisOpReturnEqualsSchema, exports.BitcoinIfThisOpReturnEndsWithSchema, exports.BitcoinIfThisP2PKHSchema, exports.BitcoinIfThisP2SHSchema, exports.BitcoinIfThisP2WPKHSchema, exports.BitcoinIfThisP2WSHSchema, exports.BitcoinIfThisStacksBlockCommittedSchema, exports.BitcoinIfThisStacksLeaderKeyRegisteredSchema, exports.BitcoinIfThisStacksStxTransferredSchema, exports.BitcoinIfThisStacksStxLockedSchema, exports.BitcoinIfThisOrdinalsFeedSchema, ]); exports.BitcoinIfThisThenThatSchema = typebox_1.Type.Composite([ exports.BitcoinIfThisOptionsSchema, typebox_1.Type.Object({ if_this: exports.BitcoinIfThisSchema, then_that: predicate_1.ThenThatSchema, }), ]); //# sourceMappingURL=if_this.js.map