Sign

Signs challenge transaction on user's side.

Sign Object

AttributeTypeDescription
seedStringUser private seed
xdrStringChallenge Transaction XDR
addressStringDApp public key

❗️

Secret Seeds

Make sure you keep all the secret seeds stored safely, extracting into ENV variables or equivalent. Keys present throughout the documentation only serve for example purposes and belong to an account in the Test network.

Methods

.call(seed, xdr address) ⇒ String

Constructor shortcut to call instance method.


#call(seed, xdr, address) ⇒ String

Adds signature to given transaction. Returns a Base64-encoded transaction envelope.

# User private seed
seed = "SCRBVUQF4N7JNXSEVQKZ4OEOEORC54BURPI3RCKN4FP3CO6AA7EZTJOA"

# DApp public key
address = "GASD34FQS3V54JK62YV4APLMTW56YW5YUFZWBVCCQ7Y5RSEQ6PLL5COZ"

# Challenge transaction
xdr = "AAAAAA...DbZlkH"

sign = Mobius::Client::Auth::Sign.call(seed, xdr, address)
# => "AAAAAA...w1zoIN"
// User private seed
const seed = 'SCRBVUQF4N7JNXSEVQKZ4OEOEORC54BURPI3RCKN4FP3CO6AA7EZTJOA';

// DApp public key
const address = 'GASD34FQS3V54JK62YV4APLMTW56YW5YUFZWBVCCQ7Y5RSEQ6PLL5COZ';

// Challenge transaction
const xdr = 'AAAAAA...DbZlkH';

const sign = Mobius.Auth.Sign.call(seed, xdr, address);
// => 'AAAAAA...w1zoIN'

📘

XDR Viewer

Click the links below to open the Stellar XDR Viewer for each one.

xdr
sign