Filecoin Signing Tools

1 min read
Integration
Filecoin Signing Tools

Features: Rust Native Library: Secp256k1, Multisig, BLS, Hardware Wallet support (Ledger Nano S/X), Filecoin transactions (CBOR <> JSON serialization)


License Apache 2.0    Circleci    NPM Package

API Documentation

WARNING
The documentation is being updated. We will have a completely new layout in the following week.

Features

Rust Native Library

  • Secp256k1
  • Multisig
  • BLS
  • Hardware Wallet support (Ledger Nano S/X)
  • Filecoin transactions (CBOR <> JSON serialization)

WASM Library

  • Secp256k1
  • Multisig
  • BLS
  • Hardware Wallet support (Ledger Nano S/X) Documentation
  • Filecoin transactions (CBOR <> JSON serialization)

JSON RPC Server

  • Focus: Exchange integration
  • Exposes most of the functions available in the signing library
  • Lotus integration:
  • nonce caching
  • determine testnet vs mainnet
  • retrieve nonce
  • submit signed transaction
  • retrieve tx status

FFI Examples

Caller

Callee

Status

Node.js

JSONRPC Service

Ready ✔️

Link

Browser

WASM

Ready ✔️

Link

Browser

WASM + Ledger

Ready ✔️

Link

Node.js / Mocha

WASM

Ready ✔️

Link

Rust

Rust + Ledger

Ready ✔️

Link

C

Rust

Ready ✔️

Link

C++

Rust

Ready ✔️

Link

Java

Rust

Ready ✔️

Link

Kotlin

Rust

Ready ✔️

Link

Go

Rust

Ready ✔️

Link

Objective-C

Rust

Ready ✔️

Link

Swift

Rust

Ready ✔️

Link

Flutter

Rust

Ready ✔️

Link

React Native

Rust

Planned ⏳

Soon

Running tests and examples

TIP: A good place to look for reproducible steps is the circleci configuration of this project

Installing dependencies

make deps

Rust

cargo test -p filecoin-signer

Service

To run these tests, you need to set two environment variables first so tests can reach a Lotus node:

LOTUS_SECRET_URL

some_url

LOTUS_SECRET_JWT

some_jwt

Then you can run:

cargo test -p filecoin-signer

WASM

Build WASM and link it locally so examples are linked to the local version:

make link_wasm

After this, you can run the following tests / examples:

Command

Description

make test_wasm_unit

Unit tests

make test_wasm_node

Node integration tests

make test_wasm_browser

Browser integration tests

make test_wasm_ledger

Ledger integration tests