Skip to content

Commit b393f7e

Browse files
committed
change Simfony references to SimplicityHL
1 parent 4f91ecd commit b393f7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+179
-220
lines changed

Cargo.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[package]
2-
name = "simfony"
2+
name = "simplicityhl"
33
version = "0.1.0"
44
authors = ["sanket1729 <sanket1729@gmail.com>"]
55
license = "CC0-1.0"
6-
homepage = "https://github.com/BlockstreamResearch/simfony/"
7-
repository = "https://github.com/BlockstreamResearch/simfony/"
6+
homepage = "https://github.com/BlockstreamResearch/SimplicityHL"
7+
repository = "https://github.com/BlockstreamResearch/SimplicityHL"
88
description = "Rust-like language that compiles to Simplicity bytecode."
99
edition = "2021"
1010
rust-version = "1.78.0"
1111

1212
[lib]
13-
name = "simfony"
13+
name = "simplicityhl"
1414
path = "src/lib.rs"
1515

1616
[[bin]]

bitcoind-tests/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bitcoind-tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["sanket1729 <sanket1729@gmail.com>"]
55
edition = "2021"
66

77
[dependencies]
8-
simfony = { path = ".." }
8+
simplicityhl = { path = ".." }
99
elementsd = { version = "0.11.0" }
1010
actual-rand = { package = "rand", version = "0.8.4" }
1111
secp256k1 = { version = "0.29.0", features = ["rand-std"] }

bitcoind-tests/tests/common/daemon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use elements::hex::FromHex;
55
use elementsd::bitcoincore_rpc::jsonrpc::serde_json::{json, Value};
66
use elementsd::bitcoind::bitcoincore_rpc::RpcApi;
77
use elementsd::ElementsD;
8-
use simfony::elements;
8+
use simplicityhl::elements;
99

1010
// We are not using pegins right now, but it might be required in case in future
1111
// if we extend the tests to check pegins etc.

bitcoind-tests/tests/common/test.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ use elements::pset::PartiallySignedTransaction as Psbt;
55
use elements::{confidential, secp256k1_zkp as secp256k1};
66
use elementsd::ElementsD;
77
use secp256k1::XOnlyPublicKey;
8-
use simfony::{elements, simplicity};
98
use simplicity::jet::elements::{ElementsEnv, ElementsUtxo};
9+
use simplicityhl::{elements, simplicity};
1010

1111
use crate::common::daemon::Call;
1212

13-
type FnWitness = fn([u8; 32]) -> simfony::WitnessValues;
13+
type FnWitness = fn([u8; 32]) -> simplicityhl::WitnessValues;
1414

1515
#[derive(Clone)]
1616
pub struct TestCase<'a> {
1717
pub name: &'static str,
18-
template: Option<simfony::TemplateProgram>,
19-
compiled: Option<simfony::CompiledProgram>,
18+
template: Option<simplicityhl::TemplateProgram>,
19+
compiled: Option<simplicityhl::CompiledProgram>,
2020
witness: FnWitness,
2121
lock_time: elements::LockTime,
2222
sequence: elements::Sequence,
@@ -53,7 +53,7 @@ impl<'a> TestCase<'a> {
5353

5454
pub fn program_path<P: AsRef<std::path::Path>>(mut self, path: P) -> Self {
5555
let text = std::fs::read_to_string(path).expect("path should be readable");
56-
let compiled = simfony::CompiledProgram::new(text.as_str(), simfony::Arguments::default(), false)
56+
let compiled = simplicityhl::CompiledProgram::new(text.as_str(), simplicityhl::Arguments::default(), false)
5757
.expect("program should compile");
5858
self.compiled = Some(compiled);
5959
self
@@ -62,12 +62,12 @@ impl<'a> TestCase<'a> {
6262
pub fn template_path<P: AsRef<std::path::Path>>(mut self, path: P) -> Self {
6363
let text = std::fs::read_to_string(path).expect("path should be readable");
6464
let template =
65-
simfony::TemplateProgram::new(text.as_str()).expect("program should compile");
65+
simplicityhl::TemplateProgram::new(text.as_str()).expect("program should compile");
6666
self.template = Some(template);
6767
self
6868
}
6969

70-
pub fn arguments(mut self, arguments: simfony::Arguments) -> Self {
70+
pub fn arguments(mut self, arguments: simplicityhl::Arguments) -> Self {
7171
let compiled = self
7272
.template
7373
.as_ref()
@@ -220,6 +220,6 @@ impl<'a> TestCase<'a> {
220220
}
221221
}
222222

223-
fn empty_witness(_sighash_all: [u8; 32]) -> simfony::WitnessValues {
224-
simfony::WitnessValues::default()
223+
fn empty_witness(_sighash_all: [u8; 32]) -> simplicityhl::WitnessValues {
224+
simplicityhl::WitnessValues::default()
225225
}

bitcoind-tests/tests/common/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ pub fn sign_schnorr(secret_key: u32, message: [u8; 32]) -> [u8; 64] {
1111
key_pair.sign_schnorr(message).serialize()
1212
}
1313

14-
pub fn xonly_public_key(secret_key: u32) -> simfony::num::U256 {
14+
pub fn xonly_public_key(secret_key: u32) -> simplicityhl::num::U256 {
1515
let key_pair = key_pair(secret_key);
1616
let bytes = key_pair.x_only_public_key().0.serialize();
17-
simfony::num::U256::from_byte_array(bytes)
17+
simplicityhl::num::U256::from_byte_array(bytes)
1818
}

bitcoind-tests/tests/spend_utxo.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use std::collections::HashMap;
33
use elements::hashes::Hash;
44
use elements::secp256k1_zkp as secp256k1;
55
use secp256k1::hashes::{sha256, HashEngine};
6-
use simfony::str::WitnessName;
7-
use simfony::types::TypeConstructible;
8-
use simfony::value::ValueConstructible;
9-
use simfony::{elements, ResolvedType, Value};
6+
use simplicityhl::str::WitnessName;
7+
use simplicityhl::types::TypeConstructible;
8+
use simplicityhl::value::ValueConstructible;
9+
use simplicityhl::{elements, ResolvedType, Value};
1010

1111
mod common;
1212
use common::daemon::{self, Call};
@@ -49,7 +49,7 @@ fn spend_utxo() {
4949
}
5050
}
5151

52-
fn hodl_vault(sighash_all: [u8; 32]) -> simfony::WitnessValues {
52+
fn hodl_vault(sighash_all: [u8; 32]) -> simplicityhl::WitnessValues {
5353
let mut witness_values = HashMap::new();
5454
let oracle_height = 1000;
5555
witness_values.insert(
@@ -73,24 +73,24 @@ fn hodl_vault(sighash_all: [u8; 32]) -> simfony::WitnessValues {
7373
WitnessName::from_str_unchecked("OWNER_SIG"),
7474
Value::byte_array(util::sign_schnorr(2, sighash_all)),
7575
);
76-
simfony::WitnessValues::from(witness_values)
76+
simplicityhl::WitnessValues::from(witness_values)
7777
}
7878

79-
fn p2pk_args() -> simfony::Arguments {
80-
simfony::Arguments::from(HashMap::from([(
79+
fn p2pk_args() -> simplicityhl::Arguments {
80+
simplicityhl::Arguments::from(HashMap::from([(
8181
WitnessName::from_str_unchecked("ALICE_PUBLIC_KEY"),
8282
Value::u256(util::xonly_public_key(1)),
8383
)]))
8484
}
8585

86-
fn p2pk(sighash_all: [u8; 32]) -> simfony::WitnessValues {
87-
simfony::WitnessValues::from(HashMap::from([(
86+
fn p2pk(sighash_all: [u8; 32]) -> simplicityhl::WitnessValues {
87+
simplicityhl::WitnessValues::from(HashMap::from([(
8888
WitnessName::from_str_unchecked("ALICE_SIGNATURE"),
8989
Value::byte_array(util::sign_schnorr(1, sighash_all)),
9090
)]))
9191
}
9292

93-
fn p2pkh(sighash_all: [u8; 32]) -> simfony::WitnessValues {
93+
fn p2pkh(sighash_all: [u8; 32]) -> simplicityhl::WitnessValues {
9494
let mut witness_values = HashMap::new();
9595
witness_values.insert(
9696
WitnessName::from_str_unchecked("PK"),
@@ -100,16 +100,16 @@ fn p2pkh(sighash_all: [u8; 32]) -> simfony::WitnessValues {
100100
WitnessName::from_str_unchecked("SIG"),
101101
Value::byte_array(util::sign_schnorr(1, sighash_all)),
102102
);
103-
simfony::WitnessValues::from(witness_values)
103+
simplicityhl::WitnessValues::from(witness_values)
104104
}
105105

106-
fn p2ms(sighash_all: [u8; 32]) -> simfony::WitnessValues {
106+
fn p2ms(sighash_all: [u8; 32]) -> simplicityhl::WitnessValues {
107107
let mut witness_values = HashMap::new();
108108
let sig1 = Value::some(Value::byte_array(util::sign_schnorr(1, sighash_all)));
109109
let sig2 = Value::none(ResolvedType::byte_array(64));
110110
let sig3 = Value::some(Value::byte_array(util::sign_schnorr(3, sighash_all)));
111111
let ty = sig1.ty().clone();
112112
let maybe_sigs = Value::array([sig1, sig2, sig3], ty);
113113
witness_values.insert(WitnessName::from_str_unchecked("MAYBE_SIGS"), maybe_sigs);
114-
simfony::WitnessValues::from(witness_values)
114+
simplicityhl::WitnessValues::from(witness_values)
115115
}

book/book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ authors = ["Christian Lewe"]
33
language = "en"
44
multilingual = false
55
src = "src"
6-
title = "The Simfony Programming Language"
6+
title = "The SimplicityHL Programming Language"

book/src/function.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ let z: u32 = add(40, 2);
3131

3232
## No early returns
3333

34-
Simfony has no support for an early return via a "return" keyword.
34+
SimplicityHL has no support for an early return via a "return" keyword.
3535
The only branching that is available is via [match expressions](./match_expression.md).
3636

3737
## No recursion
3838

39-
Simfony has no support for recursive function calls.
39+
SimplicityHL has no support for recursive function calls.
4040
A function can be called inside a function body if it has been defined before.
4141
This means that a function cannot call itself.
4242
Loops, where `f` calls `g` and `g` calls `f`, are also impossible.
@@ -75,7 +75,7 @@ fn g() -> u32 {
7575

7676
## Main function
7777

78-
The `main` function is the entry point of each Simfony program.
78+
The `main` function is the entry point of each SimplicityHL program.
7979
Running a program means running its `main` function.
8080
Other functions are called from the `main` function.
8181

@@ -86,7 +86,7 @@ fn main() {
8686
```
8787

8888
The `main` function is a reserved name and must exist in every program.
89-
Simfony programs are always "binaries".
89+
SimplicityHL programs are always "binaries".
9090
There is no support for "libraries".
9191

9292
## Jets

0 commit comments

Comments
 (0)