Ejemplo n.º 1
0
builder_t_2_1 = Builder(secret=kp_a_2_seed,
                        sequence=starting_sequence_a_2+1)
builder_t_2_1.append_payment_op(
    kp_alice.address().decode(), COUNTERPRIZE, 'XLM')
builder_t_2_1.add_time_bounds(counter_tx_timebound)
t_2_1 = builder_t_2_1.gen_tx()
hash_t_2_1 = builder_t_2_1.gen_te().hash_meta()

builder_t_1_0 = Builder(secret=kp_a_1_seed)
builder_t_1_0.append_set_options_op(master_weight=255)
builder_t_1_0.append_set_options_op(med_threshold=2)
builder_t_1_0.append_set_options_op(high_threshold=254)
builder_t_1_0.append_pre_auth_tx_signer(hash_t_1_2, 1)
builder_t_1_0.append_pre_auth_tx_signer(hash_t_1_1, 1)
builder_t_1_0.append_hashx_signer(hash_x_a, 1)
builder_t_1_0.append_set_options_op(master_weight=0)
builder_t_1_0.sign()

builder_t_2_0 = Builder(secret=kp_a_2_seed)
builder_t_2_0.append_set_options_op(master_weight=255)
builder_t_2_0.append_set_options_op(med_threshold=2)
builder_t_2_0.append_set_options_op(high_threshold=254)
builder_t_2_0.append_pre_auth_tx_signer(hash_t_2_1, 1)
builder_t_2_0.append_pre_auth_tx_signer(hash_t_2_2, 1)
builder_t_2_0.append_hashx_signer(hash_x_b, 1)
builder_t_2_0.append_set_options_op(master_weight=0)
builder_t_2_0.sign()

print('Submitting t_1_0')
response = builder_t_1_0.submit()