0.0.10 ā€¢ Published 1 year ago

@usher.so/datamodels v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@usher.so/datamodels - Ceramic Data Models for Usher

Getting Started

  1. Install the Glaze CLI - yarn global add @glazed/cli
  2. Fetch the DID Key from your Team Lead

Models

magic-wallets

  • Schema:
  • Definition: k3y52l7qbv1fry9ckuzglu1tqo69m7or7qwayc09i8njfrddsit05acie3ys02zgg
    {
    	"name": "A magic wallet",
    	"description": "A magic wallet associated to a DID",
    	"schema": "ceramic://k3y52l7qbv1fry3dgjlthkoygw6a8p50cjth9texpv1looy8umrbbkrpnrbjj80sg"
    }

Deploying Models

glaze model:deploy magic-wallets ./models/MagicWallet.json

Updating Models

As per this Discord Message, Schema Documents are Streams, so it's just be a matter of applying a new commit using the TileDocument.update(). Glaze does not currently support this natively. The commit updates to a schema should have backward compatibility -- based on logic.

glaze stream:state kjzl6cwe1jw14a4khio3qvh7jen9decdi4xgvg3xivzo5ms2cig6h7l7rx2tfct                                                                                                         03:03:19 pm
āœ” Successfully queried stream kjzl6cwe1jw14a4khio3qvh7jen9decdi4xgvg3xivzo5ms2cig6h7l7rx2tfct
{
  type: 0,
  content: {
    type: 'object',
    title: 'MagicWallets',
    '$schema': 'http://json-schema.org/draft-07/schema#',
    properties: {
      arweave: {
        type: 'object',
        title: 'arweave',
        properties: {
          data: { type: 'string', title: 'data' },
          address: { type: 'string', title: 'address' }
        }
      }
    }
  },
  metadata: {
    unique: 'YuG5O0/EWtisz+no',
    controllers: [ 'did:key:z6MkwVNrdkjiAzEFoWVq9J1R28gyUpA3Md7Bdx8DaABhQzVX' ]
  },
  signature: 2,
  anchorStatus: 0,
  log: [
    {
      cid: CID(bagcqceraykyfiubvaascq26dtg4rfdukuh3h6imoku6p2vuebeckdmsszd6q),
      type: 0
    }
  ]
}

Executing Commands

Running commands directly requires the following:

node --experimental-specifier-resolution=node --loader ts-node/esm ./cmd/arcampaigns.ts ls

The reason is because the core depedencies are ESM-only.

0.0.3

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.2

1 year ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago