Skip to content
Closed
Changes from all commits
Commits
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
89 changes: 89 additions & 0 deletions sdk/aleo.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
class Account:
@staticmethod
def from_private_key(private_key: PrivateKey) -> Account: ...
def private_key(self) -> PrivateKey: ...
def view_key(self) -> ViewKey: ...
def address(self) -> Address: ...
def sign(self, message: bytes) -> Signature: ...
def verify(self, signature: Signature, message: bytes) -> bool: ...
def decrypt(self, record_ciphertext: RecordCiphertext) -> RecordPlaintext: ...
def is_owner(self, record_ciphertext: RecordCiphertext) -> bool: ...

class Address:
@staticmethod
def from_string(s: str) -> Address: ...
def to_string(self) -> str: ...

class CoinbasePuzzle:
@staticmethod
def load() -> CoinbasePuzzle: ...
def verifying_key(self) -> CoinbaseVerifyingKey: ...

class CoinbaseVerifyingKey:
pass

class ComputeKey:
def address(self) -> Address: ...
def pk_sig(self) -> str: ...
def pr_sig(self) -> str: ...
def sk_prf(self) -> str: ...

class EpochChallenge:
@staticmethod
def from_json(json: str) -> EpochChallenge: ...
def to_json(self) -> str: ...

class PrivateKey:
def address(self) -> Address: ...
def compute_key(self) -> ComputeKey: ...
@staticmethod
def from_string(private_key: str) -> PrivateKey: ...
def seed(self) -> str: ...
def sign(self, message: bytes) -> Signature: ...
def sk_sig(self) -> str: ...
def r_sig(self) -> str: ...
def to_string(self) -> str: ...
def view_key(self) -> ViewKey: ...

class ProverSolution:
@staticmethod
def from_json(json: str) -> ProverSolution: ...
def to_json(self) -> str: ...
def address(self) -> Address: ...
def verify(self, verifying_key: CoinbaseVerifyingKey,
epoch_challenge: EpochChallenge, proof_target: int) -> bool: ...

class RecordCiphertext:
@staticmethod
def from_string(s: str) -> RecordCiphertext: ...
def to_string(self) -> str: ...
def decrypt(self, view_key: ViewKey) -> RecordPlaintext: ...
def is_owner(self, view_key: ViewKey) -> bool: ...

class RecordPlaintext:
@staticmethod
def from_string(s: str) -> RecordPlaintext: ...
def owner(self) -> str: ...
def nonce(self) -> str: ...
def serial_number_string(self, private_key: PrivateKey, program_id: str,
record_name: str) -> str: ...
def to_string(self) -> str: ...

class Signature:
def challenge(self) -> str: ...
def compute_key(self) -> ComputeKey: ...
@staticmethod
def from_string(s: str) -> Signature: ...
def response(self) -> str: ...
@staticmethod
def sign(private_key: PrivateKey, message: bytes) -> Signature: ...
def to_string(self) -> str: ...
def verify(self, address: Address, message: bytes) -> bool: ...

class ViewKey:
def decrypt(self, record_ciphertext: RecordCiphertext) -> RecordPlaintext: ...
@staticmethod
def from_string(s: str) -> ViewKey: ...
def is_owner(self, record_ciphertext: RecordCiphertext) -> bool: ...
def to_address(self) -> Address: ...
def to_string(self) -> str: ...