- NodeJS v16
- jq
- postgresql
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/ceramicstudio/wheel/main/wheel.sh | bash
// using yarn
yarn add @dsafe/sdk
// using npm
npm install @dsafe/sdk
Note: Ensure, the ceramic node is clean and have no previous deployment of composites.
// Install
npm install -g @ceramicnetwork/cli
// run
ceramic daemon // node starts at: http://localhost:7007
- Deploy composites
yarn publish --environment [dev|staging|prod] --private-key [value] --ceramic-url [value]
// help
yarn publish --help
- Run GraphQL server
yarn schema run start:graphql --ceramic-url <url> --path <file_path> --private-key <key> [--port <port_number>]
// help
yarn schema run start:graphql --help
- Copy, create
.env
file from.env.example
and set all the environment variables
PRIVATE_KEY=
- Update following variables in Secrets file to add your safe
SAFE_ADDRESS= // set your safe address on sepolia
TEST_ACCOUNT = // set your wallet address // the address that is owned by private key set in envioronment
TEST_SAFE= // set your safe address on sepolia - Same as SAFE_ADDRESS
- Update the trxInput.nonce in
secrets.ts
file.
trxInput.nonce = // latest unused nonce of your test safe on sepolia
- Run test
yarn sdk run test
- Coverage
yarn sdk run coverage
// clone using ssh
git clone git@github.com:daoism-systems/dSafe-SDK.git
// clone using https
git clone https://github.com/daoism-systems/dSafe-SDK.git
// using yarn
yarn install
// using npm
npm install
import DSafe from '@dsafe/sdk'
// instantiae
const dsafe = new DSafe()
const apiRoute = '/about/'
const response: AxiosResponse = await dsafe.fetchLegacy('GET', apiRoute)
// ... do something with response
- Handle
get safe data
andget all owners of safe
to sync with Safe API and save all the existing owners to the dSafe as well. - Use better coverage tool to ensure the test coverage isn't counting certain imports as well as exports as untested.
- If a safe have more than one owner and few owners haven't interacted with dSafe at all, then dSafe will not be able to ever know about those owners.
- If a nonce have already been used, then tests will fail as Safe doesn't allow to use nonce which have already been used or nonce that is not latest nonce.