nnsdao-kit 1.2.1
Install from the command line:
Learn more about npm packages
$ npm install @nnsdao/nnsdao-kit@1.2.1
Install via package.json:
"@nnsdao/nnsdao-kit": "1.2.1"
About this version
Tag #dev
must provide
npm i https://github.com/NnsDao/nnsdao-kit.git#dev
npm i https://github.com/NnsDao/nnsdao-kit.git
Config registry
# .npmrc
@nnsdao:registry=https://registry.npmjs.org/
npm install @nnsdao/nnsdao-kit
Config registry
# .npmrc
@nnsdao:registry=https://npm.pkg.github.com
npm install @nnsdao/nnsdao-kit
details
// React Hooks
const verifyConnection = async () => {
const connected = await window.ic.plug.isConnected();
if (!connected) await window.ic.plug.requestConnect({ whitelist, host });
};
useEffect(async () => {
verifyConnection();
}, []);
import { idlFactory } from '@nnsdao/nnsdao-kit/market/index';
import type { _SERVICE } from '@nnsdao/nnsdao-kit/market/types';
Config Path alias at tsconfig.json
{
"compilerOptions": {
// xxx
"paths": {
"@nnsdao/nnsdao-kit/*": ["./node_modules/@nnsdao/nnsdao-kit/src/*"]
// WARNING
// if you already have @** config ,then @nnsdao must place before @/*
// such as
// "@nnsdao/nnsdao-kit/*": ["./node_modules/@nnsdao/nnsdao-kit/src/*"],
// "@/*": ["./src/*"],
}
}
}
TODO
- auto download candid ,binding to another language,update local file
Details
- nnsdao-kit
- NnsDao
- over 2 years ago
- MIT
- 8 dependencies
Assets
- nnsdao-kit-1.2.1.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0