Skip to content

Commit

Permalink
Package program client
Browse files Browse the repository at this point in the history
  • Loading branch information
longxiaoLX committed Mar 17, 2024
1 parent 1e6903d commit a1ec379
Show file tree
Hide file tree
Showing 9 changed files with 774 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ANCHOR_PROVIDER_URL="http://localhost:8899"
ANCHOR_WALLET="/home/xiaolong/.config/solana/id.json"
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Device did

## In the localnet

- First change the .env file, we need to the `ANCHOR_WALLET` to our local config wallet:
```
ANCHOR_WALLET="/home/yourWalletConfig/.config/solana/id.json"
```

- Second, run `solana-test-validator` in a new terminal:
```
solana-test-validator -r
```

- Third, `anchor deploy` our program which in the `solana_device_id` directory to the localnet.
```
anchor depoly
```

- Fourth, run `device-did-run.ts`
```
ts-node device-did-run.ts
```
200 changes: 183 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dependencies": {
"@coral-xyz/anchor": "^0.29.0",
"@ethereumjs/util": "^9.0.2",
"dotenv": "^16.4.5",
"ethereum-cryptography": "^2.1.3"
},
"devDependencies": {
Expand All @@ -16,6 +17,7 @@
"mocha": "^9.0.3",
"prettier": "^2.6.2",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.2",
"typescript": "^4.3.5"
}
}
}
Loading

0 comments on commit a1ec379

Please sign in to comment.