@@ -40,7 +40,7 @@ Signs and sends a transaction to the Solana blockchain.
40
40
- Type: ` object `
41
41
- Properties:
42
42
- ` signature `
43
- - Description: The transaction signature.
43
+ - Description: The base58 encoded transaction signature.
44
44
- Type: ` string `
45
45
46
46
### Examples
@@ -121,9 +121,9 @@ Signs a transaction to the Solana blockchain.
121
121
"method" : " signTransaction" ,
122
122
"params" : {
123
123
"account" : {
124
- "address" : " GM4iccdbdSF1qN3Bqmdksfk7iuxYhWzC8T3XbizStAdE "
124
+ "address" : " FDUGdV6bjhvw5gbirXCvqbTSWK9999kcrZcrHoCQzXJK "
125
125
},
126
- "transaction" : " MTIzNDU2Nzg5MDIzMzQzNDM1NDM =" ,
126
+ "transaction" : " AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQACBJmwAo+dnq8yhuKR7QpXgj+5yPFMzVwViEudWE9Z+N903bOu6UdCGJS9VyhRo8wvswWSAO709XY+51AU1MALO6wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAAdazMubIOjxUiTY/+xWYNSffhgTb7vd9LWQ0sI2iMMSoCAwAFAiwBAAACAgABDAIAAABAQg8AAAAAAAA =" ,
127
127
"scope" : " solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" ,
128
128
"options" : {
129
129
"preflightCommitment" : " confirmed" ,
@@ -137,13 +137,15 @@ Signs a transaction to the Solana blockchain.
137
137
138
138
``` json
139
139
{
140
- "signedTransaction" : " MTIzNDU2Nzg5MDIzMzQzNDM1NDM2NDU2NTM0 "
140
+ "signedTransaction" : " AchmhyZwTxtSzYoT9A89g0ttVuYx9yDzk8Ykw35yM2XuGwzv/8qwg8My2yAWI1Ai3PGMN1VioGZFl4LDIEtDKw6AAQACBJmwAo+dnq8yhuKR7QpXgj+5yPFMzVwViEudWE9Z+N903bOu6UdCGJS9VyhRo8wvswWSAO709XY+51AU1MALO6wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAAdazMubIOjxUiTY/+xWYNSffhgTb7vd9LWQ0sI2iMMSoCAwAFAiwBAAACAgABDAIAAABAQg8AAAAAAAA= "
141
141
}
142
142
```
143
143
144
144
## [ signMessage] ( https://github.com/anza-xyz/wallet-standard/blob/master/packages/core/features/src/signMessage.ts#L4 )
145
145
146
- Signs a message to the Solana blockchain.
146
+ Signs the provided base64 encoded message using the provided account's private key.
147
+
148
+ It signs the base64 encoded message, ** NOT** the original message, meaning that the signature must be verified using the base64 encoded message as well.
147
149
148
150
### [ Parameters] ( https://github.com/anza-xyz/wallet-standard/blob/master/packages/core/features/src/signMessage.ts#L27 )
149
151
@@ -167,7 +169,7 @@ Signs a message to the Solana blockchain.
167
169
- Type: ` object `
168
170
- Properties:
169
171
- ` signature ` (required)
170
- - Description: The base64 encoded message signature.
172
+ - Description: The base58 encoded message signature.
171
173
- Type: ` string `
172
174
- ` signedMessage ` (required)
173
175
- Description: The base64 encoded signed message.
@@ -187,7 +189,7 @@ Signs a message to the Solana blockchain.
187
189
"account" : {
188
190
"address" : " GM4iccdbdSF1qN3Bqmdksfk7iuxYhWzC8T3XbizStAdE"
189
191
},
190
- "message" : " 1234567890 "
192
+ "message" : " SGVsbG8sIHdvcmxkIQ== " // "Hello, world!" in base64
191
193
}
192
194
}
193
195
```
@@ -196,15 +198,17 @@ Signs a message to the Solana blockchain.
196
198
197
199
``` json
198
200
{
199
- "signature" : " 1234567890 " ,
200
- "signedMessage" : " MTIzNDU2Nzg5MA ==" ,
201
+ "signature" : " 2n1rfebBmxvRd6MMdDdV5V9Hyy34FRBgVc6EFGjH78fNUW2Fz6RgkMwpHwLGFVQS2BBDkHV38FuKdavSF2GTo5gq " ,
202
+ "signedMessage" : " SGVsbG8sIHdvcmxkIQ ==" , // "Hello, world!" in base64
201
203
"signatureType" : " ed25519"
202
204
}
203
205
```
204
206
205
207
## [ signIn] ( https://github.com/anza-xyz/wallet-standard/blob/master/packages/core/features/src/signIn.ts#L4 )
206
208
207
- Signs in to the Solana blockchain.
209
+ Receives a sign in intent object that contains data like domain, or URI, then converts it into a message using ` JSON.stringify() ` , then signs the message.
210
+
211
+ Signature verification must be done against the JSON.
208
212
209
213
### [ Parameters] ( https://github.com/anza-xyz/wallet-standard/blob/master/packages/core/features/src/signIn.ts#L27 )
210
214
@@ -262,10 +266,10 @@ Signs in to the Solana blockchain.
262
266
- Description: The address of the account.
263
267
- Type: ` string `
264
268
- ` signedMessage ` (required)
265
- - Description: Message bytes that were signed. The wallet may prefix or otherwise modify the message before signing it .
269
+ - Description: The provided intent object that was JSON.stringified and base64 encoded. Perform signature verifications against this string .
266
270
- Type: ` string `
267
271
- ` signature ` (required)
268
- - Description: The base64 encoded message signature. If the signature type is provided, the signature must be Ed25519.
272
+ - Description: The base58 encoded message signature. If the signature type is provided, the signature must be Ed25519.
269
273
- Type: ` string `
270
274
- ` signatureType ` (optional)
271
275
- Description: The type of signature. If not provided, the signature must be Ed25519.
@@ -279,7 +283,13 @@ Signs in to the Solana blockchain.
279
283
{
280
284
"method" : " signIn" ,
281
285
"params" : {
282
- "domain" : " example.com"
286
+ "address" : " 27h6cm6S9ag5y4ASi1a1vbTSKEsQMjEdfvZ6atPjmbuD" ,
287
+ "domain" : " example.com" ,
288
+ "statement" : " I accept the terms of service" ,
289
+ "uri" : " https://example.com" ,
290
+ "version" : " 1" ,
291
+ "chainId" : " solana:101" ,
292
+ "nonce" : " 123"
283
293
}
284
294
}
285
295
```
@@ -289,10 +299,10 @@ Signs in to the Solana blockchain.
289
299
``` json
290
300
{
291
301
"account" : {
292
- "address" : " GM4iccdbdSF1qN3Bqmdksfk7iuxYhWzC8T3XbizStAdE "
302
+ "address" : " 27h6cm6S9ag5y4ASi1a1vbTSKEsQMjEdfvZ6atPjmbuD "
293
303
},
294
- "signedMessage" : " MTIzNDU2Nzg5MA== " ,
295
- "signature" : " 1234567890 " ,
304
+ "signedMessage" : " eyJhZGRyZXNzIjoiMjdoNmNtNlM5YWc1eTRBU2kxYTF2YlRTS0VzUU1qRWRmdlo2YXRQam1idUQiLCJkb21haW4iOiJleGFtcGxlLmNvbSIsInN0YXRlbWVudCI6IkkgYWNjZXB0IHRoZSB0ZXJtcyBvZiBzZXJ2aWNlIiwidXJpIjoiaHR0cHM6Ly9leGFtcGxlLmNvbSIsInZlcnNpb24iOiIxIiwiY2hhaW5JZCI6InNvbGFuYToxMDEiLCJub25jZSI6IjEyMyJ9 " ,
305
+ "signature" : " 3WiRaNnVAbrYWd4MT7rkq8oBC52HrbLZDst1K2ErAUiXswJu9aBZUMgKZpm581VV8Df6BDmgYGLRP7GcWE8mxMD9 " ,
296
306
"signatureType" : " ed25519"
297
307
}
298
308
```
0 commit comments