ord

package
v2.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2023 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptBidToBuy1SatOrdinal

func AcceptBidToBuy1SatOrdinal(ctx context.Context, vba *ValidateBidArgs, aba *AcceptBidArgs) (*bt.Tx, error)

AcceptBidToBuy1SatOrdinal accepts a partially signed Bitcoin transaction bid to buy an ordinal.

func AcceptBidToBuy1SatOrdinal2Dummies added in v2.2.1

func AcceptBidToBuy1SatOrdinal2Dummies(ctx context.Context, vba *ValidateBid2DArgs,
	aba *AcceptBid2DArgs) (*bt.Tx, error)

AcceptBidToBuy1SatOrdinal2Dummies creates a PBST (Partially Signed Bitcoin Transaction) that offers a specific ordinal UTXO for sale at a specific price.

func AcceptOrdinalSaleListing

func AcceptOrdinalSaleListing(ctx context.Context, vla *ValidateListingArgs, asoa *AcceptListingArgs) (*bt.Tx, error)

AcceptOrdinalSaleListing accepts a partially signed Bitcoin transaction offer to sell an ordinal. When accepting the offer, you will need to provide at least 2 UTXOs - with at least 1 being larger than the listed ordinal price.

func AcceptOrdinalSaleListing2Dummies added in v2.2.1

func AcceptOrdinalSaleListing2Dummies(ctx context.Context, vla *ValidateListingArgs,
	asoa *AcceptListingArgs) (*bt.Tx, error)

AcceptOrdinalSaleListing2Dummies accepts a partially signed Bitcoin transaction offer to sell an ordinal. When accepting the offer, you will need to provide at least 3 UTXOs - with the first 2 being dummy utxos that will just pass through, and the rest with the required payment and tx fees.

func ListOrdinalForSale

func ListOrdinalForSale(ctx context.Context, msoa *ListOrdinalArgs) (*bt.Tx, error)

ListOrdinalForSale creates a PBST (Partially Signed Bitcoin Transaction) that offers a specific ordinal UTXO for sale at a specific price.

func MakeBidToBuy1SatOrdinal

func MakeBidToBuy1SatOrdinal(ctx context.Context, mba *MakeBidArgs) (*bt.Tx, error)

MakeBidToBuy1SatOrdinal makes a bid offer to buy a 1 sat ordinal at a specific price - this tx will be partially signed and will need to be completed by the seller if they accept the bid. Multiple people can make different bids and the seller will need to choose only one to go through and broadcast to the node network.

Note: this function is meant for ordinals in 1 satoshi outputs instead of ordinal ranges in 1 output (>1 satoshi outputs).

func MakeBidToBuy1SatOrdinal2Dummies added in v2.2.1

func MakeBidToBuy1SatOrdinal2Dummies(ctx context.Context, mba *MakeBid2DArgs) (*bt.Tx, error)

MakeBidToBuy1SatOrdinal makes a bid offer to buy a 1 sat ordinal at a specific price - this tx will be partially signed and will need to be completed by the seller if they accept the bid. Multiple people can make different bids and the seller will need to choose only one to go through and broadcast to the node network.

Note: this function is meant for ordinals in 1 satoshi outputs instead of ordinal ranges in 1 output (>1 satoshi outputs).

Types

type AcceptBid2DArgs added in v2.2.1

type AcceptBid2DArgs struct {
	PSTx                       *bt.Tx
	SellerReceiveOrdinalScript *bscript.Script
	OrdinalUnlocker            bt.Unlocker
	ExtraUTXOs                 []*bt.UTXO
}

AcceptBid2DArgs contains the arguments needed to accept a bid to buy an ordinal.

type AcceptBidArgs

type AcceptBidArgs struct {
	PSTx                *bt.Tx
	SellerReceiveScript *bscript.Script
	OrdinalUnlocker     bt.Unlocker
}

AcceptBidArgs contains the arguments needed to accept a bid to buy an ordinal.

type AcceptListingArgs

type AcceptListingArgs struct {
	PSTx                      *bt.Tx
	UTXOs                     []*bt.UTXO
	BuyerReceiveOrdinalScript *bscript.Script
	DummyOutputScript         *bscript.Script
	ChangeScript              *bscript.Script
	FQ                        *bt.FeeQuote
}

AcceptListingArgs contains the arguments needed to make an offer to sell an ordinal.

type ListOrdinalArgs

type ListOrdinalArgs struct {
	SellerReceiveOutput *bt.Output
	OrdinalUTXO         *bt.UTXO
	OrdinalUnlocker     bt.Unlocker
}

ListOrdinalArgs contains the arguments needed to make an offer to sell an ordinal.

type MakeBid2DArgs added in v2.2.1

type MakeBid2DArgs struct {
	BidAmount                 uint64
	OrdinalTxID               string
	OrdinalVOut               uint32
	BidderUTXOs               []*bt.UTXO
	BuyerReceiveOrdinalScript *bscript.Script
	DummyOutputScript         *bscript.Script
	ChangeScript              *bscript.Script
	FQ                        *bt.FeeQuote
}

MakeBid2DArgs contains the arguments needed to make a bid to buy an ordinal.

type MakeBidArgs

type MakeBidArgs struct {
	BidAmount                 uint64
	OrdinalTxID               string
	OrdinalVOut               uint32
	BidderUTXOs               []*bt.UTXO
	BuyerReceiveOrdinalScript *bscript.Script
	DummyOutputScript         *bscript.Script
	ChangeScript              *bscript.Script
	FQ                        *bt.FeeQuote
}

MakeBidArgs contains the arguments needed to make a bid to buy an ordinal.

type ValidateBid2DArgs added in v2.2.1

type ValidateBid2DArgs struct {
	PreviousUTXOs []*bt.UTXO // index 2 should be the listed ordinal input
	BidAmount     uint64
	ExpectedFQ    *bt.FeeQuote
}

ValidateBid2DArgs are the arguments needed to validate a specific bid to buy an ordinal.

Note: index 2 should be the listed ordinal input.

func (*ValidateBid2DArgs) Validate added in v2.2.1

func (vba *ValidateBid2DArgs) Validate(pstx *bt.Tx) bool

Validate a bid to buy an ordinal given specific validation parameters.

type ValidateBidArgs

type ValidateBidArgs struct {
	OrdinalUTXO *bt.UTXO
	BidAmount   uint64
	ExpectedFQ  *bt.FeeQuote
}

ValidateBidArgs are the arguments needed to validate a specific bid to buy an ordinal. as they appear in the tx.

func (*ValidateBidArgs) Validate

func (vba *ValidateBidArgs) Validate(pstx *bt.Tx) bool

Validate a bid to buy an ordinal given specific validation parameters.

type ValidateListingArgs

type ValidateListingArgs struct {
	ListedOrdinalUTXO *bt.UTXO
}

ValidateListingArgs are the arguments needed to validate a specific listing to sell an ordinal.

func (*ValidateListingArgs) Validate

func (vla *ValidateListingArgs) Validate(pstx *bt.Tx) bool

Validate an ordinal sale offer listing given specific validation parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL