The bp Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The bp Reference Manual

This is the bp Reference Manual, version 0.0.2, generated automatically by Declt version 3.0 "Montgomery Scott" on Wed Oct 13 09:08:16 2021 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

BP - Bitcoin Protocol

Quicklisp Build Status

This is a Common Lisp implementation of the various components of the Bitcoin Protocol. The serialization and deserialization utils may be used for reading the block data both from peers and from local database on disk. EC-based cryptographic operations are implemented as FFI bindings to the secp256k1 using cffi, while hash-functions are taken from ironclad. Low-level networking is implemented using usocket, HTTP client code uses aserve and JSON handling is done with jsown.

THIS BITCOIN CONSENSUS RULES IMPLEMENTATION IS NOT, AND WILL PROBABLY NEVER BE FULLY COMPLIANT WITH BITCOIN CORE IMPLEMENTATION. DO NOT RELY ON IT FOR VALIDATING YOUR MAINNET TRANSACTIONS, AS IT MAY EASILY PUT YOU OUT OF SYNC WITH THE NETWORK IN A LOT OF CORNER CASES.

Table of Contents

Installation

Elliptic curve cryptography utilities (transaction signing and verification) use a secp256k1 library, so it must be installed before building the bp system (either manually, or using the system package manager if available):

# Ubuntu
$ apt install libsecp256k1 libsecp256k1-dev

# Arch Linux
$ pacman -Syu libsecp256k1

# macOS
$ brew tap cuber/homebrew-libsecp256k1
$ brew install libsecp256k1

Once secp256k1 is ready, bp can be installed via quicklisp tool:

CL-USER> (ql:quickload "bp")

Alternatively, bp system can be loaded from sources, assuming the following Common Lisp packages are available locally:

In order to load bp from sources, evaluate the following form (this assumes that ASDF is able to find the system definition; more on that here):

CL-USER> (asdf:load-system "bp")

Interface

Currently this library only provides utilities for stateless interaction with Bitcoin from REPL. Storage, wallet and full node capabilities are somewhere in a distant future.

Note that at this point only the symbols exported from the package bp/core/all (nicknamed bp) can be considered an API - changes to these functions and classes will be kept to a minimum. Everything else will likely be changing a lot.

Chain interface

Functions bp:get-block-hash, bp:get-block and bp:get-transaction allow to pull chain data from any external supplier specified with the bp:with-chain-supplier macro:

CL-USER> (bp:with-chain-supplier (bp:node-connection
                                  :url "http://localhost:8332"
                                  :username "btcuser"
                                  :password "btcpassword")
           (bp:get-transaction "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098"))
#<BP/CORE/TRANSACTION:TX 0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098>

Non-nil keyword argument :encoded can be used with bp:get-block and bp:get-transaction to return serialized transaction hex-encoded in a string:

CL-USER> (bp:get-transaction "14...c3" :encoded t)
"010000000...ae00000000"

Under the hood, these operations call corresponding generic functions bp:chain-get-{block-hash,block,transaction} which take the supplier object as an explicit first argument.

Model and serialization

Bitcoin data entities are represented by the following structures:

Functions named bp:block-* (both for bp:block-header and bp:cblock), bp:tx-*, bp:txin-* and bp:txout-* provide access to the components of the corresponding entities.

Functions bp:parse and bp:serialize can be used to read and write any Bitcoin entity from and to any octet stream respectively:

CL-USER> (ironclad:with-octet-input-stream (stream #(1 0 ... 0 0))
           (bp:parse 'bp:tx in-stream))
#<BP/CORE/TRANSACTION:TX 17e590f116d3deeb9b121bbb1c37b7916e6b7859461a3af7edf74e2348a9b347>
CL-USER> (ironclad:with-octet-output-stream (stream)
           (bp:parse 'tx out-stream))
#(1 0 ... 0 0)

Note that while bp:serialize function take an entity as its first argument, bp:parse takes the symbol naming the class of the entity, behaving as class method.

Functions bp:decode and bp:encode wrap above functions to decode and encode Bitcoin entities from and to hex-encoded strings:

CL-USER> (bp:decode 'bp:tx "0100000002f8615378...e097a988ac00000000")
#<BP/CORE/TRANSACTION:TX 17e590f116d3deeb9b121bbb1c37b7916e6b7859461a3af7edf74e2348a9b347>
CL-USER> (bp:encode *)
"0100000002f8615378...e097a988ac00000000"

Validation

Functions bp:validate and bp:validp take an entity as well as the optional context parameters, and validate it according to an approximation of Bitcoin consensus rules.

Both functions return t if the entity is valid, but the bp:validate function signals an error otherwise, while the bp:validp function simply returns nil.

Both functions assume the chain supplier context (i.e. they are called within the body of bp:with-chain-supplier).

Dynamic variable bp:*trace-script-execution* can be used to enable printing the steps of script execution (chain supplier macro omitted):

CL-USER> (setf bp:*trace-script-execution* t)
T
CL-USER> (bp:validate
          (bp:get-transaction "17e590f116d3deeb9b121bbb1c37b7916e6b7859461a3af7edf74e2348a9b347"))
op:       OP_PUSH22
payload:  #(0 14 a4 b4 ca 48 de b 3f ff c1 54 4 a1 ac dc 8d ba ae 22 69 55)
commands: <>
stack:    ()

op:       OP_HASH160
payload:  -
commands: <OP_PUSH20 OP_EQUAL>
stack:    (#(0 14 a4 b4 ca 48 de b 3f ff c1 54 4 a1 ac dc 8d ba ae 22 69 55))

op:       OP_PUSH20
payload:  #(29 28 f4 3a f1 8d 2d 60 e8 a8 43 54 d 80 86 b3 5 34 13 39)
commands: <OP_EQUAL>
stack:    (#(29 28 f4 3a f1 8d 2d 60 e8 a8 43 54 d 80 86 b3 5 34 13 39))

op:       OP_EQUAL
payload:  -
commands: <>
stack:    (#(29 28 f4 3a f1 8d 2d 60 e8 a8 43 54 d 80 86 b3 5 34 13 39)
           #(29 28 f4 3a f1 8d 2d 60 e8 a8 43 54 d 80 86 b3 5 34 13 39))

op:       OP_FALSE
payload:  -
commands: <OP_PUSH20>
stack:    ()

op:       OP_PUSH20
payload:  #(a4 b4 ca 48 de b 3f ff c1 54 4 a1 ac dc 8d ba ae 22 69 55)
commands: <>
stack:    (#())

T

Validating certain entities requires additional information (block height, transactions index, block/transaction itself, etc), which can be packed into an instance of bp:validation-context class. For example, validating a coinbase transaction will fail, because the only transaction input it contains will have its previous-tx-id set to 0, which is invalid for regular transactions. For example, to be considered valid, a coinbase transaction must be the first transaction of its block, while the block itself is required for amount verification (to calculate the collected fees) and block height may be needed to perform the BIP-0034 check, so such a transaction can be validated using the following form:

CL-USER> (let* ((block
                  (bp:get-block "00000000000000d0dfd4c9d588d325dce4f32c1b31b7c0064cba7025a9b9adcc"))
                (context
                  (make-instance 'bp:validation-context :tx-index 0 :height 227836 :block block))
           (bp:validate
            (bp:get-transaction "0f3601a5da2f516fa9d3f80c9bf6e530f1afb0c90da73e8f8ad0630c5483afe5")
            :context context)))
T

Peer-to-peer network

BP provides simple utilities for interacting with Bitcoin network - a subset of network messages and functions for establishing connections with other network nodes as well as requesting blocks and transactions.

In order to demontrate interaction with Bitcoin network, we can start a regtest Bitcoin node:

# Start Bitcoin daemon:
$ bitcoind --daemon --regtest --datadir=$HOME/.bitcoin

# Generate a few blocks:
$ bitcoin-cli --regtest generatetoaddress 5 $(bitcoin-cli --regtest getnewaddress)

# Enable net logging:
$ bitcoin-cli --regtest logging "[\"net\"]"

# Tail log file to see the incoming messages:
$ tail -f ~/.bitcoin/regtest/debug.log

Executing the following forms from Lisp REPL will perform a handshake with Bitcoin node:

CL-USER> (defvar *node* (make-instance 'bpnet:simple-node :network :regtest))
...
CL-USER> (bpnet:connect-peer *node* :host "127.0.0.1" :port 18444)
...

bpnet:simple-node is a very simple network node implementation that maintains a single peer connection and provides bpnet:send-message and bpnet:receive-message functions for sending and receiving messages, respectively.

Alternatively, bpnet:simple-node can be asked to discover a peer using a hardcoded DNS seed, but this is currently only supported on mainnet. The following form will select a random peer and shake hands with it:

CL-USER> (setf *node* (make-instance 'bpnet:simple-node :peer :discover))
...

Objects of bpnet:simple-node partially implement chain supplier interface - bp:chain-get-block-hash is currently not supported, bp:chain-get-transaction only returns transactions that are currently in the mempool or in relay set (this is an intentional limitation of the Bitcoin gossip protocol to prevent clients from assuming all nodes keep full transaction indexes). bp:chain-get-block works as expected. In the example below <block-hash> must be a hash of one of the blocks generated by the generatetoaddress command above:

CL-USER> (bp:chain-get-block *node* <block-hash>)
...

License

Copyright (c) 2019-2021 Seibart Nedor <rodentrabies@protonmail.com>

Licensed under MIT License. See LICENSE.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Next: , Previous: , Up: Systems   [Contents][Index]

2.1 bp

Author

whythat <whythat@protonmail.com>

License

MIT

Description

Bitcoin Protocol components in Common Lisp

Version

0.0.2

Dependencies
Source

bp.asd (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.2 bp/net/all

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.3 bp/net/node

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.4 bp/crypto/all

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.5 bp/net/parameters

Author

whythat <whythat@protonmail.com>

License

MIT

Dependency

bp/core/all (system)

Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.6 bp/net/message

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.7 bp/core/all

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.8 bp/core/consensus

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.9 bp/core/chain

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.10 bp/core/merkletree

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.11 bp/core/block

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.12 bp/core/transaction

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.13 bp/core/script

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.14 bp/crypto/secp256k1

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.15 bp/crypto/random

Author

whythat <whythat@protonmail.com>

License

MIT

Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.16 bp/core/parameters

Author

whythat <whythat@protonmail.com>

License

MIT

Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.17 bp/net/address

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.18 bp/core/encoding

Author

whythat <whythat@protonmail.com>

License

MIT

Dependencies
Source

bp.asd (file)

Component

file-type.lisp (file)


Previous: , Up: Systems   [Contents][Index]

2.19 bp/crypto/hash

Author

whythat <whythat@protonmail.com>

License

MIT

Dependency

ironclad

Source

bp.asd (file)

Component

file-type.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 bp.asd

Location

bp.asd

Systems

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 bp/net/all/file-type.lisp

Parent

bp/net/all (system)

Location

net/all.lisp

Packages

bp/net/all


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 bp/net/node/file-type.lisp

Parent

bp/net/node (system)

Location

net/node.lisp

Packages

bp/net/node

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 bp/crypto/all/file-type.lisp

Parent

bp/crypto/all (system)

Location

crypto/all.lisp

Packages

bp/crypto/all


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 bp/net/parameters/file-type.lisp

Parent

bp/net/parameters (system)

Location

net/parameters.lisp

Packages

bp/net/parameters

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.6 bp/net/message/file-type.lisp

Parent

bp/net/message (system)

Location

net/message.lisp

Packages

bp/net/message

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.7 bp/core/all/file-type.lisp

Parent

bp/core/all (system)

Location

core/all.lisp

Packages

bp/core/all


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.8 bp/core/consensus/file-type.lisp

Parent

bp/core/consensus (system)

Location

core/consensus.lisp

Packages

bp/core/consensus

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.9 bp/core/chain/file-type.lisp

Parent

bp/core/chain (system)

Location

core/chain.lisp

Packages

bp/core/chain

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.10 bp/core/merkletree/file-type.lisp

Parent

bp/core/merkletree (system)

Location

core/merkletree.lisp

Packages

bp/core/merkletree

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.11 bp/core/block/file-type.lisp

Parent

bp/core/block (system)

Location

core/block.lisp

Packages

bp/core/block

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.12 bp/core/transaction/file-type.lisp

Parent

bp/core/transaction (system)

Location

core/transaction.lisp

Packages

bp/core/transaction

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.13 bp/core/script/file-type.lisp

Parent

bp/core/script (system)

Location

core/script.lisp

Packages

bp/core/script

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.14 bp/crypto/secp256k1/file-type.lisp

Parent

bp/crypto/secp256k1 (system)

Location

crypto/secp256k1.lisp

Packages

bp/crypto/secp256k1

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.15 bp/crypto/random/file-type.lisp

Parent

bp/crypto/random (system)

Location

crypto/random.lisp

Packages

bp/crypto/random

Exported Definitions

random-bytes (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.16 bp/core/parameters/file-type.lisp

Parent

bp/core/parameters (system)

Location

core/parameters.lisp

Packages

bp/core/parameters

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.17 bp/net/address/file-type.lisp

Parent

bp/net/address (system)

Location

net/address.lisp

Packages

bp/net/address

Exported Definitions
Internal Definitions

*dns-seed* (special variable)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.18 bp/core/encoding/file-type.lisp

Parent

bp/core/encoding (system)

Location

core/encoding.lisp

Packages

bp/core/encoding

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.19 bp/crypto/hash/file-type.lisp

Parent

bp/crypto/hash (system)

Location

crypto/hash.lisp

Packages

bp/crypto/hash

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 bp/net/all

Source

file-type.lisp (file)

Nickname

bpnet

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

4.2 bp/net/node

Source

file-type.lisp (file)

Use List
Used By List

bp/net/all

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.3 bp/crypto/all

Source

file-type.lisp (file)

Nickname

bpcrypto

Use List
Used By List

bp/net/node


Next: , Previous: , Up: Packages   [Contents][Index]

4.4 bp/net/parameters

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.5 bp/net/message

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.6 bp/core/all

Source

file-type.lisp (file)

Nickname

bp

Use List
Used By List

Next: , Previous: , Up: Packages   [Contents][Index]

4.7 bp/core/consensus

Source

file-type.lisp (file)

Use List
Used By List

bp/core/all

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.8 bp/core/chain

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.9 bp/core/merkletree

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.10 bp/core/block

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.11 bp/core/transaction

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.12 bp/core/script

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.13 bp/crypto/secp256k1

Source

file-type.lisp (file)

Nickname

secp256k1

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.14 bp/crypto/random

Source

file-type.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions

random-bytes (function)


Next: , Previous: , Up: Packages   [Contents][Index]

4.15 bp/core/parameters

Source

file-type.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.16 bp/net/address

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

*dns-seed* (special variable)


Next: , Previous: , Up: Packages   [Contents][Index]

4.17 bp/core/encoding

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.18 bp/crypto/hash

Source

file-type.lisp (file)

Use List
Used By List
Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Constants

Constant: +bp-network-port+
Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +bp-regtest-network-port+
Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +bp-testnet-network-port+
Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +halving-period+

Number of blocks in between halving events - each 210000 blocks, the block reward is reduced by half, eventually getting to 0 and providing the limited supply property of Bitcoin.

Package

bp/core/parameters

Source

file-type.lisp (file)

Constant: +initial-block-reward+

Initial reward included in newly mined blocks.

Package

bp/core/parameters

Source

file-type.lisp (file)

Constant: +iv-error+

Any data of with this number may be ignored.

Package

bp/net/message

Source

file-type.lisp (file)

Constant: +iv-msg-block+

Hash is related to a data block.

Package

bp/net/message

Source

file-type.lisp (file)

Constant: +iv-msg-cmpct-block+

Hash of a block header; identical to MSG_BLOCK. Only to be used in getdata message. Indicates the reply should be a cmpctblock message. See BIP-0152 for more info.

Package

bp/net/message

Source

file-type.lisp (file)

Constant: +iv-msg-filtered-block+

Hash of a block header; identical to MSG_BLOCK. Only to be used in getdata message. Indicates the reply should be a merkleblock message rather than a block message; this only works if a bloom filter has been set.

Package

bp/net/message

Source

file-type.lisp (file)

Constant: +iv-msg-tx+

Hash is related to a transaction.

Package

bp/net/message

Source

file-type.lisp (file)

Constant: +mainnet-bip-0016-switch-time+

Block timestamp at which BIP-0016 was adopted by the mainnet.

Package

bp/core/parameters

Source

file-type.lisp (file)

Constant: +network-magic+
Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +network-port+
Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +node-bloom+

See BIP-0111.

Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +node-getutxo+

See BIP-0064.

Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +node-network+

This service flag means that given node can serve full blocks instead of just headers.

Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +node-network-limited+

See BIP-0159.

Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +node-witness+

See BIP-0111.

Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +regtest-network-magic+
Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +regtest-network-port+
Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +testnet-bip-0016-switch-time+

Block timestamp at which BIP-0016 was adopted by the testnet.

Package

bp/core/parameters

Source

file-type.lisp (file)

Constant: +testnet-network-magic+
Package

bp/net/parameters

Source

file-type.lisp (file)

Constant: +testnet-network-port+
Package

bp/net/parameters

Source

file-type.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Special variables

Special Variable: *bip-0016-active-p*

Pay to Script Hash https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki.

Package

bp/core/parameters

Source

file-type.lisp (file)

Special Variable: *bip-0141-active-p*

Segregated Witness (Consensus layer) https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki.

Package

bp/core/parameters

Source

file-type.lisp (file)

Special Variable: *bp-version*

Version of the BP package.

Package

bp/core/parameters

Source

file-type.lisp (file)

Special Variable: *protocol-version*
Package

bp/net/parameters

Source

file-type.lisp (file)

Special Variable: *trace-script-execution*

Dynamic variable to control printing the steps of script execution. If its value is not NIL, it will be used as a first argument to the FORMAT function for logging script steps (i.e. setting it to T will print the trace to *STANDARD-OUTPUT*, while setting it to a stream value will write the trace to that stream).

Package

bp/core/script

Source

file-type.lisp (file)

Special Variable: *user-agent*
Package

bp/net/parameters

Source

file-type.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Macros

Macro: with-chain-supplier (TYPE &rest ARGS &key &allow-other-keys) &body BODY
Package

bp/core/chain

Source

file-type.lisp (file)

Macro: with-chain-supplier-normalization (ID-VAR ENCODED-VAR ERRORP-VAR &key ENTITY-TYPE ID-TYPE BODY-TYPE ERROR-TYPE) &body BODY

Helper macro for generating the normalization if the entity identifier (block height, block hash and transaction id) and post-processing (encoding, decoding and error signalling) for the chain supplier API implementations.

ID-VAR is an entity identifier variable, which will be normalized to a hex-string, byte array or left unchanged if the value of ID-TYPE is :ENCODED, :DECODED or :AS-IS respectively.

ENCODED-VAR corresponds to ENCODED chain supplier parameter - it will be used in combination with BODY-TYPE argument to determine if the result of the BODY should be encoded, decoded (as an ENTITY-TYPE entity in the latter case) or left as-is.

ERROPR-VAR corresponds to the ERRORP chain supplier parameter - it will be used to either return NIL or signal a corresponding error if the body returns NIL. If ERROR-TYPE is non-NIL, it will be used instead of the default error type.

Package

bp/core/chain

Source

file-type.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Functions

Function: address-from-bytes BYTES
Package

bp/net/address

Source

file-type.lisp (file)

Function: address-to-bytes ADDRESS
Package

bp/net/address

Source

file-type.lisp (file)

Function: base58-decode STRING

Decode a BASE58-encoded string and return a byte array.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: base58-encode BYTES

Encode a byte array with BASE58 and return a resulting string.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: base58check-decode STRING

Decode a BASE58-encoded string STRING, verify that the last 4 bytes (checksum part) match the first 4 bytes of the double-SHA256 hash of all but the last 4 bytes of the original sequence (payload part) and return the payload part.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: base58check-encode BYTES

BASE58-encode a byte array BYTES (payload) followed by the checksum computed as first 4 bytes of the double-SHA256 hash of the payload.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32-decode STRING &key VERSIONP
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32-encode HRP BYTES &key VERSIONP BECH32M-P
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: block-header INSTANCE
Function: (setf block-header) VALUE INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-id BLOCK
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-message-block INSTANCE
Function: (setf block-message-block) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: block-transaction CBLOCK INDEX
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-transactions INSTANCE
Function: (setf block-transactions) VALUE INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: build-merkle-tree LEAVES

Build merkle tree from the list of transactions LEAVES by taking a current tree level (starting from LEAVES), completing it to the even number of elements, grouping it into pairs and constructing the next level until it has length 1. Return a resulting root node.

Package

bp/core/merkletree

Source

file-type.lisp (file)

Function: command-from-message-type MESSAGE-TYPE

Return a string command for a given message struct.

Package

bp/net/message

Source

file-type.lisp (file)

Function: context-create-none ()
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: context-create-sign ()
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: context-create-verify ()
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: decode ENTITY-CLASS STRING

Decode Bitcoin Protocol entity given by its class name ENTITY-CLASS from hex STRING.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: decode-integer BYTES
Package

bp/core/script

Source

file-type.lisp (file)

Function: ec-privkey-negate SECKEY
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ec-pubkey-create SECKEY
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ec-pubkey-negate PUBKEY
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ec-pubkey-parse INPUT
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ec-pubkey-serialize PUBKEY &key COMPRESSED
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ec-seckey-verify SECKEY
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ecdsa-sign MSG32 SECKEY

Create an ECDSA signature.

Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ecdsa-signature-normalize SIGIN
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ecdsa-signature-parse-compact INPUT64
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ecdsa-signature-parse-der INPUT
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ecdsa-signature-serialize-compact SIGNATURE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ecdsa-signature-serialize-der SIGNATURE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ecdsa-verify SIGNATURE MSG32 PUBKEY

Verify an ECDSA signature.

Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: encode ENTITY

Encode Bitcoin Protocol ENTITY into a hex string.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: encode-integer INTEGER
Package

bp/core/script

Source

file-type.lisp (file)

Function: execute-script SCRIPT &key STATE

Execute a script using a state that can be provided externally.

Package

bp/core/script

Source

file-type.lisp (file)

Function: execute-scripts SCRIPT-SIG SCRIPT-PUBKEY &key STATE

Execute SCRIPT-SIG and SCRIPT-PUBKEY in succession, preserving the stack and performing the special rule detection (P2SH, SegWit).

Package

bp/core/script

Source

file-type.lisp (file)

Function: get-block HASH &key ENCODED ERRORP
Package

bp/core/chain

Source

file-type.lisp (file)

Function: get-block-hash HEIGHT &key ERRORP
Package

bp/core/chain

Source

file-type.lisp (file)

Function: get-transaction ID &key ENCODED ERRORP
Package

bp/core/chain

Source

file-type.lisp (file)

Function: getdata-message-inventory INSTANCE
Function: (setf getdata-message-inventory) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: hash160 BYTES
Package

bp/crypto/hash

Source

file-type.lisp (file)

Function: hash256 BYTES
Package

bp/crypto/hash

Source

file-type.lisp (file)

Function: hex-decode STRING

Shortcut to avoid using long symbol IRONCLAD:HEX-STRING-TO-BYTE-ARRAY.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: hex-encode BYTES

Shortcut to avoid using long symbol IRONCLAD:BYTE-ARRAY-TO-HEX-STRING.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: inv-message-inventory INSTANCE
Function: (setf inv-message-inventory) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: inventory-vector-hash INSTANCE
Function: (setf inventory-vector-hash) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: inventory-vector-type INSTANCE
Function: (setf inventory-vector-type) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-addr-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-alert-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-block-message &key (BLOCK BLOCK)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-blocktxn-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-byte-array LENGTH &optional CONTENTS
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: make-checkorder-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-cmpctblock-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-feefilter-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-filteradd-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-filterclear-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-filterload-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-getaddr-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-getblocks-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-getblocktxn-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-getdata-message &key (INVENTORY INVENTORY)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-getheaders-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-headers-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-inv-message &key (INVENTORY INVENTORY)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-inventory-vector &key (TYPE TYPE) (HASH HASH)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-key ()
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: make-mempool-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-merkleblock-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-network-address &key (TIMESTAMP TIMESTAMP) (SERVICES SERVICES) (ADDRESS ADDRESS) (PORT PORT)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-notfound-message &key (INVENTORY INVENTORY)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-packet &key (MAGIC MAGIC) (COMMAND COMMAND) (LENGTH LENGTH) (CHECKSUM CHECKSUM) (PAYLOAD PAYLOAD)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-ping-message &key (NONCE NONCE)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-pong-message &key (NONCE NONCE)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-pubkey KEY
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: make-reject-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-reply-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-script &key (COMMANDS COMMANDS)
Package

bp/core/script

Source

file-type.lisp (file)

Function: make-script-state &key (COMMANDS COMMANDS) (DISCARD DISCARD) (STACK STACK) (ALTSTACK ALTSTACK) (CONDITIONS CONDITIONS) (WITNESS WITNESS) (SIGHASHF SIGHASHF) (SIGVERSION SIGVERSION)
Package

bp/core/script

Source

file-type.lisp (file)

Function: make-sendcmpct-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-sendheaders-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-signature KEY HASH
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: make-submitorder-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-tx-message &key (TX TX)
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-verack-message &key
Package

bp/net/message

Source

file-type.lisp (file)

Function: make-version-message &key (VERSION VERSION) (SERVICES SERVICES) (TIMESTAMP TIMESTAMP) (RECEIVER-ADDRESS RECEIVER-ADDRESS) (SENDER-ADDRESS SENDER-ADDRESS) (NONCE NONCE) (USER-AGENT USER-AGENT) (HEIGHT HEIGHT) (RELAYP RELAYP)
Package

bp/net/message

Source

file-type.lisp (file)

Function: merkle-tree-node-hash INSTANCE
Function: (setf merkle-tree-node-hash) VALUE INSTANCE
Package

bp/core/merkletree

Source

file-type.lisp (file)

Function: message-type-from-command COMMAND

Return a message type symbol for a given string command.

Package

bp/net/message

Source

file-type.lisp (file)

Function: network-address-address INSTANCE
Function: (setf network-address-address) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: network-address-port INSTANCE
Function: (setf network-address-port) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: network-address-services INSTANCE
Function: (setf network-address-services) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: network-address-timestamp INSTANCE
Function: (setf network-address-timestamp) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: notfound-message-inventory INSTANCE
Function: (setf notfound-message-inventory) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: packet-checksum INSTANCE
Function: (setf packet-checksum) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: packet-command INSTANCE
Function: (setf packet-command) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: packet-magic INSTANCE
Function: (setf packet-magic) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: packet-payload INSTANCE
Function: (setf packet-payload) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: parse-pubkey BYTES
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: parse-signature BYTES &key TYPE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: ping-message-nonce INSTANCE
Function: (setf ping-message-nonce) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: pong-message-nonce INSTANCE
Function: (setf pong-message-nonce) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: random-bytes SIZE
Package

bp/crypto/random

Source

file-type.lisp (file)

Function: random-peer-address ()
Package

bp/net/address

Source

file-type.lisp (file)

Function: read-bytes STREAM SIZE
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: read-int STREAM &key SIZE BYTE-ORDER
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: read-varint STREAM
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: ripemd160 BYTES
Package

bp/crypto/hash

Source

file-type.lisp (file)

Function: script &rest SYMBOLIC-COMMANDS

Construct a SCRIPT object from a sequence of Lisp objects, doing the best effort to detect/convert the provided values.

Package

bp/core/script

Source

file-type.lisp (file)

Function: script-commands INSTANCE
Function: (setf script-commands) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: script-standard-p SCRIPT-PUBKEY &key NETWORK

If given script is standard, return a common name for the script type (:P2SH, :P2PKH, :P2WSH, etc) or T, otherwise return NIL. Additionally, if the address format is defined for that type of script, return a Bitcoin address for a given script as a second value.

Package

bp/core/script

Source

file-type.lisp (file)

Function: serialize-pubkey KEY
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: serialize-signature SIGNATURE &key TYPE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: split-host/port-string STRING
Package

bp/net/address

Source

file-type.lisp (file)

Function: testnet-p ()
Package

bp/core/chain

Source

file-type.lisp (file)

Function: tx-hash TX

Raw transaction ID is a double SHA256 of its binary serialization.

Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-id TX

Return hex-encoded txid - little-endian hash of the transaction serialization without witness structures.

Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-input TX INDEX

Return INDEXth input of the given transaction.

Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-inputs INSTANCE
Function: (setf tx-inputs) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-locktime INSTANCE
Function: (setf tx-locktime) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-message-tx INSTANCE
Function: (setf tx-message-tx) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: tx-output TX INDEX

Return INDEXth output of the given transaction.

Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-outputs INSTANCE
Function: (setf tx-outputs) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-version INSTANCE
Function: (setf tx-version) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-wid TX

Return hex-encoded wtxid - little-endian hash of the transaction serialization including witness structures.

Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-witness TX INDEX

Return INDEXth witness of the given transaction if it is a SegWit transaction, otherwise return NIL.

Package

bp/core/transaction

Source

file-type.lisp (file)

Function: tx-witnesses INSTANCE
Function: (setf tx-witnesses) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: txin-previous-tx-id INSTANCE
Function: (setf txin-previous-tx-id) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: txin-previous-tx-index INSTANCE
Function: (setf txin-previous-tx-index) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: txin-script-sig INSTANCE
Function: (setf txin-script-sig) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: txin-sequence INSTANCE
Function: (setf txin-sequence) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: txout-amount INSTANCE
Function: (setf txout-amount) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: txout-script-pubkey INSTANCE
Function: (setf txout-script-pubkey) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: validp ENTITY &key CONTEXT

Return T if the ENTITY is valid, NIL otherwise.

Package

bp/core/consensus

Source

file-type.lisp (file)

Function: verify-signature PUBKEY HASH SIGNATURE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: version-message-height INSTANCE
Function: (setf version-message-height) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: version-message-nonce INSTANCE
Function: (setf version-message-nonce) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: version-message-receiver-address INSTANCE
Function: (setf version-message-receiver-address) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: version-message-relayp INSTANCE
Function: (setf version-message-relayp) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: version-message-sender-address INSTANCE
Function: (setf version-message-sender-address) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: version-message-services INSTANCE
Function: (setf version-message-services) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: version-message-timestamp INSTANCE
Function: (setf version-message-timestamp) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: version-message-user-agent INSTANCE
Function: (setf version-message-user-agent) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: version-message-version INSTANCE
Function: (setf version-message-version) VALUE INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: witness-items INSTANCE
Function: (setf witness-items) VALUE INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: write-bytes BYTES STREAM SIZE
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: write-int I STREAM &key SIZE BYTE-ORDER
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: write-varint I STREAM
Package

bp/core/encoding

Source

file-type.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Generic functions

Generic Function: block-bits BLOCK
Package

bp/core/block

Source

file-type.lisp (file)

Methods
Method: block-bits (CBLOCK cblock)
Method: block-bits (BLOCK-HEADER block-header)
Generic Function: block-hash BLOCK
Package

bp/core/block

Source

file-type.lisp (file)

Methods
Method: block-hash (CBLOCK cblock)
Method: block-hash (BLOCK-HEADER block-header)
Generic Function: block-merkle-root BLOCK
Package

bp/core/block

Source

file-type.lisp (file)

Methods
Method: block-merkle-root (CBLOCK cblock)
Method: block-merkle-root (BLOCK-HEADER block-header)
Generic Function: block-nonce BLOCK
Package

bp/core/block

Source

file-type.lisp (file)

Methods
Method: block-nonce (CBLOCK cblock)
Method: block-nonce (BLOCK-HEADER block-header)
Generic Function: block-previous-block-hash BLOCK
Package

bp/core/block

Source

file-type.lisp (file)

Methods
Method: block-previous-block-hash (CBLOCK cblock)
Method: block-previous-block-hash (BLOCK-HEADER block-header)
Generic Function: block-timestamp BLOCK
Package

bp/core/block

Source

file-type.lisp (file)

Methods
Method: block-timestamp (CBLOCK cblock)
Method: block-timestamp (BLOCK-HEADER block-header)
Generic Function: block-version BLOCK
Package

bp/core/block

Source

file-type.lisp (file)

Methods
Method: block-version (CBLOCK cblock)
Method: block-version (BLOCK-HEADER block-header)
Generic Function: chain-get-block SUPPLIER HASH &key ENCODED ERRORP

Get raw block data from SUPPLIER by its HASH. HASH
can be either a hex-encoded string or a byte array. If ENCODED is non-NIL, returns a hex-encoded string, otherwise returns CBLOCK object. If there is no block with the given HASH, return NIL or signal an UNKNOWN-BLOCK-ERROR error, depending on the ERRORP value.

Package

bp/core/chain

Source

file-type.lisp (file)

Methods
Method: chain-get-block (NODE simple-node) HASH &key ENCODED ERRORP
Source

file-type.lisp (file)

Method: chain-get-block (SUPPLIER node-connection) HASH &key ENCODED ERRORP
Generic Function: chain-get-block-hash SUPPLIER HEIGHT &key ENCODED ERRORP

Get the hash of the block from SUPPLIER by its
HEIGHT in the chain. HEIGHT must be an integer. If ENCODED is non-NIL, returns a hex-encoded string, otherwise returns a raw id represented as byte array. If there is no known block at the given HEIGHT, return NIL or signal an UNKNOWN-BLOCK-HASH-ERROR error, depending on the ERRORP value.

Package

bp/core/chain

Source

file-type.lisp (file)

Methods
Method: chain-get-block-hash (NODE simple-node) HEIGHT &key ENCODED ERRORP
Source

file-type.lisp (file)

Method: chain-get-block-hash (SUPPLIER node-connection) HEIGHT &key ENCODED ERRORP
Generic Function: chain-get-transaction SUPPLIER ID &key ENCODED ERRORP

Get raw transaction data from SUPPLIER by its
ID. ID can be either a hex-encoded string or a byte array. If ENCODED is non-NIL, returns a hex-encoded string, otherwise returns TX object. If there is no transaction with a given ID, return NIL or signal an UNKNOWN-TRANSACTION-ERROR error, depending on the ERRORP value.

Package

bp/core/chain

Source

file-type.lisp (file)

Methods
Method: chain-get-transaction (NODE simple-node) ID &key ENCODED ERRORP
Source

file-type.lisp (file)

Method: chain-get-transaction (SUPPLIER node-connection) ID &key ENCODED ERRORP
Generic Function: chain-testnet-p SUPPLIER

Return NIL if SUPPLIER’s network is :MAINNET and T otherwise.

Package

bp/core/chain

Source

file-type.lisp (file)

Methods
Method: chain-testnet-p SUPPLIER
Generic Function: connect-peer NODE &key HOST PORT
Package

bp/net/node

Source

file-type.lisp (file)

Methods
Method: connect-peer (NODE simple-node) &key HOST PORT
Generic Function: disconnect-peer NODE PEER
Package

bp/net/node

Source

file-type.lisp (file)

Methods
Method: disconnect-peer (NODE simple-node) (PEER peer)
Method: disconnect-peer (NODE simple-node) (PEER (eql all))
Generic Function: handle-message NODE PEER MESSAGE
Package

bp/net/node

Source

file-type.lisp (file)

Methods
Method: handle-message (NODE simple-node) (PEER peer) (MESSAGE ping-message)
Method: handle-message (NODE simple-node) (PEER peer) MESSAGE
Generic Function: node-host OBJECT
Generic Function: (setf node-host) NEW-VALUE OBJECT
Package

bp/net/node

Methods
Method: node-host (SIMPLE-NODE simple-node)

automatically generated reader method

Source

file-type.lisp (file)

Method: (setf node-host) NEW-VALUE (SIMPLE-NODE simple-node)

automatically generated writer method

Source

file-type.lisp (file)

Generic Function: node-network OBJECT
Generic Function: (setf node-network) NEW-VALUE OBJECT
Package

bp/net/node

Methods
Method: node-network (NODE node)

automatically generated reader method

Source

file-type.lisp (file)

Method: (setf node-network) NEW-VALUE (NODE node)

automatically generated writer method

Source

file-type.lisp (file)

Generic Function: node-port OBJECT
Generic Function: (setf node-port) NEW-VALUE OBJECT
Package

bp/net/node

Methods
Method: node-port (SIMPLE-NODE simple-node)

automatically generated reader method

Source

file-type.lisp (file)

Method: (setf node-port) NEW-VALUE (SIMPLE-NODE simple-node)

automatically generated writer method

Source

file-type.lisp (file)

Generic Function: parse ENTITY-CLASS STREAM

Parse bytes from the STREAM into an instance of the class named ENTITY-CLASS.

Package

bp/core/encoding

Source

file-type.lisp (file)

Methods
Method: parse (MESSAGE-CLASS (eql blocktxn-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql getblocktxn-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql cmpctblock-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql sendcmpct-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql feefilter-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql sendheaders-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql alert-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql merkleblock-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql filterclear-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql filteradd-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql filterload-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql reject-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql pong-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql ping-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql reply-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql submitorder-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql checkorder-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql mempool-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql getaddr-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql headers-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql block-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql tx-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql getheaders-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql getblocks-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql notfound-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql getdata-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql inv-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql addr-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql verack-message)) STREAM
Source

file-type.lisp (file)

Method: parse (MESSAGE-CLASS (eql version-message)) STREAM
Source

file-type.lisp (file)

Method: parse (STRUCT-CLASS (eql inventory-vector)) STREAM
Source

file-type.lisp (file)

Method: parse (STRUCT-CLASS (eql network-address)) STREAM
Source

file-type.lisp (file)

Method: parse (PACKET-CLASS (eql packet)) STREAM
Source

file-type.lisp (file)

Method: parse (ENTITY-TYPE (eql cblock)) STREAM
Source

file-type.lisp (file)

Method: parse (ENTITY-TYPE (eql block-header)) STREAM
Source

file-type.lisp (file)

Method: parse (ENTITY-TYPE (eql witness)) STREAM
Source

file-type.lisp (file)

Method: parse (ENTITY-TYPE (eql txout)) STREAM
Source

file-type.lisp (file)

Method: parse (ENTITY-TYPE (eql txin)) STREAM
Source

file-type.lisp (file)

Method: parse (ENTITY-TYPE (eql tx)) STREAM
Source

file-type.lisp (file)

Method: parse (ENTITY-NAME (eql script)) STREAM
Source

file-type.lisp (file)

Generic Function: receive-message NODE PEER
Package

bp/net/node

Source

file-type.lisp (file)

Methods
Method: receive-message (NODE simple-node) (PEER peer)
Generic Function: seek-message NODE PEER MESSAGE-TYPE
Package

bp/net/node

Source

file-type.lisp (file)

Methods
Method: seek-message (NODE simple-node) PEER MESSAGE-TYPE
Generic Function: send-message NODE PEER MESSAGE
Package

bp/net/node

Source

file-type.lisp (file)

Methods
Method: send-message (NODE simple-node) (PEER peer) MESSAGE
Generic Function: serialize ENTITY STREAM

Serialize ENTITY into the stream.

Package

bp/core/encoding

Source

file-type.lisp (file)

Methods
Method: serialize (MESSAGE blocktxn-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE getblocktxn-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE cmpctblock-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE sendcmpct-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE feefilter-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE sendheaders-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE alert-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE merkleblock-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE filterclear-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE filteradd-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE filterload-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE reject-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE pong-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE ping-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE reply-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE submitorder-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE checkorder-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE mempool-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE getaddr-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE headers-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE block-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE tx-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE getheaders-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE getblocks-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE notfound-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE getdata-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE inv-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE addr-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE verack-message) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE version-message) STREAM
Source

file-type.lisp (file)

Method: serialize (STRUCT inventory-vector) STREAM
Source

file-type.lisp (file)

Method: serialize (STRUCT network-address) STREAM
Source

file-type.lisp (file)

Method: serialize (MESSAGE packet) STREAM
Source

file-type.lisp (file)

Method: serialize (CBLOCK cblock) STREAM
Source

file-type.lisp (file)

Method: serialize (BLOCK-HEADER block-header) STREAM
Source

file-type.lisp (file)

Method: serialize (WITNESS witness) STREAM
Source

file-type.lisp (file)

Method: serialize (TXOUT txout) STREAM
Source

file-type.lisp (file)

Method: serialize (TXIN txin) STREAM
Source

file-type.lisp (file)

Method: serialize (TX tx) STREAM
Source

file-type.lisp (file)

Method: serialize (SCRIPT script) STREAM
Source

file-type.lisp (file)

Generic Function: unknown-block-hash CONDITION
Generic Function: (setf unknown-block-hash) NEW-VALUE CONDITION
Package

bp/core/chain

Methods
Method: unknown-block-hash (CONDITION unknown-block-error)
Method: (setf unknown-block-hash) NEW-VALUE (CONDITION unknown-block-error)
Source

file-type.lisp (file)

Generic Function: unknown-block-height CONDITION
Generic Function: (setf unknown-block-height) NEW-VALUE CONDITION
Package

bp/core/chain

Methods
Method: unknown-block-height (CONDITION unknown-block-hash-error)
Method: (setf unknown-block-height) NEW-VALUE (CONDITION unknown-block-hash-error)
Source

file-type.lisp (file)

Generic Function: unknown-transaction-id CONDITION
Generic Function: (setf unknown-transaction-id) NEW-VALUE CONDITION
Package

bp/core/chain

Methods
Method: unknown-transaction-id (CONDITION unknown-transaction-error)
Method: (setf unknown-transaction-id) NEW-VALUE (CONDITION unknown-transaction-error)
Source

file-type.lisp (file)

Generic Function: validate ENTITY &key CONTEXT

Validate entity according to the Bitcoin Protocol
consensus rules, throw an error if an entity is invalid for any reason.

Package

bp/core/consensus

Source

file-type.lisp (file)

Methods
Method: validate (TXOUT txout) &key CONTEXT
Method: validate (TXIN txin) &key CONTEXT
Method: validate (TX tx) &key CONTEXT
Method: validate (CBLOCK cblock) &key CONTEXT
Method: validate (BLOCK-HEADER block-header) &key CONTEXT

Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.6 Conditions

Condition: base58check-bad-checksum-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

base58check-checksum-error (condition)

Condition: base58check-checksum-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

checksum-error (condition)

Direct subclasses
Condition: base58check-no-checksum-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

base58check-checksum-error (condition)

Condition: bech32-bad-checksum-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

bech32-checksum-error (condition)

Condition: bech32-checksum-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses
Direct subclasses
Condition: bech32-invalid-hrp-character-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

bech32-error (condition)

Direct slots
Slot: character
Initargs

:character

Condition: bech32-mixed-case-characters-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

bech32-error (condition)

Condition: bech32-no-checksum-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

bech32-checksum-error (condition)

Condition: bech32-no-hrp-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

bech32-error (condition)

Condition: bech32-no-separator-character-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

bech32-error (condition)

Condition: checksum-error ()
Package

bp/core/encoding

Source

file-type.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Condition: unknown-block-error ()
Package

bp/core/chain

Source

file-type.lisp (file)

Direct superclasses

unknown-entity-error (condition)

Direct methods
Direct slots
Slot: hash
Initargs

:hash

Readers

unknown-block-hash (generic function)

Writers

(setf unknown-block-hash) (generic function)

Condition: unknown-block-hash-error ()
Package

bp/core/chain

Source

file-type.lisp (file)

Direct superclasses

unknown-entity-error (condition)

Direct methods
Direct slots
Slot: height
Initargs

:height

Readers

unknown-block-height (generic function)

Writers

(setf unknown-block-height) (generic function)

Condition: unknown-entity-error ()
Package

bp/core/chain

Source

file-type.lisp (file)

Direct superclasses

simple-error (condition)

Direct subclasses
Condition: unknown-transaction-error ()
Package

bp/core/chain

Source

file-type.lisp (file)

Direct superclasses

unknown-entity-error (condition)

Direct subclasses

transaction-not-available-error (condition)

Direct methods
Direct slots
Slot: id
Initargs

:id

Readers

unknown-transaction-id (generic function)

Writers

(setf unknown-transaction-id) (generic function)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.7 Structures

Structure: addr-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: alert-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: block-header ()
Package

bp/core/block

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: version
Readers

block-header-version (function)

Writers

(setf block-header-version) (function)

Slot: previous-block-hash
Readers

block-header-previous-block-hash (function)

Writers

(setf block-header-previous-block-hash) (function)

Slot: merkle-root
Readers

block-header-merkle-root (function)

Writers

(setf block-header-merkle-root) (function)

Slot: timestamp
Readers

block-header-timestamp (function)

Writers

(setf block-header-timestamp) (function)

Slot: bits
Readers

block-header-bits (function)

Writers

(setf block-header-bits) (function)

Slot: nonce
Readers

block-header-nonce (function)

Writers

(setf block-header-nonce) (function)

Structure: block-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: block
Readers

block-message-block (function)

Writers

(setf block-message-block) (function)

Structure: blocktxn-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: cblock ()
Package

bp/core/block

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: header
Readers

block-header (function)

Writers

(setf block-header) (function)

Slot: transactions
Readers

block-transactions (function)

Writers

(setf block-transactions) (function)

Structure: checkorder-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: cmpctblock-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: feefilter-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: filteradd-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: filterclear-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: filterload-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: getaddr-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: getblocks-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: getblocktxn-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: getdata-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: inventory
Readers

getdata-message-inventory (function)

Writers

(setf getdata-message-inventory) (function)

Structure: getheaders-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: headers-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: inv-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: inventory
Readers

inv-message-inventory (function)

Writers

(setf inv-message-inventory) (function)

Structure: inventory-vector ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: type
Readers

inventory-vector-type (function)

Writers

(setf inventory-vector-type) (function)

Slot: hash
Readers

inventory-vector-hash (function)

Writers

(setf inventory-vector-hash) (function)

Structure: key ()
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: bytes
Readers

key-bytes (function)

Writers

(setf key-bytes) (function)

Structure: mempool-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: merkle-tree-node ()
Package

bp/core/merkletree

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: hash
Readers

merkle-tree-node-hash (function)

Writers

(setf merkle-tree-node-hash) (function)

Slot: left
Readers

merkle-tree-node-left (function)

Writers

(setf merkle-tree-node-left) (function)

Slot: right
Readers

merkle-tree-node-right (function)

Writers

(setf merkle-tree-node-right) (function)

Structure: merkleblock-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: network-address ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: timestamp
Readers

network-address-timestamp (function)

Writers

(setf network-address-timestamp) (function)

Slot: services
Readers

network-address-services (function)

Writers

(setf network-address-services) (function)

Slot: address
Readers

network-address-address (function)

Writers

(setf network-address-address) (function)

Slot: port
Readers

network-address-port (function)

Writers

(setf network-address-port) (function)

Structure: notfound-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: inventory
Readers

notfound-message-inventory (function)

Writers

(setf notfound-message-inventory) (function)

Structure: packet ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: magic
Readers

packet-magic (function)

Writers

(setf packet-magic) (function)

Slot: command
Readers

packet-command (function)

Writers

(setf packet-command) (function)

Slot: length
Readers

packet-length (function)

Writers

(setf packet-length) (function)

Slot: checksum
Readers

packet-checksum (function)

Writers

(setf packet-checksum) (function)

Slot: payload
Readers

packet-payload (function)

Writers

(setf packet-payload) (function)

Structure: ping-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: nonce
Readers

ping-message-nonce (function)

Writers

(setf ping-message-nonce) (function)

Structure: pong-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: nonce
Readers

pong-message-nonce (function)

Writers

(setf pong-message-nonce) (function)

Structure: pubkey ()
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: bytes
Readers

pubkey-bytes (function)

Writers

(setf pubkey-bytes) (function)

Structure: reject-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: reply-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: script ()
Package

bp/core/script

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: commands
Readers

script-commands (function)

Writers

(setf script-commands) (function)

Structure: sendcmpct-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: sendheaders-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: signature ()
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: bytes
Readers

signature-bytes (function)

Writers

(setf signature-bytes) (function)

Structure: submitorder-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: tx ()
Package

bp/core/transaction

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: version
Readers

tx-version (function)

Writers

(setf tx-version) (function)

Slot: inputs
Readers

tx-inputs (function)

Writers

(setf tx-inputs) (function)

Slot: outputs
Readers

tx-outputs (function)

Writers

(setf tx-outputs) (function)

Slot: witnesses
Readers

tx-witnesses (function)

Writers

(setf tx-witnesses) (function)

Slot: locktime
Readers

tx-locktime (function)

Writers

(setf tx-locktime) (function)

Structure: tx-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: tx
Readers

tx-message-tx (function)

Writers

(setf tx-message-tx) (function)

Structure: txin ()
Package

bp/core/transaction

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: previous-tx-id
Readers

txin-previous-tx-id (function)

Writers

(setf txin-previous-tx-id) (function)

Slot: previous-tx-index
Readers

txin-previous-tx-index (function)

Writers

(setf txin-previous-tx-index) (function)

Slot: script-sig
Readers

txin-script-sig (function)

Writers

(setf txin-script-sig) (function)

Slot: sequence
Readers

txin-sequence (function)

Writers

(setf txin-sequence) (function)

Structure: txout ()
Package

bp/core/transaction

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: amount
Readers

txout-amount (function)

Writers

(setf txout-amount) (function)

Slot: script-pubkey
Readers

txout-script-pubkey (function)

Writers

(setf txout-script-pubkey) (function)

Structure: verack-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Structure: version-message ()
Package

bp/net/message

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

serialize (method)

Direct slots
Slot: version
Readers

version-message-version (function)

Writers

(setf version-message-version) (function)

Slot: services
Readers

version-message-services (function)

Writers

(setf version-message-services) (function)

Slot: timestamp
Readers

version-message-timestamp (function)

Writers

(setf version-message-timestamp) (function)

Slot: receiver-address
Readers

version-message-receiver-address (function)

Writers

(setf version-message-receiver-address) (function)

Slot: sender-address
Readers

version-message-sender-address (function)

Writers

(setf version-message-sender-address) (function)

Slot: nonce
Readers

version-message-nonce (function)

Writers

(setf version-message-nonce) (function)

Slot: user-agent
Readers

version-message-user-agent (function)

Writers

(setf version-message-user-agent) (function)

Slot: height
Readers

version-message-height (function)

Writers

(setf version-message-height) (function)

Slot: relayp
Readers

version-message-relayp (function)

Writers

(setf version-message-relayp) (function)

Structure: witness ()
Package

bp/core/transaction

Source

file-type.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: items
Readers

witness-items (function)

Writers

(setf witness-items) (function)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.8 Classes

Class: chain-supplier ()
Package

bp/core/chain

Source

file-type.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

node-connection (class)

Direct methods
Direct slots
Slot: network

Network marker (one of :MAINNET, :TESTNET, :REGTEST).

Initargs

:network

Initform

:mainnet

Readers

chain-supplier-network (generic function)

Writers

(setf chain-supplier-network) (generic function)

Class: node ()
Package

bp/net/node

Source

file-type.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

simple-node (class)

Direct methods
Direct slots
Slot: network
Initargs

:network

Initform

:mainnet

Readers

node-network (generic function)

Writers

(setf node-network) (generic function)

Class: node-connection ()
Package

bp/core/chain

Source

file-type.lisp (file)

Direct superclasses

chain-supplier (class)

Direct methods
Direct slots
Slot: url
Initargs

:url

Readers

node-connection-url (generic function)

Writers

(setf node-connection-url) (generic function)

Slot: username
Initargs

:username

Readers

node-connection-username (generic function)

Writers

(setf node-connection-username) (generic function)

Slot: password
Initargs

:password

Readers

node-connection-password (generic function)

Writers

(setf node-connection-password) (generic function)

Class: simple-node ()

Simple Bitcoin network node communicating with a single peer via peer-2-peer gossip protocol.

Package

bp/net/node

Source

file-type.lisp (file)

Direct superclasses

node (class)

Direct methods
Direct slots
Slot: host
Initargs

:host

Readers

node-host (generic function)

Writers

(setf node-host) (generic function)

Slot: port
Initargs

:port

Initform

bp/net/parameters:+bp-network-port+

Readers

node-port (generic function)

Writers

(setf node-port) (generic function)

Slot: peer
Readers

node-peer (generic function)

Writers

(setf node-peer) (generic function)

Class: validation-context ()

Structure for storing additional information needed during entity validation.

Package

bp/core/consensus

Source

file-type.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: height
Initargs

:height

Readers

@height (generic function)

Writers

(setf @height) (generic function)

Slot: cblock
Initargs

:block

Readers

@block (generic function)

Writers

(setf @block) (generic function)

Slot: tx
Initargs

:tx

Readers

@tx (generic function)

Writers

(setf @tx) (generic function)

Slot: tx-index
Initargs

:tx-index

Readers

@tx-index (generic function)

Writers

(setf @tx-index) (generic function)

Slot: txin
Initargs

:txin

Readers

@txin (generic function)

Writers

(setf @txin) (generic function)

Slot: txin-index
Initargs

:txin-index

Readers

@txin-index (generic function)

Writers

(setf @txin-index) (generic function)

Slot: txout
Initargs

:txout

Readers

@txout (generic function)

Writers

(setf @txout) (generic function)

Slot: txout-index
Initargs

:txout-index

Readers

@txout-index (generic function)

Writers

(setf @txout-index) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +bech32-encoding-constant+
Package

bp/core/encoding

Source

file-type.lisp (file)

Constant: +bech32m-encoding-constant+
Package

bp/core/encoding

Source

file-type.lisp (file)

Constant: +secp256k1-context-none+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-context-sign+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-context-verify+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-ec-compressed+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-ec-uncompressed+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-flags-bit-compression+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-flags-bit-context-sign+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-flags-bit-context-verify+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-flags-type-compression+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-flags-type-context+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-flags-type-mask+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-tag-pubkey-even+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-tag-pubkey-hybrid-even+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-tag-pubkey-hybrid-odd+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-tag-pubkey-odd+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +secp256k1-tag-pubkey-uncompressed+
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Constant: +sighash-all+
Package

bp/core/consensus

Source

file-type.lisp (file)

Constant: +sighash-anyonecanpay+
Package

bp/core/consensus

Source

file-type.lisp (file)

Constant: +sighash-none+
Package

bp/core/consensus

Source

file-type.lisp (file)

Constant: +sighash-single+
Package

bp/core/consensus

Source

file-type.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Special variables

Special Variable: *chain-supplier*

Global chain supplier bound by the WITH-CHAIN-SUPPLIER context manager.

Package

bp/core/chain

Source

file-type.lisp (file)

Special Variable: *context-none*
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Special Variable: *context-sign*
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Special Variable: *context-verify*
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Special Variable: *dns-seed*

DNS seed is a list of hardcoded host names for Bitcoin nodes that can accept new connections when bootstrapping new nodes.

Package

bp/net/address

Source

file-type.lisp (file)

Special Variable: *message-commands*

Mapping from message types (symbols) to message commands (strings).

Package

bp/net/message

Source

file-type.lisp (file)

Special Variable: *message-types*

Mapping from commands (strings) to message types (symbols).

Package

bp/net/message

Source

file-type.lisp (file)

Special Variable: *opcodes-by-code*

Table mapping opcodes to pairs (<list of opcode-names> . <function>).

Package

bp/core/script

Source

file-type.lisp (file)

Special Variable: *opcodes-by-name*

Table mapping opcode names to pairs (<code> . <function>).

Package

bp/core/script

Source

file-type.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Macros

Macro: bytes-from-foreign BYTES POINTER SIZE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Macro: bytes-to-foreign BYTES POINTER SIZE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Macro: define-alphabet NAME &body CHARSET

Define two functions for encoding/decoding digits of a given encoding scheme named <NAME>-ENCODE-DIGIT and <NAME>-DECODE-DIGIT respective.

Package

bp/core/encoding

Source

file-type.lisp (file)

Macro: define-disabled-opcode OP-NAME OP-CODE OP-HEX-CODE (&rest ARGS) &body DOC
Package

bp/core/script

Source

file-type.lisp (file)

Macro: define-opcode OP-NAME OP-CODE OP-HEX-CODE (&rest ARGS) &body DOC

Define opcode function named OP-NAME for a given OP-CODE. OP-HEX-CODE is ignored and used only for documentation purposes.

Package

bp/core/script

Source

file-type.lisp (file)

Macro: define-opcode-alias NEW-OP-NAME OLD-OP-NAME
Package

bp/core/script

Source

file-type.lisp (file)

Macro: define-opcode-range (OP-NAME-PREFIX OP-NAME-START OP-NAME-END) (OP-CODE-START OP-CODE-END) (OP-HEX-CODE-START OP-HEX-CODE-END) (&rest ARGS) &body BODY
Package

bp/core/script

Source

file-type.lisp (file)

Macro: defmessage NAME (&rest OPTIONS) &body SLOTS
Package

bp/net/message

Source

file-type.lisp (file)

Macro: ensure-validation-context (CONTEXT-SYM) &body BODY

Ensure CONTEXT-SYM is bound to the VALIDATION-CONTEXT object before executing the BODY.

Package

bp/core/consensus

Source

file-type.lisp (file)

Macro: ignore-rpc-errors &body BODY
Package

bp/core/chain

Source

file-type.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Functions

Function: %make-key &key (BYTES BYTES)
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: %make-pubkey &key (BYTES BYTES)
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: %make-signature &key (BYTES BYTES)
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: @altstack INSTANCE
Function: (setf @altstack) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: @commands INSTANCE
Function: (setf @commands) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: @conditions INSTANCE
Function: (setf @conditions) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: @discard INSTANCE
Function: (setf @discard) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: @execp STATE OP

A command is considered executable if current branch is an executable one (i.e. the current code path does not contain false conditions), or it is a branching command.

For this purpose, OP_IF pushes its condition to CONDITIONS stack in script state (OP_NOTIF pushes an inverted condition), OP_ELSE inverts the top condition in CONDITIONS, while OP_ENDIF simply pops the top condition. For OP_ELSE/OP_ENDIF commands, empty CONDITIONS stack means that the branching construction is unbalanced.

This follows the implementation of script interpreter in Bitcoin Core.

Package

bp/core/script

Source

file-type.lisp (file)

Function: @sighash STATE HASHTYPE
Package

bp/core/script

Source

file-type.lisp (file)

Function: @sighashf INSTANCE
Function: (setf @sighashf) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: @sigversion INSTANCE
Function: (setf @sigversion) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: @stack INSTANCE
Function: (setf @stack) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: @witness INSTANCE
Function: (setf @witness) VALUE INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: addr-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: alert-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: base58-decode-digit C
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: base58-encode-digit N
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32*-decode STRING
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32*-encode ENCODING HRP DATA
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32-compute-checksum ENCODING HRP DATA
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32-decode-digit C
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32-encode-digit N
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32-hrp-expand S
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32-polymod VALUES
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bech32-verify-checksum HRP DATA

Verify checksum using the both Bech32 and Bech32m constants. Return the detected encoding or NIL if neither match.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: bits-to-target BITS
Package

bp/core/consensus

Source

file-type.lisp (file)

Function: block-difficulty BLOCK
Package

bp/core/consensus

Source

file-type.lisp (file)

Function: block-fee BLOCK
Package

bp/core/consensus

Source

file-type.lisp (file)

Function: block-header-bits INSTANCE
Function: (setf block-header-bits) VALUE INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-header-merkle-root INSTANCE
Function: (setf block-header-merkle-root) VALUE INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-header-nonce INSTANCE
Function: (setf block-header-nonce) VALUE INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-header-p OBJECT
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-header-previous-block-hash INSTANCE
Function: (setf block-header-previous-block-hash) VALUE INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-header-timestamp INSTANCE
Function: (setf block-header-timestamp) VALUE INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-header-version INSTANCE
Function: (setf block-header-version) VALUE INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: block-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: block-target BLOCK
Package

bp/core/consensus

Source

file-type.lisp (file)

Function: blocktxn-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: cblock-p OBJECT
Package

bp/core/block

Source

file-type.lisp (file)

Function: checkorder-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: cmpctblock-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: command-from-bytes BYTES
Package

bp/net/message

Source

file-type.lisp (file)

Function: command-number COMMAND
Package

bp/core/script

Source

file-type.lisp (file)

Function: command-op COMMAND
Package

bp/core/script

Source

file-type.lisp (file)

Function: command-payload COMMAND
Package

bp/core/script

Source

file-type.lisp (file)

Function: command-to-bytes COMMAND
Package

bp/net/message

Source

file-type.lisp (file)

Function: convert-bits VALUES FROM-BITS TO-BITS PADP OUTPUT-FN

Convert from one power-of-2 number base to another. Feed each digit to the function OUTPUT-FN. We only need this to work for octets for now. A direct translation from Bitcoin Core’s ‘ConvertBits‘ function in ‘util/strencoding.h‘.

Package

bp/core/encoding

Source

file-type.lisp (file)

Function: copy-addr-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-alert-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-block-header INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: copy-block-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-blocktxn-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-cblock INSTANCE
Package

bp/core/block

Source

file-type.lisp (file)

Function: copy-checkorder-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-cmpctblock-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-feefilter-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-filteradd-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-filterclear-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-filterload-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-getaddr-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-getblocks-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-getblocktxn-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-getdata-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-getheaders-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-headers-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-inv-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-inventory-vector INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-key INSTANCE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: copy-mempool-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-merkle-tree-node INSTANCE
Package

bp/core/merkletree

Source

file-type.lisp (file)

Function: copy-merkleblock-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-network-address INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-notfound-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-packet INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-peer INSTANCE
Package

bp/net/node

Source

file-type.lisp (file)

Function: copy-ping-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-pong-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-pubkey INSTANCE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: copy-reject-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-reply-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-script INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: copy-script-state INSTANCE
Package

bp/core/script

Source

file-type.lisp (file)

Function: copy-sendcmpct-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-sendheaders-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-signature INSTANCE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: copy-submitorder-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-tx INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: copy-tx-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-txin INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: copy-txout INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: copy-verack-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-version-message INSTANCE
Package

bp/net/message

Source

file-type.lisp (file)

Function: copy-witness INSTANCE
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: do-simple-rpc-call SUPPLIER METHOD &rest ARGUMENTS
Package

bp/core/chain

Source

file-type.lisp (file)

Function: ecdsa-signature-parse-der-lax INPUT

This function is taken from the libsecp256k1 distribution and implements DER parsing for ECDSA signatures, while supporting an arbitrary subset of format violations (see Bitcoin’s pubkey.cpp).

Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: execute-p2sh SCRIPT-PUBKEY &key STATE
Package

bp/core/script

Source

file-type.lisp (file)

Function: execute-p2wpkh SCRIPT-PUBKEY &key STATE
Package

bp/core/script

Source

file-type.lisp (file)

Function: execute-p2wsh SCRIPT-PUBKEY &key STATE
Package

bp/core/script

Source

file-type.lisp (file)

Function: extend-validation-context CONTEXT &key HEIGHT BLOCK TX TX-INDEX TXIN TXIN-INDEX TXOUT TXOUT-INDEX

Create a new VALIDATION-CONTEXT object from the given one and extend it with additional data if supplied.

Package

bp/core/consensus

Source

file-type.lisp (file)

Function: feefilter-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: filteradd-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: filterclear-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: filterload-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: get-transaction-output ID INDEX

Get txout described by its transaction ID and output index. Will signal an error if the transaction is unknown or does not have the output with given index. Assumes chain supplier context.

Package

bp/core/consensus

Source

file-type.lisp (file)

Function: getaddr-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: getblocks-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: getblocktxn-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: getdata-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: getheaders-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: headers-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: inv-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: inventory-vector-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: key-bytes INSTANCE
Function: (setf key-bytes) VALUE INSTANCE
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: key-p OBJECT
Package

bp/crypto/secp256k1

Source

file-type.lisp (file)

Function: make-adjustable-byte-array LENGTH
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: make-block-header &key (VERSION VERSION) (PREVIOUS-BLOCK-HASH PREVIOUS-BLOCK-HASH) (MERKLE-ROOT MERKLE-ROOT) (TIMESTAMP TIMESTAMP) (BITS BITS) (NONCE NONCE)
Package

bp/core/block

Source

file-type.lisp (file)

Function: make-cblock &key (HEADER HEADER) (TRANSACTIONS TRANSACTIONS)
Package

bp/core/block

Source

file-type.lisp (file)

Function: make-displaced-byte-array BYTES
Package

bp/core/encoding

Source

file-type.lisp (file)

Function: make-merkle-tree-node &key (HASH HASH) (LEFT LEFT) (RIGHT RIGHT)
Package

bp/core/merkletree

Source

file-type.lisp (file)

Function: make-peer &key (HOST HOST) (PORT PORT) (CONNECTION CONNECTION) (VERSION VERSION) (SERVICES SERVICES) (TIMESTAMP TIMESTAMP) (USER-AGENT USER-AGENT) (HEIGHT HEIGHT)
Package

bp/net/node

Source

file-type.lisp (file)

Function: make-tx &key (VERSION VERSION) (INPUTS INPUTS) (OUTPUTS OUTPUTS) (WITNESSES WITNESSES) (LOCKTIME LOCKTIME)
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: make-txin &key (PREVIOUS-TX-ID PREVIOUS-TX-ID) (PREVIOUS-TX-INDEX PREVIOUS-TX-INDEX) (SCRIPT-SIG SCRIPT-SIG) (SEQUENCE SEQUENCE)
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: make-txout &key (AMOUNT AMOUNT) (SCRIPT-PUBKEY SCRIPT-PUBKEY)
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: make-witness &key (ITEMS ITEMS)
Package

bp/core/transaction

Source

file-type.lisp (file)

Function: mempool-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: merkle-tree-node-left INSTANCE
Function: (setf merkle-tree-node-left) VALUE INSTANCE
Package

bp/core/merkletree

Source

file-type.lisp (file)

Function: merkle-tree-node-p OBJECT
Package

bp/core/merkletree

Source

file-type.lisp (file)

Function: merkle-tree-node-right INSTANCE
Function: (setf merkle-tree-node-right) VALUE INSTANCE
Package

bp/core/merkletree

Source

file-type.lisp (file)

Function: merkleblock-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: network-address-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: notfound-message-p OBJECT
Package

bp/net/message

Source

file-type.lisp (file)

Function: null-data-p SCRIPT-PUBKEY

Check if given SCRIPT-PUBKEY is a NULL DATA script.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_0 STATE

An empty array of bytes is pushed onto the stack. (This is not a no-op: an item is added to the stack.)

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_0notequal STATE

Returns 0 if the input is 0. 1 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_1 STATE

The number 1 is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_10 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_11 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_12 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_13 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_14 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_15 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_16 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_1add STATE

1 is added to the input.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_1negate STATE

The number -1 is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_1sub STATE

1 is subtracted from the input.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_2 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_2div STATE

The input is divided by 2.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_2drop STATE

Removes the top two stack items.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_2dup STATE

Duplicates the top two stack items.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_2mul STATE

The input is multiplied by 2.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_2over STATE

Copies the pair of items two spaces back in the stack to the front.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_2rot STATE

The fifth and sixth items back are moved to the top of the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_2swap STATE

Swaps the top two pairs of items.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_3 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_3dup STATE

Duplicates the top three stack items.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_4 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_5 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_6 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_7 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_8 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_9 STATE

The number in the word name (2-16) is pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_abs STATE

The input is made positive.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_add STATE

a is added to b.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_and STATE

Boolean and between each bit in the inputs.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_booland STATE

If both a and b are not 0, the output is 1. Otherwise 0.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_boolor STATE

If a or b is not 0, the output is 1. Otherwise 0.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_cat STATE

Concatenates two strings.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_checklocktimeverify STATE

Marks transaction as invalid if the top stack item is greater than the transaction’s nLockTime field, otherwise script evaluation continues as though an OP_NOP was executed. Transaction is also invalid if 1. the stack is empty; or 2. the top stack item is negative; or 3. the top stack item is greater than or equal to 500000000 while the transaction’s nLockTime field is less than 500000000, or vice versa; or 4. the input’s nSequence field is equal to #xffffffff. The precise semantics are described in BIP 0065.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_checkmultisig STATE

Compares the first signature against each public key until it finds an ECDSA match. Starting with the subsequent public key, it compares the second signature against each remaining public key until it finds an ECDSA match. The process is repeated until all signatures have been checked or not enough public keys remain to produce a successful result. All signatures need to match a public key. Because public keys are not checked again if they fail any signature comparison, signatures must be placed in the scriptSig using the same order as their corresponding public keys were placed in the scriptPubKey or redeemScript. If all signatures are valid, 1 is returned, 0 otherwise. Due to a bug, one extra unused value is removed from the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_checkmultisigverify STATE

Same as OP_CHECKMULTISIG, but OP_VERIFY is executed afterward.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_checksequenceverify STATE

Marks transaction as invalid if the relative lock time of the input (enforced by BIP 0068 with nSequence) is not equal to or longer than the value of the top stack item. The precise semantics are described in BIP 0112.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_checksig STATE

The entire transaction’s outputs, inputs, and script (from the most recently-executed OP_CODESEPARATOR to the end) are hashed. The signature used by OP_CHECKSIG must be a valid signature for this hash and public key. If it is, 1 is returned, 0 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_checksigverify STATE

Same as OP_CHECKSIG, but OP_VERIFY is executed afterward.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_codeseparator STATE

All of the signature checking words will only match signatures to the data after the most recently-executed OP_CODESEPARATOR.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_depth STATE

Puts the number of stack items onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_div STATE

a is divided by b.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_drop STATE

Removes the top stack item.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_dup STATE

Duplicates the top stack item.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_else STATE

If the preceding OP_IF or OP_NOTIF or OP_ELSE was not executed then these statements are and if the preceding OP_IF or OP_NOTIF or OP_ELSE was executed then these statements are not. See @EXECP for more details on how branching works.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_endif STATE

Ends an if/else block. All blocks must end, or the transaction is invalid. An OP_ENDIF without OP_IF earlier is also invalid. See @EXECP for more details on how branching works.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_equal STATE

Returns 1 if the inputs are exactly equal, 0 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_equalverify STATE

Same as OP_EQUAL, but runs OP_VERIFY afterward.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_fromaltstack STATE

Puts the input onto the top of the main stack. Removes it from the alt stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_greaterthan STATE

Returns 1 if a is greater than b, 0 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_greaterthanorequal STATE

Returns 1 if a is greater than or equal to b, 0 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_hash160 STATE

The input is hashed twice: first with SHA-256 and then with RIPEMD-160.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_hash256 STATE

The input is hashed two times with SHA-256.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_if STATE

If the top stack value is not False, the statements are
executed. The top stack value is removed. See @EXECP for more details on how branching works.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_ifdup STATE

If the top stack value is not 0, duplicate it.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_invalidopcode STATE

Matches any opcode that is not yet assigned.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_invert STATE

Flips all of the bits in the input.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_left STATE

Keeps only characters left of the specified point in a string.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_lessthan STATE

Returns 1 if a is less than b, 0 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_lessthanorequal STATE

Returns 1 if a is less than or equal to b, 0 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_lshift STATE

Shifts a left b bits, preserving sign.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_max STATE

Returns the larger of a and b.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_min STATE

Returns the smaller of a and b.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_mod STATE

Returns the remainder after dividing a by b.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_mul STATE

a is multiplied by b.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_negate STATE

The sign of the input is flipped.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nip STATE

Removes the second-to-top stack item.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop STATE

Does nothing.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop1 STATE

The word is ignored. Does not mark transaction as invalid.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop10 STATE

The word is ignored. Does not mark transaction as invalid.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop4 STATE

The word is ignored. Does not mark transaction as invalid.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop5 STATE

The word is ignored. Does not mark transaction as invalid.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop6 STATE

The word is ignored. Does not mark transaction as invalid.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop7 STATE

The word is ignored. Does not mark transaction as invalid.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop8 STATE

The word is ignored. Does not mark transaction as invalid.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_nop9 STATE

The word is ignored. Does not mark transaction as invalid.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_not STATE

If the input is 0 or 1, it is flipped. Otherwise the output will be 0.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_notif STATE

If the top stack value is False, the statements are executed. The top stack value is removed. See @EXECP for more details on how branching works.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_numequal STATE

Returns 1 if the numbers are equal, 0 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_numequalverify STATE

Same as OP_NUMEQUAL, but runs OP_VERIFY afterward.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_numnotequal STATE

Returns 1 if the numbers are not equal, 0 otherwise.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_or STATE

Boolean or between each bit in the inputs.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_over STATE

Copies the second-to-top stack item to the top.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_pick STATE

The item n back in the stack is copied to the top.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_pubkey STATE

Represents a public key compatible with OP_CHECKSIG.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_pubkeyhash STATE

Represents a public key hashed with OP_HASH160.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push1 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push10 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push11 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push12 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push13 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push14 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push15 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push16 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push17 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push18 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push19 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push2 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push20 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push21 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push22 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push23 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push24 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push25 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push26 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push27 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push28 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push29 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push3 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push30 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push31 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push32 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push33 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push34 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push35 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push36 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push37 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push38 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push39 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push4 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push40 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push41 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push42 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push43 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push44 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push45 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push46 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push47 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push48 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push49 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push5 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push50 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push51 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push52 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push53 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push54 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push55 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push56 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push57 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push58 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push59 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push6 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push60 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push61 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push62 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push63 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push64 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push65 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push66 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push67 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push68 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push69 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push7 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push70 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push71 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push72 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push73 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push74 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push75 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push8 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_push9 STATE

The next opcode bytes is data to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_pushdata1 STATE

The next byte contains the number of bytes to be pushed onto the stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_pushdata2 STATE

The next two bytes contain the number of bytes to be pushed onto the stack in little endian order.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_pushdata4 STATE

The next four bytes contain the number of bytes to be pushed onto the stack in little endian order.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_reserved STATE

Transaction is invalid unless occuring in an unexecuted OP_IF branch.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_reserved1 STATE

Transaction is invalid unless occuring in an unexecuted OP_IF branch.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_reserved2 STATE

Transaction is invalid unless occuring in an unexecuted OP_IF branch.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_return STATE

Marks transaction as invalid. Since bitcoin 0.9, a standard way of attaching extra data to transactions is to add a zero-value output with a scriptPubKey consisting of OP_RETURN followed by data. Such outputs are provably unspendable and specially discarded from storage in the UTXO set, reducing their cost to the network. Since 0.12, standard relay rules allow a single output with OP_RETURN, that contains any sequence of push statements (or OP_RESERVED[1]) after the OP_RETURN provided the total scriptPubKey length is at most 83 bytes.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_right STATE

Keeps only characters right of the specified point in a string.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_ripemd160 STATE

The input is hashed using RIPEMD-160.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_roll STATE

The item n back in the stack is moved to the top.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_rot STATE

The top three items on the stack are rotated to the left.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_rshift STATE

Shifts a right b bits, preserving sign.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_sha1 STATE

The input is hashed using SHA-1.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_sha256 STATE

The input is hashed using SHA-256.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_size STATE

Pushes the string length of the top element of the stack (without popping it).

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_sub STATE

b is subtracted from a.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_substr STATE

Returns a section of a string.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_swap STATE

The top two items on the stack are swapped.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_toaltstack STATE

Puts the input onto the top of the alt stack. Removes it from the main stack.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_tuck STATE

The item at the top of the stack is copied and inserted before the second-to-top item.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown186 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown187 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown188 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown189 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown190 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown191 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown192 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown193 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown194 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown195 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown196 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown197 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown198 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown199 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown200 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown201 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown202 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown203 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown204 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown205 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown206 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown207 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown208 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown209 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown210 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown211 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown212 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown213 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown214 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown215 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown216 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown217 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown218 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown219 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown220 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown221 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown222 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown223 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown224 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown225 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown226 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown227 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown228 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown229 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown230 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown231 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown232 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown233 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown234 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown235 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown236 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown237 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown238 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown239 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown240 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown241 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown242 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown243 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown244 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown245 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown246 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown247 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

Source

file-type.lisp (file)

Function: op_unknown248 STATE

Unknown opcode. Used for handling coinbase input scripts.

Package

bp/core/script

S