Class: Stellar::Transaction
Instance Method Summary
collapse
#apply_defaults, #hash, #merge, #sign, #sign_decorated, #to_operations
Instance Method Details
#signature_base ⇒ Object
23
24
25
26
27
28
29
|
# File 'lib/stellar/transaction.rb', line 23
def signature_base
tagged_tx = Stellar::TransactionSignaturePayload::TaggedTransaction.new(:envelope_type_tx, self)
Stellar::TransactionSignaturePayload.new(
network_id: Stellar.current_network_id,
tagged_transaction: tagged_tx
).to_xdr
end
|
#to_envelope(*key_pairs) ⇒ Object
31
32
33
34
35
|
# File 'lib/stellar/transaction.rb', line 31
def to_envelope(*key_pairs)
signatures = key_pairs.map(&method(:sign_decorated))
TransactionEnvelope.v1(signatures: signatures, tx: self)
end
|
#to_v0 ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/stellar/transaction.rb', line 5
def to_v0
ed25519 = if source_account.switch == Stellar::CryptoKeyType.key_type_ed25519
source_account.ed25519!
else
source_account.med25519!.ed25519
end
TransactionV0.new(
source_account_ed25519: ed25519,
seq_num: seq_num,
operations: operations,
fee: fee,
memo: memo,
time_bounds: cond.v2&.time_bounds || cond.time_bounds,
ext: ext
)
end
|