solana-studio 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6298dedd5eff0a7e2c908b874052c189c7084964bf98fa660e99bb2c3a02a3ed
|
|
4
|
+
data.tar.gz: 89dc78d9370c93ef76a58f936c4285b08336c06a0651e17b246cff26e6563af5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e50c4f0545d30084afc32da7e1c44a370e122da1beeed22627f2e4aa3aae109fbcc47918a93383504015342c52b6c596e97f49419457e0da9330beeafeff0f2c
|
|
7
|
+
data.tar.gz: 8769de22b4f7ec6d27f3136b65a7459ea871032571d451d52de45f07fcf5de8b11bd756090a3095c5286f04032b0d45299b4db438e14f1f288b5fff772903b5a
|
|
@@ -134,7 +134,10 @@
|
|
|
134
134
|
url: t.url.method(walletKey, method, {
|
|
135
135
|
dappPublicKey: journal.dappPublicKey,
|
|
136
136
|
nonce: sealed.nonce,
|
|
137
|
-
|
|
137
|
+
// The caller's value wins when present, but a resume has no caller —
|
|
138
|
+
// it runs on a page the wallet sent us to. The journal is the fallback
|
|
139
|
+
// that makes the second hop possible at all.
|
|
140
|
+
redirectLink: opts.redirectLink || journal.redirectLink,
|
|
138
141
|
payload: sealed.payload,
|
|
139
142
|
useScheme: opts.useScheme
|
|
140
143
|
}),
|
|
@@ -142,6 +145,7 @@
|
|
|
142
145
|
dappSecretKey: journal.dappSecretKey,
|
|
143
146
|
dappPublicKey: journal.dappPublicKey,
|
|
144
147
|
walletPublicKey: journal.walletPublicKey,
|
|
148
|
+
redirectLink: opts.redirectLink || journal.redirectLink,
|
|
145
149
|
session: journal.session,
|
|
146
150
|
intent: opts.intent || journal.intent || null
|
|
147
151
|
})
|
|
@@ -187,9 +191,15 @@
|
|
|
187
191
|
cluster: opts.cluster,
|
|
188
192
|
useScheme: opts.useScheme
|
|
189
193
|
}),
|
|
194
|
+
// redirectLink IS TRIP STATE, not call state. The hop AFTER this one
|
|
195
|
+
// runs in a different document — often reached by the wallet, not by
|
|
196
|
+
// us — and it needs the same return address. Capturing only what the
|
|
197
|
+
// next LINE uses is what lost it; the journal exists precisely for
|
|
198
|
+
// what the whole trip needs.
|
|
190
199
|
journal: newJournal(walletKey, 'connect', {
|
|
191
200
|
dappSecretKey: t.base58.encode(pair.secretKey),
|
|
192
201
|
dappPublicKey: dappPublicKey,
|
|
202
|
+
redirectLink: opts.redirectLink,
|
|
193
203
|
intent: opts.intent || null
|
|
194
204
|
})
|
|
195
205
|
};
|
|
@@ -292,11 +292,39 @@
|
|
|
292
292
|
return parts.join('&');
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
+
// A REQUEST WITH NOWHERE TO RETURN IS NOT A REQUEST, and until this existed it
|
|
296
|
+
// was possible to build one and impossible to notice. query() below SKIPS
|
|
297
|
+
// null/undefined/empty values, so a missing redirect_link simply vanished from
|
|
298
|
+
// the URL and the request looked perfectly well formed on the way out. Phantom
|
|
299
|
+
// received it, had nothing to do with it, and opened to its HOME SCREEN — which
|
|
300
|
+
// is indistinguishable, to a user, from the app being broken.
|
|
301
|
+
//
|
|
302
|
+
// Measured on a real iPhone against QA 2026-09-09: hop one (connect) completed
|
|
303
|
+
// correctly and hop two was built with redirect_link undefined, because the
|
|
304
|
+
// journal never carried it across the page death. The entry was lost after the
|
|
305
|
+
// user had already approved it.
|
|
306
|
+
//
|
|
307
|
+
// Guarding at the BUILDER rather than at each call site is the point. There are
|
|
308
|
+
// three places that construct these URLs today and more will follow; a rule
|
|
309
|
+
// enforced where the string is assembled cannot be forgotten by the next one.
|
|
310
|
+
function requireField(value, name, method) {
|
|
311
|
+
if (value === null || value === undefined || value === '') {
|
|
312
|
+
throw new Error(
|
|
313
|
+
'Cannot build a ' + method + ' wallet request without ' + name +
|
|
314
|
+
' — the wallet would have nowhere to return to. This usually means the ' +
|
|
315
|
+
'value was not carried across the redirect in the journal.'
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
return value;
|
|
319
|
+
}
|
|
320
|
+
|
|
295
321
|
var url = {
|
|
296
322
|
// connect carries NO nonce and NO payload — the shared secret does not exist
|
|
297
323
|
// yet. Every other method requires both.
|
|
298
324
|
connect: function (wallet, opts) {
|
|
299
325
|
var b = base(wallet, opts && opts.useScheme);
|
|
326
|
+
requireField(opts && opts.redirectLink, 'redirect_link', 'connect');
|
|
327
|
+
requireField(opts && opts.dappPublicKey, 'dapp_encryption_public_key', 'connect');
|
|
300
328
|
return b.prefix + 'connect?' + query({
|
|
301
329
|
app_url: opts.appUrl,
|
|
302
330
|
dapp_encryption_public_key: opts.dappPublicKey,
|
|
@@ -310,6 +338,10 @@
|
|
|
310
338
|
throw new Error(wallet + ' does not support ' + method + ' over the redirect transport');
|
|
311
339
|
}
|
|
312
340
|
var b = base(wallet, opts && opts.useScheme);
|
|
341
|
+
requireField(opts && opts.redirectLink, 'redirect_link', method);
|
|
342
|
+
requireField(opts && opts.dappPublicKey, 'dapp_encryption_public_key', method);
|
|
343
|
+
requireField(opts && opts.payload, 'payload', method);
|
|
344
|
+
requireField(opts && opts.nonce, 'nonce', method);
|
|
313
345
|
return b.prefix + method + '?' + query({
|
|
314
346
|
dapp_encryption_public_key: opts.dappPublicKey,
|
|
315
347
|
nonce: opts.nonce,
|
|
@@ -16,5 +16,5 @@ module SolanaStudio
|
|
|
16
16
|
# through the normal cycle. Splitting the version out is the same shape
|
|
17
17
|
# studio-engine already uses (lib/studio/version.rb) and hands each file back
|
|
18
18
|
# to its real owner: this one to the release, the gemspec to the PR.
|
|
19
|
-
VERSION = "0.9.
|
|
19
|
+
VERSION = "0.9.3"
|
|
20
20
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solana-studio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex McRitchie
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ed25519
|