This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cargo: updated iota-core and bee- deps
wasm: added wasm-client cargo feature and enabled corresponding wasm features in cargo deps binding/wasm: updated bindings, notably Author and Subscriber now use Rc<Ref<Api>> objects internally as async methods can only be 'self' and not '&mut self', see rustwasm/wasm-bindgen#1858 for discussion.
- Loading branch information
1 parent
4315c8f
commit 69c3c47
Showing
12 changed files
with
171 additions
and
93 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
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 |
---|---|---|
@@ -1,12 +1,21 @@ | ||
import("../pkg/index.js").then((streams) => { | ||
import("../pkg/index.js").then(async (streams) => { | ||
|
||
let options = new streams.SendTrytesOptions(1, 9, true, 1); | ||
let seed = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; | ||
let auth = new streams.Author("https://nodes.devnet.iota.org:443", seed, options, false); | ||
|
||
let seed = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" | ||
let options = new streams.SendTrytesOptionsW(1, 14, true, 1); | ||
let auth = new streams.AuthorW("https://nodes.devnet.iota.org:443", seed, options, false); | ||
console.log("channel address: ", auth.channel_address()); | ||
console.log("multi branching: ", auth.is_multi_branching()); | ||
console.log("timestamp: ", auth.timestamp()); | ||
console.log("announce: ", auth.auth_send_announce()); | ||
let ann_link = await auth.send_announce(); | ||
console.log("announced at: ", ann_link); | ||
|
||
let options2 = new streams.SendTrytesOptions(1, 9, true, 1); | ||
let seed2 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA"; | ||
let sub = new streams.Subscriber("https://nodes.devnet.iota.org:443", seed2, options2, false); | ||
|
||
//console.log("sub channel address: ", sub.channel_address()); | ||
//await sub.receive_announcement(ann_link); | ||
//console.log("sub channel address: ", sub.channel_address()); | ||
|
||
auth.free(); | ||
//auth.free(); | ||
}); |
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
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.