From 8e4c485186cb17ade8824e42b07ff0a6173d469e Mon Sep 17 00:00:00 2001 From: Kent Bull Date: Mon, 26 Aug 2024 14:53:59 -0600 Subject: [PATCH] deploy: with code example --- site/404.html | 2 +- site/assets/js/9c3d38a1.92de5875.js | 1 + site/assets/js/9c3d38a1.9dbcf339.js | 1 - ...eeb86.2375ecc8.js => cf1eeb86.98e7f5b2.js} | 2 +- ...fef06.efa026e2.js => e50fef06.4ed547b7.js} | 2 +- ...n.afb8bc39.js => runtime~main.9ee51d5c.js} | 2 +- site/blog/archive/index.html | 2 +- .../all-dave-grantham-articles/index.html | 2 +- .../all-sebastien-lorber-articles/index.html | 2 +- site/blog/authors/index.html | 2 +- site/blog/authors/kentbull/index.html | 2 +- site/blog/authors/yangshun/index.html | 2 +- site/blog/drand-greetings/index.html | 2 +- site/blog/first-blog-post/index.html | 2 +- site/blog/index.html | 2 +- site/blog/long-blog-post/index.html | 2 +- site/blog/mdx-blog-post/index.html | 2 +- site/blog/tags/docusaurus/index.html | 2 +- site/blog/tags/facebook/index.html | 2 +- site/blog/tags/hello/index.html | 2 +- site/blog/tags/hola/index.html | 2 +- site/blog/tags/index.html | 2 +- site/blog/welcome/index.html | 2 +- site/docs/about/1-0-about/index.html | 4 +- site/docs/about/1-1-governance/index.html | 4 +- .../10-about-what-is-drand/index.html | 2 +- .../20-concepts-getting-started/index.html | 2 +- .../category/30-developers-guide/index.html | 2 +- .../category/40-operators-guide/index.html | 2 +- .../category/50-drand-community/index.html | 2 +- site/docs/category/60-drand-faq/index.html | 2 +- site/docs/concepts/2-0-concepts/index.html | 2 +- .../2-1-concepts-cryptography/index.html | 2 +- .../2-2-concepts-security-model/index.html | 2 +- .../2-3-concepts-specification/index.html | 2 +- .../index.html | 2 +- site/docs/dev-guide/3-0-dev-guide/index.html | 2 +- .../3-1-dev-guide-organization/index.html | 2 +- .../3-2-dev-guide-drand-client-cli/index.html | 2 +- .../3-3-dev-guide-client-libraries/index.html | 2 +- .../3-4-dev-guide-http-api/index.html | 2 +- .../3-5-dev-guide-pubsub-network/index.html | 2 +- .../3-6-dev-guide-code-examples/index.html | 61 +++++++++++++++++-- .../5-0-drand-community/index.html | 2 +- .../index.html | 2 +- site/docs/drand-faq/6-0-drand-faq/index.html | 2 +- site/docs/home/index.html | 2 +- site/docs/ops-guide/4-0-ops-guide/index.html | 2 +- .../4-1-ops-guide-deployment/index.html | 2 +- .../4-2-ops-guide-docker-install/index.html | 2 +- .../4-3-ops-guide-storage-backends/index.html | 2 +- .../4-4-ops-guide-metrics-guide/index.html | 2 +- .../index.html | 2 +- site/index.html | 2 +- 54 files changed, 110 insertions(+), 59 deletions(-) create mode 100644 site/assets/js/9c3d38a1.92de5875.js delete mode 100644 site/assets/js/9c3d38a1.9dbcf339.js rename site/assets/js/{cf1eeb86.2375ecc8.js => cf1eeb86.98e7f5b2.js} (53%) rename site/assets/js/{e50fef06.efa026e2.js => e50fef06.4ed547b7.js} (86%) rename site/assets/js/{runtime~main.afb8bc39.js => runtime~main.9ee51d5c.js} (97%) diff --git a/site/404.html b/site/404.html index de3731a6..3bb523a0 100644 --- a/site/404.html +++ b/site/404.html @@ -5,7 +5,7 @@ Page Not Found | drand - + diff --git a/site/assets/js/9c3d38a1.92de5875.js b/site/assets/js/9c3d38a1.92de5875.js new file mode 100644 index 00000000..3f5bb86d --- /dev/null +++ b/site/assets/js/9c3d38a1.92de5875.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdrand_docs=self.webpackChunkdrand_docs||[]).push([[5081],{1586:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>t});var s=a(4848),d=a(8453);const r={id:"3-6-dev-guide-code-examples",title:"3.6 Code Examples",description:"Examples of how to integrate drand in various coding languages."},o="3.6 DevGuide: Code Examples",i={id:"dev-guide/3-6-dev-guide-code-examples",title:"3.6 Code Examples",description:"Examples of how to integrate drand in various coding languages.",source:"@site/docs/03_dev-guide/03-06-DevGuide_Code_Examples.md",sourceDirName:"03_dev-guide",slug:"/dev-guide/3-6-dev-guide-code-examples",permalink:"/drand-docs/docs/dev-guide/3-6-dev-guide-code-examples",draft:!1,unlisted:!1,editUrl:"https://github.com/kentbull/drand-docs/tree/main/docs/03_dev-guide/03-06-DevGuide_Code_Examples.md",tags:[],version:"current",frontMatter:{id:"3-6-dev-guide-code-examples",title:"3.6 Code Examples",description:"Examples of how to integrate drand in various coding languages."},sidebar:"docsSidebar",previous:{title:"3.5 PubSub Network",permalink:"/drand-docs/docs/dev-guide/3-5-dev-guide-pubsub-network"},next:{title:"4.0 OPERATORS GUIDE",permalink:"/drand-docs/docs/category/40-operators-guide"}},c={},t=[{value:"Golang",id:"golang",level:2},{value:"JavaScript",id:"javascript",level:2}];function l(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"36-devguide-code-examples",children:"3.6 DevGuide: Code Examples"})}),"\n",(0,s.jsx)(n.p,{children:"drand is easy to use with clients in Go and JavaScript as shown here. The HTTP API is how other languages can interact with drand. A Python example is provided below."}),"\n",(0,s.jsx)(n.h2,{id:"golang",children:"Golang"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["First, ",(0,s.jsx)(n.a,{href:"https://go.dev/doc/install",children:"install Go"})," if needed. With Homebrew the command is ",(0,s.jsx)(n.code,{children:"brew install go"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Then set up your project directory, the ",(0,s.jsx)(n.code,{children:"main.go"})," file if you need it, and your ",(0,s.jsx)(n.code,{children:"go.mod"})," file."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"mkdir myproject\ncd myproject\ntouch main.go\ntouch go.mod\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add the ",(0,s.jsx)(n.em,{children:"drand"})," library to your ",(0,s.jsx)(n.code,{children:"go.mod"})," file with:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"go mod init myproject\ngo get github.com/drand/drand\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["We show a simple ",(0,s.jsx)(n.code,{children:"main.go"})," illustrating how to instantiate a client and get randomness from drand."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-go",children:'package main\n\nimport (\n "context"\n "encoding/hex"\n "fmt"\n "github.com/drand/drand/client"\n "github.com/drand/drand/client/http"\n "log"\n)\n\nvar urls = []string{\n "https://api.drand.sh", // Official drand API server\n "https://drand.cloudflare.com", // Cloudflare\'s drand API server\n}\n\nvar chainHash, _ = hex.DecodeString("8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce")\n\nfunc main() {\n c, err := client.New(\n client.From(http.ForURLs(urls, chainHash)...),\n client.WithChainHash(chainHash),\n )\n if err != nil {\n log.Fatalf("error creating client: %v", err)\n }\n \n rand, err := c.Get(context.Background(), 0)\n if err != nil {\n log.Fatalf("Failed to get randomness: %v", err)\n }\n\n fmt.Printf("drand randomness: %s\\n", hex.EncodeToString(rand.Randomness()))\n}\n'})}),"\n",(0,s.jsxs)(n.ol,{start:"5",children:["\n",(0,s.jsxs)(n.li,{children:["Then to run the code:","\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"go run main.go\n"})}),"\n","or","\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"go build -o myproject main.go\n./myproject\n"})}),"\n","This should output something like:","\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"drand randomness: d4ab1d7798a2aa7c9bc0d436088c72ca35b8e4a859cafda4f827b7b93905188d\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"javascript",children:"JavaScript"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://nodejs.org/en/download/package-manager",children:"Install Node.js"})," if needed. The Homebrew command is ",(0,s.jsx)(n.code,{children:"brew install node"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Set up your project directory, the ",(0,s.jsx)(n.code,{children:"index.js"})," file if you need it, and your ",(0,s.jsx)(n.code,{children:"package.json"})," file."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"mkdir myproject\ncd myproject\nmkdir src\ntouch package.json \ntouch src/index.js\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add your ",(0,s.jsx)(n.code,{children:"package.json"})," file like so:"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "name": "myproject",\n "version": "1.0.0",\n "description": "",\n "main": "src/index.js",\n "type": "module",\n "scripts": {\n "start": "node src/index.js"\n },\n "private": true,\n "dependencies": {\n "drand-client": "^1.2.6"\n }\n}\n'})}),"\n",(0,s.jsxs)(n.ol,{start:"4",children:["\n",(0,s.jsxs)(n.li,{children:["Install the drand Javascript client library ",(0,s.jsx)(n.code,{children:"drand-client"}),":","\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npm install -S drand-client\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["We show a simple ",(0,s.jsx)(n.code,{children:"index.js"})," illustrating how to instantiate a client and get randomness from drand."]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",children:"import {FastestNodeClient, fetchBeacon, HttpCachingChain, HttpChainClient} from \"drand-client\";\n\n\nconst chainHash = '8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce' // (hex encoded)\nconst publicKey = '868f005eb8e6e4ca0a47c8a77ceaa5309a47978a7c71bc5cce96366b5d7a569937c529eeda66c7293784a9402801af31' // (hex encoded)\n\nconst options = {\n disableBeaconVerification: false, // `true` disables checking of signatures on beacons - faster but insecure!!!\n noCache: false, // `true` disables caching when retrieving beacons for some providers\n chainVerificationParams: {chainHash, publicKey} // these are optional, but recommended! They are compared for parity against the `/info` output of a given node\n}\n\n// shows creating a basic client for a specific node and getting randomness from that client\nasync function getRandomness() {\n const chain = new HttpCachingChain('https://api.drand.sh', options)\n const client = new HttpChainClient(chain, options)\n const beacon = await fetchBeacon(client)\n return beacon.randomness\n}\n\n// shows creating a client that finds the fastest node and gets randomness from that node\nasync function getRandomnessFastNode(){\n const urls = [\n 'https://api.drand.sh',\n 'https://drand.cloudflare.com'\n ]\n const client2 = new FastestNodeClient(urls, options)\n client2.start()\n const fastBeacon = await fetchBeacon(client2)\n client2.stop()\n return fastBeacon.randomness\n}\n\ngetRandomness()\n .then((randomness) => console.log(`Randomness is: ${randomness}`))\n .catch((err) => console.error('error', err))\n\ngetRandomnessFastNode()\n .then((randomness) => console.log(`Randomness from fastest node is: ${randomness}`))\n .catch((err) => console.error('error', err))\n"})}),"\n",(0,s.jsxs)(n.ol,{start:"6",children:["\n",(0,s.jsxs)(n.li,{children:["Then you can run your project with ",(0,s.jsx)(n.code,{children:"npm start"})," or ",(0,s.jsx)(n.code,{children:"node src/index.js"}),". The output will look like:","\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"Randomness from fastest node is: 7b1f0db59345bcaa48e6d385fab911cd7a9d705b0a7f2bdf27ca7a7f47c1b1b6\nRandomness is: 7b1f0db59345bcaa48e6d385fab911cd7a9d705b0a7f2bdf27ca7a7f47c1b1b6\n"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,a)=>{a.d(n,{R:()=>o,x:()=>i});var s=a(6540);const d={},r=s.createContext(d);function o(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:o(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/site/assets/js/9c3d38a1.9dbcf339.js b/site/assets/js/9c3d38a1.9dbcf339.js deleted file mode 100644 index b4290b78..00000000 --- a/site/assets/js/9c3d38a1.9dbcf339.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdrand_docs=self.webpackChunkdrand_docs||[]).push([[5081],{1586:(e,d,t)=>{t.r(d),t.d(d,{assets:()=>a,contentTitle:()=>i,default:()=>l,frontMatter:()=>s,metadata:()=>r,toc:()=>c});var n=t(4848),o=t(8453);const s={id:"3-6-dev-guide-code-examples",title:"3.6 Code Examples",description:"Examples of how to integrate drand in various coding languages."},i="3.6 DevGuide: Code Examples",r={id:"dev-guide/3-6-dev-guide-code-examples",title:"3.6 Code Examples",description:"Examples of how to integrate drand in various coding languages.",source:"@site/docs/03_dev-guide/03-06-DevGuide_Code_Examples.md",sourceDirName:"03_dev-guide",slug:"/dev-guide/3-6-dev-guide-code-examples",permalink:"/drand-docs/docs/dev-guide/3-6-dev-guide-code-examples",draft:!1,unlisted:!1,editUrl:"https://github.com/kentbull/drand-docs/tree/main/docs/03_dev-guide/03-06-DevGuide_Code_Examples.md",tags:[],version:"current",frontMatter:{id:"3-6-dev-guide-code-examples",title:"3.6 Code Examples",description:"Examples of how to integrate drand in various coding languages."},sidebar:"docsSidebar",previous:{title:"3.5 PubSub Network",permalink:"/drand-docs/docs/dev-guide/3-5-dev-guide-pubsub-network"},next:{title:"4.0 OPERATORS GUIDE",permalink:"/drand-docs/docs/category/40-operators-guide"}},a={},c=[];function u(e){const d={h1:"h1",header:"header",hr:"hr",p:"p",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.header,{children:(0,n.jsx)(d.h1,{id:"36-devguide-code-examples",children:"3.6 DevGuide: Code Examples"})}),"\n",(0,n.jsx)(d.p,{children:"[Note: Currently a stub. Fill this up!]"}),"\n",(0,n.jsx)(d.p,{children:""}),"\n",(0,n.jsx)(d.hr,{})]})}function l(e={}){const{wrapper:d}={...(0,o.R)(),...e.components};return d?(0,n.jsx)(d,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},8453:(e,d,t)=>{t.d(d,{R:()=>i,x:()=>r});var n=t(6540);const o={},s=n.createContext(o);function i(e){const d=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(d):{...d,...e}}),[d,e])}function r(e){let d;return d=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(s.Provider,{value:d},e.children)}}}]); \ No newline at end of file diff --git a/site/assets/js/cf1eeb86.2375ecc8.js b/site/assets/js/cf1eeb86.98e7f5b2.js similarity index 53% rename from site/assets/js/cf1eeb86.2375ecc8.js rename to site/assets/js/cf1eeb86.98e7f5b2.js index ceab565b..7226dee6 100644 --- a/site/assets/js/cf1eeb86.2375ecc8.js +++ b/site/assets/js/cf1eeb86.98e7f5b2.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdrand_docs=self.webpackChunkdrand_docs||[]).push([[3941],{8497:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>l});var s=r(4848),i=r(8453);const a={id:"1-0-about",title:"1.0 About",description:"What is drand?"},o="1.0 ABOUT (What is \u201cdrand\u201d?)",t={id:"about/1-0-about",title:"1.0 About",description:"What is drand?",source:"@site/docs/01_about/01-00-about.md",sourceDirName:"01_about",slug:"/about/1-0-about",permalink:"/drand-docs/docs/about/1-0-about",draft:!1,unlisted:!1,editUrl:"https://github.com/kentbull/drand-docs/tree/main/docs/01_about/01-00-about.md",tags:[],version:"current",frontMatter:{id:"1-0-about",title:"1.0 About",description:"What is drand?"},sidebar:"docsSidebar",previous:{title:'1.0 About (What is "drand"?)',permalink:"/drand-docs/docs/category/10-about-what-is-drand"},next:{title:"1.1 Governance",permalink:"/drand-docs/docs/about/1-1-governance"}},d={},l=[{value:"Current Randomness Generators",id:"current-randomness-generators",level:2},{value:"Features of Good Randomness",id:"features-of-good-randomness",level:2},{value:"How drand Works",id:"how-drand-works",level:2},{value:"Public Randomness",id:"public-randomness",level:2},{value:"Importance of Decentralized Randomness",id:"importance-of-decentralized-randomness",level:2},{value:"Origins of drand",id:"origins-of-drand",level:2},{value:"drand Network and Adoption",id:"drand-network-and-adoption",level:2},{value:"Acknowledgments",id:"acknowledgments",level:2},{value:"\ud83d\udc8c\xa0Get in touch!",id:"get-in-touch",level:3}];function c(e){const n={a:"a",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"10-about-what-is-drand",children:"1.0 ABOUT (What is \u201cdrand\u201d?)"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"drand"}),' (lower case, pronounced "DEE-rand") is a distributed randomness beacon daemon written in the ',(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Go_(programming_language)",children:(0,s.jsx)(n.strong,{children:"Go"})})," programming language. It generates collective, publicly verifiable, unbiased, and unpredictable random values at fixed intervals using advanced cryptographic techniques."]}),"\n",(0,s.jsxs)(n.p,{children:["drand serves as a critical Internet-wide infrastructure, providing randomness to applications much like the ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Network_Time_Protocol",children:(0,s.jsx)(n.strong,{children:"Network Time Protocol"})})," (NTP) provides timing information. It ensures randomness is verifiable and decentralized, making it ideal for a wide range of applications, from blockchain systems to anonymity networks."]}),"\n",(0,s.jsx)(n.p,{children:"Randomness plays a crucial role in various aspects of modern life, from voting systems and traffic management to financial services. However, its most critical application is in cryptography."}),"\n",(0,s.jsx)(n.p,{children:"For example, WPA2, the widely used security protocol for Wi-Fi networks, relies on randomness. When a laptop connects to a Wi-Fi network, both the laptop and the Wi-Fi access point generate large random numbers to perform a secure handshake. This ensures that communications cannot be eavesdropped. If these random numbers were predictable, an attacker could intercept the connection."}),"\n",(0,s.jsx)(n.h2,{id:"current-randomness-generators",children:"Current Randomness Generators"}),"\n",(0,s.jsx)(n.p,{children:"Several systems have tried to provide strong randomness, but each has its limitations. As an example:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"NIST Randomness Beacon"}),": The NIST Randomness Beacon provides cryptographic randomness in real-time. However, it is centralized and not verifiable by the public, which poses trust and reliability concerns."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"features-of-good-randomness",children:"Features of Good Randomness"}),"\n",(0,s.jsx)(n.p,{children:"To prevent manipulation, a strong random-number generator should be:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Unpredictable"}),": Impossible to predict the next number."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Publicly Verifiable"}),": Anyone can verify the randomness."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Bias-Resistant"}),": Cannot be influenced to produce specific outcomes."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Decentralized"}),": Produced by a set of independent, unrelated parties."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Always Available"}),": Reliably capable of providing random numbers."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"drand aims to fulfill all these criteria."}),"\n",(0,s.jsx)(n.h2,{id:"how-drand-works",children:"How drand Works"}),"\n",(0,s.jsx)(n.p,{children:"drand generates randomness without allowing any party to predict or bias the output. Here's a simplified overview:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Network Setup"}),": A drand network consists of nodes running the drand protocol. These nodes agree on a threshold parameter and generate partial signatures."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Randomness Generation"}),": Nodes broadcast parts of their signatures, which are collected until they match the threshold. The final signature, a ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/BLS_digital_signature",children:(0,s.jsx)(n.strong,{children:"Boneh\u2013Lynn\u2013Shacham"})})," (BLS) signature, is verified by the network and hashed to produce the random value."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For more details, refer to the ",(0,s.jsx)(n.a,{href:"https://drand.xyz/docs/specification",children:"project specifications"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"public-randomness",children:"Public Randomness"}),"\n",(0,s.jsx)(n.p,{children:"drand's primary function is generating public randomness. The process involves:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Setup Phase"}),": Nodes generate a long-term public/private key pair and perform a ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Distributed_key_generation",children:(0,s.jsx)(n.strong,{children:"distributed key generation"})})," (DKG) protocol to create a collective public key and individual private key shares."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Generation Phase"}),": Nodes initiate randomness generation rounds, sign messages using their private key shares, and reconstruct the full BLS signature. This signature is hashed to ensure no bias, producing the final random value."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"This randomness is useful for applications like lotteries, sharding, and consensus protocols."}),"\n",(0,s.jsx)(n.h2,{id:"importance-of-decentralized-randomness",children:"Importance of Decentralized Randomness"}),"\n",(0,s.jsxs)(n.p,{children:["Decentralized randomness is crucial for many systems that rely on fair and unpredictable outcomes. For example, ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Proof_of_stake",children:(0,s.jsx)(n.strong,{children:"Proof-of-Stake"})})," (PoS) blockchains use randomness to elect miners, ensuring security and fairness. Unlike centralized solutions, drand offers a verifiable and unbiased source of randomness, enhancing reliability and security."]}),"\n",(0,s.jsx)(n.h2,{id:"origins-of-drand",children:"Origins of drand"}),"\n",(0,s.jsxs)(n.p,{children:["drand was developed in 2017 in the ",(0,s.jsx)(n.a,{href:"https://www.epfl.ch/labs/dedis/",children:"DEDIS"})," Lab at ",(0,s.jsx)(n.a,{href:"https://epfl.ch/",children:"EPFL"}),", spearheaded by ",(0,s.jsx)(n.a,{href:"https://scholar.google.com/citations?user=mnA7Jo4AAAAJ",children:"Nicolas Gailly"}),". The project built upon earlier work in decentralized randomness by researchers at Yale University and EPFL."]}),"\n",(0,s.jsxs)(n.p,{children:["The DEDIS team collaborated with ",(0,s.jsx)(n.a,{href:"https://dfinity.org/",children:"DFINITY"})," to optimize the cryptographic techniques used in drand, resulting in a more efficient and reliable randomness generation protocol."]}),"\n",(0,s.jsx)(n.h2,{id:"drand-network-and-adoption",children:"drand Network and Adoption"}),"\n",(0,s.jsxs)(n.p,{children:["drand gained support from prominent organizations such as ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/cloudflare",children:"Cloudflare"}),", ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/kudelski-security",children:"Kudelski Security"}),", ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/protocol-labs",children:"Protocol Labs"}),", ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/universidad-de-chile",children:"Universidad de Chile"}),", and ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/league-partners",children:"many others"}),". These collaborations have helped establish a robust drand network, hosted by a voluntary consortium known as the ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org",children:"League of Entropy"}),", which launched its production-ready mainnet in 2019."]}),"\n",(0,s.jsx)(n.p,{children:"Today, drand is used in various applications, including leader election in consensus mechanisms, providing randomness for smart contracts, and more."}),"\n",(0,s.jsx)(n.h2,{id:"acknowledgments",children:"Acknowledgments"}),"\n",(0,s.jsxs)(n.p,{children:["Special thanks to contributors and collaborators who have supported drand\u2019s development, including ",(0,s.jsx)(n.a,{href:"https://github.com/paulmillr",children:"@paulmillr"})," and ",(0,s.jsx)(n.a,{href:"https://github.com/herumi",children:"@herumi"})," for cryptographic library support, and teams from the ",(0,s.jsx)(n.a,{href:"https://dedis.ch/",children:"DEDIS lab"})," and from ",(0,s.jsx)(n.a,{href:"https://protocol.ai/",children:"Protocol Labs"}),"."]}),"\n",(0,s.jsxs)(n.h3,{id:"get-in-touch",children:["\ud83d\udc8c\xa0",(0,s.jsx)(n.em,{children:"Get in touch!"})]}),"\n",(0,s.jsxs)(n.p,{children:["If you have any questions or comments, you can reach the drand team at ",(0,s.jsx)(n.a,{href:"mailto:leagueofentropy@googlegroups.com",children:"leagueofentropy@googlegroups.com"})," or join the ",(0,s.jsx)(n.a,{href:"https://join.slack.com/t/drandworkspace/shared_invite/zt-19u4rf6if-bf7lxIvF2zYn4~TrBwfkiA",children:"drand Slack workspace"}),"."]}),"\n",(0,s.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>t});var s=r(6540);const i={},a=s.createContext(i);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdrand_docs=self.webpackChunkdrand_docs||[]).push([[3941],{8497:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>l});var s=r(4848),i=r(8453);const a={id:"1-0-about",title:"1.0 About",description:"What is drand?"},o="1.0 ABOUT (What is \u201cdrand\u201d?)",t={id:"about/1-0-about",title:"1.0 About",description:"What is drand?",source:"@site/docs/01_about/01-00-about.md",sourceDirName:"01_about",slug:"/about/1-0-about",permalink:"/drand-docs/docs/about/1-0-about",draft:!1,unlisted:!1,editUrl:"https://github.com/kentbull/drand-docs/tree/main/docs/01_about/01-00-about.md",tags:[],version:"current",frontMatter:{id:"1-0-about",title:"1.0 About",description:"What is drand?"},sidebar:"docsSidebar",previous:{title:'1.0 About (What is "drand"?)',permalink:"/drand-docs/docs/category/10-about-what-is-drand"},next:{title:"1.1 Governance",permalink:"/drand-docs/docs/about/1-1-governance"}},d={},l=[{value:"Current Randomness Generators",id:"current-randomness-generators",level:2},{value:"Features of Good Randomness",id:"features-of-good-randomness",level:2},{value:"How drand Works",id:"how-drand-works",level:2},{value:"Public Randomness",id:"public-randomness",level:2},{value:"Importance of Decentralized Randomness",id:"importance-of-decentralized-randomness",level:2},{value:"Origins of drand",id:"origins-of-drand",level:2},{value:"drand Network and Adoption",id:"drand-network-and-adoption",level:2},{value:"Acknowledgments",id:"acknowledgments",level:2},{value:"\ud83d\udc8c\xa0Get in touch!",id:"get-in-touch",level:3}];function c(e){const n={a:"a",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"10-about-what-is-drand",children:"1.0 ABOUT (What is \u201cdrand\u201d?)"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"drand"}),' (lower case, pronounced "DEE-rand") is a distributed randomness beacon daemon written in the ',(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Go_(programming_language)",children:(0,s.jsx)(n.strong,{children:"Go"})})," programming language. It generates collective, publicly verifiable, unbiased, and unpredictable random values at fixed intervals using advanced cryptographic techniques."]}),"\n",(0,s.jsxs)(n.p,{children:["drand serves as a critical Internet-wide infrastructure, providing randomness to applications much like the ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Network_Time_Protocol",children:(0,s.jsx)(n.strong,{children:"Network Time Protocol"})})," (NTP) provides timing information. It ensures randomness is verifiable and decentralized, making it ideal for a wide range of applications, from blockchain systems to anonymity networks."]}),"\n",(0,s.jsx)(n.p,{children:"Randomness plays a crucial role in various aspects of modern life, from voting systems and traffic management to financial services. However, its most critical application is in cryptography."}),"\n",(0,s.jsx)(n.p,{children:"For example, WPA2, the widely used security protocol for Wi-Fi networks, relies on randomness. When a laptop connects to a Wi-Fi network, both the laptop and the Wi-Fi access point generate large random numbers to perform a secure handshake. This ensures that communications cannot be eavesdropped. If these random numbers were predictable, an attacker could intercept the connection."}),"\n",(0,s.jsx)(n.h2,{id:"current-randomness-generators",children:"Current Randomness Generators"}),"\n",(0,s.jsx)(n.p,{children:"Several systems have tried to provide strong randomness, but each has its limitations. As an example:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"NIST Randomness Beacon"}),": The NIST Randomness Beacon provides cryptographic randomness in real-time. However, it is centralized and not verifiable by the public, which poses trust and reliability concerns."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"features-of-good-randomness",children:"Features of Good Randomness"}),"\n",(0,s.jsx)(n.p,{children:"To prevent manipulation, a strong random-number generator should be:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Unpredictable"}),": Impossible to predict the next number."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Publicly Verifiable"}),": Anyone can verify the randomness."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Bias-Resistant"}),": Cannot be influenced to produce specific outcomes."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Decentralized"}),": Produced by a set of independent, unrelated parties."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Always Available"}),": Reliably capable of providing random numbers."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"drand aims to fulfill all these criteria."}),"\n",(0,s.jsx)(n.h2,{id:"how-drand-works",children:"How drand Works"}),"\n",(0,s.jsx)(n.p,{children:"drand generates randomness without allowing any party to predict or bias the output. Here's a simplified overview:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Network Setup"}),": A drand network consists of nodes running the drand protocol. These nodes agree on a threshold parameter and generate partial signatures."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Randomness Generation"}),": Nodes broadcast parts of their signatures, which are collected until they match the threshold. The final signature, a ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/BLS_digital_signature",children:(0,s.jsx)(n.strong,{children:"Boneh\u2013Lynn\u2013Shacham"})})," (BLS) signature, is verified by the network and hashed to produce the random value."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For more details, refer to the ",(0,s.jsx)(n.a,{href:"https://drand.love/docs/specification",children:"project specifications"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"public-randomness",children:"Public Randomness"}),"\n",(0,s.jsx)(n.p,{children:"drand's primary function is generating public randomness. The process involves:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Setup Phase"}),": Nodes generate a long-term public/private key pair and perform a ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Distributed_key_generation",children:(0,s.jsx)(n.strong,{children:"distributed key generation"})})," (DKG) protocol to create a collective public key and individual private key shares."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Generation Phase"}),": Nodes initiate randomness generation rounds, sign messages using their private key shares, and reconstruct the full BLS signature. This signature is hashed to ensure no bias, producing the final random value."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"This randomness is useful for applications like lotteries, sharding, and consensus protocols."}),"\n",(0,s.jsx)(n.h2,{id:"importance-of-decentralized-randomness",children:"Importance of Decentralized Randomness"}),"\n",(0,s.jsxs)(n.p,{children:["Decentralized randomness is crucial for many systems that rely on fair and unpredictable outcomes. For example, ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Proof_of_stake",children:(0,s.jsx)(n.strong,{children:"Proof-of-Stake"})})," (PoS) blockchains use randomness to elect miners, ensuring security and fairness. Unlike centralized solutions, drand offers a verifiable and unbiased source of randomness, enhancing reliability and security."]}),"\n",(0,s.jsx)(n.h2,{id:"origins-of-drand",children:"Origins of drand"}),"\n",(0,s.jsxs)(n.p,{children:["drand was developed in 2017 in the ",(0,s.jsx)(n.a,{href:"https://www.epfl.ch/labs/dedis/",children:"DEDIS"})," Lab at ",(0,s.jsx)(n.a,{href:"https://epfl.ch/",children:"EPFL"}),", spearheaded by ",(0,s.jsx)(n.a,{href:"https://scholar.google.com/citations?user=mnA7Jo4AAAAJ",children:"Nicolas Gailly"}),". The project built upon earlier work in decentralized randomness by researchers at Yale University and EPFL."]}),"\n",(0,s.jsxs)(n.p,{children:["The DEDIS team collaborated with ",(0,s.jsx)(n.a,{href:"https://dfinity.org/",children:"DFINITY"})," to optimize the cryptographic techniques used in drand, resulting in a more efficient and reliable randomness generation protocol."]}),"\n",(0,s.jsx)(n.h2,{id:"drand-network-and-adoption",children:"drand Network and Adoption"}),"\n",(0,s.jsxs)(n.p,{children:["drand gained support from prominent organizations such as ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/cloudflare",children:"Cloudflare"}),", ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/kudelski-security",children:"Kudelski Security"}),", ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/protocol-labs",children:"Protocol Labs"}),", ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/universidad-de-chile",children:"Universidad de Chile"}),", and ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org/league-partners",children:"many others"}),". These collaborations have helped establish a robust drand network, hosted by a voluntary consortium known as the ",(0,s.jsx)(n.a,{href:"https://leagueofentropy.org",children:"League of Entropy"}),", which launched its production-ready mainnet in 2019."]}),"\n",(0,s.jsx)(n.p,{children:"Today, drand is used in various applications, including leader election in consensus mechanisms, providing randomness for smart contracts, and more."}),"\n",(0,s.jsx)(n.h2,{id:"acknowledgments",children:"Acknowledgments"}),"\n",(0,s.jsxs)(n.p,{children:["Special thanks to contributors and collaborators who have supported drand\u2019s development, including ",(0,s.jsx)(n.a,{href:"https://github.com/paulmillr",children:"@paulmillr"})," and ",(0,s.jsx)(n.a,{href:"https://github.com/herumi",children:"@herumi"})," for cryptographic library support, and teams from the ",(0,s.jsx)(n.a,{href:"https://dedis.ch/",children:"DEDIS lab"})," and from ",(0,s.jsx)(n.a,{href:"https://protocol.ai/",children:"Protocol Labs"}),"."]}),"\n",(0,s.jsxs)(n.h3,{id:"get-in-touch",children:["\ud83d\udc8c\xa0",(0,s.jsx)(n.em,{children:"Get in touch!"})]}),"\n",(0,s.jsxs)(n.p,{children:["If you have any questions or comments, you can reach the drand team at ",(0,s.jsx)(n.a,{href:"mailto:leagueofentropy@googlegroups.com",children:"leagueofentropy@googlegroups.com"})," or join the ",(0,s.jsx)(n.a,{href:"https://join.slack.com/t/drandworkspace/shared_invite/zt-19u4rf6if-bf7lxIvF2zYn4~TrBwfkiA",children:"drand Slack workspace"}),"."]}),"\n",(0,s.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>t});var s=r(6540);const i={},a=s.createContext(i);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/site/assets/js/e50fef06.efa026e2.js b/site/assets/js/e50fef06.4ed547b7.js similarity index 86% rename from site/assets/js/e50fef06.efa026e2.js rename to site/assets/js/e50fef06.4ed547b7.js index dead2b25..0ae4740a 100644 --- a/site/assets/js/e50fef06.efa026e2.js +++ b/site/assets/js/e50fef06.4ed547b7.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdrand_docs=self.webpackChunkdrand_docs||[]).push([[1548],{8011:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var t=i(4848),o=i(8453);const s={id:"1-1-governance",title:"1.1 Governance",description:"Describes how project contributors conduct themselves."},r="1.1 About: Governance",a={id:"about/1-1-governance",title:"1.1 Governance",description:"Describes how project contributors conduct themselves.",source:"@site/docs/01_about/01-01-Governance.md",sourceDirName:"01_about",slug:"/about/1-1-governance",permalink:"/drand-docs/docs/about/1-1-governance",draft:!1,unlisted:!1,editUrl:"https://github.com/kentbull/drand-docs/tree/main/docs/01_about/01-01-Governance.md",tags:[],version:"current",frontMatter:{id:"1-1-governance",title:"1.1 Governance",description:"Describes how project contributors conduct themselves."},sidebar:"docsSidebar",previous:{title:"1.0 About",permalink:"/drand-docs/docs/about/1-0-about"},next:{title:"2.0 CONCEPTS (Getting Started)",permalink:"/drand-docs/docs/category/20-concepts-getting-started"}},c={},d=[{value:"Key Points",id:"key-points",level:2},{value:"Scope",id:"scope",level:2},{value:"Creating a Harassment-Free Space",id:"creating-a-harassment-free-space",level:2},{value:"Reporting Violations",id:"reporting-violations",level:2},{value:"Consequences",id:"consequences",level:2},{value:"Addressing Grievances",id:"addressing-grievances",level:2},{value:"Contact Information",id:"contact-information",level:2},{value:"Updates",id:"updates",level:2},{value:"Credit and License",id:"credit-and-license",level:2}];function l(e){const n={a:"a",h1:"h1",h2:"h2",header:"header",hr:"hr",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"11-about-governance",children:"1.1 About: Governance"})}),"\n",(0,t.jsx)(n.p,{children:"Our mission thrives in an environment that is friendly, safe, accepting, and free from intimidation or harassment. Certain behaviors will not be tolerated to ensure this atmosphere."}),"\n",(0,t.jsx)(n.h2,{id:"key-points",children:"Key Points"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Be respectful."}),"\n",(0,t.jsxs)(n.li,{children:["Need help? Contact: ",(0,t.jsx)(n.a,{href:"mailto:abuse@ipfs.io",children:"abuse@ipfs.io"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Abusive behavior is never tolerated."}),"\n",(0,t.jsx)(n.li,{children:"Violations may result in immediate and permanent expulsion."}),"\n",(0,t.jsx)(n.li,{children:"Ignorance of this document is not an excuse."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"scope",children:"Scope"}),"\n",(0,t.jsx)(n.p,{children:"This Code of Conduct applies to all community members at all times, in all community venues, online and in person, and in one-on-one communications related to the project. It covers the use of our public infrastructure, including the drand network, events, and services."}),"\n",(0,t.jsx)(n.h2,{id:"creating-a-harassment-free-space",children:"Creating a Harassment-Free Space"}),"\n",(0,t.jsx)(n.p,{children:"We are committed to a friendly, safe, and welcoming environment for everyone, regardless of gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, or any other personal characteristic."}),"\n",(0,t.jsx)(n.p,{children:"Respect differing opinions and understand that disagreement is not an excuse for rudeness. Disruptive behaviors like spamming, trolling, or flaming are not tolerated."}),"\n",(0,t.jsx)(n.p,{children:"Harassment includes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Threatening or demeaning behavior"}),"\n",(0,t.jsx)(n.li,{children:"Harmful comments related to personal characteristics"}),"\n",(0,t.jsx)(n.li,{children:"Inappropriate use of nudity, sexual images, or explicit language in public spaces"}),"\n",(0,t.jsx)(n.li,{children:"Threats of harm"}),"\n",(0,t.jsx)(n.li,{children:"Intimidation, stalking, or following"}),"\n",(0,t.jsx)(n.li,{children:"Harassing photography or recording"}),"\n",(0,t.jsx)(n.li,{children:"Disrupting talks or events"}),"\n",(0,t.jsx)(n.li,{children:"Inappropriate physical contact"}),"\n",(0,t.jsx)(n.li,{children:"Unwelcome sexual attention"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"reporting-violations",children:"Reporting Violations"}),"\n",(0,t.jsxs)(n.p,{children:["If you believe someone is harassing you or violating this Code of Conduct, ",(0,t.jsx)(n.a,{href:"https://github.com/ipfs/community/blob/master/code-of-conduct.md#contact-info",children:"contact us"})," with an abuse report. Provide as much detail as possible to help us address the issue effectively."]}),"\n",(0,t.jsx)(n.h2,{id:"consequences",children:"Consequences"}),"\n",(0,t.jsx)(n.p,{children:"Unacceptable behavior will not be tolerated. Anyone asked to stop such behavior must comply immediately. The team may take any action deemed appropriate, including temporary bans or permanent expulsion without warning."}),"\n",(0,t.jsx)(n.h2,{id:"addressing-grievances",children:"Addressing Grievances"}),"\n",(0,t.jsx)(n.p,{children:"If you feel falsely or unfairly accused of violating this Code of Conduct, notify the team. We will handle your grievance appropriately to foster a safe and friendly community."}),"\n",(0,t.jsx)(n.h2,{id:"contact-information",children:"Contact Information"}),"\n",(0,t.jsxs)(n.p,{children:["As our community remains small, the ",(0,t.jsx)(n.a,{href:"https://github.com/ipfs/community/blob/master/code-of-conduct.md#contact-info",children:"IPFS abuse team"})," acts as a neutral arbiter for Code of Conduct and abuse issues within drand."]}),"\n",(0,t.jsx)(n.p,{children:"Contact us if you are unsure about content appropriateness. We are happy to provide guidance."}),"\n",(0,t.jsx)(n.h2,{id:"updates",children:"Updates"}),"\n",(0,t.jsx)(n.p,{children:"This document may be updated periodically. Refer to the git history for changes."}),"\n",(0,t.jsx)(n.h2,{id:"credit-and-license",children:"Credit and License"}),"\n",(0,t.jsxs)(n.p,{children:["This Code of Conduct is based on the ",(0,t.jsx)(n.a,{href:"https://github.com/ipfs/community/blob/master/code-of-conduct.md",children:"IPFS Code of Conduct"}),", the ",(0,t.jsx)(n.a,{href:"https://www.npmjs.com/policies/conduct",children:"npm Code of Conduct"}),", ",(0,t.jsx)(n.a,{href:"https://github.com/code4lib/code-of-conduct/blob/master/code_of_conduct.md",children:"CodeOfConduct4Lib"}),", and the ",(0,t.jsx)(n.a,{href:"http://geekfeminism.wikia.com/",children:"Geek Feminism wiki"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["This document may be reused under a ",(0,t.jsx)(n.a,{href:"http://creativecommons.org/licenses/by-sa/4.0/",children:"Creative Commons Attribution-ShareAlike License"}),"."]}),"\n",(0,t.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>a});var t=i(6540);const o={},s=t.createContext(o);function r(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdrand_docs=self.webpackChunkdrand_docs||[]).push([[1548],{8011:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var t=i(4848),o=i(8453);const s={id:"1-1-governance",title:"1.1 Governance",description:"Describes how project contributors conduct themselves."},r="1.1 About: Governance",a={id:"about/1-1-governance",title:"1.1 Governance",description:"Describes how project contributors conduct themselves.",source:"@site/docs/01_about/01-01-Governance.md",sourceDirName:"01_about",slug:"/about/1-1-governance",permalink:"/drand-docs/docs/about/1-1-governance",draft:!1,unlisted:!1,editUrl:"https://github.com/kentbull/drand-docs/tree/main/docs/01_about/01-01-Governance.md",tags:[],version:"current",frontMatter:{id:"1-1-governance",title:"1.1 Governance",description:"Describes how project contributors conduct themselves."},sidebar:"docsSidebar",previous:{title:"1.0 About",permalink:"/drand-docs/docs/about/1-0-about"},next:{title:"2.0 CONCEPTS (Getting Started)",permalink:"/drand-docs/docs/category/20-concepts-getting-started"}},c={},d=[{value:"Key Points",id:"key-points",level:2},{value:"Scope",id:"scope",level:2},{value:"Creating a Harassment-Free Space",id:"creating-a-harassment-free-space",level:2},{value:"Reporting Violations",id:"reporting-violations",level:2},{value:"Consequences",id:"consequences",level:2},{value:"Addressing Grievances",id:"addressing-grievances",level:2},{value:"Contact Information",id:"contact-information",level:2},{value:"Updates",id:"updates",level:2},{value:"Credit and License",id:"credit-and-license",level:2}];function l(e){const n={a:"a",h1:"h1",h2:"h2",header:"header",hr:"hr",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"11-about-governance",children:"1.1 About: Governance"})}),"\n",(0,t.jsx)(n.p,{children:"Our mission thrives in an environment that is friendly, safe, accepting, and free from intimidation or harassment. Certain behaviors will not be tolerated to ensure this atmosphere."}),"\n",(0,t.jsx)(n.h2,{id:"key-points",children:"Key Points"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Be respectful."}),"\n",(0,t.jsxs)(n.li,{children:["Need help? Contact: ",(0,t.jsx)(n.a,{href:"mailto:abuse@ipfs.io",children:"abuse@ipfs.io"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Abusive behavior is never tolerated."}),"\n",(0,t.jsx)(n.li,{children:"Violations may result in immediate and permanent expulsion."}),"\n",(0,t.jsx)(n.li,{children:"Ignorance of this document is not an excuse."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"scope",children:"Scope"}),"\n",(0,t.jsx)(n.p,{children:"This Code of Conduct applies to all community members at all times, in all community venues, online and in person, and in one-on-one communications related to the project. It covers the use of our public infrastructure, including the drand network, events, and services."}),"\n",(0,t.jsx)(n.h2,{id:"creating-a-harassment-free-space",children:"Creating a Harassment-Free Space"}),"\n",(0,t.jsx)(n.p,{children:"We are committed to a friendly, safe, and welcoming environment for everyone, regardless of gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, or any other personal characteristic."}),"\n",(0,t.jsx)(n.p,{children:"Respect differing opinions and understand that disagreement is not an excuse for rudeness. Disruptive behaviors like spamming, trolling, or flaming are not tolerated."}),"\n",(0,t.jsx)(n.p,{children:"Harassment includes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Threatening or demeaning behavior"}),"\n",(0,t.jsx)(n.li,{children:"Harmful comments related to personal characteristics"}),"\n",(0,t.jsx)(n.li,{children:"Inappropriate use of nudity, sexual images, or explicit language in public spaces"}),"\n",(0,t.jsx)(n.li,{children:"Threats of harm"}),"\n",(0,t.jsx)(n.li,{children:"Intimidation, stalking, or following"}),"\n",(0,t.jsx)(n.li,{children:"Harassing photography or recording"}),"\n",(0,t.jsx)(n.li,{children:"Disrupting talks or events"}),"\n",(0,t.jsx)(n.li,{children:"Inappropriate physical contact"}),"\n",(0,t.jsx)(n.li,{children:"Unwelcome sexual attention"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"reporting-violations",children:"Reporting Violations"}),"\n",(0,t.jsxs)(n.p,{children:["If you believe someone is harassing you or violating this Code of Conduct, ",(0,t.jsx)(n.a,{href:"https://github.com/ipfs/community/blob/master/code-of-conduct.md#contact-info",children:"contact us"})," with an abuse report. Provide as much detail as possible to help us address the issue effectively."]}),"\n",(0,t.jsx)(n.h2,{id:"consequences",children:"Consequences"}),"\n",(0,t.jsx)(n.p,{children:"Unacceptable behavior will not be tolerated. Anyone asked to stop such behavior must comply immediately. The team may take any action deemed appropriate, including temporary bans or permanent expulsion without warning."}),"\n",(0,t.jsx)(n.h2,{id:"addressing-grievances",children:"Addressing Grievances"}),"\n",(0,t.jsx)(n.p,{children:"If you feel falsely or unfairly accused of violating this Code of Conduct, notify the team. We will handle your grievance appropriately to foster a safe and friendly community."}),"\n",(0,t.jsx)(n.h2,{id:"contact-information",children:"Contact Information"}),"\n",(0,t.jsxs)(n.p,{children:["As our community remains small, the ",(0,t.jsx)(n.a,{href:"https://github.com/ipfs/community/blob/master/code-of-conduct.md#contact-info",children:"IPFS abuse team"})," acts as a neutral arbiter for Code of Conduct and abuse issues within drand."]}),"\n",(0,t.jsx)(n.p,{children:"Contact us if you are unsure about content appropriateness. We are happy to provide guidance."}),"\n",(0,t.jsx)(n.h2,{id:"updates",children:"Updates"}),"\n",(0,t.jsx)(n.p,{children:"This document may be updated periodically. Refer to the git history for changes."}),"\n",(0,t.jsx)(n.h2,{id:"credit-and-license",children:"Credit and License"}),"\n",(0,t.jsxs)(n.p,{children:["This Code of Conduct is based on the ",(0,t.jsx)(n.a,{href:"https://github.com/ipfs/community/blob/master/code-of-conduct.md",children:"IPFS Code of Conduct"}),", the ",(0,t.jsx)(n.a,{href:"https://www.npmjs.com/policies/conduct",children:"npm Code of Conduct"}),", ",(0,t.jsx)(n.a,{href:"https://github.com/code4lib/code-of-conduct/blob/main/code_of_conduct.md",children:"CodeOfConduct4Lib"}),", and the ",(0,t.jsx)(n.a,{href:"http://geekfeminism.wikia.com/",children:"Geek Feminism wiki"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["This document may be reused under a ",(0,t.jsx)(n.a,{href:"http://creativecommons.org/licenses/by-sa/4.0/",children:"Creative Commons Attribution-ShareAlike License"}),"."]}),"\n",(0,t.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>a});var t=i(6540);const o={},s=t.createContext(o);function r(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/site/assets/js/runtime~main.afb8bc39.js b/site/assets/js/runtime~main.9ee51d5c.js similarity index 97% rename from site/assets/js/runtime~main.afb8bc39.js rename to site/assets/js/runtime~main.9ee51d5c.js index f1ccc9ba..0a620ec5 100644 --- a/site/assets/js/runtime~main.afb8bc39.js +++ b/site/assets/js/runtime~main.9ee51d5c.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,f,c,d,r={},t={};function b(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(f.exports,f,f.exports,b),f.loaded=!0,f.exports}b.m=r,b.c=t,e=[],b.O=(a,f,c,d)=>{if(!f){var r=1/0;for(i=0;i=d)&&Object.keys(b.O).every((e=>b.O[e](f[o])))?f.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[f,c,d]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var d=Object.create(null);b.r(d);var r={};a=a||[null,f({}),f([]),f(f)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>r[a]=()=>e[a]));return r.default=()=>e,b.d(d,r),d},b.d=(e,a)=>{for(var f in a)b.o(a,f)&&!b.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,f)=>(b.f[f](e,a),a)),[])),b.u=e=>"assets/js/"+({453:"f132e997",580:"2b46ab97",867:"33fc5bb8",1235:"a7456010",1245:"4e0eb3dc",1447:"da23e8d3",1502:"3e814fbd",1548:"e50fef06",1788:"e9a994e3",1800:"8806b065",1903:"acecf23e",1972:"73664a40",2066:"e6415a3f",2148:"b0017b1d",2239:"ff1a36d1",2268:"5589aa37",2339:"7c330c58",2542:"e4fffcf9",2691:"2a9db486",2711:"9e4087bc",2964:"93a0da4a",3179:"78fc3e97",3249:"ccc49370",3390:"6eaa7728",3472:"bba71062",3537:"c6806766",3573:"aa909e52",3637:"f4f34a3a",3655:"4c7240d8",3694:"8717b14a",3833:"2080a1aa",3941:"cf1eeb86",4093:"aa23f094",4115:"d1958d43",4205:"6412f335",4212:"621db11d",4230:"ceb4708b",4318:"24f06274",4342:"56aab574",4532:"1ab32222",4583:"1df93b7f",4813:"6875c492",4960:"6c2aefca",5081:"9c3d38a1",5218:"52a7705f",5557:"d9f32620",5706:"6825e205",5719:"72684690",5742:"aba21aa0",5858:"d954c059",6121:"f25a3067",6574:"8f578ac3",6969:"14eb3368",7098:"a7bd4aaa",7472:"814f3328",7643:"a6aa9e1f",8082:"ab32f63b",8209:"01a85c17",8401:"17896441",8551:"0f048bff",8609:"925b3f96",8737:"7661071f",9025:"2acb4dcc",9048:"a94703ab",9170:"c88e9617",9325:"59362658",9328:"e273c56f",9517:"0a40e68b",9647:"5e95c892",9676:"91f57a82",9858:"36994c47"}[e]||e)+"."+{453:"dafb65b3",580:"81ab04ae",867:"b8d29537",1235:"cf5a56fa",1245:"b3f03104",1447:"05f6318d",1502:"757e41f8",1548:"efa026e2",1788:"81a04118",1800:"250ece8d",1903:"089691d6",1972:"dd711b8c",2066:"992d6845",2148:"b2686800",2237:"982ee814",2239:"29f290f7",2268:"9e1166dd",2339:"6719f53a",2542:"db2fbd7c",2691:"1f5e4555",2711:"e31a38f4",2964:"3efb7f73",3179:"fbff7af8",3249:"1d26175e",3347:"8e958281",3390:"6a525c68",3472:"342fddb8",3537:"95b6059d",3573:"3a7aa99f",3637:"7300eb64",3655:"b5d9d4d0",3694:"e86499f8",3833:"9945b360",3941:"2375ecc8",4093:"0b225b8c",4115:"5026828c",4205:"a106b4db",4212:"f90eb02b",4230:"abf75248",4318:"cc8c4631",4342:"730cb5ff",4532:"41cc101f",4583:"4bbe161e",4813:"386ee3df",4960:"957edc04",5081:"9dbcf339",5218:"150d1613",5557:"d09d65df",5706:"e96e4ab0",5719:"1ef3b384",5742:"3532aa88",5858:"7a3d7eb4",6121:"d1d556b0",6574:"0fd7b2ea",6905:"9c40e72e",6969:"1844d12e",7098:"12039cfb",7472:"3e3fb0dc",7643:"9e397cf8",8082:"98faafc7",8209:"b1c4f5a5",8401:"217d4c3c",8551:"1592e817",8609:"c4b155f0",8737:"8296746d",9025:"e1a2a4c1",9048:"7c376541",9170:"089a163c",9325:"4f0764d1",9328:"84e147cb",9517:"3ed906ab",9647:"0d8a2771",9676:"b0048d22",9858:"47378eed"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},d="drand-docs:",b.l=(e,a,f,r)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/drand-docs/",b.gca=function(e){return e={17896441:"8401",59362658:"9325",72684690:"5719",f132e997:"453","2b46ab97":"580","33fc5bb8":"867",a7456010:"1235","4e0eb3dc":"1245",da23e8d3:"1447","3e814fbd":"1502",e50fef06:"1548",e9a994e3:"1788","8806b065":"1800",acecf23e:"1903","73664a40":"1972",e6415a3f:"2066",b0017b1d:"2148",ff1a36d1:"2239","5589aa37":"2268","7c330c58":"2339",e4fffcf9:"2542","2a9db486":"2691","9e4087bc":"2711","93a0da4a":"2964","78fc3e97":"3179",ccc49370:"3249","6eaa7728":"3390",bba71062:"3472",c6806766:"3537",aa909e52:"3573",f4f34a3a:"3637","4c7240d8":"3655","8717b14a":"3694","2080a1aa":"3833",cf1eeb86:"3941",aa23f094:"4093",d1958d43:"4115","6412f335":"4205","621db11d":"4212",ceb4708b:"4230","24f06274":"4318","56aab574":"4342","1ab32222":"4532","1df93b7f":"4583","6875c492":"4813","6c2aefca":"4960","9c3d38a1":"5081","52a7705f":"5218",d9f32620:"5557","6825e205":"5706",aba21aa0:"5742",d954c059:"5858",f25a3067:"6121","8f578ac3":"6574","14eb3368":"6969",a7bd4aaa:"7098","814f3328":"7472",a6aa9e1f:"7643",ab32f63b:"8082","01a85c17":"8209","0f048bff":"8551","925b3f96":"8609","7661071f":"8737","2acb4dcc":"9025",a94703ab:"9048",c88e9617:"9170",e273c56f:"9328","0a40e68b":"9517","5e95c892":"9647","91f57a82":"9676","36994c47":"9858"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,f)=>{var c=b.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((f,d)=>c=e[a]=[f,d]));f.push(c[2]=d);var r=b.p+b.u(a),t=new Error;b.l(r,(f=>{if(b.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var d=f&&("load"===f.type?"missing":f.type),r=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+r+")",t.name="ChunkLoadError",t.type=d,t.request=r,c[1](t)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,f)=>{var c,d,r=f[0],t=f[1],o=f[2],n=0;if(r.some((a=>0!==e[a]))){for(c in t)b.o(t,c)&&(b.m[c]=t[c]);if(o)var i=o(b)}for(a&&a(f);n{"use strict";var e,a,f,c,d,r={},t={};function b(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(f.exports,f,f.exports,b),f.loaded=!0,f.exports}b.m=r,b.c=t,e=[],b.O=(a,f,c,d)=>{if(!f){var r=1/0;for(i=0;i=d)&&Object.keys(b.O).every((e=>b.O[e](f[o])))?f.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[f,c,d]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var d=Object.create(null);b.r(d);var r={};a=a||[null,f({}),f([]),f(f)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>r[a]=()=>e[a]));return r.default=()=>e,b.d(d,r),d},b.d=(e,a)=>{for(var f in a)b.o(a,f)&&!b.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,f)=>(b.f[f](e,a),a)),[])),b.u=e=>"assets/js/"+({453:"f132e997",580:"2b46ab97",867:"33fc5bb8",1235:"a7456010",1245:"4e0eb3dc",1447:"da23e8d3",1502:"3e814fbd",1548:"e50fef06",1788:"e9a994e3",1800:"8806b065",1903:"acecf23e",1972:"73664a40",2066:"e6415a3f",2148:"b0017b1d",2239:"ff1a36d1",2268:"5589aa37",2339:"7c330c58",2542:"e4fffcf9",2691:"2a9db486",2711:"9e4087bc",2964:"93a0da4a",3179:"78fc3e97",3249:"ccc49370",3390:"6eaa7728",3472:"bba71062",3537:"c6806766",3573:"aa909e52",3637:"f4f34a3a",3655:"4c7240d8",3694:"8717b14a",3833:"2080a1aa",3941:"cf1eeb86",4093:"aa23f094",4115:"d1958d43",4205:"6412f335",4212:"621db11d",4230:"ceb4708b",4318:"24f06274",4342:"56aab574",4532:"1ab32222",4583:"1df93b7f",4813:"6875c492",4960:"6c2aefca",5081:"9c3d38a1",5218:"52a7705f",5557:"d9f32620",5706:"6825e205",5719:"72684690",5742:"aba21aa0",5858:"d954c059",6121:"f25a3067",6574:"8f578ac3",6969:"14eb3368",7098:"a7bd4aaa",7472:"814f3328",7643:"a6aa9e1f",8082:"ab32f63b",8209:"01a85c17",8401:"17896441",8551:"0f048bff",8609:"925b3f96",8737:"7661071f",9025:"2acb4dcc",9048:"a94703ab",9170:"c88e9617",9325:"59362658",9328:"e273c56f",9517:"0a40e68b",9647:"5e95c892",9676:"91f57a82",9858:"36994c47"}[e]||e)+"."+{453:"dafb65b3",580:"81ab04ae",867:"b8d29537",1235:"cf5a56fa",1245:"b3f03104",1447:"05f6318d",1502:"757e41f8",1548:"4ed547b7",1788:"81a04118",1800:"250ece8d",1903:"089691d6",1972:"dd711b8c",2066:"992d6845",2148:"b2686800",2237:"982ee814",2239:"29f290f7",2268:"9e1166dd",2339:"6719f53a",2542:"db2fbd7c",2691:"1f5e4555",2711:"e31a38f4",2964:"3efb7f73",3179:"fbff7af8",3249:"1d26175e",3347:"8e958281",3390:"6a525c68",3472:"342fddb8",3537:"95b6059d",3573:"3a7aa99f",3637:"7300eb64",3655:"b5d9d4d0",3694:"e86499f8",3833:"9945b360",3941:"98e7f5b2",4093:"0b225b8c",4115:"5026828c",4205:"a106b4db",4212:"f90eb02b",4230:"abf75248",4318:"cc8c4631",4342:"730cb5ff",4532:"41cc101f",4583:"4bbe161e",4813:"386ee3df",4960:"957edc04",5081:"92de5875",5218:"150d1613",5557:"d09d65df",5706:"e96e4ab0",5719:"1ef3b384",5742:"3532aa88",5858:"7a3d7eb4",6121:"d1d556b0",6574:"0fd7b2ea",6905:"9c40e72e",6969:"1844d12e",7098:"12039cfb",7472:"3e3fb0dc",7643:"9e397cf8",8082:"98faafc7",8209:"b1c4f5a5",8401:"217d4c3c",8551:"1592e817",8609:"c4b155f0",8737:"8296746d",9025:"e1a2a4c1",9048:"7c376541",9170:"089a163c",9325:"4f0764d1",9328:"84e147cb",9517:"3ed906ab",9647:"0d8a2771",9676:"b0048d22",9858:"47378eed"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},d="drand-docs:",b.l=(e,a,f,r)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/drand-docs/",b.gca=function(e){return e={17896441:"8401",59362658:"9325",72684690:"5719",f132e997:"453","2b46ab97":"580","33fc5bb8":"867",a7456010:"1235","4e0eb3dc":"1245",da23e8d3:"1447","3e814fbd":"1502",e50fef06:"1548",e9a994e3:"1788","8806b065":"1800",acecf23e:"1903","73664a40":"1972",e6415a3f:"2066",b0017b1d:"2148",ff1a36d1:"2239","5589aa37":"2268","7c330c58":"2339",e4fffcf9:"2542","2a9db486":"2691","9e4087bc":"2711","93a0da4a":"2964","78fc3e97":"3179",ccc49370:"3249","6eaa7728":"3390",bba71062:"3472",c6806766:"3537",aa909e52:"3573",f4f34a3a:"3637","4c7240d8":"3655","8717b14a":"3694","2080a1aa":"3833",cf1eeb86:"3941",aa23f094:"4093",d1958d43:"4115","6412f335":"4205","621db11d":"4212",ceb4708b:"4230","24f06274":"4318","56aab574":"4342","1ab32222":"4532","1df93b7f":"4583","6875c492":"4813","6c2aefca":"4960","9c3d38a1":"5081","52a7705f":"5218",d9f32620:"5557","6825e205":"5706",aba21aa0:"5742",d954c059:"5858",f25a3067:"6121","8f578ac3":"6574","14eb3368":"6969",a7bd4aaa:"7098","814f3328":"7472",a6aa9e1f:"7643",ab32f63b:"8082","01a85c17":"8209","0f048bff":"8551","925b3f96":"8609","7661071f":"8737","2acb4dcc":"9025",a94703ab:"9048",c88e9617:"9170",e273c56f:"9328","0a40e68b":"9517","5e95c892":"9647","91f57a82":"9676","36994c47":"9858"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,f)=>{var c=b.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((f,d)=>c=e[a]=[f,d]));f.push(c[2]=d);var r=b.p+b.u(a),t=new Error;b.l(r,(f=>{if(b.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var d=f&&("load"===f.type?"missing":f.type),r=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+r+")",t.name="ChunkLoadError",t.type=d,t.request=r,c[1](t)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,f)=>{var c,d,r=f[0],t=f[1],o=f[2],n=0;if(r.some((a=>0!==e[a]))){for(c in t)b.o(t,c)&&(b.m[c]=t[c]);if(o)var i=o(b)}for(a&&a(f);n Archive | drand - + diff --git a/site/blog/authors/all-dave-grantham-articles/index.html b/site/blog/authors/all-dave-grantham-articles/index.html index e3c1a590..2d0a5cda 100644 --- a/site/blog/authors/all-dave-grantham-articles/index.html +++ b/site/blog/authors/all-dave-grantham-articles/index.html @@ -5,7 +5,7 @@ Dave Grantham - One post | drand - + diff --git a/site/blog/authors/all-sebastien-lorber-articles/index.html b/site/blog/authors/all-sebastien-lorber-articles/index.html index ac6d4c33..3b162347 100644 --- a/site/blog/authors/all-sebastien-lorber-articles/index.html +++ b/site/blog/authors/all-sebastien-lorber-articles/index.html @@ -5,7 +5,7 @@ Sébastien Lorber - 3 posts | drand - + diff --git a/site/blog/authors/index.html b/site/blog/authors/index.html index 63433be8..36e8bd73 100644 --- a/site/blog/authors/index.html +++ b/site/blog/authors/index.html @@ -5,7 +5,7 @@ Authors | drand - + diff --git a/site/blog/authors/kentbull/index.html b/site/blog/authors/kentbull/index.html index 6b90fe7d..225c5b2e 100644 --- a/site/blog/authors/kentbull/index.html +++ b/site/blog/authors/kentbull/index.html @@ -5,7 +5,7 @@ Kent Bull - One post | drand - + diff --git a/site/blog/authors/yangshun/index.html b/site/blog/authors/yangshun/index.html index 3b1c39b6..1e4d4fc6 100644 --- a/site/blog/authors/yangshun/index.html +++ b/site/blog/authors/yangshun/index.html @@ -5,7 +5,7 @@ Yangshun Tay - 3 posts | drand - + diff --git a/site/blog/drand-greetings/index.html b/site/blog/drand-greetings/index.html index c2795e57..34f2f09f 100644 --- a/site/blog/drand-greetings/index.html +++ b/site/blog/drand-greetings/index.html @@ -5,7 +5,7 @@ Greetings! | drand - + diff --git a/site/blog/first-blog-post/index.html b/site/blog/first-blog-post/index.html index fb0e61eb..54f7630a 100644 --- a/site/blog/first-blog-post/index.html +++ b/site/blog/first-blog-post/index.html @@ -5,7 +5,7 @@ First Blog Post | drand - + diff --git a/site/blog/index.html b/site/blog/index.html index 8170b943..d66ca8f3 100644 --- a/site/blog/index.html +++ b/site/blog/index.html @@ -5,7 +5,7 @@ Blog | drand - + diff --git a/site/blog/long-blog-post/index.html b/site/blog/long-blog-post/index.html index 8b92e6f6..7141caf0 100644 --- a/site/blog/long-blog-post/index.html +++ b/site/blog/long-blog-post/index.html @@ -5,7 +5,7 @@ Long Blog Post | drand - + diff --git a/site/blog/mdx-blog-post/index.html b/site/blog/mdx-blog-post/index.html index fa5eb439..4582fa89 100644 --- a/site/blog/mdx-blog-post/index.html +++ b/site/blog/mdx-blog-post/index.html @@ -5,7 +5,7 @@ MDX Blog Post | drand - + diff --git a/site/blog/tags/docusaurus/index.html b/site/blog/tags/docusaurus/index.html index bee6e9ed..35d3cd6e 100644 --- a/site/blog/tags/docusaurus/index.html +++ b/site/blog/tags/docusaurus/index.html @@ -5,7 +5,7 @@ 4 posts tagged with "Docusaurus" | drand - + diff --git a/site/blog/tags/facebook/index.html b/site/blog/tags/facebook/index.html index 1923012b..ef890fc1 100644 --- a/site/blog/tags/facebook/index.html +++ b/site/blog/tags/facebook/index.html @@ -5,7 +5,7 @@ One post tagged with "Facebook" | drand - + diff --git a/site/blog/tags/hello/index.html b/site/blog/tags/hello/index.html index ca847569..ab9ac63b 100644 --- a/site/blog/tags/hello/index.html +++ b/site/blog/tags/hello/index.html @@ -5,7 +5,7 @@ 3 posts tagged with "Hello" | drand - + diff --git a/site/blog/tags/hola/index.html b/site/blog/tags/hola/index.html index 9bea662c..2497897f 100644 --- a/site/blog/tags/hola/index.html +++ b/site/blog/tags/hola/index.html @@ -5,7 +5,7 @@ One post tagged with "Hola" | drand - + diff --git a/site/blog/tags/index.html b/site/blog/tags/index.html index 5b739fe0..1feb15cf 100644 --- a/site/blog/tags/index.html +++ b/site/blog/tags/index.html @@ -5,7 +5,7 @@ Tags | drand - + diff --git a/site/blog/welcome/index.html b/site/blog/welcome/index.html index c1bd9d0a..812a99ef 100644 --- a/site/blog/welcome/index.html +++ b/site/blog/welcome/index.html @@ -5,7 +5,7 @@ Welcome | drand - + diff --git a/site/docs/about/1-0-about/index.html b/site/docs/about/1-0-about/index.html index 7eb3c96d..dd47ac3e 100644 --- a/site/docs/about/1-0-about/index.html +++ b/site/docs/about/1-0-about/index.html @@ -5,7 +5,7 @@ 1.0 About | drand - + @@ -35,7 +35,7 @@

How drand Wo
  • Network Setup: A drand network consists of nodes running the drand protocol. These nodes agree on a threshold parameter and generate partial signatures.
  • Randomness Generation: Nodes broadcast parts of their signatures, which are collected until they match the threshold. The final signature, a Boneh–Lynn–Shacham (BLS) signature, is verified by the network and hashed to produce the random value.
  • -

    For more details, refer to the project specifications.

    +

    For more details, refer to the project specifications.

    Public Randomness

    drand's primary function is generating public randomness. The process involves:

      diff --git a/site/docs/about/1-1-governance/index.html b/site/docs/about/1-1-governance/index.html index 8a2ddab1..cc72c210 100644 --- a/site/docs/about/1-1-governance/index.html +++ b/site/docs/about/1-1-governance/index.html @@ -5,7 +5,7 @@ 1.1 Governance | drand - + @@ -48,7 +48,7 @@

      Contact

      Updates

      This document may be updated periodically. Refer to the git history for changes.

      Credit and License

      -

      This Code of Conduct is based on the IPFS Code of Conduct, the npm Code of Conduct, CodeOfConduct4Lib, and the Geek Feminism wiki.

      +

      This Code of Conduct is based on the IPFS Code of Conduct, the npm Code of Conduct, CodeOfConduct4Lib, and the Geek Feminism wiki.

      This document may be reused under a Creative Commons Attribution-ShareAlike License.


      diff --git a/site/docs/category/10-about-what-is-drand/index.html b/site/docs/category/10-about-what-is-drand/index.html index ef749520..58fa7f23 100644 --- a/site/docs/category/10-about-what-is-drand/index.html +++ b/site/docs/category/10-about-what-is-drand/index.html @@ -5,7 +5,7 @@ 1.0 About (What is "drand"?) | drand - + diff --git a/site/docs/category/20-concepts-getting-started/index.html b/site/docs/category/20-concepts-getting-started/index.html index 8f090c16..85287d69 100644 --- a/site/docs/category/20-concepts-getting-started/index.html +++ b/site/docs/category/20-concepts-getting-started/index.html @@ -5,7 +5,7 @@ 2.0 CONCEPTS (Getting Started) | drand - + diff --git a/site/docs/category/30-developers-guide/index.html b/site/docs/category/30-developers-guide/index.html index 09576cb4..9ffc408b 100644 --- a/site/docs/category/30-developers-guide/index.html +++ b/site/docs/category/30-developers-guide/index.html @@ -5,7 +5,7 @@ 3.0 DEVELOPERS GUIDE | drand - + diff --git a/site/docs/category/40-operators-guide/index.html b/site/docs/category/40-operators-guide/index.html index e3cf3438..87831edd 100644 --- a/site/docs/category/40-operators-guide/index.html +++ b/site/docs/category/40-operators-guide/index.html @@ -5,7 +5,7 @@ 4.0 OPERATORS GUIDE | drand - + diff --git a/site/docs/category/50-drand-community/index.html b/site/docs/category/50-drand-community/index.html index b26bf621..f8f25945 100644 --- a/site/docs/category/50-drand-community/index.html +++ b/site/docs/category/50-drand-community/index.html @@ -5,7 +5,7 @@ 5.0 DRAND COMMUNITY | drand - + diff --git a/site/docs/category/60-drand-faq/index.html b/site/docs/category/60-drand-faq/index.html index 5465786e..aeb0cf23 100644 --- a/site/docs/category/60-drand-faq/index.html +++ b/site/docs/category/60-drand-faq/index.html @@ -5,7 +5,7 @@ 6.0 DRAND FAQ | drand - + diff --git a/site/docs/concepts/2-0-concepts/index.html b/site/docs/concepts/2-0-concepts/index.html index eb02dd58..3e32a54e 100644 --- a/site/docs/concepts/2-0-concepts/index.html +++ b/site/docs/concepts/2-0-concepts/index.html @@ -5,7 +5,7 @@ 2.0 Concepts | drand - + diff --git a/site/docs/concepts/2-1-concepts-cryptography/index.html b/site/docs/concepts/2-1-concepts-cryptography/index.html index 730b02a0..abfc7dee 100644 --- a/site/docs/concepts/2-1-concepts-cryptography/index.html +++ b/site/docs/concepts/2-1-concepts-cryptography/index.html @@ -5,7 +5,7 @@ 2.1 Cryptography | drand - + diff --git a/site/docs/concepts/2-2-concepts-security-model/index.html b/site/docs/concepts/2-2-concepts-security-model/index.html index 6906b478..d0a2ef00 100644 --- a/site/docs/concepts/2-2-concepts-security-model/index.html +++ b/site/docs/concepts/2-2-concepts-security-model/index.html @@ -5,7 +5,7 @@ 2.2 Security Model | drand - + diff --git a/site/docs/concepts/2-3-concepts-specification/index.html b/site/docs/concepts/2-3-concepts-specification/index.html index 26c53fdf..45f9f846 100644 --- a/site/docs/concepts/2-3-concepts-specification/index.html +++ b/site/docs/concepts/2-3-concepts-specification/index.html @@ -5,7 +5,7 @@ 2.3 Specification | drand - + diff --git a/site/docs/concepts/2-4-concepts-timelock-encryption/index.html b/site/docs/concepts/2-4-concepts-timelock-encryption/index.html index fe9f7e43..f615e953 100644 --- a/site/docs/concepts/2-4-concepts-timelock-encryption/index.html +++ b/site/docs/concepts/2-4-concepts-timelock-encryption/index.html @@ -5,7 +5,7 @@ 2.4 Timelock Encryption | drand - + diff --git a/site/docs/dev-guide/3-0-dev-guide/index.html b/site/docs/dev-guide/3-0-dev-guide/index.html index 2d57779a..ef7d9401 100644 --- a/site/docs/dev-guide/3-0-dev-guide/index.html +++ b/site/docs/dev-guide/3-0-dev-guide/index.html @@ -5,7 +5,7 @@ 3.0 Developers Guide | drand - + diff --git a/site/docs/dev-guide/3-1-dev-guide-organization/index.html b/site/docs/dev-guide/3-1-dev-guide-organization/index.html index 6e2b6940..ec71b648 100644 --- a/site/docs/dev-guide/3-1-dev-guide-organization/index.html +++ b/site/docs/dev-guide/3-1-dev-guide-organization/index.html @@ -5,7 +5,7 @@ 3.1 DevGuide: Organization | drand - + diff --git a/site/docs/dev-guide/3-2-dev-guide-drand-client-cli/index.html b/site/docs/dev-guide/3-2-dev-guide-drand-client-cli/index.html index dd32a681..7c816496 100644 --- a/site/docs/dev-guide/3-2-dev-guide-drand-client-cli/index.html +++ b/site/docs/dev-guide/3-2-dev-guide-drand-client-cli/index.html @@ -5,7 +5,7 @@ 3.2 drand-client CLI | drand - + diff --git a/site/docs/dev-guide/3-3-dev-guide-client-libraries/index.html b/site/docs/dev-guide/3-3-dev-guide-client-libraries/index.html index 88c215ac..7399f06e 100644 --- a/site/docs/dev-guide/3-3-dev-guide-client-libraries/index.html +++ b/site/docs/dev-guide/3-3-dev-guide-client-libraries/index.html @@ -5,7 +5,7 @@ 3.3 Client Libraries | drand - + diff --git a/site/docs/dev-guide/3-4-dev-guide-http-api/index.html b/site/docs/dev-guide/3-4-dev-guide-http-api/index.html index dbaf0e28..3d3cfc76 100644 --- a/site/docs/dev-guide/3-4-dev-guide-http-api/index.html +++ b/site/docs/dev-guide/3-4-dev-guide-http-api/index.html @@ -5,7 +5,7 @@ 3.4 HTTP API | drand - + diff --git a/site/docs/dev-guide/3-5-dev-guide-pubsub-network/index.html b/site/docs/dev-guide/3-5-dev-guide-pubsub-network/index.html index 008d6e68..1a59501e 100644 --- a/site/docs/dev-guide/3-5-dev-guide-pubsub-network/index.html +++ b/site/docs/dev-guide/3-5-dev-guide-pubsub-network/index.html @@ -5,7 +5,7 @@ 3.5 PubSub Network | drand - + diff --git a/site/docs/dev-guide/3-6-dev-guide-code-examples/index.html b/site/docs/dev-guide/3-6-dev-guide-code-examples/index.html index 9ed775e2..7dd59689 100644 --- a/site/docs/dev-guide/3-6-dev-guide-code-examples/index.html +++ b/site/docs/dev-guide/3-6-dev-guide-code-examples/index.html @@ -5,13 +5,64 @@ 3.6 Code Examples | drand - + -
      +

      3.6 DevGuide: Code Examples

      +

      drand is easy to use with clients in Go and JavaScript as shown here. The HTTP API is how other languages can interact with drand. A Python example is provided below.

      +

      Golang

      +
        +
      1. +

        First, install Go if needed. With Homebrew the command is brew install go.

        +
      2. +
      3. +

        Then set up your project directory, the main.go file if you need it, and your go.mod file.

        +
        mkdir myproject
        cd myproject
        touch main.go
        touch go.mod
        +
      4. +
      5. +

        Add the drand library to your go.mod file with:

        +
        go mod init myproject
        go get github.com/drand/drand
        +
      6. +
      7. +

        We show a simple main.go illustrating how to instantiate a client and get randomness from drand.

        +
      8. +
      +
      package main

      import (
      "context"
      "encoding/hex"
      "fmt"
      "github.com/drand/drand/client"
      "github.com/drand/drand/client/http"
      "log"
      )

      var urls = []string{
      "https://api.drand.sh", // Official drand API server
      "https://drand.cloudflare.com", // Cloudflare's drand API server
      }

      var chainHash, _ = hex.DecodeString("8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce")

      func main() {
      c, err := client.New(
      client.From(http.ForURLs(urls, chainHash)...),
      client.WithChainHash(chainHash),
      )
      if err != nil {
      log.Fatalf("error creating client: %v", err)
      }

      rand, err := c.Get(context.Background(), 0)
      if err != nil {
      log.Fatalf("Failed to get randomness: %v", err)
      }

      fmt.Printf("drand randomness: %s\n", hex.EncodeToString(rand.Randomness()))
      }
      +
        +
      1. Then to run the code: +
        go run main.go
        +or +
        go build -o myproject main.go
        ./myproject
        +This should output something like: +
        drand randomness: d4ab1d7798a2aa7c9bc0d436088c72ca35b8e4a859cafda4f827b7b93905188d
        +
      2. +
      +

      JavaScript

      +
        +
      1. +

        Install Node.js if needed. The Homebrew command is brew install node.

        +
      2. +
      3. +

        Set up your project directory, the index.js file if you need it, and your package.json file.

        +
        mkdir myproject
        cd myproject
        mkdir src
        touch package.json
        touch src/index.js
        +
      4. +
      5. +

        Add your package.json file like so:

        +
      6. +
      +
      {
      "name": "myproject",
      "version": "1.0.0",
      "description": "",
      "main": "src/index.js",
      "type": "module",
      "scripts": {
      "start": "node src/index.js"
      },
      "private": true,
      "dependencies": {
      "drand-client": "^1.2.6"
      }
      }
      +
        +
      1. Install the drand Javascript client library drand-client: +
        npm install -S drand-client
        +
      2. +
      3. We show a simple index.js illustrating how to instantiate a client and get randomness from drand.
      4. +
      +
      import {FastestNodeClient, fetchBeacon, HttpCachingChain, HttpChainClient} from "drand-client";


      const chainHash = '8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce' // (hex encoded)
      const publicKey = '868f005eb8e6e4ca0a47c8a77ceaa5309a47978a7c71bc5cce96366b5d7a569937c529eeda66c7293784a9402801af31' // (hex encoded)

      const options = {
      disableBeaconVerification: false, // `true` disables checking of signatures on beacons - faster but insecure!!!
      noCache: false, // `true` disables caching when retrieving beacons for some providers
      chainVerificationParams: {chainHash, publicKey} // these are optional, but recommended! They are compared for parity against the `/info` output of a given node
      }

      // shows creating a basic client for a specific node and getting randomness from that client
      async function getRandomness() {
      const chain = new HttpCachingChain('https://api.drand.sh', options)
      const client = new HttpChainClient(chain, options)
      const beacon = await fetchBeacon(client)
      return beacon.randomness
      }

      // shows creating a client that finds the fastest node and gets randomness from that node
      async function getRandomnessFastNode(){
      const urls = [
      'https://api.drand.sh',
      'https://drand.cloudflare.com'
      ]
      const client2 = new FastestNodeClient(urls, options)
      client2.start()
      const fastBeacon = await fetchBeacon(client2)
      client2.stop()
      return fastBeacon.randomness
      }

      getRandomness()
      .then((randomness) => console.log(`Randomness is: ${randomness}`))
      .catch((err) => console.error('error', err))

      getRandomnessFastNode()
      .then((randomness) => console.log(`Randomness from fastest node is: ${randomness}`))
      .catch((err) => console.error('error', err))
      +
        +
      1. Then you can run your project with npm start or node src/index.js. The output will look like: +
        Randomness from fastest node is: 7b1f0db59345bcaa48e6d385fab911cd7a9d705b0a7f2bdf27ca7a7f47c1b1b6
        Randomness is: 7b1f0db59345bcaa48e6d385fab911cd7a9d705b0a7f2bdf27ca7a7f47c1b1b6
        +
      2. +
      \ No newline at end of file diff --git a/site/docs/drand-community/5-0-drand-community/index.html b/site/docs/drand-community/5-0-drand-community/index.html index feeca5bf..6c6d9568 100644 --- a/site/docs/drand-community/5-0-drand-community/index.html +++ b/site/docs/drand-community/5-0-drand-community/index.html @@ -5,7 +5,7 @@ 5.0 DRAND COMMUNITY | drand - + diff --git a/site/docs/drand-community/5-1-drand-community-contributing/index.html b/site/docs/drand-community/5-1-drand-community-contributing/index.html index 9c9ff86d..afb795db 100644 --- a/site/docs/drand-community/5-1-drand-community-contributing/index.html +++ b/site/docs/drand-community/5-1-drand-community-contributing/index.html @@ -5,7 +5,7 @@ 5.1 Contributing | drand - + diff --git a/site/docs/drand-faq/6-0-drand-faq/index.html b/site/docs/drand-faq/6-0-drand-faq/index.html index fa747108..07ad5376 100644 --- a/site/docs/drand-faq/6-0-drand-faq/index.html +++ b/site/docs/drand-faq/6-0-drand-faq/index.html @@ -5,7 +5,7 @@ 6.0 DRAND FAQ | drand - + diff --git a/site/docs/home/index.html b/site/docs/home/index.html index 04cd3e8c..37f60700 100644 --- a/site/docs/home/index.html +++ b/site/docs/home/index.html @@ -5,7 +5,7 @@ Welcome to the drand docs 🎲! | drand - + diff --git a/site/docs/ops-guide/4-0-ops-guide/index.html b/site/docs/ops-guide/4-0-ops-guide/index.html index 12b3cdb5..a5e90878 100644 --- a/site/docs/ops-guide/4-0-ops-guide/index.html +++ b/site/docs/ops-guide/4-0-ops-guide/index.html @@ -5,7 +5,7 @@ 4.0 OPERATORS GUIDE | drand - + diff --git a/site/docs/ops-guide/4-1-ops-guide-deployment/index.html b/site/docs/ops-guide/4-1-ops-guide-deployment/index.html index c98502e3..43358a71 100644 --- a/site/docs/ops-guide/4-1-ops-guide-deployment/index.html +++ b/site/docs/ops-guide/4-1-ops-guide-deployment/index.html @@ -5,7 +5,7 @@ 4.1 Deployment | drand - + diff --git a/site/docs/ops-guide/4-2-ops-guide-docker-install/index.html b/site/docs/ops-guide/4-2-ops-guide-docker-install/index.html index c396e270..9357ee99 100644 --- a/site/docs/ops-guide/4-2-ops-guide-docker-install/index.html +++ b/site/docs/ops-guide/4-2-ops-guide-docker-install/index.html @@ -5,7 +5,7 @@ 4.2 Docker Install | drand - + diff --git a/site/docs/ops-guide/4-3-ops-guide-storage-backends/index.html b/site/docs/ops-guide/4-3-ops-guide-storage-backends/index.html index 869ac98d..d1ae4046 100644 --- a/site/docs/ops-guide/4-3-ops-guide-storage-backends/index.html +++ b/site/docs/ops-guide/4-3-ops-guide-storage-backends/index.html @@ -5,7 +5,7 @@ 4.3 Storage Backends | drand - + diff --git a/site/docs/ops-guide/4-4-ops-guide-metrics-guide/index.html b/site/docs/ops-guide/4-4-ops-guide-metrics-guide/index.html index 4ae5239d..58cbd8ab 100644 --- a/site/docs/ops-guide/4-4-ops-guide-metrics-guide/index.html +++ b/site/docs/ops-guide/4-4-ops-guide-metrics-guide/index.html @@ -5,7 +5,7 @@ 4.4 Metrics Guide | drand - + diff --git a/site/docs/ops-guide/4-5-ops-guide-command-line-tools/index.html b/site/docs/ops-guide/4-5-ops-guide-command-line-tools/index.html index b2434e29..4a923e67 100644 --- a/site/docs/ops-guide/4-5-ops-guide-command-line-tools/index.html +++ b/site/docs/ops-guide/4-5-ops-guide-command-line-tools/index.html @@ -5,7 +5,7 @@ 4.5 Command-line Tools | drand - + diff --git a/site/index.html b/site/index.html index d521437f..9ffffae7 100644 --- a/site/index.html +++ b/site/index.html @@ -5,7 +5,7 @@ Hello from drand | drand - +