sidan-gin 0.1.1__py3-none-any.whl → 0.1.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sidan-gin might be problematic. Click here for more details.

Files changed (41) hide show
  1. sidan_gin/__init__.py +2 -1
  2. sidan_gin/encryption/__init__.py +3 -0
  3. sidan_gin/encryption/cipher.py +127 -0
  4. sidan_gin/python_signing_module/.git +1 -0
  5. sidan_gin/python_signing_module/.gitignore +11 -0
  6. sidan_gin/python_signing_module/.vscode/settings.json +32 -0
  7. sidan_gin/python_signing_module/Cargo.lock +1914 -0
  8. sidan_gin/python_signing_module/Cargo.toml +14 -0
  9. sidan_gin/python_signing_module/README.md +2 -0
  10. sidan_gin/python_signing_module/__init__.py +1 -0
  11. sidan_gin/python_signing_module/build.rs +9 -0
  12. sidan_gin/python_signing_module/build.sh +9 -0
  13. sidan_gin/python_signing_module/src/CardanoSigner.py +70 -0
  14. sidan_gin/python_signing_module/src/_CardanoSigner.cpython-311-x86_64-linux-gnu.so +0 -0
  15. sidan_gin/python_signing_module/src/__init__.py +0 -0
  16. sidan_gin/python_signing_module/src/build/lib.linux-x86_64-cpython-311/_CardanoSigner.cpython-311-x86_64-linux-gnu.so +0 -0
  17. sidan_gin/python_signing_module/src/build/temp.linux-x86_64-cpython-311/signer.o +0 -0
  18. sidan_gin/python_signing_module/src/build/temp.linux-x86_64-cpython-311/signer_wrap.o +0 -0
  19. sidan_gin/python_signing_module/src/cxx.h +1149 -0
  20. sidan_gin/python_signing_module/src/lib.rs +57 -0
  21. sidan_gin/python_signing_module/src/lib.rs.h +403 -0
  22. sidan_gin/python_signing_module/src/libsigner.a +0 -0
  23. sidan_gin/python_signing_module/src/setup.py +16 -0
  24. sidan_gin/python_signing_module/src/signer.cpp +73 -0
  25. sidan_gin/python_signing_module/src/signer.h +37 -0
  26. sidan_gin/python_signing_module/src/signer.i +16 -0
  27. sidan_gin/python_signing_module/src/signer_wrap.cxx +4092 -0
  28. sidan_gin/wallet/__init__.py +3 -0
  29. sidan_gin/wallet/cli.py +13 -0
  30. sidan_gin/wallet/derivation_indices.py +30 -0
  31. sidan_gin/wallet/mnemonic.py +24 -0
  32. sidan_gin/wallet/root_key.py +24 -0
  33. sidan_gin/wallet/wallet.py +48 -0
  34. sidan_gin-0.1.5.dist-info/METADATA +63 -0
  35. sidan_gin-0.1.5.dist-info/RECORD +47 -0
  36. {sidan_gin-0.1.1.dist-info → sidan_gin-0.1.5.dist-info}/WHEEL +1 -1
  37. sidan_gin/signing/__init__.py +0 -3
  38. sidan_gin/signing/wallet.py +0 -40
  39. sidan_gin-0.1.1.dist-info/METADATA +0 -33
  40. sidan_gin-0.1.1.dist-info/RECORD +0 -17
  41. {sidan_gin-0.1.1.dist-info → sidan_gin-0.1.5.dist-info}/LICENSE +0 -0
@@ -0,0 +1,14 @@
1
+ [package]
2
+ name = "signer"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+
6
+ [lib]
7
+ crate-type = ["staticlib"]
8
+
9
+ [dependencies]
10
+ cxx = "1.0"
11
+ whisky-wallet = "1.0.4"
12
+
13
+ [build-dependencies]
14
+ cxx-build = "1.0"
@@ -0,0 +1,2 @@
1
+ # python-signing-module
2
+ Python signing module, implementation in Rust, ported over to C++, then to Python.
@@ -0,0 +1 @@
1
+ from .src import CardanoSigner
@@ -0,0 +1,9 @@
1
+ #[allow(unused_must_use)]
2
+ fn main() {
3
+ cxx_build::bridge("src/lib.rs")
4
+ .warnings(false)
5
+ .extra_warnings(false)
6
+ .std("c++11")
7
+ .compile("signer-demo");
8
+ println!("cargo:rerun-if-changed=src/lib.rs");
9
+ }
@@ -0,0 +1,9 @@
1
+ cargo build
2
+ cp -f target/debug/libsigner.a src/libsigner.a
3
+ cp -f $(realpath target/cxxbridge/signer/src/lib.rs.h) src/lib.rs.h
4
+ cp -f $(realpath target/cxxbridge/rust/cxx.h) src/cxx.h
5
+ rm -rf target
6
+ swig -c++ -python src/signer.i
7
+ cd src
8
+ python setup.py build_ext --inplace
9
+ cd ..
@@ -0,0 +1,70 @@
1
+ # This file was automatically generated by SWIG (https://www.swig.org).
2
+ # Version 4.2.0
3
+ #
4
+ # Do not make changes to this file unless you know what you are doing - modify
5
+ # the SWIG interface file instead.
6
+
7
+ from sys import version_info as _swig_python_version_info
8
+ # Import the low-level C/C++ module
9
+ if __package__ or "." in __name__:
10
+ from . import _CardanoSigner
11
+ else:
12
+ import _CardanoSigner
13
+
14
+ try:
15
+ import builtins as __builtin__
16
+ except ImportError:
17
+ import __builtin__
18
+
19
+ def _swig_repr(self):
20
+ try:
21
+ strthis = "proxy of " + self.this.__repr__()
22
+ except __builtin__.Exception:
23
+ strthis = ""
24
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
25
+
26
+
27
+ def _swig_setattr_nondynamic_instance_variable(set):
28
+ def set_instance_attr(self, name, value):
29
+ if name == "this":
30
+ set(self, name, value)
31
+ elif name == "thisown":
32
+ self.this.own(value)
33
+ elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
34
+ set(self, name, value)
35
+ else:
36
+ raise AttributeError("You cannot add instance attributes to %s" % self)
37
+ return set_instance_attr
38
+
39
+
40
+ def _swig_setattr_nondynamic_class_variable(set):
41
+ def set_class_attr(cls, name, value):
42
+ if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
43
+ set(cls, name, value)
44
+ else:
45
+ raise AttributeError("You cannot add class attributes to %s" % cls)
46
+ return set_class_attr
47
+
48
+
49
+ def _swig_add_metaclass(metaclass):
50
+ """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
51
+ def wrapper(cls):
52
+ return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
53
+ return wrapper
54
+
55
+
56
+ class _SwigNonDynamicMeta(type):
57
+ """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
58
+ __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
59
+
60
+
61
+
62
+ def sign_mnemonic(mnemonic, derivation_path, tx_hex):
63
+ return _CardanoSigner.sign_mnemonic(mnemonic, derivation_path, tx_hex)
64
+
65
+ def sign_bech32(bech32, derivation_path, tx_hex):
66
+ return _CardanoSigner.sign_bech32(bech32, derivation_path, tx_hex)
67
+
68
+ def sign_cli(ed25519_key, tx_hex):
69
+ return _CardanoSigner.sign_cli(ed25519_key, tx_hex)
70
+
File without changes