Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spacebudz/spacebudz-identity
https://github.com/spacebudz/spacebudz-identity
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/spacebudz/spacebudz-identity
- Owner: spacebudz
- License: mit
- Created: 2022-05-19T11:03:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-20T09:37:01.000Z (over 2 years ago)
- Last Synced: 2024-09-02T00:54:18.137Z (5 months ago)
- Language: Haskell
- Size: 180 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SpaceBudz Identity
Personalize your SpaceBudz and give it an identity.
### Validity
The policy id for the identity tokens:
`e47f849c5262b93b46789251519ec0a7921087b84b3782b871497e8f`
### Usage
```js
import Identity from "@spacebudz/spacebudz-identity"const lucid = await Identity.Lucid.new(new Identity.Blockfrost("https://cardano-mainnet.blockfrost.io/api/v0", projectId));
const api = await window.cardano.nami.enable();
lucid.selectWallet(api);const contract = new Identity.Contract(lucid);
// Update the identity for SpaceBud #995
const txHash = await contract.updateIdentity(995, {nickname: "Berry"});await lucid.awaitTx(txHash);
const identity = await contract.getIdentity(995);
console.log(identity);
```### NPM
```
npm install @spacebudz/spacebudz-identity
```### From source
Install dependencies
```
npm install
```
Generate build
```
npm run build
```### Verify contract
- ghc >= 8.10.7
- cabal >= 3.0
- Install [custom libsodium](https://developers.cardano.org/docs/get-started/installing-cardano-node/#downloading--compiling)```
npm run build:contract
```
This will generate the serialized scripts under `./src/onchain/scripts.json`[How the contract works](./docs/README.md)
### Schema
All keys are optional
```json
{
"nickname": "string",
"urbit": ["urbit_id"],
"twitter": ["@profile"],
"discord": ["username"],
"email": ["email_address"],
"color": "string hex color"
}
```