This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import './index.css' | |
class Main extends React.Component { | |
constructor() { | |
super() | |
} | |
render() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 0; | |
font-family: sans-serif; | |
text-align: center; | |
} | |
button { | |
border-radius: 10px; | |
padding: 20px; | |
color: white; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To configure new ERC721 assets | |
async displayBlueprint() { | |
const cert = new Cert({ | |
schema: schema88 | |
}) | |
const asset = { | |
description: 'A lighthouse watercolor picture', | |
image: 'https://upload.wikimedia.org/wikipedia/commons/a/a3/Taran_Lighthouse_Kalinigrad_Oblast_Tatiana_Yagunova_Watercolor_painting.jpg', | |
name: 'Lighthouse Watercolor' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import './index.css' | |
import { MetamaskProvider } from '@0xcert/ethereum-metamask-provider' | |
import { schema88 } from '@0xcert/conventions' | |
import { Cert } from '@0xcert/cert' | |
import { AssetLedger, AssetLedgerCapability } from '@0xcert/ethereum-asset-ledger' | |
// Assets Ledgers are groups of tokens that are managed by certain users just like mods in a chat to do what's required | |
// The Capabilities determine what those mods can do with the assets they are managing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { MetamaskProvider } from '@0xcert/ethereum-metamask-provider' | |
import { schema88 } from '@0xcert/conventions' | |
import { Cert } from '@0xcert/cert' | |
// Assets Ledgers are groups of tokens that are managed by certain users just like mods in a chat to do what's required | |
// The Capabilities determine what those mods can do with the assets they are managing | |
// The Ethereum address that deploys this ledger has full powers to do whatever he wants as the administrator | |
import { AssetLedger, AssetLedgerCapability } from '@0xcert/ethereum-asset-ledger' | |
import './index.css' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"path":[ | |
], | |
"nodes":[ | |
{ | |
"index":1, | |
"hash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$evidence": "https://raw.githubusercontent.com/merlox/art-marketplace/master/evidence.json", | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"$name": "Lighthouse Watercolor", | |
"$image": "https://upload.wikimedia.org/wikipedia/commons/a/a3/Taran_Lighthouse_Kalinigrad_Oblast_Tatiana_Yagunova_Watercolor_painting.jpg" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To create a new asset ledger containing several assets and managed by several individuals | |
// The asset ledger is mandatory to create new assets since they need a place to be stored, they can't exist without a ledger | |
async deployNewLedger() { | |
let deployedLedger = {} | |
// The required keys are name, symbol, uriBase and schemaId | |
const recipe = { | |
name: 'Art Piece', | |
symbol: 'ART', | |
uriBase: 'www.example.com/tokenMetadata/', // This is a demonstration, you have to setup a server for generating tokens to this URI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { MetamaskProvider } from '@0xcert/ethereum-metamask-provider' | |
import { schema88 } from '@0xcert/conventions' | |
import { Cert } from '@0xcert/cert' | |
// Assets Ledgers are groups of tokens that are managed by certain users just like mods in a chat to do what's required | |
// The Capabilities determine what those mods can do with the assets they are managing | |
// The Ethereum address that deploys this ledger has full powers to do whatever he wants as the administrator | |
import { AssetLedger, AssetLedgerCapability } from '@0xcert/ethereum-asset-ledger' | |
import './index.css' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { MetamaskProvider } from '@0xcert/ethereum-metamask-provider' | |
import { schema88 } from '@0xcert/conventions' | |
import { Cert } from '@0xcert/cert' | |
// Assets Ledgers are groups of tokens that are managed by certain users just like mods in a chat to do what's required | |
// The Capabilities determine what those mods can do with the assets they are managing | |
// The Ethereum address that deploys this ledger has full powers to do whatever he wants as the administrator | |
import { AssetLedger, AssetLedgerCapability } from '@0xcert/ethereum-asset-ledger' | |
import './index.css' |