Esempio n. 1
0
def test_create_from_seed() -> None:
    """Test creation with 32-byte secret seed."""
    seed = bytes([8] * 32)
    keypair = Keypair.from_seed(seed)
    assert str(keypair.public_key) == "2KW2XRd9kwqet15Aha2oK3tYvd3nWbTFH1MBiRAv1BE1"
    assert keypair.seed == seed
Esempio n. 2
0
def async_stubbed_sender() -> Keypair:
    """Another arbitrary known account to be used as sender."""
    return Keypair.from_seed(bytes([7] * PublicKey.LENGTH))
Esempio n. 3
0
def stubbed_sender_for_token() -> Keypair:
    """Arbitrary known account to be used as sender."""
    return Keypair.from_seed(bytes([2] * PublicKey.LENGTH))
Esempio n. 4
0
def stubbed_sender_cached_blockhash() -> Keypair:
    """Arbitrary known account to be used as sender."""
    return Keypair.from_seed(bytes([4] * PublicKey.LENGTH))
Esempio n. 5
0
def freeze_authority() -> Keypair:
    """Arbitrary known account to be used as freeze authority."""
    return Keypair.from_seed(bytes([6] * PublicKey.LENGTH))
Esempio n. 6
0
def async_stubbed_sender_prefetched_blockhash() -> Keypair:
    """Another arbitrary known account to be used as sender."""
    return Keypair.from_seed(bytes([5] * PublicKey.LENGTH))