Skip to content

bsn-si/sia-datawallet-extension

Repository files navigation

✨ ARC Data Wallet 👛

ARC Data Wallet is an easy way to use the SIA network for on-chain file storage with a ligt "wallet-like" browser extension. This solution enables private users to use the SIA storage network independently on any device without the need to download and sync the local SIA node. This project is developed under the SIA Foundation grant.

siaDataWallet final

This repository contains the ARC Data Wallet browser extension, it splits user's files into chunks, encrypts them with the user’s key and send them to the ARC Gateway for organizing storage in the SIA network.

Disclaimer

Thу work is in progress. You can see progress reports here.

Dependencies

Change in sia-lite-wallet-web-master:

Main net: https://api.siacentral.com/v2

Test net: https://api.siacentral.com/v2/zen

and rebuild:

nvm use 12.22.1

brew install [email protected]

~/.zshrc:
export GOPATH=$HOME/go
export GOROOT="/opt/homebrew/opt/[email protected]/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"

go mod download golang.org/x/net

make build

Copy sia-lite-wallet-web-master/src/sia/* to src/sia/.

Api generated from https://api.sia.tech/renterd using Postman to get the swagger.json file and then using swagger-typescript-api to generate the api.ts file.

npx swagger-typescript-api -p ./sia-data-wallet/src/services/openapi.yml -o ./sia-data-wallet/src/services -n api.ts --extract-response-error --extract-request-body --extract-request-params

renderd

./renterd --autopilot.scannerInterval=2m --autopilot.heartbeat=1m

Initial renterd setup:

curl -u ":test" -X PUT localhost:9880/api/bus/setting/redundancy --data '{
    "minShards": 1,
    "totalShards": 3
}'
curl -u ":test" -X PUT localhost:9880/api/autopilot/config --data '{  
"wallet": {  
"defragThreshold": 1000  
},  
"hosts": {  
"ignoreRedundantIPs": false,  
"scoreOverrides": {}  
},  
"contracts": {  
"set": "autopilot",  
"amount": 50,  
"allowance": "10000000000000000000000000000",  
"period": 6048,  
"renewWindow": 2016,  
"download": 1099511627776,  
"upload": 1099511627776,  
"storage": 1099511627776  
}  
}'
curl -u ":test" -X PUT localhost:9880/api/bus/setting/contractset --data '{  
"default": "autopilot"  
}'

.env file

BASE_URL=/
VITE_API_HOST=https://localhost:443
VITE_SIG_V2_SYMMETRIC=
VITE_SIG_V2_ASYMMETRIC=

##Related repos The ARC Gateway