note package’s Message type.
Installation
The CLI is built from the gobl.dev repository, which bundles the core GOBL library with every addon. Our recommendation is to head over to the gobl.dev releases page and download the latest version for your platform and copy the binary to a directory of your choosing. If you already have a working Go environment you may also find it easy to install the latest version with:version is the gobl.dev release and core is the version of the GOBL library it bundles:
Building a Message
The notes.Message type is great for setting up a simple test. For this tutorial open your text editor and a simple JSON file calledmessage.json that looks like:
build command with the --envelop flag indicating that we want the message wrapped in an envelope. The -i flag produces prettier output:
uuid.
Keys
GOBL has built in support for digital signatures using JSON Web Keys. The CLI makes this process trivial, but you do need to have generated a private key. Thekeygen command will create a key pair inside the ~/.gobl directory by running:
Signing
Now we have a private key, we can sign the original message. Run the following command:doc and head fields are identical to the original message, but we’ve now added the sigs array at the end. Combined with your public key, anyone can easily verify the contents of your message where indeed signed with your private key.
If you’re interested, you can check the contents of the signature here: jwt.io.