From 79fa605b8b380543a899717bf4181737806f9f92 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 12:38:44 +0000 Subject: [PATCH] deploy: c2747b6800c53e338ca15b85b77cd3fa10a68956 --- 404.html | 6 +- assets/css/styles.22b4bed8.css | 1 - assets/css/styles.7a62cfd7.css | 1 + assets/js/17896441.42e6a557.js | 1 + assets/js/17896441.e236b039.js | 1 - ...4f307.9bd0214b.js => 1bd4f307.a1bf2bd1.js} | 2 +- ...93b7f.abae1908.js => 1df93b7f.b7288a4e.js} | 2 +- ...7ab3c.fb005066.js => 2247ab3c.ad5b333a.js} | 2 +- ...ecf53.ee7cbd31.js => 325ecf53.f35ec452.js} | 2 +- ...db7ed.21077410.js => 360db7ed.555a8f39.js} | 2 +- assets/js/3d7f047f.39dd8d67.js | 1 + ...5f356.d81054d5.js => 4145f356.4e6f7086.js} | 2 +- assets/js/424.d75c87bd.js | 1 + ...aab47.808867b2.js => 44baab47.7f86ed28.js} | 2 +- ...5b4ac.9676d666.js => 4a45b4ac.30dd3c94.js} | 2 +- ...e95c1.f52e93c8.js => 4dce95c1.778f8eeb.js} | 2 +- ...da744.f9b1a578.js => 54fda744.312003dc.js} | 2 +- ...f90bd.945d8144.js => 5dbf90bd.be63ad9b.js} | 2 +- ...7b1bc.3388f3ca.js => 5ee7b1bc.3c674928.js} | 2 +- ...c4dd6.fb371316.js => 631c4dd6.45a76bba.js} | 2 +- assets/js/65413b96.b07b637b.js | 1 + assets/js/682fa153.3f3c617d.js | 1 + assets/js/682fa153.712692bd.js | 1 - ...a886b.3a5db5b8.js => 690a886b.1d88a69d.js} | 2 +- assets/js/6c4d1ce4.2a25b2ac.js | 1 - assets/js/6c4d1ce4.511d37fd.js | 1 + assets/js/8fa65b9b.54dda381.js | 1 - assets/js/8fa65b9b.fc6feb2e.js | 1 + assets/js/935f2afb.8465bfb8.js | 1 - assets/js/935f2afb.d1af0839.js | 1 + assets/js/9a6c79a7.a50f64a6.js | 1 - assets/js/9a6c79a7.f731ae22.js | 1 + assets/js/9c63e866.37568838.js | 1 + assets/js/a205f28c.840ef738.js | 1 - assets/js/a205f28c.9ae846b7.js | 1 + assets/js/a824b7a4.cc0b4638.js | 1 + assets/js/b1c18118.a262dc00.js | 1 + ...ab648.ac0908f2.js => be8ab648.c3c6e502.js} | 2 +- assets/js/c279c4ab.1099f011.js | 1 - assets/js/c279c4ab.e32bc3b8.js | 1 + assets/js/d001ba2d.792f90bd.js | 1 - ...2e2a8.a383a182.js => d8a2e2a8.eeee6111.js} | 2 +- ...4a8bd.08ac44e5.js => e294a8bd.69c9892d.js} | 2 +- ...5a640.0f0fb28b.js => f855a640.333db3eb.js} | 2 +- assets/js/main.6a679006.js | 2 + ...CENSE.txt => main.6a679006.js.LICENSE.txt} | 0 assets/js/main.926e778e.js | 2 - assets/js/runtime~main.8eee3021.js | 1 - assets/js/runtime~main.c05d3063.js | 1 + docs/Node/index.html | 73 +------ docs/Node/run-mainnet-node/index.html | 39 ++++ docs/Node/run-public-rpc-node/index.html | 54 +++++ docs/Node/run-testnet-node/index.html | 40 ++++ .../common-script-error-code/index.html | 12 +- docs/Script/index.html | 10 +- docs/Script/intro-to-script/index.html | 12 +- docs/Script/js-script/index.html | 190 ++++++++++++++++++ docs/Script/minimal-script/index.html | 107 ++++++++++ .../program-language-for-script/index.html | 10 +- docs/Script/write-script/index.html | 106 ---------- docs/concepts/cell-model/index.html | 10 +- docs/concepts/ckb-vm/index.html | 10 +- docs/concepts/consensus/index.html | 10 +- docs/concepts/economics/index.html | 10 +- docs/concepts/glossary/index.html | 60 +++--- docs/concepts/index.html | 10 +- docs/concepts/nervos-blockchain/index.html | 10 +- docs/ecosystem/index.html | 10 +- docs/getting-started/create-dob/index.html | 38 ++-- docs/getting-started/create-token/index.html | 42 ++-- .../dev-environment/index.html | 56 +++--- docs/getting-started/devtool/index.html | 10 +- docs/getting-started/index.html | 14 +- docs/getting-started/transfer-ckb/index.html | 50 ++--- docs/getting-started/write-message/index.html | 42 ++-- docs/rpcs/index.html | 30 +-- docs/wallets/index.html | 10 +- homeContents/index.html | 6 +- index.html | 8 +- search-index-docs-default-current.json | 2 +- search/index.html | 6 +- sitemap.xml | 2 +- svg/icon-sidebar-resource.svg | 6 + 83 files changed, 728 insertions(+), 450 deletions(-) delete mode 100644 assets/css/styles.22b4bed8.css create mode 100644 assets/css/styles.7a62cfd7.css create mode 100644 assets/js/17896441.42e6a557.js delete mode 100644 assets/js/17896441.e236b039.js rename assets/js/{1bd4f307.9bd0214b.js => 1bd4f307.a1bf2bd1.js} (99%) rename assets/js/{1df93b7f.abae1908.js => 1df93b7f.b7288a4e.js} (54%) rename assets/js/{2247ab3c.fb005066.js => 2247ab3c.ad5b333a.js} (99%) rename assets/js/{325ecf53.ee7cbd31.js => 325ecf53.f35ec452.js} (99%) rename assets/js/{360db7ed.21077410.js => 360db7ed.555a8f39.js} (98%) create mode 100644 assets/js/3d7f047f.39dd8d67.js rename assets/js/{4145f356.d81054d5.js => 4145f356.4e6f7086.js} (98%) create mode 100644 assets/js/424.d75c87bd.js rename assets/js/{44baab47.808867b2.js => 44baab47.7f86ed28.js} (98%) rename assets/js/{4a45b4ac.9676d666.js => 4a45b4ac.30dd3c94.js} (99%) rename assets/js/{4dce95c1.f52e93c8.js => 4dce95c1.778f8eeb.js} (99%) rename assets/js/{54fda744.f9b1a578.js => 54fda744.312003dc.js} (98%) rename assets/js/{5dbf90bd.945d8144.js => 5dbf90bd.be63ad9b.js} (99%) rename assets/js/{5ee7b1bc.3388f3ca.js => 5ee7b1bc.3c674928.js} (99%) rename assets/js/{631c4dd6.fb371316.js => 631c4dd6.45a76bba.js} (97%) create mode 100644 assets/js/65413b96.b07b637b.js create mode 100644 assets/js/682fa153.3f3c617d.js delete mode 100644 assets/js/682fa153.712692bd.js rename assets/js/{690a886b.3a5db5b8.js => 690a886b.1d88a69d.js} (98%) delete mode 100644 assets/js/6c4d1ce4.2a25b2ac.js create mode 100644 assets/js/6c4d1ce4.511d37fd.js delete mode 100644 assets/js/8fa65b9b.54dda381.js create mode 100644 assets/js/8fa65b9b.fc6feb2e.js delete mode 100644 assets/js/935f2afb.8465bfb8.js create mode 100644 assets/js/935f2afb.d1af0839.js delete mode 100644 assets/js/9a6c79a7.a50f64a6.js create mode 100644 assets/js/9a6c79a7.f731ae22.js create mode 100644 assets/js/9c63e866.37568838.js delete mode 100644 assets/js/a205f28c.840ef738.js create mode 100644 assets/js/a205f28c.9ae846b7.js create mode 100644 assets/js/a824b7a4.cc0b4638.js create mode 100644 assets/js/b1c18118.a262dc00.js rename assets/js/{be8ab648.ac0908f2.js => be8ab648.c3c6e502.js} (98%) delete mode 100644 assets/js/c279c4ab.1099f011.js create mode 100644 assets/js/c279c4ab.e32bc3b8.js delete mode 100644 assets/js/d001ba2d.792f90bd.js rename assets/js/{d8a2e2a8.a383a182.js => d8a2e2a8.eeee6111.js} (99%) rename assets/js/{e294a8bd.08ac44e5.js => e294a8bd.69c9892d.js} (99%) rename assets/js/{f855a640.0f0fb28b.js => f855a640.333db3eb.js} (93%) create mode 100644 assets/js/main.6a679006.js rename assets/js/{main.926e778e.js.LICENSE.txt => main.6a679006.js.LICENSE.txt} (100%) delete mode 100644 assets/js/main.926e778e.js delete mode 100644 assets/js/runtime~main.8eee3021.js create mode 100644 assets/js/runtime~main.c05d3063.js create mode 100644 docs/Node/run-mainnet-node/index.html create mode 100644 docs/Node/run-public-rpc-node/index.html create mode 100644 docs/Node/run-testnet-node/index.html create mode 100644 docs/Script/js-script/index.html create mode 100644 docs/Script/minimal-script/index.html delete mode 100644 docs/Script/write-script/index.html create mode 100644 svg/icon-sidebar-resource.svg diff --git a/404.html b/404.html index 38cf648dc..2767cfe19 100644 --- a/404.html +++ b/404.html @@ -13,9 +13,9 @@ - - - + + +
Skip to main content

Page Not Found

Are you trying to visit broken links from old doc website?

Try https://docs-old.nervos.org/404

Or get help from discord
diff --git a/assets/css/styles.22b4bed8.css b/assets/css/styles.22b4bed8.css deleted file mode 100644 index b7a9c6a0c..000000000 --- a/assets/css/styles.22b4bed8.css +++ /dev/null @@ -1 +0,0 @@ -.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.aa-SubmitButton,.navbar__search-input{-webkit-appearance:none;-moz-appearance:none}.menu,.navbar-sidebar{overflow-x:hidden}.toggleButton_yw5v,html{-webkit-tap-highlight-color:transparent}:root,body.dark,body[data-theme=dark]{--aa-icon-color-rgb:119,119,163;--aa-scrollbar-thumb-background-color-rgb:var(--aa-background-color-rgb)}.aa-List,.clean-list,.containsTaskList_mC6p,.details_lb9f>summary,.dropdown__menu,.menu__list{list-style:none}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}*,.aa-Autocomplete *,.aa-DetachedFormContainer *,.aa-Panel *{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width);--ifm-spacing-horizontal:2rem}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:transparent;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_Gvgb,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-moz-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-moz-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.disabled-menu-link,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;top:0;left:0;visibility:hidden}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter);content:""}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.description_jBtF,.navbar__items--center .navbar__brand,.section_EoX_ a{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.cardContainer__ccT,.help-flex,.navbar-help{text-decoration:none!important}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::-moz-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-moz-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold)}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:var(--text-link);--ifm-background-color:var(--surface-01)!important;--ifm-hover-overlay:var(--hover);--ifm-heading-font-family:"Poppins-Bold",sans-serif;--ifm-heading-color:var(--text-primary);--ifm-font-family-base:"Lato",sans-serif;--ifm-font-color-base:var(--text-secondary);--ifm-font-family-monospace:"Space Mono",monospace;--ifm-container-width-xl:1022px;--ifm-hr-background-color:var(--border-subtle);--ifm-hr-margin-vertical:4rem;--ifm-navbar-background-color:var(--dark-surface-03);--ifm-navbar-height:64px;--doc-sidebar-width:322px!important;--ifm-sidebar-border-color:var(--border-subtle);--docsearch-modal-background:var(--surface-03)!important;--docsearch-footer-background:var(--surface-02)!important;--docsearch-border-color:var(--border-subtle)!important;--docsearch-placeholder-color:var(--text-tertiary)!important;--docsearch-muted-color:var(--text-tertiary)!important;--ifm-menu-color:var(--text-secondary);--ifm-menu-color-active:var(--text-link);--ifm-menu-color-background-active:var(--selected);--ifm-menu-color-background-hover:var(--hover);--ifm-menu-link-padding-horizontal:1rem;--ifm-menu-link-padding-vertical:0.4rem;--ifm-code-background:var(--surface-02);--ifm-code-border-radius:4px;--ifm-code-font-size:0.875rem;--docusaurus-highlighted-code-line-bg:var(--surface-03);--ifm-blockquote-border-color:var(--border-accent);--ifm-blockquote-border-width:2px;--ifm-toc-border-color:var(--border-subtle)!important;--ifm-toc-link-color:var(--text-tertiary);--ifm-link-color:var(--text-link);--ifm-table-border-color:var(--border-subtle);--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--aa-search-input-height:44px;--aa-input-icon-size:20px;--aa-base-unit:16;--aa-spacing-factor:1;--aa-spacing:calc(var(--aa-base-unit)*var(--aa-spacing-factor)*1px);--aa-spacing-half:calc(var(--aa-spacing)/2);--aa-panel-max-height:650px;--aa-base-z-index:9999;--aa-font-size:calc(var(--aa-base-unit)*1px);--aa-font-family:inherit;--aa-font-weight-medium:500;--aa-font-weight-semibold:600;--aa-font-weight-bold:700;--aa-icon-size:20px;--aa-icon-stroke-width:1.6;--aa-icon-color-alpha:1;--aa-action-icon-size:20px;--aa-text-color-rgb:38,38,39;--aa-text-color-alpha:1;--aa-primary-color-rgb:62,52,211;--aa-primary-color-alpha:0.2;--aa-muted-color-rgb:128,126,163;--aa-muted-color-alpha:0.6;--aa-panel-border-color-rgb:128,126,163;--aa-panel-border-color-alpha:0.3;--aa-input-border-color-rgb:128,126,163;--aa-input-border-color-alpha:0.8;--aa-background-color-rgb:255,255,255;--aa-background-color-alpha:1;--aa-input-background-color-rgb:255,255,255;--aa-input-background-color-alpha:1;--aa-selected-color-rgb:179,173,214;--aa-selected-color-alpha:0.205;--aa-description-highlight-background-color-rgb:245,223,77;--aa-description-highlight-background-color-alpha:0.5;--aa-detached-media-query:(max-width:680px);--aa-detached-modal-media-query:(min-width:680px);--aa-detached-modal-max-width:680px;--aa-detached-modal-max-height:500px;--aa-overlay-color-rgb:115,114,129;--aa-overlay-color-alpha:0.4;--aa-panel-shadow:0 0 0 1px rgba(35,38,59,.1),0 6px 16px -4px rgba(35,38,59,.15);--aa-scrollbar-width:13px;--aa-scrollbar-track-background-color-rgb:234,234,234;--aa-scrollbar-track-background-color-alpha:1;--aa-scrollbar-thumb-background-color-alpha:1}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}@font-face{font-family:Poppins-Bold;src:url(/assets/fonts/Poppins-Bold-404e299be26d78e6679447ea7cb2d41f.ttf) format("truetype")}@font-face{font-family:Lato;src:url(/assets/fonts/Lato-Regular-9919edff6283018571add043109dc20b.ttf) format("truetype")}.navbar{align-items:center;padding:0 1.5rem}.navbar-search .DocSearch-Button,.navbar-search .aa-DetachedSearchButton{background-color:transparent;border:1px solid var(--dark-border-subtle);border-radius:40px;height:3rem;margin-right:.5rem;padding:0 1rem;width:280px}.navbar-search .DocSearch-Button:hover,.navbar-search .aa-DetachedSearchButton:hover{background-color:var(--dark-hover)!important;border:1px solid var(--dark-border-accent);box-shadow:none!important}.DocSearch-Button .DocSearch-Search-Icon,.aa-DetachedSearchButton .aa-DetachedSearchButtonIcon{color:var(--dark-text-tertiary)!important}.DocSearch-Button-Placeholder,.aa-DetachedSearchButtonPlaceholder{color:var(--dark-text-tertiary)}.DocSearch-Button-Key{background:var(--dark-surface-02)!important;box-shadow:none!important;color:var(--dark-text-secondary)!important;font-size:.75rem!important;height:1.5rem!important;margin-right:-.5rem!important;padding:0!important;width:1.5rem!important}.aa-ClearButton,.aa-Label svg,.disabled-menu-link>.menu__link{color:var(--text-tertiary)!important}.aa-DetachedFormContainer{background-color:var(--surface-02)!important;border-bottom:var(--border-subtle)}.aa-DetachedContainer,.aa-DetachedContainer .aa-Panel{background-color:var(--surface-02)!important;background:var(--surface-02)!important}.aa-Form{background-color:transparent!important;border:1px solid var(--border-subtle)!important}.aa-Form:hover{background-color:var(--hover)!important}.aa-Form:focus,.aa-Form:focus-within{border:1px solid var(--border-accent)!important;box-shadow:none!important}.aa-Input{color:var(--text-primary)!important}.aa-Input::-webkit-input-placeholder{color:var(--text-tertiary)!important}.navbar-help{border:1px solid var(--dark-border-subtle);border-radius:40px;cursor:pointer;height:3rem;margin-right:1rem;padding:0 1rem 0 .75rem!important}.navbar-help:hover{background-color:var(--dark-hover)}.help-flex{align-items:center;color:var(--dark-text-primary);display:flex;height:100%;justify-content:center}.help-text{margin:0 0 0 .5rem}.menu{padding:.5rem!important}.menu__link,.menu__list-item-collapsible{border-radius:20px!important;height:2.5rem}.menu__link--active,h1,h2,h3,h4{font-weight:700}.disabled-menu-link{cursor:none}.disabled-menu-link>.menu__link--active{background-color:transparent}.menu__list .menu__list{padding-left:calc(var(--ifm-menu-link-padding-horizontal) + 1.25em)}.theme-doc-sidebar-menu>li:first-child>div>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0yMy41ODIgNC45NzVhLjkxLjkxIDAgMCAwLS42NDgtLjY0NyAxMC4yMTYgMTAuMjE2IDAgMCAwLTEwLjM2NyAzLjI5bC0xLjAxMiAxLjIwMS0yLjM2NS0uNTdBMi41MjIgMi41MjIgMCAwIDAgNi4xMTUgOS40OGwtMS45OTggMy41NDFhLjkwOC45MDggMCAwIDAgLjYgMS4zMzRsMi43OS41OThjLS4yMzYuNzItLjQwNCAxLjQ2LS41MDMgMi4yMWEuOTA4LjkwOCAwIDAgMCAuMjU4Ljc2bDIuODE1IDIuODE0YS45MDUuOTA1IDAgMCAwIC43Mi4yNjIgMTEuMDQ2IDExLjA0NiAwIDAgMCAyLjI2My0uNDQ0bC41ODQgMi43MjZhLjkwOS45MDkgMCAwIDAgMS4zMzQuNjAxbDMuNTQ2LTJhMi43NTYgMi43NTYgMCAwIDAgMS4yNDgtM2wtLjYwNy0yLjUwNCAxLjEyMy0xLjAzM2ExMC4xNzIgMTAuMTcyIDAgMCAwIDMuMjk0LTEwLjM3Wk02LjMwNSAxMi44NGwxLjQxMy0yLjUwNmEuNzUuNzUgMCAwIDEgLjk3MS0uMzRsMS41Ni4zNzctLjU5LjcwMWMtLjU2LjY3LTEuMDQ0IDEuNC0xLjQ0NCAyLjE3N2wtMS45MS0uNDA5Wm0xMS4zMjIgNy40NjUtMi40NjYgMS4zOS0uMzktMS44MmMuNzktLjM5NCAxLjUyNy0uODg4IDIuMTkxLTEuNDdsLjY3NS0uNjIuMzY3IDEuNTFhLjk0NS45NDUgMCAwIDEtLjM3NyAxLjAxWm0xLjQ2Ni02LjMyNC0zLjM0NiAzLjA3NWE4Ljg3NCA4Ljg3NCAwIDAgMS00LjY5NCAyLjA5Mkw4Ljg3IDE2Ljk2NGE5LjkyNSA5LjkyNSAwIDAgMSAyLjE4LTQuNzI3bDEuNTI0LTEuODFhLjg3Ny44NzcgMCAwIDAgLjA3LS4wODNsMS4zMDMtMS41NDdhOC40MjMgOC40MjMgMCAwIDEgNy45OTktMi44MzMgOC4zNyA4LjM3IDAgMCAxLTIuODUzIDguMDE2Wm0tLjgzOC01LjU5NmExLjM2MiAxLjM2MiAwIDEgMCAwIDIuNzIzIDEuMzYyIDEuMzYyIDAgMCAwIDAtMi43MjNaIiBmaWxsPSIjMDdBOTcyIi8+PC9zdmc+);margin-right:.5rem;margin-top:.25rem}.theme-doc-sidebar-menu>li:nth-child(2)>div>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Im0yMC41MTQgOC41MTQtLjcwNy43MDcuNzA3LS43MDdabS0zLjQ3Mi0zLjQ3My43MDctLjcwNy0uNzA3LjcwN1pNOS41NTYgMjR2LTEgMVpNMTggMjR2MS0xWk02LjI0MiAyMi43ODdsLjg5MS0uNDU0LS44OS40NTRabS45NzEuOTcuNDU0LS44OS0uNDU0Ljg5Wm0wLTE5LjUxNS40NTQuODkxLS40NTQtLjg5Wm0tLjk3Ljk3MUw1LjM1IDQuNzZsLjg5MS40NTRabTkuOTk4LS44ODYtLjUyMy44NTMuNTIzLS44NTNabS0uNjQyLS4yNjYuMjMzLS45NzItLjIzMy45NzJabTUuODk1IDUuODk2Ljk3Mi0uMjMzLS45NzIuMjMzWm0tLjI2Ni0uNjQyLS44NTMuNTIyLjg1My0uNTIyWm0uMDg2IDEzLjQ3Mi44OS40NTQtLjg5LS40NTRabS0uOTcyLjk3LS40NTQtLjg5LjQ1NC44OVptLTMuNjM1LTkuMzUzYTEgMSAwIDAgMC0xLjQxNCAxLjQxNGwxLjQxNC0xLjQxNFptMS41MTUgMi45My43MDcuNzA2YTEgMSAwIDAgMCAwLTEuNDE0bC0uNzA3LjcwN1ptLTIuOTMgMS41MTRhMSAxIDAgMCAwIDEuNDE1IDEuNDE1bC0xLjQxNC0xLjQxNVptLTQuNDQ0IDEuNDE1YTEgMSAwIDAgMCAxLjQxNS0xLjQxNWwtMS40MTUgMS40MTVabS0xLjUxNS0yLjkzLS43MDctLjcwN2ExIDEgMCAwIDAgMCAxLjQxNGwuNzA3LS43MDdabTIuOTMtMS41MTVhMSAxIDAgMCAwLTEuNDE1LTEuNDE0bDEuNDE1IDEuNDE0Wm05LjI5My00LjE1MWExIDEgMCAxIDAgMC0ydjJabS0zLjExMS0xdi0xIDFaTTE1Ljg4OSA0YTEgMSAwIDEgMC0yIDBoMlptLjIxMyA2LjQyNC40NTQtLjg5LS40NTQuODlabS0uOTctLjk3Ljg5LS40NTUtLjg5LjQ1NFptNy40MjQgMTAuOTl2LTkuNDE2aC0ydjkuNDE3aDJaTTIxLjIyIDcuODA4IDE3Ljc1IDQuMzM0IDE2LjMzNSA1Ljc1bDMuNDcyIDMuNDcyIDEuNDE1LTEuNDE0Wk0xNC41MjcgM0g5LjU1NnYyaDQuOTcyVjNaTTUgNy41NTZ2MTIuODg5aDJWNy41NTVINVpNOS41NTYgMjVIMTh2LTJIOS41NTZ2MlpNNSAyMC40NDVjMCAuNjA1IDAgMS4xMi4wMzQgMS41NC4wMzUuNDMzLjExMi44NTQuMzE3IDEuMjU2bDEuNzgyLS45MDhjLS4wMzctLjA3NC0uMDgtLjIwMi0uMTA2LS41MS0uMDI2LS4zMi0uMDI3LS43NC0uMDI3LTEuMzc4SDVaTTkuNTU2IDIzYy0uNjM5IDAtMS4wNTggMC0xLjM3OS0uMDI3LS4zMDgtLjAyNS0uNDM3LS4wNjktLjUxLS4xMDZsLS45MDggMS43ODJjLjQwMi4yMDUuODIzLjI4MiAxLjI1Ni4zMTcuNDIuMDM1LjkzNS4wMzQgMS41NC4wMzR2LTJabS00LjIwNS4yNGMuMzA5LjYwNy44MDIgMS4xIDEuNDA4IDEuNDA5bC45MDgtMS43ODJhMS4yMjIgMS4yMjIgMCAwIDEtLjUzNC0uNTM0bC0xLjc4Mi45MDhaTTkuNTU2IDNjLS42MDYgMC0xLjEyIDAtMS41NDEuMDM0LS40MzMuMDM1LS44NTQuMTEyLTEuMjU2LjMxN2wuOTA4IDEuNzgyYy4wNzMtLjAzNy4yMDEtLjA4LjUxLS4xMDYuMzItLjAyNi43NC0uMDI3IDEuMzc5LS4wMjdWM1pNNyA3LjU1NmMwLS42NCAwLTEuMDU4LjAyNy0xLjM3OS4wMjUtLjMwOC4wNjktLjQzNi4xMDYtLjUxTDUuMzUxIDQuNzZjLS4yMDUuNDAzLS4yODIuODIzLS4zMTcgMS4yNTYtLjAzNS40Mi0uMDM0LjkzNS0uMDM0IDEuNTRoMlpNNi43NiAzLjM1Yy0uNjA3LjMxLTEuMS44MDItMS40MDkgMS40MDhsMS43ODIuOTA4Yy4xMTgtLjIzLjMwNC0uNDE3LjUzNC0uNTM0TDYuNzYgMy4zNTFabTEwLjk4OS45ODNjLS4zNTEtLjM1LS42MzctLjY0Ni0uOTg2LS44NkwxNS43MTggNS4xOGMuMS4wNjEuMTk5LjE1LjYxNy41NjlsMS40MTQtMS40MTVaTTE0LjUyOCA1Yy41OSAwIC43MjMuMDA2LjgzNy4wMzRsLjQ2Ny0xLjk0NUMxNS40MzQgMi45OTQgMTUuMDIzIDMgMTQuNTI3IDN2MlptMi4yMzUtMS41MjVhMy4yMjIgMy4yMjIgMCAwIDAtLjkzLS4zODZsLS40NjggMS45NDVjLjEyNS4wMy4yNDQuMDguMzUzLjE0NmwxLjA0NS0xLjcwNVptNS43OTMgNy41NTNjMC0uNDk3LjAwNS0uOTA3LS4wOS0xLjMwNGwtMS45NDUuNDY3Yy4wMjguMTE0LjAzNS4yNDguMDM1LjgzN2gyWm0tMi43NDktMS44MDdjLjQxNy40MTcuNTA3LjUxNi41NjguNjE2bDEuNzA2LTEuMDQ1Yy0uMjE0LS4zNDgtLjUwOC0uNjMzLS44Ni0uOTg1bC0xLjQxNCAxLjQxNFptMi42Ni41MDNhMy4yMjQgMy4yMjQgMCAwIDAtLjM4Ni0uOTMybC0xLjcwNiAxLjA0NWMuMDY3LjExLjExNi4yMjkuMTQ2LjM1NGwxLjk0NS0uNDY3Wm0tMS45MTEgMTAuNzJjMCAuNjQtLjAwMSAxLjA1OC0uMDI3IDEuMzc5LS4wMjYuMzA4LS4wNy40MzYtLjEwNi41MWwxLjc4Mi45MDhjLjIwNS0uNDAzLjI4Mi0uODIzLjMxNy0xLjI1Ni4wMzQtLjQyLjAzNC0uOTM1LjAzNC0xLjU0aC0yWk0xOCAyNWMuNjA2IDAgMS4xMiAwIDEuNTQxLS4wMzQuNDMyLS4wMzUuODUzLS4xMTIgMS4yNTUtLjMxN2wtLjkwOC0xLjc4MmMtLjA3My4wMzctLjIwMS4wOC0uNTEuMTA2LS4zMi4wMjYtLjczOS4wMjctMS4zNzguMDI3djJabTIuNDIzLTIuNjY3Yy0uMTE3LjIzLS4zMDUuNDE2LS41MzUuNTM0bC45MDggMS43ODJhMy4yMjQgMy4yMjQgMCAwIDAgMS40MDktMS40MDhsLTEuNzgyLS45MDhabS01LjEzLTYuNTE1IDIuMjIyIDIuMjIyIDEuNDE0LTEuNDE0LTIuMjIyLTIuMjIyLTEuNDE0IDEuNDE0Wm0yLjIyMi44MDgtMi4yMjIgMi4yMjIgMS40MTQgMS40MTUgMi4yMjItMi4yMjMtMS40MTQtMS40MTRabS01LjI1MiAyLjIyMi0yLjIyMy0yLjIyMi0xLjQxNCAxLjQxNCAyLjIyMiAyLjIyMyAxLjQxNS0xLjQxNVptLTIuMjIzLS44MDggMi4yMjMtMi4yMjItMS40MTUtMS40MTQtMi4yMjIgMi4yMjIgMS40MTQgMS40MTRabTExLjUxNi04LjM3M2gtMy4xMTF2MmgzLjExdi0yWk0xNS44ODkgNy4xMVY0aC0ydjMuMTExaDJabTIuNTU2IDIuNTU2Yy0uNjQgMC0xLjA1OC0uMDAxLTEuMzc5LS4wMjctLjMwOS0uMDI2LS40MzctLjA3LS41MS0uMTA3bC0uOTA4IDEuNzgyYy40MDIuMjA1LjgyMy4yODMgMS4yNTYuMzE4LjQyLjAzNC45MzUuMDM0IDEuNTQuMDM0di0yWk0xMy44ODkgNy4xMWMwIC42MDYgMCAxLjEyLjAzNCAxLjU0MS4wMzUuNDMyLjExMi44NTMuMzE3IDEuMjU1TDE2LjAyMiA5Yy0uMDM3LS4wNzMtLjA4LS4yMDEtLjEwNi0uNTEtLjAyNi0uMzItLjAyNy0uNzQtLjAyNy0xLjM3OGgtMlptMi42NjcgMi40MjJBMS4yMjIgMS4yMjIgMCAwIDEgMTYuMDIyIDlsLTEuNzgyLjkwOGMuMzA5LjYwNi44MDEgMS4xIDEuNDA4IDEuNDA4bC45MDgtMS43ODJaIiBmaWxsPSIjMDdBOTcyIi8+PC9zdmc+);margin-right:.5em;margin-top:.25em}.theme-doc-sidebar-menu>li:nth-child(3)>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0yMSA5aC0xVjhhMyAzIDAgMCAwLTMtM0g3YTMgMyAwIDAgMC0zIDN2MTJhMyAzIDAgMCAwIDMgM2gxNGEzIDMgMCAwIDAgMy0zdi04YTMgMyAwIDAgMC0zLTNaTTcgN2gxMGExIDEgMCAwIDEgMSAxdjFIN2ExIDEgMCAwIDEgMC0yWm0xNSAxMGgtMWExIDEgMCAwIDEgMC0yaDF2MlptMC00aC0xYTMgMyAwIDAgMCAwIDZoMXYxYTEgMSAwIDAgMS0xIDFIN2ExIDEgMCAwIDEtMS0xdi05LjE3QTMgMyAwIDAgMCA3IDExaDE0YTEgMSAwIDAgMSAxIDF2MVoiIGZpbGw9IiMwN0E5NzIiLz48L3N2Zz4=);margin-right:.5em;margin-top:.25em}.theme-doc-sidebar-menu>li:nth-child(4)>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0yMy4wMjIgMjAuMDE5aC02LjE4N2EzLjAwNSAzLjAwNSAwIDAgMC0xLjgyMi0xLjgyMnYtMy4xODRoNy4wMDhhMSAxIDAgMSAwIDAtMi4wMDJIMjEuMDJWNy4wMDRBMy4wMDMgMy4wMDMgMCAwIDAgMTguMDE3IDRoLTguMDFhMy4wMDQgMy4wMDQgMCAwIDAtMy4wMDMgMy4wMDR2Ni4wMDdINi4wMDJhMS4wMDEgMS4wMDEgMCAwIDAgMCAyLjAwMmg3LjAwOXYzLjE4NGEzLjAwNSAzLjAwNSAwIDAgMC0xLjgyMiAxLjgyMkg1YTEuMDAxIDEuMDAxIDAgMCAwIDAgMi4wMDJoNi4xODdhMy4wMDMgMy4wMDMgMCAwIDAgNS42NDcgMGg2LjE4N2ExLjAwMSAxLjAwMSAwIDAgMCAwLTIuMDAyWk05LjAwNiAxMy4wMVY3LjAwNGExLjAwMSAxLjAwMSAwIDAgMSAxLjAwMS0xLjAwMmg4LjAxYTEuMDAxIDEuMDAxIDAgMCAxIDEgMS4wMDJ2Ni4wMDdIOS4wMDdabTUuMDA2IDkuMDFhMS4wMDEgMS4wMDEgMCAxIDEgMC0yLjAwMiAxLjAwMSAxLjAwMSAwIDAgMSAwIDIuMDAyWiIgZmlsbD0iIzA3QTk3MiIvPjwvc3ZnPg==);margin-right:.5rem;margin-top:.25rem}.theme-doc-sidebar-menu>li:nth-child(5)>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0xOC45ODUgOC4wODdhOC43NjYgOC43NjYgMCAwIDEgMy42NzggNi4yMzhNNS40NDggMTQuMzc1YTguNzM5IDguNzM5IDAgMCAxIDMuNjE4LTYuMjM3TTEwLjE3IDIzLjA2N2E4LjUwNSA4LjUwNSAwIDAgMCAzLjg5LjkzMyA4LjQ1NSA4LjQ1NSAwIDAgMCAzLjc1LS44NjJNMTQuMDYgOS42MzljMS41NDQgMCAyLjc5NS0xLjI2MiAyLjc5NS0yLjgyQzE2Ljg1NSA1LjI2MiAxNS42MDQgNCAxNC4wNiA0Yy0xLjU0MyAwLTIuNzk0IDEuMjYyLTIuNzk0IDIuODIgMCAxLjU1NyAxLjI1IDIuODE5IDIuNzk0IDIuODE5Wk02Ljc5NCAyMi4wMzJjMS41NDMgMCAyLjc5NC0xLjI2MiAyLjc5NC0yLjgxOXMtMS4yNS0yLjgyLTIuNzk0LTIuODJDNS4yNTEgMTYuMzk0IDQgMTcuNjU3IDQgMTkuMjE0czEuMjUgMi44MiAyLjc5NCAyLjgyWk0yMS4yMDYgMjIuMDMyYzEuNTQzIDAgMi43OTQtMS4yNjIgMi43OTQtMi44MTlzLTEuMjUtMi44Mi0yLjc5NC0yLjgyYy0xLjU0MyAwLTIuNzk0IDEuMjYzLTIuNzk0IDIuODJzMS4yNTEgMi44MiAyLjc5NCAyLjgyWiIgc3Ryb2tlPSIjMDdBOTcyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==);margin-right:.5rem;margin-top:.25rem}.theme-doc-sidebar-menu>li:nth-child(6)>div>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0xOC45IDUuNjU2YTcuMjczIDcuMjczIDAgMCAwLTYuMDczLTEuNTEgNy4yNzIgNy4yNzIgMCAwIDAtNS43IDUuNzQ2IDcuMzM2IDcuMzM2IDAgMCAwIDEuNTY0IDYuMDQ1IDQuMTI3IDQuMTI3IDAgMCAxIDEuMDM2IDIuNjA5djIuNzI3QTIuNzI3IDIuNzI3IDAgMCAwIDEyLjQ1NCAyNGgzLjYzNmEyLjcyNyAyLjcyNyAwIDAgMCAyLjcyNy0yLjcyN3YtMi41NTVhNC43IDQuNyAwIDAgMSAxLjExLTIuOSA3LjI3MyA3LjI3MyAwIDAgMC0xLjAyOC0xMC4xOHYuMDE4Wk0xNyAyMS4yNzNhLjkwOS45MDkgMCAwIDEtLjkxLjkwOWgtMy42MzZhLjkwOS45MDkgMCAwIDEtLjkwOS0uOTF2LS45MDhIMTd2LjkwOVptMS41MTctNi41ODJBNi40OCA2LjQ4IDAgMCAwIDE3IDE4LjU0NmgtMS44MTh2LTIuNzI3YS45MDkuOTA5IDAgMCAwLTEuODE4IDB2Mi43MjdoLTEuODE4YTUuOTA4IDUuOTA4IDAgMCAwLTEuNDU0LTMuNzgyIDUuNDU0IDUuNDU0IDAgMCAxIDMuMDgxLTguODM2IDUuNDU0IDUuNDU0IDAgMCAxIDYuNTU1IDUuMzQ2IDUuMzU1IDUuMzU1IDAgMCAxLTEuMjEgMy40MThaIiBmaWxsPSIjMDdBOTcyIi8+PC9zdmc+);margin-right:.5rem;margin-top:.25rem}.theme-doc-sidebar-menu>li:nth-child(7)>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTEuODE2IDYuMzI0YTguMSA4LjEgMCAwIDAtNS43NTUgNi43NjdoMy40NDZhMTQuOTEgMTQuOTEgMCAwIDEgMi4zMDktNi43NjdabTQuNTUgMGExNC45MSAxNC45MSAwIDAgMSAyLjMwOCA2Ljc2N2gzLjQ0N2E4LjEgOC4xIDAgMCAwLTUuNzU1LTYuNzY3Wm0uMyA2Ljc2N2ExMi45MSAxMi45MSAwIDAgMC0yLjU3NS02LjUzMiAxMi45MSAxMi45MSAwIDAgMC0yLjU3NSA2LjUzMmg1LjE1Wm0tNS4xNSAyaDUuMTVhMTIuOTEgMTIuOTEgMCAwIDEtMi41NzUgNi41MzIgMTIuOTEgMTIuOTEgMCAwIDEtMi41NzUtNi41MzJabS0yLjAwOSAwSDYuMDYxYTguMSA4LjEgMCAwIDAgNS43NTUgNi43NjcgMTQuOTEgMTQuOTEgMCAwIDEtMi4zMDktNi43NjdabTYuODYgNi43NjdhMTQuOTEgMTQuOTEgMCAwIDAgMi4zMDctNi43NjdoMy40NDdhOC4xIDguMSAwIDAgMS01Ljc1NSA2Ljc2N1ptLTIuMjc2IDIuMzI0YzUuNTczIDAgMTAuMDktNC41MTggMTAuMDktMTAuMDkxQzI0LjE4MiA4LjUxOCAxOS42NjUgNCAxNC4wOTIgNCA4LjUxOCA0IDQgOC41MTggNCAxNC4wOWMwIDUuNTc0IDQuNTE4IDEwLjA5MiAxMC4wOSAxMC4wOTJaIiBmaWxsPSIjMDdBOTcyIi8+PC9zdmc+);margin-right:.5rem;margin-top:.25rem}.menu__caret{border-radius:50%}.footer>.container{padding-bottom:2rem!important;padding-top:2rem!important}.footer__copyright{font-size:.875em}.table-of-contents{margin-top:3rem;padding:0 0 0 1rem}.table-of-contents__link{font-size:.875rem}.container{padding-bottom:7.5rem!important}.pagination-nav__link{border:1px solid var(--border-subtle);border-radius:8px}.pagination-nav__sublabel{color:var(--text-tertiary);margin-bottom:.5rem}.pagination-nav__label{color:var(--text-primary);font-size:1.25rem}.tabs,.theme-last-updated{color:var(--text-tertiary)}.pagination-nav__link--next .pagination-nav__label:after,.pagination-nav__link--prev .pagination-nav__label:before{content:none}button,h1,h2,h3{line-height:1.2}h4{line-height:1.4}button,h4{font-family:Lato,sans-serif}blockquote,ol,p,ul{font-size:1rem;font-weight:400;line-height:1.7;margin:1rem 0}.markdown>h1,h1{font-size:2.5rem;margin:3rem 0 2rem}.markdown>h2,h2{font-size:1.75rem;margin:3.5rem 0 1.5rem}.markdown>h3,h3{font-size:1.5rem;margin:2rem 0 1.5rem}.markdown>h4,h4{font-size:1.25rem;margin-bottom:1rem}pre>code{border:1px solid var(--border-subtle);box-shadow:none;line-height:1.7!important}.markdown video{padding:1rem 0}.tabs{border-bottom:1px solid var(--border-subtle);font-weight:400}.tabs__item{border-radius:4px 4px 0 0;margin-right:2rem;padding:.5rem}.tabs__item--active{font-weight:700}.theme-last-updated{font-size:.75rem;font-style:normal}.theme-edit-this-page{font-size:.75rem}.aa-ClearButton[hidden],.aa-ItemContent:empty,.aa-LoadingIndicator[hidden],.aa-Source:empty,.aa-SourceHeader:empty,.docSidebarContainer_YfHR,.sidebarLogo_isFc,.theme-edit-this-page>svg,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_SFTY,[data-theme=light] .darkToggleIcon_ekgs,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.alert{border:1px solid var(--ifm-alert-border-color)}.alert--secondary{--ifm-alert-background-color:var(--alert-secondary-bg);--ifm-alert-border-color:var(--alert-secondary)}.alert--success{--ifm-alert-background-color:var(--alert-success-bg);--ifm-alert-border-color:var(--alert-success)}.alert--info{--ifm-alert-background-color:var(--alert-info-bg);--ifm-alert-border-color:var(--alert-info)}.alert--warning{--ifm-alert-background-color:var(--alert-warning-bg);--ifm-alert-border-color:var(--alert-warning)}.alert--danger{--ifm-alert-background-color:var(--alert-danger-bg);--ifm-alert-border-color:var(--alert-danger)}details{--ifm-alert-border-color:var(--alert-success)!important;--ifm-alert-background-color:var(--alert-success-bg)!important}.footer{--ifm-footer-background-color:var(--dark-surface-03);--ifm-footer-title-color:var(--dark-text-primary);--ifm-footer-link-color:var(--dark-text-secondary)}#oldSiteLink{align-items:center;background-color:var(--dark-surface-02);color:var(--dark-text-secondary);display:flex;height:2.5rem;justify-content:center;width:100%;z-index:9999}#oldSiteLink a,.textHighlight_ic0t{color:var(--dark-text-link)}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.description_qXLp,.links_KO_M,.links_hvUO,.tagList_EW4E,.title_ZEhm,.title_aezp{margin-bottom:.5rem}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}.cardContainer__ccT{border:1px solid var(--border-subtle);border-radius:20px;color:var(--text-secondary)!important;cursor:pointer;display:flex;padding:1.5rem 1rem;width:100%}.aa-ItemLink,.aa-SourceFooterSeeAll{-webkit-text-decoration:none;text-decoration:none}.cardContainer_OeIU:hover,.cardContainer__ccT:hover,.cardContainer_bFxw:hover{background-color:var(--hover);border:1px solid var(--border-accent)}.iconContainer_RJI0{align-items:center;background-color:var(--surface-02);border-radius:50%;display:flex;height:2rem;justify-content:center;min-width:2rem;width:2rem}.rightContainer_HZnY{display:flex;flex-direction:column;margin-left:1rem}.links_KO_M{display:flex;flex-wrap:wrap}.links_KO_M>a:not(:last-child){margin-right:1rem}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit;text-decoration:underline}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.aa-Form,.toggleButton_yw5v{align-items:center;width:100%}.toggle_MW0i{border:1px solid var(--dark-border-subtle);border-radius:50%;height:3rem;width:3rem}.toggleButton_yw5v{border-radius:50%;color:var(--dark-text-secondary);display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast)}.toggleButton_yw5v:hover{background:var(--hover)}.toggleButtonDisabled_BJd7{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_PEFL{display:none;margin:0}.iconExternalLink_nPIU{margin-left:.3rem}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}body.dark,body[data-theme=dark]{--aa-text-color-rgb:183,192,199;--aa-primary-color-rgb:146,138,255;--aa-muted-color-rgb:146,138,255;--aa-input-background-color-rgb:0,3,9;--aa-background-color-rgb:21,24,42;--aa-selected-color-rgb:146,138,255;--aa-selected-color-alpha:0.25;--aa-description-highlight-background-color-rgb:0 255 255;--aa-description-highlight-background-color-alpha:0.25;--aa-panel-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--aa-scrollbar-track-background-color-rgb:44,46,64;--aa-muted-color-alpha:1}.aa-Autocomplete,.aa-DetachedFormContainer,.aa-Panel{color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font-family:inherit;font-family:var(--aa-font-family);font-size:16px;font-size:var(--aa-font-size);font-weight:400;line-height:1em;margin:0;padding:0;text-align:left}.aa-Form{background-color:rgba(var(--aa-input-background-color-rgb),var(--aa-input-background-color-alpha));border:1px solid rgba(128,126,163,.8);border:1px solid rgba(var(--aa-input-border-color-rgb),var(--aa-input-border-color-alpha));border-radius:3px;display:flex;line-height:1em;margin:0;position:relative}.aa-ClearButton,.aa-Input,.aa-SubmitButton{border:0;background:none}.aa-Form:focus-within{border-color:#3e34d3;border-color:rgba(var(--aa-primary-color-rgb),1);box-shadow:0 0 0 2px rgba(62,52,211,.2),inset 0 0 0 2px rgba(62,52,211,.2);box-shadow:rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha)) 0 0 0 2px,inset rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha)) 0 0 0 2px;outline:currentColor}.aa-InputWrapperPrefix{align-items:center;display:flex;flex-shrink:0;height:44px;height:var(--aa-search-input-height);order:1}.aa-Label,.aa-LoadingIndicator{cursor:auto;flex-shrink:0;height:100%;padding:0;text-align:left}.aa-Label svg,.aa-LoadingIndicator svg{stroke-width:1.6;stroke-width:var(--aa-icon-stroke-width);color:#3e34d3;color:rgba(var(--aa-primary-color-rgb),1);height:auto;max-height:20px;max-height:var(--aa-input-icon-size);width:20px;width:var(--aa-input-icon-size)}.aa-LoadingIndicator,.aa-SubmitButton{height:100%;padding-left:11px;padding-left:calc(var(--aa-spacing)*.75 - 1px);padding-right:8px;padding-right:var(--aa-spacing-half);width:47px;width:calc(var(--aa-spacing)*1.75 + var(--aa-icon-size) - 1px)}.aa-SubmitButton{appearance:none;margin:0}.aa-LoadingIndicator{align-items:center;display:flex;justify-content:center}.aa-InputWrapper{order:3;position:relative;width:100%}.aa-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font:inherit;height:44px;height:var(--aa-search-input-height);padding:0;width:100%}.aa-Input::-moz-placeholder{color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));opacity:1}.aa-Input::placeholder{color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));opacity:1}.aa-Input:focus{border-color:none;box-shadow:none;outline:0}.aa-Input::-webkit-search-cancel-button,.aa-Input::-webkit-search-decoration,.aa-Input::-webkit-search-results-button,.aa-Input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.aa-InputWrapperSuffix{align-items:center;display:flex;height:44px;height:var(--aa-search-input-height);order:4}.aa-ClearButton{align-items:center;color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));cursor:pointer;display:flex;height:100%;margin:0;padding:0 12.83328px;padding:0 calc(var(--aa-spacing)*.83333 - .5px)}.aa-Item,.aa-ItemIcon{align-items:center;border-radius:3px}.aa-ClearButton:focus,.aa-ClearButton:hover,.aa-ItemActionButton:focus svg,.aa-ItemActionButton:hover svg{color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha))}.aa-ClearButton svg{stroke-width:1.6;stroke-width:var(--aa-icon-stroke-width);width:20px;width:var(--aa-icon-size)}.aa-Panel{background-color:#fff;background-color:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));border-radius:4px;border-radius:calc(var(--aa-spacing)/4);box-shadow:0 0 0 1px rgba(35,38,59,.1),0 6px 16px -4px rgba(35,38,59,.15);box-shadow:var(--aa-panel-shadow);margin:8px 0 0;overflow:hidden;position:absolute;transition:opacity .2s ease-in,filter .2s ease-in}.aa-Panel button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;margin:0;padding:0}.aa-PanelLayout{height:100%;margin:0;max-height:650px;max-height:var(--aa-panel-max-height);overflow-y:auto;padding:0;position:relative;text-align:left}.aa-PanelLayoutColumns--twoGolden{display:grid;grid-template-columns:39.2% auto;overflow:hidden;padding:0}.aa-PanelLayoutColumns--two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;padding:0}.aa-PanelLayoutColumns--three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:hidden;padding:0}.aa-Panel--stalled .aa-Source{filter:grayscale(1);opacity:.8}.aa-Panel--scrollable{margin:0;max-height:650px;max-height:var(--aa-panel-max-height);overflow-x:hidden;overflow-y:auto;padding:8px;padding:var(--aa-spacing-half);scrollbar-color:#fff #eaeaea;scrollbar-color:rgba(var(--aa-scrollbar-thumb-background-color-rgb),var(--aa-scrollbar-thumb-background-color-alpha)) rgba(var(--aa-scrollbar-track-background-color-rgb),var(--aa-scrollbar-track-background-color-alpha));scrollbar-width:thin}.aa-Panel--scrollable::-webkit-scrollbar{width:13px;width:var(--aa-scrollbar-width)}.aa-Panel--scrollable::-webkit-scrollbar-track{background-color:#eaeaea;background-color:rgba(var(--aa-scrollbar-track-background-color-rgb),var(--aa-scrollbar-track-background-color-alpha))}.aa-Panel--scrollable::-webkit-scrollbar-thumb{background-color:#fff;background-color:rgba(var(--aa-scrollbar-thumb-background-color-rgb),var(--aa-scrollbar-thumb-background-color-alpha));border:3px solid #eaeaea;border:3px solid rgba(var(--aa-scrollbar-track-background-color-rgb),var(--aa-scrollbar-track-background-color-alpha));border-radius:9999px;border-right-width:2px}.aa-Source{margin:0;padding:0;position:relative;width:100%}.aa-SourceNoResults{font-size:1em;margin:0;padding:16px;padding:var(--aa-spacing)}.aa-List{margin:0}.aa-List,.aa-SourceHeader{padding:0;position:relative}.aa-SourceHeader{margin:8px .5em 8px 0;margin:var(--aa-spacing-half) .5em var(--aa-spacing-half) 0}.aa-SourceHeaderTitle{background:#fff;background:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));color:#3e34d3;color:rgba(var(--aa-primary-color-rgb),1);display:inline-block;font-size:.8em;font-weight:600;font-weight:var(--aa-font-weight-semibold);margin:0;padding:0 8px 0 0;padding:0 var(--aa-spacing-half) 0 0;position:relative;z-index:9999;z-index:var(--aa-base-z-index)}.aa-SourceHeaderLine{border-bottom:1px solid #3e34d3;border-bottom:1px solid rgba(var(--aa-primary-color-rgb),1);display:block;height:2px;left:0;margin:0;opacity:.3;padding:0;position:absolute;right:0;top:8px;top:var(--aa-spacing-half);z-index:9998;z-index:calc(var(--aa-base-z-index) - 1)}.aa-SourceFooterSeeAll{background:linear-gradient(180deg,#fff,rgba(128,126,163,.14));background:linear-gradient(180deg,rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha)),rgba(128,126,163,.14));border:1px solid rgba(128,126,163,.6);border:1px solid rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));border-radius:5px;box-shadow:inset 0 0 2px #fff,0 2px 2px -1px rgba(76,69,88,.15);color:inherit;font-size:.95em;font-weight:500;font-weight:var(--aa-font-weight-medium);padding:.475em 1em .6em}.aa-SourceFooterSeeAll:focus,.aa-SourceFooterSeeAll:hover{border:1px solid #3e34d3;border:1px solid rgba(var(--aa-primary-color-rgb),1);color:#3e34d3;color:rgba(var(--aa-primary-color-rgb),1)}.aa-Item{cursor:pointer;display:grid;min-height:40px;min-height:calc(var(--aa-spacing)*2.5);padding:4px;padding:calc(var(--aa-spacing-half)/2)}.aa-Item[aria-selected=true]{background-color:rgba(179,173,214,.205);background-color:rgba(var(--aa-selected-color-rgb),var(--aa-selected-color-alpha))}.aa-Item[aria-selected=true] .aa-ActiveOnly,.aa-Item[aria-selected=true] .aa-ItemActionButton{visibility:visible}.aa-ItemIcon{stroke-width:1.6;stroke-width:var(--aa-icon-stroke-width);background:#fff;background:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));box-shadow:inset 0 0 0 1px rgba(128,126,163,.3);box-shadow:inset 0 0 0 1px rgba(var(--aa-panel-border-color-rgb),var(--aa-panel-border-color-alpha));color:#7777a3;color:rgba(var(--aa-icon-color-rgb),var(--aa-icon-color-alpha));display:flex;flex-shrink:0;font-size:.7em;height:28px;height:calc(var(--aa-icon-size) + var(--aa-spacing-half));justify-content:center;overflow:hidden;text-align:center;width:28px;width:calc(var(--aa-icon-size) + var(--aa-spacing-half))}.aa-ItemIcon img{height:auto;max-height:20px;max-height:calc(var(--aa-icon-size) + var(--aa-spacing-half) - 8px);max-width:20px;max-width:calc(var(--aa-icon-size) + var(--aa-spacing-half) - 8px);width:auto}.aa-ItemIcon svg{height:20px;height:var(--aa-icon-size);width:20px;width:var(--aa-icon-size)}.aa-ItemIcon--alignTop{align-self:flex-start}.aa-ItemIcon--noBorder{background:none;box-shadow:none}.aa-ItemIcon--picture{height:96px;width:96px}.aa-ItemIcon--picture img{max-height:100%;max-width:100%;padding:8px;padding:var(--aa-spacing-half)}.aa-ItemContent{grid-gap:8px;grid-gap:var(--aa-spacing-half);align-items:center;cursor:pointer;display:grid;gap:8px;gap:var(--aa-spacing-half);grid-auto-flow:column;line-height:1.25em;overflow:hidden}.aa-ItemContent mark{background:none;color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font-style:normal;font-weight:700;font-weight:var(--aa-font-weight-bold)}.aa-ItemContent--dual{display:flex;flex-direction:column;justify-content:space-between;text-align:left}.aa-ItemContent--dual .aa-ItemContentSubtitle,.aa-ItemContent--dual .aa-ItemContentTitle,.homeCard_D3Nk:hover .sparkles_hA5k{display:block}.aa-ItemContent--indented{padding-left:36px;padding-left:calc(var(--aa-icon-size) + var(--aa-spacing))}.aa-ItemContentBody{grid-gap:4px;grid-gap:calc(var(--aa-spacing-half)/2);display:grid;gap:4px;gap:calc(var(--aa-spacing-half)/2)}.aa-ItemContentTitle{display:inline-block;margin:0 .5em 0 0;max-width:100%;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.aa-ItemContentSubtitle{font-size:.92em}.aa-ItemContentSubtitleIcon:before{border-color:rgba(128,126,163,.64);border-color:rgba(var(--aa-muted-color-rgb),.64);border-style:solid;content:"";display:inline-block;left:1px;position:relative;top:-3px}.aa-PanelFooter:after,.aa-PanelHeader:after{content:"";position:absolute;pointer-events:none;right:0;left:0}.aa-ItemContentSubtitle--inline .aa-ItemContentSubtitleIcon:before{border-width:0 0 1.5px;margin-left:8px;margin-left:var(--aa-spacing-half);margin-right:4px;margin-right:calc(var(--aa-spacing-half)/2);width:10px;width:calc(var(--aa-spacing-half) + 2px)}.aa-ItemContentSubtitle--standalone{grid-gap:8px;grid-gap:var(--aa-spacing-half);align-items:center;color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));display:grid;gap:8px;gap:var(--aa-spacing-half);grid-auto-flow:column;justify-content:start}#__docusaurus-base-url-issue-banner-container,.aa-DetachedContainer--modal .aa-PanelLayout:empty,.aa-DetachedSearchButtonPlaceholder[hidden],.aa-ItemContentDescription:empty{display:none}.aa-ItemContentSubtitle--standalone .aa-ItemContentSubtitleIcon:before{border-radius:0 0 0 3px;border-width:0 0 1.5px 1.5px;height:8px;height:var(--aa-spacing-half);width:8px;width:var(--aa-spacing-half)}.aa-ItemContentSubtitleCategory{color:#807ea3;color:rgba(var(--aa-muted-color-rgb),1);font-weight:500}.aa-ItemContentDescription{color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font-size:.85em;max-width:100%;overflow-x:hidden;text-overflow:ellipsis}.aa-ItemContentDescription mark{background:rgba(245,223,77,.5);background:rgba(var(--aa-description-highlight-background-color-rgb),var(--aa-description-highlight-background-color-alpha));color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font-style:normal;font-weight:500;font-weight:var(--aa-font-weight-medium)}.aa-ItemContentDash{color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));display:none;opacity:.4}.aa-ItemContentTag{background-color:rgba(62,52,211,.2);background-color:rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha));border-radius:3px;margin:0 .4em 0 0;padding:.08em .3em}.aa-ItemLink,.aa-ItemWrapper{grid-gap:4px;grid-gap:calc(var(--aa-spacing-half)/2);align-items:center;color:inherit;display:grid;gap:4px;gap:calc(var(--aa-spacing-half)/2);grid-auto-flow:column;justify-content:space-between;width:100%}.aa-ItemLink{color:inherit}.cell_LmdA,.link_ti35{text-decoration:none!important}.aa-ItemActions{display:grid;grid-auto-flow:column;height:100%;justify-self:end;margin:0 -5.33333px;margin:0 calc(var(--aa-spacing)/-3);padding:0 2px 0 0}.aa-ItemActionButton{align-items:center;background:none;border:0;color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));cursor:pointer;display:flex;flex-shrink:0;padding:0}.aa-ItemActionButton svg{stroke-width:1.6;stroke-width:var(--aa-icon-stroke-width);color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));margin:5.33333px;margin:calc(var(--aa-spacing)/3);width:20px;width:var(--aa-action-icon-size)}.aa-ActiveOnly{visibility:hidden}.aa-PanelHeader{align-items:center;background:#3e34d3;background:rgba(var(--aa-primary-color-rgb),1);color:#fff;display:grid;height:var(--aa-modal-header-height);margin:0;padding:8px 16px;padding:var(--aa-spacing-half) var(--aa-spacing);position:relative}.aa-PanelHeader:after{background-image:linear-gradient(#fff,hsla(0,0%,100%,0));background-image:linear-gradient(rgba(var(--aa-background-color-rgb),1),rgba(var(--aa-background-color-rgb),0));bottom:-8px;bottom:calc(var(--aa-spacing-half)*-1);height:8px;height:var(--aa-spacing-half)}.aa-PanelFooter,.aa-PanelHeader:after{z-index:9999;z-index:var(--aa-base-z-index)}.aa-PanelFooter{background-color:#fff;background-color:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));box-shadow:inset 0 1px 0 rgba(128,126,163,.3);box-shadow:inset 0 1px 0 rgba(var(--aa-panel-border-color-rgb),var(--aa-panel-border-color-alpha));display:flex;justify-content:space-between;margin:0;padding:16px;padding:var(--aa-spacing);position:relative}.aa-PanelFooter:after{background-image:linear-gradient(hsla(0,0%,100%,0),rgba(128,126,163,.6));background-image:linear-gradient(rgba(var(--aa-background-color-rgb),0),rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha)));height:16px;height:var(--aa-spacing);opacity:.12;top:-16px;top:calc(var(--aa-spacing)*-1);z-index:9998;z-index:calc(var(--aa-base-z-index) - 1)}.aa-DetachedContainer{background:#fff;background:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));bottom:0;box-shadow:0 0 0 1px rgba(35,38,59,.1),0 6px 16px -4px rgba(35,38,59,.15);box-shadow:var(--aa-panel-shadow);display:flex;flex-direction:column;left:0;margin:0;overflow:hidden;padding:0;position:fixed;right:0;top:0;z-index:9999;z-index:var(--aa-base-z-index)}.aa-DetachedContainer:after{height:32px}.aa-DetachedContainer .aa-SourceHeader{margin:8px 0 8px 2px;margin:var(--aa-spacing-half) 0 var(--aa-spacing-half) 2px}.aa-DetachedContainer .aa-Panel{background-color:#fff;background-color:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));border-radius:0;box-shadow:none;flex-grow:1;margin:0;padding:0;position:relative}.aa-DetachedContainer .aa-PanelLayout{bottom:0;box-shadow:none;left:0;margin:0;max-height:none;overflow-y:auto;position:absolute;right:0;top:0;width:100%}.aa-DetachedFormContainer{border-bottom:1px solid rgba(128,126,163,.3);border-bottom:1px solid rgba(var(--aa-panel-border-color-rgb),var(--aa-panel-border-color-alpha));display:flex;flex-direction:row;justify-content:space-between;margin:0;padding:8px;padding:var(--aa-spacing-half)}.aa-DetachedCancelButton{background:none;border:0;border-radius:3px;color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));cursor:pointer;font:inherit;margin:0 0 0 8px;margin:0 0 0 var(--aa-spacing-half);padding:0 8px;padding:0 var(--aa-spacing-half)}.aa-DetachedCancelButton:focus,.aa-DetachedCancelButton:hover{box-shadow:inset 0 0 0 1px rgba(128,126,163,.3);box-shadow:inset 0 0 0 1px rgba(var(--aa-panel-border-color-rgb),var(--aa-panel-border-color-alpha))}.aa-DetachedContainer--modal{border-radius:6px;bottom:inherit;height:auto;margin:0 auto;max-width:680px;max-width:var(--aa-detached-modal-max-width);position:absolute;top:3%}.aa-DetachedContainer--modal .aa-PanelLayout{max-height:500px;max-height:var(--aa-detached-modal-max-height);padding-bottom:8px;padding-bottom:var(--aa-spacing-half);position:static}.aa-DetachedSearchButton{align-items:center;background-color:#fff;background-color:rgba(var(--aa-input-background-color-rgb),var(--aa-input-background-color-alpha));border:1px solid rgba(128,126,163,.8);border:1px solid rgba(var(--aa-input-border-color-rgb),var(--aa-input-border-color-alpha));border-radius:3px;color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));cursor:pointer;display:flex;font:inherit;font-family:inherit;font-family:var(--aa-font-family);font-size:16px;font-size:var(--aa-font-size);height:44px;height:var(--aa-search-input-height);margin:0;padding:0 5.5px;padding:0 calc(var(--aa-search-input-height)/8);position:relative;text-align:left;width:100%}.aa-DetachedSearchButton:focus{border-color:#3e34d3;border-color:rgba(var(--aa-primary-color-rgb),1);box-shadow:0 0 0 3px rgba(62,52,211,.2),inset 0 0 0 2px rgba(62,52,211,.2);box-shadow:rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha)) 0 0 0 3px,inset rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha)) 0 0 0 2px;outline:currentColor}.aa-DetachedSearchButtonIcon{align-items:center;color:#3e34d3;color:rgba(var(--aa-primary-color-rgb),1);cursor:auto;display:flex;flex-shrink:0;height:100%;justify-content:center;width:36px;width:calc(var(--aa-icon-size) + var(--aa-spacing))}.aa-DetachedSearchButtonQuery{color:#262627;color:rgba(var(--aa-text-color-rgb),1);line-height:1.25em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aa-Detached{height:100vh;overflow:hidden}.aa-DetachedOverlay{background-color:hsla(244,6%,48%,.4);background-color:rgba(var(--aa-overlay-color-rgb),var(--aa-overlay-color-alpha));height:100vh;left:0;margin:0;padding:0;position:fixed;right:0;top:0;z-index:9998;z-index:calc(var(--aa-base-z-index) - 1)}.aa-GradientBottom,.aa-GradientTop{height:8px;height:var(--aa-spacing-half);left:0;pointer-events:none;position:absolute;right:0;z-index:9999;z-index:var(--aa-base-z-index)}.aa-GradientTop{background-image:linear-gradient(#fff,hsla(0,0%,100%,0));background-image:linear-gradient(rgba(var(--aa-background-color-rgb),1),rgba(var(--aa-background-color-rgb),0));top:0}.aa-GradientBottom{background-image:linear-gradient(hsla(0,0%,100%,0),#fff);background-image:linear-gradient(rgba(var(--aa-background-color-rgb),0),rgba(var(--aa-background-color-rgb),1));border-bottom-left-radius:4px;border-bottom-left-radius:calc(var(--aa-spacing)/4);border-bottom-right-radius:4px;border-bottom-right-radius:calc(var(--aa-spacing)/4);bottom:0}@supports selector(:has(*)){.navbarSearchContainer_Bca1:not(:has(>*)){display:none}}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hash-link:before{content:"#"}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{-moz-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.homeLayout_oJ9_{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI5MjEiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsdGVyPSJ1cmwoI2EpIj48ZWxsaXBzZSBjeD0iNzIwIiBjeT0iNDY0IiByeD0iNzIwIiByeT0iNDAwIiBmaWxsPSJ1cmwoI2IpIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PC9nPjxwYXRoIGQ9Ik02NC41NjggMzIxLjIxM0gwdjE2LjIzOWg2NC41Njh2LTE2LjIzOVptMCAxOS4zMzVINDYuMTY1djQzLjYyNWgxOC40MDN2LTQzLjYyNVpNNjc5LjM3MiA3Ljk5NGgtMjEuMTMzVjE0NC4wM2gyMS4xMzNWNy45OTRaTTE5Mi4yMjQgMjg3Ljk3OHYtMTMuNzYySDgwLjcxMXYxMy43NjJoMTExLjUxM1pNMTM2OS45IDExNC42ODJoOC4zM3Y1My40OTloLTguMzN2LTUzLjQ5OVpNMTAxNi4wMiA2OS4xNjZoMTYuNjF2My45MjJoLTE2LjYxdi0zLjkyMlptLTE3Ljg2MSAzMy4wMjhoMzQuNTQxdjMuOTIyaC0zNC41NDF2LTMuOTIyWm0xNy44NjEgMzMuMjM1aDE2LjYxdjMuOTIyaC0xNi42MXYtMy45MjJaTTUzNC4xNzEgNjAuOTc3VjQ3LjQyMmg0LjA1NXYxMy41NTVoLTQuMDU1Wm0zNC42MjQgMTQuNTg4VjQ3LjM1M2g0LjEzM3YyOC4yMTJoLTQuMTMzWm0zNC44NTctMTQuNTg4VjQ3LjQyMmg0LjA1NXYxMy41NTVoLTQuMDU1Wm0yODkuODU2IDE2MC44MDdoLTE1LjM2MnYyMC42NDNoMTUuMzYydi0yMC42NDNabTQ5LjQ0LTIyLjIyNWgtMTUuMzYydjQyLjg2OGgxNS4zNjJ2LTQyLjg2OFptNDkuMDUxIDIyLjIyNWgtMTUuMzYzdjIwLjY0M2gxNS4zNjN2LTIwLjY0M1pNMTIxMS4xMiAyNy4wNTRoLTM0LjMxVjQ2Ljk0aDM0LjMxVjI3LjA1NFpNMTI0OC4wNyA4NS44MmgtNzEuMjR2MTguNzU4aDcxLjI0Vjg1LjgxOVptLTM2Ljk0IDU5Ljg0NGgtMzQuM3YxOC43NThoMzQuM3YtMTguNzU4Wm0tMjM1LjU3NiAyNTUuOTNoLTMwLjMyM3Y4Ljg5MmgzMC4zMjN2LTguODkyWm0tLjkzNS0yMi40NTgtMi4xODMtMi4yMDctNC42NzctNC42NzMtMzIuMjcyIDIyLjUyMyA2LjkzOCA2LjgxNSAzMi4xOTQtMjIuNDU4Wm05MC41ODEtMTk2Ljc5OSA0Ny4yNC0zMi4xMy0zLjU5LTMuMjQ1LTQ3LjA4IDMxLjk5OSAzLjQzIDMuMzc2Wm01My40Ny00LjYwOWgtNDMuOTZ2NC42MDloNDMuOTZ2LTQuNjA5Wm04MC4zNyA4Ny4xNzFoMTcuMzl2LTQuNDE0Yy0uMTYtMTMuMjQxIDEzLjk1LTI0Ljk4OSAzMC4wMS0yNC45ODloNS4yMnYtMTQuNjY5aC01LjIyYy0yNS43My0uMTk1LTQ3LjcxIDE4LjIzOS00Ny40OCAzOS43MjNsLjA4IDQuMzQ5Wm03Ny40MS00NC4wMDd2MTQuNjY5aDUuM2MxNi4wNi0uMTMgMzAuMDkgMTEuNTUzIDI5LjkzIDI0Ljk4OXY0LjQxNGgxNy40NnYtNC4zNDljLjI0LTIxLjQ4NC0yMS44Mi0zOS45MTgtNDcuNDctMzkuNzIzaC01LjIyWk00MjguOTU0IDMyNy42MDF2OS45M2gzLjY2NGMxMC45MTMtLjA2NCAyMC42NTcgNy45ODQgMjAuNjU3IDE3LjEzNnYyLjk4NmgxMi4wODN2LTIuOTg2Yy4xNTYtMTQuNzM0LTE1LjA0NS0yNy4zMjYtMzIuODE4LTI3LjE5NmwtMy41ODYuMTNabTM2LjMyNiA0NC4zMzFoLTEyLjE2MXYzLjA1Yy4wNzggOS4yMTctOS41MSAxNy4yMDItMjAuNjU3IDE3LjEzN2gtMy42NjR2OS45OTVoMy41ODZjMTcuNzczLjEzIDMyLjk3NC0xMi40NjIgMzIuODE4LTI3LjE5NnYtMi45ODZoLjA3OFpNNDEwLjAxMiA0OS42MDFoLTU3LjYwN3YxMi4xMzhoNTcuNjA3VjQ5LjZabTIuNTcyIDY1Ljc1MS0zLjUwOCAyLjcyNi0uMjMzLjE5NWMtMy43NDIgMi45ODYtOC4xODUgNS4zODctMTMuMDk2IDYuOTQ1aC0uMTU2bC0uNDY4LjEzYy00Ljc1NSAxLjQyOC05Ljc0NCAyLjE0Mi0xNC43MzMgMi4yMDdoLS4xNTZjLTQuODMzLS4wNjUtOS42NjYtLjc3OS0xNC4yNjUtMi4wMTJsLS4zOS0uMDY1LjE1Ni4wNjVjLTQuNTIxLTEuNTU4LTguNzMxLTMuNjM1LTEyLjU1LTYuMTY3bC0zLjA0LTIuMDEyLTEwLjEzNCA4LjUwMyAzLjUwOCAyLjUzMmMxMC4yODkgNy4zMzQgMjMuMzg1IDExLjM1OCAzNi45NDkgMTEuMzU4IDE0LjAzMS0uMDY1IDI3LjU5NS00LjQxMyAzOC4xOTctMTIuMTM3bDMuMDQtMi4yNzItOS4xMjEtOS45OTZabTQ3MS42ODggMjMzLjQwN2gtNDYuNjkzdjkuODY2aDQ2LjY5M3YtOS44NjZabS00OC43Mi00My40ODggMi44MDctMi4yMDcuMTU1LS4xMjlhMzIuODQxIDMyLjg0MSAwIDAgMSAxMC42MDItNS41ODNoLjE1NmwuMzktLjEyOWMzLjgxOS0xLjE2OSA3Ljg3My0xLjc1MyAxMS45MjYtMS44MThoLjA3OGMzLjg5OC4wNjUgNy44NzMuNjQ5IDExLjUzNyAxLjYyM2wuMzEyLjA2NS0uMTU2LS4wNjVjMy42NjQgMS4yMzMgNy4wOTQgMi45MjEgMTAuMTM0IDQuOTk4bDIuNDk0IDEuNjIzIDguMTg1LTYuODgxLTIuODA2LTIuMDc3Yy04LjM0MS01LjkwNi0xOC45NDItOS4xNTItMjkuOTM0LTkuMjE3LTExLjM4MS4wNjUtMjIuMzcyIDMuNTctMzAuOTQ3IDkuODAxbC0yLjQxNiAxLjgxOCA3LjQ4MyA4LjE3OFptLTIzOS41NDcgOC42MzNoLTI2Ljg5M3Y4OC40NjloMjYuODkzdi04OC40NjlabTExOC44LTMuODk1IDYuMDAyIDUuMzIzLjM5LjMyNGM2LjYyNiA1Ljc3NyAxMS44NDggMTIuNTkyIDE1LjM1NiAyMC4xMjJ2LjE5NGwuMjM0LjcxNGE2MC40MzcgNjAuNDM3IDAgMCAxIDQuOTExIDIyLjY1M3YuMTk1Yy0uMTU2IDcuNDY0LTEuNzE1IDE0Ljg2NC00LjUyMSAyMS45MzlsLS4yMzQuNTE5LjE1Ni0uMjZjLTMuNDMgNi45NDUtOC4wMjkgMTMuMzcxLTEzLjY0MiAxOS4yMTNsLTQuNDQzIDQuNjczIDE4Ljc4NiAxNS41MTMgNS42MTMtNS4zODdjMTYuMjE0LTE1LjgzOCAyNS4xLTM1Ljg5NCAyNS4xNzgtNTYuNzI5LS4yMzMtMjEuNjE1LTkuNzQ0LTQyLjQ1LTI2Ljg5My01OC42NzdsLTQuOTg5LTQuNjczLTIxLjkwNCAxNC4zNDRabS03Ni4zOTQtOTcuOTQ1di03LjM5OWwtMi44ODQuMTNjLTEwLjUyMy41MTktMTkuMjU0IDguMTEzLTE5LjI1NCAxNi44NzUgMCA4Ljc2MyA4LjgwOSAxNi40MjIgMTkuMzMyIDE2LjgxMWwyLjgwNi4wNjV2LTcuMzM0bC0yLjU3Mi0uMTNjLTUuOTI0LS4zODktMTAuNDQ2LTQuNDc5LTEwLjYwMS05LjQxMi4xNTUtNC45MzIgNC42NzctOS4wMjIgMTAuNjAxLTkuNDc2bDIuNTcyLS4xM1ptLTEyLjk0IDI5Ljk4N2gtOC45NjR2Mi4yMDdjLS4wNzggOC45NTcgOS4yNzYgMTYuNzQ2IDIwLjE5IDE2Ljc0NiAxMC4yODkgMCAxOS4wOTgtNi44MTUgMjAuMjY3LTE1LjgzN2wuMzEyLTIuNDY3aC05LjE5OWwtLjE1NSAyLjE0MmMtLjM5IDUuMTkzLTUuNzY5IDkuMDg3LTExLjkyNyA4Ljc2My01LjkyNC0uMzI1LTEwLjUyNC00LjM0OS0xMC41MjQtOS4yODJ2LTIuMjcyWm0tMjY4LjYyMiA0MS45MzF2LTE2Ljg3NmwtNi41NDguMzI0Yy0yNC4wODggMS4xNjktNDMuODg3IDE4LjQ5OS00My44ODcgMzguNDI1IDAgMTkuOTI3IDIwLjAzMyAzNy40NTIgNDMuOTY0IDM4LjIzMWw2LjQ3MS4xOTV2LTE2Ljc0N2wtNS44NDctLjMyNGMtMTMuNDA4LS45NzQtMjMuODUzLTEwLjE5MS0yNC4wODctMjEuMzU1LjMxMi0xMS4yOTQgMTAuNzU3LTIwLjU3NSAyNC4yNDMtMjEuNjE0bDUuNjkxLS4yNTlaTTE0OC4xNzEgMTM4Ljg2NHYzOC44NjRsMTUuMDgtLjc0N2M1NS40Ny0yLjY5MSAxMDEuMDY4LTQyLjYwMSAxMDEuMDY4LTg4LjQ5IDAtNDUuODktNDYuMTM2LTg2LjI1LTEwMS4yNDgtODguMDQzTDE0OC4xNzEgMHYzOC41NjVsMTMuNDY0Ljc0N2MzMC44NzcgMi4yNDIgNTQuOTMzIDIzLjQ2OCA1NS40NzEgNDkuMTc4LS43MTggMjYuMDA5LTI0Ljc3NCA0Ny4zODUtNTUuODMgNDkuNzc2bC0xMy4xMDUuNTk4Wm05MzYuOTc5IDEzNi40MnYtMjMuMTA3bC04Ljk2LjQ1NGMtMzIuOTcgMS42MjMtNjAuMTggMjUuMzE0LTYwLjE4IDUyLjY0czI3LjQ0IDUxLjM0MiA2MC4zNCA1Mi40NDVsOC44LjMyNXYtMjIuOTc3bC04LjAyLS4zOWMtMTguNC0xLjI5OC0zMi42Ny0xMy45NTUtMzMuMDYtMjkuMzM4LjM5LTE1LjQ0OCAxNC43NC0yOC4yMzUgMzMuMjEtMjkuNjYzbDcuODctLjM4OVpNODM5Ljc2MiAyOS42NzRoLTI3LjA1djYuNjJjLS4zODkgMzMuNjg4IDMzLjM2NCA2Mi4zNzcgNzMuMjc1IDYyLjM3NyAzOS45MTIgMCA3My4zNTMtMjguNjI0IDczLjExOS02Mi4zNzZ2LTYuNjJoLTI3LjIwNXY2Ljc1Yy4yMzQgMjEuMzU0LTIxLjEyNSAzOS43ODgtNDUuOTkyIDM5Ljc4OC0yNC44NjYgMC00Ni41MzctMTguMzA0LTQ2LjIyNS0zOS43ODhsLjA3OC02Ljc1Wm0tMzI0LjgyNyA5Mi42ODhjLTIyLjY0MiAwLTQxLjcwNCAxNi4wMjUtNDEuNzA0IDM1LjAyOXYzLjg5M2gxNS41OTR2LTMuODkzYzAtMTEuOTE5IDEyLjA1MS0yMi4wNzUgMjYuMTEtMjIuMDc1IDE0LjA2IDAgMjYuMTExIDEwLjIxNyAyNi4xMTEgMjIuMDc1djMuODkzaDE1LjU5NHYtMy44OTNjMC0xOS4wMDQtMTkuMDYzLTM1LjAyOS00MS43MDUtMzUuMDI5Wm0tMjYuMDc0IDU3LjgzNWgtMTUuNjN2My44OTNjMCAxOS4wNjUgMTkuMDYyIDM1LjAyOSA0MS43MDQgMzUuMDI5czQxLjcwNS0xNS45OTUgNDEuNzA1LTM1LjAyOXYtMy44OTNoLTE1LjU5NHYzLjg5M2MwIDExLjkxOS0xMi4wNTEgMjIuMTM2LTI2LjExMSAyMi4xMzYtMTQuMDU5IDAtMjYuMTEtMTAuMjE3LTI2LjExLTIyLjEzNnYtMy44OTNoLjAzNlptMjc0LjIxOC0yOS4zODctMzMuOTQ1IDI0LjU3MiA2LjcgNi40MTcgMzMuOTQyLTI0LjU3Mi02LjY5Ny02LjQxN1ptLTI3LjIxMSAzMi42MjQtNi43IDYuNDE3IDMzLjk0NSAyNC41NzIgNi43MDItNi40MTctMzMuOTQ3LTI0LjU3MlpNMTE0Ljk0NSA0MDMuMDM4bC02LjU5MSA1LjA1NiAyNS4yMjQgMjUuNjAxIDYuNTkxLTUuMDU2LTI1LjIyNC0yNS42MDFabTUyLjAwOC4wMDYtMjUuMjI0IDI1LjYwMiA2LjU5MiA1LjA1NiAyNS4yMjMtMjUuNjAyLTYuNTkxLTUuMDU2Wk0xNDQwIDM2NS4zMTloLTE0LjExdjQ5LjY4SDE0NDB2LTQ5LjY4Wm0wIDUxLjk1MWgtNjkuMDl2MTIuNDU0SDE0NDBWNDE3LjI3Wk0yNzcuMTQ0IDM4NC4zMTFoLTU2LjA2OHY1LjAyM2g1Ni4wNjh2LTUuMDIzWm05LjY3IDBoLTYuMDA0VjQ0NWg2LjAwNHYtNjAuNjg5Wm04NzUuNzI2IDEuNTEzaC0xNC41djE5LjA2aDE0LjV2LTE5LjA2Wm01My44MS0zMi40MDloLTMwLjAydjEyLjUyNGgzMC4wMnYtMTIuNTI0Wm0zNy41OSAzMi40MDloLTE0LjUxdjE5LjA2aDE0LjUxdi0xOS4wNlpNMTA0LjEwNCAxMTMuODk4IDYwLjE3OSA4MS4zNzQgNTIuMiA4OS43Nmw0My45MjYgMzIuNTI1IDcuOTc3LTguMzg4Wm0tNTMuODc0IDcuNjk0VjQxLjU3OUgzNy44MnY4MC4wMTNoMTIuNDFaIiBmaWxsPSIjRTRGN0ZGIiBmaWxsLW9wYWNpdHk9Ii4wMyIvPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iYiIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgwIDQwMCAtNzIwIDAgNzIwIDQ2NCkiPjxzdG9wIHN0b3AtY29sb3I9IiM1QkQ4RkYiIHN0b3Atb3BhY2l0eT0iLjUiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMENFODgiIHN0b3Atb3BhY2l0eT0iMCIvPjwvcmFkaWFsR3JhZGllbnQ+PGZpbHRlciBpZD0iYSIgeD0iLTU3IiB5PSI3IiB3aWR0aD0iMTU1NCIgaGVpZ2h0PSI5MTQiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj48ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPjxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJzaGFwZSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjI4LjUiIHJlc3VsdD0iZWZmZWN0MV9mb3JlZ3JvdW5kQmx1cl8yNjMyNV8yNDIiLz48L2ZpbHRlcj48L2RlZnM+PC9zdmc+) top no-repeat;background-color:var(--dark-surface-01)!important;width:100%}.relative__ioB{position:relative}.header1_j8J6{font-size:3.5em;margin:7.5rem 0 1.25rem}.header2_wAk7{font-size:3em;margin:8.75rem 0 1.25rem}.header1_j8J6,.header2_wAk7{color:var(--dark-text-primary);font-family:Poppins-Bold,sans-serif;line-height:1.2;text-align:center}.description_VY6t{color:var(--dark-text-secondary);text-align:center}.titleBtm_hmJU{margin-bottom:2rem}.flexCol_kTWC,.sectionContainer_MnYH{align-items:center;display:flex;flex-direction:column;width:100%}.sectionContainer_MnYH{margin:0 auto 10rem;max-width:1440px;padding:0 4rem}.ecoBG_L0ih{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMxMiIgaGVpZ2h0PSIzMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcyNS4yOTggMTQwLjE0OWMwIDM4LjE5LTMwLjk1OSA2OS4xNDktNjkuMTQ5IDY5LjE0OVM1ODcgMTc4LjMzOSA1ODcgMTQwLjE0OSA2MTcuOTU5IDcxIDY1Ni4xNDkgNzFzNjkuMTQ5IDMwLjk1OSA2OS4xNDkgNjkuMTQ5Wm0tMTA1LjAwMyAwYzAgMTkuODAyIDE2LjA1MiAzNS44NTQgMzUuODU0IDM1Ljg1NHMzNS44NTQtMTYuMDUyIDM1Ljg1NC0zNS44NTQtMTYuMDUyLTM1Ljg1NC0zNS44NTQtMzUuODU0LTM1Ljg1NCAxNi4wNTItMzUuODU0IDM1Ljg1NFptNTIuNTAyLTEyMi41YzAgOS4xOTUtNy40NTMgMTYuNjQ5LTE2LjY0OCAxNi42NDlTNjM5LjUgMjYuODQ0IDYzOS41IDE3LjY0OEM2MzkuNSA4LjQ1NSA2NDYuOTU0IDEgNjU2LjE0OSAxczE2LjY0OCA3LjQ1NCAxNi42NDggMTYuNjQ5Wm04Ny41MDEgMzVjMCA5LjE5NS03LjQ1NCAxNi42NDktMTYuNjQ5IDE2LjY0OVM3MjcgNjEuODQ0IDcyNyA1Mi42NDhDNzI3IDQzLjQ1NSA3MzQuNDU0IDM2IDc0My42NDkgMzZzMTYuNjQ5IDcuNDU0IDE2LjY0OSAxNi42NDlabS0xNzUgMGMwIDkuMTk1LTcuNDU0IDE2LjY0OS0xNi42NDkgMTYuNjQ5UzU1MiA2MS44NDQgNTUyIDUyLjY0OEM1NTIgNDMuNDU1IDU1OS40NTQgMzYgNTY4LjY0OSAzNnMxNi42NDkgNy40NTQgMTYuNjQ5IDE2LjY0OVpNNjU2LjE0OSAyNDZjOS4xOTUgMCAxNi42NDggNy40NTQgMTYuNjQ4IDE2LjY0OXMtNy40NTMgMTYuNjQ5LTE2LjY0OCAxNi42NDktMTYuNjQ5LTcuNDU0LTE2LjY0OS0xNi42NDlTNjQ2Ljk1NCAyNDYgNjU2LjE0OSAyNDZabTg3LjUtMzVjOS4xOTUgMCAxNi42NDkgNy40NTQgMTYuNjQ5IDE2LjY0OXMtNy40NTQgMTYuNjQ5LTE2LjY0OSAxNi42NDlTNzI3IDIzNi44NDQgNzI3IDIyNy42NDkgNzM0LjQ1NCAyMTEgNzQzLjY0OSAyMTFabS0xNzUgMGM5LjE5NSAwIDE2LjY0OSA3LjQ1NCAxNi42NDkgMTYuNjQ5cy03LjQ1NCAxNi42NDktMTYuNjQ5IDE2LjY0OVM1NTIgMjM2Ljg0NCA1NTIgMjI3LjY0OSA1NTkuNDU0IDIxMSA1NjguNjQ5IDIxMVptLTE4LjM1MS03MC44NTFjMCA5LjE5NS03LjQ1NCAxNi42NDgtMTYuNjQ5IDE2LjY0OFM1MTcgMTQ5LjM0NCA1MTcgMTQwLjE0OXM3LjQ1NC0xNi42NDkgMTYuNjQ5LTE2LjY0OSAxNi42NDkgNy40NTQgMTYuNjQ5IDE2LjY0OVptMjQ1IDBjMCA5LjE5NS03LjQ1NCAxNi42NDgtMTYuNjQ5IDE2LjY0OFM3NjIgMTQ5LjM0NCA3NjIgMTQwLjE0OXM3LjQ1NC0xNi42NDkgMTYuNjQ5LTE2LjY0OSAxNi42NDkgNy40NTQgMTYuNjQ5IDE2LjY0OVoiIGZpbGw9IiMwNzFDMjciIHN0cm9rZT0iIzNENTM1QiIgc3Ryb2tlLXdpZHRoPSIyIi8+PHBhdGggdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCA2MSkiIGZpbGw9InVybCgjYSkiIGQ9Ik0wIDBoMTMxMnYyNDNIMHoiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI2NTYiIHkxPSIwIiB4Mj0iNjU2IiB5Mj0iMjQzIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIuMDI1IiBzdG9wLWNvbG9yPSIjMDcxQzI3IiBzdG9wLW9wYWNpdHk9Ii4xIi8+PHN0b3Agb2Zmc2V0PSIuNDUiIHN0b3AtY29sb3I9IiMwNzFDMjciLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=) top no-repeat}.updateBG_hYTi{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMxMiIgaGVpZ2h0PSIyMjMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcwNC41OTcgMjA4LjkzN2MtOC40ODctMS4wNTQtMTYuOTA3LTMuNzg4LTI0Ljc3OS04LjMzMy0zMS40ODktMTguMTgtNDIuMjc4LTU4LjQ0NC0yNC4wOTgtODkuOTMzIDE4LjE4IDMxLjQ4OSA1OC40NDUgNDIuMjc4IDg5LjkzMyAyNC4wOTcgNy44NjEtNC41MzggMTQuNDMxLTEwLjQ1MiAxOS41ODQtMTcuMjYzLTIuNDY2IDQwLjEyMi0yNi40OTMgNzQuNDE0LTYwLjY0IDkxLjQzMloiIGZpbGw9IiMwMEY1QTMiLz48cGF0aCBkPSJNNzY1LjI0MiAxMTcuNTAyYy01LjE1MiA2LjgxMS0xMS43MjMgMTIuNzI1LTE5LjU4NCAxNy4yNjQtMzEuNDg4IDE4LjE3OS03MS43NTIgNy4zOTEtODkuOTMyLTI0LjA5OCAzNi4zNTkgMCA2NS44MzUtMjkuNDc1IDY1LjgzNS02NS44MzUgMC05LjA4Mi0xLjgzOS0xNy43MzUtNS4xNjUtMjUuNjA1IDI5LjU2OCAxOS42NTcgNDkuMDU1IDUzLjI3MyA0OS4wNTUgOTEuNDQgMCAyLjI5NS0uMDcgNC41NzQtLjIwOSA2LjgzNFoiIGZpbGw9IiMwRkU5QTAiLz48cGF0aCBkPSJNNzE2LjM5MiAxOS4yMzFjMy4zMjYgNy44NyA1LjE2NSAxNi41MjMgNS4xNjUgMjUuNjA1IDAgMzYuMzYtMjkuNDc1IDY1LjgzNi02NS44MzUgNjUuODM2IDE4LjE4LTMxLjQ4OSA3LjM5MS03MS43NTMtMjQuMDk4LTg5LjkzMy03Ljg3MS00LjU0NS0xNi4yOTItNy4yOC0yNC43NzktOC4zMzNDNjIxLjU2MyA1LjA3MiA2MzguMTYxLjk0NiA2NTUuNzIyLjk0NmMyMi40MzIgMCA0My4yOTMgNi43MzEgNjAuNjcgMTguMjg1WiIgZmlsbD0iIzU0RjlDMiIvPjxwYXRoIGQ9Ik02MDYuODUzIDEyLjQwNmM4LjQ4NyAxLjA1MyAxNi45MDcgMy43ODggMjQuNzggOC4zMzMgMzEuNDg4IDE4LjE4IDQyLjI3NyA1OC40NDQgMjQuMDk3IDg5LjkzMy0xOC4xOC0zMS40ODktNTguNDQ0LTQyLjI3OC04OS45MzMtMjQuMDk4LTcuODYxIDQuNTM4LTE0LjQzMSAxMC40NTMtMTkuNTgzIDE3LjI2NCAyLjQ2NS00MC4xMjMgMjYuNDkzLTc0LjQxNCA2MC42MzktOTEuNDMyWiIgZmlsbD0iIzg4RkZEOCIvPjxwYXRoIGQ9Ik01NDYuMjEgMTAzLjgzOGM1LjE1Mi02LjgxIDExLjcyMi0xMi43MjUgMTkuNTgzLTE3LjI2MyAzMS40ODgtMTguMTggNzEuNzUzLTcuMzkyIDg5LjkzMyAyNC4wOTctMzYuMzYgMC02NS44MzYgMjkuNDc2LTY1LjgzNiA2NS44MzUgMCA5LjA4MiAxLjgzOSAxNy43MzUgNS4xNjUgMjUuNjA2QzU2NS40ODcgMTgyLjQ1NSA1NDYgMTQ4Ljg0IDU0NiAxMTAuNjcyYzAtMi4yOTUuMDcxLTQuNTczLjIxLTYuODM0WiIgZmlsbD0iIzAwQ0U4OCIvPjxwYXRoIGQ9Ik01OTUuMDUgMjAyLjExMmMtMy4zMjYtNy44NzEtNS4xNjUtMTYuNTIzLTUuMTY1LTI1LjYwNSAwLTM2LjM2IDI5LjQ3Ni02NS44MzUgNjUuODM2LTY1LjgzNS0xOC4xOCAzMS40ODgtNy4zOTEgNzEuNzUyIDI0LjA5NyA4OS45MzIgNy44NzIgNC41NDUgMTYuMjkzIDcuMjggMjQuNzggOC4zMzMtMTQuNzE5IDcuMzM1LTMxLjMxNiAxMS40Ni00OC44NzcgMTEuNDYtMjIuNDMzIDAtNDMuMjkzLTYuNzMxLTYwLjY3MS0xOC4yODVaIiBmaWxsPSIjMDBFMDk2Ii8+PHBhdGggdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLjAwNSA1MC44NTMpIiBmaWxsPSJ1cmwoI2EpIiBkPSJNMCAwaDEzMTJ2MTcySDB6Ii8+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4MT0iNjU2IiB5MT0iMCIgeDI9IjY1NiIgeTI9IjE3MiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMwNzFDMjciIHN0b3Atb3BhY2l0eT0iMCIvPjxzdG9wIG9mZnNldD0iLjUxIiBzdG9wLWNvbG9yPSIjMDcxQzI3Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PC9zdmc+) top no-repeat}.layoutContainer_TJ5m{grid-gap:var(--gap);display:grid;grid-template-columns:repeat(var(--columnL),minmax(0,calc((100% - (var(--columnL) - 1)*var(--gap))/ var(--columnL))));width:100%}.section_EoX_{background:var(--dark-card-bg);border-radius:40px;box-shadow:var(--dark-card-shadow);padding:2.5rem;width:100%;z-index:1}.flexCol_tfnz{display:flex;flex-direction:column;gap:2.5rem}.noGap_K3ND{gap:0}.flexCenter_TPV4{align-items:center;display:flex;gap:1rem}.flexBetween_r7XD{align-items:center;display:flex;justify-content:space-between}.flexWrap_Xkc4,.links_hvUO,.tags_mvis{display:flex;flex-wrap:wrap}.alignMiddle_d55x,.iconContainer_llIe{justify-content:center}.iconContainer_llIe{align-items:center;display:flex;height:4rem;-o-object-fit:fill;object-fit:fill;width:4rem}.iconContainer_llIe img{max-width:-moz-fit-content;max-width:fit-content}.section_EoX_ h1,.section_EoX_ h2,.section_EoX_ h3{color:var(--dark-text-primary);margin:0}.homeCard_D3Nk{color:var(--dark-text-primary);position:relative}.sparkles_hA5k{display:none;position:absolute;right:1.25rem;top:1.25rem}.homeCard_D3Nk:hover{transition:.2s}.cardTitle_ISDw{margin-bottom:3rem;margin-top:1.5rem}.cardLinks_YmJh{margin-left:-.5rem;margin-right:-.5rem;margin-top:1.25rem}.cardLinks_YmJh>.borderBtm_Jn7R:not(:last-child){border-bottom:1px solid var(--dark-border-subtle)}.link_ti35{color:var(--dark-text-secondary)!important;line-height:3rem}.line_NhPR{cursor:pointer;padding:0 .5rem}.line_NhPR:hover{background-color:var(--dark-hover);border-radius:2px}.filters_Vbq_,.filters_mmsw{flex-wrap:wrap;width:100%}.filters_Vbq_,.filters_mmsw,.tagList_EW4E,.tag_QgTi,.tag_z3H5,.tag_zJLr{align-items:center;display:flex}.tag_z3H5{background-color:var(--dark-surface-03);border:1px solid var(--dark-border-subtle);border-radius:32px;box-shadow:none;color:var(--dark-text-tertiary);cursor:pointer;font-size:.875rem;height:2rem;justify-content:center;line-height:2rem;margin:0 1rem 1rem 0;padding:0 .75rem}.tag_z3H5:hover{background-color:var(--dark-surface-03-hover)}.activeTag_snzC{background-color:var(--dark-alert-success-bg)!important;border:1px solid var(--dark-alert-success);color:var(--dark-text-primary)}.tableContainer_FB7_{display:flex;justify-content:space-between}.column_yJgI{flex:1;flex-direction:column}.cell_LmdA,.column_yJgI{color:var(--dark-text-primary);display:flex}.cell_LmdA{align-items:center;border:1px solid var(--dark-border-subtle);cursor:pointer;flex:1 1 50%;font-weight:700;height:3.5rem;justify-content:center;line-height:3.5rem}.cell_LmdA:hover{background-color:var(--dark-hover);border-color:var(--dark-border-accent)}.columnHeader_UrkT{background-color:var(--dark-surface-03)!important;border:1px solid var(--dark-border-subtle)!important;color:var(--dark-text-secondary);cursor:default}.carouselContainer_oHO6,.solidBtn_xbIL:hover:before{width:100%}.carouselController_p8da{gap:.5rem}.arrowLeft_zS_K,.arrowRight_g8y1{align-items:center;background:var(--dark-surface-03);border:none;border-radius:50%;color:var(--dark-text-primary);cursor:pointer;display:flex;height:3rem;justify-content:center;min-width:3rem;width:3rem}.arrowLeft_zS_K:hover,.arrowRight_g8y1:hover{background:var(--dark-surface-03-hover)}.arrowLeft_zS_K{transform:scaleX(-1)}.illusContainer_T7PL{width:418px}.leftContainer_j1FY{max-width:50%}.description_fg7L{color:var(--dark-text-secondary)}.contactSection_BYCv{-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);background:linear-gradient(87deg,#00ce88 -2.44%,#04e7f4 98.1%);box-shadow:var(--dark-btn-shadow)}.contactTitle_IS2E{color:var(--dark-text-inverse)!important}.icons_fP0E{flex-wrap:wrap;justify-content:center}.iconBG_YI0d{align-items:center;background-color:#f8fdff;border-radius:50%;cursor:pointer;display:flex;height:3.5rem;justify-content:center;width:3.5rem}.cardContainer_bFxw,.cardContainer_xWMf{display:flex;width:100%;text-decoration:none!important;cursor:pointer}.iconBG_YI0d:hover{background-color:#eefcfd}.cardContainer_bFxw{align-items:center;border:1px solid var(--border-subtle);border-radius:16px;color:var(--text-primary)!important;padding:.5rem 1rem .5rem .75rem}.smallCard_LdEU{background-color:var(--surface-03);border:1px solid transparent;border-radius:12px;height:3rem}.iconContainer_ugFC{align-items:center;border-radius:8px;display:flex;justify-content:center}.rightContainer_OYxw{display:flex;flex-direction:column;margin-left:8px}.title_MBOd{font-size:1em;font-weight:700}.tags_mvis>p:not(:last-child):after{content:","}.tag_BvXz{color:var(--text-secondary);font-size:.75em;margin:0}.links_hvUO>a:not(:last-child),.tag_QgTi{margin-right:.5rem}.cardContainer_xWMf{background-color:var(--surface-02);border:1px solid var(--border-subtle);border-radius:20px;color:var(--text-secondary)!important;flex-direction:column;padding-bottom:1rem}.cardContainer_xWMf:hover{border:1px solid var(--border-accent)}.banner_LOnP,.topContainer_SZLr{border-top-left-radius:20px;border-top-right-radius:20px;width:100%}.topContainer_SZLr{border-bottom:1px solid var(--border-subtle);display:inline-block}.banner_LOnP{display:block;height:auto}.tag_QgTi{background-color:var(--text-link);border-radius:4px;color:var(--text-inverse);font-size:.75em;height:1.5rem;justify-content:center;padding:.25rem .5rem}.tagList_EW4E>.tag_QgTi:last-child{margin-right:0}.bottomContainer_TLG4{display:flex;flex-direction:column;margin-top:1rem;padding:0 1rem}.description_qXLp{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;height:3.5rem;margin:0;overflow:hidden;text-overflow:ellipsis}.iconContainer_trI9{align-items:center;background-color:var(--surface-03);border-radius:50%;cursor:pointer;display:flex;height:2rem;justify-content:center;width:2rem}.iconContainer_trI9:hover,.tag_zJLr:hover{background-color:var(--surface-03-hover)}:root{--aa-search-input-height:36px;--text-primary:#003247;--text-secondary:#255063;--text-tertiary:#637f8a;--text-inverse:#e4f7ff;--text-link:#0c865c;--surface-01:#f8fdff;--surface-02:#fff;--surface-03:#e7f8f9;--surface-accent:#e4f7ff;--border-subtle:#d0e1e7;--border-accent:#0c865c;--hover:rgba(0,224,211,.04);--surface-03-hover:#def0f2;--selected:rgba(0,224,211,.08);--alert-success:#0c865c;--alert-success-bg:rgba(12,134,92,.1);--alert-secondary:#255063;--alert-secondary-bg:rgba(37,80,99,.1);--alert-info:#2047d1;--alert-info-bg:rgba(32,71,209,.1);--alert-warning:#cbc125;--alert-warning-bg:rgba(203,193,37,.1);--alert-danger:#c51c1c;--alert-danger-bg:rgba(197,28,28,.1);--code-plain:#255063;--code-comment:#637f8a;--code-function:#0c865c;--code-constant:#bb15d6;--dark-text-primary:#e4f7ff;--dark-text-secondary:rgba(228,247,255,.85);--dark-text-tertiary:#637f8a;--dark-text-inverse:#003247;--dark-text-link:#00ce88;--dark-surface-01:#071c27;--dark-surface-02:#132831;--dark-surface-03:#18323b;--dark-surface-accent:#18323b;--dark-border-subtle:#3d535b;--dark-border-accent:#00ce88;--dark-hover:rgba(228,247,255,.06);--dark-surface-03-hover:#243e47;--dark-selected:rgba(228,247,255,.12);--dark-alert-success:#00ce88;--dark-alert-success-bg:rgba(0,206,136,.1);--dark-alert-secondary:rgba(228,247,255,.85);--dark-alert-secondary-bg:rgba(228,247,255,.1);--dark-alert-info:#828ef9;--dark-alert-info-bg:rgba(130,142,249,.1);--dark-alert-warning:#fff778;--dark-alert-warning-bg:rgba(255,247,120,.1);--dark-alert-danger:#fd7777;--dark-alert-danger-bg:hsla(0,97%,73%,.1);--dark-btn-shadow:-2px -2px 4px 0px rgba(228,247,255,.1),4px 4px 11px 0px rgba(7,28,39,.16);--dark-btn-hover:#00c584;--dark-card-shadow:0px 10px 10px -5px rgba(7,28,39,.8),0px 20px 25px -5px rgba(7,28,39,.8),0px 1px 2px 0px #3d535b inset;--dark-card-bg:linear-gradient(180deg,#132831,#071c27 123.46%);--dark-card-bg-hover:linear-gradient(0deg,var(--hover,rgba(228,247,255,.06)) 0%,var(--hover,rgba(228,247,255,.06)) 100%),linear-gradient(180deg,#132831 0%,#071c27 119.54%)}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--text-primary:var(--dark-text-primary);--text-secondary:var(--dark-text-secondary);--text-tertiary:var(--dark-text-tertiary);--text-inverse:var(--dark-text-inverse);--text-link:var(--dark-text-link);--surface-01:var(--dark-surface-01);--surface-02:var(--dark-surface-02);--surface-03:var(--dark-surface-03);--surface-accent:var(--dark-surface-accent);--border-subtle:var(--dark-border-subtle);--border-accent:var(--dark-border-accent);--hover:var(--dark-hover);--surface-03-hover:var(--dark-surface-03-hover);--selected:var(--dark-selected);--alert-success:var(--dark-alert-success);--alert-success-bg:var(--dark-alert-success-bg);--alert-secondary:var(--dark-alert-secondary);--alert-secondary-bg:var(--dark-alert-secondary-bg);--alert-info:var(--dark-alert-info);--alert-info-bg:var(--dark-alert-info-bg);--alert-warning:var(--dark-alert-warning);--alert-warning-bg:var(--dark-alert-warning-bg);--alert-danger:var(--dark-alert-danger);--alert-danger-bg:var(--dark-alert-danger-bg);--code-plain:#e4f7ff;--code-comment:rgba(228,247,255,.5);--code-function:#e4e0a5;--code-constant:#d2a8ff}.notFoundContainer_eQ53{color:var(--text-secondary)!important;margin:0 auto;padding:1.5em 1em;text-align:center;width:auto}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-moz-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes a{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.solidBtn_xbIL{align-items:center;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);border:none;border-radius:80px;box-shadow:var(--dark-btn-shadow);color:var(--dark-text-inverse)!important;cursor:pointer;display:flex;font-size:1em;font-weight:700;justify-content:center;line-height:3em;overflow:hidden;padding:0 1.5rem;position:relative;text-decoration:none!important;width:-moz-fit-content;width:fit-content;z-index:1}.solidBtn_xbIL:after{background-color:var(--dark-text-link);width:100%;z-index:-2}.solidBtn_xbIL:after,.solidBtn_xbIL:before{border-radius:80px;bottom:0;content:"";height:100%;left:0;position:absolute}.solidBtn_xbIL:before{background-color:#5df6c2;transition:.25s;width:0;z-index:-1}.box_OmWe{background-color:var(--surface-accent);border-radius:20px;box-shadow:none;color:var(--text-secondary)!important;line-height:1.7!important;padding:1.5rem;text-decoration:none!important}.subsection_04ph{margin-bottom:.5em}.toolList_x0ju{margin:0;padding-left:2.5rem}.imgContainer_VuXx{background:linear-gradient(87deg,#a1e1bc -2.44%,#73f7ff 98.1%);height:auto;padding:1rem}.cardContainer_OeIU,.imgContainer_VuXx{align-items:center;border-radius:20px;display:flex;justify-content:center;width:100%}.cardContainer_OeIU{border:1px solid var(--border-subtle);color:var(--text-link);cursor:pointer;padding:1.5rem 1rem;text-decoration:none!important}.tag_zJLr{background-color:var(--surface-03);border:none;border-radius:4px;box-shadow:none;color:var(--text-tertiary);cursor:pointer;font-size:.875em;justify-content:center;line-height:170%;margin:0 1rem 1rem 0;padding:.25rem .5rem}.activeTag_j6yD{background-color:var(--text-link)!important;color:var(--text-inverse)}@media (min-width:769px) and (max-width:996px){.layoutContainer_TJ5m{grid-template-columns:repeat(var(--columnS),minmax(0,calc((100% - (var(--columnS) - 1)*var(--gap))/ var(--columnS))))}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:997px) and (max-width:1439px){.layoutContainer_TJ5m{grid-template-columns:repeat(var(--columnM),minmax(0,calc((100% - (var(--columnM) - 1)*var(--gap))/ var(--columnM))))}}@media only screen and (min-width:1024px){.navigationSlider{margin-left:0}.navPusher{padding-top:90px}.onPageNav>.toc-headings{padding-top:50px}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_F8PC{padding:0 .3rem}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.illusContainer_T7PL{width:100%}.devlogSection_oy_p{align-items:start;flex-direction:column-reverse}.leftContainer_j1FY{max-width:100%}.contactSection_BYCv{flex-direction:column;gap:1.25rem}}@media only screen and (max-width:996px){.table-of-contents{margin-top:0}a.table-of-contents__link{color:var(--text-secondary)}.col{--ifm-spacing-horizontal:1rem}.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.header1_j8J6{font-size:2.5rem;margin:3rem 0 1.25rem}.header2_wAk7{font-size:2em;margin:8rem 0 1.25rem}.sectionContainer_MnYH{margin-bottom:5rem;padding:0 1rem}.layoutContainer_TJ5m{grid-template-columns:repeat(var(--columnXS),minmax(0,calc((100% - (var(--columnXS) - 1)*var(--gap))/ var(--columnXS))))}.section_EoX_{border-radius:20px;padding:2.5rem 1.25rem}.flexCol_tfnz{gap:1.25rem}.solidBtn_p_K8,.solidBtn_xbIL{line-height:2.5rem;width:100%}.arrowLeft_zS_K,.arrowRight_g8y1{height:2.5rem;min-width:2.5rem;width:2.5rem}}@media only screen and (max-width:767px){#oldSiteLink{height:60px}#oldSiteLink span{display:block;text-align:center}.fixedHeaderContainer{margin-top:60px}.pagination-nav{display:flex;flex-direction:column}.navbar-search .aa-DetachedSearchButton{margin-right:0;width:72px}.aa-DetachedSearchButtonPlaceholder{display:none}.markdown>h1,h1{font-size:2rem;margin:3rem 0 2rem}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}.aa-TouchOnly{display:none}}@media (hover:none) and (pointer:coarse){:root{--aa-spacing-factor:1.2;--aa-action-icon-size:22px}.aa-LoadingIndicator,.aa-SubmitButton{padding-left:3px;padding-left:calc(var(--aa-spacing-half)/ 2 - 1px);width:39px;width:calc(var(--aa-icon-size) + var(--aa-spacing)*1.25 - 1px)}.aa-ClearButton{padding:0 10.16672px;padding:0 calc(var(--aa-spacing)*.66667 - .5px)}.aa-ItemActionButton:focus svg,.aa-ItemActionButton:hover svg{color:inherit}.aa-DesktopOnly{display:none}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion){.aa-Panel{transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/css/styles.7a62cfd7.css b/assets/css/styles.7a62cfd7.css new file mode 100644 index 000000000..2e06ac987 --- /dev/null +++ b/assets/css/styles.7a62cfd7.css @@ -0,0 +1 @@ +.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.aa-SubmitButton,.navbar__search-input{-webkit-appearance:none;-moz-appearance:none}.menu,.navbar-sidebar{overflow-x:hidden}.toggleButton_yw5v,html{-webkit-tap-highlight-color:transparent}:root,body.dark,body[data-theme=dark]{--aa-icon-color-rgb:119,119,163;--aa-scrollbar-thumb-background-color-rgb:var(--aa-background-color-rgb)}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.aa-List,.clean-list,.containsTaskList_mC6p,.details_lb9f>summary,.dropdown__menu,.menu__list{list-style:none}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}*,.aa-Autocomplete *,.aa-DetachedFormContainer *,.aa-Panel *{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width);--ifm-spacing-horizontal:2rem}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:transparent;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_gY8A .wordWrapButtonIcon_iowe{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_Gvgb,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-moz-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-moz-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_F4P7:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_zC50,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;top:0;left:0;visibility:hidden}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter);content:""}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.description_jBtF,.navbar__items--center .navbar__brand,.section_EoX_ a{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.cardContainer__ccT,.help-flex,.navbar-help{text-decoration:none!important}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::-moz-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-moz-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold)}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:var(--text-link);--ifm-background-color:var(--surface-01)!important;--ifm-hover-overlay:var(--hover);--ifm-heading-font-family:"Poppins-Bold",sans-serif;--ifm-heading-color:var(--text-primary);--ifm-font-family-base:"Lato",sans-serif;--ifm-font-color-base:var(--text-secondary);--ifm-font-family-monospace:"Space Mono",monospace;--ifm-blockquote-color:var(--text-secondary);--ifm-container-width-xl:1022px;--ifm-hr-background-color:var(--border-subtle);--ifm-hr-margin-vertical:4rem;--ifm-navbar-background-color:var(--dark-surface-03);--ifm-navbar-height:64px;--doc-sidebar-width:322px!important;--ifm-sidebar-border-color:var(--border-subtle);--docsearch-modal-background:var(--surface-03)!important;--docsearch-footer-background:var(--surface-02)!important;--docsearch-border-color:var(--border-subtle)!important;--docsearch-placeholder-color:var(--text-tertiary)!important;--docsearch-muted-color:var(--text-tertiary)!important;--ifm-menu-color:var(--text-secondary);--ifm-menu-color-active:var(--text-link);--ifm-menu-color-background-active:var(--selected);--ifm-menu-color-background-hover:var(--hover);--ifm-menu-link-padding-horizontal:1rem;--ifm-menu-link-padding-vertical:0.4rem;--ifm-code-background:var(--surface-02);--ifm-code-font-size:0.875rem;--ifm-blockquote-border-color:var(--border-accent);--ifm-blockquote-border-width:2px;--ifm-toc-border-color:var(--border-subtle)!important;--ifm-toc-link-color:var(--text-tertiary);--ifm-link-color:var(--text-link);--ifm-table-border-color:var(--border-invisible);--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--aa-search-input-height:44px;--aa-input-icon-size:20px;--aa-base-unit:16;--aa-spacing-factor:1;--aa-spacing:calc(var(--aa-base-unit)*var(--aa-spacing-factor)*1px);--aa-spacing-half:calc(var(--aa-spacing)/2);--aa-panel-max-height:650px;--aa-base-z-index:9999;--aa-font-size:calc(var(--aa-base-unit)*1px);--aa-font-family:inherit;--aa-font-weight-medium:500;--aa-font-weight-semibold:600;--aa-font-weight-bold:700;--aa-icon-size:20px;--aa-icon-stroke-width:1.6;--aa-icon-color-alpha:1;--aa-action-icon-size:20px;--aa-text-color-rgb:38,38,39;--aa-text-color-alpha:1;--aa-primary-color-rgb:62,52,211;--aa-primary-color-alpha:0.2;--aa-muted-color-rgb:128,126,163;--aa-muted-color-alpha:0.6;--aa-panel-border-color-rgb:128,126,163;--aa-panel-border-color-alpha:0.3;--aa-input-border-color-rgb:128,126,163;--aa-input-border-color-alpha:0.8;--aa-background-color-rgb:255,255,255;--aa-background-color-alpha:1;--aa-input-background-color-rgb:255,255,255;--aa-input-background-color-alpha:1;--aa-selected-color-rgb:179,173,214;--aa-selected-color-alpha:0.205;--aa-description-highlight-background-color-rgb:245,223,77;--aa-description-highlight-background-color-alpha:0.5;--aa-detached-media-query:(max-width:680px);--aa-detached-modal-media-query:(min-width:680px);--aa-detached-modal-max-width:680px;--aa-detached-modal-max-height:500px;--aa-overlay-color-rgb:115,114,129;--aa-overlay-color-alpha:0.4;--aa-panel-shadow:0 0 0 1px rgba(35,38,59,.1),0 6px 16px -4px rgba(35,38,59,.15);--aa-scrollbar-width:13px;--aa-scrollbar-track-background-color-rgb:234,234,234;--aa-scrollbar-track-background-color-alpha:1;--aa-scrollbar-thumb-background-color-alpha:1}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}@font-face{font-family:Poppins-Bold;src:url(/assets/fonts/Poppins-Bold-404e299be26d78e6679447ea7cb2d41f.ttf) format("truetype")}@font-face{font-family:Lato;src:url(/assets/fonts/Lato-Regular-9919edff6283018571add043109dc20b.ttf) format("truetype")}.navbar{align-items:center;padding:0 1.5rem}.navbar-search .DocSearch-Button,.navbar-search .aa-DetachedSearchButton{background-color:transparent;border:1px solid var(--dark-border-subtle);border-radius:40px;height:3rem;margin-right:.5rem;padding:0 1rem;width:280px}.navbar-search .DocSearch-Button:hover,.navbar-search .aa-DetachedSearchButton:hover{background-color:var(--dark-hover)!important;border:1px solid var(--dark-border-accent);box-shadow:none!important}.DocSearch-Button .DocSearch-Search-Icon,.aa-DetachedSearchButton .aa-DetachedSearchButtonIcon{color:var(--dark-text-tertiary)!important}.DocSearch-Button-Placeholder,.aa-DetachedSearchButtonPlaceholder{color:var(--dark-text-tertiary)}.DocSearch-Button-Key{background:var(--dark-surface-02)!important;box-shadow:none!important;color:var(--dark-text-secondary)!important;font-size:.75rem!important;height:1.5rem!important;margin-right:-.5rem!important;padding:0!important;width:1.5rem!important}.aa-DetachedFormContainer{background-color:var(--surface-02)!important;border-bottom:var(--border-subtle)}.aa-DetachedContainer,.aa-DetachedContainer .aa-Panel{background-color:var(--surface-02)!important;background:var(--surface-02)!important}.aa-Form{background-color:transparent!important;border:1px solid var(--border-subtle)!important}.aa-ClearButton,.aa-Label svg{color:var(--text-tertiary)!important}.aa-Form:hover{background-color:var(--hover)!important}.aa-Form:focus,.aa-Form:focus-within{border:1px solid var(--border-accent)!important;box-shadow:none!important}.aa-Input{color:var(--text-primary)!important}.aa-Input::-webkit-input-placeholder{color:var(--text-tertiary)!important}.navbar-help{border:1px solid var(--dark-border-subtle);border-radius:40px;cursor:pointer;height:3rem;margin-right:1rem;padding:0 1rem 0 .75rem!important}.navbar-help:hover{background-color:var(--dark-hover)}.help-flex{align-items:center;color:var(--dark-text-primary);display:flex;height:100%;justify-content:center}.help-text{margin:0 0 0 .5rem}.menu{padding:.5rem!important}.menu__link,.menu__list-item-collapsible{border-radius:20px!important;height:2.5rem}.menu__link--active,h1,h2,h3,h4{font-weight:700}.menu__list .menu__list{padding-left:calc(var(--ifm-menu-link-padding-horizontal) + 1.25em)}.theme-doc-sidebar-menu>li:first-child>div>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0yMy41ODIgNC45NzVhLjkxLjkxIDAgMCAwLS42NDgtLjY0NyAxMC4yMTYgMTAuMjE2IDAgMCAwLTEwLjM2NyAzLjI5bC0xLjAxMiAxLjIwMS0yLjM2NS0uNTdBMi41MjIgMi41MjIgMCAwIDAgNi4xMTUgOS40OGwtMS45OTggMy41NDFhLjkwOC45MDggMCAwIDAgLjYgMS4zMzRsMi43OS41OThjLS4yMzYuNzItLjQwNCAxLjQ2LS41MDMgMi4yMWEuOTA4LjkwOCAwIDAgMCAuMjU4Ljc2bDIuODE1IDIuODE0YS45MDUuOTA1IDAgMCAwIC43Mi4yNjIgMTEuMDQ2IDExLjA0NiAwIDAgMCAyLjI2My0uNDQ0bC41ODQgMi43MjZhLjkwOS45MDkgMCAwIDAgMS4zMzQuNjAxbDMuNTQ2LTJhMi43NTYgMi43NTYgMCAwIDAgMS4yNDgtM2wtLjYwNy0yLjUwNCAxLjEyMy0xLjAzM2ExMC4xNzIgMTAuMTcyIDAgMCAwIDMuMjk0LTEwLjM3Wk02LjMwNSAxMi44NGwxLjQxMy0yLjUwNmEuNzUuNzUgMCAwIDEgLjk3MS0uMzRsMS41Ni4zNzctLjU5LjcwMWMtLjU2LjY3LTEuMDQ0IDEuNC0xLjQ0NCAyLjE3N2wtMS45MS0uNDA5Wm0xMS4zMjIgNy40NjUtMi40NjYgMS4zOS0uMzktMS44MmMuNzktLjM5NCAxLjUyNy0uODg4IDIuMTkxLTEuNDdsLjY3NS0uNjIuMzY3IDEuNTFhLjk0NS45NDUgMCAwIDEtLjM3NyAxLjAxWm0xLjQ2Ni02LjMyNC0zLjM0NiAzLjA3NWE4Ljg3NCA4Ljg3NCAwIDAgMS00LjY5NCAyLjA5Mkw4Ljg3IDE2Ljk2NGE5LjkyNSA5LjkyNSAwIDAgMSAyLjE4LTQuNzI3bDEuNTI0LTEuODFhLjg3Ny44NzcgMCAwIDAgLjA3LS4wODNsMS4zMDMtMS41NDdhOC40MjMgOC40MjMgMCAwIDEgNy45OTktMi44MzMgOC4zNyA4LjM3IDAgMCAxLTIuODUzIDguMDE2Wm0tLjgzOC01LjU5NmExLjM2MiAxLjM2MiAwIDEgMCAwIDIuNzIzIDEuMzYyIDEuMzYyIDAgMCAwIDAtMi43MjNaIiBmaWxsPSIjMDdBOTcyIi8+PC9zdmc+);margin-right:.5rem;margin-top:.25rem}.theme-doc-sidebar-menu>li:nth-child(2)>div>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Im0yMC41MTQgOC41MTQtLjcwNy43MDcuNzA3LS43MDdabS0zLjQ3Mi0zLjQ3My43MDctLjcwNy0uNzA3LjcwN1pNOS41NTYgMjR2LTEgMVpNMTggMjR2MS0xWk02LjI0MiAyMi43ODdsLjg5MS0uNDU0LS44OS40NTRabS45NzEuOTcuNDU0LS44OS0uNDU0Ljg5Wm0wLTE5LjUxNS40NTQuODkxLS40NTQtLjg5Wm0tLjk3Ljk3MUw1LjM1IDQuNzZsLjg5MS40NTRabTkuOTk4LS44ODYtLjUyMy44NTMuNTIzLS44NTNabS0uNjQyLS4yNjYuMjMzLS45NzItLjIzMy45NzJabTUuODk1IDUuODk2Ljk3Mi0uMjMzLS45NzIuMjMzWm0tLjI2Ni0uNjQyLS44NTMuNTIyLjg1My0uNTIyWm0uMDg2IDEzLjQ3Mi44OS40NTQtLjg5LS40NTRabS0uOTcyLjk3LS40NTQtLjg5LjQ1NC44OVptLTMuNjM1LTkuMzUzYTEgMSAwIDAgMC0xLjQxNCAxLjQxNGwxLjQxNC0xLjQxNFptMS41MTUgMi45My43MDcuNzA2YTEgMSAwIDAgMCAwLTEuNDE0bC0uNzA3LjcwN1ptLTIuOTMgMS41MTRhMSAxIDAgMCAwIDEuNDE1IDEuNDE1bC0xLjQxNC0xLjQxNVptLTQuNDQ0IDEuNDE1YTEgMSAwIDAgMCAxLjQxNS0xLjQxNWwtMS40MTUgMS40MTVabS0xLjUxNS0yLjkzLS43MDctLjcwN2ExIDEgMCAwIDAgMCAxLjQxNGwuNzA3LS43MDdabTIuOTMtMS41MTVhMSAxIDAgMCAwLTEuNDE1LTEuNDE0bDEuNDE1IDEuNDE0Wm05LjI5My00LjE1MWExIDEgMCAxIDAgMC0ydjJabS0zLjExMS0xdi0xIDFaTTE1Ljg4OSA0YTEgMSAwIDEgMC0yIDBoMlptLjIxMyA2LjQyNC40NTQtLjg5LS40NTQuODlabS0uOTctLjk3Ljg5LS40NTUtLjg5LjQ1NFptNy40MjQgMTAuOTl2LTkuNDE2aC0ydjkuNDE3aDJaTTIxLjIyIDcuODA4IDE3Ljc1IDQuMzM0IDE2LjMzNSA1Ljc1bDMuNDcyIDMuNDcyIDEuNDE1LTEuNDE0Wk0xNC41MjcgM0g5LjU1NnYyaDQuOTcyVjNaTTUgNy41NTZ2MTIuODg5aDJWNy41NTVINVpNOS41NTYgMjVIMTh2LTJIOS41NTZ2MlpNNSAyMC40NDVjMCAuNjA1IDAgMS4xMi4wMzQgMS41NC4wMzUuNDMzLjExMi44NTQuMzE3IDEuMjU2bDEuNzgyLS45MDhjLS4wMzctLjA3NC0uMDgtLjIwMi0uMTA2LS41MS0uMDI2LS4zMi0uMDI3LS43NC0uMDI3LTEuMzc4SDVaTTkuNTU2IDIzYy0uNjM5IDAtMS4wNTggMC0xLjM3OS0uMDI3LS4zMDgtLjAyNS0uNDM3LS4wNjktLjUxLS4xMDZsLS45MDggMS43ODJjLjQwMi4yMDUuODIzLjI4MiAxLjI1Ni4zMTcuNDIuMDM1LjkzNS4wMzQgMS41NC4wMzR2LTJabS00LjIwNS4yNGMuMzA5LjYwNy44MDIgMS4xIDEuNDA4IDEuNDA5bC45MDgtMS43ODJhMS4yMjIgMS4yMjIgMCAwIDEtLjUzNC0uNTM0bC0xLjc4Mi45MDhaTTkuNTU2IDNjLS42MDYgMC0xLjEyIDAtMS41NDEuMDM0LS40MzMuMDM1LS44NTQuMTEyLTEuMjU2LjMxN2wuOTA4IDEuNzgyYy4wNzMtLjAzNy4yMDEtLjA4LjUxLS4xMDYuMzItLjAyNi43NC0uMDI3IDEuMzc5LS4wMjdWM1pNNyA3LjU1NmMwLS42NCAwLTEuMDU4LjAyNy0xLjM3OS4wMjUtLjMwOC4wNjktLjQzNi4xMDYtLjUxTDUuMzUxIDQuNzZjLS4yMDUuNDAzLS4yODIuODIzLS4zMTcgMS4yNTYtLjAzNS40Mi0uMDM0LjkzNS0uMDM0IDEuNTRoMlpNNi43NiAzLjM1Yy0uNjA3LjMxLTEuMS44MDItMS40MDkgMS40MDhsMS43ODIuOTA4Yy4xMTgtLjIzLjMwNC0uNDE3LjUzNC0uNTM0TDYuNzYgMy4zNTFabTEwLjk4OS45ODNjLS4zNTEtLjM1LS42MzctLjY0Ni0uOTg2LS44NkwxNS43MTggNS4xOGMuMS4wNjEuMTk5LjE1LjYxNy41NjlsMS40MTQtMS40MTVaTTE0LjUyOCA1Yy41OSAwIC43MjMuMDA2LjgzNy4wMzRsLjQ2Ny0xLjk0NUMxNS40MzQgMi45OTQgMTUuMDIzIDMgMTQuNTI3IDN2MlptMi4yMzUtMS41MjVhMy4yMjIgMy4yMjIgMCAwIDAtLjkzLS4zODZsLS40NjggMS45NDVjLjEyNS4wMy4yNDQuMDguMzUzLjE0NmwxLjA0NS0xLjcwNVptNS43OTMgNy41NTNjMC0uNDk3LjAwNS0uOTA3LS4wOS0xLjMwNGwtMS45NDUuNDY3Yy4wMjguMTE0LjAzNS4yNDguMDM1LjgzN2gyWm0tMi43NDktMS44MDdjLjQxNy40MTcuNTA3LjUxNi41NjguNjE2bDEuNzA2LTEuMDQ1Yy0uMjE0LS4zNDgtLjUwOC0uNjMzLS44Ni0uOTg1bC0xLjQxNCAxLjQxNFptMi42Ni41MDNhMy4yMjQgMy4yMjQgMCAwIDAtLjM4Ni0uOTMybC0xLjcwNiAxLjA0NWMuMDY3LjExLjExNi4yMjkuMTQ2LjM1NGwxLjk0NS0uNDY3Wm0tMS45MTEgMTAuNzJjMCAuNjQtLjAwMSAxLjA1OC0uMDI3IDEuMzc5LS4wMjYuMzA4LS4wNy40MzYtLjEwNi41MWwxLjc4Mi45MDhjLjIwNS0uNDAzLjI4Mi0uODIzLjMxNy0xLjI1Ni4wMzQtLjQyLjAzNC0uOTM1LjAzNC0xLjU0aC0yWk0xOCAyNWMuNjA2IDAgMS4xMiAwIDEuNTQxLS4wMzQuNDMyLS4wMzUuODUzLS4xMTIgMS4yNTUtLjMxN2wtLjkwOC0xLjc4MmMtLjA3My4wMzctLjIwMS4wOC0uNTEuMTA2LS4zMi4wMjYtLjczOS4wMjctMS4zNzguMDI3djJabTIuNDIzLTIuNjY3Yy0uMTE3LjIzLS4zMDUuNDE2LS41MzUuNTM0bC45MDggMS43ODJhMy4yMjQgMy4yMjQgMCAwIDAgMS40MDktMS40MDhsLTEuNzgyLS45MDhabS01LjEzLTYuNTE1IDIuMjIyIDIuMjIyIDEuNDE0LTEuNDE0LTIuMjIyLTIuMjIyLTEuNDE0IDEuNDE0Wm0yLjIyMi44MDgtMi4yMjIgMi4yMjIgMS40MTQgMS40MTUgMi4yMjItMi4yMjMtMS40MTQtMS40MTRabS01LjI1MiAyLjIyMi0yLjIyMy0yLjIyMi0xLjQxNCAxLjQxNCAyLjIyMiAyLjIyMyAxLjQxNS0xLjQxNVptLTIuMjIzLS44MDggMi4yMjMtMi4yMjItMS40MTUtMS40MTQtMi4yMjIgMi4yMjIgMS40MTQgMS40MTRabTExLjUxNi04LjM3M2gtMy4xMTF2MmgzLjExdi0yWk0xNS44ODkgNy4xMVY0aC0ydjMuMTExaDJabTIuNTU2IDIuNTU2Yy0uNjQgMC0xLjA1OC0uMDAxLTEuMzc5LS4wMjctLjMwOS0uMDI2LS40MzctLjA3LS41MS0uMTA3bC0uOTA4IDEuNzgyYy40MDIuMjA1LjgyMy4yODMgMS4yNTYuMzE4LjQyLjAzNC45MzUuMDM0IDEuNTQuMDM0di0yWk0xMy44ODkgNy4xMWMwIC42MDYgMCAxLjEyLjAzNCAxLjU0MS4wMzUuNDMyLjExMi44NTMuMzE3IDEuMjU1TDE2LjAyMiA5Yy0uMDM3LS4wNzMtLjA4LS4yMDEtLjEwNi0uNTEtLjAyNi0uMzItLjAyNy0uNzQtLjAyNy0xLjM3OGgtMlptMi42NjcgMi40MjJBMS4yMjIgMS4yMjIgMCAwIDEgMTYuMDIyIDlsLTEuNzgyLjkwOGMuMzA5LjYwNi44MDEgMS4xIDEuNDA4IDEuNDA4bC45MDgtMS43ODJaIiBmaWxsPSIjMDdBOTcyIi8+PC9zdmc+);margin-right:.5em;margin-top:.25em}.theme-doc-sidebar-menu>li:nth-child(3)>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0yMSA5aC0xVjhhMyAzIDAgMCAwLTMtM0g3YTMgMyAwIDAgMC0zIDN2MTJhMyAzIDAgMCAwIDMgM2gxNGEzIDMgMCAwIDAgMy0zdi04YTMgMyAwIDAgMC0zLTNaTTcgN2gxMGExIDEgMCAwIDEgMSAxdjFIN2ExIDEgMCAwIDEgMC0yWm0xNSAxMGgtMWExIDEgMCAwIDEgMC0yaDF2MlptMC00aC0xYTMgMyAwIDAgMCAwIDZoMXYxYTEgMSAwIDAgMS0xIDFIN2ExIDEgMCAwIDEtMS0xdi05LjE3QTMgMyAwIDAgMCA3IDExaDE0YTEgMSAwIDAgMSAxIDF2MVoiIGZpbGw9IiMwN0E5NzIiLz48L3N2Zz4=);margin-right:.5em;margin-top:.25em}.theme-doc-sidebar-menu>li:nth-child(4)>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0yMy4wMjIgMjAuMDE5aC02LjE4N2EzLjAwNSAzLjAwNSAwIDAgMC0xLjgyMi0xLjgyMnYtMy4xODRoNy4wMDhhMSAxIDAgMSAwIDAtMi4wMDJIMjEuMDJWNy4wMDRBMy4wMDMgMy4wMDMgMCAwIDAgMTguMDE3IDRoLTguMDFhMy4wMDQgMy4wMDQgMCAwIDAtMy4wMDMgMy4wMDR2Ni4wMDdINi4wMDJhMS4wMDEgMS4wMDEgMCAwIDAgMCAyLjAwMmg3LjAwOXYzLjE4NGEzLjAwNSAzLjAwNSAwIDAgMC0xLjgyMiAxLjgyMkg1YTEuMDAxIDEuMDAxIDAgMCAwIDAgMi4wMDJoNi4xODdhMy4wMDMgMy4wMDMgMCAwIDAgNS42NDcgMGg2LjE4N2ExLjAwMSAxLjAwMSAwIDAgMCAwLTIuMDAyWk05LjAwNiAxMy4wMVY3LjAwNGExLjAwMSAxLjAwMSAwIDAgMSAxLjAwMS0xLjAwMmg4LjAxYTEuMDAxIDEuMDAxIDAgMCAxIDEgMS4wMDJ2Ni4wMDdIOS4wMDdabTUuMDA2IDkuMDFhMS4wMDEgMS4wMDEgMCAxIDEgMC0yLjAwMiAxLjAwMSAxLjAwMSAwIDAgMSAwIDIuMDAyWiIgZmlsbD0iIzA3QTk3MiIvPjwvc3ZnPg==);margin-right:.5rem;margin-top:.25rem}.theme-doc-sidebar-menu>li:nth-child(5)>div>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0xOC45ODUgOC4wODdhOC43NjYgOC43NjYgMCAwIDEgMy42NzggNi4yMzhNNS40NDggMTQuMzc1YTguNzM5IDguNzM5IDAgMCAxIDMuNjE4LTYuMjM3TTEwLjE3IDIzLjA2N2E4LjUwNSA4LjUwNSAwIDAgMCAzLjg5LjkzMyA4LjQ1NSA4LjQ1NSAwIDAgMCAzLjc1LS44NjJNMTQuMDYgOS42MzljMS41NDQgMCAyLjc5NS0xLjI2MiAyLjc5NS0yLjgyQzE2Ljg1NSA1LjI2MiAxNS42MDQgNCAxNC4wNiA0Yy0xLjU0MyAwLTIuNzk0IDEuMjYyLTIuNzk0IDIuODIgMCAxLjU1NyAxLjI1IDIuODE5IDIuNzk0IDIuODE5Wk02Ljc5NCAyMi4wMzJjMS41NDMgMCAyLjc5NC0xLjI2MiAyLjc5NC0yLjgxOXMtMS4yNS0yLjgyLTIuNzk0LTIuODJDNS4yNTEgMTYuMzk0IDQgMTcuNjU3IDQgMTkuMjE0czEuMjUgMi44MiAyLjc5NCAyLjgyWk0yMS4yMDYgMjIuMDMyYzEuNTQzIDAgMi43OTQtMS4yNjIgMi43OTQtMi44MTlzLTEuMjUtMi44Mi0yLjc5NC0yLjgyYy0xLjU0MyAwLTIuNzk0IDEuMjYzLTIuNzk0IDIuODJzMS4yNTEgMi44MiAyLjc5NCAyLjgyWiIgc3Ryb2tlPSIjMDdBOTcyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==);margin-right:.5rem;margin-top:.25rem}.theme-doc-sidebar-menu>li:nth-child(6)>div>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0xOC45IDUuNjU2YTcuMjczIDcuMjczIDAgMCAwLTYuMDczLTEuNTEgNy4yNzIgNy4yNzIgMCAwIDAtNS43IDUuNzQ2IDcuMzM2IDcuMzM2IDAgMCAwIDEuNTY0IDYuMDQ1IDQuMTI3IDQuMTI3IDAgMCAxIDEuMDM2IDIuNjA5djIuNzI3QTIuNzI3IDIuNzI3IDAgMCAwIDEyLjQ1NCAyNGgzLjYzNmEyLjcyNyAyLjcyNyAwIDAgMCAyLjcyNy0yLjcyN3YtMi41NTVhNC43IDQuNyAwIDAgMSAxLjExLTIuOSA3LjI3MyA3LjI3MyAwIDAgMC0xLjAyOC0xMC4xOHYuMDE4Wk0xNyAyMS4yNzNhLjkwOS45MDkgMCAwIDEtLjkxLjkwOWgtMy42MzZhLjkwOS45MDkgMCAwIDEtLjkwOS0uOTF2LS45MDhIMTd2LjkwOVptMS41MTctNi41ODJBNi40OCA2LjQ4IDAgMCAwIDE3IDE4LjU0NmgtMS44MTh2LTIuNzI3YS45MDkuOTA5IDAgMCAwLTEuODE4IDB2Mi43MjdoLTEuODE4YTUuOTA4IDUuOTA4IDAgMCAwLTEuNDU0LTMuNzgyIDUuNDU0IDUuNDU0IDAgMCAxIDMuMDgxLTguODM2IDUuNDU0IDUuNDU0IDAgMCAxIDYuNTU1IDUuMzQ2IDUuMzU1IDUuMzU1IDAgMCAxLTEuMjEgMy40MThaIiBmaWxsPSIjMDdBOTcyIi8+PC9zdmc+);margin-right:.5rem;margin-top:.25rem}.theme-doc-sidebar-menu>li:nth-child(7)>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTEuODE2IDYuMzI0YTguMSA4LjEgMCAwIDAtNS43NTUgNi43NjdoMy40NDZhMTQuOTEgMTQuOTEgMCAwIDEgMi4zMDktNi43NjdabTQuNTUgMGExNC45MSAxNC45MSAwIDAgMSAyLjMwOCA2Ljc2N2gzLjQ0N2E4LjEgOC4xIDAgMCAwLTUuNzU1LTYuNzY3Wm0uMyA2Ljc2N2ExMi45MSAxMi45MSAwIDAgMC0yLjU3NS02LjUzMiAxMi45MSAxMi45MSAwIDAgMC0yLjU3NSA2LjUzMmg1LjE1Wm0tNS4xNSAyaDUuMTVhMTIuOTEgMTIuOTEgMCAwIDEtMi41NzUgNi41MzIgMTIuOTEgMTIuOTEgMCAwIDEtMi41NzUtNi41MzJabS0yLjAwOSAwSDYuMDYxYTguMSA4LjEgMCAwIDAgNS43NTUgNi43NjcgMTQuOTEgMTQuOTEgMCAwIDEtMi4zMDktNi43NjdabTYuODYgNi43NjdhMTQuOTEgMTQuOTEgMCAwIDAgMi4zMDctNi43NjdoMy40NDdhOC4xIDguMSAwIDAgMS01Ljc1NSA2Ljc2N1ptLTIuMjc2IDIuMzI0YzUuNTczIDAgMTAuMDktNC41MTggMTAuMDktMTAuMDkxQzI0LjE4MiA4LjUxOCAxOS42NjUgNCAxNC4wOTIgNCA4LjUxOCA0IDQgOC41MTggNCAxNC4wOWMwIDUuNTc0IDQuNTE4IDEwLjA5MiAxMC4wOSAxMC4wOTJaIiBmaWxsPSIjMDdBOTcyIi8+PC9zdmc+);margin-right:.5rem;margin-top:.25rem}.category-resource>div>a:before{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiByeD0iOCIgZmlsbD0iIzA3QTk3MiIgZmlsbC1vcGFjaXR5PSIuMSIvPjxwYXRoIGQ9Ik0yMy43MjMgMTguMzM4VjkuNTcyYTIuMTkgMi4xOSAwIDAgMC0xLjA5Ni0xLjg5NWwtNy42Ny00LjM4M2EyLjE5MiAyLjE5MiAwIDAgMC0yLjE5MSAwbC03LjY3IDQuMzgzQTIuMTkxIDIuMTkxIDAgMCAwIDQgOS41NzJ2OC43NjZhMi4xOTIgMi4xOTIgMCAwIDAgMS4wOTYgMS44OTZsNy42NyA0LjM4MmEyLjE5MiAyLjE5MiAwIDAgMCAyLjE5MSAwbDcuNjctNC4zODJhMi4xOTIgMi4xOTIgMCAwIDAgMS4wOTYtMS44OTZaIiBzdHJva2U9IiMwN0E5NzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0ibTQuMjk2IDguNDMyIDkuNTY2IDUuNTM0IDkuNTY1LTUuNTM0TTEzLjg2MiAyNVYxMy45NTUiIHN0cm9rZT0iIzA3QTk3MiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=);margin-right:.5rem;margin-top:.25rem}.menu__caret{border-radius:50%}.footer>.container{padding-bottom:2rem!important;padding-top:2rem!important}.footer__copyright{font-size:.875em}.table-of-contents{margin-top:3rem;padding:0 0 0 1rem}.table-of-contents__link{font-size:.875rem}.container{padding-bottom:7.5rem!important}.pagination-nav__link{border:1px solid var(--border-subtle);border-radius:8px}.pagination-nav__sublabel{color:var(--text-tertiary);margin-bottom:.5rem}.pagination-nav__label{color:var(--text-primary);font-size:1.25rem}.tabs,.theme-last-updated{color:var(--text-tertiary)}.pagination-nav__link--next .pagination-nav__label:after,.pagination-nav__link--prev .pagination-nav__label:before{content:none}button,h1,h2,h3{line-height:1.2}h4{line-height:1.4}button,h4{font-family:Lato,sans-serif}blockquote,ol,p,ul{font-size:1rem;font-weight:400;line-height:1.7;margin:1rem 0}.markdown>h1,h1{font-size:2.5rem;margin:3rem 0 2rem}.markdown>h2,h2{font-size:1.75rem;margin:3.5rem 0 1.5rem}.markdown>h3,h3{font-size:1.5rem;margin:2rem 0 1.5rem}.markdown>h4,h4{font-size:1.25rem;margin-bottom:1rem}.markdown li::marker{color:var(--text-link)}code{border-radius:4px}pre,pre>code{border-radius:8px}pre>code{box-shadow:none;line-height:1.7!important}.markdown video{padding:1rem 0}.tabs{border-bottom:1px solid var(--border-subtle);font-weight:400}.tabs__item{border-radius:4px 4px 0 0;margin-right:2rem;padding:.5rem}.tabs__item--active{font-weight:700}.theme-last-updated{font-size:.75rem;font-style:normal}.theme-edit-this-page{font-size:.75rem}.aa-ClearButton[hidden],.aa-ItemContent:empty,.aa-LoadingIndicator[hidden],.aa-Source:empty,.aa-SourceHeader:empty,.docSidebarContainer_YfHR,.sidebarLogo_isFc,.theme-edit-this-page>svg,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_SFTY,[data-theme=light] .darkToggleIcon_ekgs,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.alert{border:1px solid var(--ifm-alert-border-color)}.alert--secondary{--ifm-alert-background-color:var(--alert-secondary-bg);--ifm-alert-border-color:var(--alert-secondary)}.alert--success{--ifm-alert-background-color:var(--alert-success-bg);--ifm-alert-border-color:var(--alert-success)}.alert--info{--ifm-alert-background-color:var(--alert-info-bg);--ifm-alert-border-color:var(--alert-info)}.alert--warning{--ifm-alert-background-color:var(--alert-warning-bg);--ifm-alert-border-color:var(--alert-warning)}.alert--danger{--ifm-alert-background-color:var(--alert-danger-bg);--ifm-alert-border-color:var(--alert-danger)}details{--ifm-alert-border-color:var(--alert-success)!important;--ifm-alert-background-color:var(--alert-success-bg)!important}.footer{--ifm-footer-background-color:var(--dark-surface-03);--ifm-footer-title-color:var(--dark-text-primary);--ifm-footer-link-color:var(--dark-text-secondary)}#oldSiteLink{align-items:center;background-color:var(--dark-surface-02);color:var(--dark-text-secondary);display:flex;height:2.5rem;justify-content:center;width:100%;z-index:9999}#oldSiteLink a,.textHighlight_ic0t{color:var(--dark-text-link)}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.description_qXLp,.links_KO_M,.links_hvUO,.tagList_EW4E,.title_ZEhm,.title_aezp{margin-bottom:.5rem}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}.cardContainer__ccT{border:1px solid var(--border-subtle);border-radius:20px;color:var(--text-secondary)!important;cursor:pointer;display:flex;padding:1.5rem 1rem;width:100%}.aa-ItemLink,.aa-SourceFooterSeeAll{-webkit-text-decoration:none;text-decoration:none}.cardContainer_OeIU:hover,.cardContainer__ccT:hover,.cardContainer_bFxw:hover{background-color:var(--hover);border:1px solid var(--border-accent)}.iconContainer_RJI0{align-items:center;background-color:var(--surface-02);border-radius:50%;display:flex;height:2rem;justify-content:center;min-width:2rem;width:2rem}.rightContainer_HZnY{display:flex;flex-direction:column;margin-left:1rem}.links_KO_M{display:flex;flex-wrap:wrap}.links_KO_M>a:not(:last-child){margin-right:1rem}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit;text-decoration:underline}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.aa-Form,.toggleButton_yw5v{align-items:center;width:100%}.toggle_MW0i{border:1px solid var(--dark-border-subtle);border-radius:50%;height:3rem;width:3rem}.toggleButton_yw5v{border-radius:50%;color:var(--dark-text-secondary);display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast)}.toggleButton_yw5v:hover{background:var(--hover)}.toggleButtonDisabled_BJd7{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_PEFL{display:none;margin:0}.iconExternalLink_nPIU{margin-left:.3rem}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}body.dark,body[data-theme=dark]{--aa-text-color-rgb:183,192,199;--aa-primary-color-rgb:146,138,255;--aa-muted-color-rgb:146,138,255;--aa-input-background-color-rgb:0,3,9;--aa-background-color-rgb:21,24,42;--aa-selected-color-rgb:146,138,255;--aa-selected-color-alpha:0.25;--aa-description-highlight-background-color-rgb:0 255 255;--aa-description-highlight-background-color-alpha:0.25;--aa-panel-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--aa-scrollbar-track-background-color-rgb:44,46,64;--aa-muted-color-alpha:1}.aa-Autocomplete,.aa-DetachedFormContainer,.aa-Panel{color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font-family:inherit;font-family:var(--aa-font-family);font-size:16px;font-size:var(--aa-font-size);font-weight:400;line-height:1em;margin:0;padding:0;text-align:left}.aa-Form{background-color:rgba(var(--aa-input-background-color-rgb),var(--aa-input-background-color-alpha));border:1px solid rgba(128,126,163,.8);border:1px solid rgba(var(--aa-input-border-color-rgb),var(--aa-input-border-color-alpha));border-radius:3px;display:flex;line-height:1em;margin:0;position:relative}.aa-ClearButton,.aa-Input,.aa-SubmitButton{border:0;background:none}.aa-Form:focus-within{border-color:#3e34d3;border-color:rgba(var(--aa-primary-color-rgb),1);box-shadow:0 0 0 2px rgba(62,52,211,.2),inset 0 0 0 2px rgba(62,52,211,.2);box-shadow:rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha)) 0 0 0 2px,inset rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha)) 0 0 0 2px;outline:currentColor}.aa-InputWrapperPrefix{align-items:center;display:flex;flex-shrink:0;height:44px;height:var(--aa-search-input-height);order:1}.aa-Label,.aa-LoadingIndicator{cursor:auto;flex-shrink:0;height:100%;padding:0;text-align:left}.aa-Label svg,.aa-LoadingIndicator svg{stroke-width:1.6;stroke-width:var(--aa-icon-stroke-width);color:#3e34d3;color:rgba(var(--aa-primary-color-rgb),1);height:auto;max-height:20px;max-height:var(--aa-input-icon-size);width:20px;width:var(--aa-input-icon-size)}.aa-LoadingIndicator,.aa-SubmitButton{height:100%;padding-left:11px;padding-left:calc(var(--aa-spacing)*.75 - 1px);padding-right:8px;padding-right:var(--aa-spacing-half);width:47px;width:calc(var(--aa-spacing)*1.75 + var(--aa-icon-size) - 1px)}.aa-SubmitButton{appearance:none;margin:0}.aa-LoadingIndicator{align-items:center;display:flex;justify-content:center}.aa-InputWrapper{order:3;position:relative;width:100%}.aa-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font:inherit;height:44px;height:var(--aa-search-input-height);padding:0;width:100%}.aa-Input::-moz-placeholder{color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));opacity:1}.aa-Input::placeholder{color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));opacity:1}.aa-Input:focus{border-color:none;box-shadow:none;outline:0}.aa-Input::-webkit-search-cancel-button,.aa-Input::-webkit-search-decoration,.aa-Input::-webkit-search-results-button,.aa-Input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.aa-InputWrapperSuffix{align-items:center;display:flex;height:44px;height:var(--aa-search-input-height);order:4}.aa-ClearButton{align-items:center;color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));cursor:pointer;display:flex;height:100%;margin:0;padding:0 12.83328px;padding:0 calc(var(--aa-spacing)*.83333 - .5px)}.aa-Item,.aa-ItemIcon{align-items:center;border-radius:3px}.aa-ClearButton:focus,.aa-ClearButton:hover,.aa-ItemActionButton:focus svg,.aa-ItemActionButton:hover svg{color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha))}.aa-ClearButton svg{stroke-width:1.6;stroke-width:var(--aa-icon-stroke-width);width:20px;width:var(--aa-icon-size)}.aa-Panel{background-color:#fff;background-color:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));border-radius:4px;border-radius:calc(var(--aa-spacing)/4);box-shadow:0 0 0 1px rgba(35,38,59,.1),0 6px 16px -4px rgba(35,38,59,.15);box-shadow:var(--aa-panel-shadow);margin:8px 0 0;overflow:hidden;position:absolute;transition:opacity .2s ease-in,filter .2s ease-in}.aa-Panel button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;margin:0;padding:0}.aa-PanelLayout{height:100%;margin:0;max-height:650px;max-height:var(--aa-panel-max-height);overflow-y:auto;padding:0;position:relative;text-align:left}.aa-PanelLayoutColumns--twoGolden{display:grid;grid-template-columns:39.2% auto;overflow:hidden;padding:0}.aa-PanelLayoutColumns--two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;padding:0}.aa-PanelLayoutColumns--three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:hidden;padding:0}.aa-Panel--stalled .aa-Source{filter:grayscale(1);opacity:.8}.aa-Panel--scrollable{margin:0;max-height:650px;max-height:var(--aa-panel-max-height);overflow-x:hidden;overflow-y:auto;padding:8px;padding:var(--aa-spacing-half);scrollbar-color:#fff #eaeaea;scrollbar-color:rgba(var(--aa-scrollbar-thumb-background-color-rgb),var(--aa-scrollbar-thumb-background-color-alpha)) rgba(var(--aa-scrollbar-track-background-color-rgb),var(--aa-scrollbar-track-background-color-alpha));scrollbar-width:thin}.aa-Panel--scrollable::-webkit-scrollbar{width:13px;width:var(--aa-scrollbar-width)}.aa-Panel--scrollable::-webkit-scrollbar-track{background-color:#eaeaea;background-color:rgba(var(--aa-scrollbar-track-background-color-rgb),var(--aa-scrollbar-track-background-color-alpha))}.aa-Panel--scrollable::-webkit-scrollbar-thumb{background-color:#fff;background-color:rgba(var(--aa-scrollbar-thumb-background-color-rgb),var(--aa-scrollbar-thumb-background-color-alpha));border:3px solid #eaeaea;border:3px solid rgba(var(--aa-scrollbar-track-background-color-rgb),var(--aa-scrollbar-track-background-color-alpha));border-radius:9999px;border-right-width:2px}.aa-Source{margin:0;padding:0;position:relative;width:100%}.aa-SourceNoResults{font-size:1em;margin:0;padding:16px;padding:var(--aa-spacing)}.aa-List{margin:0}.aa-List,.aa-SourceHeader{padding:0;position:relative}.aa-SourceHeader{margin:8px .5em 8px 0;margin:var(--aa-spacing-half) .5em var(--aa-spacing-half) 0}.aa-SourceHeaderTitle{background:#fff;background:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));color:#3e34d3;color:rgba(var(--aa-primary-color-rgb),1);display:inline-block;font-size:.8em;font-weight:600;font-weight:var(--aa-font-weight-semibold);margin:0;padding:0 8px 0 0;padding:0 var(--aa-spacing-half) 0 0;position:relative;z-index:9999;z-index:var(--aa-base-z-index)}.aa-SourceHeaderLine{border-bottom:1px solid #3e34d3;border-bottom:1px solid rgba(var(--aa-primary-color-rgb),1);display:block;height:2px;left:0;margin:0;opacity:.3;padding:0;position:absolute;right:0;top:8px;top:var(--aa-spacing-half);z-index:9998;z-index:calc(var(--aa-base-z-index) - 1)}.aa-SourceFooterSeeAll{background:linear-gradient(180deg,#fff,rgba(128,126,163,.14));background:linear-gradient(180deg,rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha)),rgba(128,126,163,.14));border:1px solid rgba(128,126,163,.6);border:1px solid rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));border-radius:5px;box-shadow:inset 0 0 2px #fff,0 2px 2px -1px rgba(76,69,88,.15);color:inherit;font-size:.95em;font-weight:500;font-weight:var(--aa-font-weight-medium);padding:.475em 1em .6em}.aa-SourceFooterSeeAll:focus,.aa-SourceFooterSeeAll:hover{border:1px solid #3e34d3;border:1px solid rgba(var(--aa-primary-color-rgb),1);color:#3e34d3;color:rgba(var(--aa-primary-color-rgb),1)}.aa-Item{cursor:pointer;display:grid;min-height:40px;min-height:calc(var(--aa-spacing)*2.5);padding:4px;padding:calc(var(--aa-spacing-half)/2)}.aa-Item[aria-selected=true]{background-color:rgba(179,173,214,.205);background-color:rgba(var(--aa-selected-color-rgb),var(--aa-selected-color-alpha))}.aa-Item[aria-selected=true] .aa-ActiveOnly,.aa-Item[aria-selected=true] .aa-ItemActionButton{visibility:visible}.aa-ItemIcon{stroke-width:1.6;stroke-width:var(--aa-icon-stroke-width);background:#fff;background:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));box-shadow:inset 0 0 0 1px rgba(128,126,163,.3);box-shadow:inset 0 0 0 1px rgba(var(--aa-panel-border-color-rgb),var(--aa-panel-border-color-alpha));color:#7777a3;color:rgba(var(--aa-icon-color-rgb),var(--aa-icon-color-alpha));display:flex;flex-shrink:0;font-size:.7em;height:28px;height:calc(var(--aa-icon-size) + var(--aa-spacing-half));justify-content:center;overflow:hidden;text-align:center;width:28px;width:calc(var(--aa-icon-size) + var(--aa-spacing-half))}.aa-ItemIcon img{height:auto;max-height:20px;max-height:calc(var(--aa-icon-size) + var(--aa-spacing-half) - 8px);max-width:20px;max-width:calc(var(--aa-icon-size) + var(--aa-spacing-half) - 8px);width:auto}.aa-ItemIcon svg{height:20px;height:var(--aa-icon-size);width:20px;width:var(--aa-icon-size)}.aa-ItemIcon--alignTop{align-self:flex-start}.aa-ItemIcon--noBorder{background:none;box-shadow:none}.aa-ItemIcon--picture{height:96px;width:96px}.aa-ItemIcon--picture img{max-height:100%;max-width:100%;padding:8px;padding:var(--aa-spacing-half)}.aa-ItemContent{grid-gap:8px;grid-gap:var(--aa-spacing-half);align-items:center;cursor:pointer;display:grid;gap:8px;gap:var(--aa-spacing-half);grid-auto-flow:column;line-height:1.25em;overflow:hidden}.aa-ItemContent mark{background:none;color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font-style:normal;font-weight:700;font-weight:var(--aa-font-weight-bold)}.aa-ItemContent--dual{display:flex;flex-direction:column;justify-content:space-between;text-align:left}.aa-ItemContent--dual .aa-ItemContentSubtitle,.aa-ItemContent--dual .aa-ItemContentTitle,.homeCard_D3Nk:hover .sparkles_hA5k{display:block}.aa-ItemContent--indented{padding-left:36px;padding-left:calc(var(--aa-icon-size) + var(--aa-spacing))}.aa-ItemContentBody{grid-gap:4px;grid-gap:calc(var(--aa-spacing-half)/2);display:grid;gap:4px;gap:calc(var(--aa-spacing-half)/2)}.aa-ItemContentTitle{display:inline-block;margin:0 .5em 0 0;max-width:100%;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.aa-ItemContentSubtitle{font-size:.92em}.aa-ItemContentSubtitleIcon:before{border-color:rgba(128,126,163,.64);border-color:rgba(var(--aa-muted-color-rgb),.64);border-style:solid;content:"";display:inline-block;left:1px;position:relative;top:-3px}.aa-PanelFooter:after,.aa-PanelHeader:after{content:"";position:absolute;pointer-events:none;right:0;left:0}.aa-ItemContentSubtitle--inline .aa-ItemContentSubtitleIcon:before{border-width:0 0 1.5px;margin-left:8px;margin-left:var(--aa-spacing-half);margin-right:4px;margin-right:calc(var(--aa-spacing-half)/2);width:10px;width:calc(var(--aa-spacing-half) + 2px)}.aa-ItemContentSubtitle--standalone{grid-gap:8px;grid-gap:var(--aa-spacing-half);align-items:center;color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));display:grid;gap:8px;gap:var(--aa-spacing-half);grid-auto-flow:column;justify-content:start}#__docusaurus-base-url-issue-banner-container,.aa-DetachedContainer--modal .aa-PanelLayout:empty,.aa-DetachedSearchButtonPlaceholder[hidden],.aa-ItemContentDescription:empty{display:none}.aa-ItemContentSubtitle--standalone .aa-ItemContentSubtitleIcon:before{border-radius:0 0 0 3px;border-width:0 0 1.5px 1.5px;height:8px;height:var(--aa-spacing-half);width:8px;width:var(--aa-spacing-half)}.aa-ItemContentSubtitleCategory{color:#807ea3;color:rgba(var(--aa-muted-color-rgb),1);font-weight:500}.aa-ItemContentDescription{color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font-size:.85em;max-width:100%;overflow-x:hidden;text-overflow:ellipsis}.aa-ItemContentDescription mark{background:rgba(245,223,77,.5);background:rgba(var(--aa-description-highlight-background-color-rgb),var(--aa-description-highlight-background-color-alpha));color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));font-style:normal;font-weight:500;font-weight:var(--aa-font-weight-medium)}.aa-ItemContentDash{color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));display:none;opacity:.4}.aa-ItemContentTag{background-color:rgba(62,52,211,.2);background-color:rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha));border-radius:3px;margin:0 .4em 0 0;padding:.08em .3em}.aa-ItemLink,.aa-ItemWrapper{grid-gap:4px;grid-gap:calc(var(--aa-spacing-half)/2);align-items:center;color:inherit;display:grid;gap:4px;gap:calc(var(--aa-spacing-half)/2);grid-auto-flow:column;justify-content:space-between;width:100%}.aa-ItemLink{color:inherit}.cell_LmdA,.link_ti35{text-decoration:none!important}.aa-ItemActions{display:grid;grid-auto-flow:column;height:100%;justify-self:end;margin:0 -5.33333px;margin:0 calc(var(--aa-spacing)/-3);padding:0 2px 0 0}.aa-ItemActionButton{align-items:center;background:none;border:0;color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));cursor:pointer;display:flex;flex-shrink:0;padding:0}.aa-ItemActionButton svg{stroke-width:1.6;stroke-width:var(--aa-icon-stroke-width);color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));margin:5.33333px;margin:calc(var(--aa-spacing)/3);width:20px;width:var(--aa-action-icon-size)}.aa-ActiveOnly{visibility:hidden}.aa-PanelHeader{align-items:center;background:#3e34d3;background:rgba(var(--aa-primary-color-rgb),1);color:#fff;display:grid;height:var(--aa-modal-header-height);margin:0;padding:8px 16px;padding:var(--aa-spacing-half) var(--aa-spacing);position:relative}.aa-PanelHeader:after{background-image:linear-gradient(#fff,hsla(0,0%,100%,0));background-image:linear-gradient(rgba(var(--aa-background-color-rgb),1),rgba(var(--aa-background-color-rgb),0));bottom:-8px;bottom:calc(var(--aa-spacing-half)*-1);height:8px;height:var(--aa-spacing-half)}.aa-PanelFooter,.aa-PanelHeader:after{z-index:9999;z-index:var(--aa-base-z-index)}.aa-PanelFooter{background-color:#fff;background-color:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));box-shadow:inset 0 1px 0 rgba(128,126,163,.3);box-shadow:inset 0 1px 0 rgba(var(--aa-panel-border-color-rgb),var(--aa-panel-border-color-alpha));display:flex;justify-content:space-between;margin:0;padding:16px;padding:var(--aa-spacing);position:relative}.aa-PanelFooter:after{background-image:linear-gradient(hsla(0,0%,100%,0),rgba(128,126,163,.6));background-image:linear-gradient(rgba(var(--aa-background-color-rgb),0),rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha)));height:16px;height:var(--aa-spacing);opacity:.12;top:-16px;top:calc(var(--aa-spacing)*-1);z-index:9998;z-index:calc(var(--aa-base-z-index) - 1)}.aa-DetachedContainer{background:#fff;background:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));bottom:0;box-shadow:0 0 0 1px rgba(35,38,59,.1),0 6px 16px -4px rgba(35,38,59,.15);box-shadow:var(--aa-panel-shadow);display:flex;flex-direction:column;left:0;margin:0;overflow:hidden;padding:0;position:fixed;right:0;top:0;z-index:9999;z-index:var(--aa-base-z-index)}.aa-DetachedContainer:after{height:32px}.aa-DetachedContainer .aa-SourceHeader{margin:8px 0 8px 2px;margin:var(--aa-spacing-half) 0 var(--aa-spacing-half) 2px}.aa-DetachedContainer .aa-Panel{background-color:#fff;background-color:rgba(var(--aa-background-color-rgb),var(--aa-background-color-alpha));border-radius:0;box-shadow:none;flex-grow:1;margin:0;padding:0;position:relative}.aa-DetachedContainer .aa-PanelLayout{bottom:0;box-shadow:none;left:0;margin:0;max-height:none;overflow-y:auto;position:absolute;right:0;top:0;width:100%}.aa-DetachedFormContainer{border-bottom:1px solid rgba(128,126,163,.3);border-bottom:1px solid rgba(var(--aa-panel-border-color-rgb),var(--aa-panel-border-color-alpha));display:flex;flex-direction:row;justify-content:space-between;margin:0;padding:8px;padding:var(--aa-spacing-half)}.aa-DetachedCancelButton{background:none;border:0;border-radius:3px;color:#262627;color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha));cursor:pointer;font:inherit;margin:0 0 0 8px;margin:0 0 0 var(--aa-spacing-half);padding:0 8px;padding:0 var(--aa-spacing-half)}.aa-DetachedCancelButton:focus,.aa-DetachedCancelButton:hover{box-shadow:inset 0 0 0 1px rgba(128,126,163,.3);box-shadow:inset 0 0 0 1px rgba(var(--aa-panel-border-color-rgb),var(--aa-panel-border-color-alpha))}.aa-DetachedContainer--modal{border-radius:6px;bottom:inherit;height:auto;margin:0 auto;max-width:680px;max-width:var(--aa-detached-modal-max-width);position:absolute;top:3%}.aa-DetachedContainer--modal .aa-PanelLayout{max-height:500px;max-height:var(--aa-detached-modal-max-height);padding-bottom:8px;padding-bottom:var(--aa-spacing-half);position:static}.aa-DetachedSearchButton{align-items:center;background-color:#fff;background-color:rgba(var(--aa-input-background-color-rgb),var(--aa-input-background-color-alpha));border:1px solid rgba(128,126,163,.8);border:1px solid rgba(var(--aa-input-border-color-rgb),var(--aa-input-border-color-alpha));border-radius:3px;color:rgba(128,126,163,.6);color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));cursor:pointer;display:flex;font:inherit;font-family:inherit;font-family:var(--aa-font-family);font-size:16px;font-size:var(--aa-font-size);height:44px;height:var(--aa-search-input-height);margin:0;padding:0 5.5px;padding:0 calc(var(--aa-search-input-height)/8);position:relative;text-align:left;width:100%}.aa-DetachedSearchButton:focus{border-color:#3e34d3;border-color:rgba(var(--aa-primary-color-rgb),1);box-shadow:0 0 0 3px rgba(62,52,211,.2),inset 0 0 0 2px rgba(62,52,211,.2);box-shadow:rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha)) 0 0 0 3px,inset rgba(var(--aa-primary-color-rgb),var(--aa-primary-color-alpha)) 0 0 0 2px;outline:currentColor}.aa-DetachedSearchButtonIcon{align-items:center;color:#3e34d3;color:rgba(var(--aa-primary-color-rgb),1);cursor:auto;display:flex;flex-shrink:0;height:100%;justify-content:center;width:36px;width:calc(var(--aa-icon-size) + var(--aa-spacing))}.aa-DetachedSearchButtonQuery{color:#262627;color:rgba(var(--aa-text-color-rgb),1);line-height:1.25em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aa-Detached{height:100vh;overflow:hidden}.aa-DetachedOverlay{background-color:hsla(244,6%,48%,.4);background-color:rgba(var(--aa-overlay-color-rgb),var(--aa-overlay-color-alpha));height:100vh;left:0;margin:0;padding:0;position:fixed;right:0;top:0;z-index:9998;z-index:calc(var(--aa-base-z-index) - 1)}.aa-GradientBottom,.aa-GradientTop{height:8px;height:var(--aa-spacing-half);left:0;pointer-events:none;position:absolute;right:0;z-index:9999;z-index:var(--aa-base-z-index)}.aa-GradientTop{background-image:linear-gradient(#fff,hsla(0,0%,100%,0));background-image:linear-gradient(rgba(var(--aa-background-color-rgb),1),rgba(var(--aa-background-color-rgb),0));top:0}.aa-GradientBottom{background-image:linear-gradient(hsla(0,0%,100%,0),#fff);background-image:linear-gradient(rgba(var(--aa-background-color-rgb),0),rgba(var(--aa-background-color-rgb),1));border-bottom-left-radius:4px;border-bottom-left-radius:calc(var(--aa-spacing)/4);border-bottom-right-radius:4px;border-bottom-right-radius:calc(var(--aa-spacing)/4);bottom:0}@supports selector(:has(*)){.navbarSearchContainer_Bca1:not(:has(>*)){display:none}}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hash-link:before{content:"#"}.codeBlockContainer_APcc{border:1px solid var(--border-invisible);border-radius:8px;color:var(--prism-color);margin-bottom:var(--ifm-leading)}.codeBlockContent_m3Ux{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_P25_{background-color:var(--surface-03);border-bottom:1px solid var(--border-invisible);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);padding:.75rem var(--ifm-pre-padding)}.codeBlock_qGQc{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_P25_+.codeBlockContent_m3Ux .codeBlock_qGQc{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_p187{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_OFgW{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup_6DOT{-moz-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.homeCard_D3Nk,.relative__ioB{position:relative}.buttonGroup_6DOT button{align-items:center;background:var(--prism-background-color);border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);color:var(--prism-color);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup_6DOT button:focus-visible,.buttonGroup_6DOT button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup_6DOT button{opacity:.4}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.homeLayout_oJ9_{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI5MjEiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsdGVyPSJ1cmwoI2EpIj48ZWxsaXBzZSBjeD0iNzIwIiBjeT0iNDY0IiByeD0iNzIwIiByeT0iNDAwIiBmaWxsPSJ1cmwoI2IpIiBmaWxsLW9wYWNpdHk9Ii41Ii8+PC9nPjxwYXRoIGQ9Ik02NC41NjggMzIxLjIxM0gwdjE2LjIzOWg2NC41Njh2LTE2LjIzOVptMCAxOS4zMzVINDYuMTY1djQzLjYyNWgxOC40MDN2LTQzLjYyNVpNNjc5LjM3MiA3Ljk5NGgtMjEuMTMzVjE0NC4wM2gyMS4xMzNWNy45OTRaTTE5Mi4yMjQgMjg3Ljk3OHYtMTMuNzYySDgwLjcxMXYxMy43NjJoMTExLjUxM1pNMTM2OS45IDExNC42ODJoOC4zM3Y1My40OTloLTguMzN2LTUzLjQ5OVpNMTAxNi4wMiA2OS4xNjZoMTYuNjF2My45MjJoLTE2LjYxdi0zLjkyMlptLTE3Ljg2MSAzMy4wMjhoMzQuNTQxdjMuOTIyaC0zNC41NDF2LTMuOTIyWm0xNy44NjEgMzMuMjM1aDE2LjYxdjMuOTIyaC0xNi42MXYtMy45MjJaTTUzNC4xNzEgNjAuOTc3VjQ3LjQyMmg0LjA1NXYxMy41NTVoLTQuMDU1Wm0zNC42MjQgMTQuNTg4VjQ3LjM1M2g0LjEzM3YyOC4yMTJoLTQuMTMzWm0zNC44NTctMTQuNTg4VjQ3LjQyMmg0LjA1NXYxMy41NTVoLTQuMDU1Wm0yODkuODU2IDE2MC44MDdoLTE1LjM2MnYyMC42NDNoMTUuMzYydi0yMC42NDNabTQ5LjQ0LTIyLjIyNWgtMTUuMzYydjQyLjg2OGgxNS4zNjJ2LTQyLjg2OFptNDkuMDUxIDIyLjIyNWgtMTUuMzYzdjIwLjY0M2gxNS4zNjN2LTIwLjY0M1pNMTIxMS4xMiAyNy4wNTRoLTM0LjMxVjQ2Ljk0aDM0LjMxVjI3LjA1NFpNMTI0OC4wNyA4NS44MmgtNzEuMjR2MTguNzU4aDcxLjI0Vjg1LjgxOVptLTM2Ljk0IDU5Ljg0NGgtMzQuM3YxOC43NThoMzQuM3YtMTguNzU4Wm0tMjM1LjU3NiAyNTUuOTNoLTMwLjMyM3Y4Ljg5MmgzMC4zMjN2LTguODkyWm0tLjkzNS0yMi40NTgtMi4xODMtMi4yMDctNC42NzctNC42NzMtMzIuMjcyIDIyLjUyMyA2LjkzOCA2LjgxNSAzMi4xOTQtMjIuNDU4Wm05MC41ODEtMTk2Ljc5OSA0Ny4yNC0zMi4xMy0zLjU5LTMuMjQ1LTQ3LjA4IDMxLjk5OSAzLjQzIDMuMzc2Wm01My40Ny00LjYwOWgtNDMuOTZ2NC42MDloNDMuOTZ2LTQuNjA5Wm04MC4zNyA4Ny4xNzFoMTcuMzl2LTQuNDE0Yy0uMTYtMTMuMjQxIDEzLjk1LTI0Ljk4OSAzMC4wMS0yNC45ODloNS4yMnYtMTQuNjY5aC01LjIyYy0yNS43My0uMTk1LTQ3LjcxIDE4LjIzOS00Ny40OCAzOS43MjNsLjA4IDQuMzQ5Wm03Ny40MS00NC4wMDd2MTQuNjY5aDUuM2MxNi4wNi0uMTMgMzAuMDkgMTEuNTUzIDI5LjkzIDI0Ljk4OXY0LjQxNGgxNy40NnYtNC4zNDljLjI0LTIxLjQ4NC0yMS44Mi0zOS45MTgtNDcuNDctMzkuNzIzaC01LjIyWk00MjguOTU0IDMyNy42MDF2OS45M2gzLjY2NGMxMC45MTMtLjA2NCAyMC42NTcgNy45ODQgMjAuNjU3IDE3LjEzNnYyLjk4NmgxMi4wODN2LTIuOTg2Yy4xNTYtMTQuNzM0LTE1LjA0NS0yNy4zMjYtMzIuODE4LTI3LjE5NmwtMy41ODYuMTNabTM2LjMyNiA0NC4zMzFoLTEyLjE2MXYzLjA1Yy4wNzggOS4yMTctOS41MSAxNy4yMDItMjAuNjU3IDE3LjEzN2gtMy42NjR2OS45OTVoMy41ODZjMTcuNzczLjEzIDMyLjk3NC0xMi40NjIgMzIuODE4LTI3LjE5NnYtMi45ODZoLjA3OFpNNDEwLjAxMiA0OS42MDFoLTU3LjYwN3YxMi4xMzhoNTcuNjA3VjQ5LjZabTIuNTcyIDY1Ljc1MS0zLjUwOCAyLjcyNi0uMjMzLjE5NWMtMy43NDIgMi45ODYtOC4xODUgNS4zODctMTMuMDk2IDYuOTQ1aC0uMTU2bC0uNDY4LjEzYy00Ljc1NSAxLjQyOC05Ljc0NCAyLjE0Mi0xNC43MzMgMi4yMDdoLS4xNTZjLTQuODMzLS4wNjUtOS42NjYtLjc3OS0xNC4yNjUtMi4wMTJsLS4zOS0uMDY1LjE1Ni4wNjVjLTQuNTIxLTEuNTU4LTguNzMxLTMuNjM1LTEyLjU1LTYuMTY3bC0zLjA0LTIuMDEyLTEwLjEzNCA4LjUwMyAzLjUwOCAyLjUzMmMxMC4yODkgNy4zMzQgMjMuMzg1IDExLjM1OCAzNi45NDkgMTEuMzU4IDE0LjAzMS0uMDY1IDI3LjU5NS00LjQxMyAzOC4xOTctMTIuMTM3bDMuMDQtMi4yNzItOS4xMjEtOS45OTZabTQ3MS42ODggMjMzLjQwN2gtNDYuNjkzdjkuODY2aDQ2LjY5M3YtOS44NjZabS00OC43Mi00My40ODggMi44MDctMi4yMDcuMTU1LS4xMjlhMzIuODQxIDMyLjg0MSAwIDAgMSAxMC42MDItNS41ODNoLjE1NmwuMzktLjEyOWMzLjgxOS0xLjE2OSA3Ljg3My0xLjc1MyAxMS45MjYtMS44MThoLjA3OGMzLjg5OC4wNjUgNy44NzMuNjQ5IDExLjUzNyAxLjYyM2wuMzEyLjA2NS0uMTU2LS4wNjVjMy42NjQgMS4yMzMgNy4wOTQgMi45MjEgMTAuMTM0IDQuOTk4bDIuNDk0IDEuNjIzIDguMTg1LTYuODgxLTIuODA2LTIuMDc3Yy04LjM0MS01LjkwNi0xOC45NDItOS4xNTItMjkuOTM0LTkuMjE3LTExLjM4MS4wNjUtMjIuMzcyIDMuNTctMzAuOTQ3IDkuODAxbC0yLjQxNiAxLjgxOCA3LjQ4MyA4LjE3OFptLTIzOS41NDcgOC42MzNoLTI2Ljg5M3Y4OC40NjloMjYuODkzdi04OC40NjlabTExOC44LTMuODk1IDYuMDAyIDUuMzIzLjM5LjMyNGM2LjYyNiA1Ljc3NyAxMS44NDggMTIuNTkyIDE1LjM1NiAyMC4xMjJ2LjE5NGwuMjM0LjcxNGE2MC40MzcgNjAuNDM3IDAgMCAxIDQuOTExIDIyLjY1M3YuMTk1Yy0uMTU2IDcuNDY0LTEuNzE1IDE0Ljg2NC00LjUyMSAyMS45MzlsLS4yMzQuNTE5LjE1Ni0uMjZjLTMuNDMgNi45NDUtOC4wMjkgMTMuMzcxLTEzLjY0MiAxOS4yMTNsLTQuNDQzIDQuNjczIDE4Ljc4NiAxNS41MTMgNS42MTMtNS4zODdjMTYuMjE0LTE1LjgzOCAyNS4xLTM1Ljg5NCAyNS4xNzgtNTYuNzI5LS4yMzMtMjEuNjE1LTkuNzQ0LTQyLjQ1LTI2Ljg5My01OC42NzdsLTQuOTg5LTQuNjczLTIxLjkwNCAxNC4zNDRabS03Ni4zOTQtOTcuOTQ1di03LjM5OWwtMi44ODQuMTNjLTEwLjUyMy41MTktMTkuMjU0IDguMTEzLTE5LjI1NCAxNi44NzUgMCA4Ljc2MyA4LjgwOSAxNi40MjIgMTkuMzMyIDE2LjgxMWwyLjgwNi4wNjV2LTcuMzM0bC0yLjU3Mi0uMTNjLTUuOTI0LS4zODktMTAuNDQ2LTQuNDc5LTEwLjYwMS05LjQxMi4xNTUtNC45MzIgNC42NzctOS4wMjIgMTAuNjAxLTkuNDc2bDIuNTcyLS4xM1ptLTEyLjk0IDI5Ljk4N2gtOC45NjR2Mi4yMDdjLS4wNzggOC45NTcgOS4yNzYgMTYuNzQ2IDIwLjE5IDE2Ljc0NiAxMC4yODkgMCAxOS4wOTgtNi44MTUgMjAuMjY3LTE1LjgzN2wuMzEyLTIuNDY3aC05LjE5OWwtLjE1NSAyLjE0MmMtLjM5IDUuMTkzLTUuNzY5IDkuMDg3LTExLjkyNyA4Ljc2My01LjkyNC0uMzI1LTEwLjUyNC00LjM0OS0xMC41MjQtOS4yODJ2LTIuMjcyWm0tMjY4LjYyMiA0MS45MzF2LTE2Ljg3NmwtNi41NDguMzI0Yy0yNC4wODggMS4xNjktNDMuODg3IDE4LjQ5OS00My44ODcgMzguNDI1IDAgMTkuOTI3IDIwLjAzMyAzNy40NTIgNDMuOTY0IDM4LjIzMWw2LjQ3MS4xOTV2LTE2Ljc0N2wtNS44NDctLjMyNGMtMTMuNDA4LS45NzQtMjMuODUzLTEwLjE5MS0yNC4wODctMjEuMzU1LjMxMi0xMS4yOTQgMTAuNzU3LTIwLjU3NSAyNC4yNDMtMjEuNjE0bDUuNjkxLS4yNTlaTTE0OC4xNzEgMTM4Ljg2NHYzOC44NjRsMTUuMDgtLjc0N2M1NS40Ny0yLjY5MSAxMDEuMDY4LTQyLjYwMSAxMDEuMDY4LTg4LjQ5IDAtNDUuODktNDYuMTM2LTg2LjI1LTEwMS4yNDgtODguMDQzTDE0OC4xNzEgMHYzOC41NjVsMTMuNDY0Ljc0N2MzMC44NzcgMi4yNDIgNTQuOTMzIDIzLjQ2OCA1NS40NzEgNDkuMTc4LS43MTggMjYuMDA5LTI0Ljc3NCA0Ny4zODUtNTUuODMgNDkuNzc2bC0xMy4xMDUuNTk4Wm05MzYuOTc5IDEzNi40MnYtMjMuMTA3bC04Ljk2LjQ1NGMtMzIuOTcgMS42MjMtNjAuMTggMjUuMzE0LTYwLjE4IDUyLjY0czI3LjQ0IDUxLjM0MiA2MC4zNCA1Mi40NDVsOC44LjMyNXYtMjIuOTc3bC04LjAyLS4zOWMtMTguNC0xLjI5OC0zMi42Ny0xMy45NTUtMzMuMDYtMjkuMzM4LjM5LTE1LjQ0OCAxNC43NC0yOC4yMzUgMzMuMjEtMjkuNjYzbDcuODctLjM4OVpNODM5Ljc2MiAyOS42NzRoLTI3LjA1djYuNjJjLS4zODkgMzMuNjg4IDMzLjM2NCA2Mi4zNzcgNzMuMjc1IDYyLjM3NyAzOS45MTIgMCA3My4zNTMtMjguNjI0IDczLjExOS02Mi4zNzZ2LTYuNjJoLTI3LjIwNXY2Ljc1Yy4yMzQgMjEuMzU0LTIxLjEyNSAzOS43ODgtNDUuOTkyIDM5Ljc4OC0yNC44NjYgMC00Ni41MzctMTguMzA0LTQ2LjIyNS0zOS43ODhsLjA3OC02Ljc1Wm0tMzI0LjgyNyA5Mi42ODhjLTIyLjY0MiAwLTQxLjcwNCAxNi4wMjUtNDEuNzA0IDM1LjAyOXYzLjg5M2gxNS41OTR2LTMuODkzYzAtMTEuOTE5IDEyLjA1MS0yMi4wNzUgMjYuMTEtMjIuMDc1IDE0LjA2IDAgMjYuMTExIDEwLjIxNyAyNi4xMTEgMjIuMDc1djMuODkzaDE1LjU5NHYtMy44OTNjMC0xOS4wMDQtMTkuMDYzLTM1LjAyOS00MS43MDUtMzUuMDI5Wm0tMjYuMDc0IDU3LjgzNWgtMTUuNjN2My44OTNjMCAxOS4wNjUgMTkuMDYyIDM1LjAyOSA0MS43MDQgMzUuMDI5czQxLjcwNS0xNS45OTUgNDEuNzA1LTM1LjAyOXYtMy44OTNoLTE1LjU5NHYzLjg5M2MwIDExLjkxOS0xMi4wNTEgMjIuMTM2LTI2LjExMSAyMi4xMzYtMTQuMDU5IDAtMjYuMTEtMTAuMjE3LTI2LjExLTIyLjEzNnYtMy44OTNoLjAzNlptMjc0LjIxOC0yOS4zODctMzMuOTQ1IDI0LjU3MiA2LjcgNi40MTcgMzMuOTQyLTI0LjU3Mi02LjY5Ny02LjQxN1ptLTI3LjIxMSAzMi42MjQtNi43IDYuNDE3IDMzLjk0NSAyNC41NzIgNi43MDItNi40MTctMzMuOTQ3LTI0LjU3MlpNMTE0Ljk0NSA0MDMuMDM4bC02LjU5MSA1LjA1NiAyNS4yMjQgMjUuNjAxIDYuNTkxLTUuMDU2LTI1LjIyNC0yNS42MDFabTUyLjAwOC4wMDYtMjUuMjI0IDI1LjYwMiA2LjU5MiA1LjA1NiAyNS4yMjMtMjUuNjAyLTYuNTkxLTUuMDU2Wk0xNDQwIDM2NS4zMTloLTE0LjExdjQ5LjY4SDE0NDB2LTQ5LjY4Wm0wIDUxLjk1MWgtNjkuMDl2MTIuNDU0SDE0NDBWNDE3LjI3Wk0yNzcuMTQ0IDM4NC4zMTFoLTU2LjA2OHY1LjAyM2g1Ni4wNjh2LTUuMDIzWm05LjY3IDBoLTYuMDA0VjQ0NWg2LjAwNHYtNjAuNjg5Wm04NzUuNzI2IDEuNTEzaC0xNC41djE5LjA2aDE0LjV2LTE5LjA2Wm01My44MS0zMi40MDloLTMwLjAydjEyLjUyNGgzMC4wMnYtMTIuNTI0Wm0zNy41OSAzMi40MDloLTE0LjUxdjE5LjA2aDE0LjUxdi0xOS4wNlpNMTA0LjEwNCAxMTMuODk4IDYwLjE3OSA4MS4zNzQgNTIuMiA4OS43Nmw0My45MjYgMzIuNTI1IDcuOTc3LTguMzg4Wm0tNTMuODc0IDcuNjk0VjQxLjU3OUgzNy44MnY4MC4wMTNoMTIuNDFaIiBmaWxsPSIjRTRGN0ZGIiBmaWxsLW9wYWNpdHk9Ii4wMyIvPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iYiIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgwIDQwMCAtNzIwIDAgNzIwIDQ2NCkiPjxzdG9wIHN0b3AtY29sb3I9IiM1QkQ4RkYiIHN0b3Atb3BhY2l0eT0iLjUiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMENFODgiIHN0b3Atb3BhY2l0eT0iMCIvPjwvcmFkaWFsR3JhZGllbnQ+PGZpbHRlciBpZD0iYSIgeD0iLTU3IiB5PSI3IiB3aWR0aD0iMTU1NCIgaGVpZ2h0PSI5MTQiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj48ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPjxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJzaGFwZSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjI4LjUiIHJlc3VsdD0iZWZmZWN0MV9mb3JlZ3JvdW5kQmx1cl8yNjMyNV8yNDIiLz48L2ZpbHRlcj48L2RlZnM+PC9zdmc+) top no-repeat;background-color:var(--dark-surface-01)!important;width:100%}.header1_j8J6{font-size:3.5em;margin:7.5rem 0 1.25rem}.header2_wAk7{font-size:3em;margin:8.75rem 0 1.25rem}.header1_j8J6,.header2_wAk7{color:var(--dark-text-primary);font-family:Poppins-Bold,sans-serif;line-height:1.2;text-align:center}.description_VY6t{color:var(--dark-text-secondary);text-align:center}.titleBtm_hmJU{margin-bottom:2rem}.flexCol_kTWC,.sectionContainer_MnYH{align-items:center;display:flex;flex-direction:column;width:100%}.sectionContainer_MnYH{margin:0 auto 10rem;max-width:1440px;padding:0 4rem}.ecoBG_L0ih{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMxMiIgaGVpZ2h0PSIzMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcyNS4yOTggMTQwLjE0OWMwIDM4LjE5LTMwLjk1OSA2OS4xNDktNjkuMTQ5IDY5LjE0OVM1ODcgMTc4LjMzOSA1ODcgMTQwLjE0OSA2MTcuOTU5IDcxIDY1Ni4xNDkgNzFzNjkuMTQ5IDMwLjk1OSA2OS4xNDkgNjkuMTQ5Wm0tMTA1LjAwMyAwYzAgMTkuODAyIDE2LjA1MiAzNS44NTQgMzUuODU0IDM1Ljg1NHMzNS44NTQtMTYuMDUyIDM1Ljg1NC0zNS44NTQtMTYuMDUyLTM1Ljg1NC0zNS44NTQtMzUuODU0LTM1Ljg1NCAxNi4wNTItMzUuODU0IDM1Ljg1NFptNTIuNTAyLTEyMi41YzAgOS4xOTUtNy40NTMgMTYuNjQ5LTE2LjY0OCAxNi42NDlTNjM5LjUgMjYuODQ0IDYzOS41IDE3LjY0OEM2MzkuNSA4LjQ1NSA2NDYuOTU0IDEgNjU2LjE0OSAxczE2LjY0OCA3LjQ1NCAxNi42NDggMTYuNjQ5Wm04Ny41MDEgMzVjMCA5LjE5NS03LjQ1NCAxNi42NDktMTYuNjQ5IDE2LjY0OVM3MjcgNjEuODQ0IDcyNyA1Mi42NDhDNzI3IDQzLjQ1NSA3MzQuNDU0IDM2IDc0My42NDkgMzZzMTYuNjQ5IDcuNDU0IDE2LjY0OSAxNi42NDlabS0xNzUgMGMwIDkuMTk1LTcuNDU0IDE2LjY0OS0xNi42NDkgMTYuNjQ5UzU1MiA2MS44NDQgNTUyIDUyLjY0OEM1NTIgNDMuNDU1IDU1OS40NTQgMzYgNTY4LjY0OSAzNnMxNi42NDkgNy40NTQgMTYuNjQ5IDE2LjY0OVpNNjU2LjE0OSAyNDZjOS4xOTUgMCAxNi42NDggNy40NTQgMTYuNjQ4IDE2LjY0OXMtNy40NTMgMTYuNjQ5LTE2LjY0OCAxNi42NDktMTYuNjQ5LTcuNDU0LTE2LjY0OS0xNi42NDlTNjQ2Ljk1NCAyNDYgNjU2LjE0OSAyNDZabTg3LjUtMzVjOS4xOTUgMCAxNi42NDkgNy40NTQgMTYuNjQ5IDE2LjY0OXMtNy40NTQgMTYuNjQ5LTE2LjY0OSAxNi42NDlTNzI3IDIzNi44NDQgNzI3IDIyNy42NDkgNzM0LjQ1NCAyMTEgNzQzLjY0OSAyMTFabS0xNzUgMGM5LjE5NSAwIDE2LjY0OSA3LjQ1NCAxNi42NDkgMTYuNjQ5cy03LjQ1NCAxNi42NDktMTYuNjQ5IDE2LjY0OVM1NTIgMjM2Ljg0NCA1NTIgMjI3LjY0OSA1NTkuNDU0IDIxMSA1NjguNjQ5IDIxMVptLTE4LjM1MS03MC44NTFjMCA5LjE5NS03LjQ1NCAxNi42NDgtMTYuNjQ5IDE2LjY0OFM1MTcgMTQ5LjM0NCA1MTcgMTQwLjE0OXM3LjQ1NC0xNi42NDkgMTYuNjQ5LTE2LjY0OSAxNi42NDkgNy40NTQgMTYuNjQ5IDE2LjY0OVptMjQ1IDBjMCA5LjE5NS03LjQ1NCAxNi42NDgtMTYuNjQ5IDE2LjY0OFM3NjIgMTQ5LjM0NCA3NjIgMTQwLjE0OXM3LjQ1NC0xNi42NDkgMTYuNjQ5LTE2LjY0OSAxNi42NDkgNy40NTQgMTYuNjQ5IDE2LjY0OVoiIGZpbGw9IiMwNzFDMjciIHN0cm9rZT0iIzNENTM1QiIgc3Ryb2tlLXdpZHRoPSIyIi8+PHBhdGggdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCA2MSkiIGZpbGw9InVybCgjYSkiIGQ9Ik0wIDBoMTMxMnYyNDNIMHoiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI2NTYiIHkxPSIwIiB4Mj0iNjU2IiB5Mj0iMjQzIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1vcGFjaXR5PSIwIi8+PHN0b3Agb2Zmc2V0PSIuMDI1IiBzdG9wLWNvbG9yPSIjMDcxQzI3IiBzdG9wLW9wYWNpdHk9Ii4xIi8+PHN0b3Agb2Zmc2V0PSIuNDUiIHN0b3AtY29sb3I9IiMwNzFDMjciLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=) top no-repeat}.updateBG_hYTi{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMxMiIgaGVpZ2h0PSIyMjMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcwNC41OTcgMjA4LjkzN2MtOC40ODctMS4wNTQtMTYuOTA3LTMuNzg4LTI0Ljc3OS04LjMzMy0zMS40ODktMTguMTgtNDIuMjc4LTU4LjQ0NC0yNC4wOTgtODkuOTMzIDE4LjE4IDMxLjQ4OSA1OC40NDUgNDIuMjc4IDg5LjkzMyAyNC4wOTcgNy44NjEtNC41MzggMTQuNDMxLTEwLjQ1MiAxOS41ODQtMTcuMjYzLTIuNDY2IDQwLjEyMi0yNi40OTMgNzQuNDE0LTYwLjY0IDkxLjQzMloiIGZpbGw9IiMwMEY1QTMiLz48cGF0aCBkPSJNNzY1LjI0MiAxMTcuNTAyYy01LjE1MiA2LjgxMS0xMS43MjMgMTIuNzI1LTE5LjU4NCAxNy4yNjQtMzEuNDg4IDE4LjE3OS03MS43NTIgNy4zOTEtODkuOTMyLTI0LjA5OCAzNi4zNTkgMCA2NS44MzUtMjkuNDc1IDY1LjgzNS02NS44MzUgMC05LjA4Mi0xLjgzOS0xNy43MzUtNS4xNjUtMjUuNjA1IDI5LjU2OCAxOS42NTcgNDkuMDU1IDUzLjI3MyA0OS4wNTUgOTEuNDQgMCAyLjI5NS0uMDcgNC41NzQtLjIwOSA2LjgzNFoiIGZpbGw9IiMwRkU5QTAiLz48cGF0aCBkPSJNNzE2LjM5MiAxOS4yMzFjMy4zMjYgNy44NyA1LjE2NSAxNi41MjMgNS4xNjUgMjUuNjA1IDAgMzYuMzYtMjkuNDc1IDY1LjgzNi02NS44MzUgNjUuODM2IDE4LjE4LTMxLjQ4OSA3LjM5MS03MS43NTMtMjQuMDk4LTg5LjkzMy03Ljg3MS00LjU0NS0xNi4yOTItNy4yOC0yNC43NzktOC4zMzNDNjIxLjU2MyA1LjA3MiA2MzguMTYxLjk0NiA2NTUuNzIyLjk0NmMyMi40MzIgMCA0My4yOTMgNi43MzEgNjAuNjcgMTguMjg1WiIgZmlsbD0iIzU0RjlDMiIvPjxwYXRoIGQ9Ik02MDYuODUzIDEyLjQwNmM4LjQ4NyAxLjA1MyAxNi45MDcgMy43ODggMjQuNzggOC4zMzMgMzEuNDg4IDE4LjE4IDQyLjI3NyA1OC40NDQgMjQuMDk3IDg5LjkzMy0xOC4xOC0zMS40ODktNTguNDQ0LTQyLjI3OC04OS45MzMtMjQuMDk4LTcuODYxIDQuNTM4LTE0LjQzMSAxMC40NTMtMTkuNTgzIDE3LjI2NCAyLjQ2NS00MC4xMjMgMjYuNDkzLTc0LjQxNCA2MC42MzktOTEuNDMyWiIgZmlsbD0iIzg4RkZEOCIvPjxwYXRoIGQ9Ik01NDYuMjEgMTAzLjgzOGM1LjE1Mi02LjgxIDExLjcyMi0xMi43MjUgMTkuNTgzLTE3LjI2MyAzMS40ODgtMTguMTggNzEuNzUzLTcuMzkyIDg5LjkzMyAyNC4wOTctMzYuMzYgMC02NS44MzYgMjkuNDc2LTY1LjgzNiA2NS44MzUgMCA5LjA4MiAxLjgzOSAxNy43MzUgNS4xNjUgMjUuNjA2QzU2NS40ODcgMTgyLjQ1NSA1NDYgMTQ4Ljg0IDU0NiAxMTAuNjcyYzAtMi4yOTUuMDcxLTQuNTczLjIxLTYuODM0WiIgZmlsbD0iIzAwQ0U4OCIvPjxwYXRoIGQ9Ik01OTUuMDUgMjAyLjExMmMtMy4zMjYtNy44NzEtNS4xNjUtMTYuNTIzLTUuMTY1LTI1LjYwNSAwLTM2LjM2IDI5LjQ3Ni02NS44MzUgNjUuODM2LTY1LjgzNS0xOC4xOCAzMS40ODgtNy4zOTEgNzEuNzUyIDI0LjA5NyA4OS45MzIgNy44NzIgNC41NDUgMTYuMjkzIDcuMjggMjQuNzggOC4zMzMtMTQuNzE5IDcuMzM1LTMxLjMxNiAxMS40Ni00OC44NzcgMTEuNDYtMjIuNDMzIDAtNDMuMjkzLTYuNzMxLTYwLjY3MS0xOC4yODVaIiBmaWxsPSIjMDBFMDk2Ii8+PHBhdGggdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLjAwNSA1MC44NTMpIiBmaWxsPSJ1cmwoI2EpIiBkPSJNMCAwaDEzMTJ2MTcySDB6Ii8+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4MT0iNjU2IiB5MT0iMCIgeDI9IjY1NiIgeTI9IjE3MiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMwNzFDMjciIHN0b3Atb3BhY2l0eT0iMCIvPjxzdG9wIG9mZnNldD0iLjUxIiBzdG9wLWNvbG9yPSIjMDcxQzI3Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PC9zdmc+) top no-repeat}.layoutContainer_TJ5m{grid-gap:var(--gap);display:grid;grid-template-columns:repeat(var(--columnL),minmax(0,calc((100% - (var(--columnL) - 1)*var(--gap))/ var(--columnL))));width:100%}.section_EoX_{background:var(--dark-card-bg);border-radius:40px;box-shadow:var(--dark-card-shadow);padding:2.5rem;width:100%;z-index:1}.flexCol_tfnz{display:flex;flex-direction:column;gap:2.5rem}.noGap_K3ND{gap:0}.flexCenter_TPV4{align-items:center;display:flex;gap:1rem}.flexBetween_r7XD{align-items:center;display:flex;justify-content:space-between}.flexWrap_Xkc4,.links_hvUO,.tags_mvis{display:flex;flex-wrap:wrap}.alignMiddle_d55x,.iconContainer_llIe{justify-content:center}.iconContainer_llIe{align-items:center;display:flex;height:4rem;-o-object-fit:fill;object-fit:fill;width:4rem}.iconContainer_llIe img{max-width:-moz-fit-content;max-width:fit-content}.section_EoX_ h1,.section_EoX_ h2,.section_EoX_ h3{color:var(--dark-text-primary);margin:0}.homeCard_D3Nk{color:var(--dark-text-primary)}.sparkles_hA5k{display:none;position:absolute;right:1.25rem;top:1.25rem}.homeCard_D3Nk:hover{transition:.2s}.cardTitle_ISDw{margin-bottom:3rem;margin-top:1.5rem}.cardLinks_YmJh{margin-left:-.5rem;margin-right:-.5rem;margin-top:1.25rem}.cardLinks_YmJh>.borderBtm_Jn7R:not(:last-child){border-bottom:1px solid var(--dark-border-subtle)}.link_ti35{color:var(--dark-text-secondary)!important;line-height:3rem}.line_NhPR{cursor:pointer;padding:0 .5rem}.line_NhPR:hover{background-color:var(--dark-hover);border-radius:2px}.filters_Vbq_,.filters_mmsw{flex-wrap:wrap;width:100%}.filters_Vbq_,.filters_mmsw,.tagList_EW4E,.tag_QgTi,.tag_z3H5,.tag_zJLr{align-items:center;display:flex}.tag_z3H5{background-color:var(--dark-surface-03);border:1px solid var(--dark-border-subtle);border-radius:32px;box-shadow:none;color:var(--dark-text-tertiary);cursor:pointer;font-size:.875rem;height:2rem;justify-content:center;line-height:2rem;margin:0 1rem 1rem 0;padding:0 .75rem}.tag_z3H5:hover{background-color:var(--dark-surface-03-hover)}.activeTag_snzC{background-color:var(--dark-alert-success-bg)!important;border:1px solid var(--dark-alert-success);color:var(--dark-text-primary)}.tableContainer_FB7_{display:flex;justify-content:space-between}.column_yJgI{flex:1;flex-direction:column}.cell_LmdA,.column_yJgI{color:var(--dark-text-primary);display:flex}.cell_LmdA{align-items:center;border:1px solid var(--dark-border-subtle);cursor:pointer;flex:1 1 50%;font-weight:700;height:3.5rem;justify-content:center;line-height:3.5rem}.cell_LmdA:hover{background-color:var(--dark-hover);border-color:var(--dark-border-accent)}.columnHeader_UrkT{background-color:var(--dark-surface-03)!important;border:1px solid var(--dark-border-subtle)!important;color:var(--dark-text-secondary);cursor:default}.carouselContainer_oHO6,.solidBtn_xbIL:hover:before{width:100%}.carouselController_p8da{gap:.5rem}.arrowLeft_zS_K,.arrowRight_g8y1{align-items:center;background:var(--dark-surface-03);border:none;border-radius:50%;color:var(--dark-text-primary);cursor:pointer;display:flex;height:3rem;justify-content:center;min-width:3rem;width:3rem}.arrowLeft_zS_K:hover,.arrowRight_g8y1:hover{background:var(--dark-surface-03-hover)}.arrowLeft_zS_K{transform:scaleX(-1)}.illusContainer_T7PL{width:418px}.leftContainer_j1FY{max-width:50%}.description_fg7L{color:var(--dark-text-secondary)}.contactSection_BYCv{-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);background:linear-gradient(87deg,#00ce88 -2.44%,#04e7f4 98.1%);box-shadow:var(--dark-btn-shadow)}.contactTitle_IS2E{color:var(--dark-text-inverse)!important}.icons_fP0E{flex-wrap:wrap;justify-content:center}.iconBG_YI0d{align-items:center;background-color:#f8fdff;border-radius:50%;cursor:pointer;display:flex;height:3.5rem;justify-content:center;width:3.5rem}.cardContainer_bFxw,.cardContainer_xWMf{display:flex;width:100%;text-decoration:none!important;cursor:pointer}.iconBG_YI0d:hover{background-color:#eefcfd}.cardContainer_bFxw{align-items:center;border:1px solid var(--border-subtle);border-radius:16px;color:var(--text-primary)!important;padding:.5rem 1rem .5rem .75rem}.smallCard_LdEU{background-color:var(--surface-03);border:1px solid transparent;border-radius:12px;height:3rem}.iconContainer_ugFC{align-items:center;border-radius:8px;display:flex;justify-content:center}.rightContainer_OYxw{display:flex;flex-direction:column;margin-left:8px}.title_MBOd{font-size:1em;font-weight:700}.tags_mvis>p:not(:last-child):after{content:","}.tag_BvXz{color:var(--text-secondary);font-size:.75em;margin:0}.links_hvUO>a:not(:last-child),.tag_QgTi{margin-right:.5rem}.cardContainer_xWMf{background-color:var(--surface-02);border:1px solid var(--border-subtle);border-radius:20px;color:var(--text-secondary)!important;flex-direction:column;padding-bottom:1rem}.cardContainer_xWMf:hover{border:1px solid var(--border-accent)}.banner_LOnP,.topContainer_SZLr{border-top-left-radius:20px;border-top-right-radius:20px;width:100%}.topContainer_SZLr{border-bottom:1px solid var(--border-subtle);display:inline-block}.banner_LOnP{display:block;height:auto}.tag_QgTi{background-color:var(--text-link);border-radius:4px;color:var(--text-inverse);font-size:.75em;height:1.5rem;justify-content:center;padding:.25rem .5rem}.tagList_EW4E>.tag_QgTi:last-child{margin-right:0}.bottomContainer_TLG4{display:flex;flex-direction:column;margin-top:1rem;padding:0 1rem}.description_qXLp{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;height:3.5rem;margin:0;overflow:hidden;text-overflow:ellipsis}.iconContainer_trI9{align-items:center;background-color:var(--surface-03);border-radius:50%;cursor:pointer;display:flex;height:2rem;justify-content:center;width:2rem}.iconContainer_trI9:hover,.tag_zJLr:hover{background-color:var(--surface-03-hover)}:root{--aa-search-input-height:36px;--text-primary:#003247;--text-secondary:#255063;--text-tertiary:#637f8a;--text-inverse:#e4f7ff;--text-link:#0c865c;--surface-01:#f8fdff;--surface-02:#f2fcff;--surface-03:#e7f8f9;--surface-accent:#e4f7ff;--border-subtle:#d0e1e7;--border-invisible:#eaf3f6;--border-accent:#0c865c;--hover:rgba(0,224,211,.04);--surface-03-hover:#def0f2;--selected:rgba(0,224,211,.08);--alert-success:#0c865c;--alert-success-bg:rgba(12,134,92,.1);--alert-secondary:#255063;--alert-secondary-bg:rgba(37,80,99,.1);--alert-info:#2047d1;--alert-info-bg:rgba(32,71,209,.1);--alert-warning:#cbc125;--alert-warning-bg:rgba(203,193,37,.1);--alert-danger:#c51c1c;--alert-danger-bg:rgba(197,28,28,.1);--code-plain:#255063;--code-comment:#637f8a;--code-function:#0c865c;--code-keyword:#0184ad;--code-constant:#bb15d6;--dark-text-primary:#e4f7ff;--dark-text-secondary:rgba(228,247,255,.85);--dark-text-tertiary:#637f8a;--dark-text-inverse:#003247;--dark-text-link:#18efb1;--dark-surface-01:#071c27;--dark-surface-02:#132831;--dark-surface-03:#18323b;--dark-surface-accent:#18323b;--dark-border-subtle:#3d535b;--dark-border-invisible:#25373e;--dark-border-accent:#18efb1;--dark-hover:rgba(228,247,255,.06);--dark-surface-03-hover:#243e47;--dark-selected:rgba(228,247,255,.12);--dark-alert-success:#18efb1;--dark-alert-success-bg:rgba(24,239,177,.1);--dark-alert-secondary:rgba(228,247,255,.85);--dark-alert-secondary-bg:rgba(228,247,255,.1);--dark-alert-info:#828ef9;--dark-alert-info-bg:rgba(130,142,249,.1);--dark-alert-warning:#fff778;--dark-alert-warning-bg:rgba(255,247,120,.1);--dark-alert-danger:#fd7777;--dark-alert-danger-bg:hsla(0,97%,73%,.1);--dark-btn-shadow:-2px -2px 4px 0px rgba(228,247,255,.1),4px 4px 11px 0px rgba(7,28,39,.16);--dark-btn-hover:#00c584;--dark-card-shadow:0px 10px 10px -5px rgba(7,28,39,.8),0px 20px 25px -5px rgba(7,28,39,.8),0px 1px 2px 0px #3d535b inset;--dark-card-bg:linear-gradient(180deg,#132831,#071c27 123.46%);--dark-card-bg-hover:linear-gradient(0deg,var(--hover,rgba(228,247,255,.06)) 0%,var(--hover,rgba(228,247,255,.06)) 100%),linear-gradient(180deg,#132831 0%,#071c27 119.54%)}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--text-primary:var(--dark-text-primary);--text-secondary:var(--dark-text-secondary);--text-tertiary:var(--dark-text-tertiary);--text-inverse:var(--dark-text-inverse);--text-link:var(--dark-text-link);--surface-01:var(--dark-surface-01);--surface-02:var(--dark-surface-02);--surface-03:var(--dark-surface-03);--surface-accent:var(--dark-surface-accent);--border-subtle:var(--dark-border-subtle);--border-invisible:var(--dark-border-invisible);--border-accent:var(--dark-border-accent);--hover:var(--dark-hover);--surface-03-hover:var(--dark-surface-03-hover);--selected:var(--dark-selected);--alert-success:var(--dark-alert-success);--alert-success-bg:var(--dark-alert-success-bg);--alert-secondary:var(--dark-alert-secondary);--alert-secondary-bg:var(--dark-alert-secondary-bg);--alert-info:var(--dark-alert-info);--alert-info-bg:var(--dark-alert-info-bg);--alert-warning:var(--dark-alert-warning);--alert-warning-bg:var(--dark-alert-warning-bg);--alert-danger:var(--dark-alert-danger);--alert-danger-bg:var(--dark-alert-danger-bg);--code-plain:#e4f7ff;--code-comment:rgba(228,247,255,.5);--code-function:#e4e0a5;--code-keyword:#5bd8ff;--code-constant:#d2a8ff}.notFoundContainer_eQ53{color:var(--text-secondary)!important;margin:0 auto;padding:1.5em 1em;text-align:center;width:auto}.theme-code-block-highlighted-line{background-color:var(--surface-03);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_iPqp{counter-increment:a;display:table-row}.codeLineNumber_F4P7{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_F4P7:before{content:counter(a);opacity:.4}.codeLineContent_pOih{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied__QnY{opacity:1!important}.copyButtonIcons_FhaS{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_phi_,.copyButtonSuccessIcon_FfTR{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_FfTR{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied__QnY .copyButtonIcon_phi_{opacity:0;transform:scale(.33)}.copyButtonCopied__QnY .copyButtonSuccessIcon_FfTR{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_iowe{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-moz-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes a{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.solidBtn_xbIL{align-items:center;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);border:none;border-radius:80px;box-shadow:var(--dark-btn-shadow);color:var(--dark-text-inverse)!important;cursor:pointer;display:flex;font-size:1em;font-weight:700;justify-content:center;line-height:3em;overflow:hidden;padding:0 1.5rem;position:relative;text-decoration:none!important;width:-moz-fit-content;width:fit-content;z-index:1}.solidBtn_xbIL:after{background-color:var(--dark-text-link);width:100%;z-index:-2}.solidBtn_xbIL:after,.solidBtn_xbIL:before{border-radius:80px;bottom:0;content:"";height:100%;left:0;position:absolute}.solidBtn_xbIL:before{background-color:#5df6c2;transition:.25s;width:0;z-index:-1}.box_OmWe{background-color:var(--surface-accent);border-radius:20px;box-shadow:none;color:var(--text-secondary)!important;line-height:1.7!important;padding:1.5rem;text-decoration:none!important}.subsection_04ph{margin-bottom:.5em}.toolList_x0ju{margin:0;padding-left:2.5rem}.imgContainer_VuXx{background:linear-gradient(87deg,#a1e1bc -2.44%,#73f7ff 98.1%);height:auto;padding:1rem}.cardContainer_OeIU,.imgContainer_VuXx{align-items:center;border-radius:20px;display:flex;justify-content:center;width:100%}.cardContainer_OeIU{border:1px solid var(--border-subtle);color:var(--text-link);cursor:pointer;padding:1.5rem 1rem;text-decoration:none!important}.tag_zJLr{background-color:var(--surface-03);border:none;border-radius:4px;box-shadow:none;color:var(--text-tertiary);cursor:pointer;font-size:.875em;justify-content:center;line-height:170%;margin:0 1rem 1rem 0;padding:.25rem .5rem}.activeTag_j6yD{background-color:var(--text-link)!important;color:var(--text-inverse)}@media (min-width:769px) and (max-width:996px){.layoutContainer_TJ5m{grid-template-columns:repeat(var(--columnS),minmax(0,calc((100% - (var(--columnS) - 1)*var(--gap))/ var(--columnS))))}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:997px) and (max-width:1439px){.layoutContainer_TJ5m{grid-template-columns:repeat(var(--columnM),minmax(0,calc((100% - (var(--columnM) - 1)*var(--gap))/ var(--columnM))))}}@media only screen and (min-width:1024px){.navigationSlider{margin-left:0}.navPusher{padding-top:90px}.onPageNav>.toc-headings{padding-top:50px}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_F8PC{padding:0 .3rem}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.illusContainer_T7PL{width:100%}.devlogSection_oy_p{align-items:start;flex-direction:column-reverse}.leftContainer_j1FY{max-width:100%}.contactSection_BYCv{flex-direction:column;gap:1.25rem}}@media only screen and (max-width:996px){.table-of-contents{margin-top:0}a.table-of-contents__link{color:var(--text-secondary)}.col{--ifm-spacing-horizontal:1rem}.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.header1_j8J6{font-size:2.5rem;margin:3rem 0 1.25rem}.header2_wAk7{font-size:2em;margin:8rem 0 1.25rem}.sectionContainer_MnYH{margin-bottom:5rem;padding:0 1rem}.layoutContainer_TJ5m{grid-template-columns:repeat(var(--columnXS),minmax(0,calc((100% - (var(--columnXS) - 1)*var(--gap))/ var(--columnXS))))}.section_EoX_{border-radius:20px;padding:2.5rem 1.25rem}.flexCol_tfnz{gap:1.25rem}.solidBtn_p_K8,.solidBtn_xbIL{line-height:2.5rem;width:100%}.arrowLeft_zS_K,.arrowRight_g8y1{height:2.5rem;min-width:2.5rem;width:2.5rem}}@media only screen and (max-width:767px){#oldSiteLink{height:60px}#oldSiteLink span{display:block;text-align:center}.fixedHeaderContainer{margin-top:60px}.pagination-nav{display:flex;flex-direction:column}.navbar-search .aa-DetachedSearchButton{margin-right:0;width:72px}.aa-DetachedSearchButtonPlaceholder{display:none}.markdown>h1,h1{font-size:2rem;margin:3rem 0 2rem}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}.aa-TouchOnly{display:none}}@media (hover:none) and (pointer:coarse){:root{--aa-spacing-factor:1.2;--aa-action-icon-size:22px}.aa-LoadingIndicator,.aa-SubmitButton{padding-left:3px;padding-left:calc(var(--aa-spacing-half)/ 2 - 1px);width:39px;width:calc(var(--aa-icon-size) + var(--aa-spacing)*1.25 - 1px)}.aa-ClearButton{padding:0 10.16672px;padding:0 calc(var(--aa-spacing)*.66667 - .5px)}.aa-ItemActionButton:focus svg,.aa-ItemActionButton:hover svg{color:inherit}.aa-DesktopOnly{display:none}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion){.aa-Panel{transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_p187{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/js/17896441.42e6a557.js b/assets/js/17896441.42e6a557.js new file mode 100644 index 000000000..0a2e80ffb --- /dev/null +++ b/assets/js/17896441.42e6a557.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[401],{5311:(e,o,n)=>{n.d(o,{A:()=>W});var c=n(1367),t=n(6540),s=n(1062),a=n(53),l=n(4631),i=n(8630),r=n(9292);const d={codeBlockContainer:"codeBlockContainer_APcc"};var u=n(4848),p=["as"];function m(e){var o=e.as,n=(0,c.A)(e,p),t=(0,l.A)(),s=(0,r.M$)(t);return(0,u.jsx)(o,Object.assign({},n,{style:s,className:(0,a.A)(n.className,d.codeBlockContainer,i.G.common.codeBlock)}))}const b={codeBlockContent:"codeBlockContent_m3Ux",codeBlockTitle:"codeBlockTitle_P25_",codeBlock:"codeBlock_qGQc",codeBlockStandalone:"codeBlockStandalone_zC50",codeBlockLines:"codeBlockLines_p187",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_OFgW",buttonGroup:"buttonGroup_6DOT"};function g(e){var o=e.children,n=e.className;return(0,u.jsx)(m,{as:"pre",tabIndex:0,className:(0,a.A)(b.codeBlockStandalone,"thin-scrollbar",n),children:(0,u.jsx)("code",{className:b.codeBlockLines,children:o})})}var B=n(6957),h=n(6419),k=n(8181);const N={codeLine:"codeLine_iPqp",codeLineNumber:"codeLineNumber_F4P7",codeLineContent:"codeLineContent_pOih"};function f(e){var o=e.line,n=e.classNames,c=e.showLineNumbers,t=e.getLineProps,s=e.getTokenProps;1===o.length&&"\n"===o[0].content&&(o[0].content="");var l=t({line:o,className:(0,a.A)(n,c&&N.codeLine)}),i=o.map((function(e,o){return(0,u.jsx)("span",Object.assign({},s({token:e,key:o})),o)}));return(0,u.jsxs)("span",Object.assign({},l,{children:[c?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("span",{className:N.codeLineNumber}),(0,u.jsx)("span",{className:N.codeLineContent,children:i})]}):i,(0,u.jsx)("br",{})]}))}var C=n(6316),j=n(3230),x=n(2578),y=n(2030);const A={copyButtonCopied:"copyButtonCopied__QnY",copyButtonIcons:"copyButtonIcons_FhaS",copyButtonIcon:"copyButtonIcon_phi_",copyButtonSuccessIcon:"copyButtonSuccessIcon_FfTR"};function L(e){var o=e.code,n=e.className,c=(0,t.useState)(!1),s=c[0],l=c[1],i=(0,t.useRef)(void 0),r=(0,t.useCallback)((function(){(0,C.A)(o),l(!0),i.current=window.setTimeout((function(){l(!1)}),1e3)}),[o]);return(0,t.useEffect)((function(){return function(){return window.clearTimeout(i.current)}}),[]),(0,u.jsx)("button",{type:"button","aria-label":s?(0,j.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,j.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,j.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,a.A)("clean-btn",n,A.copyButton,s&&A.copyButtonCopied),onClick:r,children:(0,u.jsxs)("span",{className:A.copyButtonIcons,"aria-hidden":"true",children:[(0,u.jsx)(x.A,{className:A.copyButtonIcon}),(0,u.jsx)(y.A,{className:A.copyButtonSuccessIcon})]})})}var _=n(8119);const v={wordWrapButtonIcon:"wordWrapButtonIcon_iowe",wordWrapButtonEnabled:"wordWrapButtonEnabled_gY8A"};function w(e){var o=e.className,n=e.onClick,c=e.isEnabled,t=(0,j.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,u.jsx)("button",{type:"button",onClick:n,className:(0,a.A)("clean-btn",o,c&&v.wordWrapButtonEnabled),"aria-label":t,title:t,children:(0,u.jsx)(_.A,{className:v.wordWrapButtonIcon,"aria-hidden":"true"})})}function T(e){var o,n=e.children,c=e.className,t=void 0===c?"":c,s=e.metastring,i=e.title,d=e.showLineNumbers,p=e.language,g=(0,B.p)().prism,N=g.defaultLanguage,C=g.magicComments,j=function(e){return null==e?void 0:e.toLowerCase()}(null!=(o=null!=p?p:(0,r.Op)(t))?o:N),x=(0,l.A)(),y=(0,h.f)(),A=(0,r.wt)(s)||i,_=(0,r.Li)(n,{metastring:s,language:j,magicComments:C}),v=_.lineClassNames,T=_.code,I=null!=d?d:(0,r._u)(s);return(0,u.jsxs)(m,{as:"div",className:(0,a.A)(t,j&&!t.includes("language-"+j)&&"language-"+j),children:[A&&(0,u.jsx)("div",{className:b.codeBlockTitle,children:A}),(0,u.jsxs)("div",{className:b.codeBlockContent,children:[(0,u.jsx)(k.f4,{theme:x,code:T,language:null!=j?j:"text",children:function(e){var o=e.className,n=e.style,c=e.tokens,t=e.getLineProps,s=e.getTokenProps;return(0,u.jsx)("pre",{tabIndex:0,ref:y.codeBlockRef,className:(0,a.A)(o,b.codeBlock,"thin-scrollbar"),style:n,children:(0,u.jsx)("code",{className:(0,a.A)(b.codeBlockLines,I&&b.codeBlockLinesWithNumbering),children:c.map((function(e,o){return(0,u.jsx)(f,{line:e,getLineProps:t,getTokenProps:s,classNames:v[o],showLineNumbers:I},o)}))})})}}),(0,u.jsxs)("div",{className:b.buttonGroup,children:[(y.isEnabled||y.isCodeScrollable)&&(0,u.jsx)(w,{className:b.codeButton,onClick:function(){return y.toggle()},isEnabled:y.isEnabled}),(0,u.jsx)(L,{className:b.codeButton,code:T})]})]})]})}var I=["children"];function W(e){var o=e.children,n=(0,c.A)(e,I),a=(0,s.A)(),l=function(e){return t.Children.toArray(e).some((function(e){return(0,t.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(o),i="string"==typeof l?T:g;return(0,u.jsx)(i,Object.assign({},n,{children:l}),String(a))}}}]); \ No newline at end of file diff --git a/assets/js/17896441.e236b039.js b/assets/js/17896441.e236b039.js deleted file mode 100644 index 6a9725c6f..000000000 --- a/assets/js/17896441.e236b039.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[401],{664:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>rt});var a=t(6540),s=t(4239),i=t(7094),r=t(4848),o=a.createContext(null);function c(e){var n=e.children,t=function(e){return(0,a.useMemo)((function(){return{metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc}}),[e])}(e.content);return(0,r.jsx)(o.Provider,{value:t,children:n})}function l(){var e=(0,a.useContext)(o);if(null===e)throw new i.dV("DocProvider");return e}function d(){var e,n=l(),t=n.metadata,a=n.frontMatter,i=n.assets;return(0,r.jsx)(s.be,{title:t.title,description:t.description,keywords:a.keywords,image:null!=(e=i.image)?e:a.image})}var u=t(8215),m=t(2216),h=t(3230),v=t(4783);function f(e){var n=e.permalink,t=e.title,a=e.subLabel,s=e.isNext;return(0,r.jsxs)(v.A,{className:(0,u.A)("pagination-nav__link",s?"pagination-nav__link--next":"pagination-nav__link--prev"),to:n,children:[a&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:a}),(0,r.jsx)("div",{className:"pagination-nav__label",children:t})]})}function p(e){var n=e.previous,t=e.next;return(0,r.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,h.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[n&&(0,r.jsx)(f,Object.assign({},n,{subLabel:(0,r.jsx)(h.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})})),t&&(0,r.jsx)(f,Object.assign({},t,{subLabel:(0,r.jsx)(h.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0}))]})}function b(){var e=l().metadata;return(0,r.jsx)(p,{previous:e.previous,next:e.next})}var g=t(7639),x=t(9802),j=t(8630),N=t(2780),A=t(3403);var C={unreleased:function(e){var n=e.siteTitle,t=e.versionMetadata;return(0,r.jsx)(h.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:n,versionLabel:(0,r.jsx)("b",{children:t.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){var n=e.siteTitle,t=e.versionMetadata;return(0,r.jsx)(h.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:n,versionLabel:(0,r.jsx)("b",{children:t.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function k(e){var n=C[e.versionMetadata.banner];return(0,r.jsx)(n,Object.assign({},e))}function L(e){var n=e.versionLabel,t=e.to,a=e.onClick;return(0,r.jsx)(h.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:n,latestVersionLink:(0,r.jsx)("b",{children:(0,r.jsx)(v.A,{to:t,onClick:a,children:(0,r.jsx)(h.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function y(e){var n,t=e.className,a=e.versionMetadata,s=(0,g.A)().siteConfig.title,i=(0,x.vT)({failfast:!0}).pluginId,o=(0,N.g1)(i).savePreferredVersionName,c=(0,x.HW)(i),l=c.latestDocSuggestion,d=c.latestVersionSuggestion,m=null!=l?l:(n=d).docs.find((function(e){return e.id===n.mainDocId}));return(0,r.jsxs)("div",{className:(0,u.A)(t,j.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,r.jsx)("div",{children:(0,r.jsx)(k,{siteTitle:s,versionMetadata:a})}),(0,r.jsx)("div",{className:"margin-top--md",children:(0,r.jsx)(L,{versionLabel:d.label,to:m.path,onClick:function(){return o(d.name)}})})]})}function _(e){var n=e.className,t=(0,A.r)();return t.banner?(0,r.jsx)(y,{className:n,versionMetadata:t}):null}function B(e){var n=e.className,t=(0,A.r)();return t.badge?(0,r.jsx)("span",{className:(0,u.A)(n,j.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,r.jsx)(h.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:t.label},children:"Version: {versionLabel}"})}):null}function w(e){var n=e.lastUpdatedAt,t=e.formattedLastUpdatedAt;return(0,r.jsx)(h.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,r.jsx)("b",{children:(0,r.jsx)("time",{dateTime:new Date(1e3*n).toISOString(),children:t})})},children:" on {date}"})}function T(e){var n=e.lastUpdatedBy;return(0,r.jsx)(h.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,r.jsx)("b",{children:n})},children:" by {user}"})}function O(e){var n=e.lastUpdatedAt,t=e.formattedLastUpdatedAt,a=e.lastUpdatedBy;return(0,r.jsxs)("span",{className:j.G.common.lastUpdated,children:[(0,r.jsx)(h.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:n&&t?(0,r.jsx)(w,{lastUpdatedAt:n,formattedLastUpdatedAt:t}):"",byUser:a?(0,r.jsx)(T,{lastUpdatedBy:a}):""},children:"Last updated{atDate}{byUser}"}),!1]})}var E=t(1367);const H={iconEdit:"iconEdit_Z9Sw"};var M=["className"];function I(e){var n=e.className,t=(0,E.A)(e,M);return(0,r.jsx)("svg",Object.assign({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(H.iconEdit,n),"aria-hidden":"true"},t,{children:(0,r.jsx)("g",{children:(0,r.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})}))}function S(e){var n=e.editUrl;return(0,r.jsxs)(v.A,{to:n,className:j.G.common.editThisPage,children:[(0,r.jsx)(I,{}),(0,r.jsx)(h.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}const U={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function V(e){var n=e.permalink,t=e.label,a=e.count;return(0,r.jsxs)(v.A,{href:n,className:(0,u.A)(U.tag,a?U.tagWithCount:U.tagRegular),children:[t,a&&(0,r.jsx)("span",{children:a})]})}const R={tags:"tags_jXut",tag:"tag_QGVx"};function z(e){var n=e.tags;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("b",{children:(0,r.jsx)(h.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,r.jsx)("ul",{className:(0,u.A)(R.tags,"padding--none","margin-left--sm"),children:n.map((function(e){var n=e.label,t=e.permalink;return(0,r.jsx)("li",{className:R.tag,children:(0,r.jsx)(V,{label:n,permalink:t})},t)}))})]})}const P={lastUpdated:"lastUpdated_vwxv"};function G(e){return(0,r.jsx)("div",{className:(0,u.A)(j.G.docs.docFooterTagsRow,"row margin-bottom--sm"),children:(0,r.jsx)("div",{className:"col",children:(0,r.jsx)(z,Object.assign({},e))})})}function D(e){var n=e.editUrl,t=e.lastUpdatedAt,a=e.lastUpdatedBy,s=e.formattedLastUpdatedAt;return(0,r.jsxs)("div",{className:(0,u.A)(j.G.docs.docFooterEditMetaRow,"row"),children:[(0,r.jsx)("div",{className:"col",children:n&&(0,r.jsx)(S,{editUrl:n})}),(0,r.jsx)("div",{className:(0,u.A)("col",P.lastUpdated),children:(t||a)&&(0,r.jsx)(O,{lastUpdatedAt:t,formattedLastUpdatedAt:s,lastUpdatedBy:a})})]})}function W(){var e=l().metadata,n=e.editUrl,t=e.lastUpdatedAt,a=e.formattedLastUpdatedAt,s=e.lastUpdatedBy,i=e.tags,o=i.length>0,c=!!(n||t||s);return o||c?(0,r.jsxs)("footer",{className:(0,u.A)(j.G.docs.docFooter,"docusaurus-mt-lg"),children:[o&&(0,r.jsx)(G,{tags:i}),c&&(0,r.jsx)(D,{editUrl:n,lastUpdatedAt:t,lastUpdatedBy:s,formattedLastUpdatedAt:a})]}):null}var F=t(4549),q=t(6957),Z=["parentIndex"];function $(e){var n=e.map((function(e){return Object.assign({},e,{parentIndex:-1,children:[]})})),t=Array(7).fill(-1);n.forEach((function(e,n){var a=t.slice(2,e.level);e.parentIndex=Math.max.apply(Math,a),t[e.level]=n}));var a=[];return n.forEach((function(e){var t=e.parentIndex,s=(0,E.A)(e,Z);t>=0?n[t].children.push(s):a.push(s)})),a}function Y(e){var n=e.toc,t=e.minHeadingLevel,a=e.maxHeadingLevel;return n.flatMap((function(e){var n=Y({toc:e.children,minHeadingLevel:t,maxHeadingLevel:a});return function(e){return e.level>=t&&e.level<=a}(e)?[Object.assign({},e,{children:n})]:n}))}function J(e){var n=e.getBoundingClientRect();return n.top===n.bottom?J(e.parentNode):n}function K(e,n){var t,a,s=n.anchorTopOffset,i=e.find((function(e){return J(e).top>=s}));return i?function(e){return e.top>0&&e.bottom",end:""}}),Te=Object.keys(Be);function Oe(e,n){var t=e.map((function(e){var t=we[e],a=t.start,s=t.end;return"(?:"+a+"\\s*("+n.flatMap((function(e){var n,t;return[e.line,null==(n=e.block)?void 0:n.start,null==(t=e.block)?void 0:t.end].filter(Boolean)})).join("|")+")\\s*"+s+")"})).join("|");return new RegExp("^\\s*(?:"+t+")\\s*$")}function Ee(e,n){var t=e.replace(/\n$/,""),a=n.language,s=n.magicComments,i=n.metastring;if(i&&_e.test(i)){var r=i.match(_e).groups.range;if(0===s.length)throw new Error("A highlight range has been given in code block's metastring (``` "+i+"), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.");var o=s[0].className,c=Le()(r).filter((function(e){return e>0})).map((function(e){return[e-1,[o]]}));return{lineClassNames:Object.fromEntries(c),code:t}}if(void 0===a)return{lineClassNames:{},code:t};for(var l=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return Oe(["js","jsBlock"],n);case"jsx":case"tsx":return Oe(["js","jsBlock","jsx"],n);case"html":return Oe(["js","jsBlock","html"],n);case"python":case"py":case"bash":return Oe(["bash"],n);case"markdown":case"md":return Oe(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return Oe(["tex"],n);case"lua":case"haskell":case"sql":return Oe(["lua"],n);case"wasm":return Oe(["wasm"],n);case"vb":case"vba":case"visual-basic":return Oe(["vb","rem"],n);case"vbnet":return Oe(["vbnet","rem"],n);case"batch":return Oe(["rem"],n);case"basic":return Oe(["rem","f90"],n);case"fsharp":return Oe(["js","ml"],n);case"ocaml":case"sml":return Oe(["ml"],n);case"fortran":return Oe(["f90"],n);case"cobol":return Oe(["cobol"],n);default:return Oe(Te,n)}}(a,s),d=t.split("\n"),u=Object.fromEntries(s.map((function(e){return[e.className,{start:0,range:""}]}))),m=Object.fromEntries(s.filter((function(e){return e.line})).map((function(e){var n=e.className;return[e.line,n]}))),h=Object.fromEntries(s.filter((function(e){return e.block})).map((function(e){var n=e.className;return[e.block.start,n]}))),v=Object.fromEntries(s.filter((function(e){return e.block})).map((function(e){var n=e.className;return[e.block.end,n]}))),f=0;f0&&r.getRangeAt(0);a.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;var c=!1;try{c=document.execCommand("copy")}catch(l){}s.remove(),o&&(r.removeAllRanges(),r.addRange(o)),i&&i.focus()}(n),o(!0),c.current=window.setTimeout((function(){o(!1)}),1e3)}),[n]);return(0,a.useEffect)((function(){return function(){return window.clearTimeout(c.current)}}),[]),(0,r.jsx)("button",{type:"button","aria-label":i?(0,h.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,h.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,h.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",t,Fe.copyButton,i&&Fe.copyButtonCopied),onClick:l,children:(0,r.jsxs)("span",{className:Fe.copyButtonIcons,"aria-hidden":"true",children:[(0,r.jsx)(De,{className:Fe.copyButtonIcon}),(0,r.jsx)(We,{className:Fe.copyButtonSuccessIcon})]})})}function Ze(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,r.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})}))}const $e={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Ye(e){var n=e.className,t=e.onClick,a=e.isEnabled,s=(0,h.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,r.jsx)("button",{type:"button",onClick:t,className:(0,u.A)("clean-btn",n,a&&$e.wordWrapButtonEnabled),"aria-label":s,title:s,children:(0,r.jsx)(Ze,{className:$e.wordWrapButtonIcon,"aria-hidden":"true"})})}function Je(e){var n,t,s,i,o,c,l,d,m,h,v,f=e.children,p=e.className,b=void 0===p?"":p,g=e.metastring,x=e.title,j=e.showLineNumbers,N=e.language,A=(0,q.p)().prism,C=A.defaultLanguage,k=A.magicComments,L=function(e){return null==e?void 0:e.toLowerCase()}(null!=(n=null!=N?N:null==(t=b.split(" ").find((function(e){return e.startsWith("language-")})))?void 0:t.replace(/language-/,""))?n:C),y=Ae(),_=(s=(0,a.useState)(!1),i=s[0],o=s[1],c=(0,a.useState)(!1),l=c[0],d=c[1],m=(0,a.useRef)(null),h=(0,a.useCallback)((function(){var e=m.current.querySelector("code");i?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),o((function(e){return!e}))}),[m,i]),v=(0,a.useCallback)((function(){var e=m.current,n=e.scrollWidth>e.clientWidth||m.current.querySelector("code").hasAttribute("style");d(n)}),[m]),Re(m,v),(0,a.useEffect)((function(){v()}),[i,v]),(0,a.useEffect)((function(){return window.addEventListener("resize",v,{passive:!0}),function(){window.removeEventListener("resize",v)}}),[v]),{codeBlockRef:m,isEnabled:i,isCodeScrollable:l,toggle:h}),B=function(e){var n,t;return null!=(n=null==e||null==(t=e.match(ye))?void 0:t.groups.title)?n:""}(g)||x,w=Ee(f,{metastring:g,language:L,magicComments:k}),T=w.lineClassNames,O=w.code,E=null!=j?j:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(g);return(0,r.jsxs)(Ie,{as:"div",className:(0,u.A)(b,L&&!b.includes("language-"+L)&&"language-"+L),children:[B&&(0,r.jsx)("div",{className:Se.codeBlockTitle,children:B}),(0,r.jsxs)("div",{className:Se.codeBlockContent,children:[(0,r.jsx)(ze.f4,{theme:y,code:O,language:null!=L?L:"text",children:function(e){var n=e.className,t=e.style,a=e.tokens,s=e.getLineProps,i=e.getTokenProps;return(0,r.jsx)("pre",{tabIndex:0,ref:_.codeBlockRef,className:(0,u.A)(n,Se.codeBlock,"thin-scrollbar"),style:t,children:(0,r.jsx)("code",{className:(0,u.A)(Se.codeBlockLines,E&&Se.codeBlockLinesWithNumbering),children:a.map((function(e,n){return(0,r.jsx)(Ge,{line:e,getLineProps:s,getTokenProps:i,classNames:T[n],showLineNumbers:E},n)}))})})}}),(0,r.jsxs)("div",{className:Se.buttonGroup,children:[(_.isEnabled||_.isCodeScrollable)&&(0,r.jsx)(Ye,{className:Se.codeButton,onClick:function(){return _.toggle()},isEnabled:_.isEnabled}),(0,r.jsx)(qe,{className:Se.codeButton,code:O})]})]})]})}var Ke=["children"];function Qe(e){var n=e.children,t=(0,E.A)(e,Ke),s=(0,je.A)(),i=function(e){return a.Children.toArray(e).some((function(e){return(0,a.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(n),o="string"==typeof i?Je:Ue;return(0,r.jsx)(o,Object.assign({},t,{children:i}),String(s))}function Xe(e){return(0,r.jsx)("code",Object.assign({},e))}var en=t(5066),nn=t(7344);const tn={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var an=["summary","children"];function sn(e){return!!e&&("SUMMARY"===e.tagName||sn(e.parentElement))}function rn(e,n){return!!e&&(e===n||rn(e.parentElement,n))}function on(e){var n=e.summary,t=e.children,s=(0,E.A)(e,an);(0,nn.A)().collectAnchor(s.id);var i=(0,je.A)(),o=(0,a.useRef)(null),c=(0,F.u)({initialState:!s.open}),l=c.collapsed,d=c.setCollapsed,u=(0,a.useState)(s.open),m=u[0],h=u[1],v=a.isValidElement(n)?n:(0,r.jsx)("summary",{children:null!=n?n:"Details"});return(0,r.jsxs)("details",Object.assign({},s,{ref:o,open:m,"data-collapsed":l,className:(0,en.A)(tn.details,i&&tn.isBrowser,s.className),onMouseDown:function(e){sn(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var n=e.target;sn(n)&&rn(n,o.current)&&(e.preventDefault(),l?(d(!1),h(!0)):d(!0))},children:[v,(0,r.jsx)(F.N,{lazy:!1,collapsed:l,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){d(e),h(!e)},children:(0,r.jsx)("div",{className:tn.collapsibleContent,children:t})})]}))}const cn={details:"details_b_Ee"};var ln="alert alert--info";function dn(e){var n=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,r.jsx)(on,Object.assign({},n,{className:(0,u.A)(ln,cn.details,n.className)}))}function un(e){var n=a.Children.toArray(e.children),t=n.find((function(e){return a.isValidElement(e)&&"summary"===e.type})),s=(0,r.jsx)(r.Fragment,{children:n.filter((function(e){return e!==t}))});return(0,r.jsx)(dn,Object.assign({},e,{summary:t,children:s}))}function mn(e){return(0,r.jsx)(be.A,Object.assign({},e))}const hn={containsTaskList:"containsTaskList_mC6p"};function vn(e){if(void 0!==e)return(0,u.A)(e,(null==e?void 0:e.includes("contains-task-list"))&&hn.containsTaskList)}const fn={img:"img_ev3q"};function pn(e){var n,t=function(e){var n=a.Children.toArray(e),t=n.find((function(e){return a.isValidElement(e)&&"mdxAdmonitionTitle"===e.type})),s=n.filter((function(e){return e!==t}));return{mdxAdmonitionTitle:null==t?void 0:t.props.children,rest:s.length>0?(0,r.jsx)(r.Fragment,{children:s}):null}}(e.children),s=t.mdxAdmonitionTitle,i=t.rest,o=null!=(n=e.title)?n:s;return Object.assign({},e,o&&{title:o},{children:i})}const bn={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function gn(e){var n=e.type,t=e.className,a=e.children;return(0,r.jsx)("div",{className:(0,u.A)(j.G.common.admonition,j.G.common.admonitionType(n),bn.admonition,t),children:a})}function xn(e){var n=e.icon,t=e.title;return(0,r.jsxs)("div",{className:bn.admonitionHeading,children:[(0,r.jsx)("span",{className:bn.admonitionIcon,children:n}),t]})}function jn(e){var n=e.children;return n?(0,r.jsx)("div",{className:bn.admonitionContent,children:n}):null}function Nn(e){var n=e.type,t=e.icon,a=e.title,s=e.children,i=e.className;return(0,r.jsxs)(gn,{type:n,className:i,children:[(0,r.jsx)(xn,{title:a,icon:t}),(0,r.jsx)(jn,{children:s})]})}function An(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})}))}var Cn={icon:(0,r.jsx)(An,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function kn(e){return(0,r.jsx)(Nn,Object.assign({},Cn,e,{className:(0,u.A)("alert alert--secondary",e.className),children:e.children}))}function Ln(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}))}var yn={icon:(0,r.jsx)(Ln,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function _n(e){return(0,r.jsx)(Nn,Object.assign({},yn,e,{className:(0,u.A)("alert alert--success",e.className),children:e.children}))}function Bn(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}))}var wn={icon:(0,r.jsx)(Bn,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function Tn(e){return(0,r.jsx)(Nn,Object.assign({},wn,e,{className:(0,u.A)("alert alert--info",e.className),children:e.children}))}function On(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 16 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}))}var En={icon:(0,r.jsx)(On,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Hn(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}))}var Mn={icon:(0,r.jsx)(Hn,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};var In={icon:(0,r.jsx)(On,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};var Sn={note:kn,tip:_n,info:Tn,warning:function(e){return(0,r.jsx)(Nn,Object.assign({},En,e,{className:(0,u.A)("alert alert--warning",e.className),children:e.children}))},danger:function(e){return(0,r.jsx)(Nn,Object.assign({},Mn,e,{className:(0,u.A)("alert alert--danger",e.className),children:e.children}))}},Un={secondary:function(e){return(0,r.jsx)(kn,Object.assign({title:"secondary"},e))},important:function(e){return(0,r.jsx)(Tn,Object.assign({title:"important"},e))},success:function(e){return(0,r.jsx)(_n,Object.assign({title:"success"},e))},caution:function(e){return(0,r.jsx)(Nn,Object.assign({},In,e,{className:(0,u.A)("alert alert--warning",e.className),children:e.children}))}};const Vn=Object.assign({},Sn,Un);function Rn(e){var n,t=pn(e),a=(n=t.type,Vn[n]||(console.warn('No admonition component found for admonition type "'+n+'". Using Info as fallback.'),Vn.info));return(0,r.jsx)(a,Object.assign({},t))}const zn={Head:xe.A,details:un,Details:un,code:function(e){return function(e){return void 0!==e.children&&a.Children.toArray(e.children).every((function(e){return"string"==typeof e&&!e.includes("\n")}))}(e)?(0,r.jsx)(Xe,Object.assign({},e)):(0,r.jsx)(Qe,Object.assign({},e))},a:function(e){return(0,r.jsx)(v.A,Object.assign({},e))},pre:function(e){return(0,r.jsx)(r.Fragment,{children:e.children})},ul:function(e){return(0,r.jsx)("ul",Object.assign({},e,{className:vn(e.className)}))},li:function(e){return(0,nn.A)().collectAnchor(e.id),(0,r.jsx)("li",Object.assign({},e))},img:function(e){return(0,r.jsx)("img",Object.assign({decoding:"async",loading:"lazy"},e,{className:(n=e.className,(0,u.A)(n,fn.img))}));var n},h1:function(e){return(0,r.jsx)(mn,Object.assign({as:"h1"},e))},h2:function(e){return(0,r.jsx)(mn,Object.assign({as:"h2"},e))},h3:function(e){return(0,r.jsx)(mn,Object.assign({as:"h3"},e))},h4:function(e){return(0,r.jsx)(mn,Object.assign({as:"h4"},e))},h5:function(e){return(0,r.jsx)(mn,Object.assign({as:"h5"},e))},h6:function(e){return(0,r.jsx)(mn,Object.assign({as:"h6"},e))},admonition:Rn,mermaid:function(){return null}};function Pn(e){var n=e.children;return(0,r.jsx)(ge.x,{components:zn,children:n})}function Gn(e){var n,t,a,s,i=e.children,o=(n=l(),t=n.metadata,a=n.frontMatter,s=n.contentTitle,a.hide_title||void 0!==s?null:t.title);return(0,r.jsxs)("div",{className:(0,u.A)(j.G.docs.docMarkdown,"markdown"),children:[o&&(0,r.jsx)("header",{children:(0,r.jsx)(be.A,{as:"h1",children:o})}),(0,r.jsx)(Pn,{children:i})]})}var Dn=t(2060),Wn=t(260),Fn=t(8180);function qn(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,r.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})}))}const Zn={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function $n(){var e=(0,Fn.A)("/");return(0,r.jsx)("li",{className:"breadcrumbs__item",children:(0,r.jsx)(v.A,{"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,r.jsx)(qn,{className:Zn.breadcrumbHomeIcon})})})}const Yn={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Jn(e){var n=e.children,t=e.href,a="breadcrumbs__link";return e.isLast?(0,r.jsx)("span",{className:a,itemProp:"name",children:n}):t?(0,r.jsx)(v.A,{className:a,href:t,itemProp:"item",children:(0,r.jsx)("span",{itemProp:"name",children:n})}):(0,r.jsx)("span",{className:a,children:n})}function Kn(e){var n=e.children,t=e.active,a=e.index,s=e.addMicrodata;return(0,r.jsxs)("li",Object.assign({},s&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,u.A)("breadcrumbs__item",{"breadcrumbs__item--active":t}),children:[n,(0,r.jsx)("meta",{itemProp:"position",content:String(a+1)})]}))}function Qn(){var e=(0,Dn.OF)(),n=(0,Wn.Dt)();return e?(0,r.jsx)("nav",{className:(0,u.A)(j.G.docs.docBreadcrumbs,Yn.breadcrumbsContainer),"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,r.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[n&&(0,r.jsx)($n,{}),e.map((function(n,t){var a=t===e.length-1,s="category"===n.type&&n.linkUnlisted?void 0:n.href;return(0,r.jsx)(Kn,{active:a,index:t,addMicrodata:!!s,children:(0,r.jsx)(Jn,{href:s,isLast:a,children:n.label})},t)}))]})}):null}function Xn(){return(0,r.jsx)(h.A,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function et(){return(0,r.jsx)(h.A,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function nt(){return(0,r.jsx)(xe.A,{children:(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function tt(e){var n=e.className;return(0,r.jsx)(Rn,{type:"caution",title:(0,r.jsx)(Xn,{}),className:(0,u.A)(n,j.G.common.unlistedBanner),children:(0,r.jsx)(et,{})})}function at(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nt,{}),(0,r.jsx)(tt,Object.assign({},e))]})}const st={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function it(e){var n,t,a,s,i,o,c=e.children,d=(n=l(),t=n.frontMatter,a=n.toc,s=(0,m.l)(),i=t.hide_table_of_contents,o=!i&&a.length>0,{hidden:i,mobile:o?(0,r.jsx)(de,{}):void 0,desktop:!o||"desktop"!==s&&"ssr"!==s?void 0:(0,r.jsx)(pe,{})}),h=l().metadata.unlisted;return(0,r.jsxs)("div",{className:"row",children:[(0,r.jsxs)("div",{className:(0,u.A)("col",!d.hidden&&st.docItemCol),children:[h&&(0,r.jsx)(at,{}),(0,r.jsx)(_,{}),(0,r.jsxs)("div",{className:st.docItemContainer,children:[(0,r.jsxs)("article",{children:[(0,r.jsx)(Qn,{}),(0,r.jsx)(B,{}),d.mobile,(0,r.jsx)(Gn,{children:c}),(0,r.jsx)(W,{})]}),(0,r.jsx)(b,{})]})]}),d.desktop&&(0,r.jsx)("div",{className:"col col--3",children:d.desktop})]})}function rt(e){var n="docs-doc-id-"+e.content.metadata.id,t=e.content;return(0,r.jsx)(c,{content:e.content,children:(0,r.jsxs)(s.e3,{className:n,children:[(0,r.jsx)(d,{}),(0,r.jsx)(it,{children:(0,r.jsx)(t,{})})]})})}},8426:(e,n)=>{function t(e){let n,t=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))t.push(parseInt(a,10));else if(n=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,s,i]=n;if(a&&i){a=parseInt(a),i=parseInt(i);const e=a{"use strict";t.d(n,{R:()=>r,x:()=>o});var a=t(6540);const s={},i=a.createContext(s);function r(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1bd4f307.9bd0214b.js b/assets/js/1bd4f307.a1bf2bd1.js similarity index 99% rename from assets/js/1bd4f307.9bd0214b.js rename to assets/js/1bd4f307.a1bf2bd1.js index a9b3f7757..0cff5acbc 100644 --- a/assets/js/1bd4f307.9bd0214b.js +++ b/assets/js/1bd4f307.a1bf2bd1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[808],{9582:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var t=n(4848),o=n(8453);n(8180),n(4783);const r={id:"economics",title:"Tokenomics",sidebar_position:5},a=void 0,i={id:"concepts/economics",title:"Tokenomics",description:"CKByte Tokenomics",source:"@site/docs/concepts/economics.md",sourceDirName:"concepts",slug:"/concepts/economics",permalink:"/docs/concepts/economics",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/economics.md",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:5,frontMatter:{id:"economics",title:"Tokenomics",sidebar_position:5},sidebar:"tutorial",previous:{title:"Consensus",permalink:"/docs/concepts/consensus"},next:{title:"Glossary",permalink:"/docs/concepts/glossary"}},c={},l=[{value:"CKByte Tokenomics",id:"ckbyte-tokenomics",level:2},{value:"Value Alignment",id:"value-alignment",level:2},{value:"State Rent",id:"state-rent",level:2},{value:"Base Issuance",id:"base-issuance",level:2},{value:"Secondary Issuance",id:"secondary-issuance",level:2},{value:"Nervos DAO",id:"nervos-dao",level:2}];function d(e){const s={a:"a",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"ckbyte-tokenomics",children:"CKByte Tokenomics"}),"\n",(0,t.jsx)(s.p,{children:"CKByte is the native token of Nervos, covering three types of fees: Cycles (computation), Transaction Fees (security), and State Rent (storage)."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Cycles"})," compensate miners based on the computational resources used to verify a transaction, measured by CKB-VM during the execution of smart contracts."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Transaction Fees"})," are paid to miners for providing the computing power to safeguard network security."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"State Rent"})," compensates miners for providing storage space to persist transaction data."]}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"Cycles and transaction fees are one-time payments required to process the transaction and add it on the blockchain. State Rent is continuously paid for data persistence."}),"\n",(0,t.jsx)(s.p,{children:"Ownership of CKByte grants the holder to one byte of data storage on Nervos. To create a new\xa0Cell, users must possess CKBytes equivalent to the space the Cell occupies. These CKBytes remain locked for the Cell\u2019s duration. When the Cell is consumed, the CKBytes are released and can be reused. State Rent is automatically paid during the lock period of CKBytes."}),"\n",(0,t.jsx)(s.p,{children:"All assets on Nervos require data storage, making them subject to State Rent. This creates direct value alignment because CKBytes are indispensable for asset maintenance on Nervos."}),"\n",(0,t.jsx)(s.h2,{id:"value-alignment",children:"Value Alignment"}),"\n",(0,t.jsx)(s.p,{children:"The platform\u2019s security must scale with its stored value to prevent vulnerability. CKBytes compensate miners for safeguarding the network. Increasing CKBytes value augments rewards for network protection, ensuring adequate security for stored value."}),"\n",(0,t.jsx)(s.p,{children:"However, on multi-asset platforms, a \u201cheavy asset problem\u201d emerges when the native token fails to increase in tandem with the growth in asset value, due to their weak correlation. Nervos addresses this by tying CKByte to data storage and mandating State Rent. This creates long-term demand because assets necessitate CKBytes for storage and incur State Rent throughout the duration."}),"\n",(0,t.jsx)(s.h2,{id:"state-rent",children:"State Rent"}),"\n",(0,t.jsx)(s.p,{children:"Miners ensure data validity and preservation on the network, while cycles and transaction fees ensure proper validation. However, once the fees are settled, miners lack further incentive for data preservation. As a solution, State Rent continuously compensate miners for data preservation."}),"\n",(0,t.jsx)(s.p,{children:"When users store data on Nervos, they incur a small State Rent fee based on the space occupied. Recurring upfront fee is inconvenient for users, so Nervos uses targeted inflation on users occupying network space."}),"\n",(0,t.jsx)(s.p,{children:"During data storage, a portion of CKBytes must be locked and cannot earn interest. Although the locked CKBytes remain constant in number, their value slowly decreases due to inflation, affecting only users storing data on Nervos. This small depreciation constitutes State Rent."}),"\n",(0,t.jsx)(s.p,{children:"The inflation funding State Rent comes from a process known as Secondary Issuance. Nervos users who do not occupy space on the network may gain interest from Secondary Issuance by locking their CKBytes in Nervos DAO. The following sections will delve deeper into this mechanism."}),"\n",(0,t.jsx)(s.h2,{id:"base-issuance",children:"Base Issuance"}),"\n",(0,t.jsx)(s.p,{children:"At the network\u2019s initial launch, CKBytes had lower value, indicating lower security. To boost Nervos\u2019 appeal for asset storage, security is temporarily subsidized through Base Issuance, similar to Bitcoin's mining process. Miners receive fixed CKBytes rewards for processing transactions. Over time, the subsidies diminishes as stored assets gain value."}),"\n",(0,t.jsxs)(s.p,{children:["Base Issuance follows a transparent, predictable inflation schedule, ",(0,t.jsx)(s.a,{href:"https://ckbdapps.com/halving",children:"halving"})," about every four years until reaching the caps at 33.6 billion CKBytes."]}),"\n",(0,t.jsx)(s.h2,{id:"secondary-issuance",children:"Secondary Issuance"}),"\n",(0,t.jsx)(s.p,{children:"After Base Issuance, relying solely on transaction fees may not suffice for miner incentives or data persistence. Secondary Issuance, with an small annual fixed inflation of 1.344 billion CKBytes, addresses these concerns."}),"\n",(0,t.jsx)(s.p,{children:"Unlike Base Issuance, Secondary Issuance only targets at users occupying Nervos space or holding CKBytes outside Nervos DAO. Secondary Issuance are distributed to:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"Miners (as State Rent)"}),"\n",(0,t.jsx)(s.li,{children:"Nervos DAO users"}),"\n",(0,t.jsx)(s.li,{children:"The Nervos Treasury for continued development"}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"nervos-dao",children:"Nervos DAO"}),"\n",(0,t.jsx)(s.p,{children:"CKBytes holders can earn interest by locking tokens in Nervos DAO, similar to staking. Interest accrues proportionally to Secondary Issuance, offsetting the long-term inflationary effects of the latter, thus maintaining value. Users occupying space in Nervos have their CKBytes locked, making them ineligible to be placed in Nervos DAO. Once the space-occupying Cells are consumed and the CKBytes are released, they can be placed in Nervos DAO. This mechanism incentivizes the removal of unnecessary data, ensuring long-term manageability of the blockchain."}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["For more information, refer to the ",(0,t.jsx)(s.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"RFC Crypto-Economics of the Nervos Common Knowledge Base"}),"."]})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>i});var t=n(6540);const o={},r=t.createContext(o);function a(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[808],{9582:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var t=n(4848),o=n(8453);n(8180),n(4783);const r={id:"economics",title:"Tokenomics",sidebar_position:5},a=void 0,i={id:"concepts/economics",title:"Tokenomics",description:"CKByte Tokenomics",source:"@site/docs/concepts/economics.md",sourceDirName:"concepts",slug:"/concepts/economics",permalink:"/docs/concepts/economics",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/economics.md",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:5,frontMatter:{id:"economics",title:"Tokenomics",sidebar_position:5},sidebar:"tutorial",previous:{title:"Consensus",permalink:"/docs/concepts/consensus"},next:{title:"Glossary",permalink:"/docs/concepts/glossary"}},c={},l=[{value:"CKByte Tokenomics",id:"ckbyte-tokenomics",level:2},{value:"Value Alignment",id:"value-alignment",level:2},{value:"State Rent",id:"state-rent",level:2},{value:"Base Issuance",id:"base-issuance",level:2},{value:"Secondary Issuance",id:"secondary-issuance",level:2},{value:"Nervos DAO",id:"nervos-dao",level:2}];function d(e){const s={a:"a",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"ckbyte-tokenomics",children:"CKByte Tokenomics"}),"\n",(0,t.jsx)(s.p,{children:"CKByte is the native token of Nervos, covering three types of fees: Cycles (computation), Transaction Fees (security), and State Rent (storage)."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Cycles"})," compensate miners based on the computational resources used to verify a transaction, measured by CKB-VM during the execution of smart contracts."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Transaction Fees"})," are paid to miners for providing the computing power to safeguard network security."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"State Rent"})," compensates miners for providing storage space to persist transaction data."]}),"\n"]}),"\n",(0,t.jsx)(s.p,{children:"Cycles and transaction fees are one-time payments required to process the transaction and add it on the blockchain. State Rent is continuously paid for data persistence."}),"\n",(0,t.jsx)(s.p,{children:"Ownership of CKByte grants the holder to one byte of data storage on Nervos. To create a new\xa0Cell, users must possess CKBytes equivalent to the space the Cell occupies. These CKBytes remain locked for the Cell\u2019s duration. When the Cell is consumed, the CKBytes are released and can be reused. State Rent is automatically paid during the lock period of CKBytes."}),"\n",(0,t.jsx)(s.p,{children:"All assets on Nervos require data storage, making them subject to State Rent. This creates direct value alignment because CKBytes are indispensable for asset maintenance on Nervos."}),"\n",(0,t.jsx)(s.h2,{id:"value-alignment",children:"Value Alignment"}),"\n",(0,t.jsx)(s.p,{children:"The platform\u2019s security must scale with its stored value to prevent vulnerability. CKBytes compensate miners for safeguarding the network. Increasing CKBytes value augments rewards for network protection, ensuring adequate security for stored value."}),"\n",(0,t.jsx)(s.p,{children:"However, on multi-asset platforms, a \u201cheavy asset problem\u201d emerges when the native token fails to increase in tandem with the growth in asset value, due to their weak correlation. Nervos addresses this by tying CKByte to data storage and mandating State Rent. This creates long-term demand because assets necessitate CKBytes for storage and incur State Rent throughout the duration."}),"\n",(0,t.jsx)(s.h2,{id:"state-rent",children:"State Rent"}),"\n",(0,t.jsx)(s.p,{children:"Miners ensure data validity and preservation on the network, while cycles and transaction fees ensure proper validation. However, once the fees are settled, miners lack further incentive for data preservation. As a solution, State Rent continuously compensate miners for data preservation."}),"\n",(0,t.jsx)(s.p,{children:"When users store data on Nervos, they incur a small State Rent fee based on the space occupied. Recurring upfront fee is inconvenient for users, so Nervos uses targeted inflation on users occupying network space."}),"\n",(0,t.jsx)(s.p,{children:"During data storage, a portion of CKBytes must be locked and cannot earn interest. Although the locked CKBytes remain constant in number, their value slowly decreases due to inflation, affecting only users storing data on Nervos. This small depreciation constitutes State Rent."}),"\n",(0,t.jsx)(s.p,{children:"The inflation funding State Rent comes from a process known as Secondary Issuance. Nervos users who do not occupy space on the network may gain interest from Secondary Issuance by locking their CKBytes in Nervos DAO. The following sections will delve deeper into this mechanism."}),"\n",(0,t.jsx)(s.h2,{id:"base-issuance",children:"Base Issuance"}),"\n",(0,t.jsx)(s.p,{children:"At the network\u2019s initial launch, CKBytes had lower value, indicating lower security. To boost Nervos\u2019 appeal for asset storage, security is temporarily subsidized through Base Issuance, similar to Bitcoin's mining process. Miners receive fixed CKBytes rewards for processing transactions. Over time, the subsidies diminishes as stored assets gain value."}),"\n",(0,t.jsxs)(s.p,{children:["Base Issuance follows a transparent, predictable inflation schedule, ",(0,t.jsx)(s.a,{href:"https://ckbdapps.com/halving",children:"halving"})," about every four years until reaching the caps at 33.6 billion CKBytes."]}),"\n",(0,t.jsx)(s.h2,{id:"secondary-issuance",children:"Secondary Issuance"}),"\n",(0,t.jsx)(s.p,{children:"After Base Issuance, relying solely on transaction fees may not suffice for miner incentives or data persistence. Secondary Issuance, with an small annual fixed inflation of 1.344 billion CKBytes, addresses these concerns."}),"\n",(0,t.jsx)(s.p,{children:"Unlike Base Issuance, Secondary Issuance only targets at users occupying Nervos space or holding CKBytes outside Nervos DAO. Secondary Issuance are distributed to:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"Miners (as State Rent)"}),"\n",(0,t.jsx)(s.li,{children:"Nervos DAO users"}),"\n",(0,t.jsx)(s.li,{children:"The Nervos Treasury for continued development"}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"nervos-dao",children:"Nervos DAO"}),"\n",(0,t.jsx)(s.p,{children:"CKBytes holders can earn interest by locking tokens in Nervos DAO, similar to staking. Interest accrues proportionally to Secondary Issuance, offsetting the long-term inflationary effects of the latter, thus maintaining value. Users occupying space in Nervos have their CKBytes locked, making them ineligible to be placed in Nervos DAO. Once the space-occupying Cells are consumed and the CKBytes are released, they can be placed in Nervos DAO. This mechanism incentivizes the removal of unnecessary data, ensuring long-term manageability of the blockchain."}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsxs)(s.p,{children:["For more information, refer to the ",(0,t.jsx)(s.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"RFC Crypto-Economics of the Nervos Common Knowledge Base"}),"."]})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>i});var t=n(6540);const o={},r=t.createContext(o);function a(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1df93b7f.abae1908.js b/assets/js/1df93b7f.b7288a4e.js similarity index 54% rename from assets/js/1df93b7f.abae1908.js rename to assets/js/1df93b7f.b7288a4e.js index 59766c42a..22046ee4c 100644 --- a/assets/js/1df93b7f.abae1908.js +++ b/assets/js/1df93b7f.b7288a4e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[583,664],{8868:(e,t,n)=>{n.d(t,{A:()=>r});const r=[{title:".bit",description:"Cross-chain Web3 identities for you and your community",href:"https://did.id/",bannerSrc:".bit",tags:["DID"],links:[{label:"website",href:"https://did.id/"},{label:"github",href:"https://github.com/dotbitHQ"},{label:"doc",href:"https://www.notion.so/bit-Previously-DAS-5cea5b425b204679b8ef2855ed94b04d"}]},{title:"Omiga",description:"The 1st inscription protocol established on Nervos $CKB blockchain",href:"https://omiga.io/",bannerSrc:"omiga",tags:["Protocol","DApp"],links:[{label:"website",href:"https://omiga.io/"},{label:"doc",href:"https://docs.omiga.io/"}]},{title:"CoTA",description:"A layer-1.5 account based token protocol on Nervos CKB",href:"https://www.cotadev.io/",bannerSrc:"cota",tags:["Protocol","NFT"],links:[{label:"website",href:"https://www.cotadev.io/"},{label:"doc",href:"https://www.cotadev.io/docs/getting-started/overview"}]},{title:"RGB++",description:"An extended RGB protocol to manage state changes and transaction verification",href:"https://github.com/ckb-cell/RGBPlusPlus-design",bannerSrc:"rgb++",tags:["Protocol"],links:[{label:"github",href:"https://github.com/ckb-cell/RGBPlusPlus-design"},{label:"doc",href:"https://github.com/ckb-cell/RGBPlusPlus-design/blob/main/docs/light-paper-en.md"}]},{title:"Spore",description:"Craft, Secure, Distribute, and Monetize DOBs",href:"https://spore.pro/",bannerSrc:"spore",tags:["Protocol","DOB"],links:[{label:"website",href:"https://spore.pro/"},{label:"doc",href:"https://docs.spore.pro/"}]},{title:"Nervape",description:"A Metaverse with an ongoing Story and NFTs Shaped by the Community",href:"https://nervape.com/",bannerSrc:"nervape",tags:["NFT"],links:[{label:"website",href:"https://nervape.com/"},{label:"github",href:"https://github.com/nervape"},{label:"doc",href:"https://tourmaline-elderberry-f93.notion.site/Nervape-Community-Wiki-e46261f411ed42e19b859f48da06fe63"}]},{title:"JoyGift",description:"Sending crypto assets as gifts to your friends, communities, or users",href:"https://joygift.cc/",bannerSrc:"joygift",tags:["DApp"],links:[{label:"website",href:"https://joygift.cc/"}]},{title:"Philosopher's Stone",description:"On-Chain Gifting Platform powered by the Spore Protocol",href:"https://philosopherstone.xyz/",bannerSrc:"philosopherstone",tags:["DApp","DOB"],links:[{label:"website",href:"https://philosopherstone.xyz/"},{label:"github",href:"https://github.com/SpectreMercury/PhilosopherStone"}]},{title:"NFTnation",description:"Explore, buy and sell NFTs. By the community, for the community",href:"https://nft-nation.live/",bannerSrc:"nftnation",tags:["NFT"],links:[{label:"website",href:"https://nft-nation.live/"},{label:"doc",href:"https://nftnation.gitbook.io/nftnation-explained"}]},{title:"CKB Explorer",description:"A CKB Explorer built with React and Ruby on Rails",href:"https://explorer.nervos.org/",bannerSrc:"explorer",tags:["Explorer"],links:[{label:"website",href:"https://explorer.nervos.org/"},{label:"github",href:"https://github.com/nervosnetwork/ckb-explorer"}]},{title:"Nervos Scan",description:"A CKB Explorer produced with love by 7774.bit",href:"https://nervosscan.com/",bannerSrc:"nervosscan",tags:["Explorer"],links:[{label:"website",href:"https://nervosscan.com/"}]},{title:"Neuron",description:"A versatile desktop wallet designed for securely managing CKB assets",href:"https://github.com/nervosnetwork/neuron/releases/tag/v0.114.2",bannerSrc:"neuron",tags:["Wallet"],links:[{label:"website",href:"https://github.com/nervosnetwork/neuron/releases/tag/v0.114.2"}]},{title:"JoyID",description:"A web-based passwordless and mnemonic-free wallet solution",href:"https://joy.id/",bannerSrc:"joyid",tags:["Wallet"],links:[{label:"website",href:"https://joy.id/"},{label:"github",href:"https://github.com/nervina-labs?q=joyid"}]},{title:"CKBull",description:"A mobile wallet that allows you to access and manage your CKB",href:"https://ckbull.app/",bannerSrc:"ckbull",tags:["Wallet"],links:[{label:"website",href:"https://ckbull.app/"},{label:"doc",href:"https://www.notion.so/How-to-use-CKBull-wallet-89153cac673447b0bf827d1f6f7d151c?pvs=4"}]},{title:"imToken",description:"A built-in CKB wallet on mobile that enables users to safely send, receive and store CKB",href:"https://token.im/",bannerSrc:"imtoken",tags:["Wallet"],links:[{label:"website",href:"https://token.im/"},{label:"github",href:"https://github.com/consenlabs"},{label:"doc",href:"https://medium.com/imtoken/imtoken-2-5-0-now-with-nervos-tron-bch-ltc-support-14d7171ccf4"}]},{title:"SafePal",description:"A hardware wallet that supports both Nervos L1 CKB and L2 Godwoken",href:"https://www.safepal.com/",bannerSrc:"safepal",tags:["Wallet"],links:[{label:"website",href:"https://www.safepal.com/"},{label:"doc",href:"https://www.notion.so/How-to-add-send-Nervos-Chain-CKB-coin-with-SafePal-Hardware-Wallet-40da32d8f7074563859e9d08b585768e"}]},{title:"Ledger",description:"Provide secure hardware wallets for cryptocurrency storage and management",href:"https://www.ledger.com/",bannerSrc:"ledger",tags:["Wallet"],links:[{label:"website",href:"https://www.ledger.com/"},{label:"doc",href:"https://developers.ledger.com/docs/sections"}]},{title:"imKey",description:"Offer secure, user-friendly hardware wallets for digital asset protection",href:"https://imkey.im/",bannerSrc:"imkey",tags:["Wallet"],links:[{label:"website",href:"https://imkey.im/"}]},{title:"oneKey",description:"Offer secure hardware wallets with cross-platform apps for digital asset management",href:"https://onekey.so/",bannerSrc:"onekey",tags:["Wallet"],links:[{label:"website",href:"https://onekey.so/"},{label:"github",href:"https://github.com/OneKeyHQ/"},{label:"doc",href:"https://developer.onekey.so/"}]},{title:"ForceBridge",description:"A cross-chain interoperability bridge b/w Nervos and other blockchains",href:"https://forcebridge.com/",bannerSrc:"forcebridge",tags:["Bridge"],links:[{label:"website",href:"https://forcebridge.com/"},{label:"github",href:"https://github.com/nervosnetwork/force-bridge"},{label:"doc",href:"https://github.com/nervosnetwork/force-bridge/blob/main/docs/dapp-user-guide.md"}]},{title:"Godwoken Bridge",description:"A token bridge between CKB and Godwoken",href:"https://bridge.godwoken.io/",bannerSrc:"godwokenbridge",tags:["Bridge"],links:[{label:"website",href:"https://bridge.godwoken.io/"},{label:"github",href:"https://github.com/godwokenrises/light-godwoken/tree/develop/apps/godwoken-bridge"},{label:"doc",href:"https://docs.godwoken.io/"}]},{title:"Yokaiswap Bridge",description:"A cross-chain interoperability bridge b/w Nervos and other blockchains",href:"https://www.yokaiswap.com/bridge/",bannerSrc:"yokaiswap",tags:["Bridge"],links:[{label:"website",href:"https://www.yokaiswap.com/bridge/"},{label:"github",href:"https://github.com/yokaiswap"}]},{title:"Ankr",description:"The fastest, most reliable Web3 infrastructure",href:"https://www.ankr.com/",bannerSrc:"ankr",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.ankr.com/"},{label:"doc",href:"https://archive.nervos.org/blog/ankr-integrates-support-for-nervos-nodes"}]},{title:"Axon",description:"A L2 framework that unleashes the power of appchain future",href:"https://axonweb3.io/",bannerSrc:"axon",tags:["Tools & Infra"],links:[{label:"website",href:"https://axonweb3.io/"},{label:"github",href:"https://github.com/axonweb3/axon"},{label:"doc",href:"https://docs.axonweb3.io/"}]},{title:"BandProtocol",description:"A L2 framework that unleashes the power of appchain future",href:"https://www.bandprotocol.com/",bannerSrc:"bandprotocol",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.bandprotocol.com/"},{label:"github",href:"https://github.com/bandprotocol"},{label:"doc",href:"https://medium.com/bandprotocol/band-protocol-integrates-with-nervos-godwoken-361546e1091d"}]},{title:"DIA",description:"Provides fully customizable and transparent data feeds for smart contracts",href:"https://www.diadata.org/",bannerSrc:"dia",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.diadata.org/"},{label:"doc",href:"https://archive.nervos.org/blog/dia-deploys-oracles-onto-layer-2-bolstering-dev-resources"}]},{title:"Godwoken",description:"An EVM-compatible, L2 optimistic rollup solution built on Nervos L1",href:"https://www.godwoken.com/",bannerSrc:"godwoken",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.godwoken.com/"},{label:"github",href:"https://github.com/godwokenrises"},{label:"doc",href:"https://docs.godwoken.io/"}]},{title:"Khalani",description:"A decentralized infrastructure for collaborative solving in intent-driven applications",href:"https://khalani.network/",bannerSrc:"khalani",tags:["Tools & Infra"],links:[{label:"website",href:"https://khalani.network/"},{label:"doc",href:"https://blog.khalani.network/"}]},{title:"Perun",description:"A L2 solution enhancing efficiency with off-chain transaction capabilities",href:"https://perun.network/",bannerSrc:"perun",tags:["Tools & Infra"],links:[{label:"website",href:"https://perun.network/"},{label:"github",href:"https://github.com/perun-network/go-perun"}]},{title:"Unifra",description:"A leading L2 platform that provides open, reliable infrastructure services",href:"https://unifra.io/",bannerSrc:"unifra",tags:["Tools & Infra"],links:[{label:"website",href:"https://unifra.io/"}]}]},3298:(e,t,n)=>{n.d(t,{Y:()=>r});var r=[{title:"Neuron",href:"https://neuron.magickbase.com/",tags:["Desktop"]},{title:"JoyID",href:"https://joy.id/",tags:["Web-based"]},{title:"imToken",href:"https://token.im/ckb-wallet",tags:["Mobile"]},{title:"CKBull",href:"https://ckbull.app/#download",tags:["Mobile"]},{title:"SafePal",href:"https://blog.safepal.com/ckb/",tags:["Mobile","Hardware"]},{title:"Ledger",href:"https://www.ledger.com/",tags:["Hardware"]},{title:"imKey",href:"https://imkey.im/",tags:["Hardware"]},{title:"OneKey",href:"https://onekey.so/",tags:["Mobile","Desktop","Hardware"]}]},8803:(e,t,n)=>{n.d(t,{A:()=>i});n(6540);const r="layoutContainer_TJ5m";var o=n(4848);const i=function(e){var t=e.children,n=e.topMargin,i=void 0===n?16:n,s=e.colNum,l=void 0===s?[2,1,2,1]:s,a=e.gap,c=void 0===a?24:a;return(0,o.jsx)("div",{style:{marginTop:i+"px","--gap":c+"px","--columnL":l[0],"--columnM":l[1],"--columnS":l[2],"--columnXS":l[3]},className:r,children:t})}},9636:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(53),o=n(4783),i=n(975);const s={cardContainer:"cardContainer_xWMf",topContainer:"topContainer_SZLr",banner:"banner_LOnP",tagList:"tagList_EW4E",tag:"tag_QgTi",bottomContainer:"bottomContainer_TLG4",description:"description_qXLp",title:"title_ZEhm",links:"links_hvUO",iconContainer:"iconContainer_trI9"};var l=n(4848);function a(e){var t=e.title,n=e.description,a=e.href,c=e.bannerSrc,h=e.tags,d=e.links,p=e.className;return(0,l.jsxs)(o.A,{href:a,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(s.cardContainer,p),children:[(0,l.jsx)("div",{className:s.topContainer,children:(0,l.jsx)("img",{className:s.banner,alt:c,src:"/svg/banner-"+c+".svg"})}),(0,l.jsxs)("div",{className:s.bottomContainer,children:[(0,l.jsx)("h4",{className:s.title,children:t}),(0,l.jsx)("div",{className:s.tagList,children:h.map((function(e){return(0,l.jsx)("div",{className:s.tag,children:e})}))}),(0,l.jsx)("p",{className:s.description,children:n}),(0,l.jsx)("div",{className:s.links,children:d.map((function(e,t){return(0,l.jsx)(o.A,{className:s.iconContainer,href:e.link,target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)(i.A,{alt:e.label,width:24,height:24,sources:{light:"/svg/icon-"+e.label+"-light.svg",dark:"/svg/icon-"+e.label+"-dark.svg"}})},t)}))})]})]})}},7616:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(53),o=n(4783);const i={cardContainer:"cardContainer_bFxw",smallCard:"smallCard_LdEU",iconContainer:"iconContainer_ugFC",rightContainer:"rightContainer_OYxw",title:"title_MBOd",tags:"tags_mvis",tag:"tag_BvXz"};var s=n(4848);function l(e){var t,n=e.title,l=e.href,a=e.tags,c=e.size,h=void 0===c?"default":c,d=e.className,p=n.toLowerCase().replace(/\s+/g,""),g="default"===h?48:32;return(0,s.jsxs)(o.A,{href:l,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(i.cardContainer,(t={},t[i.smallCard]="small"===h,t),d),children:[(0,s.jsx)("div",{style:{width:g,height:g,minWidth:g},className:i.iconContainer,children:(0,s.jsx)("img",{alt:"logo of "+n,src:"/svg/logo-"+p+".svg",width:g,height:g})}),(0,s.jsxs)("div",{className:i.rightContainer,children:[(0,s.jsx)("div",{className:i.title,children:n}),"default"===h&&(0,s.jsx)("div",{className:i.tags,children:a.map((function(e,t){return(0,s.jsx)("p",{className:i.tag,children:e},t)}))})]})]})}},3246:(e,t,n)=>{n.r(t),n.d(t,{contactUsContents:()=>i,default:()=>s,devToolSectionContents:()=>o,homeCardContents:()=>r});var r=[{title:"Getting Started",links:[{label:"Dev Environment",link:"/docs/getting-started/dev-environment"},{label:"DApp Tutorials",link:"/docs/getting-started/transfer-ckb"},{label:"Scripts Tutorials",link:"/docs/Script/write-script"}],icon:"rocket"},{title:"Run a Node",links:[{label:"Run a Mainnet Node",link:"/docs/Node/#run-a-mainnet-node"},{label:"Run a Testnet Node",link:"/docs/Node/#run-a-testnet-node"},{label:"Run a Public RPC Node",link:"/docs/Node/#run-a-public-rpc-node"}],icon:"node"},{title:"Concepts",links:[{label:"Nervos Blockchain",link:"/docs/concepts/nervos-blockchain"},{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Tokenomics",link:"/docs/concepts/economics"}],icon:"concept"}],o=[{title:"Lumos",href:"https://github.com/ckb-js/lumos",category:"Development & Deployment"},{title:"CKB SDKs",href:"https://github.com/nervosnetwork/ckb-sdk-rust",category:"Development & Deployment"},{title:"CKB-CLI",href:"https://github.com/nervosnetwork/ckb-cli",category:"Development & Deployment"},{title:"OffCKB",href:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae",category:"Development & Deployment"},{title:"CKB Debugger",href:"https://github.com/nervosnetwork/ckb-standalone-debugger",category:"Utilities & Testing"},{title:"CKB Address",href:"https://ckb.tools/address",category:"Utilities & Testing"},{title:"Nervos Pudge Faucet",href:"https://faucet.nervos.org/",category:"Utilities & Testing"}],i=[{label:"github",link:"https://github.com/nervosnetwork"},{label:"discord",link:"https://discord.gg/nervosnetwork"},{label:"reddit",link:"https://www.reddit.com/r/NervosNetwork/"},{label:"nervostalk",link:"https://talk.nervos.org/"},{label:"telegram",link:"https://t.me/nervosnetwork"},{label:"twitter",link:"https://twitter.com/nervosnetwork"},{label:"medium",link:"https://medium.com/nervosnetwork"},{label:"youtube",link:"https://www.youtube.com/channel/UCONuJGdMzUY0Y6jrPBOzH7A"}];const s=function(){return null}},4230:(e,t,n)=>{n.r(t),n.d(t,{default:()=>A});var r=n(6540),o=n(8238);const i={homeLayout:"homeLayout_oJ9_",relative:"relative__ioB",header1:"header1_j8J6",header2:"header2_wAk7",description:"description_VY6t",titleBtm:"titleBtm_hmJU",flexCol:"flexCol_kTWC",sectionContainer:"sectionContainer_MnYH",textHighlight:"textHighlight_ic0t",ecoBG:"ecoBG_L0ih",updateBG:"updateBG_hYTi"};var s=n(8803),l=n(53);const a={section:"section_EoX_",flexCol:"flexCol_tfnz",noGap:"noGap_K3ND",flexCenter:"flexCenter_TPV4",flexBetween:"flexBetween_r7XD",flexWrap:"flexWrap_Xkc4",alignMiddle:"alignMiddle_d55x",iconContainer:"iconContainer_llIe",homeCard:"homeCard_D3Nk",sparkles:"sparkles_hA5k",cardTitle:"cardTitle_ISDw",cardLinks:"cardLinks_YmJh",borderBtm:"borderBtm_Jn7R",link:"link_ti35",line:"line_NhPR",filters:"filters_mmsw",tag:"tag_z3H5",activeTag:"activeTag_snzC",tableContainer:"tableContainer_FB7_",column:"column_yJgI",cell:"cell_LmdA",columnHeader:"columnHeader_UrkT",carouselContainer:"carouselContainer_oHO6",carouselController:"carouselController_p8da",arrowLeft:"arrowLeft_zS_K",arrowRight:"arrowRight_g8y1",illusContainer:"illusContainer_T7PL",leftContainer:"leftContainer_j1FY",description:"description_fg7L",contactSection:"contactSection_BYCv",contactTitle:"contactTitle_IS2E",icons:"icons_fP0E",iconBG:"iconBG_YI0d",devlogSection:"devlogSection_oy_p",solidBtn:"solidBtn_p_K8"};var c=n(7616),h=n(4783),d=n(3246),p=n(3298),g=n(8868),b=n(9636);const f={solidBtn:"solidBtn_xbIL"};var u=n(4848);function m(e){var t=e.link,n=e.internal,r=void 0===n||n,o=e.children,i=e.className;return r?(0,u.jsx)(h.A,{className:(0,l.A)(f.solidBtn,i),to:t,children:o}):(0,u.jsx)(h.A,{className:(0,l.A)(f.solidBtn,i),href:t,target:"_blank",rel:"noopener noreferrer",children:o})}function w(){return(0,u.jsx)(s.A,{colNum:[3,1,1,1],gap:40,children:d.homeCardContents.map((function(e,t){return(0,u.jsxs)("div",{className:(0,l.A)(a.homeCard,a.flexCol,a.section),children:[(0,u.jsx)("div",{className:a.sparkles,children:(0,u.jsx)("img",{src:"/svg/sparkles.svg",width:128,height:"auto",alt:"sparkles decoration"})}),(0,u.jsx)("div",{className:a.iconContainer,children:(0,u.jsx)("img",{src:"/svg/polygon-"+e.icon+".svg",width:160,height:160,alt:e.icon})}),(0,u.jsx)("h2",{className:a.cardTitle,children:e.title}),(0,u.jsx)("div",{className:a.cardLinks,children:e.links.map((function(e,t){return(0,u.jsxs)(h.A,{to:e.link,className:(0,l.A)(a.flexBetween,a.link,a.line,a.borderBtm),children:[e.label,(0,u.jsx)("img",{src:"/svg/icon-circle-arrow.svg",width:32,height:32,alt:"Navigate to"})]},t)}))})]},t)}))})}function v(e){var t=e.title,n=e.icon,r=e.topMargin,o=void 0===r?0:r,i=e.children;return(0,u.jsxs)("div",{className:(0,l.A)(a.section,a.flexCol),style:{marginTop:o},children:[(0,u.jsxs)("div",{className:a.flexCenter,children:[(0,u.jsx)("div",{className:a.iconContainer,children:(0,u.jsx)("img",{src:"/svg/polygon-"+n+".svg",width:160,height:160,alt:n})}),(0,u.jsx)("h2",{children:t})]}),i]})}function k(){var e,t=(0,r.useState)("All"),n=t[0],o=t[1],i=(0,r.useState)([]),d=i[0],g=i[1],b=(0,r.useState)([]),f=b[0],m=b[1];return(0,r.useEffect)((function(){var e=[];p.Y.forEach((function(t){t.tags.forEach((function(t){e.includes(t)||e.push(t)}))})),g(e)}),[p.Y]),(0,r.useEffect)((function(){m("All"===n?p.Y:p.Y.filter((function(e){return e.tags.includes(n)})))}),[n,p.Y]),(0,u.jsxs)(v,{title:"Wallets",icon:"wallet",children:[(0,u.jsxs)("div",{style:{minHeight:170},className:(0,l.A)(a.flexCol,a.noGap),children:[(0,u.jsxs)("div",{className:a.filters,children:[(0,u.jsx)("button",{className:(0,l.A)(a.tag,(e={},e[a.activeTag]="All"===n,e)),onClick:function(){return o("All")},children:"All Wallets"}),d.map((function(e,t){var r;return(0,u.jsx)("button",{className:(0,l.A)(a.tag,(r={},r[a.activeTag]=n===e,r)),onClick:function(){return o(e)},children:e},t)}))]}),(0,u.jsx)(s.A,{topMargin:0,colNum:[4,2,2,2],gap:20,children:f.map((function(e,t){return(0,u.jsx)(c.A,{title:e.title,href:e.href,tags:e.tags,size:"small"},t)}))})]}),(0,u.jsx)(h.A,{to:"/docs/wallets",children:"View wallets \u2192"})]})}function x(){return(0,u.jsxs)(v,{title:"Dev Tools",icon:"tool",children:[(0,u.jsxs)(s.A,{topMargin:0,gap:0,colNum:[2,1,1,1],children:[(0,u.jsxs)("div",{className:a.column,children:[(0,u.jsx)("div",{className:(0,l.A)(a.columnHeader,a.cell),children:"Development & Deployment"}),(0,u.jsx)("div",{className:a.flexWrap,children:d.devToolSectionContents.filter((function(e){return"Development & Deployment"===e.category})).map((function(e,t){return(0,u.jsx)(h.A,{href:e.href,target:"_blank",rel:"noopener noreferrer",className:a.cell,children:e.title},t)}))})]}),(0,u.jsxs)("div",{className:a.column,children:[(0,u.jsx)("div",{className:(0,l.A)(a.columnHeader,a.cell),children:"Utilities & Testing"}),(0,u.jsx)("div",{className:a.flexWrap,children:d.devToolSectionContents.filter((function(e){return"Utilities & Testing"===e.category})).map((function(e,t){return(0,u.jsx)(h.A,{href:e.href,target:"_blank",rel:"noopener noreferrer",className:a.cell,children:e.title},t)}))})]})]}),(0,u.jsx)(h.A,{to:"/docs/getting-started/devtool",children:"View dev tools \u2192"})]})}function C(){var e=(0,r.useState)([]),t=e[0],n=e[1],o=(0,r.useState)(0),i=o[0],c=o[1],h=(0,r.useState)(0),d=h[0],p=h[1];(0,r.useEffect)((function(){function e(){p(window.innerWidth)}return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]);var f=d>=996?3:d>=769?2:1;(0,r.useEffect)((function(){var e=g.A.filter((function(e){return!e.tags.includes("Wallet")}));n(e)}),[]);var w=[];if(t&&t.length>0)for(var k=0;k0?e-1:t.length-1}))},className:a.arrowLeft,children:(0,u.jsx)("img",{src:"/svg/icon-chevron-right.svg",width:24,height:24,alt:"Previous"})}),(0,u.jsx)(m,{link:"/docs/ecosystem",children:"Explore all projects"}),(0,u.jsx)("button",{onClick:function(){c((function(e){return e+1{n.d(t,{A:()=>r});const r=[{title:".bit",description:"Cross-chain Web3 identities for you and your community",href:"https://did.id/",bannerSrc:".bit",tags:["DID"],links:[{label:"website",href:"https://did.id/"},{label:"github",href:"https://github.com/dotbitHQ"},{label:"doc",href:"https://www.notion.so/bit-Previously-DAS-5cea5b425b204679b8ef2855ed94b04d"}]},{title:"Omiga",description:"The 1st inscription protocol established on Nervos $CKB blockchain",href:"https://omiga.io/",bannerSrc:"omiga",tags:["Protocol","DApp"],links:[{label:"website",href:"https://omiga.io/"},{label:"doc",href:"https://docs.omiga.io/"}]},{title:"CoTA",description:"A layer-1.5 account based token protocol on Nervos CKB",href:"https://www.cotadev.io/",bannerSrc:"cota",tags:["Protocol","NFT"],links:[{label:"website",href:"https://www.cotadev.io/"},{label:"doc",href:"https://www.cotadev.io/docs/getting-started/overview"}]},{title:"RGB++",description:"An extended RGB protocol to manage state changes and transaction verification",href:"https://github.com/ckb-cell/RGBPlusPlus-design",bannerSrc:"rgb++",tags:["Protocol"],links:[{label:"github",href:"https://github.com/ckb-cell/RGBPlusPlus-design"},{label:"doc",href:"https://github.com/ckb-cell/RGBPlusPlus-design/blob/main/docs/light-paper-en.md"}]},{title:"Spore",description:"Craft, Secure, Distribute, and Monetize DOBs",href:"https://spore.pro/",bannerSrc:"spore",tags:["Protocol","DOB"],links:[{label:"website",href:"https://spore.pro/"},{label:"doc",href:"https://docs.spore.pro/"}]},{title:"Nervape",description:"A Metaverse with an ongoing Story and NFTs Shaped by the Community",href:"https://nervape.com/",bannerSrc:"nervape",tags:["NFT"],links:[{label:"website",href:"https://nervape.com/"},{label:"github",href:"https://github.com/nervape"},{label:"doc",href:"https://tourmaline-elderberry-f93.notion.site/Nervape-Community-Wiki-e46261f411ed42e19b859f48da06fe63"}]},{title:"JoyGift",description:"Sending crypto assets as gifts to your friends, communities, or users",href:"https://joygift.cc/",bannerSrc:"joygift",tags:["DApp"],links:[{label:"website",href:"https://joygift.cc/"}]},{title:"Philosopher's Stone",description:"On-Chain Gifting Platform powered by the Spore Protocol",href:"https://philosopherstone.xyz/",bannerSrc:"philosopherstone",tags:["DApp","DOB"],links:[{label:"website",href:"https://philosopherstone.xyz/"},{label:"github",href:"https://github.com/SpectreMercury/PhilosopherStone"}]},{title:"NFTnation",description:"Explore, buy and sell NFTs. By the community, for the community",href:"https://nft-nation.live/",bannerSrc:"nftnation",tags:["NFT"],links:[{label:"website",href:"https://nft-nation.live/"},{label:"doc",href:"https://nftnation.gitbook.io/nftnation-explained"}]},{title:"CKB Explorer",description:"A CKB Explorer built with React and Ruby on Rails",href:"https://explorer.nervos.org/",bannerSrc:"explorer",tags:["Explorer"],links:[{label:"website",href:"https://explorer.nervos.org/"},{label:"github",href:"https://github.com/nervosnetwork/ckb-explorer"}]},{title:"Nervos Scan",description:"A CKB Explorer produced with love by 7774.bit",href:"https://nervosscan.com/",bannerSrc:"nervosscan",tags:["Explorer"],links:[{label:"website",href:"https://nervosscan.com/"}]},{title:"Neuron",description:"A versatile desktop wallet designed for securely managing CKB assets",href:"https://github.com/nervosnetwork/neuron/releases/tag/v0.114.2",bannerSrc:"neuron",tags:["Wallet"],links:[{label:"website",href:"https://github.com/nervosnetwork/neuron/releases/tag/v0.114.2"}]},{title:"JoyID",description:"A web-based passwordless and mnemonic-free wallet solution",href:"https://joy.id/",bannerSrc:"joyid",tags:["Wallet"],links:[{label:"website",href:"https://joy.id/"},{label:"github",href:"https://github.com/nervina-labs?q=joyid"}]},{title:"CKBull",description:"A mobile wallet that allows you to access and manage your CKB",href:"https://ckbull.app/",bannerSrc:"ckbull",tags:["Wallet"],links:[{label:"website",href:"https://ckbull.app/"},{label:"doc",href:"https://www.notion.so/How-to-use-CKBull-wallet-89153cac673447b0bf827d1f6f7d151c?pvs=4"}]},{title:"imToken",description:"A built-in CKB wallet on mobile that enables users to safely send, receive and store CKB",href:"https://token.im/",bannerSrc:"imtoken",tags:["Wallet"],links:[{label:"website",href:"https://token.im/"},{label:"github",href:"https://github.com/consenlabs"},{label:"doc",href:"https://medium.com/imtoken/imtoken-2-5-0-now-with-nervos-tron-bch-ltc-support-14d7171ccf4"}]},{title:"SafePal",description:"A hardware wallet that supports both Nervos L1 CKB and L2 Godwoken",href:"https://www.safepal.com/",bannerSrc:"safepal",tags:["Wallet"],links:[{label:"website",href:"https://www.safepal.com/"},{label:"doc",href:"https://www.notion.so/How-to-add-send-Nervos-Chain-CKB-coin-with-SafePal-Hardware-Wallet-40da32d8f7074563859e9d08b585768e"}]},{title:"Ledger",description:"Provide secure hardware wallets for cryptocurrency storage and management",href:"https://www.ledger.com/",bannerSrc:"ledger",tags:["Wallet"],links:[{label:"website",href:"https://www.ledger.com/"},{label:"doc",href:"https://developers.ledger.com/docs/sections"}]},{title:"imKey",description:"Offer secure, user-friendly hardware wallets for digital asset protection",href:"https://imkey.im/",bannerSrc:"imkey",tags:["Wallet"],links:[{label:"website",href:"https://imkey.im/"}]},{title:"oneKey",description:"Offer secure hardware wallets with cross-platform apps for digital asset management",href:"https://onekey.so/",bannerSrc:"onekey",tags:["Wallet"],links:[{label:"website",href:"https://onekey.so/"},{label:"github",href:"https://github.com/OneKeyHQ/"},{label:"doc",href:"https://developer.onekey.so/"}]},{title:"ForceBridge",description:"A cross-chain interoperability bridge b/w Nervos and other blockchains",href:"https://forcebridge.com/",bannerSrc:"forcebridge",tags:["Bridge"],links:[{label:"website",href:"https://forcebridge.com/"},{label:"github",href:"https://github.com/nervosnetwork/force-bridge"},{label:"doc",href:"https://github.com/nervosnetwork/force-bridge/blob/main/docs/dapp-user-guide.md"}]},{title:"Godwoken Bridge",description:"A token bridge between CKB and Godwoken",href:"https://bridge.godwoken.io/",bannerSrc:"godwokenbridge",tags:["Bridge"],links:[{label:"website",href:"https://bridge.godwoken.io/"},{label:"github",href:"https://github.com/godwokenrises/light-godwoken/tree/develop/apps/godwoken-bridge"},{label:"doc",href:"https://docs.godwoken.io/"}]},{title:"Yokaiswap Bridge",description:"A cross-chain interoperability bridge b/w Nervos and other blockchains",href:"https://www.yokaiswap.com/bridge/",bannerSrc:"yokaiswap",tags:["Bridge"],links:[{label:"website",href:"https://www.yokaiswap.com/bridge/"},{label:"github",href:"https://github.com/yokaiswap"}]},{title:"Ankr",description:"The fastest, most reliable Web3 infrastructure",href:"https://www.ankr.com/",bannerSrc:"ankr",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.ankr.com/"},{label:"doc",href:"https://archive.nervos.org/blog/ankr-integrates-support-for-nervos-nodes"}]},{title:"Axon",description:"A L2 framework that unleashes the power of appchain future",href:"https://axonweb3.io/",bannerSrc:"axon",tags:["Tools & Infra"],links:[{label:"website",href:"https://axonweb3.io/"},{label:"github",href:"https://github.com/axonweb3/axon"},{label:"doc",href:"https://docs.axonweb3.io/"}]},{title:"BandProtocol",description:"A L2 framework that unleashes the power of appchain future",href:"https://www.bandprotocol.com/",bannerSrc:"bandprotocol",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.bandprotocol.com/"},{label:"github",href:"https://github.com/bandprotocol"},{label:"doc",href:"https://medium.com/bandprotocol/band-protocol-integrates-with-nervos-godwoken-361546e1091d"}]},{title:"DIA",description:"Provides fully customizable and transparent data feeds for smart contracts",href:"https://www.diadata.org/",bannerSrc:"dia",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.diadata.org/"},{label:"doc",href:"https://archive.nervos.org/blog/dia-deploys-oracles-onto-layer-2-bolstering-dev-resources"}]},{title:"Godwoken",description:"An EVM-compatible, L2 optimistic rollup solution built on Nervos L1",href:"https://www.godwoken.com/",bannerSrc:"godwoken",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.godwoken.com/"},{label:"github",href:"https://github.com/godwokenrises"},{label:"doc",href:"https://docs.godwoken.io/"}]},{title:"Khalani",description:"A decentralized infrastructure for collaborative solving in intent-driven applications",href:"https://khalani.network/",bannerSrc:"khalani",tags:["Tools & Infra"],links:[{label:"website",href:"https://khalani.network/"},{label:"doc",href:"https://blog.khalani.network/"}]},{title:"Perun",description:"A L2 solution enhancing efficiency with off-chain transaction capabilities",href:"https://perun.network/",bannerSrc:"perun",tags:["Tools & Infra"],links:[{label:"website",href:"https://perun.network/"},{label:"github",href:"https://github.com/perun-network/go-perun"}]},{title:"Unifra",description:"A leading L2 platform that provides open, reliable infrastructure services",href:"https://unifra.io/",bannerSrc:"unifra",tags:["Tools & Infra"],links:[{label:"website",href:"https://unifra.io/"}]}]},3298:(e,t,n)=>{n.d(t,{Y:()=>r});var r=[{title:"Neuron",href:"https://neuron.magickbase.com/",tags:["Desktop"]},{title:"JoyID",href:"https://joy.id/",tags:["Web-based"]},{title:"imToken",href:"https://token.im/ckb-wallet",tags:["Mobile"]},{title:"CKBull",href:"https://ckbull.app/#download",tags:["Mobile"]},{title:"SafePal",href:"https://blog.safepal.com/ckb/",tags:["Mobile","Hardware"]},{title:"Ledger",href:"https://www.ledger.com/",tags:["Hardware"]},{title:"imKey",href:"https://imkey.im/",tags:["Hardware"]},{title:"OneKey",href:"https://onekey.so/",tags:["Mobile","Desktop","Hardware"]}]},8803:(e,t,n)=>{n.d(t,{A:()=>i});n(6540);const r="layoutContainer_TJ5m";var o=n(4848);const i=function(e){var t=e.children,n=e.topMargin,i=void 0===n?16:n,s=e.colNum,l=void 0===s?[2,1,2,1]:s,a=e.gap,c=void 0===a?24:a;return(0,o.jsx)("div",{style:{marginTop:i+"px","--gap":c+"px","--columnL":l[0],"--columnM":l[1],"--columnS":l[2],"--columnXS":l[3]},className:r,children:t})}},9636:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(53),o=n(4783),i=n(975);const s={cardContainer:"cardContainer_xWMf",topContainer:"topContainer_SZLr",banner:"banner_LOnP",tagList:"tagList_EW4E",tag:"tag_QgTi",bottomContainer:"bottomContainer_TLG4",description:"description_qXLp",title:"title_ZEhm",links:"links_hvUO",iconContainer:"iconContainer_trI9"};var l=n(4848);function a(e){var t=e.title,n=e.description,a=e.href,c=e.bannerSrc,h=e.tags,d=e.links,p=e.className;return(0,l.jsxs)(o.A,{href:a,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(s.cardContainer,p),children:[(0,l.jsx)("div",{className:s.topContainer,children:(0,l.jsx)("img",{className:s.banner,alt:c,src:"/svg/banner-"+c+".svg"})}),(0,l.jsxs)("div",{className:s.bottomContainer,children:[(0,l.jsx)("h4",{className:s.title,children:t}),(0,l.jsx)("div",{className:s.tagList,children:h.map((function(e){return(0,l.jsx)("div",{className:s.tag,children:e})}))}),(0,l.jsx)("p",{className:s.description,children:n}),(0,l.jsx)("div",{className:s.links,children:d.map((function(e,t){return(0,l.jsx)(o.A,{className:s.iconContainer,href:e.link,target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)(i.A,{alt:e.label,width:24,height:24,sources:{light:"/svg/icon-"+e.label+"-light.svg",dark:"/svg/icon-"+e.label+"-dark.svg"}})},t)}))})]})]})}},7616:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(53),o=n(4783);const i={cardContainer:"cardContainer_bFxw",smallCard:"smallCard_LdEU",iconContainer:"iconContainer_ugFC",rightContainer:"rightContainer_OYxw",title:"title_MBOd",tags:"tags_mvis",tag:"tag_BvXz"};var s=n(4848);function l(e){var t,n=e.title,l=e.href,a=e.tags,c=e.size,h=void 0===c?"default":c,d=e.className,p=n.toLowerCase().replace(/\s+/g,""),g="default"===h?48:32;return(0,s.jsxs)(o.A,{href:l,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(i.cardContainer,(t={},t[i.smallCard]="small"===h,t),d),children:[(0,s.jsx)("div",{style:{width:g,height:g,minWidth:g},className:i.iconContainer,children:(0,s.jsx)("img",{alt:"logo of "+n,src:"/svg/logo-"+p+".svg",width:g,height:g})}),(0,s.jsxs)("div",{className:i.rightContainer,children:[(0,s.jsx)("div",{className:i.title,children:n}),"default"===h&&(0,s.jsx)("div",{className:i.tags,children:a.map((function(e,t){return(0,s.jsx)("p",{className:i.tag,children:e},t)}))})]})]})}},3246:(e,t,n)=>{n.r(t),n.d(t,{contactUsContents:()=>i,default:()=>s,devToolSectionContents:()=>o,homeCardContents:()=>r});var r=[{title:"Getting Started",links:[{label:"Dev Environment",link:"/docs/getting-started/dev-environment"},{label:"DApp Tutorials",link:"/docs/getting-started/transfer-ckb"},{label:"Scripts Tutorials",link:"/docs/Script/minimal-script"}],icon:"rocket"},{title:"Run a Node",links:[{label:"Run a Mainnet Node",link:"/docs/node/run-mainnet-node"},{label:"Run a Testnet Node",link:"/docs/node/run-testnet-node"},{label:"Run a Public RPC Node",link:"/docs/node/run-public-rpc-node"}],icon:"node"},{title:"Concepts",links:[{label:"Nervos Blockchain",link:"/docs/concepts/nervos-blockchain"},{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Tokenomics",link:"/docs/concepts/economics"}],icon:"concept"}],o=[{title:"Lumos",href:"https://github.com/ckb-js/lumos",category:"Development & Deployment"},{title:"CKB SDKs",href:"https://github.com/nervosnetwork/ckb-sdk-rust",category:"Development & Deployment"},{title:"CKB-CLI",href:"https://github.com/nervosnetwork/ckb-cli",category:"Development & Deployment"},{title:"OffCKB",href:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae",category:"Development & Deployment"},{title:"CKB Debugger",href:"https://github.com/nervosnetwork/ckb-standalone-debugger",category:"Utilities & Testing"},{title:"CKB Address",href:"https://ckb.tools/address",category:"Utilities & Testing"},{title:"Nervos Pudge Faucet",href:"https://faucet.nervos.org/",category:"Utilities & Testing"}],i=[{label:"github",link:"https://github.com/nervosnetwork"},{label:"discord",link:"https://discord.gg/nervosnetwork"},{label:"reddit",link:"https://www.reddit.com/r/NervosNetwork/"},{label:"nervostalk",link:"https://talk.nervos.org/"},{label:"telegram",link:"https://t.me/nervosnetwork"},{label:"twitter",link:"https://twitter.com/nervosnetwork"},{label:"medium",link:"https://medium.com/nervosnetwork"},{label:"youtube",link:"https://www.youtube.com/channel/UCONuJGdMzUY0Y6jrPBOzH7A"}];const s=function(){return null}},4230:(e,t,n)=>{n.r(t),n.d(t,{default:()=>A});var r=n(6540),o=n(8238);const i={homeLayout:"homeLayout_oJ9_",relative:"relative__ioB",header1:"header1_j8J6",header2:"header2_wAk7",description:"description_VY6t",titleBtm:"titleBtm_hmJU",flexCol:"flexCol_kTWC",sectionContainer:"sectionContainer_MnYH",textHighlight:"textHighlight_ic0t",ecoBG:"ecoBG_L0ih",updateBG:"updateBG_hYTi"};var s=n(8803),l=n(53);const a={section:"section_EoX_",flexCol:"flexCol_tfnz",noGap:"noGap_K3ND",flexCenter:"flexCenter_TPV4",flexBetween:"flexBetween_r7XD",flexWrap:"flexWrap_Xkc4",alignMiddle:"alignMiddle_d55x",iconContainer:"iconContainer_llIe",homeCard:"homeCard_D3Nk",sparkles:"sparkles_hA5k",cardTitle:"cardTitle_ISDw",cardLinks:"cardLinks_YmJh",borderBtm:"borderBtm_Jn7R",link:"link_ti35",line:"line_NhPR",filters:"filters_mmsw",tag:"tag_z3H5",activeTag:"activeTag_snzC",tableContainer:"tableContainer_FB7_",column:"column_yJgI",cell:"cell_LmdA",columnHeader:"columnHeader_UrkT",carouselContainer:"carouselContainer_oHO6",carouselController:"carouselController_p8da",arrowLeft:"arrowLeft_zS_K",arrowRight:"arrowRight_g8y1",illusContainer:"illusContainer_T7PL",leftContainer:"leftContainer_j1FY",description:"description_fg7L",contactSection:"contactSection_BYCv",contactTitle:"contactTitle_IS2E",icons:"icons_fP0E",iconBG:"iconBG_YI0d",devlogSection:"devlogSection_oy_p",solidBtn:"solidBtn_p_K8"};var c=n(7616),h=n(4783),d=n(3246),p=n(3298),g=n(8868),b=n(9636);const f={solidBtn:"solidBtn_xbIL"};var u=n(4848);function m(e){var t=e.link,n=e.internal,r=void 0===n||n,o=e.children,i=e.className;return r?(0,u.jsx)(h.A,{className:(0,l.A)(f.solidBtn,i),to:t,children:o}):(0,u.jsx)(h.A,{className:(0,l.A)(f.solidBtn,i),href:t,target:"_blank",rel:"noopener noreferrer",children:o})}function w(){return(0,u.jsx)(s.A,{colNum:[3,1,1,1],gap:40,children:d.homeCardContents.map((function(e,t){return(0,u.jsxs)("div",{className:(0,l.A)(a.homeCard,a.flexCol,a.section),children:[(0,u.jsx)("div",{className:a.sparkles,children:(0,u.jsx)("img",{src:"/svg/sparkles.svg",width:128,height:"auto",alt:"sparkles decoration"})}),(0,u.jsx)("div",{className:a.iconContainer,children:(0,u.jsx)("img",{src:"/svg/polygon-"+e.icon+".svg",width:160,height:160,alt:e.icon})}),(0,u.jsx)("h2",{className:a.cardTitle,children:e.title}),(0,u.jsx)("div",{className:a.cardLinks,children:e.links.map((function(e,t){return(0,u.jsxs)(h.A,{to:e.link,className:(0,l.A)(a.flexBetween,a.link,a.line,a.borderBtm),children:[e.label,(0,u.jsx)("img",{src:"/svg/icon-circle-arrow.svg",width:32,height:32,alt:"Navigate to"})]},t)}))})]},t)}))})}function v(e){var t=e.title,n=e.icon,r=e.topMargin,o=void 0===r?0:r,i=e.children;return(0,u.jsxs)("div",{className:(0,l.A)(a.section,a.flexCol),style:{marginTop:o},children:[(0,u.jsxs)("div",{className:a.flexCenter,children:[(0,u.jsx)("div",{className:a.iconContainer,children:(0,u.jsx)("img",{src:"/svg/polygon-"+n+".svg",width:160,height:160,alt:n})}),(0,u.jsx)("h2",{children:t})]}),i]})}function k(){var e,t=(0,r.useState)("All"),n=t[0],o=t[1],i=(0,r.useState)([]),d=i[0],g=i[1],b=(0,r.useState)([]),f=b[0],m=b[1];return(0,r.useEffect)((function(){var e=[];p.Y.forEach((function(t){t.tags.forEach((function(t){e.includes(t)||e.push(t)}))})),g(e)}),[p.Y]),(0,r.useEffect)((function(){m("All"===n?p.Y:p.Y.filter((function(e){return e.tags.includes(n)})))}),[n,p.Y]),(0,u.jsxs)(v,{title:"Wallets",icon:"wallet",children:[(0,u.jsxs)("div",{style:{minHeight:170},className:(0,l.A)(a.flexCol,a.noGap),children:[(0,u.jsxs)("div",{className:a.filters,children:[(0,u.jsx)("button",{className:(0,l.A)(a.tag,(e={},e[a.activeTag]="All"===n,e)),onClick:function(){return o("All")},children:"All Wallets"}),d.map((function(e,t){var r;return(0,u.jsx)("button",{className:(0,l.A)(a.tag,(r={},r[a.activeTag]=n===e,r)),onClick:function(){return o(e)},children:e},t)}))]}),(0,u.jsx)(s.A,{topMargin:0,colNum:[4,2,2,2],gap:20,children:f.map((function(e,t){return(0,u.jsx)(c.A,{title:e.title,href:e.href,tags:e.tags,size:"small"},t)}))})]}),(0,u.jsx)(h.A,{to:"/docs/wallets",children:"View wallets \u2192"})]})}function x(){return(0,u.jsxs)(v,{title:"Dev Tools",icon:"tool",children:[(0,u.jsxs)(s.A,{topMargin:0,gap:0,colNum:[2,1,1,1],children:[(0,u.jsxs)("div",{className:a.column,children:[(0,u.jsx)("div",{className:(0,l.A)(a.columnHeader,a.cell),children:"Development & Deployment"}),(0,u.jsx)("div",{className:a.flexWrap,children:d.devToolSectionContents.filter((function(e){return"Development & Deployment"===e.category})).map((function(e,t){return(0,u.jsx)(h.A,{href:e.href,target:"_blank",rel:"noopener noreferrer",className:a.cell,children:e.title},t)}))})]}),(0,u.jsxs)("div",{className:a.column,children:[(0,u.jsx)("div",{className:(0,l.A)(a.columnHeader,a.cell),children:"Utilities & Testing"}),(0,u.jsx)("div",{className:a.flexWrap,children:d.devToolSectionContents.filter((function(e){return"Utilities & Testing"===e.category})).map((function(e,t){return(0,u.jsx)(h.A,{href:e.href,target:"_blank",rel:"noopener noreferrer",className:a.cell,children:e.title},t)}))})]})]}),(0,u.jsx)(h.A,{to:"/docs/getting-started/devtool",children:"View dev tools \u2192"})]})}function C(){var e=(0,r.useState)([]),t=e[0],n=e[1],o=(0,r.useState)(0),i=o[0],c=o[1],h=(0,r.useState)(0),d=h[0],p=h[1];(0,r.useEffect)((function(){function e(){p(window.innerWidth)}return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]);var f=d>=996?3:d>=769?2:1;(0,r.useEffect)((function(){var e=g.A.filter((function(e){return!e.tags.includes("Wallet")}));n(e)}),[]);var w=[];if(t&&t.length>0)for(var k=0;k0?e-1:t.length-1}))},className:a.arrowLeft,children:(0,u.jsx)("img",{src:"/svg/icon-chevron-right.svg",width:24,height:24,alt:"Previous"})}),(0,u.jsx)(m,{link:"/docs/ecosystem",children:"Explore all projects"}),(0,u.jsx)("button",{onClick:function(){c((function(e){return e+1{t.d(n,{Ay:()=>i});var s=t(4848),r=t(8453);function a(e){const n={a:"a",code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"So now your app works great on the local blockchain, you might want to switch it to different environments like Testnet and Mainnet."}),"\n",(0,s.jsx)(n.p,{children:"To do this, you need to update the chain config and related code."}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"ckb.ts"})," in your project root dir, change the ",(0,s.jsx)(n.code,{children:"lumosConfig"})," and ",(0,s.jsx)(n.code,{children:"CKB_RPC_URL"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"//export const lumosConfig: config.Config = devConfig as config.Config;\nexport const lumosConfig = config.predefined.AGGRON4 as config.Config;\n\n//export const CKB_RPC_URL = 'http://localhost:8114';\nexport const CKB_RPC_URL = \"https://testnet.ckb.dev/rpc\";\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Actually, we have the corresponding Testnet version examples for all these tutorials. The source code of the Testnet version is in ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples",children:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples"}),", you can clone the repo and start running on Testnet."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/docs.nervos.org.git\ncd docs.nervos.org/examples/\nyarn && yarn start\n"})}),"\n",(0,s.jsxs)(n.p,{children:["For more details, check out the ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/blob/develop/examples/simple-transfer/README.md",children:"README.md"}),";"]})]})}function i(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1922:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>f,contentTitle:()=>h,default:()=>m,frontMatter:()=>u,metadata:()=>p,toc:()=>g});var s=t(4848),r=t(8453),a=t(9489),i=t(7227),o=t(8652),l=t(9735),c=t(2861),d=t(7152);const u={id:"write-message",title:"Tutorial: Write a Message",sidebar_position:3},h="Write an On-Chain Message",p={id:"getting-started/write-message",title:"Tutorial: Write a Message",description:"\n"})}),"\n",(0,s.jsxs)(n.p,{children:["When prompted to select a dApp template, use your arrow keys to select ",(0,s.jsx)(n.strong,{children:"Write an On-Chain Message"})," for this tutorial."]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(i.A,{value:"offckb-init",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:"{3}",children:"? Select a dApp template (Use arrow keys)\n View and Transfer a CKB Balance\n> Write an On-Chain Message\n Create a Fungible Token\n Create a Digital Object Using Spore Protocol\nA simple dApp to store & retrieve data from a Cell\n"})})}),(0,s.jsx)(i.A,{value:"offckb-init-result",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"init CKB dApp project: /Users/ckb/Desktop/offckb/\n\u2728 Done in 2.52s.\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"step-2-start-the-devnet",children:"Step 2: Start the Devnet"}),"\n",(0,s.jsx)(c.A,{imageSrc:"img/dapps/write-message-dapp.jpg"}),"\n",(0,s.jsx)(n.h2,{id:"behind-the-scene",children:"Behind the Scene"}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"lib.ts"})," file in your project, it lists all the important functions that do the most of work for the project."]}),"\n",(0,s.jsx)(n.h3,{id:"encode--decode-message",children:"Encode & Decode Message"}),"\n",(0,s.jsx)(n.p,{children:"Since Cell's data field can store any type of data, we need to design our encoding and decoding method for the message we want to read and write on-chain."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'export function utf8ToHex(utf8String: string): string {\n const encoder = new TextEncoder();\n const uint8Array = encoder.encode(utf8String);\n return (\n "0x" +\n Array.prototype.map\n .call(uint8Array, (byte: number) => {\n return ("0" + (byte & 0xff).toString(16)).slice(-2);\n })\n .join("")\n );\n}\n\nexport function hexToUtf8(hexString: string): string {\n const decoder = new TextDecoder("utf-8");\n const uint8Array = new Uint8Array(\n hexString.match(/[\\da-f]{2}/gi)!.map((h) => parseInt(h, 16))\n );\n return decoder.decode(uint8Array);\n}\n'})}),"\n",(0,s.jsx)(n.h3,{id:"build-transaction",children:"Build Transaction"}),"\n",(0,s.jsxs)(n.p,{children:["Now, check out the core function ",(0,s.jsx)(n.code,{children:"buildMessageTx"}),". It requires two parameters:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Private Key"}),": Your private key, used for transaction authorization."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Message"}),": The message you want to write into the Cell."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The function then constructs a transaction to create a new Cell that incorporates the specified message in the data field"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"export async function buildMessageTx(\n onChainMemo: string,\n privateKey: string\n): Promise {\n...\n}\n"})}),"\n",(0,s.jsx)(n.p,{children:"As always, we first create a transaction skeleton:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"let txSkeleton = helpers.TransactionSkeleton({});\n"})}),"\n",(0,s.jsx)(n.p,{children:"Then we build the output Cell to store the message data by putting the hex format of the text message into the data field of the output Cell:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const fromAccount = generateAccountFromPrivateKey(privateKey);\nconst onChainMemoHex: HexString = utf8ToHex(onChainMemo);\n\nconst messageOutput: Cell = {\n cellOutput: {\n lock: fromAccount.lockScript,\n capacity: "0x0",\n },\n data: onChainMemoHex,\n};\nconst minimalCapacity = helpers.minimalCellCapacity(messageOutput);\nmessageOutput.cellOutput.capacity = BI.from(minimalCapacity).toHexString();\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Notice that we need to make sure the data stored in the Cell won't overflow the total size of the Cell's capacity. That's why we construct the content of the Cell and then use ",(0,s.jsx)(n.code,{children:"helpers.minimalCellCapacity"})," to determine how much space we need for this Cell."]}),"\n",(0,s.jsx)(n.p,{children:"Next, we add some transaction fees and calculate the total capacities we need and start collecting the input Cells:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const neededCapacity = BI.from(minimalCapacity).add(100000);\nlet collectedSum = BI.from(0);\nconst collected: Cell[] = [];\nconst collector = indexer.collector({\n lock: fromAccount.lockScript,\n type: "empty",\n // filter Cells by output data len range, [inclusive, exclusive)\n // data length range: [0, 1), which means the data length is 0\n outputDataLenRange: ["0x0", "0x1"],\n});\nfor await (const cell of collector.collect()) {\n collectedSum = collectedSum.add(cell.cellOutput.capacity);\n collected.push(cell);\n if (collectedSum >= neededCapacity) break;\n}\nif (collectedSum.lt(neededCapacity)) {\n throw new Error(`Not enough CKB, ${collectedSum} < ${neededCapacity}`);\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Remember to build the change output Cell to save our capacities:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const changeOutput: Cell = {\n cellOutput: {\n capacity: collectedSum.sub(neededCapacity).toHexString(),\n lock: fromAccount.lockScript,\n },\n data: "0x",\n};\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The next steps are just similar with the ",(0,s.jsx)(n.code,{children:"view-and-transfer-balance"})," example. We build the ",(0,s.jsx)(n.code,{children:"witnessArgs"})," for the transaction's witness and putting the signature in the witnessArgs:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const firstIndex = txSkeleton\n .get("inputs")\n .findIndex((input) =>\n new ScriptValue(input.cellOutput.lock, { validate: false }).equals(\n new ScriptValue(fromAccount.lockScript, { validate: false })\n )\n );\nif (firstIndex !== -1) {\n while (firstIndex >= txSkeleton.get("witnesses").size) {\n txSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.push("0x")\n );\n }\n let witness: string = txSkeleton.get("witnesses").get(firstIndex)!;\n const newWitnessArgs: WitnessArgs = {\n /* 65-byte zeros in hex */\n lock: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n };\n if (witness !== "0x") {\n const witnessArgs = blockchain.WitnessArgs.unpack(bytes.bytify(witness));\n const lock = witnessArgs.lock;\n if (\n !!lock &&\n !!newWitnessArgs.lock &&\n !bytes.equal(lock, newWitnessArgs.lock)\n ) {\n throw new Error(\n "Lock field in first witness is set aside for signature!"\n );\n }\n const inputType = witnessArgs.inputType;\n if (inputType) {\n newWitnessArgs.inputType = inputType;\n }\n const outputType = witnessArgs.outputType;\n if (outputType) {\n newWitnessArgs.outputType = outputType;\n }\n }\n witness = bytes.hexify(blockchain.WitnessArgs.pack(newWitnessArgs));\n txSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.set(firstIndex, witness)\n );\n}\ntxSkeleton = commons.common.prepareSigningEntries(txSkeleton);\nconst message = txSkeleton.get("signingEntries").get(0)!.message;\nconst Sig = hd.key.signRecoverable(message!, privateKey);\nconst tx = helpers.sealTransaction(txSkeleton, [Sig]);\n'})}),"\n",(0,s.jsx)(n.p,{children:"Lastly, we broadcast the transaction to the blockchain network through rpc:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const txHash = await rpc.sendTransaction(tx, "passthrough");\n'})}),"\n",(0,s.jsx)(n.p,{children:"Therefore, the message is successfully stored on a Cell and lives in the blockchain."}),"\n",(0,s.jsx)(n.h3,{id:"read-cell-messages",children:"Read Cell Messages"}),"\n",(0,s.jsxs)(n.p,{children:["To read the message we stored on-chain, we need to retrieve the ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#live-cell",children:"Live Cell"})," we just produced, read the data field from the Cell and decode the message back to the text format."]}),"\n",(0,s.jsxs)(n.p,{children:["To retrieve a specific Live Cell, we use the RPC method ",(0,s.jsx)(n.code,{children:"getLiveCell"})," with ",(0,s.jsx)(n.code,{children:"OutPoint"})," parameters:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"txHash"}),": The transaction hash from which the Cell originated."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"output Cell index"}),": The position index of the Cell within the transaction's outputs."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Given a specific transaction hash, we can locate the output Cells of the transaction. By knowing the position index of the Cell, we can find out the specific one."}),"\n",(0,s.jsxs)(n.p,{children:["For the way we built the transaction, we know that the Live Cell that carries the message is always the first one of the output Cells. So we set ",(0,s.jsx)(n.code,{children:'index = "0x0"'})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'export async function readOnChainMessage(txHash: string, index = "0x0") {\n const { cell } = await rpc.getLiveCell({ txHash, index }, true);\n if (cell == null) {\n return alert("Cell not found, please retry later");\n }\n const data = cell.data.content;\n const msg = hexToUtf8(data);\n alert("read msg: " + msg);\n return msg;\n}\n'})}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,s.jsx)(n.p,{children:"By following this tutorial this far, you have mastered how storing data on Cells works on CKB. Here's a quick recap:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["We can store arbitrary data in the ",(0,s.jsx)(n.code,{children:"data"})," field of Cell."]}),"\n",(0,s.jsx)(n.li,{children:"We need a way to encode and decode our data for understanding and using our raw on-chain data later."}),"\n",(0,s.jsxs)(n.li,{children:["To read the storing data, we need to locate the Live Cell that we put our data in. This can be done by querying Cells meets our requirement or by getting the Cell directly with a known ",(0,s.jsx)(n.code,{children:"OutPoint"})," through RPC."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"next-step",children:"Next Step"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsx)(n.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["CKB transaction structure: ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,s.jsxs)(n.li,{children:["CKB data structure basics: ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}},2861:(e,n,t)=>{t.d(n,{A:()=>p});var s=t(6540),r=t(4848),a=t(8453),i=t(9489),o=t(7227);const l={imgContainer:"imgContainer_VuXx"};function c(e){var n=e.alt,t=e.src;return(0,r.jsx)("div",{className:l.imgContainer,children:(0,r.jsx)("img",{alt:n,src:t})})}var d=t(8180);function u(e){const n={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"To interact with the dApp, you need to have your Devnet running. Open one terminal and start the Devnet:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"offckb-node",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb node\n"})})}),(0,r.jsx)(o.A,{value:"offckb-node-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:"You might want to check pre-funded accounts and copy private keys for later use. Open another terminal and execute:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"offckb-accounts",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb accounts\n"})})}),(0,r.jsx)(o.A,{value:"offckb-accounts-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Print account list, each account is funded with 42_000_000_00000000 capacity in the genesis block.\n[\n {\n privkey: '0x6109170b275a09ad54877b82f7d9930f88cab5717d484fb4741ae9d1dd078cd6',\n pubkey: '0x02025fa7b61b2365aa459807b84df065f1949d58c0ae590ff22dd2595157bffefa',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvwg2cen8extgq8s5puft8vf40px3f599cytcyd8',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n {\n privkey: '0x9f315d5a9618a39fdc487c7a67a8581d40b045bd7a42d83648ca80ef3b2cb4a1',\n pubkey: '0x026efa0579f09cc7c1129b78544f70098c90b2ab155c10746316f945829c034a2d',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt435c3epyrupszm7khk6weq5lrlyt52lg48ucew',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n #... \n]\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-3-run-the-example",children:"Step 3: Run the Example"}),"\n",(0,r.jsx)(n.p,{children:"Navigate to your project, install the node dependencies, and start running the example:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"offckb-yarn-start",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"cd && yarn && yarn start\n"})})}),(0,r.jsx)(o.A,{value:"offckb-yarn-start-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"$ parcel index.html\nServer running at http://localhost:1234\n\u2728 Built in 66ms\n"})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Now, the app is running in ",(0,r.jsx)(n.a,{href:"http://localhost:1234",children:"http://localhost:1234"})]}),"\n",(0,r.jsx)(c,{src:(0,d.A)(e.imageSrc)}),"\n",(0,r.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}const p=function(e){return(0,s.createElement)(h,e)}},9735:(e,n,t)=>{t.d(n,{Bo:()=>a,Hd:()=>l,bB:()=>o,pv:()=>i});var s=t(4783),r=t(4848),a={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"},{label:"Witness",link:"/docs/concepts/glossary#witness"},{label:"Signature",link:"/docs/concepts/glossary#cryptographic-signature"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},i={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Data",link:"/docs/concepts/glossary#data"},{label:"Transaction Hash",link:"/docs/concepts/glossary#transaction-hash"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},o={time:"5 - 10 min",topics:[{label:"UDT",link:"/docs/concepts/glossary#udt"},{label:"Fungible Token",link:"/docs/concepts/glossary#fungible-token"},{label:"xUDT",link:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},l={time:"5 - 10 min",topics:[{label:"DOB",link:"/docs/concepts/glossary#digital-object-dob"},{label:"NFT",link:"/docs/concepts/glossary#non-fungible-token"},{label:"Spore Protocol",link:"https://spore.pro"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]}},7227:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var s=t(8215);const r={tabItem:"tabItem_Ymn6"};var a=t(4848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,i),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>k});var s=t(6540),r=t(8215),a=t(4245),i=t(6347),o=t(6494),l=t(2814),c=t(5167),d=t(1269);function u(e){var n,t;return null!=(n=null==(t=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,a=(0,i.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:r});return[(0,l.aZ)(o),(0,s.useCallback)((function(e){if(o){var n=new URLSearchParams(a.location.search);n.set(o,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[o,a])]}function g(e){var n,t,r,a,i=e.defaultValue,l=e.queryString,c=void 0!==l&&l,u=e.groupId,g=h(e),x=(0,s.useState)((function(){return function(e){var n,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:i,tabValues:g})})),m=x[0],b=x[1],v=f({queryString:c,groupId:u}),j=v[0],w=v[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),r=t[0],a=t[1],[r,(0,s.useCallback)((function(e){n&&a.set(e)}),[n,a])]),y=k[0],C=k[1],A=function(){var e=null!=j?j:y;return p({value:e,tabValues:g})?e:null}();return(0,o.A)((function(){A&&b(A)}),[A]),{selectedValue:m,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),C(e)}),[w,C,g]),tabValues:g}}var x=t(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(4848);function v(e){var n=e.className,t=e.block,s=e.selectedValue,i=e.selectValue,o=e.tabValues,l=[],c=(0,a.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=l.indexOf(n),r=o[t].value;r!==s&&(c(n),i(r))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,r=l.indexOf(e.currentTarget)+1;t=null!=(s=l[r])?s:l[0];break;case"ArrowLeft":var a,i=l.indexOf(e.currentTarget)-1;t=null!=(a=l[i])?a:l[l.length-1]}null==(n=t)||n.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,a=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:d},a,{className:(0,r.A)("tabs__item",m.tabItem,null==a?void 0:a.className,{"tabs__item--active":s===n}),children:null!=t?t:n}),n)}))})}function j(e){var n=e.lazy,t=e.children,r=e.selectedValue,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var i=a.find((function(e){return e.props.value===r}));return i?(0,s.cloneElement)(i,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:a.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function w(e){var n=g(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,b.jsx)(v,Object.assign({},e,n)),(0,b.jsx)(j,Object.assign({},e,n))]})}function k(e){var n=(0,x.A)();return(0,b.jsx)(w,Object.assign({},e,{children:u(e.children)}),String(n))}},8652:(e,n,t)=>{t.d(n,{A:()=>o});var s=t(6540);const r={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var a=t(4783),i=t(4848);function o(e){var n=e.time,t=e.topics,o=e.tools;return(0,i.jsxs)("div",{className:r.box,children:[(0,i.jsx)("h4",{children:"Tutorial Overview"}),(0,i.jsxs)("div",{className:r.subsection,children:[(0,i.jsx)("strong",{children:"\u23f0 Estimated Time: "}),n]}),t&&(0,i.jsxs)("div",{className:r.subsection,children:[(0,i.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),t.map((function(e,n){return(0,i.jsxs)(s.Fragment,{children:[n>0&&", ",(0,i.jsx)(a.A,{href:e.link,children:e.label})]},n)}))]}),(0,i.jsx)("div",{className:r.subsection,children:(0,i.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,i.jsx)("ul",{className:r.toolList,children:o.map((function(e,n){return(0,i.jsx)("li",{children:e},n)}))})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(6540);const r={},a=s.createContext(r);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[31],{7152:(e,n,t)=>{t.d(n,{Ay:()=>i});var s=t(4848),r=t(8453);function a(e){const n={a:"a",code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"So now your app works great on the local blockchain, you might want to switch it to different environments like Testnet and Mainnet."}),"\n",(0,s.jsx)(n.p,{children:"To do this, you need to update the chain config and related code."}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"ckb.ts"})," in your project root dir, change the ",(0,s.jsx)(n.code,{children:"lumosConfig"})," and ",(0,s.jsx)(n.code,{children:"CKB_RPC_URL"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"//export const lumosConfig: config.Config = devConfig as config.Config;\nexport const lumosConfig = config.predefined.AGGRON4 as config.Config;\n\n//export const CKB_RPC_URL = 'http://localhost:8114';\nexport const CKB_RPC_URL = \"https://testnet.ckb.dev/rpc\";\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Actually, we have the corresponding Testnet version examples for all these tutorials. The source code of the Testnet version is in ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples",children:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples"}),", you can clone the repo and start running on Testnet."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/docs.nervos.org.git\ncd docs.nervos.org/examples/\nyarn && yarn start\n"})}),"\n",(0,s.jsxs)(n.p,{children:["For more details, check out the ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/blob/develop/examples/simple-transfer/README.md",children:"README.md"}),";"]})]})}function i(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1922:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>f,contentTitle:()=>h,default:()=>m,frontMatter:()=>u,metadata:()=>p,toc:()=>g});var s=t(4848),r=t(8453),a=t(9489),i=t(7227),o=t(8652),l=t(9735),c=t(2861),d=t(7152);const u={id:"write-message",title:"Tutorial: Write a Message",sidebar_position:3},h="Write an On-Chain Message",p={id:"getting-started/write-message",title:"Tutorial: Write a Message",description:"\n"})}),"\n",(0,s.jsxs)(n.p,{children:["When prompted to select a dApp template, use your arrow keys to select ",(0,s.jsx)(n.strong,{children:"Write an On-Chain Message"})," for this tutorial."]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(i.A,{value:"offckb-init",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:"{3}",children:"? Select a dApp template (Use arrow keys)\n View and Transfer a CKB Balance\n> Write an On-Chain Message\n Create a Fungible Token\n Create a Digital Object Using Spore Protocol\nA simple dApp to store & retrieve data from a Cell\n"})})}),(0,s.jsx)(i.A,{value:"offckb-init-result",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"init CKB dApp project: /Users/ckb/Desktop/offckb/\n\u2728 Done in 2.52s.\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"step-2-start-the-devnet",children:"Step 2: Start the Devnet"}),"\n",(0,s.jsx)(c.A,{imageSrc:"img/dapps/write-message-dapp.jpg"}),"\n",(0,s.jsx)(n.h2,{id:"behind-the-scene",children:"Behind the Scene"}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"lib.ts"})," file in your project, it lists all the important functions that do the most of work for the project."]}),"\n",(0,s.jsx)(n.h3,{id:"encode--decode-message",children:"Encode & Decode Message"}),"\n",(0,s.jsx)(n.p,{children:"Since Cell's data field can store any type of data, we need to design our encoding and decoding method for the message we want to read and write on-chain."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'export function utf8ToHex(utf8String: string): string {\n const encoder = new TextEncoder();\n const uint8Array = encoder.encode(utf8String);\n return (\n "0x" +\n Array.prototype.map\n .call(uint8Array, (byte: number) => {\n return ("0" + (byte & 0xff).toString(16)).slice(-2);\n })\n .join("")\n );\n}\n\nexport function hexToUtf8(hexString: string): string {\n const decoder = new TextDecoder("utf-8");\n const uint8Array = new Uint8Array(\n hexString.match(/[\\da-f]{2}/gi)!.map((h) => parseInt(h, 16))\n );\n return decoder.decode(uint8Array);\n}\n'})}),"\n",(0,s.jsx)(n.h3,{id:"build-transaction",children:"Build Transaction"}),"\n",(0,s.jsxs)(n.p,{children:["Now, check out the core function ",(0,s.jsx)(n.code,{children:"buildMessageTx"}),". It requires two parameters:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Private Key"}),": Your private key, used for transaction authorization."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Message"}),": The message you want to write into the Cell."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The function then constructs a transaction to create a new Cell that incorporates the specified message in the data field"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"export async function buildMessageTx(\n onChainMemo: string,\n privateKey: string\n): Promise {\n...\n}\n"})}),"\n",(0,s.jsx)(n.p,{children:"As always, we first create a transaction skeleton:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"let txSkeleton = helpers.TransactionSkeleton({});\n"})}),"\n",(0,s.jsx)(n.p,{children:"Then we build the output Cell to store the message data by putting the hex format of the text message into the data field of the output Cell:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const fromAccount = generateAccountFromPrivateKey(privateKey);\nconst onChainMemoHex: HexString = utf8ToHex(onChainMemo);\n\nconst messageOutput: Cell = {\n cellOutput: {\n lock: fromAccount.lockScript,\n capacity: "0x0",\n },\n data: onChainMemoHex,\n};\nconst minimalCapacity = helpers.minimalCellCapacity(messageOutput);\nmessageOutput.cellOutput.capacity = BI.from(minimalCapacity).toHexString();\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Notice that we need to make sure the data stored in the Cell won't overflow the total size of the Cell's capacity. That's why we construct the content of the Cell and then use ",(0,s.jsx)(n.code,{children:"helpers.minimalCellCapacity"})," to determine how much space we need for this Cell."]}),"\n",(0,s.jsx)(n.p,{children:"Next, we add some transaction fees and calculate the total capacities we need and start collecting the input Cells:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const neededCapacity = BI.from(minimalCapacity).add(100000);\nlet collectedSum = BI.from(0);\nconst collected: Cell[] = [];\nconst collector = indexer.collector({\n lock: fromAccount.lockScript,\n type: "empty",\n // filter Cells by output data len range, [inclusive, exclusive)\n // data length range: [0, 1), which means the data length is 0\n outputDataLenRange: ["0x0", "0x1"],\n});\nfor await (const cell of collector.collect()) {\n collectedSum = collectedSum.add(cell.cellOutput.capacity);\n collected.push(cell);\n if (collectedSum >= neededCapacity) break;\n}\nif (collectedSum.lt(neededCapacity)) {\n throw new Error(`Not enough CKB, ${collectedSum} < ${neededCapacity}`);\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Remember to build the change output Cell to save our capacities:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const changeOutput: Cell = {\n cellOutput: {\n capacity: collectedSum.sub(neededCapacity).toHexString(),\n lock: fromAccount.lockScript,\n },\n data: "0x",\n};\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The next steps are just similar with the ",(0,s.jsx)(n.code,{children:"view-and-transfer-balance"})," example. We build the ",(0,s.jsx)(n.code,{children:"witnessArgs"})," for the transaction's witness and putting the signature in the witnessArgs:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const firstIndex = txSkeleton\n .get("inputs")\n .findIndex((input) =>\n new ScriptValue(input.cellOutput.lock, { validate: false }).equals(\n new ScriptValue(fromAccount.lockScript, { validate: false })\n )\n );\nif (firstIndex !== -1) {\n while (firstIndex >= txSkeleton.get("witnesses").size) {\n txSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.push("0x")\n );\n }\n let witness: string = txSkeleton.get("witnesses").get(firstIndex)!;\n const newWitnessArgs: WitnessArgs = {\n /* 65-byte zeros in hex */\n lock: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n };\n if (witness !== "0x") {\n const witnessArgs = blockchain.WitnessArgs.unpack(bytes.bytify(witness));\n const lock = witnessArgs.lock;\n if (\n !!lock &&\n !!newWitnessArgs.lock &&\n !bytes.equal(lock, newWitnessArgs.lock)\n ) {\n throw new Error(\n "Lock field in first witness is set aside for signature!"\n );\n }\n const inputType = witnessArgs.inputType;\n if (inputType) {\n newWitnessArgs.inputType = inputType;\n }\n const outputType = witnessArgs.outputType;\n if (outputType) {\n newWitnessArgs.outputType = outputType;\n }\n }\n witness = bytes.hexify(blockchain.WitnessArgs.pack(newWitnessArgs));\n txSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.set(firstIndex, witness)\n );\n}\ntxSkeleton = commons.common.prepareSigningEntries(txSkeleton);\nconst message = txSkeleton.get("signingEntries").get(0)!.message;\nconst Sig = hd.key.signRecoverable(message!, privateKey);\nconst tx = helpers.sealTransaction(txSkeleton, [Sig]);\n'})}),"\n",(0,s.jsx)(n.p,{children:"Lastly, we broadcast the transaction to the blockchain network through rpc:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const txHash = await rpc.sendTransaction(tx, "passthrough");\n'})}),"\n",(0,s.jsx)(n.p,{children:"Therefore, the message is successfully stored on a Cell and lives in the blockchain."}),"\n",(0,s.jsx)(n.h3,{id:"read-cell-messages",children:"Read Cell Messages"}),"\n",(0,s.jsxs)(n.p,{children:["To read the message we stored on-chain, we need to retrieve the ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#live-cell",children:"Live Cell"})," we just produced, read the data field from the Cell and decode the message back to the text format."]}),"\n",(0,s.jsxs)(n.p,{children:["To retrieve a specific Live Cell, we use the RPC method ",(0,s.jsx)(n.code,{children:"getLiveCell"})," with ",(0,s.jsx)(n.code,{children:"OutPoint"})," parameters:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"txHash"}),": The transaction hash from which the Cell originated."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"output Cell index"}),": The position index of the Cell within the transaction's outputs."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Given a specific transaction hash, we can locate the output Cells of the transaction. By knowing the position index of the Cell, we can find out the specific one."}),"\n",(0,s.jsxs)(n.p,{children:["For the way we built the transaction, we know that the Live Cell that carries the message is always the first one of the output Cells. So we set ",(0,s.jsx)(n.code,{children:'index = "0x0"'})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'export async function readOnChainMessage(txHash: string, index = "0x0") {\n const { cell } = await rpc.getLiveCell({ txHash, index }, true);\n if (cell == null) {\n return alert("Cell not found, please retry later");\n }\n const data = cell.data.content;\n const msg = hexToUtf8(data);\n alert("read msg: " + msg);\n return msg;\n}\n'})}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,s.jsx)(n.p,{children:"By following this tutorial this far, you have mastered how storing data on Cells works on CKB. Here's a quick recap:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["We can store arbitrary data in the ",(0,s.jsx)(n.code,{children:"data"})," field of Cell."]}),"\n",(0,s.jsx)(n.li,{children:"We need a way to encode and decode our data for understanding and using our raw on-chain data later."}),"\n",(0,s.jsxs)(n.li,{children:["To read the storing data, we need to locate the Live Cell that we put our data in. This can be done by querying Cells meets our requirement or by getting the Cell directly with a known ",(0,s.jsx)(n.code,{children:"OutPoint"})," through RPC."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"next-step",children:"Next Step"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsx)(n.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["CKB transaction structure: ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,s.jsxs)(n.li,{children:["CKB data structure basics: ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}},2861:(e,n,t)=>{t.d(n,{A:()=>p});var s=t(6540),r=t(4848),a=t(8453),i=t(9489),o=t(7227);const l={imgContainer:"imgContainer_VuXx"};function c(e){var n=e.alt,t=e.src;return(0,r.jsx)("div",{className:l.imgContainer,children:(0,r.jsx)("img",{alt:n,src:t})})}var d=t(8180);function u(e){const n={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"To interact with the dApp, you need to have your Devnet running. Open one terminal and start the Devnet:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"offckb-node",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb node\n"})})}),(0,r.jsx)(o.A,{value:"offckb-node-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:"You might want to check pre-funded accounts and copy private keys for later use. Open another terminal and execute:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"offckb-accounts",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb accounts\n"})})}),(0,r.jsx)(o.A,{value:"offckb-accounts-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Print account list, each account is funded with 42_000_000_00000000 capacity in the genesis block.\n[\n {\n privkey: '0x6109170b275a09ad54877b82f7d9930f88cab5717d484fb4741ae9d1dd078cd6',\n pubkey: '0x02025fa7b61b2365aa459807b84df065f1949d58c0ae590ff22dd2595157bffefa',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvwg2cen8extgq8s5puft8vf40px3f599cytcyd8',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n {\n privkey: '0x9f315d5a9618a39fdc487c7a67a8581d40b045bd7a42d83648ca80ef3b2cb4a1',\n pubkey: '0x026efa0579f09cc7c1129b78544f70098c90b2ab155c10746316f945829c034a2d',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt435c3epyrupszm7khk6weq5lrlyt52lg48ucew',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n #... \n]\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-3-run-the-example",children:"Step 3: Run the Example"}),"\n",(0,r.jsx)(n.p,{children:"Navigate to your project, install the node dependencies, and start running the example:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"offckb-yarn-start",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"cd && yarn && yarn start\n"})})}),(0,r.jsx)(o.A,{value:"offckb-yarn-start-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"$ parcel index.html\nServer running at http://localhost:1234\n\u2728 Built in 66ms\n"})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Now, the app is running in ",(0,r.jsx)(n.a,{href:"http://localhost:1234",children:"http://localhost:1234"})]}),"\n",(0,r.jsx)(c,{src:(0,d.A)(e.imageSrc)}),"\n",(0,r.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}const p=function(e){return(0,s.createElement)(h,e)}},9735:(e,n,t)=>{t.d(n,{Bo:()=>a,Hd:()=>l,bB:()=>o,pv:()=>i});var s=t(4783),r=t(4848),a={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"},{label:"Witness",link:"/docs/concepts/glossary#witness"},{label:"Signature",link:"/docs/concepts/glossary#cryptographic-signature"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},i={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Data",link:"/docs/concepts/glossary#data"},{label:"Transaction Hash",link:"/docs/concepts/glossary#transaction-hash"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},o={time:"5 - 10 min",topics:[{label:"UDT",link:"/docs/concepts/glossary#udt"},{label:"Fungible Token",link:"/docs/concepts/glossary#fungible-token"},{label:"xUDT",link:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},l={time:"5 - 10 min",topics:[{label:"DOB",link:"/docs/concepts/glossary#digital-object-dob"},{label:"NFT",link:"/docs/concepts/glossary#non-fungible-token"},{label:"Spore Protocol",link:"https://spore.pro"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]}},7227:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var s=t(8215);const r={tabItem:"tabItem_Ymn6"};var a=t(4848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,i),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>k});var s=t(6540),r=t(8215),a=t(4245),i=t(6347),o=t(6494),l=t(2814),c=t(5167),d=t(1269);function u(e){var n,t;return null!=(n=null==(t=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,a=(0,i.W6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:r});return[(0,l.aZ)(o),(0,s.useCallback)((function(e){if(o){var n=new URLSearchParams(a.location.search);n.set(o,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[o,a])]}function g(e){var n,t,r,a,i=e.defaultValue,l=e.queryString,c=void 0!==l&&l,u=e.groupId,g=h(e),x=(0,s.useState)((function(){return function(e){var n,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:i,tabValues:g})})),m=x[0],b=x[1],v=f({queryString:c,groupId:u}),j=v[0],w=v[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),r=t[0],a=t[1],[r,(0,s.useCallback)((function(e){n&&a.set(e)}),[n,a])]),y=k[0],C=k[1],A=function(){var e=null!=j?j:y;return p({value:e,tabValues:g})?e:null}();return(0,o.A)((function(){A&&b(A)}),[A]),{selectedValue:m,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),C(e)}),[w,C,g]),tabValues:g}}var x=t(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(4848);function v(e){var n=e.className,t=e.block,s=e.selectedValue,i=e.selectValue,o=e.tabValues,l=[],c=(0,a.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=l.indexOf(n),r=o[t].value;r!==s&&(c(n),i(r))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,r=l.indexOf(e.currentTarget)+1;t=null!=(s=l[r])?s:l[0];break;case"ArrowLeft":var a,i=l.indexOf(e.currentTarget)-1;t=null!=(a=l[i])?a:l[l.length-1]}null==(n=t)||n.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:o.map((function(e){var n=e.value,t=e.label,a=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:d},a,{className:(0,r.A)("tabs__item",m.tabItem,null==a?void 0:a.className,{"tabs__item--active":s===n}),children:null!=t?t:n}),n)}))})}function j(e){var n=e.lazy,t=e.children,r=e.selectedValue,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var i=a.find((function(e){return e.props.value===r}));return i?(0,s.cloneElement)(i,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:a.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function w(e){var n=g(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,b.jsx)(v,Object.assign({},e,n)),(0,b.jsx)(j,Object.assign({},e,n))]})}function k(e){var n=(0,x.A)();return(0,b.jsx)(w,Object.assign({},e,{children:u(e.children)}),String(n))}},8652:(e,n,t)=>{t.d(n,{A:()=>o});var s=t(6540);const r={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var a=t(4783),i=t(4848);function o(e){var n=e.time,t=e.topics,o=e.tools;return(0,i.jsxs)("div",{className:r.box,children:[(0,i.jsx)("h4",{children:"Tutorial Overview"}),(0,i.jsxs)("div",{className:r.subsection,children:[(0,i.jsx)("strong",{children:"\u23f0 Estimated Time: "}),n]}),t&&(0,i.jsxs)("div",{className:r.subsection,children:[(0,i.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),t.map((function(e,n){return(0,i.jsxs)(s.Fragment,{children:[n>0&&", ",(0,i.jsx)(a.A,{href:e.link,children:e.label})]},n)}))]}),(0,i.jsx)("div",{className:r.subsection,children:(0,i.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,i.jsx)("ul",{className:r.toolList,children:o.map((function(e,n){return(0,i.jsx)("li",{children:e},n)}))})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(6540);const r={},a=s.createContext(r);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/325ecf53.ee7cbd31.js b/assets/js/325ecf53.f35ec452.js similarity index 99% rename from assets/js/325ecf53.ee7cbd31.js rename to assets/js/325ecf53.f35ec452.js index 5247d7d14..c5662dc1f 100644 --- a/assets/js/325ecf53.ee7cbd31.js +++ b/assets/js/325ecf53.f35ec452.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[361],{5525:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>m,default:()=>w,frontMatter:()=>v,metadata:()=>f,toc:()=>k});var r=n(4848),i=n(8453),o=n(9489),a=n(7227),s=n(5333),l=n(8803);const c=function(e){var t=e.tutorialLink,n=e.tutorialTitle,i=e.iframeSrc;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,r.jsx)("p",{children:n}),(0,r.jsx)("a",{href:t,style:{fontWeight:600},children:"Full Tutorial \u2192"})]})," ",(0,r.jsx)("iframe",{src:i,style:{width:"100%",height:"600px",border:"0",borderRadius:"4px",overflow:"hidden"},title:n,allow:"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking",sandbox:"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"})]})};var u=n(53),d=n(4783);const p={cardContainer:"cardContainer_OeIU"};function h(e){var t=e.title,n=e.to,i=e.className;return(0,r.jsx)(d.A,{to:n,className:(0,u.A)(p.cardContainer,i),children:(0,r.jsx)("p",{className:p.description,children:t})})}var b=n(1681);const v={id:"getting-started",title:"Getting Started",sidebar_position:1},m="Getting Started",f={id:"getting-started/getting-started",title:"Getting Started",description:"Your go-to resources for dApp development on CKB.",source:"@site/docs/getting-started/getting-started.mdx",sourceDirName:"getting-started",slug:"/getting-started/",permalink:"/docs/getting-started/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/getting-started/getting-started.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:1,frontMatter:{id:"getting-started",title:"Getting Started",sidebar_position:1},sidebar:"tutorial",next:{title:"Dev Environment",permalink:"/docs/getting-started/dev-environment"}},g={},k=[{value:"Your go-to resources for dApp development on CKB.",id:"your-go-to-resources-for-dapp-development-on-ckb",level:4},{value:"Quick Setup with OffCKB",id:"quick-setup-with-offckb",level:2},{value:"Install",id:"install",level:3},{value:"Start the Devnet",id:"start-the-devnet",level:3},{value:"Tutorials",id:"tutorials",level:2},{value:"Note: Never use these address in production, or share your private key with anyone.",id:"note-never-use-these-address-in-production-or-share-your-private-key-with-anyone",level:5},{value:"Dev Tools",id:"dev-tools",level:2}];function x(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"getting-started",children:"Getting Started"}),"\n",(0,r.jsx)(t.h4,{id:"your-go-to-resources-for-dapp-development-on-ckb",children:"Your go-to resources for dApp development on CKB."}),"\n",(0,r.jsx)(t.h2,{id:"quick-setup-with-offckb",children:"Quick Setup with OffCKB"}),"\n",(0,r.jsxs)(t.p,{children:["You can set up your local development environment by installing ",(0,r.jsx)(t.a,{href:"https://www.npmjs.com/package/@offckb/cli",children:"@offckb/cli"}),". It provides a one-line command to start a Devnet, pre-funded test accounts\nand useful ",(0,r.jsx)(t.a,{href:"/docs/concepts/glossary#script",children:"Scripts (Smart Contracts)"})," like ",(0,r.jsx)(t.a,{href:"https://github.com/cryptape/omnilock",children:"Omnilock"})," and ",(0,r.jsx)(t.a,{href:"https://github.com/sporeprotocol/spore-contract",children:"Spore-contract"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"install",children:"Install"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"npm install -g @offckb/cli\n"})}),"\n",(0,r.jsx)(t.h3,{id:"start-the-devnet",children:"Start the Devnet"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(a.A,{value:"offckb-node",label:"Command",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"offckb node\n"})})}),(0,r.jsx)(a.A,{value:"offckb-node-result",label:"Response",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,r.jsxs)(t.p,{children:["While\xa0offckb\xa0offers a streamlined, one-line command to quickly start a Devnet, you can check out ",(0,r.jsx)(t.a,{href:"/docs/getting-started/dev-environment",children:"Custom Devnet Setup"})," for a more nuanced configuration."]}),"\n",(0,r.jsx)(t.h2,{id:"tutorials",children:"Tutorials"}),"\n",(0,r.jsx)(t.p,{children:"The examples below show in code how dApps interact with CKB Testnet scripts, along with detailed tutorials explaining how to custom/build these dApps on your local CKB dev blockchain."}),"\n",(0,r.jsx)(t.h5,{id:"note-never-use-these-address-in-production-or-share-your-private-key-with-anyone",children:"Note: Never use these address in production, or share your private key with anyone."}),"\n",(0,r.jsx)(o.A,{children:b.xI.map((({tabValue:e,label:t,tutorialTitle:n,tutorialLink:i,iframeSrc:o},s)=>(0,r.jsx)(a.A,{value:e,label:t,default:0===s,children:(0,r.jsx)(c,{tutorialTitle:n,tutorialLink:i,iframeSrc:o})})))}),"\n",(0,r.jsx)(t.h2,{id:"dev-tools",children:"Dev Tools"}),"\n",(0,r.jsx)(t.p,{children:"Tools tailored for dApp development to deployment on CKB."}),"\n",(0,r.jsxs)(l.A,{children:[b.lt.slice(0,3).map((({index:e,title:t,description:n,link:i,type:o,links:a})=>(0,r.jsx)(s.A,{title:t,description:n,link:i,internal:!1,type:o,links:a},e))),(0,r.jsx)(h,{title:b.mr,to:b.jr})]})]})}function w(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(x,{...e})}):x(e)}},1681:(e,t,n)=>{n.d(t,{jr:()=>a,lt:()=>r,mr:()=>o,xI:()=>i});var r=[{title:"Lumos",description:"A JavaScript/TypeScript framework to simplify the development of dApp",link:"https://github.com/ckb-js/lumos",type:"tool",links:[{label:"Github",link:"https://github.com/ckb-js/lumos"},{label:"Docs",link:"https://lumos-website.vercel.app/"}]},{title:"CKB SDKs",description:"Necessary functions available in various programming languages",link:"https://github.com/nervosnetwork/ckb-sdk-rust",type:"tool",links:[{label:"Rust",link:"https://github.com/nervosnetwork/ckb-sdk-rust"},{label:"Go",link:"https://github.com/nervosnetwork/ckb-sdk-go"},{label:"Java",link:"https://github.com/nervosnetwork/ckb-sdk-java"}]},{title:"CKB-CLI",description:"The command-line tool for direct interaction with the Nervos network",link:"https://github.com/nervosnetwork/ckb-cli",type:"tool",links:[{label:"Github",link:"https://github.com/nervosnetwork/ckb-cli"},{label:"Wiki",link:"https://github.com/nervosnetwork/ckb-cli/wiki/Tutorials"}]},{title:"OffCKB",description:"CKB local development network for your first try",link:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae",type:"tool",links:[{label:"Github",link:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae"}]},{title:"CKB-Debugger",description:"A standalone debugger enabling off-chain contract development",link:"https://github.com/nervosnetwork/ckb-standalone-debugger",type:"tool",links:[{label:"Github",link:"https://github.com/nervosnetwork/ckb-standalone-debugger"}]},{title:"CKB Address",description:"Convert and decode CKB addresses and generate private keys for development",link:"https://ckb.tools/address",type:"tool",links:[{label:"Website",link:"https://ckb.tools/address"},{label:"Github",link:"https://github.com/jordanmack/ckb-tools"}]},{title:"Nervos Pudge Faucet",description:"Claim CKBytes\xa0to use while developing and testing",link:"https://faucet.nervos.org/",type:"tool",links:[{label:"Website",link:"https://faucet.nervos.org/"},{label:"Github",link:"https://github.com/Magickbase/ckb-testnet-faucet"}]}],i=[{tabValue:"transfer-ckb",label:"Transfer CKB",tutorialTitle:"View and transfer CKB from one address to another.",tutorialLink:"/docs/getting-started/transfer-ckb",iframeSrc:"https://codesandbox.io/embed/58n9pq?view=preview&module=%2Flib.ts"},{tabValue:"write-message",label:"Write a Message",tutorialTitle:"Write 'Hello CKB!' to a CKB Cell and then retrieve it.",tutorialLink:"/docs/getting-started/write-message",iframeSrc:"https://codesandbox.io/embed/jsn25g?view=Editor+%2B+Preview&module=%2Flib.ts"},{tabValue:"create-token",label:"Create a Fungible Token",tutorialTitle:"Create, view, and transfer a custom token.",tutorialLink:"/docs/getting-started/create-token",iframeSrc:"https://codesandbox.io/embed/drlfr5?view=Editor+%2B+Preview&module=%2Flib.ts"},{tabValue:"create-dob",label:"Create a DOB",tutorialTitle:"Create a digital object using spore protocol.",tutorialLink:"/docs/getting-started/create-dob",iframeSrc:"https://codesandbox.io/embed/rmwshy?view=Editor+%2B+Preview&module=%2Flib.ts"}],o="More Dev Tools \u2192",a="/docs/getting-started/devtool"},7227:(e,t,n)=>{n.d(t,{A:()=>a});n(6540);var r=n(8215);const i={tabItem:"tabItem_Ymn6"};var o=n(4848);function a(e){var t=e.children,n=e.hidden,a=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,r.A)(i.tabItem,a),hidden:n,children:t})}},9489:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(6540),i=n(8215),o=n(4245),a=n(6347),s=n(6494),l=n(2814),c=n(5167),u=n(1269);function d(e){var t,n;return null!=(t=null==(n=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function p(e){var t=e.values,n=e.children;return(0,r.useMemo)((function(){var e=null!=t?t:function(e){return d(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.X)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function h(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function b(e){var t=e.queryString,n=void 0!==t&&t,i=e.groupId,o=(0,a.W6)(),s=function(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:n,groupId:i});return[(0,l.aZ)(s),(0,r.useCallback)((function(e){if(s){var t=new URLSearchParams(o.location.search);t.set(s,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[s,o])]}function v(e){var t,n,i,o,a=e.defaultValue,l=e.queryString,c=void 0!==l&&l,d=e.groupId,v=p(e),m=(0,r.useState)((function(){return function(e){var t,n=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var i=null!=(t=r.find((function(e){return e.default})))?t:r[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:a,tabValues:v})})),f=m[0],g=m[1],k=b({queryString:c,groupId:d}),x=k[0],w=k[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),n=(0,u.Dv)(t),i=n[0],o=n[1],[i,(0,r.useCallback)((function(e){t&&o.set(e)}),[t,o])]),y=j[0],C=j[1],A=function(){var e=null!=x?x:y;return h({value:e,tabValues:v})?e:null}();return(0,s.A)((function(){A&&g(A)}),[A]),{selectedValue:f,selectValue:(0,r.useCallback)((function(e){if(!h({value:e,tabValues:v}))throw new Error("Can't select invalid tab value="+e);g(e),w(e),C(e)}),[w,C,v]),tabValues:v}}var m=n(1062);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=n(4848);function k(e){var t=e.className,n=e.block,r=e.selectedValue,a=e.selectValue,s=e.tabValues,l=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,n=l.indexOf(t),i=s[n].value;i!==r&&(c(t),a(i))},d=function(e){var t,n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var r,i=l.indexOf(e.currentTarget)+1;n=null!=(r=l[i])?r:l[0];break;case"ArrowLeft":var o,a=l.indexOf(e.currentTarget)-1;n=null!=(o=l[a])?o:l[l.length-1]}null==(t=n)||t.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":n},t),children:s.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:function(e){return l.push(e)},onKeyDown:d,onClick:u},o,{className:(0,i.A)("tabs__item",f.tabItem,null==o?void 0:o.className,{"tabs__item--active":r===t}),children:null!=n?n:t}),t)}))})}function x(e){var t=e.lazy,n=e.children,i=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var a=o.find((function(e){return e.props.value===i}));return a?(0,r.cloneElement)(a,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==i})}))})}function w(e){var t=v(e);return(0,g.jsxs)("div",{className:(0,i.A)("tabs-container",f.tabList),children:[(0,g.jsx)(k,Object.assign({},e,t)),(0,g.jsx)(x,Object.assign({},e,t))]})}function j(e){var t=(0,m.A)();return(0,g.jsx)(w,Object.assign({},e,{children:d(e.children)}),String(t))}},5333:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(53),i=n(4783);const o={cardContainer:"cardContainer__ccT",iconContainer:"iconContainer_RJI0",rightContainer:"rightContainer_HZnY",title:"title_aezp",description:"description_jBtF",links:"links_KO_M"};var a=n(975),s=n(4848);function l(e){var t=e.title,n=e.description,a=e.link,l=e.type,u=e.links,d=e.internal,p=void 0===d||d,h=e.className,b={title:t,description:n,link:a,type:l,links:u,className:h};return p?(0,s.jsx)(i.A,{to:a,className:(0,r.A)(o.cardContainer,h),children:(0,s.jsx)(c,Object.assign({},b))}):(0,s.jsx)(i.A,{href:a,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(o.cardContainer,h),children:(0,s.jsx)(c,Object.assign({},b))})}function c(e){var t=e.title,n=e.description,r=e.type,l=e.links;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:o.iconContainer,children:(0,s.jsx)(a.A,{alt:r,sources:{light:"/svg/icon-"+r+"-light.svg",dark:"/svg/icon-"+r+"-dark.svg"}})}),(0,s.jsxs)("div",{className:o.rightContainer,children:[(0,s.jsx)("h4",{className:o.title,children:t}),l&&l.length>0&&(0,s.jsx)("div",{className:o.links,children:l.map((function(e,t){return(0,s.jsx)(i.A,{href:e.link,target:"_blank",rel:"noopener noreferrer",children:e.label},t)}))}),(0,s.jsx)("p",{className:o.description,children:n})]})]})}},8803:(e,t,n)=>{n.d(t,{A:()=>o});n(6540);const r="layoutContainer_TJ5m";var i=n(4848);const o=function(e){var t=e.children,n=e.topMargin,o=void 0===n?16:n,a=e.colNum,s=void 0===a?[2,1,2,1]:a,l=e.gap,c=void 0===l?24:l;return(0,i.jsx)("div",{style:{marginTop:o+"px","--gap":c+"px","--columnL":s[0],"--columnM":s[1],"--columnS":s[2],"--columnXS":s[3]},className:r,children:t})}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>s});var r=n(6540);const i={},o=r.createContext(i);function a(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[361],{5525:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>m,default:()=>w,frontMatter:()=>v,metadata:()=>f,toc:()=>k});var r=n(4848),i=n(8453),o=n(9489),a=n(7227),s=n(5333),l=n(8803);const c=function(e){var t=e.tutorialLink,n=e.tutorialTitle,i=e.iframeSrc;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,r.jsx)("p",{children:n}),(0,r.jsx)("a",{href:t,style:{fontWeight:600},children:"Full Tutorial \u2192"})]})," ",(0,r.jsx)("iframe",{src:i,style:{width:"100%",height:"600px",border:"0",borderRadius:"4px",overflow:"hidden"},title:n,allow:"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking",sandbox:"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"})]})};var u=n(53),d=n(4783);const p={cardContainer:"cardContainer_OeIU"};function h(e){var t=e.title,n=e.to,i=e.className;return(0,r.jsx)(d.A,{to:n,className:(0,u.A)(p.cardContainer,i),children:(0,r.jsx)("p",{className:p.description,children:t})})}var b=n(1681);const v={id:"getting-started",title:"Getting Started",sidebar_position:1},m="Getting Started",f={id:"getting-started/getting-started",title:"Getting Started",description:"Your go-to resources for dApp development on CKB.",source:"@site/docs/getting-started/getting-started.mdx",sourceDirName:"getting-started",slug:"/getting-started/",permalink:"/docs/getting-started/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/getting-started/getting-started.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:1,frontMatter:{id:"getting-started",title:"Getting Started",sidebar_position:1},sidebar:"tutorial",next:{title:"Dev Environment",permalink:"/docs/getting-started/dev-environment"}},g={},k=[{value:"Your go-to resources for dApp development on CKB.",id:"your-go-to-resources-for-dapp-development-on-ckb",level:4},{value:"Quick Setup with OffCKB",id:"quick-setup-with-offckb",level:2},{value:"Install",id:"install",level:3},{value:"Start the Devnet",id:"start-the-devnet",level:3},{value:"Tutorials",id:"tutorials",level:2},{value:"Note: Never use these address in production, or share your private key with anyone.",id:"note-never-use-these-address-in-production-or-share-your-private-key-with-anyone",level:5},{value:"Dev Tools",id:"dev-tools",level:2}];function x(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"getting-started",children:"Getting Started"}),"\n",(0,r.jsx)(t.h4,{id:"your-go-to-resources-for-dapp-development-on-ckb",children:"Your go-to resources for dApp development on CKB."}),"\n",(0,r.jsx)(t.h2,{id:"quick-setup-with-offckb",children:"Quick Setup with OffCKB"}),"\n",(0,r.jsxs)(t.p,{children:["You can set up your local development environment by installing ",(0,r.jsx)(t.a,{href:"https://www.npmjs.com/package/@offckb/cli",children:"@offckb/cli"}),". It provides a one-line command to start a Devnet, pre-funded test accounts\nand useful ",(0,r.jsx)(t.a,{href:"/docs/concepts/glossary#script",children:"Scripts (Smart Contracts)"})," like ",(0,r.jsx)(t.a,{href:"https://github.com/cryptape/omnilock",children:"Omnilock"})," and ",(0,r.jsx)(t.a,{href:"https://github.com/sporeprotocol/spore-contract",children:"Spore-contract"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"install",children:"Install"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"npm install -g @offckb/cli\n"})}),"\n",(0,r.jsx)(t.h3,{id:"start-the-devnet",children:"Start the Devnet"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(a.A,{value:"offckb-node",label:"Command",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"offckb node\n"})})}),(0,r.jsx)(a.A,{value:"offckb-node-result",label:"Response",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,r.jsxs)(t.p,{children:["While\xa0offckb\xa0offers a streamlined, one-line command to quickly start a Devnet, you can check out ",(0,r.jsx)(t.a,{href:"/docs/getting-started/dev-environment",children:"Custom Devnet Setup"})," for a more nuanced configuration."]}),"\n",(0,r.jsx)(t.h2,{id:"tutorials",children:"Tutorials"}),"\n",(0,r.jsx)(t.p,{children:"The examples below show in code how dApps interact with CKB Testnet scripts, along with detailed tutorials explaining how to custom/build these dApps on your local CKB dev blockchain."}),"\n",(0,r.jsx)(t.h5,{id:"note-never-use-these-address-in-production-or-share-your-private-key-with-anyone",children:"Note: Never use these address in production, or share your private key with anyone."}),"\n",(0,r.jsx)(o.A,{children:b.xI.map((({tabValue:e,label:t,tutorialTitle:n,tutorialLink:i,iframeSrc:o},s)=>(0,r.jsx)(a.A,{value:e,label:t,default:0===s,children:(0,r.jsx)(c,{tutorialTitle:n,tutorialLink:i,iframeSrc:o})})))}),"\n",(0,r.jsx)(t.h2,{id:"dev-tools",children:"Dev Tools"}),"\n",(0,r.jsx)(t.p,{children:"Tools tailored for dApp development to deployment on CKB."}),"\n",(0,r.jsxs)(l.A,{children:[b.lt.slice(0,3).map((({index:e,title:t,description:n,link:i,type:o,links:a})=>(0,r.jsx)(s.A,{title:t,description:n,link:i,internal:!1,type:o,links:a},e))),(0,r.jsx)(h,{title:b.mr,to:b.jr})]})]})}function w(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(x,{...e})}):x(e)}},1681:(e,t,n)=>{n.d(t,{jr:()=>a,lt:()=>r,mr:()=>o,xI:()=>i});var r=[{title:"Lumos",description:"A JavaScript/TypeScript framework to simplify the development of dApp",link:"https://github.com/ckb-js/lumos",type:"tool",links:[{label:"Github",link:"https://github.com/ckb-js/lumos"},{label:"Docs",link:"https://lumos-website.vercel.app/"}]},{title:"CKB SDKs",description:"Necessary functions available in various programming languages",link:"https://github.com/nervosnetwork/ckb-sdk-rust",type:"tool",links:[{label:"Rust",link:"https://github.com/nervosnetwork/ckb-sdk-rust"},{label:"Go",link:"https://github.com/nervosnetwork/ckb-sdk-go"},{label:"Java",link:"https://github.com/nervosnetwork/ckb-sdk-java"}]},{title:"CKB-CLI",description:"The command-line tool for direct interaction with the Nervos network",link:"https://github.com/nervosnetwork/ckb-cli",type:"tool",links:[{label:"Github",link:"https://github.com/nervosnetwork/ckb-cli"},{label:"Wiki",link:"https://github.com/nervosnetwork/ckb-cli/wiki/Tutorials"}]},{title:"OffCKB",description:"CKB local development network for your first try",link:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae",type:"tool",links:[{label:"Github",link:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae"}]},{title:"CKB-Debugger",description:"A standalone debugger enabling off-chain contract development",link:"https://github.com/nervosnetwork/ckb-standalone-debugger",type:"tool",links:[{label:"Github",link:"https://github.com/nervosnetwork/ckb-standalone-debugger"}]},{title:"CKB Address",description:"Convert and decode CKB addresses and generate private keys for development",link:"https://ckb.tools/address",type:"tool",links:[{label:"Website",link:"https://ckb.tools/address"},{label:"Github",link:"https://github.com/jordanmack/ckb-tools"}]},{title:"Nervos Pudge Faucet",description:"Claim CKBytes\xa0to use while developing and testing",link:"https://faucet.nervos.org/",type:"tool",links:[{label:"Website",link:"https://faucet.nervos.org/"},{label:"Github",link:"https://github.com/Magickbase/ckb-testnet-faucet"}]}],i=[{tabValue:"transfer-ckb",label:"Transfer CKB",tutorialTitle:"View and transfer CKB from one address to another.",tutorialLink:"/docs/getting-started/transfer-ckb",iframeSrc:"https://codesandbox.io/embed/58n9pq?view=preview&module=%2Flib.ts"},{tabValue:"write-message",label:"Write a Message",tutorialTitle:"Write 'Hello CKB!' to a CKB Cell and then retrieve it.",tutorialLink:"/docs/getting-started/write-message",iframeSrc:"https://codesandbox.io/embed/jsn25g?view=Editor+%2B+Preview&module=%2Flib.ts"},{tabValue:"create-token",label:"Create a Fungible Token",tutorialTitle:"Create, view, and transfer a custom token.",tutorialLink:"/docs/getting-started/create-token",iframeSrc:"https://codesandbox.io/embed/drlfr5?view=Editor+%2B+Preview&module=%2Flib.ts"},{tabValue:"create-dob",label:"Create a DOB",tutorialTitle:"Create a digital object using spore protocol.",tutorialLink:"/docs/getting-started/create-dob",iframeSrc:"https://codesandbox.io/embed/rmwshy?view=Editor+%2B+Preview&module=%2Flib.ts"}],o="More Dev Tools \u2192",a="/docs/getting-started/devtool"},7227:(e,t,n)=>{n.d(t,{A:()=>a});n(6540);var r=n(8215);const i={tabItem:"tabItem_Ymn6"};var o=n(4848);function a(e){var t=e.children,n=e.hidden,a=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,r.A)(i.tabItem,a),hidden:n,children:t})}},9489:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(6540),i=n(8215),o=n(4245),a=n(6347),s=n(6494),l=n(2814),c=n(5167),u=n(1269);function d(e){var t,n;return null!=(t=null==(n=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function p(e){var t=e.values,n=e.children;return(0,r.useMemo)((function(){var e=null!=t?t:function(e){return d(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.X)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function h(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function b(e){var t=e.queryString,n=void 0!==t&&t,i=e.groupId,o=(0,a.W6)(),s=function(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:n,groupId:i});return[(0,l.aZ)(s),(0,r.useCallback)((function(e){if(s){var t=new URLSearchParams(o.location.search);t.set(s,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[s,o])]}function v(e){var t,n,i,o,a=e.defaultValue,l=e.queryString,c=void 0!==l&&l,d=e.groupId,v=p(e),m=(0,r.useState)((function(){return function(e){var t,n=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var i=null!=(t=r.find((function(e){return e.default})))?t:r[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:a,tabValues:v})})),f=m[0],g=m[1],k=b({queryString:c,groupId:d}),x=k[0],w=k[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),n=(0,u.Dv)(t),i=n[0],o=n[1],[i,(0,r.useCallback)((function(e){t&&o.set(e)}),[t,o])]),y=j[0],C=j[1],A=function(){var e=null!=x?x:y;return h({value:e,tabValues:v})?e:null}();return(0,s.A)((function(){A&&g(A)}),[A]),{selectedValue:f,selectValue:(0,r.useCallback)((function(e){if(!h({value:e,tabValues:v}))throw new Error("Can't select invalid tab value="+e);g(e),w(e),C(e)}),[w,C,v]),tabValues:v}}var m=n(1062);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=n(4848);function k(e){var t=e.className,n=e.block,r=e.selectedValue,a=e.selectValue,s=e.tabValues,l=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,n=l.indexOf(t),i=s[n].value;i!==r&&(c(t),a(i))},d=function(e){var t,n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var r,i=l.indexOf(e.currentTarget)+1;n=null!=(r=l[i])?r:l[0];break;case"ArrowLeft":var o,a=l.indexOf(e.currentTarget)-1;n=null!=(o=l[a])?o:l[l.length-1]}null==(t=n)||t.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":n},t),children:s.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:function(e){return l.push(e)},onKeyDown:d,onClick:u},o,{className:(0,i.A)("tabs__item",f.tabItem,null==o?void 0:o.className,{"tabs__item--active":r===t}),children:null!=n?n:t}),t)}))})}function x(e){var t=e.lazy,n=e.children,i=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var a=o.find((function(e){return e.props.value===i}));return a?(0,r.cloneElement)(a,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==i})}))})}function w(e){var t=v(e);return(0,g.jsxs)("div",{className:(0,i.A)("tabs-container",f.tabList),children:[(0,g.jsx)(k,Object.assign({},e,t)),(0,g.jsx)(x,Object.assign({},e,t))]})}function j(e){var t=(0,m.A)();return(0,g.jsx)(w,Object.assign({},e,{children:d(e.children)}),String(t))}},5333:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(53),i=n(4783);const o={cardContainer:"cardContainer__ccT",iconContainer:"iconContainer_RJI0",rightContainer:"rightContainer_HZnY",title:"title_aezp",description:"description_jBtF",links:"links_KO_M"};var a=n(975),s=n(4848);function l(e){var t=e.title,n=e.description,a=e.link,l=e.type,u=e.links,d=e.internal,p=void 0===d||d,h=e.className,b={title:t,description:n,link:a,type:l,links:u,className:h};return p?(0,s.jsx)(i.A,{to:a,className:(0,r.A)(o.cardContainer,h),children:(0,s.jsx)(c,Object.assign({},b))}):(0,s.jsx)(i.A,{href:a,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(o.cardContainer,h),children:(0,s.jsx)(c,Object.assign({},b))})}function c(e){var t=e.title,n=e.description,r=e.type,l=e.links;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:o.iconContainer,children:(0,s.jsx)(a.A,{alt:r,sources:{light:"/svg/icon-"+r+"-light.svg",dark:"/svg/icon-"+r+"-dark.svg"}})}),(0,s.jsxs)("div",{className:o.rightContainer,children:[(0,s.jsx)("h4",{className:o.title,children:t}),l&&l.length>0&&(0,s.jsx)("div",{className:o.links,children:l.map((function(e,t){return(0,s.jsx)(i.A,{href:e.link,target:"_blank",rel:"noopener noreferrer",children:e.label},t)}))}),(0,s.jsx)("p",{className:o.description,children:n})]})]})}},8803:(e,t,n)=>{n.d(t,{A:()=>o});n(6540);const r="layoutContainer_TJ5m";var i=n(4848);const o=function(e){var t=e.children,n=e.topMargin,o=void 0===n?16:n,a=e.colNum,s=void 0===a?[2,1,2,1]:a,l=e.gap,c=void 0===l?24:l;return(0,i.jsx)("div",{style:{marginTop:o+"px","--gap":c+"px","--columnL":s[0],"--columnM":s[1],"--columnS":s[2],"--columnXS":s[3]},className:r,children:t})}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>s});var r=n(6540);const i={},o=r.createContext(i);function a(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/360db7ed.21077410.js b/assets/js/360db7ed.555a8f39.js similarity index 98% rename from assets/js/360db7ed.21077410.js rename to assets/js/360db7ed.555a8f39.js index c5601e136..cbee4fc4c 100644 --- a/assets/js/360db7ed.21077410.js +++ b/assets/js/360db7ed.555a8f39.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[854],{3386:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>p,contentTitle:()=>d,default:()=>k,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var o=i(4848),n=i(8453),s=i(5333),r=i(8803),l=i(1681);const a={id:"devtool",title:"Dev Tools",sidebar_position:7},d="Dev Tools",c={id:"getting-started/devtool",title:"Dev Tools",description:"Explore essential tools and resources tailored for development on Nervos CKB, designed to streamline your workflow from concept to deployment.",source:"@site/docs/getting-started/devtool.md",sourceDirName:"getting-started",slug:"/getting-started/devtool",permalink:"/docs/getting-started/devtool",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/getting-started/devtool.md",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:7,frontMatter:{id:"devtool",title:"Dev Tools",sidebar_position:7},sidebar:"tutorial",previous:{title:"Tutorial: Create a DOB",permalink:"/docs/getting-started/create-dob"},next:{title:"Scripts",permalink:"/docs/Script/"}},p={},u=[{value:"Development & Deployment",id:"development--deployment",level:2},{value:"Utilities & Testing",id:"utilities--testing",level:2}];function b(e){const t={h1:"h1",h2:"h2",p:"p",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"dev-tools",children:"Dev Tools"}),"\n",(0,o.jsx)(t.p,{children:"Explore essential tools and resources tailored for development on Nervos CKB, designed to streamline your workflow from concept to deployment."}),"\n",(0,o.jsx)(t.h2,{id:"development--deployment",children:"Development & Deployment"}),"\n",(0,o.jsx)(r.A,{children:l.lt.slice(0,4).map((({index:e,title:t,description:i,link:n,type:r,links:l})=>(0,o.jsx)(s.A,{title:t,description:i,link:n,internal:!1,type:r,links:l},e)))}),"\n",(0,o.jsx)(t.h2,{id:"utilities--testing",children:"Utilities & Testing"}),"\n",(0,o.jsx)(r.A,{children:l.lt.slice(4,7).map((({index:e,title:t,description:i,link:n,type:r,links:l})=>(0,o.jsx)(s.A,{title:t,description:i,link:n,internal:!1,type:r,links:l},e)))})]})}function k(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(b,{...e})}):b(e)}},1681:(e,t,i)=>{i.d(t,{jr:()=>r,lt:()=>o,mr:()=>s,xI:()=>n});var o=[{title:"Lumos",description:"A JavaScript/TypeScript framework to simplify the development of dApp",link:"https://github.com/ckb-js/lumos",type:"tool",links:[{label:"Github",link:"https://github.com/ckb-js/lumos"},{label:"Docs",link:"https://lumos-website.vercel.app/"}]},{title:"CKB SDKs",description:"Necessary functions available in various programming languages",link:"https://github.com/nervosnetwork/ckb-sdk-rust",type:"tool",links:[{label:"Rust",link:"https://github.com/nervosnetwork/ckb-sdk-rust"},{label:"Go",link:"https://github.com/nervosnetwork/ckb-sdk-go"},{label:"Java",link:"https://github.com/nervosnetwork/ckb-sdk-java"}]},{title:"CKB-CLI",description:"The command-line tool for direct interaction with the Nervos network",link:"https://github.com/nervosnetwork/ckb-cli",type:"tool",links:[{label:"Github",link:"https://github.com/nervosnetwork/ckb-cli"},{label:"Wiki",link:"https://github.com/nervosnetwork/ckb-cli/wiki/Tutorials"}]},{title:"OffCKB",description:"CKB local development network for your first try",link:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae",type:"tool",links:[{label:"Github",link:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae"}]},{title:"CKB-Debugger",description:"A standalone debugger enabling off-chain contract development",link:"https://github.com/nervosnetwork/ckb-standalone-debugger",type:"tool",links:[{label:"Github",link:"https://github.com/nervosnetwork/ckb-standalone-debugger"}]},{title:"CKB Address",description:"Convert and decode CKB addresses and generate private keys for development",link:"https://ckb.tools/address",type:"tool",links:[{label:"Website",link:"https://ckb.tools/address"},{label:"Github",link:"https://github.com/jordanmack/ckb-tools"}]},{title:"Nervos Pudge Faucet",description:"Claim CKBytes\xa0to use while developing and testing",link:"https://faucet.nervos.org/",type:"tool",links:[{label:"Website",link:"https://faucet.nervos.org/"},{label:"Github",link:"https://github.com/Magickbase/ckb-testnet-faucet"}]}],n=[{tabValue:"transfer-ckb",label:"Transfer CKB",tutorialTitle:"View and transfer CKB from one address to another.",tutorialLink:"/docs/getting-started/transfer-ckb",iframeSrc:"https://codesandbox.io/embed/58n9pq?view=preview&module=%2Flib.ts"},{tabValue:"write-message",label:"Write a Message",tutorialTitle:"Write 'Hello CKB!' to a CKB Cell and then retrieve it.",tutorialLink:"/docs/getting-started/write-message",iframeSrc:"https://codesandbox.io/embed/jsn25g?view=Editor+%2B+Preview&module=%2Flib.ts"},{tabValue:"create-token",label:"Create a Fungible Token",tutorialTitle:"Create, view, and transfer a custom token.",tutorialLink:"/docs/getting-started/create-token",iframeSrc:"https://codesandbox.io/embed/drlfr5?view=Editor+%2B+Preview&module=%2Flib.ts"},{tabValue:"create-dob",label:"Create a DOB",tutorialTitle:"Create a digital object using spore protocol.",tutorialLink:"/docs/getting-started/create-dob",iframeSrc:"https://codesandbox.io/embed/rmwshy?view=Editor+%2B+Preview&module=%2Flib.ts"}],s="More Dev Tools \u2192",r="/docs/getting-started/devtool"},5333:(e,t,i)=>{i.d(t,{A:()=>a});var o=i(53),n=i(4783);const s={cardContainer:"cardContainer__ccT",iconContainer:"iconContainer_RJI0",rightContainer:"rightContainer_HZnY",title:"title_aezp",description:"description_jBtF",links:"links_KO_M"};var r=i(975),l=i(4848);function a(e){var t=e.title,i=e.description,r=e.link,a=e.type,c=e.links,p=e.internal,u=void 0===p||p,b=e.className,k={title:t,description:i,link:r,type:a,links:c,className:b};return u?(0,l.jsx)(n.A,{to:r,className:(0,o.A)(s.cardContainer,b),children:(0,l.jsx)(d,Object.assign({},k))}):(0,l.jsx)(n.A,{href:r,target:"_blank",rel:"noopener noreferrer",className:(0,o.A)(s.cardContainer,b),children:(0,l.jsx)(d,Object.assign({},k))})}function d(e){var t=e.title,i=e.description,o=e.type,a=e.links;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:s.iconContainer,children:(0,l.jsx)(r.A,{alt:o,sources:{light:"/svg/icon-"+o+"-light.svg",dark:"/svg/icon-"+o+"-dark.svg"}})}),(0,l.jsxs)("div",{className:s.rightContainer,children:[(0,l.jsx)("h4",{className:s.title,children:t}),a&&a.length>0&&(0,l.jsx)("div",{className:s.links,children:a.map((function(e,t){return(0,l.jsx)(n.A,{href:e.link,target:"_blank",rel:"noopener noreferrer",children:e.label},t)}))}),(0,l.jsx)("p",{className:s.description,children:i})]})]})}},8803:(e,t,i)=>{i.d(t,{A:()=>s});i(6540);const o="layoutContainer_TJ5m";var n=i(4848);const s=function(e){var t=e.children,i=e.topMargin,s=void 0===i?16:i,r=e.colNum,l=void 0===r?[2,1,2,1]:r,a=e.gap,d=void 0===a?24:a;return(0,n.jsx)("div",{style:{marginTop:s+"px","--gap":d+"px","--columnL":l[0],"--columnM":l[1],"--columnS":l[2],"--columnXS":l[3]},className:o,children:t})}},8453:(e,t,i)=>{i.d(t,{R:()=>r,x:()=>l});var o=i(6540);const n={},s=o.createContext(n);function r(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[854],{3386:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>p,contentTitle:()=>d,default:()=>k,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var o=i(4848),n=i(8453),s=i(5333),r=i(8803),l=i(1681);const a={id:"devtool",title:"Dev Tools",sidebar_position:7},d="Dev Tools",c={id:"getting-started/devtool",title:"Dev Tools",description:"Explore essential tools and resources tailored for development on Nervos CKB, designed to streamline your workflow from concept to deployment.",source:"@site/docs/getting-started/devtool.md",sourceDirName:"getting-started",slug:"/getting-started/devtool",permalink:"/docs/getting-started/devtool",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/getting-started/devtool.md",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:7,frontMatter:{id:"devtool",title:"Dev Tools",sidebar_position:7},sidebar:"tutorial",previous:{title:"Tutorial: Create a DOB",permalink:"/docs/getting-started/create-dob"},next:{title:"Scripts",permalink:"/docs/Script/"}},p={},u=[{value:"Development & Deployment",id:"development--deployment",level:2},{value:"Utilities & Testing",id:"utilities--testing",level:2}];function b(e){const t={h1:"h1",h2:"h2",p:"p",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"dev-tools",children:"Dev Tools"}),"\n",(0,o.jsx)(t.p,{children:"Explore essential tools and resources tailored for development on Nervos CKB, designed to streamline your workflow from concept to deployment."}),"\n",(0,o.jsx)(t.h2,{id:"development--deployment",children:"Development & Deployment"}),"\n",(0,o.jsx)(r.A,{children:l.lt.slice(0,4).map((({index:e,title:t,description:i,link:n,type:r,links:l})=>(0,o.jsx)(s.A,{title:t,description:i,link:n,internal:!1,type:r,links:l},e)))}),"\n",(0,o.jsx)(t.h2,{id:"utilities--testing",children:"Utilities & Testing"}),"\n",(0,o.jsx)(r.A,{children:l.lt.slice(4,7).map((({index:e,title:t,description:i,link:n,type:r,links:l})=>(0,o.jsx)(s.A,{title:t,description:i,link:n,internal:!1,type:r,links:l},e)))})]})}function k(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(b,{...e})}):b(e)}},1681:(e,t,i)=>{i.d(t,{jr:()=>r,lt:()=>o,mr:()=>s,xI:()=>n});var o=[{title:"Lumos",description:"A JavaScript/TypeScript framework to simplify the development of dApp",link:"https://github.com/ckb-js/lumos",type:"tool",links:[{label:"Github",link:"https://github.com/ckb-js/lumos"},{label:"Docs",link:"https://lumos-website.vercel.app/"}]},{title:"CKB SDKs",description:"Necessary functions available in various programming languages",link:"https://github.com/nervosnetwork/ckb-sdk-rust",type:"tool",links:[{label:"Rust",link:"https://github.com/nervosnetwork/ckb-sdk-rust"},{label:"Go",link:"https://github.com/nervosnetwork/ckb-sdk-go"},{label:"Java",link:"https://github.com/nervosnetwork/ckb-sdk-java"}]},{title:"CKB-CLI",description:"The command-line tool for direct interaction with the Nervos network",link:"https://github.com/nervosnetwork/ckb-cli",type:"tool",links:[{label:"Github",link:"https://github.com/nervosnetwork/ckb-cli"},{label:"Wiki",link:"https://github.com/nervosnetwork/ckb-cli/wiki/Tutorials"}]},{title:"OffCKB",description:"CKB local development network for your first try",link:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae",type:"tool",links:[{label:"Github",link:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae"}]},{title:"CKB-Debugger",description:"A standalone debugger enabling off-chain contract development",link:"https://github.com/nervosnetwork/ckb-standalone-debugger",type:"tool",links:[{label:"Github",link:"https://github.com/nervosnetwork/ckb-standalone-debugger"}]},{title:"CKB Address",description:"Convert and decode CKB addresses and generate private keys for development",link:"https://ckb.tools/address",type:"tool",links:[{label:"Website",link:"https://ckb.tools/address"},{label:"Github",link:"https://github.com/jordanmack/ckb-tools"}]},{title:"Nervos Pudge Faucet",description:"Claim CKBytes\xa0to use while developing and testing",link:"https://faucet.nervos.org/",type:"tool",links:[{label:"Website",link:"https://faucet.nervos.org/"},{label:"Github",link:"https://github.com/Magickbase/ckb-testnet-faucet"}]}],n=[{tabValue:"transfer-ckb",label:"Transfer CKB",tutorialTitle:"View and transfer CKB from one address to another.",tutorialLink:"/docs/getting-started/transfer-ckb",iframeSrc:"https://codesandbox.io/embed/58n9pq?view=preview&module=%2Flib.ts"},{tabValue:"write-message",label:"Write a Message",tutorialTitle:"Write 'Hello CKB!' to a CKB Cell and then retrieve it.",tutorialLink:"/docs/getting-started/write-message",iframeSrc:"https://codesandbox.io/embed/jsn25g?view=Editor+%2B+Preview&module=%2Flib.ts"},{tabValue:"create-token",label:"Create a Fungible Token",tutorialTitle:"Create, view, and transfer a custom token.",tutorialLink:"/docs/getting-started/create-token",iframeSrc:"https://codesandbox.io/embed/drlfr5?view=Editor+%2B+Preview&module=%2Flib.ts"},{tabValue:"create-dob",label:"Create a DOB",tutorialTitle:"Create a digital object using spore protocol.",tutorialLink:"/docs/getting-started/create-dob",iframeSrc:"https://codesandbox.io/embed/rmwshy?view=Editor+%2B+Preview&module=%2Flib.ts"}],s="More Dev Tools \u2192",r="/docs/getting-started/devtool"},5333:(e,t,i)=>{i.d(t,{A:()=>a});var o=i(53),n=i(4783);const s={cardContainer:"cardContainer__ccT",iconContainer:"iconContainer_RJI0",rightContainer:"rightContainer_HZnY",title:"title_aezp",description:"description_jBtF",links:"links_KO_M"};var r=i(975),l=i(4848);function a(e){var t=e.title,i=e.description,r=e.link,a=e.type,c=e.links,p=e.internal,u=void 0===p||p,b=e.className,k={title:t,description:i,link:r,type:a,links:c,className:b};return u?(0,l.jsx)(n.A,{to:r,className:(0,o.A)(s.cardContainer,b),children:(0,l.jsx)(d,Object.assign({},k))}):(0,l.jsx)(n.A,{href:r,target:"_blank",rel:"noopener noreferrer",className:(0,o.A)(s.cardContainer,b),children:(0,l.jsx)(d,Object.assign({},k))})}function d(e){var t=e.title,i=e.description,o=e.type,a=e.links;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:s.iconContainer,children:(0,l.jsx)(r.A,{alt:o,sources:{light:"/svg/icon-"+o+"-light.svg",dark:"/svg/icon-"+o+"-dark.svg"}})}),(0,l.jsxs)("div",{className:s.rightContainer,children:[(0,l.jsx)("h4",{className:s.title,children:t}),a&&a.length>0&&(0,l.jsx)("div",{className:s.links,children:a.map((function(e,t){return(0,l.jsx)(n.A,{href:e.link,target:"_blank",rel:"noopener noreferrer",children:e.label},t)}))}),(0,l.jsx)("p",{className:s.description,children:i})]})]})}},8803:(e,t,i)=>{i.d(t,{A:()=>s});i(6540);const o="layoutContainer_TJ5m";var n=i(4848);const s=function(e){var t=e.children,i=e.topMargin,s=void 0===i?16:i,r=e.colNum,l=void 0===r?[2,1,2,1]:r,a=e.gap,d=void 0===a?24:a;return(0,n.jsx)("div",{style:{marginTop:s+"px","--gap":d+"px","--columnL":l[0],"--columnM":l[1],"--columnS":l[2],"--columnXS":l[3]},className:o,children:t})}},8453:(e,t,i)=>{i.d(t,{R:()=>r,x:()=>l});var o=i(6540);const n={},s=o.createContext(n);function r(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3d7f047f.39dd8d67.js b/assets/js/3d7f047f.39dd8d67.js new file mode 100644 index 000000000..5a0db9bd5 --- /dev/null +++ b/assets/js/3d7f047f.39dd8d67.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[510],{573:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>s,metadata:()=>u,toc:()=>d});var r=t(4848),a=t(8453),o=(t(8180),t(9489)),i=t(7227);const s={id:"run-testnet-node",title:"Run a Testnet Node",sidebar_position:2},l="Run a Testnet Node",u={id:"Node/run-testnet-node",title:"Run a Testnet Node",description:"Nervos has introduced the Pudge Testnet for developers to experiment with integrations and Scripts. This is ideal for exploring functionalities in a risk-free environment. Due to hash rate fluctuations, expect periodic resets. We suggest allocating 200GB for experimentation.",source:"@site/docs/Node/run-testnet-node.mdx",sourceDirName:"Node",slug:"/Node/run-testnet-node",permalink:"/docs/Node/run-testnet-node",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Node/run-testnet-node.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:2,frontMatter:{id:"run-testnet-node",title:"Run a Testnet Node",sidebar_position:2},sidebar:"tutorial",previous:{title:"Run a Mainnet Node",permalink:"/docs/Node/run-mainnet-node"},next:{title:"Run a Public RPC Node",permalink:"/docs/Node/run-public-rpc-node"}},c={},d=[{value:"Step 1: Download CKB Binary",id:"step-1-download-ckb-binary",level:2},{value:"Step 2: Navigate to CKB Directory",id:"step-2-navigate-to-ckb-directory",level:2},{value:"Step 3: Verify versions",id:"step-3-verify-versions",level:2},{value:"Step 4: Connect to Pudge Testnet",id:"step-4-connect-to-pudge-testnet",level:2},{value:"Step 5: Start the CKB Testnet Node",id:"step-5-start-the-ckb-testnet-node",level:2},{value:"Track Your Node",id:"track-your-node",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"run-a-testnet-node",children:"Run a Testnet Node"}),"\n",(0,r.jsx)(n.p,{children:"Nervos has introduced the Pudge Testnet for developers to experiment with integrations and Scripts. This is ideal for exploring functionalities in a risk-free environment. Due to hash rate fluctuations, expect periodic resets. We suggest allocating 200GB for experimentation."}),"\n",(0,r.jsx)(n.h2,{id:"step-1-download-ckb-binary",children:"Step 1: Download CKB Binary"}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["We will use ",(0,r.jsx)(n.strong,{children:"ckb_v0.115.0"})," for this guide. Please ensure you download the latest version corresponding to your operating system."]})}),"\n",(0,r.jsxs)(n.p,{children:["Get the latest CKB binary from ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/releases",children:"Github releases"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"step-2-navigate-to-ckb-directory",children:"Step 2: Navigate to CKB Directory"}),"\n",(0,r.jsx)(n.p,{children:"Unzip the downloaded file to an easily accessible folder, e.g., C:\\ckb for Windows, ~/Documents for Mac. Open your terminal/command line and navigate to your CKB directory using the following command:"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"mac",label:"Mac",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" cd /Users/(NAME)/Documents/ckb_v0.115.0-rc3_aarch64-apple-darwin-portable/ckb\n"})})}),(0,r.jsx)(i.A,{value:"windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" cd C:/ckb_v0.115.0_x86_64-pc-windows-msvc\n"})})})]}),"\n",(0,r.jsx)(n.h2,{id:"step-3-verify-versions",children:"Step 3: Verify versions"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"check-version",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb --version\n ckb-cli --version\n"})})}),(0,r.jsx)(i.A,{value:"verify-version",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb 0.115.0 (d845cbf 2024-04-01)\n ckb-cli 1.8.0-rc1 (cf4159b 2024-03-28)\n"})})})]}),"\n",(0,r.jsx)(n.h2,{id:"step-4-connect-to-pudge-testnet",children:"Step 4: Connect to Pudge Testnet"}),"\n",(0,r.jsx)(n.p,{children:"Initialize your CKB node:"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"command",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb init --chain testnet\n"})})}),(0,r.jsx)(i.A,{value:"result",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" WARN: Mining feature is disabled because of lacking the block assembler config options.\n Initialized CKB directory in /PATH/0.115.0\n create ckb.toml\n create ckb-miner.toml\n"})})})]}),"\n",(0,r.jsx)(n.h2,{id:"step-5-start-the-ckb-testnet-node",children:"Step 5: Start the CKB Testnet Node"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"ckb run\n"})}),"\n",(0,r.jsx)(n.p,{children:"After these steps, your CKB Testnet node will be up and running, allowing you to experiment and develop with the Nervos blockchain."}),"\n",(0,r.jsx)(n.h2,{id:"track-your-node",children:"Track Your Node"}),"\n",(0,r.jsxs)(n.p,{children:["Track your node using ",(0,r.jsx)(n.a,{href:"https://nodes.ckb.dev/",children:"CKB Node Probe"})," and view the global distribution of active CKB nodes."]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},7227:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var r=t(8215);const a={tabItem:"tabItem_Ymn6"};var o=t(4848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,i),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>k});var r=t(6540),a=t(8215),o=t(4245),i=t(6347),s=t(6494),l=t(2814),u=t(5167),c=t(1269);function d(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return d(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,u.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function v(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,o=(0,i.W6)(),s=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:a});return[(0,l.aZ)(s),(0,r.useCallback)((function(e){if(s){var n=new URLSearchParams(o.location.search);n.set(s,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[s,o])]}function b(e){var n,t,a,o,i=e.defaultValue,l=e.queryString,u=void 0!==l&&l,d=e.groupId,b=h(e),f=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:b})})),m=f[0],g=f[1],x=v({queryString:u,groupId:d}),j=x[0],y=x[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),t=(0,c.Dv)(n),a=t[0],o=t[1],[a,(0,r.useCallback)((function(e){n&&o.set(e)}),[n,o])]),w=k[0],N=k[1],T=function(){var e=null!=j?j:w;return p({value:e,tabValues:b})?e:null}();return(0,s.A)((function(){T&&g(T)}),[T]),{selectedValue:m,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),N(e)}),[y,N,b]),tabValues:b}}var f=t(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(4848);function x(e){var n=e.className,t=e.block,r=e.selectedValue,i=e.selectValue,s=e.tabValues,l=[],u=(0,o.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,t=l.indexOf(n),a=s[t].value;a!==r&&(u(n),i(a))},d=function(e){var n,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var r,a=l.indexOf(e.currentTarget)+1;t=null!=(r=l[a])?r:l[0];break;case"ArrowLeft":var o,i=l.indexOf(e.currentTarget)-1;t=null!=(o=l[i])?o:l[l.length-1]}null==(n=t)||n.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:s.map((function(e){var n=e.value,t=e.label,o=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return l.push(e)},onKeyDown:d,onClick:c},o,{className:(0,a.A)("tabs__item",m.tabItem,null==o?void 0:o.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function j(e){var n=e.lazy,t=e.children,a=e.selectedValue,o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var i=o.find((function(e){return e.props.value===a}));return i?(0,r.cloneElement)(i,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function y(e){var n=b(e);return(0,g.jsxs)("div",{className:(0,a.A)("tabs-container",m.tabList),children:[(0,g.jsx)(x,Object.assign({},e,n)),(0,g.jsx)(j,Object.assign({},e,n))]})}function k(e){var n=(0,f.A)();return(0,g.jsx)(y,Object.assign({},e,{children:d(e.children)}),String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>s});var r=t(6540);const a={},o=r.createContext(a);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4145f356.d81054d5.js b/assets/js/4145f356.4e6f7086.js similarity index 98% rename from assets/js/4145f356.d81054d5.js rename to assets/js/4145f356.4e6f7086.js index 1e2918d81..33162955a 100644 --- a/assets/js/4145f356.d81054d5.js +++ b/assets/js/4145f356.4e6f7086.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[707],{3991:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>w,contentTitle:()=>g,default:()=>v,frontMatter:()=>f,metadata:()=>u,toc:()=>m});var r=o(4848),s=o(8453),n=o(9636),i=o(8803),a=o(6540),l=o(53);const c="filters_Vbq_",h="tag_zJLr",d="activeTag_j6yD";const p=function(e){var t,o=e.cardData,s=(0,a.useState)("All"),p=s[0],b=s[1],f=(0,a.useState)({}),g=f[0],u=f[1],w=(0,a.useState)([]),m=w[0],k=w[1];return(0,a.useEffect)((function(){var e=o.reduce((function(e,t){return t.tags.forEach((function(t){e[t]=(e[t]||0)+1})),e}),{});u(e)}),[o]),(0,a.useEffect)((function(){if("All"===p)k(o);else{var e=o.filter((function(e){return e.tags.includes(p)}));k(e)}}),[p,o]),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:c,children:[(0,r.jsx)("button",{className:(0,l.A)(h,(t={},t[d]="All"===p,t)),onClick:function(){return b("All")},children:"All Projects ("+o.length+")"}),Object.entries(g).map((function(e){var t,o=e[0],s=e[1];return(0,r.jsx)("button",{className:(0,l.A)(h,(t={},t[d]=p===o,t)),onClick:function(){return b(o)},children:o+" ("+s+")"},o)}))]}),(0,r.jsx)(i.A,{children:m.map((function(e,t){return(0,r.jsx)(n.A,{title:e.title,description:e.description,href:e.href,bannerSrc:e.bannerSrc,tags:e.tags,links:e.links},t)}))})]})};var b=o(8868);const f={id:"ecosystem",title:"Ecosystem",sidebar_position:7},g="Ecosystem",u={id:"ecosystem",title:"Ecosystem",description:"Discover our ecosystem of tools, resources, and projects that are essential for building your application",source:"@site/docs/ecosystem.md",sourceDirName:".",slug:"/ecosystem",permalink:"/docs/ecosystem",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/ecosystem.md",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:7,frontMatter:{id:"ecosystem",title:"Ecosystem",sidebar_position:7},sidebar:"tutorial",previous:{title:"Glossary",permalink:"/docs/concepts/glossary"},next:{title:"Cell Model",permalink:"/docs/concepts/cell-model"}},w={},m=[];function k(e){const t={h1:"h1",p:"p",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"ecosystem",children:"Ecosystem"}),"\n",(0,r.jsx)(t.p,{children:"Discover our ecosystem of tools, resources, and projects that are essential for building your application"}),"\n",(0,r.jsx)(p,{cardData:b.A})]})}function v(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(k,{...e})}):k(e)}},8868:(e,t,o)=>{o.d(t,{A:()=>r});const r=[{title:".bit",description:"Cross-chain Web3 identities for you and your community",href:"https://did.id/",bannerSrc:".bit",tags:["DID"],links:[{label:"website",href:"https://did.id/"},{label:"github",href:"https://github.com/dotbitHQ"},{label:"doc",href:"https://www.notion.so/bit-Previously-DAS-5cea5b425b204679b8ef2855ed94b04d"}]},{title:"Omiga",description:"The 1st inscription protocol established on Nervos $CKB blockchain",href:"https://omiga.io/",bannerSrc:"omiga",tags:["Protocol","DApp"],links:[{label:"website",href:"https://omiga.io/"},{label:"doc",href:"https://docs.omiga.io/"}]},{title:"CoTA",description:"A layer-1.5 account based token protocol on Nervos CKB",href:"https://www.cotadev.io/",bannerSrc:"cota",tags:["Protocol","NFT"],links:[{label:"website",href:"https://www.cotadev.io/"},{label:"doc",href:"https://www.cotadev.io/docs/getting-started/overview"}]},{title:"RGB++",description:"An extended RGB protocol to manage state changes and transaction verification",href:"https://github.com/ckb-cell/RGBPlusPlus-design",bannerSrc:"rgb++",tags:["Protocol"],links:[{label:"github",href:"https://github.com/ckb-cell/RGBPlusPlus-design"},{label:"doc",href:"https://github.com/ckb-cell/RGBPlusPlus-design/blob/main/docs/light-paper-en.md"}]},{title:"Spore",description:"Craft, Secure, Distribute, and Monetize DOBs",href:"https://spore.pro/",bannerSrc:"spore",tags:["Protocol","DOB"],links:[{label:"website",href:"https://spore.pro/"},{label:"doc",href:"https://docs.spore.pro/"}]},{title:"Nervape",description:"A Metaverse with an ongoing Story and NFTs Shaped by the Community",href:"https://nervape.com/",bannerSrc:"nervape",tags:["NFT"],links:[{label:"website",href:"https://nervape.com/"},{label:"github",href:"https://github.com/nervape"},{label:"doc",href:"https://tourmaline-elderberry-f93.notion.site/Nervape-Community-Wiki-e46261f411ed42e19b859f48da06fe63"}]},{title:"JoyGift",description:"Sending crypto assets as gifts to your friends, communities, or users",href:"https://joygift.cc/",bannerSrc:"joygift",tags:["DApp"],links:[{label:"website",href:"https://joygift.cc/"}]},{title:"Philosopher's Stone",description:"On-Chain Gifting Platform powered by the Spore Protocol",href:"https://philosopherstone.xyz/",bannerSrc:"philosopherstone",tags:["DApp","DOB"],links:[{label:"website",href:"https://philosopherstone.xyz/"},{label:"github",href:"https://github.com/SpectreMercury/PhilosopherStone"}]},{title:"NFTnation",description:"Explore, buy and sell NFTs. By the community, for the community",href:"https://nft-nation.live/",bannerSrc:"nftnation",tags:["NFT"],links:[{label:"website",href:"https://nft-nation.live/"},{label:"doc",href:"https://nftnation.gitbook.io/nftnation-explained"}]},{title:"CKB Explorer",description:"A CKB Explorer built with React and Ruby on Rails",href:"https://explorer.nervos.org/",bannerSrc:"explorer",tags:["Explorer"],links:[{label:"website",href:"https://explorer.nervos.org/"},{label:"github",href:"https://github.com/nervosnetwork/ckb-explorer"}]},{title:"Nervos Scan",description:"A CKB Explorer produced with love by 7774.bit",href:"https://nervosscan.com/",bannerSrc:"nervosscan",tags:["Explorer"],links:[{label:"website",href:"https://nervosscan.com/"}]},{title:"Neuron",description:"A versatile desktop wallet designed for securely managing CKB assets",href:"https://github.com/nervosnetwork/neuron/releases/tag/v0.114.2",bannerSrc:"neuron",tags:["Wallet"],links:[{label:"website",href:"https://github.com/nervosnetwork/neuron/releases/tag/v0.114.2"}]},{title:"JoyID",description:"A web-based passwordless and mnemonic-free wallet solution",href:"https://joy.id/",bannerSrc:"joyid",tags:["Wallet"],links:[{label:"website",href:"https://joy.id/"},{label:"github",href:"https://github.com/nervina-labs?q=joyid"}]},{title:"CKBull",description:"A mobile wallet that allows you to access and manage your CKB",href:"https://ckbull.app/",bannerSrc:"ckbull",tags:["Wallet"],links:[{label:"website",href:"https://ckbull.app/"},{label:"doc",href:"https://www.notion.so/How-to-use-CKBull-wallet-89153cac673447b0bf827d1f6f7d151c?pvs=4"}]},{title:"imToken",description:"A built-in CKB wallet on mobile that enables users to safely send, receive and store CKB",href:"https://token.im/",bannerSrc:"imtoken",tags:["Wallet"],links:[{label:"website",href:"https://token.im/"},{label:"github",href:"https://github.com/consenlabs"},{label:"doc",href:"https://medium.com/imtoken/imtoken-2-5-0-now-with-nervos-tron-bch-ltc-support-14d7171ccf4"}]},{title:"SafePal",description:"A hardware wallet that supports both Nervos L1 CKB and L2 Godwoken",href:"https://www.safepal.com/",bannerSrc:"safepal",tags:["Wallet"],links:[{label:"website",href:"https://www.safepal.com/"},{label:"doc",href:"https://www.notion.so/How-to-add-send-Nervos-Chain-CKB-coin-with-SafePal-Hardware-Wallet-40da32d8f7074563859e9d08b585768e"}]},{title:"Ledger",description:"Provide secure hardware wallets for cryptocurrency storage and management",href:"https://www.ledger.com/",bannerSrc:"ledger",tags:["Wallet"],links:[{label:"website",href:"https://www.ledger.com/"},{label:"doc",href:"https://developers.ledger.com/docs/sections"}]},{title:"imKey",description:"Offer secure, user-friendly hardware wallets for digital asset protection",href:"https://imkey.im/",bannerSrc:"imkey",tags:["Wallet"],links:[{label:"website",href:"https://imkey.im/"}]},{title:"oneKey",description:"Offer secure hardware wallets with cross-platform apps for digital asset management",href:"https://onekey.so/",bannerSrc:"onekey",tags:["Wallet"],links:[{label:"website",href:"https://onekey.so/"},{label:"github",href:"https://github.com/OneKeyHQ/"},{label:"doc",href:"https://developer.onekey.so/"}]},{title:"ForceBridge",description:"A cross-chain interoperability bridge b/w Nervos and other blockchains",href:"https://forcebridge.com/",bannerSrc:"forcebridge",tags:["Bridge"],links:[{label:"website",href:"https://forcebridge.com/"},{label:"github",href:"https://github.com/nervosnetwork/force-bridge"},{label:"doc",href:"https://github.com/nervosnetwork/force-bridge/blob/main/docs/dapp-user-guide.md"}]},{title:"Godwoken Bridge",description:"A token bridge between CKB and Godwoken",href:"https://bridge.godwoken.io/",bannerSrc:"godwokenbridge",tags:["Bridge"],links:[{label:"website",href:"https://bridge.godwoken.io/"},{label:"github",href:"https://github.com/godwokenrises/light-godwoken/tree/develop/apps/godwoken-bridge"},{label:"doc",href:"https://docs.godwoken.io/"}]},{title:"Yokaiswap Bridge",description:"A cross-chain interoperability bridge b/w Nervos and other blockchains",href:"https://www.yokaiswap.com/bridge/",bannerSrc:"yokaiswap",tags:["Bridge"],links:[{label:"website",href:"https://www.yokaiswap.com/bridge/"},{label:"github",href:"https://github.com/yokaiswap"}]},{title:"Ankr",description:"The fastest, most reliable Web3 infrastructure",href:"https://www.ankr.com/",bannerSrc:"ankr",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.ankr.com/"},{label:"doc",href:"https://archive.nervos.org/blog/ankr-integrates-support-for-nervos-nodes"}]},{title:"Axon",description:"A L2 framework that unleashes the power of appchain future",href:"https://axonweb3.io/",bannerSrc:"axon",tags:["Tools & Infra"],links:[{label:"website",href:"https://axonweb3.io/"},{label:"github",href:"https://github.com/axonweb3/axon"},{label:"doc",href:"https://docs.axonweb3.io/"}]},{title:"BandProtocol",description:"A L2 framework that unleashes the power of appchain future",href:"https://www.bandprotocol.com/",bannerSrc:"bandprotocol",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.bandprotocol.com/"},{label:"github",href:"https://github.com/bandprotocol"},{label:"doc",href:"https://medium.com/bandprotocol/band-protocol-integrates-with-nervos-godwoken-361546e1091d"}]},{title:"DIA",description:"Provides fully customizable and transparent data feeds for smart contracts",href:"https://www.diadata.org/",bannerSrc:"dia",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.diadata.org/"},{label:"doc",href:"https://archive.nervos.org/blog/dia-deploys-oracles-onto-layer-2-bolstering-dev-resources"}]},{title:"Godwoken",description:"An EVM-compatible, L2 optimistic rollup solution built on Nervos L1",href:"https://www.godwoken.com/",bannerSrc:"godwoken",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.godwoken.com/"},{label:"github",href:"https://github.com/godwokenrises"},{label:"doc",href:"https://docs.godwoken.io/"}]},{title:"Khalani",description:"A decentralized infrastructure for collaborative solving in intent-driven applications",href:"https://khalani.network/",bannerSrc:"khalani",tags:["Tools & Infra"],links:[{label:"website",href:"https://khalani.network/"},{label:"doc",href:"https://blog.khalani.network/"}]},{title:"Perun",description:"A L2 solution enhancing efficiency with off-chain transaction capabilities",href:"https://perun.network/",bannerSrc:"perun",tags:["Tools & Infra"],links:[{label:"website",href:"https://perun.network/"},{label:"github",href:"https://github.com/perun-network/go-perun"}]},{title:"Unifra",description:"A leading L2 platform that provides open, reliable infrastructure services",href:"https://unifra.io/",bannerSrc:"unifra",tags:["Tools & Infra"],links:[{label:"website",href:"https://unifra.io/"}]}]},8803:(e,t,o)=>{o.d(t,{A:()=>n});o(6540);const r="layoutContainer_TJ5m";var s=o(4848);const n=function(e){var t=e.children,o=e.topMargin,n=void 0===o?16:o,i=e.colNum,a=void 0===i?[2,1,2,1]:i,l=e.gap,c=void 0===l?24:l;return(0,s.jsx)("div",{style:{marginTop:n+"px","--gap":c+"px","--columnL":a[0],"--columnM":a[1],"--columnS":a[2],"--columnXS":a[3]},className:r,children:t})}},9636:(e,t,o)=>{o.d(t,{A:()=>l});var r=o(53),s=o(4783),n=o(975);const i={cardContainer:"cardContainer_xWMf",topContainer:"topContainer_SZLr",banner:"banner_LOnP",tagList:"tagList_EW4E",tag:"tag_QgTi",bottomContainer:"bottomContainer_TLG4",description:"description_qXLp",title:"title_ZEhm",links:"links_hvUO",iconContainer:"iconContainer_trI9"};var a=o(4848);function l(e){var t=e.title,o=e.description,l=e.href,c=e.bannerSrc,h=e.tags,d=e.links,p=e.className;return(0,a.jsxs)(s.A,{href:l,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(i.cardContainer,p),children:[(0,a.jsx)("div",{className:i.topContainer,children:(0,a.jsx)("img",{className:i.banner,alt:c,src:"/svg/banner-"+c+".svg"})}),(0,a.jsxs)("div",{className:i.bottomContainer,children:[(0,a.jsx)("h4",{className:i.title,children:t}),(0,a.jsx)("div",{className:i.tagList,children:h.map((function(e){return(0,a.jsx)("div",{className:i.tag,children:e})}))}),(0,a.jsx)("p",{className:i.description,children:o}),(0,a.jsx)("div",{className:i.links,children:d.map((function(e,t){return(0,a.jsx)(s.A,{className:i.iconContainer,href:e.link,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)(n.A,{alt:e.label,width:24,height:24,sources:{light:"/svg/icon-"+e.label+"-light.svg",dark:"/svg/icon-"+e.label+"-dark.svg"}})},t)}))})]})]})}},8453:(e,t,o)=>{o.d(t,{R:()=>i,x:()=>a});var r=o(6540);const s={},n=r.createContext(s);function i(e){const t=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[707],{3991:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>w,contentTitle:()=>g,default:()=>v,frontMatter:()=>f,metadata:()=>u,toc:()=>m});var r=o(4848),s=o(8453),n=o(9636),i=o(8803),a=o(6540),l=o(53);const c="filters_Vbq_",h="tag_zJLr",d="activeTag_j6yD";const p=function(e){var t,o=e.cardData,s=(0,a.useState)("All"),p=s[0],b=s[1],f=(0,a.useState)({}),g=f[0],u=f[1],w=(0,a.useState)([]),m=w[0],k=w[1];return(0,a.useEffect)((function(){var e=o.reduce((function(e,t){return t.tags.forEach((function(t){e[t]=(e[t]||0)+1})),e}),{});u(e)}),[o]),(0,a.useEffect)((function(){if("All"===p)k(o);else{var e=o.filter((function(e){return e.tags.includes(p)}));k(e)}}),[p,o]),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:c,children:[(0,r.jsx)("button",{className:(0,l.A)(h,(t={},t[d]="All"===p,t)),onClick:function(){return b("All")},children:"All Projects ("+o.length+")"}),Object.entries(g).map((function(e){var t,o=e[0],s=e[1];return(0,r.jsx)("button",{className:(0,l.A)(h,(t={},t[d]=p===o,t)),onClick:function(){return b(o)},children:o+" ("+s+")"},o)}))]}),(0,r.jsx)(i.A,{children:m.map((function(e,t){return(0,r.jsx)(n.A,{title:e.title,description:e.description,href:e.href,bannerSrc:e.bannerSrc,tags:e.tags,links:e.links},t)}))})]})};var b=o(8868);const f={id:"ecosystem",title:"Ecosystem",sidebar_position:7},g="Ecosystem",u={id:"ecosystem",title:"Ecosystem",description:"Discover our ecosystem of tools, resources, and projects that are essential for building your application",source:"@site/docs/ecosystem.md",sourceDirName:".",slug:"/ecosystem",permalink:"/docs/ecosystem",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/ecosystem.md",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:7,frontMatter:{id:"ecosystem",title:"Ecosystem",sidebar_position:7},sidebar:"tutorial",previous:{title:"Glossary",permalink:"/docs/concepts/glossary"}},w={},m=[];function k(e){const t={h1:"h1",p:"p",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"ecosystem",children:"Ecosystem"}),"\n",(0,r.jsx)(t.p,{children:"Discover our ecosystem of tools, resources, and projects that are essential for building your application"}),"\n",(0,r.jsx)(p,{cardData:b.A})]})}function v(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(k,{...e})}):k(e)}},8868:(e,t,o)=>{o.d(t,{A:()=>r});const r=[{title:".bit",description:"Cross-chain Web3 identities for you and your community",href:"https://did.id/",bannerSrc:".bit",tags:["DID"],links:[{label:"website",href:"https://did.id/"},{label:"github",href:"https://github.com/dotbitHQ"},{label:"doc",href:"https://www.notion.so/bit-Previously-DAS-5cea5b425b204679b8ef2855ed94b04d"}]},{title:"Omiga",description:"The 1st inscription protocol established on Nervos $CKB blockchain",href:"https://omiga.io/",bannerSrc:"omiga",tags:["Protocol","DApp"],links:[{label:"website",href:"https://omiga.io/"},{label:"doc",href:"https://docs.omiga.io/"}]},{title:"CoTA",description:"A layer-1.5 account based token protocol on Nervos CKB",href:"https://www.cotadev.io/",bannerSrc:"cota",tags:["Protocol","NFT"],links:[{label:"website",href:"https://www.cotadev.io/"},{label:"doc",href:"https://www.cotadev.io/docs/getting-started/overview"}]},{title:"RGB++",description:"An extended RGB protocol to manage state changes and transaction verification",href:"https://github.com/ckb-cell/RGBPlusPlus-design",bannerSrc:"rgb++",tags:["Protocol"],links:[{label:"github",href:"https://github.com/ckb-cell/RGBPlusPlus-design"},{label:"doc",href:"https://github.com/ckb-cell/RGBPlusPlus-design/blob/main/docs/light-paper-en.md"}]},{title:"Spore",description:"Craft, Secure, Distribute, and Monetize DOBs",href:"https://spore.pro/",bannerSrc:"spore",tags:["Protocol","DOB"],links:[{label:"website",href:"https://spore.pro/"},{label:"doc",href:"https://docs.spore.pro/"}]},{title:"Nervape",description:"A Metaverse with an ongoing Story and NFTs Shaped by the Community",href:"https://nervape.com/",bannerSrc:"nervape",tags:["NFT"],links:[{label:"website",href:"https://nervape.com/"},{label:"github",href:"https://github.com/nervape"},{label:"doc",href:"https://tourmaline-elderberry-f93.notion.site/Nervape-Community-Wiki-e46261f411ed42e19b859f48da06fe63"}]},{title:"JoyGift",description:"Sending crypto assets as gifts to your friends, communities, or users",href:"https://joygift.cc/",bannerSrc:"joygift",tags:["DApp"],links:[{label:"website",href:"https://joygift.cc/"}]},{title:"Philosopher's Stone",description:"On-Chain Gifting Platform powered by the Spore Protocol",href:"https://philosopherstone.xyz/",bannerSrc:"philosopherstone",tags:["DApp","DOB"],links:[{label:"website",href:"https://philosopherstone.xyz/"},{label:"github",href:"https://github.com/SpectreMercury/PhilosopherStone"}]},{title:"NFTnation",description:"Explore, buy and sell NFTs. By the community, for the community",href:"https://nft-nation.live/",bannerSrc:"nftnation",tags:["NFT"],links:[{label:"website",href:"https://nft-nation.live/"},{label:"doc",href:"https://nftnation.gitbook.io/nftnation-explained"}]},{title:"CKB Explorer",description:"A CKB Explorer built with React and Ruby on Rails",href:"https://explorer.nervos.org/",bannerSrc:"explorer",tags:["Explorer"],links:[{label:"website",href:"https://explorer.nervos.org/"},{label:"github",href:"https://github.com/nervosnetwork/ckb-explorer"}]},{title:"Nervos Scan",description:"A CKB Explorer produced with love by 7774.bit",href:"https://nervosscan.com/",bannerSrc:"nervosscan",tags:["Explorer"],links:[{label:"website",href:"https://nervosscan.com/"}]},{title:"Neuron",description:"A versatile desktop wallet designed for securely managing CKB assets",href:"https://github.com/nervosnetwork/neuron/releases/tag/v0.114.2",bannerSrc:"neuron",tags:["Wallet"],links:[{label:"website",href:"https://github.com/nervosnetwork/neuron/releases/tag/v0.114.2"}]},{title:"JoyID",description:"A web-based passwordless and mnemonic-free wallet solution",href:"https://joy.id/",bannerSrc:"joyid",tags:["Wallet"],links:[{label:"website",href:"https://joy.id/"},{label:"github",href:"https://github.com/nervina-labs?q=joyid"}]},{title:"CKBull",description:"A mobile wallet that allows you to access and manage your CKB",href:"https://ckbull.app/",bannerSrc:"ckbull",tags:["Wallet"],links:[{label:"website",href:"https://ckbull.app/"},{label:"doc",href:"https://www.notion.so/How-to-use-CKBull-wallet-89153cac673447b0bf827d1f6f7d151c?pvs=4"}]},{title:"imToken",description:"A built-in CKB wallet on mobile that enables users to safely send, receive and store CKB",href:"https://token.im/",bannerSrc:"imtoken",tags:["Wallet"],links:[{label:"website",href:"https://token.im/"},{label:"github",href:"https://github.com/consenlabs"},{label:"doc",href:"https://medium.com/imtoken/imtoken-2-5-0-now-with-nervos-tron-bch-ltc-support-14d7171ccf4"}]},{title:"SafePal",description:"A hardware wallet that supports both Nervos L1 CKB and L2 Godwoken",href:"https://www.safepal.com/",bannerSrc:"safepal",tags:["Wallet"],links:[{label:"website",href:"https://www.safepal.com/"},{label:"doc",href:"https://www.notion.so/How-to-add-send-Nervos-Chain-CKB-coin-with-SafePal-Hardware-Wallet-40da32d8f7074563859e9d08b585768e"}]},{title:"Ledger",description:"Provide secure hardware wallets for cryptocurrency storage and management",href:"https://www.ledger.com/",bannerSrc:"ledger",tags:["Wallet"],links:[{label:"website",href:"https://www.ledger.com/"},{label:"doc",href:"https://developers.ledger.com/docs/sections"}]},{title:"imKey",description:"Offer secure, user-friendly hardware wallets for digital asset protection",href:"https://imkey.im/",bannerSrc:"imkey",tags:["Wallet"],links:[{label:"website",href:"https://imkey.im/"}]},{title:"oneKey",description:"Offer secure hardware wallets with cross-platform apps for digital asset management",href:"https://onekey.so/",bannerSrc:"onekey",tags:["Wallet"],links:[{label:"website",href:"https://onekey.so/"},{label:"github",href:"https://github.com/OneKeyHQ/"},{label:"doc",href:"https://developer.onekey.so/"}]},{title:"ForceBridge",description:"A cross-chain interoperability bridge b/w Nervos and other blockchains",href:"https://forcebridge.com/",bannerSrc:"forcebridge",tags:["Bridge"],links:[{label:"website",href:"https://forcebridge.com/"},{label:"github",href:"https://github.com/nervosnetwork/force-bridge"},{label:"doc",href:"https://github.com/nervosnetwork/force-bridge/blob/main/docs/dapp-user-guide.md"}]},{title:"Godwoken Bridge",description:"A token bridge between CKB and Godwoken",href:"https://bridge.godwoken.io/",bannerSrc:"godwokenbridge",tags:["Bridge"],links:[{label:"website",href:"https://bridge.godwoken.io/"},{label:"github",href:"https://github.com/godwokenrises/light-godwoken/tree/develop/apps/godwoken-bridge"},{label:"doc",href:"https://docs.godwoken.io/"}]},{title:"Yokaiswap Bridge",description:"A cross-chain interoperability bridge b/w Nervos and other blockchains",href:"https://www.yokaiswap.com/bridge/",bannerSrc:"yokaiswap",tags:["Bridge"],links:[{label:"website",href:"https://www.yokaiswap.com/bridge/"},{label:"github",href:"https://github.com/yokaiswap"}]},{title:"Ankr",description:"The fastest, most reliable Web3 infrastructure",href:"https://www.ankr.com/",bannerSrc:"ankr",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.ankr.com/"},{label:"doc",href:"https://archive.nervos.org/blog/ankr-integrates-support-for-nervos-nodes"}]},{title:"Axon",description:"A L2 framework that unleashes the power of appchain future",href:"https://axonweb3.io/",bannerSrc:"axon",tags:["Tools & Infra"],links:[{label:"website",href:"https://axonweb3.io/"},{label:"github",href:"https://github.com/axonweb3/axon"},{label:"doc",href:"https://docs.axonweb3.io/"}]},{title:"BandProtocol",description:"A L2 framework that unleashes the power of appchain future",href:"https://www.bandprotocol.com/",bannerSrc:"bandprotocol",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.bandprotocol.com/"},{label:"github",href:"https://github.com/bandprotocol"},{label:"doc",href:"https://medium.com/bandprotocol/band-protocol-integrates-with-nervos-godwoken-361546e1091d"}]},{title:"DIA",description:"Provides fully customizable and transparent data feeds for smart contracts",href:"https://www.diadata.org/",bannerSrc:"dia",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.diadata.org/"},{label:"doc",href:"https://archive.nervos.org/blog/dia-deploys-oracles-onto-layer-2-bolstering-dev-resources"}]},{title:"Godwoken",description:"An EVM-compatible, L2 optimistic rollup solution built on Nervos L1",href:"https://www.godwoken.com/",bannerSrc:"godwoken",tags:["Tools & Infra"],links:[{label:"website",href:"https://www.godwoken.com/"},{label:"github",href:"https://github.com/godwokenrises"},{label:"doc",href:"https://docs.godwoken.io/"}]},{title:"Khalani",description:"A decentralized infrastructure for collaborative solving in intent-driven applications",href:"https://khalani.network/",bannerSrc:"khalani",tags:["Tools & Infra"],links:[{label:"website",href:"https://khalani.network/"},{label:"doc",href:"https://blog.khalani.network/"}]},{title:"Perun",description:"A L2 solution enhancing efficiency with off-chain transaction capabilities",href:"https://perun.network/",bannerSrc:"perun",tags:["Tools & Infra"],links:[{label:"website",href:"https://perun.network/"},{label:"github",href:"https://github.com/perun-network/go-perun"}]},{title:"Unifra",description:"A leading L2 platform that provides open, reliable infrastructure services",href:"https://unifra.io/",bannerSrc:"unifra",tags:["Tools & Infra"],links:[{label:"website",href:"https://unifra.io/"}]}]},8803:(e,t,o)=>{o.d(t,{A:()=>n});o(6540);const r="layoutContainer_TJ5m";var s=o(4848);const n=function(e){var t=e.children,o=e.topMargin,n=void 0===o?16:o,i=e.colNum,a=void 0===i?[2,1,2,1]:i,l=e.gap,c=void 0===l?24:l;return(0,s.jsx)("div",{style:{marginTop:n+"px","--gap":c+"px","--columnL":a[0],"--columnM":a[1],"--columnS":a[2],"--columnXS":a[3]},className:r,children:t})}},9636:(e,t,o)=>{o.d(t,{A:()=>l});var r=o(53),s=o(4783),n=o(975);const i={cardContainer:"cardContainer_xWMf",topContainer:"topContainer_SZLr",banner:"banner_LOnP",tagList:"tagList_EW4E",tag:"tag_QgTi",bottomContainer:"bottomContainer_TLG4",description:"description_qXLp",title:"title_ZEhm",links:"links_hvUO",iconContainer:"iconContainer_trI9"};var a=o(4848);function l(e){var t=e.title,o=e.description,l=e.href,c=e.bannerSrc,h=e.tags,d=e.links,p=e.className;return(0,a.jsxs)(s.A,{href:l,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(i.cardContainer,p),children:[(0,a.jsx)("div",{className:i.topContainer,children:(0,a.jsx)("img",{className:i.banner,alt:c,src:"/svg/banner-"+c+".svg"})}),(0,a.jsxs)("div",{className:i.bottomContainer,children:[(0,a.jsx)("h4",{className:i.title,children:t}),(0,a.jsx)("div",{className:i.tagList,children:h.map((function(e){return(0,a.jsx)("div",{className:i.tag,children:e})}))}),(0,a.jsx)("p",{className:i.description,children:o}),(0,a.jsx)("div",{className:i.links,children:d.map((function(e,t){return(0,a.jsx)(s.A,{className:i.iconContainer,href:e.link,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)(n.A,{alt:e.label,width:24,height:24,sources:{light:"/svg/icon-"+e.label+"-light.svg",dark:"/svg/icon-"+e.label+"-dark.svg"}})},t)}))})]})]})}},8453:(e,t,o)=>{o.d(t,{R:()=>i,x:()=>a});var r=o(6540);const s={},n=r.createContext(s);function i(e){const t=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/424.d75c87bd.js b/assets/js/424.d75c87bd.js new file mode 100644 index 000000000..3bb6ce6b2 --- /dev/null +++ b/assets/js/424.d75c87bd.js @@ -0,0 +1 @@ +(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[424],{4334:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Ot});var a=n(6540),s=n(4239),i=n(7094),r=n(4848),o=a.createContext(null);function l(e){var t=e.children,n=function(e){return(0,a.useMemo)((function(){return{metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc}}),[e])}(e.content);return(0,r.jsx)(o.Provider,{value:n,children:t})}function c(){var e=(0,a.useContext)(o);if(null===e)throw new i.dV("DocProvider");return e}function d(){var e,t=c(),n=t.metadata,a=t.frontMatter,i=t.assets;return(0,r.jsx)(s.be,{title:n.title,description:n.description,keywords:a.keywords,image:null!=(e=i.image)?e:a.image})}var u=n(8215),m=n(2216),h=n(3230),v=n(4783);function f(e){var t=e.permalink,n=e.title,a=e.subLabel,s=e.isNext;return(0,r.jsxs)(v.A,{className:(0,u.A)("pagination-nav__link",s?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[a&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:a}),(0,r.jsx)("div",{className:"pagination-nav__label",children:n})]})}function b(e){var t=e.previous,n=e.next;return(0,r.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,h.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,r.jsx)(f,Object.assign({},t,{subLabel:(0,r.jsx)(h.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})})),n&&(0,r.jsx)(f,Object.assign({},n,{subLabel:(0,r.jsx)(h.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0}))]})}function g(){var e=c().metadata;return(0,r.jsx)(b,{previous:e.previous,next:e.next})}var p=n(7639),x=n(9802),j=n(8630),A=n(2780),N=n(3403);var C={unreleased:function(e){var t=e.siteTitle,n=e.versionMetadata;return(0,r.jsx)(h.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,r.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){var t=e.siteTitle,n=e.versionMetadata;return(0,r.jsx)(h.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,r.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function L(e){var t=C[e.versionMetadata.banner];return(0,r.jsx)(t,Object.assign({},e))}function y(e){var t=e.versionLabel,n=e.to,a=e.onClick;return(0,r.jsx)(h.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,r.jsx)("b",{children:(0,r.jsx)(v.A,{to:n,onClick:a,children:(0,r.jsx)(h.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function _(e){var t,n=e.className,a=e.versionMetadata,s=(0,p.A)().siteConfig.title,i=(0,x.vT)({failfast:!0}).pluginId,o=(0,A.g1)(i).savePreferredVersionName,l=(0,x.HW)(i),c=l.latestDocSuggestion,d=l.latestVersionSuggestion,m=null!=c?c:(t=d).docs.find((function(e){return e.id===t.mainDocId}));return(0,r.jsxs)("div",{className:(0,u.A)(n,j.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,r.jsx)("div",{children:(0,r.jsx)(L,{siteTitle:s,versionMetadata:a})}),(0,r.jsx)("div",{className:"margin-top--md",children:(0,r.jsx)(y,{versionLabel:d.label,to:m.path,onClick:function(){return o(d.name)}})})]})}function k(e){var t=e.className,n=(0,N.r)();return n.banner?(0,r.jsx)(_,{className:t,versionMetadata:n}):null}function O(e){var t=e.className,n=(0,N.r)();return n.badge?(0,r.jsx)("span",{className:(0,u.A)(t,j.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,r.jsx)(h.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}function w(e){var t=e.lastUpdatedAt,n=e.formattedLastUpdatedAt;return(0,r.jsx)(h.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,r.jsx)("b",{children:(0,r.jsx)("time",{dateTime:new Date(1e3*t).toISOString(),children:n})})},children:" on {date}"})}function T(e){var t=e.lastUpdatedBy;return(0,r.jsx)(h.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,r.jsx)("b",{children:t})},children:" by {user}"})}function H(e){var t=e.lastUpdatedAt,n=e.formattedLastUpdatedAt,a=e.lastUpdatedBy;return(0,r.jsxs)("span",{className:j.G.common.lastUpdated,children:[(0,r.jsx)(h.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&n?(0,r.jsx)(w,{lastUpdatedAt:t,formattedLastUpdatedAt:n}):"",byUser:a?(0,r.jsx)(T,{lastUpdatedBy:a}):""},children:"Last updated{atDate}{byUser}"}),!1]})}var E=n(1367);const M={iconEdit:"iconEdit_Z9Sw"};var B=["className"];function U(e){var t=e.className,n=(0,E.A)(e,B);return(0,r.jsx)("svg",Object.assign({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(M.iconEdit,t),"aria-hidden":"true"},n,{children:(0,r.jsx)("g",{children:(0,r.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})}))}function I(e){var t=e.editUrl;return(0,r.jsxs)(v.A,{to:t,className:j.G.common.editThisPage,children:[(0,r.jsx)(U,{}),(0,r.jsx)(h.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}const S={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function z(e){var t=e.permalink,n=e.label,a=e.count;return(0,r.jsxs)(v.A,{href:t,className:(0,u.A)(S.tag,a?S.tagWithCount:S.tagRegular),children:[n,a&&(0,r.jsx)("span",{children:a})]})}const R={tags:"tags_jXut",tag:"tag_QGVx"};function V(e){var t=e.tags;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("b",{children:(0,r.jsx)(h.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,r.jsx)("ul",{className:(0,u.A)(R.tags,"padding--none","margin-left--sm"),children:t.map((function(e){var t=e.label,n=e.permalink;return(0,r.jsx)("li",{className:R.tag,children:(0,r.jsx)(z,{label:t,permalink:n})},n)}))})]})}const D={lastUpdated:"lastUpdated_vwxv"};function G(e){return(0,r.jsx)("div",{className:(0,u.A)(j.G.docs.docFooterTagsRow,"row margin-bottom--sm"),children:(0,r.jsx)("div",{className:"col",children:(0,r.jsx)(V,Object.assign({},e))})})}function P(e){var t=e.editUrl,n=e.lastUpdatedAt,a=e.lastUpdatedBy,s=e.formattedLastUpdatedAt;return(0,r.jsxs)("div",{className:(0,u.A)(j.G.docs.docFooterEditMetaRow,"row"),children:[(0,r.jsx)("div",{className:"col",children:t&&(0,r.jsx)(I,{editUrl:t})}),(0,r.jsx)("div",{className:(0,u.A)("col",D.lastUpdated),children:(n||a)&&(0,r.jsx)(H,{lastUpdatedAt:n,formattedLastUpdatedAt:s,lastUpdatedBy:a})})]})}function F(){var e=c().metadata,t=e.editUrl,n=e.lastUpdatedAt,a=e.formattedLastUpdatedAt,s=e.lastUpdatedBy,i=e.tags,o=i.length>0,l=!!(t||n||s);return o||l?(0,r.jsxs)("footer",{className:(0,u.A)(j.G.docs.docFooter,"docusaurus-mt-lg"),children:[o&&(0,r.jsx)(G,{tags:i}),l&&(0,r.jsx)(P,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s,formattedLastUpdatedAt:a})]}):null}var q=n(4549),W=n(6957),$=["parentIndex"];function Z(e){var t=e.map((function(e){return Object.assign({},e,{parentIndex:-1,children:[]})})),n=Array(7).fill(-1);t.forEach((function(e,t){var a=n.slice(2,e.level);e.parentIndex=Math.max.apply(Math,a),n[e.level]=t}));var a=[];return t.forEach((function(e){var n=e.parentIndex,s=(0,E.A)(e,$);n>=0?t[n].children.push(s):a.push(s)})),a}function Y(e){var t=e.toc,n=e.minHeadingLevel,a=e.maxHeadingLevel;return t.flatMap((function(e){var t=Y({toc:e.children,minHeadingLevel:n,maxHeadingLevel:a});return function(e){return e.level>=n&&e.level<=a}(e)?[Object.assign({},e,{children:t})]:t}))}function J(e){var t=e.getBoundingClientRect();return t.top===t.bottom?J(e.parentNode):t}function Q(e,t){var n,a,s=t.anchorTopOffset,i=e.find((function(e){return J(e).top>=s}));return i?function(e){return e.top>0&&e.bottom1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var t=e.target;ke(t)&&Oe(t,o.current)&&(e.preventDefault(),c?(d(!1),h(!0)):d(!0))},children:[v,(0,r.jsx)(q.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){d(e),h(!e)},children:(0,r.jsx)("div",{className:ye.collapsibleContent,children:n})})]}))}const Te={details:"details_b_Ee"};var He="alert alert--info";function Ee(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,r.jsx)(we,Object.assign({},t,{className:(0,u.A)(He,Te.details,t.className)}))}function Me(e){var t=a.Children.toArray(e.children),n=t.find((function(e){return a.isValidElement(e)&&"summary"===e.type})),s=(0,r.jsx)(r.Fragment,{children:t.filter((function(e){return e!==n}))});return(0,r.jsx)(Ee,Object.assign({},e,{summary:n,children:s}))}function Be(e){return(0,r.jsx)(ge.A,Object.assign({},e))}const Ue={containsTaskList:"containsTaskList_mC6p"};function Ie(e){if(void 0!==e)return(0,u.A)(e,(null==e?void 0:e.includes("contains-task-list"))&&Ue.containsTaskList)}const Se={img:"img_ev3q"};function ze(e){var t,n=function(e){var t=a.Children.toArray(e),n=t.find((function(e){return a.isValidElement(e)&&"mdxAdmonitionTitle"===e.type})),s=t.filter((function(e){return e!==n}));return{mdxAdmonitionTitle:null==n?void 0:n.props.children,rest:s.length>0?(0,r.jsx)(r.Fragment,{children:s}):null}}(e.children),s=n.mdxAdmonitionTitle,i=n.rest,o=null!=(t=e.title)?t:s;return Object.assign({},e,o&&{title:o},{children:i})}const Re={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function Ve(e){var t=e.type,n=e.className,a=e.children;return(0,r.jsx)("div",{className:(0,u.A)(j.G.common.admonition,j.G.common.admonitionType(t),Re.admonition,n),children:a})}function De(e){var t=e.icon,n=e.title;return(0,r.jsxs)("div",{className:Re.admonitionHeading,children:[(0,r.jsx)("span",{className:Re.admonitionIcon,children:t}),n]})}function Ge(e){var t=e.children;return t?(0,r.jsx)("div",{className:Re.admonitionContent,children:t}):null}function Pe(e){var t=e.type,n=e.icon,a=e.title,s=e.children,i=e.className;return(0,r.jsxs)(Ve,{type:t,className:i,children:[(0,r.jsx)(De,{title:a,icon:n}),(0,r.jsx)(Ge,{children:s})]})}function Fe(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})}))}var qe={icon:(0,r.jsx)(Fe,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function We(e){return(0,r.jsx)(Pe,Object.assign({},qe,e,{className:(0,u.A)("alert alert--secondary",e.className),children:e.children}))}function $e(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}))}var Ze={icon:(0,r.jsx)($e,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function Ye(e){return(0,r.jsx)(Pe,Object.assign({},Ze,e,{className:(0,u.A)("alert alert--success",e.className),children:e.children}))}function Je(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}))}var Qe={icon:(0,r.jsx)(Je,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function Xe(e){return(0,r.jsx)(Pe,Object.assign({},Qe,e,{className:(0,u.A)("alert alert--info",e.className),children:e.children}))}function Ke(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 16 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}))}var et={icon:(0,r.jsx)(Ke,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function tt(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}))}var nt={icon:(0,r.jsx)(tt,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};var at={icon:(0,r.jsx)(Ke,{}),title:(0,r.jsx)(h.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};var st={note:We,tip:Ye,info:Xe,warning:function(e){return(0,r.jsx)(Pe,Object.assign({},et,e,{className:(0,u.A)("alert alert--warning",e.className),children:e.children}))},danger:function(e){return(0,r.jsx)(Pe,Object.assign({},nt,e,{className:(0,u.A)("alert alert--danger",e.className),children:e.children}))}},it={secondary:function(e){return(0,r.jsx)(We,Object.assign({title:"secondary"},e))},important:function(e){return(0,r.jsx)(Xe,Object.assign({title:"important"},e))},success:function(e){return(0,r.jsx)(Ye,Object.assign({title:"success"},e))},caution:function(e){return(0,r.jsx)(Pe,Object.assign({},at,e,{className:(0,u.A)("alert alert--warning",e.className),children:e.children}))}};const rt=Object.assign({},st,it);function ot(e){var t,n=ze(e),a=(t=n.type,rt[t]||(console.warn('No admonition component found for admonition type "'+t+'". Using Info as fallback.'),rt.info));return(0,r.jsx)(a,Object.assign({},n))}const lt={Head:xe.A,details:Me,Details:Me,code:function(e){return function(e){return void 0!==e.children&&a.Children.toArray(e.children).every((function(e){return"string"==typeof e&&!e.includes("\n")}))}(e)?(0,r.jsx)(Ae,Object.assign({},e)):(0,r.jsx)(je.A,Object.assign({},e))},a:function(e){return(0,r.jsx)(v.A,Object.assign({},e))},pre:function(e){return(0,r.jsx)(r.Fragment,{children:e.children})},ul:function(e){return(0,r.jsx)("ul",Object.assign({},e,{className:Ie(e.className)}))},li:function(e){return(0,Ce.A)().collectAnchor(e.id),(0,r.jsx)("li",Object.assign({},e))},img:function(e){return(0,r.jsx)("img",Object.assign({decoding:"async",loading:"lazy"},e,{className:(t=e.className,(0,u.A)(t,Se.img))}));var t},h1:function(e){return(0,r.jsx)(Be,Object.assign({as:"h1"},e))},h2:function(e){return(0,r.jsx)(Be,Object.assign({as:"h2"},e))},h3:function(e){return(0,r.jsx)(Be,Object.assign({as:"h3"},e))},h4:function(e){return(0,r.jsx)(Be,Object.assign({as:"h4"},e))},h5:function(e){return(0,r.jsx)(Be,Object.assign({as:"h5"},e))},h6:function(e){return(0,r.jsx)(Be,Object.assign({as:"h6"},e))},admonition:ot,mermaid:function(){return null}};function ct(e){var t=e.children;return(0,r.jsx)(pe.x,{components:lt,children:t})}function dt(e){var t,n,a,s,i=e.children,o=(t=c(),n=t.metadata,a=t.frontMatter,s=t.contentTitle,a.hide_title||void 0!==s?null:n.title);return(0,r.jsxs)("div",{className:(0,u.A)(j.G.docs.docMarkdown,"markdown"),children:[o&&(0,r.jsx)("header",{children:(0,r.jsx)(ge.A,{as:"h1",children:o})}),(0,r.jsx)(ct,{children:i})]})}var ut=n(2060),mt=n(260),ht=n(8180);function vt(e){return(0,r.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,r.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})}))}const ft={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function bt(){var e=(0,ht.A)("/");return(0,r.jsx)("li",{className:"breadcrumbs__item",children:(0,r.jsx)(v.A,{"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,r.jsx)(vt,{className:ft.breadcrumbHomeIcon})})})}const gt={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function pt(e){var t=e.children,n=e.href,a="breadcrumbs__link";return e.isLast?(0,r.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,r.jsx)(v.A,{className:a,href:n,itemProp:"item",children:(0,r.jsx)("span",{itemProp:"name",children:t})}):(0,r.jsx)("span",{className:a,children:t})}function xt(e){var t=e.children,n=e.active,a=e.index,s=e.addMicrodata;return(0,r.jsxs)("li",Object.assign({},s&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,u.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,r.jsx)("meta",{itemProp:"position",content:String(a+1)})]}))}function jt(){var e=(0,ut.OF)(),t=(0,mt.Dt)();return e?(0,r.jsx)("nav",{className:(0,u.A)(j.G.docs.docBreadcrumbs,gt.breadcrumbsContainer),"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,r.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,r.jsx)(bt,{}),e.map((function(t,n){var a=n===e.length-1,s="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,r.jsx)(xt,{active:a,index:n,addMicrodata:!!s,children:(0,r.jsx)(pt,{href:s,isLast:a,children:t.label})},n)}))]})}):null}function At(){return(0,r.jsx)(h.A,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Nt(){return(0,r.jsx)(h.A,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Ct(){return(0,r.jsx)(xe.A,{children:(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Lt(e){var t=e.className;return(0,r.jsx)(ot,{type:"caution",title:(0,r.jsx)(At,{}),className:(0,u.A)(t,j.G.common.unlistedBanner),children:(0,r.jsx)(Nt,{})})}function yt(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ct,{}),(0,r.jsx)(Lt,Object.assign({},e))]})}const _t={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function kt(e){var t,n,a,s,i,o,l=e.children,d=(t=c(),n=t.frontMatter,a=t.toc,s=(0,m.l)(),i=n.hide_table_of_contents,o=!i&&a.length>0,{hidden:i,mobile:o?(0,r.jsx)(de,{}):void 0,desktop:!o||"desktop"!==s&&"ssr"!==s?void 0:(0,r.jsx)(be,{})}),h=c().metadata.unlisted;return(0,r.jsxs)("div",{className:"row",children:[(0,r.jsxs)("div",{className:(0,u.A)("col",!d.hidden&&_t.docItemCol),children:[h&&(0,r.jsx)(yt,{}),(0,r.jsx)(k,{}),(0,r.jsxs)("div",{className:_t.docItemContainer,children:[(0,r.jsxs)("article",{children:[(0,r.jsx)(jt,{}),(0,r.jsx)(O,{}),d.mobile,(0,r.jsx)(dt,{children:l}),(0,r.jsx)(F,{})]}),(0,r.jsx)(g,{})]})]}),d.desktop&&(0,r.jsx)("div",{className:"col col--3",children:d.desktop})]})}function Ot(e){var t="docs-doc-id-"+e.content.metadata.id,n=e.content;return(0,r.jsx)(l,{content:e.content,children:(0,r.jsxs)(s.e3,{className:t,children:[(0,r.jsx)(d,{}),(0,r.jsx)(kt,{children:(0,r.jsx)(n,{})})]})})}},2578:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});n(6540);var a=n(4848);function s(e){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,a.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})}))}},2030:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});n(6540);var a=n(4848);function s(e){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,a.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}))}},8119:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});n(6540);var a=n(4848);function s(e){return(0,a.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,a.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})}))}},6419:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});var a=n(6540),s=n(7094),i={attributes:!0,characterData:!0,childList:!0,subtree:!0};function r(e,t){var n=(0,a.useState)(),r=n[0],o=n[1],l=(0,a.useCallback)((function(){var t;o(null==(t=e.current)?void 0:t.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,a.useEffect)((function(){l()}),[l]),function(e,t,n){void 0===n&&(n=i);var r=(0,s._q)(t),o=(0,s.Be)(n);(0,a.useEffect)((function(){var t=new MutationObserver(r);return e&&t.observe(e,o),function(){return t.disconnect()}}),[e,r,o])}(r,(function(e){e.forEach((function(e){"attributes"===e.type&&"hidden"===e.attributeName&&(t(),l())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}function o(){var e=(0,a.useState)(!1),t=e[0],n=e[1],s=(0,a.useState)(!1),i=s[0],o=s[1],l=(0,a.useRef)(null),c=(0,a.useCallback)((function(){var e=l.current.querySelector("code");t?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),n((function(e){return!e}))}),[l,t]),d=(0,a.useCallback)((function(){var e=l.current,t=e.scrollWidth>e.clientWidth||l.current.querySelector("code").hasAttribute("style");o(t)}),[l]);return r(l,d),(0,a.useEffect)((function(){d()}),[t,d]),(0,a.useEffect)((function(){return window.addEventListener("resize",d,{passive:!0}),function(){window.removeEventListener("resize",d)}}),[d]),{codeBlockRef:l,isEnabled:t,isCodeScrollable:i,toggle:c}}},4631:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(7710),s=n(6957);function i(){var e=(0,s.p)().prism,t=(0,a.G)().colorMode,n=e.theme,i=e.darkTheme||n;return"dark"===t?i:n}},9292:(e,t,n)=>{"use strict";n.d(t,{Li:()=>f,M$:()=>b,Op:()=>v,_u:()=>h,wt:()=>m});var a=n(17),s=n(8426),i=n.n(s),r=(0,a.A)(/title=(["'])(.*?)\1/,{quote:1,title:2}),o=(0,a.A)(/\{([\d,-]+)\}/,{range:1}),l={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},c=Object.assign({},l,{lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}}),d=Object.keys(l);function u(e,t){var n=e.map((function(e){var n=c[e],a=n.start,s=n.end;return"(?:"+a+"\\s*("+t.flatMap((function(e){var t,n;return[e.line,null==(t=e.block)?void 0:t.start,null==(n=e.block)?void 0:n.end].filter(Boolean)})).join("|")+")\\s*"+s+")"})).join("|");return new RegExp("^\\s*(?:"+n+")\\s*$")}function m(e){var t,n;return null!=(t=null==e||null==(n=e.match(r))?void 0:n.groups.title)?t:""}function h(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}function v(e){var t=e.split(" ").find((function(e){return e.startsWith("language-")}));return null==t?void 0:t.replace(/language-/,"")}function f(e,t){var n=e.replace(/\n$/,""),a=t.language,s=t.magicComments,r=t.metastring;if(r&&o.test(r)){var l=r.match(o).groups.range;if(0===s.length)throw new Error("A highlight range has been given in code block's metastring (``` "+r+"), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.");var c=s[0].className,m=i()(l).filter((function(e){return e>0})).map((function(e){return[e-1,[c]]}));return{lineClassNames:Object.fromEntries(m),code:n}}if(void 0===a)return{lineClassNames:{},code:n};for(var h=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return u(["js","jsBlock"],t);case"jsx":case"tsx":return u(["js","jsBlock","jsx"],t);case"html":return u(["js","jsBlock","html"],t);case"python":case"py":case"bash":return u(["bash"],t);case"markdown":case"md":return u(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return u(["tex"],t);case"lua":case"haskell":case"sql":return u(["lua"],t);case"wasm":return u(["wasm"],t);case"vb":case"vba":case"visual-basic":return u(["vb","rem"],t);case"vbnet":return u(["vbnet","rem"],t);case"batch":return u(["rem"],t);case"basic":return u(["rem","f90"],t);case"fsharp":return u(["js","ml"],t);case"ocaml":case"sml":return u(["ml"],t);case"fortran":return u(["f90"],t);case"cobol":return u(["cobol"],t);default:return u(d,t)}}(a,s),v=n.split("\n"),f=Object.fromEntries(s.map((function(e){return[e.className,{start:0,range:""}]}))),b=Object.fromEntries(s.filter((function(e){return e.line})).map((function(e){var t=e.className;return[e.line,t]}))),g=Object.fromEntries(s.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.start,t]}))),p=Object.fromEntries(s.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.end,t]}))),x=0;x{function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,s,i]=t;if(a&&i){a=parseInt(a),i=parseInt(i);const e=a{"use strict";n.d(t,{R:()=>r,x:()=>o});var a=n(6540);const s={},i=a.createContext(s);function r(e){const t=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),a.createElement(i.Provider,{value:t},e.children)}},6316:(e,t,n)=>{"use strict";function a(e,t){var n=(void 0===t?{}:t).target,a=void 0===n?document.body:n;if("string"!=typeof e)throw new TypeError("Expected parameter `text` to be a `string`, got `"+typeof e+"`.");var s=document.createElement("textarea"),i=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";var r=document.getSelection(),o=r.rangeCount>0&&r.getRangeAt(0);a.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;var l=!1;try{l=document.execCommand("copy")}catch(c){}return s.remove(),o&&(r.removeAllRanges(),r.addRange(o)),i&&i.focus(),l}n.d(t,{A:()=>a})}}]); \ No newline at end of file diff --git a/assets/js/44baab47.808867b2.js b/assets/js/44baab47.7f86ed28.js similarity index 98% rename from assets/js/44baab47.808867b2.js rename to assets/js/44baab47.7f86ed28.js index fe57ad0e4..de42d645b 100644 --- a/assets/js/44baab47.808867b2.js +++ b/assets/js/44baab47.7f86ed28.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[198],{4516:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var r=t(4848),i=t(8453);const o={id:"ckb-vm",title:"CKB-VM",sidebar_position:3},s=void 0,a={id:"concepts/ckb-vm",title:"CKB-VM",description:"Nervos introduces CKB-VM, a virtual machine powered by the RISC-V instruction set, further leveraging Turing-complete programmability, transforming smart contract execution on the Nervos blockchain. It provides considerable amount of power and flexibility while maintaining a secure and high-performance environment.",source:"@site/docs/concepts/ckb-vm.md",sourceDirName:"concepts",slug:"/concepts/ckb-vm",permalink:"/docs/concepts/ckb-vm",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/ckb-vm.md",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:3,frontMatter:{id:"ckb-vm",title:"CKB-VM",sidebar_position:3},sidebar:"tutorial",previous:{title:"Cell Model",permalink:"/docs/concepts/cell-model"},next:{title:"Consensus",permalink:"/docs/concepts/consensus"}},c={},d=[{value:"RISC-V",id:"risc-v",level:2},{value:"Enhanced Flexibility and Simplified Development Experience",id:"enhanced-flexibility-and-simplified-development-experience",level:2}];function l(e){const n={a:"a",h2:"h2",hr:"hr",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Nervos introduces CKB-VM, a virtual machine powered by the RISC-V instruction set, further leveraging Turing-complete programmability, transforming smart contract execution on the Nervos blockchain. It provides considerable amount of power and flexibility while maintaining a secure and high-performance environment."}),"\n",(0,r.jsx)(n.h2,{id:"risc-v",children:"RISC-V"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://riscv.org/",children:"RISC-V"})," is an instruction set architecture that serves as the foundation for processor design. As the lowest level of the software stack, it directly provides raw instructions to the CPU. RISC-V standard is mature, established, and built for modern hardware development. Underscored by widespread recognition, RISC-V offers a modular, backward-compatible design ideal for blockchain development."]}),"\n",(0,r.jsx)(n.h2,{id:"enhanced-flexibility-and-simplified-development-experience",children:"Enhanced Flexibility and Simplified Development Experience"}),"\n",(0,r.jsx)(n.p,{children:"With CKB-VM, developers can seamlessly integrate cryptographic primitives (e.g., Schnorr, BLS, zk-SNARKs, and zk-STARKs) into smart contracts without hardforks. The process is as simple as adding a new library to your codebase. This fasters a smoother developer experience, accelerating the adoption of advanced technologies, such as cross-chain interaction, scaling innovations, and seamless integration with secure hardware enclaves."}),"\n",(0,r.jsx)(n.p,{children:"Any programming language that can target RISC-V can be used natively for development on Nervos. From JavaScript to Rust, developers can utilize preferred tools and languages, eliminating the need for untested tooling and enabling efficient, secure smart contract deployment."}),"\n",(0,r.jsx)(n.p,{children:"Nervos CKB offers native SDKs in several mainstream programming languages, such as JavaScript, Rust, Go, Java, and Ruby."}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsxs)(n.p,{children:["For more information on CKB-VM, please refer to the\xa0",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0003-ckb-vm/0003-ckb-vm.md",children:"RFC CKB-VM"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>a});var r=t(6540);const i={},o=r.createContext(i);function s(e){const n=r.useContext(o);return r.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(i):e.components||i:s(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[198],{4516:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var r=t(4848),i=t(8453);const o={id:"ckb-vm",title:"CKB-VM",sidebar_position:3},s=void 0,a={id:"concepts/ckb-vm",title:"CKB-VM",description:"Nervos introduces CKB-VM, a virtual machine powered by the RISC-V instruction set, further leveraging Turing-complete programmability, transforming smart contract execution on the Nervos blockchain. It provides considerable amount of power and flexibility while maintaining a secure and high-performance environment.",source:"@site/docs/concepts/ckb-vm.md",sourceDirName:"concepts",slug:"/concepts/ckb-vm",permalink:"/docs/concepts/ckb-vm",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/ckb-vm.md",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:3,frontMatter:{id:"ckb-vm",title:"CKB-VM",sidebar_position:3},sidebar:"tutorial",previous:{title:"Cell Model",permalink:"/docs/concepts/cell-model"},next:{title:"Consensus",permalink:"/docs/concepts/consensus"}},c={},d=[{value:"RISC-V",id:"risc-v",level:2},{value:"Enhanced Flexibility and Simplified Development Experience",id:"enhanced-flexibility-and-simplified-development-experience",level:2}];function l(e){const n={a:"a",h2:"h2",hr:"hr",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Nervos introduces CKB-VM, a virtual machine powered by the RISC-V instruction set, further leveraging Turing-complete programmability, transforming smart contract execution on the Nervos blockchain. It provides considerable amount of power and flexibility while maintaining a secure and high-performance environment."}),"\n",(0,r.jsx)(n.h2,{id:"risc-v",children:"RISC-V"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://riscv.org/",children:"RISC-V"})," is an instruction set architecture that serves as the foundation for processor design. As the lowest level of the software stack, it directly provides raw instructions to the CPU. RISC-V standard is mature, established, and built for modern hardware development. Underscored by widespread recognition, RISC-V offers a modular, backward-compatible design ideal for blockchain development."]}),"\n",(0,r.jsx)(n.h2,{id:"enhanced-flexibility-and-simplified-development-experience",children:"Enhanced Flexibility and Simplified Development Experience"}),"\n",(0,r.jsx)(n.p,{children:"With CKB-VM, developers can seamlessly integrate cryptographic primitives (e.g., Schnorr, BLS, zk-SNARKs, and zk-STARKs) into smart contracts without hardforks. The process is as simple as adding a new library to your codebase. This fasters a smoother developer experience, accelerating the adoption of advanced technologies, such as cross-chain interaction, scaling innovations, and seamless integration with secure hardware enclaves."}),"\n",(0,r.jsx)(n.p,{children:"Any programming language that can target RISC-V can be used natively for development on Nervos. From JavaScript to Rust, developers can utilize preferred tools and languages, eliminating the need for untested tooling and enabling efficient, secure smart contract deployment."}),"\n",(0,r.jsx)(n.p,{children:"Nervos CKB offers native SDKs in several mainstream programming languages, such as JavaScript, Rust, Go, Java, and Ruby."}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsxs)(n.p,{children:["For more information on CKB-VM, please refer to the\xa0",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0003-ckb-vm/0003-ckb-vm.md",children:"RFC CKB-VM"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>a});var r=t(6540);const i={},o=r.createContext(i);function s(e){const n=r.useContext(o);return r.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(i):e.components||i:s(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4a45b4ac.9676d666.js b/assets/js/4a45b4ac.30dd3c94.js similarity index 99% rename from assets/js/4a45b4ac.9676d666.js rename to assets/js/4a45b4ac.30dd3c94.js index 6a8684d49..973b8aac6 100644 --- a/assets/js/4a45b4ac.9676d666.js +++ b/assets/js/4a45b4ac.30dd3c94.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[17],{7152:(e,n,t)=>{t.d(n,{Ay:()=>o});var s=t(4848),r=t(8453);function a(e){const n={a:"a",code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"So now your app works great on the local blockchain, you might want to switch it to different environments like Testnet and Mainnet."}),"\n",(0,s.jsx)(n.p,{children:"To do this, you need to update the chain config and related code."}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"ckb.ts"})," in your project root dir, change the ",(0,s.jsx)(n.code,{children:"lumosConfig"})," and ",(0,s.jsx)(n.code,{children:"CKB_RPC_URL"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"//export const lumosConfig: config.Config = devConfig as config.Config;\nexport const lumosConfig = config.predefined.AGGRON4 as config.Config;\n\n//export const CKB_RPC_URL = 'http://localhost:8114';\nexport const CKB_RPC_URL = \"https://testnet.ckb.dev/rpc\";\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Actually, we have the corresponding Testnet version examples for all these tutorials. The source code of the Testnet version is in ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples",children:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples"}),", you can clone the repo and start running on Testnet."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/docs.nervos.org.git\ncd docs.nervos.org/examples/\nyarn && yarn start\n"})}),"\n",(0,s.jsxs)(n.p,{children:["For more details, check out the ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/blob/develop/examples/simple-transfer/README.md",children:"README.md"}),";"]})]})}function o(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},6987:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>f,contentTitle:()=>h,default:()=>m,frontMatter:()=>u,metadata:()=>p,toc:()=>g});var s=t(4848),r=t(8453),a=t(9489),o=t(7227),i=t(8652),c=t(9735),l=t(2861),d=t(7152);const u={id:"transfer-ckb",title:"Tutorial: Transfer CKB",sidebar_position:2},h="View and Transfer a CKB Balance",p={id:"getting-started/transfer-ckb",title:"Tutorial: Transfer CKB",description:"\n"})}),"\n",(0,s.jsxs)(n.p,{children:["When prompted to select a dApp template, use your arrow keys to select ",(0,s.jsx)(n.strong,{children:"View and Transfer a CKB Balance"})," for this tutorial."]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"offckb-init",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:"{2}",children:"? Select a dApp template (Use arrow keys)\n> View and Transfer a CKB Balance\n Write an On-Chain Message\n Create a Fungible Token\n Create a Digital Object Using Spore Protocol\nA simple dApp to check CKB balance and transfer CKB\n"})})}),(0,s.jsx)(o.A,{value:"offckb-init-result",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"init CKB dApp project: /Users/ckb/Desktop/offckb/\n\u2728 Done in 2.52s.\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"step-2-start-the-devnet",children:"Step 2: Start the Devnet"}),"\n",(0,s.jsx)(l.A,{imageSrc:"img/dapps/transfer-dapp.jpg"}),"\n",(0,s.jsx)(n.h2,{id:"behind-the-scene",children:"Behind the Scene"}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"lib.ts"})," file in your project and check out the ",(0,s.jsx)(n.code,{children:"generateAccountFromPrivateKey"})," function:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'export const generateAccountFromPrivateKey = (privKey: string): Account => {\n const pubKey = hd.key.privateToPublic(privKey);\n const args = hd.key.publicKeyToBlake160(pubKey);\n const template = lumosConfig.SCRIPTS["SECP256K1_BLAKE160"]!;\n const lockScript = {\n codeHash: template.CODE_HASH,\n hashType: template.HASH_TYPE,\n args: args,\n };\n const address = helpers.encodeToAddress(lockScript, { config: lumosConfig });\n return {\n lockScript,\n address,\n pubKey,\n };\n};\n'})}),"\n",(0,s.jsxs)(n.p,{children:["What this function does is generate the account's public key and address via a private key. Here, we need to construct and encode a ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#lock-script",children:"lock script"})," to obtain the corresponding address of this account. A lock script ensures that only the owner can consume their Live Cells."]}),"\n",(0,s.jsxs)(n.p,{children:["Here, we use the CKB standard lock script template, combining the ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#secp256k1blake160",children:"SECP256K1"})," signing algorithm with the BLAKE160 hashing algorithm, to build such a lock script. Note that different templates will yield different addresses when encoding the address, corresponding to different types of guard for the assets."]}),"\n",(0,s.jsx)(n.p,{children:"Once we have the lock script of an account, we can determine how much balance the account has. The calculation is straightforward; we query and find all the Cells that use the same lock script and sum all these Cells' capacities; the sum is the balance."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"export async function capacityOf(address: string): Promise {\n const collector = indexer.collector({\n lock: helpers.parseAddress(address, { config: lumosConfig }),\n });\n\n let balance = BI.from(0);\n for await (const cell of collector.collect()) {\n balance = balance.add(cell.cellOutput.capacity);\n }\n\n return balance;\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["In Nervos CKB, ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#shannon",children:"Shannon"})," is the smallest currency unit, with 1 CKB equaling 10^8 Shannon. This unit system is similar to Bitcoin's Satoshis, where 1 Bitcoin = 10^8 Satoshis. Note that in this tutorial, we use only the Shannon unit."]}),"\n",(0,s.jsxs)(n.p,{children:["Next, we can start to transfer balance. Check out the transfer function in ",(0,s.jsx)(n.code,{children:"lib.ts"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"//CKB To Shannon\ninterface Options {\n from: string;\n to: string;\n amount: string;\n privKey: string;\n}\n\nexport async function transfer(options: Options): Promise;\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"transfer"})," function accepts an ",(0,s.jsx)(n.code,{children:"Option"})," parameter, which includes necessary information about the transfer such as ",(0,s.jsx)(n.code,{children:"fromAddress"}),", ",(0,s.jsx)(n.code,{children:"toAddress"}),", ",(0,s.jsx)(n.code,{children:"amount"}),", and the ",(0,s.jsx)(n.code,{children:"privateKey"})," to sign the transfer transaction."]}),"\n",(0,s.jsxs)(n.p,{children:["What this transfer transaction does is collect and consume as many capacities as needed with some ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#live-cell",children:"Live Cells"})," as the input Cells and produce some new output Cells. The lock script of all these new Cells is set to the new owner's lock script for another account. In this way, the CKB balance is transferred from one account to another, marking the transition of Cells from old to new."]}),"\n",(0,s.jsxs)(n.p,{children:["Next, let's build the transaction for transferring the balance. The first step is to create an empty ",(0,s.jsx)(n.code,{children:"txSkeleton"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"let txSkeleton = helpers.TransactionSkeleton({});\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Then we determine the total capacities required for our transaction including ",(0,s.jsx)(n.code,{children:"Transfer Amount + Transaction Fee"}),", here we set the transaction fee as ",(0,s.jsx)(n.code,{children:"100000"})," Shannon."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"const neededCapacity = BI.from(options.amount).add(100000);\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Then we retrieve the sender account's assets from blockchain RPC with the help of ",(0,s.jsx)(n.code,{children:"indexer"})," and collect the transaction's inputs Cells"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const fromScript = helpers.parseAddress(options.from, {\n config: lumosConfig,\n});\n\nlet collectedSum = BI.from(0);\nconst collected: Cell[] = [];\nconst collector = indexer.collector({ lock: fromScript, type: "empty" });\nfor await (const cell of collector.collect()) {\n collectedSum = collectedSum.add(cell.cellOutput.capacity);\n collected.push(cell);\n if (collectedSum >= neededCapacity) break;\n}\n\nif (collectedSum.lt(neededCapacity)) {\n throw new Error(`Not enough CKB, ${collectedSum} < ${neededCapacity}`);\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Now, let's create the transaction's output Cells:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"transferOutput"}),": Generated based on the desired transfer amount by the user."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"changeOutput"}),": Represents the remaining balance after completing the transaction."]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const toScript = helpers.parseAddress(options.to, { config: lumosConfig });\n\nconst transferOutput: Cell = {\n cellOutput: {\n capacity: BI.from(options.amount).toHexString(),\n lock: toScript,\n },\n data: "0x",\n};\n\nconst changeOutput: Cell = {\n cellOutput: {\n capacity: collectedSum.sub(neededCapacity).toHexString(),\n lock: fromScript,\n },\n data: "0x",\n};\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Then, we need to add Inputs and Outputs to the created ",(0,s.jsx)(n.code,{children:"txSkeleton"}),". Additionally, we add ",(0,s.jsx)(n.code,{children:"Cell Deps"}),", which contain an ",(0,s.jsx)(n.code,{children:"OutPoint"})," pointing to some specific Live Cells. These Cells are related to the transaction and can be used as dependencies to place code that will be loaded and executed by the ",(0,s.jsx)(n.code,{children:"ckb-vm"})," or to place data that can be used for on-chain script execution."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'txSkeleton = txSkeleton.update("inputs", (inputs) => inputs.push(...collected));\ntxSkeleton = txSkeleton.update("outputs", (outputs) =>\n outputs.push(transferOutput, changeOutput)\n);\ntxSkeleton = txSkeleton.update("cellDeps", (cellDeps) =>\n cellDeps.push({\n outPoint: {\n txHash: lumosConfig.SCRIPTS.SECP256K1_BLAKE160.TX_HASH,\n index: lumosConfig.SCRIPTS.SECP256K1_BLAKE160.INDEX,\n },\n depType: lumosConfig.SCRIPTS.SECP256K1_BLAKE160.DEP_TYPE,\n })\n);\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Next, update specific ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#witness",children:"witness"})," data in the transaction. The witness serves as a place to input data such as signatures for the transaction to be verified on the blockchain. The format of the witness data is flexible; however, in this instance, we adhere to the ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/blob/1df5f2c1cbf07e04622fb8faa5b152c1af7ae341/util/types/schemas/blockchain.mol#L106",children:"WitnessArgs"})," specification for basic transaction structure. It is important to note that this specification may evolve to reflect best practices."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"witnessArgs"})," consists of 3 distinct parts, each corresponding to the different data required for the execution of specific scripts:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"export interface WitnessArgs {\n lock?: HexString; // lock scripts of the input Cells\n inputType?: HexString; // type scripts of the input Cells\n outputType?: HexString; // type scripts of the output Cells\n}\n"})}),"\n",(0,s.jsx)(n.p,{children:"We update the witness part according to the transaction structure."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const firstIndex = txSkeleton\n .get("inputs")\n .findIndex((input) =>\n bytes.equal(\n blockchain.Script.pack(input.cellOutput.lock),\n blockchain.Script.pack(fromScript)\n )\n );\nif (firstIndex !== -1) {\n while (firstIndex >= txSkeleton.get("witnesses").size) {\n txSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.push("0x")\n );\n }\n let witness: string = txSkeleton.get("witnesses").get(firstIndex)!;\n const newWitnessArgs: WitnessArgs = {\n /* 65-byte zeros in hex */\n lock: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n };\n if (witness !== "0x") {\n const witnessArgs = blockchain.WitnessArgs.unpack(bytes.bytify(witness));\n const lock = witnessArgs.lock;\n if (\n !!lock &&\n !!newWitnessArgs.lock &&\n !bytes.equal(lock, newWitnessArgs.lock)\n ) {\n throw new Error(\n "Lock field in first witness is set aside for signature!"\n );\n }\n const inputType = witnessArgs.inputType;\n if (!!inputType) {\n newWitnessArgs.inputType = inputType;\n }\n const outputType = witnessArgs.outputType;\n if (!!outputType) {\n newWitnessArgs.outputType = outputType;\n }\n }\n witness = bytes.hexify(blockchain.WitnessArgs.pack(newWitnessArgs));\n txSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.set(firstIndex, witness)\n );\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Next, we need to sign the transaction. But before that we will create a signing message."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Generate signingEntries based on the transaction's Inputs and Outputs"}),"\n",(0,s.jsx)(n.li,{children:"Retrieve the signature message"}),"\n",(0,s.jsx)(n.li,{children:"Use the private key to sign the message recoverably, including the signature information and necessary metadata for subsequent signature verification processes"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'txSkeleton = commons.common.prepareSigningEntries(txSkeleton);\nconst message = txSkeleton.get("signingEntries").get(0)?.message;\nconst Sig = hd.key.signRecoverable(message!, options.privKey);\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Now let's seal our transaction with the ",(0,s.jsx)(n.code,{children:"txSkeleton"})," and the just-generated signature"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"const tx = helpers.sealTransaction(txSkeleton, [Sig]);\n"})}),"\n",(0,s.jsx)(n.p,{children:"Send the transaction"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const hash = await rpc.sendTransaction(tx, "passthrough");\n'})}),"\n",(0,s.jsx)(n.p,{children:"You can open the console on the browser to see the full transaction to confirm the process."}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,s.jsx)(n.p,{children:"By following this tutorial this far, you have mastered how transfer balance works on CKB. Here's a quick recap:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Capacity of the Cell means how much CKB balance you have and how much data can be stored in this Cell at the same time"}),"\n",(0,s.jsx)(n.li,{children:"To build a CKB transaction is just to collecting some Live Cells and producing some new Cells."}),"\n",(0,s.jsxs)(n.li,{children:["We follow the ",(0,s.jsx)(n.code,{children:"witnessArgs"})," to place the needed signature or any other data in the transaction."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"next-step",children:"Next Step"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsx)(n.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["CKB transaction structure: ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,s.jsxs)(n.li,{children:["CKB data structure basics: ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}},2861:(e,n,t)=>{t.d(n,{A:()=>p});var s=t(6540),r=t(4848),a=t(8453),o=t(9489),i=t(7227);const c={imgContainer:"imgContainer_VuXx"};function l(e){var n=e.alt,t=e.src;return(0,r.jsx)("div",{className:c.imgContainer,children:(0,r.jsx)("img",{alt:n,src:t})})}var d=t(8180);function u(e){const n={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"To interact with the dApp, you need to have your Devnet running. Open one terminal and start the Devnet:"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"offckb-node",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb node\n"})})}),(0,r.jsx)(i.A,{value:"offckb-node-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:"You might want to check pre-funded accounts and copy private keys for later use. Open another terminal and execute:"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"offckb-accounts",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb accounts\n"})})}),(0,r.jsx)(i.A,{value:"offckb-accounts-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Print account list, each account is funded with 42_000_000_00000000 capacity in the genesis block.\n[\n {\n privkey: '0x6109170b275a09ad54877b82f7d9930f88cab5717d484fb4741ae9d1dd078cd6',\n pubkey: '0x02025fa7b61b2365aa459807b84df065f1949d58c0ae590ff22dd2595157bffefa',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvwg2cen8extgq8s5puft8vf40px3f599cytcyd8',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n {\n privkey: '0x9f315d5a9618a39fdc487c7a67a8581d40b045bd7a42d83648ca80ef3b2cb4a1',\n pubkey: '0x026efa0579f09cc7c1129b78544f70098c90b2ab155c10746316f945829c034a2d',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt435c3epyrupszm7khk6weq5lrlyt52lg48ucew',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n #... \n]\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-3-run-the-example",children:"Step 3: Run the Example"}),"\n",(0,r.jsx)(n.p,{children:"Navigate to your project, install the node dependencies, and start running the example:"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"offckb-yarn-start",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"cd && yarn && yarn start\n"})})}),(0,r.jsx)(i.A,{value:"offckb-yarn-start-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"$ parcel index.html\nServer running at http://localhost:1234\n\u2728 Built in 66ms\n"})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Now, the app is running in ",(0,r.jsx)(n.a,{href:"http://localhost:1234",children:"http://localhost:1234"})]}),"\n",(0,r.jsx)(l,{src:(0,d.A)(e.imageSrc)}),"\n",(0,r.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}const p=function(e){return(0,s.createElement)(h,e)}},9735:(e,n,t)=>{t.d(n,{Bo:()=>a,Hd:()=>c,bB:()=>i,pv:()=>o});var s=t(4783),r=t(4848),a={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"},{label:"Witness",link:"/docs/concepts/glossary#witness"},{label:"Signature",link:"/docs/concepts/glossary#cryptographic-signature"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},o={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Data",link:"/docs/concepts/glossary#data"},{label:"Transaction Hash",link:"/docs/concepts/glossary#transaction-hash"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},i={time:"5 - 10 min",topics:[{label:"UDT",link:"/docs/concepts/glossary#udt"},{label:"Fungible Token",link:"/docs/concepts/glossary#fungible-token"},{label:"xUDT",link:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},c={time:"5 - 10 min",topics:[{label:"DOB",link:"/docs/concepts/glossary#digital-object-dob"},{label:"NFT",link:"/docs/concepts/glossary#non-fungible-token"},{label:"Spore Protocol",link:"https://spore.pro"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]}},7227:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var s=t(8215);const r={tabItem:"tabItem_Ymn6"};var a=t(4848);function o(e){var n=e.children,t=e.hidden,o=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,o),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>y});var s=t(6540),r=t(8215),a=t(4245),o=t(6347),i=t(6494),c=t(2814),l=t(5167),d=t(1269);function u(e){var n,t;return null!=(n=null==(t=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,l.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,a=(0,o.W6)(),i=function(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:r});return[(0,c.aZ)(i),(0,s.useCallback)((function(e){if(i){var n=new URLSearchParams(a.location.search);n.set(i,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[i,a])]}function g(e){var n,t,r,a,o=e.defaultValue,c=e.queryString,l=void 0!==c&&c,u=e.groupId,g=h(e),x=(0,s.useState)((function(){return function(e){var n,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:o,tabValues:g})})),m=x[0],b=x[1],j=f({queryString:l,groupId:u}),v=j[0],k=j[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),r=t[0],a=t[1],[r,(0,s.useCallback)((function(e){n&&a.set(e)}),[n,a])]),w=y[0],C=y[1],S=function(){var e=null!=v?v:w;return p({value:e,tabValues:g})?e:null}();return(0,i.A)((function(){S&&b(S)}),[S]),{selectedValue:m,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);b(e),k(e),C(e)}),[k,C,g]),tabValues:g}}var x=t(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(4848);function j(e){var n=e.className,t=e.block,s=e.selectedValue,o=e.selectValue,i=e.tabValues,c=[],l=(0,a.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=c.indexOf(n),r=i[t].value;r!==s&&(l(n),o(r))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,r=c.indexOf(e.currentTarget)+1;t=null!=(s=c[r])?s:c[0];break;case"ArrowLeft":var a,o=c.indexOf(e.currentTarget)-1;t=null!=(a=c[o])?a:c[c.length-1]}null==(n=t)||n.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:i.map((function(e){var n=e.value,t=e.label,a=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return c.push(e)},onKeyDown:u,onClick:d},a,{className:(0,r.A)("tabs__item",m.tabItem,null==a?void 0:a.className,{"tabs__item--active":s===n}),children:null!=t?t:n}),n)}))})}function v(e){var n=e.lazy,t=e.children,r=e.selectedValue,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=a.find((function(e){return e.props.value===r}));return o?(0,s.cloneElement)(o,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:a.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function k(e){var n=g(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,b.jsx)(j,Object.assign({},e,n)),(0,b.jsx)(v,Object.assign({},e,n))]})}function y(e){var n=(0,x.A)();return(0,b.jsx)(k,Object.assign({},e,{children:u(e.children)}),String(n))}},8652:(e,n,t)=>{t.d(n,{A:()=>i});var s=t(6540);const r={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var a=t(4783),o=t(4848);function i(e){var n=e.time,t=e.topics,i=e.tools;return(0,o.jsxs)("div",{className:r.box,children:[(0,o.jsx)("h4",{children:"Tutorial Overview"}),(0,o.jsxs)("div",{className:r.subsection,children:[(0,o.jsx)("strong",{children:"\u23f0 Estimated Time: "}),n]}),t&&(0,o.jsxs)("div",{className:r.subsection,children:[(0,o.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),t.map((function(e,n){return(0,o.jsxs)(s.Fragment,{children:[n>0&&", ",(0,o.jsx)(a.A,{href:e.link,children:e.label})]},n)}))]}),(0,o.jsx)("div",{className:r.subsection,children:(0,o.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,o.jsx)("ul",{className:r.toolList,children:i.map((function(e,n){return(0,o.jsx)("li",{children:e},n)}))})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var s=t(6540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);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(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[17],{7152:(e,n,t)=>{t.d(n,{Ay:()=>o});var s=t(4848),r=t(8453);function a(e){const n={a:"a",code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"So now your app works great on the local blockchain, you might want to switch it to different environments like Testnet and Mainnet."}),"\n",(0,s.jsx)(n.p,{children:"To do this, you need to update the chain config and related code."}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"ckb.ts"})," in your project root dir, change the ",(0,s.jsx)(n.code,{children:"lumosConfig"})," and ",(0,s.jsx)(n.code,{children:"CKB_RPC_URL"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"//export const lumosConfig: config.Config = devConfig as config.Config;\nexport const lumosConfig = config.predefined.AGGRON4 as config.Config;\n\n//export const CKB_RPC_URL = 'http://localhost:8114';\nexport const CKB_RPC_URL = \"https://testnet.ckb.dev/rpc\";\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Actually, we have the corresponding Testnet version examples for all these tutorials. The source code of the Testnet version is in ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples",children:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples"}),", you can clone the repo and start running on Testnet."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/docs.nervos.org.git\ncd docs.nervos.org/examples/\nyarn && yarn start\n"})}),"\n",(0,s.jsxs)(n.p,{children:["For more details, check out the ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/blob/develop/examples/simple-transfer/README.md",children:"README.md"}),";"]})]})}function o(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},6987:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>f,contentTitle:()=>h,default:()=>m,frontMatter:()=>u,metadata:()=>p,toc:()=>g});var s=t(4848),r=t(8453),a=t(9489),o=t(7227),i=t(8652),c=t(9735),l=t(2861),d=t(7152);const u={id:"transfer-ckb",title:"Tutorial: Transfer CKB",sidebar_position:2},h="View and Transfer a CKB Balance",p={id:"getting-started/transfer-ckb",title:"Tutorial: Transfer CKB",description:"\n"})}),"\n",(0,s.jsxs)(n.p,{children:["When prompted to select a dApp template, use your arrow keys to select ",(0,s.jsx)(n.strong,{children:"View and Transfer a CKB Balance"})," for this tutorial."]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"offckb-init",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:"{2}",children:"? Select a dApp template (Use arrow keys)\n> View and Transfer a CKB Balance\n Write an On-Chain Message\n Create a Fungible Token\n Create a Digital Object Using Spore Protocol\nA simple dApp to check CKB balance and transfer CKB\n"})})}),(0,s.jsx)(o.A,{value:"offckb-init-result",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"init CKB dApp project: /Users/ckb/Desktop/offckb/\n\u2728 Done in 2.52s.\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"step-2-start-the-devnet",children:"Step 2: Start the Devnet"}),"\n",(0,s.jsx)(l.A,{imageSrc:"img/dapps/transfer-dapp.jpg"}),"\n",(0,s.jsx)(n.h2,{id:"behind-the-scene",children:"Behind the Scene"}),"\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(n.code,{children:"lib.ts"})," file in your project and check out the ",(0,s.jsx)(n.code,{children:"generateAccountFromPrivateKey"})," function:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'export const generateAccountFromPrivateKey = (privKey: string): Account => {\n const pubKey = hd.key.privateToPublic(privKey);\n const args = hd.key.publicKeyToBlake160(pubKey);\n const template = lumosConfig.SCRIPTS["SECP256K1_BLAKE160"]!;\n const lockScript = {\n codeHash: template.CODE_HASH,\n hashType: template.HASH_TYPE,\n args: args,\n };\n const address = helpers.encodeToAddress(lockScript, { config: lumosConfig });\n return {\n lockScript,\n address,\n pubKey,\n };\n};\n'})}),"\n",(0,s.jsxs)(n.p,{children:["What this function does is generate the account's public key and address via a private key. Here, we need to construct and encode a ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#lock-script",children:"lock script"})," to obtain the corresponding address of this account. A lock script ensures that only the owner can consume their Live Cells."]}),"\n",(0,s.jsxs)(n.p,{children:["Here, we use the CKB standard lock script template, combining the ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#secp256k1blake160",children:"SECP256K1"})," signing algorithm with the BLAKE160 hashing algorithm, to build such a lock script. Note that different templates will yield different addresses when encoding the address, corresponding to different types of guard for the assets."]}),"\n",(0,s.jsx)(n.p,{children:"Once we have the lock script of an account, we can determine how much balance the account has. The calculation is straightforward; we query and find all the Cells that use the same lock script and sum all these Cells' capacities; the sum is the balance."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"export async function capacityOf(address: string): Promise {\n const collector = indexer.collector({\n lock: helpers.parseAddress(address, { config: lumosConfig }),\n });\n\n let balance = BI.from(0);\n for await (const cell of collector.collect()) {\n balance = balance.add(cell.cellOutput.capacity);\n }\n\n return balance;\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["In Nervos CKB, ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#shannon",children:"Shannon"})," is the smallest currency unit, with 1 CKB equaling 10^8 Shannon. This unit system is similar to Bitcoin's Satoshis, where 1 Bitcoin = 10^8 Satoshis. Note that in this tutorial, we use only the Shannon unit."]}),"\n",(0,s.jsxs)(n.p,{children:["Next, we can start to transfer balance. Check out the transfer function in ",(0,s.jsx)(n.code,{children:"lib.ts"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"//CKB To Shannon\ninterface Options {\n from: string;\n to: string;\n amount: string;\n privKey: string;\n}\n\nexport async function transfer(options: Options): Promise;\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"transfer"})," function accepts an ",(0,s.jsx)(n.code,{children:"Option"})," parameter, which includes necessary information about the transfer such as ",(0,s.jsx)(n.code,{children:"fromAddress"}),", ",(0,s.jsx)(n.code,{children:"toAddress"}),", ",(0,s.jsx)(n.code,{children:"amount"}),", and the ",(0,s.jsx)(n.code,{children:"privateKey"})," to sign the transfer transaction."]}),"\n",(0,s.jsxs)(n.p,{children:["What this transfer transaction does is collect and consume as many capacities as needed with some ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#live-cell",children:"Live Cells"})," as the input Cells and produce some new output Cells. The lock script of all these new Cells is set to the new owner's lock script for another account. In this way, the CKB balance is transferred from one account to another, marking the transition of Cells from old to new."]}),"\n",(0,s.jsxs)(n.p,{children:["Next, let's build the transaction for transferring the balance. The first step is to create an empty ",(0,s.jsx)(n.code,{children:"txSkeleton"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"let txSkeleton = helpers.TransactionSkeleton({});\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Then we determine the total capacities required for our transaction including ",(0,s.jsx)(n.code,{children:"Transfer Amount + Transaction Fee"}),", here we set the transaction fee as ",(0,s.jsx)(n.code,{children:"100000"})," Shannon."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"const neededCapacity = BI.from(options.amount).add(100000);\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Then we retrieve the sender account's assets from blockchain RPC with the help of ",(0,s.jsx)(n.code,{children:"indexer"})," and collect the transaction's inputs Cells"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const fromScript = helpers.parseAddress(options.from, {\n config: lumosConfig,\n});\n\nlet collectedSum = BI.from(0);\nconst collected: Cell[] = [];\nconst collector = indexer.collector({ lock: fromScript, type: "empty" });\nfor await (const cell of collector.collect()) {\n collectedSum = collectedSum.add(cell.cellOutput.capacity);\n collected.push(cell);\n if (collectedSum >= neededCapacity) break;\n}\n\nif (collectedSum.lt(neededCapacity)) {\n throw new Error(`Not enough CKB, ${collectedSum} < ${neededCapacity}`);\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Now, let's create the transaction's output Cells:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"transferOutput"}),": Generated based on the desired transfer amount by the user."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"changeOutput"}),": Represents the remaining balance after completing the transaction."]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const toScript = helpers.parseAddress(options.to, { config: lumosConfig });\n\nconst transferOutput: Cell = {\n cellOutput: {\n capacity: BI.from(options.amount).toHexString(),\n lock: toScript,\n },\n data: "0x",\n};\n\nconst changeOutput: Cell = {\n cellOutput: {\n capacity: collectedSum.sub(neededCapacity).toHexString(),\n lock: fromScript,\n },\n data: "0x",\n};\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Then, we need to add Inputs and Outputs to the created ",(0,s.jsx)(n.code,{children:"txSkeleton"}),". Additionally, we add ",(0,s.jsx)(n.code,{children:"Cell Deps"}),", which contain an ",(0,s.jsx)(n.code,{children:"OutPoint"})," pointing to some specific Live Cells. These Cells are related to the transaction and can be used as dependencies to place code that will be loaded and executed by the ",(0,s.jsx)(n.code,{children:"ckb-vm"})," or to place data that can be used for on-chain script execution."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'txSkeleton = txSkeleton.update("inputs", (inputs) => inputs.push(...collected));\ntxSkeleton = txSkeleton.update("outputs", (outputs) =>\n outputs.push(transferOutput, changeOutput)\n);\ntxSkeleton = txSkeleton.update("cellDeps", (cellDeps) =>\n cellDeps.push({\n outPoint: {\n txHash: lumosConfig.SCRIPTS.SECP256K1_BLAKE160.TX_HASH,\n index: lumosConfig.SCRIPTS.SECP256K1_BLAKE160.INDEX,\n },\n depType: lumosConfig.SCRIPTS.SECP256K1_BLAKE160.DEP_TYPE,\n })\n);\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Next, update specific ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#witness",children:"witness"})," data in the transaction. The witness serves as a place to input data such as signatures for the transaction to be verified on the blockchain. The format of the witness data is flexible; however, in this instance, we adhere to the ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/blob/1df5f2c1cbf07e04622fb8faa5b152c1af7ae341/util/types/schemas/blockchain.mol#L106",children:"WitnessArgs"})," specification for basic transaction structure. It is important to note that this specification may evolve to reflect best practices."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"witnessArgs"})," consists of 3 distinct parts, each corresponding to the different data required for the execution of specific scripts:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"export interface WitnessArgs {\n lock?: HexString; // lock scripts of the input Cells\n inputType?: HexString; // type scripts of the input Cells\n outputType?: HexString; // type scripts of the output Cells\n}\n"})}),"\n",(0,s.jsx)(n.p,{children:"We update the witness part according to the transaction structure."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const firstIndex = txSkeleton\n .get("inputs")\n .findIndex((input) =>\n bytes.equal(\n blockchain.Script.pack(input.cellOutput.lock),\n blockchain.Script.pack(fromScript)\n )\n );\nif (firstIndex !== -1) {\n while (firstIndex >= txSkeleton.get("witnesses").size) {\n txSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.push("0x")\n );\n }\n let witness: string = txSkeleton.get("witnesses").get(firstIndex)!;\n const newWitnessArgs: WitnessArgs = {\n /* 65-byte zeros in hex */\n lock: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n };\n if (witness !== "0x") {\n const witnessArgs = blockchain.WitnessArgs.unpack(bytes.bytify(witness));\n const lock = witnessArgs.lock;\n if (\n !!lock &&\n !!newWitnessArgs.lock &&\n !bytes.equal(lock, newWitnessArgs.lock)\n ) {\n throw new Error(\n "Lock field in first witness is set aside for signature!"\n );\n }\n const inputType = witnessArgs.inputType;\n if (!!inputType) {\n newWitnessArgs.inputType = inputType;\n }\n const outputType = witnessArgs.outputType;\n if (!!outputType) {\n newWitnessArgs.outputType = outputType;\n }\n }\n witness = bytes.hexify(blockchain.WitnessArgs.pack(newWitnessArgs));\n txSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.set(firstIndex, witness)\n );\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Next, we need to sign the transaction. But before that we will create a signing message."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Generate signingEntries based on the transaction's Inputs and Outputs"}),"\n",(0,s.jsx)(n.li,{children:"Retrieve the signature message"}),"\n",(0,s.jsx)(n.li,{children:"Use the private key to sign the message recoverably, including the signature information and necessary metadata for subsequent signature verification processes"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'txSkeleton = commons.common.prepareSigningEntries(txSkeleton);\nconst message = txSkeleton.get("signingEntries").get(0)?.message;\nconst Sig = hd.key.signRecoverable(message!, options.privKey);\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Now let's seal our transaction with the ",(0,s.jsx)(n.code,{children:"txSkeleton"})," and the just-generated signature"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"const tx = helpers.sealTransaction(txSkeleton, [Sig]);\n"})}),"\n",(0,s.jsx)(n.p,{children:"Send the transaction"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'const hash = await rpc.sendTransaction(tx, "passthrough");\n'})}),"\n",(0,s.jsx)(n.p,{children:"You can open the console on the browser to see the full transaction to confirm the process."}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,s.jsx)(n.p,{children:"By following this tutorial this far, you have mastered how transfer balance works on CKB. Here's a quick recap:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Capacity of the Cell means how much CKB balance you have and how much data can be stored in this Cell at the same time"}),"\n",(0,s.jsx)(n.li,{children:"To build a CKB transaction is just to collecting some Live Cells and producing some new Cells."}),"\n",(0,s.jsxs)(n.li,{children:["We follow the ",(0,s.jsx)(n.code,{children:"witnessArgs"})," to place the needed signature or any other data in the transaction."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"next-step",children:"Next Step"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsx)(n.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["CKB transaction structure: ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,s.jsxs)(n.li,{children:["CKB data structure basics: ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}},2861:(e,n,t)=>{t.d(n,{A:()=>p});var s=t(6540),r=t(4848),a=t(8453),o=t(9489),i=t(7227);const c={imgContainer:"imgContainer_VuXx"};function l(e){var n=e.alt,t=e.src;return(0,r.jsx)("div",{className:c.imgContainer,children:(0,r.jsx)("img",{alt:n,src:t})})}var d=t(8180);function u(e){const n={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"To interact with the dApp, you need to have your Devnet running. Open one terminal and start the Devnet:"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"offckb-node",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb node\n"})})}),(0,r.jsx)(i.A,{value:"offckb-node-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:"You might want to check pre-funded accounts and copy private keys for later use. Open another terminal and execute:"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"offckb-accounts",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb accounts\n"})})}),(0,r.jsx)(i.A,{value:"offckb-accounts-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Print account list, each account is funded with 42_000_000_00000000 capacity in the genesis block.\n[\n {\n privkey: '0x6109170b275a09ad54877b82f7d9930f88cab5717d484fb4741ae9d1dd078cd6',\n pubkey: '0x02025fa7b61b2365aa459807b84df065f1949d58c0ae590ff22dd2595157bffefa',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvwg2cen8extgq8s5puft8vf40px3f599cytcyd8',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n {\n privkey: '0x9f315d5a9618a39fdc487c7a67a8581d40b045bd7a42d83648ca80ef3b2cb4a1',\n pubkey: '0x026efa0579f09cc7c1129b78544f70098c90b2ab155c10746316f945829c034a2d',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt435c3epyrupszm7khk6weq5lrlyt52lg48ucew',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n #... \n]\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-3-run-the-example",children:"Step 3: Run the Example"}),"\n",(0,r.jsx)(n.p,{children:"Navigate to your project, install the node dependencies, and start running the example:"}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(i.A,{value:"offckb-yarn-start",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"cd && yarn && yarn start\n"})})}),(0,r.jsx)(i.A,{value:"offckb-yarn-start-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"$ parcel index.html\nServer running at http://localhost:1234\n\u2728 Built in 66ms\n"})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Now, the app is running in ",(0,r.jsx)(n.a,{href:"http://localhost:1234",children:"http://localhost:1234"})]}),"\n",(0,r.jsx)(l,{src:(0,d.A)(e.imageSrc)}),"\n",(0,r.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}const p=function(e){return(0,s.createElement)(h,e)}},9735:(e,n,t)=>{t.d(n,{Bo:()=>a,Hd:()=>c,bB:()=>i,pv:()=>o});var s=t(4783),r=t(4848),a={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"},{label:"Witness",link:"/docs/concepts/glossary#witness"},{label:"Signature",link:"/docs/concepts/glossary#cryptographic-signature"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},o={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Data",link:"/docs/concepts/glossary#data"},{label:"Transaction Hash",link:"/docs/concepts/glossary#transaction-hash"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},i={time:"5 - 10 min",topics:[{label:"UDT",link:"/docs/concepts/glossary#udt"},{label:"Fungible Token",link:"/docs/concepts/glossary#fungible-token"},{label:"xUDT",link:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},c={time:"5 - 10 min",topics:[{label:"DOB",link:"/docs/concepts/glossary#digital-object-dob"},{label:"NFT",link:"/docs/concepts/glossary#non-fungible-token"},{label:"Spore Protocol",link:"https://spore.pro"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]}},7227:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var s=t(8215);const r={tabItem:"tabItem_Ymn6"};var a=t(4848);function o(e){var n=e.children,t=e.hidden,o=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,o),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>y});var s=t(6540),r=t(8215),a=t(4245),o=t(6347),i=t(6494),c=t(2814),l=t(5167),d=t(1269);function u(e){var n,t;return null!=(n=null==(t=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,l.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId,a=(0,o.W6)(),i=function(e){var n=e.queryString,t=void 0!==n&&n,s=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:t,groupId:r});return[(0,c.aZ)(i),(0,s.useCallback)((function(e){if(i){var n=new URLSearchParams(a.location.search);n.set(i,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[i,a])]}function g(e){var n,t,r,a,o=e.defaultValue,c=e.queryString,l=void 0!==c&&c,u=e.groupId,g=h(e),x=(0,s.useState)((function(){return function(e){var n,t=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:o,tabValues:g})})),m=x[0],b=x[1],j=f({queryString:l,groupId:u}),v=j[0],k=j[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),r=t[0],a=t[1],[r,(0,s.useCallback)((function(e){n&&a.set(e)}),[n,a])]),w=y[0],C=y[1],S=function(){var e=null!=v?v:w;return p({value:e,tabValues:g})?e:null}();return(0,i.A)((function(){S&&b(S)}),[S]),{selectedValue:m,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);b(e),k(e),C(e)}),[k,C,g]),tabValues:g}}var x=t(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(4848);function j(e){var n=e.className,t=e.block,s=e.selectedValue,o=e.selectValue,i=e.tabValues,c=[],l=(0,a.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=c.indexOf(n),r=i[t].value;r!==s&&(l(n),o(r))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,r=c.indexOf(e.currentTarget)+1;t=null!=(s=c[r])?s:c[0];break;case"ArrowLeft":var a,o=c.indexOf(e.currentTarget)-1;t=null!=(a=c[o])?a:c[c.length-1]}null==(n=t)||n.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:i.map((function(e){var n=e.value,t=e.label,a=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return c.push(e)},onKeyDown:u,onClick:d},a,{className:(0,r.A)("tabs__item",m.tabItem,null==a?void 0:a.className,{"tabs__item--active":s===n}),children:null!=t?t:n}),n)}))})}function v(e){var n=e.lazy,t=e.children,r=e.selectedValue,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=a.find((function(e){return e.props.value===r}));return o?(0,s.cloneElement)(o,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:a.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function k(e){var n=g(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,b.jsx)(j,Object.assign({},e,n)),(0,b.jsx)(v,Object.assign({},e,n))]})}function y(e){var n=(0,x.A)();return(0,b.jsx)(k,Object.assign({},e,{children:u(e.children)}),String(n))}},8652:(e,n,t)=>{t.d(n,{A:()=>i});var s=t(6540);const r={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var a=t(4783),o=t(4848);function i(e){var n=e.time,t=e.topics,i=e.tools;return(0,o.jsxs)("div",{className:r.box,children:[(0,o.jsx)("h4",{children:"Tutorial Overview"}),(0,o.jsxs)("div",{className:r.subsection,children:[(0,o.jsx)("strong",{children:"\u23f0 Estimated Time: "}),n]}),t&&(0,o.jsxs)("div",{className:r.subsection,children:[(0,o.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),t.map((function(e,n){return(0,o.jsxs)(s.Fragment,{children:[n>0&&", ",(0,o.jsx)(a.A,{href:e.link,children:e.label})]},n)}))]}),(0,o.jsx)("div",{className:r.subsection,children:(0,o.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,o.jsx)("ul",{className:r.toolList,children:i.map((function(e,n){return(0,o.jsx)("li",{children:e},n)}))})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var s=t(6540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);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(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4dce95c1.f52e93c8.js b/assets/js/4dce95c1.778f8eeb.js similarity index 99% rename from assets/js/4dce95c1.f52e93c8.js rename to assets/js/4dce95c1.778f8eeb.js index f194da1eb..a9d68c577 100644 --- a/assets/js/4dce95c1.f52e93c8.js +++ b/assets/js/4dce95c1.778f8eeb.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[705],{7152:(e,n,t)=>{t.d(n,{Ay:()=>s});var r=t(4848),o=t(8453);function a(e){const n={a:"a",code:"code",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"So now your app works great on the local blockchain, you might want to switch it to different environments like Testnet and Mainnet."}),"\n",(0,r.jsx)(n.p,{children:"To do this, you need to update the chain config and related code."}),"\n",(0,r.jsxs)(n.p,{children:["Open the ",(0,r.jsx)(n.code,{children:"ckb.ts"})," in your project root dir, change the ",(0,r.jsx)(n.code,{children:"lumosConfig"})," and ",(0,r.jsx)(n.code,{children:"CKB_RPC_URL"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"//export const lumosConfig: config.Config = devConfig as config.Config;\nexport const lumosConfig = config.predefined.AGGRON4 as config.Config;\n\n//export const CKB_RPC_URL = 'http://localhost:8114';\nexport const CKB_RPC_URL = \"https://testnet.ckb.dev/rpc\";\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Actually, we have the corresponding Testnet version examples for all these tutorials. The source code of the Testnet version is in ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples",children:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples"}),", you can clone the repo and start running on Testnet."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/docs.nervos.org.git\ncd docs.nervos.org/examples/\nyarn && yarn start\n"})}),"\n",(0,r.jsxs)(n.p,{children:["For more details, check out the ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/blob/develop/examples/simple-transfer/README.md",children:"README.md"}),";"]})]})}function s(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},9145:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>f,contentTitle:()=>h,default:()=>x,frontMatter:()=>u,metadata:()=>p,toc:()=>b});var r=t(4848),o=t(8453),a=t(9489),s=t(7227),i=t(8652),c=t(9735),l=t(2861),d=t(7152);const u={id:"create-dob",title:"Tutorial: Create a DOB",sidebar_position:6},h="Create a Digital Object Using Spore Protocol",p={id:"getting-started/create-dob",title:"Tutorial: Create a DOB",description:"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Notice that the data field of the Spore Cell contains ",(0,r.jsx)(n.code,{children:"content-type"})," and ",(0,r.jsx)(n.code,{children:"content"}),", which allow users to turn any content form into a digital object. All the fields in a Spore Cell are immutable once created."]}),"\n",(0,r.jsx)(n.p,{children:"In this tutorial, we will build a simple dApp to turn a picture on your computer into a digital object on the blockchain using the Spore SDK."}),"\n",(0,r.jsx)(n.h2,{id:"setup-devnet--run-example",children:"Setup Devnet & Run Example"}),"\n",(0,r.jsx)(n.h3,{id:"step-1-initialize",children:"Step 1: Initialize"}),"\n",(0,r.jsxs)(n.p,{children:["After installing ",(0,r.jsx)(n.a,{href:"https://www.npmjs.com/package/@offckb/cli",children:"@offckb/cli"}),", run the following command to initlize a project with our built-in templates."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb init \n"})}),"\n",(0,r.jsxs)(n.p,{children:["When prompted to select a dApp template, use your arrow keys to select ",(0,r.jsx)(n.strong,{children:"Create a Digital Object Using Spore Protocol"})," for this tutorial."]}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(s.A,{value:"offckb-init",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:"{5}",children:"? Select a dApp template (Use arrow keys)\n View and Transfer a CKB Balance\n Write an On-Chain Message\n Create a Fungible Token\n> Create a Digital Object Using Spore Protocol\na simple dApp to create on-chain digital object with spore scripts\n"})})}),(0,r.jsx)(s.A,{value:"offckb-init-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"init CKB dApp project: /Users/ckb/Desktop/offckb/\n\u2728 Done in 2.52s.\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-2-start-the-devnet",children:"Step 2: Start the Devnet"}),"\n",(0,r.jsx)(l.A,{imageSrc:"img/dapps/create-dob-dapp.jpg"}),"\n",(0,r.jsx)(n.h2,{id:"behind-the-scene",children:"Behind the Scene"}),"\n",(0,r.jsxs)(n.p,{children:["Open the ",(0,r.jsx)(n.code,{children:"lib.ts"})," file in your project, it lists all the important functions that do the most of work for the project."]}),"\n",(0,r.jsx)(n.h3,{id:"create-digital-object",children:"Create Digital Object"}),"\n",(0,r.jsxs)(n.p,{children:["Check out the ",(0,r.jsx)(n.code,{children:"createSporeDOB"})," function:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"export async function createSporeDOB(\n privkey: string,\n content: Uint8Array\n): Promise<{ txHash: string; outputIndex: number }>;\n"})}),"\n",(0,r.jsx)(n.p,{children:"It accepts two parameters,"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"the private key that is used to sign and create the digital object"}),"\n",(0,r.jsx)(n.li,{children:"the content to be stored in the digital object."}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The content can be any type of data that is serialized into a ",(0,r.jsx)(n.code,{children:"Uint8Array"}),". Here we are dealing with images, so the content is the result of ",(0,r.jsx)(n.code,{children:"FileReader.readAsArrayBuffer"}),". You can check out the following code recipe in ",(0,r.jsx)(n.code,{children:"handleFileChange"})," function from the react frontend ",(0,r.jsx)(n.code,{children:"index.tsx"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"const reader = new FileReader();\nreader.onload = () => {\n // Access the file content here\n const content = reader.result;\n if (content && content instanceof ArrayBuffer) {\n const uint8Array = new Uint8Array(content);\n setFileContent(uint8Array);\n }\n};\n// Read the file as ArrayBuffer\nreader.readAsArrayBuffer(files[0]);\n"})}),"\n",(0,r.jsx)(n.p,{children:"Once we have the picture content and the private key, we will build a transaction that produces a Spore output Cell, aka the digital object Cell. We can handle all the logic with Lumos.js, but with the help of Spore-SDK, it becomes very simple to do:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:'export async function createSporeDOB(\n privkey: string,\n content: Uint8Array\n): Promise<{ txHash: string; outputIndex: number }> {\n const wallet = createDefaultLockWallet(privkey);\n\n const { txSkeleton, outputIndex } = await createSpore({\n data: {\n contentType: "image/jpeg",\n content,\n },\n toLock: wallet.lock,\n fromInfos: [wallet.address],\n config: SPORE_CONFIG,\n });\n\n const txHash = await wallet.signAndSendTransaction(txSkeleton);\n console.log(`Spore created at transaction: ${txHash}`);\n console.log(\n `Spore ID: ${\n txSkeleton.get("outputs").get(outputIndex)!.cellOutput.type!.args\n }`\n );\n return { txHash, outputIndex };\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Notice that the ",(0,r.jsx)(n.code,{children:"createDefaultLockWallet"})," and ",(0,r.jsx)(n.code,{children:"const txHash = await wallet.signAndSendTransaction(txSkeleton);"})," are just some methods that helps us to keep the code clean, all it does is the same as the previous tutorials involving signing and sending transactions."]}),"\n",(0,r.jsx)(n.h3,{id:"render-content-from-digital-object",children:"Render Content from Digital Object"}),"\n",(0,r.jsx)(n.p,{children:"Once we created our digital object on-chain, what we love to do is to render and show this digital object. To do this, we need to first find the Spore Cell of our digital object and extract the data from the Spore Cell and decode the content from the data to render it in the browser."}),"\n",(0,r.jsxs)(n.p,{children:["Check out the ",(0,r.jsx)(n.code,{children:"showSporeContent"})," function:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:'export async function showSporeContent(txHash: string, index = 0) {\n const indexHex = "0x" + index.toString(16);\n const { cell } = await rpc.getLiveCell({ txHash, index: indexHex }, true);\n if (cell == null) {\n return alert("Cell not found, please retry later");\n }\n const data = cell.data.content;\n const msg = unpackToRawSporeData(data);\n console.log("Spore data: ", msg);\n return msg;\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["We locate the Spore Cell by accepting a outpoint parameter(",(0,r.jsx)(n.code,{children:"txHash"})," and ",(0,r.jsx)(n.code,{children:"outputIndex"}),"), and use ",(0,r.jsx)(n.code,{children:"rpc.getLiveCell"})," to get the Live Cell. Then we unpack the data content from this Cell:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"const data = cell.data.content;\nconst msg = unpackToRawSporeData(data);\n"})}),"\n",(0,r.jsxs)(n.p,{children:["To render the image from this raw data, check out the ",(0,r.jsx)(n.code,{children:"renderSpore"})," function in the ",(0,r.jsx)(n.code,{children:"index.tsx"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"const renderSpore = async () => {\n const res = await showSporeContent(txHash, outputIndex);\n if (!res) return;\n setRawSporeData(res);\n // Create Blob from binary data\n const buffer = hexStringToUint8Array(res.content.toString().slice(2));\n const blob = new Blob([buffer], { type: res.contentType });\n const url = URL.createObjectURL(blob);\n setImageURL(url);\n};\n\n...\n{imageURL && }\n"})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,r.jsx)(n.p,{children:"By following this tutorial this far, you have mastered how digital-object works on CKB. Here's a quick recap:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"How Spore protocol works on CKB"}),"\n",(0,r.jsx)(n.li,{children:"Create an on-chain digital object with a picture via Spore-SDK"}),"\n",(0,r.jsx)(n.li,{children:"Render the picture in the browser from your digital object"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"next-step",children:"Next Step"}),"\n",(0,r.jsx)(d.Ay,{}),"\n",(0,r.jsx)(n.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Spore protocol: ",(0,r.jsx)(n.a,{href:"https://docs.spore.pro/",children:"docs.spore.pro"})]}),"\n",(0,r.jsxs)(n.li,{children:["CKB transaction structure: ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,r.jsxs)(n.li,{children:["CKB data structure basics: ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}},2861:(e,n,t)=>{t.d(n,{A:()=>p});var r=t(6540),o=t(4848),a=t(8453),s=t(9489),i=t(7227);const c={imgContainer:"imgContainer_VuXx"};function l(e){var n=e.alt,t=e.src;return(0,o.jsx)("div",{className:c.imgContainer,children:(0,o.jsx)("img",{alt:n,src:t})})}var d=t(8180);function u(e){const n={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"To interact with the dApp, you need to have your Devnet running. Open one terminal and start the Devnet:"}),"\n",(0,o.jsxs)(s.A,{children:[(0,o.jsx)(i.A,{value:"offckb-node",label:"Command",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"offckb node\n"})})}),(0,o.jsx)(i.A,{value:"offckb-node-result",label:"Response",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,o.jsx)(n.p,{children:"You might want to check pre-funded accounts and copy private keys for later use. Open another terminal and execute:"}),"\n",(0,o.jsxs)(s.A,{children:[(0,o.jsx)(i.A,{value:"offckb-accounts",label:"Command",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"offckb accounts\n"})})}),(0,o.jsx)(i.A,{value:"offckb-accounts-result",label:"Response",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"Print account list, each account is funded with 42_000_000_00000000 capacity in the genesis block.\n[\n {\n privkey: '0x6109170b275a09ad54877b82f7d9930f88cab5717d484fb4741ae9d1dd078cd6',\n pubkey: '0x02025fa7b61b2365aa459807b84df065f1949d58c0ae590ff22dd2595157bffefa',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvwg2cen8extgq8s5puft8vf40px3f599cytcyd8',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n {\n privkey: '0x9f315d5a9618a39fdc487c7a67a8581d40b045bd7a42d83648ca80ef3b2cb4a1',\n pubkey: '0x026efa0579f09cc7c1129b78544f70098c90b2ab155c10746316f945829c034a2d',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt435c3epyrupszm7khk6weq5lrlyt52lg48ucew',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n #... \n]\n"})})})]}),"\n",(0,o.jsx)(n.h3,{id:"step-3-run-the-example",children:"Step 3: Run the Example"}),"\n",(0,o.jsx)(n.p,{children:"Navigate to your project, install the node dependencies, and start running the example:"}),"\n",(0,o.jsxs)(s.A,{children:[(0,o.jsx)(i.A,{value:"offckb-yarn-start",label:"Command",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"cd && yarn && yarn start\n"})})}),(0,o.jsx)(i.A,{value:"offckb-yarn-start-result",label:"Response",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"$ parcel index.html\nServer running at http://localhost:1234\n\u2728 Built in 66ms\n"})})})]}),"\n",(0,o.jsxs)(n.p,{children:["Now, the app is running in ",(0,o.jsx)(n.a,{href:"http://localhost:1234",children:"http://localhost:1234"})]}),"\n",(0,o.jsx)(l,{src:(0,d.A)(e.imageSrc)}),"\n",(0,o.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}const p=function(e){return(0,r.createElement)(h,e)}},9735:(e,n,t)=>{t.d(n,{Bo:()=>a,Hd:()=>c,bB:()=>i,pv:()=>s});var r=t(4783),o=t(4848),a={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"},{label:"Witness",link:"/docs/concepts/glossary#witness"},{label:"Signature",link:"/docs/concepts/glossary#cryptographic-signature"}],tools:[(0,o.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(r.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,o.jsx)(r.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,o.jsxs)("div",{children:["CKB dev environment: ",(0,o.jsx)(r.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},s={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Data",link:"/docs/concepts/glossary#data"},{label:"Transaction Hash",link:"/docs/concepts/glossary#transaction-hash"}],tools:[(0,o.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(r.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,o.jsx)(r.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,o.jsxs)("div",{children:["CKB dev environment: ",(0,o.jsx)(r.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},i={time:"5 - 10 min",topics:[{label:"UDT",link:"/docs/concepts/glossary#udt"},{label:"Fungible Token",link:"/docs/concepts/glossary#fungible-token"},{label:"xUDT",link:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md"}],tools:[(0,o.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(r.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,o.jsx)(r.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,o.jsxs)("div",{children:["CKB dev environment: ",(0,o.jsx)(r.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},c={time:"5 - 10 min",topics:[{label:"DOB",link:"/docs/concepts/glossary#digital-object-dob"},{label:"NFT",link:"/docs/concepts/glossary#non-fungible-token"},{label:"Spore Protocol",link:"https://spore.pro"}],tools:[(0,o.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(r.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,o.jsx)(r.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,o.jsxs)("div",{children:["CKB dev environment: ",(0,o.jsx)(r.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]}},7227:(e,n,t)=>{t.d(n,{A:()=>s});t(6540);var r=t(8215);const o={tabItem:"tabItem_Ymn6"};var a=t(4848);function s(e){var n=e.children,t=e.hidden,s=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.A)(o.tabItem,s),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>y});var r=t(6540),o=t(8215),a=t(4245),s=t(6347),i=t(6494),c=t(2814),l=t(5167),d=t(1269);function u(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,l.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,o=e.groupId,a=(0,s.W6)(),i=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:o});return[(0,c.aZ)(i),(0,r.useCallback)((function(e){if(i){var n=new URLSearchParams(a.location.search);n.set(i,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[i,a])]}function b(e){var n,t,o,a,s=e.defaultValue,c=e.queryString,l=void 0!==c&&c,u=e.groupId,b=h(e),g=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var o=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:s,tabValues:b})})),x=g[0],m=g[1],j=f({queryString:l,groupId:u}),v=j[0],k=j[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),o=t[0],a=t[1],[o,(0,r.useCallback)((function(e){n&&a.set(e)}),[n,a])]),w=y[0],C=y[1],S=function(){var e=null!=v?v:w;return p({value:e,tabValues:b})?e:null}();return(0,i.A)((function(){S&&m(S)}),[S]),{selectedValue:x,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);m(e),k(e),C(e)}),[k,C,b]),tabValues:b}}var g=t(1062);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=t(4848);function j(e){var n=e.className,t=e.block,r=e.selectedValue,s=e.selectValue,i=e.tabValues,c=[],l=(0,a.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=c.indexOf(n),o=i[t].value;o!==r&&(l(n),s(o))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var r,o=c.indexOf(e.currentTarget)+1;t=null!=(r=c[o])?r:c[0];break;case"ArrowLeft":var a,s=c.indexOf(e.currentTarget)-1;t=null!=(a=c[s])?a:c[c.length-1]}null==(n=t)||n.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":t},n),children:i.map((function(e){var n=e.value,t=e.label,a=e.attributes;return(0,m.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return c.push(e)},onKeyDown:u,onClick:d},a,{className:(0,o.A)("tabs__item",x.tabItem,null==a?void 0:a.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function v(e){var n=e.lazy,t=e.children,o=e.selectedValue,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var s=a.find((function(e){return e.props.value===o}));return s?(0,r.cloneElement)(s,{className:"margin-top--md"}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:a.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==o})}))})}function k(e){var n=b(e);return(0,m.jsxs)("div",{className:(0,o.A)("tabs-container",x.tabList),children:[(0,m.jsx)(j,Object.assign({},e,n)),(0,m.jsx)(v,Object.assign({},e,n))]})}function y(e){var n=(0,g.A)();return(0,m.jsx)(k,Object.assign({},e,{children:u(e.children)}),String(n))}},8652:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(6540);const o={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var a=t(4783),s=t(4848);function i(e){var n=e.time,t=e.topics,i=e.tools;return(0,s.jsxs)("div",{className:o.box,children:[(0,s.jsx)("h4",{children:"Tutorial Overview"}),(0,s.jsxs)("div",{className:o.subsection,children:[(0,s.jsx)("strong",{children:"\u23f0 Estimated Time: "}),n]}),t&&(0,s.jsxs)("div",{className:o.subsection,children:[(0,s.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),t.map((function(e,n){return(0,s.jsxs)(r.Fragment,{children:[n>0&&", ",(0,s.jsx)(a.A,{href:e.link,children:e.label})]},n)}))]}),(0,s.jsx)("div",{className:o.subsection,children:(0,s.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,s.jsx)("ul",{className:o.toolList,children:i.map((function(e,n){return(0,s.jsx)("li",{children:e},n)}))})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var r=t(6540);const o={},a=r.createContext(o);function s(e){const n=r.useContext(a);return r.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(o):e.components||o:s(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[705],{7152:(e,n,t)=>{t.d(n,{Ay:()=>s});var r=t(4848),o=t(8453);function a(e){const n={a:"a",code:"code",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"So now your app works great on the local blockchain, you might want to switch it to different environments like Testnet and Mainnet."}),"\n",(0,r.jsx)(n.p,{children:"To do this, you need to update the chain config and related code."}),"\n",(0,r.jsxs)(n.p,{children:["Open the ",(0,r.jsx)(n.code,{children:"ckb.ts"})," in your project root dir, change the ",(0,r.jsx)(n.code,{children:"lumosConfig"})," and ",(0,r.jsx)(n.code,{children:"CKB_RPC_URL"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"//export const lumosConfig: config.Config = devConfig as config.Config;\nexport const lumosConfig = config.predefined.AGGRON4 as config.Config;\n\n//export const CKB_RPC_URL = 'http://localhost:8114';\nexport const CKB_RPC_URL = \"https://testnet.ckb.dev/rpc\";\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Actually, we have the corresponding Testnet version examples for all these tutorials. The source code of the Testnet version is in ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples",children:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples"}),", you can clone the repo and start running on Testnet."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/docs.nervos.org.git\ncd docs.nervos.org/examples/\nyarn && yarn start\n"})}),"\n",(0,r.jsxs)(n.p,{children:["For more details, check out the ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/blob/develop/examples/simple-transfer/README.md",children:"README.md"}),";"]})]})}function s(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},9145:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>f,contentTitle:()=>h,default:()=>x,frontMatter:()=>u,metadata:()=>p,toc:()=>b});var r=t(4848),o=t(8453),a=t(9489),s=t(7227),i=t(8652),c=t(9735),l=t(2861),d=t(7152);const u={id:"create-dob",title:"Tutorial: Create a DOB",sidebar_position:6},h="Create a Digital Object Using Spore Protocol",p={id:"getting-started/create-dob",title:"Tutorial: Create a DOB",description:"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Notice that the data field of the Spore Cell contains ",(0,r.jsx)(n.code,{children:"content-type"})," and ",(0,r.jsx)(n.code,{children:"content"}),", which allow users to turn any content form into a digital object. All the fields in a Spore Cell are immutable once created."]}),"\n",(0,r.jsx)(n.p,{children:"In this tutorial, we will build a simple dApp to turn a picture on your computer into a digital object on the blockchain using the Spore SDK."}),"\n",(0,r.jsx)(n.h2,{id:"setup-devnet--run-example",children:"Setup Devnet & Run Example"}),"\n",(0,r.jsx)(n.h3,{id:"step-1-initialize",children:"Step 1: Initialize"}),"\n",(0,r.jsxs)(n.p,{children:["After installing ",(0,r.jsx)(n.a,{href:"https://www.npmjs.com/package/@offckb/cli",children:"@offckb/cli"}),", run the following command to initlize a project with our built-in templates."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"offckb init \n"})}),"\n",(0,r.jsxs)(n.p,{children:["When prompted to select a dApp template, use your arrow keys to select ",(0,r.jsx)(n.strong,{children:"Create a Digital Object Using Spore Protocol"})," for this tutorial."]}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(s.A,{value:"offckb-init",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:"{5}",children:"? Select a dApp template (Use arrow keys)\n View and Transfer a CKB Balance\n Write an On-Chain Message\n Create a Fungible Token\n> Create a Digital Object Using Spore Protocol\na simple dApp to create on-chain digital object with spore scripts\n"})})}),(0,r.jsx)(s.A,{value:"offckb-init-result",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"init CKB dApp project: /Users/ckb/Desktop/offckb/\n\u2728 Done in 2.52s.\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-2-start-the-devnet",children:"Step 2: Start the Devnet"}),"\n",(0,r.jsx)(l.A,{imageSrc:"img/dapps/create-dob-dapp.jpg"}),"\n",(0,r.jsx)(n.h2,{id:"behind-the-scene",children:"Behind the Scene"}),"\n",(0,r.jsxs)(n.p,{children:["Open the ",(0,r.jsx)(n.code,{children:"lib.ts"})," file in your project, it lists all the important functions that do the most of work for the project."]}),"\n",(0,r.jsx)(n.h3,{id:"create-digital-object",children:"Create Digital Object"}),"\n",(0,r.jsxs)(n.p,{children:["Check out the ",(0,r.jsx)(n.code,{children:"createSporeDOB"})," function:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"export async function createSporeDOB(\n privkey: string,\n content: Uint8Array\n): Promise<{ txHash: string; outputIndex: number }>;\n"})}),"\n",(0,r.jsx)(n.p,{children:"It accepts two parameters,"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"the private key that is used to sign and create the digital object"}),"\n",(0,r.jsx)(n.li,{children:"the content to be stored in the digital object."}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The content can be any type of data that is serialized into a ",(0,r.jsx)(n.code,{children:"Uint8Array"}),". Here we are dealing with images, so the content is the result of ",(0,r.jsx)(n.code,{children:"FileReader.readAsArrayBuffer"}),". You can check out the following code recipe in ",(0,r.jsx)(n.code,{children:"handleFileChange"})," function from the react frontend ",(0,r.jsx)(n.code,{children:"index.tsx"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"const reader = new FileReader();\nreader.onload = () => {\n // Access the file content here\n const content = reader.result;\n if (content && content instanceof ArrayBuffer) {\n const uint8Array = new Uint8Array(content);\n setFileContent(uint8Array);\n }\n};\n// Read the file as ArrayBuffer\nreader.readAsArrayBuffer(files[0]);\n"})}),"\n",(0,r.jsx)(n.p,{children:"Once we have the picture content and the private key, we will build a transaction that produces a Spore output Cell, aka the digital object Cell. We can handle all the logic with Lumos.js, but with the help of Spore-SDK, it becomes very simple to do:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:'export async function createSporeDOB(\n privkey: string,\n content: Uint8Array\n): Promise<{ txHash: string; outputIndex: number }> {\n const wallet = createDefaultLockWallet(privkey);\n\n const { txSkeleton, outputIndex } = await createSpore({\n data: {\n contentType: "image/jpeg",\n content,\n },\n toLock: wallet.lock,\n fromInfos: [wallet.address],\n config: SPORE_CONFIG,\n });\n\n const txHash = await wallet.signAndSendTransaction(txSkeleton);\n console.log(`Spore created at transaction: ${txHash}`);\n console.log(\n `Spore ID: ${\n txSkeleton.get("outputs").get(outputIndex)!.cellOutput.type!.args\n }`\n );\n return { txHash, outputIndex };\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Notice that the ",(0,r.jsx)(n.code,{children:"createDefaultLockWallet"})," and ",(0,r.jsx)(n.code,{children:"const txHash = await wallet.signAndSendTransaction(txSkeleton);"})," are just some methods that helps us to keep the code clean, all it does is the same as the previous tutorials involving signing and sending transactions."]}),"\n",(0,r.jsx)(n.h3,{id:"render-content-from-digital-object",children:"Render Content from Digital Object"}),"\n",(0,r.jsx)(n.p,{children:"Once we created our digital object on-chain, what we love to do is to render and show this digital object. To do this, we need to first find the Spore Cell of our digital object and extract the data from the Spore Cell and decode the content from the data to render it in the browser."}),"\n",(0,r.jsxs)(n.p,{children:["Check out the ",(0,r.jsx)(n.code,{children:"showSporeContent"})," function:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:'export async function showSporeContent(txHash: string, index = 0) {\n const indexHex = "0x" + index.toString(16);\n const { cell } = await rpc.getLiveCell({ txHash, index: indexHex }, true);\n if (cell == null) {\n return alert("Cell not found, please retry later");\n }\n const data = cell.data.content;\n const msg = unpackToRawSporeData(data);\n console.log("Spore data: ", msg);\n return msg;\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["We locate the Spore Cell by accepting a outpoint parameter(",(0,r.jsx)(n.code,{children:"txHash"})," and ",(0,r.jsx)(n.code,{children:"outputIndex"}),"), and use ",(0,r.jsx)(n.code,{children:"rpc.getLiveCell"})," to get the Live Cell. Then we unpack the data content from this Cell:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"const data = cell.data.content;\nconst msg = unpackToRawSporeData(data);\n"})}),"\n",(0,r.jsxs)(n.p,{children:["To render the image from this raw data, check out the ",(0,r.jsx)(n.code,{children:"renderSpore"})," function in the ",(0,r.jsx)(n.code,{children:"index.tsx"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"const renderSpore = async () => {\n const res = await showSporeContent(txHash, outputIndex);\n if (!res) return;\n setRawSporeData(res);\n // Create Blob from binary data\n const buffer = hexStringToUint8Array(res.content.toString().slice(2));\n const blob = new Blob([buffer], { type: res.contentType });\n const url = URL.createObjectURL(blob);\n setImageURL(url);\n};\n\n...\n{imageURL && }\n"})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,r.jsx)(n.p,{children:"By following this tutorial this far, you have mastered how digital-object works on CKB. Here's a quick recap:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"How Spore protocol works on CKB"}),"\n",(0,r.jsx)(n.li,{children:"Create an on-chain digital object with a picture via Spore-SDK"}),"\n",(0,r.jsx)(n.li,{children:"Render the picture in the browser from your digital object"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"next-step",children:"Next Step"}),"\n",(0,r.jsx)(d.Ay,{}),"\n",(0,r.jsx)(n.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Spore protocol: ",(0,r.jsx)(n.a,{href:"https://docs.spore.pro/",children:"docs.spore.pro"})]}),"\n",(0,r.jsxs)(n.li,{children:["CKB transaction structure: ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,r.jsxs)(n.li,{children:["CKB data structure basics: ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}},2861:(e,n,t)=>{t.d(n,{A:()=>p});var r=t(6540),o=t(4848),a=t(8453),s=t(9489),i=t(7227);const c={imgContainer:"imgContainer_VuXx"};function l(e){var n=e.alt,t=e.src;return(0,o.jsx)("div",{className:c.imgContainer,children:(0,o.jsx)("img",{alt:n,src:t})})}var d=t(8180);function u(e){const n={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"To interact with the dApp, you need to have your Devnet running. Open one terminal and start the Devnet:"}),"\n",(0,o.jsxs)(s.A,{children:[(0,o.jsx)(i.A,{value:"offckb-node",label:"Command",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"offckb node\n"})})}),(0,o.jsx)(i.A,{value:"offckb-node-result",label:"Response",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,o.jsx)(n.p,{children:"You might want to check pre-funded accounts and copy private keys for later use. Open another terminal and execute:"}),"\n",(0,o.jsxs)(s.A,{children:[(0,o.jsx)(i.A,{value:"offckb-accounts",label:"Command",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"offckb accounts\n"})})}),(0,o.jsx)(i.A,{value:"offckb-accounts-result",label:"Response",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"Print account list, each account is funded with 42_000_000_00000000 capacity in the genesis block.\n[\n {\n privkey: '0x6109170b275a09ad54877b82f7d9930f88cab5717d484fb4741ae9d1dd078cd6',\n pubkey: '0x02025fa7b61b2365aa459807b84df065f1949d58c0ae590ff22dd2595157bffefa',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvwg2cen8extgq8s5puft8vf40px3f599cytcyd8',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n {\n privkey: '0x9f315d5a9618a39fdc487c7a67a8581d40b045bd7a42d83648ca80ef3b2cb4a1',\n pubkey: '0x026efa0579f09cc7c1129b78544f70098c90b2ab155c10746316f945829c034a2d',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt435c3epyrupszm7khk6weq5lrlyt52lg48ucew',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n #... \n]\n"})})})]}),"\n",(0,o.jsx)(n.h3,{id:"step-3-run-the-example",children:"Step 3: Run the Example"}),"\n",(0,o.jsx)(n.p,{children:"Navigate to your project, install the node dependencies, and start running the example:"}),"\n",(0,o.jsxs)(s.A,{children:[(0,o.jsx)(i.A,{value:"offckb-yarn-start",label:"Command",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"cd && yarn && yarn start\n"})})}),(0,o.jsx)(i.A,{value:"offckb-yarn-start-result",label:"Response",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"$ parcel index.html\nServer running at http://localhost:1234\n\u2728 Built in 66ms\n"})})})]}),"\n",(0,o.jsxs)(n.p,{children:["Now, the app is running in ",(0,o.jsx)(n.a,{href:"http://localhost:1234",children:"http://localhost:1234"})]}),"\n",(0,o.jsx)(l,{src:(0,d.A)(e.imageSrc)}),"\n",(0,o.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}const p=function(e){return(0,r.createElement)(h,e)}},9735:(e,n,t)=>{t.d(n,{Bo:()=>a,Hd:()=>c,bB:()=>i,pv:()=>s});var r=t(4783),o=t(4848),a={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"},{label:"Witness",link:"/docs/concepts/glossary#witness"},{label:"Signature",link:"/docs/concepts/glossary#cryptographic-signature"}],tools:[(0,o.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(r.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,o.jsx)(r.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,o.jsxs)("div",{children:["CKB dev environment: ",(0,o.jsx)(r.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},s={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Data",link:"/docs/concepts/glossary#data"},{label:"Transaction Hash",link:"/docs/concepts/glossary#transaction-hash"}],tools:[(0,o.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(r.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,o.jsx)(r.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,o.jsxs)("div",{children:["CKB dev environment: ",(0,o.jsx)(r.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},i={time:"5 - 10 min",topics:[{label:"UDT",link:"/docs/concepts/glossary#udt"},{label:"Fungible Token",link:"/docs/concepts/glossary#fungible-token"},{label:"xUDT",link:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md"}],tools:[(0,o.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(r.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,o.jsx)(r.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,o.jsxs)("div",{children:["CKB dev environment: ",(0,o.jsx)(r.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},c={time:"5 - 10 min",topics:[{label:"DOB",link:"/docs/concepts/glossary#digital-object-dob"},{label:"NFT",link:"/docs/concepts/glossary#non-fungible-token"},{label:"Spore Protocol",link:"https://spore.pro"}],tools:[(0,o.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(r.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,o.jsx)(r.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,o.jsxs)("div",{children:["CKB dev environment: ",(0,o.jsx)(r.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]}},7227:(e,n,t)=>{t.d(n,{A:()=>s});t(6540);var r=t(8215);const o={tabItem:"tabItem_Ymn6"};var a=t(4848);function s(e){var n=e.children,t=e.hidden,s=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.A)(o.tabItem,s),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>y});var r=t(6540),o=t(8215),a=t(4245),s=t(6347),i=t(6494),c=t(2814),l=t(5167),d=t(1269);function u(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,l.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,o=e.groupId,a=(0,s.W6)(),i=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:o});return[(0,c.aZ)(i),(0,r.useCallback)((function(e){if(i){var n=new URLSearchParams(a.location.search);n.set(i,e),a.replace(Object.assign({},a.location,{search:n.toString()}))}}),[i,a])]}function b(e){var n,t,o,a,s=e.defaultValue,c=e.queryString,l=void 0!==c&&c,u=e.groupId,b=h(e),g=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var o=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:s,tabValues:b})})),x=g[0],m=g[1],j=f({queryString:l,groupId:u}),v=j[0],k=j[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),o=t[0],a=t[1],[o,(0,r.useCallback)((function(e){n&&a.set(e)}),[n,a])]),w=y[0],C=y[1],S=function(){var e=null!=v?v:w;return p({value:e,tabValues:b})?e:null}();return(0,i.A)((function(){S&&m(S)}),[S]),{selectedValue:x,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);m(e),k(e),C(e)}),[k,C,b]),tabValues:b}}var g=t(1062);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=t(4848);function j(e){var n=e.className,t=e.block,r=e.selectedValue,s=e.selectValue,i=e.tabValues,c=[],l=(0,a.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=c.indexOf(n),o=i[t].value;o!==r&&(l(n),s(o))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var r,o=c.indexOf(e.currentTarget)+1;t=null!=(r=c[o])?r:c[0];break;case"ArrowLeft":var a,s=c.indexOf(e.currentTarget)-1;t=null!=(a=c[s])?a:c[c.length-1]}null==(n=t)||n.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":t},n),children:i.map((function(e){var n=e.value,t=e.label,a=e.attributes;return(0,m.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return c.push(e)},onKeyDown:u,onClick:d},a,{className:(0,o.A)("tabs__item",x.tabItem,null==a?void 0:a.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function v(e){var n=e.lazy,t=e.children,o=e.selectedValue,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var s=a.find((function(e){return e.props.value===o}));return s?(0,r.cloneElement)(s,{className:"margin-top--md"}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:a.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==o})}))})}function k(e){var n=b(e);return(0,m.jsxs)("div",{className:(0,o.A)("tabs-container",x.tabList),children:[(0,m.jsx)(j,Object.assign({},e,n)),(0,m.jsx)(v,Object.assign({},e,n))]})}function y(e){var n=(0,g.A)();return(0,m.jsx)(k,Object.assign({},e,{children:u(e.children)}),String(n))}},8652:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(6540);const o={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var a=t(4783),s=t(4848);function i(e){var n=e.time,t=e.topics,i=e.tools;return(0,s.jsxs)("div",{className:o.box,children:[(0,s.jsx)("h4",{children:"Tutorial Overview"}),(0,s.jsxs)("div",{className:o.subsection,children:[(0,s.jsx)("strong",{children:"\u23f0 Estimated Time: "}),n]}),t&&(0,s.jsxs)("div",{className:o.subsection,children:[(0,s.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),t.map((function(e,n){return(0,s.jsxs)(r.Fragment,{children:[n>0&&", ",(0,s.jsx)(a.A,{href:e.link,children:e.label})]},n)}))]}),(0,s.jsx)("div",{className:o.subsection,children:(0,s.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,s.jsx)("ul",{className:o.toolList,children:i.map((function(e,n){return(0,s.jsx)("li",{children:e},n)}))})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var r=t(6540);const o={},a=r.createContext(o);function s(e){const n=r.useContext(a);return r.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(o):e.components||o:s(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/54fda744.f9b1a578.js b/assets/js/54fda744.312003dc.js similarity index 98% rename from assets/js/54fda744.f9b1a578.js rename to assets/js/54fda744.312003dc.js index c00c9fdb9..df7d7ba50 100644 --- a/assets/js/54fda744.f9b1a578.js +++ b/assets/js/54fda744.312003dc.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[594],{7953:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>h,contentTitle:()=>d,default:()=>f,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=t(4848),n=t(8453),i=(t(8180),t(4783),t(7616)),o=t(8803),a=t(3298);const l={id:"wallets",title:"Wallets",sidebar_position:3},d=void 0,c={id:"wallets/wallets",title:"Wallets",description:"Essential insights for CKB dApp developers, covering JoyID integration, wallet choices, address specifics, and CKB transfer guidelines",source:"@site/docs/wallets/wallets.mdx",sourceDirName:"wallets",slug:"/wallets/",permalink:"/docs/wallets/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/wallets/wallets.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:3,frontMatter:{id:"wallets",title:"Wallets",sidebar_position:3},sidebar:"tutorial",previous:{title:"Common Script Error Code",permalink:"/docs/Script/common-script-error-code"},next:{title:"RPCs",permalink:"/docs/rpcs"}},h={},p=[{value:"Integrate Wallet (JoyID)",id:"integrate-wallet-joyid",level:2},{value:"CKB Wallet Options",id:"ckb-wallet-options",level:2},{value:"CKB Address",id:"ckb-address",level:2},{value:"Requirements for CKB Transfers",id:"requirements-for-ckb-transfers",level:2}];function u(e){const s={a:"a",code:"code",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.p,{children:"Essential insights for CKB dApp developers, covering JoyID integration, wallet choices, address specifics, and CKB transfer guidelines"}),"\n",(0,r.jsx)(s.h2,{id:"integrate-wallet-joyid",children:"Integrate Wallet (JoyID)"}),"\n",(0,r.jsx)(s.p,{children:"For developers looking to integrate wallets into their dApps, we currently recommend using JoyID, the most popular wallet in our ecosystem. JoyID offers a seamless experience for users, enabling secure and efficient interactions with your dApp."}),"\n",(0,r.jsxs)(s.p,{children:["For a comprehensive guide on integrating JoyID, please visit ",(0,r.jsx)(s.a,{href:"https://docs.joyid.dev/guide/evm/connect",children:"JoyID-Connect"}),". Stay tuned for future integration guides for additional wallets as our ecosystem continues to grow."]}),"\n",(0,r.jsx)(s.h2,{id:"ckb-wallet-options",children:"CKB Wallet Options"}),"\n",(0,r.jsx)(s.p,{children:"Crypto wallets store private keys to access cryptos. They come in two types: hot wallets (online) and cold wallets (offline). Hot wallets, such as web-based, desktop, and mobile wallets, offer convenience but pose higher risk. Cold wallets, including paper and hardware wallets, provide enhanced security by keeping keys offline."}),"\n",(0,r.jsx)(s.p,{children:"When it comes to storing and securing CKB assets, users have various options, including hot and cold wallets. While storing assets on exchanges is common, additional security can be achieved with dedicated wallets."}),"\n",(0,r.jsx)(s.p,{children:"These wallets listed below offer custody and security services tailored to CKB. For more information, refer to the respective guides for each wallet."}),"\n",(0,r.jsx)(o.A,{colNum:[2,2,2,2],children:a.Y.map((({index:e,title:s,href:t,tags:n})=>(0,r.jsx)(i.A,{title:s,href:t,tags:n},e)))}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsx)(s.h2,{id:"ckb-address",children:"CKB Address"}),"\n",(0,r.jsxs)(s.p,{children:["Nervos CKB follows ",(0,r.jsx)(s.a,{href:"https://github.com/sipa/bips/blob/bip-bech32m/bip-0350.mediawiki",children:"Bitcoin's bech32m address format (BIP-350)"})," for address generation. It features a new full address format like this: ",(0,r.jsx)(s.code,{children:"ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqdnnw7qkdnnclfkg59uzn8umtfd2kwxceqxwquc4"}),"."]}),"\n",(0,r.jsxs)(s.p,{children:["The previous short address format is now ",(0,r.jsx)(s.strong,{children:"deprecated"}),", for example: ",(0,r.jsx)(s.code,{children:"ckb1qyq5lv479ewscx3ms620sv34pgeuz6zagaaqklhtgg"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"Tools for address generation and transformation include:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://ckb.tools/",children:"CKB.tools/address"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://lumos-website.vercel.app/#2-generate-a-wallet-account",children:"CKB Lumos"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://codesandbox.io/s/ckb-address-transformer-524gi",children:"ckb-address-transformer"})}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["For detailed specifications, refer to ",(0,r.jsx)(s.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0021-ckb-address-format/0021-ckb-address-format.md",children:"RFC0021: CKB Address Format"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"requirements-for-ckb-transfers",children:"Requirements for CKB Transfers"}),"\n",(0,r.jsxs)(s.p,{children:["To initiate a transfer, you need at least one Cell. Each Cell comprises the essential data fields: ",(0,r.jsx)(s.code,{children:"capacity"}),",\xa0",(0,r.jsx)(s.code,{children:"lock"}),",\xa0",(0,r.jsx)(s.code,{children:"args"}),", and\xa0",(0,r.jsx)(s.code,{children:"hash_type"}),", with storage sizes as follows:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"capacity"}),": 8 bytes"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"lock"}),": 32 bytes"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"args"}),": 20 bytes"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"hash_type"}),": 1 byte"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Thus, a single Cell requires at least 61 bytes of storage, equivalent to 61 CKBytes (CKB). ",(0,r.jsx)(s.strong,{children:"Allocating 62 CKB is recommended to cover additional fees."})]})]})}function f(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},3298:(e,s,t)=>{t.d(s,{Y:()=>r});var r=[{title:"Neuron",href:"https://neuron.magickbase.com/",tags:["Desktop"]},{title:"JoyID",href:"https://joy.id/",tags:["Web-based"]},{title:"imToken",href:"https://token.im/ckb-wallet",tags:["Mobile"]},{title:"CKBull",href:"https://ckbull.app/#download",tags:["Mobile"]},{title:"SafePal",href:"https://blog.safepal.com/ckb/",tags:["Mobile","Hardware"]},{title:"Ledger",href:"https://www.ledger.com/",tags:["Hardware"]},{title:"imKey",href:"https://imkey.im/",tags:["Hardware"]},{title:"OneKey",href:"https://onekey.so/",tags:["Mobile","Desktop","Hardware"]}]},8803:(e,s,t)=>{t.d(s,{A:()=>i});t(6540);const r="layoutContainer_TJ5m";var n=t(4848);const i=function(e){var s=e.children,t=e.topMargin,i=void 0===t?16:t,o=e.colNum,a=void 0===o?[2,1,2,1]:o,l=e.gap,d=void 0===l?24:l;return(0,n.jsx)("div",{style:{marginTop:i+"px","--gap":d+"px","--columnL":a[0],"--columnM":a[1],"--columnS":a[2],"--columnXS":a[3]},className:r,children:s})}},7616:(e,s,t)=>{t.d(s,{A:()=>a});var r=t(53),n=t(4783);const i={cardContainer:"cardContainer_bFxw",smallCard:"smallCard_LdEU",iconContainer:"iconContainer_ugFC",rightContainer:"rightContainer_OYxw",title:"title_MBOd",tags:"tags_mvis",tag:"tag_BvXz"};var o=t(4848);function a(e){var s,t=e.title,a=e.href,l=e.tags,d=e.size,c=void 0===d?"default":d,h=e.className,p=t.toLowerCase().replace(/\s+/g,""),u="default"===c?48:32;return(0,o.jsxs)(n.A,{href:a,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(i.cardContainer,(s={},s[i.smallCard]="small"===c,s),h),children:[(0,o.jsx)("div",{style:{width:u,height:u,minWidth:u},className:i.iconContainer,children:(0,o.jsx)("img",{alt:"logo of "+t,src:"/svg/logo-"+p+".svg",width:u,height:u})}),(0,o.jsxs)("div",{className:i.rightContainer,children:[(0,o.jsx)("div",{className:i.title,children:t}),"default"===c&&(0,o.jsx)("div",{className:i.tags,children:l.map((function(e,s){return(0,o.jsx)("p",{className:i.tag,children:e},s)}))})]})]})}},8453:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>a});var r=t(6540);const n={},i=r.createContext(n);function o(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[594],{7953:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>h,contentTitle:()=>d,default:()=>f,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=t(4848),n=t(8453),i=(t(8180),t(4783),t(7616)),o=t(8803),a=t(3298);const l={id:"wallets",title:"Wallets",sidebar_position:3},d=void 0,c={id:"wallets/wallets",title:"Wallets",description:"Essential insights for CKB dApp developers, covering JoyID integration, wallet choices, address specifics, and CKB transfer guidelines",source:"@site/docs/wallets/wallets.mdx",sourceDirName:"wallets",slug:"/wallets/",permalink:"/docs/wallets/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/wallets/wallets.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:3,frontMatter:{id:"wallets",title:"Wallets",sidebar_position:3},sidebar:"tutorial",previous:{title:"Common Script Error Code",permalink:"/docs/Script/common-script-error-code"},next:{title:"RPCs",permalink:"/docs/rpcs"}},h={},p=[{value:"Integrate Wallet (JoyID)",id:"integrate-wallet-joyid",level:2},{value:"CKB Wallet Options",id:"ckb-wallet-options",level:2},{value:"CKB Address",id:"ckb-address",level:2},{value:"Requirements for CKB Transfers",id:"requirements-for-ckb-transfers",level:2}];function u(e){const s={a:"a",code:"code",h2:"h2",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.p,{children:"Essential insights for CKB dApp developers, covering JoyID integration, wallet choices, address specifics, and CKB transfer guidelines"}),"\n",(0,r.jsx)(s.h2,{id:"integrate-wallet-joyid",children:"Integrate Wallet (JoyID)"}),"\n",(0,r.jsx)(s.p,{children:"For developers looking to integrate wallets into their dApps, we currently recommend using JoyID, the most popular wallet in our ecosystem. JoyID offers a seamless experience for users, enabling secure and efficient interactions with your dApp."}),"\n",(0,r.jsxs)(s.p,{children:["For a comprehensive guide on integrating JoyID, please visit ",(0,r.jsx)(s.a,{href:"https://docs.joyid.dev/guide/evm/connect",children:"JoyID-Connect"}),". Stay tuned for future integration guides for additional wallets as our ecosystem continues to grow."]}),"\n",(0,r.jsx)(s.h2,{id:"ckb-wallet-options",children:"CKB Wallet Options"}),"\n",(0,r.jsx)(s.p,{children:"Crypto wallets store private keys to access cryptos. They come in two types: hot wallets (online) and cold wallets (offline). Hot wallets, such as web-based, desktop, and mobile wallets, offer convenience but pose higher risk. Cold wallets, including paper and hardware wallets, provide enhanced security by keeping keys offline."}),"\n",(0,r.jsx)(s.p,{children:"When it comes to storing and securing CKB assets, users have various options, including hot and cold wallets. While storing assets on exchanges is common, additional security can be achieved with dedicated wallets."}),"\n",(0,r.jsx)(s.p,{children:"These wallets listed below offer custody and security services tailored to CKB. For more information, refer to the respective guides for each wallet."}),"\n",(0,r.jsx)(o.A,{colNum:[2,2,2,2],children:a.Y.map((({index:e,title:s,href:t,tags:n})=>(0,r.jsx)(i.A,{title:s,href:t,tags:n},e)))}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsx)(s.h2,{id:"ckb-address",children:"CKB Address"}),"\n",(0,r.jsxs)(s.p,{children:["Nervos CKB follows ",(0,r.jsx)(s.a,{href:"https://github.com/sipa/bips/blob/bip-bech32m/bip-0350.mediawiki",children:"Bitcoin's bech32m address format (BIP-350)"})," for address generation. It features a new full address format like this: ",(0,r.jsx)(s.code,{children:"ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqdnnw7qkdnnclfkg59uzn8umtfd2kwxceqxwquc4"}),"."]}),"\n",(0,r.jsxs)(s.p,{children:["The previous short address format is now ",(0,r.jsx)(s.strong,{children:"deprecated"}),", for example: ",(0,r.jsx)(s.code,{children:"ckb1qyq5lv479ewscx3ms620sv34pgeuz6zagaaqklhtgg"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"Tools for address generation and transformation include:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://ckb.tools/",children:"CKB.tools/address"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://lumos-website.vercel.app/#2-generate-a-wallet-account",children:"CKB Lumos"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"https://codesandbox.io/s/ckb-address-transformer-524gi",children:"ckb-address-transformer"})}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["For detailed specifications, refer to ",(0,r.jsx)(s.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0021-ckb-address-format/0021-ckb-address-format.md",children:"RFC0021: CKB Address Format"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"requirements-for-ckb-transfers",children:"Requirements for CKB Transfers"}),"\n",(0,r.jsxs)(s.p,{children:["To initiate a transfer, you need at least one Cell. Each Cell comprises the essential data fields: ",(0,r.jsx)(s.code,{children:"capacity"}),",\xa0",(0,r.jsx)(s.code,{children:"lock"}),",\xa0",(0,r.jsx)(s.code,{children:"args"}),", and\xa0",(0,r.jsx)(s.code,{children:"hash_type"}),", with storage sizes as follows:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"capacity"}),": 8 bytes"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"lock"}),": 32 bytes"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"args"}),": 20 bytes"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"hash_type"}),": 1 byte"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Thus, a single Cell requires at least 61 bytes of storage, equivalent to 61 CKBytes (CKB). ",(0,r.jsx)(s.strong,{children:"Allocating 62 CKB is recommended to cover additional fees."})]})]})}function f(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},3298:(e,s,t)=>{t.d(s,{Y:()=>r});var r=[{title:"Neuron",href:"https://neuron.magickbase.com/",tags:["Desktop"]},{title:"JoyID",href:"https://joy.id/",tags:["Web-based"]},{title:"imToken",href:"https://token.im/ckb-wallet",tags:["Mobile"]},{title:"CKBull",href:"https://ckbull.app/#download",tags:["Mobile"]},{title:"SafePal",href:"https://blog.safepal.com/ckb/",tags:["Mobile","Hardware"]},{title:"Ledger",href:"https://www.ledger.com/",tags:["Hardware"]},{title:"imKey",href:"https://imkey.im/",tags:["Hardware"]},{title:"OneKey",href:"https://onekey.so/",tags:["Mobile","Desktop","Hardware"]}]},8803:(e,s,t)=>{t.d(s,{A:()=>i});t(6540);const r="layoutContainer_TJ5m";var n=t(4848);const i=function(e){var s=e.children,t=e.topMargin,i=void 0===t?16:t,o=e.colNum,a=void 0===o?[2,1,2,1]:o,l=e.gap,d=void 0===l?24:l;return(0,n.jsx)("div",{style:{marginTop:i+"px","--gap":d+"px","--columnL":a[0],"--columnM":a[1],"--columnS":a[2],"--columnXS":a[3]},className:r,children:s})}},7616:(e,s,t)=>{t.d(s,{A:()=>a});var r=t(53),n=t(4783);const i={cardContainer:"cardContainer_bFxw",smallCard:"smallCard_LdEU",iconContainer:"iconContainer_ugFC",rightContainer:"rightContainer_OYxw",title:"title_MBOd",tags:"tags_mvis",tag:"tag_BvXz"};var o=t(4848);function a(e){var s,t=e.title,a=e.href,l=e.tags,d=e.size,c=void 0===d?"default":d,h=e.className,p=t.toLowerCase().replace(/\s+/g,""),u="default"===c?48:32;return(0,o.jsxs)(n.A,{href:a,target:"_blank",rel:"noopener noreferrer",className:(0,r.A)(i.cardContainer,(s={},s[i.smallCard]="small"===c,s),h),children:[(0,o.jsx)("div",{style:{width:u,height:u,minWidth:u},className:i.iconContainer,children:(0,o.jsx)("img",{alt:"logo of "+t,src:"/svg/logo-"+p+".svg",width:u,height:u})}),(0,o.jsxs)("div",{className:i.rightContainer,children:[(0,o.jsx)("div",{className:i.title,children:t}),"default"===c&&(0,o.jsx)("div",{className:i.tags,children:l.map((function(e,s){return(0,o.jsx)("p",{className:i.tag,children:e},s)}))})]})]})}},8453:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>a});var r=t(6540);const n={},i=r.createContext(n);function o(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5dbf90bd.945d8144.js b/assets/js/5dbf90bd.be63ad9b.js similarity index 99% rename from assets/js/5dbf90bd.945d8144.js rename to assets/js/5dbf90bd.be63ad9b.js index ae66ee85d..bfd01d51e 100644 --- a/assets/js/5dbf90bd.945d8144.js +++ b/assets/js/5dbf90bd.be63ad9b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[177],{7152:(e,t,n)=>{n.d(t,{Ay:()=>a});var s=n(4848),r=n(8453);function o(e){const t={a:"a",code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"So now your app works great on the local blockchain, you might want to switch it to different environments like Testnet and Mainnet."}),"\n",(0,s.jsx)(t.p,{children:"To do this, you need to update the chain config and related code."}),"\n",(0,s.jsxs)(t.p,{children:["Open the ",(0,s.jsx)(t.code,{children:"ckb.ts"})," in your project root dir, change the ",(0,s.jsx)(t.code,{children:"lumosConfig"})," and ",(0,s.jsx)(t.code,{children:"CKB_RPC_URL"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"//export const lumosConfig: config.Config = devConfig as config.Config;\nexport const lumosConfig = config.predefined.AGGRON4 as config.Config;\n\n//export const CKB_RPC_URL = 'http://localhost:8114';\nexport const CKB_RPC_URL = \"https://testnet.ckb.dev/rpc\";\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Actually, we have the corresponding Testnet version examples for all these tutorials. The source code of the Testnet version is in ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples",children:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples"}),", you can clone the repo and start running on Testnet."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/docs.nervos.org.git\ncd docs.nervos.org/examples/\nyarn && yarn start\n"})}),"\n",(0,s.jsxs)(t.p,{children:["For more details, check out the ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/blob/develop/examples/simple-transfer/README.md",children:"README.md"}),";"]})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},5001:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>x,contentTitle:()=>h,default:()=>g,frontMatter:()=>u,metadata:()=>p,toc:()=>f});var s=n(4848),r=n(8453),o=n(9489),a=n(7227),c=n(8652),i=n(9735),l=n(2861),d=n(7152);const u={id:"create-token",title:"Tutorial: Create a Fungible Token",sidebar_position:4},h="Create a Fungible Token",p={id:"getting-started/create-token",title:"Tutorial: Create a Fungible Token",description:"\n"})}),"\n",(0,s.jsxs)(t.p,{children:["When prompted to select a dApp template, use your arrow keys to select ",(0,s.jsx)(t.strong,{children:"Create a Fungible Token"})," for this tutorial."]}),"\n",(0,s.jsxs)(o.A,{children:[(0,s.jsx)(a.A,{value:"offckb-init",label:"Command",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",metastring:"{4}",children:"? Select a dApp template (Use arrow keys)\n View and Transfer a CKB Balance\n Write an On-Chain Message\n> Create a Fungible Token\n Create a Digital Object Using Spore Protocol\na simple dApp to issue your own token via xUDT scripts\n"})})}),(0,s.jsx)(a.A,{value:"offckb-init-result",label:"Response",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"init CKB dApp project: /Users/ckb/Desktop/offckb/\n\u2728 Done in 2.52s.\n"})})})]}),"\n",(0,s.jsx)(t.h3,{id:"step-2-start-the-devnet",children:"Step 2: Start the Devnet"}),"\n",(0,s.jsx)(l.A,{imageSrc:"img/dapps/issue-token-dapp.jpg"}),"\n",(0,s.jsx)(t.h2,{id:"behind-the-scene",children:"Behind the Scene"}),"\n",(0,s.jsx)(t.h3,{id:"issuing-custom-token",children:"Issuing Custom Token"}),"\n",(0,s.jsxs)(t.p,{children:["Open the ",(0,s.jsx)(t.code,{children:"lib.ts"})," file in your project and check out the ",(0,s.jsx)(t.code,{children:"IssueToken"})," function:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"export async function issueToken(privKey: string, amount: string) {\n const xudtDeps = lumosConfig.SCRIPTS.XUDT;\n\n const { lockScript } = generateAccountFromPrivateKey(privKey);\n const xudtArgs = utils.computeScriptHash(lockScript) + '00000000';\n\n const typeScript = {\n codeHash: xudtDeps.CODE_HASH,\n hashType: xudtDeps.HASH_TYPE,\n args: xudtArgs,\n };\n ...\n}\n"})}),"\n",(0,s.jsx)(t.p,{children:"This function accepts two parameters:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"privKey"}),": The private key of the issuer"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"amount"}),": The amount of token"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["Note that we aim to create an output Cell whose ",(0,s.jsx)(t.a,{href:"/docs/concepts/glossary#type-script",children:"type script"})," is an xUDT script. The args of this xUDT script are the issuer's lock script hash, which is why we include the following lines of code:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'const { lockScript } = generateAccountFromPrivateKey(privKey);\nconst xudtArgs = utils.computeScriptHash(lockScript) + "00000000";\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Also, note that the ",(0,s.jsx)(t.code,{children:"00000000"})," here is just a placeholder. To unlock more capabilities of the xUDT script, this placeholder can contain specific data. However, we don't need to concern ourselves with this detail at the moment."]}),"\n",(0,s.jsx)(t.p,{children:"Further down in the function, you'll see that the complete target output Cell of our custom token appears as follows:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'const targetOutput: Cell = {\n cellOutput: {\n capacity: "0x0",\n lock: lockScript,\n type: typeScript,\n },\n data: bytes.hexify(number.Uint128LE.pack(amount)),\n};\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Note that the ",(0,s.jsx)(t.code,{children:"data"})," field is the amount of the custom token."]}),"\n",(0,s.jsxs)(t.p,{children:["Next, to complete our ",(0,s.jsx)(t.code,{children:"issueToken"})," function, we just use the ",(0,s.jsx)(t.code,{children:"helpers.TransactionSkeleton"})," to build the transaction with our desired output Cells."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"let txSkeleton = helpers.TransactionSkeleton();\ntxSkeleton = addCellDep(txSkeleton, {\n outPoint: {\n txHash: lockDeps.TX_HASH,\n index: lockDeps.INDEX,\n },\n depType: lockDeps.DEP_TYPE,\n});\n...\ntxSkeleton = txSkeleton.update('inputs', (inputs) => inputs.push(...collected));\n txSkeleton = txSkeleton.update('outputs', (outputs) => outputs.push(targetOutput, changeOutput));\n\n...\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Lastly, we do the signing and witness data part, just like what we mentioned in the previous tutorial in the ",(0,s.jsx)(t.a,{href:"/docs/getting-started/transfer-ckb",children:"Transfer CKB"})," example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'// prepare witness data\n/* 65-byte zeros in hex */\nconst lockWitness =\n "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";\nconst outputTypeWitness = xudtWitnessType.pack({ extension_data: [] });\nconst witnessArgs = blockchain.WitnessArgs.pack({\n lock: lockWitness,\n outputType: outputTypeWitness,\n});\nconst witness = bytes.hexify(witnessArgs);\ntxSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.set(0, witness)\n);\n\n// signing\ntxSkeleton = commons.common.prepareSigningEntries(txSkeleton);\nconst message = txSkeleton.get("signingEntries").get(0)?.message;\nconst Sig = hd.key.signRecoverable(message!, privKey);\nconst tx = helpers.sealTransaction(txSkeleton, [Sig]);\n\n// submit transaction\nconst hash = await rpc.sendTransaction(tx, "passthrough");\nconsole.log("The transaction hash is", hash);\n'})}),"\n",(0,s.jsx)(t.h3,{id:"token-info--holders",children:"Token Info & Holders"}),"\n",(0,s.jsxs)(t.p,{children:["Since we have issued a custom token, the next step will be checking out this token and viewing its holders. To do that, we write a ",(0,s.jsx)(t.code,{children:"queryIssuedTokenCells"})," in the ",(0,s.jsx)(t.code,{children:"lib.ts"})," file:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"export async function queryIssuedTokenCells(xudtArgs: HexString) {\n const xudtDeps = lumosConfig.SCRIPTS.XUDT;\n const typeScript = {\n codeHash: xudtDeps.CODE_HASH,\n hashType: xudtDeps.HASH_TYPE,\n args: xudtArgs,\n };\n\n const collected: Cell[] = [];\n const collector = indexer.collector({ type: typeScript });\n for await (const cell of collector.collect()) {\n collected.push(cell);\n }\n return collected;\n}\n"})}),"\n",(0,s.jsx)(t.p,{children:"Note that to query a custom token Cell, we must know its xUDTArgs. As explained in the high-level ideas for xUDT scripts, this xUDTArgs functions like the unique ID for the token you issued."}),"\n",(0,s.jsxs)(t.p,{children:["Thus, ",(0,s.jsx)(t.code,{children:"queryIssuedTokenCells"})," will accept only one parameter: xudtArgs. We then construct a type script with this xudtArgs and use ",(0,s.jsx)(t.code,{children:"indexer.collector({ type: typeScript });"})," to query the Live Cells that possess such a type script."]}),"\n",(0,s.jsx)(t.p,{children:"By identifying the lock scripts of these Live Cells, we can determine that those custom tokens now belong to the individual who can unlock this lock script. Consequently, we know who the token holders are."}),"\n",(0,s.jsx)(t.h3,{id:"transfer-custom-token",children:"Transfer Custom Token"}),"\n",(0,s.jsx)(t.p,{children:"The next step you want to do is probably sending your tokens to someone else. To do that, you will replace the lock script of the custom token Cell with the receiver's lock script. Therefore, the receiver can unlock the custom token Cell. In this way, the token is transferred from you to other people."}),"\n",(0,s.jsxs)(t.p,{children:["Check out the ",(0,s.jsx)(t.code,{children:"transferTokenToAddress"})," function in ",(0,s.jsx)(t.code,{children:"lib.ts"})," file."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"export async function transferTokenToAddress(\n udtIssuerArgs: string,\n senderPrivKey: string,\n amount: string,\n receiverAddress: string,\n){\n ...\n}\n"})}),"\n",(0,s.jsxs)(t.p,{children:["The function use ",(0,s.jsx)(t.code,{children:"udtIssuerArgs"})," to build the type script from the custom token. It then collects Live Cells which match the type script and the lock script of the ",(0,s.jsx)(t.code,{children:"senderLockScript"}),', effectively saying, "give me the custom token Cells that belong to the sender (the sender can unlock the lock script).".']}),"\n",(0,s.jsx)(t.p,{children:"With all these Live Cells, we can build the transaction to produce custom token Cells with the required amount and the receiver's lock scripts from the input Cells."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'let txSkeleton = helpers.TransactionSkeleton();\ntxSkeleton = addCellDep(txSkeleton, {\n outPoint: {\n txHash: lockDeps.TX_HASH,\n index: lockDeps.INDEX,\n },\n depType: lockDeps.DEP_TYPE,\n});\ntxSkeleton = addCellDep(txSkeleton, {\n outPoint: {\n txHash: xudtDeps.TX_HASH,\n index: xudtDeps.INDEX,\n },\n depType: xudtDeps.DEP_TYPE,\n});\n\nconst targetOutput: Cell = {\n cellOutput: {\n capacity: "0x0",\n lock: receiverLockScript,\n type: typeScript,\n },\n data: bytes.hexify(number.Uint128LE.pack(amount)),\n};\n\nconst capacity = helpers.minimalCellCapacity(targetOutput);\ntargetOutput.cellOutput.capacity = "0x" + capacity.toString(16);\n'})}),"\n",(0,s.jsxs)(t.p,{children:["You may notice that the ",(0,s.jsx)(t.code,{children:"transferTokenToAddress"})," function is pretty long, while the core transfer logic above is quite simple. The problem is that we need to handle the capacity change in the ",(0,s.jsx)(t.code,{children:"changeOutputCell"}),". If the change capacity is less than 61CKB, we need to add another Live Cell in our inputs to build the ",(0,s.jsx)(t.code,{children:"changeOutputCell"}),". Also, we need to handle the changes in the token amount. If there is any token amount remaining, we need to return the change amount along with change capacities to the sender."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'let changeOutputTokenAmount = BI.from(0);\nif (collectedAmount.gt(BI.from(amount))) {\n changeOutputTokenAmount = collectedAmount.sub(BI.from(amount));\n}\n\nconst changeOutput: Cell = {\n cellOutput: {\n capacity: "0x0",\n lock: senderLockScript,\n type: typeScript,\n },\n data: bytes.hexify(\n number.Uint128LE.pack(changeOutputTokenAmount.toString(10))\n ),\n};\n\nconst changeOutputNeededCapacity = BI.from(\n helpers.minimalCellCapacity(changeOutput)\n);\n\nconst extraNeededCapacity = collectedSum.lt(neededCapacity)\n ? neededCapacity.sub(collectedSum).add(changeOutputNeededCapacity)\n : collectedSum.sub(neededCapacity).add(changeOutputNeededCapacity);\n\nif (extraNeededCapacity.gt(0)) {\n let extraCollectedSum = BI.from(0);\n const extraCollectedCells: Cell[] = [];\n const collector = indexer.collector({\n lock: senderLockScript,\n type: "empty",\n });\n for await (const cell of collector.collect()) {\n extraCollectedSum = extraCollectedSum.add(cell.cellOutput.capacity);\n extraCollectedCells.push(cell);\n if (extraCollectedSum >= extraNeededCapacity) break;\n }\n\n if (extraCollectedSum.lt(extraNeededCapacity)) {\n throw new Error(\n `Not enough CKB for change, ${extraCollectedSum} < ${extraNeededCapacity}`\n );\n }\n\n txSkeleton = txSkeleton.update("inputs", (inputs) =>\n inputs.push(...extraCollectedCells)\n );\n\n const change2Capacity = extraCollectedSum.sub(changeOutputNeededCapacity);\n if (change2Capacity.gt(61000000000)) {\n changeOutput.cellOutput.capacity = changeOutputNeededCapacity.toHexString();\n const changeOutput2: Cell = {\n cellOutput: {\n capacity: change2Capacity.toHexString(),\n lock: senderLockScript,\n },\n data: "0x",\n };\n txSkeleton = txSkeleton.update("outputs", (outputs) =>\n outputs.push(changeOutput2)\n );\n } else {\n changeOutput.cellOutput.capacity = extraCollectedSum.toHexString();\n }\n}\n'})}),"\n",(0,s.jsxs)(t.p,{children:["All the extra logic here can be a little confusing at first time. However, the overall high-level process is quite simple and straightforward. We are also looking forward to some tools like ",(0,s.jsx)(t.a,{href:"https://github.com/ckb-js/lumos",children:"Lumos"})," to automatically cover such works in the future."]}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,s.jsx)(t.p,{children:"By following this tutorial this far, you have mastered how custom tokens work on CKB. Here's a quick recap:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Create a CKB transaction containing a xUDT Cell in the outputs"}),"\n",(0,s.jsx)(t.li,{children:"The data of the xUDT Cell contains the amount number of the token"}),"\n",(0,s.jsx)(t.li,{children:"Query the custom token Cell by passing the lock script hash of the token issuer"}),"\n",(0,s.jsx)(t.li,{children:"Transfer tokens to another account by replacing the lock script."}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"next-step",children:"Next Step"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsx)(t.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["xUDT specs: ",(0,s.jsx)(t.a,{href:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md",children:"RFC-0052-extensible-udt"})]}),"\n",(0,s.jsxs)(t.li,{children:["sUDT specs: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0025-simple-udt/0025-simple-udt.md",children:"RFC-0025-simple-udt"})]}),"\n",(0,s.jsxs)(t.li,{children:["CKB transaction structure: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,s.jsxs)(t.li,{children:["CKB data structure basics: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function g(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},2861:(e,t,n)=>{n.d(t,{A:()=>p});var s=n(6540),r=n(4848),o=n(8453),a=n(9489),c=n(7227);const i={imgContainer:"imgContainer_VuXx"};function l(e){var t=e.alt,n=e.src;return(0,r.jsx)("div",{className:i.imgContainer,children:(0,r.jsx)("img",{alt:t,src:n})})}var d=n(8180);function u(e){const t={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"To interact with the dApp, you need to have your Devnet running. Open one terminal and start the Devnet:"}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(c.A,{value:"offckb-node",label:"Command",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"offckb node\n"})})}),(0,r.jsx)(c.A,{value:"offckb-node-result",label:"Response",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,r.jsx)(t.p,{children:"You might want to check pre-funded accounts and copy private keys for later use. Open another terminal and execute:"}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(c.A,{value:"offckb-accounts",label:"Command",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"offckb accounts\n"})})}),(0,r.jsx)(c.A,{value:"offckb-accounts-result",label:"Response",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"Print account list, each account is funded with 42_000_000_00000000 capacity in the genesis block.\n[\n {\n privkey: '0x6109170b275a09ad54877b82f7d9930f88cab5717d484fb4741ae9d1dd078cd6',\n pubkey: '0x02025fa7b61b2365aa459807b84df065f1949d58c0ae590ff22dd2595157bffefa',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvwg2cen8extgq8s5puft8vf40px3f599cytcyd8',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n {\n privkey: '0x9f315d5a9618a39fdc487c7a67a8581d40b045bd7a42d83648ca80ef3b2cb4a1',\n pubkey: '0x026efa0579f09cc7c1129b78544f70098c90b2ab155c10746316f945829c034a2d',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt435c3epyrupszm7khk6weq5lrlyt52lg48ucew',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n #... \n]\n"})})})]}),"\n",(0,r.jsx)(t.h3,{id:"step-3-run-the-example",children:"Step 3: Run the Example"}),"\n",(0,r.jsx)(t.p,{children:"Navigate to your project, install the node dependencies, and start running the example:"}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(c.A,{value:"offckb-yarn-start",label:"Command",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"cd && yarn && yarn start\n"})})}),(0,r.jsx)(c.A,{value:"offckb-yarn-start-result",label:"Response",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"$ parcel index.html\nServer running at http://localhost:1234\n\u2728 Built in 66ms\n"})})})]}),"\n",(0,r.jsxs)(t.p,{children:["Now, the app is running in ",(0,r.jsx)(t.a,{href:"http://localhost:1234",children:"http://localhost:1234"})]}),"\n",(0,r.jsx)(l,{src:(0,d.A)(e.imageSrc)}),"\n",(0,r.jsx)(t.hr,{})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}const p=function(e){return(0,s.createElement)(h,e)}},9735:(e,t,n)=>{n.d(t,{Bo:()=>o,Hd:()=>i,bB:()=>c,pv:()=>a});var s=n(4783),r=n(4848),o={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"},{label:"Witness",link:"/docs/concepts/glossary#witness"},{label:"Signature",link:"/docs/concepts/glossary#cryptographic-signature"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},a={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Data",link:"/docs/concepts/glossary#data"},{label:"Transaction Hash",link:"/docs/concepts/glossary#transaction-hash"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},c={time:"5 - 10 min",topics:[{label:"UDT",link:"/docs/concepts/glossary#udt"},{label:"Fungible Token",link:"/docs/concepts/glossary#fungible-token"},{label:"xUDT",link:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},i={time:"5 - 10 min",topics:[{label:"DOB",link:"/docs/concepts/glossary#digital-object-dob"},{label:"NFT",link:"/docs/concepts/glossary#non-fungible-token"},{label:"Spore Protocol",link:"https://spore.pro"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]}},7227:(e,t,n)=>{n.d(t,{A:()=>a});n(6540);var s=n(8215);const r={tabItem:"tabItem_Ymn6"};var o=n(4848);function a(e){var t=e.children,n=e.hidden,a=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,a),hidden:n,children:t})}},9489:(e,t,n)=>{n.d(t,{A:()=>y});var s=n(6540),r=n(8215),o=n(4245),a=n(6347),c=n(6494),i=n(2814),l=n(5167),d=n(1269);function u(e){var t,n;return null!=(t=null==(n=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,s.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,l.X)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function x(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId,o=(0,a.W6)(),c=function(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:n,groupId:r});return[(0,i.aZ)(c),(0,s.useCallback)((function(e){if(c){var t=new URLSearchParams(o.location.search);t.set(c,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[c,o])]}function f(e){var t,n,r,o,a=e.defaultValue,i=e.queryString,l=void 0!==i&&i,u=e.groupId,f=h(e),m=(0,s.useState)((function(){return function(e){var t,n=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var r=null!=(t=s.find((function(e){return e.default})))?t:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:a,tabValues:f})})),g=m[0],b=m[1],k=x({queryString:l,groupId:u}),v=k[0],j=k[1],y=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),n=(0,d.Dv)(t),r=n[0],o=n[1],[r,(0,s.useCallback)((function(e){t&&o.set(e)}),[t,o])]),C=y[0],w=y[1],T=function(){var e=null!=v?v:C;return p({value:e,tabValues:f})?e:null}();return(0,c.A)((function(){T&&b(T)}),[T]),{selectedValue:g,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);b(e),j(e),w(e)}),[j,w,f]),tabValues:f}}var m=n(1062);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=n(4848);function k(e){var t=e.className,n=e.block,s=e.selectedValue,a=e.selectValue,c=e.tabValues,i=[],l=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=i.indexOf(t),r=c[n].value;r!==s&&(l(t),a(r))},u=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,r=i.indexOf(e.currentTarget)+1;n=null!=(s=i[r])?s:i[0];break;case"ArrowLeft":var o,a=i.indexOf(e.currentTarget)-1;n=null!=(o=i[a])?o:i[i.length-1]}null==(t=n)||t.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},t),children:c.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,ref:function(e){return i.push(e)},onKeyDown:u,onClick:d},o,{className:(0,r.A)("tabs__item",g.tabItem,null==o?void 0:o.className,{"tabs__item--active":s===t}),children:null!=n?n:t}),t)}))})}function v(e){var t=e.lazy,n=e.children,r=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var a=o.find((function(e){return e.props.value===r}));return a?(0,s.cloneElement)(a,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==r})}))})}function j(e){var t=f(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,b.jsx)(k,Object.assign({},e,t)),(0,b.jsx)(v,Object.assign({},e,t))]})}function y(e){var t=(0,m.A)();return(0,b.jsx)(j,Object.assign({},e,{children:u(e.children)}),String(t))}},8652:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(6540);const r={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var o=n(4783),a=n(4848);function c(e){var t=e.time,n=e.topics,c=e.tools;return(0,a.jsxs)("div",{className:r.box,children:[(0,a.jsx)("h4",{children:"Tutorial Overview"}),(0,a.jsxs)("div",{className:r.subsection,children:[(0,a.jsx)("strong",{children:"\u23f0 Estimated Time: "}),t]}),n&&(0,a.jsxs)("div",{className:r.subsection,children:[(0,a.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),n.map((function(e,t){return(0,a.jsxs)(s.Fragment,{children:[t>0&&", ",(0,a.jsx)(o.A,{href:e.link,children:e.label})]},t)}))]}),(0,a.jsx)("div",{className:r.subsection,children:(0,a.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,a.jsx)("ul",{className:r.toolList,children:c.map((function(e,t){return(0,a.jsx)("li",{children:e},t)}))})]})}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var s=n(6540);const r={},o=s.createContext(r);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[177],{7152:(e,t,n)=>{n.d(t,{Ay:()=>a});var s=n(4848),r=n(8453);function o(e){const t={a:"a",code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"So now your app works great on the local blockchain, you might want to switch it to different environments like Testnet and Mainnet."}),"\n",(0,s.jsx)(t.p,{children:"To do this, you need to update the chain config and related code."}),"\n",(0,s.jsxs)(t.p,{children:["Open the ",(0,s.jsx)(t.code,{children:"ckb.ts"})," in your project root dir, change the ",(0,s.jsx)(t.code,{children:"lumosConfig"})," and ",(0,s.jsx)(t.code,{children:"CKB_RPC_URL"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"//export const lumosConfig: config.Config = devConfig as config.Config;\nexport const lumosConfig = config.predefined.AGGRON4 as config.Config;\n\n//export const CKB_RPC_URL = 'http://localhost:8114';\nexport const CKB_RPC_URL = \"https://testnet.ckb.dev/rpc\";\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Actually, we have the corresponding Testnet version examples for all these tutorials. The source code of the Testnet version is in ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples",children:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples"}),", you can clone the repo and start running on Testnet."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/docs.nervos.org.git\ncd docs.nervos.org/examples/\nyarn && yarn start\n"})}),"\n",(0,s.jsxs)(t.p,{children:["For more details, check out the ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/blob/develop/examples/simple-transfer/README.md",children:"README.md"}),";"]})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},5001:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>x,contentTitle:()=>h,default:()=>g,frontMatter:()=>u,metadata:()=>p,toc:()=>f});var s=n(4848),r=n(8453),o=n(9489),a=n(7227),c=n(8652),i=n(9735),l=n(2861),d=n(7152);const u={id:"create-token",title:"Tutorial: Create a Fungible Token",sidebar_position:4},h="Create a Fungible Token",p={id:"getting-started/create-token",title:"Tutorial: Create a Fungible Token",description:"\n"})}),"\n",(0,s.jsxs)(t.p,{children:["When prompted to select a dApp template, use your arrow keys to select ",(0,s.jsx)(t.strong,{children:"Create a Fungible Token"})," for this tutorial."]}),"\n",(0,s.jsxs)(o.A,{children:[(0,s.jsx)(a.A,{value:"offckb-init",label:"Command",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",metastring:"{4}",children:"? Select a dApp template (Use arrow keys)\n View and Transfer a CKB Balance\n Write an On-Chain Message\n> Create a Fungible Token\n Create a Digital Object Using Spore Protocol\na simple dApp to issue your own token via xUDT scripts\n"})})}),(0,s.jsx)(a.A,{value:"offckb-init-result",label:"Response",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"init CKB dApp project: /Users/ckb/Desktop/offckb/\n\u2728 Done in 2.52s.\n"})})})]}),"\n",(0,s.jsx)(t.h3,{id:"step-2-start-the-devnet",children:"Step 2: Start the Devnet"}),"\n",(0,s.jsx)(l.A,{imageSrc:"img/dapps/issue-token-dapp.jpg"}),"\n",(0,s.jsx)(t.h2,{id:"behind-the-scene",children:"Behind the Scene"}),"\n",(0,s.jsx)(t.h3,{id:"issuing-custom-token",children:"Issuing Custom Token"}),"\n",(0,s.jsxs)(t.p,{children:["Open the ",(0,s.jsx)(t.code,{children:"lib.ts"})," file in your project and check out the ",(0,s.jsx)(t.code,{children:"IssueToken"})," function:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"export async function issueToken(privKey: string, amount: string) {\n const xudtDeps = lumosConfig.SCRIPTS.XUDT;\n\n const { lockScript } = generateAccountFromPrivateKey(privKey);\n const xudtArgs = utils.computeScriptHash(lockScript) + '00000000';\n\n const typeScript = {\n codeHash: xudtDeps.CODE_HASH,\n hashType: xudtDeps.HASH_TYPE,\n args: xudtArgs,\n };\n ...\n}\n"})}),"\n",(0,s.jsx)(t.p,{children:"This function accepts two parameters:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"privKey"}),": The private key of the issuer"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"amount"}),": The amount of token"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["Note that we aim to create an output Cell whose ",(0,s.jsx)(t.a,{href:"/docs/concepts/glossary#type-script",children:"type script"})," is an xUDT script. The args of this xUDT script are the issuer's lock script hash, which is why we include the following lines of code:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'const { lockScript } = generateAccountFromPrivateKey(privKey);\nconst xudtArgs = utils.computeScriptHash(lockScript) + "00000000";\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Also, note that the ",(0,s.jsx)(t.code,{children:"00000000"})," here is just a placeholder. To unlock more capabilities of the xUDT script, this placeholder can contain specific data. However, we don't need to concern ourselves with this detail at the moment."]}),"\n",(0,s.jsx)(t.p,{children:"Further down in the function, you'll see that the complete target output Cell of our custom token appears as follows:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'const targetOutput: Cell = {\n cellOutput: {\n capacity: "0x0",\n lock: lockScript,\n type: typeScript,\n },\n data: bytes.hexify(number.Uint128LE.pack(amount)),\n};\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Note that the ",(0,s.jsx)(t.code,{children:"data"})," field is the amount of the custom token."]}),"\n",(0,s.jsxs)(t.p,{children:["Next, to complete our ",(0,s.jsx)(t.code,{children:"issueToken"})," function, we just use the ",(0,s.jsx)(t.code,{children:"helpers.TransactionSkeleton"})," to build the transaction with our desired output Cells."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"let txSkeleton = helpers.TransactionSkeleton();\ntxSkeleton = addCellDep(txSkeleton, {\n outPoint: {\n txHash: lockDeps.TX_HASH,\n index: lockDeps.INDEX,\n },\n depType: lockDeps.DEP_TYPE,\n});\n...\ntxSkeleton = txSkeleton.update('inputs', (inputs) => inputs.push(...collected));\n txSkeleton = txSkeleton.update('outputs', (outputs) => outputs.push(targetOutput, changeOutput));\n\n...\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Lastly, we do the signing and witness data part, just like what we mentioned in the previous tutorial in the ",(0,s.jsx)(t.a,{href:"/docs/getting-started/transfer-ckb",children:"Transfer CKB"})," example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'// prepare witness data\n/* 65-byte zeros in hex */\nconst lockWitness =\n "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";\nconst outputTypeWitness = xudtWitnessType.pack({ extension_data: [] });\nconst witnessArgs = blockchain.WitnessArgs.pack({\n lock: lockWitness,\n outputType: outputTypeWitness,\n});\nconst witness = bytes.hexify(witnessArgs);\ntxSkeleton = txSkeleton.update("witnesses", (witnesses) =>\n witnesses.set(0, witness)\n);\n\n// signing\ntxSkeleton = commons.common.prepareSigningEntries(txSkeleton);\nconst message = txSkeleton.get("signingEntries").get(0)?.message;\nconst Sig = hd.key.signRecoverable(message!, privKey);\nconst tx = helpers.sealTransaction(txSkeleton, [Sig]);\n\n// submit transaction\nconst hash = await rpc.sendTransaction(tx, "passthrough");\nconsole.log("The transaction hash is", hash);\n'})}),"\n",(0,s.jsx)(t.h3,{id:"token-info--holders",children:"Token Info & Holders"}),"\n",(0,s.jsxs)(t.p,{children:["Since we have issued a custom token, the next step will be checking out this token and viewing its holders. To do that, we write a ",(0,s.jsx)(t.code,{children:"queryIssuedTokenCells"})," in the ",(0,s.jsx)(t.code,{children:"lib.ts"})," file:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"export async function queryIssuedTokenCells(xudtArgs: HexString) {\n const xudtDeps = lumosConfig.SCRIPTS.XUDT;\n const typeScript = {\n codeHash: xudtDeps.CODE_HASH,\n hashType: xudtDeps.HASH_TYPE,\n args: xudtArgs,\n };\n\n const collected: Cell[] = [];\n const collector = indexer.collector({ type: typeScript });\n for await (const cell of collector.collect()) {\n collected.push(cell);\n }\n return collected;\n}\n"})}),"\n",(0,s.jsx)(t.p,{children:"Note that to query a custom token Cell, we must know its xUDTArgs. As explained in the high-level ideas for xUDT scripts, this xUDTArgs functions like the unique ID for the token you issued."}),"\n",(0,s.jsxs)(t.p,{children:["Thus, ",(0,s.jsx)(t.code,{children:"queryIssuedTokenCells"})," will accept only one parameter: xudtArgs. We then construct a type script with this xudtArgs and use ",(0,s.jsx)(t.code,{children:"indexer.collector({ type: typeScript });"})," to query the Live Cells that possess such a type script."]}),"\n",(0,s.jsx)(t.p,{children:"By identifying the lock scripts of these Live Cells, we can determine that those custom tokens now belong to the individual who can unlock this lock script. Consequently, we know who the token holders are."}),"\n",(0,s.jsx)(t.h3,{id:"transfer-custom-token",children:"Transfer Custom Token"}),"\n",(0,s.jsx)(t.p,{children:"The next step you want to do is probably sending your tokens to someone else. To do that, you will replace the lock script of the custom token Cell with the receiver's lock script. Therefore, the receiver can unlock the custom token Cell. In this way, the token is transferred from you to other people."}),"\n",(0,s.jsxs)(t.p,{children:["Check out the ",(0,s.jsx)(t.code,{children:"transferTokenToAddress"})," function in ",(0,s.jsx)(t.code,{children:"lib.ts"})," file."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"export async function transferTokenToAddress(\n udtIssuerArgs: string,\n senderPrivKey: string,\n amount: string,\n receiverAddress: string,\n){\n ...\n}\n"})}),"\n",(0,s.jsxs)(t.p,{children:["The function use ",(0,s.jsx)(t.code,{children:"udtIssuerArgs"})," to build the type script from the custom token. It then collects Live Cells which match the type script and the lock script of the ",(0,s.jsx)(t.code,{children:"senderLockScript"}),', effectively saying, "give me the custom token Cells that belong to the sender (the sender can unlock the lock script).".']}),"\n",(0,s.jsx)(t.p,{children:"With all these Live Cells, we can build the transaction to produce custom token Cells with the required amount and the receiver's lock scripts from the input Cells."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'let txSkeleton = helpers.TransactionSkeleton();\ntxSkeleton = addCellDep(txSkeleton, {\n outPoint: {\n txHash: lockDeps.TX_HASH,\n index: lockDeps.INDEX,\n },\n depType: lockDeps.DEP_TYPE,\n});\ntxSkeleton = addCellDep(txSkeleton, {\n outPoint: {\n txHash: xudtDeps.TX_HASH,\n index: xudtDeps.INDEX,\n },\n depType: xudtDeps.DEP_TYPE,\n});\n\nconst targetOutput: Cell = {\n cellOutput: {\n capacity: "0x0",\n lock: receiverLockScript,\n type: typeScript,\n },\n data: bytes.hexify(number.Uint128LE.pack(amount)),\n};\n\nconst capacity = helpers.minimalCellCapacity(targetOutput);\ntargetOutput.cellOutput.capacity = "0x" + capacity.toString(16);\n'})}),"\n",(0,s.jsxs)(t.p,{children:["You may notice that the ",(0,s.jsx)(t.code,{children:"transferTokenToAddress"})," function is pretty long, while the core transfer logic above is quite simple. The problem is that we need to handle the capacity change in the ",(0,s.jsx)(t.code,{children:"changeOutputCell"}),". If the change capacity is less than 61CKB, we need to add another Live Cell in our inputs to build the ",(0,s.jsx)(t.code,{children:"changeOutputCell"}),". Also, we need to handle the changes in the token amount. If there is any token amount remaining, we need to return the change amount along with change capacities to the sender."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:'let changeOutputTokenAmount = BI.from(0);\nif (collectedAmount.gt(BI.from(amount))) {\n changeOutputTokenAmount = collectedAmount.sub(BI.from(amount));\n}\n\nconst changeOutput: Cell = {\n cellOutput: {\n capacity: "0x0",\n lock: senderLockScript,\n type: typeScript,\n },\n data: bytes.hexify(\n number.Uint128LE.pack(changeOutputTokenAmount.toString(10))\n ),\n};\n\nconst changeOutputNeededCapacity = BI.from(\n helpers.minimalCellCapacity(changeOutput)\n);\n\nconst extraNeededCapacity = collectedSum.lt(neededCapacity)\n ? neededCapacity.sub(collectedSum).add(changeOutputNeededCapacity)\n : collectedSum.sub(neededCapacity).add(changeOutputNeededCapacity);\n\nif (extraNeededCapacity.gt(0)) {\n let extraCollectedSum = BI.from(0);\n const extraCollectedCells: Cell[] = [];\n const collector = indexer.collector({\n lock: senderLockScript,\n type: "empty",\n });\n for await (const cell of collector.collect()) {\n extraCollectedSum = extraCollectedSum.add(cell.cellOutput.capacity);\n extraCollectedCells.push(cell);\n if (extraCollectedSum >= extraNeededCapacity) break;\n }\n\n if (extraCollectedSum.lt(extraNeededCapacity)) {\n throw new Error(\n `Not enough CKB for change, ${extraCollectedSum} < ${extraNeededCapacity}`\n );\n }\n\n txSkeleton = txSkeleton.update("inputs", (inputs) =>\n inputs.push(...extraCollectedCells)\n );\n\n const change2Capacity = extraCollectedSum.sub(changeOutputNeededCapacity);\n if (change2Capacity.gt(61000000000)) {\n changeOutput.cellOutput.capacity = changeOutputNeededCapacity.toHexString();\n const changeOutput2: Cell = {\n cellOutput: {\n capacity: change2Capacity.toHexString(),\n lock: senderLockScript,\n },\n data: "0x",\n };\n txSkeleton = txSkeleton.update("outputs", (outputs) =>\n outputs.push(changeOutput2)\n );\n } else {\n changeOutput.cellOutput.capacity = extraCollectedSum.toHexString();\n }\n}\n'})}),"\n",(0,s.jsxs)(t.p,{children:["All the extra logic here can be a little confusing at first time. However, the overall high-level process is quite simple and straightforward. We are also looking forward to some tools like ",(0,s.jsx)(t.a,{href:"https://github.com/ckb-js/lumos",children:"Lumos"})," to automatically cover such works in the future."]}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,s.jsx)(t.p,{children:"By following this tutorial this far, you have mastered how custom tokens work on CKB. Here's a quick recap:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Create a CKB transaction containing a xUDT Cell in the outputs"}),"\n",(0,s.jsx)(t.li,{children:"The data of the xUDT Cell contains the amount number of the token"}),"\n",(0,s.jsx)(t.li,{children:"Query the custom token Cell by passing the lock script hash of the token issuer"}),"\n",(0,s.jsx)(t.li,{children:"Transfer tokens to another account by replacing the lock script."}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"next-step",children:"Next Step"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsx)(t.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["xUDT specs: ",(0,s.jsx)(t.a,{href:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md",children:"RFC-0052-extensible-udt"})]}),"\n",(0,s.jsxs)(t.li,{children:["sUDT specs: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0025-simple-udt/0025-simple-udt.md",children:"RFC-0025-simple-udt"})]}),"\n",(0,s.jsxs)(t.li,{children:["CKB transaction structure: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,s.jsxs)(t.li,{children:["CKB data structure basics: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function g(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},2861:(e,t,n)=>{n.d(t,{A:()=>p});var s=n(6540),r=n(4848),o=n(8453),a=n(9489),c=n(7227);const i={imgContainer:"imgContainer_VuXx"};function l(e){var t=e.alt,n=e.src;return(0,r.jsx)("div",{className:i.imgContainer,children:(0,r.jsx)("img",{alt:t,src:n})})}var d=n(8180);function u(e){const t={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"To interact with the dApp, you need to have your Devnet running. Open one terminal and start the Devnet:"}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(c.A,{value:"offckb-node",label:"Command",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"offckb node\n"})})}),(0,r.jsx)(c.A,{value:"offckb-node-result",label:"Response",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"/bin/sh: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb: No such file or directory\n/Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/ckb/ckb not found, download and install the new version 0.113.1..\nCKB installed successfully.\ninit Devnet config folder: /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet\nmodified /Users/nervosDocs/.nvm/versions/node/v18.12.1/lib/node_modules/@offckb/cli/target/devnet/ckb-miner.toml\nCKB output: 2024-03-20 07:56:44.765 +00:00 main INFO sentry sentry is disabled\n\nCKB output: 2024-03-20 07:56:44.766 +00:00 main INFO ckb_bin::helper raise_fd_limit newly-increased limit: 61440\n\nCKB output: 2024-03-20 07:56:44.854 +00:00 main INFO ckb_bin::subcommand::run ckb version: 0.113.1 (95ad24b 2024-01-31)\n\nCKB output: 2024-03-20 07:56:45.320 +00:00 main INFO ckb_db_migration Init database version 20230206163640\n\nCKB output: 2024-03-20 07:56:45.329 +00:00 main INFO ckb_launcher Touch chain spec hash: Byte32(0x3036c73473a371f3aa61c588c38924a93fb8513e481fa7c8d884fc4cf5fd368a)\n"})})})]}),"\n",(0,r.jsx)(t.p,{children:"You might want to check pre-funded accounts and copy private keys for later use. Open another terminal and execute:"}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(c.A,{value:"offckb-accounts",label:"Command",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"offckb accounts\n"})})}),(0,r.jsx)(c.A,{value:"offckb-accounts-result",label:"Response",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"Print account list, each account is funded with 42_000_000_00000000 capacity in the genesis block.\n[\n {\n privkey: '0x6109170b275a09ad54877b82f7d9930f88cab5717d484fb4741ae9d1dd078cd6',\n pubkey: '0x02025fa7b61b2365aa459807b84df065f1949d58c0ae590ff22dd2595157bffefa',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvwg2cen8extgq8s5puft8vf40px3f599cytcyd8',\n args: '0x8e42b1999f265a0078503c4acec4d5e134534297'\n },\n {\n privkey: '0x9f315d5a9618a39fdc487c7a67a8581d40b045bd7a42d83648ca80ef3b2cb4a1',\n pubkey: '0x026efa0579f09cc7c1129b78544f70098c90b2ab155c10746316f945829c034a2d',\n lockScript: {\n codeHash: '0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8',\n hashType: 'type',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n address: 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt435c3epyrupszm7khk6weq5lrlyt52lg48ucew',\n args: '0x758d311c8483e0602dfad7b69d9053e3f917457d'\n },\n #... \n]\n"})})})]}),"\n",(0,r.jsx)(t.h3,{id:"step-3-run-the-example",children:"Step 3: Run the Example"}),"\n",(0,r.jsx)(t.p,{children:"Navigate to your project, install the node dependencies, and start running the example:"}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(c.A,{value:"offckb-yarn-start",label:"Command",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"cd && yarn && yarn start\n"})})}),(0,r.jsx)(c.A,{value:"offckb-yarn-start-result",label:"Response",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"$ parcel index.html\nServer running at http://localhost:1234\n\u2728 Built in 66ms\n"})})})]}),"\n",(0,r.jsxs)(t.p,{children:["Now, the app is running in ",(0,r.jsx)(t.a,{href:"http://localhost:1234",children:"http://localhost:1234"})]}),"\n",(0,r.jsx)(l,{src:(0,d.A)(e.imageSrc)}),"\n",(0,r.jsx)(t.hr,{})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}const p=function(e){return(0,s.createElement)(h,e)}},9735:(e,t,n)=>{n.d(t,{Bo:()=>o,Hd:()=>i,bB:()=>c,pv:()=>a});var s=n(4783),r=n(4848),o={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"},{label:"Witness",link:"/docs/concepts/glossary#witness"},{label:"Signature",link:"/docs/concepts/glossary#cryptographic-signature"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},a={time:"2 - 5 min",topics:[{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Data",link:"/docs/concepts/glossary#data"},{label:"Transaction Hash",link:"/docs/concepts/glossary#transaction-hash"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},c={time:"5 - 10 min",topics:[{label:"UDT",link:"/docs/concepts/glossary#udt"},{label:"Fungible Token",link:"/docs/concepts/glossary#fungible-token"},{label:"xUDT",link:"https://github.com/XuJiandong/rfcs/blob/xudt/rfcs/0052-extensible-udt/0052-extensible-udt.md"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]},i={time:"5 - 10 min",topics:[{label:"DOB",link:"/docs/concepts/glossary#digital-object-dob"},{label:"NFT",link:"/docs/concepts/glossary#non-fungible-token"},{label:"Spore Protocol",link:"https://spore.pro"}],tools:[(0,r.jsx)("div",{children:"An IDE/Editor that supports TypeScript"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(s.A,{href:"https://nodejs.org/en",target:"_blank",rel:"noopener noreferrer",children:"Node.js"})," and ",(0,r.jsx)(s.A,{href:"https://yarnpkg.com/",target:"_blank",rel:"noopener noreferrer",children:"Yarn"})]}),(0,r.jsxs)("div",{children:["CKB dev environment: ",(0,r.jsx)(s.A,{to:"/docs/getting-started/dev-environment#quick-setup-with-offckb",children:"OffCKB"})]})]}},7227:(e,t,n)=>{n.d(t,{A:()=>a});n(6540);var s=n(8215);const r={tabItem:"tabItem_Ymn6"};var o=n(4848);function a(e){var t=e.children,n=e.hidden,a=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,a),hidden:n,children:t})}},9489:(e,t,n)=>{n.d(t,{A:()=>y});var s=n(6540),r=n(8215),o=n(4245),a=n(6347),c=n(6494),i=n(2814),l=n(5167),d=n(1269);function u(e){var t,n;return null!=(t=null==(n=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,s.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,l.X)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function x(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId,o=(0,a.W6)(),c=function(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:n,groupId:r});return[(0,i.aZ)(c),(0,s.useCallback)((function(e){if(c){var t=new URLSearchParams(o.location.search);t.set(c,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[c,o])]}function f(e){var t,n,r,o,a=e.defaultValue,i=e.queryString,l=void 0!==i&&i,u=e.groupId,f=h(e),m=(0,s.useState)((function(){return function(e){var t,n=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var r=null!=(t=s.find((function(e){return e.default})))?t:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:a,tabValues:f})})),g=m[0],b=m[1],k=x({queryString:l,groupId:u}),v=k[0],j=k[1],y=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),n=(0,d.Dv)(t),r=n[0],o=n[1],[r,(0,s.useCallback)((function(e){t&&o.set(e)}),[t,o])]),C=y[0],w=y[1],T=function(){var e=null!=v?v:C;return p({value:e,tabValues:f})?e:null}();return(0,c.A)((function(){T&&b(T)}),[T]),{selectedValue:g,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);b(e),j(e),w(e)}),[j,w,f]),tabValues:f}}var m=n(1062);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=n(4848);function k(e){var t=e.className,n=e.block,s=e.selectedValue,a=e.selectValue,c=e.tabValues,i=[],l=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=i.indexOf(t),r=c[n].value;r!==s&&(l(t),a(r))},u=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,r=i.indexOf(e.currentTarget)+1;n=null!=(s=i[r])?s:i[0];break;case"ArrowLeft":var o,a=i.indexOf(e.currentTarget)-1;n=null!=(o=i[a])?o:i[i.length-1]}null==(t=n)||t.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},t),children:c.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,b.jsx)("li",Object.assign({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,ref:function(e){return i.push(e)},onKeyDown:u,onClick:d},o,{className:(0,r.A)("tabs__item",g.tabItem,null==o?void 0:o.className,{"tabs__item--active":s===t}),children:null!=n?n:t}),t)}))})}function v(e){var t=e.lazy,n=e.children,r=e.selectedValue,o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var a=o.find((function(e){return e.props.value===r}));return a?(0,s.cloneElement)(a,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:o.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==r})}))})}function j(e){var t=f(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,b.jsx)(k,Object.assign({},e,t)),(0,b.jsx)(v,Object.assign({},e,t))]})}function y(e){var t=(0,m.A)();return(0,b.jsx)(j,Object.assign({},e,{children:u(e.children)}),String(t))}},8652:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(6540);const r={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var o=n(4783),a=n(4848);function c(e){var t=e.time,n=e.topics,c=e.tools;return(0,a.jsxs)("div",{className:r.box,children:[(0,a.jsx)("h4",{children:"Tutorial Overview"}),(0,a.jsxs)("div",{className:r.subsection,children:[(0,a.jsx)("strong",{children:"\u23f0 Estimated Time: "}),t]}),n&&(0,a.jsxs)("div",{className:r.subsection,children:[(0,a.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),n.map((function(e,t){return(0,a.jsxs)(s.Fragment,{children:[t>0&&", ",(0,a.jsx)(o.A,{href:e.link,children:e.label})]},t)}))]}),(0,a.jsx)("div",{className:r.subsection,children:(0,a.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,a.jsx)("ul",{className:r.toolList,children:c.map((function(e,t){return(0,a.jsx)("li",{children:e},t)}))})]})}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var s=n(6540);const r={},o=s.createContext(r);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5ee7b1bc.3388f3ca.js b/assets/js/5ee7b1bc.3c674928.js similarity index 99% rename from assets/js/5ee7b1bc.3388f3ca.js rename to assets/js/5ee7b1bc.3c674928.js index b3025334a..7178e296a 100644 --- a/assets/js/5ee7b1bc.3388f3ca.js +++ b/assets/js/5ee7b1bc.3c674928.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[743],{4990:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>a,default:()=>x,frontMatter:()=>o,metadata:()=>c,toc:()=>t});var i=s(4848),l=s(8453),r=s(8180);s(4783);const o={id:"glossary",title:"Glossary",sidebar_position:7},a=void 0,c={id:"concepts/glossary",title:"Glossary",description:"Glossary Sections",source:"@site/docs/concepts/glossary.md",sourceDirName:"concepts",slug:"/concepts/glossary",permalink:"/docs/concepts/glossary",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/glossary.md",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:7,frontMatter:{id:"glossary",title:"Glossary",sidebar_position:7},sidebar:"tutorial",previous:{title:"Tokenomics",permalink:"/docs/concepts/economics"},next:{title:"Ecosystem",permalink:"/docs/ecosystem"}},h={},t=[{value:"Glossary Sections",id:"glossary-sections",level:2},{value:"General Glossary",id:"general-glossary",level:2},{value:"Account",id:"account",level:3},{value:"Address",id:"address",level:3},{value:"Synonyms",id:"synonyms",level:4},{value:"Asset",id:"asset",level:3},{value:"Synonyms",id:"synonyms-1",level:4},{value:"Block",id:"block",level:3},{value:"See Also",id:"see-also",level:4},{value:"Block Height",id:"block-height",level:3},{value:"Synonyms",id:"synonyms-2",level:4},{value:"See Also",id:"see-also-1",level:4},{value:"Block Interval",id:"block-interval",level:3},{value:"Synonyms",id:"synonyms-3",level:4},{value:"See Also",id:"see-also-2",level:4},{value:"Block Propagation",id:"block-propagation",level:3},{value:"Synonyms",id:"synonyms-4",level:4},{value:"See Also",id:"see-also-3",level:4},{value:"Block Reward",id:"block-reward",level:3},{value:"See Also",id:"see-also-4",level:4},{value:"Block Time",id:"block-time",level:3},{value:"Synonyms",id:"synonyms-5",level:4},{value:"Blockchain",id:"blockchain",level:3},{value:"See Also",id:"see-also-5",level:4},{value:"BLS Signature",id:"bls-signature",level:3},{value:"See Also",id:"see-also-6",level:4},{value:"Broadcast",id:"broadcast",level:3},{value:"See Also",id:"see-also-7",level:4},{value:"Capacity",id:"capacity",level:3},{value:"Synonyms",id:"synonyms-6",level:4},{value:"See Also",id:"see-also-8",level:4},{value:"Cell",id:"cell",level:3},{value:"Synonyms",id:"synonyms-7",level:4},{value:"See Also",id:"see-also-9",level:4},{value:"Cell Model",id:"cell-model",level:3},{value:"See Also",id:"see-also-10",level:4},{value:"Censorship Resistance",id:"censorship-resistance",level:3},{value:"Chain",id:"chain",level:3},{value:"Synonyms",id:"synonyms-8",level:4},{value:"CKB",id:"ckb",level:3},{value:"Synonyms",id:"synonyms-9",level:4},{value:"CKByte",id:"ckbyte",level:3},{value:"Synonyms",id:"synonyms-10",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with",level:4},{value:"CKB-VM",id:"ckb-vm",level:3},{value:"See Also",id:"see-also-11",level:4},{value:"Code Hash",id:"code-hash",level:3},{value:"See Also",id:"see-also-12",level:4},{value:"Cold Storage",id:"cold-storage",level:3},{value:"See Also",id:"see-also-13",level:4},{value:"Cold Wallet",id:"cold-wallet",level:3},{value:"See Also",id:"see-also-14",level:4},{value:"Commit",id:"commit",level:3},{value:"Commit-Chain",id:"commit-chain",level:3},{value:"Commit Reward",id:"commit-reward",level:3},{value:"Common Knowledge Base",id:"common-knowledge-base",level:3},{value:"Synonyms",id:"synonyms-11",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-1",level:4},{value:"See Also",id:"see-also-15",level:4},{value:"Common Knowledge Byte",id:"common-knowledge-byte",level:3},{value:"Synonyms",id:"synonyms-12",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-2",level:4},{value:"See Also",id:"see-also-16",level:4},{value:"Confirmation",id:"confirmation",level:3},{value:"See Also",id:"see-also-17",level:4},{value:"Consensus",id:"consensus",level:3},{value:"See Also",id:"see-also-18",level:4},{value:"Consume",id:"consume",level:3},{value:"Contract Account",id:"contract-account",level:3},{value:"See Also",id:"see-also-19",level:4},{value:"Cryptocurrency",id:"cryptocurrency",level:3},{value:"See Also",id:"see-also-20",level:4},{value:"Cryptographic Signature",id:"cryptographic-signature",level:3},{value:"Synonyms",id:"synonyms-13",level:4},{value:"Cryptography",id:"cryptography",level:3},{value:"See Also",id:"see-also-21",level:4},{value:"Cycles",id:"cycles",level:3},{value:"See Also",id:"see-also-22",level:4},{value:"DAO",id:"dao",level:3},{value:"See Also",id:"see-also-23",level:4},{value:"DApp",id:"dapp",level:3},{value:"Data",id:"data",level:3},{value:"See Also",id:"see-also-24",level:4},{value:"Decentralization",id:"decentralization",level:3},{value:"See Also",id:"see-also-25",level:4},{value:"DeFi",id:"defi",level:3},{value:"Digital Asset",id:"digital-asset",level:3},{value:"Synonyms",id:"synonyms-14",level:4},{value:"Digital Currency",id:"digital-currency",level:3},{value:"See Also",id:"see-also-26",level:4},{value:"Distributed",id:"distributed",level:3},{value:"See Also",id:"see-also-27",level:4},{value:"Digital Object (DOB)",id:"digital-object-dob",level:3},{value:"See Also",id:"see-also-28",level:4},{value:"Double-Spending",id:"double-spending",level:3},{value:"See Also",id:"see-also-29",level:4},{value:"Epoch",id:"epoch",level:3},{value:"See Also",id:"see-also-30",level:4},{value:"Fee",id:"fee",level:3},{value:"See Also",id:"see-also-31",level:4},{value:"Fee Rate",id:"fee-rate",level:3},{value:"See Also",id:"see-also-32",level:4},{value:"First-Class Assets",id:"first-class-assets",level:3},{value:"See Also",id:"see-also-33",level:4},{value:"Fork",id:"fork",level:3},{value:"Full Node",id:"full-node",level:3},{value:"See Also",id:"see-also-34",level:4},{value:"Full Payload Format",id:"full-payload-format",level:3},{value:"See Also",id:"see-also-35",level:4},{value:"Fungible Token",id:"fungible-token",level:3},{value:"See Also",id:"see-also-36",level:4},{value:"Gas Limit",id:"gas-limit",level:3},{value:"See Also",id:"see-also-37",level:4},{value:"Hard-Fork",id:"hard-fork",level:3},{value:"Hardware Wallet",id:"hardware-wallet",level:3},{value:"See Also",id:"see-also-38",level:4},{value:"Hash",id:"hash",level:3},{value:"Hash Rate",id:"hash-rate",level:3},{value:"See Also",id:"see-also-39",level:4},{value:"Height",id:"height",level:3},{value:"Synonyms",id:"synonyms-15",level:4},{value:"Light Client",id:"light-client",level:3},{value:"Light Node",id:"light-node",level:3},{value:"See Also",id:"see-also-40",level:4},{value:"Mempool",id:"mempool",level:3},{value:"See Also",id:"see-also-41",level:4},{value:"Metadata",id:"metadata",level:3},{value:"See Also",id:"see-also-42",level:4},{value:"Micro-State",id:"micro-state",level:3},{value:"Synonyms",id:"synonyms-16",level:4},{value:"See Also",id:"see-also-43",level:4},{value:"Miner",id:"miner",level:3},{value:"See Also",id:"see-also-44",level:4},{value:"Miner Fee",id:"miner-fee",level:3},{value:"Synonyms",id:"synonyms-17",level:4},{value:"Mining",id:"mining",level:3},{value:"See Also",id:"see-also-45",level:4},{value:"Mining Node",id:"mining-node",level:3},{value:"See Also",id:"see-also-46",level:4},{value:"Mining Reward",id:"mining-reward",level:3},{value:"See Also",id:"see-also-47",level:4},{value:"Multisig",id:"multisig",level:3},{value:"Native Token",id:"native-token",level:3},{value:"See Also",id:"see-also-48",level:4},{value:"NC-MAX",id:"nc-max",level:3},{value:"See Also",id:"see-also-49",level:4},{value:"Neighbor",id:"neighbor",level:3},{value:"See Also",id:"see-also-50",level:4},{value:"Nervos Blockchain",id:"nervos-blockchain",level:3},{value:"Synonyms",id:"synonyms-18",level:4},{value:"Nervos DAO",id:"nervos-dao",level:3},{value:"See Also",id:"see-also-51",level:4},{value:"Network Hash Rate",id:"network-hash-rate",level:3},{value:"See Also",id:"see-also-52",level:4},{value:"Node",id:"node",level:3},{value:"See Also",id:"see-also-53",level:4},{value:"Nonce",id:"nonce",level:3},{value:"See Also",id:"see-also-54",level:4},{value:"Non-Fungible Token",id:"non-fungible-token",level:3},{value:"See Also",id:"see-also-55",level:4},{value:"Open Source",id:"open-source",level:3},{value:"See Also",id:"see-also-56",level:4},{value:"P2P",id:"p2p",level:3},{value:"Synonyms",id:"synonyms-19",level:4},{value:"Paper Wallet",id:"paper-wallet",level:3},{value:"See Also",id:"see-also-57",level:4},{value:"Payment Address",id:"payment-address",level:3},{value:"Synonyms",id:"synonyms-20",level:4},{value:"Payment Channel",id:"payment-channel",level:3},{value:"See Also",id:"see-also-58",level:4},{value:"Peer to Peer",id:"peer-to-peer",level:3},{value:"Synonyms",id:"synonyms-21",level:4},{value:"See Also",id:"see-also-59",level:4},{value:"Private Key",id:"private-key",level:3},{value:"See Also",id:"see-also-60",level:4},{value:"Proof of Work",id:"proof-of-work",level:3},{value:"See Also",id:"see-also-61",level:4},{value:"Proof of Stake",id:"proof-of-stake",level:3},{value:"See Also",id:"see-also-62",level:4},{value:"Propagation",id:"propagation",level:3},{value:"Synonyms",id:"synonyms-22",level:4},{value:"Public Key",id:"public-key",level:3},{value:"See Also",id:"see-also-63",level:4},{value:"Reward",id:"reward",level:3},{value:"See Also",id:"see-also-64",level:4},{value:"Signature",id:"signature",level:3},{value:"Synonyms",id:"synonyms-23",level:4},{value:"Smart Contract",id:"smart-contract",level:3},{value:"State",id:"state",level:3},{value:"See Also",id:"see-also-65",level:4},{value:"State Bloat",id:"state-bloat",level:3},{value:"State Channel",id:"state-channel",level:3},{value:"Tip",id:"tip",level:3},{value:"Synonyms",id:"synonyms-24",level:4},{value:"Tip Block",id:"tip-block",level:3},{value:"Synonyms",id:"synonyms-25",level:4},{value:"See Also",id:"see-also-66",level:4},{value:"Transaction",id:"transaction",level:3},{value:"See Also",id:"see-also-67",level:4},{value:"Transaction Fee",id:"transaction-fee",level:3},{value:"Synonyms",id:"synonyms-26",level:4},{value:"See Also",id:"see-also-68",level:4},{value:"Token",id:"token",level:3},{value:"See Also",id:"see-also-69",level:4},{value:"Turing Complete",id:"turing-complete",level:3},{value:"UDT",id:"udt",level:3},{value:"Synonyms",id:"synonyms-27",level:4},{value:"Unconfirmed",id:"unconfirmed",level:3},{value:"Synonyms",id:"synonyms-28",level:4},{value:"See Also",id:"see-also-70",level:4},{value:"Unconfirmed Transaction",id:"unconfirmed-transaction",level:3},{value:"Synonyms",id:"synonyms-29",level:4},{value:"See Also",id:"see-also-71",level:4},{value:"User-Defined Token",id:"user-defined-token",level:3},{value:"Synonyms",id:"synonyms-30",level:4},{value:"See Also",id:"see-also-72",level:4},{value:"Wallet",id:"wallet",level:3},{value:"See Also",id:"see-also-73",level:4},{value:"Economics Glossary",id:"economics-glossary",level:2},{value:"Base Issuance",id:"base-issuance",level:3},{value:"See Also",id:"see-also-74",level:4},{value:"Base Reward",id:"base-reward",level:3},{value:"See Also",id:"see-also-75",level:4},{value:"Commit Reward",id:"commit-reward-1",level:3},{value:"See Also",id:"see-also-76",level:4},{value:"Economic Abstraction",id:"economic-abstraction",level:3},{value:"Fiat Currency",id:"fiat-currency",level:3},{value:"See Also",id:"see-also-77",level:4},{value:"Heavy Asset Problem",id:"heavy-asset-problem",level:3},{value:"See Also",id:"see-also-78",level:4},{value:"Liquidity",id:"liquidity",level:3},{value:"See Also",id:"see-also-79",level:4},{value:"Proposal Reward",id:"proposal-reward",level:3},{value:"See Also",id:"see-also-80",level:4},{value:"Secondary Issuance",id:"secondary-issuance",level:3},{value:"See Also",id:"see-also-81",level:4},{value:"Secondary Reward",id:"secondary-reward",level:3},{value:"See Also",id:"see-also-82",level:4},{value:"Selfish Mining Attack",id:"selfish-mining-attack",level:3},{value:"See Also",id:"see-also-83",level:4},{value:"Starving Layer 1 Problem",id:"starving-layer-1-problem",level:3},{value:"See Also",id:"see-also-84",level:4},{value:"State Rent",id:"state-rent",level:3},{value:"See Also",id:"see-also-85",level:4},{value:"Store of Assets",id:"store-of-assets",level:3},{value:"See Also",id:"see-also-86",level:4},{value:"Store of Value",id:"store-of-value",level:3},{value:"See Also",id:"see-also-87",level:4},{value:"Tail Emission",id:"tail-emission",level:3},{value:"See Also",id:"see-also-88",level:4},{value:"Targeted Inflation",id:"targeted-inflation",level:3},{value:"See Also",id:"see-also-89",level:4},{value:"Tragedy of the Commons",id:"tragedy-of-the-commons",level:3},{value:"See Also",id:"see-also-90",level:4},{value:"Tragedy of the Security Commons",id:"tragedy-of-the-security-commons",level:3},{value:"See Also",id:"see-also-91",level:4},{value:"Tragedy of the Storage Commons",id:"tragedy-of-the-storage-commons",level:3},{value:"See Also",id:"see-also-92",level:4},{value:"Technical Glossary",id:"technical-glossary",level:2},{value:"Active Cell",id:"active-cell",level:3},{value:"Synonyms",id:"synonyms-31",level:4},{value:"See Also",id:"see-also-93",level:4},{value:"Aggron",id:"aggron",level:3},{value:"Synonyms",id:"synonyms-32",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-3",level:4},{value:"Animagus",id:"animagus",level:3},{value:"See Also",id:"see-also-94",level:4},{value:"Args",id:"args",level:3},{value:"See Also",id:"see-also-95",level:4},{value:"Axon",id:"axon",level:3},{value:"See Also",id:"see-also-96",level:4},{value:"Blake2b",id:"blake2b",level:3},{value:"See Also",id:"see-also-97",level:4},{value:"Block Subsidy",id:"block-subsidy",level:3},{value:"Synonyms",id:"synonyms-33",level:4},{value:"Boxer",id:"boxer",level:3},{value:"See Also",id:"see-also-98",level:4},{value:"block_version",id:"block_version",level:3},{value:"See Also",id:"see-also-99",level:4},{value:"Cell Collection",id:"cell-collection",level:3},{value:"See Also",id:"see-also-100",level:4},{value:"Cellbase",id:"cellbase",level:3},{value:"See Also",id:"see-also-101",level:4},{value:"cellbase_maturity",id:"cellbase_maturity",level:3},{value:"See Also",id:"see-also-102",level:4},{value:"cell_deps",id:"cell_deps",level:3},{value:"See Also",id:"see-also-103",level:4},{value:"Ckbhash",id:"ckbhash",level:3},{value:"See Also",id:"see-also-104",level:4},{value:"CKB Merkle Tree",id:"ckb-merkle-tree",level:3},{value:"See Also",id:"see-also-105",level:4},{value:"Code Hash",id:"code-hash-1",level:3},{value:"See Also",id:"see-also-106",level:4},{value:"Commit",id:"commit-1",level:3},{value:"See Also",id:"see-also-107",level:4},{value:"Commitment Zone",id:"commitment-zone",level:3},{value:"See Also",id:"see-also-108",level:4},{value:"Consume",id:"consume-1",level:3},{value:"See Also",id:"see-also-109",level:4},{value:"Crypto Primitives",id:"crypto-primitives",level:3},{value:"See Also",id:"see-also-110",level:4},{value:"dao_type_hash",id:"dao_type_hash",level:3},{value:"See Also",id:"see-also-111",level:4},{value:"Data",id:"data-1",level:3},{value:"See Also",id:"see-also-112",level:4},{value:"Dead Cell",id:"dead-cell",level:3},{value:"Synonyms",id:"synonyms-34",level:4},{value:"See Also",id:"see-also-113",level:4},{value:"Dep Group",id:"dep-group",level:3},{value:"See Also",id:"see-also-114",level:4},{value:"Dep Type",id:"dep-type",level:3},{value:"See Also",id:"see-also-115",level:4},{value:"Deps",id:"deps",level:3},{value:"Synonyms",id:"synonyms-35",level:4},{value:"Dependencies",id:"dependencies",level:3},{value:"Synonyms",id:"synonyms-36",level:4},{value:"See Also",id:"see-also-116",level:4},{value:"Duktape",id:"duktape",level:3},{value:"See Also",id:"see-also-117",level:4},{value:"Difficulty",id:"difficulty",level:3},{value:"See Also",id:"see-also-118",level:4},{value:"Diviner",id:"diviner",level:3},{value:"See Also",id:"see-also-119",level:4},{value:"Eaglesong",id:"eaglesong",level:3},{value:"See Also",id:"see-also-120",level:4},{value:"epoch_duration_target",id:"epoch_duration_target",level:3},{value:"See Also",id:"see-also-121",level:4},{value:"ERC20",id:"erc20",level:3},{value:"See Also",id:"see-also-122",level:4},{value:"ERC721",id:"erc721",level:3},{value:"See Also",id:"see-also-123",level:4},{value:"ERC777",id:"erc777",level:3},{value:"See Also",id:"see-also-124",level:4},{value:"ERC1155",id:"erc1155",level:3},{value:"See Also",id:"see-also-125",level:4},{value:"Full Address",id:"full-address",level:3},{value:"See Also",id:"see-also-126",level:4},{value:"Generator",id:"generator",level:3},{value:"Genesis Block",id:"genesis-block",level:3},{value:"See Also",id:"see-also-127",level:4},{value:"genesis_hash",id:"genesis_hash",level:3},{value:"See Also",id:"see-also-128",level:4},{value:"Godwoken",id:"godwoken",level:3},{value:"See Also",id:"see-also-129",level:4},{value:"Governance Script",id:"governance-script",level:3},{value:"See Also",id:"see-also-130",level:4},{value:"Governance Script Hash",id:"governance-script-hash",level:3},{value:"Synonyms",id:"synonyms-37",level:4},{value:"See Also",id:"see-also-131",level:4},{value:"Historical Cell",id:"historical-cell",level:3},{value:"Synonyms",id:"synonyms-38",level:4},{value:"See Also",id:"see-also-132",level:4},{value:"Inbound Connection",id:"inbound-connection",level:3},{value:"See Also",id:"see-also-133",level:4},{value:"Indexer",id:"indexer",level:3},{value:"See Also",id:"see-also-134",level:4},{value:"initial_primary_epoch_reward",id:"initial_primary_epoch_reward",level:3},{value:"See Also",id:"see-also-135",level:4},{value:"Input",id:"input",level:3},{value:"See Also",id:"see-also-136",level:4},{value:"Keyper",id:"keyper",level:3},{value:"See Also",id:"see-also-137",level:4},{value:"Late Spawning",id:"late-spawning",level:3},{value:"See Also",id:"see-also-138",level:4},{value:"Layer 1",id:"layer-1",level:3},{value:"See Also",id:"see-also-139",level:4},{value:"Layer 2",id:"layer-2",level:3},{value:"See Also",id:"see-also-140",level:4},{value:"Lina",id:"lina",level:3},{value:"Synonyms",id:"synonyms-39",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-4",level:4},{value:"See Also",id:"see-also-141",level:4},{value:"Live Cell",id:"live-cell",level:3},{value:"Synonyms",id:"synonyms-40",level:4},{value:"See Also",id:"see-also-142",level:4},{value:"Lock",id:"lock",level:3},{value:"See Also",id:"see-also-143",level:4},{value:"Lock Script",id:"lock-script",level:3},{value:"See Also",id:"see-also-144",level:4},{value:"Lock Script Hash",id:"lock-script-hash",level:3},{value:"See Also",id:"see-also-145",level:4},{value:"Mainnet",id:"mainnet",level:3},{value:"Synonyms",id:"synonyms-41",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-5",level:4},{value:"max_block_bytes",id:"max_block_bytes",level:3},{value:"max_block_cycles",id:"max_block_cycles",level:3},{value:"See Also",id:"see-also-146",level:4},{value:"max_block_proposals_limit",id:"max_block_proposals_limit",level:3},{value:"See Also",id:"see-also-147",level:4},{value:"max_uncles_num",id:"max_uncles_num",level:3},{value:"See Also",id:"see-also-148",level:4},{value:"median_time_block_count",id:"median_time_block_count",level:3},{value:"Minting",id:"minting",level:3},{value:"See Also",id:"see-also-149",level:4},{value:"Molecule",id:"molecule",level:3},{value:"See Also",id:"see-also-150",level:4},{value:"Muta",id:"muta",level:3},{value:"See Also",id:"see-also-151",level:4},{value:"Nervos CKB",id:"nervos-ckb",level:3},{value:"Synonyms",id:"synonyms-42",level:4},{value:"See Also",id:"see-also-152",level:4},{value:"Off-Chain Computation",id:"off-chain-computation",level:3},{value:"See Also",id:"see-also-153",level:4},{value:"Off-Chain Scaling",id:"off-chain-scaling",level:3},{value:"See Also",id:"see-also-154",level:4},{value:"Off-Chain State",id:"off-chain-state",level:3},{value:"See Also",id:"see-also-155",level:4},{value:"On-Chain Computation",id:"on-chain-computation",level:3},{value:"See Also",id:"see-also-156",level:4},{value:"On-Chain Scaling",id:"on-chain-scaling",level:3},{value:"See Also",id:"see-also-157",level:4},{value:"On-Chain State",id:"on-chain-state",level:3},{value:"See Also",id:"see-also-158",level:4},{value:"On-Chain Verification",id:"on-chain-verification",level:3},{value:"See Also",id:"see-also-159",level:4},{value:"Open Transaction",id:"open-transaction",level:3},{value:"See Also",id:"see-also-160",level:4},{value:"Optimistic Rollup",id:"optimistic-rollup",level:3},{value:"See Also",id:"see-also-161",level:4},{value:"Orphan",id:"orphan",level:3},{value:"Synonyms",id:"synonyms-43",level:4},{value:"Orphan Block",id:"orphan-block",level:3},{value:"Synonyms",id:"synonyms-44",level:4},{value:"See Also",id:"see-also-162",level:4},{value:"Orphan Rate",id:"orphan-rate",level:3},{value:"See Also",id:"see-also-163",level:4},{value:"orphan_rate_target",id:"orphan_rate_target",level:3},{value:"See Also",id:"see-also-164",level:4},{value:"Orphan Transactions",id:"orphan-transactions",level:3},{value:"See Also",id:"see-also-165",level:4},{value:"Outbound Connection",id:"outbound-connection",level:3},{value:"See Also",id:"see-also-166",level:4},{value:"Outpoint",id:"outpoint",level:3},{value:"See Also",id:"see-also-167",level:4},{value:"Output",id:"output",level:3},{value:"See Also",id:"see-also-168",level:4},{value:"Overlord",id:"overlord",level:3},{value:"See Also",id:"see-also-169",level:4},{value:"P2WSH",id:"p2wsh",level:3},{value:"permanent_difficulty_in_dummy",id:"permanent_difficulty_in_dummy",level:3},{value:"See Also",id:"see-also-170",level:4},{value:"Polyjuice",id:"polyjuice",level:3},{value:"See Also",id:"see-also-171",level:4},{value:"primary_epoch_reward_halving_interval",id:"primary_epoch_reward_halving_interval",level:3},{value:"See Also",id:"see-also-172",level:4},{value:"Proposal Zone",id:"proposal-zone",level:3},{value:"See Also",id:"see-also-173",level:4},{value:"Propose",id:"propose",level:3},{value:"See Also",id:"see-also-174",level:4},{value:"proposer_reward_ratio",id:"proposer_reward_ratio",level:3},{value:"See Also",id:"see-also-175",level:4},{value:"RISC-V",id:"risc-v",level:3},{value:"See Also",id:"see-also-176",level:4},{value:"Schnorr Signature",id:"schnorr-signature",level:3},{value:"See Also",id:"see-also-177",level:4},{value:"Script",id:"script",level:3},{value:"See Also",id:"see-also-178",level:4},{value:"secondary_epoch_reward",id:"secondary_epoch_reward",level:3},{value:"See also",id:"see-also-179",level:4},{value:"secp256k1_blake160_sighash_all_type_hash",id:"secp256k1_blake160_sighash_all_type_hash",level:3},{value:"secp256k1_blake160_multisig_all_type_hash",id:"secp256k1_blake160_multisig_all_type_hash",level:3},{value:"Seed Cell",id:"seed-cell",level:3},{value:"See Also",id:"see-also-180",level:4},{value:"Shannon",id:"shannon",level:3},{value:"See Also",id:"see-also-181",level:4},{value:"Short Address",id:"short-address",level:3},{value:"Synonyms",id:"synonyms-45",level:4},{value:"See Also",id:"see-also-182",level:4},{value:"Simple UDT",id:"simple-udt",level:3},{value:"Synonyms",id:"synonyms-46",level:4},{value:"See Also",id:"see-also-183",level:4},{value:"Since",id:"since",level:3},{value:"See Also",id:"see-also-184",level:4},{value:"SPV",id:"spv",level:3},{value:"See Also",id:"see-also-185",level:4},{value:"SPV Wallet",id:"spv-wallet",level:3},{value:"See Also",id:"see-also-186",level:4},{value:"SUDT",id:"sudt",level:3},{value:"Synonyms",id:"synonyms-47",level:4},{value:"Testnet",id:"testnet",level:3},{value:"Synonyms",id:"synonyms-48",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-6",level:4},{value:"Transaction Confirmation Number",id:"transaction-confirmation-number",level:3},{value:"See Also",id:"see-also-187",level:4},{value:"Transaction Hash",id:"transaction-hash",level:3},{value:"See Also",id:"see-also-188",level:4},{value:"Transaction Witness Hash",id:"transaction-witness-hash",level:3},{value:"See Also",id:"see-also-189",level:4},{value:"Transaction Root",id:"transaction-root",level:3},{value:"See Also",id:"see-also-190",level:4},{value:"tx_proposal_window",id:"tx_proposal_window",level:3},{value:"tx_version",id:"tx_version",level:3},{value:"type_id",id:"type_id",level:3},{value:"See Also",id:"see-also-191",level:4},{value:"type_id_code_hash",id:"type_id_code_hash",level:3},{value:"See Also",id:"see-also-192",level:4},{value:"Type Script",id:"type-script",level:3},{value:"See Also",id:"see-also-193",level:4},{value:"Type Script Hash",id:"type-script-hash",level:3},{value:"See Also",id:"see-also-194",level:4},{value:"Uncle",id:"uncle",level:3},{value:"See Also",id:"see-also-195",level:4},{value:"Synonyms",id:"synonyms-49",level:4},{value:"See Also",id:"see-also-196",level:4},{value:"Uncle Rate",id:"uncle-rate",level:3},{value:"See Also",id:"see-also-197",level:4},{value:"Validator",id:"validator",level:3},{value:"See Also",id:"see-also-198",level:4},{value:"Witness",id:"witness",level:3},{value:"See Also",id:"see-also-199",level:4},{value:"XUDT",id:"xudt",level:3},{value:"See Also",id:"see-also-200",level:4},{value:"Zk-SNARK",id:"zk-snark",level:3},{value:"See Also",id:"see-also-201",level:4},{value:"Zk-STARK",id:"zk-stark",level:3},{value:"See Also",id:"see-also-202",level:4}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"glossary-sections",children:"Glossary Sections"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#general-glossary",children:"General Glossary"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#economics-glossary",children:"Economics Glossary"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#technical-glossary",children:"Technical Glossary"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"general-glossary",children:"General Glossary"}),"\n",(0,i.jsx)(n.h3,{id:"account",children:"Account"}),"\n",(0,i.jsx)(n.p,{children:"A kind of basic object in distributed ledger used to keep the balance and other information of users."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"address",children:"Address"}),"\n",(0,i.jsx)(n.p,{children:"A label consists of string of letters and numbers that anonymously represents user's identity on chain. Crypto assets can be sent to and/or from addresses."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#payment-address",children:"Payment Address"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"asset",children:"Asset"}),"\n",(0,i.jsx)(n.p,{children:"A piece of data that has value or that represents an entity having value."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-1",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-asset",children:"Digital Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block",children:"Block"}),"\n",(0,i.jsx)(n.p,{children:"A grouping of transactions, marked with a timestamp, and a fingerprint of the previous block. The block header is hashed to produce a proof of work, thereby validating the transactions. Valid blocks are added to the main blockchain by network consensus."}),"\n",(0,i.jsx)(n.h4,{id:"see-also",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-height",children:"Block Height"}),"\n",(0,i.jsx)(n.p,{children:"Block height is the total number of blocks that have been confirmed on the blockchain, also used to identify a unique block when specifying a particular block height, as there is always an exact block at any block height."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-2",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#height",children:"Height"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-1",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-interval",children:"Block Interval"}),"\n",(0,i.jsxs)(n.p,{children:["Also known as ",(0,i.jsx)(n.a,{href:"#block-time",children:"Block Time"}),". Block interval is the length of time it takes to create a new block in a cryptocurrency blockchain. Block interval is the measure of the time it takes the miners or validators within a network to verify transactions within one block and produce a new block in that blockchain. The block interval is variable on Nervos blockchain."]}),"\n",(0,i.jsx)(n.p,{children:"The block interval on the Bitcoin blockchain is approximately every 10 minutes. The block interval on Nervos is variable, but is usually under 10 seconds."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-3",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-time",children:"Block Time"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-2",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-propagation",children:"Block Propagation"}),"\n",(0,i.jsx)(n.p,{children:"The process of synchronizing a new block to the majority of full nodes in the network. Block propagation is a well-known bottleneck that prevents Bitcoin from scaling."}),"\n",(0,i.jsx)(n.p,{children:"Block propagation time is an average time that is needed for the new block to reach the majority of nodes in the network. Long block propagation delay reduces the node's resistance against 51% attacks."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-4",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#propagation",children:"Propagation"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-3",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#broadcast",children:"Broadcast"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-node",children:"Full Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-reward",children:"Block Reward"}),"\n",(0,i.jsx)(n.p,{children:"The amount of cryptocurrency credited to a miner's account after the miner successfully adds a block of transactions to the blockchain."}),"\n",(0,i.jsx)(n.p,{children:"In Nervos CKB, block rewards are the CKBytes credited to a miner's account after a block is successfully added to CKB by the miner."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-4",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-subsidy",children:"Block Subsidy"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-time",children:"Block Time"}),"\n",(0,i.jsxs)(n.p,{children:["Alternatively referred to as ",(0,i.jsx)(n.a,{href:"#block-interval",children:"Block Interval"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-5",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-interval",children:"Block Interval"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"blockchain",children:"Blockchain"}),"\n",(0,i.jsx)(n.p,{children:"A data structure maintaining a growing list of records, organized as a chain of blocks. Each block, apart from the first one, is cryptographically linked to the previous block, thus creating a chain-like structure."}),"\n",(0,i.jsx)(n.p,{children:"The cryptographic link ensures any party with the last block can verify that none of the historical data is modified after the creation of this block."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-5",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"bls-signature",children:"BLS Signature"}),"\n",(0,i.jsx)(n.p,{children:"A cryptographic signature scheme for signing and verification. BLS is short for Boneh\u2013Lynn\u2013Shacham."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-6",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Boneh%E2%80%93Lynn%E2%80%93Shacham",children:"Boneh\u2013Lynn\u2013Shacham on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"broadcast",children:"Broadcast"}),"\n",(0,i.jsx)(n.p,{children:"Blocks are sent to all nodes in a blockchain network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-7",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"capacity",children:"Capacity"}),"\n",(0,i.jsx)(n.p,{children:"The maximum space (in bytes) that a Cell can occupy on the Nervos CKB."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-6",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-8",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cell",children:"Cell"}),"\n",(0,i.jsx)(n.p,{children:"All data on Nervos CKB is stored in Cells. Cells are the primary state units in CKB, within them users can include arbitrary states."}),"\n",(0,i.jsxs)(n.p,{children:["A Cell has 4 fields: ",(0,i.jsx)(n.code,{children:"capacity"}),", ",(0,i.jsx)(n.code,{children:"data"}),", ",(0,i.jsx)(n.code,{children:"type"})," and ",(0,i.jsx)(n.code,{children:"lock"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-7",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#micro-state",children:"Micro-State"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-9",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#data",children:"Data"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock",children:"Lock"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cell-model",children:"Cell Model"}),"\n",(0,i.jsx)(n.p,{children:"A representation of how state is managed on Nervos CKB. The Cell Model is a more generic state model than either Bitcoin's UTXO or Ethereum's account model."}),"\n",(0,i.jsx)(n.p,{children:"The Cell Model is a new construction that combines many of the advantages of Ethereum's account model with the asset ownership and proof-based verification properties of Bitcoin's UTXO model."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-10",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/https-medium-com-nervosnetwork-cell-model-7323fca57571",children:"Cell Model on the Nervos Blog"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"censorship-resistance",children:"Censorship Resistance"}),"\n",(0,i.jsx)(n.p,{children:"Censorship resistance in blockchain generally means that it is difficult for a malicious party to prevent the blockchain from confirming a set of transactions generated by honest users."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"chain",children:"Chain"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-8",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckb",children:"CKB"}),"\n",(0,i.jsx)(n.p,{children:"An abbreviation which can have different meanings depending on the context:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Common Knowledge Base - The layer 1 blockchain of the Nervos Network."}),"\n",(0,i.jsx)(n.li,{children:"Common Knowledge Byte - The native token of the Nervos Common Knowledge Base."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-9",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckbyte",children:"CKByte"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for Common Knowledge Byte."}),"\n",(0,i.jsx)(n.p,{children:"CKByte is also sometimes shortened to CKB. Exchanges often use CKB as the ticker symbol."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-10",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckb-vm",children:"CKB-VM"}),"\n",(0,i.jsx)(n.p,{children:"CKB VM is a crypto-agnostic virtual machine, a RISC-V instruction set based VM for executing both on-chain and off-chain code."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-11",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#risc-v",children:"RISC-V"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Virtual_machine",children:"Virtual Machine on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"code-hash",children:"Code Hash"}),"\n",(0,i.jsx)(n.p,{children:"A field in a Cell which contains a hash value that can refer to a specific piece of data, or a specific Cell referenced by Type ID."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-12",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type_id",children:"Type ID"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cold-storage",children:"Cold Storage"}),"\n",(0,i.jsx)(n.p,{children:"A method of securing funds by placing them in a cold wallet; a type of wallet that is never connected to the internet."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-13",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cold-wallet",children:"Cold Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#hardware-wallet",children:"Hardware Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cold-wallet",children:"Cold Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A wallet that is used to secure assets offline. This wallet is permanently disconnected from the internet, and not vulnerable to attacks which rely on an active internet connection."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-14",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cold-storage",children:"Cold Storage"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit",children:"Commit"}),"\n",(0,i.jsxs)(n.p,{children:["Nervos CKB's consensus algorithm, ",(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})," consensus, has two phases: ",(0,i.jsx)(n.strong,{children:"propose"})," and ",(0,i.jsx)(n.strong,{children:"commit"}),". Commit is the process of including a valid proposed transaction into a new block."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit-chain",children:"Commit-Chain"}),"\n",(0,i.jsx)(n.p,{children:"A scheme that enables the off-chain processing of transactions by one or more operators with on-chain state update commitments that do not contain per-transaction data."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit-reward",children:"Commit Reward"}),"\n",(0,i.jsx)(n.p,{children:"A reward paid to miners in CKBytes on inclusion of previously proposed transactions."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"common-knowledge-base",children:"Common Knowledge Base"}),"\n",(0,i.jsx)(n.p,{children:"A layer 1 proof of work blockchain that provides a foundation of decentralized trust for the Nervos Network."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-11",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-1",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-15",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.nervos.org/ckb/",children:"Nervos CKB on Nervos.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"common-knowledge-byte",children:"Common Knowledge Byte"}),"\n",(0,i.jsx)(n.p,{children:"The native token of the Nervos layer 1 blockchain, the Common Knowledge Base."}),"\n",(0,i.jsx)(n.p,{children:"Common Knowledge Byte is often abbreviated as CKByte or CKB."}),"\n",(0,i.jsx)(n.p,{children:"Owning a CKByte entitles the holder to store one byte of data on the Nervos CKB blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-12",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-2",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-16",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#capacity",children:"Capacity"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#shannon",children:"Shannon"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"confirmation",children:"Confirmation"}),"\n",(0,i.jsx)(n.p,{children:"A process where a transaction has been accepted and verified by the network and included in a block."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-17",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#unconfirmed",children:"Unconfirmed"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"consensus",children:"Consensus"}),"\n",(0,i.jsx)(n.p,{children:"An algorithm executed among a number of distributed participants, ensuring that all participants faithfully executing this algorithm can reach agreement on some data value even if the other participants are faulty or malicious."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-18",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-MAX"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"consume",children:"Consume"}),"\n",(0,i.jsx)(n.p,{children:"The process of using a Live Cell as an input to a transaction. The consumption processes indicate that Live Cell turns into a Dead Cell."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"contract-account",children:"Contract Account"}),"\n",(0,i.jsx)(n.p,{children:"An account containing code that executes automatically whenever it receives an event from another account."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-19",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#account",children:"Account"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cryptocurrency",children:"Cryptocurrency"}),"\n",(0,i.jsx)(n.p,{children:"A cryptocurrency is a digital or virtual currency that is secured by blockchain and cryptography, which makes it nearly impossible to counterfeit or double-spend."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-20",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-currency",children:"Digital Currency"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fiat-currency",children:"Fiat Currency"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cryptographic-signature",children:"Cryptographic Signature"}),"\n",(0,i.jsx)(n.p,{children:"A concise piece of proof data. Cryptographic signature schemes are a fundamental component of cryptocurrency networks that verify the integrity and non-repudiation of transaction messages across the network."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-13",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#signature",children:"Signature"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cryptography",children:"Cryptography"}),"\n",(0,i.jsx)(n.p,{children:"Cryptography is the practice and study of techniques for secure communication in the presence of adversarial behavior."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-21",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Cryptography",children:"Cryptography at Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cycles",children:"Cycles"}),"\n",(0,i.jsx)(n.p,{children:"The number of RISC-V computational cycles required by a script to execute. It's a metric used to prevent malicious behavior such as infinite loops, that's why it is called cycles."}),"\n",(0,i.jsx)(n.p,{children:"This is a similar concept to Ethereum's Gas, we set cycles to ensure optimal performance and security. Scripts must stay within cycle limits, otherwise the block will be rejected by CKB nodes."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-22",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://nervos-ckb-docs-git-v1-cryptape.vercel.app/docs/essays/faq/#estimate-cycles",children:"Estimate cycles"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#max_block_cycles",children:"Max_block_cycles"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0014-vm-cycle-limits/0014-vm-cycle-limits.md",children:"Rules for calculating cycles in RFC on Nervos Network Github"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#risc-v",children:"RISC-V"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://ethereum.org/en/glossary/#gas",children:"Ethereum's Gas"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dao",children:"DAO"}),"\n",(0,i.jsx)(n.p,{children:"A decentralized autonomous organization (DAO) is an organization represented by rules encoded as a computer program that is transparent, controlled by the organization members and not influenced by a centralized entity, in other words they are member-owned communities without centralized leadership. A DAO's financial transaction record and program rules are maintained on a blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-23",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Decentralized_autonomous_organization",children:"DAO on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dapp",children:"DApp"}),"\n",(0,i.jsx)(n.p,{children:"Decentralized application. At a minimum, it is a smart contract and a web user interface. In a broader sense, dApps are web applications that are built on top of open, decentralized, peer-to-peer infrastructure services. Additionally, many dApps include decentralized storage and/or a message protocol and platform."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"data",children:"Data"}),"\n",(0,i.jsxs)(n.p,{children:["In Cell Model, ",(0,i.jsx)(n.code,{children:"data"})," is a field in a Cell which can store arbitrary bytes."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-24",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"decentralization",children:"Decentralization"}),"\n",(0,i.jsx)(n.p,{children:"In blockchain, decentralization refers to the transfer of control and decision-making from a centralized entity (individual, organization, or group thereof) to a distributed network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-25",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#distributed",children:"Distributed"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Decentralization",children:"Decentralization on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"defi",children:"DeFi"}),"\n",(0,i.jsx)(n.p,{children:'Short for "decentralized finance", a broad category of dApps aiming to provide financial services backed by the blockchain, without any intermediaries, so anyone with an internet connection can participate.'}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"digital-asset",children:"Digital Asset"}),"\n",(0,i.jsx)(n.p,{children:"A digital asset is an individual piece of data that has value, or represents another entity that has value."}),"\n",(0,i.jsx)(n.p,{children:"Digital assets are most commonly represented as tokens, which may be used as digital currency or represent physical items such as real estate."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-14",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#asset",children:"Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"digital-currency",children:"Digital Currency"}),"\n",(0,i.jsx)(n.p,{children:"A type of currency that primarily exists digitally over the internet. Physical representations of the currency, in the form of cards, bills, or coins, may exist, but are secondary mediums."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-26",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptocurrency",children:"Cryptocurrency"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"distributed",children:"Distributed"}),"\n",(0,i.jsx)(n.p,{children:"A system where components are spread across multiple nodes to parallelize workloads, add redundancy, or eliminate single points of failure."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-27",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#decentralization",children:"Decentralization"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"digital-object-dob",children:"Digital Object (DOB)"}),"\n",(0,i.jsx)(n.p,{children:"A non-fungible encrypted asset with its content fully stored on-chain, establishing an intrinsic link between content and value."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-28",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#non-fungible-token",children:"Non-Fungible-Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"double-spending",children:"Double-Spending"}),"\n",(0,i.jsx)(n.p,{children:"Double-spending is the risk that a digital token is spent twice or more. In the context of blockchain, it happens when the transaction spending a digital token is cancelled after confirmation, and the same token is spent in another transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-29",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptocurrency",children:"Cryptocurrency"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"epoch",children:"Epoch"}),"\n",(0,i.jsx)(n.p,{children:"An epoch is a period of time for a set of blocks."}),"\n",(0,i.jsx)(n.p,{children:"In Nervos, the PoW difficulty changes on a new epoch. All the blocks in the same epoch share the same difficulty target. The difficulty adjustment algorithm aims to stabilize the orphan block rate at 2.5% and the epoch duration at 4 hours."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-30",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fee",children:"Fee"}),"\n",(0,i.jsxs)(n.p,{children:["The sender of a transaction often includes a fee to the network for processing the requested transaction. There's no minimum fee rate set in consensus, but there's a minimum fee rate 1,000 Shannons/KB in CKB's ",(0,i.jsx)(n.a,{href:"#p2p",children:"P2P"})," network. (1 Shannon = 10",(0,i.jsx)("sup",{children:"-8"})," CKB)"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-31",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#shannon",children:"Shannon"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fee-rate",children:"Fee rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/tree/develop/rpc#error-poolrejectedtransactionbyminfeerate",children:"Fee rate in RFC on Nervos Network Github"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fee-rate",children:"Fee Rate"}),"\n",(0,i.jsx)(n.p,{children:"A tip per byte that a user offers to the miners for including his transaction in a block on the blockchain."}),"\n",(0,i.jsxs)(n.p,{children:["This is a same concept to Bitcoin's ",(0,i.jsx)(n.a,{href:"https://en.bitcoin.it/wiki/Miner_fees#Feerates",children:"Fee Rate(often spelled feerate)"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-32",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fee",children:"Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"first-class-assets",children:"First-Class Assets"}),"\n",(0,i.jsx)(n.p,{children:"Assets that 1. the asset itself (rather than a reference to the asset) can be passed directly in smart contract interactions, and 2. directly controlled by owners without any intermediaries."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-33",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/first-class-asset-ff4feaf370c4",children:"First-Class Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://talk.nervos.org/t/first-class-asset/1293",children:"Introduction to First-Class Asset"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fork",children:"Fork"}),"\n",(0,i.jsx)(n.p,{children:"A change in protocol causing the creation of an alternative chain, or a temporal divergence in two potential block paths during mining."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"full-node",children:"Full Node"}),"\n",(0,i.jsx)(n.p,{children:"A full node is an essential component of the CKB network. It stores and syncs the entire blockchain, verifies the validity of blocks and transactions, and enforces the network's consensus rules."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckb init --chain Mainnet && ckb run\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-34",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#light-node",children:"Light Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-node",children:"Mining Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"full-payload-format",children:"Full Payload Format"}),"\n",(0,i.jsxs)(n.p,{children:["The deprecated full payload format directly encodes all data field of lock script. The encode rule of deprecated full payload format is ",(0,i.jsx)(n.a,{href:"https://en.bitcoin.it/wiki/Bech32",children:"Bech32"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-35",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fungible-token",children:"Fungible Token"}),"\n",(0,i.jsx)(n.p,{children:"A fungible token can be fiat currencies like the dollar or a cryptocurrency like Bitcoin."}),"\n",(0,i.jsx)(n.p,{children:"Fungible tokens or assets are divisible and non-unique."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-36",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#non-fungible-token",children:"Non-Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"gas-limit",children:"Gas Limit"}),"\n",(0,i.jsx)(n.p,{children:"The maximum amount of gas a transaction or block may consume."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-37",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://ethereum.org/en/glossary/#gas",children:"Ethereum's Gas"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"hard-fork",children:"Hard-Fork"}),"\n",(0,i.jsx)(n.p,{children:"A permanent divergence in the blockchain; also known as a hard-forking change. One commonly occurs when nonupgraded nodes can\u2019t validate blocks created by upgraded nodes that follow newer consensus rules. Not to be confused with a fork, soft fork, software fork, or Git fork."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"hardware-wallet",children:"Hardware Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A hardware wallet is a form of cold wallet. A hardware wallet is a cryptocurrency wallet that stores the user's private keys (a critical piece of information used to authorize outgoing transactions on the blockchain network) in a secure hardware device."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-38",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cold-storage",children:"Cold Storage"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cold-wallet",children:"Cold Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"hash",children:"Hash"}),"\n",(0,i.jsx)(n.p,{children:"A fixed-length fingerprint of variable-size input, produced by a hash function."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"hash-rate",children:"Hash Rate"}),"\n",(0,i.jsx)(n.p,{children:'Hash rate is a measure of the computational power per second used when mining. These operations are known as "hashing".'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-39",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#network-hash-rate",children:"Network Hash Rate"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"height",children:"Height"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for block height."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-15",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-height",children:"Block Height"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"light-client",children:"Light Client"}),"\n",(0,i.jsx)(n.p,{children:"As a low-resource node, a light client allows users to sync with a blockchain in a cryptographically secure manner without having to store the whole blockchain."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"light-node",children:"Light Node"}),"\n",(0,i.jsx)(n.p,{children:"A light node downloads only the headers of the blockchain, conserving resources. It relies on other nodes for full transaction data and is a lightweight option for network participation."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckb-light-client run --config-file ./testnet.toml\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-40",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-node",children:"Full Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-node",children:"Mining Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mempool",children:"Mempool"}),"\n",(0,i.jsx)(n.p,{children:'Short for "memory pool". A waiting area on full nodes for transactions that have been broadcasted to the network but have not yet been confirmed on the blockchain.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-41",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"metadata",children:"Metadata"}),"\n",(0,i.jsxs)(n.p,{children:["Metadata is data that provides information about other data. ",(0,i.jsx)(n.code,{children:"capacity"}),", ",(0,i.jsx)(n.code,{children:"type"})," and ",(0,i.jsx)(n.code,{children:"lock"})," in Cells are metadata, they occupy Cell capacity and incur a state cost as well."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-42",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#capacity",children:"Capacity"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock",children:"Lock"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"micro-state",children:"Micro-State"}),"\n",(0,i.jsx)(n.p,{children:"A small piece of state that is isolated and often able to be acted upon independently without knowing the total state of the network."}),"\n",(0,i.jsx)(n.p,{children:"On Nervos, micro-state is represented by a Cell."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-16",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-43",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#state",children:"State"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"miner",children:"Miner"}),"\n",(0,i.jsx)(n.p,{children:"A network node that finds valid proof of work for new blocks, by repeated hashing."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-44",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"miner-fee",children:"Miner Fee"}),"\n",(0,i.jsx)(n.p,{children:"Another term for transaction fee."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-17",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-fee",children:"Transaction Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mining",children:"Mining"}),"\n",(0,i.jsx)(n.p,{children:"Mining is the process by which a blockchain node get new token reward by verifying new transactions, finding valid proof of work and creating new blocks."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-45",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-reward",children:"Mining Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mining-node",children:"Mining Node"}),"\n",(0,i.jsx)(n.p,{children:"Mining nodes create new blocks by solving computational puzzles. They contribute to the network's security and consensus by actively validating and adding blocks to the blockchain."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckb init --chain Mainnet && ckb miner\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-46",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining",children:"Mining"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-node",children:"Full Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#light-node",children:"Light Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mining-reward",children:"Mining Reward"}),"\n",(0,i.jsx)(n.p,{children:"Native tokens paid to miners as a reward for providing the necessary computing resources for mining."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-47",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining",children:"Mining"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#native-token",children:"Native Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"multisig",children:"Multisig"}),"\n",(0,i.jsx)(n.p,{children:"The term multisig stands for multi-signature, which is a specific type of digital signatures that can be created through the combination of multiple unique signatures."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"native-token",children:"Native Token"}),"\n",(0,i.jsx)(n.p,{children:"The token issued as reward to a blockchain's consensus nodes. Nervos CKB's native token is CKByte."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-48",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nc-max",children:"NC-MAX"}),"\n",(0,i.jsx)(n.p,{children:"Nervos CKB's consensus algorithm, which follows NC's backbone protocol. The main innovation here is a two-step transaction confirmation mechanism"}),"\n",(0,i.jsx)(n.h4,{id:"see-also-49",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eprint.iacr.org/2020/1101",children:"NC-MAC"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"neighbor",children:"Neighbor"}),"\n",(0,i.jsx)(n.p,{children:"A node that is directly connected to another node in the blockchain peer to peer network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-50",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#peer-to-peer",children:"Peer to Peer"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nervos-blockchain",children:"Nervos Blockchain"}),"\n",(0,i.jsx)(n.p,{children:"The layer 1 blockchain of the Nervos Network known as the Common Knowledge Base."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-18",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nervos-dao",children:"Nervos DAO"}),"\n",(0,i.jsx)(n.p,{children:'Nervos DAO enable users to lock CKBytes to get compensation from Nervos CKB secondary issuance. This process is similar to staking on other platforms. Nervos DAO provides a "virtual hardcap" for CKByte holders to insulate them from inflation.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-51",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dao",children:"DAO"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/nervos-dao-explained-95e33898b1c",children:"Nervos DAO Explained on the Nervos Blog"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Nervos DAO in RFC on Nervos Network Github"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://explorer.nervos.org/charts/inflation-rate",children:"Inflation Rate Chart"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"network-hash-rate",children:"Network Hash Rate"}),"\n",(0,i.jsx)(n.p,{children:"A measurement of the total computational processing power which is dedicated to providing security to the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-52",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#hash-rate",children:"Hash Rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"node",children:"Node"}),"\n",(0,i.jsx)(n.p,{children:"A software client that participates in the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-53",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-node",children:"Full Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#light-node",children:"Light Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-node",children:"Mining Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nonce",children:"Nonce"}),"\n",(0,i.jsx)(n.p,{children:"In cryptography, a value that can only be used once. Nonce can refer to two things in blockchain context: 1. a proof-of-work nonce is the random value in a block satisfying the proof of work requirement; 2. an account nonce is a transaction counter in each account, which is used to prevent replay attacks."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-54",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"non-fungible-token",children:"Non-Fungible Token"}),"\n",(0,i.jsx)(n.p,{children:"Non-fungible tokens or NFTs are cryptographic assets on a blockchain with unique identification codes and metadata that distinguish them from each other."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-55",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-object-dob",children:"DOB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"open-source",children:"Open Source"}),"\n",(0,i.jsx)(n.p,{children:"A piece of software where source code is freely available for examination or alteration by any third-party."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-56",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://opensource.com/resources/what-open-source",children:"What is Open Source at OpenSource.com"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"p2p",children:"P2P"}),"\n",(0,i.jsx)(n.p,{children:"A shortname name for peer to peer."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-19",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#peer-to-peer",children:"Peer to Peer"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"paper-wallet",children:"Paper Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A form of storing a recovery phrase or private keys offline by printing them on a piece of paper. This document would then be stored by traditional means in a secured location of the user's choosing, such as a safe."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-57",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"payment-address",children:"Payment Address"}),"\n",(0,i.jsx)(n.p,{children:"A string of letters and numbers that cryptocurrency and assets can be sent to and from."}),"\n",(0,i.jsx)(n.p,{children:'Nervos CKB Mainnet addresses always begin with the prefix "ckb".'}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-20",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#address",children:"Address"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"payment-channel",children:"Payment Channel"}),"\n",(0,i.jsx)(n.p,{children:"A micropayment channel or payment channel is class of techniques designed to allow users to make multiple payment transactions without committing all of the transactions to the layer 1 blockchain. In a typical payment channel, only two transactions are added to the block chain but an unlimited or nearly unlimited number of payments can be made between the participants."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-58",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"peer-to-peer",children:"Peer to Peer"}),"\n",(0,i.jsx)(n.p,{children:"A peer-to-peer (P2P) service is a decentralized platform whereby two individuals interact directly with each other, without intermediation by a third party."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-21",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#p2p",children:"P2P"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-59",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"private-key",children:"Private Key"}),"\n",(0,i.jsx)(n.p,{children:"A private key, also known as a secret key, is a variable in cryptography, known only to the owner(s) of the key, that is used with an algorithm to encrypt and decrypt data."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-60",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-asset",children:"Digital Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#paper-wallet",children:"Paper Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#payment-address",children:"Payment Address"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proof-of-work",children:"Proof of Work"}),"\n",(0,i.jsx)(n.p,{children:"PoW asks users to solve a cryptographic puzzle to prove ownershipo of a certain amount of computational resource to participate in the consensus. In general PoW is a more permissionless consensus mechanism than PoS."}),"\n",(0,i.jsx)(n.p,{children:'In contrast to wildly spread misconception, PoW is not a "waste" of energy and does not induce more carbon emission. PoW is used in the Nervos layer 1 blockchain CKB.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-61",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-reward",children:"Mining Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-stake",children:"Proof of Stake"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proof-of-stake",children:"Proof of Stake"}),"\n",(0,i.jsx)(n.p,{children:"PoS asks users to prove ownership of a certain amount of cryptocurrency (their \u201cstake\u201d in the network) in order to be able to participate in the consensus. PoS relies on weak-subjectivity due to unsolvable issues like long-range attack. In PoS system the future consensus quorum is decided by existing participants completely. PoS is used in layer 2 protocols on Nervos Network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-62",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-reward",children:"Mining Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"propagation",children:"Propagation"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for Block Propagation."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-22",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-propagation",children:"Block Propagation"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"public-key",children:"Public Key"}),"\n",(0,i.jsx)(n.p,{children:"A notion used only in public-key cryptography, a.k.a. asymmetric cryptography. A public key is a piece of information that can be known to others without compromising security. Unique for each user, a public key is associated with a private key known only to the user. The public key can be used to encrypt a message so that it can only be decrypted with the corresponding private key, or to verify that a message is authorized by the user with the corresponding private key."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-63",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"reward",children:"Reward"}),"\n",(0,i.jsx)(n.p,{children:"An amount of CKBytes included in each new block as a reward by the network to the miner who found the proof-of-work solution."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-64",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#base-reward",children:"Base Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-reward",children:"Block Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#commit-reward",children:"Commit Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-reward",children:"Mining Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-reward",children:"Proposal Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-reward",children:"Secondary Reward"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"signature",children:"Signature"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for cryptographic signature."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-23",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptographic-signature",children:"Cryptographic Signature"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"smart-contract",children:"Smart Contract"}),"\n",(0,i.jsx)(n.p,{children:"A smart contract is a self-executing contract with the terms of the agreement between contract creators and contract users being directly written into lines of code. The code and the agreements contained therein exist across a distributed, decentralized blockchain network. Also known as script on Nervos CKB."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"state",children:"State"}),"\n",(0,i.jsx)(n.p,{children:"Data stored on the blockchain. In most contexts this this means current data and excludes historical data."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-65",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"state-bloat",children:"State Bloat"}),"\n",(0,i.jsx)(n.p,{children:"The unlimited increase of state data in Ethereum. State bloat slows down node synchronization, raises the barrier of full node, thus hurts network decentralization."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"state-channel",children:"State Channel"}),"\n",(0,i.jsx)(n.p,{children:"A layer 2 solution where a channel is set up between participants, where they can transact freely and cheaply. Only a transaction to set up the channel and close the channel is sent to Mainnet. This allows for very high transaction throughput, but does rely on knowing number of participants up front and locking up of funds."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tip",children:"Tip"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for tip block."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-24",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tip-block",children:"Tip Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tip-block",children:"Tip Block"}),"\n",(0,i.jsx)(n.p,{children:"The most recent block to be confirmed in a blockchain. The tip block has the highest block height in the blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-25",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tip",children:"Tip"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-66",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-height",children:"Block Height"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction",children:"Transaction"}),"\n",(0,i.jsx)(n.p,{children:"Transaction is the basic object created and signed by users to interact with distributed ledger. Transactions update ledger state at users requests. A CKB transaction destroys some outputs created in previous transactions and creates some new outputs. We call the transaction output a Cell in CKB."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-67",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-fee",children:"Transaction Fee"}),"\n",(0,i.jsx)(n.p,{children:"A fee which is paid in the native token to miners in exchange for processing a transaction."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-26",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner-fee",children:"Miner Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-68",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#native-token",children:"Native Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"token",children:"Token"}),"\n",(0,i.jsx)(n.p,{children:"A \u201ctoken\u201d often refers to non-native token on smart contract platform, such as UDT on Nervos Network or ERC20 on Ethereum."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-69",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-asset",children:"Digital Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"turing-complete",children:"Turing Complete"}),"\n",(0,i.jsx)(n.p,{children:"Turing Complete refers to a machine that, given enough time and memory along with the necessary instructions, can solve any computational problem, no matter how complex. The term is normally used to describe modern programming languages as most of them are Turing Complete (C++, Python, JavaScript, etc.)."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"udt",children:"UDT"}),"\n",(0,i.jsx)(n.p,{children:"Short for User-Defined Token, a customised token created with properties defined by the user. In normal usage, this most commonly refers to fungible tokens."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-27",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"unconfirmed",children:"Unconfirmed"}),"\n",(0,i.jsx)(n.p,{children:"The state of a transaction that has not yet been confirmed. An unconfirmed transaction is not finalized and cannot be guaranteed."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-28",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#unconfirmed-transaction",children:"Unconfirmed Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-70",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"unconfirmed-transaction",children:"Unconfirmed Transaction"}),"\n",(0,i.jsx)(n.p,{children:"A transaction that has not yet been confirmed. An unconfirmed transaction is not finalized and cannot be guaranteed."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-29",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#unconfirmed",children:"Unconfirmed"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-71",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"user-defined-token",children:"User-Defined Token"}),"\n",(0,i.jsx)(n.p,{children:"A custom token created with properties defined by the user. In normal usage, this most commonly refers to fungible tokens."}),"\n",(0,i.jsx)(n.p,{children:"A User-Defined Token is usually referred to by its abbreviation, UDT."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-30",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-72",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-20",children:"ERC20 on Ethereum.org"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-777",children:"ERC777 on Ethereum.org"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://talk.nervos.org/t/rfc-simple-udt-draft-spec/4333",children:"Simple UDT Draft Spec on Nervos Talk"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"wallet",children:"Wallet"}),"\n",(0,i.jsx)(n.p,{children:"User-facing software used to interact with on-chain entities such as assets, smart contracts and dApps. A wallet can include key management itself or delegate key management to external hardware for improved security."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-73",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#paper-wallet",children:"Paper Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#payment-address",children:"Payment Address"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-asset",children:"Digital Asset"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"economics-glossary",children:"Economics Glossary"}),"\n",(0,i.jsx)(n.h3,{id:"base-issuance",children:"Base Issuance"}),"\n",(0,i.jsx)(n.p,{children:"Base issuance is the basic CKByte issuance with a fixed and decreasing schedule. Base issuance is awarded to miners as incentives to protect the network and also as an indirect token distribution method."}),"\n",(0,i.jsx)(n.p,{children:"Base issuance is limited to a finite total supply 33.6G (33.6 billion) CKBytes."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-74",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#base-reward",children:"Base Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Crypto-Economics RFC on Nervos Network GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"base-reward",children:"Base Reward"}),"\n",(0,i.jsx)(n.p,{children:"Base reward is the block reward (in CKBytes) to miners generated from the base issuance. Base reward halves approximately every 4 years until eventually reaching 0, like Bitcoin."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-75",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#base-issuance",children:"Base Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit-reward-1",children:"Commit Reward"}),"\n",(0,i.jsx)(n.p,{children:"A reward paid to miners in CKBytes for committing a previously proposed transaction. After the transaction has been committed it is confirmed."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-76",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"economic-abstraction",children:"Economic Abstraction"}),"\n",(0,i.jsx)(n.p,{children:'With proper tool support, users can use tokens other than CKByte (for example, stable coins) to pay transactions fees, a concept known as "Economic Abstraction".'}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fiat-currency",children:"Fiat Currency"}),"\n",(0,i.jsx)(n.p,{children:"Fiat currencies are a medium of exchange established as money, often by government regulation. Fiat money does not have intrinsic value and does not have use value. It has value only because a government maintains its value, or because parties engaging in exchange agree on its value."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-77",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptocurrency",children:"Cryptocurrency"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-currency",children:"Digital Currency"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"heavy-asset-problem",children:"Heavy Asset Problem"}),"\n",(0,i.jsx)(n.p,{children:"A common problem found in multi-asset blockchain platforms where the value of the assets stored on the chain gains significant value but the native token of the chain does not. This raises the incentive to attack the network, but does not increase the security because the value of the native token is what is used to secure the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-78",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#asset",children:"Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#starving-layer-1-problem",children:"Starving Layer 1 Problem"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-security-commons",children:"Tragedy of the Security Commons"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"liquidity",children:"Liquidity"}),"\n",(0,i.jsx)(n.p,{children:"The ability for an asset to be bought or sold easily without causing a significant change in the current market price."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-79",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#asset",children:"Asset"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proposal-reward",children:"Proposal Reward"}),"\n",(0,i.jsx)(n.p,{children:"A reward paid to miners in CKBytes for proposing an unconfirmed transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-80",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secondary-issuance",children:"Secondary Issuance"}),"\n",(0,i.jsx)(n.p,{children:"The creation of new CKBytes that is paid to miners through secondary rewards. Secondary issuance follows a fixed inflation schedule of 1.344 billion CKBytes per year. Nervos DAO stakers are not affected by secondary issuance."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-81",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#base-issuance",children:"Base Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-dao",children:"Nervos DAO"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-reward",children:"Secondary Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#state",children:"State"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Crypto-Economics RFC on Nervos Network GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secondary-reward",children:"Secondary Reward"}),"\n",(0,i.jsx)(n.p,{children:"A subsidy paid to miners in CKBytes for providing the compute and storage requirements required for processing transactions and persisting data on Nervos."}),"\n",(0,i.jsx)(n.p,{children:"Secondary rewards are created from secondary issuance, and continuously pay miners for the verification of transactions and preservation of blockchain state."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-82",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"selfish-mining-attack",children:"Selfish Mining Attack"}),"\n",(0,i.jsx)(n.p,{children:"Selfish mining is a concept that was addressed by Cornell University researchers in detail in a 2013 report. In this attack, malicious miners gain unfair block rewards by deliberately orphaning blocks mined by others."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-83",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.cs.cornell.edu/~ie53/publications/btcProcFC.pdf",children:"Selfish Mining Related Paper"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"starving-layer-1-problem",children:"Starving Layer 1 Problem"}),"\n",(0,i.jsx)(n.p,{children:"A scenario that can arise in multi-layer blockchain platforms where the vast majority of the transaction traffic moves from layer 1 to layer 2, taking the vast majority of transaction fees with it. If layer 1 relies exclusively on transaction fees to support the security of the platform, it may end up not having enough incentives available to properly secure it."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-84",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#heavy-asset-problem",children:"Heavy Asset Problem"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-2",children:"Layer 2"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-fee",children:"Transaction Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"state-rent",children:"State Rent"}),"\n",(0,i.jsx)(n.p,{children:"A recurring fee that is paid to persist and secure state data."}),"\n",(0,i.jsx)(n.p,{children:"On Nervos, secondary issuance is used to boost the payment of state rent by users who occupy space on the Nervos blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-85",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Crypto-Economics RFC on Nervos Network GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"store-of-assets",children:"Store of Assets"}),"\n",(0,i.jsx)(n.p,{children:'Similar to the concept of "Store of Value" in the context of Bitcoin, we call the utility "Store of Assets" when a blockchain keeps any crypto-assets securely and censorship-resistantly. Nervos CKB is such a Store of Assets or SoA.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-86",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#store-of-value",children:"Store of Value"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"store-of-value",children:"Store of Value"}),"\n",(0,i.jsx)(n.p,{children:"Assets which can maintain their worth over time without depreciating"}),"\n",(0,i.jsx)(n.p,{children:"A good store of value either match or outpace the inflation rate of fiat currency, and has a reasonable amount of liquidity, allowing the asset to be easily sold."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-87",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#store-of-assets",children:"Store of Assets"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#liquidity",children:"Liquidity"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tail-emission",children:"Tail Emission"}),"\n",(0,i.jsx)(n.p,{children:"A type of reward that is paid to miners through a fixed amount of inflation."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-88",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-reward",children:"Secondary Reward"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"targeted-inflation",children:"Targeted Inflation"}),"\n",(0,i.jsx)(n.p,{children:"A form of inflation that only affects a specific subset of users."}),"\n",(0,i.jsx)(n.p,{children:"Nervos uses Secondary Issuance to create targeted inflation on users who occupy space on the Nervos blockchain to pay State Rent. Long-term holders of CKBytes have the option of locking them in the Nervos DAO, which acts and an inflation shelter."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-89",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-dao",children:"Nervos DAO"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Crypto-Economics RFC on Nervos Network GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tragedy-of-the-commons",children:"Tragedy of the Commons"}),"\n",(0,i.jsx)(n.p,{children:"A situation in a system where the participants act in accordance with their own self interest and deplete or destroy a shared resource through their collective action."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-90",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-security-commons",children:"Tragedy of the Security Commons"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-storage-commons",children:"Tragedy of the Storage Commons"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tragedy-of-the-security-commons",children:"Tragedy of the Security Commons"}),"\n",(0,i.jsx)(n.p,{children:'A situation that can emerge on multi-asset blockchain platforms where asset tokens rely on the storage and security of the blockchain platform, but do not contribute back to the platform. As the number of assets that "ride for free" increases, so does the burden placed on the underlying blockchain platform. If the assets do not contribute to the underlying platform, the available security may not properly support the network.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-91",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#heavy-asset-problem",children:"Heavy Asset Problem"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-commons",children:"Tragedy of the Commons"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-storage-commons",children:"Tragedy of the Storage Commons"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tragedy-of-the-storage-commons",children:"Tragedy of the Storage Commons"}),"\n",(0,i.jsx)(n.p,{children:"A situation that can emerge on incentivized blockchain platforms where mining rewards are paid for inclusion of data to the blockchain, but no rewards exist for the long-term persistence of the blockchain data. As the size of the chain grows, so do the costs associated with persisting the data. If there is no direct incentive for persisting data, fewer and fewer nodes will do so. Eventually, too few nodes will be available to properly support the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-92",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-commons",children:"Tragedy of the Commons"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-security-commons",children:"Tragedy of the Security Commons"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"technical-glossary",children:"Technical Glossary"}),"\n",(0,i.jsx)(n.h3,{id:"active-cell",children:"Active Cell"}),"\n",(0,i.jsx)(n.p,{children:"Or Live Cell, a Cell exists in the current CKB state. Only active Cells can be used as inputs to new transactions."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-31",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-93",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#input",children:"Input"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"aggron",children:"Aggron"}),"\n",(0,i.jsx)(n.p,{children:"The first Nervos CKB Testnet corresponding to Mainnet Lina."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"CKB version"}),": >= v0.101.0 (latest stable is recommended)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Genesis hash"}),": 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Init command"}),": ",(0,i.jsx)(n.code,{children:"ckb init --chain testnet"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Launched at"}),": 2020-05-22 04:00:00 UTC"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"ckb2021 activated at"}),": 2021-10-24 03:00:00 UTC"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-32",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#testnet",children:"Testnet"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-3",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lina",children:"Lina"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mainnet",children:"Mainnet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"animagus",children:"Animagus"}),"\n",(0,i.jsx)(n.p,{children:"A framework layer that runs on top of Nervos CKB which provides an easy way to query for account balances without having to go through the Cell collection process."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-94",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-collection",children:"Cell Collection"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/https-medium-com-nervosnetwork-animagus-part-1-introduction-66fa8ce27ccd-cfb361a7d883",children:"Animagus Introduction on the Nervos Blog"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"args",children:"Args"}),"\n",(0,i.jsx)(n.p,{children:"Args is short for arguments. Arguments are data provided to the lock script or type script of a Cell, similar to args provided to a function or method call."}),"\n",(0,i.jsx)(n.p,{children:"Arguments are stored as part of the Cell when it is created."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-95",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"axon",children:"Axon"}),"\n",(0,i.jsx)(n.p,{children:"Axon is a chain-based layer 2 protocol and framework with a practical security and economic model. Axon chains allow anyone to stake tokens on CKB to become a validator and participate in consensus."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-96",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-2",children:"Layer 2"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"blake2b",children:"Blake2b"}),"\n",(0,i.jsx)(n.p,{children:"A cryptographic hash function. BLAKE2b (or BLAKE2) is optimized for 64-bit platforms including NEON-enabled ARMs and produces digests of any size between 1 and 64 bytes. BLAKE2b is optimized for 8- to 32-bit platforms, and produces digests of any size between 1 and 32 bytes. CKB uses BLAKE2b as the default hash algorithm."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-97",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://blake2.net/blake2.pdf",children:"Blake2b paper"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/BLAKE_(hash_function)",children:"Blake Hash Function on Wikipedia"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Hash_function",children:"Hash Function on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-subsidy",children:"Block Subsidy"}),"\n",(0,i.jsx)(n.p,{children:"A payment that is made in the native currency of the blockchain that is paid to miners for providing the computational resources create a block and secure the blockchain."}),"\n",(0,i.jsx)(n.p,{children:"The subsidy consists is the portion of the total block reward that is issued out of inflation for creating the block, but does not include any additional transaction fees that may be paid on top."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-33",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-reward",children:"Block Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-fee",children:"Transaction Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"boxer",children:"Boxer"}),"\n",(0,i.jsx)(n.p,{children:"A lightweight Rust library for verifying the Nervos layer 1 blockchain, the Common Knowledge Base."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-98",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/xxuejie/ckb-boxer",children:"Boxer on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block_version",children:(0,i.jsx)(n.code,{children:"block_version"})}),"\n",(0,i.jsx)(n.p,{children:"Version of a block. This field is reserved for the system, set to 0 by default."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub const BLOCK_VERSION: Version = 0;\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-99",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cell-collection",children:"Cell Collection"}),"\n",(0,i.jsx)(n.p,{children:"The process of gathering Cells that meet certain criteria."}),"\n",(0,i.jsx)(n.p,{children:"For example: To find the balance of a particular account, all active Cells for the address would need to be collected."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-100",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cellbase",children:"Cellbase"}),"\n",(0,i.jsx)(n.p,{children:"The transaction in each block that is responsible for the minting of new CKBytes."}),"\n",(0,i.jsx)(n.p,{children:"This is the equivalent of a coinbase transaction in Bitcoin."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-101",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"Coinbase on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cellbase_maturity",children:(0,i.jsx)(n.code,{children:"cellbase_maturity"})}),"\n",(0,i.jsx)(n.p,{children:'Any referenced cellbase output must meet this requirement in a transaction; otherwise, the transaction is rejected. Cellbase outputs are "locked" and have to wait for 4 epochs (approximately 16 hours) to be confirmed before they become ready to be spent. This restriction is to avoid the risk of later transactions with cellbase root being rollbacked when a soft fork occurs.'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const CELLBASE_MATURITY: EpochNumberWithFraction =\nEpochNumberWithFraction::new_unchecked(4, 0, 1);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-102",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cellbase",children:"Cellbase"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cell_deps",children:(0,i.jsx)(n.code,{children:"cell_deps"})}),"\n",(0,i.jsx)(n.p,{children:"Pointers to Live Cells on the chain that allow scripts in the transaction to access (read-only) referenced Live Cells."}),"\n",(0,i.jsxs)(n.p,{children:["Find more in the essay ",(0,i.jsx)(n.a,{href:"https://nervos-ckb-docs-git-v1-cryptape.vercel.app/docs/essays/dependencies/#how-dependencies-work",children:"Script dependencies"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-103",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dependencies",children:"Dependencies"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckbhash",children:"Ckbhash"}),"\n",(0,i.jsx)(n.p,{children:"CKB uses blake2b as the default hash algorithm with the following configurations:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["output digest size in bytes: ",(0,i.jsx)(n.code,{children:"32"})]}),"\n",(0,i.jsxs)(n.li,{children:["personalization: ",(0,i.jsx)(n.code,{children:"ckb-default-hash"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ckbhash"})," is used to denote the blake2b hash with the configurations above, there are example and test vectors in python 3:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"import hashlib\nimport unittest\n\ndef ckbhash():\n return hashlib.blake2b(digest_size=32, person=b'ckb-default-hash')\n\nclass TestCKBBlake2b(unittest.TestCase):\n\n def test_empty_message(self):\n hasher = ckbhash()\n hasher.update(b'')\n self.assertEqual('44f4c69744d5f8c55d642062949dcae49bc4e7ef43d388c5a12f42b5633d163e', hasher.hexdigest())\n\nif __name__ == '__main__':\n unittest.main()\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-104",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blake2b",children:"Blake2b"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckb-merkle-tree",children:"CKB Merkle Tree"}),"\n",(0,i.jsxs)(n.p,{children:["CKB Merkle Tree is a CBMT( ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0006-merkle-tree/0006-merkle-tree.md#complete-binary-merkle-tree",children:"Complete Binary Merkle Tree"})," ) using following merge function:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckbhash(left || right)\n"})}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ckbhash"})," is the hash function, ",(0,i.jsx)(n.code,{children:"||"})," denotes binary concatenation."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-105",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0006-merkle-tree/0006-merkle-tree.md",children:"Merkle Tree for Static Data"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Merkle_tree",children:"Merkle Tree on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"code-hash-1",children:"Code Hash"}),"\n",(0,i.jsx)(n.p,{children:"A field in a Cell that contains a hash value which could refer to a specific piece of data, or a specific Cell referenced by Type ID."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-106",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#data",children:"Data"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type_id",children:"Type ID"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit-1",children:"Commit"}),"\n",(0,i.jsx)(n.p,{children:"The process of taking a proposed transaction and adding it to the blockchain. After the transaction has been committed it is confirmed."}),"\n",(0,i.jsx)(n.p,{children:"Miners are incentivized to commit transactions by being paid a commit reward."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-107",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#commit-reward",children:"Commit Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#propose",children:"Propose"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commitment-zone",children:"Commitment Zone"}),"\n",(0,i.jsx)(n.p,{children:"Section of the block that contains transaction commitments. The commitment zone can only contain valid transactions which have appeared in the proposal zone of one of the previous 2 to 10 blocks."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-108",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-zone",children:"Proposal Zone"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"consume-1",children:"Consume"}),"\n",(0,i.jsx)(n.p,{children:"The process of using a Live Cell as an input to a transaction."}),"\n",(0,i.jsx)(n.p,{children:"The process of consumption marks the Live Cell as a Dead Cell. This is the equivalent of marking a UTXO as spent in Bitcoin."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-109",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"crypto-primitives",children:"Crypto Primitives"}),"\n",(0,i.jsx)(n.p,{children:"Well-established, low-level cryptographic algorithm commonly used to build out a cryptographic protocol."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-110",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Cryptographic_primitive",children:"Cryptographic Primitive on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dao_type_hash",children:(0,i.jsx)(n.code,{children:"dao_type_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["NervosDAO\u2019s ",(0,i.jsx)(n.code,{children:"type_hash"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Find more in ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#ckb-genesis-script-list",children:"CKB Genesis Script List"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-111",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script-hash",children:"Type Script Hash"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"data-1",children:"Data"}),"\n",(0,i.jsx)(n.p,{children:"In Nervos specific contexts, data may refer to the data structure within a Cell. This structure is used to hold any form of information that needs to be stored on the Nervos blockchain."}),"\n",(0,i.jsx)(n.p,{children:"In more general contexts, data may refer to any form of information."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-112",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dead-cell",children:"Dead Cell"}),"\n",(0,i.jsx)(n.p,{children:"A Cell that has been used as an input to a previous transaction and is consumed."}),"\n",(0,i.jsx)(n.p,{children:"A Dead Cell cannot be used as an input to a new transaction, nor can it be used as a dependency. It is effectively destroyed and removed from the active state of the network."}),"\n",(0,i.jsx)(n.p,{children:'A Dead Cell is the equivalent of a "spent UTXO" in Bitcoin.'}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-34",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#historical-cell",children:"Historical Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-113",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consume",children:"Consume"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dep-group",children:"Dep Group"}),"\n",(0,i.jsx)(n.p,{children:"A method for referencing multiple dependencies which are commonly used together using a single dependency field."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-114",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dep-type",children:"Dep Type"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dependencies",children:"Dependencies"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"CKB Transaction Structure on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dep-type",children:"Dep Type"}),"\n",(0,i.jsx)(n.p,{children:"A field that specifies the type of the dependency."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-115",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dep-group",children:"Dep Group"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dependencies",children:"Dependencies"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"CKB Transaction Structure on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"deps",children:"Deps"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for dependencies."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-35",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dependencies",children:"Dependencies"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dependencies",children:"Dependencies"}),"\n",(0,i.jsx)(n.p,{children:"Dependencies are commonly referred to as deps. Dependencies are Cells that are referenced in a transaction. Cells that are referenced as dependencies are read-only and made available to any scripts executing within the transaction. Dependencies, or deps, are not consumed."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-36",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#deps",children:"Deps"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-116",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consume",children:"Consume"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"duktape",children:"Duktape"}),"\n",(0,i.jsx)(n.p,{children:"Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint."}),"\n",(0,i.jsx)(n.p,{children:"Duktape is used to run JavaScript based smart contracts on Nervos."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-117",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://duktape.org/",children:"Duktape Official Website"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"difficulty",children:"Difficulty"}),"\n",(0,i.jsxs)(n.p,{children:["A measurement of how difficult it is to solve the ",(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})," cryptographic puzzle required to create a block."]}),"\n",(0,i.jsx)(n.p,{children:"Networks automatically adjust the difficulty to control the speed at which blocks are generated as mining participants enter and exit the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-118",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"diviner",children:"Diviner"}),"\n",(0,i.jsx)(n.p,{children:"A deterministic testing framework for Rust."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-119",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/xxuejie/diviner",children:"Diviner on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"eaglesong",children:"Eaglesong"}),"\n",(0,i.jsx)(n.p,{children:"Eaglesong is a new hash function developed specifically for Nervos CKB proof-of-work, which is also suitable in other use cases in which a secure hash function is needed."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-120",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0010-eaglesong/0010-eaglesong.md",children:"Eaglesong RFC on the Nervos Github"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/the-proof-of-work-function-of-nervos-ckb-3cc8364464d9",children:"Introducing Eaglesong, Nervos\u2019s New Hash Function for CKB Proof-of-Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"epoch_duration_target",children:(0,i.jsx)(n.code,{children:"epoch_duration_target"})}),"\n",(0,i.jsx)(n.p,{children:"The estimated epoch duration specified by NC-Max. Set as 4 hours in CKB."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const DEFAULT_EPOCH_DURATION_TARGET: u64 = 4 * 60 * 60; // 4 hours, unit: second\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-121",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#epoch",children:"Epoch"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"erc20",children:"ERC20"}),"\n",(0,i.jsx)(n.p,{children:"An Ethereum token standard for basic fungible tokens."}),"\n",(0,i.jsx)(n.p,{children:"An sUDT on Nervos is the equivalent of Ethereum tokens standards ERC20 or ERC777."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-122",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#erc777",children:"ERC777"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-20",children:"ERC20 on Ethereum.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"erc721",children:"ERC721"}),"\n",(0,i.jsx)(n.p,{children:"An Ethereum token standard for non-fungible tokens."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-123",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#non-fungible-token",children:"Non-Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-721",children:"ERC721 on Ethereum.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"erc777",children:"ERC777"}),"\n",(0,i.jsx)(n.p,{children:"An updated Ethereum token standard for basic fungible tokens that is backwards compatible with ERC20."}),"\n",(0,i.jsx)(n.p,{children:"An sUDT on Nervos is the equivalent of Ethereum tokens standards ERC20 or ERC777."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-124",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#erc20",children:"ERC20"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-777",children:"ERC777 on Ethereum.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"erc1155",children:"ERC1155"}),"\n",(0,i.jsx)(n.p,{children:"An Ethereum token standard that supports the creation any number of fungible or non-fungible tokens on a single contract."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-125",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#non-fungible-token",children:"Non-Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-1155",children:"ERC1155 on Ethereum.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"full-address",children:"Full Address"}),"\n",(0,i.jsx)(n.p,{children:"An address format used on Nervos that includes the full code hash of the lock script associated."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-126",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#address",children:"Address"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#short-address",children:"Short Address"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"generator",children:"Generator"}),"\n",(0,i.jsx)(n.p,{children:"A program used to create transactions that can be broadcast to the Nervos CKB network."}),"\n",(0,i.jsx)(n.p,{children:"Generators run locally on the client side (off-chain). They utilize user input and existing Cells as program inputs, to create new Cells with new states as output."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"genesis-block",children:"Genesis Block"}),"\n",(0,i.jsx)(n.p,{children:"The first block in the blockchain, used to initialize the global state. The genesis block is unique because it does not contain a reference to the previous block because it is the first."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-127",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"genesis_hash",children:(0,i.jsx)(n.code,{children:"genesis_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["Hash of CKB genesis block. CKB Genesis Block was created in a decentralized manner that encourages everyone to generate a unique genesis block verifiably through the ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/genesis-block-generator/blob/master/spec.md",children:"Genesis Block Generator"}),". Nodes thus created and activated can be connected to any other node across the network to form a decentralized Common Knowledge Base."]}),"\n",(0,i.jsx)(n.p,{children:"The genesis block contains two main components:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb-system-scripts/blob/v0.5.4/c/dao.c",children:"System script"})}),"\n",(0,i.jsxs)(n.li,{children:["Token pre-allocation based on the Nervos Foundation\u2018s ",(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/nervos-ckb-official-public-sale-announcement-431438f4cc39#:~:text=Key%20details%20of%20the%20Nervos%20Public%20Sale&text=The%20initial%20total%20supply%20of,be%201%20CKB%20%3D%200.01%20USD.",children:"announcement"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-128",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#genesis-block",children:"Genesis block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"godwoken",children:"Godwoken"}),"\n",(0,i.jsx)(n.p,{children:"Godwoken is a layer 2 rollup framework for Nervos CKB. It provides scaling capability, as well as an abstract account model to CKB."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-129",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/godwoken",children:"Godwoken on GitHub"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.godwoken.io/",children:"Godwoken Documentation Site"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"governance-script",children:"Governance Script"}),"\n",(0,i.jsx)(n.p,{children:"A type script which defines the monetary policy of a User Defined Token (UDT)."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-130",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#governance-script-hash",children:"Governance Script Hash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"governance-script-hash",children:"Governance Script Hash"}),"\n",(0,i.jsx)(n.p,{children:"A Blake2b hash of a type script which is used as an identifier for the script when referenced by a Cell."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-37",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script-hash",children:"Type Script Hash"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-131",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#governance-script",children:"Governance Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"historical-cell",children:"Historical Cell"}),"\n",(0,i.jsxs)(n.p,{children:["An alternative term for ",(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-38",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-132",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"inbound-connection",children:"Inbound Connection"}),"\n",(0,i.jsx)(n.p,{children:"Inbound connection means it is initiated by the remote peer; and the connection itself is outgoing connection when we switch the subject to the remote peer."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-133",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#outbound-connection",children:"Outbound Connection"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"indexer",children:"Indexer"}),"\n",(0,i.jsx)(n.p,{children:"An application or library to trace Live Cells that comply with criteria specified by the developer or user."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-134",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"initial_primary_epoch_reward",children:(0,i.jsx)(n.code,{children:"initial_primary_epoch_reward"})}),"\n",(0,i.jsx)(n.p,{children:"Incentives paid to miners in CKBytes by epoch in CKB base issuance. Under CKB's consensus, block interval is uncertain, while epoch can be fixed at approximately 4 hours, so reward issuance is determined by epoch. Each epoch issues 1_917_808_21917808 Shannons of CKBytes, whose total amount is fixed but halves every 4 years."}),"\n",(0,i.jsx)(n.p,{children:"The initial base issuance is 4.2 billion CKBytes per year. Similar to Bitcoin, the base issuance halves approximately every 4 years until it stops."}),"\n",(0,i.jsxs)(n.p,{children:["To calculate, ",(0,i.jsx)(n.a,{href:"/docs/concepts/glossary#block-reward",children:"block reward"})," = ",(0,i.jsx)(n.code,{children:"initial_primary_epoch_reward"})," / epoch_length (the number of blocks in the epoch)."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const INITIAL_PRIMARY_EPOCH_REWARD: Capacity = Capacity::shannons(1_917_808_21917808);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-135",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-reward",children:"Block Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#epoch",children:"Epoch"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary_epoch_reward",children:(0,i.jsx)(n.code,{children:"secondary_epoch_reward"})})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"input",children:"Input"}),"\n",(0,i.jsx)(n.p,{children:"A Live Cell that is used in a transaction. If the transaction is accepted by the network, the Live Cell gets consumed as input and labeled as a Dead Cell."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-136",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consume",children:"Consume"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"keyper",children:"Keyper"}),"\n",(0,i.jsx)(n.p,{children:"A specification of how to manage wallet Lock Scripts which apply to a specific user."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-137",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ququzone/keyper",children:"Keyper on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"late-spawning",children:"Late Spawning"}),"\n",(0,i.jsx)(n.p,{children:"When a node joins a blockchain network for the first time after the network has already been in operation for a period of time."}),"\n",(0,i.jsx)(n.p,{children:"A network is said to support late spawning if that participant can download and verify the entire blockchain without having to trust any of the participants in the network to feed them unaltered data."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-138",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#genesis-block",children:"Genesis Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"layer-1",children:"Layer 1"}),"\n",(0,i.jsx)(n.p,{children:"Layer 1 of a decentralized ecosystem is the underlying blockchain architecture."}),"\n",(0,i.jsx)(n.p,{children:"A proof of work blockchain known as the Common Knowledge Base (CKB) that serves as the base layer for the Nervos Network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-139",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-2",children:"Layer 2"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"layer-2",children:"Layer 2"}),"\n",(0,i.jsx)(n.p,{children:"Layer 2 refers to a secondary framework or protocol that is built on top of an existing blockchain system."}),"\n",(0,i.jsx)(n.p,{children:"The main goal of these protocols is to solve the transaction speed and scaling difficulties that are being faced by the major cryptocurrency networks."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-140",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"lina",children:"Lina"}),"\n",(0,i.jsx)(n.p,{children:"The name of public Mainnet of the Nervos CKB."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"CKB version"}),": >= v0.25.2 (latest stable is recommended)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Genesis hash"}),": 0x92b197aa1fba0f63633922c61c92375c9c074a93e85963554f5499fe1450d0e5"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Init command"}),": ",(0,i.jsx)(n.code,{children:"ckb init --chain mainnet"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Launched at"}),": 2019-11-15 21:11:00 UTC"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-39",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mainnet",children:"Mainnet"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-4",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#aggron",children:"Aggron"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#testnet",children:"Testnet"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-141",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"live-cell",children:"Live Cell"}),"\n",(0,i.jsx)(n.p,{children:"A Cell that has not been consumed and is available for use."}),"\n",(0,i.jsx)(n.p,{children:"This is similar to an unspent transaction output (UTXO) in Bitcoin."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-40",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#active-cell",children:"Active Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-142",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"lock",children:"Lock"}),"\n",(0,i.jsx)(n.p,{children:"A script that represents the ownership of a Cell. A user successfully unlocks a Cell and is able to consume it if the Cell's lock script exits normally."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-143",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"lock-script",children:"Lock Script"}),"\n",(0,i.jsx)(n.p,{children:"A script that enforces access and ownership of a Cell. This script controls who has permission to use the Cell as an input. Lock scripts accept user generated proofs or witnesses and including transaction as inputs."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-144",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"lock-script-hash",children:"Lock Script Hash"}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.a,{href:"#blake2b",children:"Blake2b"})," hash of a lock script which is used as an identifier for the script when referenced by a Cell."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-145",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mainnet",children:"Mainnet"}),"\n",(0,i.jsxs)(n.p,{children:['Short for "main network", the running Nervos CKB public blockchain. The name of the Nervos CKB Mainnet is ',(0,i.jsx)(n.a,{href:"#lina",children:"Lina"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-41",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lina",children:"Lina"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-5",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#aggron",children:"Aggron"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#testnet",children:"Testnet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"max_block_bytes",children:(0,i.jsx)(n.code,{children:"max_block_bytes"})}),"\n",(0,i.jsx)(n.p,{children:"The maximum transaction size limit allowed in a block in bytes. Estimated based on the size consumed by 1000 2-in-2-out secp256k1 transactions."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub const MAX_BLOCK_BYTES: u64 = TWO_IN_TWO_OUT_BYTES * TWO_IN_TWO_OUT_COUNT;\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"max_block_cycles",children:(0,i.jsx)(n.code,{children:"max_block_cycles"})}),"\n",(0,i.jsx)(n.p,{children:"The maximum transaction cycle limit allowed in a block. Estimated based on the cycles consumed by 1000 2-in-2-out secp256k1 transactions."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"/// cycles of a typical two-in-two-out tx.\npub const TWO_IN_TWO_OUT_CYCLES: Cycle = 3_500_000;\n\n/// count of two-in-two-out txs a block should capable to package.\nconst TWO_IN_TWO_OUT_COUNT: u64 = 1_000;\npub(crate) const MAX_BLOCK_CYCLES: u64 = TWO_IN_TWO_OUT_CYCLES * TWO_IN_TWO_OUT_COUNT;\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-146",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cycles",children:"Cycles"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"max_block_proposals_limit",children:(0,i.jsx)(n.code,{children:"max_block_proposals_limit"})}),"\n",(0,i.jsx)(n.p,{children:"The maximum amount of proposals contained in one block. The default value starts from 1.5."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"TWO_IN_TWO_OUT_COUNT\npub const MAX_BLOCK_PROPOSALS_LIMIT: u64 = 1_500;\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-147",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-zone",children:"Proposal Zone"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"max_uncles_num",children:(0,i.jsx)(n.code,{children:"max_uncles_num"})}),"\n",(0,i.jsx)(n.p,{children:"The maximum number (Uint64) of uncle blocks allowed for one block. Set as 2 by default."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"const MAX_UNCLE_NUM: usize = 2;\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-148",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"median_time_block_count",children:(0,i.jsx)(n.code,{children:"median_time_block_count"})}),"\n",(0,i.jsx)(n.p,{children:"A timestamp is valid only when it is greater than the median timestamp of the previous 37 blocks."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"const MEDIAN_TIME_BLOCK_COUNT: usize = 37;\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"minting",children:"Minting"}),"\n",(0,i.jsx)(n.p,{children:"The process of creating of new tokens."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-149",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"molecule",children:"Molecule"}),"\n",(0,i.jsx)(n.p,{children:"A serialization framework for encoding data widely used on the Nervos Network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-150",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0008-serialization/0008-serialization.md",children:"Molecule Specification"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/molecule",children:"Molecule on Github"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"muta",children:"Muta"}),"\n",(0,i.jsx)(n.p,{children:"A highly customizable, high-performance blockchain framework designed to support proof of stake, BFT consensus and smart contracts."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-151",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/muta",children:"Muta on GitHub"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-stake",children:"Proof of Stake"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nervos-ckb",children:"Nervos CKB"}),"\n",(0,i.jsx)(n.p,{children:"The layer 1 blockchain of the Nervos Network, the Common Knowledge Base."}),"\n",(0,i.jsx)(n.p,{children:"Nervos CKB is often referred to as the Nervos Blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-42",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-152",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"off-chain-computation",children:"Off-Chain Computation"}),"\n",(0,i.jsx)(n.p,{children:"A programming model where all computation is done off-chain to reduce the burden on the nodes in the network and provide higher levels of scalability. Nervos uses off-chain computation and on-chain verification."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-153",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-computation",children:"On-Chain Computation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-verification",children:"On-Chain Verification"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"off-chain-scaling",children:"Off-Chain Scaling"}),"\n",(0,i.jsx)(n.p,{children:"Off-chain scaling is the approach that only using the blockchain as a secure asset and settlement platform in conjunction with transferring almost all transactions off the blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-154",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-scaling",children:"On-Chain Scaling"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"off-chain-state",children:"Off-Chain State"}),"\n",(0,i.jsx)(n.p,{children:"The data of an application that is not stored on the blockchain, or is not accessible by on-chain smart contracts."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-155",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-state",children:"On-Chain State"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"on-chain-computation",children:"On-Chain Computation"}),"\n",(0,i.jsx)(n.p,{children:"A programming model where all computation by smart contracts is done on-chain by every node on the network simultaneously."}),"\n",(0,i.jsx)(n.p,{children:"Ethereum uses on-chain computation."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-156",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#off-chain-computation",children:"Off-Chain Computation"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"on-chain-scaling",children:"On-Chain Scaling"}),"\n",(0,i.jsx)(n.p,{children:"On-chain scaling solution refer to extending the throughput of the consensus process, or increasing network throughput as node number increases."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-157",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#off-chain-scaling",children:"Off-chain Scaling"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"on-chain-state",children:"On-Chain State"}),"\n",(0,i.jsx)(n.p,{children:"The data of an application that is stored on the blockchain and is accessible by on-chain smart contracts."}),"\n",(0,i.jsx)(n.p,{children:"Nervos provides on-chain state for all smart contracts."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-158",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#off-chain-state",children:"Off-Chain State"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"on-chain-verification",children:"On-Chain Verification"}),"\n",(0,i.jsx)(n.p,{children:"A programming model where all computation is done off-chain to reduce the burden on the nodes in the network, but verification of the resulting data is done on-chain to enforce the smart contract rules created by the developer."}),"\n",(0,i.jsx)(n.p,{children:"Nervos uses off-chain computation and on-chain verification."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-159",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-computation",children:"On-Chain Computation"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"open-transaction",children:"Open Transaction"}),"\n",(0,i.jsx)(n.p,{children:"A signed piece of a transaction that is incomplete and invalid on its own. When combined with other signed transaction pieces can form a complete transaction which can be processed."}),"\n",(0,i.jsx)(n.p,{children:"One use of open transactions is to create the functionality required for a trustless decentalized exchange."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-160",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptographic-signature",children:"Cryptographic Signature"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"optimistic-rollup",children:"Optimistic Rollup"}),"\n",(0,i.jsx)(n.p,{children:"A rollup of transactions that use fraud proofs to offer increased layer 2 transaction throughput while using the security and data availability provided by layer 1."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-161",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-2",children:"Layer 2"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan",children:"Orphan"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for Orphan Block."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-43",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan-block",children:"Orphan Block"}),"\n",(0,i.jsx)(n.p,{children:"An orphan block is a valid block that is not included in the main fork due to, for example, a lag within the network itself. There can be two miners who solve a block simultaneously in NC-Max. They are non-main-chain blocks, also known as stale blocks."}),"\n",(0,i.jsx)(n.p,{children:"In Nervos, orphan blocks are better described as Uncles."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-44",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan",children:"Orphan"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-162",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan-rate",children:"Orphan Rate"}),"\n",(0,i.jsx)(n.p,{children:"A measure of the speed at which Orphan blocks occur within the blockchain network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-163",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan_rate_target",children:(0,i.jsx)(n.code,{children:"orphan_rate_target"})})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan_rate_target",children:(0,i.jsx)(n.code,{children:"orphan_rate_target"})}),"\n",(0,i.jsx)(n.p,{children:"The estimated orphan block rate specified in NC-max. Set as 2.5% in CKB."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"// o_ideal = 1/40 = 2.5%\npub(crate) const DEFAULT_ORPHAN_RATE_TARGET: (u32, u32) = (1, 40);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-164",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan-transactions",children:"Orphan Transactions"}),"\n",(0,i.jsx)(n.p,{children:"Orphan transactions are those whose parental transactions are missing at the time that they are processed. These transactions are not propagated to other nodes until all of their missing parents are received, and they thus end up languishing in a local buffer until evicted or their parents are found."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-165",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"outbound-connection",children:"Outbound Connection"}),"\n",(0,i.jsx)(n.p,{children:'Also knowns as "outgoing connection".'}),"\n",(0,i.jsx)(n.p,{children:"A TCP connection is outgoing for the node if it was initiated (sent the TCP SYN packet) by the node in the context."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-166",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#inbound-connection",children:"Inbound Connection"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"outpoint",children:"Outpoint"}),"\n",(0,i.jsx)(n.p,{children:"A particular output Cell in a transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-167",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#output",children:"Output"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"output",children:"Output"}),"\n",(0,i.jsx)(n.p,{children:"A Live Cell that is created in a transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-168",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"overlord",children:"Overlord"}),"\n",(0,i.jsx)(n.p,{children:"A byzantine fault tollerant consensus algorithm designed by Nervos for Huobi which can support thousands of transactions per second."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-169",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/overlord-a-new-consensus-algorithm-3cc51690d269",children:"Overlord on Medium"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"p2wsh",children:"P2WSH"}),"\n",(0,i.jsxs)(n.p,{children:["A Pay-to-Witness-Script-Hash (P2WSH) is a type of Bitcoin transaction similar to a ",(0,i.jsx)(n.a,{href:"https://en.bitcoin.it/wiki/Pay_to_script_hash",children:"P2SH"})," transaction in most ways, except that it uses ",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/SegWit",children:"SegWit"}),"."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"permanent_difficulty_in_dummy",children:(0,i.jsx)(n.code,{children:"permanent_difficulty_in_dummy"})}),"\n",(0,i.jsxs)(n.p,{children:["Keeps the difficulty permanent if PoW is dummy when dev-chain disables NC-MAX difficulty adjustment. As ",(0,i.jsx)(n.code,{children:"boolean"}),", it can be enabled through configuration."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-170",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#difficulty",children:"Difficulty"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"polyjuice",children:"Polyjuice"}),"\n",(0,i.jsx)(n.p,{children:"Polyjuice provides an Ethereum compatible runtime on Godwoken."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-171",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#godwoken",children:"Godwoken"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/polyjuice",children:"Polyjuice on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"primary_epoch_reward_halving_interval",children:(0,i.jsx)(n.code,{children:"primary_epoch_reward_halving_interval"})}),"\n",(0,i.jsx)(n.p,{children:"The halving cycle of epoch reward in CKB base issuance, typically every four years. The mining reward halves when the halving interval occurs."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const DEFAULT_PRIMARY_EPOCH_REWARD_HALVING_INTERVAL: EpochNumber =\n4 * 365 * 24 * 60 * 60 / DEFAULT_EPOCH_DURATION_TARGET; // every 4 years\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-172",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#initial_primary_epoch_reward",children:(0,i.jsx)(n.code,{children:"initial_primary_epoch_reward"})})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proposal-zone",children:"Proposal Zone"}),"\n",(0,i.jsx)(n.p,{children:"Section of the block that contains transaction proposals."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-173",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#commitment-zone",children:"Commitment Zone"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#propose",children:"Propose"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"propose",children:"Propose"}),"\n",(0,i.jsx)(n.p,{children:"The process of taking an unconfirmed transaction out of the mempool and proposing it for commitment. A transaction is not confirmed until after it has been committed."}),"\n",(0,i.jsx)(n.p,{children:"Miners are incentivized to propose transactions by being paid a proposal reward."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-174",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#commit",children:"Commit"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mempool",children:"Mempool"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-reward",children:"Proposal Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-zone",children:"Proposal Zone"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proposer_reward_ratio",children:(0,i.jsx)(n.code,{children:"proposer_reward_ratio"})}),"\n",(0,i.jsx)(n.p,{children:"The reward ratio from transaction fees for miners who submit proposals specified by NC-Max. It is set as 40% in CKB, meaning the miner who first submits the transaction proposal will be rewarded with 40% of the transaction fee."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"const PROPOSER_REWARD_RATIO: Ratio = Ratio::new(4, 10);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-175",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-reward",children:"Proposal Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"risc-v",children:"RISC-V"}),"\n",(0,i.jsx)(n.p,{children:"An open standard instruction set architecture (ISA) for general computing."}),"\n",(0,i.jsx)(n.p,{children:"RISC-V is the instruction set used by the CKB-VM."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-176",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb-vm",children:"CKB-VM"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/RISC-V",children:"RISC-V on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"schnorr-signature",children:"Schnorr Signature"}),"\n",(0,i.jsx)(n.p,{children:"A cryptographic signature scheme for signing and verification."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-177",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Schnorr_signature",children:"Schnorr Signature on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"script",children:"Script"}),"\n",(0,i.jsx)(n.p,{children:"A script in Nervos CKB is a binary executable on the CKB-VM. Compared to Bitcoin script, CKB script is Turing-complete, equivalent to smart contract. A Script can be one of two types:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Lock Script - Used to control ownership and access to a Cell."}),"\n",(0,i.jsx)(n.li,{children:"Type Script - Used to control how a Cell is used in a transaction."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-178",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#risc-v",children:"CKB-VM"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#risc-v",children:"RISC-V"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",children:"ELF on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secondary_epoch_reward",children:(0,i.jsx)(n.code,{children:"secondary_epoch_reward"})}),"\n",(0,i.jsxs)(n.p,{children:["The secondary reward per epoch. Issued according to CKB\u2019s tokenomics detailed in ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"RFC0015"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Secondary issuance is designed to collect state rent, and has an issuance amount that is constant over time. After base issuance stops, there will only be secondary issuance."}),"\n",(0,i.jsx)(n.p,{children:"Secondary issuance has two parts. One is a fixed amount of base incentive (approximately 134.4 million CKBytes per year), while the other varies according to the number of CKBytes currently occupied."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const DEFAULT_SECONDARY_EPOCH_REWARD: Capacity = Capacity::shannons(613_698_63013698);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-179",children:"See also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#initial_primary_epoch_reward",children:(0,i.jsx)(n.code,{children:"initial_primary_epoch_reward"})})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-reward",children:"Secondary Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secp256k1_blake160_sighash_all_type_hash",children:(0,i.jsx)(n.code,{children:"secp256k1_blake160_sighash_all_type_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["Type hash of ",(0,i.jsx)(n.code,{children:"secp256k1_blake160_sighash_all"})," in ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#ckb-genesis-script-list",children:"CKB genesis scripts"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Find more details ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#secp256k1blake160",children:"here"}),"."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secp256k1_blake160_multisig_all_type_hash",children:(0,i.jsx)(n.code,{children:"secp256k1_blake160_multisig_all_type_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["Type hash of ",(0,i.jsx)(n.code,{children:"secp256k1_blake160_multisig_all"})," in ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#ckb-genesis-script-list",children:"CKB genesis scripts"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Find more details ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#secp256k1multisig",children:"here"}),"."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"seed-cell",children:"Seed Cell"}),"\n",(0,i.jsx)(n.p,{children:"A design pattern on Nervos from creating unique identifiers used to create unforgeable assets."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-180",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"shannon",children:"Shannon"}),"\n",(0,i.jsx)(n.p,{children:"A fractional denomination of CKBytes. One CKByte is equal to 100,000,000 Shannons."}),"\n",(0,i.jsx)(n.p,{children:"A Shannon is the equivalent of a Bitcoin Satoshi."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-181",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"Satoshi (denomination) on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"short-address",children:"Short Address"}),"\n",(0,i.jsx)(n.p,{children:"An address format on Nervos that does not include a code hash of the associated lock script, instead using one of the many common lock scripts."}),"\n",(0,i.jsx)(n.p,{children:'The short address format is the most common address format used, and is often referred to as simply "address".'}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-45",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#address",children:"Address"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-182",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#code-hash",children:"Code Hash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-address",children:"Full Address"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"simple-udt",children:"Simple UDT"}),"\n",(0,i.jsx)(n.p,{children:"A standard that defines a the most basic implementation of a UDT fungible token on Nervos."}),"\n",(0,i.jsx)(n.p,{children:"An sUDT on Nervos is the equivalent of Ethereum tokens standards ERC20 or ERC777."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-46",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#sudt",children:"SUDT"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-183",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-20",children:"ERC20 on Ethereum.org"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0025-simple-udt/0025-simple-udt.md",children:"Simple UDT RFC on Nervos Nerwork Github"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"since",children:"Since"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"since"})," is the u64 (unsigned 64-bit integer) field in transaction input for preventing inclusion before a certain block timestamp or a block number."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-184",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"spv",children:"SPV"}),"\n",(0,i.jsx)(n.p,{children:"An abbreviation for Simplified Payment Verification. A protocol for using a blockchain cryptocurrency without having to operate a full node."}),"\n",(0,i.jsx)(n.p,{children:"SPV clients require far less data to be stored, but also must requires the trust of the network clients it is connected to directly."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-185",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#spv-wallet",children:"SPV Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.bitcoinwiki.org/wiki/Simplified_Payment_Verification",children:"Simplified Payment Verification on BitcoinWiki"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"spv-wallet",children:"SPV Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A light-weight cryptocurrency wallet that uses the SPV protocol."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-186",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#spv",children:"SPV"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"sudt",children:"SUDT"}),"\n",(0,i.jsx)(n.p,{children:"An abbreviation for Simple UDT."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-47",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#simple-udt",children:"Simple UDT"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"testnet",children:"Testnet"}),"\n",(0,i.jsxs)(n.p,{children:["Short for \u201ctest network,\u201d a network used to simulate the behavior of the ",(0,i.jsx)(n.a,{href:"#mainnet",children:"Mainnet"}),". The name of the Nervos CKB Testnet is ",(0,i.jsx)(n.a,{href:"#aggron",children:"Aggron"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-48",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#aggron",children:"Aggron"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-6",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lina",children:"Lina"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mainnet",children:"Mainnet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-confirmation-number",children:"Transaction Confirmation Number"}),"\n",(0,i.jsx)(n.p,{children:"The number of confirmations required for a transaction to be added to a block."}),"\n",(0,i.jsxs)(n.p,{children:["As permissionless blockchain designs offer only probabilistic finality, a transaction can never be fully confirmed, facing an adversary with infinite computational power. Therefore, users and apps can choose a number they deem secure. We briefly discuss one factor here that influences the level of security: the recent orphan rate. It takes 6 confirmations to fully settle a transaction when the orphan rate is 0, and 24 confirmations when the rate reaches 2.5% to achieve the same level of security (See the rationale and calculation ",(0,i.jsx)(n.a,{href:"https://nervos-ckb-docs-git-v1-cryptape.vercel.app/docs/essays/tx-confirmation/",children:"here"}),")."]}),"\n",(0,i.jsxs)(n.p,{children:["In blockchain settlement assurance, transaction confirmation is one of the variables that cannot be easily quantified (See Nic Carter\u2019s ",(0,i.jsx)(n.a,{href:"https://medium.com/@nic__carter/its-the-settlement-assurances-stupid-5dcd1c3f4e41",children:"article"}),"). The exact number is open to adjustment depending on the security level that users desire. Nervos CKB sets a minimum of 15 confirmations, which should be considered conservative."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-187",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-hash",children:"Transaction Hash"}),"\n",(0,i.jsx)(n.p,{children:"Transaction hash, or Txhash, is the unique identifier of a transaction in a blockchain that acts as a record or proof that the transaction has taken place. To get a transaction hash in CKB, the transaction is serialized via Molecule, then the serialized raw is feed to ckbhash function. Its schema is:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"table Transaction {\n raw: RawTransaction,\n witnesses: BytesVec,\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Transaction hash is generated by the serialized ",(0,i.jsx)(n.code,{children:"raw"})," structure through ",(0,i.jsx)(n.a,{href:"#ckbhash",children:"ckbhash"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-188",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-witness-hash",children:"Transaction Witness Hash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#molecule",children:"Molecule"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0027-block-structure/0027-block-structure.md#transaction-hash",children:"Transaction Hash in RFC on Nervos Network Github"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-witness-hash",children:"Transaction Witness Hash"}),"\n",(0,i.jsxs)(n.p,{children:["Transaction witness hash is generated by the serialized transaction through ckbhash. Transaction is serialized via ",(0,i.jsx)(n.a,{href:"#molecule",children:"molecule"})," in CKB. Its schema is:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"table Transaction {\n raw: RawTransaction,\n witnesses: BytesVec,\n}\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-189",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-hash",children:"Transaction Hash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#molecule",children:"Molecule"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-root",children:"Transaction Root"}),"\n",(0,i.jsxs)(n.p,{children:["The field ",(0,i.jsx)(n.code,{children:"transactions_root"})," in header is"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckbhash(T || W)\n"})}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ckbhash"})," is the hash function, ",(0,i.jsx)(n.code,{children:"||"})," denotes binary concatenation."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["T is the root of a ",(0,i.jsx)(n.a,{href:"#ckb-merkle-tree",children:"CKB Merkle Tree"}),", which items are the ",(0,i.jsx)(n.a,{href:"#transaction-hash",children:"transaction hashes"})," of all the transactions in the block."]}),"\n",(0,i.jsxs)(n.p,{children:["W is also the root of a ",(0,i.jsx)(n.a,{href:"#ckb-merkle-tree",children:"CKB Merkle Tree"}),", but the items are the ",(0,i.jsx)(n.a,{href:"#transaction-witness-hash",children:"Transaction Witness Hash"})," of all the transactions in the block."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-190",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb-merkle-tree",children:"CKB Merkle Tree"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-witness-hash",children:"Transaction Witness Hash"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tx_proposal_window",children:(0,i.jsx)(n.code,{children:"tx_proposal_window"})}),"\n",(0,i.jsx)(n.p,{children:"Interval for submitting proposals in the second stage specified by NC-Max. Set between 2 and 10 blocks in CKB."}),"\n",(0,i.jsx)("img",{src:(0,r.A)("img/tx-proposal-window.png")}),"\n",(0,i.jsx)(n.p,{children:"As shown above, when a transaction is first proposed in Block 13, it can be committed in the window between Block 15 and Block 23."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const TX_PROPOSAL_WINDOW: ProposalWindow = ProposalWindow(2, 10);\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tx_version",children:(0,i.jsx)(n.code,{children:"tx_version"})}),"\n",(0,i.jsx)(n.p,{children:"The version of a transaction. This field is set to 0 and is reserved for the system."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub const TX_VERSION: Version = 0;\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"type_id",children:(0,i.jsx)(n.code,{children:"type_id"})}),"\n",(0,i.jsxs)(n.p,{children:["One of the CKB ",(0,i.jsx)(n.code,{children:"system_scripts"}),". A unique feature of Type ID is that it\u2018s a CKB built-in script directly implemented in Rust. It doesn't run in CKB-VM but can be used in the same way as other ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#type-id",children:"CKB genesis scripts"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For a deeper understanding of Type ID, check out this blog post: ",(0,i.jsx)(n.a,{href:"https://xuejie.space/2020_02_03_introduction_to_ckb_script_programming_type_id/",children:"Introduction to CKB Script Programming 6: Type ID"})," (also translated into ",(0,i.jsx)(n.a,{href:"https://talk.nervos.org/t/ckb-type-id/4258",children:"Chinese"}),")."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-191",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"type_id_code_hash",children:(0,i.jsx)(n.code,{children:"type_id_code_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"code_hash"})," of ",(0,i.jsx)(n.code,{children:"type_id"}),". In view of the specificity of ",(0,i.jsx)(n.code,{children:"type_id"}),", ",(0,i.jsx)(n.code,{children:"type_id_code_hash"})," is hard-coded, not the hash of the actual code."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-192",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type_id",children:(0,i.jsx)(n.code,{children:"type_id"})})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"type-script",children:"Type Script"}),"\n",(0,i.jsx)(n.p,{children:"A script that enforces the rules that must be followed in a transaction for a Cell to be consumed as an input or for a Cell to be created as an output."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-193",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script-hash",children:"Type Script Hash"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"type-script-hash",children:"Type Script Hash"}),"\n",(0,i.jsxs)(n.p,{children:["Or ",(0,i.jsx)(n.code,{children:"type_hash"}),", a Blake2b hash of a Type Script which is used as an identifier for the Script when referenced by a Cell."]}),"\n",(0,i.jsxs)(n.p,{children:["The two entities in the data structure of CKB\u2019s Cell are ",(0,i.jsx)(n.code,{children:"lock"})," and ",(0,i.jsx)(n.code,{children:"type"}),". Type scripts can capture any validation logic needed in the Offtransformation."]}),"\n",(0,i.jsx)(n.p,{children:"Type scripts can implement economic constructs as well. NervosDAO is completely implemented as a type script with minimal support from the consensus layer."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-194",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb-system-scripts/blob/66d7da8ec72dffaa7e9c55904833951eca2422a9/c/dao.c",children:"NervosDAO"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"uncle",children:"Uncle"}),"\n",(0,i.jsx)(n.p,{children:"Or Uncle Block. Uncle blocks are created when two blocks are mined and submitted to the ledger at roughly the same time. Only one can enter the ledger as an included block, and the other does not."}),"\n",(0,i.jsx)(n.p,{children:"Uncles are paid a reduced block reward when they are found and reported."}),"\n",(0,i.jsx)(n.p,{children:"On Nervos, Uncles are tracked by consensus to adjust the block interval of the network."}),"\n",(0,i.jsx)(n.p,{children:"An uncle block has to meet the following conditions:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"An uncle should not be on the main chain; in other words, it should not be an uncle if it includes any block from the main chain."}),"\n",(0,i.jsx)(n.li,{children:"Uncle\u2019s block number must be smaller than the block\u2018s number that later includes it."}),"\n",(0,i.jsx)(n.li,{children:"Uncle\u2018s parent must be on the main chain, or uncle\u2019s parent must also be an uncle. In other words, uncle must be linkable to the main chain in any way. It can never be a random block that is not on the main chain."}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"- if !snapshot.is_main_chain(&uncle.hash()) // It should not be on the main chain.\n- && !snapshot.is_uncle(&uncle.hash()) // It should not be an uncle twice. \n- && uncle.number() < candidate_number // The block number of the uncle should be smaller than that of any block on the main chain. \n- && (uncles.iter().any(|u| u.hash() == parent_hash) \n|| snapshot.is_main_chain(&parent_hash) // Uncle block should not be parentless. The parent of un uncle must be a block on the main chain or another uncle. \n|| snapshot.is_uncle(&parent_hash))\n"})}),"\n",(0,i.jsx)("img",{src:(0,r.A)("img/uncle_rule.png")}),"\n",(0,i.jsx)(n.p,{children:"As illustrated above, A is the main chain. B3 can be the uncle of A4 (to be included in A4), since B3 is linked to A2. However, B4 cannot be included in A4, since the uncle\u2019s block number must be smaller than A4, the current block on the main chain."}),"\n",(0,i.jsx)(n.p,{children:"Similarly, B4 can be the uncle of A5 (be included by A5). Although B4\u2018s parent, B3, is not on the main chain, B3 is the uncle of A4. For this reason, B4 is a legal uncle, and B3 cannot be included by A5."}),"\n",(0,i.jsx)(n.p,{children:"C2 and C3 cannot be linked to the main chain as their parent is unknown, therefore, they cannot be uncles."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-195",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#max_uncles_num",children:(0,i.jsx)(n.code,{children:"max_uncles_num"})})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-49",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-196",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-interval",children:"Block Interval"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"uncle-rate",children:"Uncle Rate"}),"\n",(0,i.jsx)(n.h4,{id:"see-also-197",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"validator",children:"Validator"}),"\n",(0,i.jsx)(n.p,{children:"A script that is used to ensure that the transactions created by the generators are valid. Validators are scripts that run in CKB-VM as either lock scripts or type scripts."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-198",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb-vm",children:"CKB-VM"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"witness",children:"Witness"}),"\n",(0,i.jsx)(n.p,{children:"A set of cryptographic proof containing the data required to prove authorization of the resources used in the transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-199",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"xudt",children:"XUDT"}),"\n",(0,i.jsx)(n.p,{children:"An extended UDT standard upon sUDT (Simple UDT) to accommodate additional functionalities, including regulatory compliance. Also written as Extensible UDT."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-200",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#simple-udt",children:"Simple UDT"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"zk-snark",children:"Zk-SNARK"}),"\n",(0,i.jsx)(n.p,{children:"A form of cryptographic proof, that when used in cryptocurrencies, allows for privacy features which do not reveal the amounts or participants in transactions."}),"\n",(0,i.jsx)(n.p,{children:"Zk-SNARKs require a trusted setup, but are otherwise trustless."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-201",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#zk-stark",children:"Zk-STARK"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Non-interactive_zero-knowledge_proof",children:"Non-interactive zero-knowledge proofs on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"zk-stark",children:"Zk-STARK"}),"\n",(0,i.jsx)(n.p,{children:"A form of cryptographic proof, that when used in cryptocurrencies, allows for privacy features which do not reveal the amounts or participants in transactions."}),"\n",(0,i.jsx)(n.p,{children:"Unlike Zk-SNARKs, Zk-STARKs do not require a trusted setup."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-202",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#zk-snark",children:"Zk-SNARK"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Non-interactive_zero-knowledge_proof",children:"Non-interactive zero-knowledge proofs on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{})]})}function x(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var i=s(6540);const l={},r=i.createContext(l);function o(e){const n=i.useContext(r);return i.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(l):e.components||l:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[743],{4990:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>a,default:()=>x,frontMatter:()=>o,metadata:()=>c,toc:()=>t});var i=s(4848),l=s(8453),r=s(8180);s(4783);const o={id:"glossary",title:"Glossary",sidebar_position:7},a=void 0,c={id:"concepts/glossary",title:"Glossary",description:"Glossary Sections",source:"@site/docs/concepts/glossary.md",sourceDirName:"concepts",slug:"/concepts/glossary",permalink:"/docs/concepts/glossary",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/glossary.md",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:7,frontMatter:{id:"glossary",title:"Glossary",sidebar_position:7},sidebar:"tutorial",previous:{title:"Tokenomics",permalink:"/docs/concepts/economics"},next:{title:"Ecosystem",permalink:"/docs/ecosystem"}},h={},t=[{value:"Glossary Sections",id:"glossary-sections",level:2},{value:"General Glossary",id:"general-glossary",level:2},{value:"Account",id:"account",level:3},{value:"Address",id:"address",level:3},{value:"Synonyms",id:"synonyms",level:4},{value:"Asset",id:"asset",level:3},{value:"Synonyms",id:"synonyms-1",level:4},{value:"Block",id:"block",level:3},{value:"See Also",id:"see-also",level:4},{value:"Block Height",id:"block-height",level:3},{value:"Synonyms",id:"synonyms-2",level:4},{value:"See Also",id:"see-also-1",level:4},{value:"Block Interval",id:"block-interval",level:3},{value:"Synonyms",id:"synonyms-3",level:4},{value:"See Also",id:"see-also-2",level:4},{value:"Block Propagation",id:"block-propagation",level:3},{value:"Synonyms",id:"synonyms-4",level:4},{value:"See Also",id:"see-also-3",level:4},{value:"Block Reward",id:"block-reward",level:3},{value:"See Also",id:"see-also-4",level:4},{value:"Block Time",id:"block-time",level:3},{value:"Synonyms",id:"synonyms-5",level:4},{value:"Blockchain",id:"blockchain",level:3},{value:"See Also",id:"see-also-5",level:4},{value:"BLS Signature",id:"bls-signature",level:3},{value:"See Also",id:"see-also-6",level:4},{value:"Broadcast",id:"broadcast",level:3},{value:"See Also",id:"see-also-7",level:4},{value:"Capacity",id:"capacity",level:3},{value:"Synonyms",id:"synonyms-6",level:4},{value:"See Also",id:"see-also-8",level:4},{value:"Cell",id:"cell",level:3},{value:"Synonyms",id:"synonyms-7",level:4},{value:"See Also",id:"see-also-9",level:4},{value:"Cell Model",id:"cell-model",level:3},{value:"See Also",id:"see-also-10",level:4},{value:"Censorship Resistance",id:"censorship-resistance",level:3},{value:"Chain",id:"chain",level:3},{value:"Synonyms",id:"synonyms-8",level:4},{value:"CKB",id:"ckb",level:3},{value:"Synonyms",id:"synonyms-9",level:4},{value:"CKByte",id:"ckbyte",level:3},{value:"Synonyms",id:"synonyms-10",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with",level:4},{value:"CKB-VM",id:"ckb-vm",level:3},{value:"See Also",id:"see-also-11",level:4},{value:"Code Hash",id:"code-hash",level:3},{value:"See Also",id:"see-also-12",level:4},{value:"Cold Storage",id:"cold-storage",level:3},{value:"See Also",id:"see-also-13",level:4},{value:"Cold Wallet",id:"cold-wallet",level:3},{value:"See Also",id:"see-also-14",level:4},{value:"Commit",id:"commit",level:3},{value:"Commit-Chain",id:"commit-chain",level:3},{value:"Commit Reward",id:"commit-reward",level:3},{value:"Common Knowledge Base",id:"common-knowledge-base",level:3},{value:"Synonyms",id:"synonyms-11",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-1",level:4},{value:"See Also",id:"see-also-15",level:4},{value:"Common Knowledge Byte",id:"common-knowledge-byte",level:3},{value:"Synonyms",id:"synonyms-12",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-2",level:4},{value:"See Also",id:"see-also-16",level:4},{value:"Confirmation",id:"confirmation",level:3},{value:"See Also",id:"see-also-17",level:4},{value:"Consensus",id:"consensus",level:3},{value:"See Also",id:"see-also-18",level:4},{value:"Consume",id:"consume",level:3},{value:"Contract Account",id:"contract-account",level:3},{value:"See Also",id:"see-also-19",level:4},{value:"Cryptocurrency",id:"cryptocurrency",level:3},{value:"See Also",id:"see-also-20",level:4},{value:"Cryptographic Signature",id:"cryptographic-signature",level:3},{value:"Synonyms",id:"synonyms-13",level:4},{value:"Cryptography",id:"cryptography",level:3},{value:"See Also",id:"see-also-21",level:4},{value:"Cycles",id:"cycles",level:3},{value:"See Also",id:"see-also-22",level:4},{value:"DAO",id:"dao",level:3},{value:"See Also",id:"see-also-23",level:4},{value:"DApp",id:"dapp",level:3},{value:"Data",id:"data",level:3},{value:"See Also",id:"see-also-24",level:4},{value:"Decentralization",id:"decentralization",level:3},{value:"See Also",id:"see-also-25",level:4},{value:"DeFi",id:"defi",level:3},{value:"Digital Asset",id:"digital-asset",level:3},{value:"Synonyms",id:"synonyms-14",level:4},{value:"Digital Currency",id:"digital-currency",level:3},{value:"See Also",id:"see-also-26",level:4},{value:"Distributed",id:"distributed",level:3},{value:"See Also",id:"see-also-27",level:4},{value:"Digital Object (DOB)",id:"digital-object-dob",level:3},{value:"See Also",id:"see-also-28",level:4},{value:"Double-Spending",id:"double-spending",level:3},{value:"See Also",id:"see-also-29",level:4},{value:"Epoch",id:"epoch",level:3},{value:"See Also",id:"see-also-30",level:4},{value:"Fee",id:"fee",level:3},{value:"See Also",id:"see-also-31",level:4},{value:"Fee Rate",id:"fee-rate",level:3},{value:"See Also",id:"see-also-32",level:4},{value:"First-Class Assets",id:"first-class-assets",level:3},{value:"See Also",id:"see-also-33",level:4},{value:"Fork",id:"fork",level:3},{value:"Full Node",id:"full-node",level:3},{value:"See Also",id:"see-also-34",level:4},{value:"Full Payload Format",id:"full-payload-format",level:3},{value:"See Also",id:"see-also-35",level:4},{value:"Fungible Token",id:"fungible-token",level:3},{value:"See Also",id:"see-also-36",level:4},{value:"Gas Limit",id:"gas-limit",level:3},{value:"See Also",id:"see-also-37",level:4},{value:"Hard-Fork",id:"hard-fork",level:3},{value:"Hardware Wallet",id:"hardware-wallet",level:3},{value:"See Also",id:"see-also-38",level:4},{value:"Hash",id:"hash",level:3},{value:"Hash Rate",id:"hash-rate",level:3},{value:"See Also",id:"see-also-39",level:4},{value:"Height",id:"height",level:3},{value:"Synonyms",id:"synonyms-15",level:4},{value:"Light Client",id:"light-client",level:3},{value:"Light Node",id:"light-node",level:3},{value:"See Also",id:"see-also-40",level:4},{value:"Mempool",id:"mempool",level:3},{value:"See Also",id:"see-also-41",level:4},{value:"Metadata",id:"metadata",level:3},{value:"See Also",id:"see-also-42",level:4},{value:"Micro-State",id:"micro-state",level:3},{value:"Synonyms",id:"synonyms-16",level:4},{value:"See Also",id:"see-also-43",level:4},{value:"Miner",id:"miner",level:3},{value:"See Also",id:"see-also-44",level:4},{value:"Miner Fee",id:"miner-fee",level:3},{value:"Synonyms",id:"synonyms-17",level:4},{value:"Mining",id:"mining",level:3},{value:"See Also",id:"see-also-45",level:4},{value:"Mining Node",id:"mining-node",level:3},{value:"See Also",id:"see-also-46",level:4},{value:"Mining Reward",id:"mining-reward",level:3},{value:"See Also",id:"see-also-47",level:4},{value:"Multisig",id:"multisig",level:3},{value:"Native Token",id:"native-token",level:3},{value:"See Also",id:"see-also-48",level:4},{value:"NC-MAX",id:"nc-max",level:3},{value:"See Also",id:"see-also-49",level:4},{value:"Neighbor",id:"neighbor",level:3},{value:"See Also",id:"see-also-50",level:4},{value:"Nervos Blockchain",id:"nervos-blockchain",level:3},{value:"Synonyms",id:"synonyms-18",level:4},{value:"Nervos DAO",id:"nervos-dao",level:3},{value:"See Also",id:"see-also-51",level:4},{value:"Network Hash Rate",id:"network-hash-rate",level:3},{value:"See Also",id:"see-also-52",level:4},{value:"Node",id:"node",level:3},{value:"See Also",id:"see-also-53",level:4},{value:"Nonce",id:"nonce",level:3},{value:"See Also",id:"see-also-54",level:4},{value:"Non-Fungible Token",id:"non-fungible-token",level:3},{value:"See Also",id:"see-also-55",level:4},{value:"Open Source",id:"open-source",level:3},{value:"See Also",id:"see-also-56",level:4},{value:"P2P",id:"p2p",level:3},{value:"Synonyms",id:"synonyms-19",level:4},{value:"Paper Wallet",id:"paper-wallet",level:3},{value:"See Also",id:"see-also-57",level:4},{value:"Payment Address",id:"payment-address",level:3},{value:"Synonyms",id:"synonyms-20",level:4},{value:"Payment Channel",id:"payment-channel",level:3},{value:"See Also",id:"see-also-58",level:4},{value:"Peer to Peer",id:"peer-to-peer",level:3},{value:"Synonyms",id:"synonyms-21",level:4},{value:"See Also",id:"see-also-59",level:4},{value:"Private Key",id:"private-key",level:3},{value:"See Also",id:"see-also-60",level:4},{value:"Proof of Work",id:"proof-of-work",level:3},{value:"See Also",id:"see-also-61",level:4},{value:"Proof of Stake",id:"proof-of-stake",level:3},{value:"See Also",id:"see-also-62",level:4},{value:"Propagation",id:"propagation",level:3},{value:"Synonyms",id:"synonyms-22",level:4},{value:"Public Key",id:"public-key",level:3},{value:"See Also",id:"see-also-63",level:4},{value:"Reward",id:"reward",level:3},{value:"See Also",id:"see-also-64",level:4},{value:"Signature",id:"signature",level:3},{value:"Synonyms",id:"synonyms-23",level:4},{value:"Smart Contract",id:"smart-contract",level:3},{value:"State",id:"state",level:3},{value:"See Also",id:"see-also-65",level:4},{value:"State Bloat",id:"state-bloat",level:3},{value:"State Channel",id:"state-channel",level:3},{value:"Tip",id:"tip",level:3},{value:"Synonyms",id:"synonyms-24",level:4},{value:"Tip Block",id:"tip-block",level:3},{value:"Synonyms",id:"synonyms-25",level:4},{value:"See Also",id:"see-also-66",level:4},{value:"Transaction",id:"transaction",level:3},{value:"See Also",id:"see-also-67",level:4},{value:"Transaction Fee",id:"transaction-fee",level:3},{value:"Synonyms",id:"synonyms-26",level:4},{value:"See Also",id:"see-also-68",level:4},{value:"Token",id:"token",level:3},{value:"See Also",id:"see-also-69",level:4},{value:"Turing Complete",id:"turing-complete",level:3},{value:"UDT",id:"udt",level:3},{value:"Synonyms",id:"synonyms-27",level:4},{value:"Unconfirmed",id:"unconfirmed",level:3},{value:"Synonyms",id:"synonyms-28",level:4},{value:"See Also",id:"see-also-70",level:4},{value:"Unconfirmed Transaction",id:"unconfirmed-transaction",level:3},{value:"Synonyms",id:"synonyms-29",level:4},{value:"See Also",id:"see-also-71",level:4},{value:"User-Defined Token",id:"user-defined-token",level:3},{value:"Synonyms",id:"synonyms-30",level:4},{value:"See Also",id:"see-also-72",level:4},{value:"Wallet",id:"wallet",level:3},{value:"See Also",id:"see-also-73",level:4},{value:"Economics Glossary",id:"economics-glossary",level:2},{value:"Base Issuance",id:"base-issuance",level:3},{value:"See Also",id:"see-also-74",level:4},{value:"Base Reward",id:"base-reward",level:3},{value:"See Also",id:"see-also-75",level:4},{value:"Commit Reward",id:"commit-reward-1",level:3},{value:"See Also",id:"see-also-76",level:4},{value:"Economic Abstraction",id:"economic-abstraction",level:3},{value:"Fiat Currency",id:"fiat-currency",level:3},{value:"See Also",id:"see-also-77",level:4},{value:"Heavy Asset Problem",id:"heavy-asset-problem",level:3},{value:"See Also",id:"see-also-78",level:4},{value:"Liquidity",id:"liquidity",level:3},{value:"See Also",id:"see-also-79",level:4},{value:"Proposal Reward",id:"proposal-reward",level:3},{value:"See Also",id:"see-also-80",level:4},{value:"Secondary Issuance",id:"secondary-issuance",level:3},{value:"See Also",id:"see-also-81",level:4},{value:"Secondary Reward",id:"secondary-reward",level:3},{value:"See Also",id:"see-also-82",level:4},{value:"Selfish Mining Attack",id:"selfish-mining-attack",level:3},{value:"See Also",id:"see-also-83",level:4},{value:"Starving Layer 1 Problem",id:"starving-layer-1-problem",level:3},{value:"See Also",id:"see-also-84",level:4},{value:"State Rent",id:"state-rent",level:3},{value:"See Also",id:"see-also-85",level:4},{value:"Store of Assets",id:"store-of-assets",level:3},{value:"See Also",id:"see-also-86",level:4},{value:"Store of Value",id:"store-of-value",level:3},{value:"See Also",id:"see-also-87",level:4},{value:"Tail Emission",id:"tail-emission",level:3},{value:"See Also",id:"see-also-88",level:4},{value:"Targeted Inflation",id:"targeted-inflation",level:3},{value:"See Also",id:"see-also-89",level:4},{value:"Tragedy of the Commons",id:"tragedy-of-the-commons",level:3},{value:"See Also",id:"see-also-90",level:4},{value:"Tragedy of the Security Commons",id:"tragedy-of-the-security-commons",level:3},{value:"See Also",id:"see-also-91",level:4},{value:"Tragedy of the Storage Commons",id:"tragedy-of-the-storage-commons",level:3},{value:"See Also",id:"see-also-92",level:4},{value:"Technical Glossary",id:"technical-glossary",level:2},{value:"Active Cell",id:"active-cell",level:3},{value:"Synonyms",id:"synonyms-31",level:4},{value:"See Also",id:"see-also-93",level:4},{value:"Aggron",id:"aggron",level:3},{value:"Synonyms",id:"synonyms-32",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-3",level:4},{value:"Animagus",id:"animagus",level:3},{value:"See Also",id:"see-also-94",level:4},{value:"Args",id:"args",level:3},{value:"See Also",id:"see-also-95",level:4},{value:"Axon",id:"axon",level:3},{value:"See Also",id:"see-also-96",level:4},{value:"Blake2b",id:"blake2b",level:3},{value:"See Also",id:"see-also-97",level:4},{value:"Block Subsidy",id:"block-subsidy",level:3},{value:"Synonyms",id:"synonyms-33",level:4},{value:"Boxer",id:"boxer",level:3},{value:"See Also",id:"see-also-98",level:4},{value:"block_version",id:"block_version",level:3},{value:"See Also",id:"see-also-99",level:4},{value:"Cell Collection",id:"cell-collection",level:3},{value:"See Also",id:"see-also-100",level:4},{value:"Cellbase",id:"cellbase",level:3},{value:"See Also",id:"see-also-101",level:4},{value:"cellbase_maturity",id:"cellbase_maturity",level:3},{value:"See Also",id:"see-also-102",level:4},{value:"cell_deps",id:"cell_deps",level:3},{value:"See Also",id:"see-also-103",level:4},{value:"Ckbhash",id:"ckbhash",level:3},{value:"See Also",id:"see-also-104",level:4},{value:"CKB Merkle Tree",id:"ckb-merkle-tree",level:3},{value:"See Also",id:"see-also-105",level:4},{value:"Code Hash",id:"code-hash-1",level:3},{value:"See Also",id:"see-also-106",level:4},{value:"Commit",id:"commit-1",level:3},{value:"See Also",id:"see-also-107",level:4},{value:"Commitment Zone",id:"commitment-zone",level:3},{value:"See Also",id:"see-also-108",level:4},{value:"Consume",id:"consume-1",level:3},{value:"See Also",id:"see-also-109",level:4},{value:"Crypto Primitives",id:"crypto-primitives",level:3},{value:"See Also",id:"see-also-110",level:4},{value:"dao_type_hash",id:"dao_type_hash",level:3},{value:"See Also",id:"see-also-111",level:4},{value:"Data",id:"data-1",level:3},{value:"See Also",id:"see-also-112",level:4},{value:"Dead Cell",id:"dead-cell",level:3},{value:"Synonyms",id:"synonyms-34",level:4},{value:"See Also",id:"see-also-113",level:4},{value:"Dep Group",id:"dep-group",level:3},{value:"See Also",id:"see-also-114",level:4},{value:"Dep Type",id:"dep-type",level:3},{value:"See Also",id:"see-also-115",level:4},{value:"Deps",id:"deps",level:3},{value:"Synonyms",id:"synonyms-35",level:4},{value:"Dependencies",id:"dependencies",level:3},{value:"Synonyms",id:"synonyms-36",level:4},{value:"See Also",id:"see-also-116",level:4},{value:"Duktape",id:"duktape",level:3},{value:"See Also",id:"see-also-117",level:4},{value:"Difficulty",id:"difficulty",level:3},{value:"See Also",id:"see-also-118",level:4},{value:"Diviner",id:"diviner",level:3},{value:"See Also",id:"see-also-119",level:4},{value:"Eaglesong",id:"eaglesong",level:3},{value:"See Also",id:"see-also-120",level:4},{value:"epoch_duration_target",id:"epoch_duration_target",level:3},{value:"See Also",id:"see-also-121",level:4},{value:"ERC20",id:"erc20",level:3},{value:"See Also",id:"see-also-122",level:4},{value:"ERC721",id:"erc721",level:3},{value:"See Also",id:"see-also-123",level:4},{value:"ERC777",id:"erc777",level:3},{value:"See Also",id:"see-also-124",level:4},{value:"ERC1155",id:"erc1155",level:3},{value:"See Also",id:"see-also-125",level:4},{value:"Full Address",id:"full-address",level:3},{value:"See Also",id:"see-also-126",level:4},{value:"Generator",id:"generator",level:3},{value:"Genesis Block",id:"genesis-block",level:3},{value:"See Also",id:"see-also-127",level:4},{value:"genesis_hash",id:"genesis_hash",level:3},{value:"See Also",id:"see-also-128",level:4},{value:"Godwoken",id:"godwoken",level:3},{value:"See Also",id:"see-also-129",level:4},{value:"Governance Script",id:"governance-script",level:3},{value:"See Also",id:"see-also-130",level:4},{value:"Governance Script Hash",id:"governance-script-hash",level:3},{value:"Synonyms",id:"synonyms-37",level:4},{value:"See Also",id:"see-also-131",level:4},{value:"Historical Cell",id:"historical-cell",level:3},{value:"Synonyms",id:"synonyms-38",level:4},{value:"See Also",id:"see-also-132",level:4},{value:"Inbound Connection",id:"inbound-connection",level:3},{value:"See Also",id:"see-also-133",level:4},{value:"Indexer",id:"indexer",level:3},{value:"See Also",id:"see-also-134",level:4},{value:"initial_primary_epoch_reward",id:"initial_primary_epoch_reward",level:3},{value:"See Also",id:"see-also-135",level:4},{value:"Input",id:"input",level:3},{value:"See Also",id:"see-also-136",level:4},{value:"Keyper",id:"keyper",level:3},{value:"See Also",id:"see-also-137",level:4},{value:"Late Spawning",id:"late-spawning",level:3},{value:"See Also",id:"see-also-138",level:4},{value:"Layer 1",id:"layer-1",level:3},{value:"See Also",id:"see-also-139",level:4},{value:"Layer 2",id:"layer-2",level:3},{value:"See Also",id:"see-also-140",level:4},{value:"Lina",id:"lina",level:3},{value:"Synonyms",id:"synonyms-39",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-4",level:4},{value:"See Also",id:"see-also-141",level:4},{value:"Live Cell",id:"live-cell",level:3},{value:"Synonyms",id:"synonyms-40",level:4},{value:"See Also",id:"see-also-142",level:4},{value:"Lock",id:"lock",level:3},{value:"See Also",id:"see-also-143",level:4},{value:"Lock Script",id:"lock-script",level:3},{value:"See Also",id:"see-also-144",level:4},{value:"Lock Script Hash",id:"lock-script-hash",level:3},{value:"See Also",id:"see-also-145",level:4},{value:"Mainnet",id:"mainnet",level:3},{value:"Synonyms",id:"synonyms-41",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-5",level:4},{value:"max_block_bytes",id:"max_block_bytes",level:3},{value:"max_block_cycles",id:"max_block_cycles",level:3},{value:"See Also",id:"see-also-146",level:4},{value:"max_block_proposals_limit",id:"max_block_proposals_limit",level:3},{value:"See Also",id:"see-also-147",level:4},{value:"max_uncles_num",id:"max_uncles_num",level:3},{value:"See Also",id:"see-also-148",level:4},{value:"median_time_block_count",id:"median_time_block_count",level:3},{value:"Minting",id:"minting",level:3},{value:"See Also",id:"see-also-149",level:4},{value:"Molecule",id:"molecule",level:3},{value:"See Also",id:"see-also-150",level:4},{value:"Muta",id:"muta",level:3},{value:"See Also",id:"see-also-151",level:4},{value:"Nervos CKB",id:"nervos-ckb",level:3},{value:"Synonyms",id:"synonyms-42",level:4},{value:"See Also",id:"see-also-152",level:4},{value:"Off-Chain Computation",id:"off-chain-computation",level:3},{value:"See Also",id:"see-also-153",level:4},{value:"Off-Chain Scaling",id:"off-chain-scaling",level:3},{value:"See Also",id:"see-also-154",level:4},{value:"Off-Chain State",id:"off-chain-state",level:3},{value:"See Also",id:"see-also-155",level:4},{value:"On-Chain Computation",id:"on-chain-computation",level:3},{value:"See Also",id:"see-also-156",level:4},{value:"On-Chain Scaling",id:"on-chain-scaling",level:3},{value:"See Also",id:"see-also-157",level:4},{value:"On-Chain State",id:"on-chain-state",level:3},{value:"See Also",id:"see-also-158",level:4},{value:"On-Chain Verification",id:"on-chain-verification",level:3},{value:"See Also",id:"see-also-159",level:4},{value:"Open Transaction",id:"open-transaction",level:3},{value:"See Also",id:"see-also-160",level:4},{value:"Optimistic Rollup",id:"optimistic-rollup",level:3},{value:"See Also",id:"see-also-161",level:4},{value:"Orphan",id:"orphan",level:3},{value:"Synonyms",id:"synonyms-43",level:4},{value:"Orphan Block",id:"orphan-block",level:3},{value:"Synonyms",id:"synonyms-44",level:4},{value:"See Also",id:"see-also-162",level:4},{value:"Orphan Rate",id:"orphan-rate",level:3},{value:"See Also",id:"see-also-163",level:4},{value:"orphan_rate_target",id:"orphan_rate_target",level:3},{value:"See Also",id:"see-also-164",level:4},{value:"Orphan Transactions",id:"orphan-transactions",level:3},{value:"See Also",id:"see-also-165",level:4},{value:"Outbound Connection",id:"outbound-connection",level:3},{value:"See Also",id:"see-also-166",level:4},{value:"Outpoint",id:"outpoint",level:3},{value:"See Also",id:"see-also-167",level:4},{value:"Output",id:"output",level:3},{value:"See Also",id:"see-also-168",level:4},{value:"Overlord",id:"overlord",level:3},{value:"See Also",id:"see-also-169",level:4},{value:"P2WSH",id:"p2wsh",level:3},{value:"permanent_difficulty_in_dummy",id:"permanent_difficulty_in_dummy",level:3},{value:"See Also",id:"see-also-170",level:4},{value:"Polyjuice",id:"polyjuice",level:3},{value:"See Also",id:"see-also-171",level:4},{value:"primary_epoch_reward_halving_interval",id:"primary_epoch_reward_halving_interval",level:3},{value:"See Also",id:"see-also-172",level:4},{value:"Proposal Zone",id:"proposal-zone",level:3},{value:"See Also",id:"see-also-173",level:4},{value:"Propose",id:"propose",level:3},{value:"See Also",id:"see-also-174",level:4},{value:"proposer_reward_ratio",id:"proposer_reward_ratio",level:3},{value:"See Also",id:"see-also-175",level:4},{value:"RISC-V",id:"risc-v",level:3},{value:"See Also",id:"see-also-176",level:4},{value:"Schnorr Signature",id:"schnorr-signature",level:3},{value:"See Also",id:"see-also-177",level:4},{value:"Script",id:"script",level:3},{value:"See Also",id:"see-also-178",level:4},{value:"secondary_epoch_reward",id:"secondary_epoch_reward",level:3},{value:"See also",id:"see-also-179",level:4},{value:"secp256k1_blake160_sighash_all_type_hash",id:"secp256k1_blake160_sighash_all_type_hash",level:3},{value:"secp256k1_blake160_multisig_all_type_hash",id:"secp256k1_blake160_multisig_all_type_hash",level:3},{value:"Seed Cell",id:"seed-cell",level:3},{value:"See Also",id:"see-also-180",level:4},{value:"Shannon",id:"shannon",level:3},{value:"See Also",id:"see-also-181",level:4},{value:"Short Address",id:"short-address",level:3},{value:"Synonyms",id:"synonyms-45",level:4},{value:"See Also",id:"see-also-182",level:4},{value:"Simple UDT",id:"simple-udt",level:3},{value:"Synonyms",id:"synonyms-46",level:4},{value:"See Also",id:"see-also-183",level:4},{value:"Since",id:"since",level:3},{value:"See Also",id:"see-also-184",level:4},{value:"SPV",id:"spv",level:3},{value:"See Also",id:"see-also-185",level:4},{value:"SPV Wallet",id:"spv-wallet",level:3},{value:"See Also",id:"see-also-186",level:4},{value:"SUDT",id:"sudt",level:3},{value:"Synonyms",id:"synonyms-47",level:4},{value:"Testnet",id:"testnet",level:3},{value:"Synonyms",id:"synonyms-48",level:4},{value:"Not To Be Confused With",id:"not-to-be-confused-with-6",level:4},{value:"Transaction Confirmation Number",id:"transaction-confirmation-number",level:3},{value:"See Also",id:"see-also-187",level:4},{value:"Transaction Hash",id:"transaction-hash",level:3},{value:"See Also",id:"see-also-188",level:4},{value:"Transaction Witness Hash",id:"transaction-witness-hash",level:3},{value:"See Also",id:"see-also-189",level:4},{value:"Transaction Root",id:"transaction-root",level:3},{value:"See Also",id:"see-also-190",level:4},{value:"tx_proposal_window",id:"tx_proposal_window",level:3},{value:"tx_version",id:"tx_version",level:3},{value:"type_id",id:"type_id",level:3},{value:"See Also",id:"see-also-191",level:4},{value:"type_id_code_hash",id:"type_id_code_hash",level:3},{value:"See Also",id:"see-also-192",level:4},{value:"Type Script",id:"type-script",level:3},{value:"See Also",id:"see-also-193",level:4},{value:"Type Script Hash",id:"type-script-hash",level:3},{value:"See Also",id:"see-also-194",level:4},{value:"Uncle",id:"uncle",level:3},{value:"See Also",id:"see-also-195",level:4},{value:"Synonyms",id:"synonyms-49",level:4},{value:"See Also",id:"see-also-196",level:4},{value:"Uncle Rate",id:"uncle-rate",level:3},{value:"See Also",id:"see-also-197",level:4},{value:"Validator",id:"validator",level:3},{value:"See Also",id:"see-also-198",level:4},{value:"Witness",id:"witness",level:3},{value:"See Also",id:"see-also-199",level:4},{value:"XUDT",id:"xudt",level:3},{value:"See Also",id:"see-also-200",level:4},{value:"Zk-SNARK",id:"zk-snark",level:3},{value:"See Also",id:"see-also-201",level:4},{value:"Zk-STARK",id:"zk-stark",level:3},{value:"See Also",id:"see-also-202",level:4}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"glossary-sections",children:"Glossary Sections"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#general-glossary",children:"General Glossary"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#economics-glossary",children:"Economics Glossary"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#technical-glossary",children:"Technical Glossary"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"general-glossary",children:"General Glossary"}),"\n",(0,i.jsx)(n.h3,{id:"account",children:"Account"}),"\n",(0,i.jsx)(n.p,{children:"A kind of basic object in distributed ledger used to keep the balance and other information of users."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"address",children:"Address"}),"\n",(0,i.jsx)(n.p,{children:"A label consists of string of letters and numbers that anonymously represents user's identity on chain. Crypto assets can be sent to and/or from addresses."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#payment-address",children:"Payment Address"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"asset",children:"Asset"}),"\n",(0,i.jsx)(n.p,{children:"A piece of data that has value or that represents an entity having value."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-1",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-asset",children:"Digital Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block",children:"Block"}),"\n",(0,i.jsx)(n.p,{children:"A grouping of transactions, marked with a timestamp, and a fingerprint of the previous block. The block header is hashed to produce a proof of work, thereby validating the transactions. Valid blocks are added to the main blockchain by network consensus."}),"\n",(0,i.jsx)(n.h4,{id:"see-also",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-height",children:"Block Height"}),"\n",(0,i.jsx)(n.p,{children:"Block height is the total number of blocks that have been confirmed on the blockchain, also used to identify a unique block when specifying a particular block height, as there is always an exact block at any block height."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-2",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#height",children:"Height"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-1",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-interval",children:"Block Interval"}),"\n",(0,i.jsxs)(n.p,{children:["Also known as ",(0,i.jsx)(n.a,{href:"#block-time",children:"Block Time"}),". Block interval is the length of time it takes to create a new block in a cryptocurrency blockchain. Block interval is the measure of the time it takes the miners or validators within a network to verify transactions within one block and produce a new block in that blockchain. The block interval is variable on Nervos blockchain."]}),"\n",(0,i.jsx)(n.p,{children:"The block interval on the Bitcoin blockchain is approximately every 10 minutes. The block interval on Nervos is variable, but is usually under 10 seconds."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-3",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-time",children:"Block Time"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-2",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-propagation",children:"Block Propagation"}),"\n",(0,i.jsx)(n.p,{children:"The process of synchronizing a new block to the majority of full nodes in the network. Block propagation is a well-known bottleneck that prevents Bitcoin from scaling."}),"\n",(0,i.jsx)(n.p,{children:"Block propagation time is an average time that is needed for the new block to reach the majority of nodes in the network. Long block propagation delay reduces the node's resistance against 51% attacks."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-4",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#propagation",children:"Propagation"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-3",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#broadcast",children:"Broadcast"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-node",children:"Full Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-reward",children:"Block Reward"}),"\n",(0,i.jsx)(n.p,{children:"The amount of cryptocurrency credited to a miner's account after the miner successfully adds a block of transactions to the blockchain."}),"\n",(0,i.jsx)(n.p,{children:"In Nervos CKB, block rewards are the CKBytes credited to a miner's account after a block is successfully added to CKB by the miner."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-4",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-subsidy",children:"Block Subsidy"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-time",children:"Block Time"}),"\n",(0,i.jsxs)(n.p,{children:["Alternatively referred to as ",(0,i.jsx)(n.a,{href:"#block-interval",children:"Block Interval"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-5",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-interval",children:"Block Interval"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"blockchain",children:"Blockchain"}),"\n",(0,i.jsx)(n.p,{children:"A data structure maintaining a growing list of records, organized as a chain of blocks. Each block, apart from the first one, is cryptographically linked to the previous block, thus creating a chain-like structure."}),"\n",(0,i.jsx)(n.p,{children:"The cryptographic link ensures any party with the last block can verify that none of the historical data is modified after the creation of this block."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-5",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"bls-signature",children:"BLS Signature"}),"\n",(0,i.jsx)(n.p,{children:"A cryptographic signature scheme for signing and verification. BLS is short for Boneh\u2013Lynn\u2013Shacham."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-6",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Boneh%E2%80%93Lynn%E2%80%93Shacham",children:"Boneh\u2013Lynn\u2013Shacham on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"broadcast",children:"Broadcast"}),"\n",(0,i.jsx)(n.p,{children:"Blocks are sent to all nodes in a blockchain network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-7",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"capacity",children:"Capacity"}),"\n",(0,i.jsx)(n.p,{children:"The maximum space (in bytes) that a Cell can occupy on the Nervos CKB."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-6",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-8",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cell",children:"Cell"}),"\n",(0,i.jsx)(n.p,{children:"All data on Nervos CKB is stored in Cells. Cells are the primary state units in CKB, within them users can include arbitrary states."}),"\n",(0,i.jsxs)(n.p,{children:["A Cell has 4 fields: ",(0,i.jsx)(n.code,{children:"capacity"}),", ",(0,i.jsx)(n.code,{children:"data"}),", ",(0,i.jsx)(n.code,{children:"type"})," and ",(0,i.jsx)(n.code,{children:"lock"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-7",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#micro-state",children:"Micro-State"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-9",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#data",children:"Data"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock",children:"Lock"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cell-model",children:"Cell Model"}),"\n",(0,i.jsx)(n.p,{children:"A representation of how state is managed on Nervos CKB. The Cell Model is a more generic state model than either Bitcoin's UTXO or Ethereum's account model."}),"\n",(0,i.jsx)(n.p,{children:"The Cell Model is a new construction that combines many of the advantages of Ethereum's account model with the asset ownership and proof-based verification properties of Bitcoin's UTXO model."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-10",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/docs/concepts/cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/https-medium-com-nervosnetwork-cell-model-7323fca57571",children:"Cell Model on the Nervos Blog"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"censorship-resistance",children:"Censorship Resistance"}),"\n",(0,i.jsx)(n.p,{children:"Censorship resistance in blockchain generally means that it is difficult for a malicious party to prevent the blockchain from confirming a set of transactions generated by honest users."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"chain",children:"Chain"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-8",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckb",children:"CKB"}),"\n",(0,i.jsx)(n.p,{children:"An abbreviation which can have different meanings depending on the context:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Common Knowledge Base - The layer 1 blockchain of the Nervos Network."}),"\n",(0,i.jsx)(n.li,{children:"Common Knowledge Byte - The native token of the Nervos Common Knowledge Base."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-9",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckbyte",children:"CKByte"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for Common Knowledge Byte."}),"\n",(0,i.jsx)(n.p,{children:"CKByte is also sometimes shortened to CKB. Exchanges often use CKB as the ticker symbol."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-10",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckb-vm",children:"CKB-VM"}),"\n",(0,i.jsx)(n.p,{children:"CKB VM is a crypto-agnostic virtual machine, a RISC-V instruction set based VM for executing both on-chain and off-chain code."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-11",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#risc-v",children:"RISC-V"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Virtual_machine",children:"Virtual Machine on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"code-hash",children:"Code Hash"}),"\n",(0,i.jsx)(n.p,{children:"A field in a Cell which contains a hash value that can refer to a specific piece of data, or a specific Cell referenced by Type ID."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-12",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type_id",children:"Type ID"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cold-storage",children:"Cold Storage"}),"\n",(0,i.jsx)(n.p,{children:"A method of securing funds by placing them in a cold wallet; a type of wallet that is never connected to the internet."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-13",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cold-wallet",children:"Cold Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#hardware-wallet",children:"Hardware Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cold-wallet",children:"Cold Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A wallet that is used to secure assets offline. This wallet is permanently disconnected from the internet, and not vulnerable to attacks which rely on an active internet connection."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-14",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cold-storage",children:"Cold Storage"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit",children:"Commit"}),"\n",(0,i.jsxs)(n.p,{children:["Nervos CKB's consensus algorithm, ",(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})," consensus, has two phases: ",(0,i.jsx)(n.strong,{children:"propose"})," and ",(0,i.jsx)(n.strong,{children:"commit"}),". Commit is the process of including a valid proposed transaction into a new block."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit-chain",children:"Commit-Chain"}),"\n",(0,i.jsx)(n.p,{children:"A scheme that enables the off-chain processing of transactions by one or more operators with on-chain state update commitments that do not contain per-transaction data."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit-reward",children:"Commit Reward"}),"\n",(0,i.jsx)(n.p,{children:"A reward paid to miners in CKBytes on inclusion of previously proposed transactions."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"common-knowledge-base",children:"Common Knowledge Base"}),"\n",(0,i.jsx)(n.p,{children:"A layer 1 proof of work blockchain that provides a foundation of decentralized trust for the Nervos Network."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-11",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-1",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-15",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.nervos.org/ckb/",children:"Nervos CKB on Nervos.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"common-knowledge-byte",children:"Common Knowledge Byte"}),"\n",(0,i.jsx)(n.p,{children:"The native token of the Nervos layer 1 blockchain, the Common Knowledge Base."}),"\n",(0,i.jsx)(n.p,{children:"Common Knowledge Byte is often abbreviated as CKByte or CKB."}),"\n",(0,i.jsx)(n.p,{children:"Owning a CKByte entitles the holder to store one byte of data on the Nervos CKB blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-12",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-2",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-16",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#capacity",children:"Capacity"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#shannon",children:"Shannon"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"confirmation",children:"Confirmation"}),"\n",(0,i.jsx)(n.p,{children:"A process where a transaction has been accepted and verified by the network and included in a block."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-17",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#unconfirmed",children:"Unconfirmed"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"consensus",children:"Consensus"}),"\n",(0,i.jsx)(n.p,{children:"An algorithm executed among a number of distributed participants, ensuring that all participants faithfully executing this algorithm can reach agreement on some data value even if the other participants are faulty or malicious."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-18",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-MAX"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"consume",children:"Consume"}),"\n",(0,i.jsx)(n.p,{children:"The process of using a Live Cell as an input to a transaction. The consumption processes indicate that Live Cell turns into a Dead Cell."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"contract-account",children:"Contract Account"}),"\n",(0,i.jsx)(n.p,{children:"An account containing code that executes automatically whenever it receives an event from another account."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-19",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#account",children:"Account"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cryptocurrency",children:"Cryptocurrency"}),"\n",(0,i.jsx)(n.p,{children:"A cryptocurrency is a digital or virtual currency that is secured by blockchain and cryptography, which makes it nearly impossible to counterfeit or double-spend."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-20",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-currency",children:"Digital Currency"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fiat-currency",children:"Fiat Currency"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cryptographic-signature",children:"Cryptographic Signature"}),"\n",(0,i.jsx)(n.p,{children:"A concise piece of proof data. Cryptographic signature schemes are a fundamental component of cryptocurrency networks that verify the integrity and non-repudiation of transaction messages across the network."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-13",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#signature",children:"Signature"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cryptography",children:"Cryptography"}),"\n",(0,i.jsx)(n.p,{children:"Cryptography is the practice and study of techniques for secure communication in the presence of adversarial behavior."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-21",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Cryptography",children:"Cryptography at Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cycles",children:"Cycles"}),"\n",(0,i.jsx)(n.p,{children:"The number of RISC-V computational cycles required by a script to execute. It's a metric used to prevent malicious behavior such as infinite loops, that's why it is called cycles."}),"\n",(0,i.jsx)(n.p,{children:"This is a similar concept to Ethereum's Gas, we set cycles to ensure optimal performance and security. Scripts must stay within cycle limits, otherwise the block will be rejected by CKB nodes."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-22",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://nervos-ckb-docs-git-v1-cryptape.vercel.app/docs/essays/faq/#estimate-cycles",children:"Estimate cycles"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#max_block_cycles",children:"Max_block_cycles"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0014-vm-cycle-limits/0014-vm-cycle-limits.md",children:"Rules for calculating cycles in RFC on Nervos Network Github"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#risc-v",children:"RISC-V"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://ethereum.org/en/glossary/#gas",children:"Ethereum's Gas"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dao",children:"DAO"}),"\n",(0,i.jsx)(n.p,{children:"A decentralized autonomous organization (DAO) is an organization represented by rules encoded as a computer program that is transparent, controlled by the organization members and not influenced by a centralized entity, in other words they are member-owned communities without centralized leadership. A DAO's financial transaction record and program rules are maintained on a blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-23",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Decentralized_autonomous_organization",children:"DAO on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dapp",children:"DApp"}),"\n",(0,i.jsx)(n.p,{children:"Decentralized application. At a minimum, it is a smart contract and a web user interface. In a broader sense, dApps are web applications that are built on top of open, decentralized, peer-to-peer infrastructure services. Additionally, many dApps include decentralized storage and/or a message protocol and platform."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"data",children:"Data"}),"\n",(0,i.jsxs)(n.p,{children:["In Cell Model, ",(0,i.jsx)(n.code,{children:"data"})," is a field in a Cell which can store arbitrary bytes."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-24",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"decentralization",children:"Decentralization"}),"\n",(0,i.jsx)(n.p,{children:"In blockchain, decentralization refers to the transfer of control and decision-making from a centralized entity (individual, organization, or group thereof) to a distributed network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-25",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#distributed",children:"Distributed"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Decentralization",children:"Decentralization on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"defi",children:"DeFi"}),"\n",(0,i.jsx)(n.p,{children:'Short for "decentralized finance", a broad category of dApps aiming to provide financial services backed by the blockchain, without any intermediaries, so anyone with an internet connection can participate.'}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"digital-asset",children:"Digital Asset"}),"\n",(0,i.jsx)(n.p,{children:"A digital asset is an individual piece of data that has value, or represents another entity that has value."}),"\n",(0,i.jsx)(n.p,{children:"Digital assets are most commonly represented as tokens, which may be used as digital currency or represent physical items such as real estate."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-14",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#asset",children:"Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"digital-currency",children:"Digital Currency"}),"\n",(0,i.jsx)(n.p,{children:"A type of currency that primarily exists digitally over the internet. Physical representations of the currency, in the form of cards, bills, or coins, may exist, but are secondary mediums."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-26",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptocurrency",children:"Cryptocurrency"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"distributed",children:"Distributed"}),"\n",(0,i.jsx)(n.p,{children:"A system where components are spread across multiple nodes to parallelize workloads, add redundancy, or eliminate single points of failure."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-27",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#decentralization",children:"Decentralization"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"digital-object-dob",children:"Digital Object (DOB)"}),"\n",(0,i.jsx)(n.p,{children:"A non-fungible encrypted asset with its content fully stored on-chain, establishing an intrinsic link between content and value."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-28",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#non-fungible-token",children:"Non-Fungible-Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"double-spending",children:"Double-Spending"}),"\n",(0,i.jsx)(n.p,{children:"Double-spending is the risk that a digital token is spent twice or more. In the context of blockchain, it happens when the transaction spending a digital token is cancelled after confirmation, and the same token is spent in another transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-29",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptocurrency",children:"Cryptocurrency"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"epoch",children:"Epoch"}),"\n",(0,i.jsx)(n.p,{children:"An epoch is a period of time for a set of blocks."}),"\n",(0,i.jsx)(n.p,{children:"In Nervos, the PoW difficulty changes on a new epoch. All the blocks in the same epoch share the same difficulty target. The difficulty adjustment algorithm aims to stabilize the orphan block rate at 2.5% and the epoch duration at 4 hours."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-30",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fee",children:"Fee"}),"\n",(0,i.jsxs)(n.p,{children:["The sender of a transaction often includes a fee to the network for processing the requested transaction. There's no minimum fee rate set in consensus, but there's a minimum fee rate 1,000 Shannons/KB in CKB's ",(0,i.jsx)(n.a,{href:"#p2p",children:"P2P"})," network. (1 Shannon = 10",(0,i.jsx)("sup",{children:"-8"})," CKB)"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-31",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#shannon",children:"Shannon"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fee-rate",children:"Fee rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/tree/develop/rpc#error-poolrejectedtransactionbyminfeerate",children:"Fee rate in RFC on Nervos Network Github"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fee-rate",children:"Fee Rate"}),"\n",(0,i.jsx)(n.p,{children:"A tip per byte that a user offers to the miners for including his transaction in a block on the blockchain."}),"\n",(0,i.jsxs)(n.p,{children:["This is a same concept to Bitcoin's ",(0,i.jsx)(n.a,{href:"https://en.bitcoin.it/wiki/Miner_fees#Feerates",children:"Fee Rate(often spelled feerate)"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-32",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fee",children:"Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"first-class-assets",children:"First-Class Assets"}),"\n",(0,i.jsx)(n.p,{children:"Assets that 1. the asset itself (rather than a reference to the asset) can be passed directly in smart contract interactions, and 2. directly controlled by owners without any intermediaries."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-33",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/first-class-asset-ff4feaf370c4",children:"First-Class Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://talk.nervos.org/t/first-class-asset/1293",children:"Introduction to First-Class Asset"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fork",children:"Fork"}),"\n",(0,i.jsx)(n.p,{children:"A change in protocol causing the creation of an alternative chain, or a temporal divergence in two potential block paths during mining."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"full-node",children:"Full Node"}),"\n",(0,i.jsx)(n.p,{children:"A full node is an essential component of the CKB network. It stores and syncs the entire blockchain, verifies the validity of blocks and transactions, and enforces the network's consensus rules."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckb init --chain Mainnet && ckb run\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-34",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#light-node",children:"Light Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-node",children:"Mining Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"full-payload-format",children:"Full Payload Format"}),"\n",(0,i.jsxs)(n.p,{children:["The deprecated full payload format directly encodes all data field of lock script. The encode rule of deprecated full payload format is ",(0,i.jsx)(n.a,{href:"https://en.bitcoin.it/wiki/Bech32",children:"Bech32"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-35",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fungible-token",children:"Fungible Token"}),"\n",(0,i.jsx)(n.p,{children:"A fungible token can be fiat currencies like the dollar or a cryptocurrency like Bitcoin."}),"\n",(0,i.jsx)(n.p,{children:"Fungible tokens or assets are divisible and non-unique."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-36",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#non-fungible-token",children:"Non-Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"gas-limit",children:"Gas Limit"}),"\n",(0,i.jsx)(n.p,{children:"The maximum amount of gas a transaction or block may consume."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-37",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://ethereum.org/en/glossary/#gas",children:"Ethereum's Gas"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"hard-fork",children:"Hard-Fork"}),"\n",(0,i.jsx)(n.p,{children:"A permanent divergence in the blockchain; also known as a hard-forking change. One commonly occurs when nonupgraded nodes can\u2019t validate blocks created by upgraded nodes that follow newer consensus rules. Not to be confused with a fork, soft fork, software fork, or Git fork."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"hardware-wallet",children:"Hardware Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A hardware wallet is a form of cold wallet. A hardware wallet is a cryptocurrency wallet that stores the user's private keys (a critical piece of information used to authorize outgoing transactions on the blockchain network) in a secure hardware device."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-38",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cold-storage",children:"Cold Storage"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cold-wallet",children:"Cold Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"hash",children:"Hash"}),"\n",(0,i.jsx)(n.p,{children:"A fixed-length fingerprint of variable-size input, produced by a hash function."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"hash-rate",children:"Hash Rate"}),"\n",(0,i.jsx)(n.p,{children:'Hash rate is a measure of the computational power per second used when mining. These operations are known as "hashing".'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-39",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#network-hash-rate",children:"Network Hash Rate"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"height",children:"Height"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for block height."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-15",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-height",children:"Block Height"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"light-client",children:"Light Client"}),"\n",(0,i.jsx)(n.p,{children:"As a low-resource node, a light client allows users to sync with a blockchain in a cryptographically secure manner without having to store the whole blockchain."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"light-node",children:"Light Node"}),"\n",(0,i.jsx)(n.p,{children:"A light node downloads only the headers of the blockchain, conserving resources. It relies on other nodes for full transaction data and is a lightweight option for network participation."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckb-light-client run --config-file ./testnet.toml\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-40",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-node",children:"Full Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-node",children:"Mining Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mempool",children:"Mempool"}),"\n",(0,i.jsx)(n.p,{children:'Short for "memory pool". A waiting area on full nodes for transactions that have been broadcasted to the network but have not yet been confirmed on the blockchain.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-41",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"metadata",children:"Metadata"}),"\n",(0,i.jsxs)(n.p,{children:["Metadata is data that provides information about other data. ",(0,i.jsx)(n.code,{children:"capacity"}),", ",(0,i.jsx)(n.code,{children:"type"})," and ",(0,i.jsx)(n.code,{children:"lock"})," in Cells are metadata, they occupy Cell capacity and incur a state cost as well."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-42",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#capacity",children:"Capacity"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock",children:"Lock"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"micro-state",children:"Micro-State"}),"\n",(0,i.jsx)(n.p,{children:"A small piece of state that is isolated and often able to be acted upon independently without knowing the total state of the network."}),"\n",(0,i.jsx)(n.p,{children:"On Nervos, micro-state is represented by a Cell."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-16",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-43",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#state",children:"State"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"miner",children:"Miner"}),"\n",(0,i.jsx)(n.p,{children:"A network node that finds valid proof of work for new blocks, by repeated hashing."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-44",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"miner-fee",children:"Miner Fee"}),"\n",(0,i.jsx)(n.p,{children:"Another term for transaction fee."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-17",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-fee",children:"Transaction Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mining",children:"Mining"}),"\n",(0,i.jsx)(n.p,{children:"Mining is the process by which a blockchain node get new token reward by verifying new transactions, finding valid proof of work and creating new blocks."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-45",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-reward",children:"Mining Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mining-node",children:"Mining Node"}),"\n",(0,i.jsx)(n.p,{children:"Mining nodes create new blocks by solving computational puzzles. They contribute to the network's security and consensus by actively validating and adding blocks to the blockchain."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckb init --chain Mainnet && ckb miner\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-46",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining",children:"Mining"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-node",children:"Full Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#light-node",children:"Light Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mining-reward",children:"Mining Reward"}),"\n",(0,i.jsx)(n.p,{children:"Native tokens paid to miners as a reward for providing the necessary computing resources for mining."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-47",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining",children:"Mining"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#native-token",children:"Native Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"multisig",children:"Multisig"}),"\n",(0,i.jsx)(n.p,{children:"The term multisig stands for multi-signature, which is a specific type of digital signatures that can be created through the combination of multiple unique signatures."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"native-token",children:"Native Token"}),"\n",(0,i.jsx)(n.p,{children:"The token issued as reward to a blockchain's consensus nodes. Nervos CKB's native token is CKByte."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-48",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nc-max",children:"NC-MAX"}),"\n",(0,i.jsx)(n.p,{children:"Nervos CKB's consensus algorithm, which follows NC's backbone protocol. The main innovation here is a two-step transaction confirmation mechanism"}),"\n",(0,i.jsx)(n.h4,{id:"see-also-49",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eprint.iacr.org/2020/1101",children:"NC-MAC"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"neighbor",children:"Neighbor"}),"\n",(0,i.jsx)(n.p,{children:"A node that is directly connected to another node in the blockchain peer to peer network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-50",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#peer-to-peer",children:"Peer to Peer"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nervos-blockchain",children:"Nervos Blockchain"}),"\n",(0,i.jsx)(n.p,{children:"The layer 1 blockchain of the Nervos Network known as the Common Knowledge Base."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-18",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nervos-dao",children:"Nervos DAO"}),"\n",(0,i.jsx)(n.p,{children:'Nervos DAO enable users to lock CKBytes to get compensation from Nervos CKB secondary issuance. This process is similar to staking on other platforms. Nervos DAO provides a "virtual hardcap" for CKByte holders to insulate them from inflation.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-51",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dao",children:"DAO"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/nervos-dao-explained-95e33898b1c",children:"Nervos DAO Explained on the Nervos Blog"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Nervos DAO in RFC on Nervos Network Github"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://explorer.nervos.org/charts/inflation-rate",children:"Inflation Rate Chart"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"network-hash-rate",children:"Network Hash Rate"}),"\n",(0,i.jsx)(n.p,{children:"A measurement of the total computational processing power which is dedicated to providing security to the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-52",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#hash-rate",children:"Hash Rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"node",children:"Node"}),"\n",(0,i.jsx)(n.p,{children:"A software client that participates in the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-53",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-node",children:"Full Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#light-node",children:"Light Node"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-node",children:"Mining Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nonce",children:"Nonce"}),"\n",(0,i.jsx)(n.p,{children:"In cryptography, a value that can only be used once. Nonce can refer to two things in blockchain context: 1. a proof-of-work nonce is the random value in a block satisfying the proof of work requirement; 2. an account nonce is a transaction counter in each account, which is used to prevent replay attacks."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-54",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"non-fungible-token",children:"Non-Fungible Token"}),"\n",(0,i.jsx)(n.p,{children:"Non-fungible tokens or NFTs are cryptographic assets on a blockchain with unique identification codes and metadata that distinguish them from each other."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-55",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-object-dob",children:"DOB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"open-source",children:"Open Source"}),"\n",(0,i.jsx)(n.p,{children:"A piece of software where source code is freely available for examination or alteration by any third-party."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-56",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://opensource.com/resources/what-open-source",children:"What is Open Source at OpenSource.com"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"p2p",children:"P2P"}),"\n",(0,i.jsx)(n.p,{children:"A shortname name for peer to peer."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-19",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#peer-to-peer",children:"Peer to Peer"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"paper-wallet",children:"Paper Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A form of storing a recovery phrase or private keys offline by printing them on a piece of paper. This document would then be stored by traditional means in a secured location of the user's choosing, such as a safe."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-57",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"payment-address",children:"Payment Address"}),"\n",(0,i.jsx)(n.p,{children:"A string of letters and numbers that cryptocurrency and assets can be sent to and from."}),"\n",(0,i.jsx)(n.p,{children:'Nervos CKB Mainnet addresses always begin with the prefix "ckb".'}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-20",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#address",children:"Address"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"payment-channel",children:"Payment Channel"}),"\n",(0,i.jsx)(n.p,{children:"A micropayment channel or payment channel is class of techniques designed to allow users to make multiple payment transactions without committing all of the transactions to the layer 1 blockchain. In a typical payment channel, only two transactions are added to the block chain but an unlimited or nearly unlimited number of payments can be made between the participants."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-58",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"peer-to-peer",children:"Peer to Peer"}),"\n",(0,i.jsx)(n.p,{children:"A peer-to-peer (P2P) service is a decentralized platform whereby two individuals interact directly with each other, without intermediation by a third party."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-21",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#p2p",children:"P2P"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-59",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#node",children:"Node"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"private-key",children:"Private Key"}),"\n",(0,i.jsx)(n.p,{children:"A private key, also known as a secret key, is a variable in cryptography, known only to the owner(s) of the key, that is used with an algorithm to encrypt and decrypt data."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-60",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-asset",children:"Digital Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#paper-wallet",children:"Paper Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#payment-address",children:"Payment Address"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#wallet",children:"Wallet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proof-of-work",children:"Proof of Work"}),"\n",(0,i.jsx)(n.p,{children:"PoW asks users to solve a cryptographic puzzle to prove ownershipo of a certain amount of computational resource to participate in the consensus. In general PoW is a more permissionless consensus mechanism than PoS."}),"\n",(0,i.jsx)(n.p,{children:'In contrast to wildly spread misconception, PoW is not a "waste" of energy and does not induce more carbon emission. PoW is used in the Nervos layer 1 blockchain CKB.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-61",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-reward",children:"Mining Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-stake",children:"Proof of Stake"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proof-of-stake",children:"Proof of Stake"}),"\n",(0,i.jsx)(n.p,{children:"PoS asks users to prove ownership of a certain amount of cryptocurrency (their \u201cstake\u201d in the network) in order to be able to participate in the consensus. PoS relies on weak-subjectivity due to unsolvable issues like long-range attack. In PoS system the future consensus quorum is decided by existing participants completely. PoS is used in layer 2 protocols on Nervos Network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-62",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consensus",children:"Consensus"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-reward",children:"Mining Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"propagation",children:"Propagation"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for Block Propagation."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-22",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-propagation",children:"Block Propagation"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"public-key",children:"Public Key"}),"\n",(0,i.jsx)(n.p,{children:"A notion used only in public-key cryptography, a.k.a. asymmetric cryptography. A public key is a piece of information that can be known to others without compromising security. Unique for each user, a public key is associated with a private key known only to the user. The public key can be used to encrypt a message so that it can only be decrypted with the corresponding private key, or to verify that a message is authorized by the user with the corresponding private key."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-63",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"reward",children:"Reward"}),"\n",(0,i.jsx)(n.p,{children:"An amount of CKBytes included in each new block as a reward by the network to the miner who found the proof-of-work solution."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-64",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#base-reward",children:"Base Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-reward",children:"Block Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#commit-reward",children:"Commit Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mining-reward",children:"Mining Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-reward",children:"Proposal Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-reward",children:"Secondary Reward"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"signature",children:"Signature"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for cryptographic signature."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-23",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptographic-signature",children:"Cryptographic Signature"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"smart-contract",children:"Smart Contract"}),"\n",(0,i.jsx)(n.p,{children:"A smart contract is a self-executing contract with the terms of the agreement between contract creators and contract users being directly written into lines of code. The code and the agreements contained therein exist across a distributed, decentralized blockchain network. Also known as script on Nervos CKB."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"state",children:"State"}),"\n",(0,i.jsx)(n.p,{children:"Data stored on the blockchain. In most contexts this this means current data and excludes historical data."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-65",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"state-bloat",children:"State Bloat"}),"\n",(0,i.jsx)(n.p,{children:"The unlimited increase of state data in Ethereum. State bloat slows down node synchronization, raises the barrier of full node, thus hurts network decentralization."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"state-channel",children:"State Channel"}),"\n",(0,i.jsx)(n.p,{children:"A layer 2 solution where a channel is set up between participants, where they can transact freely and cheaply. Only a transaction to set up the channel and close the channel is sent to Mainnet. This allows for very high transaction throughput, but does rely on knowing number of participants up front and locking up of funds."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tip",children:"Tip"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for tip block."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-24",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tip-block",children:"Tip Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tip-block",children:"Tip Block"}),"\n",(0,i.jsx)(n.p,{children:"The most recent block to be confirmed in a blockchain. The tip block has the highest block height in the blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-25",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tip",children:"Tip"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-66",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-height",children:"Block Height"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction",children:"Transaction"}),"\n",(0,i.jsx)(n.p,{children:"Transaction is the basic object created and signed by users to interact with distributed ledger. Transactions update ledger state at users requests. A CKB transaction destroys some outputs created in previous transactions and creates some new outputs. We call the transaction output a Cell in CKB."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-67",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-fee",children:"Transaction Fee"}),"\n",(0,i.jsx)(n.p,{children:"A fee which is paid in the native token to miners in exchange for processing a transaction."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-26",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner-fee",children:"Miner Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-68",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#native-token",children:"Native Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"token",children:"Token"}),"\n",(0,i.jsx)(n.p,{children:"A \u201ctoken\u201d often refers to non-native token on smart contract platform, such as UDT on Nervos Network or ERC20 on Ethereum."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-69",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-asset",children:"Digital Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"turing-complete",children:"Turing Complete"}),"\n",(0,i.jsx)(n.p,{children:"Turing Complete refers to a machine that, given enough time and memory along with the necessary instructions, can solve any computational problem, no matter how complex. The term is normally used to describe modern programming languages as most of them are Turing Complete (C++, Python, JavaScript, etc.)."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"udt",children:"UDT"}),"\n",(0,i.jsx)(n.p,{children:"Short for User-Defined Token, a customised token created with properties defined by the user. In normal usage, this most commonly refers to fungible tokens."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-27",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"unconfirmed",children:"Unconfirmed"}),"\n",(0,i.jsx)(n.p,{children:"The state of a transaction that has not yet been confirmed. An unconfirmed transaction is not finalized and cannot be guaranteed."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-28",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#unconfirmed-transaction",children:"Unconfirmed Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-70",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"unconfirmed-transaction",children:"Unconfirmed Transaction"}),"\n",(0,i.jsx)(n.p,{children:"A transaction that has not yet been confirmed. An unconfirmed transaction is not finalized and cannot be guaranteed."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-29",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#unconfirmed",children:"Unconfirmed"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-71",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"user-defined-token",children:"User-Defined Token"}),"\n",(0,i.jsx)(n.p,{children:"A custom token created with properties defined by the user. In normal usage, this most commonly refers to fungible tokens."}),"\n",(0,i.jsx)(n.p,{children:"A User-Defined Token is usually referred to by its abbreviation, UDT."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-30",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-72",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-20",children:"ERC20 on Ethereum.org"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-777",children:"ERC777 on Ethereum.org"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://talk.nervos.org/t/rfc-simple-udt-draft-spec/4333",children:"Simple UDT Draft Spec on Nervos Talk"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"wallet",children:"Wallet"}),"\n",(0,i.jsx)(n.p,{children:"User-facing software used to interact with on-chain entities such as assets, smart contracts and dApps. A wallet can include key management itself or delegate key management to external hardware for improved security."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-73",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#paper-wallet",children:"Paper Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#private-key",children:"Private Key"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#payment-address",children:"Payment Address"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-asset",children:"Digital Asset"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"economics-glossary",children:"Economics Glossary"}),"\n",(0,i.jsx)(n.h3,{id:"base-issuance",children:"Base Issuance"}),"\n",(0,i.jsx)(n.p,{children:"Base issuance is the basic CKByte issuance with a fixed and decreasing schedule. Base issuance is awarded to miners as incentives to protect the network and also as an indirect token distribution method."}),"\n",(0,i.jsx)(n.p,{children:"Base issuance is limited to a finite total supply 33.6G (33.6 billion) CKBytes."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-74",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#base-reward",children:"Base Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Crypto-Economics RFC on Nervos Network GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"base-reward",children:"Base Reward"}),"\n",(0,i.jsx)(n.p,{children:"Base reward is the block reward (in CKBytes) to miners generated from the base issuance. Base reward halves approximately every 4 years until eventually reaching 0, like Bitcoin."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-75",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#base-issuance",children:"Base Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit-reward-1",children:"Commit Reward"}),"\n",(0,i.jsx)(n.p,{children:"A reward paid to miners in CKBytes for committing a previously proposed transaction. After the transaction has been committed it is confirmed."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-76",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"economic-abstraction",children:"Economic Abstraction"}),"\n",(0,i.jsx)(n.p,{children:'With proper tool support, users can use tokens other than CKByte (for example, stable coins) to pay transactions fees, a concept known as "Economic Abstraction".'}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"fiat-currency",children:"Fiat Currency"}),"\n",(0,i.jsx)(n.p,{children:"Fiat currencies are a medium of exchange established as money, often by government regulation. Fiat money does not have intrinsic value and does not have use value. It has value only because a government maintains its value, or because parties engaging in exchange agree on its value."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-77",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptocurrency",children:"Cryptocurrency"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#digital-currency",children:"Digital Currency"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"heavy-asset-problem",children:"Heavy Asset Problem"}),"\n",(0,i.jsx)(n.p,{children:"A common problem found in multi-asset blockchain platforms where the value of the assets stored on the chain gains significant value but the native token of the chain does not. This raises the incentive to attack the network, but does not increase the security because the value of the native token is what is used to secure the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-78",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#asset",children:"Asset"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#starving-layer-1-problem",children:"Starving Layer 1 Problem"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-security-commons",children:"Tragedy of the Security Commons"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"liquidity",children:"Liquidity"}),"\n",(0,i.jsx)(n.p,{children:"The ability for an asset to be bought or sold easily without causing a significant change in the current market price."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-79",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#asset",children:"Asset"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proposal-reward",children:"Proposal Reward"}),"\n",(0,i.jsx)(n.p,{children:"A reward paid to miners in CKBytes for proposing an unconfirmed transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-80",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secondary-issuance",children:"Secondary Issuance"}),"\n",(0,i.jsx)(n.p,{children:"The creation of new CKBytes that is paid to miners through secondary rewards. Secondary issuance follows a fixed inflation schedule of 1.344 billion CKBytes per year. Nervos DAO stakers are not affected by secondary issuance."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-81",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#base-issuance",children:"Base Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-dao",children:"Nervos DAO"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-reward",children:"Secondary Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#state",children:"State"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Crypto-Economics RFC on Nervos Network GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secondary-reward",children:"Secondary Reward"}),"\n",(0,i.jsx)(n.p,{children:"A subsidy paid to miners in CKBytes for providing the compute and storage requirements required for processing transactions and persisting data on Nervos."}),"\n",(0,i.jsx)(n.p,{children:"Secondary rewards are created from secondary issuance, and continuously pay miners for the verification of transactions and preservation of blockchain state."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-82",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#miner",children:"Miner"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"selfish-mining-attack",children:"Selfish Mining Attack"}),"\n",(0,i.jsx)(n.p,{children:"Selfish mining is a concept that was addressed by Cornell University researchers in detail in a 2013 report. In this attack, malicious miners gain unfair block rewards by deliberately orphaning blocks mined by others."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-83",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://www.cs.cornell.edu/~ie53/publications/btcProcFC.pdf",children:"Selfish Mining Related Paper"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"starving-layer-1-problem",children:"Starving Layer 1 Problem"}),"\n",(0,i.jsx)(n.p,{children:"A scenario that can arise in multi-layer blockchain platforms where the vast majority of the transaction traffic moves from layer 1 to layer 2, taking the vast majority of transaction fees with it. If layer 1 relies exclusively on transaction fees to support the security of the platform, it may end up not having enough incentives available to properly secure it."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-84",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#heavy-asset-problem",children:"Heavy Asset Problem"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-2",children:"Layer 2"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-fee",children:"Transaction Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"state-rent",children:"State Rent"}),"\n",(0,i.jsx)(n.p,{children:"A recurring fee that is paid to persist and secure state data."}),"\n",(0,i.jsx)(n.p,{children:"On Nervos, secondary issuance is used to boost the payment of state rent by users who occupy space on the Nervos blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-85",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Crypto-Economics RFC on Nervos Network GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"store-of-assets",children:"Store of Assets"}),"\n",(0,i.jsx)(n.p,{children:'Similar to the concept of "Store of Value" in the context of Bitcoin, we call the utility "Store of Assets" when a blockchain keeps any crypto-assets securely and censorship-resistantly. Nervos CKB is such a Store of Assets or SoA.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-86",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#store-of-value",children:"Store of Value"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"store-of-value",children:"Store of Value"}),"\n",(0,i.jsx)(n.p,{children:"Assets which can maintain their worth over time without depreciating"}),"\n",(0,i.jsx)(n.p,{children:"A good store of value either match or outpace the inflation rate of fiat currency, and has a reasonable amount of liquidity, allowing the asset to be easily sold."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-87",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#store-of-assets",children:"Store of Assets"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#liquidity",children:"Liquidity"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tail-emission",children:"Tail Emission"}),"\n",(0,i.jsx)(n.p,{children:"A type of reward that is paid to miners through a fixed amount of inflation."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-88",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-reward",children:"Secondary Reward"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"targeted-inflation",children:"Targeted Inflation"}),"\n",(0,i.jsx)(n.p,{children:"A form of inflation that only affects a specific subset of users."}),"\n",(0,i.jsx)(n.p,{children:"Nervos uses Secondary Issuance to create targeted inflation on users who occupy space on the Nervos blockchain to pay State Rent. Long-term holders of CKBytes have the option of locking them in the Nervos DAO, which acts and an inflation shelter."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-89",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-dao",children:"Nervos DAO"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"Crypto-Economics RFC on Nervos Network GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tragedy-of-the-commons",children:"Tragedy of the Commons"}),"\n",(0,i.jsx)(n.p,{children:"A situation in a system where the participants act in accordance with their own self interest and deplete or destroy a shared resource through their collective action."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-90",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-security-commons",children:"Tragedy of the Security Commons"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-storage-commons",children:"Tragedy of the Storage Commons"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tragedy-of-the-security-commons",children:"Tragedy of the Security Commons"}),"\n",(0,i.jsx)(n.p,{children:'A situation that can emerge on multi-asset blockchain platforms where asset tokens rely on the storage and security of the blockchain platform, but do not contribute back to the platform. As the number of assets that "ride for free" increases, so does the burden placed on the underlying blockchain platform. If the assets do not contribute to the underlying platform, the available security may not properly support the network.'}),"\n",(0,i.jsx)(n.h4,{id:"see-also-91",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#heavy-asset-problem",children:"Heavy Asset Problem"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-commons",children:"Tragedy of the Commons"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-storage-commons",children:"Tragedy of the Storage Commons"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tragedy-of-the-storage-commons",children:"Tragedy of the Storage Commons"}),"\n",(0,i.jsx)(n.p,{children:"A situation that can emerge on incentivized blockchain platforms where mining rewards are paid for inclusion of data to the blockchain, but no rewards exist for the long-term persistence of the blockchain data. As the size of the chain grows, so do the costs associated with persisting the data. If there is no direct incentive for persisting data, fewer and fewer nodes will do so. Eventually, too few nodes will be available to properly support the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-92",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-commons",children:"Tragedy of the Commons"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#tragedy-of-the-security-commons",children:"Tragedy of the Security Commons"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"technical-glossary",children:"Technical Glossary"}),"\n",(0,i.jsx)(n.h3,{id:"active-cell",children:"Active Cell"}),"\n",(0,i.jsx)(n.p,{children:"Or Live Cell, a Cell exists in the current CKB state. Only active Cells can be used as inputs to new transactions."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-31",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-93",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#input",children:"Input"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"aggron",children:"Aggron"}),"\n",(0,i.jsx)(n.p,{children:"The first Nervos CKB Testnet corresponding to Mainnet Lina."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"CKB version"}),": >= v0.101.0 (latest stable is recommended)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Genesis hash"}),": 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Init command"}),": ",(0,i.jsx)(n.code,{children:"ckb init --chain testnet"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Launched at"}),": 2020-05-22 04:00:00 UTC"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"ckb2021 activated at"}),": 2021-10-24 03:00:00 UTC"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-32",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#testnet",children:"Testnet"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-3",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lina",children:"Lina"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mainnet",children:"Mainnet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"animagus",children:"Animagus"}),"\n",(0,i.jsx)(n.p,{children:"A framework layer that runs on top of Nervos CKB which provides an easy way to query for account balances without having to go through the Cell collection process."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-94",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-collection",children:"Cell Collection"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/https-medium-com-nervosnetwork-animagus-part-1-introduction-66fa8ce27ccd-cfb361a7d883",children:"Animagus Introduction on the Nervos Blog"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"args",children:"Args"}),"\n",(0,i.jsx)(n.p,{children:"Args is short for arguments. Arguments are data provided to the lock script or type script of a Cell, similar to args provided to a function or method call."}),"\n",(0,i.jsx)(n.p,{children:"Arguments are stored as part of the Cell when it is created."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-95",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"axon",children:"Axon"}),"\n",(0,i.jsx)(n.p,{children:"Axon is a chain-based layer 2 protocol and framework with a practical security and economic model. Axon chains allow anyone to stake tokens on CKB to become a validator and participate in consensus."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-96",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-2",children:"Layer 2"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"blake2b",children:"Blake2b"}),"\n",(0,i.jsx)(n.p,{children:"A cryptographic hash function. BLAKE2b (or BLAKE2) is optimized for 64-bit platforms including NEON-enabled ARMs and produces digests of any size between 1 and 64 bytes. BLAKE2b is optimized for 8- to 32-bit platforms, and produces digests of any size between 1 and 32 bytes. CKB uses BLAKE2b as the default hash algorithm."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-97",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://blake2.net/blake2.pdf",children:"Blake2b paper"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/BLAKE_(hash_function)",children:"Blake Hash Function on Wikipedia"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Hash_function",children:"Hash Function on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block-subsidy",children:"Block Subsidy"}),"\n",(0,i.jsx)(n.p,{children:"A payment that is made in the native currency of the blockchain that is paid to miners for providing the computational resources create a block and secure the blockchain."}),"\n",(0,i.jsx)(n.p,{children:"The subsidy consists is the portion of the total block reward that is issued out of inflation for creating the block, but does not include any additional transaction fees that may be paid on top."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-33",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-reward",children:"Block Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-fee",children:"Transaction Fee"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"boxer",children:"Boxer"}),"\n",(0,i.jsx)(n.p,{children:"A lightweight Rust library for verifying the Nervos layer 1 blockchain, the Common Knowledge Base."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-98",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/xxuejie/ckb-boxer",children:"Boxer on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"block_version",children:(0,i.jsx)(n.code,{children:"block_version"})}),"\n",(0,i.jsx)(n.p,{children:"Version of a block. This field is reserved for the system, set to 0 by default."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub const BLOCK_VERSION: Version = 0;\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-99",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cell-collection",children:"Cell Collection"}),"\n",(0,i.jsx)(n.p,{children:"The process of gathering Cells that meet certain criteria."}),"\n",(0,i.jsx)(n.p,{children:"For example: To find the balance of a particular account, all active Cells for the address would need to be collected."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-100",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cellbase",children:"Cellbase"}),"\n",(0,i.jsx)(n.p,{children:"The transaction in each block that is responsible for the minting of new CKBytes."}),"\n",(0,i.jsx)(n.p,{children:"This is the equivalent of a coinbase transaction in Bitcoin."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-101",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"Coinbase on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cellbase_maturity",children:(0,i.jsx)(n.code,{children:"cellbase_maturity"})}),"\n",(0,i.jsx)(n.p,{children:'Any referenced cellbase output must meet this requirement in a transaction; otherwise, the transaction is rejected. Cellbase outputs are "locked" and have to wait for 4 epochs (approximately 16 hours) to be confirmed before they become ready to be spent. This restriction is to avoid the risk of later transactions with cellbase root being rollbacked when a soft fork occurs.'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const CELLBASE_MATURITY: EpochNumberWithFraction =\nEpochNumberWithFraction::new_unchecked(4, 0, 1);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-102",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cellbase",children:"Cellbase"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"cell_deps",children:(0,i.jsx)(n.code,{children:"cell_deps"})}),"\n",(0,i.jsx)(n.p,{children:"Pointers to Live Cells on the chain that allow scripts in the transaction to access (read-only) referenced Live Cells."}),"\n",(0,i.jsxs)(n.p,{children:["Find more in the essay ",(0,i.jsx)(n.a,{href:"https://nervos-ckb-docs-git-v1-cryptape.vercel.app/docs/essays/dependencies/#how-dependencies-work",children:"Script dependencies"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-103",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dependencies",children:"Dependencies"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckbhash",children:"Ckbhash"}),"\n",(0,i.jsx)(n.p,{children:"CKB uses blake2b as the default hash algorithm with the following configurations:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["output digest size in bytes: ",(0,i.jsx)(n.code,{children:"32"})]}),"\n",(0,i.jsxs)(n.li,{children:["personalization: ",(0,i.jsx)(n.code,{children:"ckb-default-hash"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ckbhash"})," is used to denote the blake2b hash with the configurations above, there are example and test vectors in python 3:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"import hashlib\nimport unittest\n\ndef ckbhash():\n return hashlib.blake2b(digest_size=32, person=b'ckb-default-hash')\n\nclass TestCKBBlake2b(unittest.TestCase):\n\n def test_empty_message(self):\n hasher = ckbhash()\n hasher.update(b'')\n self.assertEqual('44f4c69744d5f8c55d642062949dcae49bc4e7ef43d388c5a12f42b5633d163e', hasher.hexdigest())\n\nif __name__ == '__main__':\n unittest.main()\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-104",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blake2b",children:"Blake2b"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"ckb-merkle-tree",children:"CKB Merkle Tree"}),"\n",(0,i.jsxs)(n.p,{children:["CKB Merkle Tree is a CBMT( ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0006-merkle-tree/0006-merkle-tree.md#complete-binary-merkle-tree",children:"Complete Binary Merkle Tree"})," ) using following merge function:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckbhash(left || right)\n"})}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ckbhash"})," is the hash function, ",(0,i.jsx)(n.code,{children:"||"})," denotes binary concatenation."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-105",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0006-merkle-tree/0006-merkle-tree.md",children:"Merkle Tree for Static Data"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Merkle_tree",children:"Merkle Tree on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"code-hash-1",children:"Code Hash"}),"\n",(0,i.jsx)(n.p,{children:"A field in a Cell that contains a hash value which could refer to a specific piece of data, or a specific Cell referenced by Type ID."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-106",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#data",children:"Data"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type_id",children:"Type ID"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commit-1",children:"Commit"}),"\n",(0,i.jsx)(n.p,{children:"The process of taking a proposed transaction and adding it to the blockchain. After the transaction has been committed it is confirmed."}),"\n",(0,i.jsx)(n.p,{children:"Miners are incentivized to commit transactions by being paid a commit reward."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-107",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#commit-reward",children:"Commit Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#propose",children:"Propose"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"commitment-zone",children:"Commitment Zone"}),"\n",(0,i.jsx)(n.p,{children:"Section of the block that contains transaction commitments. The commitment zone can only contain valid transactions which have appeared in the proposal zone of one of the previous 2 to 10 blocks."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-108",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-zone",children:"Proposal Zone"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"consume-1",children:"Consume"}),"\n",(0,i.jsx)(n.p,{children:"The process of using a Live Cell as an input to a transaction."}),"\n",(0,i.jsx)(n.p,{children:"The process of consumption marks the Live Cell as a Dead Cell. This is the equivalent of marking a UTXO as spent in Bitcoin."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-109",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"crypto-primitives",children:"Crypto Primitives"}),"\n",(0,i.jsx)(n.p,{children:"Well-established, low-level cryptographic algorithm commonly used to build out a cryptographic protocol."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-110",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Cryptographic_primitive",children:"Cryptographic Primitive on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dao_type_hash",children:(0,i.jsx)(n.code,{children:"dao_type_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["NervosDAO\u2019s ",(0,i.jsx)(n.code,{children:"type_hash"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Find more in ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#ckb-genesis-script-list",children:"CKB Genesis Script List"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-111",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script-hash",children:"Type Script Hash"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"data-1",children:"Data"}),"\n",(0,i.jsx)(n.p,{children:"In Nervos specific contexts, data may refer to the data structure within a Cell. This structure is used to hold any form of information that needs to be stored on the Nervos blockchain."}),"\n",(0,i.jsx)(n.p,{children:"In more general contexts, data may refer to any form of information."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-112",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dead-cell",children:"Dead Cell"}),"\n",(0,i.jsx)(n.p,{children:"A Cell that has been used as an input to a previous transaction and is consumed."}),"\n",(0,i.jsx)(n.p,{children:"A Dead Cell cannot be used as an input to a new transaction, nor can it be used as a dependency. It is effectively destroyed and removed from the active state of the network."}),"\n",(0,i.jsx)(n.p,{children:'A Dead Cell is the equivalent of a "spent UTXO" in Bitcoin.'}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-34",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#historical-cell",children:"Historical Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-113",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consume",children:"Consume"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dep-group",children:"Dep Group"}),"\n",(0,i.jsx)(n.p,{children:"A method for referencing multiple dependencies which are commonly used together using a single dependency field."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-114",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dep-type",children:"Dep Type"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dependencies",children:"Dependencies"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"CKB Transaction Structure on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dep-type",children:"Dep Type"}),"\n",(0,i.jsx)(n.p,{children:"A field that specifies the type of the dependency."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-115",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dep-group",children:"Dep Group"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dependencies",children:"Dependencies"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"CKB Transaction Structure on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"deps",children:"Deps"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for dependencies."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-35",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dependencies",children:"Dependencies"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dependencies",children:"Dependencies"}),"\n",(0,i.jsx)(n.p,{children:"Dependencies are commonly referred to as deps. Dependencies are Cells that are referenced in a transaction. Cells that are referenced as dependencies are read-only and made available to any scripts executing within the transaction. Dependencies, or deps, are not consumed."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-36",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#deps",children:"Deps"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-116",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consume",children:"Consume"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"duktape",children:"Duktape"}),"\n",(0,i.jsx)(n.p,{children:"Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint."}),"\n",(0,i.jsx)(n.p,{children:"Duktape is used to run JavaScript based smart contracts on Nervos."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-117",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://duktape.org/",children:"Duktape Official Website"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"difficulty",children:"Difficulty"}),"\n",(0,i.jsxs)(n.p,{children:["A measurement of how difficult it is to solve the ",(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})," cryptographic puzzle required to create a block."]}),"\n",(0,i.jsx)(n.p,{children:"Networks automatically adjust the difficulty to control the speed at which blocks are generated as mining participants enter and exit the network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-118",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-work",children:"Proof of Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"diviner",children:"Diviner"}),"\n",(0,i.jsx)(n.p,{children:"A deterministic testing framework for Rust."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-119",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/xxuejie/diviner",children:"Diviner on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"eaglesong",children:"Eaglesong"}),"\n",(0,i.jsx)(n.p,{children:"Eaglesong is a new hash function developed specifically for Nervos CKB proof-of-work, which is also suitable in other use cases in which a secure hash function is needed."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-120",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0010-eaglesong/0010-eaglesong.md",children:"Eaglesong RFC on the Nervos Github"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/the-proof-of-work-function-of-nervos-ckb-3cc8364464d9",children:"Introducing Eaglesong, Nervos\u2019s New Hash Function for CKB Proof-of-Work"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"epoch_duration_target",children:(0,i.jsx)(n.code,{children:"epoch_duration_target"})}),"\n",(0,i.jsx)(n.p,{children:"The estimated epoch duration specified by NC-Max. Set as 4 hours in CKB."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const DEFAULT_EPOCH_DURATION_TARGET: u64 = 4 * 60 * 60; // 4 hours, unit: second\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-121",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#epoch",children:"Epoch"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"erc20",children:"ERC20"}),"\n",(0,i.jsx)(n.p,{children:"An Ethereum token standard for basic fungible tokens."}),"\n",(0,i.jsx)(n.p,{children:"An sUDT on Nervos is the equivalent of Ethereum tokens standards ERC20 or ERC777."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-122",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#erc777",children:"ERC777"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-20",children:"ERC20 on Ethereum.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"erc721",children:"ERC721"}),"\n",(0,i.jsx)(n.p,{children:"An Ethereum token standard for non-fungible tokens."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-123",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#non-fungible-token",children:"Non-Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-721",children:"ERC721 on Ethereum.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"erc777",children:"ERC777"}),"\n",(0,i.jsx)(n.p,{children:"An updated Ethereum token standard for basic fungible tokens that is backwards compatible with ERC20."}),"\n",(0,i.jsx)(n.p,{children:"An sUDT on Nervos is the equivalent of Ethereum tokens standards ERC20 or ERC777."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-124",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#erc20",children:"ERC20"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-777",children:"ERC777 on Ethereum.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"erc1155",children:"ERC1155"}),"\n",(0,i.jsx)(n.p,{children:"An Ethereum token standard that supports the creation any number of fungible or non-fungible tokens on a single contract."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-125",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#fungible-token",children:"Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#non-fungible-token",children:"Non-Fungible Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-1155",children:"ERC1155 on Ethereum.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"full-address",children:"Full Address"}),"\n",(0,i.jsx)(n.p,{children:"An address format used on Nervos that includes the full code hash of the lock script associated."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-126",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#address",children:"Address"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#short-address",children:"Short Address"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"generator",children:"Generator"}),"\n",(0,i.jsx)(n.p,{children:"A program used to create transactions that can be broadcast to the Nervos CKB network."}),"\n",(0,i.jsx)(n.p,{children:"Generators run locally on the client side (off-chain). They utilize user input and existing Cells as program inputs, to create new Cells with new states as output."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"genesis-block",children:"Genesis Block"}),"\n",(0,i.jsx)(n.p,{children:"The first block in the blockchain, used to initialize the global state. The genesis block is unique because it does not contain a reference to the previous block because it is the first."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-127",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#blockchain",children:"Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"genesis_hash",children:(0,i.jsx)(n.code,{children:"genesis_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["Hash of CKB genesis block. CKB Genesis Block was created in a decentralized manner that encourages everyone to generate a unique genesis block verifiably through the ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/genesis-block-generator/blob/master/spec.md",children:"Genesis Block Generator"}),". Nodes thus created and activated can be connected to any other node across the network to form a decentralized Common Knowledge Base."]}),"\n",(0,i.jsx)(n.p,{children:"The genesis block contains two main components:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb-system-scripts/blob/v0.5.4/c/dao.c",children:"System script"})}),"\n",(0,i.jsxs)(n.li,{children:["Token pre-allocation based on the Nervos Foundation\u2018s ",(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/nervos-ckb-official-public-sale-announcement-431438f4cc39#:~:text=Key%20details%20of%20the%20Nervos%20Public%20Sale&text=The%20initial%20total%20supply%20of,be%201%20CKB%20%3D%200.01%20USD.",children:"announcement"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-128",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#genesis-block",children:"Genesis block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"godwoken",children:"Godwoken"}),"\n",(0,i.jsx)(n.p,{children:"Godwoken is a layer 2 rollup framework for Nervos CKB. It provides scaling capability, as well as an abstract account model to CKB."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-129",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/godwoken",children:"Godwoken on GitHub"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://docs.godwoken.io/",children:"Godwoken Documentation Site"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"governance-script",children:"Governance Script"}),"\n",(0,i.jsx)(n.p,{children:"A type script which defines the monetary policy of a User Defined Token (UDT)."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-130",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#governance-script-hash",children:"Governance Script Hash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"governance-script-hash",children:"Governance Script Hash"}),"\n",(0,i.jsx)(n.p,{children:"A Blake2b hash of a type script which is used as an identifier for the script when referenced by a Cell."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-37",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script-hash",children:"Type Script Hash"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-131",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#governance-script",children:"Governance Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"historical-cell",children:"Historical Cell"}),"\n",(0,i.jsxs)(n.p,{children:["An alternative term for ",(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-38",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-132",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"inbound-connection",children:"Inbound Connection"}),"\n",(0,i.jsx)(n.p,{children:"Inbound connection means it is initiated by the remote peer; and the connection itself is outgoing connection when we switch the subject to the remote peer."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-133",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#outbound-connection",children:"Outbound Connection"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"indexer",children:"Indexer"}),"\n",(0,i.jsx)(n.p,{children:"An application or library to trace Live Cells that comply with criteria specified by the developer or user."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-134",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"initial_primary_epoch_reward",children:(0,i.jsx)(n.code,{children:"initial_primary_epoch_reward"})}),"\n",(0,i.jsx)(n.p,{children:"Incentives paid to miners in CKBytes by epoch in CKB base issuance. Under CKB's consensus, block interval is uncertain, while epoch can be fixed at approximately 4 hours, so reward issuance is determined by epoch. Each epoch issues 1_917_808_21917808 Shannons of CKBytes, whose total amount is fixed but halves every 4 years."}),"\n",(0,i.jsx)(n.p,{children:"The initial base issuance is 4.2 billion CKBytes per year. Similar to Bitcoin, the base issuance halves approximately every 4 years until it stops."}),"\n",(0,i.jsxs)(n.p,{children:["To calculate, ",(0,i.jsx)(n.a,{href:"/docs/concepts/glossary#block-reward",children:"block reward"})," = ",(0,i.jsx)(n.code,{children:"initial_primary_epoch_reward"})," / epoch_length (the number of blocks in the epoch)."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const INITIAL_PRIMARY_EPOCH_REWARD: Capacity = Capacity::shannons(1_917_808_21917808);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-135",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-reward",children:"Block Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#epoch",children:"Epoch"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary_epoch_reward",children:(0,i.jsx)(n.code,{children:"secondary_epoch_reward"})})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"input",children:"Input"}),"\n",(0,i.jsx)(n.p,{children:"A Live Cell that is used in a transaction. If the transaction is accepted by the network, the Live Cell gets consumed as input and labeled as a Dead Cell."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-136",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#consume",children:"Consume"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dead-cell",children:"Dead Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"keyper",children:"Keyper"}),"\n",(0,i.jsx)(n.p,{children:"A specification of how to manage wallet Lock Scripts which apply to a specific user."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-137",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/ququzone/keyper",children:"Keyper on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"late-spawning",children:"Late Spawning"}),"\n",(0,i.jsx)(n.p,{children:"When a node joins a blockchain network for the first time after the network has already been in operation for a period of time."}),"\n",(0,i.jsx)(n.p,{children:"A network is said to support late spawning if that participant can download and verify the entire blockchain without having to trust any of the participants in the network to feed them unaltered data."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-138",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#genesis-block",children:"Genesis Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"layer-1",children:"Layer 1"}),"\n",(0,i.jsx)(n.p,{children:"Layer 1 of a decentralized ecosystem is the underlying blockchain architecture."}),"\n",(0,i.jsx)(n.p,{children:"A proof of work blockchain known as the Common Knowledge Base (CKB) that serves as the base layer for the Nervos Network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-139",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-2",children:"Layer 2"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"layer-2",children:"Layer 2"}),"\n",(0,i.jsx)(n.p,{children:"Layer 2 refers to a secondary framework or protocol that is built on top of an existing blockchain system."}),"\n",(0,i.jsx)(n.p,{children:"The main goal of these protocols is to solve the transaction speed and scaling difficulties that are being faced by the major cryptocurrency networks."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-140",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"lina",children:"Lina"}),"\n",(0,i.jsx)(n.p,{children:"The name of public Mainnet of the Nervos CKB."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"CKB version"}),": >= v0.25.2 (latest stable is recommended)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Genesis hash"}),": 0x92b197aa1fba0f63633922c61c92375c9c074a93e85963554f5499fe1450d0e5"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Init command"}),": ",(0,i.jsx)(n.code,{children:"ckb init --chain mainnet"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Launched at"}),": 2019-11-15 21:11:00 UTC"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-39",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mainnet",children:"Mainnet"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-4",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#aggron",children:"Aggron"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#testnet",children:"Testnet"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-141",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"live-cell",children:"Live Cell"}),"\n",(0,i.jsx)(n.p,{children:"A Cell that has not been consumed and is available for use."}),"\n",(0,i.jsx)(n.p,{children:"This is similar to an unspent transaction output (UTXO) in Bitcoin."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-40",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#active-cell",children:"Active Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-142",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell-model",children:"Cell Model"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"UTXO on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"lock",children:"Lock"}),"\n",(0,i.jsx)(n.p,{children:"A script that represents the ownership of a Cell. A user successfully unlocks a Cell and is able to consume it if the Cell's lock script exits normally."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-143",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"lock-script",children:"Lock Script"}),"\n",(0,i.jsx)(n.p,{children:"A script that enforces access and ownership of a Cell. This script controls who has permission to use the Cell as an input. Lock scripts accept user generated proofs or witnesses and including transaction as inputs."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-144",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"lock-script-hash",children:"Lock Script Hash"}),"\n",(0,i.jsxs)(n.p,{children:["A ",(0,i.jsx)(n.a,{href:"#blake2b",children:"Blake2b"})," hash of a lock script which is used as an identifier for the script when referenced by a Cell."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-145",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"mainnet",children:"Mainnet"}),"\n",(0,i.jsxs)(n.p,{children:['Short for "main network", the running Nervos CKB public blockchain. The name of the Nervos CKB Mainnet is ',(0,i.jsx)(n.a,{href:"#lina",children:"Lina"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-41",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lina",children:"Lina"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-ckb",children:"Nervos CKB"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-5",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#aggron",children:"Aggron"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#testnet",children:"Testnet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"max_block_bytes",children:(0,i.jsx)(n.code,{children:"max_block_bytes"})}),"\n",(0,i.jsx)(n.p,{children:"The maximum transaction size limit allowed in a block in bytes. Estimated based on the size consumed by 1000 2-in-2-out secp256k1 transactions."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub const MAX_BLOCK_BYTES: u64 = TWO_IN_TWO_OUT_BYTES * TWO_IN_TWO_OUT_COUNT;\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"max_block_cycles",children:(0,i.jsx)(n.code,{children:"max_block_cycles"})}),"\n",(0,i.jsx)(n.p,{children:"The maximum transaction cycle limit allowed in a block. Estimated based on the cycles consumed by 1000 2-in-2-out secp256k1 transactions."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"/// cycles of a typical two-in-two-out tx.\npub const TWO_IN_TWO_OUT_CYCLES: Cycle = 3_500_000;\n\n/// count of two-in-two-out txs a block should capable to package.\nconst TWO_IN_TWO_OUT_COUNT: u64 = 1_000;\npub(crate) const MAX_BLOCK_CYCLES: u64 = TWO_IN_TWO_OUT_CYCLES * TWO_IN_TWO_OUT_COUNT;\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-146",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cycles",children:"Cycles"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"max_block_proposals_limit",children:(0,i.jsx)(n.code,{children:"max_block_proposals_limit"})}),"\n",(0,i.jsx)(n.p,{children:"The maximum amount of proposals contained in one block. The default value starts from 1.5."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"TWO_IN_TWO_OUT_COUNT\npub const MAX_BLOCK_PROPOSALS_LIMIT: u64 = 1_500;\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-147",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-zone",children:"Proposal Zone"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"max_uncles_num",children:(0,i.jsx)(n.code,{children:"max_uncles_num"})}),"\n",(0,i.jsx)(n.p,{children:"The maximum number (Uint64) of uncle blocks allowed for one block. Set as 2 by default."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"const MAX_UNCLE_NUM: usize = 2;\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-148",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"median_time_block_count",children:(0,i.jsx)(n.code,{children:"median_time_block_count"})}),"\n",(0,i.jsx)(n.p,{children:"A timestamp is valid only when it is greater than the median timestamp of the previous 37 blocks."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"const MEDIAN_TIME_BLOCK_COUNT: usize = 37;\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"minting",children:"Minting"}),"\n",(0,i.jsx)(n.p,{children:"The process of creating of new tokens."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-149",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"molecule",children:"Molecule"}),"\n",(0,i.jsx)(n.p,{children:"A serialization framework for encoding data widely used on the Nervos Network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-150",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0008-serialization/0008-serialization.md",children:"Molecule Specification"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/molecule",children:"Molecule on Github"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"muta",children:"Muta"}),"\n",(0,i.jsx)(n.p,{children:"A highly customizable, high-performance blockchain framework designed to support proof of stake, BFT consensus and smart contracts."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-151",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/muta",children:"Muta on GitHub"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proof-of-stake",children:"Proof of Stake"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"nervos-ckb",children:"Nervos CKB"}),"\n",(0,i.jsx)(n.p,{children:"The layer 1 blockchain of the Nervos Network, the Common Knowledge Base."}),"\n",(0,i.jsx)(n.p,{children:"Nervos CKB is often referred to as the Nervos Blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-42",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb",children:"CKB"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-base",children:"Common Knowledge Base"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nervos-blockchain",children:"Nervos Blockchain"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-152",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"off-chain-computation",children:"Off-Chain Computation"}),"\n",(0,i.jsx)(n.p,{children:"A programming model where all computation is done off-chain to reduce the burden on the nodes in the network and provide higher levels of scalability. Nervos uses off-chain computation and on-chain verification."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-153",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-computation",children:"On-Chain Computation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-verification",children:"On-Chain Verification"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"off-chain-scaling",children:"Off-Chain Scaling"}),"\n",(0,i.jsx)(n.p,{children:"Off-chain scaling is the approach that only using the blockchain as a secure asset and settlement platform in conjunction with transferring almost all transactions off the blockchain."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-154",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-scaling",children:"On-Chain Scaling"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"off-chain-state",children:"Off-Chain State"}),"\n",(0,i.jsx)(n.p,{children:"The data of an application that is not stored on the blockchain, or is not accessible by on-chain smart contracts."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-155",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-state",children:"On-Chain State"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"on-chain-computation",children:"On-Chain Computation"}),"\n",(0,i.jsx)(n.p,{children:"A programming model where all computation by smart contracts is done on-chain by every node on the network simultaneously."}),"\n",(0,i.jsx)(n.p,{children:"Ethereum uses on-chain computation."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-156",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#off-chain-computation",children:"Off-Chain Computation"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"on-chain-scaling",children:"On-Chain Scaling"}),"\n",(0,i.jsx)(n.p,{children:"On-chain scaling solution refer to extending the throughput of the consensus process, or increasing network throughput as node number increases."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-157",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#off-chain-scaling",children:"Off-chain Scaling"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"on-chain-state",children:"On-Chain State"}),"\n",(0,i.jsx)(n.p,{children:"The data of an application that is stored on the blockchain and is accessible by on-chain smart contracts."}),"\n",(0,i.jsx)(n.p,{children:"Nervos provides on-chain state for all smart contracts."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-158",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#off-chain-state",children:"Off-Chain State"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"on-chain-verification",children:"On-Chain Verification"}),"\n",(0,i.jsx)(n.p,{children:"A programming model where all computation is done off-chain to reduce the burden on the nodes in the network, but verification of the resulting data is done on-chain to enforce the smart contract rules created by the developer."}),"\n",(0,i.jsx)(n.p,{children:"Nervos uses off-chain computation and on-chain verification."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-159",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#on-chain-computation",children:"On-Chain Computation"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"open-transaction",children:"Open Transaction"}),"\n",(0,i.jsx)(n.p,{children:"A signed piece of a transaction that is incomplete and invalid on its own. When combined with other signed transaction pieces can form a complete transaction which can be processed."}),"\n",(0,i.jsx)(n.p,{children:"One use of open transactions is to create the functionality required for a trustless decentalized exchange."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-160",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cryptographic-signature",children:"Cryptographic Signature"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"optimistic-rollup",children:"Optimistic Rollup"}),"\n",(0,i.jsx)(n.p,{children:"A rollup of transactions that use fraud proofs to offer increased layer 2 transaction throughput while using the security and data availability provided by layer 1."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-161",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-1",children:"Layer 1"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#layer-2",children:"Layer 2"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan",children:"Orphan"}),"\n",(0,i.jsx)(n.p,{children:"A shorthand name for Orphan Block."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-43",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan-block",children:"Orphan Block"}),"\n",(0,i.jsx)(n.p,{children:"An orphan block is a valid block that is not included in the main fork due to, for example, a lag within the network itself. There can be two miners who solve a block simultaneously in NC-Max. They are non-main-chain blocks, also known as stale blocks."}),"\n",(0,i.jsx)(n.p,{children:"In Nervos, orphan blocks are better described as Uncles."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-44",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan",children:"Orphan"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-162",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block",children:"Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan-rate",children:"Orphan Rate"}),"\n",(0,i.jsx)(n.p,{children:"A measure of the speed at which Orphan blocks occur within the blockchain network."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-163",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan_rate_target",children:(0,i.jsx)(n.code,{children:"orphan_rate_target"})})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan_rate_target",children:(0,i.jsx)(n.code,{children:"orphan_rate_target"})}),"\n",(0,i.jsx)(n.p,{children:"The estimated orphan block rate specified in NC-max. Set as 2.5% in CKB."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"// o_ideal = 1/40 = 2.5%\npub(crate) const DEFAULT_ORPHAN_RATE_TARGET: (u32, u32) = (1, 40);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-164",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"orphan-transactions",children:"Orphan Transactions"}),"\n",(0,i.jsx)(n.p,{children:"Orphan transactions are those whose parental transactions are missing at the time that they are processed. These transactions are not propagated to other nodes until all of their missing parents are received, and they thus end up languishing in a local buffer until evicted or their parents are found."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-165",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"outbound-connection",children:"Outbound Connection"}),"\n",(0,i.jsx)(n.p,{children:'Also knowns as "outgoing connection".'}),"\n",(0,i.jsx)(n.p,{children:"A TCP connection is outgoing for the node if it was initiated (sent the TCP SYN packet) by the node in the context."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-166",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#inbound-connection",children:"Inbound Connection"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"outpoint",children:"Outpoint"}),"\n",(0,i.jsx)(n.p,{children:"A particular output Cell in a transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-167",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#output",children:"Output"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"output",children:"Output"}),"\n",(0,i.jsx)(n.p,{children:"A Live Cell that is created in a transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-168",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#live-cell",children:"Live Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"overlord",children:"Overlord"}),"\n",(0,i.jsx)(n.p,{children:"A byzantine fault tollerant consensus algorithm designed by Nervos for Huobi which can support thousands of transactions per second."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-169",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://medium.com/nervosnetwork/overlord-a-new-consensus-algorithm-3cc51690d269",children:"Overlord on Medium"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"p2wsh",children:"P2WSH"}),"\n",(0,i.jsxs)(n.p,{children:["A Pay-to-Witness-Script-Hash (P2WSH) is a type of Bitcoin transaction similar to a ",(0,i.jsx)(n.a,{href:"https://en.bitcoin.it/wiki/Pay_to_script_hash",children:"P2SH"})," transaction in most ways, except that it uses ",(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/SegWit",children:"SegWit"}),"."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"permanent_difficulty_in_dummy",children:(0,i.jsx)(n.code,{children:"permanent_difficulty_in_dummy"})}),"\n",(0,i.jsxs)(n.p,{children:["Keeps the difficulty permanent if PoW is dummy when dev-chain disables NC-MAX difficulty adjustment. As ",(0,i.jsx)(n.code,{children:"boolean"}),", it can be enabled through configuration."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-170",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#difficulty",children:"Difficulty"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"polyjuice",children:"Polyjuice"}),"\n",(0,i.jsx)(n.p,{children:"Polyjuice provides an Ethereum compatible runtime on Godwoken."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-171",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#godwoken",children:"Godwoken"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/polyjuice",children:"Polyjuice on GitHub"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"primary_epoch_reward_halving_interval",children:(0,i.jsx)(n.code,{children:"primary_epoch_reward_halving_interval"})}),"\n",(0,i.jsx)(n.p,{children:"The halving cycle of epoch reward in CKB base issuance, typically every four years. The mining reward halves when the halving interval occurs."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const DEFAULT_PRIMARY_EPOCH_REWARD_HALVING_INTERVAL: EpochNumber =\n4 * 365 * 24 * 60 * 60 / DEFAULT_EPOCH_DURATION_TARGET; // every 4 years\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-172",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#initial_primary_epoch_reward",children:(0,i.jsx)(n.code,{children:"initial_primary_epoch_reward"})})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proposal-zone",children:"Proposal Zone"}),"\n",(0,i.jsx)(n.p,{children:"Section of the block that contains transaction proposals."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-173",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#commitment-zone",children:"Commitment Zone"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#propose",children:"Propose"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"propose",children:"Propose"}),"\n",(0,i.jsx)(n.p,{children:"The process of taking an unconfirmed transaction out of the mempool and proposing it for commitment. A transaction is not confirmed until after it has been committed."}),"\n",(0,i.jsx)(n.p,{children:"Miners are incentivized to propose transactions by being paid a proposal reward."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-174",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#commit",children:"Commit"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mempool",children:"Mempool"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-reward",children:"Proposal Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-zone",children:"Proposal Zone"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"proposer_reward_ratio",children:(0,i.jsx)(n.code,{children:"proposer_reward_ratio"})}),"\n",(0,i.jsx)(n.p,{children:"The reward ratio from transaction fees for miners who submit proposals specified by NC-Max. It is set as 40% in CKB, meaning the miner who first submits the transaction proposal will be rewarded with 40% of the transaction fee."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"const PROPOSER_REWARD_RATIO: Ratio = Ratio::new(4, 10);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-175",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#proposal-reward",children:"Proposal Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"risc-v",children:"RISC-V"}),"\n",(0,i.jsx)(n.p,{children:"An open standard instruction set architecture (ISA) for general computing."}),"\n",(0,i.jsx)(n.p,{children:"RISC-V is the instruction set used by the CKB-VM."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-176",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb-vm",children:"CKB-VM"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/RISC-V",children:"RISC-V on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"schnorr-signature",children:"Schnorr Signature"}),"\n",(0,i.jsx)(n.p,{children:"A cryptographic signature scheme for signing and verification."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-177",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Schnorr_signature",children:"Schnorr Signature on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"script",children:"Script"}),"\n",(0,i.jsx)(n.p,{children:"A script in Nervos CKB is a binary executable on the CKB-VM. Compared to Bitcoin script, CKB script is Turing-complete, equivalent to smart contract. A Script can be one of two types:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Lock Script - Used to control ownership and access to a Cell."}),"\n",(0,i.jsx)(n.li,{children:"Type Script - Used to control how a Cell is used in a transaction."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-178",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#risc-v",children:"CKB-VM"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#risc-v",children:"RISC-V"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",children:"ELF on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secondary_epoch_reward",children:(0,i.jsx)(n.code,{children:"secondary_epoch_reward"})}),"\n",(0,i.jsxs)(n.p,{children:["The secondary reward per epoch. Issued according to CKB\u2019s tokenomics detailed in ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0015-ckb-cryptoeconomics/0015-ckb-cryptoeconomics.md",children:"RFC0015"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Secondary issuance is designed to collect state rent, and has an issuance amount that is constant over time. After base issuance stops, there will only be secondary issuance."}),"\n",(0,i.jsx)(n.p,{children:"Secondary issuance has two parts. One is a fixed amount of base incentive (approximately 134.4 million CKBytes per year), while the other varies according to the number of CKBytes currently occupied."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const DEFAULT_SECONDARY_EPOCH_REWARD: Capacity = Capacity::shannons(613_698_63013698);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-179",children:"See also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#initial_primary_epoch_reward",children:(0,i.jsx)(n.code,{children:"initial_primary_epoch_reward"})})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-reward",children:"Secondary Reward"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#secondary-issuance",children:"Secondary Issuance"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secp256k1_blake160_sighash_all_type_hash",children:(0,i.jsx)(n.code,{children:"secp256k1_blake160_sighash_all_type_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["Type hash of ",(0,i.jsx)(n.code,{children:"secp256k1_blake160_sighash_all"})," in ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#ckb-genesis-script-list",children:"CKB genesis scripts"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Find more details ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#secp256k1blake160",children:"here"}),"."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"secp256k1_blake160_multisig_all_type_hash",children:(0,i.jsx)(n.code,{children:"secp256k1_blake160_multisig_all_type_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["Type hash of ",(0,i.jsx)(n.code,{children:"secp256k1_blake160_multisig_all"})," in ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#ckb-genesis-script-list",children:"CKB genesis scripts"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Find more details ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#secp256k1multisig",children:"here"}),"."]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"seed-cell",children:"Seed Cell"}),"\n",(0,i.jsx)(n.p,{children:"A design pattern on Nervos from creating unique identifiers used to create unforgeable assets."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-180",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"shannon",children:"Shannon"}),"\n",(0,i.jsx)(n.p,{children:"A fractional denomination of CKBytes. One CKByte is equal to 100,000,000 Shannons."}),"\n",(0,i.jsx)(n.p,{children:"A Shannon is the equivalent of a Bitcoin Satoshi."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-181",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbyte",children:"CKByte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#common-knowledge-byte",children:"Common Knowledge Byte"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://developer.bitcoin.org/glossary.html",children:"Satoshi (denomination) on Bitcoin.org"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"short-address",children:"Short Address"}),"\n",(0,i.jsx)(n.p,{children:"An address format on Nervos that does not include a code hash of the associated lock script, instead using one of the many common lock scripts."}),"\n",(0,i.jsx)(n.p,{children:'The short address format is the most common address format used, and is often referred to as simply "address".'}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-45",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#address",children:"Address"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-182",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#code-hash",children:"Code Hash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#full-address",children:"Full Address"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"simple-udt",children:"Simple UDT"}),"\n",(0,i.jsx)(n.p,{children:"A standard that defines a the most basic implementation of a UDT fungible token on Nervos."}),"\n",(0,i.jsx)(n.p,{children:"An sUDT on Nervos is the equivalent of Ethereum tokens standards ERC20 or ERC777."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-46",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#sudt",children:"SUDT"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-183",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#token",children:"Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-20",children:"ERC20 on Ethereum.org"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0025-simple-udt/0025-simple-udt.md",children:"Simple UDT RFC on Nervos Nerwork Github"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"since",children:"Since"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"since"})," is the u64 (unsigned 64-bit integer) field in transaction input for preventing inclusion before a certain block timestamp or a block number."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-184",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"spv",children:"SPV"}),"\n",(0,i.jsx)(n.p,{children:"An abbreviation for Simplified Payment Verification. A protocol for using a blockchain cryptocurrency without having to operate a full node."}),"\n",(0,i.jsx)(n.p,{children:"SPV clients require far less data to be stored, but also must requires the trust of the network clients it is connected to directly."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-185",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#spv-wallet",children:"SPV Wallet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.bitcoinwiki.org/wiki/Simplified_Payment_Verification",children:"Simplified Payment Verification on BitcoinWiki"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"spv-wallet",children:"SPV Wallet"}),"\n",(0,i.jsx)(n.p,{children:"A light-weight cryptocurrency wallet that uses the SPV protocol."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-186",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#spv",children:"SPV"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"sudt",children:"SUDT"}),"\n",(0,i.jsx)(n.p,{children:"An abbreviation for Simple UDT."}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-47",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#simple-udt",children:"Simple UDT"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"testnet",children:"Testnet"}),"\n",(0,i.jsxs)(n.p,{children:["Short for \u201ctest network,\u201d a network used to simulate the behavior of the ",(0,i.jsx)(n.a,{href:"#mainnet",children:"Mainnet"}),". The name of the Nervos CKB Testnet is ",(0,i.jsx)(n.a,{href:"#aggron",children:"Aggron"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-48",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#aggron",children:"Aggron"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"not-to-be-confused-with-6",children:"Not To Be Confused With"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lina",children:"Lina"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#mainnet",children:"Mainnet"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-confirmation-number",children:"Transaction Confirmation Number"}),"\n",(0,i.jsx)(n.p,{children:"The number of confirmations required for a transaction to be added to a block."}),"\n",(0,i.jsxs)(n.p,{children:["As permissionless blockchain designs offer only probabilistic finality, a transaction can never be fully confirmed, facing an adversary with infinite computational power. Therefore, users and apps can choose a number they deem secure. We briefly discuss one factor here that influences the level of security: the recent orphan rate. It takes 6 confirmations to fully settle a transaction when the orphan rate is 0, and 24 confirmations when the rate reaches 2.5% to achieve the same level of security (See the rationale and calculation ",(0,i.jsx)(n.a,{href:"https://nervos-ckb-docs-git-v1-cryptape.vercel.app/docs/essays/tx-confirmation/",children:"here"}),")."]}),"\n",(0,i.jsxs)(n.p,{children:["In blockchain settlement assurance, transaction confirmation is one of the variables that cannot be easily quantified (See Nic Carter\u2019s ",(0,i.jsx)(n.a,{href:"https://medium.com/@nic__carter/its-the-settlement-assurances-stupid-5dcd1c3f4e41",children:"article"}),"). The exact number is open to adjustment depending on the security level that users desire. Nervos CKB sets a minimum of 15 confirmations, which should be considered conservative."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-187",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#confirmation",children:"Confirmation"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#nc-max",children:"NC-Max"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-hash",children:"Transaction Hash"}),"\n",(0,i.jsx)(n.p,{children:"Transaction hash, or Txhash, is the unique identifier of a transaction in a blockchain that acts as a record or proof that the transaction has taken place. To get a transaction hash in CKB, the transaction is serialized via Molecule, then the serialized raw is feed to ckbhash function. Its schema is:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"table Transaction {\n raw: RawTransaction,\n witnesses: BytesVec,\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Transaction hash is generated by the serialized ",(0,i.jsx)(n.code,{children:"raw"})," structure through ",(0,i.jsx)(n.a,{href:"#ckbhash",children:"ckbhash"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-188",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-witness-hash",children:"Transaction Witness Hash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#molecule",children:"Molecule"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0027-block-structure/0027-block-structure.md#transaction-hash",children:"Transaction Hash in RFC on Nervos Network Github"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-witness-hash",children:"Transaction Witness Hash"}),"\n",(0,i.jsxs)(n.p,{children:["Transaction witness hash is generated by the serialized transaction through ckbhash. Transaction is serialized via ",(0,i.jsx)(n.a,{href:"#molecule",children:"molecule"})," in CKB. Its schema is:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"table Transaction {\n raw: RawTransaction,\n witnesses: BytesVec,\n}\n"})}),"\n",(0,i.jsx)(n.h4,{id:"see-also-189",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-hash",children:"Transaction Hash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#molecule",children:"Molecule"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"transaction-root",children:"Transaction Root"}),"\n",(0,i.jsxs)(n.p,{children:["The field ",(0,i.jsx)(n.code,{children:"transactions_root"})," in header is"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"ckbhash(T || W)\n"})}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"ckbhash"})," is the hash function, ",(0,i.jsx)(n.code,{children:"||"})," denotes binary concatenation."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["T is the root of a ",(0,i.jsx)(n.a,{href:"#ckb-merkle-tree",children:"CKB Merkle Tree"}),", which items are the ",(0,i.jsx)(n.a,{href:"#transaction-hash",children:"transaction hashes"})," of all the transactions in the block."]}),"\n",(0,i.jsxs)(n.p,{children:["W is also the root of a ",(0,i.jsx)(n.a,{href:"#ckb-merkle-tree",children:"CKB Merkle Tree"}),", but the items are the ",(0,i.jsx)(n.a,{href:"#transaction-witness-hash",children:"Transaction Witness Hash"})," of all the transactions in the block."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-190",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckbhash",children:"Ckbhash"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb-merkle-tree",children:"CKB Merkle Tree"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction-witness-hash",children:"Transaction Witness Hash"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tx_proposal_window",children:(0,i.jsx)(n.code,{children:"tx_proposal_window"})}),"\n",(0,i.jsx)(n.p,{children:"Interval for submitting proposals in the second stage specified by NC-Max. Set between 2 and 10 blocks in CKB."}),"\n",(0,i.jsx)("img",{src:(0,r.A)("img/tx-proposal-window.png")}),"\n",(0,i.jsx)(n.p,{children:"As shown above, when a transaction is first proposed in Block 13, it can be committed in the window between Block 15 and Block 23."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub(crate) const TX_PROPOSAL_WINDOW: ProposalWindow = ProposalWindow(2, 10);\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"tx_version",children:(0,i.jsx)(n.code,{children:"tx_version"})}),"\n",(0,i.jsx)(n.p,{children:"The version of a transaction. This field is set to 0 and is reserved for the system."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"pub const TX_VERSION: Version = 0;\n"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"type_id",children:(0,i.jsx)(n.code,{children:"type_id"})}),"\n",(0,i.jsxs)(n.p,{children:["One of the CKB ",(0,i.jsx)(n.code,{children:"system_scripts"}),". A unique feature of Type ID is that it\u2018s a CKB built-in script directly implemented in Rust. It doesn't run in CKB-VM but can be used in the same way as other ",(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#type-id",children:"CKB genesis scripts"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For a deeper understanding of Type ID, check out this blog post: ",(0,i.jsx)(n.a,{href:"https://xuejie.space/2020_02_03_introduction_to_ckb_script_programming_type_id/",children:"Introduction to CKB Script Programming 6: Type ID"})," (also translated into ",(0,i.jsx)(n.a,{href:"https://talk.nervos.org/t/ckb-type-id/4258",children:"Chinese"}),")."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-191",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"type_id_code_hash",children:(0,i.jsx)(n.code,{children:"type_id_code_hash"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"code_hash"})," of ",(0,i.jsx)(n.code,{children:"type_id"}),". In view of the specificity of ",(0,i.jsx)(n.code,{children:"type_id"}),", ",(0,i.jsx)(n.code,{children:"type_id_code_hash"})," is hard-coded, not the hash of the actual code."]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-192",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type_id",children:(0,i.jsx)(n.code,{children:"type_id"})})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"type-script",children:"Type Script"}),"\n",(0,i.jsx)(n.p,{children:"A script that enforces the rules that must be followed in a transaction for a Cell to be consumed as an input or for a Cell to be created as an output."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-193",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script-hash",children:"Type Script Hash"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"type-script-hash",children:"Type Script Hash"}),"\n",(0,i.jsxs)(n.p,{children:["Or ",(0,i.jsx)(n.code,{children:"type_hash"}),", a Blake2b hash of a Type Script which is used as an identifier for the Script when referenced by a Cell."]}),"\n",(0,i.jsxs)(n.p,{children:["The two entities in the data structure of CKB\u2019s Cell are ",(0,i.jsx)(n.code,{children:"lock"})," and ",(0,i.jsx)(n.code,{children:"type"}),". Type scripts can capture any validation logic needed in the Offtransformation."]}),"\n",(0,i.jsx)(n.p,{children:"Type scripts can implement economic constructs as well. NervosDAO is completely implemented as a type script with minimal support from the consensus layer."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-194",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#cell",children:"Cell"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#script",children:"Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb-system-scripts/blob/66d7da8ec72dffaa7e9c55904833951eca2422a9/c/dao.c",children:"NervosDAO"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"uncle",children:"Uncle"}),"\n",(0,i.jsx)(n.p,{children:"Or Uncle Block. Uncle blocks are created when two blocks are mined and submitted to the ledger at roughly the same time. Only one can enter the ledger as an included block, and the other does not."}),"\n",(0,i.jsx)(n.p,{children:"Uncles are paid a reduced block reward when they are found and reported."}),"\n",(0,i.jsx)(n.p,{children:"On Nervos, Uncles are tracked by consensus to adjust the block interval of the network."}),"\n",(0,i.jsx)(n.p,{children:"An uncle block has to meet the following conditions:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"An uncle should not be on the main chain; in other words, it should not be an uncle if it includes any block from the main chain."}),"\n",(0,i.jsx)(n.li,{children:"Uncle\u2019s block number must be smaller than the block\u2018s number that later includes it."}),"\n",(0,i.jsx)(n.li,{children:"Uncle\u2018s parent must be on the main chain, or uncle\u2019s parent must also be an uncle. In other words, uncle must be linkable to the main chain in any way. It can never be a random block that is not on the main chain."}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"- if !snapshot.is_main_chain(&uncle.hash()) // It should not be on the main chain.\n- && !snapshot.is_uncle(&uncle.hash()) // It should not be an uncle twice. \n- && uncle.number() < candidate_number // The block number of the uncle should be smaller than that of any block on the main chain. \n- && (uncles.iter().any(|u| u.hash() == parent_hash) \n|| snapshot.is_main_chain(&parent_hash) // Uncle block should not be parentless. The parent of un uncle must be a block on the main chain or another uncle. \n|| snapshot.is_uncle(&parent_hash))\n"})}),"\n",(0,i.jsx)("img",{src:(0,r.A)("img/uncle_rule.png")}),"\n",(0,i.jsx)(n.p,{children:"As illustrated above, A is the main chain. B3 can be the uncle of A4 (to be included in A4), since B3 is linked to A2. However, B4 cannot be included in A4, since the uncle\u2019s block number must be smaller than A4, the current block on the main chain."}),"\n",(0,i.jsx)(n.p,{children:"Similarly, B4 can be the uncle of A5 (be included by A5). Although B4\u2018s parent, B3, is not on the main chain, B3 is the uncle of A4. For this reason, B4 is a legal uncle, and B3 cannot be included by A5."}),"\n",(0,i.jsx)(n.p,{children:"C2 and C3 cannot be linked to the main chain as their parent is unknown, therefore, they cannot be uncles."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-195",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#max_uncles_num",children:(0,i.jsx)(n.code,{children:"max_uncles_num"})})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"synonyms-49",children:"Synonyms"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-block",children:"Orphan Block"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"see-also-196",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#block-interval",children:"Block Interval"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"uncle-rate",children:"Uncle Rate"}),"\n",(0,i.jsx)(n.h4,{id:"see-also-197",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#orphan-rate",children:"Orphan Rate"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#uncle",children:"Uncle"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"validator",children:"Validator"}),"\n",(0,i.jsx)(n.p,{children:"A script that is used to ensure that the transactions created by the generators are valid. Validators are scripts that run in CKB-VM as either lock scripts or type scripts."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-198",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#ckb-vm",children:"CKB-VM"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#lock-script",children:"Lock Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#type-script",children:"Type Script"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"witness",children:"Witness"}),"\n",(0,i.jsx)(n.p,{children:"A set of cryptographic proof containing the data required to prove authorization of the resources used in the transaction."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-199",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"xudt",children:"XUDT"}),"\n",(0,i.jsx)(n.p,{children:"An extended UDT standard upon sUDT (Simple UDT) to accommodate additional functionalities, including regulatory compliance. Also written as Extensible UDT."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-200",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#user-defined-token",children:"User-Defined Token"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#simple-udt",children:"Simple UDT"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#udt",children:"UDT"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"zk-snark",children:"Zk-SNARK"}),"\n",(0,i.jsx)(n.p,{children:"A form of cryptographic proof, that when used in cryptocurrencies, allows for privacy features which do not reveal the amounts or participants in transactions."}),"\n",(0,i.jsx)(n.p,{children:"Zk-SNARKs require a trusted setup, but are otherwise trustless."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-201",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#zk-stark",children:"Zk-STARK"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Non-interactive_zero-knowledge_proof",children:"Non-interactive zero-knowledge proofs on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"zk-stark",children:"Zk-STARK"}),"\n",(0,i.jsx)(n.p,{children:"A form of cryptographic proof, that when used in cryptocurrencies, allows for privacy features which do not reveal the amounts or participants in transactions."}),"\n",(0,i.jsx)(n.p,{children:"Unlike Zk-SNARKs, Zk-STARKs do not require a trusted setup."}),"\n",(0,i.jsx)(n.h4,{id:"see-also-202",children:"See Also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#transaction",children:"Transaction"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#zk-snark",children:"Zk-SNARK"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Non-interactive_zero-knowledge_proof",children:"Non-interactive zero-knowledge proofs on Wikipedia"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{})]})}function x(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var i=s(6540);const l={},r=i.createContext(l);function o(e){const n=i.useContext(r);return i.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(l):e.components||l:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/631c4dd6.fb371316.js b/assets/js/631c4dd6.45a76bba.js similarity index 97% rename from assets/js/631c4dd6.fb371316.js rename to assets/js/631c4dd6.45a76bba.js index d784f33e0..888dc0883 100644 --- a/assets/js/631c4dd6.fb371316.js +++ b/assets/js/631c4dd6.45a76bba.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[516],{5774:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>l,frontMatter:()=>n,metadata:()=>s,toc:()=>d});var i=r(4848),c=r(8453);const n={id:"intro-to-script",title:"Intro to Script",sidebar_position:1},o="Intro to Script",s={id:"Script/intro-to-script",title:"Intro to Script",description:"A Script in Nervos CKB is a binary executable that can be executed on-chain. It is Turing-complete and can perform arbitray logic to guard and protect your on-chain assets. You can think of it as smart contract.",source:"@site/docs/Script/intro-to-script.mdx",sourceDirName:"Script",slug:"/Script/intro-to-script",permalink:"/docs/Script/intro-to-script",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Script/intro-to-script.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:1,frontMatter:{id:"intro-to-script",title:"Intro to Script",sidebar_position:1},sidebar:"tutorial",previous:{title:"Scripts",permalink:"/docs/Script/"},next:{title:"Program Languages for Script",permalink:"/docs/Script/program-language-for-script"}},a={},d=[{value:"How a Script Work",id:"how-a-script-work",level:2},{value:"Script Types",id:"script-types",level:2},{value:"Script Structure",id:"script-structure",level:2}];function p(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,c.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"intro-to-script",children:"Intro to Script"}),"\n",(0,i.jsxs)(t.p,{children:["A ",(0,i.jsx)(t.a,{href:"/docs/concepts/glossary#script",children:"Script"})," in Nervos CKB is a binary executable that can be executed on-chain. It is Turing-complete and can perform arbitray logic to guard and protect your on-chain assets. You can think of it as smart contract."]}),"\n",(0,i.jsx)(t.h2,{id:"how-a-script-work",children:"How a Script Work"}),"\n",(0,i.jsxs)(t.p,{children:["When executing a Script, CKB takes the executables and runs them in a virtual machine environment called ",(0,i.jsx)(t.a,{href:"/docs/concepts/ckb-vm",children:"CKB-VM"}),". After the execution, if the program returns a code of 0, we consider the Script successful; any non-zero return codes will be considered Script failures."]}),"\n",(0,i.jsx)(t.p,{children:"When you submit a transaction to CKB, it executes all the Scripts from the transaction to ensure that each Script succeeds. If any Script fails, the transaction will not be included on-chain."}),"\n",(0,i.jsx)(t.p,{children:"In this way, we can allow the Cell to carry different Scripts to perform various validations for the current transaction, similar to how smart contracts work in other blockchains."}),"\n",(0,i.jsx)(t.h2,{id:"script-types",children:"Script Types"}),"\n",(0,i.jsx)(t.p,{children:"A Script can be one of two types:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Lock Script - Used to control ownership and access to a Cell."}),"\n",(0,i.jsx)(t.li,{children:"Type Script - Used to control how a Cell is used in a transaction."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"In most cases, Lock Script works the same with Type Script. The difference is that, only the Lock Script from the input Cells will be exeuted in the transaction, while the Type Script from both the input Cells and output Cells will be executed in the transaction."}),"\n",(0,i.jsx)(t.p,{children:"This difference has lead to the different usecases of Lock Script and Type Script as we have mentioned above. Lock Script is often used to control owener ship of a Cell while Type Script defines what kinds of changes of a Cell is valid for the transaction."}),"\n",(0,i.jsx)(t.h2,{id:"script-structure",children:"Script Structure"}),"\n",(0,i.jsx)(t.p,{children:"Script has the following structure:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"pub struct Script {\n pub code_hash: H256,\n pub hash_type: ScriptHashType,\n pub args: JsonBytes,\n}\n"})}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"code_hash"})," serves to identify a Script code, allowing the ",(0,i.jsx)(t.code,{children:"CKB-VM"})," to load the binary code of the Script correctly."]}),"\n",(0,i.jsxs)(t.p,{children:["A Script also includes the ",(0,i.jsx)(t.code,{children:"args"})," part, which differentiates one Script from another using the same Script code. The ",(0,i.jsx)(t.code,{children:"args"})," can provide additional arguments for a CKB Script; for example, while multiple users might utilize the same default Lock Script code, each user can have their own public key hash stored in ",(0,i.jsx)(t.code,{children:"args"}),". This setup allows each user to have a unique Lock Script while sharing the same Lock Script code."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.code,{children:"hash_type"})," indicates the method CKB-VM uses to locate the Script code for a Script. Possible values include ",(0,i.jsx)(t.code,{children:"type"}),", ",(0,i.jsx)(t.code,{children:"data"}),", ",(0,i.jsx)(t.code,{children:"data1"}),", and ",(0,i.jsx)(t.code,{children:"data2"}),". Each specifies a different way of referencing the required Script code."]})]})}function l(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>o,x:()=>s});var i=r(6540);const c={},n=i.createContext(c);function o(e){const t=i.useContext(n);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),i.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[516],{5774:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>l,frontMatter:()=>n,metadata:()=>s,toc:()=>d});var i=r(4848),c=r(8453);const n={id:"intro-to-script",title:"Intro to Script",sidebar_position:1},o="Intro to Script",s={id:"Script/intro-to-script",title:"Intro to Script",description:"A Script in Nervos CKB is a binary executable that can be executed on-chain. It is Turing-complete and can perform arbitray logic to guard and protect your on-chain assets. You can think of it as smart contract.",source:"@site/docs/Script/intro-to-script.mdx",sourceDirName:"Script",slug:"/Script/intro-to-script",permalink:"/docs/Script/intro-to-script",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Script/intro-to-script.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:1,frontMatter:{id:"intro-to-script",title:"Intro to Script",sidebar_position:1},sidebar:"tutorial",previous:{title:"Scripts",permalink:"/docs/Script/"},next:{title:"Program Languages for Script",permalink:"/docs/Script/program-language-for-script"}},a={},d=[{value:"How a Script Work",id:"how-a-script-work",level:2},{value:"Script Types",id:"script-types",level:2},{value:"Script Structure",id:"script-structure",level:2}];function p(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,c.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"intro-to-script",children:"Intro to Script"}),"\n",(0,i.jsxs)(t.p,{children:["A ",(0,i.jsx)(t.a,{href:"/docs/concepts/glossary#script",children:"Script"})," in Nervos CKB is a binary executable that can be executed on-chain. It is Turing-complete and can perform arbitray logic to guard and protect your on-chain assets. You can think of it as smart contract."]}),"\n",(0,i.jsx)(t.h2,{id:"how-a-script-work",children:"How a Script Work"}),"\n",(0,i.jsxs)(t.p,{children:["When executing a Script, CKB takes the executables and runs them in a virtual machine environment called ",(0,i.jsx)(t.a,{href:"/docs/concepts/ckb-vm",children:"CKB-VM"}),". After the execution, if the program returns a code of 0, we consider the Script successful; any non-zero return codes will be considered Script failures."]}),"\n",(0,i.jsx)(t.p,{children:"When you submit a transaction to CKB, it executes all the Scripts from the transaction to ensure that each Script succeeds. If any Script fails, the transaction will not be included on-chain."}),"\n",(0,i.jsx)(t.p,{children:"In this way, we can allow the Cell to carry different Scripts to perform various validations for the current transaction, similar to how smart contracts work in other blockchains."}),"\n",(0,i.jsx)(t.h2,{id:"script-types",children:"Script Types"}),"\n",(0,i.jsx)(t.p,{children:"A Script can be one of two types:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Lock Script - Used to control ownership and access to a Cell."}),"\n",(0,i.jsx)(t.li,{children:"Type Script - Used to control how a Cell is used in a transaction."}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"In most cases, Lock Script works the same with Type Script. The difference is that, only the Lock Script from the input Cells will be exeuted in the transaction, while the Type Script from both the input Cells and output Cells will be executed in the transaction."}),"\n",(0,i.jsx)(t.p,{children:"This difference has lead to the different usecases of Lock Script and Type Script as we have mentioned above. Lock Script is often used to control owener ship of a Cell while Type Script defines what kinds of changes of a Cell is valid for the transaction."}),"\n",(0,i.jsx)(t.h2,{id:"script-structure",children:"Script Structure"}),"\n",(0,i.jsx)(t.p,{children:"Script has the following structure:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-rust",children:"pub struct Script {\n pub code_hash: H256,\n pub hash_type: ScriptHashType,\n pub args: JsonBytes,\n}\n"})}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"code_hash"})," serves to identify a Script code, allowing the ",(0,i.jsx)(t.code,{children:"CKB-VM"})," to load the binary code of the Script correctly."]}),"\n",(0,i.jsxs)(t.p,{children:["A Script also includes the ",(0,i.jsx)(t.code,{children:"args"})," part, which differentiates one Script from another using the same Script code. The ",(0,i.jsx)(t.code,{children:"args"})," can provide additional arguments for a CKB Script; for example, while multiple users might utilize the same default Lock Script code, each user can have their own public key hash stored in ",(0,i.jsx)(t.code,{children:"args"}),". This setup allows each user to have a unique Lock Script while sharing the same Lock Script code."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.code,{children:"hash_type"})," indicates the method CKB-VM uses to locate the Script code for a Script. Possible values include ",(0,i.jsx)(t.code,{children:"type"}),", ",(0,i.jsx)(t.code,{children:"data"}),", ",(0,i.jsx)(t.code,{children:"data1"}),", and ",(0,i.jsx)(t.code,{children:"data2"}),". Each specifies a different way of referencing the required Script code."]})]})}function l(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>o,x:()=>s});var i=r(6540);const c={},n=i.createContext(c);function o(e){const t=i.useContext(n);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:o(e.components),i.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/65413b96.b07b637b.js b/assets/js/65413b96.b07b637b.js new file mode 100644 index 000000000..6d3df8ba1 --- /dev/null +++ b/assets/js/65413b96.b07b637b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[267],{5466:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>s,metadata:()=>u,toc:()=>d});var r=t(4848),a=t(8453),i=(t(8180),t(9489)),o=t(7227);const s={id:"run-mainnet-node",title:"Run a Mainnet Node",sidebar_position:1},l="Run a Mainnet Node",u={id:"Node/run-mainnet-node",title:"Run a Mainnet Node",description:"Running a Mainnet node allows you to participate directly in the live blockchain, supporting the network's operation and integrity. This guide will cover the steps needed to set up and run a mainnet node on CKB, which is ideal for those looking to be actively involved in the network's governance and day-to-day activities. We suggest a minimum of 100GB of local storage for this purpose.",source:"@site/docs/Node/run-mainnet-node.mdx",sourceDirName:"Node",slug:"/Node/run-mainnet-node",permalink:"/docs/Node/run-mainnet-node",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Node/run-mainnet-node.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:1,frontMatter:{id:"run-mainnet-node",title:"Run a Mainnet Node",sidebar_position:1},sidebar:"tutorial",previous:{title:"Run Node",permalink:"/docs/Node/"},next:{title:"Run a Testnet Node",permalink:"/docs/Node/run-testnet-node"}},c={},d=[{value:"Step 1: Download CKB Binary",id:"step-1-download-ckb-binary",level:2},{value:"Step 2: Navigate to CKB Directory",id:"step-2-navigate-to-ckb-directory",level:2},{value:"Step 3: Verify versions",id:"step-3-verify-versions",level:2},{value:"Step 4: Initialize Node",id:"step-4-initialize-node",level:2},{value:"Step 5: Start the CKB Mainnet Node",id:"step-5-start-the-ckb-mainnet-node",level:2},{value:"Track Your Node",id:"track-your-node",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"run-a-mainnet-node",children:"Run a Mainnet Node"}),"\n",(0,r.jsx)(n.p,{children:"Running a Mainnet node allows you to participate directly in the live blockchain, supporting the network's operation and integrity. This guide will cover the steps needed to set up and run a mainnet node on CKB, which is ideal for those looking to be actively involved in the network's governance and day-to-day activities. We suggest a minimum of 100GB of local storage for this purpose."}),"\n",(0,r.jsx)(n.h2,{id:"step-1-download-ckb-binary",children:"Step 1: Download CKB Binary"}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["We will use ",(0,r.jsx)(n.strong,{children:"ckb_v0.115.0"})," for this guide. Please ensure you download the latest version corresponding to your operating system."]})}),"\n",(0,r.jsxs)(n.p,{children:["Get the latest CKB binary from ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/releases",children:"Github releases"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"step-2-navigate-to-ckb-directory",children:"Step 2: Navigate to CKB Directory"}),"\n",(0,r.jsx)(n.p,{children:"Unzip the downloaded file to an easily accessible folder, e.g., C:\\ckb for Windows, ~/Documents for Mac. Open your terminal/command line and navigate to your CKB directory using the following command:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"mac",label:"Mac",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" cd /Users/(NAME)/Documents/ckb_v0.115.0-rc3_aarch64-apple-darwin-portable/ckb\n"})})}),(0,r.jsx)(o.A,{value:"windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" cd C:/ckb_v0.115.0_x86_64-pc-windows-msvc\n"})})})]}),"\n",(0,r.jsx)(n.h2,{id:"step-3-verify-versions",children:"Step 3: Verify versions"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"check-version",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb --version\n ckb-cli --version\n"})})}),(0,r.jsx)(o.A,{value:"verify-version",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb 0.115.0 (d845cbf 2024-04-01)\n ckb-cli 1.8.0-rc1 (cf4159b 2024-03-28)\n"})})})]}),"\n",(0,r.jsx)(n.h2,{id:"step-4-initialize-node",children:"Step 4: Initialize Node"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb init --chain mainnet\n"})}),"\n",(0,r.jsx)(n.h2,{id:"step-5-start-the-ckb-mainnet-node",children:"Step 5: Start the CKB Mainnet Node"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb run\n"})}),"\n",(0,r.jsx)(n.p,{children:"By following these steps, you've successfully started a CKB node connected to the mainnet. This node will participate in the network, contributing to its security and robustness."}),"\n",(0,r.jsx)(n.h2,{id:"track-your-node",children:"Track Your Node"}),"\n",(0,r.jsxs)(n.p,{children:["Track your node using ",(0,r.jsx)(n.a,{href:"https://nodes.ckb.dev/",children:"CKB Node Probe"})," and view the global distribution of active CKB nodes."]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},7227:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var r=t(8215);const a={tabItem:"tabItem_Ymn6"};var i=t(4848);function o(e){var n=e.children,t=e.hidden,o=e.className;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,o),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>j});var r=t(6540),a=t(8215),i=t(4245),o=t(6347),s=t(6494),l=t(2814),u=t(5167),c=t(1269);function d(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return d(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,u.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function v(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,i=(0,o.W6)(),s=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:a});return[(0,l.aZ)(s),(0,r.useCallback)((function(e){if(s){var n=new URLSearchParams(i.location.search);n.set(s,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[s,i])]}function b(e){var n,t,a,i,o=e.defaultValue,l=e.queryString,u=void 0!==l&&l,d=e.groupId,b=h(e),f=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:o,tabValues:b})})),m=f[0],g=f[1],y=v({queryString:u,groupId:d}),x=y[0],w=y[1],j=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),t=(0,c.Dv)(n),a=t[0],i=t[1],[a,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),k=j[0],N=j[1],C=function(){var e=null!=x?x:k;return p({value:e,tabValues:b})?e:null}();return(0,s.A)((function(){C&&g(C)}),[C]),{selectedValue:m,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);g(e),w(e),N(e)}),[w,N,b]),tabValues:b}}var f=t(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(4848);function y(e){var n=e.className,t=e.block,r=e.selectedValue,o=e.selectValue,s=e.tabValues,l=[],u=(0,i.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var n=e.currentTarget,t=l.indexOf(n),a=s[t].value;a!==r&&(u(n),o(a))},d=function(e){var n,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var r,a=l.indexOf(e.currentTarget)+1;t=null!=(r=l[a])?r:l[0];break;case"ArrowLeft":var i,o=l.indexOf(e.currentTarget)-1;t=null!=(i=l[o])?i:l[l.length-1]}null==(n=t)||n.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:s.map((function(e){var n=e.value,t=e.label,i=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return l.push(e)},onKeyDown:d,onClick:c},i,{className:(0,a.A)("tabs__item",m.tabItem,null==i?void 0:i.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function x(e){var n=e.lazy,t=e.children,a=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===a}));return o?(0,r.cloneElement)(o,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:i.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function w(e){var n=b(e);return(0,g.jsxs)("div",{className:(0,a.A)("tabs-container",m.tabList),children:[(0,g.jsx)(y,Object.assign({},e,n)),(0,g.jsx)(x,Object.assign({},e,n))]})}function j(e){var n=(0,f.A)();return(0,g.jsx)(w,Object.assign({},e,{children:d(e.children)}),String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var r=t(6540);const a={},i=r.createContext(a);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/682fa153.3f3c617d.js b/assets/js/682fa153.3f3c617d.js new file mode 100644 index 000000000..d92f4628d --- /dev/null +++ b/assets/js/682fa153.3f3c617d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[231],{890:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>a,metadata:()=>d,toc:()=>h});var o=t(4848),s=t(8453),i=t(5333),r=t(8803),c=[{title:"Nervos Blockchain",description:"A scalable, interoperable blockchain for diverse dApp development",href:"./nervos-blockchain",type:"concept"},{title:"Cell Model",description:"Flexible on-chain asset and data management structure",href:"./cell-model",type:"concept"},{title:"CKB-VM",description:"Adaptable virtual machine for secure smart contract execution",href:"./ckb-vm",type:"concept"},{title:"Consensus",description:"Secure algorithm ensuring network integrity",href:"./consensus",type:"concept"},{title:"Tokenomics",description:"Adaptive token utility and economic mechanisms",href:"./economics",type:"concept"}];const a={id:"concepts",title:"Concepts",sidebar_position:6},l="Concepts Overview",d={id:"concepts/concepts",title:"Concepts",description:"Dive deep into some foundational concepts of the Nervos network and read through a glossary to enrich your understanding of key blockchain terminologies.",source:"@site/docs/concepts/Concepts.mdx",sourceDirName:"concepts",slug:"/concepts/",permalink:"/docs/concepts/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/Concepts.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:6,frontMatter:{id:"concepts",title:"Concepts",sidebar_position:6},sidebar:"tutorial",previous:{title:"Run a Public RPC Node",permalink:"/docs/Node/run-public-rpc-node"},next:{title:"Nervos Blockchain",permalink:"/docs/concepts/nervos-blockchain"}},p={},h=[{value:"Glossary",id:"glossary",level:2}];function u(e){const n={a:"a",h1:"h1",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"concepts-overview",children:"Concepts Overview"}),"\n",(0,o.jsx)(n.p,{children:"Dive deep into some foundational concepts of the Nervos network and read through a glossary to enrich your understanding of key blockchain terminologies."}),"\n",(0,o.jsx)(r.A,{topMargin:56,children:c.map((({index:e,title:n,description:t,link:s,type:r})=>(0,o.jsx)(i.A,{title:n,description:t,link:s,type:r},e)))}),"\n",(0,o.jsx)(n.h2,{id:"glossary",children:"Glossary"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/concepts/glossary#general-glossary",children:"General Glossary"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/concepts/glossary#economics-glossary",children:"Economics Glossary"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/concepts/glossary#technical-glossary",children:"Technical Glossary"})}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},5333:(e,n,t)=>{t.d(n,{A:()=>a});var o=t(53),s=t(4783);const i={cardContainer:"cardContainer__ccT",iconContainer:"iconContainer_RJI0",rightContainer:"rightContainer_HZnY",title:"title_aezp",description:"description_jBtF",links:"links_KO_M"};var r=t(975),c=t(4848);function a(e){var n=e.title,t=e.description,r=e.link,a=e.type,d=e.links,p=e.internal,h=void 0===p||p,u=e.className,m={title:n,description:t,link:r,type:a,links:d,className:u};return h?(0,c.jsx)(s.A,{to:r,className:(0,o.A)(i.cardContainer,u),children:(0,c.jsx)(l,Object.assign({},m))}):(0,c.jsx)(s.A,{href:r,target:"_blank",rel:"noopener noreferrer",className:(0,o.A)(i.cardContainer,u),children:(0,c.jsx)(l,Object.assign({},m))})}function l(e){var n=e.title,t=e.description,o=e.type,a=e.links;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:i.iconContainer,children:(0,c.jsx)(r.A,{alt:o,sources:{light:"/svg/icon-"+o+"-light.svg",dark:"/svg/icon-"+o+"-dark.svg"}})}),(0,c.jsxs)("div",{className:i.rightContainer,children:[(0,c.jsx)("h4",{className:i.title,children:n}),a&&a.length>0&&(0,c.jsx)("div",{className:i.links,children:a.map((function(e,n){return(0,c.jsx)(s.A,{href:e.link,target:"_blank",rel:"noopener noreferrer",children:e.label},n)}))}),(0,c.jsx)("p",{className:i.description,children:t})]})]})}},8803:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);const o="layoutContainer_TJ5m";var s=t(4848);const i=function(e){var n=e.children,t=e.topMargin,i=void 0===t?16:t,r=e.colNum,c=void 0===r?[2,1,2,1]:r,a=e.gap,l=void 0===a?24:a;return(0,s.jsx)("div",{style:{marginTop:i+"px","--gap":l+"px","--columnL":c[0],"--columnM":c[1],"--columnS":c[2],"--columnXS":c[3]},className:o,children:n})}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var o=t(6540);const s={},i=o.createContext(s);function r(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/682fa153.712692bd.js b/assets/js/682fa153.712692bd.js deleted file mode 100644 index 16efa777f..000000000 --- a/assets/js/682fa153.712692bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[231],{890:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>a,metadata:()=>d,toc:()=>h});var o=t(4848),s=t(8453),i=t(5333),r=t(8803),c=[{title:"Nervos Blockchain",description:"A scalable, interoperable blockchain for diverse dApp development",href:"./nervos-blockchain",type:"concept"},{title:"Cell Model",description:"Flexible on-chain asset and data management structure",href:"./cell-model",type:"concept"},{title:"CKB-VM",description:"Adaptable virtual machine for secure smart contract execution",href:"./ckb-vm",type:"concept"},{title:"Consensus",description:"Secure algorithm ensuring network integrity",href:"./consensus",type:"concept"},{title:"Tokenomics",description:"Adaptive token utility and economic mechanisms",href:"./economics",type:"concept"}];const a={id:"concepts",title:"Concepts",sidebar_position:6},l="Concepts Overview",d={id:"concepts/concepts",title:"Concepts",description:"Dive deep into some foundational concepts of the Nervos network and read through a glossary to enrich your understanding of key blockchain terminologies.",source:"@site/docs/concepts/Concepts.mdx",sourceDirName:"concepts",slug:"/concepts/",permalink:"/docs/concepts/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/Concepts.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:6,frontMatter:{id:"concepts",title:"Concepts",sidebar_position:6},sidebar:"tutorial",previous:{title:"Run a CKB Node",permalink:"/docs/Node/"},next:{title:"Nervos Blockchain",permalink:"/docs/concepts/nervos-blockchain"}},p={},h=[{value:"Glossary",id:"glossary",level:2}];function u(e){const n={a:"a",h1:"h1",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"concepts-overview",children:"Concepts Overview"}),"\n",(0,o.jsx)(n.p,{children:"Dive deep into some foundational concepts of the Nervos network and read through a glossary to enrich your understanding of key blockchain terminologies."}),"\n",(0,o.jsx)(r.A,{topMargin:56,children:c.map((({index:e,title:n,description:t,link:s,type:r})=>(0,o.jsx)(i.A,{title:n,description:t,link:s,type:r},e)))}),"\n",(0,o.jsx)(n.h2,{id:"glossary",children:"Glossary"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/concepts/glossary#general-glossary",children:"General Glossary"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/concepts/glossary#economics-glossary",children:"Economics Glossary"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/concepts/glossary#technical-glossary",children:"Technical Glossary"})}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},5333:(e,n,t)=>{t.d(n,{A:()=>a});var o=t(53),s=t(4783);const i={cardContainer:"cardContainer__ccT",iconContainer:"iconContainer_RJI0",rightContainer:"rightContainer_HZnY",title:"title_aezp",description:"description_jBtF",links:"links_KO_M"};var r=t(975),c=t(4848);function a(e){var n=e.title,t=e.description,r=e.link,a=e.type,d=e.links,p=e.internal,h=void 0===p||p,u=e.className,m={title:n,description:t,link:r,type:a,links:d,className:u};return h?(0,c.jsx)(s.A,{to:r,className:(0,o.A)(i.cardContainer,u),children:(0,c.jsx)(l,Object.assign({},m))}):(0,c.jsx)(s.A,{href:r,target:"_blank",rel:"noopener noreferrer",className:(0,o.A)(i.cardContainer,u),children:(0,c.jsx)(l,Object.assign({},m))})}function l(e){var n=e.title,t=e.description,o=e.type,a=e.links;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:i.iconContainer,children:(0,c.jsx)(r.A,{alt:o,sources:{light:"/svg/icon-"+o+"-light.svg",dark:"/svg/icon-"+o+"-dark.svg"}})}),(0,c.jsxs)("div",{className:i.rightContainer,children:[(0,c.jsx)("h4",{className:i.title,children:n}),a&&a.length>0&&(0,c.jsx)("div",{className:i.links,children:a.map((function(e,n){return(0,c.jsx)(s.A,{href:e.link,target:"_blank",rel:"noopener noreferrer",children:e.label},n)}))}),(0,c.jsx)("p",{className:i.description,children:t})]})]})}},8803:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);const o="layoutContainer_TJ5m";var s=t(4848);const i=function(e){var n=e.children,t=e.topMargin,i=void 0===t?16:t,r=e.colNum,c=void 0===r?[2,1,2,1]:r,a=e.gap,l=void 0===a?24:a;return(0,s.jsx)("div",{style:{marginTop:i+"px","--gap":l+"px","--columnL":c[0],"--columnM":c[1],"--columnS":c[2],"--columnXS":c[3]},className:o,children:n})}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var o=t(6540);const s={},i=o.createContext(s);function r(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/690a886b.3a5db5b8.js b/assets/js/690a886b.1d88a69d.js similarity index 98% rename from assets/js/690a886b.3a5db5b8.js rename to assets/js/690a886b.1d88a69d.js index 993cfa828..e726af3aa 100644 --- a/assets/js/690a886b.3a5db5b8.js +++ b/assets/js/690a886b.1d88a69d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[669],{2396:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var o=s(4848),t=s(8453);const i={id:"nervos-blockchain",title:"Nervos Blockchain",sidebar_position:1},r=void 0,a={id:"concepts/nervos-blockchain",title:"Nervos Blockchain",description:"What is the Nervos Blockchain?",source:"@site/docs/concepts/nervos-blockchain.md",sourceDirName:"concepts",slug:"/concepts/nervos-blockchain",permalink:"/docs/concepts/nervos-blockchain",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/nervos-blockchain.md",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:1,frontMatter:{id:"nervos-blockchain",title:"Nervos Blockchain",sidebar_position:1},sidebar:"tutorial",previous:{title:"Concepts",permalink:"/docs/concepts/"},next:{title:"Cell Model",permalink:"/docs/concepts/cell-model"}},c={},l=[{value:"What is the Nervos Blockchain?",id:"what-is-the-nervos-blockchain",level:2},{value:"Multi-Layer Architecture",id:"multi-layer-architecture",level:2},{value:"What is a CKByte?",id:"what-is-a-ckbyte",level:2},{value:"Programming on Nervos",id:"programming-on-nervos",level:2},{value:"Consensus",id:"consensus",level:2}];function d(e){const n={a:"a",h2:"h2",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"what-is-the-nervos-blockchain",children:"What is the Nervos Blockchain?"}),"\n",(0,o.jsx)(n.p,{children:"Nervos blockchain, also known as Common Knowledge Base, is the rock-bottom layer of the Nervos ecosystem. As the foundation, Nervos blockchain provides trust for all the layers built on top of it. It is designed to maximize decentralization while remaining minimal, flexible, and secure. Its primary objective is to reliably preserve any data and assets stored therein."}),"\n",(0,o.jsx)(n.h2,{id:"multi-layer-architecture",children:"Multi-Layer Architecture"}),"\n",(0,o.jsx)(n.p,{children:"Trade-offs are inevitable in designing any decentralized system. A common example of the trade-off concerns scalability, security, and decentralization. It is tough to achieve all three at the same high level on a single layer, but having different layers can solve different problems separately."}),"\n",(0,o.jsx)(n.p,{children:"An example on how layering helps improve this:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Layer 1 focuses on security and decentralization, providing trust to higher layers."}),"\n",(0,o.jsx)(n.li,{children:"Layer 2 focuses on scalability, providing nearly instantaneous transactions for millions of users."}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"These two layers function together to achieve higher levels of decentralization, security, and scalability."}),"\n",(0,o.jsx)(n.p,{children:"The Nervos blockchain represents the layer 1 of a multi-layer architecture that prioritizes security and decentralization as core design principles."}),"\n",(0,o.jsx)(n.h2,{id:"what-is-a-ckbyte",children:"What is a CKByte?"}),"\n",(0,o.jsx)(n.p,{children:"The native token of Nervos is known as the CKByte, or CKB for short. One CKByte token entitles the holder to one byte of data storage on Nervos. The CKByte is also used to pay fees associated with any transactions and computations."}),"\n",(0,o.jsx)(n.p,{children:"To store 100 bytes of data in Nervos, it is mandatory to have 100 CKBytes. If your data occupies space on Nervos, your CKBytes will remain locked. If your data is no longer needed and is removed from Nervos, the 100 CKBytes will be available for other purposes."}),"\n",(0,o.jsx)(n.p,{children:"CKBytes can also be deposited in the Nervos DAO\uff0cwhere they gain interests in a staking-like process."}),"\n",(0,o.jsxs)(n.p,{children:["Further information about CKByte will be presented in the ",(0,o.jsx)(n.a,{href:"/docs/concepts/cell-model",children:"Cell Model"})," and ",(0,o.jsx)(n.a,{href:"/docs/concepts/economics",children:"Economics"})," sections."]}),"\n",(0,o.jsx)(n.h2,{id:"programming-on-nervos",children:"Programming on Nervos"}),"\n",(0,o.jsx)(n.p,{children:"Nervos offers smart contract programmability using a growing number of well-known general-purpose programming languages, such as Javascript, Rust, and C."}),"\n",(0,o.jsx)(n.p,{children:"All programs on Nervos can store data and state on-chain\uff0cwhich makes creating complex applications and customized tokens a simple and straightforward process."}),"\n",(0,o.jsx)(n.p,{children:"All code runs in CKB-VM. CKB-VM is a high-performance RISC-V virtual machine that provides a secure, consistent and flexible environment for developers. Multiple instances of CKB-VM can execute different smart contracts concurrently, which enables substantial scaling improvements through massive parallelization."}),"\n",(0,o.jsxs)(n.p,{children:["More details about programming on Nervos will be covered in the ",(0,o.jsx)(n.a,{href:"/docs/concepts/cell-model",children:"Cell Model"})," and ",(0,o.jsx)(n.a,{href:"/docs/concepts/ckb-vm",children:"CKB-VM"})," sections."]}),"\n",(0,o.jsx)(n.h2,{id:"consensus",children:"Consensus"}),"\n",(0,o.jsx)(n.p,{children:"Nervos uses a Proof of Work (PoW) based consensus algorithm\uff0cknown as NC-MAX. PoW has been repeatedly proven to be the best in class solution for incentivize security."}),"\n",(0,o.jsx)(n.p,{children:"Building on Bitcoin\u2019s Nakamoto Consensus, NC-MAX dramatically increases transactions per second and decreases confirmation time without compromising security or decentralization."}),"\n",(0,o.jsx)(n.p,{children:"Nervos currently provides a 10x throughput boost compared to Ethereum, and is expected to grow exponentially as layer 2 solutions come to the table."}),"\n",(0,o.jsxs)(n.p,{children:["More details on the design of Nervos\u2019 consensus implementation will be discussed in the ",(0,o.jsx)(n.a,{href:"/docs/concepts/consensus",children:"Consensus"})," section."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>a});var o=s(6540);const t={},i=o.createContext(t);function r(e){const n=o.useContext(i);return o.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(t):e.components||t:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[669],{2396:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var o=s(4848),t=s(8453);const i={id:"nervos-blockchain",title:"Nervos Blockchain",sidebar_position:1},r=void 0,a={id:"concepts/nervos-blockchain",title:"Nervos Blockchain",description:"What is the Nervos Blockchain?",source:"@site/docs/concepts/nervos-blockchain.md",sourceDirName:"concepts",slug:"/concepts/nervos-blockchain",permalink:"/docs/concepts/nervos-blockchain",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/nervos-blockchain.md",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:1,frontMatter:{id:"nervos-blockchain",title:"Nervos Blockchain",sidebar_position:1},sidebar:"tutorial",previous:{title:"Concepts",permalink:"/docs/concepts/"},next:{title:"Cell Model",permalink:"/docs/concepts/cell-model"}},c={},l=[{value:"What is the Nervos Blockchain?",id:"what-is-the-nervos-blockchain",level:2},{value:"Multi-Layer Architecture",id:"multi-layer-architecture",level:2},{value:"What is a CKByte?",id:"what-is-a-ckbyte",level:2},{value:"Programming on Nervos",id:"programming-on-nervos",level:2},{value:"Consensus",id:"consensus",level:2}];function d(e){const n={a:"a",h2:"h2",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"what-is-the-nervos-blockchain",children:"What is the Nervos Blockchain?"}),"\n",(0,o.jsx)(n.p,{children:"Nervos blockchain, also known as Common Knowledge Base, is the rock-bottom layer of the Nervos ecosystem. As the foundation, Nervos blockchain provides trust for all the layers built on top of it. It is designed to maximize decentralization while remaining minimal, flexible, and secure. Its primary objective is to reliably preserve any data and assets stored therein."}),"\n",(0,o.jsx)(n.h2,{id:"multi-layer-architecture",children:"Multi-Layer Architecture"}),"\n",(0,o.jsx)(n.p,{children:"Trade-offs are inevitable in designing any decentralized system. A common example of the trade-off concerns scalability, security, and decentralization. It is tough to achieve all three at the same high level on a single layer, but having different layers can solve different problems separately."}),"\n",(0,o.jsx)(n.p,{children:"An example on how layering helps improve this:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Layer 1 focuses on security and decentralization, providing trust to higher layers."}),"\n",(0,o.jsx)(n.li,{children:"Layer 2 focuses on scalability, providing nearly instantaneous transactions for millions of users."}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"These two layers function together to achieve higher levels of decentralization, security, and scalability."}),"\n",(0,o.jsx)(n.p,{children:"The Nervos blockchain represents the layer 1 of a multi-layer architecture that prioritizes security and decentralization as core design principles."}),"\n",(0,o.jsx)(n.h2,{id:"what-is-a-ckbyte",children:"What is a CKByte?"}),"\n",(0,o.jsx)(n.p,{children:"The native token of Nervos is known as the CKByte, or CKB for short. One CKByte token entitles the holder to one byte of data storage on Nervos. The CKByte is also used to pay fees associated with any transactions and computations."}),"\n",(0,o.jsx)(n.p,{children:"To store 100 bytes of data in Nervos, it is mandatory to have 100 CKBytes. If your data occupies space on Nervos, your CKBytes will remain locked. If your data is no longer needed and is removed from Nervos, the 100 CKBytes will be available for other purposes."}),"\n",(0,o.jsx)(n.p,{children:"CKBytes can also be deposited in the Nervos DAO\uff0cwhere they gain interests in a staking-like process."}),"\n",(0,o.jsxs)(n.p,{children:["Further information about CKByte will be presented in the ",(0,o.jsx)(n.a,{href:"/docs/concepts/cell-model",children:"Cell Model"})," and ",(0,o.jsx)(n.a,{href:"/docs/concepts/economics",children:"Economics"})," sections."]}),"\n",(0,o.jsx)(n.h2,{id:"programming-on-nervos",children:"Programming on Nervos"}),"\n",(0,o.jsx)(n.p,{children:"Nervos offers smart contract programmability using a growing number of well-known general-purpose programming languages, such as Javascript, Rust, and C."}),"\n",(0,o.jsx)(n.p,{children:"All programs on Nervos can store data and state on-chain\uff0cwhich makes creating complex applications and customized tokens a simple and straightforward process."}),"\n",(0,o.jsx)(n.p,{children:"All code runs in CKB-VM. CKB-VM is a high-performance RISC-V virtual machine that provides a secure, consistent and flexible environment for developers. Multiple instances of CKB-VM can execute different smart contracts concurrently, which enables substantial scaling improvements through massive parallelization."}),"\n",(0,o.jsxs)(n.p,{children:["More details about programming on Nervos will be covered in the ",(0,o.jsx)(n.a,{href:"/docs/concepts/cell-model",children:"Cell Model"})," and ",(0,o.jsx)(n.a,{href:"/docs/concepts/ckb-vm",children:"CKB-VM"})," sections."]}),"\n",(0,o.jsx)(n.h2,{id:"consensus",children:"Consensus"}),"\n",(0,o.jsx)(n.p,{children:"Nervos uses a Proof of Work (PoW) based consensus algorithm\uff0cknown as NC-MAX. PoW has been repeatedly proven to be the best in class solution for incentivize security."}),"\n",(0,o.jsx)(n.p,{children:"Building on Bitcoin\u2019s Nakamoto Consensus, NC-MAX dramatically increases transactions per second and decreases confirmation time without compromising security or decentralization."}),"\n",(0,o.jsx)(n.p,{children:"Nervos currently provides a 10x throughput boost compared to Ethereum, and is expected to grow exponentially as layer 2 solutions come to the table."}),"\n",(0,o.jsxs)(n.p,{children:["More details on the design of Nervos\u2019 consensus implementation will be discussed in the ",(0,o.jsx)(n.a,{href:"/docs/concepts/consensus",children:"Consensus"})," section."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>a});var o=s(6540);const t={},i=o.createContext(t);function r(e){const n=o.useContext(i);return o.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(t):e.components||t:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6c4d1ce4.2a25b2ac.js b/assets/js/6c4d1ce4.2a25b2ac.js deleted file mode 100644 index d3c2e53c9..000000000 --- a/assets/js/6c4d1ce4.2a25b2ac.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[289],{6791:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var r=t(4848),a=t(8453),s=(t(8180),t(9489)),i=t(7227);const l={id:"run-node",title:"Run a CKB Node",sidebar_position:5},o=void 0,c={id:"Node/run-node",title:"Run a CKB Node",description:"Running a CKB node boosts network robustness and decentralization while enhancing data access security.",source:"@site/docs/Node/node.mdx",sourceDirName:"Node",slug:"/Node/",permalink:"/docs/Node/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Node/node.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:5,frontMatter:{id:"run-node",title:"Run a CKB Node",sidebar_position:5},sidebar:"tutorial",previous:{title:"RPCs",permalink:"/docs/rpcs"},next:{title:"Concepts",permalink:"/docs/concepts/"}},d={},u=[{value:"Run a Mainnet Node",id:"run-a-mainnet-node",level:2},{value:"Step 1: Download CKB Binary",id:"step-1-download-ckb-binary",level:3},{value:"Step 2: Navigate to CKB Directory",id:"step-2-navigate-to-ckb-directory",level:3},{value:"Step 3: Verify versions",id:"step-3-verify-versions",level:3},{value:"Step 4: Initialize Node",id:"step-4-initialize-node",level:3},{value:"Step 5: Start the CKB Mainnet Node",id:"step-5-start-the-ckb-mainnet-node",level:3},{value:"Run a Testnet Node",id:"run-a-testnet-node",level:2},{value:"Step 1: Download CKB Binary",id:"step-1-download-ckb-binary-1",level:3},{value:"Step 2: Navigate to CKB Directory",id:"step-2-navigate-to-ckb-directory-1",level:3},{value:"Step 3: Verify versions",id:"step-3-verify-versions-1",level:3},{value:"Step 4: Connect to Pudge Testnet",id:"step-4-connect-to-pudge-testnet",level:3},{value:"Step 5: Start the CKB Testnet Node",id:"step-5-start-the-ckb-testnet-node",level:3},{value:"Run a Public RPC Node",id:"run-a-public-rpc-node",level:2},{value:"RPC Access Control",id:"rpc-access-control",level:3},{value:"Step 1: Install Docker-Compose and Docker",id:"step-1-install-docker-compose-and-docker",level:3},{value:"Step 2: Clone Code",id:"step-2-clone-code",level:3},{value:"Step 3: Replace Default RPC Address",id:"step-3-replace-default-rpc-address",level:3},{value:"Step 4: Run Proxy",id:"step-4-run-proxy",level:3},{value:"Examples",id:"examples",level:3},{value:"Restricted Methods",id:"restricted-methods",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Running a CKB node boosts network robustness and decentralization while enhancing data access security."}),"\n",(0,r.jsx)(n.p,{children:"Select the CKB Node that suits your needs and circumstances:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Mainnet Node"}),": Optimal for active involvement in the live network. We advise a minimum of 100GB of local storage for this purpose."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Testnet Node"}),": Ideal for exploring functionalities in a risk-free environment. We suggest allocating 200GB for experimenting."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"RPC Node"}),": Set up a Nervos API endpoint for your project without running any CKB nodes yourself."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"run-a-mainnet-node",children:"Run a Mainnet Node"}),"\n",(0,r.jsx)(n.h3,{id:"step-1-download-ckb-binary",children:"Step 1: Download CKB Binary"}),"\n",(0,r.jsxs)(n.p,{children:["Get the latest CKB binary from ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/releases",children:"GitHub releases"}),". (The version used in this document is ",(0,r.jsx)(n.strong,{children:"ckb_v0.115.0"}),".)"]}),"\n",(0,r.jsx)(n.h3,{id:"step-2-navigate-to-ckb-directory",children:"Step 2: Navigate to CKB Directory"}),"\n",(0,r.jsx)(n.p,{children:"Unzip the downloaded file to an easily accessible folder, e.g., C:\\ckb for Windows, ~/Documents for Mac. Open your terminal/command line and navigate to your CKB directory using the following command:"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"mac",label:"Mac",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" cd /Users/(NAME)/Documents/ckb_v0.115.0-rc3_aarch64-apple-darwin-portable/ckb\n"})})}),(0,r.jsx)(i.A,{value:"windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" cd C:/ckb_v0.115.0_x86_64-pc-windows-msvc\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-3-verify-versions",children:"Step 3: Verify versions"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"check-version",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb --version\n ckb-cli --version\n"})})}),(0,r.jsx)(i.A,{value:"verify-version",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb 0.115.0 (d845cbf 2024-04-01)\n ckb-cli 1.8.0-rc1 (cf4159b 2024-03-28)\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-4-initialize-node",children:"Step 4: Initialize Node"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb init --chain mainnet\n"})}),"\n",(0,r.jsx)(n.h3,{id:"step-5-start-the-ckb-mainnet-node",children:"Step 5: Start the CKB Mainnet Node"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb run\n"})}),"\n",(0,r.jsx)(n.h2,{id:"run-a-testnet-node",children:"Run a Testnet Node"}),"\n",(0,r.jsx)(n.p,{children:"Nervos has introduced the Pudge Testnet for developers to experiment with integration and smart contracts. Due to hash rate fluctuations, expect periodic resets."}),"\n",(0,r.jsx)(n.h3,{id:"step-1-download-ckb-binary-1",children:"Step 1: Download CKB Binary"}),"\n",(0,r.jsxs)(n.p,{children:["Get the latest CKB binary from ",(0,r.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/releases",children:"GitHub releases"}),". (The version used in this document is ",(0,r.jsx)(n.strong,{children:"ckb_v0.115.0"}),".)"]}),"\n",(0,r.jsx)(n.h3,{id:"step-2-navigate-to-ckb-directory-1",children:"Step 2: Navigate to CKB Directory"}),"\n",(0,r.jsx)(n.p,{children:"Unzip the downloaded file to an easily accessible folder, e.g., C:\\ckb for Windows, ~/Documents for Mac. Open your terminal/command line and navigate to your CKB directory using the following command:"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"mac",label:"Mac",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" cd /Users/(NAME)/Documents/ckb_v0.115.0-rc3_aarch64-apple-darwin-portable/ckb\n"})})}),(0,r.jsx)(i.A,{value:"windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" cd C:/ckb_v0.115.0_x86_64-pc-windows-msvc\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-3-verify-versions-1",children:"Step 3: Verify versions"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"check-version",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb --version\n ckb-cli --version\n"})})}),(0,r.jsx)(i.A,{value:"verify-version",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb 0.115.0 (d845cbf 2024-04-01)\n ckb-cli 1.8.0-rc1 (cf4159b 2024-03-28)\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-4-connect-to-pudge-testnet",children:"Step 4: Connect to Pudge Testnet"}),"\n",(0,r.jsx)(n.p,{children:"Initialize your CKB node:"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"command",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" ckb init --chain testnet\n"})})}),(0,r.jsx)(i.A,{value:"result",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:" WARN: Mining feature is disabled because of lacking the block assembler config options.\n Initialized CKB directory in /PATH/0.115.0\n create ckb.toml\n create ckb-miner.toml\n"})})})]}),"\n",(0,r.jsx)(n.h3,{id:"step-5-start-the-ckb-testnet-node",children:"Step 5: Start the CKB Testnet Node"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"ckb run\n"})}),"\n",(0,r.jsx)(n.p,{children:"After these steps, your CKB Testnet node will be up and running, allowing you to experiment and develop with the Nervos blockchain."}),"\n",(0,r.jsx)(n.h2,{id:"run-a-public-rpc-node",children:"Run a Public RPC Node"}),"\n",(0,r.jsx)(n.p,{children:"CKB nodes activate built-in RPC functionality upon startup. RPC access is by default private."}),"\n",(0,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsx)(n.p,{children:"Exposing RPC can pose significant security risks."})}),"\n",(0,r.jsxs)(n.p,{children:["Enabling RPC through the ",(0,r.jsx)(n.code,{children:"rpc.listen_address"})," configuration can open the JSON-RPC port to arbitrary machines, increasing vulnerability. It's strongly advised against enabling RPC unless absolutely necessary."]}),"\n",(0,r.jsx)(n.p,{children:"If unavoidable, ensure access is restricted solely to trusted machines, following the provided guidelines."}),"\n",(0,r.jsx)(n.h3,{id:"rpc-access-control",children:"RPC Access Control"}),"\n",(0,r.jsx)(n.p,{children:"Here is an example using Nginx API Gateway to configure the RPC access control."}),"\n",(0,r.jsxs)(n.p,{children:["Explore more solutions or submit new ones using the GitHub tag ",(0,r.jsx)(n.a,{href:"https://github.com/topics/ckb-rpc-proxy",children:"ckb-rpc-proxy"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"step-1-install-docker-compose-and-docker",children:"Step 1: Install Docker-Compose and Docker"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"apt install docker-compose\napt install docker\n"})}),"\n",(0,r.jsx)(n.h3,{id:"step-2-clone-code",children:"Step 2: Clone Code"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/cryptape/ckb-nginx-proxy.git\n"})}),"\n",(0,r.jsx)(n.h3,{id:"step-3-replace-default-rpc-address",children:"Step 3: Replace Default RPC Address"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'cd ckb-nginx-proxy\nsed -i "s/YOUR_CKR_RPC_IP:8114/192.168.1.100:8114/" nginx.conf\n'})}),"\n",(0,r.jsx)(n.h3,{id:"step-4-run-proxy",children:"Step 4: Run Proxy"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker-compose up -d\n"})}),"\n",(0,r.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Get tip block hash and number:"})}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"command",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "get_tip_header",\n "params": []\n}\' \\\n| tr -d \'\\n\' \\\n| curl -H \'content-type: application/json\' -d @- \\\nhttp://192.168.1.100:80\n\n// Note that http://192.168.1.100:80 needs to be changed to your proxy IP.\n'})})}),(0,r.jsx)(i.A,{value:"result",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": {\n "compact_target": "0x1d090fbe",\n "dao": "0xba17553fab3db84154bc4aa9f09b2600e826a2b0df99010400ed51b4686b5808",\n "epoch": "0x7080687001539",\n "extra_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "hash": "0x7a46e779a3fc2d5b55c82aad852e721b0097bf873927b9751409b1d185599ce4",\n "nonce": "0xd265e70dfd205dbbed33b29294121856",\n "number": "0x7037f2",\n "parent_hash": "0x3d105fe9ec60f138baa6623abd16af70ba1be90ad23d1943bcaa55d5f14fcb6f",\n "proposals_hash": "0x2581d1769886226a8c90ee99baf2d8696e24c7f6bb6751748ff8b4452f8006e5",\n "timestamp": "0x1847a2bfad2",\n "transactions_root": "0x28157a5962c4ae1d3e153b1d8d331e5fd3c158866287f5398ab7f7d38210dfb0",\n "version": "0x0"\n },\n "id": 2\n}\n'})})})]}),"\n",(0,r.jsx)(n.h3,{id:"restricted-methods",children:"Restricted Methods"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"clear_banned_addresses"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"set_ban"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"set_network_active"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"add_node"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"remove_node"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"remove_transaction"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"clear_tx_pool"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["If you try to execute a restricted method (",(0,r.jsx)(n.code,{children:"clear_tx_pool"}),"):"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"command",label:"Command",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "clear_tx_pool",\n "params": []\n}\' | tr -d \'\\n\' | curl -H \'content-type: application/json\' -d @- \\\nhttp://192.168.1.100:80\n'})})}),(0,r.jsx)(i.A,{value:"result",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:" This method has been banned.\n"})})})]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},7227:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var r=t(8215);const a={tabItem:"tabItem_Ymn6"};var s=t(4848);function i(e){var n=e.children,t=e.hidden,i=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,i),hidden:t,children:n})}},9489:(e,n,t)=>{t.d(n,{A:()=>k});var r=t(6540),a=t(8215),s=t(4245),i=t(6347),l=t(6494),o=t(2814),c=t(5167),d=t(1269);function u(e){var n,t;return null!=(n=null==(t=r.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,r.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}function h(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(t);return function(e){var n=(0,c.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function b(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,s=(0,i.W6)(),l=function(e){var n=e.queryString,t=void 0!==n&&n,r=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:a});return[(0,o.aZ)(l),(0,r.useCallback)((function(e){if(l){var n=new URLSearchParams(s.location.search);n.set(l,e),s.replace(Object.assign({},s.location,{search:n.toString()}))}}),[l,s])]}function v(e){var n,t,a,s,i=e.defaultValue,o=e.queryString,c=void 0!==o&&o,u=e.groupId,v=h(e),x=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,r=e.tabValues;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+r.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(n=r.find((function(e){return e.default})))?n:r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:v})})),m=x[0],f=x[1],j=b({queryString:c,groupId:u}),g=j[0],y=j[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,d.Dv)(n),a=t[0],s=t[1],[a,(0,r.useCallback)((function(e){n&&s.set(e)}),[n,s])]),C=k[0],w=k[1],N=function(){var e=null!=g?g:C;return p({value:e,tabValues:v})?e:null}();return(0,l.A)((function(){N&&f(N)}),[N]),{selectedValue:m,selectValue:(0,r.useCallback)((function(e){if(!p({value:e,tabValues:v}))throw new Error("Can't select invalid tab value="+e);f(e),y(e),w(e)}),[y,w,v]),tabValues:v}}var x=t(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(4848);function j(e){var n=e.className,t=e.block,r=e.selectedValue,i=e.selectValue,l=e.tabValues,o=[],c=(0,s.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,t=o.indexOf(n),a=l[t].value;a!==r&&(c(n),i(a))},u=function(e){var n,t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var r,a=o.indexOf(e.currentTarget)+1;t=null!=(r=o[a])?r:o[0];break;case"ArrowLeft":var s,i=o.indexOf(e.currentTarget)-1;t=null!=(s=o[i])?s:o[o.length-1]}null==(n=t)||n.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:l.map((function(e){var n=e.value,t=e.label,s=e.attributes;return(0,f.jsx)("li",Object.assign({role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:function(e){return o.push(e)},onKeyDown:u,onClick:d},s,{className:(0,a.A)("tabs__item",m.tabItem,null==s?void 0:s.className,{"tabs__item--active":r===n}),children:null!=t?t:n}),n)}))})}function g(e){var n=e.lazy,t=e.children,a=e.selectedValue,s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var i=s.find((function(e){return e.props.value===a}));return i?(0,r.cloneElement)(i,{className:"margin-top--md"}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:s.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function y(e){var n=v(e);return(0,f.jsxs)("div",{className:(0,a.A)("tabs-container",m.tabList),children:[(0,f.jsx)(j,Object.assign({},e,n)),(0,f.jsx)(g,Object.assign({},e,n))]})}function k(e){var n=(0,x.A)();return(0,f.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var r=t(6540);const a={},s=r.createContext(a);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6c4d1ce4.511d37fd.js b/assets/js/6c4d1ce4.511d37fd.js new file mode 100644 index 000000000..31a8236e3 --- /dev/null +++ b/assets/js/6c4d1ce4.511d37fd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[289],{6791:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>d,toc:()=>a});var o=t(4848),s=t(8453);const r={id:"run-node",title:"Run Node",sidebar_position:5},i="Run Node",d={id:"Node/run-node",title:"Run Node",description:"Running a CKB node boosts network robustness and decentralization while enhancing data access security.",source:"@site/docs/Node/node.mdx",sourceDirName:"Node",slug:"/Node/",permalink:"/docs/Node/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Node/node.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:5,frontMatter:{id:"run-node",title:"Run Node",sidebar_position:5},sidebar:"tutorial",previous:{title:"RPCs",permalink:"/docs/rpcs"},next:{title:"Run a Mainnet Node",permalink:"/docs/Node/run-mainnet-node"}},c={},a=[];function u(e){const n={h1:"h1",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"run-node",children:"Run Node"}),"\n",(0,o.jsx)(n.p,{children:"Running a CKB node boosts network robustness and decentralization while enhancing data access security."}),"\n",(0,o.jsx)(n.p,{children:"Select the CKB Node that suits your needs and circumstances:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Mainnet Node"}),": Optimal for active involvement in the live network. We suggest a minimum of 100GB of local storage for this purpose."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Testnet Node"}),": Ideal for exploring functionalities in a risk-free environment. We suggest allocating 200GB for experimenting."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"RPC Node"}),": Set up a Nervos API endpoint for your project without running any CKB nodes yourself."]}),"\n"]})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>d});var o=t(6540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8fa65b9b.54dda381.js b/assets/js/8fa65b9b.54dda381.js deleted file mode 100644 index e3decaa18..000000000 --- a/assets/js/8fa65b9b.54dda381.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[664],{3246:(e,t,o)=>{o.r(t),o.d(t,{contactUsContents:()=>s,default:()=>i,devToolSectionContents:()=>l,homeCardContents:()=>n});var n=[{title:"Getting Started",links:[{label:"Dev Environment",link:"/docs/getting-started/dev-environment"},{label:"DApp Tutorials",link:"/docs/getting-started/transfer-ckb"},{label:"Scripts Tutorials",link:"/docs/Script/write-script"}],icon:"rocket"},{title:"Run a Node",links:[{label:"Run a Mainnet Node",link:"/docs/Node/#run-a-mainnet-node"},{label:"Run a Testnet Node",link:"/docs/Node/#run-a-testnet-node"},{label:"Run a Public RPC Node",link:"/docs/Node/#run-a-public-rpc-node"}],icon:"node"},{title:"Concepts",links:[{label:"Nervos Blockchain",link:"/docs/concepts/nervos-blockchain"},{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Tokenomics",link:"/docs/concepts/economics"}],icon:"concept"}],l=[{title:"Lumos",href:"https://github.com/ckb-js/lumos",category:"Development & Deployment"},{title:"CKB SDKs",href:"https://github.com/nervosnetwork/ckb-sdk-rust",category:"Development & Deployment"},{title:"CKB-CLI",href:"https://github.com/nervosnetwork/ckb-cli",category:"Development & Deployment"},{title:"OffCKB",href:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae",category:"Development & Deployment"},{title:"CKB Debugger",href:"https://github.com/nervosnetwork/ckb-standalone-debugger",category:"Utilities & Testing"},{title:"CKB Address",href:"https://ckb.tools/address",category:"Utilities & Testing"},{title:"Nervos Pudge Faucet",href:"https://faucet.nervos.org/",category:"Utilities & Testing"}],s=[{label:"github",link:"https://github.com/nervosnetwork"},{label:"discord",link:"https://discord.gg/nervosnetwork"},{label:"reddit",link:"https://www.reddit.com/r/NervosNetwork/"},{label:"nervostalk",link:"https://talk.nervos.org/"},{label:"telegram",link:"https://t.me/nervosnetwork"},{label:"twitter",link:"https://twitter.com/nervosnetwork"},{label:"medium",link:"https://medium.com/nervosnetwork"},{label:"youtube",link:"https://www.youtube.com/channel/UCONuJGdMzUY0Y6jrPBOzH7A"}];const i=function(){return null}}}]); \ No newline at end of file diff --git a/assets/js/8fa65b9b.fc6feb2e.js b/assets/js/8fa65b9b.fc6feb2e.js new file mode 100644 index 000000000..d278cb5cf --- /dev/null +++ b/assets/js/8fa65b9b.fc6feb2e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[664],{3246:(e,t,o)=>{o.r(t),o.d(t,{contactUsContents:()=>s,default:()=>i,devToolSectionContents:()=>l,homeCardContents:()=>n});var n=[{title:"Getting Started",links:[{label:"Dev Environment",link:"/docs/getting-started/dev-environment"},{label:"DApp Tutorials",link:"/docs/getting-started/transfer-ckb"},{label:"Scripts Tutorials",link:"/docs/Script/minimal-script"}],icon:"rocket"},{title:"Run a Node",links:[{label:"Run a Mainnet Node",link:"/docs/node/run-mainnet-node"},{label:"Run a Testnet Node",link:"/docs/node/run-testnet-node"},{label:"Run a Public RPC Node",link:"/docs/node/run-public-rpc-node"}],icon:"node"},{title:"Concepts",links:[{label:"Nervos Blockchain",link:"/docs/concepts/nervos-blockchain"},{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Tokenomics",link:"/docs/concepts/economics"}],icon:"concept"}],l=[{title:"Lumos",href:"https://github.com/ckb-js/lumos",category:"Development & Deployment"},{title:"CKB SDKs",href:"https://github.com/nervosnetwork/ckb-sdk-rust",category:"Development & Deployment"},{title:"CKB-CLI",href:"https://github.com/nervosnetwork/ckb-cli",category:"Development & Deployment"},{title:"OffCKB",href:"https://github.com/RetricSu/offckb/tree/7d87d018be7626e1672a039b52f8bf4db9dd4eae",category:"Development & Deployment"},{title:"CKB Debugger",href:"https://github.com/nervosnetwork/ckb-standalone-debugger",category:"Utilities & Testing"},{title:"CKB Address",href:"https://ckb.tools/address",category:"Utilities & Testing"},{title:"Nervos Pudge Faucet",href:"https://faucet.nervos.org/",category:"Utilities & Testing"}],s=[{label:"github",link:"https://github.com/nervosnetwork"},{label:"discord",link:"https://discord.gg/nervosnetwork"},{label:"reddit",link:"https://www.reddit.com/r/NervosNetwork/"},{label:"nervostalk",link:"https://talk.nervos.org/"},{label:"telegram",link:"https://t.me/nervosnetwork"},{label:"twitter",link:"https://twitter.com/nervosnetwork"},{label:"medium",link:"https://medium.com/nervosnetwork"},{label:"youtube",link:"https://www.youtube.com/channel/UCONuJGdMzUY0Y6jrPBOzH7A"}];const i=function(){return null}}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.8465bfb8.js b/assets/js/935f2afb.8465bfb8.js deleted file mode 100644 index 60c2a64d2..000000000 --- a/assets/js/935f2afb.8465bfb8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorial":[{"type":"category","label":"Getting Started","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Dev Environment","href":"/docs/getting-started/dev-environment","docId":"getting-started/dev-environment","unlisted":false},{"type":"link","label":"Tutorial: Transfer CKB","href":"/docs/getting-started/transfer-ckb","docId":"getting-started/transfer-ckb","unlisted":false},{"type":"link","label":"Tutorial: Write a Message","href":"/docs/getting-started/write-message","docId":"getting-started/write-message","unlisted":false},{"type":"link","label":"Tutorial: Create a Fungible Token","href":"/docs/getting-started/create-token","docId":"getting-started/create-token","unlisted":false},{"type":"link","label":"Tutorial: Create a DOB","href":"/docs/getting-started/create-dob","docId":"getting-started/create-dob","unlisted":false},{"type":"link","label":"Dev Tools","href":"/docs/getting-started/devtool","docId":"getting-started/devtool","unlisted":false}],"href":"/docs/getting-started/"},{"type":"category","label":"Scripts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Intro to Script","href":"/docs/Script/intro-to-script","docId":"Script/intro-to-script","unlisted":false},{"type":"link","label":"Program Languages for Script","href":"/docs/Script/program-language-for-script","docId":"Script/program-language-for-script","unlisted":false},{"type":"link","label":"Tutorial: Write Scripts","href":"/docs/Script/write-script","docId":"Script/write-script","unlisted":false},{"type":"link","label":"Common Script Error Code","href":"/docs/Script/common-script-error-code","docId":"Script/common-script-error-code","unlisted":false}],"href":"/docs/Script/"},{"type":"link","label":"Wallets","href":"/docs/wallets/","docId":"wallets/wallets","unlisted":false},{"type":"link","label":"RPCs","href":"/docs/rpcs","docId":"rpcs","unlisted":false},{"type":"link","label":"Run a CKB Node","href":"/docs/Node/","docId":"Node/run-node","unlisted":false},{"type":"category","label":"Concepts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Nervos Blockchain","href":"/docs/concepts/nervos-blockchain","docId":"concepts/nervos-blockchain","unlisted":false},{"type":"link","label":"Cell Model","href":"/docs/concepts/cell-model","docId":"concepts/cell-model","unlisted":false},{"type":"link","label":"CKB-VM","href":"/docs/concepts/ckb-vm","docId":"concepts/ckb-vm","unlisted":false},{"type":"link","label":"Consensus","href":"/docs/concepts/consensus","docId":"concepts/consensus","unlisted":false},{"type":"link","label":"Tokenomics","href":"/docs/concepts/economics","docId":"concepts/economics","unlisted":false},{"type":"link","label":"Glossary","href":"/docs/concepts/glossary","docId":"concepts/glossary","unlisted":false}],"href":"/docs/concepts/"},{"type":"link","label":"Ecosystem","href":"/docs/ecosystem","docId":"ecosystem","unlisted":false},{"type":"link","label":"Mining (coming soon...)","href":"/docs/concepts/cell-model","className":"disabled-menu-link","docId":"concepts/cell-model","unlisted":false}]},"docs":{"concepts/cell-model":{"id":"concepts/cell-model","title":"Cell Model","description":"Nervos CKB inherits Bitcoin\u2019s architecture and creates the Cell Model, a generalized UTXO model as state storage.","sidebar":"tutorial"},"concepts/ckb-vm":{"id":"concepts/ckb-vm","title":"CKB-VM","description":"Nervos introduces CKB-VM, a virtual machine powered by the RISC-V instruction set, further leveraging Turing-complete programmability, transforming smart contract execution on the Nervos blockchain. It provides considerable amount of power and flexibility while maintaining a secure and high-performance environment.","sidebar":"tutorial"},"concepts/concepts":{"id":"concepts/concepts","title":"Concepts","description":"Dive deep into some foundational concepts of the Nervos network and read through a glossary to enrich your understanding of key blockchain terminologies.","sidebar":"tutorial"},"concepts/consensus":{"id":"concepts/consensus","title":"Consensus","description":"Consensus in Nervos refers to a state of agreement among participants on the blockchain\u2019s history and current state. The state encompasses data such as each user\'s CKBytes holdings and their respective digital assets.","sidebar":"tutorial"},"concepts/economics":{"id":"concepts/economics","title":"Tokenomics","description":"CKByte Tokenomics","sidebar":"tutorial"},"concepts/glossary":{"id":"concepts/glossary","title":"Glossary","description":"Glossary Sections","sidebar":"tutorial"},"concepts/nervos-blockchain":{"id":"concepts/nervos-blockchain","title":"Nervos Blockchain","description":"What is the Nervos Blockchain?","sidebar":"tutorial"},"ecosystem":{"id":"ecosystem","title":"Ecosystem","description":"Discover our ecosystem of tools, resources, and projects that are essential for building your application","sidebar":"tutorial"},"getting-started/create-dob":{"id":"getting-started/create-dob","title":"Tutorial: Create a DOB","description":"{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorial":[{"type":"category","label":"Getting Started","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Dev Environment","href":"/docs/getting-started/dev-environment","docId":"getting-started/dev-environment","unlisted":false},{"type":"link","label":"Tutorial: Transfer CKB","href":"/docs/getting-started/transfer-ckb","docId":"getting-started/transfer-ckb","unlisted":false},{"type":"link","label":"Tutorial: Write a Message","href":"/docs/getting-started/write-message","docId":"getting-started/write-message","unlisted":false},{"type":"link","label":"Tutorial: Create a Fungible Token","href":"/docs/getting-started/create-token","docId":"getting-started/create-token","unlisted":false},{"type":"link","label":"Tutorial: Create a DOB","href":"/docs/getting-started/create-dob","docId":"getting-started/create-dob","unlisted":false},{"type":"link","label":"Dev Tools","href":"/docs/getting-started/devtool","docId":"getting-started/devtool","unlisted":false}],"href":"/docs/getting-started/"},{"type":"category","label":"Scripts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Intro to Script","href":"/docs/Script/intro-to-script","docId":"Script/intro-to-script","unlisted":false},{"type":"link","label":"Program Languages for Script","href":"/docs/Script/program-language-for-script","docId":"Script/program-language-for-script","unlisted":false},{"type":"link","label":"Tutorial: A Minimal Script","href":"/docs/Script/minimal-script","docId":"Script/minimal-script","unlisted":false},{"type":"link","label":"Tutorial: Run JS on CKB","href":"/docs/Script/js-script","docId":"Script/js-script","unlisted":false},{"type":"link","label":"Common Script Error Code","href":"/docs/Script/common-script-error-code","docId":"Script/common-script-error-code","unlisted":false}],"href":"/docs/Script/"},{"type":"link","label":"Wallets","href":"/docs/wallets/","docId":"wallets/wallets","unlisted":false},{"type":"link","label":"RPCs","href":"/docs/rpcs","docId":"rpcs","unlisted":false},{"type":"category","label":"Run Node","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Run a Mainnet Node","href":"/docs/Node/run-mainnet-node","docId":"Node/run-mainnet-node","unlisted":false},{"type":"link","label":"Run a Testnet Node","href":"/docs/Node/run-testnet-node","docId":"Node/run-testnet-node","unlisted":false},{"type":"link","label":"Run a Public RPC Node","href":"/docs/Node/run-public-rpc-node","docId":"Node/run-public-rpc-node","unlisted":false}],"href":"/docs/Node/"},{"type":"category","label":"Concepts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Nervos Blockchain","href":"/docs/concepts/nervos-blockchain","docId":"concepts/nervos-blockchain","unlisted":false},{"type":"link","label":"Cell Model","href":"/docs/concepts/cell-model","docId":"concepts/cell-model","unlisted":false},{"type":"link","label":"CKB-VM","href":"/docs/concepts/ckb-vm","docId":"concepts/ckb-vm","unlisted":false},{"type":"link","label":"Consensus","href":"/docs/concepts/consensus","docId":"concepts/consensus","unlisted":false},{"type":"link","label":"Tokenomics","href":"/docs/concepts/economics","docId":"concepts/economics","unlisted":false},{"type":"link","label":"Glossary","href":"/docs/concepts/glossary","docId":"concepts/glossary","unlisted":false}],"href":"/docs/concepts/"},{"type":"link","label":"Ecosystem","href":"/docs/ecosystem","docId":"ecosystem","unlisted":false},{"type":"category","label":"Resources","className":"category-resource","items":[{"type":"link","label":"Positioning Paper","href":"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0001-positioning/0001-positioning.md"},{"type":"link","label":"CKB RFCs","href":"https://github.com/nervosnetwork/rfcs"},{"type":"link","label":"CKB Dev Log","href":"https://github.com/nervosnetwork/ckb/discussions/categories/dev-log"}],"collapsed":true,"collapsible":true}]},"docs":{"concepts/cell-model":{"id":"concepts/cell-model","title":"Cell Model","description":"Nervos CKB inherits Bitcoin\u2019s architecture and creates the Cell Model, a generalized UTXO model as state storage.","sidebar":"tutorial"},"concepts/ckb-vm":{"id":"concepts/ckb-vm","title":"CKB-VM","description":"Nervos introduces CKB-VM, a virtual machine powered by the RISC-V instruction set, further leveraging Turing-complete programmability, transforming smart contract execution on the Nervos blockchain. It provides considerable amount of power and flexibility while maintaining a secure and high-performance environment.","sidebar":"tutorial"},"concepts/concepts":{"id":"concepts/concepts","title":"Concepts","description":"Dive deep into some foundational concepts of the Nervos network and read through a glossary to enrich your understanding of key blockchain terminologies.","sidebar":"tutorial"},"concepts/consensus":{"id":"concepts/consensus","title":"Consensus","description":"Consensus in Nervos refers to a state of agreement among participants on the blockchain\u2019s history and current state. The state encompasses data such as each user\'s CKBytes holdings and their respective digital assets.","sidebar":"tutorial"},"concepts/economics":{"id":"concepts/economics","title":"Tokenomics","description":"CKByte Tokenomics","sidebar":"tutorial"},"concepts/glossary":{"id":"concepts/glossary","title":"Glossary","description":"Glossary Sections","sidebar":"tutorial"},"concepts/nervos-blockchain":{"id":"concepts/nervos-blockchain","title":"Nervos Blockchain","description":"What is the Nervos Blockchain?","sidebar":"tutorial"},"ecosystem":{"id":"ecosystem","title":"Ecosystem","description":"Discover our ecosystem of tools, resources, and projects that are essential for building your application","sidebar":"tutorial"},"getting-started/create-dob":{"id":"getting-started/create-dob","title":"Tutorial: Create a DOB","description":"{o.r(r),o.d(r,{assets:()=>d,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>c,toc:()=>a});var t=o(4848),n=o(8453);const i={id:"common-script-error-code",title:"Common Script Error Code",sidebar_position:8},s="Common Script Error Code",c={id:"Script/common-script-error-code",title:"Common Script Error Code",description:"CKB defines some basic error codes:",source:"@site/docs/Script/common-script-error-code.mdx",sourceDirName:"Script",slug:"/Script/common-script-error-code",permalink:"/docs/Script/common-script-error-code",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Script/common-script-error-code.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:8,frontMatter:{id:"common-script-error-code",title:"Common Script Error Code",sidebar_position:8},sidebar:"tutorial",previous:{title:"Tutorial: Write Scripts",permalink:"/docs/Script/write-script"},next:{title:"Wallets",permalink:"/docs/wallets/"}},d={},a=[];function l(e){const r={a:"a",code:"code",h1:"h1",li:"li",p:"p",pre:"pre",ul:"ul",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"common-script-error-code",children:"Common Script Error Code"}),"\n",(0,t.jsx)(r.p,{children:"CKB defines some basic error codes:"}),"\n",(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsx)(r.li,{children:"1: CKB_INDEX_OUT_OF_BOUND, means you have finished fetching all indices in a kind"}),"\n",(0,t.jsx)(r.li,{children:"2: CKB_ITEM_MISSING, means an entity is not present, such as fetching a type script from a cell that doesn\u2019t have one."}),"\n",(0,t.jsx)(r.li,{children:"3: CKB_LENGTH_NOT_ENOUGH, means some data length is wrong such as invalid script args or signature length."}),"\n",(0,t.jsxs)(r.li,{children:["4: CKB_INVALID_DATA, means there is something wrong with the ",(0,t.jsx)(r.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0008-serialization/0008-serialization.md",children:"molecule serialization"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(r.p,{children:["Molecule Error Codes from ",(0,t.jsx)(r.a,{href:"https://github.com/nervosnetwork/ckb-c-stdlib/blob/61c7819c9ccf164f5e13d8439c554f80857e2c4b/molecule/molecule2_reader.h#L78-L85",children:"CKB standard C library"})]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-c",children:"#define MOL2_ERR_TOTAL_SIZE 0x01\n#define MOL2_ERR_HEADER 0x02\n#define MOL2_ERR_OFFSET 0x03\n#define MOL2_ERR_UNKNOWN_ITEM 0x04\n#define MOL2_ERR_INDEX_OUT_OF_BOUNDS 0x05\n#define MOL2_ERR_FIELD_COUNT 0x06\n#define MOL2_ERR_DATA 0x07\n#define MOL2_ERR_OVERFLOW 0x08\n"})}),"\n",(0,t.jsxs)(r.p,{children:["Error codes from common scripts via ",(0,t.jsx)(r.a,{href:"https://nervosnetwork.github.io/ckb-script-error-codes/",children:"ckb-script-error-codes"})]}),"\n",(0,t.jsx)("iframe",{width:"100%",height:"315",src:"https://nervosnetwork.github.io/ckb-script-error-codes",frameborder:"0",allowfullscreen:!0})]})}function m(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,r,o)=>{o.d(r,{R:()=>s,x:()=>c});var t=o(6540);const n={},i=t.createContext(n);function s(e){const r=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),t.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9a6c79a7.f731ae22.js b/assets/js/9a6c79a7.f731ae22.js new file mode 100644 index 000000000..9dabab1a4 --- /dev/null +++ b/assets/js/9a6c79a7.f731ae22.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[400],{6122:(e,r,o)=>{o.r(r),o.d(r,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>c,toc:()=>a});var n=o(4848),t=o(8453);const s={id:"common-script-error-code",title:"Common Script Error Code",sidebar_position:8},i="Common Script Error Code",c={id:"Script/common-script-error-code",title:"Common Script Error Code",description:"CKB defines some basic error codes:",source:"@site/docs/Script/common-script-error-code.mdx",sourceDirName:"Script",slug:"/Script/common-script-error-code",permalink:"/docs/Script/common-script-error-code",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Script/common-script-error-code.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:8,frontMatter:{id:"common-script-error-code",title:"Common Script Error Code",sidebar_position:8},sidebar:"tutorial",previous:{title:"Tutorial: Run JS on CKB",permalink:"/docs/Script/js-script"},next:{title:"Wallets",permalink:"/docs/wallets/"}},d={},a=[];function l(e){const r={a:"a",code:"code",h1:"h1",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.h1,{id:"common-script-error-code",children:"Common Script Error Code"}),"\n",(0,n.jsx)(r.p,{children:"CKB defines some basic error codes:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:"1: CKB_INDEX_OUT_OF_BOUND, means you have finished fetching all indices in a kind"}),"\n",(0,n.jsx)(r.li,{children:"2: CKB_ITEM_MISSING, means an entity is not present, such as fetching a type script from a cell that doesn\u2019t have one."}),"\n",(0,n.jsx)(r.li,{children:"3: CKB_LENGTH_NOT_ENOUGH, means some data length is wrong such as invalid script args or signature length."}),"\n",(0,n.jsxs)(r.li,{children:["4: CKB_INVALID_DATA, means there is something wrong with the ",(0,n.jsx)(r.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0008-serialization/0008-serialization.md",children:"molecule serialization"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["Molecule Error Codes from ",(0,n.jsx)(r.a,{href:"https://github.com/nervosnetwork/ckb-c-stdlib/blob/61c7819c9ccf164f5e13d8439c554f80857e2c4b/molecule/molecule2_reader.h#L78-L85",children:"CKB standard C library"})]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-c",children:"#define MOL2_ERR_TOTAL_SIZE 0x01\n#define MOL2_ERR_HEADER 0x02\n#define MOL2_ERR_OFFSET 0x03\n#define MOL2_ERR_UNKNOWN_ITEM 0x04\n#define MOL2_ERR_INDEX_OUT_OF_BOUNDS 0x05\n#define MOL2_ERR_FIELD_COUNT 0x06\n#define MOL2_ERR_DATA 0x07\n#define MOL2_ERR_OVERFLOW 0x08\n"})}),"\n",(0,n.jsxs)(r.p,{children:["Error codes from common scripts via ",(0,n.jsx)(r.a,{href:"https://nervosnetwork.github.io/ckb-script-error-codes/",children:"ckb-script-error-codes"})]}),"\n",(0,n.jsx)("iframe",{width:"100%",height:"315",src:"https://nervosnetwork.github.io/ckb-script-error-codes",frameborder:"0",allowfullscreen:!0})]})}function m(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453:(e,r,o)=>{o.d(r,{R:()=>i,x:()=>c});var n=o(6540);const t={},s=n.createContext(t);function i(e){const r=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9c63e866.37568838.js b/assets/js/9c63e866.37568838.js new file mode 100644 index 000000000..9e2e4767a --- /dev/null +++ b/assets/js/9c63e866.37568838.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[489],{1425:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>d,default:()=>f,frontMatter:()=>l,metadata:()=>u,toc:()=>h});var n=r(4848),s=r(8453),i=r(9489),c=r(7227),a=r(898),o=r(8652);const l={id:"minimal-script",title:"Tutorial: A Minimal Script",sidebar_position:3},d="Tutorial: A Minimal Script",u={id:"Script/minimal-script",title:"Tutorial: A Minimal Script",description:" i8 {\n 0\n}\n"})}),"\n",(0,n.jsxs)(t.p,{children:["The simplest CKB Script code, often called ",(0,n.jsx)(t.code,{children:"always-success"}),", always returns 0 as its return code. You might think this simplest Script code is also the dumbest one because if you use this as your Lock Script, your tokens could be taken by anyone."]}),"\n",(0,n.jsxs)(t.p,{children:["However, this simplest Script proves useful in a development environment. When testing Scripts on a local blockchain for your dApp, you might allow the testing Cells to have an ",(0,n.jsx)(t.code,{children:"always-success"})," Lock Script to simplify your testing workflow."]}),"\n",(0,n.jsxs)(t.p,{children:["Despite its utility, the ",(0,n.jsx)(t.code,{children:"always-success"})," Script is not very interesting due to its simplicity."]}),"\n",(0,n.jsx)(t.p,{children:"Here we will start with a more interesting idea:"}),"\n",(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsxs)(t.p,{children:["Personally I dislike carrot. I do know that carrot is great from a nutritional point of view, but I still want to avoid it due to the taste. Now what if I want to set a rule, that none of my Cells on CKB has data that begin with the word ",(0,n.jsx)(t.code,{children:"carrot"}),"?"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Let\u2019s write a Script code to ensure this."}),"\n",(0,n.jsxs)(t.p,{children:["Below is a step-by-step guide, and you can also clone the full code example from the Github at ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples/carrot-script",children:"carrot-script"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"carrot-forbidden-script",children:"Carrot-Forbidden Script"}),"\n",(0,n.jsxs)(t.p,{children:["The first step is to create a new Script project. We use ",(0,n.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates",children:"ckb-script-templates"})," for this purpose. You will need the following dependencies:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"git"}),", ",(0,n.jsx)(t.code,{children:"make"}),", ",(0,n.jsx)(t.code,{children:"sed"}),", ",(0,n.jsx)(t.code,{children:"bash"}),", ",(0,n.jsx)(t.code,{children:"sha256sum"})," and others Unix utilities"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Rust"})," with ",(0,n.jsx)(t.code,{children:"riscv64"})," target installed: ",(0,n.jsx)(t.code,{children:"rustup target add riscv64imac-unknown-none-elf"})]}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.code,{children:"Clang 16+"})}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"cargo-generate"}),": You can install this via ",(0,n.jsx)(t.code,{children:"cargo install cargo-generate"})]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["If you got any problems for these dependencies, refer to ",(0,n.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates?tab=readme-ov-file#dependencies",children:"readme"})," for install details."]}),"\n",(0,n.jsx)(t.h3,{id:"init-a-script-project",children:"Init a Script Project"}),"\n",(0,n.jsxs)(t.p,{children:["Now let's run the command to generate a new Script project called ",(0,n.jsx)(t.code,{children:"my-first-contract-workspace"}),":"]}),"\n",(0,n.jsxs)(i.A,{children:[(0,n.jsx)(c.A,{value:"init-script",label:"Command",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:'alias create-ckb-scripts="cargo generate gh:cryptape/ckb-script-templates workspace"\ncreate-ckb-scripts\n'})})}),(0,n.jsx)(c.A,{value:"init-script-result",label:"Response",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"\u26a0\ufe0f Favorite `gh:cryptape/ckb-script-templates` not found in config, using it as a git repository: https://github.com/cryptape/ckb-script-templates.git\n\ud83e\udd37 Project Name: my-first-contract-workspace\n\ud83d\udd27 Destination: /tmp/my-first-contract-workspace ...\n\ud83d\udd27 project-name: my-first-contract-workspace ...\n\ud83d\udd27 Generating template ...\n\ud83d\udd27 Moving generated files into: `/tmp/my-first-contract-workspace`...\n\ud83d\udd27 Initializing a fresh Git repository\n\u2728 Done! New project created /tmp/my-first-contract-workspace\n"})})})]}),"\n",(0,n.jsx)(t.h3,{id:"create-a-new-script",children:"Create a New Script"}),"\n",(0,n.jsxs)(t.p,{children:["Let\u2019s create a new Script called ",(0,n.jsx)(t.code,{children:"carrot"}),"."]}),"\n",(0,n.jsxs)(i.A,{children:[(0,n.jsx)(c.A,{value:"create-a-new-script",label:"Command",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"cd my-first-contract-workspace\nmake generate\n"})})}),(0,n.jsx)(c.A,{value:"create-a-new-script-result",label:"Response",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"\ud83e\udd37 Project Name: carrot\n\ud83d\udd27 Destination: /tmp/my-first-contract-workspace/contracts/carrot ...\n\ud83d\udd27 project-name: carrot ...\n\ud83d\udd27 Generating template ...\n\ud83d\udd27 Moving generated files into: `/tmp/my-first-contract-workspace/contracts/carrot`...\n\ud83d\udd27 Initializing a fresh Git repository\n\u2728 Done! New project created /tmp/my-first-contract-workspace/contracts/carrot\n"})})})]}),"\n",(0,n.jsxs)(t.p,{children:["Our project is successfully setup! You can run ",(0,n.jsx)(t.code,{children:"tree ."})," to show the project structure:"]}),"\n",(0,n.jsxs)(i.A,{children:[(0,n.jsx)(c.A,{value:"script-project-structure",label:"Command",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",metastring:"{5}",children:"tree .\n"})})}),(0,n.jsx)(c.A,{value:"script-project-structure-result",label:"Response",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:".\n\u251c\u2500\u2500 Cargo.lock\n\u251c\u2500\u2500 Cargo.toml\n\u251c\u2500\u2500 Makefile\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 contracts\n\u2502 \u2514\u2500\u2500 carrot\n\u2502 \u251c\u2500\u2500 Cargo.toml\n\u2502 \u251c\u2500\u2500 Makefile\n\u2502 \u251c\u2500\u2500 README.md\n\u2502 \u2514\u2500\u2500 src\n\u2502 \u2514\u2500\u2500 main.rs\n\u251c\u2500\u2500 scripts\n\u2502 \u2514\u2500\u2500 find_clang\n\u2514\u2500\u2500 tests\n \u251c\u2500\u2500 Cargo.toml\n \u2514\u2500\u2500 src\n \u251c\u2500\u2500 lib.rs\n \u2514\u2500\u2500 tests.rs\n\n7 directories, 13 files\n"})})})]}),"\n",(0,n.jsxs)(t.p,{children:["Here's a little introduction: ",(0,n.jsx)(t.code,{children:"contracts/carrot/src/main.rs"})," contains the source code of the carrot Script, while ",(0,n.jsx)(t.code,{children:"tests/tests.rs"})," provides unit tests for our Scripts. We will introduce the tests after we write the Script."]}),"\n",(0,n.jsx)(t.h3,{id:"use-ckb-syscall-with-ckb-std-library",children:"Use CKB Syscall with CKB-STD Library"}),"\n",(0,n.jsx)(t.p,{children:"To ensure the security of CKB Script, each Script has to run in an isolated environment that is totally separated from the main computer you are running CKB. This way it won\u2019t be able to access data it doesn\u2019t need, such as your private keys or passwords."}),"\n",(0,n.jsxs)(t.p,{children:["However, for a Script to be useful, there must be certain data it want to access, such as the Cell a Script guards, or a transaction a Script validates. CKB provides ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0009-vm-syscalls/0009-vm-syscalls.md",children:"syscalls"})," to ensure this, syscalls are defined in RISC-V standard, they provide a way to access certain resources provided by the environment. In a normal situation, the environment here means the operating system, but in the case of CKB VM, the environment refers to the actual CKB process. With syscalls, a CKB Script can access the whole transaction containing itself, including inputs, outputs, witnesses, and deps."]}),"\n",(0,n.jsxs)(t.p,{children:["The good news, is that we have encapsulated syscalls in an easy to use library called ",(0,n.jsx)(t.a,{href:"https://docs.rs/ckb-std/latest/ckb_std/",children:"CKB-STD"})," in Rust, you are very welcome to poke around the ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-std",children:"source code"})," of this library to see how syscalls are implemented. The bottomline is you can just grab this library and use the wrapped functions to make syscalls as you want."]}),"\n",(0,n.jsx)(t.p,{children:"For our carrot-forbidden Script to ensure none of the Cells can have carrot in Cell data, we will use CKB syscall to read Cell data in the Script."}),"\n",(0,n.jsxs)(t.p,{children:["Open ",(0,n.jsx)(t.code,{children:"my-first-contract-workspace/contracts/carrot/src/main.rs"})," and change it to the following:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",metastring:'title="my-first-contract-workspace/contracts/carrot/src/main.rs"',children:'#![no_std]\n#![cfg_attr(not(test), no_main)]\n\n#[cfg(test)]\nextern crate alloc;\n\nmod error;\n\nuse ckb_std::{ckb_constants::Source, debug, error::SysError, high_level::load_cell_data};\n\n#[cfg(not(test))]\nuse ckb_std::default_alloc;\nuse error::Error;\n#[cfg(not(test))]\nckb_std::entry!(program_entry);\n#[cfg(not(test))]\ndefault_alloc!();\n\npub fn program_entry() -> i8 { \n match carrot_forbidden() {\n Ok(_) => 0,\n Err(err) => err as i8,\n }\n}\n\nfn carrot_forbidden() -> Result<(), Error> {\n let mut index = 0;\n loop {\n match load_cell_data(index, Source::GroupOutput) {\n Ok(data) => {\n if data.starts_with("carrot".as_bytes()) {\n return Err(Error::CarrotAttack);\n }else{\n debug!("output #{:} has no carrot! Hooray!", index);\n }\n },\n Err(err) => {\n match err {\n // we loop out all the output cell\n SysError::IndexOutOfBound => break,\n _ => return Err(Error::from(err)),\n }\n }\n }\n // Increment index to process next cell\n index += 1;\n }\n Ok(())\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["We also need to a ",(0,n.jsx)(t.code,{children:"Error"})," module to define the error code when carrot Script fails. Create a new file named ",(0,n.jsx)(t.code,{children:"error.rs"})," in ",(0,n.jsx)(t.code,{children:"my-first-contract-workspace/contracts/carrot/src/error.rs"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",metastring:'title="my-first-contract-workspace/contracts/carrot/src/error.rs"',children:'use ckb_std::error::SysError;\n\n#[cfg(test)]\nextern crate alloc;\n\n#[repr(i8)]\npub enum Error {\n IndexOutOfBound = 1,\n ItemMissing,\n LengthNotEnough,\n Encoding,\n // Add customized errors here...\n CarrotAttack,\n}\n\nimpl From for Error {\n fn from(err: SysError) -> Self {\n match err {\n SysError::IndexOutOfBound => Self::IndexOutOfBound,\n SysError::ItemMissing => Self::ItemMissing,\n SysError::LengthNotEnough(_) => Self::LengthNotEnough,\n SysError::Encoding => Self::Encoding,\n SysError::Unknown(err_code) => panic!("unexpected sys error {}", err_code),\n }\n }\n}\n'})}),"\n",(0,n.jsx)(t.p,{children:"Several points worth explaining here:"}),"\n",(0,n.jsxs)(t.p,{children:["To load Cell data, we use ",(0,n.jsx)(t.code,{children:"load_cell_data"})," syscall from ",(0,n.jsx)(t.code,{children:"CKB-STD"})," library. the function takes two arguments, one is the index number, and one is source type flag that denoting the source of Cells to locate. Different source type and index number will point to different Cell. For example, ",(0,n.jsx)(t.code,{children:"load_cell_data(0, Source::GroupOutput)"})," means load the first Cell from the output Cells group with the same running Script as current Script. You can check ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0046-syscalls-summary/0046-syscalls-summary.md#source",children:"rfc"})," for more details."]}),"\n",(0,n.jsx)(t.p,{children:"The workflow of our Script goes like this:"}),"\n",(0,n.jsxs)(t.p,{children:["First, it loops through all output Cells in the transaction, load each Cell data and test if those bytes match the word ",(0,n.jsx)(t.code,{children:"carrot"}),". If we found a match, the Script would return -1, denoting an error status, if no match is found, the Script exits with 0, meaning execution success."]}),"\n",(0,n.jsx)(t.p,{children:"To perform the loop, the Script would keep an index variable, in each loop iteration, it would tries to make the syscall to fetch the Cell denoted by current index value, if the syscall returns CKB_INDEX_OUT_OF_BOUND, it means the Script has iterated through all the Cells, hence it just exits the loop, otherwise, the loop would continue, the Cell data is tested, then index variable is incremented for the next iteration."}),"\n",(0,n.jsxs)(t.p,{children:["Besides the main logic in ",(0,n.jsx)(t.code,{children:"main.rs"})," file, we also write a ",(0,n.jsx)(t.code,{children:"error.rs"})," to define our custom error code for the carrot Script."]}),"\n",(0,n.jsx)(t.p,{children:"CKB defines some basic error code like:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"1(CKB_INDEX_OUT_OF_BOUND) means you have finished fetching all indices in a kind"}),"\n",(0,n.jsx)(t.li,{children:"2(CKB_ITEM_MISSING) means an entity is not present, such as fetching a Type Script from a Cell that doesn\u2019t have one."}),"\n",(0,n.jsx)(t.li,{children:"3(CKB_LENGTH_NOT_ENOUGH) means some data length is wrong such as invalid Script args or signature length."}),"\n",(0,n.jsxs)(t.li,{children:["4(CKB_INVALID_DATA) means there is something wrong with the ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0008-serialization/0008-serialization.md",children:"molecule serialization"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["We define error code 5 to be the custom ",(0,n.jsx)(t.code,{children:"CarrotAttack"})," error. So everytime the Script throws out error code 5, we know that means the Script have found a Cell data starts with the ",(0,n.jsx)(t.code,{children:"carrot"})," word so it fails."]}),"\n",(0,n.jsx)(t.p,{children:"So that's all! This concludes your first useful CKB Script code!"}),"\n",(0,n.jsx)(t.p,{children:"In the next section, we will see how we can test and deploy it to CKB and run it."}),"\n",(0,n.jsx)(t.h3,{id:"testing-your-script",children:"Testing Your Script"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"ckb-script-templates"})," packs the unit test section that we can use to quickly test our Script without deploying the Script to blockchains."]}),"\n",(0,n.jsxs)(t.p,{children:["All test case goes into the ",(0,n.jsx)(t.code,{children:"my-first-contract-workspace/tests/src/tests.rs"})," file. The way tests works is to leverage a library called ",(0,n.jsx)(t.a,{href:"https://docs.rs/ckb-testtool/latest/ckb_testtool/",children:"ckb_testtool"})," to simulate the execution of the Script."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",metastring:'title="my-first-contract-workspace/tests/src/tests.rs"',children:'// Include your tests here\n// See https://github.com/xxuejie/ckb-native-build-sample/blob/main/tests/src/tests.rs for examples\n\nuse super::*;\nuse ckb_testtool::{\n builtin::ALWAYS_SUCCESS,\n ckb_types::{bytes::Bytes, core::TransactionBuilder, packed::*, prelude::*},\n context::Context,\n};\n\nconst MAX_CYCLES: u64 = 10_000_000;\n\n#[test]\nfn test_no_carrot() {\n // deploy contract\n let mut context = Context::default();\n let loader = Loader::default();\n let carrot_bin = loader.load_binary("carrot");\n let carrot_out_point = context.deploy_cell(carrot_bin);\n let carrot_cell_dep = CellDep::new_builder()\n .out_point(carrot_out_point.clone())\n .build();\n\n // prepare scripts\n let always_success_out_point = context.deploy_cell(ALWAYS_SUCCESS.clone());\n let lock_script = context\n .build_script(&always_success_out_point.clone(), Default::default())\n .expect("script");\n let lock_script_dep = CellDep::new_builder()\n .out_point(always_success_out_point)\n .build();\n\n // prepare cell deps\n let cell_deps: Vec = vec![lock_script_dep, carrot_cell_dep];\n\n // prepare cells\n let input_out_point = context.create_cell(\n CellOutput::new_builder()\n .capacity(1000u64.pack())\n .lock(lock_script.clone())\n .build(),\n Bytes::new(),\n );\n let input = CellInput::new_builder()\n .previous_output(input_out_point.clone())\n .build();\n\n let type_script = context\n .build_script(&carrot_out_point, Bytes::new())\n .expect("script");\n\n let outputs = vec![\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script.clone())\n .type_(Some(type_script.clone()).pack())\n .build(),\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script)\n .build(),\n ];\n\n // prepare output cell data\n let outputs_data = vec![Bytes::from("apple"), Bytes::from("tomato")];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let cycles = context\n .verify_tx(&tx, MAX_CYCLES)\n .expect("pass verification");\n println!("consume cycles: {}", cycles);\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, we wrote the first test case named ",(0,n.jsx)(t.code,{children:"test_no_carrot"})," to simulate a transaction that use our carrot-forbidden Script in one of the output Cell, and we build all the output Cell without ",(0,n.jsx)(t.code,{children:"carrot"})," in their Cell data. To make the test pass, the transaction should be valid and verified by CKB successfully."]}),"\n",(0,n.jsxs)(t.p,{children:["We can also write another test that simulates if the transaction does contains output Cell that its data starts with the word ",(0,n.jsx)(t.code,{children:"carrot"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",metastring:'title=""',children:'#[test]\nfn test_carrot_attack() {\n // deploy contract\n let mut context = Context::default();\n let loader = Loader::default();\n let carrot_bin = loader.load_binary("carrot");\n let carrot_out_point = context.deploy_cell(carrot_bin);\n let carrot_cell_dep = CellDep::new_builder()\n .out_point(carrot_out_point.clone())\n .build();\n\n // prepare scripts\n let always_success_out_point = context.deploy_cell(ALWAYS_SUCCESS.clone());\n let lock_script = context\n .build_script(&always_success_out_point.clone(), Default::default())\n .expect("script");\n let lock_script_dep = CellDep::new_builder()\n .out_point(always_success_out_point)\n .build();\n\n // prepare cell deps\n let cell_deps: Vec = vec![lock_script_dep, carrot_cell_dep];\n\n // prepare cells\n let input_out_point = context.create_cell(\n CellOutput::new_builder()\n .capacity(1000u64.pack())\n .lock(lock_script.clone())\n .build(),\n Bytes::new(),\n );\n let input = CellInput::new_builder()\n .previous_output(input_out_point.clone())\n .build();\n\n let type_script = context\n .build_script(&carrot_out_point, Bytes::new())\n .expect("script");\n\n let outputs = vec![\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script.clone())\n .type_(Some(type_script.clone()).pack())\n .build(),\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script)\n .build(),\n ];\n\n // prepare output cell data\n let outputs_data = vec![Bytes::from("carrot"), Bytes::from("tomato")];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let err = context.verify_tx(&tx, MAX_CYCLES).unwrap_err();\n assert_script_error(err, 5);\n}\n\nfn assert_script_error(err: Error, err_code: i8) {\n let error_string = err.to_string();\n assert!(\n error_string.contains(format!("error code {} ", err_code).as_str()),\n "error_string: {}, expected_error_code: {}",\n error_string,\n err_code\n );\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["In this test, we check if the error code throws by our Script is matched with the error code 5 in ",(0,n.jsx)(t.code,{children:"assert_script_error(err, 5);"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"deploy-script-to-blockchains",children:"Deploy Script to Blockchains?"}),"\n",(0,n.jsx)(t.p,{children:"We will introduce this part in another tutorial soon. stay tuned!"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,n.jsx)(t.p,{children:"By following this tutorial this far, you have mastered how to write a basic Script on CKB. Here's a quick recap:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Use ",(0,n.jsx)(t.code,{children:"ckb-script-templates"})," to init a Script project"]}),"\n",(0,n.jsxs)(t.li,{children:["Use ",(0,n.jsx)(t.code,{children:"CKB-STD"})," to leverage CKB syscalls to read all kinds of data from transaction."]}),"\n",(0,n.jsx)(t.li,{children:"Use unit tests without deploying the Script to blockchains to quickly test the Script."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["This tutorial is originally taken and adapt from the amazing blog post by ",(0,n.jsx)(t.a,{href:"https://xuejie.space/2019_07_13_introduction_to_ckb_script_programming_script_basics/",children:"xuejie.space"})]}),"\n",(0,n.jsxs)(t.li,{children:["Full source code of this tutorial: ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples/carrot-script",children:"carrot-script"})]}),"\n",(0,n.jsxs)(t.li,{children:["CKB syscalls specs: ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0009-vm-syscalls/0009-vm-syscalls.md",children:"RFC-0009"})]}),"\n",(0,n.jsxs)(t.li,{children:["script templates: ",(0,n.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates",children:"ckb-script-templates"})]}),"\n",(0,n.jsxs)(t.li,{children:["CKB transaction structure: ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,n.jsxs)(t.li,{children:["CKB data structure basics: ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"}),"\n./ScriptHeaders.js"]}),"\n"]})]})}function f(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}},898:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(4848);const s={basic:{time:"5 - 7 min",topics:[{label:"Script",link:"/docs/concepts/glossary#script"},{label:"CKB-VM",link:"/docs/concepts/glossary#ckb-vm"},{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"}],tools:[(0,n.jsxs)("div",{children:[(0,n.jsx)("a",{href:"https://git-scm.com/",target:"_blank",rel:"noopener noreferrer",children:"git"}),",",(0,n.jsx)("a",{href:"https://www.tutorialspoint.com/unix_commands/make.htm",target:"_blank",rel:"noopener noreferrer",children:"make"}),",",(0,n.jsx)("a",{href:"https://www.gnu.org/software/bash/",target:"_blank",rel:"noopener noreferrer",children:"bash"}),",",(0,n.jsx)("a",{href:"https://linux.die.net/man/1/sha256sum",target:"_blank",rel:"noopener noreferrer",children:"sha256sum"})," and others Unix utilities."]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("a",{href:"https://www.rust-lang.org/",children:"Rust"})," and riscv64 target: "," ",(0,n.jsx)("code",{children:"rustup target add riscv64imac-unknown-none-elf"})]}),(0,n.jsx)("div",{children:(0,n.jsx)("a",{href:"https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html",children:"Clang 16+"})}),(0,n.jsx)("div",{children:(0,n.jsx)("a",{href:"https://github.com/cargo-generate/cargo-generate",children:"cargo-generate"})})]}}},7227:(e,t,r)=>{r.d(t,{A:()=>c});r(6540);var n=r(8215);const s={tabItem:"tabItem_Ymn6"};var i=r(4848);function c(e){var t=e.children,r=e.hidden,c=e.className;return(0,i.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,c),hidden:r,children:t})}},9489:(e,t,r)=>{r.d(t,{A:()=>w});var n=r(6540),s=r(8215),i=r(4245),c=r(6347),a=r(6494),o=r(2814),l=r(5167),d=r(1269);function u(e){var t,r;return null!=(t=null==(r=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?t:[]}function p(e){var t=e.values,r=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(r);return function(e){var t=(0,l.X)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,r])}function h(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function m(e){var t=e.queryString,r=void 0!==t&&t,s=e.groupId,i=(0,c.W6)(),a=function(e){var t=e.queryString,r=void 0!==t&&t,n=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:r,groupId:s});return[(0,o.aZ)(a),(0,n.useCallback)((function(e){if(a){var t=new URLSearchParams(i.location.search);t.set(a,e),i.replace(Object.assign({},i.location,{search:t.toString()}))}}),[a,i])]}function f(e){var t,r,s,i,c=e.defaultValue,o=e.queryString,l=void 0!==o&&o,u=e.groupId,f=p(e),b=(0,n.useState)((function(){return function(e){var t,r=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!h({value:r,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var s=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:c,tabValues:f})})),x=b[0],g=b[1],_=m({queryString:l,groupId:u}),j=_[0],y=_[1],w=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Dv)(t),s=r[0],i=r[1],[s,(0,n.useCallback)((function(e){t&&i.set(e)}),[t,i])]),v=w[0],k=w[1],S=function(){var e=null!=j?j:v;return h({value:e,tabValues:f})?e:null}();return(0,a.A)((function(){S&&g(S)}),[S]),{selectedValue:x,selectValue:(0,n.useCallback)((function(e){if(!h({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),k(e)}),[y,k,f]),tabValues:f}}var b=r(1062);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=r(4848);function _(e){var t=e.className,r=e.block,n=e.selectedValue,c=e.selectValue,a=e.tabValues,o=[],l=(0,i.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,r=o.indexOf(t),s=a[r].value;s!==n&&(l(t),c(s))},u=function(e){var t,r=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,s=o.indexOf(e.currentTarget)+1;r=null!=(n=o[s])?n:o[0];break;case"ArrowLeft":var i,c=o.indexOf(e.currentTarget)-1;r=null!=(i=o[c])?i:o[o.length-1]}null==(t=r)||t.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":r},t),children:a.map((function(e){var t=e.value,r=e.label,i=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:function(e){return o.push(e)},onKeyDown:u,onClick:d},i,{className:(0,s.A)("tabs__item",x.tabItem,null==i?void 0:i.className,{"tabs__item--active":n===t}),children:null!=r?r:t}),t)}))})}function j(e){var t=e.lazy,r=e.children,s=e.selectedValue,i=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){var c=i.find((function(e){return e.props.value===s}));return c?(0,n.cloneElement)(c,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:i.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==s})}))})}function y(e){var t=f(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",x.tabList),children:[(0,g.jsx)(_,Object.assign({},e,t)),(0,g.jsx)(j,Object.assign({},e,t))]})}function w(e){var t=(0,b.A)();return(0,g.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},8652:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(6540);const s={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var i=r(4783),c=r(4848);function a(e){var t=e.time,r=e.topics,a=e.tools;return(0,c.jsxs)("div",{className:s.box,children:[(0,c.jsx)("h4",{children:"Tutorial Overview"}),(0,c.jsxs)("div",{className:s.subsection,children:[(0,c.jsx)("strong",{children:"\u23f0 Estimated Time: "}),t]}),r&&(0,c.jsxs)("div",{className:s.subsection,children:[(0,c.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),r.map((function(e,t){return(0,c.jsxs)(n.Fragment,{children:[t>0&&", ",(0,c.jsx)(i.A,{href:e.link,children:e.label})]},t)}))]}),(0,c.jsx)("div",{className:s.subsection,children:(0,c.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,c.jsx)("ul",{className:s.toolList,children:a.map((function(e,t){return(0,c.jsx)("li",{children:e},t)}))})]})}},8453:(e,t,r)=>{r.d(t,{R:()=>c,x:()=>a});var n=r(6540);const s={},i=n.createContext(s);function c(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a205f28c.840ef738.js b/assets/js/a205f28c.840ef738.js deleted file mode 100644 index 6ea589802..000000000 --- a/assets/js/a205f28c.840ef738.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[580],{238:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>b,frontMatter:()=>o,metadata:()=>d,toc:()=>u});var t=s(4848),a=s(8453),r=s(9489),c=s(7227);const o={id:"rpcs",title:"RPCs",sidebar_position:4},i="RPCs",d={id:"rpcs",title:"RPCs",description:"CKB RPCs are a set of programming interfaces provided by the Nervos CKB blockchain, enabling developers to interact with the network for querying data, managing transactions, and deploying smart contracts directly.",source:"@site/docs/rpcs.mdx",sourceDirName:".",slug:"/rpcs",permalink:"/docs/rpcs",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/rpcs.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:4,frontMatter:{id:"rpcs",title:"RPCs",sidebar_position:4},sidebar:"tutorial",previous:{title:"Wallets",permalink:"/docs/wallets/"},next:{title:"Run a CKB Node",permalink:"/docs/Node/"}},l={},u=[{value:"Public JSON RPC Nodes",id:"public-json-rpc-nodes",level:2},{value:"RPC Provider: Ankr",id:"rpc-provider-ankr",level:2},{value:"CKB JSON-RPC Protocols",id:"ckb-json-rpc-protocols",level:2},{value:"Basic Usage",id:"basic-usage",level:2},{value:"Subscription",id:"subscription",level:2},{value:"TCP Based RPC",id:"tcp-based-rpc",level:2},{value:"WebSocket Based RPC",id:"websocket-based-rpc",level:2},{value:"Serialization",id:"serialization",level:2},{value:"Numbers",id:"numbers",level:3},{value:"Binary Data",id:"binary-data",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"rpcs",children:"RPCs"}),"\n",(0,t.jsx)(n.p,{children:"CKB RPCs are a set of programming interfaces provided by the Nervos CKB blockchain, enabling developers to interact with the network for querying data, managing transactions, and deploying smart contracts directly."}),"\n",(0,t.jsx)(n.h2,{id:"public-json-rpc-nodes",children:"Public JSON RPC Nodes"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"These nodes are provided by community members, they may be unstable, incomplete or not work at all, use at your own risk."}),"\n",(0,t.jsx)(n.li,{children:"You may use these nodes to try out or test some features, but you should not use them for production."}),"\n",(0,t.jsx)(n.li,{children:"Since ckb v0.105.0, ckb already included indexer service, just use ckb jsonrpc url for indexer service."}),"\n"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Link"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Mainnet"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://mainnet.ckbapp.dev/",children:"https://mainnet.ckbapp.dev/"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Mainnet"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://mainnet.ckb.dev/",children:"https://mainnet.ckb.dev/"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Testnet"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://testnet.ckbapp.dev/",children:"https://testnet.ckbapp.dev/"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Testnet"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://testnet.ckb.dev/",children:"https://testnet.ckb.dev/"})})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"rpc-provider-ankr",children:"RPC Provider: Ankr"}),"\n",(0,t.jsxs)(n.p,{children:["Ankr is an RPC provider that wors as intermediary to help you interact with the Nervos Network. You might experience some levels of latency depending on the provider\u2019s location.\nAnkr\u2019s endpoint root: ",(0,t.jsx)(n.a,{href:"https://rpc.ankr.com/nervos",children:"https://rpc.ankr.com/nervos"})]}),"\n",(0,t.jsx)(n.h2,{id:"ckb-json-rpc-protocols",children:"CKB JSON-RPC Protocols"}),"\n",(0,t.jsxs)(n.p,{children:["CKB exposes a set of RPCs in ",(0,t.jsx)(n.a,{href:"https://www.jsonrpc.org/specification",children:"JSON-RPC 2.0"})," protocols for interactions. For more details, please refer to ",(0,t.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/blob/master/rpc/README.md",children:"CKB JSON RPC Protocols Documentation"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The RPCs exposed by CKB are only designed for internal usage. Please limit the access to the CKB RPCs strictly to trusted machines (by using rpc.listen_address configuration option). Exposing CKB RPCs to the public Internet is dangerous and strongly discouraged."}),"\n",(0,t.jsx)(n.li,{children:"CKB JSON-RPC only supports HTTP now. If you need SSL support, please setup a reverse proxy via nginx or other HTTPS servers."}),"\n",(0,t.jsx)(n.li,{children:"Subscriptions require a full duplex connection. CKB offers such connections in the form of tcp (enable with rpc.tcp_listen_address configuration option) and websockets (enable with rpc.ws_listen_address), plain HTTP connection does not support subscriptions. See below for examples on this."}),"\n"]})}),"\n",(0,t.jsx)(n.h2,{id:"basic-usage",children:"Basic Usage"}),"\n",(0,t.jsxs)(n.p,{children:["The following commands uses ",(0,t.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/blob/master/rpc/README.md#get_tip_block_number",children:"get_tip_block_number"})," RPC to fetch the ",(0,t.jsx)(n.code,{children:"tip"})," block number, of the latest block number in the longest blockchain:"]}),"\n",(0,t.jsxs)(r.A,{children:[(0,t.jsx)(c.A,{value:"get-tip-block-number",label:"Command",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "get_tip_block_number",\n "params": []\n}\' \\\n| tr -d \'\\n\' \\\n| curl -H \'content-type: application/json\' -d @- \\\nhttp://localhost:8114\n'})})}),(0,t.jsx)(c.A,{value:"tip-block-number",label:"Response",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","result":"0x2cb4","id":2}\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["The following commands uses ",(0,t.jsx)(n.code,{children:"send_transaction"})," RPC to send transactions to the CKB network:"]}),"\n",(0,t.jsxs)(r.A,{children:[(0,t.jsx)(c.A,{value:"send-transaction",label:"Command",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'echo \'{\n "id": 3,\n "jsonrpc": "2.0",\n "method": "send_transaction",\n "params": [\n {\n "cell_deps": [\n {\n "dep_type": "code",\n "out_point": {\n "index": "0x0",\n "tx_hash": "0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3"\n }\n }\n ],\n "header_deps": [\n "0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed"\n ],\n "inputs": [\n {\n "previous_output": {\n "index": "0x0",\n "tx_hash": "0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17"\n },\n "since": "0x0"\n }\n ],\n "outputs": [\n {\n "capacity": "0x2540be400",\n "lock": {\n "code_hash": "0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5",\n "hash_type": "data",\n "args": "0x"\n },\n "type": null\n }\n ],\n "outputs_data": [\n "0x"\n ],\n "version": "0x0",\n "witnesses": []\n }\n ]\n}\'\\\n| tr -d \'\\n\' \\\n| curl -H \'content-type: application/json\' -d @- \\\nhttp://localhost:8114\n'})})}),(0,t.jsx)(c.A,{value:"transaction",label:"Response",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "id": 3,\n "jsonrpc": "2.0",\n "result": "0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3"\n}\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["It should be noted that ",(0,t.jsx)(n.code,{children:"send_transaction"})," is asynchronous, that is, the return of the transaction hash, does not mean that the transaction is fully verified, if you need to follow up on the status of the transaction, it is recommended to use the following get_transaction rpc\uff1a"]}),"\n",(0,t.jsxs)(r.A,{children:[(0,t.jsx)(c.A,{value:"send-transaction",label:"Command",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'echo \'{\n "id": 4,\n "jsonrpc": "2.0",\n "method": "get_transaction",\n "params": ["0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3"]\n}\' \\\n| tr -d \'\\n\' \\\n| curl -H \'content-type: application/json\' -d @- \\\nhttp://localhost:8114\n'})})}),(0,t.jsx)(c.A,{value:"transaction",label:"Response",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "id": 4,\n "jsonrpc": "2.0",\n "result": {\n "transaction": {\n "cell_deps": [\n {\n "dep_type": "code",\n "out_point": {\n "index": "0x0",\n "tx_hash": "0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3"\n }\n }\n ],\n "hash": "0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3",\n "header_deps": [\n "0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed"\n ],\n "inputs": [\n {\n "previous_output": {\n "index": "0x0",\n "tx_hash": "0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17"\n },\n "since": "0x0"\n }\n ],\n "outputs": [\n {\n "capacity": "0x2540be400",\n "lock": {\n "code_hash": "0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5",\n "hash_type": "data",\n "args": "0x"\n },\n "type": null\n }\n ],\n "outputs_data": [\n "0x"\n ],\n "version": "0x0",\n "witnesses": []\n },\n "cycles": "0x219",\n "time_added_to_pool" : "0x187b3d137a1",\n "tx_status": {\n "block_hash": null,\n "status": "pending",\n "reason": null\n }\n }\n}\n'})})})]}),"\n",(0,t.jsx)(n.h2,{id:"subscription",children:"Subscription"}),"\n",(0,t.jsxs)(n.p,{children:["To use ",(0,t.jsx)(n.code,{children:"subscription"})," feature, you need to configure CKB to enable such features. In this section, we assume you use the following configuration in ",(0,t.jsx)(n.code,{children:"CKB.toml"}),"section:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'[rpc]\nlisten_address = "127.0.0.1:8114"\ntcp_listen_address = "127.0.0.1:18114"\nws_listen_address = "127.0.0.1:18115"\n\n# ... more configs\n'})}),"\n",(0,t.jsx)(n.p,{children:"This above config ensures CKB listens at 8114 port for normal HTTP connections, 18114 port for TCP duplex connections, and 18115 port for WebSocket duplex connections."}),"\n",(0,t.jsx)(n.h2,{id:"tcp-based-rpc",children:"TCP Based RPC"}),"\n",(0,t.jsxs)(n.p,{children:["The following command uses ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Netcat",children:"netcat"})," to connect via TCP to CKB, then fire the same ",(0,t.jsx)(n.code,{children:"get_tip_block_number"})," RPC as shown above to fetch the block number in the longest chain:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "get_tip_block_number",\n "params": []\n}\' \\\n| tr -d \'\\n\' \\\n| sed -e "s/$/\\n/"\n| nc localhost 18114 -q 1\n{"jsonrpc":"2.0","result":"0xdc90","id":2}\n'})}),"\n",(0,t.jsx)(n.p,{children:"The following command uses netcat to connect to CKB, make a subscription request to monitor the latest committed block:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'cat <(echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "get_tip_block_number",\n "params": []\n}\' \\\n| tr -d \'\\n\' \\\n| sed -e "s/$/\\n/") -\n| nc localhost 18114\n{"jsonrpc":"2.0","result":"0xa","id":2}\n{"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a2810cf\\",\\"timestamp\\":\\"0x16ee81d0d5f\\",\\"number\\":\\"0x30673\\",\\"epoch\\":\\"0x5f102b400007a\\",\\"parent_hash\\":\\"0xc9020c79d4f19797022af3631eb9e76c57933bd608fe81a137b834975616c991\\",\\"transactions_root\\":\\"0x7d8e3c102a5c52598cdbe7d208deb986eb2f0af189bc4655e6dd1a71564c2b25\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"dao\\":\\"0x15b9ae7648400f2fb61d57e0379b2300fc641b7e8db5160000060394d5580007\\",\\"nonce\\":\\"0x1f86f056000002460000000053170600\\",\\"hash\\":\\"0xa3c8feda83d7e184f09cb4f05e535bccd4c159e2cc0ac7a06ea7d457e0051a08\\"}","subscription":"0xa"}}\n{"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a2810cf\\",\\"timestamp\\":\\"0x16ee81d1dfd\\",\\"number\\":\\"0x30674\\",\\"epoch\\":\\"0x5f102b500007a\\",\\"parent_hash\\":\\"0xa3c8feda83d7e184f09cb4f05e535bccd4c159e2cc0ac7a06ea7d457e0051a08\\",\\"transactions_root\\":\\"0x6d2dfc88bd8dda743b5bae14453f5f405a2a29a3cf6fff00c60f0f5c60a84fbe\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"dao\\":\\"0xb4e019376f400f2f34c172e7379b230031d1417d95b5160000a399ffd6580007\\",\\"nonce\\":\\"0xded8ffa1000000000000040a90000000\\",\\"hash\\":\\"0x7d10fd1fb459630aa2f87ee4de699b7466a5da6efc0aee6ff459ff17b6cc5904\\"}","subscription":"0xa"}}\n// ... more data\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Use ",(0,t.jsx)(n.code,{children:"Ctrl-C"})," to exit netcat here."]}),"\n",(0,t.jsx)(n.h2,{id:"websocket-based-rpc",children:"WebSocket Based RPC"}),"\n",(0,t.jsxs)(n.p,{children:["To play with WebSocket based RPC, please make sure to install ",(0,t.jsx)(n.a,{href:"https://github.com/websockets/wscat",children:"wscat"})," first:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"npm install -g wscat\n"})}),"\n",(0,t.jsx)(n.p,{children:"You can use the following command to start wscat and connect to CKB:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"wscat -c ws://localhost:18115\nConnected (press CTRL+C to quit)\n>\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Now we can run the same ",(0,t.jsx)(n.code,{children:"get_tip_block_number"})," request as above:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'> {"id": 2, "jsonrpc": "2.0", "method": "get_tip_block_number", "params": []}\n< {"jsonrpc":"2.0","result":"0x76887","id":2}\n'})}),"\n",(0,t.jsx)(n.p,{children:"You can also create subscriptions for new blocks:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'> {"id": 2, "jsonrpc": "2.0", "method": "subscribe", "params": ["new_tip_header"]} < {"jsonrpc":"2.0","result":"0x2","id":2} < {"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a216e17\\",\\"timestamp\\":\\"0x16f886b2223\\",\\"number\\":\\"0x77e2a\\",\\"epoch\\":\\"0x6c$01a9000135\\",\\"parent_hash\\":\\"0x2662c8056c638408d8f018a53785d68f633bd1edfa06b82d7c29ddcac1d98927\\",\\"transactions_root\\":\\"0xa6488b15373521ec0b1bc9dff1f117cc1cad7d3579e8a6c38cc6e35166dad9bd\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"dao\\":\\"0x1a1aab41ad3eb72fa260f4eedeb9230092c4510af45b390000547d684fc40007\\",\\"nonce\\":\\"0xce1aaca681000089001d0003cb2d0500\\",\\"hash\\":\\"0x993e593921024167c1779146348fe2d82864ecd3f657b3bd2b14fbdfa87c4f06\\"}","subscription":"0x2"}}\n< {"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a216e17\\",\\"timestamp\\":\\"0x16f886b29e3\\",\\"number\\":\\"0x77e2b\\",\\"epoch\\":\\"0x6c601aa000135\\",\\"parent_hash\\":\\"0x993e593921024167c1779146348fe2d82864ecd3f657b3bd2b14fbdfa87c4f06\\",\\"transactions_root\\":\\"0xe64cb6afb57e92a2af1da34d8a1d547fcd8b833e187697ae28a9dfadaaeba247\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0xa807c9cbb16a5af7cf36fd5c20b29535f6db4de52062138ad21ea6790ba9529c\\",\\"dao\\":\\"0xba227d3fcf3eb72fc8d61ff5deb92300402b3f12fb5b390000f113d450c40007\\",\\"nonce\\":\\"0xfb68521601000000000000503c9e2338\\",\\"hash\\":\\"0xf55d0f7ae1d9b106eee96139d86313e46b109ec8fa0d92f9eb6eb8bc81c294ec\\"}","subscription":"0x2"}}\n< {"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a216e17\\",\\"timestamp\\":\\"0x16f886b40a3\\",\\"number\\":\\"0x77e2c\\",\\"epoch\\":\\"0x6c601ab000135\\",\\"parent_hash\\":\\"0xf55d0f7ae1d9b106eee96139d86313e46b109ec8fa0d92f9eb6eb8bc81c294ec\\",\\"transactions_root\\":\\"0xad2c9e1eabc586c8e38cc1eaca61eba5e320bbf4655c510c5be5de9eaafea96f\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"dao\\":\\"0x5a2b4f3df13eb72feb4c4bfbdeb923008c922c1a025c3900008eaa3f52c40007\\",\\"nonce\\":\\"0x7b5ad85601000000000000005b340000\\",\\"hash\\":\\"0x2077e0c022514fe07844411436cfbf50e413694858a3d4775e0c836e787ce7ab\\"}","subscription":"0x2"}}\n<< // ... more data.\n'})}),"\n",(0,t.jsx)(n.h2,{id:"serialization",children:"Serialization"}),"\n",(0,t.jsx)(n.p,{children:"CKB's RPCs returns data in JSON format. While most fields are self-explanatory, CKB has special handling for numbers and binary data:"}),"\n",(0,t.jsx)(n.h3,{id:"numbers",children:"Numbers"}),"\n",(0,t.jsxs)(n.p,{children:["All numbers used in CKB's RPCs, including request parameters and return values, use hex encoding, the number is encoded first in hexadecimal in the most compact format(meaning useless leading zeros should be striped), and then prefixed with ",(0,t.jsx)(n.code,{children:"0x"}),". Here are some examples:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"0"})," is encoded as ",(0,t.jsx)(n.code,{children:"0x0"}),", we cannot remove the remaining ",(0,t.jsx)(n.code,{children:"0"})," since otherwise it won't be a proper number"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"4"})," is encoded as ",(0,t.jsx)(n.code,{children:"0x4"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"15"})," is encoded as ",(0,t.jsx)(n.code,{children:"0xf"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"42"})," is encoded as ",(0,t.jsx)(n.code,{children:"0x2a"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"291"})," is encoded as ",(0,t.jsx)(n.code,{children:"0x123"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"3984"})," is encoded as ",(0,t.jsx)(n.code,{children:"0xf90"})]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"binary-data",children:"Binary Data"}),"\n",(0,t.jsxs)(n.p,{children:["All binary data, including all the hashes, ",(0,t.jsx)(n.code,{children:"args"})," in script, ",(0,t.jsx)(n.code,{children:"outputs_data"})," items, are represented as hex string with ",(0,t.jsx)(n.code,{children:"0x"})," prefix. Some examples include:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"0x65b253cdcb6226e7f8cffec5c47c959b3d74af2caf7970a1eb1500e9b92aa200"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"0x927f3e74dceb87c81ba65a19da4f098b4de75a0d"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"0x40420f00000000000000000000000000"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"0x"})," (empty data)"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Unlike numbers, binary data should always have a even numbered length."})]})}function b(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},7227:(e,n,s)=>{s.d(n,{A:()=>c});s(6540);var t=s(8215);const a={tabItem:"tabItem_Ymn6"};var r=s(4848);function c(e){var n=e.children,s=e.hidden,c=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,t.A)(a.tabItem,c),hidden:s,children:n})}},9489:(e,n,s)=>{s.d(n,{A:()=>y});var t=s(6540),a=s(8215),r=s(4245),c=s(6347),o=s(6494),i=s(2814),d=s(5167),l=s(1269);function u(e){var n,s;return null!=(n=null==(s=t.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,t.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:s.filter(Boolean))?n:[]}function h(e){var n=e.values,s=e.children;return(0,t.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(s);return function(e){var n=(0,d.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,s])}function b(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function p(e){var n=e.queryString,s=void 0!==n&&n,a=e.groupId,r=(0,c.W6)(),o=function(e){var n=e.queryString,s=void 0!==n&&n,t=e.groupId;if("string"==typeof s)return s;if(!1===s)return null;if(!0===s&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=t?t:null}({queryString:s,groupId:a});return[(0,i.aZ)(o),(0,t.useCallback)((function(e){if(o){var n=new URLSearchParams(r.location.search);n.set(o,e),r.replace(Object.assign({},r.location,{search:n.toString()}))}}),[o,r])]}function x(e){var n,s,a,r,c=e.defaultValue,i=e.queryString,d=void 0!==i&&i,u=e.groupId,x=h(e),f=(0,t.useState)((function(){return function(e){var n,s=e.defaultValue,t=e.tabValues;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(s){if(!b({value:s,tabValues:t}))throw new Error('Docusaurus error: The has a defaultValue "'+s+'" but none of its children has the corresponding value. Available values are: '+t.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return s}var a=null!=(n=t.find((function(e){return e.default})))?n:t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:c,tabValues:x})})),m=f[0],j=f[1],v=p({queryString:d,groupId:u}),g=v[0],_=v[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),s=(0,l.Dv)(n),a=s[0],r=s[1],[a,(0,t.useCallback)((function(e){n&&r.set(e)}),[n,r])]),k=y[0],w=y[1],C=function(){var e=null!=g?g:k;return b({value:e,tabValues:x})?e:null}();return(0,o.A)((function(){C&&j(C)}),[C]),{selectedValue:m,selectValue:(0,t.useCallback)((function(e){if(!b({value:e,tabValues:x}))throw new Error("Can't select invalid tab value="+e);j(e),_(e),w(e)}),[_,w,x]),tabValues:x}}var f=s(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=s(4848);function v(e){var n=e.className,s=e.block,t=e.selectedValue,c=e.selectValue,o=e.tabValues,i=[],d=(0,r.a_)().blockElementScrollPositionUntilNextRender,l=function(e){var n=e.currentTarget,s=i.indexOf(n),a=o[s].value;a!==t&&(d(n),c(a))},u=function(e){var n,s=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":var t,a=i.indexOf(e.currentTarget)+1;s=null!=(t=i[a])?t:i[0];break;case"ArrowLeft":var r,c=i.indexOf(e.currentTarget)-1;s=null!=(r=i[c])?r:i[i.length-1]}null==(n=s)||n.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":s},n),children:o.map((function(e){var n=e.value,s=e.label,r=e.attributes;return(0,j.jsx)("li",Object.assign({role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:function(e){return i.push(e)},onKeyDown:u,onClick:l},r,{className:(0,a.A)("tabs__item",m.tabItem,null==r?void 0:r.className,{"tabs__item--active":t===n}),children:null!=s?s:n}),n)}))})}function g(e){var n=e.lazy,s=e.children,a=e.selectedValue,r=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){var c=r.find((function(e){return e.props.value===a}));return c?(0,t.cloneElement)(c,{className:"margin-top--md"}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:r.map((function(e,n){return(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function _(e){var n=x(e);return(0,j.jsxs)("div",{className:(0,a.A)("tabs-container",m.tabList),children:[(0,j.jsx)(v,Object.assign({},e,n)),(0,j.jsx)(g,Object.assign({},e,n))]})}function y(e){var n=(0,f.A)();return(0,j.jsx)(_,Object.assign({},e,{children:u(e.children)}),String(n))}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>o});var t=s(6540);const a={},r=t.createContext(a);function c(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a205f28c.9ae846b7.js b/assets/js/a205f28c.9ae846b7.js new file mode 100644 index 000000000..b7a272844 --- /dev/null +++ b/assets/js/a205f28c.9ae846b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[580],{238:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>b,frontMatter:()=>o,metadata:()=>d,toc:()=>u});var t=s(4848),a=s(8453),r=s(9489),c=s(7227);const o={id:"rpcs",title:"RPCs",sidebar_position:4},i="RPCs",d={id:"rpcs",title:"RPCs",description:"CKB RPCs are a set of programming interfaces provided by the Nervos CKB blockchain, enabling developers to interact with the network for querying data, managing transactions, and deploying smart contracts directly.",source:"@site/docs/rpcs.mdx",sourceDirName:".",slug:"/rpcs",permalink:"/docs/rpcs",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/rpcs.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:4,frontMatter:{id:"rpcs",title:"RPCs",sidebar_position:4},sidebar:"tutorial",previous:{title:"Wallets",permalink:"/docs/wallets/"},next:{title:"Run Node",permalink:"/docs/Node/"}},l={},u=[{value:"Public JSON RPC Nodes",id:"public-json-rpc-nodes",level:2},{value:"RPC Provider: Ankr",id:"rpc-provider-ankr",level:2},{value:"CKB JSON-RPC Protocols",id:"ckb-json-rpc-protocols",level:2},{value:"Basic Usage",id:"basic-usage",level:2},{value:"Subscription",id:"subscription",level:2},{value:"TCP Based RPC",id:"tcp-based-rpc",level:2},{value:"WebSocket Based RPC",id:"websocket-based-rpc",level:2},{value:"Serialization",id:"serialization",level:2},{value:"Numbers",id:"numbers",level:3},{value:"Binary Data",id:"binary-data",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"rpcs",children:"RPCs"}),"\n",(0,t.jsx)(n.p,{children:"CKB RPCs are a set of programming interfaces provided by the Nervos CKB blockchain, enabling developers to interact with the network for querying data, managing transactions, and deploying smart contracts directly."}),"\n",(0,t.jsx)(n.h2,{id:"public-json-rpc-nodes",children:"Public JSON RPC Nodes"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"These nodes are provided by community members, they may be unstable, incomplete or not work at all, use at your own risk."}),"\n",(0,t.jsx)(n.li,{children:"You may use these nodes to try out or test some features, but you should not use them for production."}),"\n",(0,t.jsx)(n.li,{children:"Since ckb v0.105.0, ckb already included indexer service, just use ckb jsonrpc url for indexer service."}),"\n"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Link"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Mainnet"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://mainnet.ckbapp.dev/",children:"https://mainnet.ckbapp.dev/"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Mainnet"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://mainnet.ckb.dev/",children:"https://mainnet.ckb.dev/"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Testnet"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://testnet.ckbapp.dev/",children:"https://testnet.ckbapp.dev/"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Testnet"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://testnet.ckb.dev/",children:"https://testnet.ckb.dev/"})})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"rpc-provider-ankr",children:"RPC Provider: Ankr"}),"\n",(0,t.jsxs)(n.p,{children:["Ankr is an RPC provider that wors as intermediary to help you interact with the Nervos Network. You might experience some levels of latency depending on the provider\u2019s location.\nAnkr\u2019s endpoint root: ",(0,t.jsx)(n.a,{href:"https://rpc.ankr.com/nervos",children:"https://rpc.ankr.com/nervos"})]}),"\n",(0,t.jsx)(n.h2,{id:"ckb-json-rpc-protocols",children:"CKB JSON-RPC Protocols"}),"\n",(0,t.jsxs)(n.p,{children:["CKB exposes a set of RPCs in ",(0,t.jsx)(n.a,{href:"https://www.jsonrpc.org/specification",children:"JSON-RPC 2.0"})," protocols for interactions. For more details, please refer to ",(0,t.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/blob/master/rpc/README.md",children:"CKB JSON RPC Protocols Documentation"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The RPCs exposed by CKB are only designed for internal usage. Please limit the access to the CKB RPCs strictly to trusted machines (by using rpc.listen_address configuration option). Exposing CKB RPCs to the public Internet is dangerous and strongly discouraged."}),"\n",(0,t.jsx)(n.li,{children:"CKB JSON-RPC only supports HTTP now. If you need SSL support, please setup a reverse proxy via nginx or other HTTPS servers."}),"\n",(0,t.jsx)(n.li,{children:"Subscriptions require a full duplex connection. CKB offers such connections in the form of tcp (enable with rpc.tcp_listen_address configuration option) and websockets (enable with rpc.ws_listen_address), plain HTTP connection does not support subscriptions. See below for examples on this."}),"\n"]})}),"\n",(0,t.jsx)(n.h2,{id:"basic-usage",children:"Basic Usage"}),"\n",(0,t.jsxs)(n.p,{children:["The following commands uses ",(0,t.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/blob/master/rpc/README.md#get_tip_block_number",children:"get_tip_block_number"})," RPC to fetch the ",(0,t.jsx)(n.code,{children:"tip"})," block number, of the latest block number in the longest blockchain:"]}),"\n",(0,t.jsxs)(r.A,{children:[(0,t.jsx)(c.A,{value:"get-tip-block-number",label:"Command",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "get_tip_block_number",\n "params": []\n}\' \\\n| tr -d \'\\n\' \\\n| curl -H \'content-type: application/json\' -d @- \\\nhttp://localhost:8114\n'})})}),(0,t.jsx)(c.A,{value:"tip-block-number",label:"Response",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","result":"0x2cb4","id":2}\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["The following commands uses ",(0,t.jsx)(n.code,{children:"send_transaction"})," RPC to send transactions to the CKB network:"]}),"\n",(0,t.jsxs)(r.A,{children:[(0,t.jsx)(c.A,{value:"send-transaction",label:"Command",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'echo \'{\n "id": 3,\n "jsonrpc": "2.0",\n "method": "send_transaction",\n "params": [\n {\n "cell_deps": [\n {\n "dep_type": "code",\n "out_point": {\n "index": "0x0",\n "tx_hash": "0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3"\n }\n }\n ],\n "header_deps": [\n "0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed"\n ],\n "inputs": [\n {\n "previous_output": {\n "index": "0x0",\n "tx_hash": "0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17"\n },\n "since": "0x0"\n }\n ],\n "outputs": [\n {\n "capacity": "0x2540be400",\n "lock": {\n "code_hash": "0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5",\n "hash_type": "data",\n "args": "0x"\n },\n "type": null\n }\n ],\n "outputs_data": [\n "0x"\n ],\n "version": "0x0",\n "witnesses": []\n }\n ]\n}\'\\\n| tr -d \'\\n\' \\\n| curl -H \'content-type: application/json\' -d @- \\\nhttp://localhost:8114\n'})})}),(0,t.jsx)(c.A,{value:"transaction",label:"Response",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "id": 3,\n "jsonrpc": "2.0",\n "result": "0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3"\n}\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["It should be noted that ",(0,t.jsx)(n.code,{children:"send_transaction"})," is asynchronous, that is, the return of the transaction hash, does not mean that the transaction is fully verified, if you need to follow up on the status of the transaction, it is recommended to use the following get_transaction rpc\uff1a"]}),"\n",(0,t.jsxs)(r.A,{children:[(0,t.jsx)(c.A,{value:"send-transaction",label:"Command",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'echo \'{\n "id": 4,\n "jsonrpc": "2.0",\n "method": "get_transaction",\n "params": ["0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3"]\n}\' \\\n| tr -d \'\\n\' \\\n| curl -H \'content-type: application/json\' -d @- \\\nhttp://localhost:8114\n'})})}),(0,t.jsx)(c.A,{value:"transaction",label:"Response",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "id": 4,\n "jsonrpc": "2.0",\n "result": {\n "transaction": {\n "cell_deps": [\n {\n "dep_type": "code",\n "out_point": {\n "index": "0x0",\n "tx_hash": "0xa4037a893eb48e18ed4ef61034ce26eba9c585f15c9cee102ae58505565eccc3"\n }\n }\n ],\n "hash": "0xa0ef4eb5f4ceeb08a4c8524d84c5da95dce2f608e0ca2ec8091191b0f330c6e3",\n "header_deps": [\n "0x7978ec7ce5b507cfb52e149e36b1a23f6062ed150503c85bbf825da3599095ed"\n ],\n "inputs": [\n {\n "previous_output": {\n "index": "0x0",\n "tx_hash": "0x365698b50ca0da75dca2c87f9e7b563811d3b5813736b8cc62cc3b106faceb17"\n },\n "since": "0x0"\n }\n ],\n "outputs": [\n {\n "capacity": "0x2540be400",\n "lock": {\n "code_hash": "0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5",\n "hash_type": "data",\n "args": "0x"\n },\n "type": null\n }\n ],\n "outputs_data": [\n "0x"\n ],\n "version": "0x0",\n "witnesses": []\n },\n "cycles": "0x219",\n "time_added_to_pool" : "0x187b3d137a1",\n "tx_status": {\n "block_hash": null,\n "status": "pending",\n "reason": null\n }\n }\n}\n'})})})]}),"\n",(0,t.jsx)(n.h2,{id:"subscription",children:"Subscription"}),"\n",(0,t.jsxs)(n.p,{children:["To use ",(0,t.jsx)(n.code,{children:"subscription"})," feature, you need to configure CKB to enable such features. In this section, we assume you use the following configuration in ",(0,t.jsx)(n.code,{children:"CKB.toml"}),"section:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'[rpc]\nlisten_address = "127.0.0.1:8114"\ntcp_listen_address = "127.0.0.1:18114"\nws_listen_address = "127.0.0.1:18115"\n\n# ... more configs\n'})}),"\n",(0,t.jsx)(n.p,{children:"This above config ensures CKB listens at 8114 port for normal HTTP connections, 18114 port for TCP duplex connections, and 18115 port for WebSocket duplex connections."}),"\n",(0,t.jsx)(n.h2,{id:"tcp-based-rpc",children:"TCP Based RPC"}),"\n",(0,t.jsxs)(n.p,{children:["The following command uses ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Netcat",children:"netcat"})," to connect via TCP to CKB, then fire the same ",(0,t.jsx)(n.code,{children:"get_tip_block_number"})," RPC as shown above to fetch the block number in the longest chain:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "get_tip_block_number",\n "params": []\n}\' \\\n| tr -d \'\\n\' \\\n| sed -e "s/$/\\n/"\n| nc localhost 18114 -q 1\n{"jsonrpc":"2.0","result":"0xdc90","id":2}\n'})}),"\n",(0,t.jsx)(n.p,{children:"The following command uses netcat to connect to CKB, make a subscription request to monitor the latest committed block:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'cat <(echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "get_tip_block_number",\n "params": []\n}\' \\\n| tr -d \'\\n\' \\\n| sed -e "s/$/\\n/") -\n| nc localhost 18114\n{"jsonrpc":"2.0","result":"0xa","id":2}\n{"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a2810cf\\",\\"timestamp\\":\\"0x16ee81d0d5f\\",\\"number\\":\\"0x30673\\",\\"epoch\\":\\"0x5f102b400007a\\",\\"parent_hash\\":\\"0xc9020c79d4f19797022af3631eb9e76c57933bd608fe81a137b834975616c991\\",\\"transactions_root\\":\\"0x7d8e3c102a5c52598cdbe7d208deb986eb2f0af189bc4655e6dd1a71564c2b25\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"dao\\":\\"0x15b9ae7648400f2fb61d57e0379b2300fc641b7e8db5160000060394d5580007\\",\\"nonce\\":\\"0x1f86f056000002460000000053170600\\",\\"hash\\":\\"0xa3c8feda83d7e184f09cb4f05e535bccd4c159e2cc0ac7a06ea7d457e0051a08\\"}","subscription":"0xa"}}\n{"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a2810cf\\",\\"timestamp\\":\\"0x16ee81d1dfd\\",\\"number\\":\\"0x30674\\",\\"epoch\\":\\"0x5f102b500007a\\",\\"parent_hash\\":\\"0xa3c8feda83d7e184f09cb4f05e535bccd4c159e2cc0ac7a06ea7d457e0051a08\\",\\"transactions_root\\":\\"0x6d2dfc88bd8dda743b5bae14453f5f405a2a29a3cf6fff00c60f0f5c60a84fbe\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"dao\\":\\"0xb4e019376f400f2f34c172e7379b230031d1417d95b5160000a399ffd6580007\\",\\"nonce\\":\\"0xded8ffa1000000000000040a90000000\\",\\"hash\\":\\"0x7d10fd1fb459630aa2f87ee4de699b7466a5da6efc0aee6ff459ff17b6cc5904\\"}","subscription":"0xa"}}\n// ... more data\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Use ",(0,t.jsx)(n.code,{children:"Ctrl-C"})," to exit netcat here."]}),"\n",(0,t.jsx)(n.h2,{id:"websocket-based-rpc",children:"WebSocket Based RPC"}),"\n",(0,t.jsxs)(n.p,{children:["To play with WebSocket based RPC, please make sure to install ",(0,t.jsx)(n.a,{href:"https://github.com/websockets/wscat",children:"wscat"})," first:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"npm install -g wscat\n"})}),"\n",(0,t.jsx)(n.p,{children:"You can use the following command to start wscat and connect to CKB:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"wscat -c ws://localhost:18115\nConnected (press CTRL+C to quit)\n>\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Now we can run the same ",(0,t.jsx)(n.code,{children:"get_tip_block_number"})," request as above:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'> {"id": 2, "jsonrpc": "2.0", "method": "get_tip_block_number", "params": []}\n< {"jsonrpc":"2.0","result":"0x76887","id":2}\n'})}),"\n",(0,t.jsx)(n.p,{children:"You can also create subscriptions for new blocks:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'> {"id": 2, "jsonrpc": "2.0", "method": "subscribe", "params": ["new_tip_header"]} < {"jsonrpc":"2.0","result":"0x2","id":2} < {"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a216e17\\",\\"timestamp\\":\\"0x16f886b2223\\",\\"number\\":\\"0x77e2a\\",\\"epoch\\":\\"0x6c$01a9000135\\",\\"parent_hash\\":\\"0x2662c8056c638408d8f018a53785d68f633bd1edfa06b82d7c29ddcac1d98927\\",\\"transactions_root\\":\\"0xa6488b15373521ec0b1bc9dff1f117cc1cad7d3579e8a6c38cc6e35166dad9bd\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"dao\\":\\"0x1a1aab41ad3eb72fa260f4eedeb9230092c4510af45b390000547d684fc40007\\",\\"nonce\\":\\"0xce1aaca681000089001d0003cb2d0500\\",\\"hash\\":\\"0x993e593921024167c1779146348fe2d82864ecd3f657b3bd2b14fbdfa87c4f06\\"}","subscription":"0x2"}}\n< {"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a216e17\\",\\"timestamp\\":\\"0x16f886b29e3\\",\\"number\\":\\"0x77e2b\\",\\"epoch\\":\\"0x6c601aa000135\\",\\"parent_hash\\":\\"0x993e593921024167c1779146348fe2d82864ecd3f657b3bd2b14fbdfa87c4f06\\",\\"transactions_root\\":\\"0xe64cb6afb57e92a2af1da34d8a1d547fcd8b833e187697ae28a9dfadaaeba247\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0xa807c9cbb16a5af7cf36fd5c20b29535f6db4de52062138ad21ea6790ba9529c\\",\\"dao\\":\\"0xba227d3fcf3eb72fc8d61ff5deb92300402b3f12fb5b390000f113d450c40007\\",\\"nonce\\":\\"0xfb68521601000000000000503c9e2338\\",\\"hash\\":\\"0xf55d0f7ae1d9b106eee96139d86313e46b109ec8fa0d92f9eb6eb8bc81c294ec\\"}","subscription":"0x2"}}\n< {"jsonrpc":"2.0","method":"subscribe","params":{"result":"{\\"version\\":\\"0x0\\",\\"compact_target\\":\\"0x1a216e17\\",\\"timestamp\\":\\"0x16f886b40a3\\",\\"number\\":\\"0x77e2c\\",\\"epoch\\":\\"0x6c601ab000135\\",\\"parent_hash\\":\\"0xf55d0f7ae1d9b106eee96139d86313e46b109ec8fa0d92f9eb6eb8bc81c294ec\\",\\"transactions_root\\":\\"0xad2c9e1eabc586c8e38cc1eaca61eba5e320bbf4655c510c5be5de9eaafea96f\\",\\"proposals_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"uncles_hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"dao\\":\\"0x5a2b4f3df13eb72feb4c4bfbdeb923008c922c1a025c3900008eaa3f52c40007\\",\\"nonce\\":\\"0x7b5ad85601000000000000005b340000\\",\\"hash\\":\\"0x2077e0c022514fe07844411436cfbf50e413694858a3d4775e0c836e787ce7ab\\"}","subscription":"0x2"}}\n<< // ... more data.\n'})}),"\n",(0,t.jsx)(n.h2,{id:"serialization",children:"Serialization"}),"\n",(0,t.jsx)(n.p,{children:"CKB's RPCs returns data in JSON format. While most fields are self-explanatory, CKB has special handling for numbers and binary data:"}),"\n",(0,t.jsx)(n.h3,{id:"numbers",children:"Numbers"}),"\n",(0,t.jsxs)(n.p,{children:["All numbers used in CKB's RPCs, including request parameters and return values, use hex encoding, the number is encoded first in hexadecimal in the most compact format(meaning useless leading zeros should be striped), and then prefixed with ",(0,t.jsx)(n.code,{children:"0x"}),". Here are some examples:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"0"})," is encoded as ",(0,t.jsx)(n.code,{children:"0x0"}),", we cannot remove the remaining ",(0,t.jsx)(n.code,{children:"0"})," since otherwise it won't be a proper number"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"4"})," is encoded as ",(0,t.jsx)(n.code,{children:"0x4"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"15"})," is encoded as ",(0,t.jsx)(n.code,{children:"0xf"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"42"})," is encoded as ",(0,t.jsx)(n.code,{children:"0x2a"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"291"})," is encoded as ",(0,t.jsx)(n.code,{children:"0x123"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"3984"})," is encoded as ",(0,t.jsx)(n.code,{children:"0xf90"})]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"binary-data",children:"Binary Data"}),"\n",(0,t.jsxs)(n.p,{children:["All binary data, including all the hashes, ",(0,t.jsx)(n.code,{children:"args"})," in script, ",(0,t.jsx)(n.code,{children:"outputs_data"})," items, are represented as hex string with ",(0,t.jsx)(n.code,{children:"0x"})," prefix. Some examples include:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"0x65b253cdcb6226e7f8cffec5c47c959b3d74af2caf7970a1eb1500e9b92aa200"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"0x927f3e74dceb87c81ba65a19da4f098b4de75a0d"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"0x40420f00000000000000000000000000"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"0x"})," (empty data)"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Unlike numbers, binary data should always have a even numbered length."})]})}function b(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},7227:(e,n,s)=>{s.d(n,{A:()=>c});s(6540);var t=s(8215);const a={tabItem:"tabItem_Ymn6"};var r=s(4848);function c(e){var n=e.children,s=e.hidden,c=e.className;return(0,r.jsx)("div",{role:"tabpanel",className:(0,t.A)(a.tabItem,c),hidden:s,children:n})}},9489:(e,n,s)=>{s.d(n,{A:()=>y});var t=s(6540),a=s(8215),r=s(4245),c=s(6347),o=s(6494),i=s(2814),d=s(5167),l=s(1269);function u(e){var n,s;return null!=(n=null==(s=t.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,t.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:s.filter(Boolean))?n:[]}function h(e){var n=e.values,s=e.children;return(0,t.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(s);return function(e){var n=(0,d.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,s])}function b(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function p(e){var n=e.queryString,s=void 0!==n&&n,a=e.groupId,r=(0,c.W6)(),o=function(e){var n=e.queryString,s=void 0!==n&&n,t=e.groupId;if("string"==typeof s)return s;if(!1===s)return null;if(!0===s&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=t?t:null}({queryString:s,groupId:a});return[(0,i.aZ)(o),(0,t.useCallback)((function(e){if(o){var n=new URLSearchParams(r.location.search);n.set(o,e),r.replace(Object.assign({},r.location,{search:n.toString()}))}}),[o,r])]}function x(e){var n,s,a,r,c=e.defaultValue,i=e.queryString,d=void 0!==i&&i,u=e.groupId,x=h(e),f=(0,t.useState)((function(){return function(e){var n,s=e.defaultValue,t=e.tabValues;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(s){if(!b({value:s,tabValues:t}))throw new Error('Docusaurus error: The has a defaultValue "'+s+'" but none of its children has the corresponding value. Available values are: '+t.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return s}var a=null!=(n=t.find((function(e){return e.default})))?n:t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:c,tabValues:x})})),m=f[0],j=f[1],v=p({queryString:d,groupId:u}),g=v[0],_=v[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),s=(0,l.Dv)(n),a=s[0],r=s[1],[a,(0,t.useCallback)((function(e){n&&r.set(e)}),[n,r])]),k=y[0],w=y[1],C=function(){var e=null!=g?g:k;return b({value:e,tabValues:x})?e:null}();return(0,o.A)((function(){C&&j(C)}),[C]),{selectedValue:m,selectValue:(0,t.useCallback)((function(e){if(!b({value:e,tabValues:x}))throw new Error("Can't select invalid tab value="+e);j(e),_(e),w(e)}),[_,w,x]),tabValues:x}}var f=s(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=s(4848);function v(e){var n=e.className,s=e.block,t=e.selectedValue,c=e.selectValue,o=e.tabValues,i=[],d=(0,r.a_)().blockElementScrollPositionUntilNextRender,l=function(e){var n=e.currentTarget,s=i.indexOf(n),a=o[s].value;a!==t&&(d(n),c(a))},u=function(e){var n,s=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":var t,a=i.indexOf(e.currentTarget)+1;s=null!=(t=i[a])?t:i[0];break;case"ArrowLeft":var r,c=i.indexOf(e.currentTarget)-1;s=null!=(r=i[c])?r:i[i.length-1]}null==(n=s)||n.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":s},n),children:o.map((function(e){var n=e.value,s=e.label,r=e.attributes;return(0,j.jsx)("li",Object.assign({role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:function(e){return i.push(e)},onKeyDown:u,onClick:l},r,{className:(0,a.A)("tabs__item",m.tabItem,null==r?void 0:r.className,{"tabs__item--active":t===n}),children:null!=s?s:n}),n)}))})}function g(e){var n=e.lazy,s=e.children,a=e.selectedValue,r=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){var c=r.find((function(e){return e.props.value===a}));return c?(0,t.cloneElement)(c,{className:"margin-top--md"}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:r.map((function(e,n){return(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function _(e){var n=x(e);return(0,j.jsxs)("div",{className:(0,a.A)("tabs-container",m.tabList),children:[(0,j.jsx)(v,Object.assign({},e,n)),(0,j.jsx)(g,Object.assign({},e,n))]})}function y(e){var n=(0,f.A)();return(0,j.jsx)(_,Object.assign({},e,{children:u(e.children)}),String(n))}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>o});var t=s(6540);const a={},r=t.createContext(a);function c(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a824b7a4.cc0b4638.js b/assets/js/a824b7a4.cc0b4638.js new file mode 100644 index 000000000..ae4cc62b2 --- /dev/null +++ b/assets/js/a824b7a4.cc0b4638.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[200],{4813:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>d,default:()=>j,frontMatter:()=>o,metadata:()=>u,toc:()=>h});var s=n(4848),r=n(8453),c=n(9489),l=n(7227),i=n(898),a=n(8652);const o={id:"js-script",title:"Tutorial: Run JS on CKB",sidebar_position:4},d="Tutorial: Run JavaScript Code on CKB",u={id:"Script/js-script",title:"Tutorial: Run JS on CKB",description:"hello.js Script",id:"write-a-simple-hellojs-script",level:4},{value:"Compile the hello.js into binary with CKB-Debugger",id:"compile-the-hellojs-into-binary-with-ckb-debugger",level:4},{value:"Write tests for the hello.js Script",id:"write-tests-for-the-hellojs-script",level:4},{value:"Run the Test to See If It Passes",id:"run-the-test-to-see-if-it-passes",level:4},{value:"Write a fib.js Script",id:"write-a-fibjs-script",level:4},{value:"Compile the fib.js into Binary with CKB-Debugger",id:"compile-the-fibjs-into-binary-with-ckb-debugger",level:4},{value:"Add a New Test for The fib.js Script",id:"add-a-new-test-for-the-fibjs-script",level:4},{value:"Run the test for fib.js smart contract",id:"run-the-test-for-fibjs-smart-contract",level:4},{value:"Integrate via Spawn Syscall",id:"integrate-via-spawn-syscall",level:3},{value:"Write run-js Script",id:"write-run-js-script",level:4},{value:"Write Test for Run-JS Script",id:"write-test-for-run-js-script",level:4},{value:"Run test for sudt.js",id:"run-test-for-sudtjs",level:4},{value:"Congratulations!",id:"congratulations",level:2},{value:"Additional Resources",id:"additional-resources",level:2}];function _(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"tutorial-run-javascript-code-on-ckb",children:"Tutorial: Run JavaScript Code on CKB"}),"\n",(0,s.jsx)(a.A,{time:i.A.basic.time,topics:i.A.basic.topics,tools:i.A.basic.tools}),"\n",(0,s.jsx)(t.h2,{id:"the-high-level-idea",children:"The High-Level Idea"}),"\n",(0,s.jsxs)(t.p,{children:["As we have learned before, you can use any programming language to write a Script (Smart contract) for CKB.\nBut does it really work in reality? This tutorial will show a full example of using JavaScript to\nwrite Scripts and execute them in the ",(0,s.jsx)(t.a,{href:"/docs/concepts/ckb-vm",children:"CKB-VM"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"The process is as follows: first we port a JavaScript engine as a base Script to CKB. Then, we write\nthe business logic in JavaScript and execute this JS-powered Script within the base Script on top of CKB-VM."}),"\n",(0,s.jsxs)(t.p,{children:["It sounds like a of work. But thanks to the CKB VM team, we already have a fully runnable JavaScript\nengine called ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-js-vm",children:"ckb-js-vm"}),". It is ported from\n",(0,s.jsx)(t.a,{href:"https://quick.js.org",children:"quick.js"})," so that it is compatible with running on CKB-VM. We just need to take\nthe ckb-js-vm and deploy it on-chain before we can run our JS Script."]}),"\n",(0,s.jsxs)(t.p,{children:["Below is a step-by-step guide, and you can also clone the full code example from the ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples/js-script",children:"Github repo"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"get-ckb-js-vm-binary",children:"Get ckb-js-vm Binary"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," is a binary that can be used both in the CLI and in the on-chain CKB-VM. Let's first build the\nbinary and give it a try to see if it works as expected."]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["You will need ",(0,s.jsx)(t.code,{children:"clang 16+"})," to build the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," binary:"]})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/nervosnetwork/ckb-js-vm\ncd ckb-js-vm\ngit submodule update --init\nmake all\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Now, the binary is in the ",(0,s.jsx)(t.code,{children:"build/"})," folder. Without writing any codes, we can use the\n",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-standalone-debugger",children:"CKB-Debugger"}),"(another CLI tool that\nenables off-chain Script development, as the name suggests) to run the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," binary for a\nquick test."]}),"\n",(0,s.jsx)(t.h3,{id:"install-ckb-debugger",children:"Install CKB-Debugger"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["To install, you need ",(0,s.jsx)(t.a,{href:"https://www.rust-lang.org",children:"Rust"})," and\n",(0,s.jsx)(t.a,{href:"https://doc.rust-lang.org/cargo",children:"cargo"})]})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"cargo install --git https://github.com/nervosnetwork/ckb-standalone-debuggger ckb-debugger\n"})}),"\n",(0,s.jsx)(t.h3,{id:"quick-test-with-ckb-debugger",children:"Quick Test with CKB-Debugger"}),"\n",(0,s.jsxs)(t.p,{children:["Now let's run the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," with some JS test codes."]}),"\n",(0,s.jsxs)(t.p,{children:["Make sure you are in the root of the ",(0,s.jsx)(t.code,{children:"ckb-vm-js"})," project folder:"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(l.A,{value:"ckb-debugger-run",label:"Command",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"ckb-debugger --read-file tests/examples/hello.js --bin build/ckb-js-vm -- -r\n"})})}),(0,s.jsx)(l.A,{value:"ckb-debugger-run-result",label:"Response",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"Run from file, local access enabled. For testing only.\nhello, world\nRun result: 0\nTotal cycles consumed: 30081070(2.9m)\nTransfer cycles: 125121(122.2k), running cycles: 2955949(2.8m)\n"})})})]}),"\n",(0,s.jsxs)(t.p,{children:["with the ",(0,s.jsx)(t.code,{children:"-r"})," option, ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," will read a local JS file via CKB-Debugger. This function is\nintended for testing purposes and does not function in a production environment. However, we can see the\nrunning output, which includes a ",(0,s.jsx)(t.code,{children:"hello, world"})," message. The run result is 0, indicating that the ",(0,s.jsx)(t.code,{children:"hellow.js"})," Script executes successfully.\nAlso, you can see how many ",(0,s.jsx)(t.code,{children:"cycles"}),"(the overhead required to execute a Script) are needed to run the JS Script in the output as well."]}),"\n",(0,s.jsx)(t.h2,{id:"integrate-ckb-js-vm",children:"Integrate ckb-js-vm"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"ckb-js-vm"})," offers different ways to be integrated into your own Scripts. In the next step, we will set\nup a project and writing codes to integrate ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," with JavaScript code to gain a deeper\nunderstanding."]}),"\n",(0,s.jsxs)(t.p,{children:["The first step is to create a new Script project. We use ",(0,s.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates",children:"ckb-script-templates"})," for this purpose. You will need the following dependencies:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"git"}),", ",(0,s.jsx)(t.code,{children:"make"}),", ",(0,s.jsx)(t.code,{children:"sed"}),", ",(0,s.jsx)(t.code,{children:"bash"}),", ",(0,s.jsx)(t.code,{children:"sha256sum"})," and others Unix utilities"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Rust"})," with ",(0,s.jsx)(t.code,{children:"riscv64"})," target installed: ",(0,s.jsx)(t.code,{children:"rustup target add riscv64imac-unknown-none-elf"})]}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"Clang 16+"})}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"cargo-generate"}),": You can install this via ",(0,s.jsx)(t.code,{children:"cargo install cargo-generate"})]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["If you encounter any problems with these dependencies, refer to the ",(0,s.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates?tab=readme-ov-file#dependencies",children:"ReadMe"})," for installation details."]}),"\n",(0,s.jsx)(t.h3,{id:"init-a-script-project",children:"Init a Script Project"}),"\n",(0,s.jsxs)(t.p,{children:["Now let's run the command to generate a new Script project called ",(0,s.jsx)(t.code,{children:"my-first-script-workspace"}),":"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(l.A,{value:"init-script",label:"Command",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'alias create-ckb-scripts="cargo generate gh:cryptape/ckb-script-templates workspace"\ncreate-ckb-scripts\n'})})}),(0,s.jsx)(l.A,{value:"init-script-result",label:"Response",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"\u26a0\ufe0f Favorite `gh:cryptape/ckb-script-templates` not found in config, using it as a git repository: https://github.com/cryptape/ckb-script-templates.git\n\ud83e\udd37 Project Name: my-first-script-workspace\n\ud83d\udd27 Destination: /tmp/my-first-script-workspace ...\n\ud83d\udd27 project-name: my-first-script-workspace ...\n\ud83d\udd27 Generating template ...\n\ud83d\udd27 Moving generated files into: `/tmp/my-first-script-workspace`...\n\ud83d\udd27 Initializing a fresh Git repository\n\u2728 Done! New project created /tmp/my-first-script-workspace\n"})})})]}),"\n",(0,s.jsx)(t.h3,{id:"create-a-new-script",children:"Create a New Script"}),"\n",(0,s.jsxs)(t.p,{children:["Let\u2019s create a new Script called ",(0,s.jsx)(t.code,{children:"run-js"}),"."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(l.A,{value:"create-a-new-script",label:"Command",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"cd my-first-script-workspace\nmake generate\n"})})}),(0,s.jsx)(l.A,{value:"create-a-new-script-result",label:"Response",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"\ud83e\udd37 Project Name: run-js\n\ud83d\udd27 Destination: /tmp/my-first-script-workspace/contracts/run-js ...\n\ud83d\udd27 project-name: carrot ...\n\ud83d\udd27 Generating template ...\n\ud83d\udd27 Moving generated files into: `/tmp/my-first-script-workspace/contracts/run-js`...\n\ud83d\udd27 Initializing a fresh Git repository\n\u2728 Done! New project created /tmp/my-first-script-workspace/contracts/run-js\n"})})})]}),"\n",(0,s.jsxs)(t.p,{children:["Our project relies on ",(0,s.jsx)(t.code,{children:"ckb-js-vm"}),", so we need to include it in the project. Create a new folder named\n",(0,s.jsx)(t.code,{children:"deps"})," in the root of our Script workspace:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"cd my-first-script-workspace\nmkdir deps\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Copy the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," binary we built before into the ",(0,s.jsx)(t.code,{children:"deps"})," folder. When you're done, it should look like this:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"--build\n--contracts\n--deps\n --ckb-js-vm\n...\n"})}),"\n",(0,s.jsx)(t.p,{children:"Everything looks good now!"}),"\n",(0,s.jsx)(t.h3,{id:"integrate-via-script",children:"Integrate via Script"}),"\n",(0,s.jsxs)(t.p,{children:["The simplest way to run JavaScript code using ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," is via a Script. A ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," Script has the\nfollowing structure:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"code_hash: \nhash_type: \nargs: \n"})}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsx)(t.p,{children:"2 bytes ckb-js-vm args are reserved for further use"})}),"\n",(0,s.jsxs)(t.p,{children:["Now let's get our hands dirty to integrate ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," in this way."]}),"\n",(0,s.jsxs)(t.h4,{id:"write-a-simple-hellojs-script",children:["Write a simple ",(0,s.jsx)(t.code,{children:"hello.js"})," Script"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"cd my-first-script-workspace\nmkdir js/build\ntouch js/hello.js\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Fill the ",(0,s.jsx)(t.code,{children:"hello.js"})," with the following code:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-js",metastring:"title='my-first-script-workspace/js/hello.js'",children:'console.log("hello, ckb-js-script!");\n'})}),"\n",(0,s.jsxs)(t.h4,{id:"compile-the-hellojs-into-binary-with-ckb-debugger",children:["Compile the ",(0,s.jsx)(t.code,{children:"hello.js"})," into binary with CKB-Debugger"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"ckb-debugger --read-file js/hello.js --bin deps/ckb-js-vm -- -c | awk '/Run result: 0/{exit} {print}' | xxd -r -p > js/build/hello.bc \n"})}),"\n",(0,s.jsxs)(t.h4,{id:"write-tests-for-the-hellojs-script",children:["Write tests for the ",(0,s.jsx)(t.code,{children:"hello.js"})," Script"]}),"\n",(0,s.jsxs)(t.p,{children:["Now let's assemble all the Scripts and run them in a single CKB transaction. We will use the built-in test module\nfrom ",(0,s.jsx)(t.code,{children:"ckb-script-templates"}),", which allows us to test without actually running a blockchain."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",metastring:'title="my-first-script-workspace/tests/src/tests.rs"',children:'use super::*;\nuse ckb_testtool::{\n builtin::ALWAYS_SUCCESS,\n ckb_types::{bytes::Bytes, core::TransactionBuilder, packed::*, prelude::*},\n context::Context,\n};\n\nconst MAX_CYCLES: u64 = 10_000_000;\n\n#[test]\nfn hello_script() {\n // deploy contract\n let mut context = Context::default();\n let loader = Loader::default();\n let js_vm_bin = loader.load_binary("../../deps/ckb-js-vm");\n let js_vm_out_point = context.deploy_cell(js_vm_bin);\n let js_vm_cell_dep = CellDep::new_builder()\n .out_point(js_vm_out_point.clone())\n .build();\n\n let js_script_bin = loader.load_binary("../../js/build/hello.bc");\n let js_script_out_point = context.deploy_cell(js_script_bin.clone());\n let js_script_cell_dep = CellDep::new_builder()\n .out_point(js_script_out_point.clone())\n .build();\n\n // prepare scripts\n let always_success_out_point = context.deploy_cell(ALWAYS_SUCCESS.clone());\n let lock_script = context\n .build_script(&always_success_out_point.clone(), Default::default())\n .expect("script");\n let lock_script_dep = CellDep::new_builder()\n .out_point(always_success_out_point)\n .build();\n\n // prepare cell deps\n let cell_deps: Vec = vec![lock_script_dep, js_vm_cell_dep, js_script_cell_dep];\n\n // prepare cells\n let input_out_point = context.create_cell(\n CellOutput::new_builder()\n .capacity(1000u64.pack())\n .lock(lock_script.clone())\n .build(),\n Bytes::new(),\n );\n let input = CellInput::new_builder()\n .previous_output(input_out_point.clone())\n .build();\n\n // args: \n let mut type_script_args: [u8; 35] = [0u8; 35];\n let reserved = [0u8; 2];\n let (js_cell, _) = context.get_cell(&js_script_out_point.clone()).unwrap();\n let js_type_script = js_cell.type_().to_opt().unwrap();\n let code_hash = js_type_script.calc_script_hash();\n let hash_type = js_type_script.hash_type();\n type_script_args[..2].copy_from_slice(&reserved);\n type_script_args[2..34].copy_from_slice(code_hash.as_slice());\n type_script_args[34..35].copy_from_slice(&hash_type.as_slice());\n\n let type_script = context\n .build_script(&js_vm_out_point, type_script_args.to_vec().into())\n .expect("script");\n\n let outputs = vec![\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script.clone())\n .type_(Some(type_script.clone()).pack())\n .build(),\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script)\n .build(),\n ];\n\n // prepare output cell data\n let outputs_data = vec![Bytes::new()), Bytes::new()];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let cycles = context\n .verify_tx(&tx, MAX_CYCLES)\n .expect("pass verification");\n println!("consume cycles: {}", cycles);\n}\n\n'})}),"\n",(0,s.jsx)(t.p,{children:"Let's break down the code provided:"}),"\n",(0,s.jsxs)(t.p,{children:["First, We deploy the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"}),", ",(0,s.jsx)(t.code,{children:"hello.bc"})," and ",(0,s.jsx)(t.code,{children:"ALWAYS_SUCCESS"})," binaries to the blockchain, resulting in\n3 Scripts in Live Cells. The ",(0,s.jsx)(t.code,{children:"ALWAYS_SUCCESS"})," is used solely to simplify the\nLock Script in our test flow."]}),"\n",(0,s.jsxs)(t.p,{children:["Then, we build an output Cell that carries a special Type Script to execute the ",(0,s.jsx)(t.code,{children:"hello.js"})," codes.\nThe ",(0,s.jsx)(t.code,{children:"code_hash"})," and ",(0,s.jsx)(t.code,{children:"hash_type"})," in the Type Script referece the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," Script Cell. It\nis automatically done by this line of code:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:' let type_script = context\n .build_script(&js_vm_out_point, type_script_args.to_vec().into())\n .expect("script");\n'})}),"\n",(0,s.jsxs)(t.p,{children:["The key here is the args of the Type Script. We locate the Cell that carries our ",(0,s.jsx)(t.code,{children:"hello.js"})," codes and\ninsert the reference information\u2014which includes ",(0,s.jsx)(t.code,{children:"code_hash"})," and ",(0,s.jsx)(t.code,{children:"hash_type"}),"\u2013of that Cell into the args,\nfollowing the args structure of ",(0,s.jsx)(t.code,{children:"ckb-js-vm"}),"."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:" // args: \n let mut type_script_args: [u8; 35] = [0u8; 35];\n let reserved = [0u8; 2];\n let (js_cell, _) = context.get_cell(&js_script_out_point.clone()).unwrap();\n let js_type_script = js_cell.type_().to_opt().unwrap();\n let code_hash = js_type_script.calc_script_hash();\n let hash_type = js_type_script.hash_type();\n type_script_args[..2].copy_from_slice(&reserved);\n type_script_args[2..34].copy_from_slice(code_hash.as_slice());\n type_script_args[34..35].copy_from_slice(&hash_type.as_slice());\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Finally, don't forget to add all the Live Cells containing the related Scripts in the ",(0,s.jsx)(t.code,{children:"cellDeps"})," in the transaction:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:' // prepare cell deps\n let cell_deps: Vec = vec![lock_script_dep, js_vm_cell_dep, js_script_cell_dep];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let cycles = context\n .verify_tx(&tx, MAX_CYCLES)\n .expect("pass verification");\n println!("consume cycles: {}", cycles);\n'})}),"\n",(0,s.jsx)(t.h4,{id:"run-the-test-to-see-if-it-passes",children:"Run the Test to See If It Passes"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"make build\nmake test\n"})}),"\n",(0,s.jsx)(t.p,{children:"By default, the test output does not display the executing logs of the Scripts. To view them, you can use the following\nalternative command:"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(l.A,{value:"run-hello-test",label:"Command",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"cargo test -- --nocapture\n"})})}),(0,s.jsx)(l.A,{value:"run-hello-test-result",label:"Response",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"running 1 test\n[contract debug] hello, ckb-js-script!\nconsume cycles: 3070458\ntest tests::hello_script ... ok\n"})})})]}),"\n",(0,s.jsxs)(t.p,{children:["The logs show ",(0,s.jsx)(t.code,{children:"hello, ckb-js-script!"}),", indicating our JavaScript code executed successfully."]}),"\n",(0,s.jsxs)(t.h4,{id:"write-a-fibjs-script",children:["Write a ",(0,s.jsx)(t.code,{children:"fib.js"})," Script"]}),"\n",(0,s.jsxs)(t.p,{children:["We can try a different JavaScript example. Let's write a ",(0,s.jsx)(t.code,{children:"fib.js"})," in the ",(0,s.jsx)(t.code,{children:"js"})," folder:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-js",metastring:"title='my-first-script-workspace/js/fib.js'",children:"console.log(\"testing fib\");\nfunction fib(n) {\n if (n <= 0)\n return 0;\n else if (n == 1)\n return 1;\n else\n return fib(n - 1) + fib(n - 2);\n};\nvar value = fib(10);\nconsole.assert(value == 55, 'fib(10) = 55');\n"})}),"\n",(0,s.jsxs)(t.h4,{id:"compile-the-fibjs-into-binary-with-ckb-debugger",children:["Compile the ",(0,s.jsx)(t.code,{children:"fib.js"})," into Binary with CKB-Debugger"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"ckb-debugger --read-file js/fib.js --bin deps/ckb-js-vm -- -c | awk '/Run result: 0/{exit} {print}' | xxd -r -p > js/build/fib.bc\n"})}),"\n",(0,s.jsxs)(t.h4,{id:"add-a-new-test-for-the-fibjs-script",children:["Add a New Test for The ",(0,s.jsx)(t.code,{children:"fib.js"})," Script"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",metastring:"title='my-first-script-workspace/tests/src/tests.rs'",children:'#[test]\nfn fib_script() {\n // deploy contract\n let mut context = Context::default();\n let loader = Loader::default();\n let js_vm_bin = loader.load_binary("../../deps/ckb-js-vm");\n let js_vm_out_point = context.deploy_cell(js_vm_bin);\n let js_vm_cell_dep = CellDep::new_builder()\n .out_point(js_vm_out_point.clone())\n .build();\n\n let js_script_bin = loader.load_binary("../../js/build/fib.bc");\n let js_script_out_point = context.deploy_cell(js_script_bin.clone());\n let js_script_cell_dep = CellDep::new_builder()\n .out_point(js_script_out_point.clone())\n .build();\n\n // prepare scripts\n let always_success_out_point = context.deploy_cell(ALWAYS_SUCCESS.clone());\n let lock_script = context\n .build_script(&always_success_out_point.clone(), Default::default())\n .expect("script");\n let lock_script_dep = CellDep::new_builder()\n .out_point(always_success_out_point)\n .build();\n\n // prepare cell deps\n let cell_deps: Vec = vec![lock_script_dep, js_vm_cell_dep, js_script_cell_dep];\n\n // prepare cells\n let input_out_point = context.create_cell(\n CellOutput::new_builder()\n .capacity(1000u64.pack())\n .lock(lock_script.clone())\n .build(),\n Bytes::new(),\n );\n let input = CellInput::new_builder()\n .previous_output(input_out_point.clone())\n .build();\n\n // args: \n let mut type_script_args: [u8; 35] = [0u8; 35];\n let reserved = [0u8; 2];\n let (js_cell, _) = context.get_cell(&js_script_out_point.clone()).unwrap();\n let js_type_script = js_cell.type_().to_opt().unwrap();\n let code_hash = js_type_script.calc_script_hash();\n let hash_type = js_type_script.hash_type();\n type_script_args[..2].copy_from_slice(&reserved);\n type_script_args[2..34].copy_from_slice(code_hash.as_slice());\n type_script_args[34..35].copy_from_slice(&hash_type.as_slice());\n\n let type_script = context\n .build_script(&js_vm_out_point, type_script_args.to_vec().into())\n .expect("script");\n\n let outputs = vec![\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script.clone())\n .type_(Some(type_script.clone()).pack())\n .build(),\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script)\n .build(),\n ];\n\n // prepare output cell data\n let outputs_data = vec![Bytes::new(), Bytes::new()];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let cycles = context\n .verify_tx(&tx, MAX_CYCLES)\n .expect("pass verification");\n println!("consume cycles: {}", cycles);\n}\n'})}),"\n",(0,s.jsxs)(t.h4,{id:"run-the-test-for-fibjs-smart-contract",children:["Run the test for ",(0,s.jsx)(t.code,{children:"fib.js"})," smart contract"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"make build\nmake test\n"})}),"\n",(0,s.jsx)(t.h3,{id:"integrate-via-spawn-syscall",children:"Integrate via Spawn Syscall"}),"\n",(0,s.jsxs)(t.p,{children:["Another way to integrate ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," is by calling it from your own Scripts. This approach is useful when you have\nmore complex custom logic to handle and still want to execute some JavaScript code. In this example, we\nuse ",(0,s.jsx)(t.code,{children:"ckb_spawn"})," syscall to call Script from another Script. ",(0,s.jsx)(t.code,{children:"ckb_spawn"})," is the recommended way to\ncall ",(0,s.jsx)(t.code,{children:"ckb-js-vm"}),", here is\n",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-js-vm/blob/main/docs/intro.md#integration",children:"why"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["We will use Rust to write a new Script called ",(0,s.jsx)(t.code,{children:"run-js"}),". In this Script, you can add custom logics and\nvalidations before calling the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," Script to execute JS codes."]}),"\n",(0,s.jsxs)(t.h4,{id:"write-run-js-script",children:["Write ",(0,s.jsx)(t.code,{children:"run-js"})," Script"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",metastring:"title='my-first-script-workspace/contracts/run-js/src/main.rs'",children:'#![no_std]\n#![cfg_attr(not(test), no_main)]\n\n#[cfg(test)]\nextern crate alloc;\n\n#[cfg(not(test))]\nuse ckb_std::default_alloc;\nuse ckb_std::syscalls;\n#[cfg(not(test))]\nckb_std::entry!(program_entry);\n#[cfg(not(test))]\ndefault_alloc!();\n\npub fn program_entry() -> i8 {\n ckb_std::debug!("This is a sample run JS code contract!");\n\n let mut spgs_exit_code: i8 = -1;\n\n let mut spgs_content = [0u8; 80];\n let mut spgs_content_length: u64 = 80;\n let spgs = syscalls::SpawnArgs {\n memory_limit: 8,\n exit_code: &mut spgs_exit_code as *mut i8,\n content: &mut spgs_content as *mut u8,\n content_length: &mut spgs_content_length as *mut u64,\n };\n\n // we supposed the first cell in cellDeps is the ckb-js-vm cell\n // we then call ckb-js-vm script using spawn syscall to execute the js code in the script args\n let result =\n ckb_std::syscalls::spawn(0, ckb_std::ckb_constants::Source::CellDep, 0, &[], &spgs);\n ckb_std::debug!("spawn result: {:?}", result);\n\n if result != 0 {\n return 1;\n }\n\n if spgs_exit_code != 0 {\n return 1;\n }\n\n 0\n}\n'})}),"\n",(0,s.jsxs)(t.p,{children:["The most important code in the Script is the usage of ",(0,s.jsx)(t.code,{children:"ckb_std"})," library to perform the ",(0,s.jsx)(t.code,{children:"spawn"})," syscall\nto call the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:" // we supposed the first cell in cellDeps is the ckb-js-vm cell\n // we then call ckb-js-vm script using spawn syscall to execute the js code in the script args\n let result =\n ckb_std::syscalls::spawn(0, ckb_std::ckb_constants::Source::CellDep, 0, &[], &spgs);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["In order to use ",(0,s.jsx)(t.code,{children:"ckb_std::syscalls::spawn"}),", you need to enable the ",(0,s.jsx)(t.code,{children:"ckb2023"})," feature in the ",(0,s.jsx)(t.code,{children:"ckb-std"})," deps:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-toml",metastring:'title="my-first-script-workspace/contracts/run-js/Cargo.toml"',children:'[dependencies]\nckb-std = {version = "0.15.1", features = ["ckb2023"]}\n'})}),"\n",(0,s.jsxs)(t.p,{children:["For simplicity, we supposed the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," Script is in the first position of the cell deps in the\ntransaction."]}),"\n",(0,s.jsxs)(t.p,{children:["We can check the return result from the ",(0,s.jsx)(t.code,{children:"spawn"})," syscall to see if the code executes successfully."]}),"\n",(0,s.jsx)(t.h4,{id:"write-test-for-run-js-script",children:"Write Test for Run-JS Script"}),"\n",(0,s.jsxs)(t.p,{children:["We have our custom Script ",(0,s.jsx)(t.code,{children:"run-js"})," that can execute JS codes and customize validations. Now let's\nwrite some tests for our Script."]}),"\n",(0,s.jsxs)(t.p,{children:["This time, let's use a more realistic JS Script to test. We will utilize the ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-js-vm/blob/main/docs/syscalls.md",children:"ckb-syscall JS binding"})," to write a\n",(0,s.jsx)(t.a,{href:"/docs/concepts/glossary#simple-udt",children:"sudt"})," example in\nJavaScript and verify that it executes successfully in our ",(0,s.jsx)(t.code,{children:"run-js"})," Scripts."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-js",metastring:"title='my-first-script-workspace/js/sudt.js'",children:"const CKB_INDEX_OUT_OF_BOUND = 1;\nconst ERROR_AMOUNT = -52;\n\nfunction assert(cond, obj1) {\n if (!cond) {\n throw Error(obj1);\n }\n}\n\nfunction compare_array(a, b) {\n if (a.byteLength != b.byteLength) {\n return false;\n }\n for (let i = 0; i < a.byteLength; i++) {\n if (a[i] != b[i]) {\n return false;\n }\n }\n return true;\n}\n\nfunction unpack_script(buf) {\n let script = new Uint32Array(buf);\n let raw_data = new Uint8Array(buf);\n\n let full_size = script[0];\n assert(full_size == buf.byteLength, 'full_size == buf.byteLength');\n let code_hash_offset = script[1];\n let code_hash = buf.slice(code_hash_offset, code_hash_offset + 32);\n let hash_type_offset = script[2];\n let hash_type = raw_data[hash_type_offset];\n let args_offset = script[3];\n let args = buf.slice(args_offset + 4);\n return {'code_hash': code_hash, 'hash_type': hash_type, 'args': args};\n}\n\nfunction* iterate_field(source, field) {\n let index = 0;\n while (true) {\n try {\n let ret = ckb.load_cell_by_field(index, source, field);\n yield ret;\n index++;\n } catch (e) {\n if (e.error_code == CKB_INDEX_OUT_OF_BOUND) {\n break;\n } else {\n throw e;\n }\n }\n }\n}\n\nfunction* iterate_cell_data(source) {\n let index = 0;\n while (true) {\n try {\n let ret = ckb.load_cell_data(index, source);\n yield ret;\n index++;\n } catch (e) {\n if (e.error_code == CKB_INDEX_OUT_OF_BOUND) {\n break;\n } else {\n throw e;\n }\n }\n }\n}\n\nfunction main() {\n console.log('simple UDT ...');\n let buf = ckb.load_script();\n let script = unpack_script(buf);\n let owner_mode = false;\n // ckb-js-vm has leading 35 bytes args\n let real_args = script.args.slice(35);\n for (let lock_hash of iterate_field(ckb.SOURCE_INPUT, ckb.CELL_FIELD_LOCK_HASH)) {\n if (compare_array(lock_hash, real_args)) {\n owner_mode = true;\n }\n }\n if (owner_mode) {\n return 0;\n }\n let input_amount = 0n;\n\n for (let data of iterate_cell_data(ckb.SOURCE_GROUP_INPUT)) {\n if (data.byteLength != 16) {\n throw `Invalid data length: ${data.byteLength}`;\n }\n let n = new BigUint64Array(data);\n let current_amount = n[0] | (n[1] << 64n);\n input_amount += current_amount;\n }\n let output_amount = 0n;\n for (let data of iterate_cell_data(ckb.SOURCE_GROUP_OUTPUT)) {\n if (data.byteLength != 16) {\n throw `Invalid data length: ${data.byteLength}`;\n }\n let n = new BigUint64Array(data);\n let current_amount = n[0] | (n[1] << 64n);\n output_amount += current_amount;\n }\n console.log(`verifying amount: ${input_amount} and ${output_amount}`);\n if (input_amount < output_amount) {\n return ERROR_AMOUNT;\n }\n console.log('Simple UDT quit successfully');\n return 0;\n}\n\nlet exit_code = main();\nif (exit_code != 0) {\n ckb.exit(exit_code);\n}\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Compile this ",(0,s.jsx)(t.code,{children:"sudt.js"})," into binaries with CKB-Debugger:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"ckb-debugger --read-file js/fib.js --bin deps/ckb-js-vm -- -c | awk '/Run result: 0/{exit} {print}' | xxd -r -p > js/build/fib.bc\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Add a new test to the ",(0,s.jsx)(t.code,{children:"tests"})," file:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",metastring:"title='my-first-script-workspace/tests/src/tests.rs'",children:'#[test]\nfn sudt_script() {\n // deploy contract\n let mut context = Context::default();\n let loader = Loader::default();\n let js_vm_bin = loader.load_binary("../../deps/ckb-js-vm");\n let js_vm_out_point = context.deploy_cell(js_vm_bin);\n let js_vm_cell_dep = CellDep::new_builder()\n .out_point(js_vm_out_point.clone())\n .build();\n\n let run_js_bin = loader.load_binary("run-js");\n let run_js_out_point = context.deploy_cell(run_js_bin);\n let run_js_cell_dep = CellDep::new_builder()\n .out_point(run_js_out_point.clone())\n .build();\n\n let js_script_bin = loader.load_binary("../../js/build/sudt.bc");\n let js_script_out_point = context.deploy_cell(js_script_bin.clone());\n let js_script_cell_dep = CellDep::new_builder()\n .out_point(js_script_out_point.clone())\n .build();\n\n // prepare scripts\n let always_success_out_point = context.deploy_cell(ALWAYS_SUCCESS.clone());\n let lock_script = context\n .build_script(&always_success_out_point.clone(), Default::default())\n .expect("script");\n let lock_script_dep = CellDep::new_builder()\n .out_point(always_success_out_point)\n .build();\n\n // prepare cell deps\n let cell_deps: Vec = vec![\n js_vm_cell_dep,\n run_js_cell_dep,\n lock_script_dep,\n js_script_cell_dep,\n ];\n\n // prepare cells\n let input_out_point = context.create_cell(\n CellOutput::new_builder()\n .capacity(1000u64.pack())\n .lock(lock_script.clone())\n .build(),\n Bytes::new(),\n );\n let input = CellInput::new_builder()\n .previous_output(input_out_point.clone())\n .build();\n\n // args: \n let mut type_script_args: [u8; 67] = [0u8; 67];\n let reserved = [0u8; 2];\n let (js_cell, _) = context.get_cell(&js_script_out_point.clone()).unwrap();\n let js_type_script = js_cell.type_().to_opt().unwrap();\n let code_hash = js_type_script.calc_script_hash();\n let hash_type = js_type_script.hash_type();\n let owner_lock_script_hash = lock_script.clone().calc_script_hash();\n\n type_script_args[..2].copy_from_slice(&reserved);\n type_script_args[2..34].copy_from_slice(code_hash.as_slice());\n type_script_args[34..35].copy_from_slice(&hash_type.as_slice());\n type_script_args[35..].copy_from_slice(owner_lock_script_hash.as_slice());\n\n let type_script = context\n .build_script(&run_js_out_point, type_script_args.to_vec().into())\n .expect("script");\n\n let outputs = vec![\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script.clone())\n .type_(Some(type_script.clone()).pack())\n .build(),\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script)\n .build(),\n ];\n\n // prepare output cell data\n let sudt_amount: u128 = 10; // issue 10 tokens\n let outputs_data = vec![\n Bytes::from(sudt_amount.to_le_bytes().to_vec()),\n Bytes::new(),\n ];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let cycles = context\n .verify_tx(&tx, MAX_CYCLES)\n .expect("pass verification");\n println!("consume cycles: {}", cycles);\n}\n'})}),"\n",(0,s.jsx)(t.p,{children:"Some explanation for this test:"}),"\n",(0,s.jsxs)(t.p,{children:["Just like the previous tests, we deploy all the Scripts we need, including ",(0,s.jsx)(t.code,{children:"ckb-js-vm"}),", ",(0,s.jsx)(t.code,{children:"run-js"}),",\n",(0,s.jsx)(t.code,{children:"sudt.js"})," and so on. We then assemble a transaction that produce an output Cell that carries our\n",(0,s.jsx)(t.code,{children:"run-js"})," Script as its Type Script. In the args of this Type Script, we follow the ",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," args\ndata structure. The difference this time is that we also include the arguments for the ",(0,s.jsx)(t.code,{children:"sudt.js"})," within\nthe Type Script args. This allows our ",(0,s.jsx)(t.code,{children:"sudt.js"})," code can read its own arguments and get exected as\nexpected. The arguments for ",(0,s.jsx)(t.code,{children:"sudt.js"})," include a Lock Script hash, which is used to determine if it is under\n",(0,s.jsx)(t.code,{children:"owner_mode"})," to perform different validations."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:" // args: \n let mut type_script_args: [u8; 67] = [0u8; 67];\n let reserved = [0u8; 2];\n let (js_cell, _) = context.get_cell(&js_script_out_point.clone()).unwrap();\n let js_type_script = js_cell.type_().to_opt().unwrap();\n let code_hash = js_type_script.calc_script_hash();\n let hash_type = js_type_script.hash_type();\n let owner_lock_script_hash = lock_script.clone().calc_script_hash();\n\n type_script_args[..2].copy_from_slice(&reserved);\n type_script_args[2..34].copy_from_slice(code_hash.as_slice());\n type_script_args[34..35].copy_from_slice(&hash_type.as_slice());\n type_script_args[35..].copy_from_slice(owner_lock_script_hash.as_slice());\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Lastly, we put the token amount in the data field of the output Cell containing our ",(0,s.jsx)(t.code,{children:"run-js"})," Script and then\nassemble the transaction for submmision on-chain:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-rust",children:' // prepare output cell data\n let sudt_amount: u128 = 10; // issue 10 tokens\n let outputs_data = vec![\n Bytes::from(sudt_amount.to_le_bytes().to_vec()),\n Bytes::new(),\n ];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let cycles = context\n .verify_tx(&tx, MAX_CYCLES)\n .expect("pass verification");\n println!("consume cycles: {}", cycles);\n'})}),"\n",(0,s.jsxs)(t.h4,{id:"run-test-for-sudtjs",children:["Run test for ",(0,s.jsx)(t.code,{children:"sudt.js"})]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"make build\ncargo test -- --nocapture sudt_script\n"})}),"\n",(0,s.jsx)(t.p,{children:"You can see the output contains the spawn result and other information:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"running 1 test\n[contract debug] This is a sample run js code contract!\n[contract debug] simple UDT ...\n[contract debug] checking failed on quickjs/ckb_module.c:123, code = 1\n[contract debug] spawn result: 0\nconsume cycles: 3775332\ntest tests::sudt_script ... ok\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out; finished in 0.04s\n"})}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,s.jsxs)(t.p,{children:["By following this tutorial this far, you have mastered how to write Scripts that integrates\n",(0,s.jsx)(t.code,{children:"ckb-js-vm"})," to execute JavaScript codes on CKB. Here's a quick recap:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Use ",(0,s.jsx)(t.code,{children:"ckb-script-templates"})," to init a Script project"]}),"\n",(0,s.jsxs)(t.li,{children:["Use ",(0,s.jsx)(t.code,{children:"ckb_std"})," to leverage CKB syscalls for performing ",(0,s.jsx)(t.code,{children:"ckb_spawn"})," syscall to call ",(0,s.jsx)(t.code,{children:"ckb-js-vm"}),"."]}),"\n",(0,s.jsx)(t.li,{children:"Build args for the Script to carry the reference info to the JavaScript code Cell and its\narguments."}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Full source code of this tutorial:\n",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples/js-script",children:"js-script"})]}),"\n",(0,s.jsxs)(t.li,{children:["More about ",(0,s.jsx)(t.code,{children:"ckb-js-vm"}),": ",(0,s.jsx)(t.a,{href:"https://nervosnetwork/ckb-js-vm/blob/main/docs",children:"ckb-js-vm docs"})]}),"\n",(0,s.jsxs)(t.li,{children:["CKB syscalls specs: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0009-vm-syscalls/0009-vm-syscalls.md",children:"RFC-0009"})]}),"\n",(0,s.jsxs)(t.li,{children:["Script templates: ",(0,s.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates",children:"ckb-script-templates"})]}),"\n",(0,s.jsxs)(t.li,{children:["CKB transaction structure: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,s.jsxs)(t.li,{children:["CKB data structure basics: ",(0,s.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function j(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(_,{...e})}):_(e)}},898:(e,t,n)=>{n.d(t,{A:()=>r});var s=n(4848);const r={basic:{time:"5 - 7 min",topics:[{label:"Script",link:"/docs/concepts/glossary#script"},{label:"CKB-VM",link:"/docs/concepts/glossary#ckb-vm"},{label:"Cell Model",link:"/docs/concepts/cell-model"},{label:"Transaction",link:"/docs/concepts/glossary#transaction"}],tools:[(0,s.jsxs)("div",{children:[(0,s.jsx)("a",{href:"https://git-scm.com/",target:"_blank",rel:"noopener noreferrer",children:"git"}),",",(0,s.jsx)("a",{href:"https://www.tutorialspoint.com/unix_commands/make.htm",target:"_blank",rel:"noopener noreferrer",children:"make"}),",",(0,s.jsx)("a",{href:"https://www.gnu.org/software/bash/",target:"_blank",rel:"noopener noreferrer",children:"bash"}),",",(0,s.jsx)("a",{href:"https://linux.die.net/man/1/sha256sum",target:"_blank",rel:"noopener noreferrer",children:"sha256sum"})," and others Unix utilities."]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("a",{href:"https://www.rust-lang.org/",children:"Rust"})," and riscv64 target: "," ",(0,s.jsx)("code",{children:"rustup target add riscv64imac-unknown-none-elf"})]}),(0,s.jsx)("div",{children:(0,s.jsx)("a",{href:"https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html",children:"Clang 16+"})}),(0,s.jsx)("div",{children:(0,s.jsx)("a",{href:"https://github.com/cargo-generate/cargo-generate",children:"cargo-generate"})})]}}},7227:(e,t,n)=>{n.d(t,{A:()=>l});n(6540);var s=n(8215);const r={tabItem:"tabItem_Ymn6"};var c=n(4848);function l(e){var t=e.children,n=e.hidden,l=e.className;return(0,c.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,l),hidden:n,children:t})}},9489:(e,t,n)=>{n.d(t,{A:()=>v});var s=n(6540),r=n(8215),c=n(4245),l=n(6347),i=n(6494),a=n(2814),o=n(5167),d=n(1269);function u(e){var t,n;return null!=(t=null==(n=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function p(e){var t=e.values,n=e.children;return(0,s.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,o.X)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function h(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function _(e){var t=e.queryString,n=void 0!==t&&t,r=e.groupId,c=(0,l.W6)(),i=function(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:n,groupId:r});return[(0,a.aZ)(i),(0,s.useCallback)((function(e){if(i){var t=new URLSearchParams(c.location.search);t.set(i,e),c.replace(Object.assign({},c.location,{search:t.toString()}))}}),[i,c])]}function j(e){var t,n,r,c,l=e.defaultValue,a=e.queryString,o=void 0!==a&&a,u=e.groupId,j=p(e),b=(0,s.useState)((function(){return function(e){var t,n=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var r=null!=(t=s.find((function(e){return e.default})))?t:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:l,tabValues:j})})),m=b[0],g=b[1],x=_({queryString:o,groupId:u}),f=x[0],y=x[1],v=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),n=(0,d.Dv)(t),r=n[0],c=n[1],[r,(0,s.useCallback)((function(e){t&&c.set(e)}),[t,c])]),w=v[0],k=v[1],S=function(){var e=null!=f?f:w;return h({value:e,tabValues:j})?e:null}();return(0,i.A)((function(){S&&g(S)}),[S]),{selectedValue:m,selectValue:(0,s.useCallback)((function(e){if(!h({value:e,tabValues:j}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),k(e)}),[y,k,j]),tabValues:j}}var b=n(1062);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=n(4848);function x(e){var t=e.className,n=e.block,s=e.selectedValue,l=e.selectValue,i=e.tabValues,a=[],o=(0,c.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=a.indexOf(t),r=i[n].value;r!==s&&(o(t),l(r))},u=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,r=a.indexOf(e.currentTarget)+1;n=null!=(s=a[r])?s:a[0];break;case"ArrowLeft":var c,l=a.indexOf(e.currentTarget)-1;n=null!=(c=a[l])?c:a[a.length-1]}null==(t=n)||t.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},t),children:i.map((function(e){var t=e.value,n=e.label,c=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,ref:function(e){return a.push(e)},onKeyDown:u,onClick:d},c,{className:(0,r.A)("tabs__item",m.tabItem,null==c?void 0:c.className,{"tabs__item--active":s===t}),children:null!=n?n:t}),t)}))})}function f(e){var t=e.lazy,n=e.children,r=e.selectedValue,c=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var l=c.find((function(e){return e.props.value===r}));return l?(0,s.cloneElement)(l,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:c.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==r})}))})}function y(e){var t=j(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,g.jsx)(x,Object.assign({},e,t)),(0,g.jsx)(f,Object.assign({},e,t))]})}function v(e){var t=(0,b.A)();return(0,g.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},8652:(e,t,n)=>{n.d(t,{A:()=>i});var s=n(6540);const r={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var c=n(4783),l=n(4848);function i(e){var t=e.time,n=e.topics,i=e.tools;return(0,l.jsxs)("div",{className:r.box,children:[(0,l.jsx)("h4",{children:"Tutorial Overview"}),(0,l.jsxs)("div",{className:r.subsection,children:[(0,l.jsx)("strong",{children:"\u23f0 Estimated Time: "}),t]}),n&&(0,l.jsxs)("div",{className:r.subsection,children:[(0,l.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),n.map((function(e,t){return(0,l.jsxs)(s.Fragment,{children:[t>0&&", ",(0,l.jsx)(c.A,{href:e.link,children:e.label})]},t)}))]}),(0,l.jsx)("div",{className:r.subsection,children:(0,l.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,l.jsx)("ul",{className:r.toolList,children:i.map((function(e,t){return(0,l.jsx)("li",{children:e},t)}))})]})}},8453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>i});var s=n(6540);const r={},c=s.createContext(r);function l(e){const t=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),s.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b1c18118.a262dc00.js b/assets/js/b1c18118.a262dc00.js new file mode 100644 index 000000000..a5ff90d18 --- /dev/null +++ b/assets/js/b1c18118.a262dc00.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[562],{2157:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var t=r(4848),a=r(8453),o=(r(8180),r(9489)),s=r(7227);const i={id:"run-public-rpc-node",title:"Run a Public RPC Node",sidebar_position:3},l="Run a Public RPC Node",c={id:"Node/run-public-rpc-node",title:"Run a Public RPC Node",description:"A public RPC node allows external parties to interact with the blockchain, enabling actions such as querying blockchain data or submitting transactions. This setup is crucial for applications that rely on real-time data from the blockchain.",source:"@site/docs/Node/run-public-rpc-node.mdx",sourceDirName:"Node",slug:"/Node/run-public-rpc-node",permalink:"/docs/Node/run-public-rpc-node",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Node/run-public-rpc-node.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:3,frontMatter:{id:"run-public-rpc-node",title:"Run a Public RPC Node",sidebar_position:3},sidebar:"tutorial",previous:{title:"Run a Testnet Node",permalink:"/docs/Node/run-testnet-node"},next:{title:"Concepts",permalink:"/docs/concepts/"}},d={},u=[{value:"RPC Access Control",id:"rpc-access-control",level:2},{value:"Step 1: Install Docker-Compose and Docker",id:"step-1-install-docker-compose-and-docker",level:3},{value:"Step 2: Clone the Proxy Configuration",id:"step-2-clone-the-proxy-configuration",level:3},{value:"Step 3: Replace Default RPC Address",id:"step-3-replace-default-rpc-address",level:3},{value:"Step 4: Run Proxy",id:"step-4-run-proxy",level:3},{value:"Examples",id:"examples",level:2},{value:"Restricted Methods",id:"restricted-methods",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"run-a-public-rpc-node",children:"Run a Public RPC Node"}),"\n",(0,t.jsx)(n.p,{children:"A public RPC node allows external parties to interact with the blockchain, enabling actions such as querying blockchain data or submitting transactions. This setup is crucial for applications that rely on real-time data from the blockchain."}),"\n",(0,t.jsx)(n.admonition,{type:"warning",children:(0,t.jsxs)(n.p,{children:["Exposing RPC can pose significant security risks. Enabling RPC through the ",(0,t.jsx)(n.code,{children:"rpc.listen_address"})," configuration can open the JSON-RPC port to arbitrary machines, increasing vulnerability. It's strongly advised against enabling RPC unless absolutely necessary. If unavoidable, ensure access is restricted solely to trusted machines, following the provided guidelines."]})}),"\n",(0,t.jsx)(n.h2,{id:"rpc-access-control",children:"RPC Access Control"}),"\n",(0,t.jsx)(n.p,{children:"Here is an example using Nginx API Gateway to configure the RPC access control."}),"\n",(0,t.jsxs)(n.p,{children:["Explore more solutions or submit new ones using the GitHub tag ",(0,t.jsx)(n.a,{href:"https://github.com/topics/ckb-rpc-proxy",children:"ckb-rpc-proxy"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"step-1-install-docker-compose-and-docker",children:"Step 1: Install Docker-Compose and Docker"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"apt install docker-compose\napt install docker\n"})}),"\n",(0,t.jsx)(n.h3,{id:"step-2-clone-the-proxy-configuration",children:"Step 2: Clone the Proxy Configuration"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/cryptape/ckb-nginx-proxy.git\n"})}),"\n",(0,t.jsx)(n.h3,{id:"step-3-replace-default-rpc-address",children:"Step 3: Replace Default RPC Address"}),"\n",(0,t.jsx)(n.p,{children:"Navigate to the cloned directory and update the Nginx configuration to point to your CKB node's RPC IP address and port:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'cd ckb-nginx-proxy\nsed -i "s/YOUR_CKR_RPC_IP:8114/192.168.1.100:8114/" nginx.conf\n'})}),"\n",(0,t.jsx)(n.h3,{id:"step-4-run-proxy",children:"Step 4: Run Proxy"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker-compose up -d\n"})}),"\n",(0,t.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Get tip block hash and number:"})}),"\n",(0,t.jsx)(n.p,{children:"This example retrieves the latest block's hash and number from the CKB node through the configured Nginx proxy."}),"\n",(0,t.jsxs)(o.A,{children:[(0,t.jsx)(s.A,{value:"command",label:"Command",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "get_tip_header",\n "params": []\n}\' \\\n| tr -d \'\\n\' \\\n| curl -H \'content-type: application/json\' -d @- \\\nhttp://192.168.1.100:80\n\n## Note that http://192.168.1.100:80 needs to be changed to your proxy IP.\n'})})}),(0,t.jsx)(s.A,{value:"result",label:"Result",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": {\n "compact_target": "0x1d090fbe",\n "dao": "0xba17553fab3db84154bc4aa9f09b2600e826a2b0df99010400ed51b4686b5808",\n "epoch": "0x7080687001539",\n "extra_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "hash": "0x7a46e779a3fc2d5b55c82aad852e721b0097bf873927b9751409b1d185599ce4",\n "nonce": "0xd265e70dfd205dbbed33b29294121856",\n "number": "0x7037f2",\n "parent_hash": "0x3d105fe9ec60f138baa6623abd16af70ba1be90ad23d1943bcaa55d5f14fcb6f",\n "proposals_hash": "0x2581d1769886226a8c90ee99baf2d8696e24c7f6bb6751748ff8b4452f8006e5",\n "timestamp": "0x1847a2bfad2",\n "transactions_root": "0x28157a5962c4ae1d3e153b1d8d331e5fd3c158866287f5398ab7f7d38210dfb0",\n "version": "0x0"\n },\n "id": 2\n}\n'})})})]}),"\n",(0,t.jsx)(n.h2,{id:"restricted-methods",children:"Restricted Methods"}),"\n",(0,t.jsx)(n.p,{children:"Certain RPC methods are restricted to prevent abusive interactions with the CKB node:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"clear_banned_addresses"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"set_ban"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"set_network_active"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"add_node"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"remove_node"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"remove_transaction"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"clear_tx_pool"})}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["These methods can alter the node's network interactions significantly and should be exposed only to trusted administrators. For example, ",(0,t.jsx)(n.code,{children:"clear_tx_pool"})," can be used to remove all transactions from the mempool, which could disrupt node operation if used maliciously."]}),"\n",(0,t.jsxs)(o.A,{children:[(0,t.jsx)(s.A,{value:"command",label:"Command",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'echo \'{\n "id": 2,\n "jsonrpc": "2.0",\n "method": "clear_tx_pool",\n "params": []\n}\' | tr -d \'\\n\' | curl -H \'content-type: application/json\' -d @- \\\nhttp://192.168.1.100:80\n'})})}),(0,t.jsx)(s.A,{value:"result",label:"Result",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" This method has been banned.\n"})})})]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},7227:(e,n,r)=>{r.d(n,{A:()=>s});r(6540);var t=r(8215);const a={tabItem:"tabItem_Ymn6"};var o=r(4848);function s(e){var n=e.children,r=e.hidden,s=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,t.A)(a.tabItem,s),hidden:r,children:n})}},9489:(e,n,r)=>{r.d(n,{A:()=>C});var t=r(6540),a=r(8215),o=r(4245),s=r(6347),i=r(6494),l=r(2814),c=r(5167),d=r(1269);function u(e){var n,r;return null!=(n=null==(r=t.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,t.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?n:[]}function h(e){var n=e.values,r=e.children;return(0,t.useMemo)((function(){var e=null!=n?n:function(e){return u(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(r);return function(e){var n=(0,c.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,r])}function p(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function b(e){var n=e.queryString,r=void 0!==n&&n,a=e.groupId,o=(0,s.W6)(),i=function(e){var n=e.queryString,r=void 0!==n&&n,t=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=t?t:null}({queryString:r,groupId:a});return[(0,l.aZ)(i),(0,t.useCallback)((function(e){if(i){var n=new URLSearchParams(o.location.search);n.set(i,e),o.replace(Object.assign({},o.location,{search:n.toString()}))}}),[i,o])]}function f(e){var n,r,a,o,s=e.defaultValue,l=e.queryString,c=void 0!==l&&l,u=e.groupId,f=h(e),m=(0,t.useState)((function(){return function(e){var n,r=e.defaultValue,t=e.tabValues;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!p({value:r,tabValues:t}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+t.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var a=null!=(n=t.find((function(e){return e.default})))?n:t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:s,tabValues:f})})),x=m[0],v=m[1],g=b({queryString:c,groupId:u}),j=g[0],y=g[1],C=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Dv)(n),a=r[0],o=r[1],[a,(0,t.useCallback)((function(e){n&&o.set(e)}),[n,o])]),k=C[0],R=C[1],_=function(){var e=null!=j?j:k;return p({value:e,tabValues:f})?e:null}();return(0,i.A)((function(){_&&v(_)}),[_]),{selectedValue:x,selectValue:(0,t.useCallback)((function(e){if(!p({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);v(e),y(e),R(e)}),[y,R,f]),tabValues:f}}var m=r(1062);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=r(4848);function g(e){var n=e.className,r=e.block,t=e.selectedValue,s=e.selectValue,i=e.tabValues,l=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var n=e.currentTarget,r=l.indexOf(n),a=i[r].value;a!==t&&(c(n),s(a))},u=function(e){var n,r=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var t,a=l.indexOf(e.currentTarget)+1;r=null!=(t=l[a])?t:l[0];break;case"ArrowLeft":var o,s=l.indexOf(e.currentTarget)-1;r=null!=(o=l[s])?o:l[l.length-1]}null==(n=r)||n.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":r},n),children:i.map((function(e){var n=e.value,r=e.label,o=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:function(e){return l.push(e)},onKeyDown:u,onClick:d},o,{className:(0,a.A)("tabs__item",x.tabItem,null==o?void 0:o.className,{"tabs__item--active":t===n}),children:null!=r?r:n}),n)}))})}function j(e){var n=e.lazy,r=e.children,a=e.selectedValue,o=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){var s=o.find((function(e){return e.props.value===a}));return s?(0,t.cloneElement)(s,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:o.map((function(e,n){return(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==a})}))})}function y(e){var n=f(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",x.tabList),children:[(0,v.jsx)(g,Object.assign({},e,n)),(0,v.jsx)(j,Object.assign({},e,n))]})}function C(e){var n=(0,m.A)();return(0,v.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(n))}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>i});var t=r(6540);const a={},o=t.createContext(a);function s(e){const n=t.useContext(o);return t.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(a):e.components||a:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/be8ab648.ac0908f2.js b/assets/js/be8ab648.c3c6e502.js similarity index 98% rename from assets/js/be8ab648.ac0908f2.js rename to assets/js/be8ab648.c3c6e502.js index 5b959ffbf..227ac2a7e 100644 --- a/assets/js/be8ab648.ac0908f2.js +++ b/assets/js/be8ab648.c3c6e502.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[689],{7975:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var o=s(4848),t=s(8453);const i={id:"consensus",title:"Consensus",sidebar_position:4},r=void 0,a={id:"concepts/consensus",title:"Consensus",description:"Consensus in Nervos refers to a state of agreement among participants on the blockchain\u2019s history and current state. The state encompasses data such as each user's CKBytes holdings and their respective digital assets.",source:"@site/docs/concepts/consensus.md",sourceDirName:"concepts",slug:"/concepts/consensus",permalink:"/docs/concepts/consensus",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/consensus.md",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:4,frontMatter:{id:"consensus",title:"Consensus",sidebar_position:4},sidebar:"tutorial",previous:{title:"CKB-VM",permalink:"/docs/concepts/ckb-vm"},next:{title:"Tokenomics",permalink:"/docs/concepts/economics"}},c={},l=[{value:"Proof-of-Work Over Proof-of-Stake",id:"proof-of-work-over-proof-of-stake",level:2},{value:"NC-Max Consensus Algorithm",id:"nc-max-consensus-algorithm",level:2},{value:"Improved Block Propagation",id:"improved-block-propagation",level:3},{value:"Enhanced Block Throughput",id:"enhanced-block-throughput",level:3},{value:"Robust Resistance to Selfish Mining",id:"robust-resistance-to-selfish-mining",level:3},{value:"Eaglesong Hash Function",id:"eaglesong-hash-function",level:2}];function h(e){const n={a:"a",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"Consensus in Nervos refers to a state of agreement among participants on the blockchain\u2019s history and current state. The state encompasses data such as each user's CKBytes holdings and their respective digital assets."}),"\n",(0,o.jsx)(n.p,{children:"Nervos Network, comprising thousands of computers and millions of transactions, constantly requires consensus on valid transactions and their order. Achieving consensus poses challenges due to the global distribution of nodes and the imperfect reliability of internet transmission. Nodes exchange messages to share transaction and block information, but these messages may arrive out of order, late, or not at all. Additionally, node functionality and honesty cannot be guaranteed. Given the substantial value involved, robust solutions for achieving consensus are crucial."}),"\n",(0,o.jsx)(n.h2,{id:"proof-of-work-over-proof-of-stake",children:"Proof-of-Work Over Proof-of-Stake"}),"\n",(0,o.jsx)(n.p,{children:"To achieve Nervos' objectives, a consensus mechanism without compromise is imperative. Proof of Work (PoW) emerged as the optimal choice with the following advantages over Proof of Stake (PoS):"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Decentralization"}),": PoW mining adapts to external factors, such as mining equipments, energy consumption, and regulation. This necessitates ongoing reinvestment to maintain competitiveness, thereby discouraging monopolization in the long run."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Security"}),": PoW offers a simpler and more robust framework, requiring fewer assumptions than alternative consensus mechanisms. This reduces the potential for security vulnerabilities and ensures a more secure network overall."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Fairness"}),": PoW mitigates advantages favoring early participants. Unlike PoS, where rewards are deterministically awarded and favor those who enter the system early, PoW ensures a more equitable distribution of rewards over time."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"nc-max-consensus-algorithm",children:"NC-Max Consensus Algorithm"}),"\n",(0,o.jsx)(n.p,{children:"Bitcoin\u2019s Nakamoto Consensus (NC) is the PoW algorithm that has successfully defended Bitcoin from countless attacks for over a decade. The technology is well understood and proven through the test of time."}),"\n",(0,o.jsx)(n.p,{children:"Nervos\u2019 NC-MAX consensus is built on Nakamoto Consensus, while addressing NC\u2018s limitations without compromising security. It offers robust resistance against transaction withholding attacks, while showcasing its superior performance, maximizing network throughput and considerably reducing transaction confirmation latency compared to traditional NC implementations."}),"\n",(0,o.jsx)(n.h3,{id:"improved-block-propagation",children:"Improved Block Propagation"}),"\n",(0,o.jsx)(n.p,{children:"In traditional blockchains, transaction propagation delays can create bottlenecks, leading to network congestion and potential security vulnerabilities. NC-MAX addresses this challenge by splitting the confirmation process into two steps: propose and commit, thereby allowing transactions to be fully propagated before being committed, eliminating delays and vulnerabilities associated with incomplete transaction distribution."}),"\n",(0,o.jsx)(n.h3,{id:"enhanced-block-throughput",children:"Enhanced Block Throughput"}),"\n",(0,o.jsx)(n.p,{children:"Shorter block intervals in blockchain networks can increase transaction throughput, but may also result in higher orphan block rate due to network synchronization issues. NC-MAX dynamically adjusts block intervals based on network performance to maximize throughput, while maintaining an expected orphan block rate. This adaptive approach ensures shorter block times without compromising network security."}),"\n",(0,o.jsx)(n.h3,{id:"robust-resistance-to-selfish-mining",children:"Robust Resistance to Selfish Mining"}),"\n",(0,o.jsx)(n.p,{children:"Selfish mining practices undermine network security by allowing miners to gain a disproportionate share of rewards while contributing less hash power. NC-MAX confronts this challenge by accurately measuring the network's computing power and mitigating known selfish mining attacks. By considering both external and internal factors, NC-MAX makes selfish mining strategies unprofitable, enhancing overall network security."}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsxs)(n.p,{children:["For a comprehensive understanding of NC-MAX, refer to ",(0,o.jsx)(n.a,{href:"https://eprint.iacr.org/2020/1101",children:"NC-Max: Breaking the Security-Performance Tradeoff in Nakamoto Consensus"})," and ",(0,o.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0020-ckb-consensus-protocol/0020-ckb-consensus-protocol.md",children:"RFC Consensus Protocol"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"eaglesong-hash-function",children:"Eaglesong Hash Function"}),"\n",(0,o.jsx)(n.p,{children:"Bitcoin\u2019s Nakamoto Consensus utilizes the widely-used SHA256 hash function. Any new cryptocurrency, as long as based on SHA256, can make benefits by leveraging the existing mining infrastructure. The substantial amount of infrastructure available for Bitcoin can be used maliciously, making it susceptible to potential attacks."}),"\n",(0,o.jsx)(n.p,{children:"To address this vulnerability, Nervos developed Eaglesong, a novel cryptographic hash function tailored for its ecosystem. Eaglesong offers a balance of novelty, simplicity, and security, ensuring easy implementation in both software and hardware. This innovation enhances Nervos' security and ensures complete hardware sovereignty, providing a secure alternative to SHA256."}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsxs)(n.p,{children:["For more information on Eaglesong, refer to ",(0,o.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0010-eaglesong/0010-eaglesong.md",children:"RFC Eaglesong"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>a});var o=s(6540);const t={},i=o.createContext(t);function r(e){const n=o.useContext(i);return o.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(t):e.components||t:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[689],{7975:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var o=s(4848),t=s(8453);const i={id:"consensus",title:"Consensus",sidebar_position:4},r=void 0,a={id:"concepts/consensus",title:"Consensus",description:"Consensus in Nervos refers to a state of agreement among participants on the blockchain\u2019s history and current state. The state encompasses data such as each user's CKBytes holdings and their respective digital assets.",source:"@site/docs/concepts/consensus.md",sourceDirName:"concepts",slug:"/concepts/consensus",permalink:"/docs/concepts/consensus",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/consensus.md",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:4,frontMatter:{id:"consensus",title:"Consensus",sidebar_position:4},sidebar:"tutorial",previous:{title:"CKB-VM",permalink:"/docs/concepts/ckb-vm"},next:{title:"Tokenomics",permalink:"/docs/concepts/economics"}},c={},l=[{value:"Proof-of-Work Over Proof-of-Stake",id:"proof-of-work-over-proof-of-stake",level:2},{value:"NC-Max Consensus Algorithm",id:"nc-max-consensus-algorithm",level:2},{value:"Improved Block Propagation",id:"improved-block-propagation",level:3},{value:"Enhanced Block Throughput",id:"enhanced-block-throughput",level:3},{value:"Robust Resistance to Selfish Mining",id:"robust-resistance-to-selfish-mining",level:3},{value:"Eaglesong Hash Function",id:"eaglesong-hash-function",level:2}];function h(e){const n={a:"a",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"Consensus in Nervos refers to a state of agreement among participants on the blockchain\u2019s history and current state. The state encompasses data such as each user's CKBytes holdings and their respective digital assets."}),"\n",(0,o.jsx)(n.p,{children:"Nervos Network, comprising thousands of computers and millions of transactions, constantly requires consensus on valid transactions and their order. Achieving consensus poses challenges due to the global distribution of nodes and the imperfect reliability of internet transmission. Nodes exchange messages to share transaction and block information, but these messages may arrive out of order, late, or not at all. Additionally, node functionality and honesty cannot be guaranteed. Given the substantial value involved, robust solutions for achieving consensus are crucial."}),"\n",(0,o.jsx)(n.h2,{id:"proof-of-work-over-proof-of-stake",children:"Proof-of-Work Over Proof-of-Stake"}),"\n",(0,o.jsx)(n.p,{children:"To achieve Nervos' objectives, a consensus mechanism without compromise is imperative. Proof of Work (PoW) emerged as the optimal choice with the following advantages over Proof of Stake (PoS):"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Decentralization"}),": PoW mining adapts to external factors, such as mining equipments, energy consumption, and regulation. This necessitates ongoing reinvestment to maintain competitiveness, thereby discouraging monopolization in the long run."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Security"}),": PoW offers a simpler and more robust framework, requiring fewer assumptions than alternative consensus mechanisms. This reduces the potential for security vulnerabilities and ensures a more secure network overall."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Fairness"}),": PoW mitigates advantages favoring early participants. Unlike PoS, where rewards are deterministically awarded and favor those who enter the system early, PoW ensures a more equitable distribution of rewards over time."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"nc-max-consensus-algorithm",children:"NC-Max Consensus Algorithm"}),"\n",(0,o.jsx)(n.p,{children:"Bitcoin\u2019s Nakamoto Consensus (NC) is the PoW algorithm that has successfully defended Bitcoin from countless attacks for over a decade. The technology is well understood and proven through the test of time."}),"\n",(0,o.jsx)(n.p,{children:"Nervos\u2019 NC-MAX consensus is built on Nakamoto Consensus, while addressing NC\u2018s limitations without compromising security. It offers robust resistance against transaction withholding attacks, while showcasing its superior performance, maximizing network throughput and considerably reducing transaction confirmation latency compared to traditional NC implementations."}),"\n",(0,o.jsx)(n.h3,{id:"improved-block-propagation",children:"Improved Block Propagation"}),"\n",(0,o.jsx)(n.p,{children:"In traditional blockchains, transaction propagation delays can create bottlenecks, leading to network congestion and potential security vulnerabilities. NC-MAX addresses this challenge by splitting the confirmation process into two steps: propose and commit, thereby allowing transactions to be fully propagated before being committed, eliminating delays and vulnerabilities associated with incomplete transaction distribution."}),"\n",(0,o.jsx)(n.h3,{id:"enhanced-block-throughput",children:"Enhanced Block Throughput"}),"\n",(0,o.jsx)(n.p,{children:"Shorter block intervals in blockchain networks can increase transaction throughput, but may also result in higher orphan block rate due to network synchronization issues. NC-MAX dynamically adjusts block intervals based on network performance to maximize throughput, while maintaining an expected orphan block rate. This adaptive approach ensures shorter block times without compromising network security."}),"\n",(0,o.jsx)(n.h3,{id:"robust-resistance-to-selfish-mining",children:"Robust Resistance to Selfish Mining"}),"\n",(0,o.jsx)(n.p,{children:"Selfish mining practices undermine network security by allowing miners to gain a disproportionate share of rewards while contributing less hash power. NC-MAX confronts this challenge by accurately measuring the network's computing power and mitigating known selfish mining attacks. By considering both external and internal factors, NC-MAX makes selfish mining strategies unprofitable, enhancing overall network security."}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsxs)(n.p,{children:["For a comprehensive understanding of NC-MAX, refer to ",(0,o.jsx)(n.a,{href:"https://eprint.iacr.org/2020/1101",children:"NC-Max: Breaking the Security-Performance Tradeoff in Nakamoto Consensus"})," and ",(0,o.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0020-ckb-consensus-protocol/0020-ckb-consensus-protocol.md",children:"RFC Consensus Protocol"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"eaglesong-hash-function",children:"Eaglesong Hash Function"}),"\n",(0,o.jsx)(n.p,{children:"Bitcoin\u2019s Nakamoto Consensus utilizes the widely-used SHA256 hash function. Any new cryptocurrency, as long as based on SHA256, can make benefits by leveraging the existing mining infrastructure. The substantial amount of infrastructure available for Bitcoin can be used maliciously, making it susceptible to potential attacks."}),"\n",(0,o.jsx)(n.p,{children:"To address this vulnerability, Nervos developed Eaglesong, a novel cryptographic hash function tailored for its ecosystem. Eaglesong offers a balance of novelty, simplicity, and security, ensuring easy implementation in both software and hardware. This innovation enhances Nervos' security and ensures complete hardware sovereignty, providing a secure alternative to SHA256."}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsxs)(n.p,{children:["For more information on Eaglesong, refer to ",(0,o.jsx)(n.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0010-eaglesong/0010-eaglesong.md",children:"RFC Eaglesong"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>a});var o=s(6540);const t={},i=o.createContext(t);function r(e){const n=o.useContext(i);return o.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(t):e.components||t:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c279c4ab.1099f011.js b/assets/js/c279c4ab.1099f011.js deleted file mode 100644 index 54a1f9b25..000000000 --- a/assets/js/c279c4ab.1099f011.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[148],{1877:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>n,metadata:()=>a,toc:()=>l});var r=o(4848),i=o(8453);const n={id:"program-language-for-script",title:"Program Languages for Script",sidebar_position:2},s="Program Languages for Script",a={id:"Script/program-language-for-script",title:"Program Languages for Script",description:"We have learned what a Script is and how a Script works. So, how do we write a Script then? What kind of programming language do I need to use?",source:"@site/docs/Script/program-language-for-script.mdx",sourceDirName:"Script",slug:"/Script/program-language-for-script",permalink:"/docs/Script/program-language-for-script",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Script/program-language-for-script.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:2,frontMatter:{id:"program-language-for-script",title:"Program Languages for Script",sidebar_position:2},sidebar:"tutorial",previous:{title:"Intro to Script",permalink:"/docs/Script/intro-to-script"},next:{title:"Tutorial: Write Scripts",permalink:"/docs/Script/write-script"}},c={},l=[{value:"Rust",id:"rust",level:2},{value:"C",id:"c",level:2},{value:"JavaScript, Golang, Ruby, Lua, Python...Too?",id:"javascript-golang-ruby-lua-pythontoo",level:2},{value:"Yes, I Know This Is Possible, But Won\u2019t a VM on Top of a VM Be Slow?",id:"yes-i-know-this-is-possible-but-wont-a-vm-on-top-of-a-vm-be-slow",level:3},{value:"But What If I Still Want to Use a Script-Dedicated Language?",id:"but-what-if-i-still-want-to-use-a-script-dedicated-language",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"program-languages-for-script",children:"Program Languages for Script"}),"\n",(0,r.jsx)(t.p,{children:"We have learned what a Script is and how a Script works. So, how do we write a Script then? What kind of programming language do I need to use?"}),"\n",(0,r.jsxs)(t.p,{children:["Unlike other blockchains, the CKB-VM resembles a real mini-computer based on ",(0,r.jsx)(t.a,{href:"https://riscv.org/",children:"RISC-V"}),", so the CKB Script code also looks like a normal Unix-style executable program that we run on a computer."]}),"\n",(0,r.jsx)(t.p,{children:"You can actually write Scripts in any programming language you want, as long as you have the proper toolchain."}),"\n",(0,r.jsxs)(t.p,{children:["However, at the current stage, we recommend that you use ",(0,r.jsx)(t.a,{href:"https://www.rust-lang.org/",children:"Rust"})," to write CKB Scripts since it has a complete toolchain to work with CKB."]}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["We will use ",(0,r.jsx)(t.code,{children:"Rust"})," as the programming language across the tutorials on this website."]})}),"\n",(0,r.jsx)(t.h2,{id:"rust",children:"Rust"}),"\n",(0,r.jsx)(t.p,{children:"f\nRust can easily compile the source code to a RISC-V target, allowing the code to be executed on CKB-VM."}),"\n",(0,r.jsx)(t.p,{children:"We have also built some useful Rust libraries and template tools to help developers build Script:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["CKB-STD: ",(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-std",children:"https://github.com/nervosnetwork/ckb-std"})]}),"\n",(0,r.jsxs)(t.li,{children:["CKB_Testtools: ",(0,r.jsx)(t.a,{href:"https://docs.rs/ckb-testtool/latest/ckb_testtool",children:"https://docs.rs/ckb-testtool/latest/ckb_testtool"})]}),"\n",(0,r.jsxs)(t.li,{children:["Cargo-Generate Script Templates: ",(0,r.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates",children:"ckb-script-templates"})]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"c",children:"C"}),"\n",(0,r.jsxs)(t.p,{children:["You can also use ",(0,r.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/C_(programming_language)",children:"C"})," language and ",(0,r.jsx)(t.a,{href:"https://gcc.gnu.org/",children:"GCC"})," to write and compile CKB Scripts to RISC-V binaries."]}),"\n",(0,r.jsxs)(t.p,{children:["Some of our developers have used this way to build Scripts like ",(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0025-simple-udt/0025-simple-udt.md",children:"sUDT"})," and ",(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/pull/428",children:"xUDT"}),". You can check ",(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-production-scripts/tree/master/c",children:"ckb-production-scripts"})," for reference."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-c-stdlib",children:"ckb-c-stdlib"})}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"javascript-golang-ruby-lua-pythontoo",children:"JavaScript, Golang, Ruby, Lua, Python...Too?"}),"\n",(0,r.jsx)(t.p,{children:"Since the CKB-VM is akin to a real mini-computer, there's no reason you can't run different programming languages on this mini-computer, right?"}),"\n",(0,r.jsx)(t.p,{children:"The answer is yes, you can run code written in any programming language on CKB. The way it works is that you first deploy a language-specific dependency as a Script on CKB, then run your code on top of this Script, and boom, it just works!"}),"\n",(0,r.jsxs)(t.p,{children:["Take JavaScript, for example. All we need to do is take a JavaScript implementation for the embedded system, e.g., ",(0,r.jsx)(t.a,{href:"https://github.com/svaarala/duktape",children:"duktape"}),", compile it from C to RISC-V binary, put it on-chain, and then boom, we can run JavaScript in CKB! Since we are working with a real mini-computer here, there\u2019s no stopping us from embedding another VM as a CKB Script to the CKB VM, and exploring this VM on top of VM path."]}),"\n",(0,r.jsxs)(t.p,{children:["Expanding from this path, we can also have Ruby on CKB via ",(0,r.jsx)(t.a,{href:"https://github.com/mruby/mruby",children:"mruby"}),", and we could even have Bitcoin Script or EVM on-chain if we just compile their VMs and put them on-chain."]}),"\n",(0,r.jsx)(t.p,{children:"If you would like to explore such paths, you can check the following two examples:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://xuejie.space/2019_07_13_introduction_to_ckb_script_programming_script_basics",children:"duktape on CKB"})}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/godwokenrises/godwoken/tree/develop/gwos-evm",children:"Godwoken-Polyjuice"}),": implementation of EVM on CKB"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"yes-i-know-this-is-possible-but-wont-a-vm-on-top-of-a-vm-be-slow",children:"Yes, I Know This Is Possible, But Won\u2019t a VM on Top of a VM Be Slow?"}),"\n",(0,r.jsx)(t.p,{children:"The answer really depends on your use case. Saying whether this will be slow isn't possible without actual benchmarks, which themselves are not meaningful unless applied to a real use case with standard hardware requirements. So, we'll need to wait and see if this really becomes an issue."}),"\n",(0,r.jsxs)(t.p,{children:["Besides, we are actively working in this field to optimize both the CKB VM and the VMs running on top of the CKB VM to make them faster and more efficient ",":P"]}),"\n",(0,r.jsx)(t.h3,{id:"but-what-if-i-still-want-to-use-a-script-dedicated-language",children:"But What If I Still Want to Use a Script-Dedicated Language?"}),"\n",(0,r.jsxs)(t.p,{children:["If you come from the Ethereum community, you might be accustomed to using a dedicated programming language to write smart contracts, like ",(0,r.jsx)(t.a,{href:"https://soliditylang.org/",children:"Solidity"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["You might wonder if there is a similar option for CKB Scripts. Indeed, there is a dedicated programming language for CKB Scripts developed by the CKB community called ",(0,r.jsx)(t.a,{href:"https://github.com/cell-labs/cell-script",children:"Cell-Script"}),". It is still in the early stages, but feel free to try it out and provide feedback to the community."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>a});var r=o(6540);const i={},n=r.createContext(i);function s(e){const t=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c279c4ab.e32bc3b8.js b/assets/js/c279c4ab.e32bc3b8.js new file mode 100644 index 000000000..569d66d2f --- /dev/null +++ b/assets/js/c279c4ab.e32bc3b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[148],{1877:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>n,metadata:()=>a,toc:()=>l});var r=o(4848),i=o(8453);const n={id:"program-language-for-script",title:"Program Languages for Script",sidebar_position:2},s="Program Languages for Script",a={id:"Script/program-language-for-script",title:"Program Languages for Script",description:"We have learned what a Script is and how a Script works. So, how do we write a Script then? What kind of programming language do I need to use?",source:"@site/docs/Script/program-language-for-script.mdx",sourceDirName:"Script",slug:"/Script/program-language-for-script",permalink:"/docs/Script/program-language-for-script",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Script/program-language-for-script.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:2,frontMatter:{id:"program-language-for-script",title:"Program Languages for Script",sidebar_position:2},sidebar:"tutorial",previous:{title:"Intro to Script",permalink:"/docs/Script/intro-to-script"},next:{title:"Tutorial: A Minimal Script",permalink:"/docs/Script/minimal-script"}},c={},l=[{value:"Rust",id:"rust",level:2},{value:"C",id:"c",level:2},{value:"JavaScript, Golang, Ruby, Lua, Python...Too?",id:"javascript-golang-ruby-lua-pythontoo",level:2},{value:"Yes, I Know This Is Possible, But Won\u2019t a VM on Top of a VM Be Slow?",id:"yes-i-know-this-is-possible-but-wont-a-vm-on-top-of-a-vm-be-slow",level:3},{value:"But What If I Still Want to Use a Script-Dedicated Language?",id:"but-what-if-i-still-want-to-use-a-script-dedicated-language",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"program-languages-for-script",children:"Program Languages for Script"}),"\n",(0,r.jsx)(t.p,{children:"We have learned what a Script is and how a Script works. So, how do we write a Script then? What kind of programming language do I need to use?"}),"\n",(0,r.jsxs)(t.p,{children:["Unlike other blockchains, the CKB-VM resembles a real mini-computer based on ",(0,r.jsx)(t.a,{href:"https://riscv.org/",children:"RISC-V"}),", so the CKB Script code also looks like a normal Unix-style executable program that we run on a computer."]}),"\n",(0,r.jsx)(t.p,{children:"You can actually write Scripts in any programming language you want, as long as you have the proper toolchain."}),"\n",(0,r.jsxs)(t.p,{children:["However, at the current stage, we recommend that you use ",(0,r.jsx)(t.a,{href:"https://www.rust-lang.org/",children:"Rust"})," to write CKB Scripts since it has a complete toolchain to work with CKB."]}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["We will use ",(0,r.jsx)(t.code,{children:"Rust"})," as the programming language across the tutorials on this website."]})}),"\n",(0,r.jsx)(t.h2,{id:"rust",children:"Rust"}),"\n",(0,r.jsx)(t.p,{children:"f\nRust can easily compile the source code to a RISC-V target, allowing the code to be executed on CKB-VM."}),"\n",(0,r.jsx)(t.p,{children:"We have also built some useful Rust libraries and template tools to help developers build Script:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["CKB-STD: ",(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-std",children:"https://github.com/nervosnetwork/ckb-std"})]}),"\n",(0,r.jsxs)(t.li,{children:["CKB_Testtools: ",(0,r.jsx)(t.a,{href:"https://docs.rs/ckb-testtool/latest/ckb_testtool",children:"https://docs.rs/ckb-testtool/latest/ckb_testtool"})]}),"\n",(0,r.jsxs)(t.li,{children:["Cargo-Generate Script Templates: ",(0,r.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates",children:"ckb-script-templates"})]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"c",children:"C"}),"\n",(0,r.jsxs)(t.p,{children:["You can also use ",(0,r.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/C_(programming_language)",children:"C"})," language and ",(0,r.jsx)(t.a,{href:"https://gcc.gnu.org/",children:"GCC"})," to write and compile CKB Scripts to RISC-V binaries."]}),"\n",(0,r.jsxs)(t.p,{children:["Some of our developers have used this way to build Scripts like ",(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0025-simple-udt/0025-simple-udt.md",children:"sUDT"})," and ",(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/pull/428",children:"xUDT"}),". You can check ",(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-production-scripts/tree/master/c",children:"ckb-production-scripts"})," for reference."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-c-stdlib",children:"ckb-c-stdlib"})}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"javascript-golang-ruby-lua-pythontoo",children:"JavaScript, Golang, Ruby, Lua, Python...Too?"}),"\n",(0,r.jsx)(t.p,{children:"Since the CKB-VM is akin to a real mini-computer, there's no reason you can't run different programming languages on this mini-computer, right?"}),"\n",(0,r.jsx)(t.p,{children:"The answer is yes, you can run code written in any programming language on CKB. The way it works is that you first deploy a language-specific dependency as a Script on CKB, then run your code on top of this Script, and boom, it just works!"}),"\n",(0,r.jsxs)(t.p,{children:["Take JavaScript, for example. All we need to do is take a JavaScript implementation for the embedded system, e.g., ",(0,r.jsx)(t.a,{href:"https://github.com/svaarala/duktape",children:"duktape"}),", compile it from C to RISC-V binary, put it on-chain, and then boom, we can run JavaScript in CKB! Since we are working with a real mini-computer here, there\u2019s no stopping us from embedding another VM as a CKB Script to the CKB VM, and exploring this VM on top of VM path."]}),"\n",(0,r.jsxs)(t.p,{children:["Expanding from this path, we can also have Ruby on CKB via ",(0,r.jsx)(t.a,{href:"https://github.com/mruby/mruby",children:"mruby"}),", and we could even have Bitcoin Script or EVM on-chain if we just compile their VMs and put them on-chain."]}),"\n",(0,r.jsx)(t.p,{children:"If you would like to explore such paths, you can check the following two examples:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://xuejie.space/2019_07_13_introduction_to_ckb_script_programming_script_basics",children:"duktape on CKB"})}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/godwokenrises/godwoken/tree/develop/gwos-evm",children:"Godwoken-Polyjuice"}),": implementation of EVM on CKB"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"yes-i-know-this-is-possible-but-wont-a-vm-on-top-of-a-vm-be-slow",children:"Yes, I Know This Is Possible, But Won\u2019t a VM on Top of a VM Be Slow?"}),"\n",(0,r.jsx)(t.p,{children:"The answer really depends on your use case. Saying whether this will be slow isn't possible without actual benchmarks, which themselves are not meaningful unless applied to a real use case with standard hardware requirements. So, we'll need to wait and see if this really becomes an issue."}),"\n",(0,r.jsxs)(t.p,{children:["Besides, we are actively working in this field to optimize both the CKB VM and the VMs running on top of the CKB VM to make them faster and more efficient ",":P"]}),"\n",(0,r.jsx)(t.h3,{id:"but-what-if-i-still-want-to-use-a-script-dedicated-language",children:"But What If I Still Want to Use a Script-Dedicated Language?"}),"\n",(0,r.jsxs)(t.p,{children:["If you come from the Ethereum community, you might be accustomed to using a dedicated programming language to write smart contracts, like ",(0,r.jsx)(t.a,{href:"https://soliditylang.org/",children:"Solidity"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["You might wonder if there is a similar option for CKB Scripts. Indeed, there is a dedicated programming language for CKB Scripts developed by the CKB community called ",(0,r.jsx)(t.a,{href:"https://github.com/cell-labs/cell-script",children:"Cell-Script"}),". It is still in the early stages, but feel free to try it out and provide feedback to the community."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>a});var r=o(6540);const i={},n=r.createContext(i);function s(e){const t=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d001ba2d.792f90bd.js b/assets/js/d001ba2d.792f90bd.js deleted file mode 100644 index a3a61e319..000000000 --- a/assets/js/d001ba2d.792f90bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[403],{8010:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>d,default:()=>f,frontMatter:()=>l,metadata:()=>u,toc:()=>h});var n=r(4848),s=r(8453),c=r(9489),o=r(7227);const i={basic:{time:"5 - 7 min",topics:[{label:"Script",href:"/docs/concepts/glossary#script"},{label:"CKB-VM",href:"/docs/concepts/glossary#ckb-vm"},{label:"Cell Model",href:"/docs/concepts/cell-model"},{label:"Transaction",href:"/docs/concepts/glossary#transaction"}],tools:[(0,n.jsxs)("div",{children:[(0,n.jsx)("a",{href:"https://git-scm.com/",target:"_blank",rel:"noopener noreferrer",children:"git"}),",",(0,n.jsx)("a",{href:"https://www.tutorialspoint.com/unix_commands/make.htm",target:"_blank",rel:"noopener noreferrer",children:"make"}),",",(0,n.jsx)("a",{href:"https://www.gnu.org/software/bash/",target:"_blank",rel:"noopener noreferrer",children:"bash"}),",",(0,n.jsx)("a",{href:"https://linux.die.net/man/1/sha256sum",target:"_blank",rel:"noopener noreferrer",children:"sha256sum"})," and others Unix utilities."]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("a",{href:"https://www.rust-lang.org/",children:"Rust"})," and riscv64 target: "," ",(0,n.jsx)("code",{children:"rustup target add riscv64imac-unknown-none-elf"})]}),(0,n.jsx)("div",{children:(0,n.jsx)("a",{href:"https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html",children:"Clang 16+"})}),(0,n.jsx)("div",{children:(0,n.jsx)("a",{href:"https://github.com/cargo-generate/cargo-generate",children:"cargo-generate"})})]}};var a=r(8652);const l={id:"write-script",title:"Tutorial: Write Scripts",sidebar_position:3},d="Tutorial: Write Scripts",u={id:"Script/write-script",title:"Tutorial: Write Scripts",description:" i8 {\n 0\n}\n"})}),"\n",(0,n.jsxs)(t.p,{children:["The simplest CKB Script code, often called ",(0,n.jsx)(t.code,{children:"always-success"}),", always returns 0 as its return code. You might think this simplest Script code is also the dumbest one because if you use this as your Lock Script, your tokens could be taken by anyone."]}),"\n",(0,n.jsxs)(t.p,{children:["However, this simplest Script proves useful in a development environment. When testing Scripts on a local blockchain for your dApp, you might allow the testing Cells to have an ",(0,n.jsx)(t.code,{children:"always-success"})," Lock Script to simplify your testing workflow."]}),"\n",(0,n.jsxs)(t.p,{children:["Despite its utility, the ",(0,n.jsx)(t.code,{children:"always-success"})," Script is not very interesting due to its simplicity."]}),"\n",(0,n.jsx)(t.p,{children:"Here we will start with a more interesting idea:"}),"\n",(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsxs)(t.p,{children:["Personally I dislike carrot. I do know that carrot is great from a nutritional point of view, but I still want to avoid it due to the taste. Now what if I want to set a rule, that none of my Cells on CKB has data that begin with the word ",(0,n.jsx)(t.code,{children:"carrot"}),"?"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Let\u2019s write a Script code to ensure this."}),"\n",(0,n.jsxs)(t.p,{children:["Below is a step-by-step guide, and you can also clone the full code example from the Github at ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples/carrot-script",children:"carrot-script"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"carrot-forbidden-script",children:"Carrot-Forbidden Script"}),"\n",(0,n.jsxs)(t.p,{children:["The first step is to create a new Script project. We use ",(0,n.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates",children:"ckb-script-templates"})," for this purpose. You will need the following dependencies:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"git"}),", ",(0,n.jsx)(t.code,{children:"make"}),", ",(0,n.jsx)(t.code,{children:"sed"}),", ",(0,n.jsx)(t.code,{children:"bash"}),", ",(0,n.jsx)(t.code,{children:"sha256sum"})," and others Unix utilities"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"Rust"})," with ",(0,n.jsx)(t.code,{children:"riscv64"})," target installed: ",(0,n.jsx)(t.code,{children:"rustup target add riscv64imac-unknown-none-elf"})]}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.code,{children:"Clang 16+"})}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"cargo-generate"}),": You can install this via ",(0,n.jsx)(t.code,{children:"cargo install cargo-generate"})]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["If you got any problems for these dependencies, refer to ",(0,n.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates?tab=readme-ov-file#dependencies",children:"readme"})," for install details."]}),"\n",(0,n.jsx)(t.h3,{id:"init-a-script-project",children:"Init a Script Project"}),"\n",(0,n.jsxs)(t.p,{children:["Now let's run the command to generate a new Script project called ",(0,n.jsx)(t.code,{children:"my-first-contract-workspace"}),":"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(o.A,{value:"init-script",label:"Command",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:'alias create-ckb-scripts="cargo generate gh:cryptape/ckb-script-templates workspace"\ncreate-ckb-scripts\n'})})}),(0,n.jsx)(o.A,{value:"init-script-result",label:"Response",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"\u26a0\ufe0f Favorite `gh:cryptape/ckb-script-templates` not found in config, using it as a git repository: https://github.com/cryptape/ckb-script-templates.git\n\ud83e\udd37 Project Name: my-first-contract-workspace\n\ud83d\udd27 Destination: /tmp/my-first-contract-workspace ...\n\ud83d\udd27 project-name: my-first-contract-workspace ...\n\ud83d\udd27 Generating template ...\n\ud83d\udd27 Moving generated files into: `/tmp/my-first-contract-workspace`...\n\ud83d\udd27 Initializing a fresh Git repository\n\u2728 Done! New project created /tmp/my-first-contract-workspace\n"})})})]}),"\n",(0,n.jsx)(t.h3,{id:"create-a-new-script",children:"Create a New Script"}),"\n",(0,n.jsxs)(t.p,{children:["Let\u2019s create a new Script called ",(0,n.jsx)(t.code,{children:"carrot"}),"."]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(o.A,{value:"create-a-new-script",label:"Command",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"cd my-first-contract-workspace\nmake generate\n"})})}),(0,n.jsx)(o.A,{value:"create-a-new-script-result",label:"Response",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"\ud83e\udd37 Project Name: carrot\n\ud83d\udd27 Destination: /tmp/my-first-contract-workspace/contracts/carrot ...\n\ud83d\udd27 project-name: carrot ...\n\ud83d\udd27 Generating template ...\n\ud83d\udd27 Moving generated files into: `/tmp/my-first-contract-workspace/contracts/carrot`...\n\ud83d\udd27 Initializing a fresh Git repository\n\u2728 Done! New project created /tmp/my-first-contract-workspace/contracts/carrot\n"})})})]}),"\n",(0,n.jsxs)(t.p,{children:["Our project is successfully setup! You can run ",(0,n.jsx)(t.code,{children:"tree ."})," to show the project structure:"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(o.A,{value:"script-project-structure",label:"Command",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",metastring:"{5}",children:"tree .\n"})})}),(0,n.jsx)(o.A,{value:"script-project-structure-result",label:"Response",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:".\n\u251c\u2500\u2500 Cargo.lock\n\u251c\u2500\u2500 Cargo.toml\n\u251c\u2500\u2500 Makefile\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 contracts\n\u2502 \u2514\u2500\u2500 carrot\n\u2502 \u251c\u2500\u2500 Cargo.toml\n\u2502 \u251c\u2500\u2500 Makefile\n\u2502 \u251c\u2500\u2500 README.md\n\u2502 \u2514\u2500\u2500 src\n\u2502 \u2514\u2500\u2500 main.rs\n\u251c\u2500\u2500 scripts\n\u2502 \u2514\u2500\u2500 find_clang\n\u2514\u2500\u2500 tests\n \u251c\u2500\u2500 Cargo.toml\n \u2514\u2500\u2500 src\n \u251c\u2500\u2500 lib.rs\n \u2514\u2500\u2500 tests.rs\n\n7 directories, 13 files\n"})})})]}),"\n",(0,n.jsxs)(t.p,{children:["Here's a little introduction: ",(0,n.jsx)(t.code,{children:"contracts/carrot/src/main.rs"})," contains the source code of the carrot Script, while ",(0,n.jsx)(t.code,{children:"tests/tests.rs"})," provides unit tests for our Scripts. We will introduce the tests after we write the Script."]}),"\n",(0,n.jsx)(t.h3,{id:"use-ckb-syscall-with-ckb-std-library",children:"Use CKB Syscall with CKB-STD Library"}),"\n",(0,n.jsx)(t.p,{children:"To ensure the security of CKB Script, each Script has to run in an isolated environment that is totally separated from the main computer you are running CKB. This way it won\u2019t be able to access data it doesn\u2019t need, such as your private keys or passwords."}),"\n",(0,n.jsxs)(t.p,{children:["However, for a Script to be useful, there must be certain data it want to access, such as the Cell a Script guards, or a transaction a Script validates. CKB provides ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0009-vm-syscalls/0009-vm-syscalls.md",children:"syscalls"})," to ensure this, syscalls are defined in RISC-V standard, they provide a way to access certain resources provided by the environment. In a normal situation, the environment here means the operating system, but in the case of CKB VM, the environment refers to the actual CKB process. With syscalls, a CKB Script can access the whole transaction containing itself, including inputs, outputs, witnesses, and deps."]}),"\n",(0,n.jsxs)(t.p,{children:["The good news, is that we have encapsulated syscalls in an easy to use library called ",(0,n.jsx)(t.a,{href:"https://docs.rs/ckb-std/latest/ckb_std/",children:"CKB-STD"})," in Rust, you are very welcome to poke around the ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/ckb-std",children:"source code"})," of this library to see how syscalls are implemented. The bottomline is you can just grab this library and use the wrapped functions to make syscalls as you want."]}),"\n",(0,n.jsx)(t.p,{children:"For our carrot-forbidden Script to ensure none of the Cells can have carrot in Cell data, we will use CKB syscall to read Cell data in the Script."}),"\n",(0,n.jsxs)(t.p,{children:["Open ",(0,n.jsx)(t.code,{children:"my-first-contract-workspace/contracts/carrot/src/main.rs"})," and change it to the following:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",metastring:'title="my-first-contract-workspace/contracts/carrot/src/main.rs"',children:'#![no_std]\n#![cfg_attr(not(test), no_main)]\n\n#[cfg(test)]\nextern crate alloc;\n\nmod error;\n\nuse ckb_std::{ckb_constants::Source, debug, error::SysError, high_level::load_cell_data};\n\n#[cfg(not(test))]\nuse ckb_std::default_alloc;\nuse error::Error;\n#[cfg(not(test))]\nckb_std::entry!(program_entry);\n#[cfg(not(test))]\ndefault_alloc!();\n\npub fn program_entry() -> i8 { \n match carrot_forbidden() {\n Ok(_) => 0,\n Err(err) => err as i8,\n }\n}\n\nfn carrot_forbidden() -> Result<(), Error> {\n let mut index = 0;\n loop {\n match load_cell_data(index, Source::GroupOutput) {\n Ok(data) => {\n if data.starts_with("carrot".as_bytes()) {\n return Err(Error::CarrotAttack);\n }else{\n debug!("output #{:} has no carrot! Hooray!", index);\n }\n },\n Err(err) => {\n match err {\n // we loop out all the output cell\n SysError::IndexOutOfBound => break,\n _ => return Err(Error::from(err)),\n }\n }\n }\n // Increment index to process next cell\n index += 1;\n }\n Ok(())\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["We also need to a ",(0,n.jsx)(t.code,{children:"Error"})," module to define the error code when carrot Script fails. Create a new file named ",(0,n.jsx)(t.code,{children:"error.rs"})," in ",(0,n.jsx)(t.code,{children:"my-first-contract-workspace/contracts/carrot/src/error.rs"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rs",metastring:'title="my-first-contract-workspace/contracts/carrot/src/error.rs"',children:'use ckb_std::error::SysError;\n\n#[cfg(test)]\nextern crate alloc;\n\n#[repr(i8)]\npub enum Error {\n IndexOutOfBound = 1,\n ItemMissing,\n LengthNotEnough,\n Encoding,\n // Add customized errors here...\n CarrotAttack,\n}\n\nimpl From for Error {\n fn from(err: SysError) -> Self {\n match err {\n SysError::IndexOutOfBound => Self::IndexOutOfBound,\n SysError::ItemMissing => Self::ItemMissing,\n SysError::LengthNotEnough(_) => Self::LengthNotEnough,\n SysError::Encoding => Self::Encoding,\n SysError::Unknown(err_code) => panic!("unexpected sys error {}", err_code),\n }\n }\n}\n'})}),"\n",(0,n.jsx)(t.p,{children:"Several points worth explaining here:"}),"\n",(0,n.jsxs)(t.p,{children:["To load Cell data, we use ",(0,n.jsx)(t.code,{children:"load_cell_data"})," syscall from ",(0,n.jsx)(t.code,{children:"CKB-STD"})," library. the function takes two arguments, one is the index number, and one is source type flag that denoting the source of Cells to locate. Different source type and index number will point to different Cell. For example, ",(0,n.jsx)(t.code,{children:"load_cell_data(0, Source::GroupOutput)"})," means load the first Cell from the output Cells group with the same running Script as current Script. You can check ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0046-syscalls-summary/0046-syscalls-summary.md#source",children:"rfc"})," for more details."]}),"\n",(0,n.jsx)(t.p,{children:"The workflow of our Script goes like this:"}),"\n",(0,n.jsxs)(t.p,{children:["First, it loops through all output Cells in the transaction, load each Cell data and test if those bytes match the word ",(0,n.jsx)(t.code,{children:"carrot"}),". If we found a match, the Script would return -1, denoting an error status, if no match is found, the Script exits with 0, meaning execution success."]}),"\n",(0,n.jsx)(t.p,{children:"To perform the loop, the Script would keep an index variable, in each loop iteration, it would tries to make the syscall to fetch the Cell denoted by current index value, if the syscall returns CKB_INDEX_OUT_OF_BOUND, it means the Script has iterated through all the Cells, hence it just exits the loop, otherwise, the loop would continue, the Cell data is tested, then index variable is incremented for the next iteration."}),"\n",(0,n.jsxs)(t.p,{children:["Besides the main logic in ",(0,n.jsx)(t.code,{children:"main.rs"})," file, we also write a ",(0,n.jsx)(t.code,{children:"error.rs"})," to define our custom error code for the carrot Script."]}),"\n",(0,n.jsx)(t.p,{children:"CKB defines some basic error code like:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"1(CKB_INDEX_OUT_OF_BOUND) means you have finished fetching all indices in a kind"}),"\n",(0,n.jsx)(t.li,{children:"2(CKB_ITEM_MISSING) means an entity is not present, such as fetching a Type Script from a Cell that doesn\u2019t have one."}),"\n",(0,n.jsx)(t.li,{children:"3(CKB_LENGTH_NOT_ENOUGH) means some data length is wrong such as invalid Script args or signature length."}),"\n",(0,n.jsxs)(t.li,{children:["4(CKB_INVALID_DATA) means there is something wrong with the ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0008-serialization/0008-serialization.md",children:"molecule serialization"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["We define error code 5 to be the custom ",(0,n.jsx)(t.code,{children:"CarrotAttack"})," error. So everytime the Script throws out error code 5, we know that means the Script have found a Cell data starts with the ",(0,n.jsx)(t.code,{children:"carrot"})," word so it fails."]}),"\n",(0,n.jsx)(t.p,{children:"So that's all! This concludes your first useful CKB Script code!"}),"\n",(0,n.jsx)(t.p,{children:"In the next section, we will see how we can test and deploy it to CKB and run it."}),"\n",(0,n.jsx)(t.h3,{id:"testing-your-script",children:"Testing Your Script"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"ckb-script-templates"})," packs the unit test section that we can use to quickly test our Script without deploying the Script to blockchains."]}),"\n",(0,n.jsxs)(t.p,{children:["All test case goes into the ",(0,n.jsx)(t.code,{children:"my-first-contract-workspace/tests/src/tests.rs"})," file. The way tests works is to leverage a library called ",(0,n.jsx)(t.a,{href:"https://docs.rs/ckb-testtool/latest/ckb_testtool/",children:"ckb_testtool"})," to simulate the execution of the Script."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",metastring:'title="my-first-contract-workspace/tests/src/tests.rs"',children:'// Include your tests here\n// See https://github.com/xxuejie/ckb-native-build-sample/blob/main/tests/src/tests.rs for examples\n\nuse super::*;\nuse ckb_testtool::{\n builtin::ALWAYS_SUCCESS,\n ckb_types::{bytes::Bytes, core::TransactionBuilder, packed::*, prelude::*},\n context::Context,\n};\n\nconst MAX_CYCLES: u64 = 10_000_000;\n\n#[test]\nfn test_no_carrot() {\n // deploy contract\n let mut context = Context::default();\n let loader = Loader::default();\n let carrot_bin = loader.load_binary("carrot");\n let carrot_out_point = context.deploy_cell(carrot_bin);\n let carrot_cell_dep = CellDep::new_builder()\n .out_point(carrot_out_point.clone())\n .build();\n\n // prepare scripts\n let always_success_out_point = context.deploy_cell(ALWAYS_SUCCESS.clone());\n let lock_script = context\n .build_script(&always_success_out_point.clone(), Default::default())\n .expect("script");\n let lock_script_dep = CellDep::new_builder()\n .out_point(always_success_out_point)\n .build();\n\n // prepare cell deps\n let cell_deps: Vec = vec![lock_script_dep, carrot_cell_dep];\n\n // prepare cells\n let input_out_point = context.create_cell(\n CellOutput::new_builder()\n .capacity(1000u64.pack())\n .lock(lock_script.clone())\n .build(),\n Bytes::new(),\n );\n let input = CellInput::new_builder()\n .previous_output(input_out_point.clone())\n .build();\n\n let type_script = context\n .build_script(&carrot_out_point, Bytes::new())\n .expect("script");\n\n let outputs = vec![\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script.clone())\n .type_(Some(type_script.clone()).pack())\n .build(),\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script)\n .build(),\n ];\n\n // prepare output cell data\n let outputs_data = vec![Bytes::from("apple"), Bytes::from("tomato")];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let cycles = context\n .verify_tx(&tx, MAX_CYCLES)\n .expect("pass verification");\n println!("consume cycles: {}", cycles);\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["As you can see, we wrote the first test case named ",(0,n.jsx)(t.code,{children:"test_no_carrot"})," to simulate a transaction that use our carrot-forbidden Script in one of the output Cell, and we build all the output Cell without ",(0,n.jsx)(t.code,{children:"carrot"})," in their Cell data. To make the test pass, the transaction should be valid and verified by CKB successfully."]}),"\n",(0,n.jsxs)(t.p,{children:["We can also write another test that simulates if the transaction does contains output Cell that its data starts with the word ",(0,n.jsx)(t.code,{children:"carrot"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-rust",metastring:'title=""',children:'#[test]\nfn test_carrot_attack() {\n // deploy contract\n let mut context = Context::default();\n let loader = Loader::default();\n let carrot_bin = loader.load_binary("carrot");\n let carrot_out_point = context.deploy_cell(carrot_bin);\n let carrot_cell_dep = CellDep::new_builder()\n .out_point(carrot_out_point.clone())\n .build();\n\n // prepare scripts\n let always_success_out_point = context.deploy_cell(ALWAYS_SUCCESS.clone());\n let lock_script = context\n .build_script(&always_success_out_point.clone(), Default::default())\n .expect("script");\n let lock_script_dep = CellDep::new_builder()\n .out_point(always_success_out_point)\n .build();\n\n // prepare cell deps\n let cell_deps: Vec = vec![lock_script_dep, carrot_cell_dep];\n\n // prepare cells\n let input_out_point = context.create_cell(\n CellOutput::new_builder()\n .capacity(1000u64.pack())\n .lock(lock_script.clone())\n .build(),\n Bytes::new(),\n );\n let input = CellInput::new_builder()\n .previous_output(input_out_point.clone())\n .build();\n\n let type_script = context\n .build_script(&carrot_out_point, Bytes::new())\n .expect("script");\n\n let outputs = vec![\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script.clone())\n .type_(Some(type_script.clone()).pack())\n .build(),\n CellOutput::new_builder()\n .capacity(500u64.pack())\n .lock(lock_script)\n .build(),\n ];\n\n // prepare output cell data\n let outputs_data = vec![Bytes::from("carrot"), Bytes::from("tomato")];\n\n // build transaction\n let tx = TransactionBuilder::default()\n .cell_deps(cell_deps)\n .input(input)\n .outputs(outputs)\n .outputs_data(outputs_data.pack())\n .build();\n\n let tx = tx.as_advanced_builder().build();\n\n // run\n let err = context.verify_tx(&tx, MAX_CYCLES).unwrap_err();\n assert_script_error(err, 5);\n}\n\nfn assert_script_error(err: Error, err_code: i8) {\n let error_string = err.to_string();\n assert!(\n error_string.contains(format!("error code {} ", err_code).as_str()),\n "error_string: {}, expected_error_code: {}",\n error_string,\n err_code\n );\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["In this test, we check if the error code throws by our Script is matched with the error code 5 in ",(0,n.jsx)(t.code,{children:"assert_script_error(err, 5);"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"deploy-script-to-blockchains",children:"Deploy Script to Blockchains?"}),"\n",(0,n.jsx)(t.p,{children:"We will introduce this part in another tutorial soon. stay tuned!"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,n.jsx)(t.p,{children:"By following this tutorial this far, you have mastered how to write a basic Script on CKB. Here's a quick recap:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Use ",(0,n.jsx)(t.code,{children:"ckb-script-templates"})," to init a Script project"]}),"\n",(0,n.jsxs)(t.li,{children:["Use ",(0,n.jsx)(t.code,{children:"CKB-STD"})," to leverage CKB syscalls to read all kinds of data from transaction."]}),"\n",(0,n.jsx)(t.li,{children:"Use unit tests without deploying the Script to blockchains to quickly test the Script."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"additional-resources",children:"Additional Resources"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["This tutorial is originally taken and adapt from the amazing blog post by ",(0,n.jsx)(t.a,{href:"https://xuejie.space/2019_07_13_introduction_to_ckb_script_programming_script_basics/",children:"xuejie.space"})]}),"\n",(0,n.jsxs)(t.li,{children:["Full source code of this tutorial: ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/docs.nervos.org/tree/develop/examples/carrot-script",children:"carrot-script"})]}),"\n",(0,n.jsxs)(t.li,{children:["CKB syscalls specs: ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0009-vm-syscalls/0009-vm-syscalls.md",children:"RFC-0009"})]}),"\n",(0,n.jsxs)(t.li,{children:["script templates: ",(0,n.jsx)(t.a,{href:"https://github.com/cryptape/ckb-script-templates",children:"ckb-script-templates"})]}),"\n",(0,n.jsxs)(t.li,{children:["CKB transaction structure: ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0022-transaction-structure/0022-transaction-structure.md",children:"RFC-0022-transaction-structure"})]}),"\n",(0,n.jsxs)(t.li,{children:["CKB data structure basics: ",(0,n.jsx)(t.a,{href:"https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md",children:"RFC-0019-data-structure"})]}),"\n"]})]})}function f(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}},7227:(e,t,r)=>{r.d(t,{A:()=>o});r(6540);var n=r(8215);const s={tabItem:"tabItem_Ymn6"};var c=r(4848);function o(e){var t=e.children,r=e.hidden,o=e.className;return(0,c.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,o),hidden:r,children:t})}},9489:(e,t,r)=>{r.d(t,{A:()=>w});var n=r(6540),s=r(8215),c=r(4245),o=r(6347),i=r(6494),a=r(2814),l=r(5167),d=r(1269);function u(e){var t,r;return null!=(t=null==(r=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?t:[]}function p(e){var t=e.values,r=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:function(e){return u(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(r);return function(e){var t=(0,l.X)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,r])}function h(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function m(e){var t=e.queryString,r=void 0!==t&&t,s=e.groupId,c=(0,o.W6)(),i=function(e){var t=e.queryString,r=void 0!==t&&t,n=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:r,groupId:s});return[(0,a.aZ)(i),(0,n.useCallback)((function(e){if(i){var t=new URLSearchParams(c.location.search);t.set(i,e),c.replace(Object.assign({},c.location,{search:t.toString()}))}}),[i,c])]}function f(e){var t,r,s,c,o=e.defaultValue,a=e.queryString,l=void 0!==a&&a,u=e.groupId,f=p(e),b=(0,n.useState)((function(){return function(e){var t,r=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!h({value:r,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var s=null!=(t=n.find((function(e){return e.default})))?t:n[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:o,tabValues:f})})),x=b[0],g=b[1],_=m({queryString:l,groupId:u}),j=_[0],y=_[1],w=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Dv)(t),s=r[0],c=r[1],[s,(0,n.useCallback)((function(e){t&&c.set(e)}),[t,c])]),v=w[0],k=w[1],S=function(){var e=null!=j?j:v;return h({value:e,tabValues:f})?e:null}();return(0,i.A)((function(){S&&g(S)}),[S]),{selectedValue:x,selectValue:(0,n.useCallback)((function(e){if(!h({value:e,tabValues:f}))throw new Error("Can't select invalid tab value="+e);g(e),y(e),k(e)}),[y,k,f]),tabValues:f}}var b=r(1062);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=r(4848);function _(e){var t=e.className,r=e.block,n=e.selectedValue,o=e.selectValue,i=e.tabValues,a=[],l=(0,c.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,r=a.indexOf(t),s=i[r].value;s!==n&&(l(t),o(s))},u=function(e){var t,r=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var n,s=a.indexOf(e.currentTarget)+1;r=null!=(n=a[s])?n:a[0];break;case"ArrowLeft":var c,o=a.indexOf(e.currentTarget)-1;r=null!=(c=a[o])?c:a[a.length-1]}null==(t=r)||t.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":r},t),children:i.map((function(e){var t=e.value,r=e.label,c=e.attributes;return(0,g.jsx)("li",Object.assign({role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:function(e){return a.push(e)},onKeyDown:u,onClick:d},c,{className:(0,s.A)("tabs__item",x.tabItem,null==c?void 0:c.className,{"tabs__item--active":n===t}),children:null!=r?r:t}),t)}))})}function j(e){var t=e.lazy,r=e.children,s=e.selectedValue,c=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){var o=c.find((function(e){return e.props.value===s}));return o?(0,n.cloneElement)(o,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:c.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==s})}))})}function y(e){var t=f(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",x.tabList),children:[(0,g.jsx)(_,Object.assign({},e,t)),(0,g.jsx)(j,Object.assign({},e,t))]})}function w(e){var t=(0,b.A)();return(0,g.jsx)(y,Object.assign({},e,{children:u(e.children)}),String(t))}},8652:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(6540);const s={box:"box_OmWe",subsection:"subsection_04ph",toolList:"toolList_x0ju"};var c=r(4783),o=r(4848);function i(e){var t=e.time,r=e.topics,i=e.tools;return(0,o.jsxs)("div",{className:s.box,children:[(0,o.jsx)("h4",{children:"Tutorial Overview"}),(0,o.jsxs)("div",{className:s.subsection,children:[(0,o.jsx)("strong",{children:"\u23f0 Estimated Time: "}),t]}),r&&(0,o.jsxs)("div",{className:s.subsection,children:[(0,o.jsx)("strong",{children:"\ud83d\udca1 Topics: "}),r.map((function(e,t){return(0,o.jsxs)(n.Fragment,{children:[t>0&&", ",(0,o.jsx)(c.A,{href:e.link,children:e.label})]},t)}))]}),(0,o.jsx)("div",{className:s.subsection,children:(0,o.jsx)("strong",{children:"\ud83d\udd27 Tools You Need: "})}),(0,o.jsx)("ul",{className:s.toolList,children:i.map((function(e,t){return(0,o.jsx)("li",{children:e},t)}))})]})}},8453:(e,t,r)=>{r.d(t,{R:()=>o,x:()=>i});var n=r(6540);const s={},c=n.createContext(s);function o(e){const t=n.useContext(c);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d8a2e2a8.a383a182.js b/assets/js/d8a2e2a8.eeee6111.js similarity index 99% rename from assets/js/d8a2e2a8.a383a182.js rename to assets/js/d8a2e2a8.eeee6111.js index 8a4aa4c5e..0a25d1040 100644 --- a/assets/js/d8a2e2a8.a383a182.js +++ b/assets/js/d8a2e2a8.eeee6111.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[667],{8130:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var n=s(4848),i=s(8453);const l={id:"cell-model",title:"Cell Model",sidebar_position:2},a=void 0,o={id:"concepts/cell-model",title:"Cell Model",description:"Nervos CKB inherits Bitcoin\u2019s architecture and creates the Cell Model, a generalized UTXO model as state storage.",source:"@site/docs/concepts/cell-model.md",sourceDirName:"concepts",slug:"/concepts/cell-model",permalink:"/docs/concepts/cell-model",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/cell-model.md",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:2,frontMatter:{id:"cell-model",title:"Cell Model",sidebar_position:2},sidebar:"tutorial",previous:{title:"Nervos Blockchain",permalink:"/docs/concepts/nervos-blockchain"},next:{title:"CKB-VM",permalink:"/docs/concepts/ckb-vm"}},r={},c=[{value:"Cell",id:"cell",level:2},{value:"Cell Model",id:"cell-model",level:2},{value:"First-Class Assets",id:"first-class-assets",level:2},{value:"Flexible Transaction Fee Coverage",id:"flexible-transaction-fee-coverage",level:2},{value:"Scalability",id:"scalability",level:2}];function d(e){const t={a:"a",blockquote:"blockquote",h2:"h2",hr:"hr",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsx)(t.p,{children:"Nervos CKB inherits Bitcoin\u2019s architecture and creates the Cell Model, a generalized UTXO model as state storage.\nThis approach maintains Bitcoin's simplicity and consistency.\nIn CKB, all states are stored in Cells, computation is done off-chain, and nodes handle all verification."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"cell",children:"Cell"}),"\n",(0,n.jsxs)(t.p,{children:["A ",(0,n.jsx)(t.strong,{children:"Cell"})," represents the fundamental data storage unit in Nervos. It can encompass various data types, such as CKBytes, tokens, JavaScript code, or serialized data like JSON strings, offering extensive flexibility in data storage."]}),"\n",(0,n.jsx)("img",{src:"/img/cell/cell-data.png",alt:"Cell Data",width:"688",height:"387"}),"\n",(0,n.jsx)(t.p,{children:"Each Cell contains a small program known as a Lock Script that determines the owner of the Cell. While typically assigning ownership to a single user, Lock Script can also handle complex operations, such as having multiple owners (multi-sig) or conditional usage within specific timeframes."}),"\n",(0,n.jsxs)(t.p,{children:["A Cell may include a ",(0,n.jsx)(t.strong,{children:"Type Script"})," to execute specific rules governing its usage. This empowers developers to customize smart contracts across diverse use-cases, such as issuing Non-Fungible Tokens, limiting the supply of fungible tokens, and implementing custom functionalities to suit unique requirements."]}),"\n",(0,n.jsxs)(t.p,{children:["The collection of Cells constitutes the ",(0,n.jsx)(t.strong,{children:"state"})," of CKB. A state verified and held by CKB is any data considered valuable and universally recognized."]}),"\n",(0,n.jsx)("img",{src:"/img/cell/cell-ckb-state.png",alt:"CKB State",width:"688",height:"387"}),"\n",(0,n.jsx)(t.h2,{id:"cell-model",children:"Cell Model"}),"\n",(0,n.jsx)(t.p,{children:"Inspired by Bitcoin's UTXO model, Cell Model defines the behavior of individual Cells within Nervos, as well as the process for updating their contained data."}),"\n",(0,n.jsxs)(t.p,{children:["Cells are immutable. No changes can be made once the Cells have been added on-chain. Updating data within a Cell requires a process called ",(0,n.jsx)(t.strong,{children:"Consumption"}),". This involves consuming the existing Cell, extracting and updating the data, followed by creating a new Cell with the updated data, which is then added on-chain."]}),"\n",(0,n.jsxs)(t.p,{children:["Each Cell can be consumed only once. A non-consumed Cell is a ",(0,n.jsx)(t.strong,{children:"Live Cell"}),". A consumed Cell is a ",(0,n.jsx)(t.strong,{children:"Dead Cell"}),". Once a Cell is dead, it can no longer be used."]}),"\n",(0,n.jsx)(t.p,{children:"Transactions reflect the state change of Cells, where a group of Live Cells are consumed and new Cells are created. The network validates transactions by executing all associated Lock Scripts and Type Scripts. This ensures adherence to developer-defined rules and prevents fraudulent activities."}),"\n",(0,n.jsx)("img",{src:"/img/cell/cell-lifecycle.png",alt:"Cell lifecycle",width:"688",height:"387"}),"\n",(0,n.jsx)(t.h2,{id:"first-class-assets",children:"First-Class Assets"}),"\n",(0,n.jsx)(t.p,{children:"In Cell Model, all digital assets (e.g., CKBytes, tokens, collectibles) are considered first-class, exclusively owned by their respective owners. While assets must comply with smart contracts rules during transactions, they are inherently owned by the user, not the smart contracts. This ownership structure ensures that only the owner has permission to use the assets, regardless of how the smart contract defines the token. If a contract exploit, attackers would be unable to access the asset, as it remains under the user's control, effectively mitigating the negative impact."}),"\n",(0,n.jsxs)(t.p,{children:["This ownership structure also defines the responsibility for asset upkeep. As assets occupy space on Nervos, the owner are subject to a small recurring upkeep fee, known as ",(0,n.jsx)(t.strong,{children:"state rent,"})," which is elaborated in the ",(0,n.jsx)(t.a,{href:"https://github.com/linnnsss/docs.nervos.org/blob/concepts-v2/website/docs/concepts/economics.md",children:"Tokenomics"})," section."]}),"\n",(0,n.jsx)(t.h2,{id:"flexible-transaction-fee-coverage",children:"Flexible Transaction Fee Coverage"}),"\n",(0,n.jsx)(t.p,{children:"When transferring tokens, typically, those who initiate the transaction or execute smart contracts must cover the transaction fees. This poses a usability challenge in adoption."}),"\n",(0,n.jsx)(t.p,{children:"Cell Model provides the flexibility by allowing any party to cover the transaction fees, eliminating the need for the sender to possess CKBytes (transaction fee in Nervos). Instead, either the receiver or a third-party can cover the fee, significantly enhancing user experience."}),"\n",(0,n.jsx)(t.h2,{id:"scalability",children:"Scalability"}),"\n",(0,n.jsx)(t.p,{children:"Cell Model\u2019s unique structure inherently grants scalability, reflected in the three perspectives below."}),"\n",(0,n.jsx)("img",{src:"/img/cell/cell-scalability.png",alt:"Cell Model's scalability",width:"688",height:"387"}),"\n",(0,n.jsx)(t.p,{children:"Cell Model separates computation and validation for smart contract execution. Computation happens off-chain, where new data is generated. This data is subsequently sent to the network to undergo on-chain validation. Full nodes execute the validation to ensures compliance with developer-set rules."}),"\n",(0,n.jsx)(t.p,{children:"In Cell Model, smart contract execution is parallel. Each transaction runs independently in its own virtual machine; multiple virtual machines run simultaneously. This gives the Cell Model dramatic scaling improvements on modern computers with increasing CPU cores."}),"\n",(0,n.jsx)(t.p,{children:"Transactions are highly flexible and effective in Cell Model. Multiple smart contract operations can be batched into a single transaction, thereby minimizing transactions overhead and processing fees."}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["For more details and the rationale behind the Cell Model, refer to ",(0,n.jsx)(t.a,{href:"https://medium.com/nervosnetwork/https-medium-com-nervosnetwork-cell-model-7323fca57571",children:"this post"}),"."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>a,x:()=>o});var n=s(6540);const i={},l=n.createContext(i);function a(e){const t=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[667],{8130:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>r,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var n=s(4848),i=s(8453);const l={id:"cell-model",title:"Cell Model",sidebar_position:2},a=void 0,o={id:"concepts/cell-model",title:"Cell Model",description:"Nervos CKB inherits Bitcoin\u2019s architecture and creates the Cell Model, a generalized UTXO model as state storage.",source:"@site/docs/concepts/cell-model.md",sourceDirName:"concepts",slug:"/concepts/cell-model",permalink:"/docs/concepts/cell-model",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/concepts/cell-model.md",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:2,frontMatter:{id:"cell-model",title:"Cell Model",sidebar_position:2},sidebar:"tutorial",previous:{title:"Nervos Blockchain",permalink:"/docs/concepts/nervos-blockchain"},next:{title:"CKB-VM",permalink:"/docs/concepts/ckb-vm"}},r={},c=[{value:"Cell",id:"cell",level:2},{value:"Cell Model",id:"cell-model",level:2},{value:"First-Class Assets",id:"first-class-assets",level:2},{value:"Flexible Transaction Fee Coverage",id:"flexible-transaction-fee-coverage",level:2},{value:"Scalability",id:"scalability",level:2}];function d(e){const t={a:"a",blockquote:"blockquote",h2:"h2",hr:"hr",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsx)(t.p,{children:"Nervos CKB inherits Bitcoin\u2019s architecture and creates the Cell Model, a generalized UTXO model as state storage.\nThis approach maintains Bitcoin's simplicity and consistency.\nIn CKB, all states are stored in Cells, computation is done off-chain, and nodes handle all verification."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"cell",children:"Cell"}),"\n",(0,n.jsxs)(t.p,{children:["A ",(0,n.jsx)(t.strong,{children:"Cell"})," represents the fundamental data storage unit in Nervos. It can encompass various data types, such as CKBytes, tokens, JavaScript code, or serialized data like JSON strings, offering extensive flexibility in data storage."]}),"\n",(0,n.jsx)("img",{src:"/img/cell/cell-data.png",alt:"Cell Data",width:"688",height:"387"}),"\n",(0,n.jsx)(t.p,{children:"Each Cell contains a small program known as a Lock Script that determines the owner of the Cell. While typically assigning ownership to a single user, Lock Script can also handle complex operations, such as having multiple owners (multi-sig) or conditional usage within specific timeframes."}),"\n",(0,n.jsxs)(t.p,{children:["A Cell may include a ",(0,n.jsx)(t.strong,{children:"Type Script"})," to execute specific rules governing its usage. This empowers developers to customize smart contracts across diverse use-cases, such as issuing Non-Fungible Tokens, limiting the supply of fungible tokens, and implementing custom functionalities to suit unique requirements."]}),"\n",(0,n.jsxs)(t.p,{children:["The collection of Cells constitutes the ",(0,n.jsx)(t.strong,{children:"state"})," of CKB. A state verified and held by CKB is any data considered valuable and universally recognized."]}),"\n",(0,n.jsx)("img",{src:"/img/cell/cell-ckb-state.png",alt:"CKB State",width:"688",height:"387"}),"\n",(0,n.jsx)(t.h2,{id:"cell-model",children:"Cell Model"}),"\n",(0,n.jsx)(t.p,{children:"Inspired by Bitcoin's UTXO model, Cell Model defines the behavior of individual Cells within Nervos, as well as the process for updating their contained data."}),"\n",(0,n.jsxs)(t.p,{children:["Cells are immutable. No changes can be made once the Cells have been added on-chain. Updating data within a Cell requires a process called ",(0,n.jsx)(t.strong,{children:"Consumption"}),". This involves consuming the existing Cell, extracting and updating the data, followed by creating a new Cell with the updated data, which is then added on-chain."]}),"\n",(0,n.jsxs)(t.p,{children:["Each Cell can be consumed only once. A non-consumed Cell is a ",(0,n.jsx)(t.strong,{children:"Live Cell"}),". A consumed Cell is a ",(0,n.jsx)(t.strong,{children:"Dead Cell"}),". Once a Cell is dead, it can no longer be used."]}),"\n",(0,n.jsx)(t.p,{children:"Transactions reflect the state change of Cells, where a group of Live Cells are consumed and new Cells are created. The network validates transactions by executing all associated Lock Scripts and Type Scripts. This ensures adherence to developer-defined rules and prevents fraudulent activities."}),"\n",(0,n.jsx)("img",{src:"/img/cell/cell-lifecycle.png",alt:"Cell lifecycle",width:"688",height:"387"}),"\n",(0,n.jsx)(t.h2,{id:"first-class-assets",children:"First-Class Assets"}),"\n",(0,n.jsx)(t.p,{children:"In Cell Model, all digital assets (e.g., CKBytes, tokens, collectibles) are considered first-class, exclusively owned by their respective owners. While assets must comply with smart contracts rules during transactions, they are inherently owned by the user, not the smart contracts. This ownership structure ensures that only the owner has permission to use the assets, regardless of how the smart contract defines the token. If a contract exploit, attackers would be unable to access the asset, as it remains under the user's control, effectively mitigating the negative impact."}),"\n",(0,n.jsxs)(t.p,{children:["This ownership structure also defines the responsibility for asset upkeep. As assets occupy space on Nervos, the owner are subject to a small recurring upkeep fee, known as ",(0,n.jsx)(t.strong,{children:"state rent,"})," which is elaborated in the ",(0,n.jsx)(t.a,{href:"https://github.com/linnnsss/docs.nervos.org/blob/concepts-v2/website/docs/concepts/economics.md",children:"Tokenomics"})," section."]}),"\n",(0,n.jsx)(t.h2,{id:"flexible-transaction-fee-coverage",children:"Flexible Transaction Fee Coverage"}),"\n",(0,n.jsx)(t.p,{children:"When transferring tokens, typically, those who initiate the transaction or execute smart contracts must cover the transaction fees. This poses a usability challenge in adoption."}),"\n",(0,n.jsx)(t.p,{children:"Cell Model provides the flexibility by allowing any party to cover the transaction fees, eliminating the need for the sender to possess CKBytes (transaction fee in Nervos). Instead, either the receiver or a third-party can cover the fee, significantly enhancing user experience."}),"\n",(0,n.jsx)(t.h2,{id:"scalability",children:"Scalability"}),"\n",(0,n.jsx)(t.p,{children:"Cell Model\u2019s unique structure inherently grants scalability, reflected in the three perspectives below."}),"\n",(0,n.jsx)("img",{src:"/img/cell/cell-scalability.png",alt:"Cell Model's scalability",width:"688",height:"387"}),"\n",(0,n.jsx)(t.p,{children:"Cell Model separates computation and validation for smart contract execution. Computation happens off-chain, where new data is generated. This data is subsequently sent to the network to undergo on-chain validation. Full nodes execute the validation to ensures compliance with developer-set rules."}),"\n",(0,n.jsx)(t.p,{children:"In Cell Model, smart contract execution is parallel. Each transaction runs independently in its own virtual machine; multiple virtual machines run simultaneously. This gives the Cell Model dramatic scaling improvements on modern computers with increasing CPU cores."}),"\n",(0,n.jsx)(t.p,{children:"Transactions are highly flexible and effective in Cell Model. Multiple smart contract operations can be batched into a single transaction, thereby minimizing transactions overhead and processing fees."}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["For more details and the rationale behind the Cell Model, refer to ",(0,n.jsx)(t.a,{href:"https://medium.com/nervosnetwork/https-medium-com-nervosnetwork-cell-model-7323fca57571",children:"this post"}),"."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>a,x:()=>o});var n=s(6540);const i={},l=n.createContext(i);function a(e){const t=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e294a8bd.08ac44e5.js b/assets/js/e294a8bd.69c9892d.js similarity index 99% rename from assets/js/e294a8bd.08ac44e5.js rename to assets/js/e294a8bd.69c9892d.js index 88fc2de90..c5ad4071e 100644 --- a/assets/js/e294a8bd.08ac44e5.js +++ b/assets/js/e294a8bd.69c9892d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[156],{360:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>b,frontMatter:()=>i,metadata:()=>d,toc:()=>h});var s=a(4848),r=a(8453),c=a(9489),t=a(7227);const i={id:"dev-environment",title:"Dev Environment",sidebar_position:1},l="Dev Environment",d={id:"getting-started/dev-environment",title:"Dev Environment",description:"For developers, a dev environment is the most important place to start their little side projects with blockchain on weekends.",source:"@site/docs/getting-started/dev-environment.mdx",sourceDirName:"getting-started",slug:"/getting-started/dev-environment",permalink:"/docs/getting-started/dev-environment",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/getting-started/dev-environment.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:1,frontMatter:{id:"dev-environment",title:"Dev Environment",sidebar_position:1},sidebar:"tutorial",previous:{title:"Getting Started",permalink:"/docs/getting-started/"},next:{title:"Tutorial: Transfer CKB",permalink:"/docs/getting-started/transfer-ckb"}},o={},h=[{value:"Quick Setup with OffCKB",id:"quick-setup-with-offckb",level:2},{value:"Install",id:"install",level:3},{value:"Usage",id:"usage",level:3},{value:"Custom Devnet Setup",id:"custom-devnet-setup",level:2},{value:"Download CKB Binary",id:"download-ckb-binary",level:3},{value:"Dummy-Worker Setup",id:"dummy-worker-setup",level:2},{value:"1. Initialize",id:"1-initialize",level:3},{value:"2. Config Block Assembler",id:"2-config-block-assembler",level:3},{value:"2a. Create Account",id:"2a-create-account",level:4},{value:"Note: Be sure to record the lock_arg value in the response which we will use in the next step.",id:"note-be-sure-to-record-the-lock_arg-value-in-the-response-which-we-will-use-in-the-next-step",level:5},{value:"2b. Update Config",id:"2b-update-config",level:4},{value:"3. Shorten Block Interval (Optional)",id:"3-shorten-block-interval-optional",level:3},{value:"3a. Adjust Epoch",id:"3a-adjust-epoch",level:4},{value:"3b. Set Permanent Difficulty",id:"3b-set-permanent-difficulty",level:4},{value:"3c. Adjust Mining Interval",id:"3c-adjust-mining-interval",level:4},{value:"4. Start CKB Node",id:"4-start-ckb-node",level:3},{value:"5. Start CKB Miner",id:"5-start-ckb-miner",level:3},{value:"Eaglesong-Worker Setup",id:"eaglesong-worker-setup",level:2},{value:"1. Create Account",id:"1-create-account",level:3},{value:"Note: Be sure to record the lock_arg value from the response, as it will be used in the next step.",id:"note-be-sure-to-record-the-lock_arg-value-from-the-response-as-it-will-be-used-in-the-next-step",level:5},{value:"2. Initialize Miner",id:"2-initialize-miner",level:3},{value:"3. Change PoW Function",id:"3-change-pow-function",level:3},{value:"4. Start CKB Node",id:"4-start-ckb-node-1",level:3},{value:"5. Start CKB Miner",id:"5-start-ckb-miner-1",level:3},{value:"Transfer CKBytes Using ckb-cli",id:"transfer-ckbytes-using-ckb-cli",level:2},{value:"1. Access ckb-cli",id:"1-access-ckb-cli",level:3},{value:"2. Create Account",id:"2-create-account",level:3},{value:"3. Check Balance",id:"3-check-balance",level:3},{value:"4. Transfer CKBytes",id:"4-transfer-ckbytes",level:3},{value:"5. Verify Balance",id:"5-verify-balance",level:3},{value:"Add the Genesis Issued Cells",id:"add-the-genesis-issued-cells",level:2},{value:"1. Add Private Keys to File",id:"1-add-private-keys-to-file",level:3},{value:"2. Import Private Keys",id:"2-import-private-keys",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"dev-environment",children:"Dev Environment"}),"\n",(0,s.jsx)(n.p,{children:"For developers, a dev environment is the most important place to start their little side projects with blockchain on weekends."}),"\n",(0,s.jsx)(n.p,{children:"Here we have provide different ways to setup your CKB dev environment to start your journey."}),"\n",(0,s.jsx)(n.h2,{id:"quick-setup-with-offckb",children:"Quick Setup with OffCKB"}),"\n",(0,s.jsxs)(n.p,{children:["You can set up your local development environment by installing ",(0,s.jsx)(n.a,{href:"https://www.npmjs.com/package/@offckb/cli",children:"@offckb/cli"}),". It provides a one-line command to start a Devnet, pre-funded test accounts\nand useful ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#script",children:"Scripts"})," like ",(0,s.jsx)(n.a,{href:"https://github.com/cryptape/omnilock",children:"Omnilock"})," and ",(0,s.jsx)(n.a,{href:"https://github.com/sporeprotocol/spore-contract",children:"Spore-contract"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"install",children:"Install"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npm install -g @offckb/cli\n"})}),"\n",(0,s.jsx)(n.h3,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"offckb node # start the Devnet of CKB, `ctrl-c` to stop running the chain \noffckb clean # clean the Devnet data, needs to stop running the chain first \noffckb init # init a CKB dApp typescript boilerplate from multiple templates \noffckb accounts # list 20 accounts info with prefund CKB tokens \noffckb list-hashes # list built-in scripts hashes, equals `ckb list-hashes`\n"})}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"custom-devnet-setup",children:"Custom Devnet Setup"}),"\n",(0,s.jsxs)(n.p,{children:["While ",(0,s.jsx)(n.code,{children:"OffCKB"})," offers a streamlined, one-line command to quickly start a Devnet, you may find the need for a more nuanced configuration."]}),"\n",(0,s.jsxs)(n.p,{children:["For those requiring deeper customization, Nervos CKB's development mode is highly configurable, supporting both ",(0,s.jsx)(n.code,{children:"Dummy-Worker"})," for constant block intervals without Proof-of-Work (PoW) and ",(0,s.jsx)(n.code,{children:"Eaglesong-Worker"})," for real PoW block production. This flexibility allows you to tailor the local blockchain setup using CKB binary on your computer, speeding up block intervals, adjusting epoch lengths, and creating blocks to suit your testing and development needs."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["It is highly recommended to use ",(0,s.jsx)(n.code,{children:"Dummy-Worker"})," for most development scenarios. ",(0,s.jsx)(n.code,{children:"Eaglesong-Worker"})," should only be used when validating the PoW function is necessary, because the block time can behave erratically with extremely low hashrates."]})}),"\n",(0,s.jsx)(n.h3,{id:"download-ckb-binary",children:"Download CKB Binary"}),"\n",(0,s.jsxs)(n.p,{children:["Download the latest ",(0,s.jsx)(n.code,{children:"ckb"})," binary file from the CKB releases page on ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/releases",children:"GitHub"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The following commands can be used to verify the binaries are working and to check versions:"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"check-ckb-binary-version",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb --version\nckb-cli --version\n"})})}),(0,s.jsx)(t.A,{value:"show-ckb-binary-version",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb 0.115.0-rc2 (e4bb6c8 2024-03-20)\nckb-cli 1.7.0 (0c8711e 2024-02-29)\n"})})})]}),"\n",(0,s.jsx)(n.h2,{id:"dummy-worker-setup",children:"Dummy-Worker Setup"}),"\n",(0,s.jsx)(n.h3,{id:"1-initialize",children:"1. Initialize"}),"\n",(0,s.jsx)(n.p,{children:"Use the following command to initialize the development blockchain and generate the required configuration files:"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"initialize",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb init --chain dev\n"})})}),(0,s.jsx)(t.A,{value:"after-initialize",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"WARN: mining feature is disabled because of lacking the block assembler config options\nInitialized CKB directory in /PATH/ckb_v0.115.0-rc2_x86_64-unknown-linux-gnu\ncreate specs/dev.toml\ncreate ckb.toml\ncreate ckb-miner.toml\ncreate default.db-options\nGenesis Hash: 0x180621a13efd899730abfb3dd7aaa82f4b61ac9ed5283fe73b47b0f4c4196757\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"2-config-block-assembler",children:"2. Config Block Assembler"}),"\n",(0,s.jsx)(n.p,{children:"The Block Assembler configuration specifies which address should receive block rewards for mining."}),"\n",(0,s.jsx)(n.h4,{id:"2a-create-account",children:"2a. Create Account"}),"\n",(0,s.jsxs)(n.p,{children:["To receive the block rewards, you'll need to generate an address. This can be accomplished using the ",(0,s.jsx)(n.code,{children:"ckb-cli"})," tool."]}),"\n",(0,s.jsxs)(n.h5,{id:"note-be-sure-to-record-the-lock_arg-value-in-the-response-which-we-will-use-in-the-next-step",children:["Note: Be sure to record the ",(0,s.jsx)(n.code,{children:"lock_arg"})," value in the response which we will use in the next step."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"create-new-account",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb-cli account new\n"})})}),(0,s.jsx)(t.A,{value:"account-created",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"Your new account is locked with a password. Please give a password. Do not forget this password.\nPassword: \nRepeat password: \naddress:\n mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8muc28r7vu\n testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8mucy4g3xy\naddress(deprecated):\n mainnet: ckb1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hesvfqn3l\n testnet: ckt1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hes3v7var\nlock_arg: 0x17b7c107b16b27edca8646b8cf7343a3eae67df3\nlock_hash: 0x9fecea1600fecfac989b2d15dc227b885afe68f5b652a1a159b59cb69e83ddae\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"2b-update-config",children:"2b. Update Config"}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"args"})," and ",(0,s.jsx)(n.code,{children:"message"})," parameters in the ",(0,s.jsx)(n.code,{children:"ckb.toml"})," file under the ",(0,s.jsx)(n.code,{children:"block_assembler"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'[block_assembler]\ncode_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" # Do not change this.\nargs = "0x8d627decece439977a3a0a97815b63debaff2874" # Change this to your lock_arg value. \nhash_type = "type" # Do not change this.\nmessage = "A 0x-prefixed hex string" # Change this to "0x" to supply an empty message.\n'})}),"\n",(0,s.jsx)(n.h3,{id:"3-shorten-block-interval-optional",children:"3. Shorten Block Interval (Optional)"}),"\n",(0,s.jsx)(n.p,{children:"For most development, the default configuration should be sufficient, but sometimes speeding up certain operations is beneficial so results can be viewed quickly."}),"\n",(0,s.jsx)(n.h4,{id:"3a-adjust-epoch",children:"3a. Adjust Epoch"}),"\n",(0,s.jsxs)(n.p,{children:["The default epoch length is ",(0,s.jsx)(n.code,{children:"1000"})," blocks. Reducing this to ",(0,s.jsx)(n.code,{children:"10"})," or ",(0,s.jsx)(n.code,{children:"100"})," can help with testing Nervos DAO operations."]}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"genesis_epoch_length"})," parameter in the ",(0,s.jsx)(n.code,{children:"specs/dev.toml"})," file under the ",(0,s.jsx)(n.code,{children:"params"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'[params]\ngenesis_epoch_length = 1000 # The unit of meansurement is "block".\n'})}),"\n",(0,s.jsx)(n.h4,{id:"3b-set-permanent-difficulty",children:"3b. Set Permanent Difficulty"}),"\n",(0,s.jsxs)(n.p,{children:["When ",(0,s.jsx)(n.code,{children:"permanent_difficulty_in_dummy"})," is set to ",(0,s.jsx)(n.code,{children:"true"}),", all epochs will use the same length as the genesis epoch length, skipping the difficulty adjustment entirely. This param is typically used in conjunction with ",(0,s.jsx)(n.code,{children:"genesis_epoch_length"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"permanent_difficulty_in_dummy"})," parameter in the ",(0,s.jsx)(n.code,{children:"specs/dev.toml"})," file under the ",(0,s.jsx)(n.code,{children:"params"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"[params]\ngenesis_epoch_length = 10\npermanent_difficulty_in_dummy = true\n"})}),"\n",(0,s.jsx)(n.h4,{id:"3c-adjust-mining-interval",children:"3c. Adjust Mining Interval"}),"\n",(0,s.jsxs)(n.p,{children:["The default mining interval is ",(0,s.jsx)(n.code,{children:"5000"}),", which is a value in milliseconds, meaning 5 seconds. Reducing this value will result in blocks being created faster."]}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"value"})," parameter in the ",(0,s.jsx)(n.code,{children:"ckb-miner.toml"})," file under the ",(0,s.jsx)(n.code,{children:"miner.workers"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'[[miner.workers]]\nworker_type = "Dummy"\ndelay_type = "Constant"\nvalue = 5000 # The unit of measurement is "ms".\n'})}),"\n",(0,s.jsx)(n.h3,{id:"4-start-ckb-node",children:"4. Start CKB Node"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"run-node",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb run\n"})})}),(0,s.jsx)(t.A,{value:"node-running",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'2020-06-05 18:31:14.970 +08:00 main INFO sentry sentry is disabled\n2020-06-05 18:31:15.058 +08:00 main INFO ckb-db Initialize a new database\n2020-06-05 18:31:15.136 +08:00 main INFO ckb-db Init database version 20191127135521\n2020-06-05 18:31:15.162 +08:00 main INFO ckb-memory-tracker track current process: unsupported\n2020-06-05 18:31:15.164 +08:00 main INFO main ckb version: 0.32.1 (9ebc9ce 2020-05-29)\n2020-06-05 18:31:15.164 +08:00 main INFO main chain genesis hash: 0x823b2ff5785b12da8b1363cac9a5cbe566d8b715a4311441b119c39a0367488c\n2020-06-05 18:31:15.166 +08:00 main INFO ckb-network Generate random key\n2020-06-05 18:31:15.166 +08:00 main INFO ckb-network write random secret key to "/PATH/ckb_v0.32.1_x86_64-apple-darwin/data/network/secret_key"\n2020-06-05 18:31:15.177 +08:00 NetworkRuntime INFO ckb-network p2p service event: ListenStarted { address: "/ip4/0.0.0.0/tcp/8115" }\n2020-06-05 18:31:15.179 +08:00 NetworkRuntime INFO ckb-network Listen on address: /ip4/0.0.0.0/tcp/8115/p2p/QmSHk4EucevEuX76Q44hEdYpRxr3gyDmbKtnMQ4kxGaJ6m\n2020-06-05 18:31:15.185 +08:00 main INFO ckb-db Initialize a new database\n2020-06-05 18:31:15.211 +08:00 main INFO ckb-db Init database version 20191201091330\n2020-06-05 18:31:26.586 +08:00 ChainService INFO ckb-chain block: 1, hash: 0x47995f78e95202d2c85ce11bce2ee16d131a57d871f7d93cd4c90ad2a8220bd1, epoch: 0(1/1000), total_diff: 0x200, txs: 1\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"5-start-ckb-miner",children:"5. Start CKB Miner"}),"\n",(0,s.jsx)(n.p,{children:"This should be performed in a separate terminal."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"start-miner",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb miner\n"})})}),(0,s.jsx)(t.A,{value:"mining",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"2020-06-05 18:31:21.558 +08:00 main INFO sentry sentry is disabled\nDummy-Worker \u2801 [00:00:00] \nFound! #1 0x47995f78e95202d2c85ce11bce2ee16d131a57d871f7d93cd4c90ad2a8220bd1\nFound! #2 0x19978085abfa6204471d42bfb279eac0c20e3b81745b48c4dcaea85643e301f9\nFound! #3 0x625b230f84cb92bcd9cb0bf76d1397c1d948ab25c19df3c4edc246a765f94427\nFound! #4 0x4550fb3b62d9d5ba4d3926db6704b25b90438cfb67037d253ceceb2d86ffdbf7\n"})})})]}),"\n",(0,s.jsx)(n.h2,{id:"eaglesong-worker-setup",children:"Eaglesong-Worker Setup"}),"\n",(0,s.jsx)(n.h3,{id:"1-create-account",children:"1. Create Account"}),"\n",(0,s.jsxs)(n.p,{children:["An address to receive the block rewards must be created using ",(0,s.jsx)(n.code,{children:"ckb-cli"}),"."]}),"\n",(0,s.jsxs)(n.h5,{id:"note-be-sure-to-record-the-lock_arg-value-from-the-response-as-it-will-be-used-in-the-next-step",children:["Note: Be sure to record the ",(0,s.jsx)(n.code,{children:"lock_arg"})," value from the response, as it will be used in the next step."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"check-ckb-binary-version",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ ckb-cli account new\n"})})}),(0,s.jsx)(t.A,{value:"show-ckb-binary-version",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb-cli account new\nYour new account is locked with a password. Please give a password. Do not forget this password.\nPassword: \nRepeat password: \naddress:\n mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8muc28r7vu\n testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8mucy4g3xy\naddress(deprecated):\n mainnet: ckb1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hesvfqn3l\n testnet: ckt1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hes3v7var\nlock_arg: 0x17b7c107b16b27edca8646b8cf7343a3eae67df3\nlock_hash: 0x9fecea1600fecfac989b2d15dc227b885afe68f5b652a1a159b59cb69e83ddae\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"2-initialize-miner",children:"2. Initialize Miner"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"initialize-miner",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb init -c dev --ba-arg 0x41ecee7b8fc0783c75da1f4346009b2e5a774a96 // Change this to your lock_arg value. \n"})})}),(0,s.jsx)(t.A,{value:"mining-initialized",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"Initialized CKB directory in /PATH/ckb_v0.32.1_x86_64-apple-darwin\ncreate specs/dev.toml\ncreate ckb.toml\ncreate ckb-miner.toml\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"3-change-pow-function",children:"3. Change PoW Function"}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"func"})," parameter in the ",(0,s.jsx)(n.code,{children:"specs/dev.toml"})," file under the ",(0,s.jsx)(n.code,{children:"pow"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'func = "Eaglesong"\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Replace the ",(0,s.jsx)(n.code,{children:"miner.workers"})," section in the ",(0,s.jsx)(n.code,{children:"ckb-miner.toml"})," file with the following:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'[[miner.workers]]\nworker_type = "EaglesongSimple"\nthreads = 1\n'})}),"\n",(0,s.jsx)(n.h3,{id:"4-start-ckb-node-1",children:"4. Start CKB Node"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"run-node",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb run\n"})})}),(0,s.jsx)(t.A,{value:"node-running",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'2020-06-05 11:25:31.433 +08:00 main INFO sentry sentry is disabled\n2020-06-05 11:25:31.508 +08:00 main INFO ckb-db Initialize a new database\n2020-06-05 11:25:31.590 +08:00 main INFO ckb-db Init database version 20191127135521\n2020-06-05 11:25:31.604 +08:00 main INFO ckb-memory-tracker track current process: unsupported\n2020-06-05 11:25:31.604 +08:00 main INFO main ckb version: 0.32.1 (9ebc9ce 2020-05-29)\n2020-06-05 11:25:31.604 +08:00 main INFO main chain genesis hash: 0x823b2ff5785b12da8b1363cac9a5cbe566d8b715a4311441b119c39a0367488c\n2020-06-05 11:25:31.604 +08:00 main INFO ckb-network Generate random key\n2020-06-05 11:25:31.604 +08:00 main INFO ckb-network write random secret key to "/PATH/ckb_v0.32.1_x86_64-apple-darwin/data/network/secret_key"\n2020-06-05 11:25:31.608 +08:00 NetworkRuntime INFO ckb-network p2p service event: ListenStarted { address: "/ip4/0.0.0.0/tcp/8115" }\n2020-06-05 11:25:31.610 +08:00 NetworkRuntime INFO ckb-network Listen on address: /ip4/0.0.0.0/tcp/8115/p2p/QmcCGH7VeXbpV4jj7VgSEM7NANuud6TmGHV2DXPsSVrRkR\n2020-06-05 11:25:31.612 +08:00 main INFO ckb-db Initialize a new database\n2020-06-05 11:25:31.638 +08:00 main INFO ckb-db Init database version 20191201091330\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"5-start-ckb-miner-1",children:"5. Start CKB Miner"}),"\n",(0,s.jsx)(n.p,{children:"This should be performed in a separate terminal."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"start-mining",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb miner\n"})})}),(0,s.jsx)(t.A,{value:"mining",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"2020-06-05 11:25:37.867 +08:00 main INFO sentry sentry is disabled\nEaglesongSimple-Worker-0 \u2801 [00:00:00] \n2020-06-05 11:25:37.870 +08:00 main INFO ckb-memory-tracker track current proceFound! #1 0x57e6ad0f15bacc4f30e53811d488d895e6619c17222981eca5484f0115f84acd\nFound! #2 0xe5831f39f928dca599a02e490c482a881ccdc47a2376371dec4e440e363fa5c0\nFound! #3 0x605b3e6449954c2daa996c06b2412bbf60b8231763149742119fb623f9de27b2\nFound! #4 0x64064e7257ea4589e8cb177cf119c68ab1b4559de005a20dc13ef3d42949e04b\n"})})})]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.h2,{id:"transfer-ckbytes-using-ckb-cli",children:["Transfer CKBytes Using ",(0,s.jsx)(n.code,{children:"ckb-cli"})]}),"\n",(0,s.jsxs)(n.p,{children:["Included in CKB releases is the ",(0,s.jsx)(n.code,{children:"ckb-cli"})," command-line tool, which can be used to directly invoke RPC calls for actions such as managing accounts, transferring CKBytes, and checking account balances. Below, we will demonstrate a CKBytes transfer. Please refer to ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb-cli",children:"ckb-cli"})," for full instructions."]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["Using ",(0,s.jsx)(n.code,{children:"ckb-cli"})," to transfer CKBytes is recommended only for development and testing purposes. For managing real funds and assets, please use a wallet."]})}),"\n",(0,s.jsxs)(n.h3,{id:"1-access-ckb-cli",children:["1. Access ",(0,s.jsx)(n.code,{children:"ckb-cli"})]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"access-ckb-cli",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb-cli\n"})})}),(0,s.jsx)(t.A,{value:"ckb-cli-accessed",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"[ ckb-cli version ]: 1.7.0 (0c8711e 2024-02-29)\n[ url ]: http://127.0.0.1:8114/ (network: Dev, loading...)\n[ pwd ]: /home/ckb/xueyl/ckb/ckb_v0.115.0-rc2_x86_64-unknown-linux-gnu\n[ color ]: true\n[ debug ]: false\n[ no-sync ]: false\n[ output format ]: yaml\n[ completion style ]: List\n[ edit style ]: Emacs\nNo previous history.\nCKB>\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"2-create-account",children:"2. Create Account"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"create-account",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"account new\n"})})}),(0,s.jsx)(t.A,{value:"account-created",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ ckb-cli account new\nYour new account is locked with a password. Please give a password. Do not forget this password.\nPassword: \nRepeat password: \naddress:\n mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8muc28r7vu\n testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8mucy4g3xy\naddress(deprecated):\n mainnet: ckb1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hesvfqn3l\n testnet: ckt1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hes3v7var\nlock_arg: 0x17b7c107b16b27edca8646b8cf7343a3eae67df3\nlock_hash: 0x9fecea1600fecfac989b2d15dc227b885afe68f5b652a1a159b59cb69e83ddae\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"3-check-balance",children:"3. Check Balance"}),"\n",(0,s.jsx)(n.p,{children:"In the previous sections, you created a miner account that collects all mining rewards. Using the following command with the correct address will show you the current CKByte balance:"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"check-balance",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'wallet get-capacity --address "miner\'s address" \n'})})}),(0,s.jsx)(t.A,{value:"balance-result",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'CKB> wallet get-capacity --address "ckt1qyqg6cnaankwgwvh0gaq49uptd3aawhl9p6qpg5cus"\nimmature: 8027902.89083717 (CKB)\ntotal: 46253677.72927512 (CKB)\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"4-transfer-ckbytes",children:"4. Transfer CKBytes"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"transfer-ckb",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'wallet transfer --from-account "miner\'s address" --to-address "new account\'s address" --capacity 10000 --tx-fee 0.00001\n'})})}),(0,s.jsx)(t.A,{value:"ckb-transferred",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"CKB> wallet transfer --from-account ckt1qyqg6cnaankwgwvh0gaq49uptd3aawhl9p6qpg5cus --to-address ckt1qyq0g9p6nxf5cdy38fm35zech5f90jl5aueqnsxch5 --capacity 10000 --max-tx-fee 0.00001\nPassword: \n0x1b66aafaaba5ce34de494f60374ef78e8f536bb3af9cab4fa63c0f29374c3f89\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"5-verify-balance",children:"5. Verify Balance"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"verify-balance",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'wallet get-capacity --address "new account\'s address"\n'})})}),(0,s.jsx)(t.A,{value:"balance-displayed",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"CKB> wallet get-capacity --address ckt1qyq0g9p6nxf5cdy38fm35zech5f90jl5aueqnsxch5\ntotal: 10000.0 (CKB)\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"The transfer is successful!"}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"add-the-genesis-issued-cells",children:"Add the Genesis Issued Cells"}),"\n",(0,s.jsxs)(n.p,{children:["When the development blockchain configuration is generated with ",(0,s.jsx)(n.code,{children:"ckb init --chain dev"}),", a few Cells are created with large capacities. These are specified in ",(0,s.jsx)(n.code,{children:"specs/dev.toml"})," and exist only on your local development blockchain, making them useful for testing purposes."]}),"\n",(0,s.jsxs)("table",{children:[(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colspan:"2",children:"Genesis Issued Cell #1"})}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Private Key"}),(0,s.jsx)("td",{children:"0xd00c06bfd800d27397002dca6fb0993d5ba6399b4238b2f29ee9deb97593d2bc"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Lock Arg"}),(0,s.jsx)("td",{children:"0xc8328aabcd9b9e8e64fbc566c4385c3bdeb219d7"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Testnet Address"}),(0,s.jsx)("td",{children:"ckt1qyqvsv5240xeh85wvnau2eky8pwrhh4jr8ts8vyj37"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Capcity"}),(0,s.jsx)("td",{children:"20,000,000,000 CKBytes"})]})]}),"\n",(0,s.jsxs)("table",{children:[(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colspan:"2",children:"Genesis Issued Cell #2"})}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Private Key"}),(0,s.jsx)("td",{children:"0x63d86723e08f0f813a36ce6aa123bb2289d90680ae1e99d4de8cdb334553f24d"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Lock Arg"}),(0,s.jsx)("td",{children:"0x470dcdc5e44064909650113a274b3b36aecb6dc7"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Testnet Address"}),(0,s.jsx)("td",{children:"ckt1qyqywrwdchjyqeysjegpzw38fvandtktdhrs0zaxl4"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Capcity"}),(0,s.jsx)("td",{children:"5,198,735,037 CKBytes"})]})]}),"\n",(0,s.jsx)(n.h3,{id:"1-add-private-keys-to-file",children:"1. Add Private Keys to File"}),"\n",(0,s.jsx)(n.p,{children:"Private keys must be added to a text file before they can be used."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"echo 0xd00c06bfd800d27397002dca6fb0993d5ba6399b4238b2f29ee9deb97593d2bc > pk1\necho 0x63d86723e08f0f813a36ce6aa123bb2289d90680ae1e99d4de8cdb334553f24d > pk2\n"})}),"\n",(0,s.jsx)(n.h3,{id:"2-import-private-keys",children:"2. Import Private Keys"}),"\n",(0,s.jsxs)(n.p,{children:["Import the private key files using ",(0,s.jsx)(n.code,{children:"ckb-cli"}),":"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"import-privkey",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"CKB> account import --privkey-path pk1\nCKB> account import --privkey-path pk2\n"})})}),(0,s.jsx)(t.A,{value:"privkey-result",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ ckb-cli account import --privkey-path pk1\nPassword: \naddress:\n mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvgswj39m3rs0qp2a9r9rmqamxtkntcysq007jd8\n testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvgswj39m3rs0qp2a9r9rmqamxtkntcysqpa4a8l\naddress(deprecated):\n mainnet: ckb1qyqg3qa9zthz8q7qz462x28kpmkvhdxhsfqqjavu23\n testnet: ckt1qyqg3qa9zthz8q7qz462x28kpmkvhdxhsfqq0cjrxd\nlock_arg: 0x8883a512ee2383c01574a328f60eeccbb4d78240\n"})})})]})]})}function b(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},7227:(e,n,a)=>{a.d(n,{A:()=>t});a(6540);var s=a(8215);const r={tabItem:"tabItem_Ymn6"};var c=a(4848);function t(e){var n=e.children,a=e.hidden,t=e.className;return(0,c.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,t),hidden:a,children:n})}},9489:(e,n,a)=>{a.d(n,{A:()=>y});var s=a(6540),r=a(8215),c=a(4245),t=a(6347),i=a(6494),l=a(2814),d=a(5167),o=a(1269);function h(e){var n,a;return null!=(n=null==(a=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?n:[]}function u(e){var n=e.values,a=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return h(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(a);return function(e){var n=(0,d.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,a])}function b(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function p(e){var n=e.queryString,a=void 0!==n&&n,r=e.groupId,c=(0,t.W6)(),i=function(e){var n=e.queryString,a=void 0!==n&&n,s=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:a,groupId:r});return[(0,l.aZ)(i),(0,s.useCallback)((function(e){if(i){var n=new URLSearchParams(c.location.search);n.set(i,e),c.replace(Object.assign({},c.location,{search:n.toString()}))}}),[i,c])]}function m(e){var n,a,r,c,t=e.defaultValue,l=e.queryString,d=void 0!==l&&l,h=e.groupId,m=u(e),x=(0,s.useState)((function(){return function(e){var n,a=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!b({value:a,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:m})})),f=x[0],v=x[1],j=p({queryString:d,groupId:h}),k=j[0],g=j[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),a=(0,o.Dv)(n),r=a[0],c=a[1],[r,(0,s.useCallback)((function(e){n&&c.set(e)}),[n,c])]),w=y[0],q=y[1],C=function(){var e=null!=k?k:w;return b({value:e,tabValues:m})?e:null}();return(0,i.A)((function(){C&&v(C)}),[C]),{selectedValue:f,selectValue:(0,s.useCallback)((function(e){if(!b({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);v(e),g(e),q(e)}),[g,q,m]),tabValues:m}}var x=a(1062);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=a(4848);function j(e){var n=e.className,a=e.block,s=e.selectedValue,t=e.selectValue,i=e.tabValues,l=[],d=(0,c.a_)().blockElementScrollPositionUntilNextRender,o=function(e){var n=e.currentTarget,a=l.indexOf(n),r=i[a].value;r!==s&&(d(n),t(r))},h=function(e){var n,a=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":var s,r=l.indexOf(e.currentTarget)+1;a=null!=(s=l[r])?s:l[0];break;case"ArrowLeft":var c,t=l.indexOf(e.currentTarget)-1;a=null!=(c=l[t])?c:l[l.length-1]}null==(n=a)||n.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":a},n),children:i.map((function(e){var n=e.value,a=e.label,c=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return l.push(e)},onKeyDown:h,onClick:o},c,{className:(0,r.A)("tabs__item",f.tabItem,null==c?void 0:c.className,{"tabs__item--active":s===n}),children:null!=a?a:n}),n)}))})}function k(e){var n=e.lazy,a=e.children,r=e.selectedValue,c=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){var t=c.find((function(e){return e.props.value===r}));return t?(0,s.cloneElement)(t,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:c.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function g(e){var n=m(e);return(0,v.jsxs)("div",{className:(0,r.A)("tabs-container",f.tabList),children:[(0,v.jsx)(j,Object.assign({},e,n)),(0,v.jsx)(k,Object.assign({},e,n))]})}function y(e){var n=(0,x.A)();return(0,v.jsx)(g,Object.assign({},e,{children:h(e.children)}),String(n))}},8453:(e,n,a)=>{a.d(n,{R:()=>t,x:()=>i});var s=a(6540);const r={},c=s.createContext(r);function t(e){const n=s.useContext(c);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(r):e.components||r:t(e.components),s.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[156],{360:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>b,frontMatter:()=>i,metadata:()=>d,toc:()=>h});var s=a(4848),r=a(8453),c=a(9489),t=a(7227);const i={id:"dev-environment",title:"Dev Environment",sidebar_position:1},l="Dev Environment",d={id:"getting-started/dev-environment",title:"Dev Environment",description:"For developers, a dev environment is the most important place to start their little side projects with blockchain on weekends.",source:"@site/docs/getting-started/dev-environment.mdx",sourceDirName:"getting-started",slug:"/getting-started/dev-environment",permalink:"/docs/getting-started/dev-environment",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/getting-started/dev-environment.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:1,frontMatter:{id:"dev-environment",title:"Dev Environment",sidebar_position:1},sidebar:"tutorial",previous:{title:"Getting Started",permalink:"/docs/getting-started/"},next:{title:"Tutorial: Transfer CKB",permalink:"/docs/getting-started/transfer-ckb"}},o={},h=[{value:"Quick Setup with OffCKB",id:"quick-setup-with-offckb",level:2},{value:"Install",id:"install",level:3},{value:"Usage",id:"usage",level:3},{value:"Custom Devnet Setup",id:"custom-devnet-setup",level:2},{value:"Download CKB Binary",id:"download-ckb-binary",level:3},{value:"Dummy-Worker Setup",id:"dummy-worker-setup",level:2},{value:"1. Initialize",id:"1-initialize",level:3},{value:"2. Config Block Assembler",id:"2-config-block-assembler",level:3},{value:"2a. Create Account",id:"2a-create-account",level:4},{value:"Note: Be sure to record the lock_arg value in the response which we will use in the next step.",id:"note-be-sure-to-record-the-lock_arg-value-in-the-response-which-we-will-use-in-the-next-step",level:5},{value:"2b. Update Config",id:"2b-update-config",level:4},{value:"3. Shorten Block Interval (Optional)",id:"3-shorten-block-interval-optional",level:3},{value:"3a. Adjust Epoch",id:"3a-adjust-epoch",level:4},{value:"3b. Set Permanent Difficulty",id:"3b-set-permanent-difficulty",level:4},{value:"3c. Adjust Mining Interval",id:"3c-adjust-mining-interval",level:4},{value:"4. Start CKB Node",id:"4-start-ckb-node",level:3},{value:"5. Start CKB Miner",id:"5-start-ckb-miner",level:3},{value:"Eaglesong-Worker Setup",id:"eaglesong-worker-setup",level:2},{value:"1. Create Account",id:"1-create-account",level:3},{value:"Note: Be sure to record the lock_arg value from the response, as it will be used in the next step.",id:"note-be-sure-to-record-the-lock_arg-value-from-the-response-as-it-will-be-used-in-the-next-step",level:5},{value:"2. Initialize Miner",id:"2-initialize-miner",level:3},{value:"3. Change PoW Function",id:"3-change-pow-function",level:3},{value:"4. Start CKB Node",id:"4-start-ckb-node-1",level:3},{value:"5. Start CKB Miner",id:"5-start-ckb-miner-1",level:3},{value:"Transfer CKBytes Using ckb-cli",id:"transfer-ckbytes-using-ckb-cli",level:2},{value:"1. Access ckb-cli",id:"1-access-ckb-cli",level:3},{value:"2. Create Account",id:"2-create-account",level:3},{value:"3. Check Balance",id:"3-check-balance",level:3},{value:"4. Transfer CKBytes",id:"4-transfer-ckbytes",level:3},{value:"5. Verify Balance",id:"5-verify-balance",level:3},{value:"Add the Genesis Issued Cells",id:"add-the-genesis-issued-cells",level:2},{value:"1. Add Private Keys to File",id:"1-add-private-keys-to-file",level:3},{value:"2. Import Private Keys",id:"2-import-private-keys",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"dev-environment",children:"Dev Environment"}),"\n",(0,s.jsx)(n.p,{children:"For developers, a dev environment is the most important place to start their little side projects with blockchain on weekends."}),"\n",(0,s.jsx)(n.p,{children:"Here we have provide different ways to setup your CKB dev environment to start your journey."}),"\n",(0,s.jsx)(n.h2,{id:"quick-setup-with-offckb",children:"Quick Setup with OffCKB"}),"\n",(0,s.jsxs)(n.p,{children:["You can set up your local development environment by installing ",(0,s.jsx)(n.a,{href:"https://www.npmjs.com/package/@offckb/cli",children:"@offckb/cli"}),". It provides a one-line command to start a Devnet, pre-funded test accounts\nand useful ",(0,s.jsx)(n.a,{href:"/docs/concepts/glossary#script",children:"Scripts"})," like ",(0,s.jsx)(n.a,{href:"https://github.com/cryptape/omnilock",children:"Omnilock"})," and ",(0,s.jsx)(n.a,{href:"https://github.com/sporeprotocol/spore-contract",children:"Spore-contract"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"install",children:"Install"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npm install -g @offckb/cli\n"})}),"\n",(0,s.jsx)(n.h3,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"offckb node # start the Devnet of CKB, `ctrl-c` to stop running the chain \noffckb clean # clean the Devnet data, needs to stop running the chain first \noffckb init # init a CKB dApp typescript boilerplate from multiple templates \noffckb accounts # list 20 accounts info with prefund CKB tokens \noffckb list-hashes # list built-in scripts hashes, equals `ckb list-hashes`\n"})}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"custom-devnet-setup",children:"Custom Devnet Setup"}),"\n",(0,s.jsxs)(n.p,{children:["While ",(0,s.jsx)(n.code,{children:"OffCKB"})," offers a streamlined, one-line command to quickly start a Devnet, you may find the need for a more nuanced configuration."]}),"\n",(0,s.jsxs)(n.p,{children:["For those requiring deeper customization, Nervos CKB's development mode is highly configurable, supporting both ",(0,s.jsx)(n.code,{children:"Dummy-Worker"})," for constant block intervals without Proof-of-Work (PoW) and ",(0,s.jsx)(n.code,{children:"Eaglesong-Worker"})," for real PoW block production. This flexibility allows you to tailor the local blockchain setup using CKB binary on your computer, speeding up block intervals, adjusting epoch lengths, and creating blocks to suit your testing and development needs."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["It is highly recommended to use ",(0,s.jsx)(n.code,{children:"Dummy-Worker"})," for most development scenarios. ",(0,s.jsx)(n.code,{children:"Eaglesong-Worker"})," should only be used when validating the PoW function is necessary, because the block time can behave erratically with extremely low hashrates."]})}),"\n",(0,s.jsx)(n.h3,{id:"download-ckb-binary",children:"Download CKB Binary"}),"\n",(0,s.jsxs)(n.p,{children:["Download the latest ",(0,s.jsx)(n.code,{children:"ckb"})," binary file from the CKB releases page on ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb/releases",children:"GitHub"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The following commands can be used to verify the binaries are working and to check versions:"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"check-ckb-binary-version",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb --version\nckb-cli --version\n"})})}),(0,s.jsx)(t.A,{value:"show-ckb-binary-version",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb 0.115.0-rc2 (e4bb6c8 2024-03-20)\nckb-cli 1.7.0 (0c8711e 2024-02-29)\n"})})})]}),"\n",(0,s.jsx)(n.h2,{id:"dummy-worker-setup",children:"Dummy-Worker Setup"}),"\n",(0,s.jsx)(n.h3,{id:"1-initialize",children:"1. Initialize"}),"\n",(0,s.jsx)(n.p,{children:"Use the following command to initialize the development blockchain and generate the required configuration files:"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"initialize",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb init --chain dev\n"})})}),(0,s.jsx)(t.A,{value:"after-initialize",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"WARN: mining feature is disabled because of lacking the block assembler config options\nInitialized CKB directory in /PATH/ckb_v0.115.0-rc2_x86_64-unknown-linux-gnu\ncreate specs/dev.toml\ncreate ckb.toml\ncreate ckb-miner.toml\ncreate default.db-options\nGenesis Hash: 0x180621a13efd899730abfb3dd7aaa82f4b61ac9ed5283fe73b47b0f4c4196757\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"2-config-block-assembler",children:"2. Config Block Assembler"}),"\n",(0,s.jsx)(n.p,{children:"The Block Assembler configuration specifies which address should receive block rewards for mining."}),"\n",(0,s.jsx)(n.h4,{id:"2a-create-account",children:"2a. Create Account"}),"\n",(0,s.jsxs)(n.p,{children:["To receive the block rewards, you'll need to generate an address. This can be accomplished using the ",(0,s.jsx)(n.code,{children:"ckb-cli"})," tool."]}),"\n",(0,s.jsxs)(n.h5,{id:"note-be-sure-to-record-the-lock_arg-value-in-the-response-which-we-will-use-in-the-next-step",children:["Note: Be sure to record the ",(0,s.jsx)(n.code,{children:"lock_arg"})," value in the response which we will use in the next step."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"create-new-account",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb-cli account new\n"})})}),(0,s.jsx)(t.A,{value:"account-created",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"Your new account is locked with a password. Please give a password. Do not forget this password.\nPassword: \nRepeat password: \naddress:\n mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8muc28r7vu\n testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8mucy4g3xy\naddress(deprecated):\n mainnet: ckb1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hesvfqn3l\n testnet: ckt1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hes3v7var\nlock_arg: 0x17b7c107b16b27edca8646b8cf7343a3eae67df3\nlock_hash: 0x9fecea1600fecfac989b2d15dc227b885afe68f5b652a1a159b59cb69e83ddae\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"2b-update-config",children:"2b. Update Config"}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"args"})," and ",(0,s.jsx)(n.code,{children:"message"})," parameters in the ",(0,s.jsx)(n.code,{children:"ckb.toml"})," file under the ",(0,s.jsx)(n.code,{children:"block_assembler"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'[block_assembler]\ncode_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" # Do not change this.\nargs = "0x8d627decece439977a3a0a97815b63debaff2874" # Change this to your lock_arg value. \nhash_type = "type" # Do not change this.\nmessage = "A 0x-prefixed hex string" # Change this to "0x" to supply an empty message.\n'})}),"\n",(0,s.jsx)(n.h3,{id:"3-shorten-block-interval-optional",children:"3. Shorten Block Interval (Optional)"}),"\n",(0,s.jsx)(n.p,{children:"For most development, the default configuration should be sufficient, but sometimes speeding up certain operations is beneficial so results can be viewed quickly."}),"\n",(0,s.jsx)(n.h4,{id:"3a-adjust-epoch",children:"3a. Adjust Epoch"}),"\n",(0,s.jsxs)(n.p,{children:["The default epoch length is ",(0,s.jsx)(n.code,{children:"1000"})," blocks. Reducing this to ",(0,s.jsx)(n.code,{children:"10"})," or ",(0,s.jsx)(n.code,{children:"100"})," can help with testing Nervos DAO operations."]}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"genesis_epoch_length"})," parameter in the ",(0,s.jsx)(n.code,{children:"specs/dev.toml"})," file under the ",(0,s.jsx)(n.code,{children:"params"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'[params]\ngenesis_epoch_length = 1000 # The unit of meansurement is "block".\n'})}),"\n",(0,s.jsx)(n.h4,{id:"3b-set-permanent-difficulty",children:"3b. Set Permanent Difficulty"}),"\n",(0,s.jsxs)(n.p,{children:["When ",(0,s.jsx)(n.code,{children:"permanent_difficulty_in_dummy"})," is set to ",(0,s.jsx)(n.code,{children:"true"}),", all epochs will use the same length as the genesis epoch length, skipping the difficulty adjustment entirely. This param is typically used in conjunction with ",(0,s.jsx)(n.code,{children:"genesis_epoch_length"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"permanent_difficulty_in_dummy"})," parameter in the ",(0,s.jsx)(n.code,{children:"specs/dev.toml"})," file under the ",(0,s.jsx)(n.code,{children:"params"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"[params]\ngenesis_epoch_length = 10\npermanent_difficulty_in_dummy = true\n"})}),"\n",(0,s.jsx)(n.h4,{id:"3c-adjust-mining-interval",children:"3c. Adjust Mining Interval"}),"\n",(0,s.jsxs)(n.p,{children:["The default mining interval is ",(0,s.jsx)(n.code,{children:"5000"}),", which is a value in milliseconds, meaning 5 seconds. Reducing this value will result in blocks being created faster."]}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"value"})," parameter in the ",(0,s.jsx)(n.code,{children:"ckb-miner.toml"})," file under the ",(0,s.jsx)(n.code,{children:"miner.workers"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'[[miner.workers]]\nworker_type = "Dummy"\ndelay_type = "Constant"\nvalue = 5000 # The unit of measurement is "ms".\n'})}),"\n",(0,s.jsx)(n.h3,{id:"4-start-ckb-node",children:"4. Start CKB Node"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"run-node",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb run\n"})})}),(0,s.jsx)(t.A,{value:"node-running",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'2020-06-05 18:31:14.970 +08:00 main INFO sentry sentry is disabled\n2020-06-05 18:31:15.058 +08:00 main INFO ckb-db Initialize a new database\n2020-06-05 18:31:15.136 +08:00 main INFO ckb-db Init database version 20191127135521\n2020-06-05 18:31:15.162 +08:00 main INFO ckb-memory-tracker track current process: unsupported\n2020-06-05 18:31:15.164 +08:00 main INFO main ckb version: 0.32.1 (9ebc9ce 2020-05-29)\n2020-06-05 18:31:15.164 +08:00 main INFO main chain genesis hash: 0x823b2ff5785b12da8b1363cac9a5cbe566d8b715a4311441b119c39a0367488c\n2020-06-05 18:31:15.166 +08:00 main INFO ckb-network Generate random key\n2020-06-05 18:31:15.166 +08:00 main INFO ckb-network write random secret key to "/PATH/ckb_v0.32.1_x86_64-apple-darwin/data/network/secret_key"\n2020-06-05 18:31:15.177 +08:00 NetworkRuntime INFO ckb-network p2p service event: ListenStarted { address: "/ip4/0.0.0.0/tcp/8115" }\n2020-06-05 18:31:15.179 +08:00 NetworkRuntime INFO ckb-network Listen on address: /ip4/0.0.0.0/tcp/8115/p2p/QmSHk4EucevEuX76Q44hEdYpRxr3gyDmbKtnMQ4kxGaJ6m\n2020-06-05 18:31:15.185 +08:00 main INFO ckb-db Initialize a new database\n2020-06-05 18:31:15.211 +08:00 main INFO ckb-db Init database version 20191201091330\n2020-06-05 18:31:26.586 +08:00 ChainService INFO ckb-chain block: 1, hash: 0x47995f78e95202d2c85ce11bce2ee16d131a57d871f7d93cd4c90ad2a8220bd1, epoch: 0(1/1000), total_diff: 0x200, txs: 1\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"5-start-ckb-miner",children:"5. Start CKB Miner"}),"\n",(0,s.jsx)(n.p,{children:"This should be performed in a separate terminal."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"start-miner",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb miner\n"})})}),(0,s.jsx)(t.A,{value:"mining",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"2020-06-05 18:31:21.558 +08:00 main INFO sentry sentry is disabled\nDummy-Worker \u2801 [00:00:00] \nFound! #1 0x47995f78e95202d2c85ce11bce2ee16d131a57d871f7d93cd4c90ad2a8220bd1\nFound! #2 0x19978085abfa6204471d42bfb279eac0c20e3b81745b48c4dcaea85643e301f9\nFound! #3 0x625b230f84cb92bcd9cb0bf76d1397c1d948ab25c19df3c4edc246a765f94427\nFound! #4 0x4550fb3b62d9d5ba4d3926db6704b25b90438cfb67037d253ceceb2d86ffdbf7\n"})})})]}),"\n",(0,s.jsx)(n.h2,{id:"eaglesong-worker-setup",children:"Eaglesong-Worker Setup"}),"\n",(0,s.jsx)(n.h3,{id:"1-create-account",children:"1. Create Account"}),"\n",(0,s.jsxs)(n.p,{children:["An address to receive the block rewards must be created using ",(0,s.jsx)(n.code,{children:"ckb-cli"}),"."]}),"\n",(0,s.jsxs)(n.h5,{id:"note-be-sure-to-record-the-lock_arg-value-from-the-response-as-it-will-be-used-in-the-next-step",children:["Note: Be sure to record the ",(0,s.jsx)(n.code,{children:"lock_arg"})," value from the response, as it will be used in the next step."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"check-ckb-binary-version",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ ckb-cli account new\n"})})}),(0,s.jsx)(t.A,{value:"show-ckb-binary-version",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb-cli account new\nYour new account is locked with a password. Please give a password. Do not forget this password.\nPassword: \nRepeat password: \naddress:\n mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8muc28r7vu\n testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8mucy4g3xy\naddress(deprecated):\n mainnet: ckb1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hesvfqn3l\n testnet: ckt1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hes3v7var\nlock_arg: 0x17b7c107b16b27edca8646b8cf7343a3eae67df3\nlock_hash: 0x9fecea1600fecfac989b2d15dc227b885afe68f5b652a1a159b59cb69e83ddae\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"2-initialize-miner",children:"2. Initialize Miner"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"initialize-miner",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb init -c dev --ba-arg 0x41ecee7b8fc0783c75da1f4346009b2e5a774a96 // Change this to your lock_arg value. \n"})})}),(0,s.jsx)(t.A,{value:"mining-initialized",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"Initialized CKB directory in /PATH/ckb_v0.32.1_x86_64-apple-darwin\ncreate specs/dev.toml\ncreate ckb.toml\ncreate ckb-miner.toml\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"3-change-pow-function",children:"3. Change PoW Function"}),"\n",(0,s.jsxs)(n.p,{children:["Modify the ",(0,s.jsx)(n.code,{children:"func"})," parameter in the ",(0,s.jsx)(n.code,{children:"specs/dev.toml"})," file under the ",(0,s.jsx)(n.code,{children:"pow"})," section:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'func = "Eaglesong"\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Replace the ",(0,s.jsx)(n.code,{children:"miner.workers"})," section in the ",(0,s.jsx)(n.code,{children:"ckb-miner.toml"})," file with the following:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'[[miner.workers]]\nworker_type = "EaglesongSimple"\nthreads = 1\n'})}),"\n",(0,s.jsx)(n.h3,{id:"4-start-ckb-node-1",children:"4. Start CKB Node"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"run-node",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb run\n"})})}),(0,s.jsx)(t.A,{value:"node-running",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'2020-06-05 11:25:31.433 +08:00 main INFO sentry sentry is disabled\n2020-06-05 11:25:31.508 +08:00 main INFO ckb-db Initialize a new database\n2020-06-05 11:25:31.590 +08:00 main INFO ckb-db Init database version 20191127135521\n2020-06-05 11:25:31.604 +08:00 main INFO ckb-memory-tracker track current process: unsupported\n2020-06-05 11:25:31.604 +08:00 main INFO main ckb version: 0.32.1 (9ebc9ce 2020-05-29)\n2020-06-05 11:25:31.604 +08:00 main INFO main chain genesis hash: 0x823b2ff5785b12da8b1363cac9a5cbe566d8b715a4311441b119c39a0367488c\n2020-06-05 11:25:31.604 +08:00 main INFO ckb-network Generate random key\n2020-06-05 11:25:31.604 +08:00 main INFO ckb-network write random secret key to "/PATH/ckb_v0.32.1_x86_64-apple-darwin/data/network/secret_key"\n2020-06-05 11:25:31.608 +08:00 NetworkRuntime INFO ckb-network p2p service event: ListenStarted { address: "/ip4/0.0.0.0/tcp/8115" }\n2020-06-05 11:25:31.610 +08:00 NetworkRuntime INFO ckb-network Listen on address: /ip4/0.0.0.0/tcp/8115/p2p/QmcCGH7VeXbpV4jj7VgSEM7NANuud6TmGHV2DXPsSVrRkR\n2020-06-05 11:25:31.612 +08:00 main INFO ckb-db Initialize a new database\n2020-06-05 11:25:31.638 +08:00 main INFO ckb-db Init database version 20191201091330\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"5-start-ckb-miner-1",children:"5. Start CKB Miner"}),"\n",(0,s.jsx)(n.p,{children:"This should be performed in a separate terminal."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"start-mining",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb miner\n"})})}),(0,s.jsx)(t.A,{value:"mining",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"2020-06-05 11:25:37.867 +08:00 main INFO sentry sentry is disabled\nEaglesongSimple-Worker-0 \u2801 [00:00:00] \n2020-06-05 11:25:37.870 +08:00 main INFO ckb-memory-tracker track current proceFound! #1 0x57e6ad0f15bacc4f30e53811d488d895e6619c17222981eca5484f0115f84acd\nFound! #2 0xe5831f39f928dca599a02e490c482a881ccdc47a2376371dec4e440e363fa5c0\nFound! #3 0x605b3e6449954c2daa996c06b2412bbf60b8231763149742119fb623f9de27b2\nFound! #4 0x64064e7257ea4589e8cb177cf119c68ab1b4559de005a20dc13ef3d42949e04b\n"})})})]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.h2,{id:"transfer-ckbytes-using-ckb-cli",children:["Transfer CKBytes Using ",(0,s.jsx)(n.code,{children:"ckb-cli"})]}),"\n",(0,s.jsxs)(n.p,{children:["Included in CKB releases is the ",(0,s.jsx)(n.code,{children:"ckb-cli"})," command-line tool, which can be used to directly invoke RPC calls for actions such as managing accounts, transferring CKBytes, and checking account balances. Below, we will demonstrate a CKBytes transfer. Please refer to ",(0,s.jsx)(n.a,{href:"https://github.com/nervosnetwork/ckb-cli",children:"ckb-cli"})," for full instructions."]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["Using ",(0,s.jsx)(n.code,{children:"ckb-cli"})," to transfer CKBytes is recommended only for development and testing purposes. For managing real funds and assets, please use a wallet."]})}),"\n",(0,s.jsxs)(n.h3,{id:"1-access-ckb-cli",children:["1. Access ",(0,s.jsx)(n.code,{children:"ckb-cli"})]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"access-ckb-cli",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"ckb-cli\n"})})}),(0,s.jsx)(t.A,{value:"ckb-cli-accessed",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"[ ckb-cli version ]: 1.7.0 (0c8711e 2024-02-29)\n[ url ]: http://127.0.0.1:8114/ (network: Dev, loading...)\n[ pwd ]: /home/ckb/xueyl/ckb/ckb_v0.115.0-rc2_x86_64-unknown-linux-gnu\n[ color ]: true\n[ debug ]: false\n[ no-sync ]: false\n[ output format ]: yaml\n[ completion style ]: List\n[ edit style ]: Emacs\nNo previous history.\nCKB>\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"2-create-account",children:"2. Create Account"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"create-account",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"account new\n"})})}),(0,s.jsx)(t.A,{value:"account-created",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ ckb-cli account new\nYour new account is locked with a password. Please give a password. Do not forget this password.\nPassword: \nRepeat password: \naddress:\n mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8muc28r7vu\n testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqghklqs0vttylku4pjxhr8hxsaratn8mucy4g3xy\naddress(deprecated):\n mainnet: ckb1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hesvfqn3l\n testnet: ckt1qyqp0d7pq7ckkflde2rydwx0wdp686hx0hes3v7var\nlock_arg: 0x17b7c107b16b27edca8646b8cf7343a3eae67df3\nlock_hash: 0x9fecea1600fecfac989b2d15dc227b885afe68f5b652a1a159b59cb69e83ddae\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"3-check-balance",children:"3. Check Balance"}),"\n",(0,s.jsx)(n.p,{children:"In the previous sections, you created a miner account that collects all mining rewards. Using the following command with the correct address will show you the current CKByte balance:"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"check-balance",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'wallet get-capacity --address "miner\'s address" \n'})})}),(0,s.jsx)(t.A,{value:"balance-result",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'CKB> wallet get-capacity --address "ckt1qyqg6cnaankwgwvh0gaq49uptd3aawhl9p6qpg5cus"\nimmature: 8027902.89083717 (CKB)\ntotal: 46253677.72927512 (CKB)\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"4-transfer-ckbytes",children:"4. Transfer CKBytes"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"transfer-ckb",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'wallet transfer --from-account "miner\'s address" --to-address "new account\'s address" --capacity 10000 --tx-fee 0.00001\n'})})}),(0,s.jsx)(t.A,{value:"ckb-transferred",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"CKB> wallet transfer --from-account ckt1qyqg6cnaankwgwvh0gaq49uptd3aawhl9p6qpg5cus --to-address ckt1qyq0g9p6nxf5cdy38fm35zech5f90jl5aueqnsxch5 --capacity 10000 --max-tx-fee 0.00001\nPassword: \n0x1b66aafaaba5ce34de494f60374ef78e8f536bb3af9cab4fa63c0f29374c3f89\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"5-verify-balance",children:"5. Verify Balance"}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"verify-balance",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'wallet get-capacity --address "new account\'s address"\n'})})}),(0,s.jsx)(t.A,{value:"balance-displayed",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"CKB> wallet get-capacity --address ckt1qyq0g9p6nxf5cdy38fm35zech5f90jl5aueqnsxch5\ntotal: 10000.0 (CKB)\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"The transfer is successful!"}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"add-the-genesis-issued-cells",children:"Add the Genesis Issued Cells"}),"\n",(0,s.jsxs)(n.p,{children:["When the development blockchain configuration is generated with ",(0,s.jsx)(n.code,{children:"ckb init --chain dev"}),", a few Cells are created with large capacities. These are specified in ",(0,s.jsx)(n.code,{children:"specs/dev.toml"})," and exist only on your local development blockchain, making them useful for testing purposes."]}),"\n",(0,s.jsxs)("table",{children:[(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colspan:"2",children:"Genesis Issued Cell #1"})}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Private Key"}),(0,s.jsx)("td",{children:"0xd00c06bfd800d27397002dca6fb0993d5ba6399b4238b2f29ee9deb97593d2bc"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Lock Arg"}),(0,s.jsx)("td",{children:"0xc8328aabcd9b9e8e64fbc566c4385c3bdeb219d7"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Testnet Address"}),(0,s.jsx)("td",{children:"ckt1qyqvsv5240xeh85wvnau2eky8pwrhh4jr8ts8vyj37"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Capcity"}),(0,s.jsx)("td",{children:"20,000,000,000 CKBytes"})]})]}),"\n",(0,s.jsxs)("table",{children:[(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colspan:"2",children:"Genesis Issued Cell #2"})}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Private Key"}),(0,s.jsx)("td",{children:"0x63d86723e08f0f813a36ce6aa123bb2289d90680ae1e99d4de8cdb334553f24d"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Lock Arg"}),(0,s.jsx)("td",{children:"0x470dcdc5e44064909650113a274b3b36aecb6dc7"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Testnet Address"}),(0,s.jsx)("td",{children:"ckt1qyqywrwdchjyqeysjegpzw38fvandtktdhrs0zaxl4"})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Capcity"}),(0,s.jsx)("td",{children:"5,198,735,037 CKBytes"})]})]}),"\n",(0,s.jsx)(n.h3,{id:"1-add-private-keys-to-file",children:"1. Add Private Keys to File"}),"\n",(0,s.jsx)(n.p,{children:"Private keys must be added to a text file before they can be used."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"echo 0xd00c06bfd800d27397002dca6fb0993d5ba6399b4238b2f29ee9deb97593d2bc > pk1\necho 0x63d86723e08f0f813a36ce6aa123bb2289d90680ae1e99d4de8cdb334553f24d > pk2\n"})}),"\n",(0,s.jsx)(n.h3,{id:"2-import-private-keys",children:"2. Import Private Keys"}),"\n",(0,s.jsxs)(n.p,{children:["Import the private key files using ",(0,s.jsx)(n.code,{children:"ckb-cli"}),":"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(t.A,{value:"import-privkey",label:"Command",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"CKB> account import --privkey-path pk1\nCKB> account import --privkey-path pk2\n"})})}),(0,s.jsx)(t.A,{value:"privkey-result",label:"Response",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ ckb-cli account import --privkey-path pk1\nPassword: \naddress:\n mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvgswj39m3rs0qp2a9r9rmqamxtkntcysq007jd8\n testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqvgswj39m3rs0qp2a9r9rmqamxtkntcysqpa4a8l\naddress(deprecated):\n mainnet: ckb1qyqg3qa9zthz8q7qz462x28kpmkvhdxhsfqqjavu23\n testnet: ckt1qyqg3qa9zthz8q7qz462x28kpmkvhdxhsfqq0cjrxd\nlock_arg: 0x8883a512ee2383c01574a328f60eeccbb4d78240\n"})})})]})]})}function b(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},7227:(e,n,a)=>{a.d(n,{A:()=>t});a(6540);var s=a(8215);const r={tabItem:"tabItem_Ymn6"};var c=a(4848);function t(e){var n=e.children,a=e.hidden,t=e.className;return(0,c.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,t),hidden:a,children:n})}},9489:(e,n,a)=>{a.d(n,{A:()=>y});var s=a(6540),r=a(8215),c=a(4245),t=a(6347),i=a(6494),l=a(2814),d=a(5167),o=a(1269);function h(e){var n,a;return null!=(n=null==(a=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((n=e.props)&&"object"==typeof n&&"value"in n))return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?n:[]}function u(e){var n=e.values,a=e.children;return(0,s.useMemo)((function(){var e=null!=n?n:function(e){return h(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}(a);return function(e){var n=(0,d.X)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,a])}function b(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function p(e){var n=e.queryString,a=void 0!==n&&n,r=e.groupId,c=(0,t.W6)(),i=function(e){var n=e.queryString,a=void 0!==n&&n,s=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:a,groupId:r});return[(0,l.aZ)(i),(0,s.useCallback)((function(e){if(i){var n=new URLSearchParams(c.location.search);n.set(i,e),c.replace(Object.assign({},c.location,{search:n.toString()}))}}),[i,c])]}function m(e){var n,a,r,c,t=e.defaultValue,l=e.queryString,d=void 0!==l&&l,h=e.groupId,m=u(e),x=(0,s.useState)((function(){return function(e){var n,a=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!b({value:a,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(n=s.find((function(e){return e.default})))?n:s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:m})})),f=x[0],v=x[1],j=p({queryString:d,groupId:h}),k=j[0],g=j[1],y=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),a=(0,o.Dv)(n),r=a[0],c=a[1],[r,(0,s.useCallback)((function(e){n&&c.set(e)}),[n,c])]),w=y[0],q=y[1],C=function(){var e=null!=k?k:w;return b({value:e,tabValues:m})?e:null}();return(0,i.A)((function(){C&&v(C)}),[C]),{selectedValue:f,selectValue:(0,s.useCallback)((function(e){if(!b({value:e,tabValues:m}))throw new Error("Can't select invalid tab value="+e);v(e),g(e),q(e)}),[g,q,m]),tabValues:m}}var x=a(1062);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=a(4848);function j(e){var n=e.className,a=e.block,s=e.selectedValue,t=e.selectValue,i=e.tabValues,l=[],d=(0,c.a_)().blockElementScrollPositionUntilNextRender,o=function(e){var n=e.currentTarget,a=l.indexOf(n),r=i[a].value;r!==s&&(d(n),t(r))},h=function(e){var n,a=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":var s,r=l.indexOf(e.currentTarget)+1;a=null!=(s=l[r])?s:l[0];break;case"ArrowLeft":var c,t=l.indexOf(e.currentTarget)-1;a=null!=(c=l[t])?c:l[l.length-1]}null==(n=a)||n.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":a},n),children:i.map((function(e){var n=e.value,a=e.label,c=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:function(e){return l.push(e)},onKeyDown:h,onClick:o},c,{className:(0,r.A)("tabs__item",f.tabItem,null==c?void 0:c.className,{"tabs__item--active":s===n}),children:null!=a?a:n}),n)}))})}function k(e){var n=e.lazy,a=e.children,r=e.selectedValue,c=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){var t=c.find((function(e){return e.props.value===r}));return t?(0,s.cloneElement)(t,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:c.map((function(e,n){return(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})}))})}function g(e){var n=m(e);return(0,v.jsxs)("div",{className:(0,r.A)("tabs-container",f.tabList),children:[(0,v.jsx)(j,Object.assign({},e,n)),(0,v.jsx)(k,Object.assign({},e,n))]})}function y(e){var n=(0,x.A)();return(0,v.jsx)(g,Object.assign({},e,{children:h(e.children)}),String(n))}},8453:(e,n,a)=>{a.d(n,{R:()=>t,x:()=>i});var s=a(6540);const r={},c=s.createContext(r);function t(e){const n=s.useContext(c);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(r):e.components||r:t(e.components),s.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f855a640.0f0fb28b.js b/assets/js/f855a640.333db3eb.js similarity index 93% rename from assets/js/f855a640.0f0fb28b.js rename to assets/js/f855a640.333db3eb.js index 17c54df78..30f16b77c 100644 --- a/assets/js/f855a640.0f0fb28b.js +++ b/assets/js/f855a640.333db3eb.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[974],{6221:(t,e,r)=>{r.r(e),r.d(e,{assets:()=>a,contentTitle:()=>i,default:()=>l,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var n=r(4848),o=r(8453);const s={id:"scripts",title:"Scripts",sidebar_position:2},i=void 0,c={id:"Script/scripts",title:"Scripts",description:"A Script in Nervos CKB is a binary executable that can be executed on-chain.",source:"@site/docs/Script/Script.mdx",sourceDirName:"Script",slug:"/Script/",permalink:"/docs/Script/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Script/Script.mdx",tags:[],version:"current",lastUpdatedAt:1713234561,formattedLastUpdatedAt:"Apr 16, 2024",sidebarPosition:2,frontMatter:{id:"scripts",title:"Scripts",sidebar_position:2},sidebar:"tutorial",previous:{title:"Dev Tools",permalink:"/docs/getting-started/devtool"},next:{title:"Intro to Script",permalink:"/docs/Script/intro-to-script"}},a={},p=[];function d(t){const e={a:"a",p:"p",...(0,o.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.p,{children:["A ",(0,n.jsx)(e.a,{href:"/docs/concepts/glossary/#script",children:"Script"})," in Nervos CKB is a binary executable that can be executed on-chain."]}),"\n",(0,n.jsx)(e.p,{children:"It is Turing-complete and can perform arbitray logic to guard and protect your on-chain assets."}),"\n",(0,n.jsx)(e.p,{children:"You can think of it as smart contract."})]})}function l(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(d,{...t})}):d(t)}},8453:(t,e,r)=>{r.d(e,{R:()=>i,x:()=>c});var n=r(6540);const o={},s=n.createContext(o);function i(t){const e=n.useContext(s);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function c(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:i(t.components),n.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[974],{6221:(t,e,r)=>{r.r(e),r.d(e,{assets:()=>a,contentTitle:()=>i,default:()=>l,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var n=r(4848),o=r(8453);const s={id:"scripts",title:"Scripts",sidebar_position:2},i=void 0,c={id:"Script/scripts",title:"Scripts",description:"A Script in Nervos CKB is a binary executable that can be executed on-chain.",source:"@site/docs/Script/Script.mdx",sourceDirName:"Script",slug:"/Script/",permalink:"/docs/Script/",draft:!1,unlisted:!1,editUrl:"https://github.com/nervosnetwork/docs-new/tree/develop/website/docs/Script/Script.mdx",tags:[],version:"current",lastUpdatedAt:1713875854,formattedLastUpdatedAt:"Apr 23, 2024",sidebarPosition:2,frontMatter:{id:"scripts",title:"Scripts",sidebar_position:2},sidebar:"tutorial",previous:{title:"Dev Tools",permalink:"/docs/getting-started/devtool"},next:{title:"Intro to Script",permalink:"/docs/Script/intro-to-script"}},a={},p=[];function d(t){const e={a:"a",p:"p",...(0,o.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.p,{children:["A ",(0,n.jsx)(e.a,{href:"/docs/concepts/glossary/#script",children:"Script"})," in Nervos CKB is a binary executable that can be executed on-chain."]}),"\n",(0,n.jsx)(e.p,{children:"It is Turing-complete and can perform arbitray logic to guard and protect your on-chain assets."}),"\n",(0,n.jsx)(e.p,{children:"You can think of it as smart contract."})]})}function l(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(d,{...t})}):d(t)}},8453:(t,e,r)=>{r.d(e,{R:()=>i,x:()=>c});var n=r(6540);const o={},s=n.createContext(o);function i(t){const e=n.useContext(s);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function c(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:i(t.components),n.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.6a679006.js b/assets/js/main.6a679006.js new file mode 100644 index 000000000..a5b986ac6 --- /dev/null +++ b/assets/js/main.6a679006.js @@ -0,0 +1,2 @@ +/*! For license information please see main.6a679006.js.LICENSE.txt */ +(self.webpackChunkdocs_nervos_org=self.webpackChunkdocs_nervos_org||[]).push([[792],{2413:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),o=n.n(r),a=n(4054);const i={17896441:[function(){return Promise.all([n.e(869),n.e(424),n.e(401)]).then(n.bind(n,4334))},"@theme/DocItem",4334],"1a4e3797":[function(){return Promise.all([n.e(869),n.e(138)]).then(n.bind(n,5444))},"@theme/SearchPage",5444],"1bd4f307":[function(){return n.e(808).then(n.bind(n,9582))},"@site/docs/concepts/economics.md",9582],"1df93b7f":[function(){return Promise.all([n.e(869),n.e(583)]).then(n.bind(n,4230))},"@site/src/pages/index.tsx",4230],"2247ab3c":[function(){return Promise.all([n.e(869),n.e(31)]).then(n.bind(n,1922))},"@site/docs/getting-started/write-message.mdx",1922],"325ecf53":[function(){return Promise.all([n.e(869),n.e(361)]).then(n.bind(n,5525))},"@site/docs/getting-started/getting-started.mdx",5525],"360db7ed":[function(){return Promise.all([n.e(869),n.e(854)]).then(n.bind(n,3386))},"@site/docs/getting-started/devtool.md",3386],"3d7f047f":[function(){return Promise.all([n.e(869),n.e(510)]).then(n.bind(n,573))},"@site/docs/Node/run-testnet-node.mdx",573],"4145f356":[function(){return Promise.all([n.e(869),n.e(707)]).then(n.bind(n,3991))},"@site/docs/ecosystem.md",3991],"44baab47":[function(){return n.e(198).then(n.bind(n,4516))},"@site/docs/concepts/ckb-vm.md",4516],"4a45b4ac":[function(){return Promise.all([n.e(869),n.e(17)]).then(n.bind(n,6987))},"@site/docs/getting-started/transfer-ckb.mdx",6987],"4dce95c1":[function(){return Promise.all([n.e(869),n.e(705)]).then(n.bind(n,9145))},"@site/docs/getting-started/create-dob.mdx",9145],"54fda744":[function(){return Promise.all([n.e(869),n.e(594)]).then(n.bind(n,7953))},"@site/docs/wallets/wallets.mdx",7953],"5dbf90bd":[function(){return Promise.all([n.e(869),n.e(177)]).then(n.bind(n,5001))},"@site/docs/getting-started/create-token.mdx",5001],"5e95c892":[function(){return n.e(647).then(n.bind(n,3124))},"@theme/DocsRoot",3124],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,4784))},"@generated/docusaurus.config",4784],"5ee7b1bc":[function(){return n.e(743).then(n.bind(n,4990))},"@site/docs/concepts/glossary.md",4990],"631c4dd6":[function(){return n.e(516).then(n.bind(n,5774))},"@site/docs/Script/intro-to-script.mdx",5774],"65413b96":[function(){return Promise.all([n.e(869),n.e(267)]).then(n.bind(n,5466))},"@site/docs/Node/run-mainnet-node.mdx",5466],"682fa153":[function(){return Promise.all([n.e(869),n.e(231)]).then(n.bind(n,890))},"@site/docs/concepts/Concepts.mdx",890],"690a886b":[function(){return n.e(669).then(n.bind(n,2396))},"@site/docs/concepts/nervos-blockchain.md",2396],"6c4d1ce4":[function(){return n.e(289).then(n.bind(n,6791))},"@site/docs/Node/node.mdx",6791],"6ee80bbf":[function(){return n.e(885).then(n.t.bind(n,1966,19))},"/home/runner/work/docs.nervos.org/docs.nervos.org/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",1966],"8fa65b9b":[function(){return n.e(664).then(n.bind(n,3246))},"@site/src/pages/homeContents.tsx",3246],"935f2afb":[function(){return n.e(581).then(n.t.bind(n,5610,19))},"~docs/default/version-current-metadata-prop-751.json",5610],"9a6c79a7":[function(){return n.e(400).then(n.bind(n,6122))},"@site/docs/Script/common-script-error-code.mdx",6122],"9c63e866":[function(){return Promise.all([n.e(869),n.e(489)]).then(n.bind(n,1425))},"@site/docs/Script/a-minimal-script.mdx",1425],a205f28c:[function(){return Promise.all([n.e(869),n.e(580)]).then(n.bind(n,238))},"@site/docs/rpcs.mdx",238],a7bd4aaa:[function(){return n.e(98).then(n.bind(n,2881))},"@theme/DocVersionRoot",2881],a824b7a4:[function(){return Promise.all([n.e(869),n.e(200)]).then(n.bind(n,4813))},"@site/docs/Script/js-script.mdx",4813],a94703ab:[function(){return Promise.all([n.e(869),n.e(48)]).then(n.bind(n,4644))},"@theme/DocRoot",4644],b1c18118:[function(){return Promise.all([n.e(869),n.e(562)]).then(n.bind(n,2157))},"@site/docs/Node/run-public-rpc-node.mdx",2157],be8ab648:[function(){return n.e(689).then(n.bind(n,7975))},"@site/docs/concepts/consensus.md",7975],c279c4ab:[function(){return n.e(148).then(n.bind(n,1877))},"@site/docs/Script/program-language-for-script.mdx",1877],d4b35ab3:[function(){return n.e(449).then(n.t.bind(n,7757,19))},"/home/runner/work/docs.nervos.org/docs.nervos.org/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json",7757],d8a2e2a8:[function(){return n.e(667).then(n.bind(n,8130))},"@site/docs/concepts/cell-model.md",8130],e294a8bd:[function(){return Promise.all([n.e(869),n.e(156)]).then(n.bind(n,360))},"@site/docs/getting-started/dev-environment.mdx",360],f340be0f:[function(){return n.e(905).then(n.t.bind(n,4061,19))},"/home/runner/work/docs.nervos.org/docs.nervos.org/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",4061],f855a640:[function(){return n.e(974).then(n.bind(n,6221))},"@site/docs/Script/Script.mdx",6221]};var l=n(4848);function s(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(1604),c=n(3363);function d(e,t){if("*"===e)return o()({loading:s,loader:function(){return Promise.all([n.e(869),n.e(560)]).then(n.bind(n,2560))},modules:["@theme/NotFound"],webpack:function(){return[2560]},render:function(e,t){var n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,Object.assign({},t))})}});var r=a[e+"-"+t],d={},f=[],p=[],m=(0,u.A)(r);return Object.entries(m).forEach((function(e){var t=e[0],n=e[1],r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))})),o().Map({loading:s,loader:d,modules:f,webpack:function(){return p},render:function(t,n){var o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],a=r.default;if(!a)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){a[e]=r[e]}));var i=o,l=n.split(".");l.slice(0,-1).forEach((function(e){i=i[e]})),i[l[l.length-1]]=a}));var a=o.__comp;delete o.__comp;var i=o.__context;return delete o.__context,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(a,Object.assign({},o,n))})}})}const f=[{path:"/homeContents",component:d("/homeContents","d73"),exact:!0},{path:"/search",component:d("/search","052"),exact:!0},{path:"/docs",component:d("/docs","959"),routes:[{path:"/docs",component:d("/docs","a77"),routes:[{path:"/docs",component:d("/docs","306"),routes:[{path:"/docs/concepts/",component:d("/docs/concepts/","764"),exact:!0,sidebar:"tutorial"},{path:"/docs/concepts/cell-model",component:d("/docs/concepts/cell-model","67c"),exact:!0,sidebar:"tutorial"},{path:"/docs/concepts/ckb-vm",component:d("/docs/concepts/ckb-vm","914"),exact:!0,sidebar:"tutorial"},{path:"/docs/concepts/consensus",component:d("/docs/concepts/consensus","3fe"),exact:!0,sidebar:"tutorial"},{path:"/docs/concepts/economics",component:d("/docs/concepts/economics","c50"),exact:!0,sidebar:"tutorial"},{path:"/docs/concepts/glossary",component:d("/docs/concepts/glossary","6fb"),exact:!0,sidebar:"tutorial"},{path:"/docs/concepts/nervos-blockchain",component:d("/docs/concepts/nervos-blockchain","d74"),exact:!0,sidebar:"tutorial"},{path:"/docs/ecosystem",component:d("/docs/ecosystem","e44"),exact:!0,sidebar:"tutorial"},{path:"/docs/getting-started/",component:d("/docs/getting-started/","1d6"),exact:!0,sidebar:"tutorial"},{path:"/docs/getting-started/create-dob",component:d("/docs/getting-started/create-dob","d29"),exact:!0,sidebar:"tutorial"},{path:"/docs/getting-started/create-token",component:d("/docs/getting-started/create-token","c21"),exact:!0,sidebar:"tutorial"},{path:"/docs/getting-started/dev-environment",component:d("/docs/getting-started/dev-environment","4aa"),exact:!0,sidebar:"tutorial"},{path:"/docs/getting-started/devtool",component:d("/docs/getting-started/devtool","060"),exact:!0,sidebar:"tutorial"},{path:"/docs/getting-started/transfer-ckb",component:d("/docs/getting-started/transfer-ckb","247"),exact:!0,sidebar:"tutorial"},{path:"/docs/getting-started/write-message",component:d("/docs/getting-started/write-message","38f"),exact:!0,sidebar:"tutorial"},{path:"/docs/Node/",component:d("/docs/Node/","42a"),exact:!0,sidebar:"tutorial"},{path:"/docs/Node/run-mainnet-node",component:d("/docs/Node/run-mainnet-node","439"),exact:!0,sidebar:"tutorial"},{path:"/docs/Node/run-public-rpc-node",component:d("/docs/Node/run-public-rpc-node","0ea"),exact:!0,sidebar:"tutorial"},{path:"/docs/Node/run-testnet-node",component:d("/docs/Node/run-testnet-node","527"),exact:!0,sidebar:"tutorial"},{path:"/docs/rpcs",component:d("/docs/rpcs","fcd"),exact:!0,sidebar:"tutorial"},{path:"/docs/Script/",component:d("/docs/Script/","aa8"),exact:!0,sidebar:"tutorial"},{path:"/docs/Script/common-script-error-code",component:d("/docs/Script/common-script-error-code","7d3"),exact:!0,sidebar:"tutorial"},{path:"/docs/Script/intro-to-script",component:d("/docs/Script/intro-to-script","4b8"),exact:!0,sidebar:"tutorial"},{path:"/docs/Script/js-script",component:d("/docs/Script/js-script","acc"),exact:!0,sidebar:"tutorial"},{path:"/docs/Script/minimal-script",component:d("/docs/Script/minimal-script","c15"),exact:!0,sidebar:"tutorial"},{path:"/docs/Script/program-language-for-script",component:d("/docs/Script/program-language-for-script","8f5"),exact:!0,sidebar:"tutorial"},{path:"/docs/wallets/",component:d("/docs/wallets/","b2e"),exact:!0,sidebar:"tutorial"}]}]}]},{path:"/",component:d("/","d70"),exact:!0},{path:"*",component:d("*")}]},774:(e,t,n)=>{var r,o;!function(){var a,i,l,s,u,c,d,f,p,m,h,g,y,v,b,w,S,k,x,_,E,O,P,j,C,A,T,I,N,L,R=function e(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};R.version="2.3.9",(R.utils={}).warn=(a=this,function(e){a.console&&console.warn&&console.warn(e)}),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var s=R.utils.clone(t)||{};s.position=[i,l],s.index=o.length,o.push(new R.Token(n.slice(i,a),s))}i=a+1}}return o}).separator=/[\s\-]+/,(R.Pipeline=function(){this._stack=[]}).registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach((function(e){var n=R.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},R.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(ae&&(n=o),a!=e);)r=n-t,o=t+Math.floor(r/2),a=this.elements[2*o];return a==e||a>e?2*o:al?u+=2:i==l&&(t+=n[s+1]*r[u+1],s+=2,u+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var a,i=o.str.charAt(0);i in o.node.edges?a=o.node.edges[i]:(a=new R.TokenSet,o.node.edges[i]=a),1==o.str.length&&(a.final=!0),r.push({node:a,editsRemaining:o.editsRemaining,str:o.str.slice(1)})}if(0!=o.editsRemaining){if("*"in o.node.edges)var l=o.node.edges["*"];else{l=new R.TokenSet;o.node.edges["*"]=l}if(0==o.str.length&&(l.final=!0),r.push({node:l,editsRemaining:o.editsRemaining-1,str:o.str}),o.str.length>1&&r.push({node:o.node,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)}),1==o.str.length&&(o.node.final=!0),o.str.length>=1){if("*"in o.node.edges)var s=o.node.edges["*"];else{s=new R.TokenSet;o.node.edges["*"]=s}1==o.str.length&&(s.final=!0),r.push({node:s,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)})}if(o.str.length>1){var u,c=o.str.charAt(0),d=o.str.charAt(1);d in o.node.edges?u=o.node.edges[d]:(u=new R.TokenSet,o.node.edges[d]=u),1==o.str.length&&(u.final=!0),r.push({node:u,editsRemaining:o.editsRemaining-1,str:c+o.str.slice(2)})}}}return n},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,n=t,r=0,o=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},(R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline}).prototype.search=function(e){return this.query((function(t){new R.QueryParser(e,t).parse()}))},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),n=Object.create(null),r=Object.create(null),o=Object.create(null),a=Object.create(null),i=Object.create(null),l=0;l1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var o=0;o=this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},(R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0}).prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new R.QueryParseError(n,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new R.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r)throw new R.QueryParseError(n="expecting term or field, found nothing",t.start,t.end);switch(r.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new R.QueryParseError(n,r.start,r.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var o=e.peekLexeme();if(null==o)throw new R.QueryParseError(r="expecting term, found nothing",t.start,t.end);if(o.type===R.QueryLexer.TERM)return R.QueryParser.parseTerm;r="expecting term, found '"+o.type+"'";throw new R.QueryParseError(r,o.start,o.end)}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new R.QueryParseError(r,n.start,n.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n))throw new R.QueryParseError(o="edit distance must be numeric",t.start,t.end);e.currentClause.editDistance=n;var r=e.peekLexeme();if(null!=r)switch(r.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var o="Unexpected lexeme type '"+r.type+"'";throw new R.QueryParseError(o,r.start,r.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n))throw new R.QueryParseError(o="boost must be numeric",t.start,t.end);e.currentClause.boost=n;var r=e.peekLexeme();if(null!=r)switch(r.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var o="Unexpected lexeme type '"+r.type+"'";throw new R.QueryParseError(o,r.start,r.end)}else e.nextClause()}},void 0===(o="function"==typeof(r=function(){return R})?r.call(t,n,t,e):r)||(e.exports=o)}()},8848:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(6540),o=n(4848),a=r.createContext(!1);function i(e){var t=e.children,n=(0,r.useState)(!1),i=n[0],l=n[1];return(0,r.useEffect)((function(){l(!0)}),[]),(0,o.jsx)(a.Provider,{value:i,children:t})}},5022:(e,t,n)=>{"use strict";var r=n(6540),o=n(5338),a=n(4625),i=n(545),l=n(1712);const s=[n(9128),n(5300),n(4753),n(5729),n(2697)];var u=n(2413),c=n(6347),d=n(2831),f=n(4848);function p(e){var t=e.children;return(0,f.jsx)(f.Fragment,{children:t})}var m=n(1141),h=n(7639),g=n(8180),y=n(6957),v=n(4239),b=n(2098),w=n(9503),S=n(1482),k=n(4609),x=n(1210);function _(){var e=(0,h.A)().i18n,t=e.currentLocale,n=e.defaultLocale,r=e.localeConfigs,o=(0,b.o)(),a=r[t].htmlLang,i=function(e){return e.replace("-","_")};return(0,f.jsxs)(m.A,{children:[Object.entries(r).map((function(e){var t=e[0],n=e[1].htmlLang;return(0,f.jsx)("link",{rel:"alternate",href:o.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:o.createUrl({locale:n,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:i(a)}),Object.values(r).filter((function(e){return a!==e.htmlLang})).map((function(e){return(0,f.jsx)("meta",{property:"og:locale:alternate",content:i(e.htmlLang)},"meta-og-"+e.htmlLang)}))]})}function E(e){var t=e.permalink,n=(0,h.A)().siteConfig.url,r=function(){var e=(0,h.A)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,o=(0,c.zy)().pathname;return t+(0,k.applyTrailingSlash)((0,g.A)(o),{trailingSlash:r,baseUrl:n})}(),o=t?""+n+t:r;return(0,f.jsxs)(m.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:o}),(0,f.jsx)("link",{rel:"canonical",href:o})]})}function O(){var e=(0,h.A)().i18n.currentLocale,t=(0,y.p)(),n=t.metadata,r=t.image;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(m.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:w.w})]}),r&&(0,f.jsx)(v.be,{image:r}),(0,f.jsx)(E,{}),(0,f.jsx)(_,{}),(0,f.jsx)(x.A,{tag:S.Cy,locale:e}),(0,f.jsx)(m.A,{children:n.map((function(e,t){return(0,f.jsx)("meta",Object.assign({},e),t)}))})]})}var P=new Map;function j(e){if(P.has(e.pathname))return Object.assign({},e,{pathname:P.get(e.pathname)});if((0,d.u)(u.A,e.pathname).some((function(e){return!0===e.route.exact})))return P.set(e.pathname,e.pathname),e;var t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return P.set(e.pathname,t),Object.assign({},e,{pathname:t})}var C=n(8848),A=n(3366),T=n(6711),I=n(6494);function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/{"use strict";n.d(t,{o:()=>d,l:()=>f});var r=n(6540),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-google-gtag":{"default":{"trackingID":["G-Q42TXTFP46"],"anonymizeIP":true,"id":"default"}},"@cmfcmf/docusaurus-search-local":{"default":{"titleBoost":5,"contentBoost":1,"tagsBoost":3,"parentCategoriesBoost":2,"indexDocSidebarParentCategories":0,"maxSearchResults":8}},"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"getting-started/getting-started","docs":[{"id":"concepts/cell-model","path":"/docs/concepts/cell-model","sidebar":"tutorial"},{"id":"concepts/ckb-vm","path":"/docs/concepts/ckb-vm","sidebar":"tutorial"},{"id":"concepts/concepts","path":"/docs/concepts/","sidebar":"tutorial"},{"id":"concepts/consensus","path":"/docs/concepts/consensus","sidebar":"tutorial"},{"id":"concepts/economics","path":"/docs/concepts/economics","sidebar":"tutorial"},{"id":"concepts/glossary","path":"/docs/concepts/glossary","sidebar":"tutorial"},{"id":"concepts/nervos-blockchain","path":"/docs/concepts/nervos-blockchain","sidebar":"tutorial"},{"id":"ecosystem","path":"/docs/ecosystem","sidebar":"tutorial"},{"id":"getting-started/create-dob","path":"/docs/getting-started/create-dob","sidebar":"tutorial"},{"id":"getting-started/create-token","path":"/docs/getting-started/create-token","sidebar":"tutorial"},{"id":"getting-started/dev-environment","path":"/docs/getting-started/dev-environment","sidebar":"tutorial"},{"id":"getting-started/devtool","path":"/docs/getting-started/devtool","sidebar":"tutorial"},{"id":"getting-started/getting-started","path":"/docs/getting-started/","sidebar":"tutorial"},{"id":"getting-started/transfer-ckb","path":"/docs/getting-started/transfer-ckb","sidebar":"tutorial"},{"id":"getting-started/write-message","path":"/docs/getting-started/write-message","sidebar":"tutorial"},{"id":"Node/run-mainnet-node","path":"/docs/Node/run-mainnet-node","sidebar":"tutorial"},{"id":"Node/run-node","path":"/docs/Node/","sidebar":"tutorial"},{"id":"Node/run-public-rpc-node","path":"/docs/Node/run-public-rpc-node","sidebar":"tutorial"},{"id":"Node/run-testnet-node","path":"/docs/Node/run-testnet-node","sidebar":"tutorial"},{"id":"rpcs","path":"/docs/rpcs","sidebar":"tutorial"},{"id":"Script/common-script-error-code","path":"/docs/Script/common-script-error-code","sidebar":"tutorial"},{"id":"Script/intro-to-script","path":"/docs/Script/intro-to-script","sidebar":"tutorial"},{"id":"Script/js-script","path":"/docs/Script/js-script","sidebar":"tutorial"},{"id":"Script/minimal-script","path":"/docs/Script/minimal-script","sidebar":"tutorial"},{"id":"Script/program-language-for-script","path":"/docs/Script/program-language-for-script","sidebar":"tutorial"},{"id":"Script/scripts","path":"/docs/Script/","sidebar":"tutorial"},{"id":"wallets/wallets","path":"/docs/wallets/","sidebar":"tutorial"}],"draftIds":[],"sidebars":{"tutorial":{"link":{"path":"/docs/getting-started/","label":"Getting Started"}}}}],"breadcrumbs":false}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.1.1","siteVersion":"2.2.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.1.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.1.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.1.1"},"docusaurus-plugin-google-gtag":{"type":"package","name":"@docusaurus/plugin-google-gtag","version":"3.1.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.1.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.1.1"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.1.1"},"@cmfcmf/docusaurus-search-local":{"type":"package","name":"@cmfcmf/docusaurus-search-local","version":"1.1.0"},"custom-webpack-plugin":{"type":"local"}}}');var u=n(4848),c={siteConfig:o.default,siteMetadata:s,globalData:a,i18n:i,codeTranslations:l},d=r.createContext(c);function f(e){var t=e.children;return(0,u.jsx)(d.Provider,{value:c,children:t})}},3832:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(6711),o=n(6540),a=n(1712),i=n(1141),l=n(4609),s=n(8238),u=n(4848);function c(e){var t=e.error,n=e.tryAgain;return(0,u.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,u.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,u.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,u.jsx)(d,{error:t})]})}function d(e){var t=e.error,n=(0,l.getErrorCausalChain)(t).map((function(e){return e.message})).join("\n\nCause:\n");return(0,u.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function f(e){var t=e.error,n=e.tryAgain;return(0,u.jsxs)(m,{fallback:function(){return(0,u.jsx)(c,{error:t,tryAgain:n})},children:[(0,u.jsx)(i.A,{children:(0,u.jsx)("title",{children:"Page Error"})}),(0,u.jsx)(s.A,{children:(0,u.jsx)(c,{error:t,tryAgain:n})})]})}var p=function(e){return(0,u.jsx)(f,Object.assign({},e))},m=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){a.A.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,o={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:p)(o)}return null!=t?t:null},t}(o.Component)},1712:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},1141:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(545),o=n(4848);function a(e){return(0,o.jsx)(r.mg,Object.assign({},e))}},4783:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(1367),o=n(6540),a=n(4625),i=n(4609),l=n(7639),s=n(877),u=n(1712),c=n(7344),d=n(8180),f=n(4848),p=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,h=e.isNavLink,g=e.to,y=e.href,v=e.activeClassName,b=e.isActive,w=e["data-noBrokenLinkCheck"],S=e.autoAddBaseUrl,k=void 0===S||S,x=(0,r.A)(e,p),_=(0,l.A)().siteConfig,E=_.trailingSlash,O=_.baseUrl,P=(0,d.h)().withBaseUrl,j=(0,c.A)(),C=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(function(){return C.current}));var A=g||y;var T,I=(0,s.A)(A),N=null==A?void 0:A.replace("pathname://",""),L=void 0!==N?(T=N,k&&function(e){return e.startsWith("/")}(T)?P(T):T):void 0;L&&I&&(L=(0,i.applyTrailingSlash)(L,{trailingSlash:E,baseUrl:O}));var R=(0,o.useRef)(!1),D=h?a.k2:a.N_,F=u.A.canUseIntersectionObserver,M=(0,o.useRef)(),B=function(){R.current||null==L||(window.docusaurus.preload(L),R.current=!0)};(0,o.useEffect)((function(){return!F&&I&&null!=L&&window.docusaurus.prefetch(L),function(){F&&M.current&&M.current.disconnect()}}),[M,L,F,I]);var z=null!=(n=null==(m=L)?void 0:m.startsWith("#"))&&n,U=!x.target||"_self"===x.target,$=!L||!I||!U||z;return w||!z&&$||j.collectLink(L),x.id&&j.collectAnchor(x.id),$?(0,f.jsx)("a",Object.assign({ref:C,href:L},A&&!I&&{target:"_blank",rel:"noopener noreferrer"},x)):(0,f.jsx)(D,Object.assign({},x,{onMouseEnter:B,onTouchStart:B,innerRef:function(e){C.current=e,F&&e&&I&&(M.current=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(M.current.unobserve(e),M.current.disconnect(),null!=L&&window.docusaurus.prefetch(L))}))})),M.current.observe(e))},to:L},h&&{isActive:b,activeClassName:v}))}const h=o.forwardRef(m)},3230:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>s});var r=n(6540),o=n(4848);function a(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var i=n(2654);function l(e){var t,n,r=e.id,o=e.message;if(void 0===r&&void 0===o)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=i[null!=r?r:o])?n:o)?t:r}function s(e,t){return a(l({message:e.message,id:e.id}),t)}function u(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var i=l({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},4598:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var r="default"},877:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},8180:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,h:()=>i});var r=n(6540),o=n(7639),a=n(877);function i(){var e=(0,o.A)().siteConfig,t=e.baseUrl,n=e.url,i=(0,r.useCallback)((function(e,r){return function(e,t,n,r){var o=void 0===r?{}:r,i=o.forcePrependBaseUrl,l=void 0!==i&&i,s=o.absolute,u=void 0!==s&&s;if(!n||n.startsWith("#")||(0,a.z)(n))return n;if(l)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var c=n.startsWith(t)?n:t+n.replace(/^\//,"");return u?e+c:c}(n,t,e,r)}),[n,t]);return{withBaseUrl:i}}function l(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},7344:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540),o=(n(4848),r.createContext({collectAnchor:function(){},collectLink:function(){}})),a=function(){return(0,r.useContext)(o)};function i(){return a()}},7639:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(3366);function a(){return(0,r.useContext)(o.o)}},6503:(e,t,n)=>{"use strict";n.d(t,{P_:()=>i,kh:()=>a});var r=n(7639),o=n(4598);function a(e,t){void 0===t&&(t={});var n=(0,r.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}function i(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});var r=a(e),i=null==r?void 0:r[t];if(!i&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return i}},1062:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(8848);function a(){return(0,r.useContext)(o.o)}},6494:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const o=n(1712).A.canUseDOM?r.useLayoutEffect:r.useEffect},1604:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=function(e){return"object"==typeof e&&!!e&&Object.keys(e).length>0};function o(e){var t={};return function e(n,o){Object.entries(n).forEach((function(n){var a=n[0],i=n[1],l=o?o+"."+a:a;r(i)?e(i,l):t[l]=i}))}(e),t}},3363:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>a});var r=n(6540),o=n(4848),a=r.createContext(null);function i(e){var t=e.children,n=e.value,i=r.useContext(a),l=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:i,value:n})}),[i,n]);return(0,o.jsx)(a.Provider,{value:l,children:t})}},9802:(e,t,n)=>{"use strict";n.d(t,{zK:()=>h,vT:()=>d,gk:()=>f,Gy:()=>u,HW:()=>g,ht:()=>c,r7:()=>m,jh:()=>p});var r=n(6347),o=n(6503);var a=function(e){return e.versions.find((function(e){return e.isLast}))};function i(e,t){var n=a(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})}))}function l(e,t){var n,o,a=i(e,t),l=null==a?void 0:a.docs.find((function(e){return!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:a,activeDoc:l,alternateDocVersions:l?(n=l.id,o={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(o[e.name]=t)}))})),o):{}}}var s={},u=function(){var e;return null!=(e=(0,o.kh)("docusaurus-plugin-content-docs"))?e:s},c=function(e){return(0,o.P_)("docusaurus-plugin-content-docs",e,{failfast:!0})};function d(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var o=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return a}(u(),(0,r.zy)().pathname,e)}function f(e){void 0===e&&(e={});var t=d(e),n=(0,r.zy)().pathname;if(t)return{activePlugin:t,activeVersion:i(t.pluginData,n)}}function p(e){return c(e).versions}function m(e){var t=c(e);return a(t)}function h(e){return l(c(e),(0,r.zy)().pathname)}function g(e){return function(e,t){var n=a(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(c(e),(0,r.zy)().pathname)}},9128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={onRouteDidUpdate:function(e){var t=e.location,n=e.previousLocation;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||setTimeout((function(){window.gtag("set","page_path",t.pathname+t.search+t.hash),window.gtag("event","page_view")}))}}},5729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){o().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){o().done()}}},4753:(e,t,n)=>{"use strict";n.r(t);var r,o,a=n(8181),i=n(4784);r=a.My,o=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,o.forEach((function(e){"php"===e&&n(9700),n(1089)("./prism-"+e)})),delete globalThis.Prism},5225:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(1367),o=(n(6540),n(8215)),a=n(3230),i=n(6957),l=n(4783),s=n(7344);const u={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(4848),d=["as","id"];function f(e){var t=e.as,n=e.id,f=(0,r.A)(e,d),p=(0,s.A)(),m=(0,i.p)().navbar.hideOnScroll;if("h1"===t||!n)return(0,c.jsx)(t,Object.assign({},f,{id:void 0}));p.collectAnchor(n);var h=(0,a.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof f.children?f.children:n});return(0,c.jsxs)(t,Object.assign({},f,{className:(0,o.A)("anchor",m?u.anchorWithHideOnScrollNavbar:u.anchorWithStickyNavbar,f.className),id:n,children:[f.children,(0,c.jsx)(l.A,{className:"hash-link",to:"#"+n,"aria-label":h,title:h,children:"\u200b"})]}))}},716:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(4848);function a(e){var t=e.width,n=void 0===t?13.5:t,a=e.height,i=void 0===a?13.5:a;return(0,o.jsx)("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},8238:(e,t,n)=>{"use strict";n.d(t,{A:()=>Mi});var r=n(6540),o=n(8215),a=n(3832),i=n(4239),l=n(6347),s=n(3230),u=n(4067),c=n(4848),d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){var e=(0,r.useRef)(null),t=(0,l.W6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&f(n)}),[]);return(0,u.$)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}var m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){var t,n=null!=(t=e.children)?t:m,r=p(),o=r.containerRef,a=r.onClick;return(0,c.jsx)("div",{ref:o,role:"region","aria-label":m,children:(0,c.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:a,children:n}))})}var g=n(8630),y=n(9503);const v={skipToContent:"skipToContent_fXgn"};function b(){return(0,c.jsx)(h,{className:v.skipToContent})}var w=n(6957),S=n(2),k=n(1367),x=["width","height","color","strokeWidth","className"];function _(e){var t=e.width,n=void 0===t?21:t,r=e.height,o=void 0===r?21:r,a=e.color,i=void 0===a?"currentColor":a,l=e.strokeWidth,s=void 0===l?1.2:l,u=(e.className,(0,k.A)(e,x));return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:o},u,{children:(0,c.jsx)("g",{stroke:i,strokeWidth:s,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const E={closeButton:"closeButton_CVFx"};function O(e){return(0,c.jsx)("button",Object.assign({type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,o.A)("clean-btn close",E.closeButton,e.className),children:(0,c.jsx)(_,{width:14,height:14,strokeWidth:3.1})}))}const P={content:"content_knG7"};function j(e){var t=(0,w.p)().announcementBar.content;return(0,c.jsx)("div",Object.assign({},e,{className:(0,o.A)(P.content,e.className),dangerouslySetInnerHTML:{__html:t}}))}const C={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function A(){var e=(0,w.p)().announcementBar,t=(0,S.Mj)(),n=t.isActive,r=t.close;if(!n)return null;var o=e.backgroundColor,a=e.textColor,i=e.isCloseable;return(0,c.jsxs)("div",{className:C.announcementBar,style:{backgroundColor:o,color:a},role:"banner",children:[i&&(0,c.jsx)("div",{className:C.announcementBarPlaceholder}),(0,c.jsx)(j,{className:C.announcementBarContent}),i&&(0,c.jsx)(O,{onClick:r,className:C.announcementBarClose})]})}var T=n(1938),I=n(4245);var N=n(7094),L=n(763),R=r.createContext(null);function D(e){var t,n,o,a,i,l,s,u=e.children,d=(t=(0,T.M)(),n=(0,L.YL)(),o=(0,r.useState)(!1),a=o[0],i=o[1],l=null!==n.component,s=(0,N.ZC)(l),(0,r.useEffect)((function(){l&&!s&&i(!0)}),[l,s]),(0,r.useEffect)((function(){l?t.shown||i(!0):i(!1)}),[t.shown,l]),(0,r.useMemo)((function(){return[a,i]}),[a]));return(0,c.jsx)(R.Provider,{value:d,children:u})}function F(e){if(e.component){var t=e.component;return(0,c.jsx)(t,Object.assign({},e.props))}}function M(){var e=(0,r.useContext)(R);if(!e)throw new N.dV("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],o=(0,r.useCallback)((function(){return n(!1)}),[n]),a=(0,L.YL)();return(0,r.useMemo)((function(){return{shown:t,hide:o,content:F(a)}}),[o,a,t])}function B(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,a=M().shown;return(0,c.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,c.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var z=n(7710),U=n(53),$=n(1062);function H(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function V(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}const Q={toggle:"toggle_MW0i",toggleButton:"toggleButton_yw5v",darkToggleIcon:"darkToggleIcon_ekgs",lightToggleIcon:"lightToggleIcon_SFTY",toggleButtonDisabled:"toggleButtonDisabled_BJd7"};function W(e){var t=e.className,n=e.buttonClassName,r=e.value,o=e.onChange,a=(0,$.A)();if("/"===(0,l.zy)().pathname)return null;var i=(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,c.jsx)("div",{className:(0,U.A)(Q.toggle,t),children:(0,c.jsxs)("button",{className:(0,U.A)("clean-btn",Q.toggleButton,!a&&Q.toggleButtonDisabled,n),type:"button",onClick:function(){return o("dark"===r?"light":"dark")},disabled:!a,title:i,"aria-label":i,"aria-live":"polite",children:[(0,c.jsx)(H,{className:(0,U.A)(Q.toggleIcon,Q.lightToggleIcon)}),(0,c.jsx)(V,{className:(0,U.A)(Q.toggleIcon,Q.darkToggleIcon)})]})})}const q=r.memo(W),G={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function K(e){var t=e.className,n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,o=(0,z.G)(),a=o.colorMode,i=o.setColorMode;return r?null:(0,c.jsx)(q,{className:t,buttonClassName:"dark"===n?G.darkNavbarColorModeToggle:void 0,value:a,onChange:i})}var Y=n(20);function X(){return(0,c.jsx)(Y.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Z(){var e=(0,T.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()},children:(0,c.jsx)(_,{color:"var(--ifm-color-emphasis-600)"})})}function J(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(X,{}),(0,c.jsx)(K,{className:"margin-right--md"}),(0,c.jsx)(Z,{})]})}var ee=n(4783),te=n(8180),ne=n(877),re=n(7865),oe=n(716),ae=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function ie(e){var t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,o=e.href,a=e.label,i=e.html,l=e.isDropdownLink,s=e.prependBaseUrlToHref,u=(0,k.A)(e,ae),d=(0,te.A)(r),f=(0,te.A)(t),p=(0,te.A)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,ne.A)(o),h=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[a,m&&(0,c.jsx)(oe.A,Object.assign({},l&&{width:12,height:12}))]})};return o?(0,c.jsx)(ee.A,Object.assign({href:s?p:o},u,h)):(0,c.jsx)(ee.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,re.G)(n,t.pathname):t.pathname.startsWith(f)}},u,h))}var le=["className","isDropdownItem"],se=["className","isDropdownItem"],ue=["mobile","position"];function ce(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,a=(0,k.A)(e,le),i=(0,c.jsx)(ie,Object.assign({className:(0,o.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},a));return r?(0,c.jsx)("li",{children:i}):i}function de(e){var t=e.className,n=(e.isDropdownItem,(0,k.A)(e,se));return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ie,Object.assign({className:(0,o.A)("menu__link",t)},n))})}function fe(e){var t,n=e.mobile,r=void 0!==n&&n,o=(e.position,(0,k.A)(e,ue)),a=r?de:ce;return(0,c.jsx)(a,Object.assign({},o,{activeClassName:null!=(t=o.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var pe=n(4549),me=n(260),he=n(7639);const ge={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};var ye=["items","position","className","onClick"],ve=["items","className","position","onClick"],be=["mobile"];function we(e,t){return e.some((function(e){return function(e,t){return!!(0,me.ys)(e.to,t)||!!(0,re.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function Se(e){var t,n=e.items,a=e.position,i=e.className,l=(e.onClick,(0,k.A)(e,ye)),s=(0,r.useRef)(null),u=(0,r.useState)(!1),d=u[0],f=u[1];return(0,r.useEffect)((function(){var e=function(e){s.current&&!s.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[s]),(0,c.jsxs)("div",{ref:s,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===a,"dropdown--show":d}),children:[(0,c.jsx)(ie,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:l.to?void 0:"#",className:(0,o.A)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),f(!d))},children:null!=(t=l.children)?t:l.label})),(0,c.jsx)("ul",{className:"dropdown__menu",children:n.map((function(e,t){return(0,r.createElement)(qa,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))})]})}function ke(e){var t,n,a=e.items,i=e.className,s=(e.position,e.onClick),u=(0,k.A)(e,ve),d=(n=(0,he.A)().siteConfig.baseUrl,(0,l.zy)().pathname.replace(n,"/")),f=we(a,d),p=(0,pe.u)({initialState:function(){return!f}}),m=p.collapsed,h=p.toggleCollapsed,g=p.setCollapsed;return(0,r.useEffect)((function(){f&&g(!f)}),[d,f,g]),(0,c.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":m}),children:[(0,c.jsx)(ie,Object.assign({role:"button",className:(0,o.A)(ge.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",i)},u,{onClick:function(e){e.preventDefault(),h()},children:null!=(t=u.children)?t:u.label})),(0,c.jsx)(pe.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:m,children:a.map((function(e,t){return(0,r.createElement)(qa,Object.assign({mobile:!0,isDropdownItem:!0,onClick:s,activeClassName:"menu__link--active"},e,{key:t}))}))})]})}function xe(e){var t=e.mobile,n=void 0!==t&&t,r=(0,k.A)(e,be),o=n?ke:Se;return(0,c.jsx)(o,Object.assign({},r))}var _e=n(2098),Ee=["width","height"];function Oe(e){var t=e.width,n=void 0===t?20:t,r=e.height,o=void 0===r?20:r,a=(0,k.A)(e,Ee);return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:o,"aria-hidden":!0},a,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const Pe="iconLanguage_nlXk";var je=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];var Ce=n(8328);function Ae(){Ae=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),l=new A(r||[]);return o(i,"_invoke",{value:O(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",m="executing",h="completed",g={};function y(){}function v(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(T([])));k&&k!==n&&r.call(k,i)&&(w=k);var x=b.prototype=y.prototype=Object.create(w);function _(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,a,i,l){var s=d(e[o],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==(0,Ce.A)(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(c).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,l)}))}l(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function O(t,n,r){var o=f;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var s=P(l,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var u=d(t,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Te(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function Ie(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Te(a,r,o,i,l,"next",e)}function l(e){Te(a,r,o,i,l,"throw",e)}i(void 0)}))}}var Ne=n(961);function Le(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10}(e);function n(n,r,o){if(t&&void 0!==o){var a=o[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[n].concat(Qe(r),[{headers:i}]))}else e.apply(void 0,[n].concat(Qe(r)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("clickedObjectIDsAfterSearch",Xe(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("clickedObjectIDs",Xe(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("convertedObjectIDsAfterSearch",Xe(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("convertedObjectIDs",Xe(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var n=t.items,r=qe(t,He);return[].concat(Qe(e),Qe(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function Je(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function et(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function tt(e){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tt(e)}function nt(e){return function(e){if(Array.isArray(e))return rt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&ut({onItemsChange:o,items:n,insights:u,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive,o=!1;function c(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:at(at({},l?{clickAnalytics:!0}:{}),e?{userToken:ft(e)}:{}),insights:u}})}s("addAlgoliaAgent","insights-plugin"),c(),s("onUserTokenChange",(function(e){o||c(e)})),s("getUserToken",null,(function(e,t){o||c(t)})),s("onAuthenticatedUserTokenChange",(function(e){e?(o=!0,c(e)):(o=!1,s("getUserToken",null,(function(e,t){return c(t)})))})),s("getAuthenticatedUserToken",null,(function(e,t){t&&(o=!0,c(t))})),n((function(e){var t=e.item,n=e.state,r=e.event,o=e.source;et(t)&&a({state:n,event:r,insights:u,item:t,insightsEvents:[at({eventName:"Item Selected"},Be({item:t,items:o.getItems().filter(et)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,o=e.event;et(t)&&i({state:r,event:o,insights:u,item:t,insightsEvents:[at({eventName:"Item Active"},Be({item:t,items:n.getItems().filter(et)}))]})}))},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function dt(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],nt(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function ft(e){return"number"==typeof e?e.toString():e}function pt(e){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pt(e)}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ht(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==pt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===pt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gt(e,t,n){var r,o=t.initialState;return{getState:function(){return o},dispatch:function(r,a){var i=function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:_t(),plugins:o,initialState:Nt({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(At(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:Me,onResolve:Me};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=Ot(Ot({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return yt(e)})).then((function(e){return e.map((function(e){return Nt(Nt({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:Nt({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}function Ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sn,un,cn,dn=null,fn=(sn=-1,un=-1,cn=void 0,function(e){var t=++sn;return Promise.resolve(e).then((function(e){return cn&&t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sn=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function kn(e){return e.nativeEvent||e}function xn(e){return xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(e)}var _n=["props","refresh","store"],En=["inputElement","formElement","panelElement"],On=["inputElement"],Pn=["inputElement","maxLength"],jn=["source"],Cn=["item","source"];function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ln(e){var t=e.props,n=e.refresh,r=e.store,o=Nn(e,_n);return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[o,a].some((function(t){return n=t,r=e.target,n===r||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return Tn({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},Nn(e,En))},getRootProps:function(e){return Tn({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return mn(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":mn(t.id,"label")},e)},getFormProps:function(e){e.inputElement;return Tn({action:"",noValidate:!0,role:"search",onSubmit:function(a){var i;a.preventDefault(),t.onSubmit(Tn({event:a,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(a){var i;a.preventDefault(),t.onReset(Tn({event:a,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},Nn(e,On))},getLabelProps:function(e){return Tn({htmlFor:mn(t.id,"input"),id:mn(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&pn(Tn({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var l=e||{},s=(l.inputElement,l.maxLength),u=void 0===s?512:s,c=Nn(l,Pn),d=en(r.getState()),f=function(e){return Boolean(e&&e.match(Sn))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),p=t.enterKeyHint||(null!=d&&d.itemUrl&&!f?"go":"search");return Tn({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?mn(t.id,"item-".concat(r.getState().activeItemId),null==d?void 0:d.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return mn(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":mn(t.id,"label"),value:r.getState().completion||r.getState().query,id:mn(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&kn(e).isComposing?o.setQuery(a):pn(Tn({event:e,props:t,query:a.slice(0,u),refresh:n,store:r},o))},onCompositionEnd:function(e){pn(Tn({event:e,props:t,query:e.currentTarget.value.slice(0,u),refresh:n,store:r},o))},onKeyDown:function(e){kn(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,a=wn(e,gn);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=en(o.getState()),t=n.environment.document.getElementById(mn(n.id,"item-".concat(o.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},l=function(){var e=en(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,l=e.itemUrl,s=e.source;s.onActive(vn({event:t,item:n,itemInputValue:i,itemUrl:l,refresh:r,source:s,state:o.getState()},a))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?pn(vn({event:t,props:n,query:o.getState().query,refresh:r,store:o},a)).then((function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),l(),setTimeout(i,0)})):(o.dispatch(t.key,{}),l(),i())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||o.pendingRequests.cancelAll());t.preventDefault();var s=en(o.getState()),u=s.item,c=s.itemInputValue,d=s.itemUrl,f=s.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(f.onSelect(vn({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==d&&(f.onSelect(vn({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==d)return f.onSelect(vn({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),void n.navigator.navigate({itemUrl:d,item:u,state:o.getState()});pn(vn({event:t,nextState:{isOpen:!1},props:n,query:c,refresh:r,store:o},a)).then((function(){f.onSelect(vn({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:f,state:o.getState()},a))}))}}}(Tn({event:e,props:t,refresh:n,store:r},o))},onFocus:i,onBlur:Me,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},c)},getPanelProps:function(e){return Tn({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,o=Nn(n,jn);return Tn({role:"listbox","aria-labelledby":mn(t.id,"label"),id:mn(t.id,"list",r)},o)},getItemProps:function(e){var a=e.item,i=e.source,l=Nn(e,Cn);return Tn({id:mn(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=en(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,l=t.itemInputValue,s=t.itemUrl,u=t.source;u.onActive(Tn({event:e,item:i,itemInputValue:l,itemUrl:s,refresh:n,source:u,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var l=i.getItemInputValue({item:a,state:r.getState()}),s=i.getItemUrl({item:a,state:r.getState()});(s?Promise.resolve():pn(Tn({event:e,nextState:{isOpen:!1},props:t,query:l,refresh:n,store:r},o))).then((function(){i.onSelect(Tn({event:e,item:a,itemInputValue:l,itemUrl:s,refresh:n,source:i,state:r.getState()},o))}))}},l)}}}var Rn="1.17.0",Dn=[{segment:"autocomplete-core",version:Rn}];function Fn(e){return Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fn(e)}function Mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bn(e){for(var t=1;t=n?null===r?null:0:o}function Vn(e){return Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vn(e)}function Qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t=5&&((o||!e&&5===r)&&(i.push(r,0,o,n),r=6),e&&(i.push(r,e,0,n),r=6)),o=""},s=0;s"===t?(r=1,o=""):o=t+o[0]:a?t===a?a="":o+=t:'"'===t||"'"===t?a=t:">"===t?(l(),r=1):r&&("="===t?(r=5,n=o,o=""):"/"===t&&(r<5||">"===e[s][u+1])?(l(),3===r&&(i=i[0]),r=i,(i=i[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(l(),r=2):o+=t),3===r&&"!--"===o&&(r=4,i=i[0])}return l(),i}(e)),t),arguments,[])).length>1?t:t[0]}var rr=function(e){var t=e.environment,n=t.document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("class","aa-SubmitIcon"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("fill","currentColor");var r=t.document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d","M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"),n.appendChild(r),n},or=function(e){var t=e.environment,n=t.document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("class","aa-ClearIcon"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("fill","currentColor");var r=t.document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d","M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"),n.appendChild(r),n},ar=function(e){var t=e.environment.document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("class","aa-LoadingIcon"),t.setAttribute("viewBox","0 0 100 100"),t.setAttribute("width","20"),t.setAttribute("height","20"),t.innerHTML='\n \n',t},ir=["ontouchstart","ontouchend","ontouchmove","ontouchcancel"];function lr(e,t,n){e[t]=null===n?"":"number"!=typeof n?n:n+"px"}function sr(e){this._listeners[e.type](e)}function ur(e,t,n){var r,o,a=e[t];if("style"===t)if("string"==typeof n)e.style=n;else if(null===n)e.style="";else for(t in n)a&&n[t]===a[t]||lr(e.style,t,n[t]);else"o"===t[0]&&"n"===t[1]?(r=t!==(t=t.replace(/Capture$/,"")),((o=t.toLowerCase())in e||ir.includes(o))&&(t=o),t=t.slice(2),e._listeners||(e._listeners={}),e._listeners[t]=n,n?a||e.addEventListener(t,sr,r):e.removeEventListener(t,sr,r)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&"download"!==t&&"href"!==t&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function cr(e){switch(e){case"onChange":return"onInput";case"onCompositionEnd":return"oncompositionend";default:return e}}function dr(e,t){for(var n in t)ur(e,cr(n),t[n])}function fr(e,t){for(var n in t)"o"===n[0]&&"n"===n[1]||ur(e,cr(n),t[n])}var pr=["children"];function mr(e){return function(e){if(Array.isArray(e))return hr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return hr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hr(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function yr(e){return function(t,n){var r=n.children,o=void 0===r?[]:r,a=gr(n,pr),i=e.document.createElement(t);return dr(i,a),i.append.apply(i,mr(o)),i}}function vr(e){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(e)}var br=["autocompleteScopeApi","environment","classNames","getInputProps","getInputPropsCore","isDetached","state"];function wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _r=function(e){var t=e.autocompleteScopeApi,n=e.environment,r=(e.classNames,e.getInputProps),o=e.getInputPropsCore,a=e.isDetached,i=e.state,l=xr(e,br),s=yr(n)("input",l),u=r(Sr({state:i,props:o({inputElement:s}),inputElement:s},t));return dr(s,Sr(Sr({},u),{},{onKeyDown:function(e){a&&"Tab"===e.key||u.onKeyDown(e)}})),s};function Er(e){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Er(e)}function Or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t2&&(i.children=arguments.length>3?Cr.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===i[a]&&(i[a]=e.defaultProps[a]);return Hr(e,i,r,o,null)}function Hr(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++Tr:o,__i:-1,__u:0};return null==o&&null!=Ar.vnode&&Ar.vnode(a),a}function Vr(e){return e.children}function Qr(e,t){this.props=e,this.context=t}function Wr(e,t){if(null==t)return e.__?Wr(e.__,e.__i+1):null;for(var n;tt&&Ir.sort(Rr));Kr.__r=0}function Yr(e,t,n,r,o,a,i,l,s,u,c){var d,f,p,m,h,g=r&&r.__k||Fr,y=t.length;for(n.__d=s,Xr(n,t,g),s=n.__d,d=0;d0?Hr(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,l=Jr(o,n,i,c),o.__i=l,a=null,-1!==l&&(c--,(a=n[l])&&(a.__u|=131072)),null==a||null===a.__v?(-1==l&&d--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l===i+1?d++:l>i?c>s-i?d+=l-i:d--:l(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&a===s.type)return i;i--}if(l0&&void 0!==arguments[0]?arguments[0]:[];return{get:function(){return e},add:function(t){var n=e[e.length-1];(null==n?void 0:n.isHighlighted)===t.isHighlighted?e[e.length-1]={value:n.value+t.value,isHighlighted:n.isHighlighted}:e.push(t)}}}(n?[{value:n,isHighlighted:!1}]:[]);return t.forEach((function(e){var t=e.split(mo);r.add({value:t[0],isHighlighted:!0}),""!==t[1]&&r.add({value:t[1],isHighlighted:!1})})),r.get()}function go(e){return function(e){if(Array.isArray(e))return yo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yo(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""":'"',"'":"'"},So=new RegExp(/\w/i),ko=/&(amp|quot|lt|gt|#39);/g,xo=RegExp(ko.source);function _o(e,t){var n,r,o,a=e[t],i=(null===(n=e[t+1])||void 0===n?void 0:n.isHighlighted)||!0,l=(null===(r=e[t-1])||void 0===r?void 0:r.isHighlighted)||!0;return So.test((o=a.value)&&xo.test(o)?o.replace(ko,(function(e){return wo[e]})):o)||l!==i?a.isHighlighted:l}function Eo(e){return Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eo(e)}function Oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Po(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vo={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",detachedSearchButtonQuery:"aa-DetachedSearchButtonQuery",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout aa-Panel--scrollable",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},Qo=function(e,t){var n=e.children;(0,e.render)(n,t)},Wo={createElement:$r,Fragment:Vr,render:co};function qo(e){var t=e.panelPlacement,n=e.container,r=e.form,o=e.environment,a=n.getBoundingClientRect(),i=(o.pageYOffset||o.document.documentElement.scrollTop||o.document.body.scrollTop||0)+a.top+a.height;switch(t){case"start":return{top:i,left:a.left};case"end":return{top:i,right:o.document.documentElement.clientWidth-(a.left+a.width)};case"full-width":return{top:i,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":var l=r.getBoundingClientRect();return{top:i,left:l.left,right:o.document.documentElement.clientWidth-(l.left+l.width),width:"unset",maxWidth:"unset"};default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(t)," is not valid."))}}function Go(e){return Go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Go(e)}function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ha(e){for(var t=1;t0;if(!f.value.core.openOnFocus&&!t.query)return n;var r=Boolean(u.current||f.value.renderer.renderNoResults);return!n&&r||n},__autocomplete_metadata:{userAgents:Jo,options:e}}))})),h=Re(ha({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},f.value.core.initialState)),g={getEnvironmentProps:f.value.renderer.getEnvironmentProps,getFormProps:f.value.renderer.getFormProps,getInputProps:f.value.renderer.getInputProps,getItemProps:f.value.renderer.getItemProps,getLabelProps:f.value.renderer.getLabelProps,getListProps:f.value.renderer.getListProps,getPanelProps:f.value.renderer.getPanelProps,getRootProps:f.value.renderer.getRootProps},y={setActiveItemId:m.value.setActiveItemId,setQuery:m.value.setQuery,setCollections:m.value.setCollections,setIsOpen:m.value.setIsOpen,setStatus:m.value.setStatus,setContext:m.value.setContext,refresh:m.value.refresh,navigator:m.value.navigator},v=l((function(){return nr.bind(f.value.renderer.renderer.createElement)})),b=l((function(){return function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.classNames,o=e.environment,a=e.isDetached,i=e.placeholder,l=void 0===i?"Search":i,s=e.propGetters,u=e.setIsModalOpen,c=e.state,d=e.translations,f=yr(o),p=s.getRootProps(Pr({state:c,props:t.getRootProps({})},n)),m=f("div",Pr({class:r.root},p)),h=f("div",{class:r.detachedContainer,onMouseDown:function(e){e.stopPropagation()}}),g=f("div",{class:r.detachedOverlay,children:[h],onMouseDown:function(){u(!1),t.setIsOpen(!1)}}),y=s.getLabelProps(Pr({state:c,props:t.getLabelProps({})},n)),v=f("button",{class:r.submitButton,type:"submit",title:d.submitButtonTitle,children:[rr({environment:o})]}),b=f("label",Pr({class:r.label,children:[v]},y)),w=f("button",{class:r.clearButton,type:"reset",title:d.clearButtonTitle,children:[or({environment:o})]}),S=f("div",{class:r.loadingIndicator,children:[ar({environment:o})]}),k=_r({class:r.input,environment:o,state:c,getInputProps:s.getInputProps,getInputPropsCore:t.getInputProps,autocompleteScopeApi:n,isDetached:a}),x=f("div",{class:r.inputWrapperPrefix,children:[b,S]}),_=f("div",{class:r.inputWrapperSuffix,children:[w]}),E=f("div",{class:r.inputWrapper,children:[k]}),O=s.getFormProps(Pr({state:c,props:t.getFormProps({inputElement:k})},n)),P=f("form",Pr({class:r.form,children:[x,E,_]},O)),j=s.getPanelProps(Pr({state:c,props:t.getPanelProps({})},n)),C=f("div",Pr({class:r.panel},j)),A=f("div",{class:r.detachedSearchButtonQuery,textContent:c.query}),T=f("div",{class:r.detachedSearchButtonPlaceholder,hidden:Boolean(c.query),textContent:l});if(a){var I=f("div",{class:r.detachedSearchButtonIcon,children:[rr({environment:o})]}),N=f("button",{type:"button",class:r.detachedSearchButton,title:d.detachedSearchButtonTitle,id:y.id,onClick:function(){u(!0)},children:[I,T,A]}),L=f("button",{type:"button",class:r.detachedCancelButton,textContent:d.detachedCancelButtonText,onTouchStart:function(e){e.stopPropagation()},onClick:function(){t.setIsOpen(!1),u(!1)}}),R=f("div",{class:r.detachedFormContainer,children:[P,L]});h.appendChild(R),m.appendChild(N)}else m.appendChild(P);return{detachedContainer:h,detachedOverlay:g,detachedSearchButtonQuery:A,detachedSearchButtonPlaceholder:T,inputWrapper:E,input:k,root:m,form:P,label:b,submitButton:v,clearButton:w,loadingIndicator:S,panel:C}}({autocomplete:m.value,autocompleteScopeApi:y,classNames:f.value.renderer.classNames,environment:f.value.core.environment,isDetached:p.value,placeholder:f.value.core.placeholder,propGetters:g,setIsModalOpen:x,state:h.current,translations:f.value.renderer.translations})}));function w(){dr(b.value.panel,{style:p.value?{}:qo({panelPlacement:f.value.renderer.panelPlacement,container:b.value.root,form:b.value.form,environment:f.value.core.environment})})}function S(e){h.current=e;var t={autocomplete:m.value,autocompleteScopeApi:y,classNames:f.value.renderer.classNames,components:f.value.renderer.components,container:f.value.renderer.container,html:v.value,dom:b.value,panelContainer:p.value?b.value.detachedContainer:f.value.renderer.panelContainer,propGetters:g,state:h.current,renderer:f.value.renderer.renderer},n=!kt(e)&&!u.current&&f.value.renderer.renderNoResults||f.value.renderer.render;!function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.dom,o=e.propGetters,a=e.state;fr(r.root,o.getRootProps(Xo({state:a,props:t.getRootProps({})},n))),fr(r.input,o.getInputProps(Xo({state:a,props:t.getInputProps({inputElement:r.input}),inputElement:r.input},n))),dr(r.label,{hidden:"stalled"===a.status}),dr(r.loadingIndicator,{hidden:"stalled"!==a.status}),dr(r.clearButton,{hidden:!a.query}),dr(r.detachedSearchButtonQuery,{textContent:a.query}),dr(r.detachedSearchButtonPlaceholder,{hidden:Boolean(a.query)})}(t),function(e,t){var n=t.autocomplete,r=t.autocompleteScopeApi,o=t.classNames,a=t.html,i=t.dom,l=t.panelContainer,s=t.propGetters,u=t.state,c=t.components,d=t.renderer;if(u.isOpen){l.contains(i.panel)||"loading"===u.status||l.appendChild(i.panel),i.panel.classList.toggle("aa-Panel--stalled","stalled"===u.status);var f=u.collections.filter((function(e){var t=e.source,n=e.items;return t.templates.noResults||n.length>0})).map((function(e,t){var i=e.source,l=e.items;return d.createElement("section",{key:t,className:o.source,"data-autocomplete-source-id":i.sourceId},i.templates.header&&d.createElement("div",{className:o.sourceHeader},i.templates.header({components:c,createElement:d.createElement,Fragment:d.Fragment,items:l,source:i,state:u,html:a})),i.templates.noResults&&0===l.length?d.createElement("div",{className:o.sourceNoResults},i.templates.noResults({components:c,createElement:d.createElement,Fragment:d.Fragment,source:i,state:u,html:a})):d.createElement("ul",Ko({className:o.list},s.getListProps(Xo({state:u,props:n.getListProps({source:i})},r))),l.map((function(e){var t=n.getItemProps({item:e,source:i});return d.createElement("li",Ko({key:t.id,className:o.item},s.getItemProps(Xo({state:u,props:t},r))),i.templates.item({components:c,createElement:d.createElement,Fragment:d.Fragment,item:e,state:u,html:a}))}))),i.templates.footer&&d.createElement("div",{className:o.sourceFooter},i.templates.footer({components:c,createElement:d.createElement,Fragment:d.Fragment,items:l,source:i,state:u,html:a})))})),p=d.createElement(d.Fragment,null,d.createElement("div",{className:o.panelLayout},f),d.createElement("div",{className:"aa-GradientBottom"})),m=f.reduce((function(e,t){return e[t.props["data-autocomplete-source-id"]]=t,e}),{});e(Xo(Xo({children:p,state:u,sections:f,elements:m},d),{},{components:c,html:a},r),i.panel)}else l.contains(i.panel)&&l.removeChild(i.panel)}(n,t)}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o();var t,n,r=f.value.renderer,i=r.components,l=pa(r,da);c.current=oa(l,f.value.core,{components:(t=i,n=function(e){return!e.value.hasOwnProperty("__autocomplete_componentName")},Object.entries(t).reduce((function(e,t){var r=ua(t,2),o=r[0],a=r[1];return n({key:o,value:a})?la(la({},e),{},sa({},o,a)):e}),{})),initialState:h.current},e),s(),a(),m.value.refresh().then((function(){S(h.current)}))}function x(e){e!==f.value.core.environment.document.body.contains(b.value.detachedOverlay)&&(e?(f.value.core.environment.document.body.appendChild(b.value.detachedOverlay),f.value.core.environment.document.body.classList.add("aa-Detached"),b.value.input.focus()):(f.value.core.environment.document.body.removeChild(b.value.detachedOverlay),f.value.core.environment.document.body.classList.remove("aa-Detached")))}return r((function(){var e=m.value.getEnvironmentProps({formElement:b.value.form,panelElement:b.value.panel,inputElement:b.value.input});return dr(f.value.core.environment,e),function(){dr(f.value.core.environment,Object.keys(e).reduce((function(e,t){return ha(ha({},e),{},ga({},t,void 0))}),{}))}})),r((function(){var e=p.value?f.value.core.environment.document.body:f.value.renderer.panelContainer,t=p.value?b.value.detachedOverlay:b.value.panel;return p.value&&h.current.isOpen&&x(!0),S(h.current),function(){e.contains(t)&&e.removeChild(t)}})),r((function(){var e=f.value.renderer.container;return e.appendChild(b.value.root),function(){e.removeChild(b.value.root)}})),r((function(){var e=Le((function(e){S(e.state)}),0);return d.current=function(t){var n=t.state,r=t.prevState;(p.value&&r.isOpen!==n.isOpen&&x(n.isOpen),p.value||!n.isOpen||r.isOpen||w(),n.query!==r.query)&&f.value.core.environment.document.querySelectorAll(".aa-Panel--scrollable").forEach((function(e){0!==e.scrollTop&&(e.scrollTop=0)}));e({state:n})},function(){d.current=void 0}})),r((function(){var e=Le((function(){var e=p.value;p.value=f.value.core.environment.matchMedia(f.value.renderer.detachedMediaQuery).matches,e!==p.value?k({}):requestAnimationFrame(w)}),20);return f.value.core.environment.addEventListener("resize",e),function(){f.value.core.environment.removeEventListener("resize",e)}})),r((function(){if(!p.value)return function(){};function e(e){b.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",e)}function t(t){e(t.matches)}var n=f.value.core.environment.matchMedia(getComputedStyle(f.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));e(n.matches);var r=Boolean(n.addEventListener);return r?n.addEventListener("change",t):n.addListener(t),function(){r?n.removeEventListener("change",t):n.removeListener(t)}})),r((function(){return requestAnimationFrame(w),function(){}})),ha(ha({},y),{},{update:k,destroy:function(){o()}})}var va=n(1141),ba=n(774),wa=function(e){return ba.tokenizer(e).map((function(e){return e.str}))},Sa=ba,ka=n(689),xa=n.n(ka),_a=["cmfcmfhighlight"];function Ea(){var e,t=(0,l.zy)(),n=(0,l.W6)(),o=(0,he.A)().siteConfig.baseUrl,a=(0,r.useState)({terms:[],isDocsOrBlog:!1}),i=a[0],s=a[1];return(0,r.useEffect)((function(){var e;if(null!=(e=t.state)&&e.cmfcmfhighlight&&0!==t.state.cmfcmfhighlight.terms.length){s(t.state.cmfcmfhighlight);var r=t.state,o=(r.cmfcmfhighlight,(0,k.A)(r,_a));n.replace(Object.assign({},t,{state:o}))}}),[null==(e=t.state)?void 0:e.cmfcmfhighlight,n,t]),(0,r.useEffect)((function(){if(0!==i.terms.length){var e=i.isDocsOrBlog?document.getElementsByTagName("article")[0]:document.getElementsByTagName("main")[0];if(e){var t=new(xa())(e),n={ignoreJoiners:!0};return t.mark(i.terms,n),function(){return t.unmark(n)}}}}),[i,o]),null}var Oa=n(6503),Pa=n(1482),ja=!0;function Ca(e){var t=e.document.sectionRoute.split("#"),n=t[0],r=t[1],o=n;return r&&(o+="#"+r),o}var Aa={documents:[],index:Sa((function(){this.ref("id"),this.field("title"),this.field("content")}))};function Ta(e,t){return Ia.apply(this,arguments)}function Ia(){return(Ia=Ie(Ae().mark((function e(t,n){var r,o;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ja){e.next=18;break}return e.prev=1,e.next=4,fetch(t+"search-index-"+n+".json");case 4:if((o=e.sent).ok){e.next=7;break}return e.abrupt("return",Aa);case 7:return e.next=9,o.json();case 9:r=e.sent,e.next=15;break;case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",Aa);case 15:return e.abrupt("return",{documents:r.documents,index:Sa.Index.load(r.index)});case 18:return e.abrupt("return",Promise.resolve(Aa));case 19:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}const Na=function(){var e=(0,$.A)(),t=(0,r.useState)((function(){return!!e&&"dark"===document.documentElement.getAttribute("data-theme")})),n=t[0],o=t[1];(0,r.useEffect)((function(){var e=new MutationObserver((function(){o("dark"===document.documentElement.getAttribute("data-theme"))}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),function(){return e.disconnect()}}),[]);var a=(0,he.A)().siteConfig.baseUrl,i=(0,Oa.P_)("@cmfcmf/docusaurus-search-local"),u=i.titleBoost,c=i.contentBoost,d=i.tagsBoost,f=i.parentCategoriesBoost,p=i.indexDocSidebarParentCategories,m=i.maxSearchResults,h=(0,l.W6)(),g=(0,Pa.af)().tags,y=(0,r.useRef)(g);(0,r.useEffect)((function(){y.current=g}),[g]);var v=(0,r.useRef)({}),b=function(){var e=Ie(Ae().mark((function e(t){var n,r,o;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=v.current[t],e.t0=null==n?void 0:n.state,e.next="ready"===e.t0?4:void 0===e.t0?5:"loading"===e.t0?12:13;break;case 4:return e.abrupt("return",n);case 5:return r=[],v.current[t]={state:"loading",callbacks:r},e.next=9,Ta(a,t);case 9:return o=e.sent,r.forEach((function(e){return e(o)})),e.abrupt("return",v.current[t]=Object.assign({state:"ready"},o));case 12:return e.abrupt("return",new Promise((function(e){n.callbacks.push(e)})));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=(0,s.T)({message:"cmfcmf/d-s-l.searchBar.placeholder",description:"Placeholder shown in the searchbar"}),S=(0,r.useRef)(null),k=(0,r.useRef)(null);return(0,r.useEffect)((function(){if(S.current)return k.current=ya({container:S.current,placeholder:w,renderer:{createElement:r.createElement,Fragment:r.Fragment,render:Ne.render},navigator:{navigate:function(e){var t=e.item,n=e.itemUrl;h.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},detachedMediaQuery:"",defaultActiveItemId:0,translations:{clearButtonTitle:(0,s.T)({message:"cmfcmf/d-s-l.searchBar.clearButtonTitle",description:"Title of the button to clear the current search input"}),detachedCancelButtonText:(0,s.T)({message:"cmfcmf/d-s-l.searchBar.detachedCancelButtonText",description:"Text of the button to close the detached search window"}),submitButtonTitle:(0,s.T)({message:"cmfcmf/d-s-l.searchBar.submitButtonTitle",description:"Title of the button to submit a new search"})},getSources:function(e){var t=e.query;return[{sourceId:"search-results",templates:{item:function(e){var t=e.item,n=Ca(t);return r.createElement("a",{href:n,className:"aa-ItemLink",onClick:function(e){e.preventDefault(),h.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},r.createElement("div",{className:"aa-ItemContentTitle"},t.document.sectionTitle),t.document.pageTitle!==t.document.sectionTitle&&r.createElement("div",{className:"aa-ItemContentDescription"},t.document.pageTitle))),r.createElement("div",{className:"aa-ItemActions"},r.createElement("button",{className:"aa-ItemActionButton aa-DesktopOnly aa-ActiveOnly",type:"button",title:"Select"},r.createElement("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},r.createElement("path",{d:"M18.984 6.984h2.016v6h-15.188l3.609 3.609-1.406 1.406-6-6 6-6 1.406 1.406-3.609 3.609h13.172v-4.031z"})))))},noResults:function(){return r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},ja?(0,s.T)({message:"cmfcmf/d-s-l.searchBar.noResults",description:"message shown if no results are found"}):"The search index is only available when you run docusaurus build!"))}},getItemUrl:function(e){return Ca(e.item)},getItems:function(){return Ie(Ae().mark((function e(){var n,r,o;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=y.current,e.next=3,Promise.all(n.map((function(e){return b(e)})));case 3:return r=e.sent,o=wa(t),e.abrupt("return",r.flatMap((function(e){var t=e.index,n=e.documents;return t.query((function(e){e.term(o,{fields:["title"],boost:u}),e.term(o,{fields:["title"],boost:u,wildcard:Sa.Query.wildcard.TRAILING}),e.term(o,{fields:["content"],boost:c}),e.term(o,{fields:["content"],boost:c,wildcard:Sa.Query.wildcard.TRAILING}),e.term(o,{fields:["tags"],boost:d}),e.term(o,{fields:["tags"],boost:d,wildcard:Sa.Query.wildcard.TRAILING}),p&&(e.term(o,{fields:["sidebarParentCategories"],boost:f}),e.term(o,{fields:["sidebarParentCategories"],boost:f,wildcard:Sa.Query.wildcard.TRAILING}))})).slice(0,m).map((function(e){return{document:n.find((function(t){return t.id.toString()===e.ref})),score:e.score,terms:o}}))})).sort((function(e,t){return t.score-e.score})).slice(0,m));case 6:case"end":return e.stop()}}),e)})))()}}]}}),function(){var e;return null==(e=k.current)?void 0:e.destroy()}}),[m]),r.createElement(r.Fragment,null,r.createElement(va.A,null,r.createElement("body",{"data-theme":n?"dark":"light"})),r.createElement(Ea,null),r.createElement("div",{className:"dsla-search-wrapper"},r.createElement("div",{className:"dsla-search-field",ref:S,"data-tags":g.join(",")})))},La={navbarSearchContainer:"navbarSearchContainer_Bca1"};function Ra(e){var t=e.children,n=e.className;return(0,c.jsx)("div",{className:(0,o.A)(n,La.navbarSearchContainer),children:t})}var Da=n(9802),Fa=n(2060),Ma=["docId","label","docsPluginId"];var Ba=["sidebarId","label","docsPluginId"];var za=["label","to","docsPluginId"];var Ua=n(2780),$a=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],Ha=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};var Va={default:fe,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,o=e.queryString,a=void 0===o?"":o,i=(0,k.A)(e,je),u=(0,he.A)().i18n,d=u.currentLocale,f=u.locales,p=u.localeConfigs,m=(0,_e.o)(),h=(0,l.zy)(),g=h.search,y=h.hash,v=f.map((function(e){var n=""+("pathname://"+m.createUrl({locale:e,fullyQualified:!1}))+g+y+a;return{label:p[e].label,lang:p[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===d?t?"menu__link--active":"dropdown__link--active":""}})),b=[].concat(n,v,r),w=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):p[d].label;return(0,c.jsx)(xe,Object.assign({},i,{mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Oe,{className:Pe}),w]}),items:b}))},search:function(e){var t=e.mobile,n=e.className;return t?null:(0,c.jsx)(Ra,{className:n,children:(0,c.jsx)(Na,{})})},dropdown:xe,html:function(e){var t=e.value,n=e.className,r=e.mobile,a=void 0!==r&&r,i=e.isDropdownItem,l=void 0!==i&&i,s=l?"li":"div";return(0,c.jsx)(s,{className:(0,o.A)({navbar__item:!a&&!l,"menu__list-item":a},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,r=e.docsPluginId,o=(0,k.A)(e,Ma),a=(0,Da.zK)(r).activeDoc,i=(0,Fa.QB)(t,r),l=(null==a?void 0:a.path)===(null==i?void 0:i.path);return null===i||i.unlisted&&!l?null:(0,c.jsx)(fe,Object.assign({exact:!0},o,{isActive:function(){return l||!(null==a||!a.sidebar)&&a.sidebar===i.sidebar},label:null!=n?n:i.id,to:i.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,r=e.docsPluginId,o=(0,k.A)(e,Ba),a=(0,Da.zK)(r).activeDoc,i=(0,Fa.fW)(t,r).link;if(!i)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,c.jsx)(fe,Object.assign({exact:!0},o,{isActive:function(){return(null==a?void 0:a.sidebar)===t},label:null!=n?n:i.label,to:i.path}))},docsVersion:function(e){var t=e.label,n=e.to,r=e.docsPluginId,o=(0,k.A)(e,za),a=(0,Fa.Vd)(r)[0],i=null!=t?t:a.label,l=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(a).path;return(0,c.jsx)(fe,Object.assign({},o,{label:i,to:l}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,o=e.dropdownItemsBefore,a=e.dropdownItemsAfter,i=(0,k.A)(e,$a),u=(0,l.zy)(),d=u.search,f=u.hash,p=(0,Da.zK)(n),m=(0,Da.jh)(n),h=(0,Ua.g1)(n).savePreferredVersionName,g=m.map((function(e){var t,n=null!=(t=p.alternateDocVersions[e.name])?t:Ha(e);return{label:e.label,to:""+n.path+d+f,isActive:function(){return e===p.activeVersion},onClick:function(){return h(e.name)}}})),y=[].concat(o,g,a),v=(0,Fa.Vd)(n)[0],b=t&&y.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):v.label,w=t&&y.length>1?void 0:Ha(v).path;return y.length<=1?(0,c.jsx)(fe,Object.assign({},i,{mobile:t,label:b,to:w,isActive:r?function(){return!1}:void 0})):(0,c.jsx)(xe,Object.assign({},i,{mobile:t,label:b,to:w,items:y,isActive:r?function(){return!1}:void 0}))}};const Qa=Va;var Wa=["type"];function qa(e){var t=e.type,n=(0,k.A)(e,Wa),r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Qa[r];if(!o)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,c.jsx)(o,Object.assign({},n))}function Ga(){var e=(0,T.M)(),t=(0,w.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map((function(t,n){return(0,r.createElement)(qa,Object.assign({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))}))})}function Ka(e){return(0,c.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function Ya(){var e=0===(0,w.p)().navbar.items.length,t=M();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(Ka,{onClick:function(){return t.hide()}}),t.content]})}function Xa(){var e,t=(0,T.M)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?(0,c.jsx)(B,{header:(0,c.jsx)(J,{}),primaryMenu:(0,c.jsx)(Ga,{}),secondaryMenu:(0,c.jsx)(Ya,{})}):null}const Za={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Ja(e){return(0,c.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,o.A)("navbar-sidebar__backdrop",e.className)}))}function ei(e){var t=e.children,n=(0,w.p)().navbar,a=n.hideOnScroll,i=n.style,l=(0,T.M)(),d=function(e){var t=(0,r.useState)(e),n=t[0],o=t[1],a=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,I.Mq)((function(t,n){var r=t.scrollY;if(e)if(r=l?o(!1):r+u0&&(0,c.jsx)(_i,{links:n}),logo:r&&(0,c.jsx)(ji,{logo:r}),copyright:t&&(0,c.jsx)(Ci,{copyright:t})})}const Ii=r.memo(Ti);var Ni=(0,N.fM)([z.a,S.oq,I.Tv,Ua.VQ,i.Jx,function(e){var t=e.children;return(0,c.jsx)(L.y_,{children:(0,c.jsx)(T.e,{children:(0,c.jsx)(D,{children:t})})})}]);function Li(e){var t=e.children;return(0,c.jsx)(Ni,{children:t})}var Ri=n(5225);function Di(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)(Ri.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(oi,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(ai,{error:t})})]})})})}const Fi={mainWrapper:"mainWrapper_z2l0"};function Mi(e){var t=e.children,n=e.noFooter,r=e.wrapperClassName,l=e.title,s=e.description;return(0,y.J)(),(0,c.jsxs)(Li,{children:[(0,c.jsx)(i.be,{title:l,description:s}),(0,c.jsx)(b,{}),(0,c.jsx)(A,{}),(0,c.jsx)(hi,{}),(0,c.jsx)("div",{id:d,className:(0,o.A)(g.G.wrapper.main,Fi.mainWrapper,r),children:(0,c.jsx)(a.A,{fallback:function(e){return(0,c.jsx)(Di,Object.assign({},e))},children:t})}),!n&&(0,c.jsx)(Ii,{})]})}},20:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(1367),o=(n(6540),n(4783)),a=n(8180),i=n(7639),l=n(6957),s=n(975),u=n(4848),c=["imageClassName","titleClassName"];function d(e){var t=e.logo,n=e.alt,r=e.imageClassName,o={light:(0,a.A)(t.src),dark:(0,a.A)(t.srcDark||t.src)},i=(0,u.jsx)(s.A,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,u.jsx)("div",{className:r,children:i}):i}function f(e){var t,n=(0,i.A)().siteConfig.title,s=(0,l.p)().navbar,f=s.title,p=s.logo,m=e.imageClassName,h=e.titleClassName,g=(0,r.A)(e,c),y=(0,a.A)((null==p?void 0:p.href)||"/"),v=f?"":n,b=null!=(t=null==p?void 0:p.alt)?t:v;return(0,u.jsxs)(o.A,Object.assign({to:y},g,(null==p?void 0:p.target)&&{target:p.target},{children:[p&&(0,u.jsx)(d,{logo:p,alt:b,imageClassName:m}),null!=f&&(0,u.jsx)("b",{className:h,children:f})]}))}},1210:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(1141),o=n(4848);function a(e){var t=e.locale,n=e.version,a=e.tag,i=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},975:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(1367),o=n(6540),a=n(5066),i=n(1062),l=n(7710);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var u=n(4848);function c(e){var t=e.className,n=e.children,r=(0,i.A)(),c=(0,l.G)().colorMode;return(0,u.jsx)(u.Fragment,{children:(r?"dark"===c?["dark"]:["light"]:["light","dark"]).map((function(e){var r=n({theme:e,className:(0,a.A)(t,s.themedComponent,s["themedComponent--"+e])});return(0,u.jsx)(o.Fragment,{children:r},e)}))})}var d=["sources","className","alt"];function f(e){var t=e.sources,n=e.className,o=e.alt,a=(0,r.A)(e,d);return(0,u.jsx)(c,{className:n,children:function(e){var n=e.theme,r=e.className;return(0,u.jsx)("img",Object.assign({src:t[n],alt:o,className:r},a))}})}},4549:(e,t,n)=>{"use strict";n.d(t,{N:()=>w,u:()=>f});var r=n(1367),o=n(6540),a=n(1712),i=n(6494),l=n(6350),s=n(4848),u=["collapsed"],c=["lazy"],d="ease-in-out";function f(e){var t=e.initialState,n=(0,o.useState)(null!=t&&t),r=n[0],a=n[1],i=(0,o.useCallback)((function(){a((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:a,toggleCollapsed:i}}var p={display:"none",overflow:"hidden",height:"0px"},m={display:"block",overflow:"visible",height:"auto"};function h(e,t){var n=t?p:m;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function g(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,a=(0,o.useRef)(!1);(0,o.useEffect)((function(){var e,o=t.current;function i(){var e,t,n=o.scrollHeight,a=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,l.O)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+a+"ms "+(null!=(t=null==r?void 0:r.easing)?t:d),height:n+"px"}}function s(){var e=i();o.style.transition=e.transition,o.style.height=e.height}if(!a.current)return h(o,n),void(a.current=!0);return o.style.willChange="height",e=requestAnimationFrame((function(){n?(s(),requestAnimationFrame((function(){o.style.height=p.height,o.style.overflow=p.overflow}))):(o.style.display="block",requestAnimationFrame((function(){s()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function y(e){if(!a.A.canUseDOM)return e?p:m}function v(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,a=e.children,i=e.animation,l=e.onCollapseTransitionEnd,u=e.className,c=e.disableSSRStyle,d=(0,o.useRef)(null);return g({collapsibleRef:d,collapsed:r,animation:i}),(0,s.jsx)(n,{ref:d,style:c?void 0:y(r),onTransitionEnd:function(e){"height"===e.propertyName&&(h(d.current,r),null==l||l(r))},className:u,children:a})}function b(e){var t=e.collapsed,n=(0,r.A)(e,u),a=(0,o.useState)(!t),l=a[0],c=a[1],d=(0,o.useState)(t),f=d[0],p=d[1];return(0,i.A)((function(){t||c(!0)}),[t]),(0,i.A)((function(){l&&p(t)}),[l,t]),l?(0,s.jsx)(v,Object.assign({},n,{collapsed:f})):null}function w(e){var t=e.lazy,n=(0,r.A)(e,c),o=t?b:v;return(0,s.jsx)(o,Object.assign({},n))}},2:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>h,oq:()=>m});var r=n(6540),o=n(1062),a=n(1269),i=n(7094),l=n(6957),s=n(4848),u=(0,a.Wf)("docusaurus.announcement.dismiss"),c=(0,a.Wf)("docusaurus.announcement.id"),d=function(){return"true"===u.get()},f=function(e){return u.set(String(e))},p=r.createContext(null);function m(e){var t=e.children,n=function(){var e=(0,l.p)().announcementBar,t=(0,o.A)(),n=(0,r.useState)((function(){return!!t&&d()})),a=n[0],i=n[1];(0,r.useEffect)((function(){i(d())}),[]);var s=(0,r.useCallback)((function(){f(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=c.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;c.set(t),r&&f(!1),!r&&d()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!a,close:s}}),[e,a,s])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function h(){var e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},7710:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>g});var r=n(6540),o=n(1712),a=n(7094),i=n(1269),l=n(6957),s=n(4848),u=r.createContext(void 0),c="theme",d=(0,i.Wf)(c),f={light:"light",dark:"dark"},p=function(e){return e===f.dark?f.dark:f.light},m=function(e){return o.A.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e)},h=function(e){d.set(p(e))};function g(e){var t=e.children,n=function(){var e=(0,l.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,o=e.respectPrefersColorScheme,a=(0,r.useState)(m(t)),i=a[0],s=a[1];(0,r.useEffect)((function(){n&&d.del()}),[n]);var u=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,a=void 0===r||r;e?(s(e),a&&h(e)):(s(o?window.matchMedia("(prefers-color-scheme: dark)").matches?f.dark:f.light:t),d.del())}),[o,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",p(i))}),[i]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===c){var t=d.get();null!==t&&u(p(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,u]);var g=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||o){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||g.current?g.current=window.matchMedia("print").matches:u(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[u,n,o]),(0,r.useMemo)((function(){return{colorMode:i,setColorMode:u,get isDarkTheme(){return i===f.dark},setLightTheme:function(){u(f.light)},setDarkTheme:function(){u(f.dark)}}}),[i,u])}();return(0,s.jsx)(u.Provider,{value:n,children:t})}function y(){var e=(0,r.useContext)(u);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},2780:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>y,XK:()=>w,g1:()=>b});var r=n(6540),o=n(9802),a=n(4598),i=n(6957),l=n(2060),s=n(7094),u=n(1269),c=n(4848),d=function(e){return"docs-preferred-version-"+e},f={save:function(e,t,n){(0,u.Wf)(d(e),{persistence:t}).set(n)},read:function(e,t){return(0,u.Wf)(d(e),{persistence:t}).get()},clear:function(e,t){(0,u.Wf)(d(e),{persistence:t}).del()}},p=function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))};var m=r.createContext(null);function h(){var e=(0,o.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),a=(0,r.useState)((function(){return p(n)})),l=a[0],s=a[1];return(0,r.useEffect)((function(){s(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,o=f.read(t,n),r[t].versions.some((function(e){return e.name===o}))?{preferredVersionName:o}:(f.clear(t,n),{preferredVersionName:null}))];var t,o})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[l,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){f.save(e,t,n),s((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function g(e){var t=e.children,n=h();return(0,c.jsx)(m.Provider,{value:n,children:t})}function y(e){var t=e.children;return l.C5?(0,c.jsx)(g,{children:t}):(0,c.jsx)(c.Fragment,{children:t})}function v(){var e=(0,r.useContext)(m);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function b(e){var t;void 0===e&&(e=a.W);var n=(0,o.ht)(e),i=v(),l=i[0],s=i[1],u=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===u})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){s.savePreferredVersion(e,t)}),[s,e])}}function w(){var e=(0,o.Gy)(),t=v()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(r=n,a=e[r],i=t[r].preferredVersionName,null!=(o=a.versions.find((function(e){return e.name===i})))?o:null)];var r,o,a,i})))}},403:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,t:()=>u});var r=n(6540),o=n(7094),a=n(4848),i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){var t=e.children,n=e.name,o=e.items,i=(0,r.useMemo)((function(){return n&&o?{name:n,items:o}:null}),[n,o]);return(0,a.jsx)(l.Provider,{value:i,children:t})}function u(){var e=(0,r.useContext)(l);if(e===i)throw new o.dV("DocsSidebarProvider");return e}},3403:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),o=n(7094),a=n(4848),i=r.createContext(null);function l(e){var t=e.children,n=e.version;return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(null===e)throw new o.dV("DocsVersionProvider");return e}},1938:(e,t,n)=>{"use strict";n.d(t,{M:()=>p,e:()=>f});var r=n(6540),o=n(763),a=n(2216),i=n(2814),l=n(6957),s=n(7094),u=n(4848),c=r.createContext(void 0);function d(){var e,t=(e=(0,o.YL)(),0===(0,l.p)().navbar.items.length&&!e.component),n=(0,a.l)(),s=!t&&"mobile"===n,u=(0,r.useState)(!1),c=u[0],d=u[1];(0,i.$Z)((function(){if(c)return d(!1),!1}));var f=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:s,toggle:f,shown:c}}),[t,s,f,c])}function f(e){var t=e.children,n=d();return(0,u.jsx)(c.Provider,{value:n,children:t})}function p(){var e=r.useContext(c);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},763:(e,t,n)=>{"use strict";n.d(t,{GX:()=>u,YL:()=>s,y_:()=>l});var r=n(6540),o=n(7094),a=n(4848),i=r.createContext(null);function l(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){var t=e.component,n=e.props,a=(0,r.useContext)(i);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");var l=a[1],s=(0,o.Be)(n);return(0,r.useEffect)((function(){l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((function(){return function(){return l({component:null,props:null})}}),[l]),null}},9503:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(6540),o="navigation-with-keyboard";function a(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},2216:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(6540),o=n(1712),a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(e){var t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?i:t,l=(0,r.useState)((function(){return"ssr"})),s=l[0],u=l[1];return(0,r.useEffect)((function(){function e(){u(function(e){if(!o.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(n))}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),s}},8630:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},6350:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},2060:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Nr:()=>h,w8:()=>v,C5:()=>m,B5:()=>O,Vd:()=>x,QB:()=>E,fW:()=>_,OF:()=>k,Y:()=>w});var a=n(6540),i=n(6347),l=n(2831),s=n(9802),u=n(2780),c=n(3403),d=n(403),f=n(5167),p=n(260),m=!!s.Gy;function h(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(var t,n=o(e.items);!(t=n()).done;){var r=h(t.value);if(r)return r}}(e):void 0:e.href}var g=function(e,t){return void 0!==e&&(0,p.ys)(e,t)},y=function(e,t){return e.some((function(e){return v(e,t)}))};function v(e,t){return"link"===e.type?g(e.href,t):"category"===e.type&&(g(e.href,t)||y(e.items,t))}function b(e,t){switch(e.type){case"category":return v(e,t)||e.items.some((function(e){return b(e,t)}));case"link":return!e.unlisted||v(e,t);default:return!0}}function w(e,t){return(0,a.useMemo)((function(){return e.filter((function(e){return b(e,t)}))}),[e,t])}function S(e){var t=e.sidebarItems,n=e.pathname,r=e.onlyCategories,a=void 0!==r&&r,i=[];return function e(t){for(var r,l=o(t);!(r=l()).done;){var s=r.value;if("category"===s.type&&((0,p.ys)(s.href,n)||e(s.items))||"link"===s.type&&(0,p.ys)(s.href,n))return a&&"category"!==s.type||i.unshift(s),!0}return!1}(t),i}function k(){var e,t=(0,d.t)(),n=(0,i.zy)().pathname;return!1!==(null==(e=(0,s.vT)())?void 0:e.pluginData.breadcrumbs)&&t?S({sidebarItems:t.items,pathname:n}):null}function x(e){var t=(0,s.zK)(e).activeVersion,n=(0,u.g1)(e).preferredVersion,r=(0,s.r7)(e);return(0,a.useMemo)((function(){return(0,f.s)([t,n,r].filter(Boolean))}),[t,n,r])}function _(e,t){var n=x(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map((function(e){return e[0]})).join("\n- "));return r[1]}),[e,n])}function E(e,t){var n=x(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+(0,f.s)(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function O(e){var t=e.route,n=(0,i.zy)(),r=(0,c.r)(),o=t.routes,a=o.find((function(e){return(0,i.B6)(n.pathname,e)}));if(!a)return null;var s=a.sidebar,u=s?r.docsSidebars[s]:void 0;return{docElement:(0,l.v)(o),sidebarName:s,sidebarItems:u}}},7942:(e,t,n)=>{"use strict";n.d(t,{s:()=>o});var r=n(7639);function o(e){var t=(0,r.A)().siteConfig,n=t.title,o=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+o+" "+n:n}},2814:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>l,l:()=>s});var r=n(6540),o=n(6347),a=n(7094);function i(e){!function(e){var t=(0,o.W6)(),n=(0,a._q)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}function l(e){return t=function(t){return null===e?null:new URLSearchParams(t.location.search).get(e)},n=(0,o.W6)(),(0,r.useSyncExternalStore)(n.listen,(function(){return t(n)}),(function(){return t(n)}));var t,n}function s(e){var t,n,a=null!=(t=l(e))?t:"",i=(n=(0,o.W6)(),(0,r.useCallback)((function(e,t,r){var o=new URLSearchParams(n.location.search);t?o.set(e,t):o.delete(e),(null!=r&&r.push?n.push:n.replace)({search:o.toString()})}),[n]));return[a,(0,r.useCallback)((function(t,n){i(e,t,n)}),[i,e])]}},5167:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=function(e,t){return e===t}),e.filter((function(n,r){return e.findIndex((function(e){return t(e,n)}))!==r}))}function o(e){return Array.from(new Set(e))}n.d(t,{X:()=>r,s:()=>o})},4239:(e,t,n)=>{"use strict";n.d(t,{e3:()=>p,be:()=>d,Jx:()=>m});var r=n(6540),o=n(5066),a=n(1141),i=n(3363);function l(){var e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(8180),u=n(7942),c=n(4848);function d(e){var t=e.title,n=e.description,r=e.keywords,o=e.image,i=e.children,l=(0,u.s)(t),d=(0,s.h)().withBaseUrl,f=o?d(o,{absolute:!0}):void 0;return(0,c.jsxs)(a.A,{children:[t&&(0,c.jsx)("title",{children:l}),t&&(0,c.jsx)("meta",{property:"og:title",content:l}),n&&(0,c.jsx)("meta",{name:"description",content:n}),n&&(0,c.jsx)("meta",{property:"og:description",content:n}),r&&(0,c.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),f&&(0,c.jsx)("meta",{property:"og:image",content:f}),f&&(0,c.jsx)("meta",{name:"twitter:image",content:f}),i]})}var f=r.createContext(void 0);function p(e){var t=e.className,n=e.children,i=r.useContext(f),l=(0,o.A)(i,t);return(0,c.jsxs)(f.Provider,{value:l,children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("html",{className:l})}),n]})}function m(e){var t=e.children,n=l(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),a="plugin-id-"+n.plugin.id;return(0,c.jsx)(p,{className:(0,o.A)(r,a),children:t})}},7094:(e,t,n)=>{"use strict";n.d(t,{dV:()=>m,fM:()=>g,_q:()=>f,ZC:()=>p,Be:()=>h});var r=n(17),o=n(6711);function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var i=n(7778);function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(l())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&(0,i.A)(o,n.prototype),o}(e,arguments,a(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,e)},s(e)}var u=n(6540),c=n(6494),d=n(4848);function f(e){var t=(0,u.useRef)(e);return(0,c.A)((function(){t.current=e}),[e]),(0,u.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function p(e){var t=(0,u.useRef)();return(0,c.A)((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var o,a,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(o=null==(a=i.stack)||null==(a=a.split("\n")[1])||null==(a=a.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:a.groups.name)?o:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,o.A)(t,e),t}(s(Error));function h(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,u.useMemo)((function(){return e}),t.flat())}function g(e){return function(t){var n=t.children;return(0,d.jsx)(d.Fragment,{children:e.reduceRight((function(e,t){return(0,d.jsx)(t,{children:e})}),n)})}}},7865:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},260:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),o=n(2413),a=n(7639);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,a.A)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:o.A,baseUrl:e})}),[e])}},4245:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>p,Tv:()=>c,a_:()=>m,gk:()=>h});var r=n(6540),o=n(1712),a=n(1062),i=n(6494),l=n(7094),s=n(4848);var u=r.createContext(void 0);function c(e){var t,n=e.children,o=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return(0,s.jsx)(u.Provider,{value:o,children:n})}function d(){var e=(0,r.useContext)(u);if(null==e)throw new l.dV("ScrollControllerProvider");return e}var f=function(){return o.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function p(e,t){void 0===t&&(t=[]);var n=d().scrollEventsEnabledRef,o=(0,r.useRef)(f()),a=(0,l._q)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=f();a(e,o.current),o.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[a,n].concat(t))}function m(){var e,t,n,o=d(),a=(e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((function(t){e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((function(){var t=e.current,n=t.elem,r=t.top;if(!n)return{restored:!1};var o=n.getBoundingClientRect().top-r;return o&&window.scrollBy({left:0,top:o}),e.current={elem:null,top:0},{restored:0!==o}}),[]),(0,r.useMemo)((function(){return{save:t,restore:n}}),[n,t])),l=(0,r.useRef)(void 0),s=(0,r.useCallback)((function(e){a.save(e),o.disableScrollEvents(),l.current=function(){var e=a.restore().restored;if(l.current=void 0,e){window.addEventListener("scroll",(function e(){o.enableScrollEvents(),window.removeEventListener("scroll",e)}))}else o.enableScrollEvents()}}),[o,a]);return(0,i.A)((function(){queueMicrotask((function(){return null==l.current?void 0:l.current()}))})),{blockElementScrollPositionUntilNextRender:s}}function h(){var e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var o=document.documentElement.scrollTop;(n&&o>e||!n&&o{"use strict";n.d(t,{Cy:()=>i,af:()=>s,tU:()=>l});var r=n(9802),o=n(7639),a=n(2780),i="default";function l(e,t){return"docs-"+e+"-"+t}function s(){var e=(0,o.A)().i18n,t=(0,r.Gy)(),n=(0,r.gk)(),s=(0,a.XK)();var u=[i].concat(Object.keys(t).map((function(e){var r,o=(null==n?void 0:n.activePlugin.pluginId)===e?n.activeVersion:void 0,a=s[e],i=t[e].versions.find((function(e){return e.isLast}));return l(e,(null!=(r=null!=o?o:a)?r:i).name)})));return{locale:e.currentLocale,tags:u}}},1269:(e,t,n)=>{"use strict";n.d(t,{Dv:()=>c,Wf:()=>u});var r=n(6540),o="localStorage";function a(e){var t=e.key,n=e.oldValue,r=e.newValue,o=e.storage;if(n!==r){var a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}}function i(e){if(void 0===e&&(e=o),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}var l=!1;var s={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function u(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(e);var n=i(null==t?void 0:t.persistence);return null===n?s:{get:function(){try{return n.getItem(e)}catch(t){return console.error("Docusaurus storage error, can't get key="+e,t),null}},set:function(t){try{var r=n.getItem(e);n.setItem(e,t),a({key:e,oldValue:r,newValue:t,storage:n})}catch(o){console.error("Docusaurus storage error, can't set "+e+"="+t,o)}},del:function(){try{var t=n.getItem(e);n.removeItem(e),a({key:e,oldValue:t,newValue:null,storage:n})}catch(r){console.error("Docusaurus storage error, can't delete key="+e,r)}},listen:function(t){try{var r=function(r){r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),function(){return window.removeEventListener("storage",r)}}catch(o){return console.error("Docusaurus storage error, can't listen for changes of key="+e,o),function(){}}}}}function c(e,t){var n=(0,r.useRef)((function(){return null===e?s:u(e,t)})).current(),o=(0,r.useCallback)((function(e){return"undefined"==typeof window?function(){}:n.listen(e)}),[n]);return[(0,r.useSyncExternalStore)(o,(function(){return"undefined"==typeof window?null:n.get()}),(function(){return null})),n]}},2098:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(7639),o=n(6347),a=n(4609);function i(){var e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,i=t.url,l=t.trailingSlash,s=e.i18n,u=s.defaultLocale,c=s.currentLocale,d=(0,o.zy)().pathname,f=(0,a.applyTrailingSlash)(d,{trailingSlash:l,baseUrl:n}),p=c===u?n:n.replace("/"+c+"/","/"),m=f.replace(n,"");return{createUrl:function(e){var t=e.locale;return""+(e.fullyQualified?i:"")+function(e){return e===u?""+p:""+p+e+"/"}(t)+m}}}},4067:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),o=n(6347),a=n(7094);function i(e){var t=(0,o.zy)(),n=(0,a.ZC)(t),i=(0,a._q)(e);(0,r.useEffect)((function(){n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6957:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(7639);function o(){return(0,r.A)().siteConfig.themeConfig}},4356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var o,a=e.split(/[#?]/)[0],i="/"===a||a===r?a:(o=a,n?function(e){return e.endsWith("/")?e:e+"/"}(o):function(e){return e.endsWith("/")?e.slice(0,-1):e}(o));return e.replace(a,i)}},8274:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t].concat(e(t.cause)):[t]}},4609:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var o=n(4356);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(o).default}});var a=n(8274);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return a.getErrorCausalChain}})},53:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to})},1513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>O,yJ:()=>p,sC:()=>j,AO:()=>f});var r=n(9668);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r=0;f--){var p=i[f];"."===p?a(i,f):".."===p?(a(i,f),d++):d&&(a(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(8997);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function p(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=p(e,t,h(),w.location);c.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),g=0;g{"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},689:function(e){e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=o,this.iframesTimeout=a}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var o=e.contentWindow;if(r=o.document,!o||!r)throw new Error("iframe inaccessible")}catch(a){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,o=!1,a=null,i=function i(){if(!o){o=!0,clearTimeout(a);try{r.isIframeBlank(e)||(e.removeEventListener("load",i),r.getIframeContents(e,t,n))}catch(l){n()}}};e.addEventListener("load",i),a=setTimeout(i,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(r){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,(function(){return!0}),(function(e){r++,n.waitForIframes(e.querySelector("html"),(function(){--r||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,r){var o=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=t.querySelectorAll("iframe"),l=i.length,s=0;i=Array.prototype.slice.call(i);var u=function(){--l<=0&&a(s)};l||u(),i.forEach((function(t){e.matches(t,o.exclude)?u():o.onIframeReady(t,(function(e){n(t)&&(s++,r(e)),u()}),u)}))}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var o=!1,a=!1;return r.forEach((function(e,t){e.val===n&&(o=t,a=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==o||a?!1===o||a||(r[o].handled=!0):r.push({val:n,handled:!0}),!0):(!1===o&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var o=this;e.forEach((function(e){e.handled||o.getIframeContents(e.val,(function(e){o.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,o){for(var a=this,i=this.createIterator(t,e,r),l=[],s=[],u=void 0,c=void 0,d=function(){var e=a.getIteratorNode(i);return c=e.prevNode,u=e.node};d();)this.iframes&&this.forEachIframe(t,(function(e){return a.checkIframeFilter(u,c,e,l)}),(function(t){a.createInstanceOnIframe(t).forEachNode(e,(function(e){return s.push(e)}),r)})),s.push(u);s.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(l,e,n,r),o()}},{key:"forEachNode",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=this.getContexts(),i=a.length;i||o(),a.forEach((function(a){var l=function(){r.iterateThroughNodes(e,a,t,n,(function(){--i<=0&&o()}))};r.iframes?r.waitForIframes(a,l):l()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var o=!1;return n.every((function(t){return!r.call(e,t)||(o=!0,!1)})),o}return!1}}]),e}(),a=function(){function a(e){t(this,a),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(a,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var o in t)if(t.hasOwnProperty(o)){var a=t[o],i="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o),l="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(a):this.escapeStr(a);""!==i&&""!==l&&(e=e.replace(new RegExp("("+this.escapeStr(i)+"|"+this.escapeStr(l)+")","gm"+n),r+"("+this.processSynomyms(i)+"|"+this.processSynomyms(l)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":"\x01"}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":"\x02"}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105","A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010d","C\xc7\u0106\u010c","d\u0111\u010f","D\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119","E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012b","I\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142","L\u0141","n\xf1\u0148\u0144","N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014d","O\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159","R\u0158","s\u0161\u015b\u0219\u015f","S\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163","T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016b","U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xff","Y\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017a","Z\u017d\u017b\u0179"]:["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010dC\xc7\u0106\u010c","d\u0111\u010fD\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012bI\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142L\u0141","n\xf1\u0148\u0144N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014dO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159R\u0158","s\u0161\u015b\u0219\u015fS\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016bU\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xffY\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017aZ\u017d\u017b\u0179"],r=[];return e.split("").forEach((function(o){n.every((function(n){if(-1!==n.indexOf(o)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\xa1\xbf",r=this.opt.accuracy,o="string"==typeof r?r:r.value,a="string"==typeof r?[]:r.limiters,i="";switch(a.forEach((function(e){i+="|"+t.escapeStr(e)})),o){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr(n)))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var o=t.callNoMatchOnInvalidRanges(e,r),a=o.start,i=o.end;o.valid&&(e.start=a,e.length=i-a,n.push(e),r=i)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,o=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?o=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:o}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,o=!0,a=n.length,i=t-a,l=parseInt(e.start,10)-i;return(r=(l=l>a?a:l)+parseInt(e.length,10))>a&&(r=a,this.log("End range automatically set to the max value of "+a)),l<0||r-l<0||l>a||r>a?(o=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(l,r).replace(/\s+/g,"")&&(o=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:r,valid:o}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:r})}))}},{key:"matchesExclude",value:function(e){return o.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",o=e.splitText(t),a=o.splitText(n-t),i=document.createElement(r);return i.setAttribute("data-markjs","true"),this.opt.className&&i.setAttribute("class",this.opt.className),i.textContent=o.textContent,o.parentNode.replaceChild(i,o),a}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,o){var a=this;e.nodes.every((function(i,l){var s=e.nodes[l+1];if(void 0===s||s.start>t){if(!r(i.node))return!1;var u=t-i.start,c=(n>i.end?i.end:n)-i.start,d=e.value.substr(0,i.start),f=e.value.substr(c+i.start);if(i.node=a.wrapRangeInTextNode(i.node,u,c),e.value=d+f,e.nodes.forEach((function(t,n){n>=l&&(e.nodes[n].start>0&&n!==l&&(e.nodes[n].start-=c),e.nodes[n].end-=c)})),n-=c,o(i.node.previousSibling,i.start),!(n>i.end))return!1;t=i.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,o){var a=this,i=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var o=void 0;null!==(o=e.exec(t.textContent))&&""!==o[i];)if(n(o[i],t)){var l=o.index;if(0!==i)for(var s=1;s{"use strict";n.r(t)},2697:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),u=a.querySelector(r.barSelector),c=r.speed,d=r.easing;return a.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){s(a,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),l=e?"-100":a(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&p(o),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},7022:()=>{!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=a.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=a[o],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++o;var h=f.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(m+p.length),v=[];h&&v.push.apply(v,i([h])),v.push(g),y&&v.push.apply(v,i([y])),"string"==typeof u?l.splice.apply(l,[s,1].concat(v)):u.content=v}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(Prism)},905:()=>{!function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism)},5342:()=>{!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)},1089:(e,t,n)=>{var r={"./prism-bash":7022,"./prism-powershell":905,"./prism-rust":5342};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=1089},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),o=n(9982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n