Offchain-worker APIs stubs (#2615)

* WiP: HTTP Apis.

* Working on the API.

* Add docs, clean up the API.

* Expose ext_ stuff as well.

* Implement HTTP helpers for offchain sr-io.

* Remove HTTP stuff.

* Revert "Remove HTTP stuff."

This reverts commit 7cca029d6ae93c5849b50edfcc6d2c313ba3e5bf.

* HTTP apis.

* Additional offchain methods.

* Make it compile.

* Implement wasm-ext boundary of offchain methods.

* Add stubs for offchain stuff to prevent panics.

* Fix tests.

* Addres some more issues.

* Introduce typedef, use unsafe from_utf8

* Bump runtime version.

* Introduce error to distinguish deadline and io errors.

* Add local_storage_cas

* Some tests for offchain stuff.

* Address more grumbles.

* Fix tests compilation.

* Fix borked merge.

* Improve docs for expected return values from ext functions.

* Adding new sign/enrypt/decrypt APIs.
This commit is contained in:
Tomasz Drwięga
2019-05-31 09:33:44 +02:00
committed by Gavin Wood
parent 80b18c8531
commit 308ab4f269
26 changed files with 2648 additions and 120 deletions
+5 -3
View File
@@ -53,6 +53,8 @@ pub use core::borrow;
pub use core::cell;
pub use core::clone;
pub use core::cmp;
pub use core::convert;
pub use core::default;
pub use core::hash;
pub use core::intrinsics;
pub use core::iter;
@@ -61,10 +63,10 @@ pub use core::mem;
pub use core::num;
pub use core::ops;
pub use core::ptr;
pub use core::slice;
pub use core::default;
pub use core::result;
pub use core::convert;
pub use core::slice;
// Allow intepreting vectors of bytes as strings, but not constructing them.
pub use core::str;
// We are trying to avoid certain things here, such as `core::string`
// (if you need `String` you most probably doing something wrong, since
// runtime doesn't require anything human readable).