SCoinAPI Documentation
Package overview
The scoinAPI is a Python package providing fast, simplify, and to manage the role's authority. It aims to be a fundamental package to access the method of the SCoin system instead of writing a method without fully understood. Besides that, it's easy to get started in creating a role in the SCoin system. Also, This package will auto-update after the real API has been updated.
Getting started
-
What is scoinAPI ?
The light package for SCU blockchain in the IOTA system. -
Who can use the scoinAPI ?
The developer of SCoin system. -
How do I install the package ?
Run the following command to install:$ pip install SCoinAPI
-
What is the role of the SCoin system ?
There are three roles which are the central bank, bank, and retailer. -
What is the difference between each role ?
Each role has a different authority to access the method. -
How can import the package ?
To import the package based on the roles:from SCoinAPI import centralbank cb = centralbank.Central_Bank()
from SCoinAPI import bank bk = bank.Bank()
from SCoinAPI import retailer rt = retailer.Retailer()
-
What are the layer in SCoin system ?
The layer in SCoin system means that the role of user. (a) layer 1 = the central bank (b) layer 2 = the bank or retailer
Each role's methods in the SCoin system
-
The Central Bank
- connection_test
- send_token
- get_balance
- create_did
- get_did
- verify_token
- send_token
- send_tokens
- remove_layer1
- get_transactions_by_timestamp
- get_user_by_timestamp
- get_info
- set_central_bank
- get_all_cluster [ To be develop ]
- bridge [ To be delete ]
- snapshot [ To be delete ]
- get_enseed [ To be develop ]
-
The Bank
-
The Retailer
API Reference
-
connection_test
-
send_token
-
Description :
To make transaction within two user of SCoin system,but it only available for layer 1 user did. -
Parameters :
- password(str) : The user's password.
- sen(str) : The sender's username.
- rev(str) : The receiver's username.
- num(int) : The transaction amount.
- method(str) : Optinal,The user method, default value is light.
- description(any) : Optional,The metadata of transaction.
- l(str) : Optional,To set the real API link if it has been changed.
-
Returns :
Dict of status, response data and message. -
Usage :
r = cb.send_token('SENDER_PASSWORD','SENDER','RECEIVABLE',20)
-
-
send_tokens
-
Description :
To make transaction within two user of SCoin system,it is available for basic transaction. -
Parameters :
- password(str) : The user's password.
- sen(str) : The sender's username.
- rev(str) : The receiver's username.
- num(int) : The transaction amount.
- method(str) : Optinal,The user method, default value is light.
- description(any) : Optional,The metadata of transaction.
- l(str) : Optional,To set the real API link if it has been changed.
-
Returns :
Dict of status, response data and message. -
Usage :
r = cb.send_tokens('SENDER_PASSWORD','SENDER','RECEIVABLE',20)
-
-
get_balance
-
create_did
-
Description :
To create an user did in the SCoin system. -
Parameters :
- name(str) : The user's did.
- password(str) : The user's password.
- method(str) : Optinal,The user method, default value is light.
- description(any) : Optional,The metadata of transaction.
- l(str) : Optional,To set the real API link if it has been changed.
- pub_key(str) : Optional,RSA public key or endpoint, service will generate one key-pair if this field is empty.
-
Returns :
Dict of status, response data and message. -
Usage :
r = cb.create_did('DID','PASSWORD')
-
-
get_did
-
verify_token
-
Description :
To verify self-token. -
Parameters :
- name(str) : The user's did.
- password(str) : The user's password.
- token(str) : The hash value of token to be verify.
- l(str) : Optional,To set the real API link if it has been changed.
-
Returns :
Dict of status and message. -
Usage :
r = cb.verify_token('DID','PASSWORD','HASH_VALUE')
-
-
remove_layer1
-
Description :
To downgrade the authority of the user to layer-2. -
Parameters :
- name(str) : The user's did to be downgrade.
- password(str) : The user's password to be downgrade.
- l(str) : Optional,To set the real API link if it has been changed.
-
Returns :
Dict of status and message. -
Usage :
r = cb.remove_layer1('DID','PASSWORD','HASH_VALUE')
-
-
get_transactions_by_timestamp
-
Description :
To get the transaction during a specific time range. -
Parameters :
- start_time(int) : The start time.
- end_time(int) : The end time.
- l(str) : Optional,To set the real API link if it has been changed.
-
Returns :
Dict of status, response data and message. -
Usage :
r = cb.get_transactions_by_timestamp(0,10000000)
-
-
get_user_by_timestamp
-
Description :
To get the sign up user during a specific time range. -
Parameters :
- start_time(int) : The start time.
- end_time(int) : The end time.
- l(str) : Optional,To set the real API link if it has been changed.
-
Returns :
Dict of status, response data and message. -
Usage :
r = cb.get_user_by_timestamp(0,10000000)
-
-
get_info
-
set_central_bank
-
Description :
To upgrade the authority of the user to layer-1. -
Parameters :
- name(str) : The user's did to be upgrade.
- password(str) : The user's password to be upgrade.
- l(str) : Optional,To set the real API link if it has been changed.
-
Returns :
Dict of status and message. -
Usage :
r = cb.set_central_bank('DID','PASSWORD')
-
If you have any issues, please contact the information below.
- LINE : nus_jie
- Email : sefx5ever@gmail.com
Metadata
Release files for SCoinAPI 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SCoinAPI-1.2.3.tar.gz | 8.3 kB | Without provenance | Details for SCoinAPI-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SCoinAPI-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for SCoinAPI-1.2.3-py3-none-any.whl |
Total release size: 16.8 kB
Release files / SCoinAPI-1.2.3.tar.gz
| Download URL | SCoinAPI-1.2.3.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61a7d90475b373a14a667b6770d2f481d07b067e5df59d7b5d6889e55aa360ef
|
|
BLAKE2b-256 checksum How to use checksums |
6cf8a692d0e82f52518bc368406b71dd9d6910574691e6559ac9d39422c65121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6rc1
|
Release files / SCoinAPI-1.2.3-py3-none-any.whl
| Download URL | SCoinAPI-1.2.3-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f92f85da2f86552ea86daaeafd2a1bb12da3ae8617c21b4d067fa891cdbeed7
|
|
BLAKE2b-256 checksum How to use checksums |
b2613f72fd78d84c5325e41afb17ea44fc0fd3f9b9c86031c1bec4e93b51d790
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6rc1
|
Security for SCoinAPI 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.