View on GitHub

Whiteflag API

Reference implementation of the Whiteflag protocol as a web API in Node.js to connect applications with the underlying blockchains

Whiteflag API Connector for the Fennel parachain

The Whiteflag API natively supports the Fennel blockchain, which is based on the Substrate/Polkadot SDK.

Blockchain specifications

   
Whiteflag message embedding: signal pallet
Maximum message length: (t.b.d.)
Signature algorithm: sr25519
Transaction hash: 256 bits (64 hexadecimals)
Address encoding: SS58 address format
Address prefix: 42 (substrate)
Secret for account creation: 32 byte seed

NOTE: The signature algorithm sr25519 is officially not specified to be used with JWS in RFC 7518 for Whiteflag authentication method 1. However, Whiteflag is using JSON Web Tokens just as a structure. For Whiteflag authentication method 1 to work, it is essential that the key pair and curve of the blockchain is used for the signature to prove possession of the associated secret key. See also Issue 33.

Fennel configuration

The blockchains configuration file config/blockchains.toml should contain the Fennel parachain specific parameters in one of its [[blockchains]] sections.

These parameters manage Fennel parachain accounts:

For retrieving transactions containing Whiteflag messages from the blockchain, these parameters may be provided, otherwise default values are used:

To send and receive Whiteflag messages, the API must be connected to a Fennel parachain node exposing the Substrate/Polkadot RPC interface interface. These parameters are used to configure the connection: