Skip to content

firstdag/client-sdk-python

 
 

The official Diem Client SDK for Python.

Documentation

Modules Overview

SPEC = specification

DIP-X = Diem Improvement Protocol

Root module name: diem

Sub-modules:

  • jsonrpc: diem JSON-RPC APIs client and API response types. SPEC
  • stdlib: generated code, move stdlib script utils for constructing transaction script playload.
  • diem_types: generated code, Diem on-chain data structure types for encoding and decoding BCS data.
  • utils: utility functions, account address utils, currency code, hashing, hex encoding / decoding, transaction utils.
  • AuthKey | auth_key: auth key utils
  • identifier: Diem Account Identifier and Diem Intent Identifier. DIP-5
  • txnmetadata: utils for creating peer to peer transaction metadata. DIP-4
  • testnet: Testnet utility, minting coins, create Testnet client, chain id, Testnet JSON-RPC URL.
  • LocalAccount | local_account: utility for managing local account keys, generate random local account.
  • chain_ids: list of static chain ids

Examples

>>> from diem import jsonrpc, testnet
>>> client = jsonrpc.Client(testnet.JSON_RPC_URL)
>>> client.get_metadata()
version: 3300304
timestamp: 1601492912847973
chain_id: 2

You can find more examples under the examples directory:

Note: make test runs all examples too, see the Makefile for details.

Download

pip install diem-client-sdk

Bugs/Requests

Please use the GitHub issue tracker to submit bugs or request features.

Build & Test

make init
make test

run specific test:

TEST=<test file / test name> make test

About

Python client library for Diem

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.7%
  • Makefile 0.3%