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
-
-
-
$ pip install SCoinAPI
-
-
-
from SCoinAPI import CentralBank cb = Central_Bank()
from SCoinAPI import Bank bk = Bank()
from SCoinAPI import Retailer rt = Retailer()
-
-
Each role's methods in the SCoin system
-
- 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 ]
-
-
API Reference
-
-
-
- l(str) : Optional,To set the real API link if it has been changed.
-
-
r = cb.connection_test()
-
-
-
-
- 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.
-
-
r = cb.send_token('SENDER_PASSWORD','SENDER','RECEIVABLE',20)
-
-
-
-
- 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.
-
-
r = cb.send_token('SENDER_PASSWORD','SENDER','RECEIVABLE',20)
-
-
-
-
- name(str) : The user's did.
- l(str) : Optional,To set the real API link if it has been changed.
-
-
r = cb.get_balance('USERNAME')
-
-
-
-
- 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.
-
-
r = cb.create_did('DID','PASSWORD')
-
-
-
-
- hash_(str) : The public key of user's did.
- l(str) : Optional,To set the real API link if it has been changed.
-
-
r = cb.get_did('HASH_VALUE')
-
-
-
-
- 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.
-
-
r = cb.verify_token('DID','PASSWORD','HASH_VALUE')
-
-
-
-
- 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.
-
-
r = cb.remove_layer1('DID','PASSWORD','HASH_VALUE')
-
-
-
-
- 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.
-
-
r = cb.get_transactions_by_timestamp(0,10000000)
-
-
-
-
- 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.
-
-
r = cb.get_user_by_timestamp(0,10000000)
-
-
-
-
- l(str) : Optional,To set the real API link if it has been changed.
-
-
r = cb.get_info()
-
-
-
-
- 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.
-
-
r = cb.set_central_bank('DID','PASSWORD')
-
If you have any issues, please contact the information below.
- LINE : nus_jie
- Email : sefx5ever@gmail.com