Skip to content

tjvsx/ipfs-pilets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Store Dapplets on IPFS

Example usage:

yarn dapplet-push <build-file-path>

So, in the root of your dapplet file...

  1. create the build file ...
rm -rf ./dist && pilet build && pilet pack --target ./dist
  1. push files to ipfs
yarn dapplet-push ./dist/counter-1.0.1.tgz

This will publish the files into a hash-linked ipfs folder like:

  • IPFS CID Qm..
    • PiletMetadata object
      • meta.link CID Qm..
        • build files (index.js, .css, etc)

Extra details:

PiletMetadata types:

interface PiletApiResponse {
  items: Array<PiletMetadata>;
}

interface PiletMetadataV0 {
  name: string;
  version: string;
  content?: string;
  link?: string;
  hash: string;
  noCache?: boolean | string;
  custom?: any;
  config?: Record<string, any>;
  dependencies?: Record<string, string>;
}

interface PiletMetadataV1 {
  name: string;
  version: string;
  link: string;
  requireRef: string;
  integrity?: string;
  custom?: any;
  config?: Record<string, any>;
  dependencies?: Record<string, string>;
}

interface PiletMetadataV2 {
  name: string;
  version: string;
  link: string;
  requireRef: string;
  integrity?: string;
  spec: 'v2';
  custom?: any;
  config?: Record<string, any>;
  dependencies?: Record<string, string>;
}

type PiletMetadata = PiletMetadataV0 | PiletMetadataV1 | PiletMetadataV2;

see Piral Feed Spec for more info.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published