@hirosystems/chainhook-client
Version:
Chainhook TypeScript client
60 lines • 3.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.StacksTransactionKindSchema = exports.StacksTransactionUnsupportedKindSchema = exports.StacksTransactionBitcoinOpDelegateStackStxKindSchema = exports.StacksTransactionBitcoinOpStackStxKindSchema = exports.StacksTransactionNativeTokenTransferKindSchema = exports.StacksTransactionTenureChangeKindSchema = exports.StacksTransactionCoinbaseKindSchema = exports.StacksTransactionContractDeploymentKindSchema = exports.StacksTransactionContractCallKindSchema = void 0;
const typebox_1 = require("@sinclair/typebox");
exports.StacksTransactionContractCallKindSchema = typebox_1.Type.Object({
type: typebox_1.Type.Literal('ContractCall'),
data: typebox_1.Type.Object({
args: typebox_1.Type.Array(typebox_1.Type.String()),
contract_identifier: typebox_1.Type.String(),
method: typebox_1.Type.String(),
}),
});
exports.StacksTransactionContractDeploymentKindSchema = typebox_1.Type.Object({
type: typebox_1.Type.Literal('ContractDeployment'),
data: typebox_1.Type.Object({
contract_identifier: typebox_1.Type.String(),
code: typebox_1.Type.String(),
}),
});
exports.StacksTransactionCoinbaseKindSchema = typebox_1.Type.Object({
type: typebox_1.Type.Literal('Coinbase'),
});
exports.StacksTransactionTenureChangeKindSchema = typebox_1.Type.Object({
type: typebox_1.Type.Literal('TenureChange'),
});
exports.StacksTransactionNativeTokenTransferKindSchema = typebox_1.Type.Object({
type: typebox_1.Type.Literal('NativeTokenTransfer'),
});
exports.StacksTransactionBitcoinOpStackStxKindSchema = typebox_1.Type.Object({
type: typebox_1.Type.Literal('BitcoinOp'),
data: typebox_1.Type.Object({
locked_amount: typebox_1.Type.String(),
stacking_address: typebox_1.Type.String(),
unlock_height: typebox_1.Type.String(),
}),
});
exports.StacksTransactionBitcoinOpDelegateStackStxKindSchema = typebox_1.Type.Object({
type: typebox_1.Type.Literal('BitcoinOp'),
data: typebox_1.Type.Object({
stacking_address: typebox_1.Type.String(),
amount: typebox_1.Type.String(),
delegate: typebox_1.Type.String(),
pox_address: typebox_1.Type.Optional(typebox_1.Type.String()),
unlock_height: typebox_1.Type.Optional(typebox_1.Type.String()),
}),
});
exports.StacksTransactionUnsupportedKindSchema = typebox_1.Type.Object({
type: typebox_1.Type.Literal('Unsupported'),
});
exports.StacksTransactionKindSchema = typebox_1.Type.Union([
exports.StacksTransactionCoinbaseKindSchema,
exports.StacksTransactionTenureChangeKindSchema,
exports.StacksTransactionContractCallKindSchema,
exports.StacksTransactionContractDeploymentKindSchema,
exports.StacksTransactionNativeTokenTransferKindSchema,
exports.StacksTransactionBitcoinOpStackStxKindSchema,
exports.StacksTransactionBitcoinOpDelegateStackStxKindSchema,
exports.StacksTransactionUnsupportedKindSchema,
]);
//# sourceMappingURL=tx_kind.js.map