Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Jan 26, 2025
1 parent b8c6d71 commit 6f76787
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Summary
- [Examples](inscriptions/examples.md)
- [Runes](runes.md)
- [Specification](runes/specification.md)
- [Satscard](satscard.md)
- [FAQ](faq.md)
- [Contributing](contributing.md)
- [Donate](donate.md)
Expand Down
58 changes: 58 additions & 0 deletions docs/src/satscard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Satscard
========

[Satscards](https://satscard.com/) are cards which can be used to store
bitcoin, inscriptions, and runes.

Slots
-----

Each satscard has ten slots containing private keys with corresponding bitcoin
addresses.

Initially, all slots are sealed and the private keys are stored only the
satscard.

Slots can be unsealed, which allows the corresponding private key to be
extracted.

Unsealing is permanent. If a satscard is sealed, you can have some confidence
that private key is not known to anyone. That taking physical ownership of a
satscard makes you the sole owner of assets in any sealed slots.

Viewing
-------

When placed on a smartphone, the satscard transmits a URL, beginning with
`https://satscard.com/start` or `https://getsatscard.com/start`, depending on
when it was manufactured.

This URL contains a signature which can be used to recover the address of the
currently slot. This signature is made over a random nonce, so it changes every
time the satscard is tapped, and provides some confidence that the satscard
contains the private key.

`ord` supports viewing the contents of a satscard by entering the full URL into
the `ord` explorer search bar, or the input field on the `/satscard` page.

For `ordinals.com`, this is
[ordinals.com/satscard](https://ordinals.com/satscard).

Unsealing
---------

Satscard slots can be unsealed and the private keys extracted using the `cktap`
binary, available in the
[coinkite-tap-proto](https://github.com/coinkite/coinkite-tap-proto)
repository.

Sweeping
--------

After a satscard slot is unsealed, all assets should be swept from that slot to
another wallet, as the private key can now be read via NFC.

`ord` does not yet support sweeping assets from other wallets, so assets will
need to be transferred manually.

Be careful, and good luck!
12 changes: 6 additions & 6 deletions src/templates/satscard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ impl SatscardHtml {
impl PageContent for SatscardHtml {
fn title(&self) -> String {
if let Some((satscard, _address_info)) = &self.satscard {
format!("SATSCARD {}", satscard.address)
format!("Satscard {}", satscard.address)
} else {
"SATSCARD".into()
"Satscard".into()
}
}
}
Expand Down Expand Up @@ -47,10 +47,10 @@ mod tests {
satscard: Some((crate::satscard::tests::satscard(), None)),
}
.title(),
format!("SATSCARD {}", crate::satscard::tests::address())
format!("Satscard {}", crate::satscard::tests::address())
);

assert_eq!(SatscardHtml { satscard: None }.title(), "SATSCARD");
assert_eq!(SatscardHtml { satscard: None }.title(), "Satscard");
}

#[test]
Expand All @@ -62,7 +62,7 @@ mod tests {
.to_string(),
r#"<h1>Satscard bc1ql86vqdwylsgmgkkrae5nrafte8yp43a5x2tplf</h1>
<form>
<label for=url>SATSCARD URL</label>
<label for=url>Satscard URL</label>
<input
type=text
id=url
Expand Down Expand Up @@ -107,7 +107,7 @@ mod tests {
.to_string(),
r#"<h1>Satscard bc1ql86vqdwylsgmgkkrae5nrafte8yp43a5x2tplf</h1>
<form>
<label for=url>SATSCARD URL</label>
<label for=url>Satscard URL</label>
<input
type=text
id=url
Expand Down
2 changes: 1 addition & 1 deletion templates/satscard.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h1>Satscard {{ address }}</h1>
<h1>Satscard</h1>
%% }
<form>
<label for=url>SATSCARD URL</label>
<label for=url>Satscard URL</label>
<input
type=text
id=url
Expand Down

0 comments on commit 6f76787

Please sign in to comment.