Skip to content

Commit 6493fb2

Browse files
committed
update README
1 parent 5d668fe commit 6493fb2

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# REE Exchange Rust SDK
22

3-
> The Rust SDK for building native Bitcoin dApps on REE(Runes Exchange Environment).
4-
53
![docs.rs](https://img.shields.io/docsrs/ree-exchange-sdk)
64

5+
> The Rust SDK for building native Bitcoin dApps on REE(Runes Exchange Environment).
6+
77
Unlike Ethereum and other smart contract platforms, Bitcoin's scripting language is not Turing complete, making it extremely challenging—if not impossible—to develop complex applications like AMM protocols directly on the Bitcoin network using BTC scripts and the UTXO model.
88

99
REE overcomes this limitation by leveraging the powerful Chain Key technology of the Internet Computer Protocol (ICP) and Bitcoin's Partially Signed Bitcoin Transactions (PSBT) to extend the programmability of Bitcoin's Rune assets.
@@ -20,6 +20,8 @@ REE overcomes this limitation by leveraging the powerful Chain Key technology of
2020

2121
## Quick start
2222

23+
If you are familier with IC canister development, you could easily create an empty rust crate and paste the code into the `lib.rs`.
24+
2325
``` rust
2426
use candid::{CandidType, Deserialize};
2527
use ic_cdk::{query, update};
@@ -123,14 +125,6 @@ pub mod exchange {
123125
pub fn new_pool(args: Metadata) {
124126
let pool = Pool::new(args.clone());
125127
DummyPools::insert(pool.clone());
126-
let loaded = DummyPools::get(&args.address);
127-
assert_eq!(loaded, Some(pool), "Pool not loaded correctly");
128-
let (addr, p) = DummyPools::iter().next().unwrap();
129-
assert_eq!(addr, args.address, "Pool address mismatch");
130-
assert_eq!(Some(p), loaded, "Pool data mismatch");
131-
DummyPools::remove(&args.address);
132-
let loaded = DummyPools::get(&args.address);
133-
assert!(loaded.is_none(), "Pool not removed correctly");
134128
}
135129

136130
#[query]
@@ -153,7 +147,9 @@ pub mod exchange {
153147

154148
## REE exchange client
155149

156-
The `invoke` function in the REE Orchestrator serves as the main entry point for the REE protocol. This function takes `InvokeArgs` as a parameter, which includes the following fields:
150+
To complete an REE transaction, the exchange client should call REE Orchestrator `invoke` rather than making request into exchanges directly.
151+
152+
The `invoke` function of Orchestrator takes `InvokeArgs` as a parameter, which includes the following fields:
157153

158154
```rust
159155
pub struct InvokeArgs {

sdk/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# REE Exchange Rust SDK
22

3+
![docs.rs](https://img.shields.io/docsrs/ree-exchange-sdk)
4+
35
> The Rust SDK for building native Bitcoin dApps on REE(Runes Exchange Environment).
46
57
Unlike Ethereum and other smart contract platforms, Bitcoin's scripting language is not Turing complete, making it extremely challenging—if not impossible—to develop complex applications like AMM protocols directly on the Bitcoin network using BTC scripts and the UTXO model.
@@ -18,6 +20,8 @@ REE overcomes this limitation by leveraging the powerful Chain Key technology of
1820

1921
## Quick start
2022

23+
If you are familier with IC canister development, you could easily create an empty rust crate and paste the code into the `lib.rs`.
24+
2125
``` rust
2226
use candid::{CandidType, Deserialize};
2327
use ic_cdk::{query, update};
@@ -121,14 +125,6 @@ pub mod exchange {
121125
pub fn new_pool(args: Metadata) {
122126
let pool = Pool::new(args.clone());
123127
DummyPools::insert(pool.clone());
124-
let loaded = DummyPools::get(&args.address);
125-
assert_eq!(loaded, Some(pool), "Pool not loaded correctly");
126-
let (addr, p) = DummyPools::iter().next().unwrap();
127-
assert_eq!(addr, args.address, "Pool address mismatch");
128-
assert_eq!(Some(p), loaded, "Pool data mismatch");
129-
DummyPools::remove(&args.address);
130-
let loaded = DummyPools::get(&args.address);
131-
assert!(loaded.is_none(), "Pool not removed correctly");
132128
}
133129

134130
#[query]
@@ -151,7 +147,9 @@ pub mod exchange {
151147

152148
## REE exchange client
153149

154-
The `invoke` function in the REE Orchestrator serves as the main entry point for the REE protocol. This function takes `InvokeArgs` as a parameter, which includes the following fields:
150+
To complete an REE transaction, the exchange client should call REE Orchestrator `invoke` rather than making request into exchanges directly.
151+
152+
The `invoke` function of Orchestrator takes `InvokeArgs` as a parameter, which includes the following fields:
155153

156154
```rust
157155
pub struct InvokeArgs {

0 commit comments

Comments
 (0)