Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #68 Mirror golang namespace structure #70

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
89b3fa2
[libpy][test] refs #7 Added test cipher.address tests/test_cipher…
kseraph Jul 13, 2018
441b353
Merge branch 'develop' of https://github.com/skycoin/pyskycoin into s…
kseraph Jul 13, 2018
bfa3713
[libpy][test] refs #7 Finish cipher.address and added ci[her.crypto …
kseraph Jul 17, 2018
b725d9e
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Jul 18, 2018
264c3c9
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
Jul 18, 2018
0525602
[libpy] refs #7 Fixing cipher_address to get == =====================…
Jul 18, 2018
4c1626a
[libpy][test] refs #7 Added test the cipher/crypto tests/test_cipher_…
kseraph Jul 19, 2018
67a427d
[libpy][test] refs #7 Added cipher/hash ============================…
Jul 19, 2018
737c0cf
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
Jul 19, 2018
37a1f03
[libpy][test] refs #7 Added test the cipher/scrypt update ciphertest_…
kseraph Jul 19, 2018
9a5016d
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
Jul 19, 2018
69e6a9a
[libpy][test] refs #7 Added skyerror.py 32 passed in 8.83 seconds
Jul 19, 2018
07fed3a
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Jul 19, 2018
8ca1617
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
Jul 19, 2018
f69d091
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
Jul 19, 2018
399a254
[libpy][test] refs #7 update test the cipher/scrypt
kseraph Jul 19, 2018
002d0ae
[libpy][test] refs #7 merge stdevKoky89_t7_libpyskycoin_test 62 passe…
Jul 19, 2018
c51be35
[libpy][test] refs #7 fixed not found utils 62 passed in 18.86 seconds
Jul 19, 2018
c661cc2
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
Jul 20, 2018
e44823c
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
kseraph Jul 20, 2018
6f7271a
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
Jul 20, 2018
046a51b
[libpy][test] refs #7 update test addres - scrypt, finished crypto, a…
kseraph Jul 20, 2018
63dcd60
[libpy][test] refs #7 Added test_TestSHA256Null 66 passed in 17.43 se…
Jul 20, 2018
95016ab
[libpy][test] refs #7 Added tests/test_cipher_secp256k1_secp256k1-go2…
Jul 20, 2018
de8ff49
[travis] refs #7 Change .travis.yml
Jul 20, 2018
5a54566
[travis] refs #7 push test
Jul 20, 2018
db028cf
[travis] refs #7 reset .travis
Jul 20, 2018
edbf0d1
[travis] refs #7 put the travis by default
Jul 20, 2018
c433549
Merge branch 'stdevEclipse_t44_comparison_methods' of https://github.…
Jul 21, 2018
ffc1aed
[libpy][test] refs #7 Added test_cipher_secp256k1_secp256k1-go2_xyz a…
Jul 21, 2018
d810d29
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 21, 2018
f27ca5f
[libpy][test] refs #7 Repair error in travis
Jul 21, 2018
6aa17d1
Merge branch 'develop' of https://github.com/skycoin/pyskycoin into s…
Jul 21, 2018
6701b09
[libpy][test] refs #7 Added test coin/math and finish 71 passed in 19…
Jul 22, 2018
ee8ddea
[libpy][test] refs #7 Repair error in travis https://travis-ci.org/si…
Jul 22, 2018
e02d7d4
[libpy][test] refs #7 Added utils transutil.py 71 passed in 23.63 sec…
Jul 22, 2018
5040569
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 22, 2018
53dc97b
Merge branch 'stdevHan_t7_libpy_test' of https://github.com/simelo/py…
kseraph Jul 22, 2018
b32a3e7
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 22, 2018
42cdb11
[libpy][test] refs #7 Changes in transutil.py 72 passed in 23.31 seconds
Jul 23, 2018
966a957
Merge branch 'stdevHan_t7_libpy_test' of https://github.com/simelo/py…
kseraph Jul 23, 2018
a0c294f
[libpy][test] refs #7 Added tests/test_cipher_sig 77 passed in 37.89 …
kseraph Jul 23, 2018
062e690
[libpy][test] refs #7 merge stdevEclipse_t51_typemaps
Jul 23, 2018
d3f68b0
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 23, 2018
37a6ddc
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Jul 23, 2018
7fe6338
[libpy][test] refs #7 merge stdevEclipse_t51_typemaps
Jul 23, 2018
00fb9d6
[libpy][test] refs #7 Added tests/test_cipher_ec 79 passed in 38.00 s…
kseraph Jul 23, 2018
0a371fd
[libpy][test] refs #7 change submodulo version
Jul 23, 2018
4882c4e
[libpy][test] refs #7 merge stdevEclipse_t51_typemaps 76 passed in 1…
Jul 24, 2018
ab1dccc
[libpy][test] refs #7 change index submodule
Jul 24, 2018
4b18b20
[libpy][test] refs #7 added skycoin.py
Jul 24, 2018
7eac7d7
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 24, 2018
becff92
Merge branch 'stdevHan_t7_libpy_test' of https://github.com/simelo/py…
stdevKoky Jul 24, 2018
50831b0
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 24, 2018
cd63286
[libpy][test] refs #7 Added tests/test_scrypt_chacha20poly1305_test 8…
stdevKoky Jul 25, 2018
13351a2
[libpy][test] refs #7 Changes in transutils 80 passed in 24.51 seconds
Jul 25, 2018
92a0697
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Jul 26, 2018
af3d6ea
[libpy][test] refs #7 Update test_ec and tests/test_cipher_sig resolv…
stdevKoky Jul 26, 2018
db5336c
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Jul 27, 2018
2c97de1
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 27, 2018
03e376d
[libpy][test] refs #7 Added TestTransactionVerify and repair transuti…
Jul 27, 2018
37ae763
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 27, 2018
91b03ef
[libpy][test] refs #7 Added tests/test_coin_outputs 84 passed in 37.6…
stdevKoky Jul 27, 2018
f5de0e8
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 27, 2018
ae55962
[libpy][test] refs #7 Added SKY_BAD_HANDLE to skyerror.py
Jul 27, 2018
efaa13f
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
stdevKoky Jul 27, 2018
4a3f9a2
[libpy][test] refs #7 Repair error in travis 88 passed in 26.88 seconds
Jul 27, 2018
7f44edf
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 27, 2018
8d896e8
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Jul 27, 2018
f84ee65
[libpy][test] refs #7 Added test TestTransactionVerifyInput in coin_T…
Jul 28, 2018
6c3bd31
[libpy][test] refs #7 Added test TestTransactionPushOutput, TestTrans…
Jul 28, 2018
b7decb9
[libpy][test] refs #7 update tests/test_coin_outputs 89 passed in 37.…
stdevKoky Jul 28, 2018
2eff594
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 29, 2018
55f4503
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Jul 29, 2018
a85c412
[libpy][test] refs #7 Added tests in coin/transaction
Jul 29, 2018
27400c8
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
stdevKoky Jul 29, 2018
7a8ef38
Merge branch 'stdevHan_t7_libpy_test' of https://github.com/simelo/py…
stdevKoky Jul 29, 2018
f8fa27d
Merge branch 'develop' of https://github.com/skycoin/pyskycoin into s…
Jul 29, 2018
ddedb8b
[libpy][test] refs #7 Added test TestTransactionOutputHours && test_T…
Jul 30, 2018
3f8b1a7
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 30, 2018
1cc8c2f
Merge branch 'stdevEclipse_t51_typemaps' of https://github.com/simelo…
Jul 30, 2018
2b7291c
Merge branch 'develop' of https://github.com/skycoin/pyskycoin into s…
Jul 31, 2018
aae0e5d
Merge branch 'stdevEclipse_t56_typemaps' of https://github.com/simelo…
Jul 31, 2018
6cb3271
Merge branch 'stdevEclipse_t56_typemaps' of https://github.com/simelo…
Jul 31, 2018
4d89639
[libpy][test] refs #7 Added function equalTransactions in transutils …
Jul 31, 2018
9122d59
Merge branch 'stdevHan_t7_libpy_test' of https://github.com/simelo/py…
stdevKoky Jul 31, 2018
b34a6c6
[libpy][test] refs #7 Added function TestVerifyTransactionCoinsSpendi…
Jul 31, 2018
70aee18
[libpy][test] refs #7 Added test TestVerifyTransactionHoursSpending i…
Aug 2, 2018
31fd384
Merge branch 'stdevEclipse_t56_typemaps' of https://github.com/simelo…
Aug 3, 2018
10d65fa
[libpy][test] refs #7 Rename function
Aug 3, 2018
d98c525
Merge branch 'stdevHan_t7_libpy_test' of https://github.com/simelo/py…
stdevKoky Aug 3, 2018
d964c93
[libpy][test] refs #7 TestTransactionsFees 107 passed in 27.10 seconds
Aug 3, 2018
cdec46e
[pyskycoin] refs #63 - Update version number. Remove Known Issue from…
Aug 3, 2018
36eabf1
[pyskycoin] refs #63 - Update submodule. Rename of function SKY_coin_…
Aug 3, 2018
0f39f6f
[pyskycoin] refs #63 - Update version number to 0.25 to update test.PYPI
Aug 3, 2018
60b153a
Merge branch 'stdevEclipse_t63_version' of https://github.com/simelo/…
Aug 3, 2018
14df730
[test][libpy] refs #7 merge in develop
Aug 4, 2018
0e68f59
[pyskycoin] refs #63 - Update submodule. Apply handle typemap to Addr…
Aug 6, 2018
f3fc6e4
[pyskycoin] refs #63 - Update submodule. Added type cipher_Addresses.…
Aug 6, 2018
7900673
[pyskycoin] refs #63 - Update submodule
Aug 6, 2018
066d300
[pyskycoin] refs #63 - Fix bug in tests due to changes in submodule
Aug 6, 2018
917293a
[libpy][test] refs #7 update
stdevKoky Aug 6, 2018
79cab56
[libpy][test] refs #7 update update tests/test_coin_outputs 115 passe…
stdevKoky Aug 8, 2018
a0122a1
Merge remote branch 'develop' into stdevEclipse_t63_version
stdevStark Aug 9, 2018
9cbff45
refs #63 - s/\t/ /g
stdevStark Aug 9, 2018
8d9c4e0
refs #63 - Sync submodules
stdevStark Aug 10, 2018
644018e
Merge remote-tracking branch 'desarrollo/stdevEclipse_t63_version' in…
Aug 12, 2018
2d0d7c5
[pyskycoin] refs #63 - Updated submodule, fixed error in function SKY…
Aug 13, 2018
f65b8d2
Merge with remote
Aug 13, 2018
a45ff2c
[libpy][test] refs #7 update 120 passed in 41.14 seconds
stdevKoky Aug 13, 2018
9b9afeb
[test][libpy][error] refs #7 Added errors in libpy
Aug 13, 2018
8aa74cf
[test][libpy][error] refs #7 Correcting tests/test_coin_transaction.p…
Aug 13, 2018
1449e48
[libpy][test] refs #7 update equalizer 120 passed in 41.14 seconds
stdevKoky Aug 13, 2018
f7b5976
Merge in stdevKoky89_t7_libpyskycoin_test
Aug 13, 2018
27f1ec9
[libpy][test] refs #7 update equalizer 120 passed in 41.14 seconds
stdevKoky Aug 13, 2018
95f2149
Merge in stdevEclipse_t63_version
Aug 13, 2018
21ea4a8
Merge in stdevKoky89_t7_libpyskycoin_test
Aug 13, 2018
1fb2b40
[libpy][test] refs #7 update equalizer 115 passed in 43.66 seconds
stdevKoky Aug 13, 2018
8586824
[libpy][test] refs #7 add test/test_coin_coin 119 passed in 42.07 sec…
stdevKoky Aug 14, 2018
26fccab
[libpy][test] refs #7 merge stdevHan_t7_libpy_test
stdevKoky Aug 14, 2018
3f32a8d
Added test tests/test_cipher_secp256k1_secp256.py 142 passed in 39.56…
Aug 14, 2018
eb409b7
[libpy][test] refs #7 add test/test_cipher_encrypt_sha256xor and upda…
stdevKoky Aug 14, 2018
449eca0
[libpy][test] refs #7 update test/test_cipher_encrypt_sha256xor 120 p…
stdevKoky Aug 14, 2018
3b122ff
[libpy] refs #7 Change in transutil
Aug 15, 2018
b37bf59
[libpy][test] refs #7 Correcting test/test_cipher_encrypt_sha256xor 1…
stdevKoky Aug 15, 2018
4f58bc1
Merge remote-tracking branch 'desarrollo/stdevKoky89_t7_libpyskycoin_…
Aug 15, 2018
a446d11
[libpy] refs #7 merge in simelo/stdevKoky89_t7_libpyskycoin_test
Aug 15, 2018
3e1b941
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Aug 15, 2018
53955cf
[libpy] refs #7 Repair error in travis 145 passed in 42.53 seconds
Aug 15, 2018
4484a82
[libpy] refs #7 Finish coin 149 passed in 43.14 seconds
Aug 15, 2018
730c543
[libpy][test] refs #7 add test/test_testsuite 122 passed in 41.77 sec…
stdevKoky Aug 18, 2018
7ce8104
[libpy][test] Added test droplet and fee 154 passed in 40.78 seconds
Aug 19, 2018
c7e63c2
[libpy][test] Repair error in travis 154 passed in 40.78 seconds
Aug 19, 2018
d14b2d5
[libpy] Repair errors in SKY_fee_TransactionFee
Aug 20, 2018
25f5156
[libpy] refs #7 Repair error in python 154 passed in 51.35 seconds
Aug 20, 2018
855e5ea
[libpy] refs #7 Added modific in libc
Aug 20, 2018
a3f5316
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Aug 21, 2018
3692a4d
[libpy][test] refs #7 test/test_cipher_address setup and test_simple
stdevKoky Aug 23, 2018
f2267ff
[libpy][test] refs #7 solved test/test_cipher_address
stdevKoky Aug 23, 2018
4d84937
[libpy][test] refs #7 add tests/test_testsuite_test 58.12 seconds
stdevKoky Aug 24, 2018
6e53342
[libpy][test] refs #7 solved the problem with python3x tests/test_tes…
stdevKoky Aug 24, 2018
8c001f4
Merge branch 'stdevHan_t7_libpy_test' of https://github.com/simelo/py…
stdevKoky Aug 24, 2018
c040115
[libpy][test] refs #7 reviewing the tests 157 passed in 74.74 seconds
stdevKoky Aug 24, 2018
a80df0c
Merge branch 'stdevKoky89_t7_libpyskycoin_test' of https://github.com…
Aug 29, 2018
78eecdb
[libpy][test] refs #7 merge stdevKoky89_t7_libpyskycoin_test 157 pass…
Aug 29, 2018
408c083
[libpy][test] Repair errors by https://github.com/skycoin/pyskycoin/p…
Aug 30, 2018
9a617d2
[libpy][test] refs #68 add namespace structure 18 passed in 13.01 sec…
stdevKoky Sep 3, 2018
59c94e6
[libpy][test] refs #68 modifying the text with the new syntax 59 pass…
stdevKoky Sep 3, 2018
c987021
[libpy][test] refs #68 rename syntax 93 passed in 63.59 seconds
stdevKoky Sep 4, 2018
e6112cd
[libpy][test] refs #68 rename syntax
stdevKoky Oct 11, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Known issues

- Pip tool for python3.4 is is not compatible with Debian's openssl package, so, python3.4 is installed without pip.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ build-swig:
sed -i 's/#/%/g' $(LIBSWIG_DIR)/structs.i ;\
fi \
}
rm -f ./skycoin/skycoin.py
rm -f ./skycoin/libpy/skycoin.py
rm -f swig/pyskycoin_wrap.c
swig -python -Iswig/include -I$(INCLUDE_DIR) -outdir ./skycoin/ -o swig/pyskycoin_wrap.c $(LIBSWIG_DIR)/skycoin.i
mkdir -p ./skycoin/libpy/
touch ./skycoin/libpy/__init__.py
swig -python -Iswig/include -I$(INCLUDE_DIR) -outdir ./skycoin/libpy/ -o swig/pyskycoin_wrap.c $(LIBSWIG_DIR)/skycoin.i

develop:
$(PYTHON_BIN) setup.py develop
Expand Down
2 changes: 1 addition & 1 deletion gopath/src/github.com/skycoin/skycoin
Submodule skycoin updated 368 files
11 changes: 4 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ def build_extension(self, ext):
stdout, stderr = make_process.communicate()
print("stdout:")
sys.stderr.write(str(stdout))
if len(stderr) > 0:
print("stderr:")
sys.stderr.write(str(stderr))
# After making the library build the c library's
# python interface with the parent build_extension method
super(skycoin_build_ext, self).build_extension(ext)
Expand All @@ -76,13 +73,13 @@ def build_extension(self, ext):
library_file = path.join(lib_path, 'libskycoin.a')
extra_link_args = []
if platform.system() == "Darwin":
extra_link_args += ["-framework", "Foundation", "-framework", "Security"]
extra_link_args += ["-framework", "Foundation", "-framework", "Security"]
extra_link_args.append(library_file)

setup(
name='Pyskycoin', # Required
version='0.24.4', # Required
description='Skycoin Python Library',
name='Pyskycoin', # Required
version='0.25.0', # Required
description='Skycoin Python Library',
long_description=long_description,
url='https://github.com/simelo/pyskycoin',
author='stdevEclipse', # Optional
Expand Down
10 changes: 8 additions & 2 deletions skycoin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
from .skycoin import *
from .skyerror import *
from .skyerror import *
import cipher
import base58
import secp256k1go
import encrypt
import scrypt
import secp256k1
import coin
8 changes: 8 additions & 0 deletions skycoin/base58.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# import skycoin
from .libpy import *

def String2Hex(cadena):
return skycoin.SKY_base58_String2Hex(cadena)

def Hex2Base58(cadena):
return skycoin.SKY_base58_Hex2Base58(cadena)
146 changes: 146 additions & 0 deletions skycoin/cipher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
from libpy import skycoin

def PubKey():
return skycoin.cipher_PubKey()

def SecKey():
return skycoin.cipher_SecKey()

def Address():
return skycoin.cipher__Address()

def AddressFromPubKey(public_key, addres):
return skycoin.SKY_cipher_AddressFromPubKey(public_key, addres)

def NewPubKey(hex_str, public_key):
return skycoin.SKY_cipher_NewPubKey(hex_str, public_key)

def NewSecKey(hex_str, secret_key):
return skycoin.SKY_cipher_NewSecKey(hex_str, secret_key)

def PubKeyFromSecKey(secret_key, public_key):
return skycoin.SKY_cipher_PubKeyFromSecKey(secret_key, public_key)

def GenerateKeyPair(public_key, secret_key):
return skycoin.SKY_cipher_GenerateKeyPair(public_key, secret_key)

def TestSecKey(secret_key):
return skycoin.SKY_cipher_TestSecKey(secret_key)

def SHA256():
return skycoin.cipher_SHA256()

def SumSHA256(text, sha):
return skycoin.SKY_cipher_SumSHA256(text, sha)

def TestSecKeyHash(secret_key, sha):
return skycoin.SKY_cipher_TestSecKeyHash(secret_key, sha)

def AddressVerify(address, public_key):
return skycoin.SKY_cipher_Address_Verify(address, public_key)

def DecodeBase58Address(cadena, address):
return skycoin.SKY_cipher_DecodeBase58Address(cadena, address)

def AddressBytes(address):
return skycoin.SKY_cipher_Address_Bytes(address)

def AddressString(address):
return skycoin.SKY_cipher_Address_String(address)

def AddressFromBytes(byte, address):
return skycoin.SKY_cipher_AddressFromBytes(byte, address)

def AddressBitcoinBytes(address):
return skycoin.SKY_cipher_Address_BitcoinBytes(address)

def BitcoinAddressFromBytes(byte, address):
return skycoin.SKY_cipher_BitcoinAddressFromBytes(byte, address)

def PubKeyHex(public_key):
return skycoin.SKY_cipher_PubKey_Hex(public_key)

def BitcoinAddressFromPubkey(public_key):
return skycoin.SKY_cipher_BitcoinAddressFromPubkey(public_key)

def SecKeyFromHex(cadena, secret_key):
return skycoin.SKY_cipher_SecKeyFromHex(cadena, secret_key)

def BitcoinWalletImportFormatFromSeckey(secret_key):
return skycoin.SKY_cipher_BitcoinWalletImportFormatFromSeckey(secret_key)

def SecKeyFromWalletImportFormat(wip_1, secret_key):
return skycoin.SKY_cipher_SecKeyFromWalletImportFormat(wip_1, secret_key)

def SecKeyHex(secret_key):
return skycoin.SKY_cipher_SecKey_Hex(secret_key)

def RandByte(rang):
return skycoin.SKY_cipher_RandByte(rang)

def GenerateDeterministicKeyPair(data, public_key, secret_key):
return skycoin.SKY_cipher_GenerateDeterministicKeyPair(data, public_key, secret_key)

def AddressNull(address):
return skycoin.SKY_cipher_Address_Null(address)

def PubKeyVerify(public_key):
return skycoin.SKY_cipher_PubKey_Verify(public_key)

def SecKeyVerify(secret_key):
return skycoin.SKY_cipher_SecKey_Verify(secret_key)

def ECDH(public_key_2, secret_key_1):
return skycoin.SKY_cipher_ECDH(public_key_2, secret_key_1)

def Sig():
return skycoin.cipher_Sig()

def NewSig(data, sig):
return skycoin.SKY_cipher_NewSig(data, sig)

def SignHash(sha_sum, secret_key_1, sig_1):
return skycoin.SKY_cipher_SignHash(sha_sum, secret_key_1, sig_1)

def ChkSig(addres, sha_sum, sig_1):
return skycoin.SKY_cipher_ChkSig(addres, sha_sum, sig_1)

def PubKeyFromSig(sig_1, sha_sum, public_key_2):
return skycoin.SKY_cipher_PubKeyFromSig(sig_1, sha_sum, public_key_2)

def VerifySignature(public_key, sig_1, sha_sum_1):
return skycoin.SKY_cipher_VerifySignature(public_key, sig_1, sha_sum_1)

def GenerateDeterministicKeyPairsSeed(seed, num):
return skycoin.SKY_cipher_GenerateDeterministicKeyPairsSeed(seed, num)

def Ripemd160():
return skycoin.cipher_Ripemd160()

def HashRipemd160(p0, p1):
return skycoin.SKY_cipher_HashRipemd160(p0, p1)

def Ripemd160Set(h, b):
return skycoin.SKY_cipher_Ripemd160_Set(h, b)

def SHA256Set(h, b):
return skycoin.SKY_cipher_SHA256_Set(h, b)

def SHA256Hex(h):
return skycoin.SKY_cipher_SHA256_Hex(h)

def SHA256FromHex(p0, p1):
return skycoin.SKY_cipher_SHA256FromHex(p0, p1)

def DoubleSHA256(b, h):
return skycoin.SKY_cipher_DoubleSHA256(b, h)

def AddSHA256(p0, p1, p2):
return skycoin.SKY_cipher_AddSHA256(p0, p1, p2)

def SHA256Xor(p0, p1, p2):
return skycoin.SKY_cipher_SHA256_Xor(p0, p1, p2)

def SHA256Null(p0):
return skycoin.SKY_cipher_SHA256_Null(p0)

142 changes: 142 additions & 0 deletions skycoin/coin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
from .libpy import *

def CreateTransactions():
return skycoin.SKY_coin_Create_Transactions()

def TransactionsAdd(txns, txn):
return skycoin.SKY_coin_Transactions_Add(txns, txn)

def NewEmptyBlock(transactions):
return skycoin.SKY_coin_NewEmptyBlock(transactions)

def GetBlockObject(block):
return skycoin.SKY_coin_GetBlockObject(block)

def GetBlockBody(block):
return skycoin.SKY_coin_GetBlockBody(block)

def BlockBodyHash(body, bodyhash):
return skycoin.SKY_coin_BlockBody_Hash(body, bodyhash)

def NewBlock( p0, p1, p2, p3, p4):
return skycoin.SKY_coin_NewBlock( p0, p1, p2, p3, p4)

def BlockHashHeader(block, hash1):
return skycoin.SKY_coin_Block_HashHeader(block, hash1)

def BlockHeaderHash(Head, hash2):
return skycoin.SKY_coin_BlockHeader_Hash(Head, hash2)

def BlockHashBody(block, hash1):
return skycoin.SKY_coin_Block_HashBody(block, hash1)

def NewGenesisBlock(address, genCoins, genTime):
return skycoin.SKY_coin_NewGenesisBlock(address, genCoins, genTime)

def BlockHeaderBytes(head):
return skycoin.SKY_coin_BlockHeader_Bytes(head)

def TransactionPushOutput(handle, address, p0, p1):
return skycoin.SKY_coin_Transaction_PushOutput(handle, address, p0, p1)

def UxOut():
return skycoin.coin__UxOut()

def BlockHeader():
return skycoin.coin__BlockHeader()

def CreateUnspent(bh, handle, index, ux):
return skycoin.SKY_coin_CreateUnspent(bh, handle, index, ux)

def CreateUnspents(bh, txn):
return skycoin.SKY_coin_CreateUnspents(bh, txn)

def TransactionsGetAt(handle, p1):
return skycoin.SKY_coin_Transactions_GetAt(handle, p1)

def GetTransactionObject(tx1):
return skycoin.SKY_coin_GetTransactionObject(tx1)

def CreateTransaction():
return skycoin.SKY_coin_Create_Transaction()

def UxOutHash(ux, h):
return skycoin.SKY_coin_UxOut_Hash(ux, h)

def TransactionPushInput(handle, h):
return skycoin.SKY_coin_Transaction_PushInput(handle, h)

def TransactionSignInputs(handle, secKeys):
return skycoin.SKY_coin_Transaction_SignInputs(handle, secKeys)

def TransactionUpdateHeader(handle):
return skycoin.SKY_coin_Transaction_UpdateHeader(handle)

def UxBody():
return skycoin.coin__UxBody()

def UxHead():
return skycoin.coin__UxHead()

def Transaction():
return skycoin.coin__Transaction()

def TransactionsLength(handle):
return skycoin.SKY_coin_Transactions_Length(handle)

def TransactionCopy(handle):
return skycoin.SKY_coin_Transaction_Copy(handle)

def TransactionVerify(handle2):
return skycoin.coin_Transaction_Verify(handle2)

def AddUint64(p0, p1):
return skycoin.SKY_coin_AddUint64(p0, p1)

def Uint64ToInt64(s):
return skycoin.SKY_coin_Uint64ToInt64(s)

def Int64ToUint64(s):
return skycoin.SKY_coin_Int64ToUint64(s)

def SHA256():
return skycoin.cipher_SHA256()

def UxBodyHash(uxb, hashx):
return skycoin.SKY_coin_UxBody_Hash(uxb, hashx)

def UxOutSnapshotHash(uxo, hn):
return skycoin.SKY_coin_UxOut_SnapshotHash(uxo, hn)

def UxOutCoinHours(uxo, now):
return skycoin.SKY_coin_UxOut_CoinHours(uxo, now)

def UxArrayCoins(uxa):
return skycoin.SKY_coin_UxArray_Coins(uxa)

def UxArrayCoinHours(uxa, num):
return skycoin.SKY_coin_UxArray_CoinHours(uxa, num)

def UxArrayHashes(uxa):
return skycoin.SKY_coin_UxArray_Hashes(uxa)

def UxArrayHasDupes(uxa):
return skycoin.SKY_coin_UxArray_HasDupes(uxa)

def UxArraySub(uxc, uxa):
return skycoin.SKY_coin_UxArray_Sub(uxc, uxa)

def UxArrayLess(uxa, p0, p1):
return skycoin.SKY_coin_UxArray_Less(uxa, p0, p1)

def UxArraySwap(uxa, p0, p1):
return skycoin.SKY_coin_UxArray_Swap(uxa, p0, p1)

def NewAddressUxOuts(uxa):
return skycoin.SKY_coin_NewAddressUxOuts(uxa)

def AddressUxOutsKeys(uxH):
return skycoin.SKY_coin_AddressUxOuts_Keys(uxH)

def AddressUxOutsSet(uxH,uxa_Body_Address,ux_2):
return skycoin.SKY_coin_AddressUxOuts_Set(uxH,uxa_Body_Address,ux_2)
16 changes: 16 additions & 0 deletions skycoin/encrypt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from libpy import skycoin

def Sha256XorEncrypt(data, cadena):
return skycoin.SKY_encrypt_Sha256Xor_Encrypt(data, cadena)

def Sha256XorDecrypt(p0, p1):
return skycoin.SKY_encrypt_Sha256Xor_Decrypt(p0, p1)

def ScryptChacha20poly1305():
return skycoin.encrypt__ScryptChacha20poly1305()

def ScryptChacha20poly1305Encrypt(crypt, plaintext, passwd):
return skycoin.SKY_encrypt_ScryptChacha20poly1305_Encrypt(crypt, plaintext, passwd)

def ScryptChacha20poly1305Decrypt(crypt, encrypto, password):
return skycoin.SKY_encrypt_ScryptChacha20poly1305_Decrypt(crypt, encrypto, password)
Empty file added skycoin/libpy/__init__.py
Empty file.
Loading