Package Exports
- @polkadot/primitives-rlp
- @polkadot/primitives-rlp/accountId
- @polkadot/primitives-rlp/accountId/decode
- @polkadot/primitives-rlp/blockNumber
- @polkadot/primitives-rlp/blockNumber/decode
- @polkadot/primitives-rlp/blockNumber/encode
- @polkadot/primitives-rlp/headerHash
- @polkadot/primitives-rlp/parachainId
- @polkadot/primitives-rlp/parachainId/decode
- @polkadot/primitives-rlp/signature
- @polkadot/primitives-rlp/signature/decode
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@polkadot/primitives-rlp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@polkadot/primitives-rlp
Conversion of Polkadot types to and from Buffers, ready for rlp conversion. It converts from complex classes to the correct rlp representation.
Usage
Installation -
npm install --save @polkadot/primitives-rlpUsage -
const { parachainIdDecode, parachainIdEncode } = require('@polkadot/primitives-rlp');
parachainIdDecode( // step 3 - BN `0x123456`
parachainIdEncode( // step 1 - Buffer `[0x12, 0x34, 0x56]`
new BN('0x123456') // step 0 - BN `0x123456`
)
);