Giter Site home page Giter Site logo

Comments (5)

tpmccallum avatar tpmccallum commented on May 14, 2024

Change the code of the POST to the /api/executables endpoint and the PUT to the /api/executables/:wasm_id endpoint to achieve the following:

  • If the content type is text/hex, then the body is wasm in hex format
  • If the content type is application/octet-stream, then the body is wasm in binary format

from wasm-joey.

tpmccallum avatar tpmccallum commented on May 14, 2024

Updated the code to now accept SSVM-Description in the header like this

curl --location --request GET 'https://rpc.ssvm.secondstate.io:8081/api/executables/29' \
--header 'Content-Type: application/json' \
--header 'SSVM-Description: Created on 20200517, this is a Wasm test for moving description to the headers' \
--data-raw '{"wasm_hex": "0x33333333"}'

Results in the following

{"wasm_id":29,"wasm_description":"Created on 20200517, this is a Wasm test for moving description to the
headers","wasm_as_hex":"0x33333333","wasm_as_buffer":{"type":"Buffer","data":[48,120,51,51,51,51,51,51,51,51]}}

from wasm-joey.

tpmccallum avatar tpmccallum commented on May 14, 2024

Now we can allow the caller to specify whether the wasm is hex or binary via the Content-Type. No JSON required.

from wasm-joey.

juntao avatar juntao commented on May 14, 2024

from wasm-joey.

tpmccallum avatar tpmccallum commented on May 14, 2024

This has now been achieved. The endpoint for setting a new Wasm binary into Joey now accepts a body made up exclusively of binary data.
As SSVM now no longer requires hex (0x12345) the body for this task is native executable Wasm binary (original .wasm format).

from wasm-joey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.