Generates challenge transaction on developer's side.
Challenge Object
Attribute | Type | Description |
---|---|---|
seed | String | DApp private seed |
expire_in | Seconds | Challenge time bounds. 1 day by default. |
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, expire_in = 1d) ⇒ Object
Generates challenge transaction signed by developers secret seed. Minimum valid time bound is set to current time. Maximum valid time bound is set to expire_in
seconds from now.
expire_in
is optional, 1 day by default.
sdapp = "SBBT7NRAKW43LN6ZGSZI37HEJDYWOC62LIZUL35KHO6NI2SKJLEPVAY4"
# You can use either the class method shortcut or the instance method.
challenge = Mobius::Client::Auth::Challenge.call(sdapp, 12.hours)
# =>
"AAAAAL...EnB3MF"
const sdapp = 'SBBT7NRAKW43LN6ZGSZI37HEJDYWOC62LIZUL35KHO6NI2SKJLEPVAY4';
const challengeExpiresIn = 172800; // 2 days || default = 1 day
const challenge = Mobius.Auth.Challenge.call(sdapp, challengeExpiresIn);
// => 'AAAAAL...EnB3MF'
XDR Viewer
Click the links below to open the Stellar XDR Viewer for each one.
#call() ⇒ Object
Returns base64-encoded transaction envelope.
challenge = Mobius::Client::Auth::Challenge.new(sdapp)
#<Mobius::Client::Auth::Challenge:0x00007fe6143ab8d8
@seed="SBBT7NRAKW43LN6ZGSZI37HEJDYWOC62LIZUL35KHO6NI2SKJLEPVAY4">
challenge.call(12.hours)
# =>
"AAAAAH...Op1j4C"
XDR Viewer
Click the links below to open the Stellar XDR Viewer for each one.