https://github.com/wavesplatform/marshall
binary-json-js converter
https://github.com/wavesplatform/marshall
Last synced: 8 months ago
JSON representation
binary-json-js converter
- Host: GitHub
- URL: https://github.com/wavesplatform/marshall
- Owner: wavesplatform
- License: mit
- Created: 2018-12-11T12:12:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T15:35:21.000Z (over 3 years ago)
- Last Synced: 2025-06-25T09:13:43.544Z (10 months ago)
- Language: TypeScript
- Size: 1.67 MB
- Stars: 1
- Watchers: 6
- Forks: 7
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @waves/marshall
Marshall can serialize and parse Waves blockchain data structures
### Includes:
- Serialization primitives
- Parsing primitives
- Binary to js converters
- Js to binary converters
- JSON to js converters
- Js to JSON converters
### Usage:
```javascript
import { binary, json } from 'parse-serialize'
const tx = {
type: 10,
version: 2,
fee: 100000,
senderPublicKey: '7GGPvAPV3Gmxo4eswmBRLb6bXXEhAovPinfcwVkA2LJh',
timestamp: 1542539421565,
id: '1bVuFdMbDAk6dhcQFfJFxpDjmm8DdFnnKesQ3wpxj7P',
proofs:
['5cW1Ej6wFRK1XpMm3daCWjiSXaKGYfL7bmspZjzATXrNYjRVxZJQVJsDU7ZVcxNXcKJ39fhjxv3rSu4ovPT3Fau8'],
alias: 'MyTestAlias'
};
// Binary converter
const bytes = binary.serializeTx(tx);
const txb = binary.parseTx(bytes)
// json converted
const jsonString = json.stringifyTx(tx)
const txj = json.parseTx(jsonString)
```