Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.swagger-codegen
docs
molecule_api
test
.gitignore
.swagger-codegen-ignore
.travis.yml
README.md
git_push.sh
requirements.txt
setup.py
test-requirements.txt
tox.ini

README.md

hydrogen_molecule_api

The Hydrogen Molecule API

Full documentation: Molecule

This Python package is automatically generated by the Swagger Codegen project:

Requirements.

Python 2.7 and 3.4+

Installation & Usage

Recommended: Use a virtualenv (or conda env) for installation and usage of the package

virtualenv molecule-api
source molecule-api/bin/activate

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import molecule_api

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import molecule_api

Getting Started

Full usage documentation is available: Nucleus | Electron | Proton

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import molecule_api
from molecule_api.rest import ApiException
from pprint import pprint

# Initialize configuration
configuration = molecule_api.Configuration()

# Set the environment (optional, defaults to sandbox)
# This changes the URL for requests (including OAuth) to [environment].hydrogenplatform.com
configuration.set_environment("sandbox")


# Configure OAuth2 access token for authorization: oauth
# Method 1: Fetch and set access token with client_id and client_secret
configuration.access_token = configuration.get_oauth_token('MYCLIENTID', 'MYCLIENTSECRET')
# Method 2: Set access token using an existing token
configuration.access_token = 'MYACCESSTOKEN'

# create an instance of the API class
api_instance = molecule_api.MoleculeApi(molecule_api.ApiClient(configuration))
token_id = 'token_id_example' # str | UUID of a token

try:
    # Delete a token
    api_instance.delete_token(token_id)
except ApiException as e:
    print("Exception when calling MoleculeApi->delete_token: %s\n" % e)

Documentation for API Endpoints

Full usage documentation is available: Nucleus | Electron | Proton

All URIs are relative to https://api.hydrogenplatform.com

Class Method HTTP request Description
MoleculeApi delete_token DELETE /molecule/v1/token/{token_id}/ Delete a token
MoleculeApi get_currency_balance GET /molecule/v1/currency_balance/{currency_balance_id} Retrieve a currency balance
MoleculeApi get_currency_balances GET /molecule/v1/currency_balance Get information for all currency balances defined for your application.
MoleculeApi get_token GET /molecule/v1/token/{token_id}/ Retrieve a token
MoleculeApi get_token_balance GET /molecule/v1/token_balance/{token_balance_id} Retrieve a token balance
MoleculeApi get_token_balances GET /molecule/v1/token_balance Get information for all token balances defined for your application.
MoleculeApi get_token_supplies GET /molecule/v1/token_supply Get information for all token supplies defined for your application.
MoleculeApi get_token_supply GET /molecule/v1/token_supply/{token_supply_id} Retrieve a token supply
MoleculeApi get_tokens GET /molecule/v1/token Get information for all tokens defined for your firm
MoleculeApi get_wallet GET /molecule/v1/wallet/{wallet_id}/ Retrieve a wallet
MoleculeApi get_wallet_key GET /molecule/v1/wallet_key/{wallet_key_id}/ Retrieve a wallet key
MoleculeApi get_wallet_keys GET /molecule/v1/wallet_key Get all wallet keys associated with wallets defined for your firm.
MoleculeApi get_wallets GET /molecule/v1/wallet Get information for all wallets defined for your firm
MoleculeApi post_token POST /molecule/v1/token Create a token under your firm.
MoleculeApi post_token_crowdsale POST /molecule/v1/token/crowdsale Transfer tokens to a token's crowdsale address.
MoleculeApi post_token_deploy POST /molecule/v1/token/deploy Deploy a secuirty token contract and its crowdsale contract to blockchain.
MoleculeApi post_token_purchase POST /molecule/v1/token/purchase Participate in a token's crowdsale and purchase tokens.
MoleculeApi post_token_whitelist POST /molecule/v1/token/whitelist Add an investor to a token's whitelist
MoleculeApi post_wallet POST /molecule/v1/wallet Create a wallet under your firm.
MoleculeApi post_wallet_key POST /molecule/v1/wallet_key Associate an existing key pair with a wallet defined for your firm.
MoleculeApi post_wallet_key_generator POST /molecule/v1/wallet_key/generator Generate a wallet key using the Key Service and associate with a wallet defined for your firm.
MoleculeApi update_token PUT /molecule/v1/token/{token_id}/ Update a token
MoleculeApi update_wallet PUT /molecule/v1/wallet/{wallet_id}/ Update a wallet

Documentation For Models

Documentation For Authorization

Please see this page for additional authorization information.

oauth

Author

https://www.hydrogenplatform.com/

You can’t perform that action at this time.