forked from ton-blockchain/ton
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
// Copyright 2023 Disintar LLP / [email protected] | ||
|
||
|
||
#include "third-party/pybind11/include/pybind11/pybind11.h" | ||
#include "vm/vm.h" | ||
|
||
namespace py = pybind11; | ||
|
||
|
||
#ifndef TON_PYCELL_H | ||
#define TON_PYCELL_H | ||
|
||
|
@@ -22,6 +25,7 @@ class PyCell { | |
std::string dump() const; | ||
std::string dump_as_tlb(std::string tlb_type) const; | ||
std::string to_boc() const; | ||
py::bytes to_slice() const; | ||
PyCell copy() const; | ||
bool is_null() const; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
// Copyright 2023 Disintar LLP / [email protected] | ||
|
||
#include "third-party/pybind11/include/pybind11/pybind11.h" | ||
#include <vector> | ||
#include <string.h> | ||
#include "tonlib/tonlib/keys/Mnemonic.h" | ||
|
||
namespace py = pybind11; | ||
|
||
#ifndef TON_PYKEYS_H | ||
#define TON_PYKEYS_H | ||
|
||
|
@@ -13,6 +16,7 @@ class PyPublicKey { | |
PyPublicKey(std::string key_int); | ||
PyPublicKey(td::Ed25519::PublicKey key_) : key(std::move(key_)){}; | ||
std::string get_public_key_hex(); | ||
std::tuple<bool, std::string> verify_signature(char *data, char *signature); | ||
|
||
PyPublicKey(const PyPublicKey& other) : key(td::Ed25519::PublicKey(other.key.as_octet_string())){}; | ||
}; | ||
|
@@ -25,6 +29,7 @@ class PyPrivateKey { | |
PyPrivateKey(td::Ed25519::PrivateKey key_) : key(td::Ed25519::PrivateKey(key_.as_octet_string())){}; | ||
std::string get_private_key_hex(); | ||
PyPublicKey get_public_key(); | ||
py::bytes sign(char* data); | ||
}; | ||
|
||
class PyMnemonic { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters