Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python client library for Diem

License

NotificationsYou must be signed in to change notification settings

diem/client-sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

pypiApache V2 LicensePython versoins

API Reference

Pypi package

https://pypi.org/project/diem/

Examples

>>>fromdiem.jsonrpcimportAsyncClient>>>fromdiem.testingimportJSON_RPC_URL>>>importasyncio>>>>>>asyncdefmain():...# Use with statement to close client after usage...# or call client.close() when initialized without with statement...withAsyncClient(JSON_RPC_URL)asclient:...print(awaitclient.get_metadata())...>>>asyncio.run(main())version:3300304timestamp:1601492912847973chain_id:2......

You can find more examples under theexamples directory:

For building a wallet application, seeMiniWallet Application for example.

Off-chain service example

CheckoutMiniWallet implementation for off-chain service implementation example.

MiniWallet and MiniWallet Test Suite

Seemini_wallet.md

Build & Test

make initmake test

run specific test:

make test t=<test file / test name match pattern>

run with local docker testnet (requires initializing diem submodule):

make test t=<test file / test name match pattern> dt=1

Re-generate diem_types, stdlib, jsonrpc response data structures

git submodule update --init diemcd diemgit pull origin maincd ..make gen

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 decodingBCS 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.
  • testing: Testing utility, MiniWallet application, MiniWallet test suites,LocalAccount for managing local account keys and generating random local account.
  • chain_ids: list of static chain ids

About

Python client library for Diem

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors9

Languages


[8]ページ先頭

©2009-2025 Movatter.jp