@frequency-chain/schemas
v1.15.2
Published
A static package which allows getting schemas locally
Downloads
364
Keywords
Readme
Static Schemas package
Static schemas
A convenient way to get schema details locally with TypeScript.
Getting Started
npm install @frequency-chain/schemas
(static schemas library)
Usage
After importing, any of the following Maps can be used to fetch desired schema information.
ID_TO_SCHEMA_FULL_NAME
is a Map that returns full names from schema ids (exampledsnp.tombstone@v1
)FULL_NAME_TO_ID
is a Map that returns schema id from full nameID_TO_SCHEMA_INFO
is a Map that returnSchemaInfo
from schema id
Here is an example of a schema info object
{
id: 7,
namespace: 'dsnp',
name: 'public-key-key-agreement',
version: 1,
deprecated: false,
modelType: 'AvroBinary',
payloadLocation: 'Itemized',
appendOnly: true,
signatureRequired: true,
},
Upgrades and Matching Versions
Assuming you are using no deprecated methods, any release version of @frequency-chain/schemas
should work against a release version of a Frequency node.
If you are working against a development node it is suggested that you match the package version against the commit hash using v0.0.0-[First 6 of the commit hash]
.
Changelog is maintained in the releases for Frequency.
Contributing
See CONTRIBUTING.md for more information.
License
Distributed under the Apache 2.0 License. See LICENSE
for more information.