create_wallet(&rpc_server);
inscribe(&rpc_server);
let txid = rpc_server.mine_blocks(1)[0].txdata[0].txid();
let Inscribe { reveal, .. } = CommandBuilder::new(format!(
"wallet inscribe --satpoint {}:0:1 --fee-rate 1 --file foo.txt",
txid
))
.write("foo.txt", "FOO")
.rpc_server(&rpc_server)
.run_and_deserialize_output();
rpc_server.mine_blocks(1);
let inscription_id = InscriptionId {
txid: reveal,
index: 0,
};
let response =
TestServer::spawn_with_server_args(&rpc_server, &["--index-sats"], &["--enable-json-api"])
.json_request(format!("/sat/{}", 3 * 50 * COIN_VALUE + 1));
assert_eq!(response.status(), StatusCode::OK);
let sat_json: SatJson = serde_json::from_str(&response.text().unwrap()).unwrap();
pretty_assert_eq!(
sat_json,
SatJson {
number: 3 * 50 * COIN_VALUE + 1,
decimal: "3.1".into(),
degree: "0°3′3″1‴".into(),
name: "nvtblvikkiq".into(),
block: 3,
cycle: 0,
epoch: 0,
period: 0,
offset: 1,