You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$didData = DidData::fromBuffer($uint8Array); // See above code block
136
+
137
+
$keyData = $didData->keyData;
113
138
114
-
Note: This project is in alpha, the code to generate instructions is still being worked on `$instruction = SystemProgram::abc()`
139
+
$binaryString = pack('C*', ...$keyData);
140
+
141
+
$b58 = new Base58();
142
+
$base58String = $b58->encode($binaryString);
143
+
$didData->keyData = $base58String;
144
+
return $didData;
145
+
}
146
+
```
147
+
148
+
## Notes:
149
+
150
+
- Most of the Magic is done in the [BorshDesealizable.php](https://github.com/Attestto-com/solana-php-sdk/blob/master/src/Borsh/BorshDeserializable.php) Trait.
151
+
- This project is in alpha, the code to generate instructions is still being worked on `$instruction = SystemProgram::abc()`
152
+
- This project is maintained by a single dev, so any feedback, ideas, comments are appreciated.
115
153
116
154
## Roadmap (WIP)
117
155
@@ -124,7 +162,14 @@ Note: This project is in alpha, the code to generate instructions is still being
124
162
2. Better cache `$recentBlockhash` when sending transactions.
125
163
6. Suggestions? Open an issue or PR :D
126
164
127
-
## Testing
165
+
## Testing & Code Coverage
166
+
167
+
WIP -- Working on coverage and deprecations. See [Coverage Report](https://app.codecov.io/github/Attestto-com/solana-php-sdk).
I actually installed the CLI long time ago but never used it and tried with no luck to get things working using Vanilla JS and the Web3.js in intermittent attempts. ( hint: It doesn't work because the Web3.js package uses node.js libraries, as far as I know )
8
+
9
+
So, why is it needed?
10
+
11
+
Answer: Because the browser wallets provide very limited functionality when using them in DEV mode.
12
+
13
+
## Getting Started
14
+
15
+
#### 1- **Install a FileSystem Wallet (DEVNET)**[Docs](https://docs.solanalabs.com/cli/wallets/paper)
16
+
17
+
DO NOT do this for a Mainnet wallet as your keys would be residing in the Filesystem. You need to provide a valid URL, custom RPCs are not supported ( not recognized )
18
+
19
+
```bash
20
+
solana config set --url https://api.devnet.solana.com
21
+
```
22
+
23
+
#### 2- Fund the Wallet with more than SOL:
24
+
25
+
The following cmd generates a new keypair and stores it in the following path by default: _/Users/[yourUser]/.config/solana/id.json_
-[Devnet SOL (wSOL](https://explorer.solana.com/address/So11111111111111111111111111111111111111112?cluster=devnet): So11111111111111111111111111111111111111112
0 commit comments