Overview
Adds account as cosigner to other account.
AddCosigner Object
Attribute | Type | Description |
---|---|---|
keypair | Stellar::Keypair | Account keypair |
cosigner | Stellar::Keypair | Cosigner account keypair |
weight | Integer | Cosigner weight, default: 1 |
Methods
.call(keypair, cosigner, weight)
Constructor shortcut to instance method.
#call
Executes the operation, adding account as cosigner to the other account.
# User Keypair from seed
user_seed = "SCRBVUQF4N7JNXSEVQKZ4OEOEORC54BURPI3RCKN4FP3CO6AA7EZTJOA"
user_keypair = Mobius::Client::Blockchain::KeyPairFactory.produce(user_seed)
# Dapp Keypair from public key
gdapp = "GASD34FQS3V54JK62YV4APLMTW56YW5YUFZWBVCCQ7Y5RSEQ6PLL5COZ"
dapp_keypair = Mobius::Client::Blockchain::KeyPairFactory.produce(gdapp)
#
sign = Mobius::Client::Blockchain::AddCosigner.call(user_ keypair, dapp_keypair)
# =>
<Hyperclient::Resource self_link:nil attributes:#
<Hyperclient::Attributes:0x00007f01b820ddf0
@collection{
"hash"=>"e3a30f...434940",
"ledger"=>9844732,
"envelope_xdr"=>"AAAAAN...XYXAM=",
"result_xdr"=>"AAAAAA...AAAAA=",
"result_meta_xdr"=>"AAAAAA...AAAAA="}>>
XDR Viewer