forked from ordinals/ord
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '0749c5bffa010dc94d32f3e1214b3e5f913094e2'
- Loading branch information
Showing
80 changed files
with
1,183 additions
and
545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
Testing | ||
======= | ||
|
||
Ord can be tested using the following flags to specify the test network. For more | ||
information on running Bitcoin Core for testing, see [Bitcoin's developer documentation](https://developer.bitcoin.org/examples/testing.html). | ||
|
||
Most `ord` commands in [inscriptions](inscriptions.md) and [explorer](explorer.md) | ||
can be run with the following network flags: | ||
|
||
| Network | Flag | | ||
|---------|------| | ||
| Testnet | `--testnet` or `-t` | | ||
| Signet | `--signet` or `-s` | | ||
| Regtest | `--regtest` or `-r` | | ||
|
||
Regtest doesn't require downloading the blockchain or indexing ord. | ||
|
||
Example | ||
------- | ||
|
||
Run bitcoind in regtest with: | ||
``` | ||
bitcoind -regtest -txindex | ||
``` | ||
Create a wallet in regtest with: | ||
``` | ||
ord -r wallet create | ||
``` | ||
Get a regtest receive address with: | ||
``` | ||
ord -r wallet receive | ||
``` | ||
Mine 101 blocks (to unlock the coinbase) with: | ||
``` | ||
bitcoin-cli generatetoaddress 101 <receive address> | ||
``` | ||
Inscribe in regtest with: | ||
``` | ||
ord -r wallet inscribe --fee-rate 1 <file> | ||
``` | ||
Mine the inscription with: | ||
``` | ||
bitcoin-cli generatetoaddress 1 <receive address> | ||
``` | ||
View the inscription in the regtest explorer: | ||
``` | ||
ord -r server | ||
``` | ||
|
||
Testing Recursion | ||
----------------- | ||
|
||
When testing out [recursion](../inscriptions/recursion.md), inscribe the | ||
dependencies first (example with [p5.js](https://p5js.org): | ||
``` | ||
ord -r wallet inscribe --fee-rate 1 p5.js | ||
``` | ||
This should return a `inscription_id` which you can then reference in your | ||
recursive inscription. | ||
|
||
ATTENTION: These ids will be different when inscribing on | ||
mainnet or signet, so be sure to change those in your recursive inscription for | ||
each chain. | ||
|
||
Then you can inscribe your recursive inscription with: | ||
``` | ||
ord -r wallet inscribe --fee-rate 1 recursive-inscription.html | ||
``` | ||
Finally you will have to mine some blocks and start the server: | ||
``` | ||
bitcoin-cli generatetoaddress 6 <receive address> | ||
ord -r server | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Recursion | ||
========= | ||
|
||
An important exception to [sandboxing](../inscriptions.md#sandboxing) is recursion: access to `ord`'s `/content` | ||
endpoint is permitted, allowing inscriptions to access the content of other | ||
inscriptions by requesting `/content/<INSCRIPTION_ID>`. | ||
|
||
This has a number of interesting use-cases: | ||
|
||
- Remixing the content of existing inscriptions. | ||
|
||
- Publishing snippets of code, images, audio, or stylesheets as shared public | ||
resources. | ||
|
||
- Generative art collections where an algorithm is inscribed as JavaScript, | ||
and instantiated from multiple inscriptions with unique seeds. | ||
|
||
- Generative profile picture collections where accessories and attributes are | ||
inscribed as individual images, or in a shared texture atlas, and then | ||
combined, collage-style, in unique combinations in multiple inscriptions. | ||
|
||
A few other endpoints that inscriptions may access are the following: | ||
|
||
- `/blockheight`: latest block height. | ||
- `/blockhash`: latest block hash. | ||
- `/blockhash/<HEIGHT>`: block hash at given block height. | ||
- `/blocktime`: UNIX time stamp of latest block. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.