Skip to content

Commit

Permalink
Update documentation to include Go SDK
Browse files Browse the repository at this point in the history
Co-Authored-By: Waleed Mortaja <[email protected]>
Signed-off-by: pama-ibm <[email protected]>
Signed-off-by: Ry Jones <[email protected]>
(cherry picked from commit c032220)
  • Loading branch information
WaleedMortaja authored and denyeart committed May 12, 2022
1 parent 449ef0a commit e728001
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/source/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ hours (3 days), it will be flagged to the #fabric-pr-review channel daily until
it receives a review comment(s).

This policy applies to all official Fabric projects (fabric, fabric-ca,
fabric-samples, fabric-test, fabric-sdk-node, fabric-sdk-java, fabric-gateway-java,
fabric-samples, fabric-test, fabric-sdk-node, fabric-sdk-java, fabric-sdk-go, fabric-gateway-java,
fabric-chaincode-node, fabric-chaincode-java, fabric-chaincode-evm,
fabric-baseimage, and fabric-amcl).

Expand Down
31 changes: 29 additions & 2 deletions docs/source/dev-setup/devenv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ SoftHSM generally requires additional configuration before it can be used. For
example, the default configuration will attempt to store token data in a system
directory that unprivileged users are unable to write to.

SoftHSM configuration typically involves copying ``/etc/softhsm2.conf`` to
SoftHSM configuration typically involves copying ``/etc/softhsm/softhsm2.conf`` to
``$HOME/.config/softhsm2/softhsm2.conf`` and changing ``directories.tokendir``
to an appropriate location. Please see the man page for ``softhsm2.conf`` for
details.
Expand All @@ -119,7 +119,7 @@ initialize the token required by the unit tests:

::

softhsm2-util --init-token --slot 0 --label "ForFabric" --so-pin 1234 --pin 98765432
softhsm2-util --init-token --slot 0 --label ForFabric --so-pin 1234 --pin 98765432

If tests are unable to locate the libsofthsm2.so library in your environment,
specify the library path, the PIN, and the label of your token in the
Expand All @@ -131,6 +131,33 @@ appropriate environment variables. For example, on macOS:
export PKCS11_PIN=98765432
export PKCS11_LABEL="ForFabric"

The tests don't always clean up after themselves and, over time, this causes
the PKCS #11 tests to take a long time to run. The easiest way to recover from
this is to delete and recreate the token.

::

softhsm2-util --init-token --slot 0 --label ForFabric --so-pin 1234 --pin 98765432
softhsm2-util --delete-token --token ForFabric

Debugging with ``pkcs11-spy``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The `OpenSC Project <https://github.com/OpenSC/OpenSC>`__ provides a shared
library called ``pkcs11-spy`` that logs all interactions between an application
and a PKCS #11 module. This library can be very useful when troubleshooting
interactions with a cryptographic token device or service.

Once the library has been installed, configure Fabric to use ``pkcs11-spy`` as
the PKCS #11 library and set the ``PKCS11SPY`` environment variable to the real
library. For example:

::

export PKCS11_LIB="/usr/lib/softhsm/libsofthsm2.so"
export PKCS11SPY="/usr/lib/x86_64-linux-gnu/pkcs11/pkcs11-spy.so"


Install the development tools
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
7 changes: 4 additions & 3 deletions docs/source/fabric-sdks.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Hyperledger Fabric SDKs
=======================

Hyperledger Fabric intends to offer a number of SDKs for a wide variety of
programming languages. The first two delivered are the Node.js and Java
SDKs. We hope to provide Python, REST and Go SDKs in a subsequent release.
Hyperledger Fabric offers a number of SDKs for a wide variety of
programming languages. The first three delivered are the Node.js, Java, and Go
SDKs. We hope to provide Python, and REST SDKs in a subsequent release.

* `Hyperledger Fabric Node SDK documentation <https://hyperledger.github.io/fabric-sdk-node/>`__.
* `Hyperledger Fabric Java SDK documentation <https://hyperledger.github.io/fabric-gateway-java/>`__.
* `Hyperledger Fabric Go SDK documentation <https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go/>`__.

.. Licensed under Creative Commons Attribution 4.0 International License
https://creativecommons.org/licenses/by/4.0/
10 changes: 6 additions & 4 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ Hyperledger Fabric offers a number of SDKs to support developing applications in

* `Node.js SDK <https://github.com/hyperledger/fabric-sdk-node>`__ and `Node.js SDK documentation <https://hyperledger.github.io/fabric-sdk-node/>`__.
* `Java SDK <https://github.com/hyperledger/fabric-gateway-java>`__ and `Java SDK documentation <https://hyperledger.github.io/fabric-gateway-java/>`__.
* `Go SDK <https://github.com/hyperledger/fabric-sdk-go>`__ and `Go SDK documentation <https://pkg.go.dev/github.com/hyperledger/fabric-sdk-go/>`__.

Prerequisites for developing with the SDKs can be found in the Node.js SDK `README <https://github.com/hyperledger/fabric-sdk-node#build-and-test>`__ and Java SDK `README <https://github.com/hyperledger/fabric-gateway-java/blob/master/README.md>`__.
Prerequisites for developing with the SDKs can be found in the Node.js SDK `README <https://github.com/hyperledger/fabric-sdk-node#build-and-test>`__ ,
Java SDK `README <https://github.com/hyperledger/fabric-gateway-java/blob/main/README.md>`__, and
Go SDK `README <https://github.com/hyperledger/fabric-sdk-go/blob/main/README.md>`__.

In addition, there are two more application SDKs that have not yet been officially released
(for Python and Go), but they are still available for downloading and testing:
In addition, there is one other application SDK that has not yet been officially released
for Python, but is still available for downloading and testing:

* `Python SDK <https://github.com/hyperledger/fabric-sdk-py>`__.
* `Go SDK <https://github.com/hyperledger/fabric-sdk-go>`__.

Currently, Node.js, Java and Go support the new application programming model delivered in Hyperledger Fabric v1.4.

Expand Down
5 changes: 2 additions & 3 deletions docs/source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,8 @@ cryptographic algorithms for signatures, logging frameworks and state stores,
are easily swapped in and out of the SDK. The SDK provides APIs for transaction
processing, membership services, node traversal and event handling.

Currently, the two officially supported SDKs are for Node.js and Java, while two
more -- Python and Go -- are not yet official but can still be downloaded
and tested.
Currently, there are three officially supported SDKs -- for Node.js, Java, and Go. While the Python SDK
is not yet official but can still be downloaded and tested.

.. _Smart-Contract:

Expand Down

0 comments on commit e728001

Please sign in to comment.