nnsdaosdkbasic

This SDK provides the basic functionality to build a DAO, which can be imported and used.To use it, you need to implement DaoCustomFn Trait and customize the business logic.

Documentation Crates.io License Downloads

Documentation: - API reference (docs.rs)

Usage

Add this to your Cargo.toml:

toml [dependencies] nnsdao_sdk_basic = "0.1.0"

```rust

[derive(Clone, Debug, Default, CandidType, Deserialize)]

struct CustomFn{}

[async_trait]

impl DaoCustomFn for CustomFn { async fn ismember(&self, _member: Principal) -> Result { Ok(true) } async fn handleproposal(&self) -> Result<(), String> { Ok(()) } } let daobasic = DaoBasic::new(CustomFn::default()); daobasic.get_proposal(1); ```

License

nnsdaosdkbasic is distributed under the terms of both the MIT license.

See LICENSE.