Method: Stellar::Operation.set_options
- Defined in:
- lib/stellar/operation.rb
.set_options(set: [], clear: [], home_domain: nil, signer: nil, inflation_dest: nil, source_account: nil, **attributes) ⇒ Stellar::Operation
Set Options operation builder.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/stellar/operation.rb', line 71 def (set: [], clear: [], home_domain: nil, signer: nil, inflation_dest: nil, source_account: nil, **attributes) raise ArgumentError, "Bad inflation_dest" if inflation_dest && !inflation_dest.is_a?(KeyPair) op = SetOptionsOp.new( set_flags: Stellar::AccountFlags.make_mask(set), clear_flags: Stellar::AccountFlags.make_mask(clear), master_weight: attributes[:master_weight], low_threshold: attributes[:low_threshold], med_threshold: attributes[:med_threshold], high_threshold: attributes[:high_threshold], signer: signer, home_domain: home_domain, inflation_dest: inflation_dest&.account_id ) make(source_account: source_account, body: [:set_options, op]) end |