コード例 #1
0
def get_address(public_key=None, private_key=None, chain_id=1, prefix="NULS"):
    if public_key is None:
        public_key = get_public_key(private_key=private_key)

    return address_from_hash(
        public_key_to_hash(public_key, chain_id=chain_id), prefix=prefix
    )
コード例 #2
0
async def get_address(pubkey, chain_id, prefix):
    phash = public_key_to_hash(pubkey, chain_id=chain_id)
    address = address_from_hash(phash, prefix=prefix)
    return address
コード例 #3
0
ファイル: nuls2.py プロジェクト: antonioandara/aleph-client
 def get_address(self):
     return address_from_hash(public_key_to_hash(self.get_public_key(),
                                                 chain_id=self.chain_id),
                              prefix=self.prefix)