Comments (2)
@boguslavsky @defuz @gisochre Are you OK with this interface? Maybe, ListView
or MapView
need to have other methods? As for JSON for constructors, I see it slightly more verbose than it is currently, in order to be parseable within generic Exonum type spec:
ListView (3 items, proofs for 1st and 3rd):
{
"root": {
"@type": "branch",
"left": {
"@type": "branch",
"left": {
"val": ...
},
"right": {
"stub": "abcdef..."
}
},
"right": {
"@type": "sprout",
"child": {
"val": ...
}
}
},
"length": 3
}
MapView (proof for key 01101...
; the bits
field is embedded into variants):
{
"@type": "branch",
"bits": "",
"left": {
"@type": "branch",
"bits": "0",
"left": {
"stub": {
"bits": "01",
"hash": "..."
}
},
"right": {
"val": {
"bits": "1101...",
"item": ...
}
}
},
"right": {
"stub": {
"bits": "1",
"hash": "..."
}
}
}
This assumes that oneOf
can be encoded either as {<tag>: <value>}
or {"@type": <tag>, ...<value>}
.
As for implementation, it could be first implemented with custom JSON parsing logic, and then integrated into the Exonum type system.
from exonum-client.
I've implemented a PoC for type defs, which includes possibility of tree implementation, among other things. Very rough, but you probably get the general idea.
from exonum-client.
Related Issues (20)
- BadRequest("Invalid 'hash' parameter: Odd number of digits") HOT 6
- Signature verification fails for structures with arrays HOT 3
- 404 error at explorer response HOT 7
- Can I disable check transaction status after send? HOT 1
- Make send headers for tx.send
- exonum.MapProof.merkleRoot is inconsistent when the type of boolen in protobuf HOT 1
- Send multiple transaction without waiting commited message
- Wrong type definition HOT 1
- Use test data from core HOT 1
- Rework NewMessage
- Drop unnecessary size field HOT 2
- Link to npm package
- Use Flow type system? HOT 6
- Verify an error messages in tests HOT 1
- Bugs in documentation & how to use the client with the rust server HOT 3
- FixedBuffer serialization HOT 2
- Exonum v0.2 compatibility? HOT 3
- Built-in converters documentation HOT 1
- Check library version HOT 1
- Make it work with Typescript HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exonum-client.