diff --git a/404.html b/404.html index 995c945..53be906 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Credo - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/assets/js/042faa40.1106d714.js b/assets/js/042faa40.1106d714.js new file mode 100644 index 0000000..752f7a2 --- /dev/null +++ b/assets/js/042faa40.1106d714.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[4664],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=s(r),m=i,f=d["".concat(l,".").concat(m)]||d[m]||p[m]||o;return r?n.createElement(f,a(a({ref:t},u),{},{components:r})):n.createElement(f,a({ref:t},u))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:i,a[1]=c;for(var s=2;s{r.d(t,{Z:()=>g});var n=r(67294),i=r(86010),o=r(53438),a=r(39960),c=r(13919),l=r(95999);const s={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function u(e){let{href:t,children:r}=e;return n.createElement(a.Z,{href:t,className:(0,i.Z)("card padding--lg",s.cardContainer)},r)}function d(e){let{href:t,icon:r,title:o,description:a}=e;return n.createElement(u,{href:t},n.createElement("h2",{className:(0,i.Z)("text--truncate",s.cardTitle),title:o},r," ",o),a&&n.createElement("p",{className:(0,i.Z)("text--truncate",s.cardDescription),title:a},a))}function p(e){let{item:t}=e;const r=(0,o.Wl)(t);return r?n.createElement(d,{href:r,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,l.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const r=(0,c.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",i=(0,o.xz)(t.docId??void 0);return n.createElement(d,{href:t.href,icon:r,title:t.label,description:i?.description})}function f(e){let{item:t}=e;switch(t.type){case"link":return n.createElement(m,{item:t});case"category":return n.createElement(p,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function y(e){let{className:t}=e;const r=(0,o.jA)();return n.createElement(g,{items:r.items,className:t})}function g(e){const{items:t,className:r}=e;if(!t)return n.createElement(y,e);const a=(0,o.MN)(t);return n.createElement("section",{className:(0,i.Z)("row",r)},a.map(((e,t)=>n.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},n.createElement(f,{item:e})))))}},64453:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>m,frontMatter:()=>a,metadata:()=>l,toc:()=>u});var n=r(87462),i=(r(67294),r(3905)),o=r(52991);const a={},c="OpenID for Verifiable Credentials Tutorials",l={unversionedId:"tutorials/openid4vc/index",id:"tutorials/openid4vc/index",title:"OpenID for Verifiable Credentials Tutorials",description:"This section covers all tutorials related to the OpenID for Verifiable Credentials module in Credo. Before you start, make sure you have configured the required OpenID4VC modules on your agent according to the OpenID4VC Setup Guide",source:"@site/guides/tutorials/openid4vc/index.md",sourceDirName:"tutorials/openid4vc",slug:"/tutorials/openid4vc/",permalink:"/guides/tutorials/openid4vc/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Mediation",permalink:"/guides/tutorials/mediation"},next:{title:"Issuing Credentials using the OpenID4VC Issuer Module",permalink:"/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module"}},s={},u=[],d={toc:u},p="wrapper";function m(e){let{components:t,...r}=e;return(0,i.kt)(p,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"openid-for-verifiable-credentials-tutorials"},"OpenID for Verifiable Credentials Tutorials"),(0,i.kt)("p",null,"This section covers all tutorials related to the OpenID for Verifiable Credentials module in Credo. Before you start, make sure you have configured the required OpenID4VC modules on your agent according to the ",(0,i.kt)("a",{parentName:"p",href:"/guides/getting-started/set-up/openid4vc"},"OpenID4VC Setup Guide")),(0,i.kt)(o.Z,{mdxType:"DocCardList"}))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0c824aea.a10d5a6a.js b/assets/js/0c824aea.a10d5a6a.js deleted file mode 100644 index dd981b9..0000000 --- a/assets/js/0c824aea.a10d5a6a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[1350],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(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 o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,s=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=c(n),m=a,h=d["".concat(l,".").concat(m)]||d[m]||p[m]||s;return n?r.createElement(h,o(o({ref:t},u),{},{components:n})):r.createElement(h,o({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var s=n.length,o=new Array(s);o[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:a,o[1]=i;for(var c=2;c{n.d(t,{Z:()=>g});var r=n(67294),a=n(86010),s=n(53438),o=n(39960),i=n(13919),l=n(95999);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function u(e){let{href:t,children:n}=e;return r.createElement(o.Z,{href:t,className:(0,a.Z)("card padding--lg",c.cardContainer)},n)}function d(e){let{href:t,icon:n,title:s,description:o}=e;return r.createElement(u,{href:t},r.createElement("h2",{className:(0,a.Z)("text--truncate",c.cardTitle),title:s},n," ",s),o&&r.createElement("p",{className:(0,a.Z)("text--truncate",c.cardDescription),title:o},o))}function p(e){let{item:t}=e;const n=(0,s.Wl)(t);return n?r.createElement(d,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,l.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const n=(0,i.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,s.xz)(t.docId??void 0);return r.createElement(d,{href:t.href,icon:n,title:t.label,description:a?.description})}function h(e){let{item:t}=e;switch(t.type){case"link":return r.createElement(m,{item:t});case"category":return r.createElement(p,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function f(e){let{className:t}=e;const n=(0,s.jA)();return r.createElement(g,{items:n.items,className:t})}function g(e){const{items:t,className:n}=e;if(!t)return r.createElement(f,e);const o=(0,s.MN)(t);return r.createElement("section",{className:(0,a.Z)("row",n)},o.map(((e,t)=>r.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},r.createElement(h,{item:e})))))}},85162:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(67294),a=n(86010);const s={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(s.tabItem,o),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),s=n(86010),o=n(12466),i=n(16550),l=n(91980),c=n(67392),u=n(50012);function d(e){return function(e){return a.Children.map(e,(e=>{if((0,a.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),s=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(s),(0,a.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(r.location.search);t.set(s,e),r.replace({...r.location,search:t.toString()})}),[s,r])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,s=p(e),[o,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:s}))),[l,c]=h({queryString:n,groupId:r}),[d,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,s]=(0,u.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&s.set(e)}),[n,s])]}({groupId:r}),g=(()=>{const e=l??d;return m({value:e,tabValues:s})?e:null})();(0,a.useLayoutEffect)((()=>{g&&i(g)}),[g]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),f(e)}),[c,f,s]),tabValues:s}}var g=n(72389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:i,selectValue:l,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=u.indexOf(t),r=c[n].value;r!==i&&(d(t),l(r))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:o}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:p},o,{className:(0,s.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function y(e){const t=f(e);return a.createElement("div",{className:(0,s.Z)("tabs-container",b.tabList)},a.createElement(k,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function w(e){const t=(0,g.Z)();return a.createElement(y,(0,r.Z)({key:String(t)},e))}},77114:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=n(87462),a=(n(67294),n(3905)),s=n(74866),o=n(85162);n(52991);const i={},l="cheqd",c={unversionedId:"getting-started/set-up/cheqd/index",id:"getting-started/set-up/cheqd/index",title:"cheqd",description:"cheqd is a blockchain network, built in the Cosmos ecosystem for Self-Sovereign Identity (SSI). The cheqd Network leverages the cheqd DID method and enables DID-Linked Resources to be written to the network, associated with a DID and controlled using the verification methods in the DID Document.",source:"@site/guides/getting-started/set-up/cheqd/index.md",sourceDirName:"getting-started/set-up/cheqd",slug:"/getting-started/set-up/cheqd/",permalink:"/guides/getting-started/set-up/cheqd/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Indy VDR",permalink:"/guides/getting-started/set-up/indy-vdr"},next:{title:"Concepts",permalink:"/guides/concepts/"}},u={},d=[{value:"Installing cheqd",id:"installing-cheqd",level:3},{value:"React Native",id:"react-native",level:4},{value:"Adding the cheqd to the Agent",id:"adding-the-cheqd-to-the-agent",level:3},{value:"Tutorials",id:"tutorials",level:3}],p={toc:d},m="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"cheqd"},"cheqd"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/cheqd/sdk"},"cheqd")," is a blockchain network, built in the Cosmos ecosystem for Self-Sovereign Identity (SSI). The cheqd Network leverages the ",(0,a.kt)("a",{parentName:"p",href:"https://docs.cheqd.io/identity/architecture/adr-list/adr-001-cheqd-did-method"},"cheqd DID method")," and enables ",(0,a.kt)("a",{parentName:"p",href:"https://docs.cheqd.io/identity/architecture/adr-list/adr-002-did-linked-resources"},"DID-Linked Resources")," to be written to the network, associated with a DID and controlled using the verification methods in the DID Document."),(0,a.kt)("p",null,"Through this approach, the cheqd Network is able to natively support the ",(0,a.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-spec/"},"Ledger Agnostic AnonCreds Specification (v1.0)")," through its ",(0,a.kt)("a",{parentName:"p",href:"https://docs.cheqd.io/identity/guides/anoncreds"},"AnonCreds Object Method")," (as well as VC-JWT and JSON-LD)."),(0,a.kt)("p",null,"cheqd also has a dedicated token, $CHEQ, used for identity writes to the network, voting in a decentralised governance framework as well as for various payment flows between verifiers, holders and issuers of Verifiable Credentials."),(0,a.kt)("h3",{id:"installing-cheqd"},"Installing cheqd"),(0,a.kt)("p",null,"When using Credo with the cheqd, there's a few extra dependencies that need to be installed. We need to install the ",(0,a.kt)("inlineCode",{parentName:"p"},"@credo-ts/cheqd")," package, which implements the needed interfaces for the agent."),(0,a.kt)("h4",{id:"react-native"},"React Native"),(0,a.kt)("p",null,"To enable react-native support we need to follow the steps below"),(0,a.kt)("p",null,"In the package.json file add the below code snippet, which replaces the cosmjs dependencies with he cosmjs-rn packages"),(0,a.kt)(s.Z,{mdxType:"Tabs"},(0,a.kt)(o.Z,{label:"NPM",value:"tab1",mdxType:"TabItem"},(0,a.kt)("p",null,"Using ",(0,a.kt)("a",{parentName:"p",href:"https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides"},"NPM ",(0,a.kt)("inlineCode",{parentName:"a"},"overrides"))," we can point the ",(0,a.kt)("inlineCode",{parentName:"p"},"cosmjs")," packages to ",(0,a.kt)("inlineCode",{parentName:"p"},"cosmjs-rn"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "overrides": {\n "@cosmjs/amino": "npm:@cosmjs-rn/amino@^0.27.1",\n "@cosmjs/encoding": "npm:@cosmjs-rn/encoding@^0.27.1",\n "@cosmjs/math": "npm:@cosmjs-rn/math@^0.27.1",\n "@cosmjs/stargate": "npm:@cosmjs-rn/stargate@^0.27.1",\n "@cosmjs/tendermint-rpc": "npm:@cosmjs-rn/tendermint-rpc@^0.27.1",\n "@cosmjs/utils": "npm:@cosmjs-rn/utils@^0.27.1",\n "@cosmjs/proto-signing": "npm:@cosmjs-rn/proto-signing@^0.27.1",\n "@cosmjs/crypto": "npm:@cosmjs-rn/crypto@^0.27.1"\n }\n}\n'))),(0,a.kt)(o.Z,{label:"Yarn",value:"tab2",mdxType:"TabItem"},(0,a.kt)("p",null,"Using ",(0,a.kt)("a",{parentName:"p",href:"https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/"},"Yarn ",(0,a.kt)("inlineCode",{parentName:"a"},"resolutions"))," we can point the ",(0,a.kt)("inlineCode",{parentName:"p"},"cosmjs")," packages to ",(0,a.kt)("inlineCode",{parentName:"p"},"cosmjs-rn"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "resolutions": {\n "@cosmjs/amino": "npm:@cosmjs-rn/amino@^0.27.1",\n "@cosmjs/encoding": "npm:@cosmjs-rn/encoding@^0.27.1",\n "@cosmjs/math": "npm:@cosmjs-rn/math@^0.27.1",\n "@cosmjs/stargate": "npm:@cosmjs-rn/stargate@^0.27.1",\n "@cosmjs/tendermint-rpc": "npm:@cosmjs-rn/tendermint-rpc@^0.27.1",\n "@cosmjs/utils": "npm:@cosmjs-rn/utils@^0.27.1",\n "@cosmjs/proto-signing": "npm:@cosmjs-rn/proto-signing@^0.27.1",\n "@cosmjs/crypto": "npm:@cosmjs-rn/crypto@^0.27.1"\n }\n}\n')))),(0,a.kt)("p",null,"Following that we need to add a buffer polyfill"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add buffer\n")),(0,a.kt)("p",null,"create a shim.js file with the below code snippet"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript"},"import { Buffer } from 'buffer'\nglobal.Buffer = Buffer\n")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"import shim.js")," file into your file where the App is imported"),(0,a.kt)("h3",{id:"adding-the-cheqd-to-the-agent"},"Adding the cheqd to the Agent"),(0,a.kt)("p",null,"After installing the dependencies, we can register the cheqd Module on the agent by adding the below code snippet to the agent constructor."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-cheqd.ts section-1",showLineNumbers:!0,"set-up-cheqd.ts":!0,"section-1":!0},"")),(0,a.kt)("p",null,"The cosmosPayerSeed can be a 32-bit seed value or a mnemonic, which can be managed using Keplr wallet which can be installed on a mobile or as a browser extension in chrome or safari which allows user's to create accounts, exchange tokens etc. To setup keplr wallet for cheqd follow this ",(0,a.kt)("a",{parentName:"p",href:"https://learn.cheqd.io/getting-set-up-on-cheqd/cheqd-supported-wallets/keplr-wallet"},"tutorial")),(0,a.kt)(s.Z,{mdxType:"Tabs"},(0,a.kt)(o.Z,{label:"Tutorials",value:"tab1",mdxType:"TabItem"},(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/tutorials/cheqd/"},"Cheqd DID Module")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/tutorials/registering-schema-and-credential-definition"},"Register Schema and Credential Definition")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/tutorials/issue-a-credential"},"Issue a Credential"))))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0c824aea.dab4f53e.js b/assets/js/0c824aea.dab4f53e.js new file mode 100644 index 0000000..e26b019 --- /dev/null +++ b/assets/js/0c824aea.dab4f53e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[1350],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=c(n),m=a,h=d["".concat(l,".").concat(m)]||d[m]||p[m]||o;return n?r.createElement(h,s(s({ref:t},u),{},{components:n})):r.createElement(h,s({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:a,s[1]=i;for(var c=2;c{n.d(t,{Z:()=>g});var r=n(67294),a=n(86010),o=n(53438),s=n(39960),i=n(13919),l=n(95999);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function u(e){let{href:t,children:n}=e;return r.createElement(s.Z,{href:t,className:(0,a.Z)("card padding--lg",c.cardContainer)},n)}function d(e){let{href:t,icon:n,title:o,description:s}=e;return r.createElement(u,{href:t},r.createElement("h2",{className:(0,a.Z)("text--truncate",c.cardTitle),title:o},n," ",o),s&&r.createElement("p",{className:(0,a.Z)("text--truncate",c.cardDescription),title:s},s))}function p(e){let{item:t}=e;const n=(0,o.Wl)(t);return n?r.createElement(d,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,l.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const n=(0,i.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,o.xz)(t.docId??void 0);return r.createElement(d,{href:t.href,icon:n,title:t.label,description:a?.description})}function h(e){let{item:t}=e;switch(t.type){case"link":return r.createElement(m,{item:t});case"category":return r.createElement(p,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function f(e){let{className:t}=e;const n=(0,o.jA)();return r.createElement(g,{items:n.items,className:t})}function g(e){const{items:t,className:n}=e;if(!t)return r.createElement(f,e);const s=(0,o.MN)(t);return r.createElement("section",{className:(0,a.Z)("row",n)},s.map(((e,t)=>r.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},r.createElement(h,{item:e})))))}},85162:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function s(e){let{children:t,hidden:n,className:s}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,s),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),o=n(86010),s=n(12466),i=n(16550),l=n(91980),c=n(67392),u=n(50012);function d(e){return function(e){return a.Children.map(e,(e=>{if((0,a.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=p(e),[s,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[l,c]=h({queryString:n,groupId:r}),[d,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,u.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),g=(()=>{const e=l??d;return m({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{g&&i(g)}),[g]);return{selectedValue:s,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),f(e)}),[c,f,o]),tabValues:o}}var g=n(72389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:i,selectValue:l,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:d}=(0,s.o5)(),p=e=>{const t=e.currentTarget,n=u.indexOf(t),r=c[n].value;r!==i&&(d(t),l(r))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},c.map((e=>{let{value:t,label:n,attributes:s}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:p},s,{className:(0,o.Z)("tabs__item",b.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function y(e){const t=f(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",b.tabList)},a.createElement(k,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function w(e){const t=(0,g.Z)();return a.createElement(y,(0,r.Z)({key:String(t)},e))}},77114:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=n(87462),a=(n(67294),n(3905)),o=n(74866),s=n(85162);n(52991);const i={},l="cheqd",c={unversionedId:"getting-started/set-up/cheqd/index",id:"getting-started/set-up/cheqd/index",title:"cheqd",description:"cheqd is a blockchain network, built in the Cosmos ecosystem for Self-Sovereign Identity (SSI). The cheqd Network leverages the cheqd DID method and enables DID-Linked Resources to be written to the network, associated with a DID and controlled using the verification methods in the DID Document.",source:"@site/guides/getting-started/set-up/cheqd/index.md",sourceDirName:"getting-started/set-up/cheqd",slug:"/getting-started/set-up/cheqd/",permalink:"/guides/getting-started/set-up/cheqd/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Indy VDR",permalink:"/guides/getting-started/set-up/indy-vdr"},next:{title:"OpenID for Verifiable Credentials",permalink:"/guides/getting-started/set-up/openid4vc"}},u={},d=[{value:"Installing cheqd",id:"installing-cheqd",level:3},{value:"React Native",id:"react-native",level:4},{value:"Adding the cheqd to the Agent",id:"adding-the-cheqd-to-the-agent",level:3},{value:"Tutorials",id:"tutorials",level:3}],p={toc:d},m="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"cheqd"},"cheqd"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/cheqd/sdk"},"cheqd")," is a blockchain network, built in the Cosmos ecosystem for Self-Sovereign Identity (SSI). The cheqd Network leverages the ",(0,a.kt)("a",{parentName:"p",href:"https://docs.cheqd.io/identity/architecture/adr-list/adr-001-cheqd-did-method"},"cheqd DID method")," and enables ",(0,a.kt)("a",{parentName:"p",href:"https://docs.cheqd.io/identity/architecture/adr-list/adr-002-did-linked-resources"},"DID-Linked Resources")," to be written to the network, associated with a DID and controlled using the verification methods in the DID Document."),(0,a.kt)("p",null,"Through this approach, the cheqd Network is able to natively support the ",(0,a.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-spec/"},"Ledger Agnostic AnonCreds Specification (v1.0)")," through its ",(0,a.kt)("a",{parentName:"p",href:"https://docs.cheqd.io/identity/guides/anoncreds"},"AnonCreds Object Method")," (as well as VC-JWT and JSON-LD)."),(0,a.kt)("p",null,"cheqd also has a dedicated token, $CHEQ, used for identity writes to the network, voting in a decentralised governance framework as well as for various payment flows between verifiers, holders and issuers of Verifiable Credentials."),(0,a.kt)("h3",{id:"installing-cheqd"},"Installing cheqd"),(0,a.kt)("p",null,"When using Credo with the cheqd, there's a few extra dependencies that need to be installed. We need to install the ",(0,a.kt)("inlineCode",{parentName:"p"},"@credo-ts/cheqd")," package, which implements the needed interfaces for the agent."),(0,a.kt)("h4",{id:"react-native"},"React Native"),(0,a.kt)("p",null,"To enable react-native support we need to follow the steps below"),(0,a.kt)("p",null,"In the package.json file add the below code snippet, which replaces the cosmjs dependencies with he cosmjs-rn packages"),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(s.Z,{label:"NPM",value:"tab1",mdxType:"TabItem"},(0,a.kt)("p",null,"Using ",(0,a.kt)("a",{parentName:"p",href:"https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides"},"NPM ",(0,a.kt)("inlineCode",{parentName:"a"},"overrides"))," we can point the ",(0,a.kt)("inlineCode",{parentName:"p"},"cosmjs")," packages to ",(0,a.kt)("inlineCode",{parentName:"p"},"cosmjs-rn"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "overrides": {\n "@cosmjs/amino": "npm:@cosmjs-rn/amino@^0.27.1",\n "@cosmjs/encoding": "npm:@cosmjs-rn/encoding@^0.27.1",\n "@cosmjs/math": "npm:@cosmjs-rn/math@^0.27.1",\n "@cosmjs/stargate": "npm:@cosmjs-rn/stargate@^0.27.1",\n "@cosmjs/tendermint-rpc": "npm:@cosmjs-rn/tendermint-rpc@^0.27.1",\n "@cosmjs/utils": "npm:@cosmjs-rn/utils@^0.27.1",\n "@cosmjs/proto-signing": "npm:@cosmjs-rn/proto-signing@^0.27.1",\n "@cosmjs/crypto": "npm:@cosmjs-rn/crypto@^0.27.1"\n }\n}\n'))),(0,a.kt)(s.Z,{label:"Yarn",value:"tab2",mdxType:"TabItem"},(0,a.kt)("p",null,"Using ",(0,a.kt)("a",{parentName:"p",href:"https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/"},"Yarn ",(0,a.kt)("inlineCode",{parentName:"a"},"resolutions"))," we can point the ",(0,a.kt)("inlineCode",{parentName:"p"},"cosmjs")," packages to ",(0,a.kt)("inlineCode",{parentName:"p"},"cosmjs-rn"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "resolutions": {\n "@cosmjs/amino": "npm:@cosmjs-rn/amino@^0.27.1",\n "@cosmjs/encoding": "npm:@cosmjs-rn/encoding@^0.27.1",\n "@cosmjs/math": "npm:@cosmjs-rn/math@^0.27.1",\n "@cosmjs/stargate": "npm:@cosmjs-rn/stargate@^0.27.1",\n "@cosmjs/tendermint-rpc": "npm:@cosmjs-rn/tendermint-rpc@^0.27.1",\n "@cosmjs/utils": "npm:@cosmjs-rn/utils@^0.27.1",\n "@cosmjs/proto-signing": "npm:@cosmjs-rn/proto-signing@^0.27.1",\n "@cosmjs/crypto": "npm:@cosmjs-rn/crypto@^0.27.1"\n }\n}\n')))),(0,a.kt)("p",null,"Following that we need to add a buffer polyfill"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add buffer\n")),(0,a.kt)("p",null,"create a shim.js file with the below code snippet"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript"},"import { Buffer } from 'buffer'\nglobal.Buffer = Buffer\n")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"import shim.js")," file into your file where the App is imported"),(0,a.kt)("h3",{id:"adding-the-cheqd-to-the-agent"},"Adding the cheqd to the Agent"),(0,a.kt)("p",null,"After installing the dependencies, we can register the cheqd Module on the agent by adding the below code snippet to the agent constructor."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-cheqd.ts section-1",showLineNumbers:!0,"set-up-cheqd.ts":!0,"section-1":!0},"")),(0,a.kt)("p",null,"The cosmosPayerSeed can be a 32-bit seed value or a mnemonic, which can be managed using Keplr wallet which can be installed on a mobile or as a browser extension in chrome or safari which allows user's to create accounts, exchange tokens etc. To setup keplr wallet for cheqd follow this ",(0,a.kt)("a",{parentName:"p",href:"https://learn.cheqd.io/getting-set-up-on-cheqd/cheqd-supported-wallets/keplr-wallet"},"tutorial")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(s.Z,{label:"Tutorials",value:"tab1",mdxType:"TabItem"},(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/tutorials/cheqd/"},"Cheqd DID Module")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/tutorials/registering-schema-and-credential-definition"},"Register Schema and Credential Definition")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/tutorials/issue-an-anoncreds-credential-over-didcomm"},"Issue an AnonCreds Credential over DIDComm"))))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0ecb752f.60ba54e5.js b/assets/js/0ecb752f.2f63fef5.js similarity index 98% rename from assets/js/0ecb752f.60ba54e5.js rename to assets/js/0ecb752f.2f63fef5.js index ea29209..115c529 100644 --- a/assets/js/0ecb752f.60ba54e5.js +++ b/assets/js/0ecb752f.2f63fef5.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7824],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),l=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),u=l(n),h=r,m=u["".concat(s,".").concat(h)]||u[h]||c[h]||i;return n?a.createElement(m,o(o({ref:t},p),{},{components:n})):a.createElement(m,o({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=h;var d={};for(var s in t)hasOwnProperty.call(t,s)&&(d[s]=t[s]);d.originalType=e,d[u]="string"==typeof e?e:r,o[1]=d;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));const i={},o="Migrating from an Indy SDK Wallet to Aries Askar",d={unversionedId:"updating/update-indy-sdk-to-askar",id:"updating/update-indy-sdk-to-askar",title:"Migrating from an Indy SDK Wallet to Aries Askar",description:"This documentation explains the process of migrating your Indy SDK wallet to Aries Askar.",source:"@site/guides/updating/update-indy-sdk-to-askar.md",sourceDirName:"updating",slug:"/updating/update-indy-sdk-to-askar",permalink:"/guides/updating/update-indy-sdk-to-askar",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Update Assistant",permalink:"/guides/updating/update-assistant"},next:{title:"Migrating from Credo 0.1.0 to 0.2.x",permalink:"/guides/updating/versions/0.1-to-0.2"}},s={},l=[{value:"What does the migration do internally?",id:"what-does-the-migration-do-internally",level:2},{value:"Create a backup",id:"create-a-backup",level:3},{value:"Migrate the database to an Aries Askar structure",id:"migrate-the-database-to-an-aries-askar-structure",level:3},{value:"Try to open the wallet in the new Aries Askar structure",id:"try-to-open-the-wallet-in-the-new-aries-askar-structure",level:3},{value:"Update the keys",id:"update-the-keys",level:3},{value:"Update the DIDs",id:"update-the-dids",level:3},{value:"Update the credential definitions",id:"update-the-credential-definitions",level:3},{value:"Update the link secret(s) (master secret)",id:"update-the-link-secrets-master-secret",level:3},{value:"Update the credentials",id:"update-the-credentials",level:3},{value:"All the other records",id:"all-the-other-records",level:3},{value:"How to update",id:"how-to-update",level:2},{value:"Migrate code to Aries Askar, Indy VDR, AnonCreds.",id:"migrate-code-to-aries-askar-indy-vdr-anoncreds",level:3},{value:"Add the required dependencies",id:"add-the-required-dependencies",level:3},{value:"Getting the database path",id:"getting-the-database-path",level:3},{value:"React Native",id:"react-native",level:4},{value:"Node.JS",id:"nodejs",level:4}],p={toc:l},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"migrating-from-an-indy-sdk-wallet-to-aries-askar"},"Migrating from an Indy SDK Wallet to Aries Askar"),(0,r.kt)("p",null,"This documentation explains the process of migrating your Indy SDK wallet to ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-askar"},"Aries Askar"),"."),(0,r.kt)("admonition",{type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"While the migration script technically works on Node.JS, it is strongly advised not to use it, yet. The migration of issuer records (such as Schemas and Credential Definitions) is not implemented yet. When a credential definition is detected it will revert the migration process and no harm is done.")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Postgres is not supported. If you are using postgres with Indy SDK and need to update to Aries Askar, please open an issue on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"GitHub"),".")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The migration script is supported to run on 0.3.x before migrating from 0.3.x to 0.4.x. Please refer to ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/versions/0.3-to-0.4"},"Migrating from Credo 0.3.x to 0.4.x")," to get to 0.4.x afterwards."),(0,r.kt)("p",{parentName:"admonition"},"It is important to note that this script must be ran before you update from 0.3.x to 0.4.x.")),(0,r.kt)("h2",{id:"what-does-the-migration-do-internally"},"What does the migration do internally?"),(0,r.kt)("p",null,"The migration script does the following to make sure everything is migrated properly, and if anything goes wrong, it will revert back to a working state."),(0,r.kt)("h3",{id:"create-a-backup"},"Create a backup"),(0,r.kt)("p",null,"Because undefined behavior might occur, we create a backup in the new ",(0,r.kt)("inlineCode",{parentName:"p"},"tmp")," directory from Credo. if some error occurs, it will be reverted back to the backed-up state and if no error occurs, it will delete the backup from the temporary directory."),(0,r.kt)("h3",{id:"migrate-the-database-to-an-aries-askar-structure"},"Migrate the database to an Aries Askar structure"),(0,r.kt)("p",null,"The Indy-sdk and Aries Askar have different database structures. So first of all we need to change some table names, decrypt all the items with the old Indy keys, encrypt the items with the new Aries Askar keys and store them inside the new structure."),(0,r.kt)("h3",{id:"try-to-open-the-wallet-in-the-new-aries-askar-structure"},"Try to open the wallet in the new Aries Askar structure"),(0,r.kt)("p",null,"When the wallet is correctly transformed, the wallet will be attempted to be opened."),(0,r.kt)("h3",{id:"update-the-keys"},"Update the keys"),(0,r.kt)("p",null,"Aries Askar has a specific way to store keys and every key, defined by the category of ",(0,r.kt)("inlineCode",{parentName:"p"},"Indy::Key")," will be migrated."),(0,r.kt)("h3",{id:"update-the-dids"},"Update the DIDs"),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"This update script does not transform did records. This is fine for something like ",(0,r.kt)("inlineCode",{parentName:"p"},"did:peer"),", but will cause issues with ",(0,r.kt)("inlineCode",{parentName:"p"},"indy")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"sov")," DIDs. For more information, please check out the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/versions/0.3-to-0.4#removal-of-publicdidseed-and-publicdid"},"Migrating from Credo 0.3.x to 0.4.x"))),(0,r.kt)("h3",{id:"update-the-credential-definitions"},"Update the credential definitions"),(0,r.kt)("admonition",{type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"Updating of credential definitions is not yet supported. This is why it is strongly advised not to run this script in a node.js environment.")),(0,r.kt)("h3",{id:"update-the-link-secrets-master-secret"},"Update the link secret(s) (master secret)"),(0,r.kt)("p",null,"The link secrets, identified by the category ",(0,r.kt)("inlineCode",{parentName:"p"},"Indy::MasterSecret"),", are updated next. They are stored inside a new ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsLinkSecretRecord"),"."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Since we have to set a default link secret, some additional logic is added to detect this. You can either supply a ",(0,r.kt)("inlineCode",{parentName:"p"},"defaultLinkSercetId")," as a constructor parameter or it will be based on your ",(0,r.kt)("inlineCode",{parentName:"p"},"walletId"),"."),(0,r.kt)("p",{parentName:"admonition"},"If there is no Indy record with the ",(0,r.kt)("inlineCode",{parentName:"p"},"defaultLinkSecretId")," or the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletId"),", an error will be thrown and the migration will be restored.")),(0,r.kt)("h3",{id:"update-the-credentials"},"Update the credentials"),(0,r.kt)("p",null,"The credentials, identified by the category ",(0,r.kt)("inlineCode",{parentName:"p"},"Indy::Credential")," are updated last. They are stored in the new ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord")," as a one-to-one copy. This means that they now support more tags and will make querying a lot easier."),(0,r.kt)("h3",{id:"all-the-other-records"},"All the other records"),(0,r.kt)("p",null,"All the other records will be transferred without any updates as they are not Indy specific."),(0,r.kt)("h2",{id:"how-to-update"},"How to update"),(0,r.kt)("p",null,"Updating does not require a lot of code, but must be done with caution."),(0,r.kt)("p",null,"It is very important to note that the migration script only has to be run once. If it runs for a second time, it will error saying that the database is already migrated. Also, when the migration is finished, it is common practice to store this state in your persistent app storage. This script does not provide a way to detect if an update has happened, so storing this value will prevent the script from running every time. For more information regarding this topic, please check out ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant#storing-the-agent-storage-version-outside-of-the-agent-storage"},"Update Assistant"),"."),(0,r.kt)("h3",{id:"migrate-code-to-aries-askar-indy-vdr-anoncreds"},"Migrate code to Aries Askar, Indy VDR, AnonCreds."),(0,r.kt)("p",null,"Since Credo 0.4, there have been three new packages introduced that replace Indy SDK: Aries Askar (secure storage and cryptography), Indy VDR (integration with Hyperledger Indy blockchain), and AnonCreds (AnonCreds credential format)."),(0,r.kt)("p",null,"Before setting up the migration script for Aries Askar (the storage), it is advised to first update your code with the new dependencies, and test it in a fresh environment to make sure everything works as expected."),(0,r.kt)("p",null,"To update your code to use the new packages, remove the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/indy-sdk"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk-react-native"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/indy-sdk")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/indy-sdk-react-native")," packages from the dependencies of your project, and remove all related imports from your code."),(0,r.kt)("p",null,"Then, setup the required dependencies for Aries Askar, Indy VDR, and AnonCreds. It is not required to set up all dependencies. This guide focuses on migration the storage from Indy SDK to Aries Askar, so only the Aries Askar dependency is required."),(0,r.kt)("p",null,"To setup the new dependencies, follow the getting started guide for each package:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/aries-askar"},"Aries Askar")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/anoncreds"},"AnonCreds")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/indy-vdr"},"Indy VDR"))),(0,r.kt)("p",null,"Once this has been set-up, make sure all code works on a ",(0,r.kt)("strong",{parentName:"p"},"fresh environment")," before continuing with the migration script."),(0,r.kt)("h3",{id:"add-the-required-dependencies"},"Add the required dependencies"),(0,r.kt)("p",null,"Once all the new dependencies have been configured for your platform, you can add the migration script to your project:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @credo-ts/indy-sdk-to-askar-migration@^0.5.3\n")),(0,r.kt)("p",null,"Below is the minimal code required for the migration to work. It is recommended to turn the logger on as it gives a lot of information regarding the migration."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The agent is not allowed to be initialized to run this script. This makes sure nothing else happens during the migration.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript"},"import { agentDependencies } from '@credo-ts/react-native' // or @credo-ts/node\nimport { AskarModule } from '@credo-ts/askar'\nimport { IndySdkToAskarMigrationUpdater } from '@credo-ts/indy-sdk-to-askar-migration'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst oldAgent = new Agent({\n config: {\n /* ... */\n },\n modules: {\n // ... other modules (including optionally IndyVdrModule and AnonCredsModule)\n ariesAskar: new AskarModule({\n ariesAskar,\n }),\n },\n dependencies: agentDependencies,\n})\n\n// See section below for getting the database path\nconst dbPath = getMobileIndySdkDatabasePath(oldAgent.config.walletConfig.id)\n\nconst updater = await IndySdkToAskarMigrationUpdater.initialize({ dbPath, agent: oldAgent })\nawait updater.update()\n")),(0,r.kt)("h3",{id:"getting-the-database-path"},"Getting the database path"),(0,r.kt)("h4",{id:"react-native"},"React Native"),(0,r.kt)("p",null,"On Android, the database is commonly located under the ",(0,r.kt)("inlineCode",{parentName:"p"},"ExternalDirectoryPath"),". If you did not follow the default Indy SDK for React Native setup on Android, your path might differ. Check out ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger-archives/indy-sdk-react-native#5-load-indy-library"},"Indy SDK React Native Android Setup")," for the default behavior."),(0,r.kt)("p",null,"On iOS, the database is commonly located under the ",(0,r.kt)("inlineCode",{parentName:"p"},"DocumentDirectoryPath"),". For iOS this can only change if your phone does not have the ",(0,r.kt)("inlineCode",{parentName:"p"},"HOME")," environment variable set. This is not usual behavior, and if ",(0,r.kt)("inlineCode",{parentName:"p"},"HOME")," is not set, the ",(0,r.kt)("inlineCode",{parentName:"p"},"base")," in the code section below will be ",(0,r.kt)("inlineCode",{parentName:"p"},"/home/indy/Documents"),"."),(0,r.kt)("p",null,"To get the path to the database, you can use the following code, where ",(0,r.kt)("inlineCode",{parentName:"p"},"walletId")," is the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig.id"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript"},"import { Platform } from 'react-native'\nimport fs from 'react-native-fs'\n\n/**\n * Get the path to and Indy SDK SQlite wallet database on mobile.\n *\n * @note this assumes you are using the default configuration.\n * If you are not, you will need to adjust the path accordingly.\n */\nfunction getMobileIndySdkDatabasePath(walletId: string) {\n const base = Platform.OS === 'android' ? fs.ExternalDirectoryPath : fs.DocumentDirectoryPath\n\n return `${base}/.indy_client/wallet/${walletId}/sqlite.db`\n}\n")),(0,r.kt)("h4",{id:"nodejs"},"Node.JS"),(0,r.kt)("p",null,"Migration of data from Indy SDK to Aries Askar is not supported yet in Node.JS. If you are using Node.JS or Postgres and need to update to Aries Askar, please open an issue on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"GitHub"),"."))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7824],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),l=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),u=l(n),h=r,m=u["".concat(s,".").concat(h)]||u[h]||c[h]||i;return n?a.createElement(m,o(o({ref:t},p),{},{components:n})):a.createElement(m,o({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=h;var d={};for(var s in t)hasOwnProperty.call(t,s)&&(d[s]=t[s]);d.originalType=e,d[u]="string"==typeof e?e:r,o[1]=d;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));const i={},o="Migrating from an Indy SDK Wallet to Aries Askar",d={unversionedId:"updating/update-indy-sdk-to-askar",id:"updating/update-indy-sdk-to-askar",title:"Migrating from an Indy SDK Wallet to Aries Askar",description:"This documentation explains the process of migrating your Indy SDK wallet to Aries Askar.",source:"@site/guides/updating/update-indy-sdk-to-askar.md",sourceDirName:"updating",slug:"/updating/update-indy-sdk-to-askar",permalink:"/guides/updating/update-indy-sdk-to-askar",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Update Assistant",permalink:"/guides/updating/update-assistant"},next:{title:"Migrating from Credo 0.1.0 to 0.2.x",permalink:"/guides/updating/versions/0.1-to-0.2"}},s={},l=[{value:"What does the migration do internally?",id:"what-does-the-migration-do-internally",level:2},{value:"Create a backup",id:"create-a-backup",level:3},{value:"Migrate the database to an Aries Askar structure",id:"migrate-the-database-to-an-aries-askar-structure",level:3},{value:"Try to open the wallet in the new Aries Askar structure",id:"try-to-open-the-wallet-in-the-new-aries-askar-structure",level:3},{value:"Update the keys",id:"update-the-keys",level:3},{value:"Update the DIDs",id:"update-the-dids",level:3},{value:"Update the credential definitions",id:"update-the-credential-definitions",level:3},{value:"Update the link secret(s) (master secret)",id:"update-the-link-secrets-master-secret",level:3},{value:"Update the credentials",id:"update-the-credentials",level:3},{value:"All the other records",id:"all-the-other-records",level:3},{value:"How to update",id:"how-to-update",level:2},{value:"Migrate code to Aries Askar, Indy VDR, AnonCreds.",id:"migrate-code-to-aries-askar-indy-vdr-anoncreds",level:3},{value:"Add the required dependencies",id:"add-the-required-dependencies",level:3},{value:"Getting the database path",id:"getting-the-database-path",level:3},{value:"React Native",id:"react-native",level:4},{value:"Node.js",id:"nodejs",level:4}],p={toc:l},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"migrating-from-an-indy-sdk-wallet-to-aries-askar"},"Migrating from an Indy SDK Wallet to Aries Askar"),(0,r.kt)("p",null,"This documentation explains the process of migrating your Indy SDK wallet to ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-askar"},"Aries Askar"),"."),(0,r.kt)("admonition",{type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"While the migration script technically works on Node.js, it is strongly advised not to use it, yet. The migration of issuer records (such as Schemas and Credential Definitions) is not implemented yet. When a credential definition is detected it will revert the migration process and no harm is done.")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Postgres is not supported. If you are using postgres with Indy SDK and need to update to Aries Askar, please open an issue on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"GitHub"),".")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The migration script is supported to run on 0.3.x before migrating from 0.3.x to 0.4.x. Please refer to ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/versions/0.3-to-0.4"},"Migrating from Credo 0.3.x to 0.4.x")," to get to 0.4.x afterwards."),(0,r.kt)("p",{parentName:"admonition"},"It is important to note that this script must be ran before you update from 0.3.x to 0.4.x.")),(0,r.kt)("h2",{id:"what-does-the-migration-do-internally"},"What does the migration do internally?"),(0,r.kt)("p",null,"The migration script does the following to make sure everything is migrated properly, and if anything goes wrong, it will revert back to a working state."),(0,r.kt)("h3",{id:"create-a-backup"},"Create a backup"),(0,r.kt)("p",null,"Because undefined behavior might occur, we create a backup in the new ",(0,r.kt)("inlineCode",{parentName:"p"},"tmp")," directory from Credo. if some error occurs, it will be reverted back to the backed-up state and if no error occurs, it will delete the backup from the temporary directory."),(0,r.kt)("h3",{id:"migrate-the-database-to-an-aries-askar-structure"},"Migrate the database to an Aries Askar structure"),(0,r.kt)("p",null,"The Indy-sdk and Aries Askar have different database structures. So first of all we need to change some table names, decrypt all the items with the old Indy keys, encrypt the items with the new Aries Askar keys and store them inside the new structure."),(0,r.kt)("h3",{id:"try-to-open-the-wallet-in-the-new-aries-askar-structure"},"Try to open the wallet in the new Aries Askar structure"),(0,r.kt)("p",null,"When the wallet is correctly transformed, the wallet will be attempted to be opened."),(0,r.kt)("h3",{id:"update-the-keys"},"Update the keys"),(0,r.kt)("p",null,"Aries Askar has a specific way to store keys and every key, defined by the category of ",(0,r.kt)("inlineCode",{parentName:"p"},"Indy::Key")," will be migrated."),(0,r.kt)("h3",{id:"update-the-dids"},"Update the DIDs"),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"This update script does not transform did records. This is fine for something like ",(0,r.kt)("inlineCode",{parentName:"p"},"did:peer"),", but will cause issues with ",(0,r.kt)("inlineCode",{parentName:"p"},"indy")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"sov")," DIDs. For more information, please check out the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/versions/0.3-to-0.4#removal-of-publicdidseed-and-publicdid"},"Migrating from Credo 0.3.x to 0.4.x"))),(0,r.kt)("h3",{id:"update-the-credential-definitions"},"Update the credential definitions"),(0,r.kt)("admonition",{type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"Updating of credential definitions is not yet supported. This is why it is strongly advised not to run this script in a Node.js environment.")),(0,r.kt)("h3",{id:"update-the-link-secrets-master-secret"},"Update the link secret(s) (master secret)"),(0,r.kt)("p",null,"The link secrets, identified by the category ",(0,r.kt)("inlineCode",{parentName:"p"},"Indy::MasterSecret"),", are updated next. They are stored inside a new ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsLinkSecretRecord"),"."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Since we have to set a default link secret, some additional logic is added to detect this. You can either supply a ",(0,r.kt)("inlineCode",{parentName:"p"},"defaultLinkSercetId")," as a constructor parameter or it will be based on your ",(0,r.kt)("inlineCode",{parentName:"p"},"walletId"),"."),(0,r.kt)("p",{parentName:"admonition"},"If there is no Indy record with the ",(0,r.kt)("inlineCode",{parentName:"p"},"defaultLinkSecretId")," or the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletId"),", an error will be thrown and the migration will be restored.")),(0,r.kt)("h3",{id:"update-the-credentials"},"Update the credentials"),(0,r.kt)("p",null,"The credentials, identified by the category ",(0,r.kt)("inlineCode",{parentName:"p"},"Indy::Credential")," are updated last. They are stored in the new ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord")," as a one-to-one copy. This means that they now support more tags and will make querying a lot easier."),(0,r.kt)("h3",{id:"all-the-other-records"},"All the other records"),(0,r.kt)("p",null,"All the other records will be transferred without any updates as they are not Indy specific."),(0,r.kt)("h2",{id:"how-to-update"},"How to update"),(0,r.kt)("p",null,"Updating does not require a lot of code, but must be done with caution."),(0,r.kt)("p",null,"It is very important to note that the migration script only has to be run once. If it runs for a second time, it will error saying that the database is already migrated. Also, when the migration is finished, it is common practice to store this state in your persistent app storage. This script does not provide a way to detect if an update has happened, so storing this value will prevent the script from running every time. For more information regarding this topic, please check out ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant#storing-the-agent-storage-version-outside-of-the-agent-storage"},"Update Assistant"),"."),(0,r.kt)("h3",{id:"migrate-code-to-aries-askar-indy-vdr-anoncreds"},"Migrate code to Aries Askar, Indy VDR, AnonCreds."),(0,r.kt)("p",null,"Since Credo 0.4, there have been three new packages introduced that replace Indy SDK: Aries Askar (secure storage and cryptography), Indy VDR (integration with Hyperledger Indy blockchain), and AnonCreds (AnonCreds credential format)."),(0,r.kt)("p",null,"Before setting up the migration script for Aries Askar (the storage), it is advised to first update your code with the new dependencies, and test it in a fresh environment to make sure everything works as expected."),(0,r.kt)("p",null,"To update your code to use the new packages, remove the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/indy-sdk"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk-react-native"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/indy-sdk")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/indy-sdk-react-native")," packages from the dependencies of your project, and remove all related imports from your code."),(0,r.kt)("p",null,"Then, setup the required dependencies for Aries Askar, Indy VDR, and AnonCreds. It is not required to set up all dependencies. This guide focuses on migration the storage from Indy SDK to Aries Askar, so only the Aries Askar dependency is required."),(0,r.kt)("p",null,"To setup the new dependencies, follow the getting started guide for each package:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/aries-askar"},"Aries Askar")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/anoncreds"},"AnonCreds")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/indy-vdr"},"Indy VDR"))),(0,r.kt)("p",null,"Once this has been set-up, make sure all code works on a ",(0,r.kt)("strong",{parentName:"p"},"fresh environment")," before continuing with the migration script."),(0,r.kt)("h3",{id:"add-the-required-dependencies"},"Add the required dependencies"),(0,r.kt)("p",null,"Once all the new dependencies have been configured for your platform, you can add the migration script to your project:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @credo-ts/indy-sdk-to-askar-migration@^0.5.3\n")),(0,r.kt)("p",null,"Below is the minimal code required for the migration to work. It is recommended to turn the logger on as it gives a lot of information regarding the migration."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The agent is not allowed to be initialized to run this script. This makes sure nothing else happens during the migration.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript"},"import { agentDependencies } from '@credo-ts/react-native' // or @credo-ts/node\nimport { AskarModule } from '@credo-ts/askar'\nimport { IndySdkToAskarMigrationUpdater } from '@credo-ts/indy-sdk-to-askar-migration'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst oldAgent = new Agent({\n config: {\n /* ... */\n },\n modules: {\n // ... other modules (including optionally IndyVdrModule and AnonCredsModule)\n ariesAskar: new AskarModule({\n ariesAskar,\n }),\n },\n dependencies: agentDependencies,\n})\n\n// See section below for getting the database path\nconst dbPath = getMobileIndySdkDatabasePath(oldAgent.config.walletConfig.id)\n\nconst updater = await IndySdkToAskarMigrationUpdater.initialize({ dbPath, agent: oldAgent })\nawait updater.update()\n")),(0,r.kt)("h3",{id:"getting-the-database-path"},"Getting the database path"),(0,r.kt)("h4",{id:"react-native"},"React Native"),(0,r.kt)("p",null,"On Android, the database is commonly located under the ",(0,r.kt)("inlineCode",{parentName:"p"},"ExternalDirectoryPath"),". If you did not follow the default Indy SDK for React Native setup on Android, your path might differ. Check out ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger-archives/indy-sdk-react-native#5-load-indy-library"},"Indy SDK React Native Android Setup")," for the default behavior."),(0,r.kt)("p",null,"On iOS, the database is commonly located under the ",(0,r.kt)("inlineCode",{parentName:"p"},"DocumentDirectoryPath"),". For iOS this can only change if your phone does not have the ",(0,r.kt)("inlineCode",{parentName:"p"},"HOME")," environment variable set. This is not usual behavior, and if ",(0,r.kt)("inlineCode",{parentName:"p"},"HOME")," is not set, the ",(0,r.kt)("inlineCode",{parentName:"p"},"base")," in the code section below will be ",(0,r.kt)("inlineCode",{parentName:"p"},"/home/indy/Documents"),"."),(0,r.kt)("p",null,"To get the path to the database, you can use the following code, where ",(0,r.kt)("inlineCode",{parentName:"p"},"walletId")," is the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig.id"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript"},"import { Platform } from 'react-native'\nimport fs from 'react-native-fs'\n\n/**\n * Get the path to and Indy SDK SQlite wallet database on mobile.\n *\n * @note this assumes you are using the default configuration.\n * If you are not, you will need to adjust the path accordingly.\n */\nfunction getMobileIndySdkDatabasePath(walletId: string) {\n const base = Platform.OS === 'android' ? fs.ExternalDirectoryPath : fs.DocumentDirectoryPath\n\n return `${base}/.indy_client/wallet/${walletId}/sqlite.db`\n}\n")),(0,r.kt)("h4",{id:"nodejs"},"Node.js"),(0,r.kt)("p",null,"Migration of data from Indy SDK to Aries Askar is not supported yet in Node.js. If you are using Node.js or Postgres and need to update to Aries Askar, please open an issue on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"GitHub"),"."))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/14e53ecf.3bcc2d9b.js b/assets/js/14e53ecf.3bcc2d9b.js deleted file mode 100644 index 694b9e3..0000000 --- a/assets/js/14e53ecf.3bcc2d9b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[1904],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>h});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),l=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},p=function(e){var n=l(e.components);return a.createElement(s.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},u=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),c=l(t),u=r,h=c["".concat(s,".").concat(u)]||c[u]||m[u]||i;return t?a.createElement(h,o(o({ref:n},p),{},{components:t})):a.createElement(h,o({ref:n},p))}));function h(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=u;var d={};for(var s in n)hasOwnProperty.call(n,s)&&(d[s]=n[s]);d.originalType=e,d[c]="string"==typeof e?e:r,o[1]=d;for(var l=2;l{t.d(n,{Z:()=>o});var a=t(67294),r=t(86010);const i={tabItem:"tabItem_Ymn6"};function o(e){let{children:n,hidden:t,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:t},n)}},74866:(e,n,t)=>{t.d(n,{Z:()=>w});var a=t(87462),r=t(67294),i=t(86010),o=t(12466),d=t(16550),s=t(91980),l=t(67392),p=t(50012);function c(e){return function(e){return r.Children.map(e,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:r}}=e;return{value:n,label:t,attributes:a,default:r}}))}function m(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??c(t);return function(e){const n=(0,l.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function u(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const a=(0,d.k6)(),i=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!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 t??null}({queryString:n,groupId:t});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(a.location.search);n.set(i,e),a.replace({...a.location,search:n.toString()})}),[i,a])]}function k(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,i=m(e),[o,d]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!u({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:i}))),[s,l]=h({queryString:t,groupId:a}),[c,k]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,i]=(0,p.Nk)(t);return[a,(0,r.useCallback)((e=>{t&&i.set(e)}),[t,i])]}({groupId:a}),g=(()=>{const e=s??c;return u({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{g&&d(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!u({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);d(e),l(e),k(e)}),[l,k,i]),tabValues:i}}var g=t(72389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:n,block:t,selectedValue:d,selectValue:s,tabValues:l}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.o5)(),m=e=>{const n=e.currentTarget,t=p.indexOf(n),a=l[t].value;a!==d&&(c(n),s(a))},u=e=>{let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const t=p.indexOf(e.currentTarget)+1;n=p[t]??p[0];break}case"ArrowLeft":{const t=p.indexOf(e.currentTarget)-1;n=p[t]??p[p.length-1];break}}n?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":t},n)},l.map((e=>{let{value:n,label:t,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:d===n?0:-1,"aria-selected":d===n,key:n,ref:e=>p.push(e),onKeyDown:u,onClick:m},o,{className:(0,i.Z)("tabs__item",f.tabItem,o?.className,{"tabs__item--active":d===n})}),t??n)})))}function v(e){let{lazy:n,children:t,selectedValue:a}=e;if(t=Array.isArray(t)?t:[t],n){const e=t.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},t.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a}))))}function b(e){const n=k(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",f.tabList)},r.createElement(y,(0,a.Z)({},e,n)),r.createElement(v,(0,a.Z)({},e,n)))}function w(e){const n=(0,g.Z)();return r.createElement(b,(0,a.Z)({key:String(n)},e))}},43635:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>h,frontMatter:()=>d,metadata:()=>l,toc:()=>c});var a=t(87462),r=(t(67294),t(3905)),i=t(74866),o=t(85162);const d={},s="Migrating from Credo 0.3.x to 0.4.x",l={unversionedId:"updating/versions/0.3-to-0.4",id:"updating/versions/0.3-to-0.4",title:"Migrating from Credo 0.3.x to 0.4.x",description:"This document describes everything you need to know for updating Credo 0.3.x to 0.4.x. If you're not aware of how updating in Credo works make sure to first read the guide on Updating Credo.",source:"@site/guides/updating/versions/0.3-to-0.4.md",sourceDirName:"updating/versions",slug:"/updating/versions/0.3-to-0.4",permalink:"/guides/updating/versions/0.3-to-0.4",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Migrating from Credo 0.2.x to 0.3.x",permalink:"/guides/updating/versions/0.2-to-0.3"},next:{title:"The Credo Ecosystem",permalink:"/guides/ecosystem/"}},p={},c=[{value:"React Native",id:"react-native",level:4},{value:"Node",id:"node",level:4},{value:"Breaking Code Changes",id:"breaking-code-changes",level:2},{value:"Agent Creation",id:"agent-creation",level:3},{value:"0.3.x",id:"03x",level:5},{value:"0.4.x",id:"04x",level:5},{value:"Indy Network Configuration",id:"indy-network-configuration",level:3},{value:"0.3.x",id:"03x-1",level:5},{value:"0.4.x",id:"04x-1",level:5},{value:"Changes to wallet",id:"changes-to-wallet",level:3},{value:"Did Resolver and Registrar",id:"did-resolver-and-registrar",level:3},{value:"0.3.x",id:"03x-2",level:5},{value:"0.4.x",id:"04x-2",level:5},{value:"Removal of publicDidSeed and publicDid",id:"removal-of-publicdidseed-and-publicdid",level:3},{value:"0.3.x",id:"03x-3",level:5},{value:"0.4.x",id:"04x-3",level:5},{value:"More Granular Usage of Legacy did:sov Prefix in DIDComm Messages",id:"more-granular-usage-of-legacy-didsov-prefix-in-didcomm-messages",level:3},{value:"0.3.x",id:"03x-4",level:5},{value:"0.4.x",id:"04x-4",level:5},{value:"Removal of injectionContainer property from the agent",id:"removal-of-injectioncontainer-property-from-the-agent",level:3},{value:"connection has been updated to connectionId in TransportSession",id:"connection-has-been-updated-to-connectionid-in-transportsession",level:3},{value:"Replacement of Ledger Module with new AnonCreds Module",id:"replacement-of-ledger-module-with-new-anoncreds-module",level:3},{value:"0.3.x",id:"03x-5",level:5},{value:"0.4.x",id:"04x-5",level:5},{value:"Changes to the Credentials and Proofs modules",id:"changes-to-the-credentials-and-proofs-modules",level:3},{value:"Changes to the AnonCreds Credential and Proof Format",id:"changes-to-the-anoncreds-credential-and-proof-format",level:3},{value:"0.3.x",id:"03x-6",level:5},{value:"0.4.x",id:"04x-6",level:5},{value:"Removal of AnonCreds Master Secret management from Wallet",id:"removal-of-anoncreds-master-secret-management-from-wallet",level:3},{value:"Default Outbound DIDComm Content Type now application/didcomm-envelope-enc",id:"default-outbound-didcomm-content-type-now-applicationdidcomm-envelope-enc",level:3},{value:"0.3.x",id:"03x-7",level:5},{value:"0.4.x",id:"04x-7",level:5},{value:"Generalizing Indy properties in CredentialExchangeRecord",id:"generalizing-indy-properties-in-credentialexchangerecord",level:3},{value:"credentialRecordType",id:"credentialrecordtype",level:4},{value:"0.3.x",id:"03x-8",level:5},{value:"0.4.x",id:"04x-8",level:5},{value:"Metadata",id:"metadata",level:4},{value:"0.3.x",id:"03x-9",level:5},{value:"0.4.x",id:"04x-9",level:5},{value:"More paths in FileSystem",id:"more-paths-in-filesystem",level:3},{value:"Breaking Storage Changes",id:"breaking-storage-changes",level:2}],m={toc:c},u="wrapper";function h(e){let{components:n,...t}=e;return(0,r.kt)(u,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"migrating-from-credo-03x-to-04x"},"Migrating from Credo 0.3.x to 0.4.x"),(0,r.kt)("p",null,"This document describes everything you need to know for updating Credo 0.3.x to 0.4.x. If you're not aware of how updating in Credo works make sure to first read the guide on ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/"},"Updating Credo"),"."),(0,r.kt)("p",null,"First of all, update you dependencies to the 0.4.x versions. This will also update the needed peer dependencies. ",(0,r.kt)("strong",{parentName:"p"},"Extension packages are not updated with this command"),". You need to update these manually, and make sure they're up to date with the latest version of Credo."),(0,r.kt)("p",null,"Credo 0.4.0 is a major release that introduces a lot of new features and changes to the public API. Specifically, this release removed the dependency on the Indy SDK from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/core")," package. Agent setup is more flexible, but it also means the setup is more complex. Follow the mentioned steps in this document carefully to make the upgrade as smooth as possible."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The migration guide only covers how to migrate from 0.3.x to 0.4.x while keeping the same behavior and dependencies. Credo 0.4.0 introduced a lot of new features and adds support for ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-askar"},"Aries Askar"),", ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-vdr"},"Indy VDR")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/anoncreds-rs"},"AnonCreds RS")," as a replacement for the Indy SDK."),(0,r.kt)("p",{parentName:"admonition"},"Migrating to these new components requires additional migration steps, which need to be closely followed to prevent loss of data. These can be found at the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-indy-sdk-to-askar"},"Update Indy SDK to Askar guide"),"."),(0,r.kt)("p",{parentName:"admonition"},"As noted in the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-indy-sdk-to-askar"},"Update Indy SDK to Askar guide"),", it is very important that the 0.3.x to 0.4.x update is started after migrating from the Indy SDK to Aries Askar.")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Multi-tenancy is not covered in the 0.3.x to 0.4.x migration guide. If you're using multi-tenancy in 0.3.x and want to migrate to 0.4.x, please open an issue on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"Github"),".")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The following APIs, modules and features are experimental and therefore not covered by the semver versioning in Credo. If you're using any of these features, make sure to use an exact version of Credo (",(0,r.kt)("inlineCode",{parentName:"p"},"0.4.0"),") instead of a range (",(0,r.kt)("inlineCode",{parentName:"p"},"^0.4.0"),"):"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"Implementing your own ",(0,r.kt)("inlineCode",{parentName:"li"},"AnonCredsRegistry")," and AnonCreds service implementation. Using the default implementations (Indy SDK, AnonCreds RS) is fine."),(0,r.kt)("li",{parentName:"ul"},"Using the shared component libraries from ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/aries-askar"),", ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/indy-vdr")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/anoncreds-rs")),(0,r.kt)("li",{parentName:"ul"},"Using OpenID4VC from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/openid4vc-client")," module"),(0,r.kt)("li",{parentName:"ul"},"W3C JWT Verifiable Credentials"),(0,r.kt)("li",{parentName:"ul"},"Using multi-tenancy from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/tenants")," module"))),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"React Native",value:"tab1",mdxType:"TabItem"},(0,r.kt)("p",null,"First install the updated dependencies. Make sure to also install the new ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/indy-sdk")," package, which is a wrapper around the Indy SDK and install the ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk-react-native")," package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @aries-framework/react-native@^0.4.0 @aries-framework/core@^0.4.0 @aries-framework/indy-sdk@^0.4.0 @aries-framework/anoncreds@^0.4.0 indy-sdk-react-native@^0.3.1\n\n# or NPM\nnpn install @aries-framework/react-native@^0.4.0 @aries-framework/core@^0.4.0 @aries-framework/indy-sdk@^0.4.0 @aries-framework/anoncreds@^0.4.0 indy-sdk-react-native@^0.3.1\n")),(0,r.kt)("p",null,"We also need to install types for the ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk-react-native")," package, which we take from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/indy-sdk")," package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add --dev @types/indy-sdk-react-native@npm:@types/indy-sdk\n\n# or NPM\nnpm install --save-dev @types/indy-sdk-react-native@npm:@types/indy-sdk\n"))),(0,r.kt)(o.Z,{label:"Node",value:"tab2",mdxType:"TabItem"},(0,r.kt)("p",null,"First install the updated dependencies. Make sure to also install the new ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/indy-sdk")," package, which is a wrapper around the Indy SDK and install the ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk")," package itself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @aries-framework/node@^0.4.0 @aries-framework/core@^0.4.0 @aries-framework/indy-sdk@^0.4.0 @aries-framework/anoncreds@^0.4.0 indy-sdk\n\n# or NPM\nnpm install @aries-framework/node@^0.4.0 @aries-framework/core@^0.4.0 @aries-framework/indy-sdk@^0.4.0 @aries-framework/anoncreds@^0.4.0 indy-sdk\n")),(0,r.kt)("p",null,"We also need to install types for the ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk")," package, which are available in the ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/indy-sdk")," package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add --dev @types/indy-sdk\n\n# or NPM\nnpm install --save-dev @types/indy-sdk\n")))),(0,r.kt)("h2",{id:"breaking-code-changes"},"Breaking Code Changes"),(0,r.kt)("p",null,"This section will list all breaking changes made to the public API of Credo between version 0.3.x and 0.4.0."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If you have custom modules take into account there could be a lot more breaking changes that aren't documented here. We try to make sure that the biggest breaking changes to the internal API are also documented here, but it is possible some breaking changes are not documented here (feel free to open a pull request).")),(0,r.kt)("h3",{id:"agent-creation"},"Agent Creation"),(0,r.kt)("p",null,"With the dependency on the Indy SDK removed from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/core")," package, we now need to register the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," to still leverage the functionality the Indy SDK provides."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n // Register the IndySdkModule and provide the indySdk dependency\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"indy-network-configuration"},"Indy Network Configuration"),(0,r.kt)("p",null,"With the Indy SDK being extracted out of core, the ",(0,r.kt)("inlineCode",{parentName:"p"},"indyLedger")," configuration option is no longer available on the ",(0,r.kt)("inlineCode",{parentName:"p"},"AgentConfig")," interface. Instead, the ",(0,r.kt)("inlineCode",{parentName:"p"},"networks")," configuration option is now available on the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," configuration."),(0,r.kt)("p",null,"In addition the ",(0,r.kt)("inlineCode",{parentName:"p"},"connectToIndyLedgersOnStartup")," property has been removed in favor of a per-network ",(0,r.kt)("inlineCode",{parentName:"p"},"connectOnStartup")," property that allows more fine-grained control over which networks to connect to on startup."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n connectToIndyLedgersOnStartup: true,\n indyLedgers: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n // Register the IndySdkModule and provide the indySdk dependency\n indySdk: new IndySdkModule({\n indySdk,\n\n // add networks as a replacement for indyLedgers\n networks: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n // new connectOnStartup property\n connectOnStartup: true,\n },\n ],\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"changes-to-wallet"},"Changes to wallet"),(0,r.kt)("p",null,"Throughout the framework it was possible to provide a ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," for deterministic key generation. Recently it was discovered that the ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property in the Indy SDK was not actually used as a seed, but directly as the private key."),(0,r.kt)("p",null,"Therefore a new ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," property was added to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Wallet")," interface in addition to the ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property. When using the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," this now means you can ",(0,r.kt)("strong",{parentName:"p"},"only")," provide the ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," property. The ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property is no longer supported ",(0,r.kt)("strong",{parentName:"p"},"by the ",(0,r.kt)("inlineCode",{parentName:"strong"},"IndySdkModule")),"."),(0,r.kt)("p",null,"The type of the ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property has also been changed to ",(0,r.kt)("inlineCode",{parentName:"p"},"Buffer")," to make it more consistent with ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," property, and remove the ambiguity of what the encoding of the string variant of the ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property should be."),(0,r.kt)("h3",{id:"did-resolver-and-registrar"},"Did Resolver and Registrar"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov")," resolver and registrar were registered by default in 0.3.x of the agent. In 0.4.0 they've been moved to the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/indy-sdk")," package and are thus not registered by default on the DIDs module anymore. In addition, the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkSovDidRegistrar")," has been replaced in favor of the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkIndyDidRegistrar")," which provides similar behavior, but leverages the new ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/indy-did-method/#indy-did-method-identifiers"},(0,r.kt)("inlineCode",{parentName:"a"},"did:indy")," method"),", which removes ambiguity about which network to use. You can still use the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkSovDidResolver")," to resolve ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov")," DIDs."),(0,r.kt)("p",null,"Note that the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," MUST be registered when using the Indy SDK did resolvers and registrars (see ",(0,r.kt)("a",{parentName:"p",href:"#agent-creation"},"Agent Creation"),"). The networks supported by the resolvers and registrar is determined by the ",(0,r.kt)("inlineCode",{parentName:"p"},"networks")," registered on the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," (see ",(0,r.kt)("a",{parentName:"p",href:"#indy-network-configuration"},"Indy Network Configuration"),")."),(0,r.kt)("p",null,"Also note that by default the ",(0,r.kt)("inlineCode",{parentName:"p"},"WebDidResolver"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"KeyDidResolver")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"PeerDidResolver")," are registered, and setting the ",(0,r.kt)("inlineCode",{parentName:"p"},"resolvers")," property on the ",(0,r.kt)("inlineCode",{parentName:"p"},"DidsModule")," configuration will override the default resolvers (an exception is the ",(0,r.kt)("inlineCode",{parentName:"p"},"PeerDidResolver")," as it is required for creating connections, and thus will always be registered)."),(0,r.kt)("p",null,"The same thing is true for the ",(0,r.kt)("inlineCode",{parentName:"p"},"registrars"),", for which the ",(0,r.kt)("inlineCode",{parentName:"p"},"KeyDidRegistrar")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"PeerDidRegistrar")," are registered by default. If defining the ",(0,r.kt)("inlineCode",{parentName:"p"},"resolvers")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"registrars"),", make sure to include the default registrars if you want to keep the previous behavior."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent, DidsModule } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n // note that the IndySdkModule MUST be registered for the resolvers and registrars to work\n // they are left out for brevity and can bee\n dids: new DidsModule({\n registrars: [new IndySdkIndyDidRegistrar()],\n resolvers: [new IndySdkSovDidResolver(), new IndySdkIndyDidResolver()],\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"removal-of-publicdidseed-and-publicdid"},"Removal of ",(0,r.kt)("inlineCode",{parentName:"h3"},"publicDidSeed")," and ",(0,r.kt)("inlineCode",{parentName:"h3"},"publicDid")),(0,r.kt)("p",null,"To make Credo more generic, and less focused on Hyperledger Indy, and Indy dids, the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDidSeed")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," properties have been removed from the agent configuration, the agent class, and the ",(0,r.kt)("inlineCode",{parentName:"p"},"Wallet")," interface."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," property was used as the did to register items in the ledger module. The approach had some limitations:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"An agent could only have a single ",(0,r.kt)("inlineCode",{parentName:"li"},"publicDid")," property. This means that if you wanted to write to multiple ledgers you would have to create multiple agents"),(0,r.kt)("li",{parentName:"ul"},"The property assumed only Indy ledgers would be used, and didn't take into account the possibility of other ledgers.")),(0,r.kt)("p",null,"Credo now provides generic APIs that can work with any ledger, and thus the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," property is no longer needed. Different sections of this migration guide will explain the different parts of how to use the new APIs, this section just focuses on how to replace the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," property."),(0,r.kt)("p",null,"The most common use case for the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," property was for registering an endorser did that can endorse (read: pay for) transactions on the ledger. This can now be done by importing the did into agent, after which it can be used by the AnonCreds module to register schemas and credential definitions, and the did registrar to register DIDs."),(0,r.kt)("p",null,"There's a ",(0,r.kt)("strong",{parentName:"p"},"one-time import")," that needs to be done to import the did into the agent using the ",(0,r.kt)("inlineCode",{parentName:"p"},"DidsApi.import")," method. If you've previously used the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDidSeed")," property, providing the private key is optional, as it is already stored in the wallet. Note that the ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," is the same as the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDidSeed"),", see ",(0,r.kt)("a",{parentName:"p",href:"#changes-to-wallet"},"Changes to Wallet")," for context). The ",(0,r.kt)("inlineCode",{parentName:"p"},"import")," method will resolve the did passed to the ",(0,r.kt)("inlineCode",{parentName:"p"},"import")," method (so make sure to register the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkIndyDidResolver"),"). It is recommended to import the endorser did as an ",(0,r.kt)("inlineCode",{parentName:"p"},"did:indy")," did rather than a ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov")," did, as the ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov")," method is deprecated for creation. The ",(0,r.kt)("inlineCode",{parentName:"p"},"did:indy")," did can be constructed by replacing ",(0,r.kt)("inlineCode",{parentName:"p"},"sov")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"indy:"),", where ",(0,r.kt)("inlineCode",{parentName:"p"},"")," should be replaced with a namespace as registered in the ",(0,r.kt)("inlineCode",{parentName:"p"},"networks")," property of the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," (see ",(0,r.kt)("a",{parentName:"p",href:"#indy-network-configuration"},"Indy Network Configuration"),")."),(0,r.kt)("p",null,"An initial list of namespace identifiers can be found in an ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-did-networks/issues/3"},"issue in the Indy Did Networks Repository"),". In the future this list will be maintained in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-did-networks"},"Indy DID Networks repository")," itself."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n publicDidSeed: '01eafa4de4e22ed4fc2ee522b6ce2731',\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent, DidsModule, KeyType, TypedArrayEncoder } from '@aries-framework/core'\nimport { IndySdkModule, IndySdkIndyDidResolver } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n networks: [\n {\n id: 'Sovrin Mainnet',\n // Important: make sure to pick the correct indy namespace for the network you're connecting to\n // See: https://github.com/hyperledger/indy-did-networks/issues/3\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n }),\n dids: new DidsModule({\n // Important: Make sure to register the IndySdkIndyDidResolver\n resolvers: [new IndySdkIndyDidResolver()],\n }),\n },\n})\n\n// Important: the `import` method only has to be called once, and the agent MUST be initialized before calling it.\n// The private key is optional if you've used the publicDidSeed property before (as the key will already be in the wallet),\nawait agent.initialize()\nawait agent.dids.import({\n did: 'did:indy:sovrin:KEPUoXHcswsfsHkXGfmXB7',\n privateKeys: [\n {\n keyType: KeyType.Ed25519,\n privateKey: TypedArrayEncoder.fromString('01eafa4de4e22ed4fc2ee522b6ce2731'),\n },\n ],\n})\n")))),(0,r.kt)("h3",{id:"more-granular-usage-of-legacy-didsov-prefix-in-didcomm-messages"},"More Granular Usage of Legacy ",(0,r.kt)("inlineCode",{parentName:"h3"},"did:sov")," Prefix in DIDComm Messages"),(0,r.kt)("p",null,"Credo 0.3.0 used the ",(0,r.kt)("inlineCode",{parentName:"p"},"useLegacyDidSovPrefix")," to use the legacy ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/")," as the prefix in the ",(0,r.kt)("inlineCode",{parentName:"p"},"@type")," of DIDComm message instead of the new ",(0,r.kt)("inlineCode",{parentName:"p"},"https://didcomm.org")," prefix. Over time it has proven that this approach leads to undesired behavior as all messages (even protocols that were defined after the new prefix was the default) would use the legacy prefix. However, due to not all implementations having support for new prefix, disabling the legacy prefixes proved to be a problem."),(0,r.kt)("p",null,"Therefore, in Credo 0.4.0 the ",(0,r.kt)("inlineCode",{parentName:"p"},"useLegacyDidSovPrefix")," property has been replaced with the ",(0,r.kt)("inlineCode",{parentName:"p"},"useDidSovPrefixWhereAllowed")," property. This property will only use the legacy prefix for protocols that were defined before the new prefix was the default. This means that protocols that were defined after the new prefix was the default will use the new prefix independent of the value of the ",(0,r.kt)("inlineCode",{parentName:"p"},"useDidSovPrefixWhereAllowed")," property. We hope this will allow us to slowly migrate away from the legacy prefix as new protocols are defined without breaking backwards compatibility."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n useLegacyDidSovPrefix: true,\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n useDidSovPrefixWhereAllowed: true,\n },\n dependencies: agentDependencies,\n})\n")))),(0,r.kt)("h3",{id:"removal-of-injectioncontainer-property-from-the-agent"},"Removal of ",(0,r.kt)("inlineCode",{parentName:"h3"},"injectionContainer")," property from the agent"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"injectionContainer")," property on the ",(0,r.kt)("inlineCode",{parentName:"p"},"Agent")," has been replaced by the ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencyManager")," property. The ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencyManager")," property is an instance of the ",(0,r.kt)("inlineCode",{parentName:"p"},"DependencyManager")," class and wraps the injection container from ",(0,r.kt)("inlineCode",{parentName:"p"},"tsyringe"),"."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"DependencyManager")," ",(0,r.kt)("em",{parentName:"p"},"should")," provide all functionality that is needed, and it is recommended to not use the injection directly. If you need to use the injection container directly, you can access it via the ",(0,r.kt)("inlineCode",{parentName:"p"},"container")," property on the ",(0,r.kt)("inlineCode",{parentName:"p"},"DependencyManager")," instance, but please raise an issue to discuss if the functionality you need should be added to the ",(0,r.kt)("inlineCode",{parentName:"p"},"DependencyManager")," class."),(0,r.kt)("h3",{id:"connection-has-been-updated-to-connectionid-in-transportsession"},(0,r.kt)("inlineCode",{parentName:"h3"},"connection")," has been updated to ",(0,r.kt)("inlineCode",{parentName:"h3"},"connectionId")," in ",(0,r.kt)("inlineCode",{parentName:"h3"},"TransportSession")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"connection")," property on the ",(0,r.kt)("inlineCode",{parentName:"p"},"TransportSession")," has been changed to ",(0,r.kt)("inlineCode",{parentName:"p"},"connectionId")," and now only holds a reference to the connection id instead of the connection record itself."),(0,r.kt)("p",null,"Accessing the connection on a transport session is an advanced case that is mostly only relevant when implementing a custom transport. If you are using the default transports, you should not be affected by this change."),(0,r.kt)("h3",{id:"replacement-of-ledger-module-with-new-anoncreds-module"},"Replacement of Ledger Module with new AnonCreds Module"),(0,r.kt)("p",null,"The ledger module has been available in Credo since the very beginning, and was due for a big overhaul. With the addition of the dids module a while ago we already had a replacement for the ",(0,r.kt)("inlineCode",{parentName:"p"},"registerPublicDid")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"getPublicDid")," methods on the ledger module. The other methods of the ledger module have been replaced by the AnonCreds module."),(0,r.kt)("p",null,"In Credo 0.4.0 AnonCreds credential support is not part of the core framework anymore, and needs to be manually registered on the agent. The first part is enabling the AnonCreds module, which allows to manage AnonCreds objects, interact with the ledger, and issuer, hold and verify AnonCreds credentials and is explained in this section. The second part is actually allowing AnonCreds credentials to be exchanged in the Issue Credential and Present Proof protocols, which is explained in the ",(0,r.kt)("a",{parentName:"p",href:"#manually-register-anoncreds-support-in-credentials-and-proofs-modules"},"Manually Register AnonCreds Support in Credentials and Proofs Modules")," section."),(0,r.kt)("p",null,"There's a few important takeaways based on the code example below:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"The ",(0,r.kt)("inlineCode",{parentName:"li"},"anoncreds")," module can be accessed under the ",(0,r.kt)("inlineCode",{parentName:"li"},"agent.modules.anoncreds")," property."),(0,r.kt)("li",{parentName:"ul"},"The interfaces are set up as generically as possible based on the ",(0,r.kt)("a",{parentName:"li",href:"https://identity.foundation/did-registration/"},"DID Registration")," and ",(0,r.kt)("a",{parentName:"li",href:"https://w3c-ccg.github.io/did-resolution/"},"DID Resolution")," specifications."),(0,r.kt)("li",{parentName:"ul"},"AnonCreds registries need to be manually registered so it's important to register the ",(0,r.kt)("inlineCode",{parentName:"li"},"IndySdkAnonCredsRegistry")," on the ",(0,r.kt)("inlineCode",{parentName:"li"},"AnonCredsModule"),"."),(0,r.kt)("li",{parentName:"ul"},"It is now required to pass an ",(0,r.kt)("inlineCode",{parentName:"li"},"issuerId")," when registering AnonCreds objects, according to the ",(0,r.kt)("a",{parentName:"li",href:"https://hyperledger.github.io/anoncreds-spec/"},"AnonCreds Specification"),". Only ",(0,r.kt)("inlineCode",{parentName:"li"},"did:indy")," issuer identifiers are allowed (based on the ",(0,r.kt)("a",{parentName:"li",href:"https://hyperledger.github.io/anoncreds-methods-registry/#didindy-anoncreds-method"},(0,r.kt)("inlineCode",{parentName:"a"},"did:indy")," AnonCreds Method"),"), so the network can be inferred from the issuer identifier.")),(0,r.kt)("p",null,"As will be explained in the ",(0,r.kt)("a",{parentName:"p",href:"#manually-register-anoncreds-support-in-credentials-and-proofs-modules"},"Manually Register AnonCreds Support in Credentials and Proofs Modules"),", you can still use the unqualified issuer identifiers (best known as the ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-methods-registry/#hyperledger-indy-legacy-anoncreds-method"},"Hyperledger Indy Legacy AnonCreds Method"),") in credential and proof exchanges."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n publicDidSeed: '01eafa4de4e22ed4fc2ee522b6ce2731',\n indyLedgers: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n },\n dependencies: agentDependencies,\n})\n\nawait agent.initialize()\n\nconst schema = await agent.ledger.registerSchema({\n attributes: ['name'],\n name: 'Example Schema',\n version: '1.0.1',\n})\n\nconst credentialDefinition = await agent.ledger.registerCredentialDefinition({\n schema,\n supportRevocation: false,\n tag: 'default',\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { Agent, DidsModule, KeyType, TypedArrayEncoder } from '@aries-framework/core'\nimport { IndySdkAnonCredsRegistry, IndySdkModule, IndySdkIndyDidResolver } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n networks: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n }),\n // Important: register the IndySdkAnonCredsRegistry so that the anoncreds module can resolver/register anoncreds objects based on the networks configured in the IndySdkModule\n anoncreds: new AnonCredsModule({\n registries: [new IndySdkAnonCredsRegistry()],\n }),\n // Important: register the IndySdkIndyDidResolver so that the anoncreds module can resolve DIDs based on the networks configured in the IndySdkModule\n dids: new DidsModule({\n resolvers: [new IndySdkIndyDidResolver()],\n }),\n },\n})\n\n// Agent MUST be initialized before the anoncreds module can be used\nawait agent.initialize()\n\n// Important: the issuerId (did) MUST be available to the dids module in the agent. You can either create the did using the dids module, or import it as described in this migration guide.\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: 'did:indy:sovrin:KEPUoXHcswsfsHkXGfmXB7',\n name: 'Example Schema',\n version: '1.0.0',\n },\n options: {},\n})\n\n// The resolver and registrar follow the same pattern as the Did Registration\n// and Did Resolver interfaces as used by the did module.\nif (schemaResult.schemaState.state !== 'finished') {\n console.error(schemaResult)\n throw new Error(`Error creating schema`)\n}\n\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n issuerId: 'did:indy:sovrin:KEPUoXHcswsfsHkXGfmXB7',\n schemaId: schemaResult.schemaState.schemaId,\n tag: 'default',\n },\n options: {},\n})\n")))),(0,r.kt)("h3",{id:"changes-to-the-credentials-and-proofs-modules"},"Changes to the Credentials and Proofs modules"),(0,r.kt)("p",null,"A lot of small, and some bigger changes have been made to the Credentials, and primarily, the Proofs modules. These changes have been made to make the modules more consistent and generic so that they can be used in a wider range of use cases, removing any focus on AnonCreds and Indy credentials."),(0,r.kt)("p",null,"Changes to the Proofs module include:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"getRequestedCredentialsForProofRequest")," has been renamed to ",(0,r.kt)("inlineCode",{parentName:"li"},"getCredentialsForRequest")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"autoSelectCredentialsForProofRequest")," has been renamed to ",(0,r.kt)("inlineCode",{parentName:"li"},"selectCredentialsForRequest")),(0,r.kt)("li",{parentName:"ul"},"The ",(0,r.kt)("inlineCode",{parentName:"li"},"config")," parameter for both methods has been removed and those have been replaced by proof format specific configuration options. In this case, the ",(0,r.kt)("inlineCode",{parentName:"li"},"config.filterByNonRevocationRequirements")," has been added as ",(0,r.kt)("inlineCode",{parentName:"li"},"proofFormats.indy.filterByNonRevocationRequirements")," (if the ",(0,r.kt)("inlineCode",{parentName:"li"},"indy")," format is registered as explained in the next section). The ",(0,r.kt)("inlineCode",{parentName:"li"},"config.filterByPresentationPreview")," has been removed as the presentation preview was only present in the present proof V1 protocol, and due to it's limited applicability (the holder starts with a proposal) we've decided to remove this method for now. You can still filter the credentials yourself by using the ",(0,r.kt)("inlineCode",{parentName:"li"},"getCredentialsForRequest")," method."),(0,r.kt)("li",{parentName:"ul"},"Interfaces have been renamed to be more consistent with the method names. Please refer to the ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts/blob/v0.4.0/packages/core/src/modules/credentials/CredentialsApiOptions.ts"},(0,r.kt)("inlineCode",{parentName:"a"},"CredentialsApiOptions"))," and ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts/blob/v0.4.0/packages/core/src/modules/proofs/ProofsApiOptions.ts"},(0,r.kt)("inlineCode",{parentName:"a"},"ProofsApiOptions"))," for the interface names that can be imported.")),(0,r.kt)("p",null,"If you encounter any other breaking changes in the Proofs and Credentials modules, please open an issue in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts-docs"},"Credo Docs")," repository."),(0,r.kt)("h3",{id:"changes-to-the-anoncreds-credential-and-proof-format"},"Changes to the AnonCreds Credential and Proof Format"),(0,r.kt)("p",null,"With the 0.4.0 release, Credo now provides a pluggable AnonCreds interface, and requires support AnonCreds credentials to be explicitly registered on the agent. This is also the case for registering the credential and proof formats."),(0,r.kt)("p",null,"In 0.3.x, the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndyProofFormatService")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"IndyCredentialFormatService")," were registered by default. In 0.4.x, these services are no longer registered by default and they should be imported from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," package as ",(0,r.kt)("inlineCode",{parentName:"p"},"LegacyIndyProofFormatService")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"LegacyIndyCredentialFormatService")," and are based on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0592-indy-attachments/README.md"},"Aries RFC 0592"),". In a future version the new ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialFormatService")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsProofFormatService")," will be added to the AnonCreds package, which are based on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/pull/771"},"Aries RFC 0771")," and allow for AnonCreds credentials to be exchanged based on the new ledger agnostic ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-spec/"},"AnonCreds Specification"),"."),(0,r.kt)("p",null,"In addition, the ",(0,r.kt)("inlineCode",{parentName:"p"},"V1CredentialProtocol")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"V1ProofProtocol")," have been extracted into the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," package, as they only support exchange of (legacy Indy) AnonCreds credentials."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n indyLedgers: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import {\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n LegacyIndyProofFormatService,\n V1CredentialProtocol,\n V1ProofProtocol,\n} from '@aries-framework/anoncreds'\nimport { Agent, CredentialsModule, ProofsModule, V2CredentialProtocol, V2ProofProtocol } from '@aries-framework/core'\nimport { IndySdkAnonCredsRegistry, IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst legacyIndyCredentialFormat = new LegacyIndyCredentialFormatService()\nconst legacyIndyProofFormat = new LegacyIndyProofFormatService()\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n networks: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n }),\n // Important: the AnonCreds module MUST be registered with a registry that can resolve\n // legacy unqualified Indy anoncreds identifiers\n anoncreds: new AnonCredsModule({\n registries: [new IndySdkAnonCredsRegistry()],\n }),\n // Define the proofs module with support for both v1 and v2 of the proof protocols\n // both of which support the legacy Indy proof format\n proofs: new ProofsModule({\n proofProtocols: [\n new V1ProofProtocol({\n indyProofFormat: legacyIndyProofFormat,\n }),\n new V2ProofProtocol({\n proofFormats: [legacyIndyProofFormat],\n }),\n ],\n }),\n // Define the credentials module with support for both v1 and v2 of the credential protocols\n // both of which support the legacy Indy proof format\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V1CredentialProtocol({\n indyCredentialFormat: legacyIndyCredentialFormat,\n }),\n new V2CredentialProtocol({\n credentialFormats: [legacyIndyCredentialFormat],\n }),\n ],\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"removal-of-anoncreds-master-secret-management-from-wallet"},"Removal of AnonCreds Master Secret management from ",(0,r.kt)("inlineCode",{parentName:"h3"},"Wallet")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Wallet")," class no longer manages the creation and deletion of AnonCreds master secrets (which are now called Link Secrets in AnonCreds module and specification). If you haven't provided a custom ",(0,r.kt)("inlineCode",{parentName:"p"},"masterSecretId")," to the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig")," before, the storage migration script should have automatically created an ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsLinkSecretRecord")," for you based on the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig.id"),"."),(0,r.kt)("p",null,"For new agents however, you now need to explicitly create a link secret before you can create requests for AnonCreds credential offers. You can do this using the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsApi.createLinkSecret")," method."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"If you previously used a custom ",(0,r.kt)("inlineCode",{parentName:"p"},"masterSecretId")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig")," the migration script will have created an incorrect ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsLinkSecretRecord")," based on the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig.id"),". You will need to manually override the link secret record with the correct ",(0,r.kt)("inlineCode",{parentName:"p"},"linkSecretId"),"."),(0,r.kt)("p",{parentName:"admonition"},"You ",(0,r.kt)("strong",{parentName:"p"},"ONLY")," need to do this if you're not migrating from Indy SDK to Askar, as in that case the migration script will have created the correct ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsLinkSecretRecord")," for you."),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { AnonCredsLinkSecretRepository } from '@aries-framework/anoncreds'\n\nconst linkSecretRepository = agent.dependencyManager.resolve(AnonCredsLinkSecretRepository)\nconst defaultLinkSecret = await linkSecretRepository.findDefault(agent.context)\n\nif (defaultLinkSecret) {\n defaultLinkSecret.linkSecretId = 'my-custom-link-secret-id'\n await linkSecretRepository.update(agent.context, defaultLinkSecret)\n}\n"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { Agent } from '@aries-framework/core'\nimport { IndySdkAnonCredsRegistry, IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndySdkAnonCredsRegistry()],\n }),\n },\n})\n\n// the agent MUST be initialized before calling it.\nawait agent.wallet.initialize({\n id: 'wallet-id',\n key: 'wallet-key',\n})\n\nawait agent.modules.anoncreds.createLinkSecret({\n // first one will be set to default automatically\n setAsDefault: true,\n\n // will be generated if not provided.\n // linkSecretId: 'link-secret-id'\n})\n")),(0,r.kt)("h3",{id:"default-outbound-didcomm-content-type-now-applicationdidcomm-envelope-enc"},"Default Outbound DIDComm Content Type now ",(0,r.kt)("inlineCode",{parentName:"h3"},"application/didcomm-envelope-enc")),(0,r.kt)("p",null,"The default outbound DIDComm content type has been changed from ",(0,r.kt)("inlineCode",{parentName:"p"},"DidCommMimeType.V0")," (",(0,r.kt)("inlineCode",{parentName:"p"},"application/ssi-agent-wire"),") to ",(0,r.kt)("inlineCode",{parentName:"p"},"DidCommMimeType.V1")," (",(0,r.kt)("inlineCode",{parentName:"p"},"application/didcomm-envelope-enc"),"). V1 is the default for DIDComm V1 (as ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0044-didcomm-file-and-mime-types/README.md#detecting-didcomm-versions"},"defined in Aries RFC 0044"),"). In the past, V0 resulted in better interoperability, but since it has been the default for so long it makes sense to change the default behavior."),(0,r.kt)("p",null,"It is advised to use the default value as configured by the agent (V1). If you want to keep the old behavior, you can ",(0,r.kt)("a",{parentName:"p",href:"/guides/tutorials/agent-config#didcommmimetype"},"configure the ",(0,r.kt)("inlineCode",{parentName:"a"},"didCommMimeType")," property in the agent configuration"),"."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent, DidCommMimeType } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n didCommMimeType: DidCommMimeType.V0,\n },\n dependencies: agentDependencies,\n})\n")))),(0,r.kt)("h3",{id:"generalizing-indy-properties-in-credentialexchangerecord"},"Generalizing Indy properties in ",(0,r.kt)("inlineCode",{parentName:"h3"},"CredentialExchangeRecord")),(0,r.kt)("p",null,"With AnonCreds credentials now being generalized to support multiple ledgers, the properties specific to Hyperledger Indy have now been generalized into a generic AnonCreds properties."),(0,r.kt)("h4",{id:"credentialrecordtype"},(0,r.kt)("inlineCode",{parentName:"h4"},"credentialRecordType")),(0,r.kt)("p",null,"First off, the ",(0,r.kt)("inlineCode",{parentName:"p"},"credentialRecordType")," that was used to reference stored AnonCreds credentials has been renamed from ",(0,r.kt)("inlineCode",{parentName:"p"},"indy")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"anoncreds"),". The migration script takes care of the update to the storage, but you need to make sure to update all places that expect a ",(0,r.kt)("inlineCode",{parentName:"p"},"credentialRecordType")," of ",(0,r.kt)("inlineCode",{parentName:"p"},"indy")," to be defined."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="CredentialExchangeRecord"',title:'"CredentialExchangeRecord"'},'{\n "credentials": [\n {\n "credentialRecordType": "indy",\n "credentialRecordId": "credential-id"\n }\n ]\n}\n'))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="CredentialExchangeRecord"',title:'"CredentialExchangeRecord"'},'{\n "credentials": [\n {\n "credentialRecordType": "anoncreds",\n "credentialRecordId": "credential-id"\n }\n ]\n}\n')))),(0,r.kt)("h4",{id:"metadata"},"Metadata"),(0,r.kt)("p",null,"Second, the metadata keys and values have been renamed to be AnonCreds specific rather than Indy specific. The ",(0,r.kt)("inlineCode",{parentName:"p"},"CredentialMetadataKeys")," have been replaced by the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialMetadataKey")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRequestMetadataKey")," constants which can be imported from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," package."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="CredentialExchangeRecord"',title:'"CredentialExchangeRecord"'},'{\n "metadata": {\n "_internal/indyCredential": {\n "schemaId": "schema-id",\n "credentialDefinitionId": "cred-def-id",\n "indyRevocationRegistryId": "rev-reg-id",\n "indyCredentialRevocationId": "cred-rev-id"\n },\n "_internal/indyRequest": {\n "master_secret_blinding_data": {\n "v_prime": "string",\n "vr_prime": "string"\n },\n "master_secret_name": "string",\n "nonce": "string"\n }\n }\n}\n'))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="CredentialExchangeRecord"',title:'"CredentialExchangeRecord"'},'{\n "metadata": {\n "_anoncreds/credential": {\n "schemaId": "schema-id",\n "credentialDefinitionId": "cred-def-id",\n "revocationRegistryId": "rev-reg-id",\n "credentialRevocationId": "cred-rev-id"\n },\n "_anoncreds/credentialRequest": {\n "master_secret_blinding_data": {\n "v_prime": "string",\n "vr_prime": "string"\n },\n "master_secret_name": "string",\n "nonce": "string"\n }\n }\n}\n')))),(0,r.kt)("h3",{id:"more-paths-in-filesystem"},"More paths in ",(0,r.kt)("inlineCode",{parentName:"h3"},"FileSystem")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"FileSystem")," interface has been extended to support multiple base paths. The previous interface had a single ",(0,r.kt)("inlineCode",{parentName:"p"},"basePath")," property which was used for storing of files across the framework."),(0,r.kt)("p",null,"With the different lifetimes of different objects, the ",(0,r.kt)("inlineCode",{parentName:"p"},"FileSystem")," interface has been extended to now support three different base paths:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"cachePath")," - files used for caching purposes. It's okay if the files are cleared from time to time."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"dataPath")," - files that are used for long-term reliable storage purposes. These files will never be cleared."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"tempPath")," - files that are used for temporary storage purposes. It's okay if the files are cleared from time to time.")),(0,r.kt)("p",null,"If you're using the framework, you don't need to worry about this change. The agent may need to download some objects again after the update. If you've made a custom implementation of the ",(0,r.kt)("inlineCode",{parentName:"p"},"FileSystem"),", make sure to support all three base paths, and make sure to correctly handle the life-cycle of the files. Items stored under the ",(0,r.kt)("inlineCode",{parentName:"p"},"dataPath")," ",(0,r.kt)("strong",{parentName:"p"},"should never be cleared"),"."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Indy SDK SQLite wallets do not use the paths defined by the ",(0,r.kt)("inlineCode",{parentName:"p"},"FileSystem")," interface, and thus will not be influenced by this change. When upgrading to Aries Askar, the ",(0,r.kt)("inlineCode",{parentName:"p"},"dataPath")," will be used as the base path for storing the SQLite wallet data.")),(0,r.kt)("h2",{id:"breaking-storage-changes"},"Breaking Storage Changes"),(0,r.kt)("p",null,"The 0.4.0 release introduces some breaking changes to the storage format."),(0,r.kt)("p",null,"Below all breaking storage changes are explained in as much detail as possible. The update assistant provides all tools to migrate without a hassle, but it is important to know what has changed. All examples only show the keys that have changed, unrelated keys in records have been omitted."),(0,r.kt)("p",null,"See the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant")," documentation for a guide on how to use the update assistant."),(0,r.kt)("p",null,"There are no configuration parameters to be provided to the update assistant to migrate from 0.3.x to 0.4.x."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"TODO")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/14e53ecf.7816974e.js b/assets/js/14e53ecf.7816974e.js new file mode 100644 index 0000000..5ae599e --- /dev/null +++ b/assets/js/14e53ecf.7816974e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[1904],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>h});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),l=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},p=function(e){var n=l(e.components);return a.createElement(s.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},u=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),c=l(t),u=r,h=c["".concat(s,".").concat(u)]||c[u]||m[u]||i;return t?a.createElement(h,o(o({ref:n},p),{},{components:t})):a.createElement(h,o({ref:n},p))}));function h(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=u;var d={};for(var s in n)hasOwnProperty.call(n,s)&&(d[s]=n[s]);d.originalType=e,d[c]="string"==typeof e?e:r,o[1]=d;for(var l=2;l{t.d(n,{Z:()=>o});var a=t(67294),r=t(86010);const i={tabItem:"tabItem_Ymn6"};function o(e){let{children:n,hidden:t,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:t},n)}},74866:(e,n,t)=>{t.d(n,{Z:()=>w});var a=t(87462),r=t(67294),i=t(86010),o=t(12466),d=t(16550),s=t(91980),l=t(67392),p=t(50012);function c(e){return function(e){return r.Children.map(e,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:r}}=e;return{value:n,label:t,attributes:a,default:r}}))}function m(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??c(t);return function(e){const n=(0,l.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function u(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const a=(0,d.k6)(),i=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!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 t??null}({queryString:n,groupId:t});return[(0,s._X)(i),(0,r.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(a.location.search);n.set(i,e),a.replace({...a.location,search:n.toString()})}),[i,a])]}function k(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,i=m(e),[o,d]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!u({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:i}))),[s,l]=h({queryString:t,groupId:a}),[c,k]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,i]=(0,p.Nk)(t);return[a,(0,r.useCallback)((e=>{t&&i.set(e)}),[t,i])]}({groupId:a}),g=(()=>{const e=s??c;return u({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{g&&d(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!u({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);d(e),l(e),k(e)}),[l,k,i]),tabValues:i}}var g=t(72389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:n,block:t,selectedValue:d,selectValue:s,tabValues:l}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.o5)(),m=e=>{const n=e.currentTarget,t=p.indexOf(n),a=l[t].value;a!==d&&(c(n),s(a))},u=e=>{let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const t=p.indexOf(e.currentTarget)+1;n=p[t]??p[0];break}case"ArrowLeft":{const t=p.indexOf(e.currentTarget)-1;n=p[t]??p[p.length-1];break}}n?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":t},n)},l.map((e=>{let{value:n,label:t,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:d===n?0:-1,"aria-selected":d===n,key:n,ref:e=>p.push(e),onKeyDown:u,onClick:m},o,{className:(0,i.Z)("tabs__item",f.tabItem,o?.className,{"tabs__item--active":d===n})}),t??n)})))}function v(e){let{lazy:n,children:t,selectedValue:a}=e;if(t=Array.isArray(t)?t:[t],n){const e=t.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},t.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a}))))}function b(e){const n=k(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",f.tabList)},r.createElement(y,(0,a.Z)({},e,n)),r.createElement(v,(0,a.Z)({},e,n)))}function w(e){const n=(0,g.Z)();return r.createElement(b,(0,a.Z)({key:String(n)},e))}},43635:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>h,frontMatter:()=>d,metadata:()=>l,toc:()=>c});var a=t(87462),r=(t(67294),t(3905)),i=t(74866),o=t(85162);const d={},s="Migrating from Credo 0.3.x to 0.4.x",l={unversionedId:"updating/versions/0.3-to-0.4",id:"updating/versions/0.3-to-0.4",title:"Migrating from Credo 0.3.x to 0.4.x",description:"This document describes everything you need to know for updating Credo 0.3.x to 0.4.x. If you're not aware of how updating in Credo works make sure to first read the guide on Updating Credo.",source:"@site/guides/updating/versions/0.3-to-0.4.md",sourceDirName:"updating/versions",slug:"/updating/versions/0.3-to-0.4",permalink:"/guides/updating/versions/0.3-to-0.4",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Migrating from Credo 0.2.x to 0.3.x",permalink:"/guides/updating/versions/0.2-to-0.3"},next:{title:"Migrating from Credo 0.4.x to 0.5.x",permalink:"/guides/updating/versions/0.4-to-0.5"}},p={},c=[{value:"React Native",id:"react-native",level:4},{value:"Node",id:"node",level:4},{value:"Breaking Code Changes",id:"breaking-code-changes",level:2},{value:"Agent Creation",id:"agent-creation",level:3},{value:"0.3.x",id:"03x",level:5},{value:"0.4.x",id:"04x",level:5},{value:"Indy Network Configuration",id:"indy-network-configuration",level:3},{value:"0.3.x",id:"03x-1",level:5},{value:"0.4.x",id:"04x-1",level:5},{value:"Changes to wallet",id:"changes-to-wallet",level:3},{value:"Did Resolver and Registrar",id:"did-resolver-and-registrar",level:3},{value:"0.3.x",id:"03x-2",level:5},{value:"0.4.x",id:"04x-2",level:5},{value:"Removal of publicDidSeed and publicDid",id:"removal-of-publicdidseed-and-publicdid",level:3},{value:"0.3.x",id:"03x-3",level:5},{value:"0.4.x",id:"04x-3",level:5},{value:"More Granular Usage of Legacy did:sov Prefix in DIDComm Messages",id:"more-granular-usage-of-legacy-didsov-prefix-in-didcomm-messages",level:3},{value:"0.3.x",id:"03x-4",level:5},{value:"0.4.x",id:"04x-4",level:5},{value:"Removal of injectionContainer property from the agent",id:"removal-of-injectioncontainer-property-from-the-agent",level:3},{value:"connection has been updated to connectionId in TransportSession",id:"connection-has-been-updated-to-connectionid-in-transportsession",level:3},{value:"Replacement of Ledger Module with new AnonCreds Module",id:"replacement-of-ledger-module-with-new-anoncreds-module",level:3},{value:"0.3.x",id:"03x-5",level:5},{value:"0.4.x",id:"04x-5",level:5},{value:"Changes to the Credentials and Proofs modules",id:"changes-to-the-credentials-and-proofs-modules",level:3},{value:"Changes to the AnonCreds Credential and Proof Format",id:"changes-to-the-anoncreds-credential-and-proof-format",level:3},{value:"0.3.x",id:"03x-6",level:5},{value:"0.4.x",id:"04x-6",level:5},{value:"Removal of AnonCreds Master Secret management from Wallet",id:"removal-of-anoncreds-master-secret-management-from-wallet",level:3},{value:"Default Outbound DIDComm Content Type now application/didcomm-envelope-enc",id:"default-outbound-didcomm-content-type-now-applicationdidcomm-envelope-enc",level:3},{value:"0.3.x",id:"03x-7",level:5},{value:"0.4.x",id:"04x-7",level:5},{value:"Generalizing Indy properties in CredentialExchangeRecord",id:"generalizing-indy-properties-in-credentialexchangerecord",level:3},{value:"credentialRecordType",id:"credentialrecordtype",level:4},{value:"0.3.x",id:"03x-8",level:5},{value:"0.4.x",id:"04x-8",level:5},{value:"Metadata",id:"metadata",level:4},{value:"0.3.x",id:"03x-9",level:5},{value:"0.4.x",id:"04x-9",level:5},{value:"More paths in FileSystem",id:"more-paths-in-filesystem",level:3},{value:"Breaking Storage Changes",id:"breaking-storage-changes",level:2}],m={toc:c},u="wrapper";function h(e){let{components:n,...t}=e;return(0,r.kt)(u,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"migrating-from-credo-03x-to-04x"},"Migrating from Credo 0.3.x to 0.4.x"),(0,r.kt)("p",null,"This document describes everything you need to know for updating Credo 0.3.x to 0.4.x. If you're not aware of how updating in Credo works make sure to first read the guide on ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/"},"Updating Credo"),"."),(0,r.kt)("p",null,"First of all, update you dependencies to the 0.4.x versions. This will also update the needed peer dependencies. ",(0,r.kt)("strong",{parentName:"p"},"Extension packages are not updated with this command"),". You need to update these manually, and make sure they're up to date with the latest version of Credo."),(0,r.kt)("p",null,"Credo 0.4.0 is a major release that introduces a lot of new features and changes to the public API. Specifically, this release removed the dependency on the Indy SDK from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/core")," package. Agent setup is more flexible, but it also means the setup is more complex. Follow the mentioned steps in this document carefully to make the upgrade as smooth as possible."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The migration guide only covers how to migrate from 0.3.x to 0.4.x while keeping the same behavior and dependencies. Credo 0.4.0 introduced a lot of new features and adds support for ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-askar"},"Aries Askar"),", ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-vdr"},"Indy VDR")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/anoncreds-rs"},"AnonCreds RS")," as a replacement for the Indy SDK."),(0,r.kt)("p",{parentName:"admonition"},"Migrating to these new components requires additional migration steps, which need to be closely followed to prevent loss of data. These can be found at the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-indy-sdk-to-askar"},"Update Indy SDK to Askar guide"),"."),(0,r.kt)("p",{parentName:"admonition"},"As noted in the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-indy-sdk-to-askar"},"Update Indy SDK to Askar guide"),", it is very important that the 0.3.x to 0.4.x update is started after migrating from the Indy SDK to Aries Askar.")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Multi-tenancy is not covered in the 0.3.x to 0.4.x migration guide. If you're using multi-tenancy in 0.3.x and want to migrate to 0.4.x, please open an issue on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"Github"),".")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The following APIs, modules and features are experimental and therefore not covered by the semver versioning in Credo. If you're using any of these features, make sure to use an exact version of Credo (",(0,r.kt)("inlineCode",{parentName:"p"},"0.4.0"),") instead of a range (",(0,r.kt)("inlineCode",{parentName:"p"},"^0.4.0"),"):"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"Implementing your own ",(0,r.kt)("inlineCode",{parentName:"li"},"AnonCredsRegistry")," and AnonCreds service implementation. Using the default implementations (Indy SDK, AnonCreds RS) is fine."),(0,r.kt)("li",{parentName:"ul"},"Using the shared component libraries from ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/aries-askar"),", ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/indy-vdr")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/anoncreds-rs")),(0,r.kt)("li",{parentName:"ul"},"Using OpenID4VC from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/openid4vc-client")," module"),(0,r.kt)("li",{parentName:"ul"},"W3C JWT Verifiable Credentials"),(0,r.kt)("li",{parentName:"ul"},"Using multi-tenancy from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@aries-framework/tenants")," module"))),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"React Native",value:"tab1",mdxType:"TabItem"},(0,r.kt)("p",null,"First install the updated dependencies. Make sure to also install the new ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/indy-sdk")," package, which is a wrapper around the Indy SDK and install the ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk-react-native")," package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @aries-framework/react-native@^0.4.0 @aries-framework/core@^0.4.0 @aries-framework/indy-sdk@^0.4.0 @aries-framework/anoncreds@^0.4.0 indy-sdk-react-native@^0.3.1\n\n# or NPM\nnpn install @aries-framework/react-native@^0.4.0 @aries-framework/core@^0.4.0 @aries-framework/indy-sdk@^0.4.0 @aries-framework/anoncreds@^0.4.0 indy-sdk-react-native@^0.3.1\n")),(0,r.kt)("p",null,"We also need to install types for the ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk-react-native")," package, which we take from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/indy-sdk")," package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add --dev @types/indy-sdk-react-native@npm:@types/indy-sdk\n\n# or NPM\nnpm install --save-dev @types/indy-sdk-react-native@npm:@types/indy-sdk\n"))),(0,r.kt)(o.Z,{label:"Node",value:"tab2",mdxType:"TabItem"},(0,r.kt)("p",null,"First install the updated dependencies. Make sure to also install the new ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/indy-sdk")," package, which is a wrapper around the Indy SDK and install the ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk")," package itself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @aries-framework/node@^0.4.0 @aries-framework/core@^0.4.0 @aries-framework/indy-sdk@^0.4.0 @aries-framework/anoncreds@^0.4.0 indy-sdk\n\n# or NPM\nnpm install @aries-framework/node@^0.4.0 @aries-framework/core@^0.4.0 @aries-framework/indy-sdk@^0.4.0 @aries-framework/anoncreds@^0.4.0 indy-sdk\n")),(0,r.kt)("p",null,"We also need to install types for the ",(0,r.kt)("inlineCode",{parentName:"p"},"indy-sdk")," package, which are available in the ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/indy-sdk")," package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add --dev @types/indy-sdk\n\n# or NPM\nnpm install --save-dev @types/indy-sdk\n")))),(0,r.kt)("h2",{id:"breaking-code-changes"},"Breaking Code Changes"),(0,r.kt)("p",null,"This section will list all breaking changes made to the public API of Credo between version 0.3.x and 0.4.0."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If you have custom modules take into account there could be a lot more breaking changes that aren't documented here. We try to make sure that the biggest breaking changes to the internal API are also documented here, but it is possible some breaking changes are not documented here (feel free to open a pull request).")),(0,r.kt)("h3",{id:"agent-creation"},"Agent Creation"),(0,r.kt)("p",null,"With the dependency on the Indy SDK removed from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/core")," package, we now need to register the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," to still leverage the functionality the Indy SDK provides."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n // Register the IndySdkModule and provide the indySdk dependency\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"indy-network-configuration"},"Indy Network Configuration"),(0,r.kt)("p",null,"With the Indy SDK being extracted out of core, the ",(0,r.kt)("inlineCode",{parentName:"p"},"indyLedger")," configuration option is no longer available on the ",(0,r.kt)("inlineCode",{parentName:"p"},"AgentConfig")," interface. Instead, the ",(0,r.kt)("inlineCode",{parentName:"p"},"networks")," configuration option is now available on the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," configuration."),(0,r.kt)("p",null,"In addition the ",(0,r.kt)("inlineCode",{parentName:"p"},"connectToIndyLedgersOnStartup")," property has been removed in favor of a per-network ",(0,r.kt)("inlineCode",{parentName:"p"},"connectOnStartup")," property that allows more fine-grained control over which networks to connect to on startup."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n connectToIndyLedgersOnStartup: true,\n indyLedgers: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n // Register the IndySdkModule and provide the indySdk dependency\n indySdk: new IndySdkModule({\n indySdk,\n\n // add networks as a replacement for indyLedgers\n networks: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n // new connectOnStartup property\n connectOnStartup: true,\n },\n ],\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"changes-to-wallet"},"Changes to wallet"),(0,r.kt)("p",null,"Throughout the framework it was possible to provide a ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," for deterministic key generation. Recently it was discovered that the ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property in the Indy SDK was not actually used as a seed, but directly as the private key."),(0,r.kt)("p",null,"Therefore a new ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," property was added to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Wallet")," interface in addition to the ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property. When using the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," this now means you can ",(0,r.kt)("strong",{parentName:"p"},"only")," provide the ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," property. The ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property is no longer supported ",(0,r.kt)("strong",{parentName:"p"},"by the ",(0,r.kt)("inlineCode",{parentName:"strong"},"IndySdkModule")),"."),(0,r.kt)("p",null,"The type of the ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property has also been changed to ",(0,r.kt)("inlineCode",{parentName:"p"},"Buffer")," to make it more consistent with ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," property, and remove the ambiguity of what the encoding of the string variant of the ",(0,r.kt)("inlineCode",{parentName:"p"},"seed")," property should be."),(0,r.kt)("h3",{id:"did-resolver-and-registrar"},"Did Resolver and Registrar"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov")," resolver and registrar were registered by default in 0.3.x of the agent. In 0.4.0 they've been moved to the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/indy-sdk")," package and are thus not registered by default on the DIDs module anymore. In addition, the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkSovDidRegistrar")," has been replaced in favor of the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkIndyDidRegistrar")," which provides similar behavior, but leverages the new ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/indy-did-method/#indy-did-method-identifiers"},(0,r.kt)("inlineCode",{parentName:"a"},"did:indy")," method"),", which removes ambiguity about which network to use. You can still use the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkSovDidResolver")," to resolve ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov")," DIDs."),(0,r.kt)("p",null,"Note that the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," MUST be registered when using the Indy SDK did resolvers and registrars (see ",(0,r.kt)("a",{parentName:"p",href:"#agent-creation"},"Agent Creation"),"). The networks supported by the resolvers and registrar is determined by the ",(0,r.kt)("inlineCode",{parentName:"p"},"networks")," registered on the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," (see ",(0,r.kt)("a",{parentName:"p",href:"#indy-network-configuration"},"Indy Network Configuration"),")."),(0,r.kt)("p",null,"Also note that by default the ",(0,r.kt)("inlineCode",{parentName:"p"},"WebDidResolver"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"KeyDidResolver")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"PeerDidResolver")," are registered, and setting the ",(0,r.kt)("inlineCode",{parentName:"p"},"resolvers")," property on the ",(0,r.kt)("inlineCode",{parentName:"p"},"DidsModule")," configuration will override the default resolvers (an exception is the ",(0,r.kt)("inlineCode",{parentName:"p"},"PeerDidResolver")," as it is required for creating connections, and thus will always be registered)."),(0,r.kt)("p",null,"The same thing is true for the ",(0,r.kt)("inlineCode",{parentName:"p"},"registrars"),", for which the ",(0,r.kt)("inlineCode",{parentName:"p"},"KeyDidRegistrar")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"PeerDidRegistrar")," are registered by default. If defining the ",(0,r.kt)("inlineCode",{parentName:"p"},"resolvers")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"registrars"),", make sure to include the default registrars if you want to keep the previous behavior."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent, DidsModule } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n // note that the IndySdkModule MUST be registered for the resolvers and registrars to work\n // they are left out for brevity and can bee\n dids: new DidsModule({\n registrars: [new IndySdkIndyDidRegistrar()],\n resolvers: [new IndySdkSovDidResolver(), new IndySdkIndyDidResolver()],\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"removal-of-publicdidseed-and-publicdid"},"Removal of ",(0,r.kt)("inlineCode",{parentName:"h3"},"publicDidSeed")," and ",(0,r.kt)("inlineCode",{parentName:"h3"},"publicDid")),(0,r.kt)("p",null,"To make Credo more generic, and less focused on Hyperledger Indy, and Indy dids, the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDidSeed")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," properties have been removed from the agent configuration, the agent class, and the ",(0,r.kt)("inlineCode",{parentName:"p"},"Wallet")," interface."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," property was used as the did to register items in the ledger module. The approach had some limitations:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"An agent could only have a single ",(0,r.kt)("inlineCode",{parentName:"li"},"publicDid")," property. This means that if you wanted to write to multiple ledgers you would have to create multiple agents"),(0,r.kt)("li",{parentName:"ul"},"The property assumed only Indy ledgers would be used, and didn't take into account the possibility of other ledgers.")),(0,r.kt)("p",null,"Credo now provides generic APIs that can work with any ledger, and thus the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," property is no longer needed. Different sections of this migration guide will explain the different parts of how to use the new APIs, this section just focuses on how to replace the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," property."),(0,r.kt)("p",null,"The most common use case for the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDid")," property was for registering an endorser did that can endorse (read: pay for) transactions on the ledger. This can now be done by importing the did into agent, after which it can be used by the AnonCreds module to register schemas and credential definitions, and the did registrar to register DIDs."),(0,r.kt)("p",null,"There's a ",(0,r.kt)("strong",{parentName:"p"},"one-time import")," that needs to be done to import the did into the agent using the ",(0,r.kt)("inlineCode",{parentName:"p"},"DidsApi.import")," method. If you've previously used the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDidSeed")," property, providing the private key is optional, as it is already stored in the wallet. Note that the ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," is the same as the ",(0,r.kt)("inlineCode",{parentName:"p"},"publicDidSeed"),", see ",(0,r.kt)("a",{parentName:"p",href:"#changes-to-wallet"},"Changes to Wallet")," for context). The ",(0,r.kt)("inlineCode",{parentName:"p"},"import")," method will resolve the did passed to the ",(0,r.kt)("inlineCode",{parentName:"p"},"import")," method (so make sure to register the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkIndyDidResolver"),"). It is recommended to import the endorser did as an ",(0,r.kt)("inlineCode",{parentName:"p"},"did:indy")," did rather than a ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov")," did, as the ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov")," method is deprecated for creation. The ",(0,r.kt)("inlineCode",{parentName:"p"},"did:indy")," did can be constructed by replacing ",(0,r.kt)("inlineCode",{parentName:"p"},"sov")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"indy:"),", where ",(0,r.kt)("inlineCode",{parentName:"p"},"")," should be replaced with a namespace as registered in the ",(0,r.kt)("inlineCode",{parentName:"p"},"networks")," property of the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndySdkModule")," (see ",(0,r.kt)("a",{parentName:"p",href:"#indy-network-configuration"},"Indy Network Configuration"),")."),(0,r.kt)("p",null,"An initial list of namespace identifiers can be found in an ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-did-networks/issues/3"},"issue in the Indy Did Networks Repository"),". In the future this list will be maintained in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-did-networks"},"Indy DID Networks repository")," itself."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n publicDidSeed: '01eafa4de4e22ed4fc2ee522b6ce2731',\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent, DidsModule, KeyType, TypedArrayEncoder } from '@aries-framework/core'\nimport { IndySdkModule, IndySdkIndyDidResolver } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n networks: [\n {\n id: 'Sovrin Mainnet',\n // Important: make sure to pick the correct indy namespace for the network you're connecting to\n // See: https://github.com/hyperledger/indy-did-networks/issues/3\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n }),\n dids: new DidsModule({\n // Important: Make sure to register the IndySdkIndyDidResolver\n resolvers: [new IndySdkIndyDidResolver()],\n }),\n },\n})\n\n// Important: the `import` method only has to be called once, and the agent MUST be initialized before calling it.\n// The private key is optional if you've used the publicDidSeed property before (as the key will already be in the wallet),\nawait agent.initialize()\nawait agent.dids.import({\n did: 'did:indy:sovrin:KEPUoXHcswsfsHkXGfmXB7',\n privateKeys: [\n {\n keyType: KeyType.Ed25519,\n privateKey: TypedArrayEncoder.fromString('01eafa4de4e22ed4fc2ee522b6ce2731'),\n },\n ],\n})\n")))),(0,r.kt)("h3",{id:"more-granular-usage-of-legacy-didsov-prefix-in-didcomm-messages"},"More Granular Usage of Legacy ",(0,r.kt)("inlineCode",{parentName:"h3"},"did:sov")," Prefix in DIDComm Messages"),(0,r.kt)("p",null,"Credo 0.3.0 used the ",(0,r.kt)("inlineCode",{parentName:"p"},"useLegacyDidSovPrefix")," to use the legacy ",(0,r.kt)("inlineCode",{parentName:"p"},"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/")," as the prefix in the ",(0,r.kt)("inlineCode",{parentName:"p"},"@type")," of DIDComm message instead of the new ",(0,r.kt)("inlineCode",{parentName:"p"},"https://didcomm.org")," prefix. Over time it has proven that this approach leads to undesired behavior as all messages (even protocols that were defined after the new prefix was the default) would use the legacy prefix. However, due to not all implementations having support for new prefix, disabling the legacy prefixes proved to be a problem."),(0,r.kt)("p",null,"Therefore, in Credo 0.4.0 the ",(0,r.kt)("inlineCode",{parentName:"p"},"useLegacyDidSovPrefix")," property has been replaced with the ",(0,r.kt)("inlineCode",{parentName:"p"},"useDidSovPrefixWhereAllowed")," property. This property will only use the legacy prefix for protocols that were defined before the new prefix was the default. This means that protocols that were defined after the new prefix was the default will use the new prefix independent of the value of the ",(0,r.kt)("inlineCode",{parentName:"p"},"useDidSovPrefixWhereAllowed")," property. We hope this will allow us to slowly migrate away from the legacy prefix as new protocols are defined without breaking backwards compatibility."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n useLegacyDidSovPrefix: true,\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n useDidSovPrefixWhereAllowed: true,\n },\n dependencies: agentDependencies,\n})\n")))),(0,r.kt)("h3",{id:"removal-of-injectioncontainer-property-from-the-agent"},"Removal of ",(0,r.kt)("inlineCode",{parentName:"h3"},"injectionContainer")," property from the agent"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"injectionContainer")," property on the ",(0,r.kt)("inlineCode",{parentName:"p"},"Agent")," has been replaced by the ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencyManager")," property. The ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencyManager")," property is an instance of the ",(0,r.kt)("inlineCode",{parentName:"p"},"DependencyManager")," class and wraps the injection container from ",(0,r.kt)("inlineCode",{parentName:"p"},"tsyringe"),"."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"DependencyManager")," ",(0,r.kt)("em",{parentName:"p"},"should")," provide all functionality that is needed, and it is recommended to not use the injection directly. If you need to use the injection container directly, you can access it via the ",(0,r.kt)("inlineCode",{parentName:"p"},"container")," property on the ",(0,r.kt)("inlineCode",{parentName:"p"},"DependencyManager")," instance, but please raise an issue to discuss if the functionality you need should be added to the ",(0,r.kt)("inlineCode",{parentName:"p"},"DependencyManager")," class."),(0,r.kt)("h3",{id:"connection-has-been-updated-to-connectionid-in-transportsession"},(0,r.kt)("inlineCode",{parentName:"h3"},"connection")," has been updated to ",(0,r.kt)("inlineCode",{parentName:"h3"},"connectionId")," in ",(0,r.kt)("inlineCode",{parentName:"h3"},"TransportSession")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"connection")," property on the ",(0,r.kt)("inlineCode",{parentName:"p"},"TransportSession")," has been changed to ",(0,r.kt)("inlineCode",{parentName:"p"},"connectionId")," and now only holds a reference to the connection id instead of the connection record itself."),(0,r.kt)("p",null,"Accessing the connection on a transport session is an advanced case that is mostly only relevant when implementing a custom transport. If you are using the default transports, you should not be affected by this change."),(0,r.kt)("h3",{id:"replacement-of-ledger-module-with-new-anoncreds-module"},"Replacement of Ledger Module with new AnonCreds Module"),(0,r.kt)("p",null,"The ledger module has been available in Credo since the very beginning, and was due for a big overhaul. With the addition of the dids module a while ago we already had a replacement for the ",(0,r.kt)("inlineCode",{parentName:"p"},"registerPublicDid")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"getPublicDid")," methods on the ledger module. The other methods of the ledger module have been replaced by the AnonCreds module."),(0,r.kt)("p",null,"In Credo 0.4.0 AnonCreds credential support is not part of the core framework anymore, and needs to be manually registered on the agent. The first part is enabling the AnonCreds module, which allows to manage AnonCreds objects, interact with the ledger, and issuer, hold and verify AnonCreds credentials and is explained in this section. The second part is actually allowing AnonCreds credentials to be exchanged in the Issue Credential and Present Proof protocols, which is explained in the ",(0,r.kt)("a",{parentName:"p",href:"#manually-register-anoncreds-support-in-credentials-and-proofs-modules"},"Manually Register AnonCreds Support in Credentials and Proofs Modules")," section."),(0,r.kt)("p",null,"There's a few important takeaways based on the code example below:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"The ",(0,r.kt)("inlineCode",{parentName:"li"},"anoncreds")," module can be accessed under the ",(0,r.kt)("inlineCode",{parentName:"li"},"agent.modules.anoncreds")," property."),(0,r.kt)("li",{parentName:"ul"},"The interfaces are set up as generically as possible based on the ",(0,r.kt)("a",{parentName:"li",href:"https://identity.foundation/did-registration/"},"DID Registration")," and ",(0,r.kt)("a",{parentName:"li",href:"https://w3c-ccg.github.io/did-resolution/"},"DID Resolution")," specifications."),(0,r.kt)("li",{parentName:"ul"},"AnonCreds registries need to be manually registered so it's important to register the ",(0,r.kt)("inlineCode",{parentName:"li"},"IndySdkAnonCredsRegistry")," on the ",(0,r.kt)("inlineCode",{parentName:"li"},"AnonCredsModule"),"."),(0,r.kt)("li",{parentName:"ul"},"It is now required to pass an ",(0,r.kt)("inlineCode",{parentName:"li"},"issuerId")," when registering AnonCreds objects, according to the ",(0,r.kt)("a",{parentName:"li",href:"https://hyperledger.github.io/anoncreds-spec/"},"AnonCreds Specification"),". Only ",(0,r.kt)("inlineCode",{parentName:"li"},"did:indy")," issuer identifiers are allowed (based on the ",(0,r.kt)("a",{parentName:"li",href:"https://hyperledger.github.io/anoncreds-methods-registry/#didindy-anoncreds-method"},(0,r.kt)("inlineCode",{parentName:"a"},"did:indy")," AnonCreds Method"),"), so the network can be inferred from the issuer identifier.")),(0,r.kt)("p",null,"As will be explained in the ",(0,r.kt)("a",{parentName:"p",href:"#manually-register-anoncreds-support-in-credentials-and-proofs-modules"},"Manually Register AnonCreds Support in Credentials and Proofs Modules"),", you can still use the unqualified issuer identifiers (best known as the ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-methods-registry/#hyperledger-indy-legacy-anoncreds-method"},"Hyperledger Indy Legacy AnonCreds Method"),") in credential and proof exchanges."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n publicDidSeed: '01eafa4de4e22ed4fc2ee522b6ce2731',\n indyLedgers: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n },\n dependencies: agentDependencies,\n})\n\nawait agent.initialize()\n\nconst schema = await agent.ledger.registerSchema({\n attributes: ['name'],\n name: 'Example Schema',\n version: '1.0.1',\n})\n\nconst credentialDefinition = await agent.ledger.registerCredentialDefinition({\n schema,\n supportRevocation: false,\n tag: 'default',\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { Agent, DidsModule, KeyType, TypedArrayEncoder } from '@aries-framework/core'\nimport { IndySdkAnonCredsRegistry, IndySdkModule, IndySdkIndyDidResolver } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n networks: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n }),\n // Important: register the IndySdkAnonCredsRegistry so that the anoncreds module can resolver/register anoncreds objects based on the networks configured in the IndySdkModule\n anoncreds: new AnonCredsModule({\n registries: [new IndySdkAnonCredsRegistry()],\n }),\n // Important: register the IndySdkIndyDidResolver so that the anoncreds module can resolve DIDs based on the networks configured in the IndySdkModule\n dids: new DidsModule({\n resolvers: [new IndySdkIndyDidResolver()],\n }),\n },\n})\n\n// Agent MUST be initialized before the anoncreds module can be used\nawait agent.initialize()\n\n// Important: the issuerId (did) MUST be available to the dids module in the agent. You can either create the did using the dids module, or import it as described in this migration guide.\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: 'did:indy:sovrin:KEPUoXHcswsfsHkXGfmXB7',\n name: 'Example Schema',\n version: '1.0.0',\n },\n options: {},\n})\n\n// The resolver and registrar follow the same pattern as the Did Registration\n// and Did Resolver interfaces as used by the did module.\nif (schemaResult.schemaState.state !== 'finished') {\n console.error(schemaResult)\n throw new Error(`Error creating schema`)\n}\n\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n issuerId: 'did:indy:sovrin:KEPUoXHcswsfsHkXGfmXB7',\n schemaId: schemaResult.schemaState.schemaId,\n tag: 'default',\n },\n options: {},\n})\n")))),(0,r.kt)("h3",{id:"changes-to-the-credentials-and-proofs-modules"},"Changes to the Credentials and Proofs modules"),(0,r.kt)("p",null,"A lot of small, and some bigger changes have been made to the Credentials, and primarily, the Proofs modules. These changes have been made to make the modules more consistent and generic so that they can be used in a wider range of use cases, removing any focus on AnonCreds and Indy credentials."),(0,r.kt)("p",null,"Changes to the Proofs module include:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"getRequestedCredentialsForProofRequest")," has been renamed to ",(0,r.kt)("inlineCode",{parentName:"li"},"getCredentialsForRequest")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"autoSelectCredentialsForProofRequest")," has been renamed to ",(0,r.kt)("inlineCode",{parentName:"li"},"selectCredentialsForRequest")),(0,r.kt)("li",{parentName:"ul"},"The ",(0,r.kt)("inlineCode",{parentName:"li"},"config")," parameter for both methods has been removed and those have been replaced by proof format specific configuration options. In this case, the ",(0,r.kt)("inlineCode",{parentName:"li"},"config.filterByNonRevocationRequirements")," has been added as ",(0,r.kt)("inlineCode",{parentName:"li"},"proofFormats.indy.filterByNonRevocationRequirements")," (if the ",(0,r.kt)("inlineCode",{parentName:"li"},"indy")," format is registered as explained in the next section). The ",(0,r.kt)("inlineCode",{parentName:"li"},"config.filterByPresentationPreview")," has been removed as the presentation preview was only present in the present proof V1 protocol, and due to it's limited applicability (the holder starts with a proposal) we've decided to remove this method for now. You can still filter the credentials yourself by using the ",(0,r.kt)("inlineCode",{parentName:"li"},"getCredentialsForRequest")," method."),(0,r.kt)("li",{parentName:"ul"},"Interfaces have been renamed to be more consistent with the method names. Please refer to the ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts/blob/v0.4.0/packages/core/src/modules/credentials/CredentialsApiOptions.ts"},(0,r.kt)("inlineCode",{parentName:"a"},"CredentialsApiOptions"))," and ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts/blob/v0.4.0/packages/core/src/modules/proofs/ProofsApiOptions.ts"},(0,r.kt)("inlineCode",{parentName:"a"},"ProofsApiOptions"))," for the interface names that can be imported.")),(0,r.kt)("p",null,"If you encounter any other breaking changes in the Proofs and Credentials modules, please open an issue in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts-docs"},"Credo Docs")," repository."),(0,r.kt)("h3",{id:"changes-to-the-anoncreds-credential-and-proof-format"},"Changes to the AnonCreds Credential and Proof Format"),(0,r.kt)("p",null,"With the 0.4.0 release, Credo now provides a pluggable AnonCreds interface, and requires support AnonCreds credentials to be explicitly registered on the agent. This is also the case for registering the credential and proof formats."),(0,r.kt)("p",null,"In 0.3.x, the ",(0,r.kt)("inlineCode",{parentName:"p"},"IndyProofFormatService")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"IndyCredentialFormatService")," were registered by default. In 0.4.x, these services are no longer registered by default and they should be imported from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," package as ",(0,r.kt)("inlineCode",{parentName:"p"},"LegacyIndyProofFormatService")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"LegacyIndyCredentialFormatService")," and are based on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0592-indy-attachments/README.md"},"Aries RFC 0592"),". In a future version the new ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialFormatService")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsProofFormatService")," will be added to the AnonCreds package, which are based on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/pull/771"},"Aries RFC 0771")," and allow for AnonCreds credentials to be exchanged based on the new ledger agnostic ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-spec/"},"AnonCreds Specification"),"."),(0,r.kt)("p",null,"In addition, the ",(0,r.kt)("inlineCode",{parentName:"p"},"V1CredentialProtocol")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"V1ProofProtocol")," have been extracted into the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," package, as they only support exchange of (legacy Indy) AnonCreds credentials."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n indyLedgers: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import {\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n LegacyIndyProofFormatService,\n V1CredentialProtocol,\n V1ProofProtocol,\n} from '@aries-framework/anoncreds'\nimport { Agent, CredentialsModule, ProofsModule, V2CredentialProtocol, V2ProofProtocol } from '@aries-framework/core'\nimport { IndySdkAnonCredsRegistry, IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst legacyIndyCredentialFormat = new LegacyIndyCredentialFormatService()\nconst legacyIndyProofFormat = new LegacyIndyProofFormatService()\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n networks: [\n {\n id: 'Sovrin Mainnet',\n indyNamespace: 'sovrin',\n isProduction: true,\n genesisPath: './genesis/sovrin-genesis.txn',\n },\n ],\n }),\n // Important: the AnonCreds module MUST be registered with a registry that can resolve\n // legacy unqualified Indy anoncreds identifiers\n anoncreds: new AnonCredsModule({\n registries: [new IndySdkAnonCredsRegistry()],\n }),\n // Define the proofs module with support for both v1 and v2 of the proof protocols\n // both of which support the legacy Indy proof format\n proofs: new ProofsModule({\n proofProtocols: [\n new V1ProofProtocol({\n indyProofFormat: legacyIndyProofFormat,\n }),\n new V2ProofProtocol({\n proofFormats: [legacyIndyProofFormat],\n }),\n ],\n }),\n // Define the credentials module with support for both v1 and v2 of the credential protocols\n // both of which support the legacy Indy proof format\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V1CredentialProtocol({\n indyCredentialFormat: legacyIndyCredentialFormat,\n }),\n new V2CredentialProtocol({\n credentialFormats: [legacyIndyCredentialFormat],\n }),\n ],\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"removal-of-anoncreds-master-secret-management-from-wallet"},"Removal of AnonCreds Master Secret management from ",(0,r.kt)("inlineCode",{parentName:"h3"},"Wallet")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Wallet")," class no longer manages the creation and deletion of AnonCreds master secrets (which are now called Link Secrets in AnonCreds module and specification). If you haven't provided a custom ",(0,r.kt)("inlineCode",{parentName:"p"},"masterSecretId")," to the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig")," before, the storage migration script should have automatically created an ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsLinkSecretRecord")," for you based on the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig.id"),"."),(0,r.kt)("p",null,"For new agents however, you now need to explicitly create a link secret before you can create requests for AnonCreds credential offers. You can do this using the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsApi.createLinkSecret")," method."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"If you previously used a custom ",(0,r.kt)("inlineCode",{parentName:"p"},"masterSecretId")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig")," the migration script will have created an incorrect ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsLinkSecretRecord")," based on the ",(0,r.kt)("inlineCode",{parentName:"p"},"walletConfig.id"),". You will need to manually override the link secret record with the correct ",(0,r.kt)("inlineCode",{parentName:"p"},"linkSecretId"),"."),(0,r.kt)("p",{parentName:"admonition"},"You ",(0,r.kt)("strong",{parentName:"p"},"ONLY")," need to do this if you're not migrating from Indy SDK to Askar, as in that case the migration script will have created the correct ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsLinkSecretRecord")," for you."),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { AnonCredsLinkSecretRepository } from '@aries-framework/anoncreds'\n\nconst linkSecretRepository = agent.dependencyManager.resolve(AnonCredsLinkSecretRepository)\nconst defaultLinkSecret = await linkSecretRepository.findDefault(agent.context)\n\nif (defaultLinkSecret) {\n defaultLinkSecret.linkSecretId = 'my-custom-link-secret-id'\n await linkSecretRepository.update(agent.context, defaultLinkSecret)\n}\n"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { Agent } from '@aries-framework/core'\nimport { IndySdkAnonCredsRegistry, IndySdkModule } from '@aries-framework/indy-sdk'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\n// Import from indy-sdk-react-native in React Native\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndySdkAnonCredsRegistry()],\n }),\n },\n})\n\n// the agent MUST be initialized before calling it.\nawait agent.wallet.initialize({\n id: 'wallet-id',\n key: 'wallet-key',\n})\n\nawait agent.modules.anoncreds.createLinkSecret({\n // first one will be set to default automatically\n setAsDefault: true,\n\n // will be generated if not provided.\n // linkSecretId: 'link-secret-id'\n})\n")),(0,r.kt)("h3",{id:"default-outbound-didcomm-content-type-now-applicationdidcomm-envelope-enc"},"Default Outbound DIDComm Content Type now ",(0,r.kt)("inlineCode",{parentName:"h3"},"application/didcomm-envelope-enc")),(0,r.kt)("p",null,"The default outbound DIDComm content type has been changed from ",(0,r.kt)("inlineCode",{parentName:"p"},"DidCommMimeType.V0")," (",(0,r.kt)("inlineCode",{parentName:"p"},"application/ssi-agent-wire"),") to ",(0,r.kt)("inlineCode",{parentName:"p"},"DidCommMimeType.V1")," (",(0,r.kt)("inlineCode",{parentName:"p"},"application/didcomm-envelope-enc"),"). V1 is the default for DIDComm V1 (as ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0044-didcomm-file-and-mime-types/README.md#detecting-didcomm-versions"},"defined in Aries RFC 0044"),"). In the past, V0 resulted in better interoperability, but since it has been the default for so long it makes sense to change the default behavior."),(0,r.kt)("p",null,"It is advised to use the default value as configured by the agent (V1). If you want to keep the old behavior, you can ",(0,r.kt)("a",{parentName:"p",href:"/guides/tutorials/agent-config#didcommmimetype"},"configure the ",(0,r.kt)("inlineCode",{parentName:"a"},"didCommMimeType")," property in the agent configuration"),"."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n})\n"))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent, DidCommMimeType } from '@aries-framework/core'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n didCommMimeType: DidCommMimeType.V0,\n },\n dependencies: agentDependencies,\n})\n")))),(0,r.kt)("h3",{id:"generalizing-indy-properties-in-credentialexchangerecord"},"Generalizing Indy properties in ",(0,r.kt)("inlineCode",{parentName:"h3"},"CredentialExchangeRecord")),(0,r.kt)("p",null,"With AnonCreds credentials now being generalized to support multiple ledgers, the properties specific to Hyperledger Indy have now been generalized into a generic AnonCreds properties."),(0,r.kt)("h4",{id:"credentialrecordtype"},(0,r.kt)("inlineCode",{parentName:"h4"},"credentialRecordType")),(0,r.kt)("p",null,"First off, the ",(0,r.kt)("inlineCode",{parentName:"p"},"credentialRecordType")," that was used to reference stored AnonCreds credentials has been renamed from ",(0,r.kt)("inlineCode",{parentName:"p"},"indy")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"anoncreds"),". The migration script takes care of the update to the storage, but you need to make sure to update all places that expect a ",(0,r.kt)("inlineCode",{parentName:"p"},"credentialRecordType")," of ",(0,r.kt)("inlineCode",{parentName:"p"},"indy")," to be defined."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="CredentialExchangeRecord"',title:'"CredentialExchangeRecord"'},'{\n "credentials": [\n {\n "credentialRecordType": "indy",\n "credentialRecordId": "credential-id"\n }\n ]\n}\n'))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="CredentialExchangeRecord"',title:'"CredentialExchangeRecord"'},'{\n "credentials": [\n {\n "credentialRecordType": "anoncreds",\n "credentialRecordId": "credential-id"\n }\n ]\n}\n')))),(0,r.kt)("h4",{id:"metadata"},"Metadata"),(0,r.kt)("p",null,"Second, the metadata keys and values have been renamed to be AnonCreds specific rather than Indy specific. The ",(0,r.kt)("inlineCode",{parentName:"p"},"CredentialMetadataKeys")," have been replaced by the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialMetadataKey")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRequestMetadataKey")," constants which can be imported from the ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," package."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"0.3.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="CredentialExchangeRecord"',title:'"CredentialExchangeRecord"'},'{\n "metadata": {\n "_internal/indyCredential": {\n "schemaId": "schema-id",\n "credentialDefinitionId": "cred-def-id",\n "indyRevocationRegistryId": "rev-reg-id",\n "indyCredentialRevocationId": "cred-rev-id"\n },\n "_internal/indyRequest": {\n "master_secret_blinding_data": {\n "v_prime": "string",\n "vr_prime": "string"\n },\n "master_secret_name": "string",\n "nonce": "string"\n }\n }\n}\n'))),(0,r.kt)(o.Z,{label:"0.4.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="CredentialExchangeRecord"',title:'"CredentialExchangeRecord"'},'{\n "metadata": {\n "_anoncreds/credential": {\n "schemaId": "schema-id",\n "credentialDefinitionId": "cred-def-id",\n "revocationRegistryId": "rev-reg-id",\n "credentialRevocationId": "cred-rev-id"\n },\n "_anoncreds/credentialRequest": {\n "master_secret_blinding_data": {\n "v_prime": "string",\n "vr_prime": "string"\n },\n "master_secret_name": "string",\n "nonce": "string"\n }\n }\n}\n')))),(0,r.kt)("h3",{id:"more-paths-in-filesystem"},"More paths in ",(0,r.kt)("inlineCode",{parentName:"h3"},"FileSystem")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"FileSystem")," interface has been extended to support multiple base paths. The previous interface had a single ",(0,r.kt)("inlineCode",{parentName:"p"},"basePath")," property which was used for storing of files across the framework."),(0,r.kt)("p",null,"With the different lifetimes of different objects, the ",(0,r.kt)("inlineCode",{parentName:"p"},"FileSystem")," interface has been extended to now support three different base paths:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"cachePath")," - files used for caching purposes. It's okay if the files are cleared from time to time."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"dataPath")," - files that are used for long-term reliable storage purposes. These files will never be cleared."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"tempPath")," - files that are used for temporary storage purposes. It's okay if the files are cleared from time to time.")),(0,r.kt)("p",null,"If you're using the framework, you don't need to worry about this change. The agent may need to download some objects again after the update. If you've made a custom implementation of the ",(0,r.kt)("inlineCode",{parentName:"p"},"FileSystem"),", make sure to support all three base paths, and make sure to correctly handle the life-cycle of the files. Items stored under the ",(0,r.kt)("inlineCode",{parentName:"p"},"dataPath")," ",(0,r.kt)("strong",{parentName:"p"},"should never be cleared"),"."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Indy SDK SQLite wallets do not use the paths defined by the ",(0,r.kt)("inlineCode",{parentName:"p"},"FileSystem")," interface, and thus will not be influenced by this change. When upgrading to Aries Askar, the ",(0,r.kt)("inlineCode",{parentName:"p"},"dataPath")," will be used as the base path for storing the SQLite wallet data.")),(0,r.kt)("h2",{id:"breaking-storage-changes"},"Breaking Storage Changes"),(0,r.kt)("p",null,"The 0.4.0 release introduces some breaking changes to the storage format."),(0,r.kt)("p",null,"Below all breaking storage changes are explained in as much detail as possible. The update assistant provides all tools to migrate without a hassle, but it is important to know what has changed. All examples only show the keys that have changed, unrelated keys in records have been omitted."),(0,r.kt)("p",null,"See the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant")," documentation for a guide on how to use the update assistant."),(0,r.kt)("p",null,"There are no configuration parameters to be provided to the update assistant to migrate from 0.3.x to 0.4.x."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"TODO")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/17896441.ce57ad6c.js b/assets/js/17896441.ce57ad6c.js deleted file mode 100644 index 288cc48..0000000 --- a/assets/js/17896441.ce57ad6c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7918],{47083:(n,e,r)=>{"use strict";r.d(e,{Z:()=>u});var t=r(67294),o=r(86010),s=r(35281),i=r(95999);const a={admonition:"admonition_WoCw",admonitionHeading:"admonitionHeading_TMsN",admonitionIcon:"admonitionIcon_Ibzs",admonitionContent:"admonitionContent_vXIg"};const d={note:{infimaClassName:"secondary",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 14 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 12 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 12 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 14 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 16 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")},holder:{infimaClassName:"holder",emoji:"\ud83d\uddc4",label:t.createElement(i.Z,{id:"theme.admonition.holder",description:"The default label used for the Caution admonition (:::holder)"},"holder")},issuer:{infimaClassName:"issuer",emoji:"\ud83d\udcc4",label:t.createElement(i.Z,{id:"theme.admonition.issuer",description:"The default label used for the Caution admonition (:::issuer)"},"issuer")},verifier:{infimaClassName:"verifier",emoji:"\ud83d\udc6e",label:t.createElement(i.Z,{id:"theme.admonition.verifier",description:"The default label used for the Verifier admonition (:::verifier)"},"verifier")},bob:{infimaClassName:"bob",emoji:"\ud83e\uddd4",label:t.createElement(i.Z,{id:"theme.admonition.bob",description:"The default label used for the Bob admonition (:::bob)"},"bob")},acme:{infimaClassName:"acme",emoji:"\ud83c\udfe2",label:t.createElement(i.Z,{id:"theme.admonition.acme",description:"The default label used for the acme admonition (:::acme)"},"acme")}},c={secondary:"note",important:"info",success:"tip",warning:"danger"};function l(n){const{mdxAdmonitionTitle:e,rest:r}=function(n){const e=t.Children.toArray(n),r=e.find((n=>t.isValidElement(n)&&"mdxAdmonitionTitle"===n.props?.mdxType)),o=t.createElement(t.Fragment,null,e.filter((n=>n!==r)));return{mdxAdmonitionTitle:r,rest:o}}(n.children);return{...n,title:n.title??e,children:r}}function u(n){const{children:e,type:r,title:i,icon:u}=l(n),m=function(n){const e=c[n]??n,r=d[e];return r||(console.warn(`No admonition config found for admonition type "${e}". Using Info as fallback.`),d.info)}(r),p=i??m.label,{iconComponent:g,emoji:f}=m,h=u??f??t.createElement(g,null);return t.createElement("div",{className:(0,o.Z)(s.k.common.admonition,s.k.common.admonitionType(n.type),"alert",`alert--${m.infimaClassName}`,`admonition-${m.infimaClassName}`,a.admonition)},t.createElement("div",{className:a.admonitionHeading},t.createElement("span",{className:a.admonitionIcon},h),p),t.createElement("div",{className:a.admonitionContent},e))}},71415:(n,e,r)=>{"use strict";r.d(e,{Z:()=>s});var t=r(67294),o=r(78397);function s(n){return t.createElement(t.Fragment,null,t.createElement(o.Z,n))}},18573:(n,e,r)=>{"use strict";r.d(e,{Z:()=>p});var t=r(87462),o=r(67294),s=r(72389),i=r(81170),a=r(72138),d=r(74477);const c=n=>n.split(" ").find((n=>n.match(/^section-/)))?.substr(8),l=(n,e)=>{const r=`start-section-${n}`,t=`end-section-${n}`,o=e.split("\n"),s=o.indexOf(o.find((n=>n.includes(r)))),i=o.indexOf(o.find((n=>n.includes(t))));return o.slice(s+1,i).join("\r\n")},u=n=>n.split(" ").find((n=>n.match(/.(js|ts)$/))),m=n=>n.split("\n").filter((n=>!n.match(/section-/))).join("\r\n");function p(n){let{children:e,...p}=n;const g=(0,s.Z)(),f=(0,d.E)(),h=function(n){return o.Children.toArray(n).some((n=>(0,o.isValidElement)(n)))?n:Array.isArray(n)?n.join(""):n}(e),b=f.version,y="string"==typeof h?a.Z:i.Z;if(!p.metastring)return o.createElement(y,(0,t.Z)({key:String(g)},p),h);let w;try{w=r(32502)(`./${b}/src/${u(p.metastring)}`).default}catch{}const x=c(p.metastring);let j;return w&&(j=x?l(x,w):m(w)),o.createElement(y,(0,t.Z)({key:String(g)},p),j||h)}},77058:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n autoAcceptConnections: true,\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},92151:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n InitConfig,\n Agent,\n WsOutboundTransport,\n HttpOutboundTransport,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n DidExchangeState,\n AutoAcceptCredential,\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n OutOfBandRecord,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { Schema } from 'indy-sdk'\nimport fetch from 'node-fetch'\n\nconst getGenesisTransaction = async (url: string) => {\n // Legacy code has a small issue with the call-signature from node-fetch\n // @ts-ignore\n const response = await fetch(url)\n\n return await response.text()\n}\n\n// start-section-1\nconst initializeHolderAgent = async () => {\n const genesisTransactionsBCovrinTestNet = await getGenesisTransaction('http://test.bcovrin.vonx.io/genesis')\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-holder',\n walletConfig: {\n id: 'demo-agent-holder',\n key: 'demoagentholder00000000000000000',\n },\n indyLedgers: [\n {\n id: 'bcovrin-test-net',\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: genesisTransactionsBCovrinTestNet,\n },\n ],\n autoAcceptCredentials: AutoAcceptCredential.ContentApproved,\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3002'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeIssuerAgent = async () => {\n const genesisTransactionsBCovrinTestNet = await getGenesisTransaction('http://test.bcovrin.vonx.io/genesis')\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-issuer',\n walletConfig: {\n id: 'demo-agent-issuer',\n key: 'demoagentissuer00000000000000000',\n },\n publicDidSeed: 'demoissuerdidseed000000000000000',\n indyLedgers: [\n {\n id: 'bcovrin-test-net',\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: genesisTransactionsBCovrinTestNet,\n },\n ],\n autoAcceptCredentials: AutoAcceptCredential.ContentApproved,\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst registerSchema = async (issuer: Agent) =>\n issuer.ledger.registerSchema({ attributes: ['name', 'age'], name: 'Identity', version: '1.0' })\n// end-section-3\n\n// start-section-4\nconst registerCredentialDefinition = async (issuer: Agent, schema: Schema) =>\n issuer.ledger.registerCredentialDefinition({ schema, supportRevocation: false, tag: 'default' })\n// end-section-4\n\n// start-section-5\nconst setupCredentialListener = (holder: Agent) => {\n holder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n })\n}\n// end-section-5\n\n// start-section-6\nconst issueCredential = async (issuer: Agent, credentialDefinitionId: string, connectionId: string) =>\n issuer.credentials.offerCredential({\n protocolVersion: 'v1',\n connectionId,\n credentialFormats: {\n indy: {\n credentialDefinitionId,\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n })\n// end-section-6\n\nconst createNewInvitation = async (issuer: Agent) => {\n const outOfBandRecord = await issuer.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n\nconst receiveInvitation = async (holder: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await holder.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n\nconst setupConnectionListener = (\n issuer: Agent,\n outOfBandRecord: OutOfBandRecord,\n cb: (...args: any) => Promise\n) => {\n issuer.events.on(ConnectionEventTypes.ConnectionStateChanged, async ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n await cb(payload.connectionRecord.id)\n }\n })\n}\n\nconst flow = (issuer: Agent) => async (connectionId: string) => {\n console.log('Registering the schema...')\n const schema = await registerSchema(issuer)\n console.log('Registering the credential definition...')\n const credentialDefinition = await registerCredentialDefinition(issuer, schema)\n console.log('Issuing the credential...')\n await issueCredential(issuer, credentialDefinition.id, connectionId)\n}\n\nconst run = async () => {\n console.log('Initializing the holder...')\n const holder = await initializeHolderAgent()\n console.log('Initializing the issuer...')\n const issuer = await initializeIssuerAgent()\n\n console.log('Initializing the credential listener...')\n setupCredentialListener(holder)\n\n console.log('Initializing the connection...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(issuer)\n setupConnectionListener(issuer, outOfBandRecord, flow(issuer))\n await receiveInvitation(holder, invitationUrl)\n}\n\nvoid run()\n"},3288:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\nimport { Agent, HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\n\n// start-section-1\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({ config, dependencies: agentDependencies })\n// end-section-1\n\n// start-section-2\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// start-section-3\nconst run = async () => {\n try {\n await agent.initialize()\n } catch (e) {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n }\n}\n// end-section-3\n\nvoid run()\n"},60420:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\nimport { Agent, HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\n\n// start-section-1\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({ config, dependencies: agentDependencies })\n// end-section-1\n\n// start-section-2\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nconst run = async () => {\n try {\n await agent.initialize()\n } catch (e) {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n }\n}\n// end-section-3\n\nvoid run()\n"},45343:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { AskarModule } from '@aries-framework/askar'\nimport {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n ConnectionsModule,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n }\n\n // A new instance of an agent is created here\n // Askar can also be replaced by the indy-sdk if required\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n // Askar can also be replaced by the indy-sdk if required\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},7283:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n DidsModule,\n HttpOutboundTransport,\n InitConfig,\n WsOutboundTransport,\n Agent,\n CredentialsModule,\n V2CredentialProtocol,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport {\n AnonCredsCredentialFormatService,\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n} from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst issuerConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-issuer',\n walletConfig: {\n id: 'wallet-id-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-holder',\n walletConfig: {\n id: 'wallet-id-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nissuer.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nissuer.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nissuer.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-1\n\n// start-section-2\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nholder.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nholder.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nholder.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-2\n\n// start-section-3\nholder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n})\n// end-section-3\n\n// start-section-4\nconst indyCredentialExchangeRecord = await issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n indy: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-4\n\n// start-section-5\nconst anonCredsCredentialExchangeRecord = issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-5\n"},8276:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n ConsoleLogger,\n HttpOutboundTransport,\n InitConfig,\n LogLevel,\n MediationRecipientModule,\n WsOutboundTransport,\n} from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport { agentDependencies } from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// start-section-1\nconst name = 'alice'\n\n// paste your invitation url here\n// or use the current invitation-url to connect to the public animo-mediator.\nconst mediatorInvitationUrl =\n 'https://mediator.dev.animo.id/invite?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIyMDc1MDM4YS05ZGU3LTRiODItYWUxYi1jNzBmNDg4MjYzYTciLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vbWVkaWF0b3IuZGV2LmFuaW1vLmlkIiwidHlwZSI6ImRpZC1jb21tdW5pY2F0aW9uIiwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtvSG9RTUphdU5VUE5OV1pQcEw3RGs1SzNtQ0NDMlBpNDJGY3FwR25iampMcSJdLCJyb3V0aW5nS2V5cyI6W119LHsiaWQiOiIjaW5saW5lLTEiLCJzZXJ2aWNlRW5kcG9pbnQiOiJ3c3M6Ly9tZWRpYXRvci5kZXYuYW5pbW8uaWQiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa29Ib1FNSmF1TlVQTk5XWlBwTDdEazVLM21DQ0MyUGk0MkZjcXBHbmJqakxxIl0sInJvdXRpbmdLZXlzIjpbXX1dfQ'\n\nconst agentConfig: InitConfig = {\n label: `Aries Framework JavaScript ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n logger: new ConsoleLogger(LogLevel.trace),\n}\n\nconst alice = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n mediationRecipient: new MediationRecipientModule({\n mediatorInvitationUrl,\n }),\n indySdk: new IndySdkModule({ indySdk }),\n },\n})\n\nalice.registerOutboundTransport(new HttpOutboundTransport())\nalice.registerOutboundTransport(new WsOutboundTransport())\n\nawait alice.initialize()\n// end-section-1\n"},50768:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n ConnectionsModule,\n HttpOutboundTransport,\n InitConfig,\n MediationStateChangedEvent,\n MediatorModule,\n RoutingEventTypes,\n} from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport { HttpInboundTransport, agentDependencies } from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// start-section-1\nconst name = 'mediator'\nconst port = 3001\n\nconst agentConfig: InitConfig = {\n label: `Aries Framework JavaScript ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n endpoints: [`http://localhost:${port}`],\n}\n\nconst mediator = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({ indySdk }),\n mediator: new MediatorModule({\n autoAcceptMediationRequests: true,\n }),\n connections: new ConnectionsModule({\n autoAcceptConnections: true,\n }),\n },\n})\n\nmediator.registerOutboundTransport(new HttpOutboundTransport())\nmediator.registerInboundTransport(new HttpInboundTransport({ port }))\n\nawait mediator.initialize()\nconst mediatorOutOfBandRecord = await mediator.oob.createInvitation({ multiUseInvitation: true })\n\nconst mediatiorInvitationUrl = mediatorOutOfBandRecord.outOfBandInvitation.toUrl({\n domain: `http://localhost:${port}`,\n})\nconsole.log(mediatiorInvitationUrl)\n// end-section-1\n\nmediator.events\n .observable(RoutingEventTypes.MediationStateChanged)\n .subscribe(({ payload }) => {\n console.log(`${name} mediation state: ${payload.mediationRecord.state}`)\n })\n"},62055:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { DidsModule, InitConfig, KeyType, LogLevel, TypedArrayEncoder } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs-register-schema-and-cred-def',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n} from '@aries-framework/cheqd'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // We do this to have access to a wallet\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()],\n }),\n },\n})\n// end-section-1\n\n// start-section-2\nconst seed = TypedArrayEncoder.fromString(``) // What you input on bcovrin. Should be kept secure in production!\nconst unqualifiedIndyDid = `` // will be returned after registering seed on bcovrin\nconst indyDid = `did:indy:bcovrin:test:${unqualifiedIndyDid}`\n\nconst cheqdDid = await agent.dids.create({\n method: 'cheqd',\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n\nawait agent.dids.import({\n did: '',\n overwrite: true,\n privateKeys: [\n {\n privateKey: seed,\n keyType: KeyType.Ed25519,\n },\n ],\n})\n// end-section-2\n\n// start-section-3\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: '',\n name: 'Example Schema to register',\n version: '1.0.0',\n },\n options: {},\n})\n\nif (schemaResult.schemaState.state === 'failed') {\n throw new Error(`Error creating schema: ${schemaResult.schemaState.reason}`)\n}\n// end-section-3\n\n// start-section-4\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n tag: 'default',\n issuerId: '',\n schemaId: schemaResult.schemaState.schemaId,\n },\n options: {},\n})\n\nif (credentialDefinitionResult.credentialDefinitionState.state === 'failed') {\n throw new Error(\n `Error creating credential definition: ${credentialDefinitionResult.credentialDefinitionState.reason}`\n )\n}\n// end-section-4\n"},96596:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},13099:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},78757:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},93716:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},12107:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { DidDocumentService, InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent, DidsModule, KeyType, DidDocument } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n CheqdDidCreateOptions,\n} from '@aries-framework/cheqd'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n dids: new DidsModule({\n registrars: [new CheqdDidRegistrar()],\n resolvers: [new CheqdDidResolver()],\n }),\n\n // AnonCreds\n anoncreds: new AnonCredsModule({\n registries: [new CheqdAnonCredsRegistry()],\n }),\n\n // Add cheqd module\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n\n// start-section-2\n\n// create a key pair\nconst key = await agent.wallet.createKey({\n keyType: KeyType.Ed25519,\n})\n\n// encode public key according to the verification method\nconst ed25519PublicKeyBase58 = key.publicKeyBase58\n\n// Create a DID\nawait agent.dids.create({\n method: 'cheqd',\n secret: {},\n options: {\n network: 'testnet',\n },\n didDocument: new DidDocument({\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n controller: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1',\n type: 'Ed25519VerificationKey2018',\n controller: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n publicKeyBase58: ed25519PublicKeyBase58,\n },\n ],\n authentication: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1'],\n }),\n})\n// end-section-2\n\n// start-section-3\nawait agent.dids.create({\n method: 'cheqd',\n // the secret contains a the verification method type and id\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n // an optional methodSpecificIdAlgo parameter\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n// end-section-3\n\n// start-section-4\nawait agent.dids.update({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // Updates DID Document with an additional verification method if provided\n secret: {\n verificationMethod: {\n id: 'key-2',\n type: 'JsonWebKey2020',\n },\n },\n didDocument: {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n controller: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1',\n type: 'Ed25519VerificationKey2020',\n controller: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n publicKeyMultibase: 'z6MknkzLUEP5cxqqsaysNMWoh8NJRb3YsowTCj2D6yhwyEdj',\n },\n ],\n authentication: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1'],\n // updates did document with a service block\n service: [\n new DidDocumentService({\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#rand',\n type: 'rand',\n serviceEndpoint: 'https://rand.in',\n }),\n ],\n },\n})\n// end-section-4\n\n// start-section-5\nawait agent.dids.deactivate({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // an optional versionId parameter\n options: {\n versionId: '3.0',\n },\n})\n// end-section-5\n"},84056:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport { Agent, InitConfig } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport {\n agentDependencies,\n IndySdkPostgresStorageConfig,\n loadIndySdkPostgresPlugin,\n IndySdkPostgresWalletScheme,\n} from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// IndySdkPostgresStorageConfig defines interface for the Postgres plugin configuration.\nconst storageConfig = {\n type: 'postgres_storage',\n config: {\n url: 'localhost:5432',\n wallet_scheme: IndySdkPostgresWalletScheme.DatabasePerWallet,\n },\n credentials: {\n account: 'postgres',\n password: 'postgres',\n admin_account: 'postgres',\n admin_password: 'postgres',\n },\n} satisfies IndySdkPostgresStorageConfig\n\n// load the postgres wallet plugin before agent initialization\nloadIndySdkPostgresPlugin(storageConfig.config, storageConfig.credentials)\n\nconst agentConfig: InitConfig = {\n label: 'My Agent',\n // walletConfig.id and walletConfig.key are still required\n walletConfig: {\n id: 'walletId',\n key: 'testKey0000000000000000000000000',\n // storage is added and defines the postgres plugin configuration\n storage: storageConfig,\n },\n}\n\nconst agent = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n"},51002:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport indySdk from 'indy-sdk-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Indy SDK module on the agent\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},12863:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Indy SDK module on the agent\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n\nawait agent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},99031:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { IndyVdrModule } from '@aries-framework/indy-vdr'\n\nconst modules = {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n indyNamespace: 'bcovrin:test',\n isProduction: false,\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n}\n// end-section-1\n"},44279:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-react-native'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},54437:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},46121:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@aries-framework/core'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// TODO: we probably want to make this more specific to React Native,\n// so using it in a components and recommending to use the react hooks\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},61031:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@aries-framework/core'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { HttpInboundTransport } from '@aries-framework/node'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},36033:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { AskarModule } from '@credo-ts/askar'\nimport {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n ConnectionsModule,\n} from '@credo-ts/core'\nimport { agentDependencies, HttpInboundTransport } from '@credo-ts/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},55536:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n DidsModule,\n HttpOutboundTransport,\n InitConfig,\n WsOutboundTransport,\n Agent,\n CredentialsModule,\n V2CredentialProtocol,\n} from '@credo-ts/core'\nimport { agentDependencies, HttpInboundTransport } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport {\n AnonCredsCredentialFormatService,\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n} from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst issuerConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-issuer',\n walletConfig: {\n id: 'wallet-id-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-holder',\n walletConfig: {\n id: 'wallet-id-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nissuer.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nissuer.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nissuer.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-1\n\n// start-section-2\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nholder.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nholder.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nholder.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-2\n\n// start-section-3\nholder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n})\n// end-section-3\n\n// start-section-4\nconst indyCredentialExchangeRecord = await issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n indy: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-4\n\n// start-section-5\nconst anonCredsCredentialExchangeRecord = issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-5\n"},98249:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n ConsoleLogger,\n HttpOutboundTransport,\n InitConfig,\n LogLevel,\n MediationRecipientModule,\n WsOutboundTransport,\n} from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport { agentDependencies } from '@credo-ts/node'\n\n// start-section-1\nconst name = 'alice'\n\n// paste your invitation url here\n// or use the current invitation-url to connect to the public animo-mediator.\nconst mediatorInvitationUrl =\n 'https://mediator.dev.animo.id/invite?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIyMDc1MDM4YS05ZGU3LTRiODItYWUxYi1jNzBmNDg4MjYzYTciLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vbWVkaWF0b3IuZGV2LmFuaW1vLmlkIiwidHlwZSI6ImRpZC1jb21tdW5pY2F0aW9uIiwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtvSG9RTUphdU5VUE5OV1pQcEw3RGs1SzNtQ0NDMlBpNDJGY3FwR25iampMcSJdLCJyb3V0aW5nS2V5cyI6W119LHsiaWQiOiIjaW5saW5lLTEiLCJzZXJ2aWNlRW5kcG9pbnQiOiJ3c3M6Ly9tZWRpYXRvci5kZXYuYW5pbW8uaWQiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa29Ib1FNSmF1TlVQTk5XWlBwTDdEazVLM21DQ0MyUGk0MkZjcXBHbmJqakxxIl0sInJvdXRpbmdLZXlzIjpbXX1dfQ'\n\nconst agentConfig: InitConfig = {\n label: `Credo ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n logger: new ConsoleLogger(LogLevel.trace),\n}\n\nconst alice = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n mediationRecipient: new MediationRecipientModule({\n mediatorInvitationUrl,\n }),\n askar: new AskarModule({ ariesAskar }),\n },\n})\n\nalice.registerOutboundTransport(new HttpOutboundTransport())\nalice.registerOutboundTransport(new WsOutboundTransport())\n\nawait alice.initialize()\n// end-section-1\n"},71676:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n ConnectionsModule,\n HttpOutboundTransport,\n InitConfig,\n MediationStateChangedEvent,\n MediatorModule,\n RoutingEventTypes,\n} from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport { HttpInboundTransport, agentDependencies } from '@credo-ts/node'\n\n// start-section-1\nconst name = 'mediator'\nconst port = 3001\n\nconst agentConfig: InitConfig = {\n label: `Credo ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n endpoints: [`http://localhost:${port}`],\n}\n\nconst mediator = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n mediator: new MediatorModule({\n autoAcceptMediationRequests: true,\n }),\n connections: new ConnectionsModule({\n autoAcceptConnections: true,\n }),\n },\n})\n\nmediator.registerOutboundTransport(new HttpOutboundTransport())\nmediator.registerInboundTransport(new HttpInboundTransport({ port }))\n\nawait mediator.initialize()\nconst mediatorOutOfBandRecord = await mediator.oob.createInvitation({ multiUseInvitation: true })\n\nconst mediatiorInvitationUrl = mediatorOutOfBandRecord.outOfBandInvitation.toUrl({\n domain: `http://localhost:${port}`,\n})\nconsole.log(mediatiorInvitationUrl)\n// end-section-1\n\nmediator.events\n .observable(RoutingEventTypes.MediationStateChanged)\n .subscribe(({ payload }) => {\n console.log(`${name} mediation state: ${payload.mediationRecord.state}`)\n })\n"},71104:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { DidsModule, InitConfig, KeyType, TypedArrayEncoder } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs-register-schema-and-cred-def',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n} from '@credo-ts/cheqd'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // We do this to have access to a wallet\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()],\n }),\n },\n})\n// end-section-1\n\n// start-section-2\nconst seed = TypedArrayEncoder.fromString(``) // What you input on bcovrin. Should be kept secure in production!\nconst unqualifiedIndyDid = `` // will be returned after registering seed on bcovrin\nconst indyDid = `did:indy:bcovrin:test:${unqualifiedIndyDid}`\n\nconst cheqdDid = await agent.dids.create({\n method: 'cheqd',\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n\nawait agent.dids.import({\n did: '',\n overwrite: true,\n privateKeys: [\n {\n privateKey: seed,\n keyType: KeyType.Ed25519,\n },\n ],\n})\n// end-section-2\n\n// start-section-3\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: '',\n name: 'Example Schema to register',\n version: '1.0.0',\n },\n options: {},\n})\n\nif (schemaResult.schemaState.state === 'failed') {\n throw new Error(`Error creating schema: ${schemaResult.schemaState.reason}`)\n}\n// end-section-3\n\n// start-section-4\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n tag: 'default',\n issuerId: '',\n schemaId: schemaResult.schemaState.schemaId,\n },\n options: {\n supportRevocation: false,\n },\n})\n\nif (credentialDefinitionResult.credentialDefinitionState.state === 'failed') {\n throw new Error(\n `Error creating credential definition: ${credentialDefinitionResult.credentialDefinitionState.reason}`\n )\n}\n// end-section-4\n"},8182:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { IndyVdrAnonCredsRegistry } from '@credo-ts/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},10902:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { IndyVdrAnonCredsRegistry } from '@credo-ts/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},93106:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},50531:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},31638:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { DidDocumentService, InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent, DidsModule, KeyType, DidDocument } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n CheqdDidCreateOptions,\n} from '@credo-ts/cheqd'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n dids: new DidsModule({\n registrars: [new CheqdDidRegistrar()],\n resolvers: [new CheqdDidResolver()],\n }),\n\n // AnonCreds\n anoncreds: new AnonCredsModule({\n registries: [new CheqdAnonCredsRegistry()],\n anoncreds,\n }),\n\n // Add cheqd module\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n\n// start-section-2\n\n// create a key pair\nconst key = await agent.wallet.createKey({\n keyType: KeyType.Ed25519,\n})\n\n// encode public key according to the verification method\nconst ed25519PublicKeyBase58 = key.publicKeyBase58\n\n// Create a DID\nawait agent.dids.create({\n method: 'cheqd',\n secret: {},\n options: {},\n didDocument: new DidDocument({\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n controller: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1',\n type: 'Ed25519VerificationKey2018',\n controller: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n publicKeyBase58: ed25519PublicKeyBase58,\n },\n ],\n authentication: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1'],\n }),\n})\n// end-section-2\n\n// start-section-3\nawait agent.dids.create({\n method: 'cheqd',\n // the secret contains a the verification method type and id\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n // an optional methodSpecificIdAlgo parameter\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n// end-section-3\n\n// start-section-4\nawait agent.dids.update({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // Updates DID Document with an additional verification method if provided\n secret: {\n verificationMethod: {\n id: 'key-2',\n type: 'JsonWebKey2020',\n },\n },\n didDocument: {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n controller: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1',\n type: 'Ed25519VerificationKey2020',\n controller: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n publicKeyMultibase: 'z6MknkzLUEP5cxqqsaysNMWoh8NJRb3YsowTCj2D6yhwyEdj',\n },\n ],\n authentication: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1'],\n // updates did document with a service block\n service: [\n new DidDocumentService({\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#rand',\n type: 'rand',\n serviceEndpoint: 'https://rand.in',\n }),\n ],\n },\n})\n// end-section-4\n\n// start-section-5\nawait agent.dids.deactivate({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // an optional versionId parameter\n options: {\n versionId: '3.0',\n },\n})\n// end-section-5\n"},84613:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { IndyVdrModule } from '@credo-ts/indy-vdr'\n\nconst modules = {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n indyNamespace: 'bcovrin:test',\n isProduction: false,\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n}\n// end-section-1\n"},73995:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-react-native'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},55453:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},1308:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@credo-ts/core'\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// TODO: we probably want to make this more specific to React Native,\n// so using it in a components and recommending to use the react hooks\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},52537:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@credo-ts/core'\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'\nimport { HttpInboundTransport } from '@credo-ts/node'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},32502:(n,e,r)=>{var t={"./0.3/node_modules/did-resolver/src/__tests__/resolver.test":50349,"./0.3/node_modules/did-resolver/src/__tests__/resolver.test.ts":50349,"./0.3/node_modules/did-resolver/src/resolver":55883,"./0.3/node_modules/did-resolver/src/resolver.ts":55883,"./0.3/node_modules/luxon/src/datetime":38105,"./0.3/node_modules/luxon/src/datetime.js":38105,"./0.3/node_modules/luxon/src/duration":26721,"./0.3/node_modules/luxon/src/duration.js":26721,"./0.3/node_modules/luxon/src/errors":74015,"./0.3/node_modules/luxon/src/errors.js":74015,"./0.3/node_modules/luxon/src/impl/conversions":8498,"./0.3/node_modules/luxon/src/impl/conversions.js":8498,"./0.3/node_modules/luxon/src/impl/diff":38998,"./0.3/node_modules/luxon/src/impl/diff.js":38998,"./0.3/node_modules/luxon/src/impl/digits":29310,"./0.3/node_modules/luxon/src/impl/digits.js":29310,"./0.3/node_modules/luxon/src/impl/english":4039,"./0.3/node_modules/luxon/src/impl/english.js":4039,"./0.3/node_modules/luxon/src/impl/formats":85303,"./0.3/node_modules/luxon/src/impl/formats.js":85303,"./0.3/node_modules/luxon/src/impl/formatter":84756,"./0.3/node_modules/luxon/src/impl/formatter.js":84756,"./0.3/node_modules/luxon/src/impl/invalid":80760,"./0.3/node_modules/luxon/src/impl/invalid.js":80760,"./0.3/node_modules/luxon/src/impl/locale":80114,"./0.3/node_modules/luxon/src/impl/locale.js":80114,"./0.3/node_modules/luxon/src/impl/regexParser":31990,"./0.3/node_modules/luxon/src/impl/regexParser.js":31990,"./0.3/node_modules/luxon/src/impl/tokenParser":64546,"./0.3/node_modules/luxon/src/impl/tokenParser.js":64546,"./0.3/node_modules/luxon/src/impl/util":57866,"./0.3/node_modules/luxon/src/impl/util.js":57866,"./0.3/node_modules/luxon/src/impl/zoneUtil":99776,"./0.3/node_modules/luxon/src/impl/zoneUtil.js":99776,"./0.3/node_modules/luxon/src/info":16965,"./0.3/node_modules/luxon/src/info.js":16965,"./0.3/node_modules/luxon/src/interval":61591,"./0.3/node_modules/luxon/src/interval.js":61591,"./0.3/node_modules/luxon/src/luxon":18004,"./0.3/node_modules/luxon/src/luxon.js":18004,"./0.3/node_modules/luxon/src/luxonFilled":99972,"./0.3/node_modules/luxon/src/luxonFilled.js":99972,"./0.3/node_modules/luxon/src/settings":52636,"./0.3/node_modules/luxon/src/settings.js":52636,"./0.3/node_modules/luxon/src/zone":76476,"./0.3/node_modules/luxon/src/zone.js":76476,"./0.3/node_modules/luxon/src/zones/IANAZone":43176,"./0.3/node_modules/luxon/src/zones/IANAZone.js":43176,"./0.3/node_modules/luxon/src/zones/fixedOffsetZone":61840,"./0.3/node_modules/luxon/src/zones/fixedOffsetZone.js":61840,"./0.3/node_modules/luxon/src/zones/invalidZone":85092,"./0.3/node_modules/luxon/src/zones/invalidZone.js":85092,"./0.3/node_modules/luxon/src/zones/localZone":15617,"./0.3/node_modules/luxon/src/zones/localZone.js":15617,"./0.3/src/create-a-connection":77058,"./0.3/src/create-a-connection.ts":77058,"./0.3/src/issue-a-credential":92151,"./0.3/src/issue-a-credential.ts":92151,"./0.3/src/set-up":60420,"./0.3/src/set-up-rn":3288,"./0.3/src/set-up-rn.ts":3288,"./0.3/src/set-up.ts":60420,"./0.4/src/create-a-connection":45343,"./0.4/src/create-a-connection.ts":45343,"./0.4/src/issue-a-credential":7283,"./0.4/src/issue-a-credential.ts":7283,"./0.4/src/mediation-recipient":8276,"./0.4/src/mediation-recipient.ts":8276,"./0.4/src/mediator-setup":50768,"./0.4/src/mediator-setup.ts":50768,"./0.4/src/register-schema-and-cred-def":62055,"./0.4/src/register-schema-and-cred-def.ts":62055,"./0.4/src/set-up":61031,"./0.4/src/set-up-anoncreds-rs":13099,"./0.4/src/set-up-anoncreds-rs-rn":96596,"./0.4/src/set-up-anoncreds-rs-rn.ts":96596,"./0.4/src/set-up-anoncreds-rs.ts":13099,"./0.4/src/set-up-askar":93716,"./0.4/src/set-up-askar-rn":78757,"./0.4/src/set-up-askar-rn.ts":78757,"./0.4/src/set-up-askar.ts":93716,"./0.4/src/set-up-cheqd":12107,"./0.4/src/set-up-cheqd.ts":12107,"./0.4/src/set-up-indy-sdk":12863,"./0.4/src/set-up-indy-sdk-postgres":84056,"./0.4/src/set-up-indy-sdk-postgres.ts":84056,"./0.4/src/set-up-indy-sdk-rn":51002,"./0.4/src/set-up-indy-sdk-rn.ts":51002,"./0.4/src/set-up-indy-sdk.ts":12863,"./0.4/src/set-up-indy-vdr":54437,"./0.4/src/set-up-indy-vdr-config":99031,"./0.4/src/set-up-indy-vdr-config.ts":99031,"./0.4/src/set-up-indy-vdr-rn":44279,"./0.4/src/set-up-indy-vdr-rn.ts":44279,"./0.4/src/set-up-indy-vdr.ts":54437,"./0.4/src/set-up-rn":46121,"./0.4/src/set-up-rn.ts":46121,"./0.4/src/set-up.ts":61031,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/AndroidManifest.xml":29838,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/java/org/hyperledger/anoncreds/AnoncredsModule.java":90239,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/java/org/hyperledger/anoncreds/AnoncredsPackage.java":31354,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/AndroidManifest.xml":81332,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/java/org/hyperledger/ariesaskar/AriesAskarModule.java":8566,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/java/org/hyperledger/ariesaskar/AriesAskarPackage.java":2051,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/AndroidManifest.xml":94516,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/java/org/hyperledger/indyvdr/IndyVdrModule.java":11611,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/java/org/hyperledger/indyvdr/IndyVdrPackage.java":79681,"./current/node_modules/rxjs/src/":76328,"./current/node_modules/rxjs/src/Rx.global":64147,"./current/node_modules/rxjs/src/Rx.global.js":64147,"./current/node_modules/rxjs/src/ajax":18398,"./current/node_modules/rxjs/src/ajax/":18398,"./current/node_modules/rxjs/src/ajax/index":18398,"./current/node_modules/rxjs/src/ajax/index.ts":18398,"./current/node_modules/rxjs/src/fetch":44106,"./current/node_modules/rxjs/src/fetch/":44106,"./current/node_modules/rxjs/src/fetch/index":44106,"./current/node_modules/rxjs/src/fetch/index.ts":44106,"./current/node_modules/rxjs/src/index":76328,"./current/node_modules/rxjs/src/index.ts":76328,"./current/node_modules/rxjs/src/internal/AnyCatcher":12930,"./current/node_modules/rxjs/src/internal/AnyCatcher.ts":12930,"./current/node_modules/rxjs/src/internal/AsyncSubject":58069,"./current/node_modules/rxjs/src/internal/AsyncSubject.ts":58069,"./current/node_modules/rxjs/src/internal/BehaviorSubject":49219,"./current/node_modules/rxjs/src/internal/BehaviorSubject.ts":49219,"./current/node_modules/rxjs/src/internal/Notification":71913,"./current/node_modules/rxjs/src/internal/Notification.ts":71913,"./current/node_modules/rxjs/src/internal/NotificationFactories":62590,"./current/node_modules/rxjs/src/internal/NotificationFactories.ts":62590,"./current/node_modules/rxjs/src/internal/Observable":59203,"./current/node_modules/rxjs/src/internal/Observable.ts":59203,"./current/node_modules/rxjs/src/internal/Operator":74287,"./current/node_modules/rxjs/src/internal/Operator.ts":74287,"./current/node_modules/rxjs/src/internal/ReplaySubject":62736,"./current/node_modules/rxjs/src/internal/ReplaySubject.ts":62736,"./current/node_modules/rxjs/src/internal/Scheduler":11213,"./current/node_modules/rxjs/src/internal/Scheduler.ts":11213,"./current/node_modules/rxjs/src/internal/Subject":29170,"./current/node_modules/rxjs/src/internal/Subject.ts":29170,"./current/node_modules/rxjs/src/internal/Subscriber":47811,"./current/node_modules/rxjs/src/internal/Subscriber.ts":47811,"./current/node_modules/rxjs/src/internal/Subscription":75160,"./current/node_modules/rxjs/src/internal/Subscription.ts":75160,"./current/node_modules/rxjs/src/internal/ajax/AjaxResponse":52004,"./current/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts":52004,"./current/node_modules/rxjs/src/internal/ajax/ajax":55791,"./current/node_modules/rxjs/src/internal/ajax/ajax.ts":55791,"./current/node_modules/rxjs/src/internal/ajax/errors":49930,"./current/node_modules/rxjs/src/internal/ajax/errors.ts":49930,"./current/node_modules/rxjs/src/internal/ajax/getXHRResponse":66594,"./current/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts":66594,"./current/node_modules/rxjs/src/internal/ajax/types":33731,"./current/node_modules/rxjs/src/internal/ajax/types.ts":33731,"./current/node_modules/rxjs/src/internal/config":17138,"./current/node_modules/rxjs/src/internal/config.ts":17138,"./current/node_modules/rxjs/src/internal/firstValueFrom":12451,"./current/node_modules/rxjs/src/internal/firstValueFrom.ts":12451,"./current/node_modules/rxjs/src/internal/lastValueFrom":70284,"./current/node_modules/rxjs/src/internal/lastValueFrom.ts":70284,"./current/node_modules/rxjs/src/internal/observable/ConnectableObservable":80001,"./current/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts":80001,"./current/node_modules/rxjs/src/internal/observable/bindCallback":9808,"./current/node_modules/rxjs/src/internal/observable/bindCallback.ts":9808,"./current/node_modules/rxjs/src/internal/observable/bindCallbackInternals":39780,"./current/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts":39780,"./current/node_modules/rxjs/src/internal/observable/bindNodeCallback":46853,"./current/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts":46853,"./current/node_modules/rxjs/src/internal/observable/combineLatest":24058,"./current/node_modules/rxjs/src/internal/observable/combineLatest.ts":24058,"./current/node_modules/rxjs/src/internal/observable/concat":87101,"./current/node_modules/rxjs/src/internal/observable/concat.ts":87101,"./current/node_modules/rxjs/src/internal/observable/connectable":82623,"./current/node_modules/rxjs/src/internal/observable/connectable.ts":82623,"./current/node_modules/rxjs/src/internal/observable/defer":91166,"./current/node_modules/rxjs/src/internal/observable/defer.ts":91166,"./current/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject":39290,"./current/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts":39290,"./current/node_modules/rxjs/src/internal/observable/dom/animationFrames":66007,"./current/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts":66007,"./current/node_modules/rxjs/src/internal/observable/dom/fetch":37045,"./current/node_modules/rxjs/src/internal/observable/dom/fetch.ts":37045,"./current/node_modules/rxjs/src/internal/observable/dom/webSocket":50101,"./current/node_modules/rxjs/src/internal/observable/dom/webSocket.ts":50101,"./current/node_modules/rxjs/src/internal/observable/empty":367,"./current/node_modules/rxjs/src/internal/observable/empty.ts":367,"./current/node_modules/rxjs/src/internal/observable/forkJoin":31029,"./current/node_modules/rxjs/src/internal/observable/forkJoin.ts":31029,"./current/node_modules/rxjs/src/internal/observable/from":22051,"./current/node_modules/rxjs/src/internal/observable/from.ts":22051,"./current/node_modules/rxjs/src/internal/observable/fromEvent":16273,"./current/node_modules/rxjs/src/internal/observable/fromEvent.ts":16273,"./current/node_modules/rxjs/src/internal/observable/fromEventPattern":8517,"./current/node_modules/rxjs/src/internal/observable/fromEventPattern.ts":8517,"./current/node_modules/rxjs/src/internal/observable/fromSubscribable":75735,"./current/node_modules/rxjs/src/internal/observable/fromSubscribable.ts":75735,"./current/node_modules/rxjs/src/internal/observable/generate":34758,"./current/node_modules/rxjs/src/internal/observable/generate.ts":34758,"./current/node_modules/rxjs/src/internal/observable/iif":92050,"./current/node_modules/rxjs/src/internal/observable/iif.ts":92050,"./current/node_modules/rxjs/src/internal/observable/innerFrom":41393,"./current/node_modules/rxjs/src/internal/observable/innerFrom.ts":41393,"./current/node_modules/rxjs/src/internal/observable/interval":8910,"./current/node_modules/rxjs/src/internal/observable/interval.ts":8910,"./current/node_modules/rxjs/src/internal/observable/merge":29870,"./current/node_modules/rxjs/src/internal/observable/merge.ts":29870,"./current/node_modules/rxjs/src/internal/observable/never":69848,"./current/node_modules/rxjs/src/internal/observable/never.ts":69848,"./current/node_modules/rxjs/src/internal/observable/of":7432,"./current/node_modules/rxjs/src/internal/observable/of.ts":7432,"./current/node_modules/rxjs/src/internal/observable/onErrorResumeNext":12129,"./current/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts":12129,"./current/node_modules/rxjs/src/internal/observable/pairs":20751,"./current/node_modules/rxjs/src/internal/observable/pairs.ts":20751,"./current/node_modules/rxjs/src/internal/observable/partition":35607,"./current/node_modules/rxjs/src/internal/observable/partition.ts":35607,"./current/node_modules/rxjs/src/internal/observable/race":66859,"./current/node_modules/rxjs/src/internal/observable/race.ts":66859,"./current/node_modules/rxjs/src/internal/observable/range":73133,"./current/node_modules/rxjs/src/internal/observable/range.ts":73133,"./current/node_modules/rxjs/src/internal/observable/throwError":84558,"./current/node_modules/rxjs/src/internal/observable/throwError.ts":84558,"./current/node_modules/rxjs/src/internal/observable/timer":18339,"./current/node_modules/rxjs/src/internal/observable/timer.ts":18339,"./current/node_modules/rxjs/src/internal/observable/using":82581,"./current/node_modules/rxjs/src/internal/observable/using.ts":82581,"./current/node_modules/rxjs/src/internal/observable/zip":32127,"./current/node_modules/rxjs/src/internal/observable/zip.ts":32127,"./current/node_modules/rxjs/src/internal/operators/OperatorSubscriber":95532,"./current/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts":95532,"./current/node_modules/rxjs/src/internal/operators/audit":45550,"./current/node_modules/rxjs/src/internal/operators/audit.ts":45550,"./current/node_modules/rxjs/src/internal/operators/auditTime":96786,"./current/node_modules/rxjs/src/internal/operators/auditTime.ts":96786,"./current/node_modules/rxjs/src/internal/operators/buffer":77427,"./current/node_modules/rxjs/src/internal/operators/buffer.ts":77427,"./current/node_modules/rxjs/src/internal/operators/bufferCount":76127,"./current/node_modules/rxjs/src/internal/operators/bufferCount.ts":76127,"./current/node_modules/rxjs/src/internal/operators/bufferTime":62259,"./current/node_modules/rxjs/src/internal/operators/bufferTime.ts":62259,"./current/node_modules/rxjs/src/internal/operators/bufferToggle":91402,"./current/node_modules/rxjs/src/internal/operators/bufferToggle.ts":91402,"./current/node_modules/rxjs/src/internal/operators/bufferWhen":6242,"./current/node_modules/rxjs/src/internal/operators/bufferWhen.ts":6242,"./current/node_modules/rxjs/src/internal/operators/catchError":98657,"./current/node_modules/rxjs/src/internal/operators/catchError.ts":98657,"./current/node_modules/rxjs/src/internal/operators/combineAll":22057,"./current/node_modules/rxjs/src/internal/operators/combineAll.ts":22057,"./current/node_modules/rxjs/src/internal/operators/combineLatest":74468,"./current/node_modules/rxjs/src/internal/operators/combineLatest.ts":74468,"./current/node_modules/rxjs/src/internal/operators/combineLatestAll":24586,"./current/node_modules/rxjs/src/internal/operators/combineLatestAll.ts":24586,"./current/node_modules/rxjs/src/internal/operators/combineLatestWith":53319,"./current/node_modules/rxjs/src/internal/operators/combineLatestWith.ts":53319,"./current/node_modules/rxjs/src/internal/operators/concat":25028,"./current/node_modules/rxjs/src/internal/operators/concat.ts":25028,"./current/node_modules/rxjs/src/internal/operators/concatAll":19784,"./current/node_modules/rxjs/src/internal/operators/concatAll.ts":19784,"./current/node_modules/rxjs/src/internal/operators/concatMap":67384,"./current/node_modules/rxjs/src/internal/operators/concatMap.ts":67384,"./current/node_modules/rxjs/src/internal/operators/concatMapTo":46756,"./current/node_modules/rxjs/src/internal/operators/concatMapTo.ts":46756,"./current/node_modules/rxjs/src/internal/operators/concatWith":27902,"./current/node_modules/rxjs/src/internal/operators/concatWith.ts":27902,"./current/node_modules/rxjs/src/internal/operators/connect":61795,"./current/node_modules/rxjs/src/internal/operators/connect.ts":61795,"./current/node_modules/rxjs/src/internal/operators/count":63791,"./current/node_modules/rxjs/src/internal/operators/count.ts":63791,"./current/node_modules/rxjs/src/internal/operators/debounce":17730,"./current/node_modules/rxjs/src/internal/operators/debounce.ts":17730,"./current/node_modules/rxjs/src/internal/operators/debounceTime":59048,"./current/node_modules/rxjs/src/internal/operators/debounceTime.ts":59048,"./current/node_modules/rxjs/src/internal/operators/defaultIfEmpty":78260,"./current/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts":78260,"./current/node_modules/rxjs/src/internal/operators/delay":36544,"./current/node_modules/rxjs/src/internal/operators/delay.ts":36544,"./current/node_modules/rxjs/src/internal/operators/delayWhen":7365,"./current/node_modules/rxjs/src/internal/operators/delayWhen.ts":7365,"./current/node_modules/rxjs/src/internal/operators/dematerialize":22854,"./current/node_modules/rxjs/src/internal/operators/dematerialize.ts":22854,"./current/node_modules/rxjs/src/internal/operators/distinct":27291,"./current/node_modules/rxjs/src/internal/operators/distinct.ts":27291,"./current/node_modules/rxjs/src/internal/operators/distinctUntilChanged":70231,"./current/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts":70231,"./current/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged":29789,"./current/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts":29789,"./current/node_modules/rxjs/src/internal/operators/elementAt":66898,"./current/node_modules/rxjs/src/internal/operators/elementAt.ts":66898,"./current/node_modules/rxjs/src/internal/operators/endWith":80025,"./current/node_modules/rxjs/src/internal/operators/endWith.ts":80025,"./current/node_modules/rxjs/src/internal/operators/every":28154,"./current/node_modules/rxjs/src/internal/operators/every.ts":28154,"./current/node_modules/rxjs/src/internal/operators/exhaust":80543,"./current/node_modules/rxjs/src/internal/operators/exhaust.ts":80543,"./current/node_modules/rxjs/src/internal/operators/exhaustAll":84336,"./current/node_modules/rxjs/src/internal/operators/exhaustAll.ts":84336,"./current/node_modules/rxjs/src/internal/operators/exhaustMap":21781,"./current/node_modules/rxjs/src/internal/operators/exhaustMap.ts":21781,"./current/node_modules/rxjs/src/internal/operators/expand":15504,"./current/node_modules/rxjs/src/internal/operators/expand.ts":15504,"./current/node_modules/rxjs/src/internal/operators/filter":78470,"./current/node_modules/rxjs/src/internal/operators/filter.ts":78470,"./current/node_modules/rxjs/src/internal/operators/finalize":44063,"./current/node_modules/rxjs/src/internal/operators/finalize.ts":44063,"./current/node_modules/rxjs/src/internal/operators/find":32546,"./current/node_modules/rxjs/src/internal/operators/find.ts":32546,"./current/node_modules/rxjs/src/internal/operators/findIndex":98500,"./current/node_modules/rxjs/src/internal/operators/findIndex.ts":98500,"./current/node_modules/rxjs/src/internal/operators/first":78513,"./current/node_modules/rxjs/src/internal/operators/first.ts":78513,"./current/node_modules/rxjs/src/internal/operators/flatMap":60189,"./current/node_modules/rxjs/src/internal/operators/flatMap.ts":60189,"./current/node_modules/rxjs/src/internal/operators/groupBy":20559,"./current/node_modules/rxjs/src/internal/operators/groupBy.ts":20559,"./current/node_modules/rxjs/src/internal/operators/ignoreElements":26020,"./current/node_modules/rxjs/src/internal/operators/ignoreElements.ts":26020,"./current/node_modules/rxjs/src/internal/operators/isEmpty":99465,"./current/node_modules/rxjs/src/internal/operators/isEmpty.ts":99465,"./current/node_modules/rxjs/src/internal/operators/joinAllInternals":66,"./current/node_modules/rxjs/src/internal/operators/joinAllInternals.ts":66,"./current/node_modules/rxjs/src/internal/operators/last":42094,"./current/node_modules/rxjs/src/internal/operators/last.ts":42094,"./current/node_modules/rxjs/src/internal/operators/map":92211,"./current/node_modules/rxjs/src/internal/operators/map.ts":92211,"./current/node_modules/rxjs/src/internal/operators/mapTo":60001,"./current/node_modules/rxjs/src/internal/operators/mapTo.ts":60001,"./current/node_modules/rxjs/src/internal/operators/materialize":2017,"./current/node_modules/rxjs/src/internal/operators/materialize.ts":2017,"./current/node_modules/rxjs/src/internal/operators/max":40135,"./current/node_modules/rxjs/src/internal/operators/max.ts":40135,"./current/node_modules/rxjs/src/internal/operators/merge":27586,"./current/node_modules/rxjs/src/internal/operators/merge.ts":27586,"./current/node_modules/rxjs/src/internal/operators/mergeAll":2523,"./current/node_modules/rxjs/src/internal/operators/mergeAll.ts":2523,"./current/node_modules/rxjs/src/internal/operators/mergeInternals":71645,"./current/node_modules/rxjs/src/internal/operators/mergeInternals.ts":71645,"./current/node_modules/rxjs/src/internal/operators/mergeMap":96348,"./current/node_modules/rxjs/src/internal/operators/mergeMap.ts":96348,"./current/node_modules/rxjs/src/internal/operators/mergeMapTo":77133,"./current/node_modules/rxjs/src/internal/operators/mergeMapTo.ts":77133,"./current/node_modules/rxjs/src/internal/operators/mergeScan":83401,"./current/node_modules/rxjs/src/internal/operators/mergeScan.ts":83401,"./current/node_modules/rxjs/src/internal/operators/mergeWith":27125,"./current/node_modules/rxjs/src/internal/operators/mergeWith.ts":27125,"./current/node_modules/rxjs/src/internal/operators/min":8190,"./current/node_modules/rxjs/src/internal/operators/min.ts":8190,"./current/node_modules/rxjs/src/internal/operators/multicast":45380,"./current/node_modules/rxjs/src/internal/operators/multicast.ts":45380,"./current/node_modules/rxjs/src/internal/operators/observeOn":66627,"./current/node_modules/rxjs/src/internal/operators/observeOn.ts":66627,"./current/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith":83521,"./current/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts":83521,"./current/node_modules/rxjs/src/internal/operators/pairwise":25690,"./current/node_modules/rxjs/src/internal/operators/pairwise.ts":25690,"./current/node_modules/rxjs/src/internal/operators/partition":60471,"./current/node_modules/rxjs/src/internal/operators/partition.ts":60471,"./current/node_modules/rxjs/src/internal/operators/pluck":27748,"./current/node_modules/rxjs/src/internal/operators/pluck.ts":27748,"./current/node_modules/rxjs/src/internal/operators/publish":62126,"./current/node_modules/rxjs/src/internal/operators/publish.ts":62126,"./current/node_modules/rxjs/src/internal/operators/publishBehavior":38829,"./current/node_modules/rxjs/src/internal/operators/publishBehavior.ts":38829,"./current/node_modules/rxjs/src/internal/operators/publishLast":6807,"./current/node_modules/rxjs/src/internal/operators/publishLast.ts":6807,"./current/node_modules/rxjs/src/internal/operators/publishReplay":33891,"./current/node_modules/rxjs/src/internal/operators/publishReplay.ts":33891,"./current/node_modules/rxjs/src/internal/operators/race":31715,"./current/node_modules/rxjs/src/internal/operators/race.ts":31715,"./current/node_modules/rxjs/src/internal/operators/raceWith":77153,"./current/node_modules/rxjs/src/internal/operators/raceWith.ts":77153,"./current/node_modules/rxjs/src/internal/operators/reduce":90881,"./current/node_modules/rxjs/src/internal/operators/reduce.ts":90881,"./current/node_modules/rxjs/src/internal/operators/refCount":73346,"./current/node_modules/rxjs/src/internal/operators/refCount.ts":73346,"./current/node_modules/rxjs/src/internal/operators/repeat":52435,"./current/node_modules/rxjs/src/internal/operators/repeat.ts":52435,"./current/node_modules/rxjs/src/internal/operators/repeatWhen":14668,"./current/node_modules/rxjs/src/internal/operators/repeatWhen.ts":14668,"./current/node_modules/rxjs/src/internal/operators/retry":75456,"./current/node_modules/rxjs/src/internal/operators/retry.ts":75456,"./current/node_modules/rxjs/src/internal/operators/retryWhen":77769,"./current/node_modules/rxjs/src/internal/operators/retryWhen.ts":77769,"./current/node_modules/rxjs/src/internal/operators/sample":36635,"./current/node_modules/rxjs/src/internal/operators/sample.ts":36635,"./current/node_modules/rxjs/src/internal/operators/sampleTime":72768,"./current/node_modules/rxjs/src/internal/operators/sampleTime.ts":72768,"./current/node_modules/rxjs/src/internal/operators/scan":37528,"./current/node_modules/rxjs/src/internal/operators/scan.ts":37528,"./current/node_modules/rxjs/src/internal/operators/scanInternals":19541,"./current/node_modules/rxjs/src/internal/operators/scanInternals.ts":19541,"./current/node_modules/rxjs/src/internal/operators/sequenceEqual":2387,"./current/node_modules/rxjs/src/internal/operators/sequenceEqual.ts":2387,"./current/node_modules/rxjs/src/internal/operators/share":67424,"./current/node_modules/rxjs/src/internal/operators/share.ts":67424,"./current/node_modules/rxjs/src/internal/operators/shareReplay":25189,"./current/node_modules/rxjs/src/internal/operators/shareReplay.ts":25189,"./current/node_modules/rxjs/src/internal/operators/single":66646,"./current/node_modules/rxjs/src/internal/operators/single.ts":66646,"./current/node_modules/rxjs/src/internal/operators/skip":85270,"./current/node_modules/rxjs/src/internal/operators/skip.ts":85270,"./current/node_modules/rxjs/src/internal/operators/skipLast":82550,"./current/node_modules/rxjs/src/internal/operators/skipLast.ts":82550,"./current/node_modules/rxjs/src/internal/operators/skipUntil":25672,"./current/node_modules/rxjs/src/internal/operators/skipUntil.ts":25672,"./current/node_modules/rxjs/src/internal/operators/skipWhile":57974,"./current/node_modules/rxjs/src/internal/operators/skipWhile.ts":57974,"./current/node_modules/rxjs/src/internal/operators/startWith":80515,"./current/node_modules/rxjs/src/internal/operators/startWith.ts":80515,"./current/node_modules/rxjs/src/internal/operators/subscribeOn":91483,"./current/node_modules/rxjs/src/internal/operators/subscribeOn.ts":91483,"./current/node_modules/rxjs/src/internal/operators/switchAll":10615,"./current/node_modules/rxjs/src/internal/operators/switchAll.ts":10615,"./current/node_modules/rxjs/src/internal/operators/switchMap":50520,"./current/node_modules/rxjs/src/internal/operators/switchMap.ts":50520,"./current/node_modules/rxjs/src/internal/operators/switchMapTo":38846,"./current/node_modules/rxjs/src/internal/operators/switchMapTo.ts":38846,"./current/node_modules/rxjs/src/internal/operators/switchScan":78802,"./current/node_modules/rxjs/src/internal/operators/switchScan.ts":78802,"./current/node_modules/rxjs/src/internal/operators/take":8082,"./current/node_modules/rxjs/src/internal/operators/take.ts":8082,"./current/node_modules/rxjs/src/internal/operators/takeLast":60396,"./current/node_modules/rxjs/src/internal/operators/takeLast.ts":60396,"./current/node_modules/rxjs/src/internal/operators/takeUntil":84483,"./current/node_modules/rxjs/src/internal/operators/takeUntil.ts":84483,"./current/node_modules/rxjs/src/internal/operators/takeWhile":54440,"./current/node_modules/rxjs/src/internal/operators/takeWhile.ts":54440,"./current/node_modules/rxjs/src/internal/operators/tap":86108,"./current/node_modules/rxjs/src/internal/operators/tap.ts":86108,"./current/node_modules/rxjs/src/internal/operators/throttle":48494,"./current/node_modules/rxjs/src/internal/operators/throttle.ts":48494,"./current/node_modules/rxjs/src/internal/operators/throttleTime":56364,"./current/node_modules/rxjs/src/internal/operators/throttleTime.ts":56364,"./current/node_modules/rxjs/src/internal/operators/throwIfEmpty":14796,"./current/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts":14796,"./current/node_modules/rxjs/src/internal/operators/timeInterval":2372,"./current/node_modules/rxjs/src/internal/operators/timeInterval.ts":2372,"./current/node_modules/rxjs/src/internal/operators/timeout":45907,"./current/node_modules/rxjs/src/internal/operators/timeout.ts":45907,"./current/node_modules/rxjs/src/internal/operators/timeoutWith":68110,"./current/node_modules/rxjs/src/internal/operators/timeoutWith.ts":68110,"./current/node_modules/rxjs/src/internal/operators/timestamp":74740,"./current/node_modules/rxjs/src/internal/operators/timestamp.ts":74740,"./current/node_modules/rxjs/src/internal/operators/toArray":48249,"./current/node_modules/rxjs/src/internal/operators/toArray.ts":48249,"./current/node_modules/rxjs/src/internal/operators/window":48387,"./current/node_modules/rxjs/src/internal/operators/window.ts":48387,"./current/node_modules/rxjs/src/internal/operators/windowCount":5509,"./current/node_modules/rxjs/src/internal/operators/windowCount.ts":5509,"./current/node_modules/rxjs/src/internal/operators/windowTime":64999,"./current/node_modules/rxjs/src/internal/operators/windowTime.ts":64999,"./current/node_modules/rxjs/src/internal/operators/windowToggle":93742,"./current/node_modules/rxjs/src/internal/operators/windowToggle.ts":93742,"./current/node_modules/rxjs/src/internal/operators/windowWhen":71402,"./current/node_modules/rxjs/src/internal/operators/windowWhen.ts":71402,"./current/node_modules/rxjs/src/internal/operators/withLatestFrom":83254,"./current/node_modules/rxjs/src/internal/operators/withLatestFrom.ts":83254,"./current/node_modules/rxjs/src/internal/operators/zip":63671,"./current/node_modules/rxjs/src/internal/operators/zip.ts":63671,"./current/node_modules/rxjs/src/internal/operators/zipAll":54061,"./current/node_modules/rxjs/src/internal/operators/zipAll.ts":54061,"./current/node_modules/rxjs/src/internal/operators/zipWith":11412,"./current/node_modules/rxjs/src/internal/operators/zipWith.ts":11412,"./current/node_modules/rxjs/src/internal/scheduled/scheduleArray":76131,"./current/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts":76131,"./current/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable":32929,"./current/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts":32929,"./current/node_modules/rxjs/src/internal/scheduled/scheduleIterable":65077,"./current/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts":65077,"./current/node_modules/rxjs/src/internal/scheduled/scheduleObservable":62083,"./current/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts":62083,"./current/node_modules/rxjs/src/internal/scheduled/schedulePromise":3693,"./current/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts":3693,"./current/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike":94579,"./current/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts":94579,"./current/node_modules/rxjs/src/internal/scheduled/scheduled":81499,"./current/node_modules/rxjs/src/internal/scheduled/scheduled.ts":81499,"./current/node_modules/rxjs/src/internal/scheduler/Action":79366,"./current/node_modules/rxjs/src/internal/scheduler/Action.ts":79366,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction":59747,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts":59747,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler":9483,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts":9483,"./current/node_modules/rxjs/src/internal/scheduler/AsapAction":66423,"./current/node_modules/rxjs/src/internal/scheduler/AsapAction.ts":66423,"./current/node_modules/rxjs/src/internal/scheduler/AsapScheduler":23926,"./current/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts":23926,"./current/node_modules/rxjs/src/internal/scheduler/AsyncAction":61747,"./current/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts":61747,"./current/node_modules/rxjs/src/internal/scheduler/AsyncScheduler":3385,"./current/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts":3385,"./current/node_modules/rxjs/src/internal/scheduler/QueueAction":6775,"./current/node_modules/rxjs/src/internal/scheduler/QueueAction.ts":6775,"./current/node_modules/rxjs/src/internal/scheduler/QueueScheduler":91797,"./current/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts":91797,"./current/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler":49598,"./current/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts":49598,"./current/node_modules/rxjs/src/internal/scheduler/animationFrame":15183,"./current/node_modules/rxjs/src/internal/scheduler/animationFrame.ts":15183,"./current/node_modules/rxjs/src/internal/scheduler/animationFrameProvider":87744,"./current/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts":87744,"./current/node_modules/rxjs/src/internal/scheduler/asap":19890,"./current/node_modules/rxjs/src/internal/scheduler/asap.ts":19890,"./current/node_modules/rxjs/src/internal/scheduler/async":86544,"./current/node_modules/rxjs/src/internal/scheduler/async.ts":86544,"./current/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider":49494,"./current/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts":49494,"./current/node_modules/rxjs/src/internal/scheduler/immediateProvider":78581,"./current/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts":78581,"./current/node_modules/rxjs/src/internal/scheduler/intervalProvider":44650,"./current/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts":44650,"./current/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider":10578,"./current/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts":10578,"./current/node_modules/rxjs/src/internal/scheduler/queue":17511,"./current/node_modules/rxjs/src/internal/scheduler/queue.ts":17511,"./current/node_modules/rxjs/src/internal/scheduler/timeoutProvider":44926,"./current/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts":44926,"./current/node_modules/rxjs/src/internal/scheduler/timerHandle":3221,"./current/node_modules/rxjs/src/internal/scheduler/timerHandle.ts":3221,"./current/node_modules/rxjs/src/internal/symbol/iterator":19430,"./current/node_modules/rxjs/src/internal/symbol/iterator.ts":19430,"./current/node_modules/rxjs/src/internal/symbol/observable":77709,"./current/node_modules/rxjs/src/internal/symbol/observable.ts":77709,"./current/node_modules/rxjs/src/internal/testing/ColdObservable":73662,"./current/node_modules/rxjs/src/internal/testing/ColdObservable.ts":73662,"./current/node_modules/rxjs/src/internal/testing/HotObservable":93657,"./current/node_modules/rxjs/src/internal/testing/HotObservable.ts":93657,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLog":63759,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts":63759,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLoggable":57968,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts":57968,"./current/node_modules/rxjs/src/internal/testing/TestMessage":79642,"./current/node_modules/rxjs/src/internal/testing/TestMessage.ts":79642,"./current/node_modules/rxjs/src/internal/testing/TestScheduler":11810,"./current/node_modules/rxjs/src/internal/testing/TestScheduler.ts":11810,"./current/node_modules/rxjs/src/internal/types":71628,"./current/node_modules/rxjs/src/internal/types.ts":71628,"./current/node_modules/rxjs/src/internal/umd":89799,"./current/node_modules/rxjs/src/internal/umd.ts":89799,"./current/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError":3837,"./current/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts":3837,"./current/node_modules/rxjs/src/internal/util/EmptyError":84367,"./current/node_modules/rxjs/src/internal/util/EmptyError.ts":84367,"./current/node_modules/rxjs/src/internal/util/Immediate":89811,"./current/node_modules/rxjs/src/internal/util/Immediate.ts":89811,"./current/node_modules/rxjs/src/internal/util/NotFoundError":59086,"./current/node_modules/rxjs/src/internal/util/NotFoundError.ts":59086,"./current/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError":13471,"./current/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts":13471,"./current/node_modules/rxjs/src/internal/util/SequenceError":64389,"./current/node_modules/rxjs/src/internal/util/SequenceError.ts":64389,"./current/node_modules/rxjs/src/internal/util/UnsubscriptionError":80789,"./current/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts":80789,"./current/node_modules/rxjs/src/internal/util/applyMixins":44470,"./current/node_modules/rxjs/src/internal/util/applyMixins.ts":44470,"./current/node_modules/rxjs/src/internal/util/args":93096,"./current/node_modules/rxjs/src/internal/util/args.ts":93096,"./current/node_modules/rxjs/src/internal/util/argsArgArrayOrObject":34925,"./current/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts":34925,"./current/node_modules/rxjs/src/internal/util/argsOrArgArray":75465,"./current/node_modules/rxjs/src/internal/util/argsOrArgArray.ts":75465,"./current/node_modules/rxjs/src/internal/util/arrRemove":22478,"./current/node_modules/rxjs/src/internal/util/arrRemove.ts":22478,"./current/node_modules/rxjs/src/internal/util/createErrorClass":87302,"./current/node_modules/rxjs/src/internal/util/createErrorClass.ts":87302,"./current/node_modules/rxjs/src/internal/util/createObject":26867,"./current/node_modules/rxjs/src/internal/util/createObject.ts":26867,"./current/node_modules/rxjs/src/internal/util/errorContext":65493,"./current/node_modules/rxjs/src/internal/util/errorContext.ts":65493,"./current/node_modules/rxjs/src/internal/util/executeSchedule":48598,"./current/node_modules/rxjs/src/internal/util/executeSchedule.ts":48598,"./current/node_modules/rxjs/src/internal/util/identity":90838,"./current/node_modules/rxjs/src/internal/util/identity.ts":90838,"./current/node_modules/rxjs/src/internal/util/isArrayLike":52957,"./current/node_modules/rxjs/src/internal/util/isArrayLike.ts":52957,"./current/node_modules/rxjs/src/internal/util/isAsyncIterable":34204,"./current/node_modules/rxjs/src/internal/util/isAsyncIterable.ts":34204,"./current/node_modules/rxjs/src/internal/util/isDate":42299,"./current/node_modules/rxjs/src/internal/util/isDate.ts":42299,"./current/node_modules/rxjs/src/internal/util/isFunction":74641,"./current/node_modules/rxjs/src/internal/util/isFunction.ts":74641,"./current/node_modules/rxjs/src/internal/util/isInteropObservable":77449,"./current/node_modules/rxjs/src/internal/util/isInteropObservable.ts":77449,"./current/node_modules/rxjs/src/internal/util/isIterable":57065,"./current/node_modules/rxjs/src/internal/util/isIterable.ts":57065,"./current/node_modules/rxjs/src/internal/util/isObservable":59605,"./current/node_modules/rxjs/src/internal/util/isObservable.ts":59605,"./current/node_modules/rxjs/src/internal/util/isPromise":98840,"./current/node_modules/rxjs/src/internal/util/isPromise.ts":98840,"./current/node_modules/rxjs/src/internal/util/isReadableStreamLike":71940,"./current/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts":71940,"./current/node_modules/rxjs/src/internal/util/isScheduler":64687,"./current/node_modules/rxjs/src/internal/util/isScheduler.ts":64687,"./current/node_modules/rxjs/src/internal/util/lift":37233,"./current/node_modules/rxjs/src/internal/util/lift.ts":37233,"./current/node_modules/rxjs/src/internal/util/mapOneOrManyArgs":87367,"./current/node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts":87367,"./current/node_modules/rxjs/src/internal/util/noop":25045,"./current/node_modules/rxjs/src/internal/util/noop.ts":25045,"./current/node_modules/rxjs/src/internal/util/not":66340,"./current/node_modules/rxjs/src/internal/util/not.ts":66340,"./current/node_modules/rxjs/src/internal/util/pipe":96974,"./current/node_modules/rxjs/src/internal/util/pipe.ts":96974,"./current/node_modules/rxjs/src/internal/util/reportUnhandledError":75720,"./current/node_modules/rxjs/src/internal/util/reportUnhandledError.ts":75720,"./current/node_modules/rxjs/src/internal/util/subscribeToArray":13199,"./current/node_modules/rxjs/src/internal/util/subscribeToArray.ts":13199,"./current/node_modules/rxjs/src/internal/util/throwUnobservableError":14227,"./current/node_modules/rxjs/src/internal/util/throwUnobservableError.ts":14227,"./current/node_modules/rxjs/src/internal/util/workarounds":1167,"./current/node_modules/rxjs/src/internal/util/workarounds.ts":1167,"./current/node_modules/rxjs/src/operators":50403,"./current/node_modules/rxjs/src/operators/":50403,"./current/node_modules/rxjs/src/operators/index":50403,"./current/node_modules/rxjs/src/operators/index.ts":50403,"./current/node_modules/rxjs/src/testing":89057,"./current/node_modules/rxjs/src/testing/":89057,"./current/node_modules/rxjs/src/testing/index":89057,"./current/node_modules/rxjs/src/testing/index.ts":89057,"./current/node_modules/rxjs/src/tsconfig.base":20831,"./current/node_modules/rxjs/src/tsconfig.base.json":20831,"./current/node_modules/rxjs/src/tsconfig.cjs":96817,"./current/node_modules/rxjs/src/tsconfig.cjs.json":96817,"./current/node_modules/rxjs/src/tsconfig.cjs.spec":76120,"./current/node_modules/rxjs/src/tsconfig.cjs.spec.json":76120,"./current/node_modules/rxjs/src/tsconfig.esm":47601,"./current/node_modules/rxjs/src/tsconfig.esm.json":47601,"./current/node_modules/rxjs/src/tsconfig.esm5":35169,"./current/node_modules/rxjs/src/tsconfig.esm5.json":35169,"./current/node_modules/rxjs/src/tsconfig.esm5.rollup":96009,"./current/node_modules/rxjs/src/tsconfig.esm5.rollup.json":96009,"./current/node_modules/rxjs/src/tsconfig.types":25737,"./current/node_modules/rxjs/src/tsconfig.types.json":25737,"./current/node_modules/rxjs/src/tsconfig.types.spec":70084,"./current/node_modules/rxjs/src/tsconfig.types.spec.json":70084,"./current/node_modules/rxjs/src/webSocket":82652,"./current/node_modules/rxjs/src/webSocket/":82652,"./current/node_modules/rxjs/src/webSocket/index":82652,"./current/node_modules/rxjs/src/webSocket/index.ts":82652,"./current/src/create-a-connection":36033,"./current/src/create-a-connection.ts":36033,"./current/src/issue-a-credential":55536,"./current/src/issue-a-credential.ts":55536,"./current/src/mediation-recipient":98249,"./current/src/mediation-recipient.ts":98249,"./current/src/mediator-setup":71676,"./current/src/mediator-setup.ts":71676,"./current/src/register-schema-and-cred-def":71104,"./current/src/register-schema-and-cred-def.ts":71104,"./current/src/set-up":52537,"./current/src/set-up-anoncreds":10902,"./current/src/set-up-anoncreds-rn":8182,"./current/src/set-up-anoncreds-rn.ts":8182,"./current/src/set-up-anoncreds.ts":10902,"./current/src/set-up-askar":50531,"./current/src/set-up-askar-rn":93106,"./current/src/set-up-askar-rn.ts":93106,"./current/src/set-up-askar.ts":50531,"./current/src/set-up-cheqd":31638,"./current/src/set-up-cheqd.ts":31638,"./current/src/set-up-indy-vdr":55453,"./current/src/set-up-indy-vdr-config":84613,"./current/src/set-up-indy-vdr-config.ts":84613,"./current/src/set-up-indy-vdr-rn":73995,"./current/src/set-up-indy-vdr-rn.ts":73995,"./current/src/set-up-indy-vdr.ts":55453,"./current/src/set-up-rn":1308,"./current/src/set-up-rn.ts":1308,"./current/src/set-up.ts":52537};function o(n){var e=s(n);return r(e)}function s(n){if(!r.o(t,n)){var e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}return t[n]}o.keys=function(){return Object.keys(t)},o.resolve=s,n.exports=o,o.id=32502}}]); \ No newline at end of file diff --git a/assets/js/17896441.e36eed04.js b/assets/js/17896441.e36eed04.js new file mode 100644 index 0000000..d0ba1ba --- /dev/null +++ b/assets/js/17896441.e36eed04.js @@ -0,0 +1 @@ +(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7918],{47083:(e,n,r)=>{"use strict";r.d(n,{Z:()=>u});var t=r(67294),o=r(86010),s=r(35281),i=r(95999);const a={admonition:"admonition_WoCw",admonitionHeading:"admonitionHeading_TMsN",admonitionIcon:"admonitionIcon_Ibzs",admonitionContent:"admonitionContent_vXIg"};const d={note:{infimaClassName:"secondary",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 14 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 12 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 12 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 14 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 16 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")},holder:{infimaClassName:"holder",emoji:"\ud83d\uddc4",label:t.createElement(i.Z,{id:"theme.admonition.holder",description:"The default label used for the Caution admonition (:::holder)"},"holder")},issuer:{infimaClassName:"issuer",emoji:"\ud83d\udcc4",label:t.createElement(i.Z,{id:"theme.admonition.issuer",description:"The default label used for the Caution admonition (:::issuer)"},"issuer")},verifier:{infimaClassName:"verifier",emoji:"\ud83d\udc6e",label:t.createElement(i.Z,{id:"theme.admonition.verifier",description:"The default label used for the Verifier admonition (:::verifier)"},"verifier")},bob:{infimaClassName:"bob",emoji:"\ud83e\uddd4",label:t.createElement(i.Z,{id:"theme.admonition.bob",description:"The default label used for the Bob admonition (:::bob)"},"bob")},acme:{infimaClassName:"acme",emoji:"\ud83c\udfe2",label:t.createElement(i.Z,{id:"theme.admonition.acme",description:"The default label used for the acme admonition (:::acme)"},"acme")}},c={secondary:"note",important:"info",success:"tip",warning:"danger"};function l(e){const{mdxAdmonitionTitle:n,rest:r}=function(e){const n=t.Children.toArray(e),r=n.find((e=>t.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),o=t.createElement(t.Fragment,null,n.filter((e=>e!==r)));return{mdxAdmonitionTitle:r,rest:o}}(e.children);return{...e,title:e.title??n,children:r}}function u(e){const{children:n,type:r,title:i,icon:u}=l(e),m=function(e){const n=c[e]??e,r=d[n];return r||(console.warn(`No admonition config found for admonition type "${n}". Using Info as fallback.`),d.info)}(r),p=i??m.label,{iconComponent:g,emoji:f}=m,h=u??f??t.createElement(g,null);return t.createElement("div",{className:(0,o.Z)(s.k.common.admonition,s.k.common.admonitionType(e.type),"alert",`alert--${m.infimaClassName}`,`admonition-${m.infimaClassName}`,a.admonition)},t.createElement("div",{className:a.admonitionHeading},t.createElement("span",{className:a.admonitionIcon},h),p),t.createElement("div",{className:a.admonitionContent},n))}},71415:(e,n,r)=>{"use strict";r.d(n,{Z:()=>s});var t=r(67294),o=r(78397);function s(e){return t.createElement(t.Fragment,null,t.createElement(o.Z,e))}},18573:(e,n,r)=>{"use strict";r.d(n,{Z:()=>p});var t=r(87462),o=r(67294),s=r(72389),i=r(81170),a=r(72138),d=r(74477);const c=e=>e.split(" ").find((e=>e.match(/^section-/)))?.substr(8),l=(e,n)=>{const r=`start-section-${e}`,t=`end-section-${e}`,o=n.split("\n"),s=o.indexOf(o.find((e=>e.includes(r)))),i=o.indexOf(o.find((e=>e.includes(t))));return o.slice(s+1,i).join("\r\n")},u=e=>e.split(" ").find((e=>e.match(/.(js|ts)$/))),m=e=>e.split("\n").filter((e=>!e.match(/section-/))).join("\r\n");function p(e){let{children:n,...p}=e;const g=(0,s.Z)(),f=(0,d.E)(),h=function(e){return o.Children.toArray(e).some((e=>(0,o.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(n),y=f.version,b="string"==typeof h?a.Z:i.Z;if(!p.metastring)return o.createElement(b,(0,t.Z)({key:String(g)},p),h);let w;try{w=r(32502)(`./${y}/src/${u(p.metastring)}`).default}catch{}const v=c(p.metastring);let x;return w&&(x=v?l(v,w):m(w)),o.createElement(b,(0,t.Z)({key:String(g)},p),x||h)}},77058:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n autoAcceptConnections: true,\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},92151:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n InitConfig,\n Agent,\n WsOutboundTransport,\n HttpOutboundTransport,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n DidExchangeState,\n AutoAcceptCredential,\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n OutOfBandRecord,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { Schema } from 'indy-sdk'\nimport fetch from 'node-fetch'\n\nconst getGenesisTransaction = async (url: string) => {\n // Legacy code has a small issue with the call-signature from node-fetch\n // @ts-ignore\n const response = await fetch(url)\n\n return await response.text()\n}\n\n// start-section-1\nconst initializeHolderAgent = async () => {\n const genesisTransactionsBCovrinTestNet = await getGenesisTransaction('http://test.bcovrin.vonx.io/genesis')\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-holder',\n walletConfig: {\n id: 'demo-agent-holder',\n key: 'demoagentholder00000000000000000',\n },\n indyLedgers: [\n {\n id: 'bcovrin-test-net',\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: genesisTransactionsBCovrinTestNet,\n },\n ],\n autoAcceptCredentials: AutoAcceptCredential.ContentApproved,\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3002'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeIssuerAgent = async () => {\n const genesisTransactionsBCovrinTestNet = await getGenesisTransaction('http://test.bcovrin.vonx.io/genesis')\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-issuer',\n walletConfig: {\n id: 'demo-agent-issuer',\n key: 'demoagentissuer00000000000000000',\n },\n publicDidSeed: 'demoissuerdidseed000000000000000',\n indyLedgers: [\n {\n id: 'bcovrin-test-net',\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: genesisTransactionsBCovrinTestNet,\n },\n ],\n autoAcceptCredentials: AutoAcceptCredential.ContentApproved,\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst registerSchema = async (issuer: Agent) =>\n issuer.ledger.registerSchema({ attributes: ['name', 'age'], name: 'Identity', version: '1.0' })\n// end-section-3\n\n// start-section-4\nconst registerCredentialDefinition = async (issuer: Agent, schema: Schema) =>\n issuer.ledger.registerCredentialDefinition({ schema, supportRevocation: false, tag: 'default' })\n// end-section-4\n\n// start-section-5\nconst setupCredentialListener = (holder: Agent) => {\n holder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n })\n}\n// end-section-5\n\n// start-section-6\nconst issueCredential = async (issuer: Agent, credentialDefinitionId: string, connectionId: string) =>\n issuer.credentials.offerCredential({\n protocolVersion: 'v1',\n connectionId,\n credentialFormats: {\n indy: {\n credentialDefinitionId,\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n })\n// end-section-6\n\nconst createNewInvitation = async (issuer: Agent) => {\n const outOfBandRecord = await issuer.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n\nconst receiveInvitation = async (holder: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await holder.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n\nconst setupConnectionListener = (\n issuer: Agent,\n outOfBandRecord: OutOfBandRecord,\n cb: (...args: any) => Promise\n) => {\n issuer.events.on(ConnectionEventTypes.ConnectionStateChanged, async ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n await cb(payload.connectionRecord.id)\n }\n })\n}\n\nconst flow = (issuer: Agent) => async (connectionId: string) => {\n console.log('Registering the schema...')\n const schema = await registerSchema(issuer)\n console.log('Registering the credential definition...')\n const credentialDefinition = await registerCredentialDefinition(issuer, schema)\n console.log('Issuing the credential...')\n await issueCredential(issuer, credentialDefinition.id, connectionId)\n}\n\nconst run = async () => {\n console.log('Initializing the holder...')\n const holder = await initializeHolderAgent()\n console.log('Initializing the issuer...')\n const issuer = await initializeIssuerAgent()\n\n console.log('Initializing the credential listener...')\n setupCredentialListener(holder)\n\n console.log('Initializing the connection...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(issuer)\n setupConnectionListener(issuer, outOfBandRecord, flow(issuer))\n await receiveInvitation(holder, invitationUrl)\n}\n\nvoid run()\n"},3288:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\nimport { Agent, HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\n\n// start-section-1\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({ config, dependencies: agentDependencies })\n// end-section-1\n\n// start-section-2\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// start-section-3\nconst run = async () => {\n try {\n await agent.initialize()\n } catch (e) {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n }\n}\n// end-section-3\n\nvoid run()\n"},60420:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\nimport { Agent, HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\n\n// start-section-1\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({ config, dependencies: agentDependencies })\n// end-section-1\n\n// start-section-2\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nconst run = async () => {\n try {\n await agent.initialize()\n } catch (e) {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n }\n}\n// end-section-3\n\nvoid run()\n"},45343:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { AskarModule } from '@aries-framework/askar'\nimport {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n ConnectionsModule,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n }\n\n // A new instance of an agent is created here\n // Askar can also be replaced by the indy-sdk if required\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n // Askar can also be replaced by the indy-sdk if required\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},7283:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n DidsModule,\n HttpOutboundTransport,\n InitConfig,\n WsOutboundTransport,\n Agent,\n CredentialsModule,\n V2CredentialProtocol,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport {\n AnonCredsCredentialFormatService,\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n} from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst issuerConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-issuer',\n walletConfig: {\n id: 'wallet-id-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-holder',\n walletConfig: {\n id: 'wallet-id-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nissuer.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nissuer.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nissuer.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-1\n\n// start-section-2\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nholder.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nholder.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nholder.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-2\n\n// start-section-3\nholder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n})\n// end-section-3\n\n// start-section-4\nconst indyCredentialExchangeRecord = await issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n indy: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-4\n\n// start-section-5\nconst anonCredsCredentialExchangeRecord = issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-5\n"},8276:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n ConsoleLogger,\n HttpOutboundTransport,\n InitConfig,\n LogLevel,\n MediationRecipientModule,\n WsOutboundTransport,\n} from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport { agentDependencies } from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// start-section-1\nconst name = 'alice'\n\n// paste your invitation url here\n// or use the current invitation-url to connect to the public animo-mediator.\nconst mediatorInvitationUrl =\n 'https://mediator.dev.animo.id/invite?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIyMDc1MDM4YS05ZGU3LTRiODItYWUxYi1jNzBmNDg4MjYzYTciLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vbWVkaWF0b3IuZGV2LmFuaW1vLmlkIiwidHlwZSI6ImRpZC1jb21tdW5pY2F0aW9uIiwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtvSG9RTUphdU5VUE5OV1pQcEw3RGs1SzNtQ0NDMlBpNDJGY3FwR25iampMcSJdLCJyb3V0aW5nS2V5cyI6W119LHsiaWQiOiIjaW5saW5lLTEiLCJzZXJ2aWNlRW5kcG9pbnQiOiJ3c3M6Ly9tZWRpYXRvci5kZXYuYW5pbW8uaWQiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa29Ib1FNSmF1TlVQTk5XWlBwTDdEazVLM21DQ0MyUGk0MkZjcXBHbmJqakxxIl0sInJvdXRpbmdLZXlzIjpbXX1dfQ'\n\nconst agentConfig: InitConfig = {\n label: `Aries Framework JavaScript ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n logger: new ConsoleLogger(LogLevel.trace),\n}\n\nconst alice = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n mediationRecipient: new MediationRecipientModule({\n mediatorInvitationUrl,\n }),\n indySdk: new IndySdkModule({ indySdk }),\n },\n})\n\nalice.registerOutboundTransport(new HttpOutboundTransport())\nalice.registerOutboundTransport(new WsOutboundTransport())\n\nawait alice.initialize()\n// end-section-1\n"},50768:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n ConnectionsModule,\n HttpOutboundTransport,\n InitConfig,\n MediationStateChangedEvent,\n MediatorModule,\n RoutingEventTypes,\n} from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport { HttpInboundTransport, agentDependencies } from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// start-section-1\nconst name = 'mediator'\nconst port = 3001\n\nconst agentConfig: InitConfig = {\n label: `Aries Framework JavaScript ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n endpoints: [`http://localhost:${port}`],\n}\n\nconst mediator = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({ indySdk }),\n mediator: new MediatorModule({\n autoAcceptMediationRequests: true,\n }),\n connections: new ConnectionsModule({\n autoAcceptConnections: true,\n }),\n },\n})\n\nmediator.registerOutboundTransport(new HttpOutboundTransport())\nmediator.registerInboundTransport(new HttpInboundTransport({ port }))\n\nawait mediator.initialize()\nconst mediatorOutOfBandRecord = await mediator.oob.createInvitation({ multiUseInvitation: true })\n\nconst mediatiorInvitationUrl = mediatorOutOfBandRecord.outOfBandInvitation.toUrl({\n domain: `http://localhost:${port}`,\n})\nconsole.log(mediatiorInvitationUrl)\n// end-section-1\n\nmediator.events\n .observable(RoutingEventTypes.MediationStateChanged)\n .subscribe(({ payload }) => {\n console.log(`${name} mediation state: ${payload.mediationRecord.state}`)\n })\n"},62055:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { DidsModule, InitConfig, KeyType, LogLevel, TypedArrayEncoder } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs-register-schema-and-cred-def',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n} from '@aries-framework/cheqd'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // We do this to have access to a wallet\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()],\n }),\n },\n})\n// end-section-1\n\n// start-section-2\nconst seed = TypedArrayEncoder.fromString(``) // What you input on bcovrin. Should be kept secure in production!\nconst unqualifiedIndyDid = `` // will be returned after registering seed on bcovrin\nconst indyDid = `did:indy:bcovrin:test:${unqualifiedIndyDid}`\n\nconst cheqdDid = await agent.dids.create({\n method: 'cheqd',\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n\nawait agent.dids.import({\n did: '',\n overwrite: true,\n privateKeys: [\n {\n privateKey: seed,\n keyType: KeyType.Ed25519,\n },\n ],\n})\n// end-section-2\n\n// start-section-3\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: '',\n name: 'Example Schema to register',\n version: '1.0.0',\n },\n options: {},\n})\n\nif (schemaResult.schemaState.state === 'failed') {\n throw new Error(`Error creating schema: ${schemaResult.schemaState.reason}`)\n}\n// end-section-3\n\n// start-section-4\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n tag: 'default',\n issuerId: '',\n schemaId: schemaResult.schemaState.schemaId,\n },\n options: {},\n})\n\nif (credentialDefinitionResult.credentialDefinitionState.state === 'failed') {\n throw new Error(\n `Error creating credential definition: ${credentialDefinitionResult.credentialDefinitionState.reason}`\n )\n}\n// end-section-4\n"},96596:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},13099:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},78757:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},93716:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},12107:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { DidDocumentService, InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent, DidsModule, KeyType, DidDocument } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n CheqdDidCreateOptions,\n} from '@aries-framework/cheqd'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n dids: new DidsModule({\n registrars: [new CheqdDidRegistrar()],\n resolvers: [new CheqdDidResolver()],\n }),\n\n // AnonCreds\n anoncreds: new AnonCredsModule({\n registries: [new CheqdAnonCredsRegistry()],\n }),\n\n // Add cheqd module\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n\n// start-section-2\n\n// create a key pair\nconst key = await agent.wallet.createKey({\n keyType: KeyType.Ed25519,\n})\n\n// encode public key according to the verification method\nconst ed25519PublicKeyBase58 = key.publicKeyBase58\n\n// Create a DID\nawait agent.dids.create({\n method: 'cheqd',\n secret: {},\n options: {\n network: 'testnet',\n },\n didDocument: new DidDocument({\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n controller: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1',\n type: 'Ed25519VerificationKey2018',\n controller: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n publicKeyBase58: ed25519PublicKeyBase58,\n },\n ],\n authentication: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1'],\n }),\n})\n// end-section-2\n\n// start-section-3\nawait agent.dids.create({\n method: 'cheqd',\n // the secret contains a the verification method type and id\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n // an optional methodSpecificIdAlgo parameter\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n// end-section-3\n\n// start-section-4\nawait agent.dids.update({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // Updates DID Document with an additional verification method if provided\n secret: {\n verificationMethod: {\n id: 'key-2',\n type: 'JsonWebKey2020',\n },\n },\n didDocument: {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n controller: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1',\n type: 'Ed25519VerificationKey2020',\n controller: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n publicKeyMultibase: 'z6MknkzLUEP5cxqqsaysNMWoh8NJRb3YsowTCj2D6yhwyEdj',\n },\n ],\n authentication: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1'],\n // updates did document with a service block\n service: [\n new DidDocumentService({\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#rand',\n type: 'rand',\n serviceEndpoint: 'https://rand.in',\n }),\n ],\n },\n})\n// end-section-4\n\n// start-section-5\nawait agent.dids.deactivate({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // an optional versionId parameter\n options: {\n versionId: '3.0',\n },\n})\n// end-section-5\n"},84056:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport { Agent, InitConfig } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport {\n agentDependencies,\n IndySdkPostgresStorageConfig,\n loadIndySdkPostgresPlugin,\n IndySdkPostgresWalletScheme,\n} from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// IndySdkPostgresStorageConfig defines interface for the Postgres plugin configuration.\nconst storageConfig = {\n type: 'postgres_storage',\n config: {\n url: 'localhost:5432',\n wallet_scheme: IndySdkPostgresWalletScheme.DatabasePerWallet,\n },\n credentials: {\n account: 'postgres',\n password: 'postgres',\n admin_account: 'postgres',\n admin_password: 'postgres',\n },\n} satisfies IndySdkPostgresStorageConfig\n\n// load the postgres wallet plugin before agent initialization\nloadIndySdkPostgresPlugin(storageConfig.config, storageConfig.credentials)\n\nconst agentConfig: InitConfig = {\n label: 'My Agent',\n // walletConfig.id and walletConfig.key are still required\n walletConfig: {\n id: 'walletId',\n key: 'testKey0000000000000000000000000',\n // storage is added and defines the postgres plugin configuration\n storage: storageConfig,\n },\n}\n\nconst agent = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n"},51002:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport indySdk from 'indy-sdk-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Indy SDK module on the agent\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},12863:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Indy SDK module on the agent\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n\nawait agent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},99031:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { IndyVdrModule } from '@aries-framework/indy-vdr'\n\nconst modules = {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n indyNamespace: 'bcovrin:test',\n isProduction: false,\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n}\n// end-section-1\n"},44279:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-react-native'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},54437:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},46121:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@aries-framework/core'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// TODO: we probably want to make this more specific to React Native,\n// so using it in a components and recommending to use the react hooks\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},61031:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@aries-framework/core'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { HttpInboundTransport } from '@aries-framework/node'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},36033:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { AskarModule } from '@credo-ts/askar'\nimport {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n ConnectionsModule,\n} from '@credo-ts/core'\nimport { agentDependencies, HttpInboundTransport } from '@credo-ts/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},76250:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n DidsModule,\n HttpOutboundTransport,\n InitConfig,\n WsOutboundTransport,\n Agent,\n CredentialsModule,\n V2CredentialProtocol,\n} from '@credo-ts/core'\nimport { agentDependencies, HttpInboundTransport } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport {\n AnonCredsCredentialFormatService,\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n} from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst issuerConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-issuer',\n walletConfig: {\n id: 'wallet-id-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-holder',\n walletConfig: {\n id: 'wallet-id-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nissuer.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nissuer.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nissuer.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-1\n\n// start-section-2\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nholder.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nholder.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nholder.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-2\n\n// start-section-3\nholder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n break\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n})\n// end-section-3\n\n// start-section-4\nconst indyCredentialExchangeRecord = await issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n indy: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-4\n\n// start-section-5\nconst anonCredsCredentialExchangeRecord = issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-5\n"},98249:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n ConsoleLogger,\n HttpOutboundTransport,\n InitConfig,\n LogLevel,\n MediationRecipientModule,\n WsOutboundTransport,\n} from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport { agentDependencies } from '@credo-ts/node'\n\n// start-section-1\nconst name = 'alice'\n\n// paste your invitation url here\n// or use the current invitation-url to connect to the public animo-mediator.\nconst mediatorInvitationUrl =\n 'https://mediator.dev.animo.id/invite?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIyMDc1MDM4YS05ZGU3LTRiODItYWUxYi1jNzBmNDg4MjYzYTciLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vbWVkaWF0b3IuZGV2LmFuaW1vLmlkIiwidHlwZSI6ImRpZC1jb21tdW5pY2F0aW9uIiwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtvSG9RTUphdU5VUE5OV1pQcEw3RGs1SzNtQ0NDMlBpNDJGY3FwR25iampMcSJdLCJyb3V0aW5nS2V5cyI6W119LHsiaWQiOiIjaW5saW5lLTEiLCJzZXJ2aWNlRW5kcG9pbnQiOiJ3c3M6Ly9tZWRpYXRvci5kZXYuYW5pbW8uaWQiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa29Ib1FNSmF1TlVQTk5XWlBwTDdEazVLM21DQ0MyUGk0MkZjcXBHbmJqakxxIl0sInJvdXRpbmdLZXlzIjpbXX1dfQ'\n\nconst agentConfig: InitConfig = {\n label: `Credo ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n logger: new ConsoleLogger(LogLevel.trace),\n}\n\nconst alice = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n mediationRecipient: new MediationRecipientModule({\n mediatorInvitationUrl,\n }),\n askar: new AskarModule({ ariesAskar }),\n },\n})\n\nalice.registerOutboundTransport(new HttpOutboundTransport())\nalice.registerOutboundTransport(new WsOutboundTransport())\n\nawait alice.initialize()\n// end-section-1\n"},71676:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n ConnectionsModule,\n HttpOutboundTransport,\n InitConfig,\n MediationStateChangedEvent,\n MediatorModule,\n RoutingEventTypes,\n} from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport { HttpInboundTransport, agentDependencies } from '@credo-ts/node'\n\n// start-section-1\nconst name = 'mediator'\nconst port = 3001\n\nconst agentConfig: InitConfig = {\n label: `Credo ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n endpoints: [`http://localhost:${port}`],\n}\n\nconst mediator = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n mediator: new MediatorModule({\n autoAcceptMediationRequests: true,\n }),\n connections: new ConnectionsModule({\n autoAcceptConnections: true,\n }),\n },\n})\n\nmediator.registerOutboundTransport(new HttpOutboundTransport())\nmediator.registerInboundTransport(new HttpInboundTransport({ port }))\n\nawait mediator.initialize()\nconst mediatorOutOfBandRecord = await mediator.oob.createInvitation({ multiUseInvitation: true })\n\nconst mediatiorInvitationUrl = mediatorOutOfBandRecord.outOfBandInvitation.toUrl({\n domain: `http://localhost:${port}`,\n})\nconsole.log(mediatiorInvitationUrl)\n// end-section-1\n\nmediator.events\n .observable(RoutingEventTypes.MediationStateChanged)\n .subscribe(({ payload }) => {\n console.log(`${name} mediation state: ${payload.mediationRecord.state}`)\n })\n"},71104:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { DidsModule, InitConfig, KeyType, TypedArrayEncoder } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs-register-schema-and-cred-def',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n} from '@credo-ts/cheqd'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // We do this to have access to a wallet\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()],\n }),\n },\n})\n// end-section-1\n\n// start-section-2\nconst seed = TypedArrayEncoder.fromString(``) // What you input on bcovrin. Should be kept secure in production!\nconst unqualifiedIndyDid = `` // will be returned after registering seed on bcovrin\nconst indyDid = `did:indy:bcovrin:test:${unqualifiedIndyDid}`\n\nconst cheqdDid = await agent.dids.create({\n method: 'cheqd',\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n\nawait agent.dids.import({\n did: '',\n overwrite: true,\n privateKeys: [\n {\n privateKey: seed,\n keyType: KeyType.Ed25519,\n },\n ],\n})\n// end-section-2\n\n// start-section-3\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: '',\n name: 'Example Schema to register',\n version: '1.0.0',\n },\n options: {},\n})\n\nif (schemaResult.schemaState.state === 'failed') {\n throw new Error(`Error creating schema: ${schemaResult.schemaState.reason}`)\n}\n// end-section-3\n\n// start-section-4\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n tag: 'default',\n issuerId: '',\n schemaId: schemaResult.schemaState.schemaId,\n },\n options: {\n supportRevocation: false,\n },\n})\n\nif (credentialDefinitionResult.credentialDefinitionState.state === 'failed') {\n throw new Error(\n `Error creating credential definition: ${credentialDefinitionResult.credentialDefinitionState.reason}`\n )\n}\n// end-section-4\n"},50723:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig, SdJwtVcRecord, W3cCredentialRecord } from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\n\nconst issuerConfig: InitConfig = {\n label: 'openid4vc-issuer',\n walletConfig: {\n id: 'openid4vc-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'openid4vc-holder',\n walletConfig: {\n id: 'openid4vc-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-4\nimport {\n OpenId4VcIssuanceSessionStateChangedEvent,\n OpenId4VcIssuerEvents,\n OpenId4VcVerificationSessionState,\n OpenId4VcVerificationSessionStateChangedEvent,\n OpenId4VcVerifierEvents,\n OpenId4VciCredentialFormatProfile,\n OpenId4VciCredentialRequestToCredentialMapper,\n} from '@credo-ts/openid4vc'\n\nconst credentialRequestToCredentialMapper: OpenId4VciCredentialRequestToCredentialMapper = async ({\n // agent context for the current wallet / tenant\n agentContext,\n // the credential offer related to the credential request\n credentialOffer,\n // the received credential request\n credentialRequest,\n // the list of credentialsSupported entries\n credentialsSupported,\n // the cryptographic binding provided by the holder in the credential request proof\n holderBinding,\n // the issuance session associated with the credential request and offer\n issuanceSession,\n}) => {\n const firstSupported = credentialsSupported[0]\n\n // We only support vc+sd-jwt in this example, but you can add more formats\n if (firstSupported.format !== OpenId4VciCredentialFormatProfile.SdJwtVc) {\n throw new Error('Only vc+sd-jwt is supported')\n }\n\n // We only support AcmeCorpEmployee in this example, but you can support any type\n if (firstSupported.vct !== 'AcmeCorpEmployee') {\n throw new Error('Only AcmeCorpEmployee is supported')\n }\n\n // find the first did:key did in our wallet. You can modify this based on your needs\n const didsApi = agentContext.dependencyManager.resolve(DidsApi)\n const [didKeyDidRecord] = await didsApi.getCreatedDids({\n method: 'key',\n })\n\n const didKey = DidKey.fromDid(didKeyDidRecord.did)\n const didUrl = `${didKey.did}#${didKey.key.fingerprint}`\n\n return {\n credentialSupportedId: firstSupported.id,\n format: 'vc+sd-jwt',\n // We can provide the holderBinding as is, if we don't want to make changes\n holder: holderBinding,\n payload: {\n vct: firstSupported.vct,\n firstName: 'John',\n lastName: 'Doe',\n },\n disclosureFrame: {\n _sd: ['lastName'],\n },\n issuer: {\n method: 'did',\n didUrl,\n },\n }\n}\n\n// end-section-4\n\n// start-section-1\nimport { Agent, DidsApi, DifPresentationExchangeService, KeyType } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport express, { Router } from 'express'\nimport { OpenId4VcIssuerModule, OpenId4VcVerifierModule } from '@credo-ts/openid4vc'\n\n// Create two express routers, all endpoints for the\n// issuer and verifier will be added to these routers\nconst verifierRouter = Router()\nconst issuerRouter = Router()\n\n// Register the routers on the express server. The path should match\n// with the baseUrl you configure in the modules below.\nconst app = express()\napp.use('/oid4vci', issuerRouter)\napp.use('/siop', verifierRouter)\n\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n openId4VcIssuer: new OpenId4VcIssuerModule({\n baseUrl: 'http://127.0.0.1:3000/oid4vci',\n\n // If no router is passed, one will be created.\n // you still have to register the router on your express server\n // but you can access it on agent.modules.openId4VcIssuer.config.router\n // It works the same for verifier: agent.modules.openId4VcVerifier.config.router\n router: issuerRouter,\n\n // Each of the endpoints can have configuration associated with it, such as the\n // path (under the baseUrl) to use for the endpoints.\n endpoints: {\n // The credentialRequestToCredentialMapper is the only required endpoint\n // configuration that must be provided. This method is called whenever a\n // credential request has been received for an offer we created. The callback should\n // return the issued credential to return in the credential response to the holder.\n credential: {\n credentialRequestToCredentialMapper,\n },\n },\n }),\n\n // the base URL of the verifier, the router\n openId4VcVerifier: new OpenId4VcVerifierModule({\n baseUrl: 'http://127.0.0.1:3000/siop',\n\n router: verifierRouter,\n }),\n },\n})\n\n// listen on port 3000 for the openid4vc app\napp.listen(3000)\n// end-section-1\n\nawait issuer\n .initialize()\n .then(() => {\n console.log('Issuer agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the issuer agent! Message: ${e}`)\n })\n\n// we use the same agent for the verifier, but the tutorial uses verifier.xxx\nconst verifier = issuer\n\n// start-section-2\nimport { JwaSignatureAlgorithm } from '@credo-ts/core'\n\n// Create an issuer with one supported credential: AcmeCorpEmployee\nconst openid4vcIssuer = await issuer.modules.openId4VcIssuer.createIssuer({\n display: [\n {\n name: 'ACME Corp.',\n description: 'ACME Corp. is a company that provides the best services.',\n text_color: '#000000',\n background_color: '#FFFFFF',\n logo: {\n url: 'https://acme.com/logo.png',\n alt_text: 'ACME Corp. logo',\n },\n },\n ],\n credentialsSupported: [\n {\n format: 'vc+sd-jwt',\n vct: 'AcmeCorpEmployee',\n id: 'AcmeCorpEmployee',\n cryptographic_binding_methods_supported: ['did:key'],\n cryptographic_suites_supported: [JwaSignatureAlgorithm.ES256],\n },\n ],\n})\n\n// Create a did:key that we will use for issuance\nconst issuerDidResult = await issuer.dids.create({\n method: 'key',\n options: {\n keyType: KeyType.Ed25519,\n },\n})\n\nif (issuerDidResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n}\n// end-section-2\n\n// start-section-3\nconst { credentialOffer, issuanceSession } = await issuer.modules.openId4VcIssuer.createCredentialOffer({\n issuerId: openid4vcIssuer.issuerId,\n // values must match the `id` of the credential supported by the issuer\n offeredCredentials: ['AcmeCorpEmployee'],\n\n // Only pre-authorized code flow is supported\n preAuthorizedCodeFlowConfig: {\n userPinRequired: false,\n },\n\n // You can store any metadata about the issuance here\n issuanceMetadata: {\n someKey: 'someValue',\n },\n})\n\n// Listen and react to changes in the issuance session\nissuer.events.on(\n OpenId4VcIssuerEvents.IssuanceSessionStateChanged,\n (event) => {\n if (event.payload.issuanceSession.id === issuanceSession.id) {\n console.log('Issuance session state changed to ', event.payload.issuanceSession.state)\n }\n }\n)\n// end-section-3\n\n// start-section-5\nimport { OpenId4VcHolderModule } from '@credo-ts/openid4vc'\n\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n\n // no configuration required for holder module\n openId4VcHolderModule: new OpenId4VcHolderModule(),\n },\n})\n// end-section-5\n\nawait holder\n .initialize()\n .then(() => {\n console.log('Holder agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the holder agent! Message: ${e}`)\n })\n\n// start-section-6\nimport { KeyDidCreateOptions, getJwkFromKey, DidKey } from '@credo-ts/core'\n\n// resolved credential offer contains the offer, metadata, etc..\nconst resolvedCredentialOffer = await holder.modules.openId4VcHolderModule.resolveCredentialOffer(credentialOffer)\nconsole.log('Resolved credential offer', JSON.stringify(resolvedCredentialOffer.credentialOfferPayload, null, 2))\n\n// issuer only supports pre-authorized flow for now\nconst credentials = await holder.modules.openId4VcHolderModule.acceptCredentialOfferUsingPreAuthorizedCode(\n resolvedCredentialOffer,\n {\n credentialBindingResolver: async ({\n supportedDidMethods,\n keyType,\n supportsAllDidMethods,\n // supportsJwk now also passed\n supportsJwk,\n credentialFormat,\n }) => {\n // NOTE: example implementation. Adjust based on your needs\n // Return the binding to the credential that should be used. Either did or jwk is supported\n\n if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) {\n const didResult = await holder.dids.create({\n method: 'key',\n options: {\n keyType,\n },\n })\n\n if (didResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n }\n\n const didKey = DidKey.fromDid(didResult.didState.did)\n\n return {\n method: 'did',\n didUrl: `${didKey.did}#${didKey.key.fingerprint}`,\n }\n }\n\n // we also support plain jwk for sd-jwt only\n if (supportsJwk && credentialFormat === OpenId4VciCredentialFormatProfile.SdJwtVc) {\n const key = await holder.wallet.createKey({\n keyType,\n })\n\n // you now need to return an object instead of VerificationMethod instance\n // and method 'did' or 'jwk'\n return {\n method: 'jwk',\n jwk: getJwkFromKey(key),\n }\n }\n\n throw new Error('Unable to create a key binding')\n },\n }\n)\n\nconsole.log('Received credentials', JSON.stringify(credentials, null, 2))\n\n// Store the received credentials\nconst records: Array = []\nfor (const credential of credentials) {\n if ('compact' in credential) {\n const record = await holder.sdJwtVc.store(credential.compact)\n records.push(record)\n } else {\n const record = await holder.w3cCredentials.storeCredential({\n credential,\n })\n records.push(record)\n }\n}\n// end-section-6\n\n// start-section-7\n// Create a verifier\nconst openId4VcVerifier = await verifier.modules.openId4VcVerifier.createVerifier({})\n\n// Create a did:key that we will use for signing OpenID4VP authorization requests\nconst verifierDidResult = await issuer.dids.create({\n method: 'key',\n options: {\n keyType: KeyType.Ed25519,\n },\n})\n\nif (verifierDidResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n}\n\nconst verifierDidKey = DidKey.fromDid(verifierDidResult.didState.did)\n// end-section-7\n\n// start-section-8\nconst { authorizationRequest, verificationSession } =\n await verifier.modules.openId4VcVerifier.createAuthorizationRequest({\n verifierId: openId4VcVerifier.verifierId,\n requestSigner: {\n didUrl: `${verifierDidKey.did}#${verifierDidKey.key.fingerprint}`,\n method: 'did',\n },\n // Add DIF presentation exchange data\n presentationExchange: {\n definition: {\n id: '9ed05140-b33b-445e-a0f0-9a23aa501868',\n name: 'Employee Verification',\n purpose: 'We need to verify your employee status to grant access to the employee portal',\n input_descriptors: [\n {\n id: '9c98fb43-6fd5-49b1-8dcc-69bd2a378f23',\n constraints: {\n // Require limit disclosure\n limit_disclosure: 'required',\n fields: [\n {\n filter: {\n type: 'string',\n const: 'AcmeCorpEmployee',\n },\n path: ['$.vct'],\n },\n ],\n },\n },\n ],\n },\n },\n })\n\n// Listen and react to changes in the verification session\nverifier.events.on(\n OpenId4VcVerifierEvents.VerificationSessionStateChanged,\n async (event) => {\n if (event.payload.verificationSession.id === verificationSession.id) {\n console.log('Verification session state changed to ', event.payload.verificationSession.state)\n }\n\n if (event.payload.verificationSession.state === OpenId4VcVerificationSessionState.ResponseVerified) {\n const verifiedAuthorizationResponse = await verifier.modules.openId4VcVerifier.getVerifiedAuthorizationResponse(\n verificationSession.id\n )\n console.log('Successfully verified presentation.', JSON.stringify(verifiedAuthorizationResponse, null, 2))\n\n console.log('Exiting...')\n process.exit()\n }\n }\n)\n// end-section-8\n\n// start-section-9\n\n// resolved credential offer contains the offer, metadata, etc..\nconst resolvedAuthorizationRequest = await holder.modules.openId4VcHolderModule.resolveSiopAuthorizationRequest(\n authorizationRequest\n)\nconsole.log(\n 'Resolved credentials for request',\n JSON.stringify(resolvedAuthorizationRequest.presentationExchange.credentialsForRequest, null, 2)\n)\n\nconst presentationExchangeService = holder.dependencyManager.resolve(DifPresentationExchangeService)\n// Automatically select credentials. In a wallet you could manually choose which credentials to return based on the \"resolvedAuthorizationRequest.presentationExchange.credentialsForRequest\" value\nconst selectedCredentials = presentationExchangeService.selectCredentialsForRequest(\n resolvedAuthorizationRequest.presentationExchange.credentialsForRequest\n)\n\n// issuer only supports pre-authorized flow for now\nconst authorizationResponse = await holder.modules.openId4VcHolderModule.acceptSiopAuthorizationRequest({\n authorizationRequest: resolvedAuthorizationRequest.authorizationRequest,\n presentationExchange: {\n credentials: selectedCredentials,\n },\n})\nconsole.log('Submitted authorization response', JSON.stringify(authorizationResponse.submittedResponse, null, 2))\n// end-section-9\n"},8182:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { IndyVdrAnonCredsRegistry } from '@credo-ts/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},10902:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { IndyVdrAnonCredsRegistry } from '@credo-ts/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},93106:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},50531:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},31638:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { DidDocumentService, InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent, DidsModule, KeyType, DidDocument } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n CheqdDidCreateOptions,\n} from '@credo-ts/cheqd'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n dids: new DidsModule({\n registrars: [new CheqdDidRegistrar()],\n resolvers: [new CheqdDidResolver()],\n }),\n\n // AnonCreds\n anoncreds: new AnonCredsModule({\n registries: [new CheqdAnonCredsRegistry()],\n anoncreds,\n }),\n\n // Add cheqd module\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n\n// start-section-2\n\n// create a key pair\nconst key = await agent.wallet.createKey({\n keyType: KeyType.Ed25519,\n})\n\n// encode public key according to the verification method\nconst ed25519PublicKeyBase58 = key.publicKeyBase58\n\n// Create a DID\nawait agent.dids.create({\n method: 'cheqd',\n secret: {},\n options: {},\n didDocument: new DidDocument({\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n controller: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1',\n type: 'Ed25519VerificationKey2018',\n controller: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n publicKeyBase58: ed25519PublicKeyBase58,\n },\n ],\n authentication: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1'],\n }),\n})\n// end-section-2\n\n// start-section-3\nawait agent.dids.create({\n method: 'cheqd',\n // the secret contains a the verification method type and id\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n // an optional methodSpecificIdAlgo parameter\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n// end-section-3\n\n// start-section-4\nawait agent.dids.update({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // Updates DID Document with an additional verification method if provided\n secret: {\n verificationMethod: {\n id: 'key-2',\n type: 'JsonWebKey2020',\n },\n },\n didDocument: {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n controller: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1',\n type: 'Ed25519VerificationKey2020',\n controller: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n publicKeyMultibase: 'z6MknkzLUEP5cxqqsaysNMWoh8NJRb3YsowTCj2D6yhwyEdj',\n },\n ],\n authentication: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1'],\n // updates did document with a service block\n service: [\n new DidDocumentService({\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#rand',\n type: 'rand',\n serviceEndpoint: 'https://rand.in',\n }),\n ],\n },\n})\n// end-section-4\n\n// start-section-5\nawait agent.dids.deactivate({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // an optional versionId parameter\n options: {\n versionId: '3.0',\n },\n})\n// end-section-5\n"},84613:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { IndyVdrModule } from '@credo-ts/indy-vdr'\n\nconst modules = {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n indyNamespace: 'bcovrin:test',\n isProduction: false,\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n}\n// end-section-1\n"},73995:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-react-native'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},55453:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},38461:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\n// or import from '@credo-ts/react-native' for React Native\nimport { agentDependencies } from '@credo-ts/node'\n\nimport { OpenId4VcHolderModule } from '@credo-ts/openid4vc'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // no configuration required for holder module\n openId4VcHolderModule: new OpenId4VcHolderModule(),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},38340:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\n// OpenID4VC issuer and verifier modules only work in Node.js\nimport { agentDependencies } from '@credo-ts/node'\n\nimport express, { Router } from 'express'\nimport { OpenId4VcIssuerModule, OpenId4VcVerifierModule } from '@credo-ts/openid4vc'\n\n// Create two express routers, all endpoints for the\n// issuer and verifier will be added to these routers\nconst verifierRouter = Router()\nconst issuerRouter = Router()\n\n// Register the routers on the express server. The path should match\n// with the baseUrl you configure in the modules below.\nconst app = express()\napp.use('/oid4vci', issuerRouter)\napp.use('/siop', verifierRouter)\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n openId4VcIssuer: new OpenId4VcIssuerModule({\n baseUrl: 'http://127.0.0.1:3000/oid4vci',\n\n // If no router is passed, one will be created.\n // you still have to register the router on your express server\n // but you can access it on agent.modules.openId4VcIssuer.config.router\n // It works the same for verifier: agent.modules.openId4VcVerifier.config.router\n router: issuerRouter,\n\n // Each of the endpoints can have configuration associated with it, such as the\n // path (under the baseUrl) to use for the endpoints.\n endpoints: {\n // The credentialRequestToCredentialMapper is the only required endpoint\n // configuration that must be provided. This method is called whenever a\n // credential request has been received for an offer we created. The callback should\n // return the issued credential to return in the credential response to the holder.\n credential: {\n credentialRequestToCredentialMapper: async () => {\n throw new Error('Not implemented')\n },\n },\n },\n }),\n\n // openId4VcVerifier module can only be used in Node.js\n openId4VcVerifier: new OpenId4VcVerifierModule({\n baseUrl: 'http://127.0.0.1:3000/siop',\n\n router: verifierRouter,\n }),\n },\n})\n\n// listen on port 3000 for the openid4vc app.\napp.listen(3000)\n\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},1308:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@credo-ts/core'\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// TODO: we probably want to make this more specific to React Native,\n// so using it in a components and recommending to use the react hooks\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},52537:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@credo-ts/core'\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'\nimport { HttpInboundTransport } from '@credo-ts/node'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},32502:(e,n,r)=>{var t={"./0.3/node_modules/did-resolver/src/__tests__/resolver.test":50349,"./0.3/node_modules/did-resolver/src/__tests__/resolver.test.ts":50349,"./0.3/node_modules/did-resolver/src/resolver":55883,"./0.3/node_modules/did-resolver/src/resolver.ts":55883,"./0.3/node_modules/luxon/src/datetime":38105,"./0.3/node_modules/luxon/src/datetime.js":38105,"./0.3/node_modules/luxon/src/duration":26721,"./0.3/node_modules/luxon/src/duration.js":26721,"./0.3/node_modules/luxon/src/errors":74015,"./0.3/node_modules/luxon/src/errors.js":74015,"./0.3/node_modules/luxon/src/impl/conversions":8498,"./0.3/node_modules/luxon/src/impl/conversions.js":8498,"./0.3/node_modules/luxon/src/impl/diff":38998,"./0.3/node_modules/luxon/src/impl/diff.js":38998,"./0.3/node_modules/luxon/src/impl/digits":29310,"./0.3/node_modules/luxon/src/impl/digits.js":29310,"./0.3/node_modules/luxon/src/impl/english":4039,"./0.3/node_modules/luxon/src/impl/english.js":4039,"./0.3/node_modules/luxon/src/impl/formats":85303,"./0.3/node_modules/luxon/src/impl/formats.js":85303,"./0.3/node_modules/luxon/src/impl/formatter":84756,"./0.3/node_modules/luxon/src/impl/formatter.js":84756,"./0.3/node_modules/luxon/src/impl/invalid":80760,"./0.3/node_modules/luxon/src/impl/invalid.js":80760,"./0.3/node_modules/luxon/src/impl/locale":80114,"./0.3/node_modules/luxon/src/impl/locale.js":80114,"./0.3/node_modules/luxon/src/impl/regexParser":31990,"./0.3/node_modules/luxon/src/impl/regexParser.js":31990,"./0.3/node_modules/luxon/src/impl/tokenParser":64546,"./0.3/node_modules/luxon/src/impl/tokenParser.js":64546,"./0.3/node_modules/luxon/src/impl/util":57866,"./0.3/node_modules/luxon/src/impl/util.js":57866,"./0.3/node_modules/luxon/src/impl/zoneUtil":99776,"./0.3/node_modules/luxon/src/impl/zoneUtil.js":99776,"./0.3/node_modules/luxon/src/info":16965,"./0.3/node_modules/luxon/src/info.js":16965,"./0.3/node_modules/luxon/src/interval":61591,"./0.3/node_modules/luxon/src/interval.js":61591,"./0.3/node_modules/luxon/src/luxon":18004,"./0.3/node_modules/luxon/src/luxon.js":18004,"./0.3/node_modules/luxon/src/luxonFilled":99972,"./0.3/node_modules/luxon/src/luxonFilled.js":99972,"./0.3/node_modules/luxon/src/settings":52636,"./0.3/node_modules/luxon/src/settings.js":52636,"./0.3/node_modules/luxon/src/zone":76476,"./0.3/node_modules/luxon/src/zone.js":76476,"./0.3/node_modules/luxon/src/zones/IANAZone":43176,"./0.3/node_modules/luxon/src/zones/IANAZone.js":43176,"./0.3/node_modules/luxon/src/zones/fixedOffsetZone":61840,"./0.3/node_modules/luxon/src/zones/fixedOffsetZone.js":61840,"./0.3/node_modules/luxon/src/zones/invalidZone":85092,"./0.3/node_modules/luxon/src/zones/invalidZone.js":85092,"./0.3/node_modules/luxon/src/zones/localZone":15617,"./0.3/node_modules/luxon/src/zones/localZone.js":15617,"./0.3/src/create-a-connection":77058,"./0.3/src/create-a-connection.ts":77058,"./0.3/src/issue-a-credential":92151,"./0.3/src/issue-a-credential.ts":92151,"./0.3/src/set-up":60420,"./0.3/src/set-up-rn":3288,"./0.3/src/set-up-rn.ts":3288,"./0.3/src/set-up.ts":60420,"./0.4/src/create-a-connection":45343,"./0.4/src/create-a-connection.ts":45343,"./0.4/src/issue-a-credential":7283,"./0.4/src/issue-a-credential.ts":7283,"./0.4/src/mediation-recipient":8276,"./0.4/src/mediation-recipient.ts":8276,"./0.4/src/mediator-setup":50768,"./0.4/src/mediator-setup.ts":50768,"./0.4/src/register-schema-and-cred-def":62055,"./0.4/src/register-schema-and-cred-def.ts":62055,"./0.4/src/set-up":61031,"./0.4/src/set-up-anoncreds-rs":13099,"./0.4/src/set-up-anoncreds-rs-rn":96596,"./0.4/src/set-up-anoncreds-rs-rn.ts":96596,"./0.4/src/set-up-anoncreds-rs.ts":13099,"./0.4/src/set-up-askar":93716,"./0.4/src/set-up-askar-rn":78757,"./0.4/src/set-up-askar-rn.ts":78757,"./0.4/src/set-up-askar.ts":93716,"./0.4/src/set-up-cheqd":12107,"./0.4/src/set-up-cheqd.ts":12107,"./0.4/src/set-up-indy-sdk":12863,"./0.4/src/set-up-indy-sdk-postgres":84056,"./0.4/src/set-up-indy-sdk-postgres.ts":84056,"./0.4/src/set-up-indy-sdk-rn":51002,"./0.4/src/set-up-indy-sdk-rn.ts":51002,"./0.4/src/set-up-indy-sdk.ts":12863,"./0.4/src/set-up-indy-vdr":54437,"./0.4/src/set-up-indy-vdr-config":99031,"./0.4/src/set-up-indy-vdr-config.ts":99031,"./0.4/src/set-up-indy-vdr-rn":44279,"./0.4/src/set-up-indy-vdr-rn.ts":44279,"./0.4/src/set-up-indy-vdr.ts":54437,"./0.4/src/set-up-rn":46121,"./0.4/src/set-up-rn.ts":46121,"./0.4/src/set-up.ts":61031,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/AndroidManifest.xml":29838,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/java/org/hyperledger/anoncreds/AnoncredsModule.java":90239,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/java/org/hyperledger/anoncreds/AnoncredsPackage.java":31354,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/AndroidManifest.xml":81332,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/java/org/hyperledger/ariesaskar/AriesAskarModule.java":8566,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/java/org/hyperledger/ariesaskar/AriesAskarPackage.java":2051,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/AndroidManifest.xml":94516,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/java/org/hyperledger/indyvdr/IndyVdrModule.java":11611,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/java/org/hyperledger/indyvdr/IndyVdrPackage.java":79681,"./current/node_modules/rxjs/src/":76328,"./current/node_modules/rxjs/src/Rx.global":64147,"./current/node_modules/rxjs/src/Rx.global.js":64147,"./current/node_modules/rxjs/src/ajax":18398,"./current/node_modules/rxjs/src/ajax/":18398,"./current/node_modules/rxjs/src/ajax/index":18398,"./current/node_modules/rxjs/src/ajax/index.ts":18398,"./current/node_modules/rxjs/src/fetch":44106,"./current/node_modules/rxjs/src/fetch/":44106,"./current/node_modules/rxjs/src/fetch/index":44106,"./current/node_modules/rxjs/src/fetch/index.ts":44106,"./current/node_modules/rxjs/src/index":76328,"./current/node_modules/rxjs/src/index.ts":76328,"./current/node_modules/rxjs/src/internal/AnyCatcher":12930,"./current/node_modules/rxjs/src/internal/AnyCatcher.ts":12930,"./current/node_modules/rxjs/src/internal/AsyncSubject":58069,"./current/node_modules/rxjs/src/internal/AsyncSubject.ts":58069,"./current/node_modules/rxjs/src/internal/BehaviorSubject":49219,"./current/node_modules/rxjs/src/internal/BehaviorSubject.ts":49219,"./current/node_modules/rxjs/src/internal/Notification":71913,"./current/node_modules/rxjs/src/internal/Notification.ts":71913,"./current/node_modules/rxjs/src/internal/NotificationFactories":62590,"./current/node_modules/rxjs/src/internal/NotificationFactories.ts":62590,"./current/node_modules/rxjs/src/internal/Observable":59203,"./current/node_modules/rxjs/src/internal/Observable.ts":59203,"./current/node_modules/rxjs/src/internal/Operator":74287,"./current/node_modules/rxjs/src/internal/Operator.ts":74287,"./current/node_modules/rxjs/src/internal/ReplaySubject":62736,"./current/node_modules/rxjs/src/internal/ReplaySubject.ts":62736,"./current/node_modules/rxjs/src/internal/Scheduler":11213,"./current/node_modules/rxjs/src/internal/Scheduler.ts":11213,"./current/node_modules/rxjs/src/internal/Subject":29170,"./current/node_modules/rxjs/src/internal/Subject.ts":29170,"./current/node_modules/rxjs/src/internal/Subscriber":47811,"./current/node_modules/rxjs/src/internal/Subscriber.ts":47811,"./current/node_modules/rxjs/src/internal/Subscription":75160,"./current/node_modules/rxjs/src/internal/Subscription.ts":75160,"./current/node_modules/rxjs/src/internal/ajax/AjaxResponse":52004,"./current/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts":52004,"./current/node_modules/rxjs/src/internal/ajax/ajax":55791,"./current/node_modules/rxjs/src/internal/ajax/ajax.ts":55791,"./current/node_modules/rxjs/src/internal/ajax/errors":49930,"./current/node_modules/rxjs/src/internal/ajax/errors.ts":49930,"./current/node_modules/rxjs/src/internal/ajax/getXHRResponse":66594,"./current/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts":66594,"./current/node_modules/rxjs/src/internal/ajax/types":33731,"./current/node_modules/rxjs/src/internal/ajax/types.ts":33731,"./current/node_modules/rxjs/src/internal/config":17138,"./current/node_modules/rxjs/src/internal/config.ts":17138,"./current/node_modules/rxjs/src/internal/firstValueFrom":12451,"./current/node_modules/rxjs/src/internal/firstValueFrom.ts":12451,"./current/node_modules/rxjs/src/internal/lastValueFrom":70284,"./current/node_modules/rxjs/src/internal/lastValueFrom.ts":70284,"./current/node_modules/rxjs/src/internal/observable/ConnectableObservable":80001,"./current/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts":80001,"./current/node_modules/rxjs/src/internal/observable/bindCallback":9808,"./current/node_modules/rxjs/src/internal/observable/bindCallback.ts":9808,"./current/node_modules/rxjs/src/internal/observable/bindCallbackInternals":39780,"./current/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts":39780,"./current/node_modules/rxjs/src/internal/observable/bindNodeCallback":46853,"./current/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts":46853,"./current/node_modules/rxjs/src/internal/observable/combineLatest":24058,"./current/node_modules/rxjs/src/internal/observable/combineLatest.ts":24058,"./current/node_modules/rxjs/src/internal/observable/concat":87101,"./current/node_modules/rxjs/src/internal/observable/concat.ts":87101,"./current/node_modules/rxjs/src/internal/observable/connectable":82623,"./current/node_modules/rxjs/src/internal/observable/connectable.ts":82623,"./current/node_modules/rxjs/src/internal/observable/defer":91166,"./current/node_modules/rxjs/src/internal/observable/defer.ts":91166,"./current/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject":39290,"./current/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts":39290,"./current/node_modules/rxjs/src/internal/observable/dom/animationFrames":66007,"./current/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts":66007,"./current/node_modules/rxjs/src/internal/observable/dom/fetch":37045,"./current/node_modules/rxjs/src/internal/observable/dom/fetch.ts":37045,"./current/node_modules/rxjs/src/internal/observable/dom/webSocket":50101,"./current/node_modules/rxjs/src/internal/observable/dom/webSocket.ts":50101,"./current/node_modules/rxjs/src/internal/observable/empty":367,"./current/node_modules/rxjs/src/internal/observable/empty.ts":367,"./current/node_modules/rxjs/src/internal/observable/forkJoin":31029,"./current/node_modules/rxjs/src/internal/observable/forkJoin.ts":31029,"./current/node_modules/rxjs/src/internal/observable/from":22051,"./current/node_modules/rxjs/src/internal/observable/from.ts":22051,"./current/node_modules/rxjs/src/internal/observable/fromEvent":16273,"./current/node_modules/rxjs/src/internal/observable/fromEvent.ts":16273,"./current/node_modules/rxjs/src/internal/observable/fromEventPattern":8517,"./current/node_modules/rxjs/src/internal/observable/fromEventPattern.ts":8517,"./current/node_modules/rxjs/src/internal/observable/fromSubscribable":75735,"./current/node_modules/rxjs/src/internal/observable/fromSubscribable.ts":75735,"./current/node_modules/rxjs/src/internal/observable/generate":34758,"./current/node_modules/rxjs/src/internal/observable/generate.ts":34758,"./current/node_modules/rxjs/src/internal/observable/iif":92050,"./current/node_modules/rxjs/src/internal/observable/iif.ts":92050,"./current/node_modules/rxjs/src/internal/observable/innerFrom":41393,"./current/node_modules/rxjs/src/internal/observable/innerFrom.ts":41393,"./current/node_modules/rxjs/src/internal/observable/interval":8910,"./current/node_modules/rxjs/src/internal/observable/interval.ts":8910,"./current/node_modules/rxjs/src/internal/observable/merge":29870,"./current/node_modules/rxjs/src/internal/observable/merge.ts":29870,"./current/node_modules/rxjs/src/internal/observable/never":69848,"./current/node_modules/rxjs/src/internal/observable/never.ts":69848,"./current/node_modules/rxjs/src/internal/observable/of":7432,"./current/node_modules/rxjs/src/internal/observable/of.ts":7432,"./current/node_modules/rxjs/src/internal/observable/onErrorResumeNext":12129,"./current/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts":12129,"./current/node_modules/rxjs/src/internal/observable/pairs":20751,"./current/node_modules/rxjs/src/internal/observable/pairs.ts":20751,"./current/node_modules/rxjs/src/internal/observable/partition":35607,"./current/node_modules/rxjs/src/internal/observable/partition.ts":35607,"./current/node_modules/rxjs/src/internal/observable/race":66859,"./current/node_modules/rxjs/src/internal/observable/race.ts":66859,"./current/node_modules/rxjs/src/internal/observable/range":73133,"./current/node_modules/rxjs/src/internal/observable/range.ts":73133,"./current/node_modules/rxjs/src/internal/observable/throwError":84558,"./current/node_modules/rxjs/src/internal/observable/throwError.ts":84558,"./current/node_modules/rxjs/src/internal/observable/timer":18339,"./current/node_modules/rxjs/src/internal/observable/timer.ts":18339,"./current/node_modules/rxjs/src/internal/observable/using":82581,"./current/node_modules/rxjs/src/internal/observable/using.ts":82581,"./current/node_modules/rxjs/src/internal/observable/zip":32127,"./current/node_modules/rxjs/src/internal/observable/zip.ts":32127,"./current/node_modules/rxjs/src/internal/operators/OperatorSubscriber":95532,"./current/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts":95532,"./current/node_modules/rxjs/src/internal/operators/audit":45550,"./current/node_modules/rxjs/src/internal/operators/audit.ts":45550,"./current/node_modules/rxjs/src/internal/operators/auditTime":96786,"./current/node_modules/rxjs/src/internal/operators/auditTime.ts":96786,"./current/node_modules/rxjs/src/internal/operators/buffer":77427,"./current/node_modules/rxjs/src/internal/operators/buffer.ts":77427,"./current/node_modules/rxjs/src/internal/operators/bufferCount":76127,"./current/node_modules/rxjs/src/internal/operators/bufferCount.ts":76127,"./current/node_modules/rxjs/src/internal/operators/bufferTime":62259,"./current/node_modules/rxjs/src/internal/operators/bufferTime.ts":62259,"./current/node_modules/rxjs/src/internal/operators/bufferToggle":91402,"./current/node_modules/rxjs/src/internal/operators/bufferToggle.ts":91402,"./current/node_modules/rxjs/src/internal/operators/bufferWhen":6242,"./current/node_modules/rxjs/src/internal/operators/bufferWhen.ts":6242,"./current/node_modules/rxjs/src/internal/operators/catchError":98657,"./current/node_modules/rxjs/src/internal/operators/catchError.ts":98657,"./current/node_modules/rxjs/src/internal/operators/combineAll":22057,"./current/node_modules/rxjs/src/internal/operators/combineAll.ts":22057,"./current/node_modules/rxjs/src/internal/operators/combineLatest":74468,"./current/node_modules/rxjs/src/internal/operators/combineLatest.ts":74468,"./current/node_modules/rxjs/src/internal/operators/combineLatestAll":24586,"./current/node_modules/rxjs/src/internal/operators/combineLatestAll.ts":24586,"./current/node_modules/rxjs/src/internal/operators/combineLatestWith":53319,"./current/node_modules/rxjs/src/internal/operators/combineLatestWith.ts":53319,"./current/node_modules/rxjs/src/internal/operators/concat":25028,"./current/node_modules/rxjs/src/internal/operators/concat.ts":25028,"./current/node_modules/rxjs/src/internal/operators/concatAll":19784,"./current/node_modules/rxjs/src/internal/operators/concatAll.ts":19784,"./current/node_modules/rxjs/src/internal/operators/concatMap":67384,"./current/node_modules/rxjs/src/internal/operators/concatMap.ts":67384,"./current/node_modules/rxjs/src/internal/operators/concatMapTo":46756,"./current/node_modules/rxjs/src/internal/operators/concatMapTo.ts":46756,"./current/node_modules/rxjs/src/internal/operators/concatWith":27902,"./current/node_modules/rxjs/src/internal/operators/concatWith.ts":27902,"./current/node_modules/rxjs/src/internal/operators/connect":61795,"./current/node_modules/rxjs/src/internal/operators/connect.ts":61795,"./current/node_modules/rxjs/src/internal/operators/count":63791,"./current/node_modules/rxjs/src/internal/operators/count.ts":63791,"./current/node_modules/rxjs/src/internal/operators/debounce":17730,"./current/node_modules/rxjs/src/internal/operators/debounce.ts":17730,"./current/node_modules/rxjs/src/internal/operators/debounceTime":59048,"./current/node_modules/rxjs/src/internal/operators/debounceTime.ts":59048,"./current/node_modules/rxjs/src/internal/operators/defaultIfEmpty":78260,"./current/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts":78260,"./current/node_modules/rxjs/src/internal/operators/delay":36544,"./current/node_modules/rxjs/src/internal/operators/delay.ts":36544,"./current/node_modules/rxjs/src/internal/operators/delayWhen":7365,"./current/node_modules/rxjs/src/internal/operators/delayWhen.ts":7365,"./current/node_modules/rxjs/src/internal/operators/dematerialize":22854,"./current/node_modules/rxjs/src/internal/operators/dematerialize.ts":22854,"./current/node_modules/rxjs/src/internal/operators/distinct":27291,"./current/node_modules/rxjs/src/internal/operators/distinct.ts":27291,"./current/node_modules/rxjs/src/internal/operators/distinctUntilChanged":70231,"./current/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts":70231,"./current/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged":29789,"./current/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts":29789,"./current/node_modules/rxjs/src/internal/operators/elementAt":66898,"./current/node_modules/rxjs/src/internal/operators/elementAt.ts":66898,"./current/node_modules/rxjs/src/internal/operators/endWith":80025,"./current/node_modules/rxjs/src/internal/operators/endWith.ts":80025,"./current/node_modules/rxjs/src/internal/operators/every":28154,"./current/node_modules/rxjs/src/internal/operators/every.ts":28154,"./current/node_modules/rxjs/src/internal/operators/exhaust":80543,"./current/node_modules/rxjs/src/internal/operators/exhaust.ts":80543,"./current/node_modules/rxjs/src/internal/operators/exhaustAll":84336,"./current/node_modules/rxjs/src/internal/operators/exhaustAll.ts":84336,"./current/node_modules/rxjs/src/internal/operators/exhaustMap":21781,"./current/node_modules/rxjs/src/internal/operators/exhaustMap.ts":21781,"./current/node_modules/rxjs/src/internal/operators/expand":15504,"./current/node_modules/rxjs/src/internal/operators/expand.ts":15504,"./current/node_modules/rxjs/src/internal/operators/filter":78470,"./current/node_modules/rxjs/src/internal/operators/filter.ts":78470,"./current/node_modules/rxjs/src/internal/operators/finalize":44063,"./current/node_modules/rxjs/src/internal/operators/finalize.ts":44063,"./current/node_modules/rxjs/src/internal/operators/find":32546,"./current/node_modules/rxjs/src/internal/operators/find.ts":32546,"./current/node_modules/rxjs/src/internal/operators/findIndex":98500,"./current/node_modules/rxjs/src/internal/operators/findIndex.ts":98500,"./current/node_modules/rxjs/src/internal/operators/first":78513,"./current/node_modules/rxjs/src/internal/operators/first.ts":78513,"./current/node_modules/rxjs/src/internal/operators/flatMap":60189,"./current/node_modules/rxjs/src/internal/operators/flatMap.ts":60189,"./current/node_modules/rxjs/src/internal/operators/groupBy":20559,"./current/node_modules/rxjs/src/internal/operators/groupBy.ts":20559,"./current/node_modules/rxjs/src/internal/operators/ignoreElements":26020,"./current/node_modules/rxjs/src/internal/operators/ignoreElements.ts":26020,"./current/node_modules/rxjs/src/internal/operators/isEmpty":99465,"./current/node_modules/rxjs/src/internal/operators/isEmpty.ts":99465,"./current/node_modules/rxjs/src/internal/operators/joinAllInternals":66,"./current/node_modules/rxjs/src/internal/operators/joinAllInternals.ts":66,"./current/node_modules/rxjs/src/internal/operators/last":42094,"./current/node_modules/rxjs/src/internal/operators/last.ts":42094,"./current/node_modules/rxjs/src/internal/operators/map":92211,"./current/node_modules/rxjs/src/internal/operators/map.ts":92211,"./current/node_modules/rxjs/src/internal/operators/mapTo":60001,"./current/node_modules/rxjs/src/internal/operators/mapTo.ts":60001,"./current/node_modules/rxjs/src/internal/operators/materialize":2017,"./current/node_modules/rxjs/src/internal/operators/materialize.ts":2017,"./current/node_modules/rxjs/src/internal/operators/max":40135,"./current/node_modules/rxjs/src/internal/operators/max.ts":40135,"./current/node_modules/rxjs/src/internal/operators/merge":27586,"./current/node_modules/rxjs/src/internal/operators/merge.ts":27586,"./current/node_modules/rxjs/src/internal/operators/mergeAll":2523,"./current/node_modules/rxjs/src/internal/operators/mergeAll.ts":2523,"./current/node_modules/rxjs/src/internal/operators/mergeInternals":71645,"./current/node_modules/rxjs/src/internal/operators/mergeInternals.ts":71645,"./current/node_modules/rxjs/src/internal/operators/mergeMap":96348,"./current/node_modules/rxjs/src/internal/operators/mergeMap.ts":96348,"./current/node_modules/rxjs/src/internal/operators/mergeMapTo":77133,"./current/node_modules/rxjs/src/internal/operators/mergeMapTo.ts":77133,"./current/node_modules/rxjs/src/internal/operators/mergeScan":83401,"./current/node_modules/rxjs/src/internal/operators/mergeScan.ts":83401,"./current/node_modules/rxjs/src/internal/operators/mergeWith":27125,"./current/node_modules/rxjs/src/internal/operators/mergeWith.ts":27125,"./current/node_modules/rxjs/src/internal/operators/min":8190,"./current/node_modules/rxjs/src/internal/operators/min.ts":8190,"./current/node_modules/rxjs/src/internal/operators/multicast":45380,"./current/node_modules/rxjs/src/internal/operators/multicast.ts":45380,"./current/node_modules/rxjs/src/internal/operators/observeOn":66627,"./current/node_modules/rxjs/src/internal/operators/observeOn.ts":66627,"./current/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith":83521,"./current/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts":83521,"./current/node_modules/rxjs/src/internal/operators/pairwise":25690,"./current/node_modules/rxjs/src/internal/operators/pairwise.ts":25690,"./current/node_modules/rxjs/src/internal/operators/partition":60471,"./current/node_modules/rxjs/src/internal/operators/partition.ts":60471,"./current/node_modules/rxjs/src/internal/operators/pluck":27748,"./current/node_modules/rxjs/src/internal/operators/pluck.ts":27748,"./current/node_modules/rxjs/src/internal/operators/publish":62126,"./current/node_modules/rxjs/src/internal/operators/publish.ts":62126,"./current/node_modules/rxjs/src/internal/operators/publishBehavior":38829,"./current/node_modules/rxjs/src/internal/operators/publishBehavior.ts":38829,"./current/node_modules/rxjs/src/internal/operators/publishLast":6807,"./current/node_modules/rxjs/src/internal/operators/publishLast.ts":6807,"./current/node_modules/rxjs/src/internal/operators/publishReplay":33891,"./current/node_modules/rxjs/src/internal/operators/publishReplay.ts":33891,"./current/node_modules/rxjs/src/internal/operators/race":31715,"./current/node_modules/rxjs/src/internal/operators/race.ts":31715,"./current/node_modules/rxjs/src/internal/operators/raceWith":77153,"./current/node_modules/rxjs/src/internal/operators/raceWith.ts":77153,"./current/node_modules/rxjs/src/internal/operators/reduce":90881,"./current/node_modules/rxjs/src/internal/operators/reduce.ts":90881,"./current/node_modules/rxjs/src/internal/operators/refCount":73346,"./current/node_modules/rxjs/src/internal/operators/refCount.ts":73346,"./current/node_modules/rxjs/src/internal/operators/repeat":52435,"./current/node_modules/rxjs/src/internal/operators/repeat.ts":52435,"./current/node_modules/rxjs/src/internal/operators/repeatWhen":14668,"./current/node_modules/rxjs/src/internal/operators/repeatWhen.ts":14668,"./current/node_modules/rxjs/src/internal/operators/retry":75456,"./current/node_modules/rxjs/src/internal/operators/retry.ts":75456,"./current/node_modules/rxjs/src/internal/operators/retryWhen":77769,"./current/node_modules/rxjs/src/internal/operators/retryWhen.ts":77769,"./current/node_modules/rxjs/src/internal/operators/sample":36635,"./current/node_modules/rxjs/src/internal/operators/sample.ts":36635,"./current/node_modules/rxjs/src/internal/operators/sampleTime":72768,"./current/node_modules/rxjs/src/internal/operators/sampleTime.ts":72768,"./current/node_modules/rxjs/src/internal/operators/scan":37528,"./current/node_modules/rxjs/src/internal/operators/scan.ts":37528,"./current/node_modules/rxjs/src/internal/operators/scanInternals":19541,"./current/node_modules/rxjs/src/internal/operators/scanInternals.ts":19541,"./current/node_modules/rxjs/src/internal/operators/sequenceEqual":2387,"./current/node_modules/rxjs/src/internal/operators/sequenceEqual.ts":2387,"./current/node_modules/rxjs/src/internal/operators/share":67424,"./current/node_modules/rxjs/src/internal/operators/share.ts":67424,"./current/node_modules/rxjs/src/internal/operators/shareReplay":25189,"./current/node_modules/rxjs/src/internal/operators/shareReplay.ts":25189,"./current/node_modules/rxjs/src/internal/operators/single":66646,"./current/node_modules/rxjs/src/internal/operators/single.ts":66646,"./current/node_modules/rxjs/src/internal/operators/skip":85270,"./current/node_modules/rxjs/src/internal/operators/skip.ts":85270,"./current/node_modules/rxjs/src/internal/operators/skipLast":82550,"./current/node_modules/rxjs/src/internal/operators/skipLast.ts":82550,"./current/node_modules/rxjs/src/internal/operators/skipUntil":25672,"./current/node_modules/rxjs/src/internal/operators/skipUntil.ts":25672,"./current/node_modules/rxjs/src/internal/operators/skipWhile":57974,"./current/node_modules/rxjs/src/internal/operators/skipWhile.ts":57974,"./current/node_modules/rxjs/src/internal/operators/startWith":80515,"./current/node_modules/rxjs/src/internal/operators/startWith.ts":80515,"./current/node_modules/rxjs/src/internal/operators/subscribeOn":91483,"./current/node_modules/rxjs/src/internal/operators/subscribeOn.ts":91483,"./current/node_modules/rxjs/src/internal/operators/switchAll":10615,"./current/node_modules/rxjs/src/internal/operators/switchAll.ts":10615,"./current/node_modules/rxjs/src/internal/operators/switchMap":50520,"./current/node_modules/rxjs/src/internal/operators/switchMap.ts":50520,"./current/node_modules/rxjs/src/internal/operators/switchMapTo":38846,"./current/node_modules/rxjs/src/internal/operators/switchMapTo.ts":38846,"./current/node_modules/rxjs/src/internal/operators/switchScan":78802,"./current/node_modules/rxjs/src/internal/operators/switchScan.ts":78802,"./current/node_modules/rxjs/src/internal/operators/take":8082,"./current/node_modules/rxjs/src/internal/operators/take.ts":8082,"./current/node_modules/rxjs/src/internal/operators/takeLast":60396,"./current/node_modules/rxjs/src/internal/operators/takeLast.ts":60396,"./current/node_modules/rxjs/src/internal/operators/takeUntil":84483,"./current/node_modules/rxjs/src/internal/operators/takeUntil.ts":84483,"./current/node_modules/rxjs/src/internal/operators/takeWhile":54440,"./current/node_modules/rxjs/src/internal/operators/takeWhile.ts":54440,"./current/node_modules/rxjs/src/internal/operators/tap":86108,"./current/node_modules/rxjs/src/internal/operators/tap.ts":86108,"./current/node_modules/rxjs/src/internal/operators/throttle":48494,"./current/node_modules/rxjs/src/internal/operators/throttle.ts":48494,"./current/node_modules/rxjs/src/internal/operators/throttleTime":56364,"./current/node_modules/rxjs/src/internal/operators/throttleTime.ts":56364,"./current/node_modules/rxjs/src/internal/operators/throwIfEmpty":14796,"./current/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts":14796,"./current/node_modules/rxjs/src/internal/operators/timeInterval":2372,"./current/node_modules/rxjs/src/internal/operators/timeInterval.ts":2372,"./current/node_modules/rxjs/src/internal/operators/timeout":45907,"./current/node_modules/rxjs/src/internal/operators/timeout.ts":45907,"./current/node_modules/rxjs/src/internal/operators/timeoutWith":68110,"./current/node_modules/rxjs/src/internal/operators/timeoutWith.ts":68110,"./current/node_modules/rxjs/src/internal/operators/timestamp":74740,"./current/node_modules/rxjs/src/internal/operators/timestamp.ts":74740,"./current/node_modules/rxjs/src/internal/operators/toArray":48249,"./current/node_modules/rxjs/src/internal/operators/toArray.ts":48249,"./current/node_modules/rxjs/src/internal/operators/window":48387,"./current/node_modules/rxjs/src/internal/operators/window.ts":48387,"./current/node_modules/rxjs/src/internal/operators/windowCount":5509,"./current/node_modules/rxjs/src/internal/operators/windowCount.ts":5509,"./current/node_modules/rxjs/src/internal/operators/windowTime":64999,"./current/node_modules/rxjs/src/internal/operators/windowTime.ts":64999,"./current/node_modules/rxjs/src/internal/operators/windowToggle":93742,"./current/node_modules/rxjs/src/internal/operators/windowToggle.ts":93742,"./current/node_modules/rxjs/src/internal/operators/windowWhen":71402,"./current/node_modules/rxjs/src/internal/operators/windowWhen.ts":71402,"./current/node_modules/rxjs/src/internal/operators/withLatestFrom":83254,"./current/node_modules/rxjs/src/internal/operators/withLatestFrom.ts":83254,"./current/node_modules/rxjs/src/internal/operators/zip":63671,"./current/node_modules/rxjs/src/internal/operators/zip.ts":63671,"./current/node_modules/rxjs/src/internal/operators/zipAll":54061,"./current/node_modules/rxjs/src/internal/operators/zipAll.ts":54061,"./current/node_modules/rxjs/src/internal/operators/zipWith":11412,"./current/node_modules/rxjs/src/internal/operators/zipWith.ts":11412,"./current/node_modules/rxjs/src/internal/scheduled/scheduleArray":76131,"./current/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts":76131,"./current/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable":32929,"./current/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts":32929,"./current/node_modules/rxjs/src/internal/scheduled/scheduleIterable":65077,"./current/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts":65077,"./current/node_modules/rxjs/src/internal/scheduled/scheduleObservable":62083,"./current/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts":62083,"./current/node_modules/rxjs/src/internal/scheduled/schedulePromise":3693,"./current/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts":3693,"./current/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike":94579,"./current/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts":94579,"./current/node_modules/rxjs/src/internal/scheduled/scheduled":81499,"./current/node_modules/rxjs/src/internal/scheduled/scheduled.ts":81499,"./current/node_modules/rxjs/src/internal/scheduler/Action":79366,"./current/node_modules/rxjs/src/internal/scheduler/Action.ts":79366,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction":59747,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts":59747,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler":9483,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts":9483,"./current/node_modules/rxjs/src/internal/scheduler/AsapAction":66423,"./current/node_modules/rxjs/src/internal/scheduler/AsapAction.ts":66423,"./current/node_modules/rxjs/src/internal/scheduler/AsapScheduler":23926,"./current/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts":23926,"./current/node_modules/rxjs/src/internal/scheduler/AsyncAction":61747,"./current/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts":61747,"./current/node_modules/rxjs/src/internal/scheduler/AsyncScheduler":3385,"./current/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts":3385,"./current/node_modules/rxjs/src/internal/scheduler/QueueAction":6775,"./current/node_modules/rxjs/src/internal/scheduler/QueueAction.ts":6775,"./current/node_modules/rxjs/src/internal/scheduler/QueueScheduler":91797,"./current/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts":91797,"./current/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler":49598,"./current/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts":49598,"./current/node_modules/rxjs/src/internal/scheduler/animationFrame":15183,"./current/node_modules/rxjs/src/internal/scheduler/animationFrame.ts":15183,"./current/node_modules/rxjs/src/internal/scheduler/animationFrameProvider":87744,"./current/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts":87744,"./current/node_modules/rxjs/src/internal/scheduler/asap":19890,"./current/node_modules/rxjs/src/internal/scheduler/asap.ts":19890,"./current/node_modules/rxjs/src/internal/scheduler/async":86544,"./current/node_modules/rxjs/src/internal/scheduler/async.ts":86544,"./current/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider":49494,"./current/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts":49494,"./current/node_modules/rxjs/src/internal/scheduler/immediateProvider":78581,"./current/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts":78581,"./current/node_modules/rxjs/src/internal/scheduler/intervalProvider":44650,"./current/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts":44650,"./current/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider":10578,"./current/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts":10578,"./current/node_modules/rxjs/src/internal/scheduler/queue":17511,"./current/node_modules/rxjs/src/internal/scheduler/queue.ts":17511,"./current/node_modules/rxjs/src/internal/scheduler/timeoutProvider":44926,"./current/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts":44926,"./current/node_modules/rxjs/src/internal/scheduler/timerHandle":3221,"./current/node_modules/rxjs/src/internal/scheduler/timerHandle.ts":3221,"./current/node_modules/rxjs/src/internal/symbol/iterator":19430,"./current/node_modules/rxjs/src/internal/symbol/iterator.ts":19430,"./current/node_modules/rxjs/src/internal/symbol/observable":77709,"./current/node_modules/rxjs/src/internal/symbol/observable.ts":77709,"./current/node_modules/rxjs/src/internal/testing/ColdObservable":73662,"./current/node_modules/rxjs/src/internal/testing/ColdObservable.ts":73662,"./current/node_modules/rxjs/src/internal/testing/HotObservable":93657,"./current/node_modules/rxjs/src/internal/testing/HotObservable.ts":93657,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLog":63759,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts":63759,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLoggable":57968,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts":57968,"./current/node_modules/rxjs/src/internal/testing/TestMessage":79642,"./current/node_modules/rxjs/src/internal/testing/TestMessage.ts":79642,"./current/node_modules/rxjs/src/internal/testing/TestScheduler":11810,"./current/node_modules/rxjs/src/internal/testing/TestScheduler.ts":11810,"./current/node_modules/rxjs/src/internal/types":71628,"./current/node_modules/rxjs/src/internal/types.ts":71628,"./current/node_modules/rxjs/src/internal/umd":89799,"./current/node_modules/rxjs/src/internal/umd.ts":89799,"./current/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError":3837,"./current/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts":3837,"./current/node_modules/rxjs/src/internal/util/EmptyError":84367,"./current/node_modules/rxjs/src/internal/util/EmptyError.ts":84367,"./current/node_modules/rxjs/src/internal/util/Immediate":89811,"./current/node_modules/rxjs/src/internal/util/Immediate.ts":89811,"./current/node_modules/rxjs/src/internal/util/NotFoundError":59086,"./current/node_modules/rxjs/src/internal/util/NotFoundError.ts":59086,"./current/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError":13471,"./current/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts":13471,"./current/node_modules/rxjs/src/internal/util/SequenceError":64389,"./current/node_modules/rxjs/src/internal/util/SequenceError.ts":64389,"./current/node_modules/rxjs/src/internal/util/UnsubscriptionError":80789,"./current/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts":80789,"./current/node_modules/rxjs/src/internal/util/applyMixins":44470,"./current/node_modules/rxjs/src/internal/util/applyMixins.ts":44470,"./current/node_modules/rxjs/src/internal/util/args":93096,"./current/node_modules/rxjs/src/internal/util/args.ts":93096,"./current/node_modules/rxjs/src/internal/util/argsArgArrayOrObject":34925,"./current/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts":34925,"./current/node_modules/rxjs/src/internal/util/argsOrArgArray":75465,"./current/node_modules/rxjs/src/internal/util/argsOrArgArray.ts":75465,"./current/node_modules/rxjs/src/internal/util/arrRemove":22478,"./current/node_modules/rxjs/src/internal/util/arrRemove.ts":22478,"./current/node_modules/rxjs/src/internal/util/createErrorClass":87302,"./current/node_modules/rxjs/src/internal/util/createErrorClass.ts":87302,"./current/node_modules/rxjs/src/internal/util/createObject":26867,"./current/node_modules/rxjs/src/internal/util/createObject.ts":26867,"./current/node_modules/rxjs/src/internal/util/errorContext":65493,"./current/node_modules/rxjs/src/internal/util/errorContext.ts":65493,"./current/node_modules/rxjs/src/internal/util/executeSchedule":48598,"./current/node_modules/rxjs/src/internal/util/executeSchedule.ts":48598,"./current/node_modules/rxjs/src/internal/util/identity":90838,"./current/node_modules/rxjs/src/internal/util/identity.ts":90838,"./current/node_modules/rxjs/src/internal/util/isArrayLike":52957,"./current/node_modules/rxjs/src/internal/util/isArrayLike.ts":52957,"./current/node_modules/rxjs/src/internal/util/isAsyncIterable":34204,"./current/node_modules/rxjs/src/internal/util/isAsyncIterable.ts":34204,"./current/node_modules/rxjs/src/internal/util/isDate":42299,"./current/node_modules/rxjs/src/internal/util/isDate.ts":42299,"./current/node_modules/rxjs/src/internal/util/isFunction":74641,"./current/node_modules/rxjs/src/internal/util/isFunction.ts":74641,"./current/node_modules/rxjs/src/internal/util/isInteropObservable":77449,"./current/node_modules/rxjs/src/internal/util/isInteropObservable.ts":77449,"./current/node_modules/rxjs/src/internal/util/isIterable":57065,"./current/node_modules/rxjs/src/internal/util/isIterable.ts":57065,"./current/node_modules/rxjs/src/internal/util/isObservable":59605,"./current/node_modules/rxjs/src/internal/util/isObservable.ts":59605,"./current/node_modules/rxjs/src/internal/util/isPromise":98840,"./current/node_modules/rxjs/src/internal/util/isPromise.ts":98840,"./current/node_modules/rxjs/src/internal/util/isReadableStreamLike":71940,"./current/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts":71940,"./current/node_modules/rxjs/src/internal/util/isScheduler":64687,"./current/node_modules/rxjs/src/internal/util/isScheduler.ts":64687,"./current/node_modules/rxjs/src/internal/util/lift":37233,"./current/node_modules/rxjs/src/internal/util/lift.ts":37233,"./current/node_modules/rxjs/src/internal/util/mapOneOrManyArgs":87367,"./current/node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts":87367,"./current/node_modules/rxjs/src/internal/util/noop":25045,"./current/node_modules/rxjs/src/internal/util/noop.ts":25045,"./current/node_modules/rxjs/src/internal/util/not":66340,"./current/node_modules/rxjs/src/internal/util/not.ts":66340,"./current/node_modules/rxjs/src/internal/util/pipe":96974,"./current/node_modules/rxjs/src/internal/util/pipe.ts":96974,"./current/node_modules/rxjs/src/internal/util/reportUnhandledError":75720,"./current/node_modules/rxjs/src/internal/util/reportUnhandledError.ts":75720,"./current/node_modules/rxjs/src/internal/util/subscribeToArray":13199,"./current/node_modules/rxjs/src/internal/util/subscribeToArray.ts":13199,"./current/node_modules/rxjs/src/internal/util/throwUnobservableError":14227,"./current/node_modules/rxjs/src/internal/util/throwUnobservableError.ts":14227,"./current/node_modules/rxjs/src/internal/util/workarounds":1167,"./current/node_modules/rxjs/src/internal/util/workarounds.ts":1167,"./current/node_modules/rxjs/src/operators":50403,"./current/node_modules/rxjs/src/operators/":50403,"./current/node_modules/rxjs/src/operators/index":50403,"./current/node_modules/rxjs/src/operators/index.ts":50403,"./current/node_modules/rxjs/src/testing":89057,"./current/node_modules/rxjs/src/testing/":89057,"./current/node_modules/rxjs/src/testing/index":89057,"./current/node_modules/rxjs/src/testing/index.ts":89057,"./current/node_modules/rxjs/src/tsconfig.base":20831,"./current/node_modules/rxjs/src/tsconfig.base.json":20831,"./current/node_modules/rxjs/src/tsconfig.cjs":96817,"./current/node_modules/rxjs/src/tsconfig.cjs.json":96817,"./current/node_modules/rxjs/src/tsconfig.cjs.spec":76120,"./current/node_modules/rxjs/src/tsconfig.cjs.spec.json":76120,"./current/node_modules/rxjs/src/tsconfig.esm":47601,"./current/node_modules/rxjs/src/tsconfig.esm.json":47601,"./current/node_modules/rxjs/src/tsconfig.esm5":35169,"./current/node_modules/rxjs/src/tsconfig.esm5.json":35169,"./current/node_modules/rxjs/src/tsconfig.esm5.rollup":96009,"./current/node_modules/rxjs/src/tsconfig.esm5.rollup.json":96009,"./current/node_modules/rxjs/src/tsconfig.types":25737,"./current/node_modules/rxjs/src/tsconfig.types.json":25737,"./current/node_modules/rxjs/src/tsconfig.types.spec":70084,"./current/node_modules/rxjs/src/tsconfig.types.spec.json":70084,"./current/node_modules/rxjs/src/webSocket":82652,"./current/node_modules/rxjs/src/webSocket/":82652,"./current/node_modules/rxjs/src/webSocket/index":82652,"./current/node_modules/rxjs/src/webSocket/index.ts":82652,"./current/src/create-a-connection":36033,"./current/src/create-a-connection.ts":36033,"./current/src/issue-anoncreds-credential-didcomm":76250,"./current/src/issue-anoncreds-credential-didcomm.ts":76250,"./current/src/mediation-recipient":98249,"./current/src/mediation-recipient.ts":98249,"./current/src/mediator-setup":71676,"./current/src/mediator-setup.ts":71676,"./current/src/register-schema-and-cred-def":71104,"./current/src/register-schema-and-cred-def.ts":71104,"./current/src/sd-jwt-vc-openid4vc":50723,"./current/src/sd-jwt-vc-openid4vc.ts":50723,"./current/src/set-up":52537,"./current/src/set-up-anoncreds":10902,"./current/src/set-up-anoncreds-rn":8182,"./current/src/set-up-anoncreds-rn.ts":8182,"./current/src/set-up-anoncreds.ts":10902,"./current/src/set-up-askar":50531,"./current/src/set-up-askar-rn":93106,"./current/src/set-up-askar-rn.ts":93106,"./current/src/set-up-askar.ts":50531,"./current/src/set-up-cheqd":31638,"./current/src/set-up-cheqd.ts":31638,"./current/src/set-up-indy-vdr":55453,"./current/src/set-up-indy-vdr-config":84613,"./current/src/set-up-indy-vdr-config.ts":84613,"./current/src/set-up-indy-vdr-rn":73995,"./current/src/set-up-indy-vdr-rn.ts":73995,"./current/src/set-up-indy-vdr.ts":55453,"./current/src/set-up-openid4vc-holder":38461,"./current/src/set-up-openid4vc-holder.ts":38461,"./current/src/set-up-openid4vc-issuer-verifier":38340,"./current/src/set-up-openid4vc-issuer-verifier.ts":38340,"./current/src/set-up-rn":1308,"./current/src/set-up-rn.ts":1308,"./current/src/set-up.ts":52537};function o(e){var n=s(e);return r(n)}function s(e){if(!r.o(t,e)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return t[e]}o.keys=function(){return Object.keys(t)},o.resolve=s,e.exports=o,o.id=32502}}]); \ No newline at end of file diff --git a/assets/js/1f391b9e.6198c9fd.js b/assets/js/1f391b9e.6198c9fd.js new file mode 100644 index 0000000..5b9435d --- /dev/null +++ b/assets/js/1f391b9e.6198c9fd.js @@ -0,0 +1 @@ +(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[3085,7918],{14247:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>u});var t=r(67294),o=r(86010),s=r(1944),i=r(35281),a=r(67003),d=r(65881),c=r(39407);const l={mdxPageWrapper:"mdxPageWrapper_j9I6"};function u(e){const{content:n}=e,{metadata:{title:r,description:u,frontMatter:m}}=n,{wrapperClassName:p,hide_table_of_contents:g}=m;return t.createElement(s.FG,{className:(0,o.Z)(p??i.k.wrapper.mdxPages,i.k.page.mdxPage)},t.createElement(s.d,{title:r,description:u}),t.createElement(a.Z,null,t.createElement("main",{className:"container container--fluid margin-vert--lg"},t.createElement("div",{className:(0,o.Z)("row",l.mdxPageWrapper)},t.createElement("div",{className:(0,o.Z)("col",!g&&"col--8")},t.createElement("article",null,t.createElement(d.Z,null,t.createElement(n,null)))),!g&&n.toc.length>0&&t.createElement("div",{className:"col col--2"},t.createElement(c.Z,{toc:n.toc,minHeadingLevel:m.toc_min_heading_level,maxHeadingLevel:m.toc_max_heading_level}))))))}},47083:(e,n,r)=>{"use strict";r.d(n,{Z:()=>u});var t=r(67294),o=r(86010),s=r(35281),i=r(95999);const a={admonition:"admonition_WoCw",admonitionHeading:"admonitionHeading_TMsN",admonitionIcon:"admonitionIcon_Ibzs",admonitionContent:"admonitionContent_vXIg"};const d={note:{infimaClassName:"secondary",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 14 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 12 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 12 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 14 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 16 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")},holder:{infimaClassName:"holder",emoji:"\ud83d\uddc4",label:t.createElement(i.Z,{id:"theme.admonition.holder",description:"The default label used for the Caution admonition (:::holder)"},"holder")},issuer:{infimaClassName:"issuer",emoji:"\ud83d\udcc4",label:t.createElement(i.Z,{id:"theme.admonition.issuer",description:"The default label used for the Caution admonition (:::issuer)"},"issuer")},verifier:{infimaClassName:"verifier",emoji:"\ud83d\udc6e",label:t.createElement(i.Z,{id:"theme.admonition.verifier",description:"The default label used for the Verifier admonition (:::verifier)"},"verifier")},bob:{infimaClassName:"bob",emoji:"\ud83e\uddd4",label:t.createElement(i.Z,{id:"theme.admonition.bob",description:"The default label used for the Bob admonition (:::bob)"},"bob")},acme:{infimaClassName:"acme",emoji:"\ud83c\udfe2",label:t.createElement(i.Z,{id:"theme.admonition.acme",description:"The default label used for the acme admonition (:::acme)"},"acme")}},c={secondary:"note",important:"info",success:"tip",warning:"danger"};function l(e){const{mdxAdmonitionTitle:n,rest:r}=function(e){const n=t.Children.toArray(e),r=n.find((e=>t.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),o=t.createElement(t.Fragment,null,n.filter((e=>e!==r)));return{mdxAdmonitionTitle:r,rest:o}}(e.children);return{...e,title:e.title??n,children:r}}function u(e){const{children:n,type:r,title:i,icon:u}=l(e),m=function(e){const n=c[e]??e,r=d[n];return r||(console.warn(`No admonition config found for admonition type "${n}". Using Info as fallback.`),d.info)}(r),p=i??m.label,{iconComponent:g,emoji:f}=m,h=u??f??t.createElement(g,null);return t.createElement("div",{className:(0,o.Z)(s.k.common.admonition,s.k.common.admonitionType(e.type),"alert",`alert--${m.infimaClassName}`,`admonition-${m.infimaClassName}`,a.admonition)},t.createElement("div",{className:a.admonitionHeading},t.createElement("span",{className:a.admonitionIcon},h),p),t.createElement("div",{className:a.admonitionContent},n))}},71415:(e,n,r)=>{"use strict";r.d(n,{Z:()=>s});var t=r(67294),o=r(78397);function s(e){return t.createElement(t.Fragment,null,t.createElement(o.Z,e))}},18573:(e,n,r)=>{"use strict";r.d(n,{Z:()=>p});var t=r(87462),o=r(67294),s=r(72389),i=r(81170),a=r(72138),d=r(74477);const c=e=>e.split(" ").find((e=>e.match(/^section-/)))?.substr(8),l=(e,n)=>{const r=`start-section-${e}`,t=`end-section-${e}`,o=n.split("\n"),s=o.indexOf(o.find((e=>e.includes(r)))),i=o.indexOf(o.find((e=>e.includes(t))));return o.slice(s+1,i).join("\r\n")},u=e=>e.split(" ").find((e=>e.match(/.(js|ts)$/))),m=e=>e.split("\n").filter((e=>!e.match(/section-/))).join("\r\n");function p(e){let{children:n,...p}=e;const g=(0,s.Z)(),f=(0,d.E)(),h=function(e){return o.Children.toArray(e).some((e=>(0,o.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(n),y=f.version,b="string"==typeof h?a.Z:i.Z;if(!p.metastring)return o.createElement(b,(0,t.Z)({key:String(g)},p),h);let w;try{w=r(32502)(`./${y}/src/${u(p.metastring)}`).default}catch{}const v=c(p.metastring);let x;return w&&(x=v?l(v,w):m(w)),o.createElement(b,(0,t.Z)({key:String(g)},p),x||h)}},77058:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n autoAcceptConnections: true,\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},92151:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n InitConfig,\n Agent,\n WsOutboundTransport,\n HttpOutboundTransport,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n DidExchangeState,\n AutoAcceptCredential,\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n OutOfBandRecord,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { Schema } from 'indy-sdk'\nimport fetch from 'node-fetch'\n\nconst getGenesisTransaction = async (url: string) => {\n // Legacy code has a small issue with the call-signature from node-fetch\n // @ts-ignore\n const response = await fetch(url)\n\n return await response.text()\n}\n\n// start-section-1\nconst initializeHolderAgent = async () => {\n const genesisTransactionsBCovrinTestNet = await getGenesisTransaction('http://test.bcovrin.vonx.io/genesis')\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-holder',\n walletConfig: {\n id: 'demo-agent-holder',\n key: 'demoagentholder00000000000000000',\n },\n indyLedgers: [\n {\n id: 'bcovrin-test-net',\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: genesisTransactionsBCovrinTestNet,\n },\n ],\n autoAcceptCredentials: AutoAcceptCredential.ContentApproved,\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3002'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeIssuerAgent = async () => {\n const genesisTransactionsBCovrinTestNet = await getGenesisTransaction('http://test.bcovrin.vonx.io/genesis')\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-issuer',\n walletConfig: {\n id: 'demo-agent-issuer',\n key: 'demoagentissuer00000000000000000',\n },\n publicDidSeed: 'demoissuerdidseed000000000000000',\n indyLedgers: [\n {\n id: 'bcovrin-test-net',\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: genesisTransactionsBCovrinTestNet,\n },\n ],\n autoAcceptCredentials: AutoAcceptCredential.ContentApproved,\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst registerSchema = async (issuer: Agent) =>\n issuer.ledger.registerSchema({ attributes: ['name', 'age'], name: 'Identity', version: '1.0' })\n// end-section-3\n\n// start-section-4\nconst registerCredentialDefinition = async (issuer: Agent, schema: Schema) =>\n issuer.ledger.registerCredentialDefinition({ schema, supportRevocation: false, tag: 'default' })\n// end-section-4\n\n// start-section-5\nconst setupCredentialListener = (holder: Agent) => {\n holder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n })\n}\n// end-section-5\n\n// start-section-6\nconst issueCredential = async (issuer: Agent, credentialDefinitionId: string, connectionId: string) =>\n issuer.credentials.offerCredential({\n protocolVersion: 'v1',\n connectionId,\n credentialFormats: {\n indy: {\n credentialDefinitionId,\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n })\n// end-section-6\n\nconst createNewInvitation = async (issuer: Agent) => {\n const outOfBandRecord = await issuer.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n\nconst receiveInvitation = async (holder: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await holder.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n\nconst setupConnectionListener = (\n issuer: Agent,\n outOfBandRecord: OutOfBandRecord,\n cb: (...args: any) => Promise\n) => {\n issuer.events.on(ConnectionEventTypes.ConnectionStateChanged, async ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n await cb(payload.connectionRecord.id)\n }\n })\n}\n\nconst flow = (issuer: Agent) => async (connectionId: string) => {\n console.log('Registering the schema...')\n const schema = await registerSchema(issuer)\n console.log('Registering the credential definition...')\n const credentialDefinition = await registerCredentialDefinition(issuer, schema)\n console.log('Issuing the credential...')\n await issueCredential(issuer, credentialDefinition.id, connectionId)\n}\n\nconst run = async () => {\n console.log('Initializing the holder...')\n const holder = await initializeHolderAgent()\n console.log('Initializing the issuer...')\n const issuer = await initializeIssuerAgent()\n\n console.log('Initializing the credential listener...')\n setupCredentialListener(holder)\n\n console.log('Initializing the connection...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(issuer)\n setupConnectionListener(issuer, outOfBandRecord, flow(issuer))\n await receiveInvitation(holder, invitationUrl)\n}\n\nvoid run()\n"},3288:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\nimport { Agent, HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\n\n// start-section-1\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({ config, dependencies: agentDependencies })\n// end-section-1\n\n// start-section-2\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// start-section-3\nconst run = async () => {\n try {\n await agent.initialize()\n } catch (e) {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n }\n}\n// end-section-3\n\nvoid run()\n"},60420:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\nimport { Agent, HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\n\n// start-section-1\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({ config, dependencies: agentDependencies })\n// end-section-1\n\n// start-section-2\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nconst run = async () => {\n try {\n await agent.initialize()\n } catch (e) {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n }\n}\n// end-section-3\n\nvoid run()\n"},45343:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { AskarModule } from '@aries-framework/askar'\nimport {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n ConnectionsModule,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n }\n\n // A new instance of an agent is created here\n // Askar can also be replaced by the indy-sdk if required\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n // Askar can also be replaced by the indy-sdk if required\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},7283:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n DidsModule,\n HttpOutboundTransport,\n InitConfig,\n WsOutboundTransport,\n Agent,\n CredentialsModule,\n V2CredentialProtocol,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport {\n AnonCredsCredentialFormatService,\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n} from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst issuerConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-issuer',\n walletConfig: {\n id: 'wallet-id-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-holder',\n walletConfig: {\n id: 'wallet-id-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nissuer.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nissuer.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nissuer.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-1\n\n// start-section-2\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nholder.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nholder.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nholder.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-2\n\n// start-section-3\nholder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n})\n// end-section-3\n\n// start-section-4\nconst indyCredentialExchangeRecord = await issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n indy: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-4\n\n// start-section-5\nconst anonCredsCredentialExchangeRecord = issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-5\n"},8276:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n ConsoleLogger,\n HttpOutboundTransport,\n InitConfig,\n LogLevel,\n MediationRecipientModule,\n WsOutboundTransport,\n} from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport { agentDependencies } from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// start-section-1\nconst name = 'alice'\n\n// paste your invitation url here\n// or use the current invitation-url to connect to the public animo-mediator.\nconst mediatorInvitationUrl =\n 'https://mediator.dev.animo.id/invite?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIyMDc1MDM4YS05ZGU3LTRiODItYWUxYi1jNzBmNDg4MjYzYTciLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vbWVkaWF0b3IuZGV2LmFuaW1vLmlkIiwidHlwZSI6ImRpZC1jb21tdW5pY2F0aW9uIiwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtvSG9RTUphdU5VUE5OV1pQcEw3RGs1SzNtQ0NDMlBpNDJGY3FwR25iampMcSJdLCJyb3V0aW5nS2V5cyI6W119LHsiaWQiOiIjaW5saW5lLTEiLCJzZXJ2aWNlRW5kcG9pbnQiOiJ3c3M6Ly9tZWRpYXRvci5kZXYuYW5pbW8uaWQiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa29Ib1FNSmF1TlVQTk5XWlBwTDdEazVLM21DQ0MyUGk0MkZjcXBHbmJqakxxIl0sInJvdXRpbmdLZXlzIjpbXX1dfQ'\n\nconst agentConfig: InitConfig = {\n label: `Aries Framework JavaScript ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n logger: new ConsoleLogger(LogLevel.trace),\n}\n\nconst alice = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n mediationRecipient: new MediationRecipientModule({\n mediatorInvitationUrl,\n }),\n indySdk: new IndySdkModule({ indySdk }),\n },\n})\n\nalice.registerOutboundTransport(new HttpOutboundTransport())\nalice.registerOutboundTransport(new WsOutboundTransport())\n\nawait alice.initialize()\n// end-section-1\n"},50768:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n ConnectionsModule,\n HttpOutboundTransport,\n InitConfig,\n MediationStateChangedEvent,\n MediatorModule,\n RoutingEventTypes,\n} from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport { HttpInboundTransport, agentDependencies } from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// start-section-1\nconst name = 'mediator'\nconst port = 3001\n\nconst agentConfig: InitConfig = {\n label: `Aries Framework JavaScript ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n endpoints: [`http://localhost:${port}`],\n}\n\nconst mediator = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({ indySdk }),\n mediator: new MediatorModule({\n autoAcceptMediationRequests: true,\n }),\n connections: new ConnectionsModule({\n autoAcceptConnections: true,\n }),\n },\n})\n\nmediator.registerOutboundTransport(new HttpOutboundTransport())\nmediator.registerInboundTransport(new HttpInboundTransport({ port }))\n\nawait mediator.initialize()\nconst mediatorOutOfBandRecord = await mediator.oob.createInvitation({ multiUseInvitation: true })\n\nconst mediatiorInvitationUrl = mediatorOutOfBandRecord.outOfBandInvitation.toUrl({\n domain: `http://localhost:${port}`,\n})\nconsole.log(mediatiorInvitationUrl)\n// end-section-1\n\nmediator.events\n .observable(RoutingEventTypes.MediationStateChanged)\n .subscribe(({ payload }) => {\n console.log(`${name} mediation state: ${payload.mediationRecord.state}`)\n })\n"},62055:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { DidsModule, InitConfig, KeyType, LogLevel, TypedArrayEncoder } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs-register-schema-and-cred-def',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n} from '@aries-framework/cheqd'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // We do this to have access to a wallet\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()],\n }),\n },\n})\n// end-section-1\n\n// start-section-2\nconst seed = TypedArrayEncoder.fromString(``) // What you input on bcovrin. Should be kept secure in production!\nconst unqualifiedIndyDid = `` // will be returned after registering seed on bcovrin\nconst indyDid = `did:indy:bcovrin:test:${unqualifiedIndyDid}`\n\nconst cheqdDid = await agent.dids.create({\n method: 'cheqd',\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n\nawait agent.dids.import({\n did: '',\n overwrite: true,\n privateKeys: [\n {\n privateKey: seed,\n keyType: KeyType.Ed25519,\n },\n ],\n})\n// end-section-2\n\n// start-section-3\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: '',\n name: 'Example Schema to register',\n version: '1.0.0',\n },\n options: {},\n})\n\nif (schemaResult.schemaState.state === 'failed') {\n throw new Error(`Error creating schema: ${schemaResult.schemaState.reason}`)\n}\n// end-section-3\n\n// start-section-4\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n tag: 'default',\n issuerId: '',\n schemaId: schemaResult.schemaState.schemaId,\n },\n options: {},\n})\n\nif (credentialDefinitionResult.credentialDefinitionState.state === 'failed') {\n throw new Error(\n `Error creating credential definition: ${credentialDefinitionResult.credentialDefinitionState.reason}`\n )\n}\n// end-section-4\n"},96596:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},13099:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},78757:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},93716:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},12107:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { DidDocumentService, InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent, DidsModule, KeyType, DidDocument } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n CheqdDidCreateOptions,\n} from '@aries-framework/cheqd'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n dids: new DidsModule({\n registrars: [new CheqdDidRegistrar()],\n resolvers: [new CheqdDidResolver()],\n }),\n\n // AnonCreds\n anoncreds: new AnonCredsModule({\n registries: [new CheqdAnonCredsRegistry()],\n }),\n\n // Add cheqd module\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n\n// start-section-2\n\n// create a key pair\nconst key = await agent.wallet.createKey({\n keyType: KeyType.Ed25519,\n})\n\n// encode public key according to the verification method\nconst ed25519PublicKeyBase58 = key.publicKeyBase58\n\n// Create a DID\nawait agent.dids.create({\n method: 'cheqd',\n secret: {},\n options: {\n network: 'testnet',\n },\n didDocument: new DidDocument({\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n controller: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1',\n type: 'Ed25519VerificationKey2018',\n controller: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n publicKeyBase58: ed25519PublicKeyBase58,\n },\n ],\n authentication: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1'],\n }),\n})\n// end-section-2\n\n// start-section-3\nawait agent.dids.create({\n method: 'cheqd',\n // the secret contains a the verification method type and id\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n // an optional methodSpecificIdAlgo parameter\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n// end-section-3\n\n// start-section-4\nawait agent.dids.update({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // Updates DID Document with an additional verification method if provided\n secret: {\n verificationMethod: {\n id: 'key-2',\n type: 'JsonWebKey2020',\n },\n },\n didDocument: {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n controller: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1',\n type: 'Ed25519VerificationKey2020',\n controller: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n publicKeyMultibase: 'z6MknkzLUEP5cxqqsaysNMWoh8NJRb3YsowTCj2D6yhwyEdj',\n },\n ],\n authentication: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1'],\n // updates did document with a service block\n service: [\n new DidDocumentService({\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#rand',\n type: 'rand',\n serviceEndpoint: 'https://rand.in',\n }),\n ],\n },\n})\n// end-section-4\n\n// start-section-5\nawait agent.dids.deactivate({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // an optional versionId parameter\n options: {\n versionId: '3.0',\n },\n})\n// end-section-5\n"},84056:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport { Agent, InitConfig } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport {\n agentDependencies,\n IndySdkPostgresStorageConfig,\n loadIndySdkPostgresPlugin,\n IndySdkPostgresWalletScheme,\n} from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// IndySdkPostgresStorageConfig defines interface for the Postgres plugin configuration.\nconst storageConfig = {\n type: 'postgres_storage',\n config: {\n url: 'localhost:5432',\n wallet_scheme: IndySdkPostgresWalletScheme.DatabasePerWallet,\n },\n credentials: {\n account: 'postgres',\n password: 'postgres',\n admin_account: 'postgres',\n admin_password: 'postgres',\n },\n} satisfies IndySdkPostgresStorageConfig\n\n// load the postgres wallet plugin before agent initialization\nloadIndySdkPostgresPlugin(storageConfig.config, storageConfig.credentials)\n\nconst agentConfig: InitConfig = {\n label: 'My Agent',\n // walletConfig.id and walletConfig.key are still required\n walletConfig: {\n id: 'walletId',\n key: 'testKey0000000000000000000000000',\n // storage is added and defines the postgres plugin configuration\n storage: storageConfig,\n },\n}\n\nconst agent = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n"},51002:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport indySdk from 'indy-sdk-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Indy SDK module on the agent\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},12863:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Indy SDK module on the agent\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n\nawait agent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},99031:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { IndyVdrModule } from '@aries-framework/indy-vdr'\n\nconst modules = {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n indyNamespace: 'bcovrin:test',\n isProduction: false,\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n}\n// end-section-1\n"},44279:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-react-native'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},54437:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},46121:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@aries-framework/core'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// TODO: we probably want to make this more specific to React Native,\n// so using it in a components and recommending to use the react hooks\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},61031:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@aries-framework/core'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { HttpInboundTransport } from '@aries-framework/node'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},36033:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { AskarModule } from '@credo-ts/askar'\nimport {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n ConnectionsModule,\n} from '@credo-ts/core'\nimport { agentDependencies, HttpInboundTransport } from '@credo-ts/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},76250:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n DidsModule,\n HttpOutboundTransport,\n InitConfig,\n WsOutboundTransport,\n Agent,\n CredentialsModule,\n V2CredentialProtocol,\n} from '@credo-ts/core'\nimport { agentDependencies, HttpInboundTransport } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport {\n AnonCredsCredentialFormatService,\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n} from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst issuerConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-issuer',\n walletConfig: {\n id: 'wallet-id-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-holder',\n walletConfig: {\n id: 'wallet-id-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nissuer.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nissuer.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nissuer.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-1\n\n// start-section-2\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nholder.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nholder.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nholder.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-2\n\n// start-section-3\nholder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n break\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n})\n// end-section-3\n\n// start-section-4\nconst indyCredentialExchangeRecord = await issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n indy: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-4\n\n// start-section-5\nconst anonCredsCredentialExchangeRecord = issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-5\n"},98249:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n ConsoleLogger,\n HttpOutboundTransport,\n InitConfig,\n LogLevel,\n MediationRecipientModule,\n WsOutboundTransport,\n} from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport { agentDependencies } from '@credo-ts/node'\n\n// start-section-1\nconst name = 'alice'\n\n// paste your invitation url here\n// or use the current invitation-url to connect to the public animo-mediator.\nconst mediatorInvitationUrl =\n 'https://mediator.dev.animo.id/invite?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIyMDc1MDM4YS05ZGU3LTRiODItYWUxYi1jNzBmNDg4MjYzYTciLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vbWVkaWF0b3IuZGV2LmFuaW1vLmlkIiwidHlwZSI6ImRpZC1jb21tdW5pY2F0aW9uIiwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtvSG9RTUphdU5VUE5OV1pQcEw3RGs1SzNtQ0NDMlBpNDJGY3FwR25iampMcSJdLCJyb3V0aW5nS2V5cyI6W119LHsiaWQiOiIjaW5saW5lLTEiLCJzZXJ2aWNlRW5kcG9pbnQiOiJ3c3M6Ly9tZWRpYXRvci5kZXYuYW5pbW8uaWQiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa29Ib1FNSmF1TlVQTk5XWlBwTDdEazVLM21DQ0MyUGk0MkZjcXBHbmJqakxxIl0sInJvdXRpbmdLZXlzIjpbXX1dfQ'\n\nconst agentConfig: InitConfig = {\n label: `Credo ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n logger: new ConsoleLogger(LogLevel.trace),\n}\n\nconst alice = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n mediationRecipient: new MediationRecipientModule({\n mediatorInvitationUrl,\n }),\n askar: new AskarModule({ ariesAskar }),\n },\n})\n\nalice.registerOutboundTransport(new HttpOutboundTransport())\nalice.registerOutboundTransport(new WsOutboundTransport())\n\nawait alice.initialize()\n// end-section-1\n"},71676:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import {\n Agent,\n ConnectionsModule,\n HttpOutboundTransport,\n InitConfig,\n MediationStateChangedEvent,\n MediatorModule,\n RoutingEventTypes,\n} from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport { HttpInboundTransport, agentDependencies } from '@credo-ts/node'\n\n// start-section-1\nconst name = 'mediator'\nconst port = 3001\n\nconst agentConfig: InitConfig = {\n label: `Credo ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n endpoints: [`http://localhost:${port}`],\n}\n\nconst mediator = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n mediator: new MediatorModule({\n autoAcceptMediationRequests: true,\n }),\n connections: new ConnectionsModule({\n autoAcceptConnections: true,\n }),\n },\n})\n\nmediator.registerOutboundTransport(new HttpOutboundTransport())\nmediator.registerInboundTransport(new HttpInboundTransport({ port }))\n\nawait mediator.initialize()\nconst mediatorOutOfBandRecord = await mediator.oob.createInvitation({ multiUseInvitation: true })\n\nconst mediatiorInvitationUrl = mediatorOutOfBandRecord.outOfBandInvitation.toUrl({\n domain: `http://localhost:${port}`,\n})\nconsole.log(mediatiorInvitationUrl)\n// end-section-1\n\nmediator.events\n .observable(RoutingEventTypes.MediationStateChanged)\n .subscribe(({ payload }) => {\n console.log(`${name} mediation state: ${payload.mediationRecord.state}`)\n })\n"},71104:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { DidsModule, InitConfig, KeyType, TypedArrayEncoder } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs-register-schema-and-cred-def',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n} from '@credo-ts/cheqd'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // We do this to have access to a wallet\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()],\n }),\n },\n})\n// end-section-1\n\n// start-section-2\nconst seed = TypedArrayEncoder.fromString(``) // What you input on bcovrin. Should be kept secure in production!\nconst unqualifiedIndyDid = `` // will be returned after registering seed on bcovrin\nconst indyDid = `did:indy:bcovrin:test:${unqualifiedIndyDid}`\n\nconst cheqdDid = await agent.dids.create({\n method: 'cheqd',\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n\nawait agent.dids.import({\n did: '',\n overwrite: true,\n privateKeys: [\n {\n privateKey: seed,\n keyType: KeyType.Ed25519,\n },\n ],\n})\n// end-section-2\n\n// start-section-3\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: '',\n name: 'Example Schema to register',\n version: '1.0.0',\n },\n options: {},\n})\n\nif (schemaResult.schemaState.state === 'failed') {\n throw new Error(`Error creating schema: ${schemaResult.schemaState.reason}`)\n}\n// end-section-3\n\n// start-section-4\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n tag: 'default',\n issuerId: '',\n schemaId: schemaResult.schemaState.schemaId,\n },\n options: {\n supportRevocation: false,\n },\n})\n\nif (credentialDefinitionResult.credentialDefinitionState.state === 'failed') {\n throw new Error(\n `Error creating credential definition: ${credentialDefinitionResult.credentialDefinitionState.reason}`\n )\n}\n// end-section-4\n"},50723:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig, SdJwtVcRecord, W3cCredentialRecord } from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\n\nconst issuerConfig: InitConfig = {\n label: 'openid4vc-issuer',\n walletConfig: {\n id: 'openid4vc-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'openid4vc-holder',\n walletConfig: {\n id: 'openid4vc-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-4\nimport {\n OpenId4VcIssuanceSessionStateChangedEvent,\n OpenId4VcIssuerEvents,\n OpenId4VcVerificationSessionState,\n OpenId4VcVerificationSessionStateChangedEvent,\n OpenId4VcVerifierEvents,\n OpenId4VciCredentialFormatProfile,\n OpenId4VciCredentialRequestToCredentialMapper,\n} from '@credo-ts/openid4vc'\n\nconst credentialRequestToCredentialMapper: OpenId4VciCredentialRequestToCredentialMapper = async ({\n // agent context for the current wallet / tenant\n agentContext,\n // the credential offer related to the credential request\n credentialOffer,\n // the received credential request\n credentialRequest,\n // the list of credentialsSupported entries\n credentialsSupported,\n // the cryptographic binding provided by the holder in the credential request proof\n holderBinding,\n // the issuance session associated with the credential request and offer\n issuanceSession,\n}) => {\n const firstSupported = credentialsSupported[0]\n\n // We only support vc+sd-jwt in this example, but you can add more formats\n if (firstSupported.format !== OpenId4VciCredentialFormatProfile.SdJwtVc) {\n throw new Error('Only vc+sd-jwt is supported')\n }\n\n // We only support AcmeCorpEmployee in this example, but you can support any type\n if (firstSupported.vct !== 'AcmeCorpEmployee') {\n throw new Error('Only AcmeCorpEmployee is supported')\n }\n\n // find the first did:key did in our wallet. You can modify this based on your needs\n const didsApi = agentContext.dependencyManager.resolve(DidsApi)\n const [didKeyDidRecord] = await didsApi.getCreatedDids({\n method: 'key',\n })\n\n const didKey = DidKey.fromDid(didKeyDidRecord.did)\n const didUrl = `${didKey.did}#${didKey.key.fingerprint}`\n\n return {\n credentialSupportedId: firstSupported.id,\n format: 'vc+sd-jwt',\n // We can provide the holderBinding as is, if we don't want to make changes\n holder: holderBinding,\n payload: {\n vct: firstSupported.vct,\n firstName: 'John',\n lastName: 'Doe',\n },\n disclosureFrame: {\n _sd: ['lastName'],\n },\n issuer: {\n method: 'did',\n didUrl,\n },\n }\n}\n\n// end-section-4\n\n// start-section-1\nimport { Agent, DidsApi, DifPresentationExchangeService, KeyType } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport express, { Router } from 'express'\nimport { OpenId4VcIssuerModule, OpenId4VcVerifierModule } from '@credo-ts/openid4vc'\n\n// Create two express routers, all endpoints for the\n// issuer and verifier will be added to these routers\nconst verifierRouter = Router()\nconst issuerRouter = Router()\n\n// Register the routers on the express server. The path should match\n// with the baseUrl you configure in the modules below.\nconst app = express()\napp.use('/oid4vci', issuerRouter)\napp.use('/siop', verifierRouter)\n\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n openId4VcIssuer: new OpenId4VcIssuerModule({\n baseUrl: 'http://127.0.0.1:3000/oid4vci',\n\n // If no router is passed, one will be created.\n // you still have to register the router on your express server\n // but you can access it on agent.modules.openId4VcIssuer.config.router\n // It works the same for verifier: agent.modules.openId4VcVerifier.config.router\n router: issuerRouter,\n\n // Each of the endpoints can have configuration associated with it, such as the\n // path (under the baseUrl) to use for the endpoints.\n endpoints: {\n // The credentialRequestToCredentialMapper is the only required endpoint\n // configuration that must be provided. This method is called whenever a\n // credential request has been received for an offer we created. The callback should\n // return the issued credential to return in the credential response to the holder.\n credential: {\n credentialRequestToCredentialMapper,\n },\n },\n }),\n\n // the base URL of the verifier, the router\n openId4VcVerifier: new OpenId4VcVerifierModule({\n baseUrl: 'http://127.0.0.1:3000/siop',\n\n router: verifierRouter,\n }),\n },\n})\n\n// listen on port 3000 for the openid4vc app\napp.listen(3000)\n// end-section-1\n\nawait issuer\n .initialize()\n .then(() => {\n console.log('Issuer agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the issuer agent! Message: ${e}`)\n })\n\n// we use the same agent for the verifier, but the tutorial uses verifier.xxx\nconst verifier = issuer\n\n// start-section-2\nimport { JwaSignatureAlgorithm } from '@credo-ts/core'\n\n// Create an issuer with one supported credential: AcmeCorpEmployee\nconst openid4vcIssuer = await issuer.modules.openId4VcIssuer.createIssuer({\n display: [\n {\n name: 'ACME Corp.',\n description: 'ACME Corp. is a company that provides the best services.',\n text_color: '#000000',\n background_color: '#FFFFFF',\n logo: {\n url: 'https://acme.com/logo.png',\n alt_text: 'ACME Corp. logo',\n },\n },\n ],\n credentialsSupported: [\n {\n format: 'vc+sd-jwt',\n vct: 'AcmeCorpEmployee',\n id: 'AcmeCorpEmployee',\n cryptographic_binding_methods_supported: ['did:key'],\n cryptographic_suites_supported: [JwaSignatureAlgorithm.ES256],\n },\n ],\n})\n\n// Create a did:key that we will use for issuance\nconst issuerDidResult = await issuer.dids.create({\n method: 'key',\n options: {\n keyType: KeyType.Ed25519,\n },\n})\n\nif (issuerDidResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n}\n// end-section-2\n\n// start-section-3\nconst { credentialOffer, issuanceSession } = await issuer.modules.openId4VcIssuer.createCredentialOffer({\n issuerId: openid4vcIssuer.issuerId,\n // values must match the `id` of the credential supported by the issuer\n offeredCredentials: ['AcmeCorpEmployee'],\n\n // Only pre-authorized code flow is supported\n preAuthorizedCodeFlowConfig: {\n userPinRequired: false,\n },\n\n // You can store any metadata about the issuance here\n issuanceMetadata: {\n someKey: 'someValue',\n },\n})\n\n// Listen and react to changes in the issuance session\nissuer.events.on(\n OpenId4VcIssuerEvents.IssuanceSessionStateChanged,\n (event) => {\n if (event.payload.issuanceSession.id === issuanceSession.id) {\n console.log('Issuance session state changed to ', event.payload.issuanceSession.state)\n }\n }\n)\n// end-section-3\n\n// start-section-5\nimport { OpenId4VcHolderModule } from '@credo-ts/openid4vc'\n\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n\n // no configuration required for holder module\n openId4VcHolderModule: new OpenId4VcHolderModule(),\n },\n})\n// end-section-5\n\nawait holder\n .initialize()\n .then(() => {\n console.log('Holder agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the holder agent! Message: ${e}`)\n })\n\n// start-section-6\nimport { KeyDidCreateOptions, getJwkFromKey, DidKey } from '@credo-ts/core'\n\n// resolved credential offer contains the offer, metadata, etc..\nconst resolvedCredentialOffer = await holder.modules.openId4VcHolderModule.resolveCredentialOffer(credentialOffer)\nconsole.log('Resolved credential offer', JSON.stringify(resolvedCredentialOffer.credentialOfferPayload, null, 2))\n\n// issuer only supports pre-authorized flow for now\nconst credentials = await holder.modules.openId4VcHolderModule.acceptCredentialOfferUsingPreAuthorizedCode(\n resolvedCredentialOffer,\n {\n credentialBindingResolver: async ({\n supportedDidMethods,\n keyType,\n supportsAllDidMethods,\n // supportsJwk now also passed\n supportsJwk,\n credentialFormat,\n }) => {\n // NOTE: example implementation. Adjust based on your needs\n // Return the binding to the credential that should be used. Either did or jwk is supported\n\n if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) {\n const didResult = await holder.dids.create({\n method: 'key',\n options: {\n keyType,\n },\n })\n\n if (didResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n }\n\n const didKey = DidKey.fromDid(didResult.didState.did)\n\n return {\n method: 'did',\n didUrl: `${didKey.did}#${didKey.key.fingerprint}`,\n }\n }\n\n // we also support plain jwk for sd-jwt only\n if (supportsJwk && credentialFormat === OpenId4VciCredentialFormatProfile.SdJwtVc) {\n const key = await holder.wallet.createKey({\n keyType,\n })\n\n // you now need to return an object instead of VerificationMethod instance\n // and method 'did' or 'jwk'\n return {\n method: 'jwk',\n jwk: getJwkFromKey(key),\n }\n }\n\n throw new Error('Unable to create a key binding')\n },\n }\n)\n\nconsole.log('Received credentials', JSON.stringify(credentials, null, 2))\n\n// Store the received credentials\nconst records: Array = []\nfor (const credential of credentials) {\n if ('compact' in credential) {\n const record = await holder.sdJwtVc.store(credential.compact)\n records.push(record)\n } else {\n const record = await holder.w3cCredentials.storeCredential({\n credential,\n })\n records.push(record)\n }\n}\n// end-section-6\n\n// start-section-7\n// Create a verifier\nconst openId4VcVerifier = await verifier.modules.openId4VcVerifier.createVerifier({})\n\n// Create a did:key that we will use for signing OpenID4VP authorization requests\nconst verifierDidResult = await issuer.dids.create({\n method: 'key',\n options: {\n keyType: KeyType.Ed25519,\n },\n})\n\nif (verifierDidResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n}\n\nconst verifierDidKey = DidKey.fromDid(verifierDidResult.didState.did)\n// end-section-7\n\n// start-section-8\nconst { authorizationRequest, verificationSession } =\n await verifier.modules.openId4VcVerifier.createAuthorizationRequest({\n verifierId: openId4VcVerifier.verifierId,\n requestSigner: {\n didUrl: `${verifierDidKey.did}#${verifierDidKey.key.fingerprint}`,\n method: 'did',\n },\n // Add DIF presentation exchange data\n presentationExchange: {\n definition: {\n id: '9ed05140-b33b-445e-a0f0-9a23aa501868',\n name: 'Employee Verification',\n purpose: 'We need to verify your employee status to grant access to the employee portal',\n input_descriptors: [\n {\n id: '9c98fb43-6fd5-49b1-8dcc-69bd2a378f23',\n constraints: {\n // Require limit disclosure\n limit_disclosure: 'required',\n fields: [\n {\n filter: {\n type: 'string',\n const: 'AcmeCorpEmployee',\n },\n path: ['$.vct'],\n },\n ],\n },\n },\n ],\n },\n },\n })\n\n// Listen and react to changes in the verification session\nverifier.events.on(\n OpenId4VcVerifierEvents.VerificationSessionStateChanged,\n async (event) => {\n if (event.payload.verificationSession.id === verificationSession.id) {\n console.log('Verification session state changed to ', event.payload.verificationSession.state)\n }\n\n if (event.payload.verificationSession.state === OpenId4VcVerificationSessionState.ResponseVerified) {\n const verifiedAuthorizationResponse = await verifier.modules.openId4VcVerifier.getVerifiedAuthorizationResponse(\n verificationSession.id\n )\n console.log('Successfully verified presentation.', JSON.stringify(verifiedAuthorizationResponse, null, 2))\n\n console.log('Exiting...')\n process.exit()\n }\n }\n)\n// end-section-8\n\n// start-section-9\n\n// resolved credential offer contains the offer, metadata, etc..\nconst resolvedAuthorizationRequest = await holder.modules.openId4VcHolderModule.resolveSiopAuthorizationRequest(\n authorizationRequest\n)\nconsole.log(\n 'Resolved credentials for request',\n JSON.stringify(resolvedAuthorizationRequest.presentationExchange.credentialsForRequest, null, 2)\n)\n\nconst presentationExchangeService = holder.dependencyManager.resolve(DifPresentationExchangeService)\n// Automatically select credentials. In a wallet you could manually choose which credentials to return based on the \"resolvedAuthorizationRequest.presentationExchange.credentialsForRequest\" value\nconst selectedCredentials = presentationExchangeService.selectCredentialsForRequest(\n resolvedAuthorizationRequest.presentationExchange.credentialsForRequest\n)\n\n// issuer only supports pre-authorized flow for now\nconst authorizationResponse = await holder.modules.openId4VcHolderModule.acceptSiopAuthorizationRequest({\n authorizationRequest: resolvedAuthorizationRequest.authorizationRequest,\n presentationExchange: {\n credentials: selectedCredentials,\n },\n})\nconsole.log('Submitted authorization response', JSON.stringify(authorizationResponse.submittedResponse, null, 2))\n// end-section-9\n"},8182:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { IndyVdrAnonCredsRegistry } from '@credo-ts/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},10902:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { IndyVdrAnonCredsRegistry } from '@credo-ts/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},93106:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},50531:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},31638:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import { DidDocumentService, InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent, DidsModule, KeyType, DidDocument } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n CheqdDidCreateOptions,\n} from '@credo-ts/cheqd'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n dids: new DidsModule({\n registrars: [new CheqdDidRegistrar()],\n resolvers: [new CheqdDidResolver()],\n }),\n\n // AnonCreds\n anoncreds: new AnonCredsModule({\n registries: [new CheqdAnonCredsRegistry()],\n anoncreds,\n }),\n\n // Add cheqd module\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n\n// start-section-2\n\n// create a key pair\nconst key = await agent.wallet.createKey({\n keyType: KeyType.Ed25519,\n})\n\n// encode public key according to the verification method\nconst ed25519PublicKeyBase58 = key.publicKeyBase58\n\n// Create a DID\nawait agent.dids.create({\n method: 'cheqd',\n secret: {},\n options: {},\n didDocument: new DidDocument({\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n controller: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1',\n type: 'Ed25519VerificationKey2018',\n controller: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n publicKeyBase58: ed25519PublicKeyBase58,\n },\n ],\n authentication: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1'],\n }),\n})\n// end-section-2\n\n// start-section-3\nawait agent.dids.create({\n method: 'cheqd',\n // the secret contains a the verification method type and id\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n // an optional methodSpecificIdAlgo parameter\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n// end-section-3\n\n// start-section-4\nawait agent.dids.update({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // Updates DID Document with an additional verification method if provided\n secret: {\n verificationMethod: {\n id: 'key-2',\n type: 'JsonWebKey2020',\n },\n },\n didDocument: {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n controller: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1',\n type: 'Ed25519VerificationKey2020',\n controller: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n publicKeyMultibase: 'z6MknkzLUEP5cxqqsaysNMWoh8NJRb3YsowTCj2D6yhwyEdj',\n },\n ],\n authentication: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1'],\n // updates did document with a service block\n service: [\n new DidDocumentService({\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#rand',\n type: 'rand',\n serviceEndpoint: 'https://rand.in',\n }),\n ],\n },\n})\n// end-section-4\n\n// start-section-5\nawait agent.dids.deactivate({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // an optional versionId parameter\n options: {\n versionId: '3.0',\n },\n})\n// end-section-5\n"},84613:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { IndyVdrModule } from '@credo-ts/indy-vdr'\n\nconst modules = {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n indyNamespace: 'bcovrin:test',\n isProduction: false,\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n}\n// end-section-1\n"},73995:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-react-native'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},55453:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},38461:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\n// or import from '@credo-ts/react-native' for React Native\nimport { agentDependencies } from '@credo-ts/node'\n\nimport { OpenId4VcHolderModule } from '@credo-ts/openid4vc'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // no configuration required for holder module\n openId4VcHolderModule: new OpenId4VcHolderModule(),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},38340:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\n// OpenID4VC issuer and verifier modules only work in Node.js\nimport { agentDependencies } from '@credo-ts/node'\n\nimport express, { Router } from 'express'\nimport { OpenId4VcIssuerModule, OpenId4VcVerifierModule } from '@credo-ts/openid4vc'\n\n// Create two express routers, all endpoints for the\n// issuer and verifier will be added to these routers\nconst verifierRouter = Router()\nconst issuerRouter = Router()\n\n// Register the routers on the express server. The path should match\n// with the baseUrl you configure in the modules below.\nconst app = express()\napp.use('/oid4vci', issuerRouter)\napp.use('/siop', verifierRouter)\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n openId4VcIssuer: new OpenId4VcIssuerModule({\n baseUrl: 'http://127.0.0.1:3000/oid4vci',\n\n // If no router is passed, one will be created.\n // you still have to register the router on your express server\n // but you can access it on agent.modules.openId4VcIssuer.config.router\n // It works the same for verifier: agent.modules.openId4VcVerifier.config.router\n router: issuerRouter,\n\n // Each of the endpoints can have configuration associated with it, such as the\n // path (under the baseUrl) to use for the endpoints.\n endpoints: {\n // The credentialRequestToCredentialMapper is the only required endpoint\n // configuration that must be provided. This method is called whenever a\n // credential request has been received for an offer we created. The callback should\n // return the issued credential to return in the credential response to the holder.\n credential: {\n credentialRequestToCredentialMapper: async () => {\n throw new Error('Not implemented')\n },\n },\n },\n }),\n\n // openId4VcVerifier module can only be used in Node.js\n openId4VcVerifier: new OpenId4VcVerifierModule({\n baseUrl: 'http://127.0.0.1:3000/siop',\n\n router: verifierRouter,\n }),\n },\n})\n\n// listen on port 3000 for the openid4vc app.\napp.listen(3000)\n\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},1308:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@credo-ts/core'\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// TODO: we probably want to make this more specific to React Native,\n// so using it in a components and recommending to use the react hooks\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},52537:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@credo-ts/core'\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'\nimport { HttpInboundTransport } from '@credo-ts/node'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},32502:(e,n,r)=>{var t={"./0.3/node_modules/did-resolver/src/__tests__/resolver.test":50349,"./0.3/node_modules/did-resolver/src/__tests__/resolver.test.ts":50349,"./0.3/node_modules/did-resolver/src/resolver":55883,"./0.3/node_modules/did-resolver/src/resolver.ts":55883,"./0.3/node_modules/luxon/src/datetime":38105,"./0.3/node_modules/luxon/src/datetime.js":38105,"./0.3/node_modules/luxon/src/duration":26721,"./0.3/node_modules/luxon/src/duration.js":26721,"./0.3/node_modules/luxon/src/errors":74015,"./0.3/node_modules/luxon/src/errors.js":74015,"./0.3/node_modules/luxon/src/impl/conversions":8498,"./0.3/node_modules/luxon/src/impl/conversions.js":8498,"./0.3/node_modules/luxon/src/impl/diff":38998,"./0.3/node_modules/luxon/src/impl/diff.js":38998,"./0.3/node_modules/luxon/src/impl/digits":29310,"./0.3/node_modules/luxon/src/impl/digits.js":29310,"./0.3/node_modules/luxon/src/impl/english":4039,"./0.3/node_modules/luxon/src/impl/english.js":4039,"./0.3/node_modules/luxon/src/impl/formats":85303,"./0.3/node_modules/luxon/src/impl/formats.js":85303,"./0.3/node_modules/luxon/src/impl/formatter":84756,"./0.3/node_modules/luxon/src/impl/formatter.js":84756,"./0.3/node_modules/luxon/src/impl/invalid":80760,"./0.3/node_modules/luxon/src/impl/invalid.js":80760,"./0.3/node_modules/luxon/src/impl/locale":80114,"./0.3/node_modules/luxon/src/impl/locale.js":80114,"./0.3/node_modules/luxon/src/impl/regexParser":31990,"./0.3/node_modules/luxon/src/impl/regexParser.js":31990,"./0.3/node_modules/luxon/src/impl/tokenParser":64546,"./0.3/node_modules/luxon/src/impl/tokenParser.js":64546,"./0.3/node_modules/luxon/src/impl/util":57866,"./0.3/node_modules/luxon/src/impl/util.js":57866,"./0.3/node_modules/luxon/src/impl/zoneUtil":99776,"./0.3/node_modules/luxon/src/impl/zoneUtil.js":99776,"./0.3/node_modules/luxon/src/info":16965,"./0.3/node_modules/luxon/src/info.js":16965,"./0.3/node_modules/luxon/src/interval":61591,"./0.3/node_modules/luxon/src/interval.js":61591,"./0.3/node_modules/luxon/src/luxon":18004,"./0.3/node_modules/luxon/src/luxon.js":18004,"./0.3/node_modules/luxon/src/luxonFilled":99972,"./0.3/node_modules/luxon/src/luxonFilled.js":99972,"./0.3/node_modules/luxon/src/settings":52636,"./0.3/node_modules/luxon/src/settings.js":52636,"./0.3/node_modules/luxon/src/zone":76476,"./0.3/node_modules/luxon/src/zone.js":76476,"./0.3/node_modules/luxon/src/zones/IANAZone":43176,"./0.3/node_modules/luxon/src/zones/IANAZone.js":43176,"./0.3/node_modules/luxon/src/zones/fixedOffsetZone":61840,"./0.3/node_modules/luxon/src/zones/fixedOffsetZone.js":61840,"./0.3/node_modules/luxon/src/zones/invalidZone":85092,"./0.3/node_modules/luxon/src/zones/invalidZone.js":85092,"./0.3/node_modules/luxon/src/zones/localZone":15617,"./0.3/node_modules/luxon/src/zones/localZone.js":15617,"./0.3/src/create-a-connection":77058,"./0.3/src/create-a-connection.ts":77058,"./0.3/src/issue-a-credential":92151,"./0.3/src/issue-a-credential.ts":92151,"./0.3/src/set-up":60420,"./0.3/src/set-up-rn":3288,"./0.3/src/set-up-rn.ts":3288,"./0.3/src/set-up.ts":60420,"./0.4/src/create-a-connection":45343,"./0.4/src/create-a-connection.ts":45343,"./0.4/src/issue-a-credential":7283,"./0.4/src/issue-a-credential.ts":7283,"./0.4/src/mediation-recipient":8276,"./0.4/src/mediation-recipient.ts":8276,"./0.4/src/mediator-setup":50768,"./0.4/src/mediator-setup.ts":50768,"./0.4/src/register-schema-and-cred-def":62055,"./0.4/src/register-schema-and-cred-def.ts":62055,"./0.4/src/set-up":61031,"./0.4/src/set-up-anoncreds-rs":13099,"./0.4/src/set-up-anoncreds-rs-rn":96596,"./0.4/src/set-up-anoncreds-rs-rn.ts":96596,"./0.4/src/set-up-anoncreds-rs.ts":13099,"./0.4/src/set-up-askar":93716,"./0.4/src/set-up-askar-rn":78757,"./0.4/src/set-up-askar-rn.ts":78757,"./0.4/src/set-up-askar.ts":93716,"./0.4/src/set-up-cheqd":12107,"./0.4/src/set-up-cheqd.ts":12107,"./0.4/src/set-up-indy-sdk":12863,"./0.4/src/set-up-indy-sdk-postgres":84056,"./0.4/src/set-up-indy-sdk-postgres.ts":84056,"./0.4/src/set-up-indy-sdk-rn":51002,"./0.4/src/set-up-indy-sdk-rn.ts":51002,"./0.4/src/set-up-indy-sdk.ts":12863,"./0.4/src/set-up-indy-vdr":54437,"./0.4/src/set-up-indy-vdr-config":99031,"./0.4/src/set-up-indy-vdr-config.ts":99031,"./0.4/src/set-up-indy-vdr-rn":44279,"./0.4/src/set-up-indy-vdr-rn.ts":44279,"./0.4/src/set-up-indy-vdr.ts":54437,"./0.4/src/set-up-rn":46121,"./0.4/src/set-up-rn.ts":46121,"./0.4/src/set-up.ts":61031,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/AndroidManifest.xml":29838,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/java/org/hyperledger/anoncreds/AnoncredsModule.java":90239,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/java/org/hyperledger/anoncreds/AnoncredsPackage.java":31354,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/AndroidManifest.xml":81332,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/java/org/hyperledger/ariesaskar/AriesAskarModule.java":8566,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/java/org/hyperledger/ariesaskar/AriesAskarPackage.java":2051,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/AndroidManifest.xml":94516,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/java/org/hyperledger/indyvdr/IndyVdrModule.java":11611,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/java/org/hyperledger/indyvdr/IndyVdrPackage.java":79681,"./current/node_modules/rxjs/src/":76328,"./current/node_modules/rxjs/src/Rx.global":64147,"./current/node_modules/rxjs/src/Rx.global.js":64147,"./current/node_modules/rxjs/src/ajax":18398,"./current/node_modules/rxjs/src/ajax/":18398,"./current/node_modules/rxjs/src/ajax/index":18398,"./current/node_modules/rxjs/src/ajax/index.ts":18398,"./current/node_modules/rxjs/src/fetch":44106,"./current/node_modules/rxjs/src/fetch/":44106,"./current/node_modules/rxjs/src/fetch/index":44106,"./current/node_modules/rxjs/src/fetch/index.ts":44106,"./current/node_modules/rxjs/src/index":76328,"./current/node_modules/rxjs/src/index.ts":76328,"./current/node_modules/rxjs/src/internal/AnyCatcher":12930,"./current/node_modules/rxjs/src/internal/AnyCatcher.ts":12930,"./current/node_modules/rxjs/src/internal/AsyncSubject":58069,"./current/node_modules/rxjs/src/internal/AsyncSubject.ts":58069,"./current/node_modules/rxjs/src/internal/BehaviorSubject":49219,"./current/node_modules/rxjs/src/internal/BehaviorSubject.ts":49219,"./current/node_modules/rxjs/src/internal/Notification":71913,"./current/node_modules/rxjs/src/internal/Notification.ts":71913,"./current/node_modules/rxjs/src/internal/NotificationFactories":62590,"./current/node_modules/rxjs/src/internal/NotificationFactories.ts":62590,"./current/node_modules/rxjs/src/internal/Observable":59203,"./current/node_modules/rxjs/src/internal/Observable.ts":59203,"./current/node_modules/rxjs/src/internal/Operator":74287,"./current/node_modules/rxjs/src/internal/Operator.ts":74287,"./current/node_modules/rxjs/src/internal/ReplaySubject":62736,"./current/node_modules/rxjs/src/internal/ReplaySubject.ts":62736,"./current/node_modules/rxjs/src/internal/Scheduler":11213,"./current/node_modules/rxjs/src/internal/Scheduler.ts":11213,"./current/node_modules/rxjs/src/internal/Subject":29170,"./current/node_modules/rxjs/src/internal/Subject.ts":29170,"./current/node_modules/rxjs/src/internal/Subscriber":47811,"./current/node_modules/rxjs/src/internal/Subscriber.ts":47811,"./current/node_modules/rxjs/src/internal/Subscription":75160,"./current/node_modules/rxjs/src/internal/Subscription.ts":75160,"./current/node_modules/rxjs/src/internal/ajax/AjaxResponse":52004,"./current/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts":52004,"./current/node_modules/rxjs/src/internal/ajax/ajax":55791,"./current/node_modules/rxjs/src/internal/ajax/ajax.ts":55791,"./current/node_modules/rxjs/src/internal/ajax/errors":49930,"./current/node_modules/rxjs/src/internal/ajax/errors.ts":49930,"./current/node_modules/rxjs/src/internal/ajax/getXHRResponse":66594,"./current/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts":66594,"./current/node_modules/rxjs/src/internal/ajax/types":33731,"./current/node_modules/rxjs/src/internal/ajax/types.ts":33731,"./current/node_modules/rxjs/src/internal/config":17138,"./current/node_modules/rxjs/src/internal/config.ts":17138,"./current/node_modules/rxjs/src/internal/firstValueFrom":12451,"./current/node_modules/rxjs/src/internal/firstValueFrom.ts":12451,"./current/node_modules/rxjs/src/internal/lastValueFrom":70284,"./current/node_modules/rxjs/src/internal/lastValueFrom.ts":70284,"./current/node_modules/rxjs/src/internal/observable/ConnectableObservable":80001,"./current/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts":80001,"./current/node_modules/rxjs/src/internal/observable/bindCallback":9808,"./current/node_modules/rxjs/src/internal/observable/bindCallback.ts":9808,"./current/node_modules/rxjs/src/internal/observable/bindCallbackInternals":39780,"./current/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts":39780,"./current/node_modules/rxjs/src/internal/observable/bindNodeCallback":46853,"./current/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts":46853,"./current/node_modules/rxjs/src/internal/observable/combineLatest":24058,"./current/node_modules/rxjs/src/internal/observable/combineLatest.ts":24058,"./current/node_modules/rxjs/src/internal/observable/concat":87101,"./current/node_modules/rxjs/src/internal/observable/concat.ts":87101,"./current/node_modules/rxjs/src/internal/observable/connectable":82623,"./current/node_modules/rxjs/src/internal/observable/connectable.ts":82623,"./current/node_modules/rxjs/src/internal/observable/defer":91166,"./current/node_modules/rxjs/src/internal/observable/defer.ts":91166,"./current/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject":39290,"./current/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts":39290,"./current/node_modules/rxjs/src/internal/observable/dom/animationFrames":66007,"./current/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts":66007,"./current/node_modules/rxjs/src/internal/observable/dom/fetch":37045,"./current/node_modules/rxjs/src/internal/observable/dom/fetch.ts":37045,"./current/node_modules/rxjs/src/internal/observable/dom/webSocket":50101,"./current/node_modules/rxjs/src/internal/observable/dom/webSocket.ts":50101,"./current/node_modules/rxjs/src/internal/observable/empty":367,"./current/node_modules/rxjs/src/internal/observable/empty.ts":367,"./current/node_modules/rxjs/src/internal/observable/forkJoin":31029,"./current/node_modules/rxjs/src/internal/observable/forkJoin.ts":31029,"./current/node_modules/rxjs/src/internal/observable/from":22051,"./current/node_modules/rxjs/src/internal/observable/from.ts":22051,"./current/node_modules/rxjs/src/internal/observable/fromEvent":16273,"./current/node_modules/rxjs/src/internal/observable/fromEvent.ts":16273,"./current/node_modules/rxjs/src/internal/observable/fromEventPattern":8517,"./current/node_modules/rxjs/src/internal/observable/fromEventPattern.ts":8517,"./current/node_modules/rxjs/src/internal/observable/fromSubscribable":75735,"./current/node_modules/rxjs/src/internal/observable/fromSubscribable.ts":75735,"./current/node_modules/rxjs/src/internal/observable/generate":34758,"./current/node_modules/rxjs/src/internal/observable/generate.ts":34758,"./current/node_modules/rxjs/src/internal/observable/iif":92050,"./current/node_modules/rxjs/src/internal/observable/iif.ts":92050,"./current/node_modules/rxjs/src/internal/observable/innerFrom":41393,"./current/node_modules/rxjs/src/internal/observable/innerFrom.ts":41393,"./current/node_modules/rxjs/src/internal/observable/interval":8910,"./current/node_modules/rxjs/src/internal/observable/interval.ts":8910,"./current/node_modules/rxjs/src/internal/observable/merge":29870,"./current/node_modules/rxjs/src/internal/observable/merge.ts":29870,"./current/node_modules/rxjs/src/internal/observable/never":69848,"./current/node_modules/rxjs/src/internal/observable/never.ts":69848,"./current/node_modules/rxjs/src/internal/observable/of":7432,"./current/node_modules/rxjs/src/internal/observable/of.ts":7432,"./current/node_modules/rxjs/src/internal/observable/onErrorResumeNext":12129,"./current/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts":12129,"./current/node_modules/rxjs/src/internal/observable/pairs":20751,"./current/node_modules/rxjs/src/internal/observable/pairs.ts":20751,"./current/node_modules/rxjs/src/internal/observable/partition":35607,"./current/node_modules/rxjs/src/internal/observable/partition.ts":35607,"./current/node_modules/rxjs/src/internal/observable/race":66859,"./current/node_modules/rxjs/src/internal/observable/race.ts":66859,"./current/node_modules/rxjs/src/internal/observable/range":73133,"./current/node_modules/rxjs/src/internal/observable/range.ts":73133,"./current/node_modules/rxjs/src/internal/observable/throwError":84558,"./current/node_modules/rxjs/src/internal/observable/throwError.ts":84558,"./current/node_modules/rxjs/src/internal/observable/timer":18339,"./current/node_modules/rxjs/src/internal/observable/timer.ts":18339,"./current/node_modules/rxjs/src/internal/observable/using":82581,"./current/node_modules/rxjs/src/internal/observable/using.ts":82581,"./current/node_modules/rxjs/src/internal/observable/zip":32127,"./current/node_modules/rxjs/src/internal/observable/zip.ts":32127,"./current/node_modules/rxjs/src/internal/operators/OperatorSubscriber":95532,"./current/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts":95532,"./current/node_modules/rxjs/src/internal/operators/audit":45550,"./current/node_modules/rxjs/src/internal/operators/audit.ts":45550,"./current/node_modules/rxjs/src/internal/operators/auditTime":96786,"./current/node_modules/rxjs/src/internal/operators/auditTime.ts":96786,"./current/node_modules/rxjs/src/internal/operators/buffer":77427,"./current/node_modules/rxjs/src/internal/operators/buffer.ts":77427,"./current/node_modules/rxjs/src/internal/operators/bufferCount":76127,"./current/node_modules/rxjs/src/internal/operators/bufferCount.ts":76127,"./current/node_modules/rxjs/src/internal/operators/bufferTime":62259,"./current/node_modules/rxjs/src/internal/operators/bufferTime.ts":62259,"./current/node_modules/rxjs/src/internal/operators/bufferToggle":91402,"./current/node_modules/rxjs/src/internal/operators/bufferToggle.ts":91402,"./current/node_modules/rxjs/src/internal/operators/bufferWhen":6242,"./current/node_modules/rxjs/src/internal/operators/bufferWhen.ts":6242,"./current/node_modules/rxjs/src/internal/operators/catchError":98657,"./current/node_modules/rxjs/src/internal/operators/catchError.ts":98657,"./current/node_modules/rxjs/src/internal/operators/combineAll":22057,"./current/node_modules/rxjs/src/internal/operators/combineAll.ts":22057,"./current/node_modules/rxjs/src/internal/operators/combineLatest":74468,"./current/node_modules/rxjs/src/internal/operators/combineLatest.ts":74468,"./current/node_modules/rxjs/src/internal/operators/combineLatestAll":24586,"./current/node_modules/rxjs/src/internal/operators/combineLatestAll.ts":24586,"./current/node_modules/rxjs/src/internal/operators/combineLatestWith":53319,"./current/node_modules/rxjs/src/internal/operators/combineLatestWith.ts":53319,"./current/node_modules/rxjs/src/internal/operators/concat":25028,"./current/node_modules/rxjs/src/internal/operators/concat.ts":25028,"./current/node_modules/rxjs/src/internal/operators/concatAll":19784,"./current/node_modules/rxjs/src/internal/operators/concatAll.ts":19784,"./current/node_modules/rxjs/src/internal/operators/concatMap":67384,"./current/node_modules/rxjs/src/internal/operators/concatMap.ts":67384,"./current/node_modules/rxjs/src/internal/operators/concatMapTo":46756,"./current/node_modules/rxjs/src/internal/operators/concatMapTo.ts":46756,"./current/node_modules/rxjs/src/internal/operators/concatWith":27902,"./current/node_modules/rxjs/src/internal/operators/concatWith.ts":27902,"./current/node_modules/rxjs/src/internal/operators/connect":61795,"./current/node_modules/rxjs/src/internal/operators/connect.ts":61795,"./current/node_modules/rxjs/src/internal/operators/count":63791,"./current/node_modules/rxjs/src/internal/operators/count.ts":63791,"./current/node_modules/rxjs/src/internal/operators/debounce":17730,"./current/node_modules/rxjs/src/internal/operators/debounce.ts":17730,"./current/node_modules/rxjs/src/internal/operators/debounceTime":59048,"./current/node_modules/rxjs/src/internal/operators/debounceTime.ts":59048,"./current/node_modules/rxjs/src/internal/operators/defaultIfEmpty":78260,"./current/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts":78260,"./current/node_modules/rxjs/src/internal/operators/delay":36544,"./current/node_modules/rxjs/src/internal/operators/delay.ts":36544,"./current/node_modules/rxjs/src/internal/operators/delayWhen":7365,"./current/node_modules/rxjs/src/internal/operators/delayWhen.ts":7365,"./current/node_modules/rxjs/src/internal/operators/dematerialize":22854,"./current/node_modules/rxjs/src/internal/operators/dematerialize.ts":22854,"./current/node_modules/rxjs/src/internal/operators/distinct":27291,"./current/node_modules/rxjs/src/internal/operators/distinct.ts":27291,"./current/node_modules/rxjs/src/internal/operators/distinctUntilChanged":70231,"./current/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts":70231,"./current/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged":29789,"./current/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts":29789,"./current/node_modules/rxjs/src/internal/operators/elementAt":66898,"./current/node_modules/rxjs/src/internal/operators/elementAt.ts":66898,"./current/node_modules/rxjs/src/internal/operators/endWith":80025,"./current/node_modules/rxjs/src/internal/operators/endWith.ts":80025,"./current/node_modules/rxjs/src/internal/operators/every":28154,"./current/node_modules/rxjs/src/internal/operators/every.ts":28154,"./current/node_modules/rxjs/src/internal/operators/exhaust":80543,"./current/node_modules/rxjs/src/internal/operators/exhaust.ts":80543,"./current/node_modules/rxjs/src/internal/operators/exhaustAll":84336,"./current/node_modules/rxjs/src/internal/operators/exhaustAll.ts":84336,"./current/node_modules/rxjs/src/internal/operators/exhaustMap":21781,"./current/node_modules/rxjs/src/internal/operators/exhaustMap.ts":21781,"./current/node_modules/rxjs/src/internal/operators/expand":15504,"./current/node_modules/rxjs/src/internal/operators/expand.ts":15504,"./current/node_modules/rxjs/src/internal/operators/filter":78470,"./current/node_modules/rxjs/src/internal/operators/filter.ts":78470,"./current/node_modules/rxjs/src/internal/operators/finalize":44063,"./current/node_modules/rxjs/src/internal/operators/finalize.ts":44063,"./current/node_modules/rxjs/src/internal/operators/find":32546,"./current/node_modules/rxjs/src/internal/operators/find.ts":32546,"./current/node_modules/rxjs/src/internal/operators/findIndex":98500,"./current/node_modules/rxjs/src/internal/operators/findIndex.ts":98500,"./current/node_modules/rxjs/src/internal/operators/first":78513,"./current/node_modules/rxjs/src/internal/operators/first.ts":78513,"./current/node_modules/rxjs/src/internal/operators/flatMap":60189,"./current/node_modules/rxjs/src/internal/operators/flatMap.ts":60189,"./current/node_modules/rxjs/src/internal/operators/groupBy":20559,"./current/node_modules/rxjs/src/internal/operators/groupBy.ts":20559,"./current/node_modules/rxjs/src/internal/operators/ignoreElements":26020,"./current/node_modules/rxjs/src/internal/operators/ignoreElements.ts":26020,"./current/node_modules/rxjs/src/internal/operators/isEmpty":99465,"./current/node_modules/rxjs/src/internal/operators/isEmpty.ts":99465,"./current/node_modules/rxjs/src/internal/operators/joinAllInternals":66,"./current/node_modules/rxjs/src/internal/operators/joinAllInternals.ts":66,"./current/node_modules/rxjs/src/internal/operators/last":42094,"./current/node_modules/rxjs/src/internal/operators/last.ts":42094,"./current/node_modules/rxjs/src/internal/operators/map":92211,"./current/node_modules/rxjs/src/internal/operators/map.ts":92211,"./current/node_modules/rxjs/src/internal/operators/mapTo":60001,"./current/node_modules/rxjs/src/internal/operators/mapTo.ts":60001,"./current/node_modules/rxjs/src/internal/operators/materialize":2017,"./current/node_modules/rxjs/src/internal/operators/materialize.ts":2017,"./current/node_modules/rxjs/src/internal/operators/max":40135,"./current/node_modules/rxjs/src/internal/operators/max.ts":40135,"./current/node_modules/rxjs/src/internal/operators/merge":27586,"./current/node_modules/rxjs/src/internal/operators/merge.ts":27586,"./current/node_modules/rxjs/src/internal/operators/mergeAll":2523,"./current/node_modules/rxjs/src/internal/operators/mergeAll.ts":2523,"./current/node_modules/rxjs/src/internal/operators/mergeInternals":71645,"./current/node_modules/rxjs/src/internal/operators/mergeInternals.ts":71645,"./current/node_modules/rxjs/src/internal/operators/mergeMap":96348,"./current/node_modules/rxjs/src/internal/operators/mergeMap.ts":96348,"./current/node_modules/rxjs/src/internal/operators/mergeMapTo":77133,"./current/node_modules/rxjs/src/internal/operators/mergeMapTo.ts":77133,"./current/node_modules/rxjs/src/internal/operators/mergeScan":83401,"./current/node_modules/rxjs/src/internal/operators/mergeScan.ts":83401,"./current/node_modules/rxjs/src/internal/operators/mergeWith":27125,"./current/node_modules/rxjs/src/internal/operators/mergeWith.ts":27125,"./current/node_modules/rxjs/src/internal/operators/min":8190,"./current/node_modules/rxjs/src/internal/operators/min.ts":8190,"./current/node_modules/rxjs/src/internal/operators/multicast":45380,"./current/node_modules/rxjs/src/internal/operators/multicast.ts":45380,"./current/node_modules/rxjs/src/internal/operators/observeOn":66627,"./current/node_modules/rxjs/src/internal/operators/observeOn.ts":66627,"./current/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith":83521,"./current/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts":83521,"./current/node_modules/rxjs/src/internal/operators/pairwise":25690,"./current/node_modules/rxjs/src/internal/operators/pairwise.ts":25690,"./current/node_modules/rxjs/src/internal/operators/partition":60471,"./current/node_modules/rxjs/src/internal/operators/partition.ts":60471,"./current/node_modules/rxjs/src/internal/operators/pluck":27748,"./current/node_modules/rxjs/src/internal/operators/pluck.ts":27748,"./current/node_modules/rxjs/src/internal/operators/publish":62126,"./current/node_modules/rxjs/src/internal/operators/publish.ts":62126,"./current/node_modules/rxjs/src/internal/operators/publishBehavior":38829,"./current/node_modules/rxjs/src/internal/operators/publishBehavior.ts":38829,"./current/node_modules/rxjs/src/internal/operators/publishLast":6807,"./current/node_modules/rxjs/src/internal/operators/publishLast.ts":6807,"./current/node_modules/rxjs/src/internal/operators/publishReplay":33891,"./current/node_modules/rxjs/src/internal/operators/publishReplay.ts":33891,"./current/node_modules/rxjs/src/internal/operators/race":31715,"./current/node_modules/rxjs/src/internal/operators/race.ts":31715,"./current/node_modules/rxjs/src/internal/operators/raceWith":77153,"./current/node_modules/rxjs/src/internal/operators/raceWith.ts":77153,"./current/node_modules/rxjs/src/internal/operators/reduce":90881,"./current/node_modules/rxjs/src/internal/operators/reduce.ts":90881,"./current/node_modules/rxjs/src/internal/operators/refCount":73346,"./current/node_modules/rxjs/src/internal/operators/refCount.ts":73346,"./current/node_modules/rxjs/src/internal/operators/repeat":52435,"./current/node_modules/rxjs/src/internal/operators/repeat.ts":52435,"./current/node_modules/rxjs/src/internal/operators/repeatWhen":14668,"./current/node_modules/rxjs/src/internal/operators/repeatWhen.ts":14668,"./current/node_modules/rxjs/src/internal/operators/retry":75456,"./current/node_modules/rxjs/src/internal/operators/retry.ts":75456,"./current/node_modules/rxjs/src/internal/operators/retryWhen":77769,"./current/node_modules/rxjs/src/internal/operators/retryWhen.ts":77769,"./current/node_modules/rxjs/src/internal/operators/sample":36635,"./current/node_modules/rxjs/src/internal/operators/sample.ts":36635,"./current/node_modules/rxjs/src/internal/operators/sampleTime":72768,"./current/node_modules/rxjs/src/internal/operators/sampleTime.ts":72768,"./current/node_modules/rxjs/src/internal/operators/scan":37528,"./current/node_modules/rxjs/src/internal/operators/scan.ts":37528,"./current/node_modules/rxjs/src/internal/operators/scanInternals":19541,"./current/node_modules/rxjs/src/internal/operators/scanInternals.ts":19541,"./current/node_modules/rxjs/src/internal/operators/sequenceEqual":2387,"./current/node_modules/rxjs/src/internal/operators/sequenceEqual.ts":2387,"./current/node_modules/rxjs/src/internal/operators/share":67424,"./current/node_modules/rxjs/src/internal/operators/share.ts":67424,"./current/node_modules/rxjs/src/internal/operators/shareReplay":25189,"./current/node_modules/rxjs/src/internal/operators/shareReplay.ts":25189,"./current/node_modules/rxjs/src/internal/operators/single":66646,"./current/node_modules/rxjs/src/internal/operators/single.ts":66646,"./current/node_modules/rxjs/src/internal/operators/skip":85270,"./current/node_modules/rxjs/src/internal/operators/skip.ts":85270,"./current/node_modules/rxjs/src/internal/operators/skipLast":82550,"./current/node_modules/rxjs/src/internal/operators/skipLast.ts":82550,"./current/node_modules/rxjs/src/internal/operators/skipUntil":25672,"./current/node_modules/rxjs/src/internal/operators/skipUntil.ts":25672,"./current/node_modules/rxjs/src/internal/operators/skipWhile":57974,"./current/node_modules/rxjs/src/internal/operators/skipWhile.ts":57974,"./current/node_modules/rxjs/src/internal/operators/startWith":80515,"./current/node_modules/rxjs/src/internal/operators/startWith.ts":80515,"./current/node_modules/rxjs/src/internal/operators/subscribeOn":91483,"./current/node_modules/rxjs/src/internal/operators/subscribeOn.ts":91483,"./current/node_modules/rxjs/src/internal/operators/switchAll":10615,"./current/node_modules/rxjs/src/internal/operators/switchAll.ts":10615,"./current/node_modules/rxjs/src/internal/operators/switchMap":50520,"./current/node_modules/rxjs/src/internal/operators/switchMap.ts":50520,"./current/node_modules/rxjs/src/internal/operators/switchMapTo":38846,"./current/node_modules/rxjs/src/internal/operators/switchMapTo.ts":38846,"./current/node_modules/rxjs/src/internal/operators/switchScan":78802,"./current/node_modules/rxjs/src/internal/operators/switchScan.ts":78802,"./current/node_modules/rxjs/src/internal/operators/take":8082,"./current/node_modules/rxjs/src/internal/operators/take.ts":8082,"./current/node_modules/rxjs/src/internal/operators/takeLast":60396,"./current/node_modules/rxjs/src/internal/operators/takeLast.ts":60396,"./current/node_modules/rxjs/src/internal/operators/takeUntil":84483,"./current/node_modules/rxjs/src/internal/operators/takeUntil.ts":84483,"./current/node_modules/rxjs/src/internal/operators/takeWhile":54440,"./current/node_modules/rxjs/src/internal/operators/takeWhile.ts":54440,"./current/node_modules/rxjs/src/internal/operators/tap":86108,"./current/node_modules/rxjs/src/internal/operators/tap.ts":86108,"./current/node_modules/rxjs/src/internal/operators/throttle":48494,"./current/node_modules/rxjs/src/internal/operators/throttle.ts":48494,"./current/node_modules/rxjs/src/internal/operators/throttleTime":56364,"./current/node_modules/rxjs/src/internal/operators/throttleTime.ts":56364,"./current/node_modules/rxjs/src/internal/operators/throwIfEmpty":14796,"./current/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts":14796,"./current/node_modules/rxjs/src/internal/operators/timeInterval":2372,"./current/node_modules/rxjs/src/internal/operators/timeInterval.ts":2372,"./current/node_modules/rxjs/src/internal/operators/timeout":45907,"./current/node_modules/rxjs/src/internal/operators/timeout.ts":45907,"./current/node_modules/rxjs/src/internal/operators/timeoutWith":68110,"./current/node_modules/rxjs/src/internal/operators/timeoutWith.ts":68110,"./current/node_modules/rxjs/src/internal/operators/timestamp":74740,"./current/node_modules/rxjs/src/internal/operators/timestamp.ts":74740,"./current/node_modules/rxjs/src/internal/operators/toArray":48249,"./current/node_modules/rxjs/src/internal/operators/toArray.ts":48249,"./current/node_modules/rxjs/src/internal/operators/window":48387,"./current/node_modules/rxjs/src/internal/operators/window.ts":48387,"./current/node_modules/rxjs/src/internal/operators/windowCount":5509,"./current/node_modules/rxjs/src/internal/operators/windowCount.ts":5509,"./current/node_modules/rxjs/src/internal/operators/windowTime":64999,"./current/node_modules/rxjs/src/internal/operators/windowTime.ts":64999,"./current/node_modules/rxjs/src/internal/operators/windowToggle":93742,"./current/node_modules/rxjs/src/internal/operators/windowToggle.ts":93742,"./current/node_modules/rxjs/src/internal/operators/windowWhen":71402,"./current/node_modules/rxjs/src/internal/operators/windowWhen.ts":71402,"./current/node_modules/rxjs/src/internal/operators/withLatestFrom":83254,"./current/node_modules/rxjs/src/internal/operators/withLatestFrom.ts":83254,"./current/node_modules/rxjs/src/internal/operators/zip":63671,"./current/node_modules/rxjs/src/internal/operators/zip.ts":63671,"./current/node_modules/rxjs/src/internal/operators/zipAll":54061,"./current/node_modules/rxjs/src/internal/operators/zipAll.ts":54061,"./current/node_modules/rxjs/src/internal/operators/zipWith":11412,"./current/node_modules/rxjs/src/internal/operators/zipWith.ts":11412,"./current/node_modules/rxjs/src/internal/scheduled/scheduleArray":76131,"./current/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts":76131,"./current/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable":32929,"./current/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts":32929,"./current/node_modules/rxjs/src/internal/scheduled/scheduleIterable":65077,"./current/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts":65077,"./current/node_modules/rxjs/src/internal/scheduled/scheduleObservable":62083,"./current/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts":62083,"./current/node_modules/rxjs/src/internal/scheduled/schedulePromise":3693,"./current/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts":3693,"./current/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike":94579,"./current/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts":94579,"./current/node_modules/rxjs/src/internal/scheduled/scheduled":81499,"./current/node_modules/rxjs/src/internal/scheduled/scheduled.ts":81499,"./current/node_modules/rxjs/src/internal/scheduler/Action":79366,"./current/node_modules/rxjs/src/internal/scheduler/Action.ts":79366,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction":59747,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts":59747,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler":9483,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts":9483,"./current/node_modules/rxjs/src/internal/scheduler/AsapAction":66423,"./current/node_modules/rxjs/src/internal/scheduler/AsapAction.ts":66423,"./current/node_modules/rxjs/src/internal/scheduler/AsapScheduler":23926,"./current/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts":23926,"./current/node_modules/rxjs/src/internal/scheduler/AsyncAction":61747,"./current/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts":61747,"./current/node_modules/rxjs/src/internal/scheduler/AsyncScheduler":3385,"./current/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts":3385,"./current/node_modules/rxjs/src/internal/scheduler/QueueAction":6775,"./current/node_modules/rxjs/src/internal/scheduler/QueueAction.ts":6775,"./current/node_modules/rxjs/src/internal/scheduler/QueueScheduler":91797,"./current/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts":91797,"./current/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler":49598,"./current/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts":49598,"./current/node_modules/rxjs/src/internal/scheduler/animationFrame":15183,"./current/node_modules/rxjs/src/internal/scheduler/animationFrame.ts":15183,"./current/node_modules/rxjs/src/internal/scheduler/animationFrameProvider":87744,"./current/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts":87744,"./current/node_modules/rxjs/src/internal/scheduler/asap":19890,"./current/node_modules/rxjs/src/internal/scheduler/asap.ts":19890,"./current/node_modules/rxjs/src/internal/scheduler/async":86544,"./current/node_modules/rxjs/src/internal/scheduler/async.ts":86544,"./current/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider":49494,"./current/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts":49494,"./current/node_modules/rxjs/src/internal/scheduler/immediateProvider":78581,"./current/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts":78581,"./current/node_modules/rxjs/src/internal/scheduler/intervalProvider":44650,"./current/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts":44650,"./current/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider":10578,"./current/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts":10578,"./current/node_modules/rxjs/src/internal/scheduler/queue":17511,"./current/node_modules/rxjs/src/internal/scheduler/queue.ts":17511,"./current/node_modules/rxjs/src/internal/scheduler/timeoutProvider":44926,"./current/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts":44926,"./current/node_modules/rxjs/src/internal/scheduler/timerHandle":3221,"./current/node_modules/rxjs/src/internal/scheduler/timerHandle.ts":3221,"./current/node_modules/rxjs/src/internal/symbol/iterator":19430,"./current/node_modules/rxjs/src/internal/symbol/iterator.ts":19430,"./current/node_modules/rxjs/src/internal/symbol/observable":77709,"./current/node_modules/rxjs/src/internal/symbol/observable.ts":77709,"./current/node_modules/rxjs/src/internal/testing/ColdObservable":73662,"./current/node_modules/rxjs/src/internal/testing/ColdObservable.ts":73662,"./current/node_modules/rxjs/src/internal/testing/HotObservable":93657,"./current/node_modules/rxjs/src/internal/testing/HotObservable.ts":93657,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLog":63759,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts":63759,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLoggable":57968,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts":57968,"./current/node_modules/rxjs/src/internal/testing/TestMessage":79642,"./current/node_modules/rxjs/src/internal/testing/TestMessage.ts":79642,"./current/node_modules/rxjs/src/internal/testing/TestScheduler":11810,"./current/node_modules/rxjs/src/internal/testing/TestScheduler.ts":11810,"./current/node_modules/rxjs/src/internal/types":71628,"./current/node_modules/rxjs/src/internal/types.ts":71628,"./current/node_modules/rxjs/src/internal/umd":89799,"./current/node_modules/rxjs/src/internal/umd.ts":89799,"./current/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError":3837,"./current/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts":3837,"./current/node_modules/rxjs/src/internal/util/EmptyError":84367,"./current/node_modules/rxjs/src/internal/util/EmptyError.ts":84367,"./current/node_modules/rxjs/src/internal/util/Immediate":89811,"./current/node_modules/rxjs/src/internal/util/Immediate.ts":89811,"./current/node_modules/rxjs/src/internal/util/NotFoundError":59086,"./current/node_modules/rxjs/src/internal/util/NotFoundError.ts":59086,"./current/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError":13471,"./current/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts":13471,"./current/node_modules/rxjs/src/internal/util/SequenceError":64389,"./current/node_modules/rxjs/src/internal/util/SequenceError.ts":64389,"./current/node_modules/rxjs/src/internal/util/UnsubscriptionError":80789,"./current/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts":80789,"./current/node_modules/rxjs/src/internal/util/applyMixins":44470,"./current/node_modules/rxjs/src/internal/util/applyMixins.ts":44470,"./current/node_modules/rxjs/src/internal/util/args":93096,"./current/node_modules/rxjs/src/internal/util/args.ts":93096,"./current/node_modules/rxjs/src/internal/util/argsArgArrayOrObject":34925,"./current/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts":34925,"./current/node_modules/rxjs/src/internal/util/argsOrArgArray":75465,"./current/node_modules/rxjs/src/internal/util/argsOrArgArray.ts":75465,"./current/node_modules/rxjs/src/internal/util/arrRemove":22478,"./current/node_modules/rxjs/src/internal/util/arrRemove.ts":22478,"./current/node_modules/rxjs/src/internal/util/createErrorClass":87302,"./current/node_modules/rxjs/src/internal/util/createErrorClass.ts":87302,"./current/node_modules/rxjs/src/internal/util/createObject":26867,"./current/node_modules/rxjs/src/internal/util/createObject.ts":26867,"./current/node_modules/rxjs/src/internal/util/errorContext":65493,"./current/node_modules/rxjs/src/internal/util/errorContext.ts":65493,"./current/node_modules/rxjs/src/internal/util/executeSchedule":48598,"./current/node_modules/rxjs/src/internal/util/executeSchedule.ts":48598,"./current/node_modules/rxjs/src/internal/util/identity":90838,"./current/node_modules/rxjs/src/internal/util/identity.ts":90838,"./current/node_modules/rxjs/src/internal/util/isArrayLike":52957,"./current/node_modules/rxjs/src/internal/util/isArrayLike.ts":52957,"./current/node_modules/rxjs/src/internal/util/isAsyncIterable":34204,"./current/node_modules/rxjs/src/internal/util/isAsyncIterable.ts":34204,"./current/node_modules/rxjs/src/internal/util/isDate":42299,"./current/node_modules/rxjs/src/internal/util/isDate.ts":42299,"./current/node_modules/rxjs/src/internal/util/isFunction":74641,"./current/node_modules/rxjs/src/internal/util/isFunction.ts":74641,"./current/node_modules/rxjs/src/internal/util/isInteropObservable":77449,"./current/node_modules/rxjs/src/internal/util/isInteropObservable.ts":77449,"./current/node_modules/rxjs/src/internal/util/isIterable":57065,"./current/node_modules/rxjs/src/internal/util/isIterable.ts":57065,"./current/node_modules/rxjs/src/internal/util/isObservable":59605,"./current/node_modules/rxjs/src/internal/util/isObservable.ts":59605,"./current/node_modules/rxjs/src/internal/util/isPromise":98840,"./current/node_modules/rxjs/src/internal/util/isPromise.ts":98840,"./current/node_modules/rxjs/src/internal/util/isReadableStreamLike":71940,"./current/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts":71940,"./current/node_modules/rxjs/src/internal/util/isScheduler":64687,"./current/node_modules/rxjs/src/internal/util/isScheduler.ts":64687,"./current/node_modules/rxjs/src/internal/util/lift":37233,"./current/node_modules/rxjs/src/internal/util/lift.ts":37233,"./current/node_modules/rxjs/src/internal/util/mapOneOrManyArgs":87367,"./current/node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts":87367,"./current/node_modules/rxjs/src/internal/util/noop":25045,"./current/node_modules/rxjs/src/internal/util/noop.ts":25045,"./current/node_modules/rxjs/src/internal/util/not":66340,"./current/node_modules/rxjs/src/internal/util/not.ts":66340,"./current/node_modules/rxjs/src/internal/util/pipe":96974,"./current/node_modules/rxjs/src/internal/util/pipe.ts":96974,"./current/node_modules/rxjs/src/internal/util/reportUnhandledError":75720,"./current/node_modules/rxjs/src/internal/util/reportUnhandledError.ts":75720,"./current/node_modules/rxjs/src/internal/util/subscribeToArray":13199,"./current/node_modules/rxjs/src/internal/util/subscribeToArray.ts":13199,"./current/node_modules/rxjs/src/internal/util/throwUnobservableError":14227,"./current/node_modules/rxjs/src/internal/util/throwUnobservableError.ts":14227,"./current/node_modules/rxjs/src/internal/util/workarounds":1167,"./current/node_modules/rxjs/src/internal/util/workarounds.ts":1167,"./current/node_modules/rxjs/src/operators":50403,"./current/node_modules/rxjs/src/operators/":50403,"./current/node_modules/rxjs/src/operators/index":50403,"./current/node_modules/rxjs/src/operators/index.ts":50403,"./current/node_modules/rxjs/src/testing":89057,"./current/node_modules/rxjs/src/testing/":89057,"./current/node_modules/rxjs/src/testing/index":89057,"./current/node_modules/rxjs/src/testing/index.ts":89057,"./current/node_modules/rxjs/src/tsconfig.base":20831,"./current/node_modules/rxjs/src/tsconfig.base.json":20831,"./current/node_modules/rxjs/src/tsconfig.cjs":96817,"./current/node_modules/rxjs/src/tsconfig.cjs.json":96817,"./current/node_modules/rxjs/src/tsconfig.cjs.spec":76120,"./current/node_modules/rxjs/src/tsconfig.cjs.spec.json":76120,"./current/node_modules/rxjs/src/tsconfig.esm":47601,"./current/node_modules/rxjs/src/tsconfig.esm.json":47601,"./current/node_modules/rxjs/src/tsconfig.esm5":35169,"./current/node_modules/rxjs/src/tsconfig.esm5.json":35169,"./current/node_modules/rxjs/src/tsconfig.esm5.rollup":96009,"./current/node_modules/rxjs/src/tsconfig.esm5.rollup.json":96009,"./current/node_modules/rxjs/src/tsconfig.types":25737,"./current/node_modules/rxjs/src/tsconfig.types.json":25737,"./current/node_modules/rxjs/src/tsconfig.types.spec":70084,"./current/node_modules/rxjs/src/tsconfig.types.spec.json":70084,"./current/node_modules/rxjs/src/webSocket":82652,"./current/node_modules/rxjs/src/webSocket/":82652,"./current/node_modules/rxjs/src/webSocket/index":82652,"./current/node_modules/rxjs/src/webSocket/index.ts":82652,"./current/src/create-a-connection":36033,"./current/src/create-a-connection.ts":36033,"./current/src/issue-anoncreds-credential-didcomm":76250,"./current/src/issue-anoncreds-credential-didcomm.ts":76250,"./current/src/mediation-recipient":98249,"./current/src/mediation-recipient.ts":98249,"./current/src/mediator-setup":71676,"./current/src/mediator-setup.ts":71676,"./current/src/register-schema-and-cred-def":71104,"./current/src/register-schema-and-cred-def.ts":71104,"./current/src/sd-jwt-vc-openid4vc":50723,"./current/src/sd-jwt-vc-openid4vc.ts":50723,"./current/src/set-up":52537,"./current/src/set-up-anoncreds":10902,"./current/src/set-up-anoncreds-rn":8182,"./current/src/set-up-anoncreds-rn.ts":8182,"./current/src/set-up-anoncreds.ts":10902,"./current/src/set-up-askar":50531,"./current/src/set-up-askar-rn":93106,"./current/src/set-up-askar-rn.ts":93106,"./current/src/set-up-askar.ts":50531,"./current/src/set-up-cheqd":31638,"./current/src/set-up-cheqd.ts":31638,"./current/src/set-up-indy-vdr":55453,"./current/src/set-up-indy-vdr-config":84613,"./current/src/set-up-indy-vdr-config.ts":84613,"./current/src/set-up-indy-vdr-rn":73995,"./current/src/set-up-indy-vdr-rn.ts":73995,"./current/src/set-up-indy-vdr.ts":55453,"./current/src/set-up-openid4vc-holder":38461,"./current/src/set-up-openid4vc-holder.ts":38461,"./current/src/set-up-openid4vc-issuer-verifier":38340,"./current/src/set-up-openid4vc-issuer-verifier.ts":38340,"./current/src/set-up-rn":1308,"./current/src/set-up-rn.ts":1308,"./current/src/set-up.ts":52537};function o(e){var n=s(e);return r(n)}function s(e){if(!r.o(t,e)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return t[e]}o.keys=function(){return Object.keys(t)},o.resolve=s,e.exports=o,o.id=32502}}]); \ No newline at end of file diff --git a/assets/js/1f391b9e.6c0409e0.js b/assets/js/1f391b9e.6c0409e0.js deleted file mode 100644 index 9402644..0000000 --- a/assets/js/1f391b9e.6c0409e0.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[3085,7918],{14247:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>u});var t=r(67294),o=r(86010),s=r(1944),i=r(35281),a=r(67003),d=r(65881),c=r(39407);const l={mdxPageWrapper:"mdxPageWrapper_j9I6"};function u(n){const{content:e}=n,{metadata:{title:r,description:u,frontMatter:m}}=e,{wrapperClassName:p,hide_table_of_contents:g}=m;return t.createElement(s.FG,{className:(0,o.Z)(p??i.k.wrapper.mdxPages,i.k.page.mdxPage)},t.createElement(s.d,{title:r,description:u}),t.createElement(a.Z,null,t.createElement("main",{className:"container container--fluid margin-vert--lg"},t.createElement("div",{className:(0,o.Z)("row",l.mdxPageWrapper)},t.createElement("div",{className:(0,o.Z)("col",!g&&"col--8")},t.createElement("article",null,t.createElement(d.Z,null,t.createElement(e,null)))),!g&&e.toc.length>0&&t.createElement("div",{className:"col col--2"},t.createElement(c.Z,{toc:e.toc,minHeadingLevel:m.toc_min_heading_level,maxHeadingLevel:m.toc_max_heading_level}))))))}},47083:(n,e,r)=>{"use strict";r.d(e,{Z:()=>u});var t=r(67294),o=r(86010),s=r(35281),i=r(95999);const a={admonition:"admonition_WoCw",admonitionHeading:"admonitionHeading_TMsN",admonitionIcon:"admonitionIcon_Ibzs",admonitionContent:"admonitionContent_vXIg"};const d={note:{infimaClassName:"secondary",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 14 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 12 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 12 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 14 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return t.createElement("svg",{viewBox:"0 0 16 16"},t.createElement("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"}))},label:t.createElement(i.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")},holder:{infimaClassName:"holder",emoji:"\ud83d\uddc4",label:t.createElement(i.Z,{id:"theme.admonition.holder",description:"The default label used for the Caution admonition (:::holder)"},"holder")},issuer:{infimaClassName:"issuer",emoji:"\ud83d\udcc4",label:t.createElement(i.Z,{id:"theme.admonition.issuer",description:"The default label used for the Caution admonition (:::issuer)"},"issuer")},verifier:{infimaClassName:"verifier",emoji:"\ud83d\udc6e",label:t.createElement(i.Z,{id:"theme.admonition.verifier",description:"The default label used for the Verifier admonition (:::verifier)"},"verifier")},bob:{infimaClassName:"bob",emoji:"\ud83e\uddd4",label:t.createElement(i.Z,{id:"theme.admonition.bob",description:"The default label used for the Bob admonition (:::bob)"},"bob")},acme:{infimaClassName:"acme",emoji:"\ud83c\udfe2",label:t.createElement(i.Z,{id:"theme.admonition.acme",description:"The default label used for the acme admonition (:::acme)"},"acme")}},c={secondary:"note",important:"info",success:"tip",warning:"danger"};function l(n){const{mdxAdmonitionTitle:e,rest:r}=function(n){const e=t.Children.toArray(n),r=e.find((n=>t.isValidElement(n)&&"mdxAdmonitionTitle"===n.props?.mdxType)),o=t.createElement(t.Fragment,null,e.filter((n=>n!==r)));return{mdxAdmonitionTitle:r,rest:o}}(n.children);return{...n,title:n.title??e,children:r}}function u(n){const{children:e,type:r,title:i,icon:u}=l(n),m=function(n){const e=c[n]??n,r=d[e];return r||(console.warn(`No admonition config found for admonition type "${e}". Using Info as fallback.`),d.info)}(r),p=i??m.label,{iconComponent:g,emoji:f}=m,h=u??f??t.createElement(g,null);return t.createElement("div",{className:(0,o.Z)(s.k.common.admonition,s.k.common.admonitionType(n.type),"alert",`alert--${m.infimaClassName}`,`admonition-${m.infimaClassName}`,a.admonition)},t.createElement("div",{className:a.admonitionHeading},t.createElement("span",{className:a.admonitionIcon},h),p),t.createElement("div",{className:a.admonitionContent},e))}},71415:(n,e,r)=>{"use strict";r.d(e,{Z:()=>s});var t=r(67294),o=r(78397);function s(n){return t.createElement(t.Fragment,null,t.createElement(o.Z,n))}},18573:(n,e,r)=>{"use strict";r.d(e,{Z:()=>p});var t=r(87462),o=r(67294),s=r(72389),i=r(81170),a=r(72138),d=r(74477);const c=n=>n.split(" ").find((n=>n.match(/^section-/)))?.substr(8),l=(n,e)=>{const r=`start-section-${n}`,t=`end-section-${n}`,o=e.split("\n"),s=o.indexOf(o.find((n=>n.includes(r)))),i=o.indexOf(o.find((n=>n.includes(t))));return o.slice(s+1,i).join("\r\n")},u=n=>n.split(" ").find((n=>n.match(/.(js|ts)$/))),m=n=>n.split("\n").filter((n=>!n.match(/section-/))).join("\r\n");function p(n){let{children:e,...p}=n;const g=(0,s.Z)(),f=(0,d.E)(),h=function(n){return o.Children.toArray(n).some((n=>(0,o.isValidElement)(n)))?n:Array.isArray(n)?n.join(""):n}(e),b=f.version,y="string"==typeof h?a.Z:i.Z;if(!p.metastring)return o.createElement(y,(0,t.Z)({key:String(g)},p),h);let w;try{w=r(32502)(`./${b}/src/${u(p.metastring)}`).default}catch{}const x=c(p.metastring);let j;return w&&(j=x?l(x,w):m(w)),o.createElement(y,(0,t.Z)({key:String(g)},p),j||h)}},77058:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n autoAcceptConnections: true,\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},92151:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n InitConfig,\n Agent,\n WsOutboundTransport,\n HttpOutboundTransport,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n DidExchangeState,\n AutoAcceptCredential,\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n OutOfBandRecord,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { Schema } from 'indy-sdk'\nimport fetch from 'node-fetch'\n\nconst getGenesisTransaction = async (url: string) => {\n // Legacy code has a small issue with the call-signature from node-fetch\n // @ts-ignore\n const response = await fetch(url)\n\n return await response.text()\n}\n\n// start-section-1\nconst initializeHolderAgent = async () => {\n const genesisTransactionsBCovrinTestNet = await getGenesisTransaction('http://test.bcovrin.vonx.io/genesis')\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-holder',\n walletConfig: {\n id: 'demo-agent-holder',\n key: 'demoagentholder00000000000000000',\n },\n indyLedgers: [\n {\n id: 'bcovrin-test-net',\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: genesisTransactionsBCovrinTestNet,\n },\n ],\n autoAcceptCredentials: AutoAcceptCredential.ContentApproved,\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3002'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeIssuerAgent = async () => {\n const genesisTransactionsBCovrinTestNet = await getGenesisTransaction('http://test.bcovrin.vonx.io/genesis')\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-issuer',\n walletConfig: {\n id: 'demo-agent-issuer',\n key: 'demoagentissuer00000000000000000',\n },\n publicDidSeed: 'demoissuerdidseed000000000000000',\n indyLedgers: [\n {\n id: 'bcovrin-test-net',\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: genesisTransactionsBCovrinTestNet,\n },\n ],\n autoAcceptCredentials: AutoAcceptCredential.ContentApproved,\n autoAcceptConnections: true,\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({ config, dependencies: agentDependencies })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst registerSchema = async (issuer: Agent) =>\n issuer.ledger.registerSchema({ attributes: ['name', 'age'], name: 'Identity', version: '1.0' })\n// end-section-3\n\n// start-section-4\nconst registerCredentialDefinition = async (issuer: Agent, schema: Schema) =>\n issuer.ledger.registerCredentialDefinition({ schema, supportRevocation: false, tag: 'default' })\n// end-section-4\n\n// start-section-5\nconst setupCredentialListener = (holder: Agent) => {\n holder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n })\n}\n// end-section-5\n\n// start-section-6\nconst issueCredential = async (issuer: Agent, credentialDefinitionId: string, connectionId: string) =>\n issuer.credentials.offerCredential({\n protocolVersion: 'v1',\n connectionId,\n credentialFormats: {\n indy: {\n credentialDefinitionId,\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n })\n// end-section-6\n\nconst createNewInvitation = async (issuer: Agent) => {\n const outOfBandRecord = await issuer.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n\nconst receiveInvitation = async (holder: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await holder.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n\nconst setupConnectionListener = (\n issuer: Agent,\n outOfBandRecord: OutOfBandRecord,\n cb: (...args: any) => Promise\n) => {\n issuer.events.on(ConnectionEventTypes.ConnectionStateChanged, async ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n await cb(payload.connectionRecord.id)\n }\n })\n}\n\nconst flow = (issuer: Agent) => async (connectionId: string) => {\n console.log('Registering the schema...')\n const schema = await registerSchema(issuer)\n console.log('Registering the credential definition...')\n const credentialDefinition = await registerCredentialDefinition(issuer, schema)\n console.log('Issuing the credential...')\n await issueCredential(issuer, credentialDefinition.id, connectionId)\n}\n\nconst run = async () => {\n console.log('Initializing the holder...')\n const holder = await initializeHolderAgent()\n console.log('Initializing the issuer...')\n const issuer = await initializeIssuerAgent()\n\n console.log('Initializing the credential listener...')\n setupCredentialListener(holder)\n\n console.log('Initializing the connection...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(issuer)\n setupConnectionListener(issuer, outOfBandRecord, flow(issuer))\n await receiveInvitation(holder, invitationUrl)\n}\n\nvoid run()\n"},3288:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\nimport { Agent, HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\n\n// start-section-1\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({ config, dependencies: agentDependencies })\n// end-section-1\n\n// start-section-2\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// start-section-3\nconst run = async () => {\n try {\n await agent.initialize()\n } catch (e) {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n }\n}\n// end-section-3\n\nvoid run()\n"},60420:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\nimport { Agent, HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\n\n// start-section-1\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({ config, dependencies: agentDependencies })\n// end-section-1\n\n// start-section-2\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nconst run = async () => {\n try {\n await agent.initialize()\n } catch (e) {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n }\n}\n// end-section-3\n\nvoid run()\n"},45343:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { AskarModule } from '@aries-framework/askar'\nimport {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n ConnectionsModule,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n }\n\n // A new instance of an agent is created here\n // Askar can also be replaced by the indy-sdk if required\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n // Askar can also be replaced by the indy-sdk if required\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},7283:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n DidsModule,\n HttpOutboundTransport,\n InitConfig,\n WsOutboundTransport,\n Agent,\n CredentialsModule,\n V2CredentialProtocol,\n} from '@aries-framework/core'\nimport { agentDependencies, HttpInboundTransport } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport {\n AnonCredsCredentialFormatService,\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n} from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst issuerConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-issuer',\n walletConfig: {\n id: 'wallet-id-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-holder',\n walletConfig: {\n id: 'wallet-id-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nissuer.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nissuer.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nissuer.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-1\n\n// start-section-2\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nholder.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nholder.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nholder.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-2\n\n// start-section-3\nholder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n})\n// end-section-3\n\n// start-section-4\nconst indyCredentialExchangeRecord = await issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n indy: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-4\n\n// start-section-5\nconst anonCredsCredentialExchangeRecord = issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-5\n"},8276:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n ConsoleLogger,\n HttpOutboundTransport,\n InitConfig,\n LogLevel,\n MediationRecipientModule,\n WsOutboundTransport,\n} from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport { agentDependencies } from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// start-section-1\nconst name = 'alice'\n\n// paste your invitation url here\n// or use the current invitation-url to connect to the public animo-mediator.\nconst mediatorInvitationUrl =\n 'https://mediator.dev.animo.id/invite?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIyMDc1MDM4YS05ZGU3LTRiODItYWUxYi1jNzBmNDg4MjYzYTciLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vbWVkaWF0b3IuZGV2LmFuaW1vLmlkIiwidHlwZSI6ImRpZC1jb21tdW5pY2F0aW9uIiwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtvSG9RTUphdU5VUE5OV1pQcEw3RGs1SzNtQ0NDMlBpNDJGY3FwR25iampMcSJdLCJyb3V0aW5nS2V5cyI6W119LHsiaWQiOiIjaW5saW5lLTEiLCJzZXJ2aWNlRW5kcG9pbnQiOiJ3c3M6Ly9tZWRpYXRvci5kZXYuYW5pbW8uaWQiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa29Ib1FNSmF1TlVQTk5XWlBwTDdEazVLM21DQ0MyUGk0MkZjcXBHbmJqakxxIl0sInJvdXRpbmdLZXlzIjpbXX1dfQ'\n\nconst agentConfig: InitConfig = {\n label: `Aries Framework JavaScript ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n logger: new ConsoleLogger(LogLevel.trace),\n}\n\nconst alice = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n mediationRecipient: new MediationRecipientModule({\n mediatorInvitationUrl,\n }),\n indySdk: new IndySdkModule({ indySdk }),\n },\n})\n\nalice.registerOutboundTransport(new HttpOutboundTransport())\nalice.registerOutboundTransport(new WsOutboundTransport())\n\nawait alice.initialize()\n// end-section-1\n"},50768:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n ConnectionsModule,\n HttpOutboundTransport,\n InitConfig,\n MediationStateChangedEvent,\n MediatorModule,\n RoutingEventTypes,\n} from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport { HttpInboundTransport, agentDependencies } from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// start-section-1\nconst name = 'mediator'\nconst port = 3001\n\nconst agentConfig: InitConfig = {\n label: `Aries Framework JavaScript ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n endpoints: [`http://localhost:${port}`],\n}\n\nconst mediator = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({ indySdk }),\n mediator: new MediatorModule({\n autoAcceptMediationRequests: true,\n }),\n connections: new ConnectionsModule({\n autoAcceptConnections: true,\n }),\n },\n})\n\nmediator.registerOutboundTransport(new HttpOutboundTransport())\nmediator.registerInboundTransport(new HttpInboundTransport({ port }))\n\nawait mediator.initialize()\nconst mediatorOutOfBandRecord = await mediator.oob.createInvitation({ multiUseInvitation: true })\n\nconst mediatiorInvitationUrl = mediatorOutOfBandRecord.outOfBandInvitation.toUrl({\n domain: `http://localhost:${port}`,\n})\nconsole.log(mediatiorInvitationUrl)\n// end-section-1\n\nmediator.events\n .observable(RoutingEventTypes.MediationStateChanged)\n .subscribe(({ payload }) => {\n console.log(`${name} mediation state: ${payload.mediationRecord.state}`)\n })\n"},62055:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { DidsModule, InitConfig, KeyType, LogLevel, TypedArrayEncoder } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs-register-schema-and-cred-def',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n} from '@aries-framework/cheqd'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // We do this to have access to a wallet\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()],\n }),\n },\n})\n// end-section-1\n\n// start-section-2\nconst seed = TypedArrayEncoder.fromString(``) // What you input on bcovrin. Should be kept secure in production!\nconst unqualifiedIndyDid = `` // will be returned after registering seed on bcovrin\nconst indyDid = `did:indy:bcovrin:test:${unqualifiedIndyDid}`\n\nconst cheqdDid = await agent.dids.create({\n method: 'cheqd',\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n\nawait agent.dids.import({\n did: '',\n overwrite: true,\n privateKeys: [\n {\n privateKey: seed,\n keyType: KeyType.Ed25519,\n },\n ],\n})\n// end-section-2\n\n// start-section-3\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: '',\n name: 'Example Schema to register',\n version: '1.0.0',\n },\n options: {},\n})\n\nif (schemaResult.schemaState.state === 'failed') {\n throw new Error(`Error creating schema: ${schemaResult.schemaState.reason}`)\n}\n// end-section-3\n\n// start-section-4\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n tag: 'default',\n issuerId: '',\n schemaId: schemaResult.schemaState.schemaId,\n },\n options: {},\n})\n\nif (credentialDefinitionResult.credentialDefinitionState.state === 'failed') {\n throw new Error(\n `Error creating credential definition: ${credentialDefinitionResult.credentialDefinitionState.reason}`\n )\n}\n// end-section-4\n"},96596:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},13099:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\nimport { AnonCredsRsModule } from '@aries-framework/anoncreds-rs'\nimport { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},78757:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},93716:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},12107:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { DidDocumentService, InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent, DidsModule, KeyType, DidDocument } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n CheqdDidCreateOptions,\n} from '@aries-framework/cheqd'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n dids: new DidsModule({\n registrars: [new CheqdDidRegistrar()],\n resolvers: [new CheqdDidResolver()],\n }),\n\n // AnonCreds\n anoncreds: new AnonCredsModule({\n registries: [new CheqdAnonCredsRegistry()],\n }),\n\n // Add cheqd module\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n\n// start-section-2\n\n// create a key pair\nconst key = await agent.wallet.createKey({\n keyType: KeyType.Ed25519,\n})\n\n// encode public key according to the verification method\nconst ed25519PublicKeyBase58 = key.publicKeyBase58\n\n// Create a DID\nawait agent.dids.create({\n method: 'cheqd',\n secret: {},\n options: {\n network: 'testnet',\n },\n didDocument: new DidDocument({\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n controller: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1',\n type: 'Ed25519VerificationKey2018',\n controller: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n publicKeyBase58: ed25519PublicKeyBase58,\n },\n ],\n authentication: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1'],\n }),\n})\n// end-section-2\n\n// start-section-3\nawait agent.dids.create({\n method: 'cheqd',\n // the secret contains a the verification method type and id\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n // an optional methodSpecificIdAlgo parameter\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n// end-section-3\n\n// start-section-4\nawait agent.dids.update({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // Updates DID Document with an additional verification method if provided\n secret: {\n verificationMethod: {\n id: 'key-2',\n type: 'JsonWebKey2020',\n },\n },\n didDocument: {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n controller: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1',\n type: 'Ed25519VerificationKey2020',\n controller: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n publicKeyMultibase: 'z6MknkzLUEP5cxqqsaysNMWoh8NJRb3YsowTCj2D6yhwyEdj',\n },\n ],\n authentication: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1'],\n // updates did document with a service block\n service: [\n new DidDocumentService({\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#rand',\n type: 'rand',\n serviceEndpoint: 'https://rand.in',\n }),\n ],\n },\n})\n// end-section-4\n\n// start-section-5\nawait agent.dids.deactivate({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // an optional versionId parameter\n options: {\n versionId: '3.0',\n },\n})\n// end-section-5\n"},84056:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport { Agent, InitConfig } from '@aries-framework/core'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport {\n agentDependencies,\n IndySdkPostgresStorageConfig,\n loadIndySdkPostgresPlugin,\n IndySdkPostgresWalletScheme,\n} from '@aries-framework/node'\nimport indySdk from 'indy-sdk'\n\n// IndySdkPostgresStorageConfig defines interface for the Postgres plugin configuration.\nconst storageConfig = {\n type: 'postgres_storage',\n config: {\n url: 'localhost:5432',\n wallet_scheme: IndySdkPostgresWalletScheme.DatabasePerWallet,\n },\n credentials: {\n account: 'postgres',\n password: 'postgres',\n admin_account: 'postgres',\n admin_password: 'postgres',\n },\n} satisfies IndySdkPostgresStorageConfig\n\n// load the postgres wallet plugin before agent initialization\nloadIndySdkPostgresPlugin(storageConfig.config, storageConfig.credentials)\n\nconst agentConfig: InitConfig = {\n label: 'My Agent',\n // walletConfig.id and walletConfig.key are still required\n walletConfig: {\n id: 'walletId',\n key: 'testKey0000000000000000000000000',\n // storage is added and defines the postgres plugin configuration\n storage: storageConfig,\n },\n}\n\nconst agent = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n"},51002:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport indySdk from 'indy-sdk-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Indy SDK module on the agent\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},12863:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { IndySdkModule } from '@aries-framework/indy-sdk'\nimport indySdk from 'indy-sdk'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Indy SDK module on the agent\n indySdk: new IndySdkModule({\n indySdk,\n }),\n },\n})\n// end-section-1\n\nawait agent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},99031:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { IndyVdrModule } from '@aries-framework/indy-vdr'\n\nconst modules = {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n indyNamespace: 'bcovrin:test',\n isProduction: false,\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n}\n// end-section-1\n"},44279:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-react-native'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},54437:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@aries-framework/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\nimport { AskarModule } from '@aries-framework/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},46121:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@aries-framework/core'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// TODO: we probably want to make this more specific to React Native,\n// so using it in a components and recommending to use the react hooks\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},61031:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@aries-framework/core'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/node'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@aries-framework/core'\nimport { HttpInboundTransport } from '@aries-framework/node'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},36033:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { AskarModule } from '@credo-ts/askar'\nimport {\n Agent,\n InitConfig,\n ConnectionEventTypes,\n ConnectionStateChangedEvent,\n WsOutboundTransport,\n HttpOutboundTransport,\n DidExchangeState,\n OutOfBandRecord,\n ConnectionsModule,\n} from '@credo-ts/core'\nimport { agentDependencies, HttpInboundTransport } from '@credo-ts/node'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\n// start-section-1\nconst initializeBobAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label. It also sets the mediator invitation url,\n // because this is most likely required in a mobile environment.\n const config: InitConfig = {\n label: 'demo-agent-bob',\n walletConfig: {\n id: 'mainBob',\n key: 'demoagentbob00000000000000000000',\n },\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-1\n\n// start-section-2\nconst initializeAcmeAgent = async () => {\n // Simple agent configuration. This sets some basic fields like the wallet\n // configuration and the label.\n const config: InitConfig = {\n label: 'demo-agent-acme',\n walletConfig: {\n id: 'mainAcme',\n key: 'demoagentacme0000000000000000000',\n },\n endpoints: ['http://localhost:3001'],\n }\n\n // A new instance of an agent is created here\n const agent = new Agent({\n config,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n connections: new ConnectionsModule({ autoAcceptConnections: true }),\n },\n dependencies: agentDependencies,\n })\n\n // Register a simple `WebSocket` outbound transport\n agent.registerOutboundTransport(new WsOutboundTransport())\n\n // Register a simple `Http` outbound transport\n agent.registerOutboundTransport(new HttpOutboundTransport())\n\n // Register a simple `Http` inbound transport\n agent.registerInboundTransport(new HttpInboundTransport({ port: 3001 }))\n\n // Initialize the agent\n await agent.initialize()\n\n return agent\n}\n// end-section-2\n\n// start-section-3\nconst createNewInvitation = async (agent: Agent) => {\n const outOfBandRecord = await agent.oob.createInvitation()\n\n return {\n invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: 'https://example.org' }),\n outOfBandRecord,\n }\n}\n// end-section-3\n\n// start-section-4\nconst createLegacyInvitation = async (agent: Agent) => {\n const { invitation } = await agent.oob.createLegacyInvitation()\n\n return invitation.toUrl({ domain: 'https://example.org' })\n}\n// end-section-4\n\n// start-section-5\nconst receiveInvitation = async (agent: Agent, invitationUrl: string) => {\n const { outOfBandRecord } = await agent.oob.receiveInvitationFromUrl(invitationUrl)\n\n return outOfBandRecord\n}\n// end-section-5\n\n// start-section-6\nconst setupConnectionListener = (agent: Agent, outOfBandRecord: OutOfBandRecord, cb: (...args: any) => void) => {\n agent.events.on(ConnectionEventTypes.ConnectionStateChanged, ({ payload }) => {\n if (payload.connectionRecord.outOfBandId !== outOfBandRecord.id) return\n if (payload.connectionRecord.state === DidExchangeState.Completed) {\n // the connection is now ready for usage in other protocols!\n console.log(`Connection for out-of-band id ${outOfBandRecord.id} completed`)\n\n // Custom business logic can be included here\n // In this example we can send a basic message to the connection, but\n // anything is possible\n cb()\n\n // We exit the flow\n process.exit(0)\n }\n })\n}\n\n// end-section-6\n\nconst run = async () => {\n console.log('Initializing Bob agent...')\n const bobAgent = await initializeBobAgent()\n console.log('Initializing Acme agent...')\n const acmeAgent = await initializeAcmeAgent()\n\n console.log('Creating the invitation as Acme...')\n const { outOfBandRecord, invitationUrl } = await createNewInvitation(acmeAgent)\n\n console.log('Listening for connection changes...')\n setupConnectionListener(acmeAgent, outOfBandRecord, () =>\n console.log('We now have an active connection to use in the following tutorials')\n )\n\n console.log('Accepting the invitation as Bob...')\n await receiveInvitation(bobAgent, invitationUrl)\n}\n\nexport default run\n\nvoid run()\n"},55536:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n CredentialEventTypes,\n CredentialState,\n CredentialStateChangedEvent,\n DidsModule,\n HttpOutboundTransport,\n InitConfig,\n WsOutboundTransport,\n Agent,\n CredentialsModule,\n V2CredentialProtocol,\n} from '@credo-ts/core'\nimport { agentDependencies, HttpInboundTransport } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport {\n AnonCredsCredentialFormatService,\n AnonCredsModule,\n LegacyIndyCredentialFormatService,\n} from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst issuerConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-issuer',\n walletConfig: {\n id: 'wallet-id-issuer',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst holderConfig: InitConfig = {\n label: 'docs-agent-nodejs-issue-a-credential-holder',\n walletConfig: {\n id: 'wallet-id-holder',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nconst issuer = new Agent({\n config: issuerConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nissuer.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nissuer.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nissuer.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-1\n\n// start-section-2\nconst holder = new Agent({\n config: holderConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n resolvers: [new IndyVdrIndyDidResolver()],\n }),\n credentials: new CredentialsModule({\n credentialProtocols: [\n new V2CredentialProtocol({\n credentialFormats: [new LegacyIndyCredentialFormatService(), new AnonCredsCredentialFormatService()],\n }),\n ],\n }),\n },\n})\n\n// Register a simple `WebSocket` outbound transport\nholder.registerOutboundTransport(new WsOutboundTransport())\n\n// Register a simple `Http` outbound transport\nholder.registerOutboundTransport(new HttpOutboundTransport())\n\n// Register a simple `Http` inbound transport\nholder.registerInboundTransport(new HttpInboundTransport({ port: 3002 }))\n// end-section-2\n\n// start-section-3\nholder.events.on(CredentialEventTypes.CredentialStateChanged, async ({ payload }) => {\n switch (payload.credentialRecord.state) {\n case CredentialState.OfferReceived:\n console.log('received a credential')\n // custom logic here\n await holder.credentials.acceptOffer({ credentialRecordId: payload.credentialRecord.id })\n case CredentialState.Done:\n console.log(`Credential for credential id ${payload.credentialRecord.id} is accepted`)\n // For demo purposes we exit the program here.\n process.exit(0)\n }\n})\n// end-section-3\n\n// start-section-4\nconst indyCredentialExchangeRecord = await issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n indy: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-4\n\n// start-section-5\nconst anonCredsCredentialExchangeRecord = issuer.credentials.offerCredential({\n protocolVersion: 'v2',\n connectionId: '',\n credentialFormats: {\n anoncreds: {\n credentialDefinitionId: '',\n attributes: [\n { name: 'name', value: 'Jane Doe' },\n { name: 'age', value: '23' },\n ],\n },\n },\n})\n// end-section-5\n"},98249:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n ConsoleLogger,\n HttpOutboundTransport,\n InitConfig,\n LogLevel,\n MediationRecipientModule,\n WsOutboundTransport,\n} from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport { agentDependencies } from '@credo-ts/node'\n\n// start-section-1\nconst name = 'alice'\n\n// paste your invitation url here\n// or use the current invitation-url to connect to the public animo-mediator.\nconst mediatorInvitationUrl =\n 'https://mediator.dev.animo.id/invite?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIyMDc1MDM4YS05ZGU3LTRiODItYWUxYi1jNzBmNDg4MjYzYTciLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHBzOi8vbWVkaWF0b3IuZGV2LmFuaW1vLmlkIiwidHlwZSI6ImRpZC1jb21tdW5pY2F0aW9uIiwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtvSG9RTUphdU5VUE5OV1pQcEw3RGs1SzNtQ0NDMlBpNDJGY3FwR25iampMcSJdLCJyb3V0aW5nS2V5cyI6W119LHsiaWQiOiIjaW5saW5lLTEiLCJzZXJ2aWNlRW5kcG9pbnQiOiJ3c3M6Ly9tZWRpYXRvci5kZXYuYW5pbW8uaWQiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa29Ib1FNSmF1TlVQTk5XWlBwTDdEazVLM21DQ0MyUGk0MkZjcXBHbmJqakxxIl0sInJvdXRpbmdLZXlzIjpbXX1dfQ'\n\nconst agentConfig: InitConfig = {\n label: `Credo ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n logger: new ConsoleLogger(LogLevel.trace),\n}\n\nconst alice = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n mediationRecipient: new MediationRecipientModule({\n mediatorInvitationUrl,\n }),\n askar: new AskarModule({ ariesAskar }),\n },\n})\n\nalice.registerOutboundTransport(new HttpOutboundTransport())\nalice.registerOutboundTransport(new WsOutboundTransport())\n\nawait alice.initialize()\n// end-section-1\n"},71676:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import {\n Agent,\n ConnectionsModule,\n HttpOutboundTransport,\n InitConfig,\n MediationStateChangedEvent,\n MediatorModule,\n RoutingEventTypes,\n} from '@credo-ts/core'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport { HttpInboundTransport, agentDependencies } from '@credo-ts/node'\n\n// start-section-1\nconst name = 'mediator'\nconst port = 3001\n\nconst agentConfig: InitConfig = {\n label: `Credo ${name}`,\n walletConfig: {\n id: name,\n key: name,\n },\n endpoints: [`http://localhost:${port}`],\n}\n\nconst mediator = new Agent({\n config: agentConfig,\n dependencies: agentDependencies,\n modules: {\n askar: new AskarModule({ ariesAskar }),\n mediator: new MediatorModule({\n autoAcceptMediationRequests: true,\n }),\n connections: new ConnectionsModule({\n autoAcceptConnections: true,\n }),\n },\n})\n\nmediator.registerOutboundTransport(new HttpOutboundTransport())\nmediator.registerInboundTransport(new HttpInboundTransport({ port }))\n\nawait mediator.initialize()\nconst mediatorOutOfBandRecord = await mediator.oob.createInvitation({ multiUseInvitation: true })\n\nconst mediatiorInvitationUrl = mediatorOutOfBandRecord.outOfBandInvitation.toUrl({\n domain: `http://localhost:${port}`,\n})\nconsole.log(mediatiorInvitationUrl)\n// end-section-1\n\nmediator.events\n .observable(RoutingEventTypes.MediationStateChanged)\n .subscribe(({ payload }) => {\n console.log(`${name} mediation state: ${payload.mediationRecord.state}`)\n })\n"},71104:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { DidsModule, InitConfig, KeyType, TypedArrayEncoder } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs-register-schema-and-cred-def',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\nimport {\n IndyVdrAnonCredsRegistry,\n IndyVdrIndyDidRegistrar,\n IndyVdrIndyDidResolver,\n IndyVdrModule,\n} from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n} from '@credo-ts/cheqd'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // We do this to have access to a wallet\n askar: new AskarModule({\n ariesAskar,\n }),\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry(), new CheqdAnonCredsRegistry()],\n anoncreds,\n }),\n dids: new DidsModule({\n registrars: [new IndyVdrIndyDidRegistrar(), new CheqdDidRegistrar()],\n resolvers: [new IndyVdrIndyDidResolver(), new CheqdDidResolver()],\n }),\n },\n})\n// end-section-1\n\n// start-section-2\nconst seed = TypedArrayEncoder.fromString(``) // What you input on bcovrin. Should be kept secure in production!\nconst unqualifiedIndyDid = `` // will be returned after registering seed on bcovrin\nconst indyDid = `did:indy:bcovrin:test:${unqualifiedIndyDid}`\n\nconst cheqdDid = await agent.dids.create({\n method: 'cheqd',\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n\nawait agent.dids.import({\n did: '',\n overwrite: true,\n privateKeys: [\n {\n privateKey: seed,\n keyType: KeyType.Ed25519,\n },\n ],\n})\n// end-section-2\n\n// start-section-3\nconst schemaResult = await agent.modules.anoncreds.registerSchema({\n schema: {\n attrNames: ['name'],\n issuerId: '',\n name: 'Example Schema to register',\n version: '1.0.0',\n },\n options: {},\n})\n\nif (schemaResult.schemaState.state === 'failed') {\n throw new Error(`Error creating schema: ${schemaResult.schemaState.reason}`)\n}\n// end-section-3\n\n// start-section-4\nconst credentialDefinitionResult = await agent.modules.anoncreds.registerCredentialDefinition({\n credentialDefinition: {\n tag: 'default',\n issuerId: '',\n schemaId: schemaResult.schemaState.schemaId,\n },\n options: {\n supportRevocation: false,\n },\n})\n\nif (credentialDefinitionResult.credentialDefinitionState.state === 'failed') {\n throw new Error(\n `Error creating credential definition: ${credentialDefinitionResult.credentialDefinitionState.reason}`\n )\n}\n// end-section-4\n"},8182:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { IndyVdrAnonCredsRegistry } from '@credo-ts/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},10902:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { IndyVdrAnonCredsRegistry } from '@credo-ts/indy-vdr'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n // This is included as we need a wallet on our agent\n askar: new AskarModule({\n ariesAskar,\n }),\n anoncreds: new AnonCredsModule({\n // Here we add an Indy VDR registry as an example, any AnonCreds registry\n // can be used\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},93106:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},50531:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n // Register the Askar module on the agent\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},31638:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import { DidDocumentService, InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent, DidsModule, KeyType, DidDocument } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport {\n CheqdAnonCredsRegistry,\n CheqdDidRegistrar,\n CheqdDidResolver,\n CheqdModule,\n CheqdModuleConfig,\n CheqdDidCreateOptions,\n} from '@credo-ts/cheqd'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n dids: new DidsModule({\n registrars: [new CheqdDidRegistrar()],\n resolvers: [new CheqdDidResolver()],\n }),\n\n // AnonCreds\n anoncreds: new AnonCredsModule({\n registries: [new CheqdAnonCredsRegistry()],\n anoncreds,\n }),\n\n // Add cheqd module\n cheqd: new CheqdModule(\n new CheqdModuleConfig({\n networks: [\n {\n network: '',\n cosmosPayerSeed: '',\n },\n ],\n })\n ),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n\n// start-section-2\n\n// create a key pair\nconst key = await agent.wallet.createKey({\n keyType: KeyType.Ed25519,\n})\n\n// encode public key according to the verification method\nconst ed25519PublicKeyBase58 = key.publicKeyBase58\n\n// Create a DID\nawait agent.dids.create({\n method: 'cheqd',\n secret: {},\n options: {},\n didDocument: new DidDocument({\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n controller: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1',\n type: 'Ed25519VerificationKey2018',\n controller: 'did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d',\n publicKeyBase58: ed25519PublicKeyBase58,\n },\n ],\n authentication: ['did:cheqd:testnet:92874297-d824-40ea-8ae5-364a1ec9237d#key-1'],\n }),\n})\n// end-section-2\n\n// start-section-3\nawait agent.dids.create({\n method: 'cheqd',\n // the secret contains a the verification method type and id\n secret: {\n verificationMethod: {\n id: 'key-1',\n type: 'Ed25519VerificationKey2020',\n },\n },\n // an optional methodSpecificIdAlgo parameter\n options: {\n network: 'testnet',\n methodSpecificIdAlgo: 'uuid',\n },\n})\n// end-section-3\n\n// start-section-4\nawait agent.dids.update({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // Updates DID Document with an additional verification method if provided\n secret: {\n verificationMethod: {\n id: 'key-2',\n type: 'JsonWebKey2020',\n },\n },\n didDocument: {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n controller: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411'],\n verificationMethod: [\n {\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1',\n type: 'Ed25519VerificationKey2020',\n controller: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n publicKeyMultibase: 'z6MknkzLUEP5cxqqsaysNMWoh8NJRb3YsowTCj2D6yhwyEdj',\n },\n ],\n authentication: ['did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#key-1'],\n // updates did document with a service block\n service: [\n new DidDocumentService({\n id: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411#rand',\n type: 'rand',\n serviceEndpoint: 'https://rand.in',\n }),\n ],\n },\n})\n// end-section-4\n\n// start-section-5\nawait agent.dids.deactivate({\n did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',\n // an optional versionId parameter\n options: {\n versionId: '3.0',\n },\n})\n// end-section-5\n"},84613:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { IndyVdrModule } from '@credo-ts/indy-vdr'\n\nconst modules = {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n indyNamespace: 'bcovrin:test',\n isProduction: false,\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n}\n// end-section-1\n"},73995:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-react-native'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-react-native'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-react-native'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},55453:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="import type { InitConfig } from '@credo-ts/core'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\n// start-section-1\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\nimport { AskarModule } from '@credo-ts/askar'\nimport { ariesAskar } from '@hyperledger/aries-askar-nodejs'\n\nimport { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr'\nimport { indyVdr } from '@hyperledger/indy-vdr-nodejs'\nimport { AnonCredsModule } from '@credo-ts/anoncreds'\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n modules: {\n indyVdr: new IndyVdrModule({\n indyVdr,\n networks: [\n {\n isProduction: false,\n indyNamespace: 'bcovrin:test',\n genesisTransactions: '',\n connectOnStartup: true,\n },\n ],\n }),\n anoncreds: new AnonCredsModule({\n registries: [new IndyVdrAnonCredsRegistry()],\n anoncreds,\n }),\n // Indy VDR can optionally be used with Askar as wallet and storage implementation\n askar: new AskarModule({\n ariesAskar,\n }),\n },\n})\n// end-section-1\n\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n"},1308:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@credo-ts/core'\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/react-native'\n\nconst config: InitConfig = {\n label: 'docs-agent-react-native',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\n// end-section-2\n\n// TODO: we probably want to make this more specific to React Native,\n// so using it in a components and recommending to use the react hooks\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},52537:(n,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>t});const t="// start-section-1\nimport type { InitConfig } from '@credo-ts/core'\nimport { Agent } from '@credo-ts/core'\nimport { agentDependencies } from '@credo-ts/node'\n\nconst config: InitConfig = {\n label: 'docs-agent-nodejs',\n walletConfig: {\n id: 'wallet-id',\n key: 'testkey0000000000000000000000000',\n },\n}\n\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n// end-section-1\n\n// start-section-2\nimport { HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'\nimport { HttpInboundTransport } from '@credo-ts/node'\n\n// ... agent setup from prevous section ...\n\nagent.registerOutboundTransport(new HttpOutboundTransport())\nagent.registerOutboundTransport(new WsOutboundTransport())\nagent.registerInboundTransport(new HttpInboundTransport({ port: 3000 }))\n// end-section-2\n\n// start-section-3\nagent\n .initialize()\n .then(() => {\n console.log('Agent initialized!')\n })\n .catch((e) => {\n console.error(`Something went wrong while setting up the agent! Message: ${e}`)\n })\n// end-section-3\n"},32502:(n,e,r)=>{var t={"./0.3/node_modules/did-resolver/src/__tests__/resolver.test":50349,"./0.3/node_modules/did-resolver/src/__tests__/resolver.test.ts":50349,"./0.3/node_modules/did-resolver/src/resolver":55883,"./0.3/node_modules/did-resolver/src/resolver.ts":55883,"./0.3/node_modules/luxon/src/datetime":38105,"./0.3/node_modules/luxon/src/datetime.js":38105,"./0.3/node_modules/luxon/src/duration":26721,"./0.3/node_modules/luxon/src/duration.js":26721,"./0.3/node_modules/luxon/src/errors":74015,"./0.3/node_modules/luxon/src/errors.js":74015,"./0.3/node_modules/luxon/src/impl/conversions":8498,"./0.3/node_modules/luxon/src/impl/conversions.js":8498,"./0.3/node_modules/luxon/src/impl/diff":38998,"./0.3/node_modules/luxon/src/impl/diff.js":38998,"./0.3/node_modules/luxon/src/impl/digits":29310,"./0.3/node_modules/luxon/src/impl/digits.js":29310,"./0.3/node_modules/luxon/src/impl/english":4039,"./0.3/node_modules/luxon/src/impl/english.js":4039,"./0.3/node_modules/luxon/src/impl/formats":85303,"./0.3/node_modules/luxon/src/impl/formats.js":85303,"./0.3/node_modules/luxon/src/impl/formatter":84756,"./0.3/node_modules/luxon/src/impl/formatter.js":84756,"./0.3/node_modules/luxon/src/impl/invalid":80760,"./0.3/node_modules/luxon/src/impl/invalid.js":80760,"./0.3/node_modules/luxon/src/impl/locale":80114,"./0.3/node_modules/luxon/src/impl/locale.js":80114,"./0.3/node_modules/luxon/src/impl/regexParser":31990,"./0.3/node_modules/luxon/src/impl/regexParser.js":31990,"./0.3/node_modules/luxon/src/impl/tokenParser":64546,"./0.3/node_modules/luxon/src/impl/tokenParser.js":64546,"./0.3/node_modules/luxon/src/impl/util":57866,"./0.3/node_modules/luxon/src/impl/util.js":57866,"./0.3/node_modules/luxon/src/impl/zoneUtil":99776,"./0.3/node_modules/luxon/src/impl/zoneUtil.js":99776,"./0.3/node_modules/luxon/src/info":16965,"./0.3/node_modules/luxon/src/info.js":16965,"./0.3/node_modules/luxon/src/interval":61591,"./0.3/node_modules/luxon/src/interval.js":61591,"./0.3/node_modules/luxon/src/luxon":18004,"./0.3/node_modules/luxon/src/luxon.js":18004,"./0.3/node_modules/luxon/src/luxonFilled":99972,"./0.3/node_modules/luxon/src/luxonFilled.js":99972,"./0.3/node_modules/luxon/src/settings":52636,"./0.3/node_modules/luxon/src/settings.js":52636,"./0.3/node_modules/luxon/src/zone":76476,"./0.3/node_modules/luxon/src/zone.js":76476,"./0.3/node_modules/luxon/src/zones/IANAZone":43176,"./0.3/node_modules/luxon/src/zones/IANAZone.js":43176,"./0.3/node_modules/luxon/src/zones/fixedOffsetZone":61840,"./0.3/node_modules/luxon/src/zones/fixedOffsetZone.js":61840,"./0.3/node_modules/luxon/src/zones/invalidZone":85092,"./0.3/node_modules/luxon/src/zones/invalidZone.js":85092,"./0.3/node_modules/luxon/src/zones/localZone":15617,"./0.3/node_modules/luxon/src/zones/localZone.js":15617,"./0.3/src/create-a-connection":77058,"./0.3/src/create-a-connection.ts":77058,"./0.3/src/issue-a-credential":92151,"./0.3/src/issue-a-credential.ts":92151,"./0.3/src/set-up":60420,"./0.3/src/set-up-rn":3288,"./0.3/src/set-up-rn.ts":3288,"./0.3/src/set-up.ts":60420,"./0.4/src/create-a-connection":45343,"./0.4/src/create-a-connection.ts":45343,"./0.4/src/issue-a-credential":7283,"./0.4/src/issue-a-credential.ts":7283,"./0.4/src/mediation-recipient":8276,"./0.4/src/mediation-recipient.ts":8276,"./0.4/src/mediator-setup":50768,"./0.4/src/mediator-setup.ts":50768,"./0.4/src/register-schema-and-cred-def":62055,"./0.4/src/register-schema-and-cred-def.ts":62055,"./0.4/src/set-up":61031,"./0.4/src/set-up-anoncreds-rs":13099,"./0.4/src/set-up-anoncreds-rs-rn":96596,"./0.4/src/set-up-anoncreds-rs-rn.ts":96596,"./0.4/src/set-up-anoncreds-rs.ts":13099,"./0.4/src/set-up-askar":93716,"./0.4/src/set-up-askar-rn":78757,"./0.4/src/set-up-askar-rn.ts":78757,"./0.4/src/set-up-askar.ts":93716,"./0.4/src/set-up-cheqd":12107,"./0.4/src/set-up-cheqd.ts":12107,"./0.4/src/set-up-indy-sdk":12863,"./0.4/src/set-up-indy-sdk-postgres":84056,"./0.4/src/set-up-indy-sdk-postgres.ts":84056,"./0.4/src/set-up-indy-sdk-rn":51002,"./0.4/src/set-up-indy-sdk-rn.ts":51002,"./0.4/src/set-up-indy-sdk.ts":12863,"./0.4/src/set-up-indy-vdr":54437,"./0.4/src/set-up-indy-vdr-config":99031,"./0.4/src/set-up-indy-vdr-config.ts":99031,"./0.4/src/set-up-indy-vdr-rn":44279,"./0.4/src/set-up-indy-vdr-rn.ts":44279,"./0.4/src/set-up-indy-vdr.ts":54437,"./0.4/src/set-up-rn":46121,"./0.4/src/set-up-rn.ts":46121,"./0.4/src/set-up.ts":61031,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/AndroidManifest.xml":29838,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/java/org/hyperledger/anoncreds/AnoncredsModule.java":90239,"./current/node_modules/@hyperledger/anoncreds-react-native/android/src/main/java/org/hyperledger/anoncreds/AnoncredsPackage.java":31354,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/AndroidManifest.xml":81332,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/java/org/hyperledger/ariesaskar/AriesAskarModule.java":8566,"./current/node_modules/@hyperledger/aries-askar-react-native/android/src/main/java/org/hyperledger/ariesaskar/AriesAskarPackage.java":2051,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/AndroidManifest.xml":94516,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/java/org/hyperledger/indyvdr/IndyVdrModule.java":11611,"./current/node_modules/@hyperledger/indy-vdr-react-native/android/src/main/java/org/hyperledger/indyvdr/IndyVdrPackage.java":79681,"./current/node_modules/rxjs/src/":76328,"./current/node_modules/rxjs/src/Rx.global":64147,"./current/node_modules/rxjs/src/Rx.global.js":64147,"./current/node_modules/rxjs/src/ajax":18398,"./current/node_modules/rxjs/src/ajax/":18398,"./current/node_modules/rxjs/src/ajax/index":18398,"./current/node_modules/rxjs/src/ajax/index.ts":18398,"./current/node_modules/rxjs/src/fetch":44106,"./current/node_modules/rxjs/src/fetch/":44106,"./current/node_modules/rxjs/src/fetch/index":44106,"./current/node_modules/rxjs/src/fetch/index.ts":44106,"./current/node_modules/rxjs/src/index":76328,"./current/node_modules/rxjs/src/index.ts":76328,"./current/node_modules/rxjs/src/internal/AnyCatcher":12930,"./current/node_modules/rxjs/src/internal/AnyCatcher.ts":12930,"./current/node_modules/rxjs/src/internal/AsyncSubject":58069,"./current/node_modules/rxjs/src/internal/AsyncSubject.ts":58069,"./current/node_modules/rxjs/src/internal/BehaviorSubject":49219,"./current/node_modules/rxjs/src/internal/BehaviorSubject.ts":49219,"./current/node_modules/rxjs/src/internal/Notification":71913,"./current/node_modules/rxjs/src/internal/Notification.ts":71913,"./current/node_modules/rxjs/src/internal/NotificationFactories":62590,"./current/node_modules/rxjs/src/internal/NotificationFactories.ts":62590,"./current/node_modules/rxjs/src/internal/Observable":59203,"./current/node_modules/rxjs/src/internal/Observable.ts":59203,"./current/node_modules/rxjs/src/internal/Operator":74287,"./current/node_modules/rxjs/src/internal/Operator.ts":74287,"./current/node_modules/rxjs/src/internal/ReplaySubject":62736,"./current/node_modules/rxjs/src/internal/ReplaySubject.ts":62736,"./current/node_modules/rxjs/src/internal/Scheduler":11213,"./current/node_modules/rxjs/src/internal/Scheduler.ts":11213,"./current/node_modules/rxjs/src/internal/Subject":29170,"./current/node_modules/rxjs/src/internal/Subject.ts":29170,"./current/node_modules/rxjs/src/internal/Subscriber":47811,"./current/node_modules/rxjs/src/internal/Subscriber.ts":47811,"./current/node_modules/rxjs/src/internal/Subscription":75160,"./current/node_modules/rxjs/src/internal/Subscription.ts":75160,"./current/node_modules/rxjs/src/internal/ajax/AjaxResponse":52004,"./current/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts":52004,"./current/node_modules/rxjs/src/internal/ajax/ajax":55791,"./current/node_modules/rxjs/src/internal/ajax/ajax.ts":55791,"./current/node_modules/rxjs/src/internal/ajax/errors":49930,"./current/node_modules/rxjs/src/internal/ajax/errors.ts":49930,"./current/node_modules/rxjs/src/internal/ajax/getXHRResponse":66594,"./current/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts":66594,"./current/node_modules/rxjs/src/internal/ajax/types":33731,"./current/node_modules/rxjs/src/internal/ajax/types.ts":33731,"./current/node_modules/rxjs/src/internal/config":17138,"./current/node_modules/rxjs/src/internal/config.ts":17138,"./current/node_modules/rxjs/src/internal/firstValueFrom":12451,"./current/node_modules/rxjs/src/internal/firstValueFrom.ts":12451,"./current/node_modules/rxjs/src/internal/lastValueFrom":70284,"./current/node_modules/rxjs/src/internal/lastValueFrom.ts":70284,"./current/node_modules/rxjs/src/internal/observable/ConnectableObservable":80001,"./current/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts":80001,"./current/node_modules/rxjs/src/internal/observable/bindCallback":9808,"./current/node_modules/rxjs/src/internal/observable/bindCallback.ts":9808,"./current/node_modules/rxjs/src/internal/observable/bindCallbackInternals":39780,"./current/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts":39780,"./current/node_modules/rxjs/src/internal/observable/bindNodeCallback":46853,"./current/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts":46853,"./current/node_modules/rxjs/src/internal/observable/combineLatest":24058,"./current/node_modules/rxjs/src/internal/observable/combineLatest.ts":24058,"./current/node_modules/rxjs/src/internal/observable/concat":87101,"./current/node_modules/rxjs/src/internal/observable/concat.ts":87101,"./current/node_modules/rxjs/src/internal/observable/connectable":82623,"./current/node_modules/rxjs/src/internal/observable/connectable.ts":82623,"./current/node_modules/rxjs/src/internal/observable/defer":91166,"./current/node_modules/rxjs/src/internal/observable/defer.ts":91166,"./current/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject":39290,"./current/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts":39290,"./current/node_modules/rxjs/src/internal/observable/dom/animationFrames":66007,"./current/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts":66007,"./current/node_modules/rxjs/src/internal/observable/dom/fetch":37045,"./current/node_modules/rxjs/src/internal/observable/dom/fetch.ts":37045,"./current/node_modules/rxjs/src/internal/observable/dom/webSocket":50101,"./current/node_modules/rxjs/src/internal/observable/dom/webSocket.ts":50101,"./current/node_modules/rxjs/src/internal/observable/empty":367,"./current/node_modules/rxjs/src/internal/observable/empty.ts":367,"./current/node_modules/rxjs/src/internal/observable/forkJoin":31029,"./current/node_modules/rxjs/src/internal/observable/forkJoin.ts":31029,"./current/node_modules/rxjs/src/internal/observable/from":22051,"./current/node_modules/rxjs/src/internal/observable/from.ts":22051,"./current/node_modules/rxjs/src/internal/observable/fromEvent":16273,"./current/node_modules/rxjs/src/internal/observable/fromEvent.ts":16273,"./current/node_modules/rxjs/src/internal/observable/fromEventPattern":8517,"./current/node_modules/rxjs/src/internal/observable/fromEventPattern.ts":8517,"./current/node_modules/rxjs/src/internal/observable/fromSubscribable":75735,"./current/node_modules/rxjs/src/internal/observable/fromSubscribable.ts":75735,"./current/node_modules/rxjs/src/internal/observable/generate":34758,"./current/node_modules/rxjs/src/internal/observable/generate.ts":34758,"./current/node_modules/rxjs/src/internal/observable/iif":92050,"./current/node_modules/rxjs/src/internal/observable/iif.ts":92050,"./current/node_modules/rxjs/src/internal/observable/innerFrom":41393,"./current/node_modules/rxjs/src/internal/observable/innerFrom.ts":41393,"./current/node_modules/rxjs/src/internal/observable/interval":8910,"./current/node_modules/rxjs/src/internal/observable/interval.ts":8910,"./current/node_modules/rxjs/src/internal/observable/merge":29870,"./current/node_modules/rxjs/src/internal/observable/merge.ts":29870,"./current/node_modules/rxjs/src/internal/observable/never":69848,"./current/node_modules/rxjs/src/internal/observable/never.ts":69848,"./current/node_modules/rxjs/src/internal/observable/of":7432,"./current/node_modules/rxjs/src/internal/observable/of.ts":7432,"./current/node_modules/rxjs/src/internal/observable/onErrorResumeNext":12129,"./current/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts":12129,"./current/node_modules/rxjs/src/internal/observable/pairs":20751,"./current/node_modules/rxjs/src/internal/observable/pairs.ts":20751,"./current/node_modules/rxjs/src/internal/observable/partition":35607,"./current/node_modules/rxjs/src/internal/observable/partition.ts":35607,"./current/node_modules/rxjs/src/internal/observable/race":66859,"./current/node_modules/rxjs/src/internal/observable/race.ts":66859,"./current/node_modules/rxjs/src/internal/observable/range":73133,"./current/node_modules/rxjs/src/internal/observable/range.ts":73133,"./current/node_modules/rxjs/src/internal/observable/throwError":84558,"./current/node_modules/rxjs/src/internal/observable/throwError.ts":84558,"./current/node_modules/rxjs/src/internal/observable/timer":18339,"./current/node_modules/rxjs/src/internal/observable/timer.ts":18339,"./current/node_modules/rxjs/src/internal/observable/using":82581,"./current/node_modules/rxjs/src/internal/observable/using.ts":82581,"./current/node_modules/rxjs/src/internal/observable/zip":32127,"./current/node_modules/rxjs/src/internal/observable/zip.ts":32127,"./current/node_modules/rxjs/src/internal/operators/OperatorSubscriber":95532,"./current/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts":95532,"./current/node_modules/rxjs/src/internal/operators/audit":45550,"./current/node_modules/rxjs/src/internal/operators/audit.ts":45550,"./current/node_modules/rxjs/src/internal/operators/auditTime":96786,"./current/node_modules/rxjs/src/internal/operators/auditTime.ts":96786,"./current/node_modules/rxjs/src/internal/operators/buffer":77427,"./current/node_modules/rxjs/src/internal/operators/buffer.ts":77427,"./current/node_modules/rxjs/src/internal/operators/bufferCount":76127,"./current/node_modules/rxjs/src/internal/operators/bufferCount.ts":76127,"./current/node_modules/rxjs/src/internal/operators/bufferTime":62259,"./current/node_modules/rxjs/src/internal/operators/bufferTime.ts":62259,"./current/node_modules/rxjs/src/internal/operators/bufferToggle":91402,"./current/node_modules/rxjs/src/internal/operators/bufferToggle.ts":91402,"./current/node_modules/rxjs/src/internal/operators/bufferWhen":6242,"./current/node_modules/rxjs/src/internal/operators/bufferWhen.ts":6242,"./current/node_modules/rxjs/src/internal/operators/catchError":98657,"./current/node_modules/rxjs/src/internal/operators/catchError.ts":98657,"./current/node_modules/rxjs/src/internal/operators/combineAll":22057,"./current/node_modules/rxjs/src/internal/operators/combineAll.ts":22057,"./current/node_modules/rxjs/src/internal/operators/combineLatest":74468,"./current/node_modules/rxjs/src/internal/operators/combineLatest.ts":74468,"./current/node_modules/rxjs/src/internal/operators/combineLatestAll":24586,"./current/node_modules/rxjs/src/internal/operators/combineLatestAll.ts":24586,"./current/node_modules/rxjs/src/internal/operators/combineLatestWith":53319,"./current/node_modules/rxjs/src/internal/operators/combineLatestWith.ts":53319,"./current/node_modules/rxjs/src/internal/operators/concat":25028,"./current/node_modules/rxjs/src/internal/operators/concat.ts":25028,"./current/node_modules/rxjs/src/internal/operators/concatAll":19784,"./current/node_modules/rxjs/src/internal/operators/concatAll.ts":19784,"./current/node_modules/rxjs/src/internal/operators/concatMap":67384,"./current/node_modules/rxjs/src/internal/operators/concatMap.ts":67384,"./current/node_modules/rxjs/src/internal/operators/concatMapTo":46756,"./current/node_modules/rxjs/src/internal/operators/concatMapTo.ts":46756,"./current/node_modules/rxjs/src/internal/operators/concatWith":27902,"./current/node_modules/rxjs/src/internal/operators/concatWith.ts":27902,"./current/node_modules/rxjs/src/internal/operators/connect":61795,"./current/node_modules/rxjs/src/internal/operators/connect.ts":61795,"./current/node_modules/rxjs/src/internal/operators/count":63791,"./current/node_modules/rxjs/src/internal/operators/count.ts":63791,"./current/node_modules/rxjs/src/internal/operators/debounce":17730,"./current/node_modules/rxjs/src/internal/operators/debounce.ts":17730,"./current/node_modules/rxjs/src/internal/operators/debounceTime":59048,"./current/node_modules/rxjs/src/internal/operators/debounceTime.ts":59048,"./current/node_modules/rxjs/src/internal/operators/defaultIfEmpty":78260,"./current/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts":78260,"./current/node_modules/rxjs/src/internal/operators/delay":36544,"./current/node_modules/rxjs/src/internal/operators/delay.ts":36544,"./current/node_modules/rxjs/src/internal/operators/delayWhen":7365,"./current/node_modules/rxjs/src/internal/operators/delayWhen.ts":7365,"./current/node_modules/rxjs/src/internal/operators/dematerialize":22854,"./current/node_modules/rxjs/src/internal/operators/dematerialize.ts":22854,"./current/node_modules/rxjs/src/internal/operators/distinct":27291,"./current/node_modules/rxjs/src/internal/operators/distinct.ts":27291,"./current/node_modules/rxjs/src/internal/operators/distinctUntilChanged":70231,"./current/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts":70231,"./current/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged":29789,"./current/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts":29789,"./current/node_modules/rxjs/src/internal/operators/elementAt":66898,"./current/node_modules/rxjs/src/internal/operators/elementAt.ts":66898,"./current/node_modules/rxjs/src/internal/operators/endWith":80025,"./current/node_modules/rxjs/src/internal/operators/endWith.ts":80025,"./current/node_modules/rxjs/src/internal/operators/every":28154,"./current/node_modules/rxjs/src/internal/operators/every.ts":28154,"./current/node_modules/rxjs/src/internal/operators/exhaust":80543,"./current/node_modules/rxjs/src/internal/operators/exhaust.ts":80543,"./current/node_modules/rxjs/src/internal/operators/exhaustAll":84336,"./current/node_modules/rxjs/src/internal/operators/exhaustAll.ts":84336,"./current/node_modules/rxjs/src/internal/operators/exhaustMap":21781,"./current/node_modules/rxjs/src/internal/operators/exhaustMap.ts":21781,"./current/node_modules/rxjs/src/internal/operators/expand":15504,"./current/node_modules/rxjs/src/internal/operators/expand.ts":15504,"./current/node_modules/rxjs/src/internal/operators/filter":78470,"./current/node_modules/rxjs/src/internal/operators/filter.ts":78470,"./current/node_modules/rxjs/src/internal/operators/finalize":44063,"./current/node_modules/rxjs/src/internal/operators/finalize.ts":44063,"./current/node_modules/rxjs/src/internal/operators/find":32546,"./current/node_modules/rxjs/src/internal/operators/find.ts":32546,"./current/node_modules/rxjs/src/internal/operators/findIndex":98500,"./current/node_modules/rxjs/src/internal/operators/findIndex.ts":98500,"./current/node_modules/rxjs/src/internal/operators/first":78513,"./current/node_modules/rxjs/src/internal/operators/first.ts":78513,"./current/node_modules/rxjs/src/internal/operators/flatMap":60189,"./current/node_modules/rxjs/src/internal/operators/flatMap.ts":60189,"./current/node_modules/rxjs/src/internal/operators/groupBy":20559,"./current/node_modules/rxjs/src/internal/operators/groupBy.ts":20559,"./current/node_modules/rxjs/src/internal/operators/ignoreElements":26020,"./current/node_modules/rxjs/src/internal/operators/ignoreElements.ts":26020,"./current/node_modules/rxjs/src/internal/operators/isEmpty":99465,"./current/node_modules/rxjs/src/internal/operators/isEmpty.ts":99465,"./current/node_modules/rxjs/src/internal/operators/joinAllInternals":66,"./current/node_modules/rxjs/src/internal/operators/joinAllInternals.ts":66,"./current/node_modules/rxjs/src/internal/operators/last":42094,"./current/node_modules/rxjs/src/internal/operators/last.ts":42094,"./current/node_modules/rxjs/src/internal/operators/map":92211,"./current/node_modules/rxjs/src/internal/operators/map.ts":92211,"./current/node_modules/rxjs/src/internal/operators/mapTo":60001,"./current/node_modules/rxjs/src/internal/operators/mapTo.ts":60001,"./current/node_modules/rxjs/src/internal/operators/materialize":2017,"./current/node_modules/rxjs/src/internal/operators/materialize.ts":2017,"./current/node_modules/rxjs/src/internal/operators/max":40135,"./current/node_modules/rxjs/src/internal/operators/max.ts":40135,"./current/node_modules/rxjs/src/internal/operators/merge":27586,"./current/node_modules/rxjs/src/internal/operators/merge.ts":27586,"./current/node_modules/rxjs/src/internal/operators/mergeAll":2523,"./current/node_modules/rxjs/src/internal/operators/mergeAll.ts":2523,"./current/node_modules/rxjs/src/internal/operators/mergeInternals":71645,"./current/node_modules/rxjs/src/internal/operators/mergeInternals.ts":71645,"./current/node_modules/rxjs/src/internal/operators/mergeMap":96348,"./current/node_modules/rxjs/src/internal/operators/mergeMap.ts":96348,"./current/node_modules/rxjs/src/internal/operators/mergeMapTo":77133,"./current/node_modules/rxjs/src/internal/operators/mergeMapTo.ts":77133,"./current/node_modules/rxjs/src/internal/operators/mergeScan":83401,"./current/node_modules/rxjs/src/internal/operators/mergeScan.ts":83401,"./current/node_modules/rxjs/src/internal/operators/mergeWith":27125,"./current/node_modules/rxjs/src/internal/operators/mergeWith.ts":27125,"./current/node_modules/rxjs/src/internal/operators/min":8190,"./current/node_modules/rxjs/src/internal/operators/min.ts":8190,"./current/node_modules/rxjs/src/internal/operators/multicast":45380,"./current/node_modules/rxjs/src/internal/operators/multicast.ts":45380,"./current/node_modules/rxjs/src/internal/operators/observeOn":66627,"./current/node_modules/rxjs/src/internal/operators/observeOn.ts":66627,"./current/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith":83521,"./current/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts":83521,"./current/node_modules/rxjs/src/internal/operators/pairwise":25690,"./current/node_modules/rxjs/src/internal/operators/pairwise.ts":25690,"./current/node_modules/rxjs/src/internal/operators/partition":60471,"./current/node_modules/rxjs/src/internal/operators/partition.ts":60471,"./current/node_modules/rxjs/src/internal/operators/pluck":27748,"./current/node_modules/rxjs/src/internal/operators/pluck.ts":27748,"./current/node_modules/rxjs/src/internal/operators/publish":62126,"./current/node_modules/rxjs/src/internal/operators/publish.ts":62126,"./current/node_modules/rxjs/src/internal/operators/publishBehavior":38829,"./current/node_modules/rxjs/src/internal/operators/publishBehavior.ts":38829,"./current/node_modules/rxjs/src/internal/operators/publishLast":6807,"./current/node_modules/rxjs/src/internal/operators/publishLast.ts":6807,"./current/node_modules/rxjs/src/internal/operators/publishReplay":33891,"./current/node_modules/rxjs/src/internal/operators/publishReplay.ts":33891,"./current/node_modules/rxjs/src/internal/operators/race":31715,"./current/node_modules/rxjs/src/internal/operators/race.ts":31715,"./current/node_modules/rxjs/src/internal/operators/raceWith":77153,"./current/node_modules/rxjs/src/internal/operators/raceWith.ts":77153,"./current/node_modules/rxjs/src/internal/operators/reduce":90881,"./current/node_modules/rxjs/src/internal/operators/reduce.ts":90881,"./current/node_modules/rxjs/src/internal/operators/refCount":73346,"./current/node_modules/rxjs/src/internal/operators/refCount.ts":73346,"./current/node_modules/rxjs/src/internal/operators/repeat":52435,"./current/node_modules/rxjs/src/internal/operators/repeat.ts":52435,"./current/node_modules/rxjs/src/internal/operators/repeatWhen":14668,"./current/node_modules/rxjs/src/internal/operators/repeatWhen.ts":14668,"./current/node_modules/rxjs/src/internal/operators/retry":75456,"./current/node_modules/rxjs/src/internal/operators/retry.ts":75456,"./current/node_modules/rxjs/src/internal/operators/retryWhen":77769,"./current/node_modules/rxjs/src/internal/operators/retryWhen.ts":77769,"./current/node_modules/rxjs/src/internal/operators/sample":36635,"./current/node_modules/rxjs/src/internal/operators/sample.ts":36635,"./current/node_modules/rxjs/src/internal/operators/sampleTime":72768,"./current/node_modules/rxjs/src/internal/operators/sampleTime.ts":72768,"./current/node_modules/rxjs/src/internal/operators/scan":37528,"./current/node_modules/rxjs/src/internal/operators/scan.ts":37528,"./current/node_modules/rxjs/src/internal/operators/scanInternals":19541,"./current/node_modules/rxjs/src/internal/operators/scanInternals.ts":19541,"./current/node_modules/rxjs/src/internal/operators/sequenceEqual":2387,"./current/node_modules/rxjs/src/internal/operators/sequenceEqual.ts":2387,"./current/node_modules/rxjs/src/internal/operators/share":67424,"./current/node_modules/rxjs/src/internal/operators/share.ts":67424,"./current/node_modules/rxjs/src/internal/operators/shareReplay":25189,"./current/node_modules/rxjs/src/internal/operators/shareReplay.ts":25189,"./current/node_modules/rxjs/src/internal/operators/single":66646,"./current/node_modules/rxjs/src/internal/operators/single.ts":66646,"./current/node_modules/rxjs/src/internal/operators/skip":85270,"./current/node_modules/rxjs/src/internal/operators/skip.ts":85270,"./current/node_modules/rxjs/src/internal/operators/skipLast":82550,"./current/node_modules/rxjs/src/internal/operators/skipLast.ts":82550,"./current/node_modules/rxjs/src/internal/operators/skipUntil":25672,"./current/node_modules/rxjs/src/internal/operators/skipUntil.ts":25672,"./current/node_modules/rxjs/src/internal/operators/skipWhile":57974,"./current/node_modules/rxjs/src/internal/operators/skipWhile.ts":57974,"./current/node_modules/rxjs/src/internal/operators/startWith":80515,"./current/node_modules/rxjs/src/internal/operators/startWith.ts":80515,"./current/node_modules/rxjs/src/internal/operators/subscribeOn":91483,"./current/node_modules/rxjs/src/internal/operators/subscribeOn.ts":91483,"./current/node_modules/rxjs/src/internal/operators/switchAll":10615,"./current/node_modules/rxjs/src/internal/operators/switchAll.ts":10615,"./current/node_modules/rxjs/src/internal/operators/switchMap":50520,"./current/node_modules/rxjs/src/internal/operators/switchMap.ts":50520,"./current/node_modules/rxjs/src/internal/operators/switchMapTo":38846,"./current/node_modules/rxjs/src/internal/operators/switchMapTo.ts":38846,"./current/node_modules/rxjs/src/internal/operators/switchScan":78802,"./current/node_modules/rxjs/src/internal/operators/switchScan.ts":78802,"./current/node_modules/rxjs/src/internal/operators/take":8082,"./current/node_modules/rxjs/src/internal/operators/take.ts":8082,"./current/node_modules/rxjs/src/internal/operators/takeLast":60396,"./current/node_modules/rxjs/src/internal/operators/takeLast.ts":60396,"./current/node_modules/rxjs/src/internal/operators/takeUntil":84483,"./current/node_modules/rxjs/src/internal/operators/takeUntil.ts":84483,"./current/node_modules/rxjs/src/internal/operators/takeWhile":54440,"./current/node_modules/rxjs/src/internal/operators/takeWhile.ts":54440,"./current/node_modules/rxjs/src/internal/operators/tap":86108,"./current/node_modules/rxjs/src/internal/operators/tap.ts":86108,"./current/node_modules/rxjs/src/internal/operators/throttle":48494,"./current/node_modules/rxjs/src/internal/operators/throttle.ts":48494,"./current/node_modules/rxjs/src/internal/operators/throttleTime":56364,"./current/node_modules/rxjs/src/internal/operators/throttleTime.ts":56364,"./current/node_modules/rxjs/src/internal/operators/throwIfEmpty":14796,"./current/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts":14796,"./current/node_modules/rxjs/src/internal/operators/timeInterval":2372,"./current/node_modules/rxjs/src/internal/operators/timeInterval.ts":2372,"./current/node_modules/rxjs/src/internal/operators/timeout":45907,"./current/node_modules/rxjs/src/internal/operators/timeout.ts":45907,"./current/node_modules/rxjs/src/internal/operators/timeoutWith":68110,"./current/node_modules/rxjs/src/internal/operators/timeoutWith.ts":68110,"./current/node_modules/rxjs/src/internal/operators/timestamp":74740,"./current/node_modules/rxjs/src/internal/operators/timestamp.ts":74740,"./current/node_modules/rxjs/src/internal/operators/toArray":48249,"./current/node_modules/rxjs/src/internal/operators/toArray.ts":48249,"./current/node_modules/rxjs/src/internal/operators/window":48387,"./current/node_modules/rxjs/src/internal/operators/window.ts":48387,"./current/node_modules/rxjs/src/internal/operators/windowCount":5509,"./current/node_modules/rxjs/src/internal/operators/windowCount.ts":5509,"./current/node_modules/rxjs/src/internal/operators/windowTime":64999,"./current/node_modules/rxjs/src/internal/operators/windowTime.ts":64999,"./current/node_modules/rxjs/src/internal/operators/windowToggle":93742,"./current/node_modules/rxjs/src/internal/operators/windowToggle.ts":93742,"./current/node_modules/rxjs/src/internal/operators/windowWhen":71402,"./current/node_modules/rxjs/src/internal/operators/windowWhen.ts":71402,"./current/node_modules/rxjs/src/internal/operators/withLatestFrom":83254,"./current/node_modules/rxjs/src/internal/operators/withLatestFrom.ts":83254,"./current/node_modules/rxjs/src/internal/operators/zip":63671,"./current/node_modules/rxjs/src/internal/operators/zip.ts":63671,"./current/node_modules/rxjs/src/internal/operators/zipAll":54061,"./current/node_modules/rxjs/src/internal/operators/zipAll.ts":54061,"./current/node_modules/rxjs/src/internal/operators/zipWith":11412,"./current/node_modules/rxjs/src/internal/operators/zipWith.ts":11412,"./current/node_modules/rxjs/src/internal/scheduled/scheduleArray":76131,"./current/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts":76131,"./current/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable":32929,"./current/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts":32929,"./current/node_modules/rxjs/src/internal/scheduled/scheduleIterable":65077,"./current/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts":65077,"./current/node_modules/rxjs/src/internal/scheduled/scheduleObservable":62083,"./current/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts":62083,"./current/node_modules/rxjs/src/internal/scheduled/schedulePromise":3693,"./current/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts":3693,"./current/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike":94579,"./current/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts":94579,"./current/node_modules/rxjs/src/internal/scheduled/scheduled":81499,"./current/node_modules/rxjs/src/internal/scheduled/scheduled.ts":81499,"./current/node_modules/rxjs/src/internal/scheduler/Action":79366,"./current/node_modules/rxjs/src/internal/scheduler/Action.ts":79366,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction":59747,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts":59747,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler":9483,"./current/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts":9483,"./current/node_modules/rxjs/src/internal/scheduler/AsapAction":66423,"./current/node_modules/rxjs/src/internal/scheduler/AsapAction.ts":66423,"./current/node_modules/rxjs/src/internal/scheduler/AsapScheduler":23926,"./current/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts":23926,"./current/node_modules/rxjs/src/internal/scheduler/AsyncAction":61747,"./current/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts":61747,"./current/node_modules/rxjs/src/internal/scheduler/AsyncScheduler":3385,"./current/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts":3385,"./current/node_modules/rxjs/src/internal/scheduler/QueueAction":6775,"./current/node_modules/rxjs/src/internal/scheduler/QueueAction.ts":6775,"./current/node_modules/rxjs/src/internal/scheduler/QueueScheduler":91797,"./current/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts":91797,"./current/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler":49598,"./current/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts":49598,"./current/node_modules/rxjs/src/internal/scheduler/animationFrame":15183,"./current/node_modules/rxjs/src/internal/scheduler/animationFrame.ts":15183,"./current/node_modules/rxjs/src/internal/scheduler/animationFrameProvider":87744,"./current/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts":87744,"./current/node_modules/rxjs/src/internal/scheduler/asap":19890,"./current/node_modules/rxjs/src/internal/scheduler/asap.ts":19890,"./current/node_modules/rxjs/src/internal/scheduler/async":86544,"./current/node_modules/rxjs/src/internal/scheduler/async.ts":86544,"./current/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider":49494,"./current/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts":49494,"./current/node_modules/rxjs/src/internal/scheduler/immediateProvider":78581,"./current/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts":78581,"./current/node_modules/rxjs/src/internal/scheduler/intervalProvider":44650,"./current/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts":44650,"./current/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider":10578,"./current/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts":10578,"./current/node_modules/rxjs/src/internal/scheduler/queue":17511,"./current/node_modules/rxjs/src/internal/scheduler/queue.ts":17511,"./current/node_modules/rxjs/src/internal/scheduler/timeoutProvider":44926,"./current/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts":44926,"./current/node_modules/rxjs/src/internal/scheduler/timerHandle":3221,"./current/node_modules/rxjs/src/internal/scheduler/timerHandle.ts":3221,"./current/node_modules/rxjs/src/internal/symbol/iterator":19430,"./current/node_modules/rxjs/src/internal/symbol/iterator.ts":19430,"./current/node_modules/rxjs/src/internal/symbol/observable":77709,"./current/node_modules/rxjs/src/internal/symbol/observable.ts":77709,"./current/node_modules/rxjs/src/internal/testing/ColdObservable":73662,"./current/node_modules/rxjs/src/internal/testing/ColdObservable.ts":73662,"./current/node_modules/rxjs/src/internal/testing/HotObservable":93657,"./current/node_modules/rxjs/src/internal/testing/HotObservable.ts":93657,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLog":63759,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts":63759,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLoggable":57968,"./current/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts":57968,"./current/node_modules/rxjs/src/internal/testing/TestMessage":79642,"./current/node_modules/rxjs/src/internal/testing/TestMessage.ts":79642,"./current/node_modules/rxjs/src/internal/testing/TestScheduler":11810,"./current/node_modules/rxjs/src/internal/testing/TestScheduler.ts":11810,"./current/node_modules/rxjs/src/internal/types":71628,"./current/node_modules/rxjs/src/internal/types.ts":71628,"./current/node_modules/rxjs/src/internal/umd":89799,"./current/node_modules/rxjs/src/internal/umd.ts":89799,"./current/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError":3837,"./current/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts":3837,"./current/node_modules/rxjs/src/internal/util/EmptyError":84367,"./current/node_modules/rxjs/src/internal/util/EmptyError.ts":84367,"./current/node_modules/rxjs/src/internal/util/Immediate":89811,"./current/node_modules/rxjs/src/internal/util/Immediate.ts":89811,"./current/node_modules/rxjs/src/internal/util/NotFoundError":59086,"./current/node_modules/rxjs/src/internal/util/NotFoundError.ts":59086,"./current/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError":13471,"./current/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts":13471,"./current/node_modules/rxjs/src/internal/util/SequenceError":64389,"./current/node_modules/rxjs/src/internal/util/SequenceError.ts":64389,"./current/node_modules/rxjs/src/internal/util/UnsubscriptionError":80789,"./current/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts":80789,"./current/node_modules/rxjs/src/internal/util/applyMixins":44470,"./current/node_modules/rxjs/src/internal/util/applyMixins.ts":44470,"./current/node_modules/rxjs/src/internal/util/args":93096,"./current/node_modules/rxjs/src/internal/util/args.ts":93096,"./current/node_modules/rxjs/src/internal/util/argsArgArrayOrObject":34925,"./current/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts":34925,"./current/node_modules/rxjs/src/internal/util/argsOrArgArray":75465,"./current/node_modules/rxjs/src/internal/util/argsOrArgArray.ts":75465,"./current/node_modules/rxjs/src/internal/util/arrRemove":22478,"./current/node_modules/rxjs/src/internal/util/arrRemove.ts":22478,"./current/node_modules/rxjs/src/internal/util/createErrorClass":87302,"./current/node_modules/rxjs/src/internal/util/createErrorClass.ts":87302,"./current/node_modules/rxjs/src/internal/util/createObject":26867,"./current/node_modules/rxjs/src/internal/util/createObject.ts":26867,"./current/node_modules/rxjs/src/internal/util/errorContext":65493,"./current/node_modules/rxjs/src/internal/util/errorContext.ts":65493,"./current/node_modules/rxjs/src/internal/util/executeSchedule":48598,"./current/node_modules/rxjs/src/internal/util/executeSchedule.ts":48598,"./current/node_modules/rxjs/src/internal/util/identity":90838,"./current/node_modules/rxjs/src/internal/util/identity.ts":90838,"./current/node_modules/rxjs/src/internal/util/isArrayLike":52957,"./current/node_modules/rxjs/src/internal/util/isArrayLike.ts":52957,"./current/node_modules/rxjs/src/internal/util/isAsyncIterable":34204,"./current/node_modules/rxjs/src/internal/util/isAsyncIterable.ts":34204,"./current/node_modules/rxjs/src/internal/util/isDate":42299,"./current/node_modules/rxjs/src/internal/util/isDate.ts":42299,"./current/node_modules/rxjs/src/internal/util/isFunction":74641,"./current/node_modules/rxjs/src/internal/util/isFunction.ts":74641,"./current/node_modules/rxjs/src/internal/util/isInteropObservable":77449,"./current/node_modules/rxjs/src/internal/util/isInteropObservable.ts":77449,"./current/node_modules/rxjs/src/internal/util/isIterable":57065,"./current/node_modules/rxjs/src/internal/util/isIterable.ts":57065,"./current/node_modules/rxjs/src/internal/util/isObservable":59605,"./current/node_modules/rxjs/src/internal/util/isObservable.ts":59605,"./current/node_modules/rxjs/src/internal/util/isPromise":98840,"./current/node_modules/rxjs/src/internal/util/isPromise.ts":98840,"./current/node_modules/rxjs/src/internal/util/isReadableStreamLike":71940,"./current/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts":71940,"./current/node_modules/rxjs/src/internal/util/isScheduler":64687,"./current/node_modules/rxjs/src/internal/util/isScheduler.ts":64687,"./current/node_modules/rxjs/src/internal/util/lift":37233,"./current/node_modules/rxjs/src/internal/util/lift.ts":37233,"./current/node_modules/rxjs/src/internal/util/mapOneOrManyArgs":87367,"./current/node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts":87367,"./current/node_modules/rxjs/src/internal/util/noop":25045,"./current/node_modules/rxjs/src/internal/util/noop.ts":25045,"./current/node_modules/rxjs/src/internal/util/not":66340,"./current/node_modules/rxjs/src/internal/util/not.ts":66340,"./current/node_modules/rxjs/src/internal/util/pipe":96974,"./current/node_modules/rxjs/src/internal/util/pipe.ts":96974,"./current/node_modules/rxjs/src/internal/util/reportUnhandledError":75720,"./current/node_modules/rxjs/src/internal/util/reportUnhandledError.ts":75720,"./current/node_modules/rxjs/src/internal/util/subscribeToArray":13199,"./current/node_modules/rxjs/src/internal/util/subscribeToArray.ts":13199,"./current/node_modules/rxjs/src/internal/util/throwUnobservableError":14227,"./current/node_modules/rxjs/src/internal/util/throwUnobservableError.ts":14227,"./current/node_modules/rxjs/src/internal/util/workarounds":1167,"./current/node_modules/rxjs/src/internal/util/workarounds.ts":1167,"./current/node_modules/rxjs/src/operators":50403,"./current/node_modules/rxjs/src/operators/":50403,"./current/node_modules/rxjs/src/operators/index":50403,"./current/node_modules/rxjs/src/operators/index.ts":50403,"./current/node_modules/rxjs/src/testing":89057,"./current/node_modules/rxjs/src/testing/":89057,"./current/node_modules/rxjs/src/testing/index":89057,"./current/node_modules/rxjs/src/testing/index.ts":89057,"./current/node_modules/rxjs/src/tsconfig.base":20831,"./current/node_modules/rxjs/src/tsconfig.base.json":20831,"./current/node_modules/rxjs/src/tsconfig.cjs":96817,"./current/node_modules/rxjs/src/tsconfig.cjs.json":96817,"./current/node_modules/rxjs/src/tsconfig.cjs.spec":76120,"./current/node_modules/rxjs/src/tsconfig.cjs.spec.json":76120,"./current/node_modules/rxjs/src/tsconfig.esm":47601,"./current/node_modules/rxjs/src/tsconfig.esm.json":47601,"./current/node_modules/rxjs/src/tsconfig.esm5":35169,"./current/node_modules/rxjs/src/tsconfig.esm5.json":35169,"./current/node_modules/rxjs/src/tsconfig.esm5.rollup":96009,"./current/node_modules/rxjs/src/tsconfig.esm5.rollup.json":96009,"./current/node_modules/rxjs/src/tsconfig.types":25737,"./current/node_modules/rxjs/src/tsconfig.types.json":25737,"./current/node_modules/rxjs/src/tsconfig.types.spec":70084,"./current/node_modules/rxjs/src/tsconfig.types.spec.json":70084,"./current/node_modules/rxjs/src/webSocket":82652,"./current/node_modules/rxjs/src/webSocket/":82652,"./current/node_modules/rxjs/src/webSocket/index":82652,"./current/node_modules/rxjs/src/webSocket/index.ts":82652,"./current/src/create-a-connection":36033,"./current/src/create-a-connection.ts":36033,"./current/src/issue-a-credential":55536,"./current/src/issue-a-credential.ts":55536,"./current/src/mediation-recipient":98249,"./current/src/mediation-recipient.ts":98249,"./current/src/mediator-setup":71676,"./current/src/mediator-setup.ts":71676,"./current/src/register-schema-and-cred-def":71104,"./current/src/register-schema-and-cred-def.ts":71104,"./current/src/set-up":52537,"./current/src/set-up-anoncreds":10902,"./current/src/set-up-anoncreds-rn":8182,"./current/src/set-up-anoncreds-rn.ts":8182,"./current/src/set-up-anoncreds.ts":10902,"./current/src/set-up-askar":50531,"./current/src/set-up-askar-rn":93106,"./current/src/set-up-askar-rn.ts":93106,"./current/src/set-up-askar.ts":50531,"./current/src/set-up-cheqd":31638,"./current/src/set-up-cheqd.ts":31638,"./current/src/set-up-indy-vdr":55453,"./current/src/set-up-indy-vdr-config":84613,"./current/src/set-up-indy-vdr-config.ts":84613,"./current/src/set-up-indy-vdr-rn":73995,"./current/src/set-up-indy-vdr-rn.ts":73995,"./current/src/set-up-indy-vdr.ts":55453,"./current/src/set-up-rn":1308,"./current/src/set-up-rn.ts":1308,"./current/src/set-up.ts":52537};function o(n){var e=s(n);return r(e)}function s(n){if(!r.o(t,n)){var e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}return t[n]}o.keys=function(){return Object.keys(t)},o.resolve=s,n.exports=o,o.id=32502}}]); \ No newline at end of file diff --git a/assets/js/2003ac23.9bc412a7.js b/assets/js/2003ac23.d8797b26.js similarity index 88% rename from assets/js/2003ac23.9bc412a7.js rename to assets/js/2003ac23.d8797b26.js index aff3d25..75a0fca 100644 --- a/assets/js/2003ac23.9bc412a7.js +++ b/assets/js/2003ac23.d8797b26.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7529],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,c=e.mdxType,i=e.originalType,s=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),u=l(n),m=c,f=u["".concat(s,".").concat(m)]||u[m]||d[m]||i;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var i=n.length,o=new Array(i);o[0]=m;var a={};for(var s in t)hasOwnProperty.call(t,s)&&(a[s]=t[s]);a.originalType=e,a[u]="string"==typeof e?e:c,o[1]=a;for(var l=2;l{n.d(t,{Z:()=>h});var r=n(67294),c=n(86010),i=n(53438),o=n(39960),a=n(13919),s=n(95999);const l={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function p(e){let{href:t,children:n}=e;return r.createElement(o.Z,{href:t,className:(0,c.Z)("card padding--lg",l.cardContainer)},n)}function u(e){let{href:t,icon:n,title:i,description:o}=e;return r.createElement(p,{href:t},r.createElement("h2",{className:(0,c.Z)("text--truncate",l.cardTitle),title:i},n," ",i),o&&r.createElement("p",{className:(0,c.Z)("text--truncate",l.cardDescription),title:o},o))}function d(e){let{item:t}=e;const n=(0,i.Wl)(t);return n?r.createElement(u,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,s.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const n=(0,a.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",c=(0,i.xz)(t.docId??void 0);return r.createElement(u,{href:t.href,icon:n,title:t.label,description:c?.description})}function f(e){let{item:t}=e;switch(t.type){case"link":return r.createElement(m,{item:t});case"category":return r.createElement(d,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function y(e){let{className:t}=e;const n=(0,i.jA)();return r.createElement(h,{items:n.items,className:t})}function h(e){const{items:t,className:n}=e;if(!t)return r.createElement(y,e);const o=(0,i.MN)(t);return r.createElement("section",{className:(0,c.Z)("row",n)},o.map(((e,t)=>r.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},r.createElement(f,{item:e})))))}},56314:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(87462),c=(n(67294),n(3905)),i=n(52991);const o={},a="Concepts",s={unversionedId:"concepts/index",id:"concepts/index",title:"Concepts",description:"In this section we will discuss the general concepts that are used inside the",source:"@site/guides/concepts/index.md",sourceDirName:"concepts",slug:"/concepts/",permalink:"/guides/concepts/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"cheqd",permalink:"/guides/getting-started/set-up/cheqd/"},next:{title:"Agents",permalink:"/guides/concepts/agents"}},l={},p=[],u={toc:p},d="wrapper";function m(e){let{components:t,...n}=e;return(0,c.kt)(d,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,c.kt)("h1",{id:"concepts"},"Concepts"),(0,c.kt)("p",null,"In this section we will discuss the general concepts that are used inside the\naries-javascript ecosystem. These concepts will help you understand the basics\non a high level."),(0,c.kt)(i.Z,{mdxType:"DocCardList"}))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7529],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,c=e.mdxType,i=e.originalType,s=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),u=l(n),m=c,f=u["".concat(s,".").concat(m)]||u[m]||d[m]||i;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var i=n.length,o=new Array(i);o[0]=m;var a={};for(var s in t)hasOwnProperty.call(t,s)&&(a[s]=t[s]);a.originalType=e,a[u]="string"==typeof e?e:c,o[1]=a;for(var l=2;l{n.d(t,{Z:()=>h});var r=n(67294),c=n(86010),i=n(53438),o=n(39960),a=n(13919),s=n(95999);const l={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function p(e){let{href:t,children:n}=e;return r.createElement(o.Z,{href:t,className:(0,c.Z)("card padding--lg",l.cardContainer)},n)}function u(e){let{href:t,icon:n,title:i,description:o}=e;return r.createElement(p,{href:t},r.createElement("h2",{className:(0,c.Z)("text--truncate",l.cardTitle),title:i},n," ",i),o&&r.createElement("p",{className:(0,c.Z)("text--truncate",l.cardDescription),title:o},o))}function d(e){let{item:t}=e;const n=(0,i.Wl)(t);return n?r.createElement(u,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,s.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const n=(0,a.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",c=(0,i.xz)(t.docId??void 0);return r.createElement(u,{href:t.href,icon:n,title:t.label,description:c?.description})}function f(e){let{item:t}=e;switch(t.type){case"link":return r.createElement(m,{item:t});case"category":return r.createElement(d,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function y(e){let{className:t}=e;const n=(0,i.jA)();return r.createElement(h,{items:n.items,className:t})}function h(e){const{items:t,className:n}=e;if(!t)return r.createElement(y,e);const o=(0,i.MN)(t);return r.createElement("section",{className:(0,c.Z)("row",n)},o.map(((e,t)=>r.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},r.createElement(f,{item:e})))))}},56314:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(87462),c=(n(67294),n(3905)),i=n(52991);const o={},a="Concepts",s={unversionedId:"concepts/index",id:"concepts/index",title:"Concepts",description:"In this section we will discuss the general concepts that are used inside the",source:"@site/guides/concepts/index.md",sourceDirName:"concepts",slug:"/concepts/",permalink:"/guides/concepts/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"OpenID for Verifiable Credentials",permalink:"/guides/getting-started/set-up/openid4vc"},next:{title:"Agents",permalink:"/guides/concepts/agents"}},l={},p=[],u={toc:p},d="wrapper";function m(e){let{components:t,...n}=e;return(0,c.kt)(d,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,c.kt)("h1",{id:"concepts"},"Concepts"),(0,c.kt)("p",null,"In this section we will discuss the general concepts that are used inside the\naries-javascript ecosystem. These concepts will help you understand the basics\non a high level."),(0,c.kt)(i.Z,{mdxType:"DocCardList"}))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2332f431.d45f2649.js b/assets/js/2332f431.ad58ccf3.js similarity index 98% rename from assets/js/2332f431.d45f2649.js rename to assets/js/2332f431.ad58ccf3.js index 1e562ea..9e5e704 100644 --- a/assets/js/2332f431.d45f2649.js +++ b/assets/js/2332f431.ad58ccf3.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[82],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(g,o(o({ref:t},c),{},{components:n})):a.createElement(g,o({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,o[1]=s;for(var u=2;u{n.d(t,{Z:()=>f});var a=n(67294),r=n(86010),i=n(53438),o=n(39960),s=n(13919),l=n(95999);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function c(e){let{href:t,children:n}=e;return a.createElement(o.Z,{href:t,className:(0,r.Z)("card padding--lg",u.cardContainer)},n)}function p(e){let{href:t,icon:n,title:i,description:o}=e;return a.createElement(c,{href:t},a.createElement("h2",{className:(0,r.Z)("text--truncate",u.cardTitle),title:i},n," ",i),o&&a.createElement("p",{className:(0,r.Z)("text--truncate",u.cardDescription),title:o},o))}function d(e){let{item:t}=e;const n=(0,i.Wl)(t);return n?a.createElement(p,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,l.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const n=(0,s.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,i.xz)(t.docId??void 0);return a.createElement(p,{href:t.href,icon:n,title:t.label,description:r?.description})}function g(e){let{item:t}=e;switch(t.type){case"link":return a.createElement(m,{item:t});case"category":return a.createElement(d,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function h(e){let{className:t}=e;const n=(0,i.jA)();return a.createElement(f,{items:n.items,className:t})}function f(e){const{items:t,className:n}=e;if(!t)return a.createElement(h,e);const o=(0,i.MN)(t);return a.createElement("section",{className:(0,r.Z)("row",n)},o.map(((e,t)=>a.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},a.createElement(g,{item:e})))))}},85162:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(67294),r=n(86010);const i={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(87462),r=n(67294),i=n(86010),o=n(12466),s=n(16550),l=n(91980),u=n(67392),c=n(50012);function p(e){return function(e){return r.Children.map(e,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[o,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[l,u]=g({queryString:n,groupId:a}),[p,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),f=(()=>{const e=l??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{f&&s(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),h(e)}),[u,h,i]),tabValues:i}}var f=n(72389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:s,selectValue:l,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==s&&(p(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,i.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":s===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=h(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b.tabList)},r.createElement(k,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},75920:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var a=n(87462),r=(n(67294),n(3905)),i=n(74866),o=n(85162),s=n(52991);const l={},u="Agent Setup",c={unversionedId:"getting-started/set-up/index",id:"getting-started/set-up/index",title:"Agent Setup",description:"This guide assumes you have followed the Prerequisites, and you have a valid",source:"@site/guides/getting-started/set-up/index.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/",permalink:"/guides/getting-started/set-up/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Prerequisites",permalink:"/guides/getting-started/prerequisites"},next:{title:"Aries Askar",permalink:"/guides/getting-started/set-up/aries-askar"}},p={},d=[{value:"Installing the required dependencies",id:"installing-the-required-dependencies",level:3},{value:"Additional setup",id:"additional-setup",level:3},{value:"Setting up the agent",id:"setting-up-the-agent",level:3},{value:"Adding a wallet and storage implementation",id:"adding-a-wallet-and-storage-implementation",level:3},{value:"Setting up the transports",id:"setting-up-the-transports",level:3},{value:"Initializing the agent",id:"initializing-the-agent",level:3},{value:"Next Steps",id:"next-steps",level:3},{value:"Useful resources",id:"useful-resources",level:3}],m={toc:d},g="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(g,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"agent-setup"},"Agent Setup"),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This guide assumes you have followed the ",(0,r.kt)("a",{parentName:"p",href:"./prerequisites"},"Prerequisites"),", and you have a valid\n",(0,r.kt)("a",{parentName:"p",href:"https://nodejs.org"},"Node.JS")," or ",(0,r.kt)("a",{parentName:"p",href:"https://reactnative.dev"},"React Native")," project setup.")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Credo is still in ",(0,r.kt)("strong",{parentName:"p"},"active development"),", and as such some APIs are still experimental. ",(0,r.kt)("strong",{parentName:"p"},"When using any experimental features, make sure to use an exact version of Credo")," (",(0,r.kt)("inlineCode",{parentName:"p"},"0.5.0"),") instead of a range (",(0,r.kt)("inlineCode",{parentName:"p"},"^0.5.0"),"), to prevent accidental breaking changes. If you're not leveraging any experimental features, you can use a range (",(0,r.kt)("inlineCode",{parentName:"p"},"^0.5.0"),") to get the latest bugfixes and features."),(0,r.kt)("p",{parentName:"admonition"},"For Credo ",(0,r.kt)("inlineCode",{parentName:"p"},"0.5.x"),", ",(0,r.kt)("strong",{parentName:"p"},"the following features are experimental"),":"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"Using OpenID4VC from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/openid4vc")," module"),(0,r.kt)("li",{parentName:"ul"},"SD-JWT Verifiable Credentials"),(0,r.kt)("li",{parentName:"ul"},"Using multi-tenancy from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/tenants")," module"),(0,r.kt)("li",{parentName:"ul"},"Using BBS+ Signatures from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/bbs-signatures")," module"),(0,r.kt)("li",{parentName:"ul"},"Using the cheqd module from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/cheqd")," module"),(0,r.kt)("li",{parentName:"ul"},"Using DIF Presentation Exchange"),(0,r.kt)("li",{parentName:"ul"},"Using AnonCreds in the W3C Verifiable Credential format"))),(0,r.kt)("h3",{id:"installing-the-required-dependencies"},"Installing the required dependencies"),(0,r.kt)("p",null,"First we have to install the minimal amount of dependencies that are required for configuring an Credo agent."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.JS",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/core@^0.5.3 @credo-ts/node@^0.5.3\n"))),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/core@^0.5.3 @credo-ts/react-native@^0.5.3 react-native-fs react-native-get-random-values\n")))),(0,r.kt)("h3",{id:"additional-setup"},"Additional setup"),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,r.kt)("p",null,"No additional setup is required for Node.JS")),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("p",null,"Since ",(0,r.kt)("a",{parentName:"p",href:"https://reactnative.dev"},"React Native")," does not have an implementation\nfor\n",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues"},(0,r.kt)("inlineCode",{parentName:"a"},"crypto.getRandomValues()")),"\nwe have to setup a polyfill for this. We have to do this at the entrypoint of\nthe application. This could is most likely ",(0,r.kt)("inlineCode",{parentName:"p"},"index.(js|ts|jsx|tsx)")," at the root\nof your application."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff",metastring:'title="index.tsx" showLineNumbers',title:'"index.tsx"',showLineNumbers:!0},"+ import 'react-native-get-random-values'\n")),(0,r.kt)("p",null,"In addition you need add support for resolving modules with the ",(0,r.kt)("inlineCode",{parentName:"p"},".cjs")," extension, as this is used by some of Credo's dependencies and not automatically supported by React Native."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="metro.config.js" showLineNumbers',title:'"metro.config.js"',showLineNumbers:!0},"module.exports = {\n // ... other Metro config options ...\n resolver: {\n // make sure this includes `cjs` (and other extensions you need)\n sourceExts: ['js', 'json', 'ts', 'tsx', 'cjs'],\n },\n}\n")),(0,r.kt)("p",null,"Finally, if you're using ",(0,r.kt)("a",{parentName:"p",href:"https://expo.dev"},"Expo")," you need to add a custom resolution 'hack' that removes support for the legacy unimodules."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Yarn")),(0,r.kt)("p",null,"For yarn we can replace the ",(0,r.kt)("inlineCode",{parentName:"p"},"@unimodules/react-native-adapter")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"@unimodules/core")," dependencies with an empty directory. Make sure to create the ",(0,r.kt)("inlineCode",{parentName:"p"},"noop")," directory in the root of your project and create a ",(0,r.kt)("inlineCode",{parentName:"p"},".gitkeep")," file in the directory so that the directory is committed to your repository."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="package.json" showLineNumbers',title:'"package.json"',showLineNumbers:!0},'{\n // ... other package.json options ...\n "resolutions": {\n "@unimodules/react-native-adapter": "./noop",\n "@unimodules/core": "./noop"\n }\n}\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"NPM")),(0,r.kt)("p",null,"Not supported at the moment. NPM overrides work different than Yarn resolutions, and thus we can't use the same trick. If you're using NPM, feel free to open a PR with a working solution."))),(0,r.kt)("h3",{id:"setting-up-the-agent"},"Setting up the agent"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"this section does not assume any knowledge of the agent configuration.\nIn the ",(0,r.kt)("a",{parentName:"p",href:"../tutorials/agent-config"},"Agent Config")," tutorial we will discuss in-depth what every\nfield in the configuration does and when to set it.")),(0,r.kt)("p",null,"In order to use the agent in the application we have to configure and\ninitialize it. This following configuration is quite generic and possibly not\nenough for your specific use cases. Please refer to the\n",(0,r.kt)("a",{parentName:"p",href:"../tutorials"},"tutorials")," for a more use-case-specific agent setup."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.JS",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up.ts section-1",showLineNumbers:!0,"set-up.ts":!0,"section-1":!0},""))),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-rn.ts section-1",showLineNumbers:!0,"set-up-rn.ts":!0,"section-1":!0},"")))),(0,r.kt)("h3",{id:"adding-a-wallet-and-storage-implementation"},"Adding a wallet and storage implementation"),(0,r.kt)("p",null,"After creating the ",(0,r.kt)("inlineCode",{parentName:"p"},"Agent")," instance, we need to provide the agent with a wallet and storage implementation. Credo provides one implementations out of the box, but you can also implement your own. Currently a Wallet and Storage implementation using Aries Askar is supported out of the box."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./set-up/aries-askar"},"Aries Askar"))),(0,r.kt)(s.Z,{items:[{type:"link",label:"Aries Askar",href:"./set-up/aries-askar",docId:"getting-started/set-up/aries-askar"}],mdxType:"DocCardList"}),(0,r.kt)("h3",{id:"setting-up-the-transports"},"Setting up the transports"),(0,r.kt)("p",null,"Finally, we have to set an outbound transport that\nwill handle traffic from the agent. It is also possible to set an inbound\ntransport in the same way as the outbound transport."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,r.kt)("p",null,"Sets up an WS outbound and HTTP inbound and outbound transport."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up.ts section-2",showLineNumbers:!0,"set-up.ts":!0,"section-2":!0},""))),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("p",null,"For mobile agents the WebSocket transport is often required. We will go into\nmore depth about the reasons for this in the ",(0,r.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation"},"mediation")," section."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-rn.ts section-2",showLineNumbers:!0,"set-up-rn.ts":!0,"section-2":!0},"")))),(0,r.kt)("h3",{id:"initializing-the-agent"},"Initializing the agent"),(0,r.kt)("p",null,"Finally, we can initialize the agent and it's ready for use."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up.ts section-3",showLineNumbers:!0,"set-up.ts":!0,"section-3":!0},""))),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-rn.ts section-3",showLineNumbers:!0,"set-up-rn.ts":!0,"section-3":!0},"")))),(0,r.kt)("h3",{id:"next-steps"},"Next Steps"),(0,r.kt)("p",null,"Now that you have your agent setup, it's time to start building your application. Head over to the tutorials page to get started."),(0,r.kt)(s.Z,{items:[{type:"link",label:"Tutorials",href:"../tutorials/index",docId:"tutorials/index"},{type:"link",label:"Create a Connection",href:"../tutorials/create-a-connection",docId:"tutorials/create-a-connection"}],mdxType:"DocCardList"}),(0,r.kt)("h3",{id:"useful-resources"},"Useful resources"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0004-agents/README.md"},"Hyperledger Aries RFC - 004:\nAgents"))))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[82],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(g,o(o({ref:t},c),{},{components:n})):a.createElement(g,o({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,o[1]=s;for(var u=2;u{n.d(t,{Z:()=>f});var a=n(67294),r=n(86010),i=n(53438),o=n(39960),s=n(13919),l=n(95999);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function c(e){let{href:t,children:n}=e;return a.createElement(o.Z,{href:t,className:(0,r.Z)("card padding--lg",u.cardContainer)},n)}function p(e){let{href:t,icon:n,title:i,description:o}=e;return a.createElement(c,{href:t},a.createElement("h2",{className:(0,r.Z)("text--truncate",u.cardTitle),title:i},n," ",i),o&&a.createElement("p",{className:(0,r.Z)("text--truncate",u.cardDescription),title:o},o))}function d(e){let{item:t}=e;const n=(0,i.Wl)(t);return n?a.createElement(p,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,l.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const n=(0,s.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,i.xz)(t.docId??void 0);return a.createElement(p,{href:t.href,icon:n,title:t.label,description:r?.description})}function g(e){let{item:t}=e;switch(t.type){case"link":return a.createElement(m,{item:t});case"category":return a.createElement(d,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function h(e){let{className:t}=e;const n=(0,i.jA)();return a.createElement(f,{items:n.items,className:t})}function f(e){const{items:t,className:n}=e;if(!t)return a.createElement(h,e);const o=(0,i.MN)(t);return a.createElement("section",{className:(0,r.Z)("row",n)},o.map(((e,t)=>a.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},a.createElement(g,{item:e})))))}},85162:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(67294),r=n(86010);const i={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(87462),r=n(67294),i=n(86010),o=n(12466),s=n(16550),l=n(91980),u=n(67392),c=n(50012);function p(e){return function(e){return r.Children.map(e,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[o,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[l,u]=g({queryString:n,groupId:a}),[p,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),f=(()=>{const e=l??p;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{f&&s(f)}),[f]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),h(e)}),[u,h,i]),tabValues:i}}var f=n(72389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:s,selectValue:l,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==s&&(p(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,i.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":s===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:a}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=h(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b.tabList)},r.createElement(k,(0,a.Z)({},e,t)),r.createElement(y,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},75920:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var a=n(87462),r=(n(67294),n(3905)),i=n(74866),o=n(85162),s=n(52991);const l={},u="Agent Setup",c={unversionedId:"getting-started/set-up/index",id:"getting-started/set-up/index",title:"Agent Setup",description:"This guide assumes you have followed the Prerequisites, and you have a valid",source:"@site/guides/getting-started/set-up/index.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/",permalink:"/guides/getting-started/set-up/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Prerequisites",permalink:"/guides/getting-started/prerequisites"},next:{title:"Aries Askar",permalink:"/guides/getting-started/set-up/aries-askar"}},p={},d=[{value:"Installing the required dependencies",id:"installing-the-required-dependencies",level:3},{value:"Additional setup",id:"additional-setup",level:3},{value:"Setting up the agent",id:"setting-up-the-agent",level:3},{value:"Adding a wallet and storage implementation",id:"adding-a-wallet-and-storage-implementation",level:3},{value:"Setting up the transports",id:"setting-up-the-transports",level:3},{value:"Initializing the agent",id:"initializing-the-agent",level:3},{value:"Next Steps",id:"next-steps",level:3},{value:"Useful resources",id:"useful-resources",level:3}],m={toc:d},g="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(g,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"agent-setup"},"Agent Setup"),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This guide assumes you have followed the ",(0,r.kt)("a",{parentName:"p",href:"./prerequisites"},"Prerequisites"),", and you have a valid\n",(0,r.kt)("a",{parentName:"p",href:"https://nodejs.org"},"Node.js")," or ",(0,r.kt)("a",{parentName:"p",href:"https://reactnative.dev"},"React Native")," project setup.")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Credo is still in ",(0,r.kt)("strong",{parentName:"p"},"active development"),", and as such some APIs are still experimental. ",(0,r.kt)("strong",{parentName:"p"},"When using any experimental features, make sure to use an exact version of Credo")," (",(0,r.kt)("inlineCode",{parentName:"p"},"0.5.0"),") instead of a range (",(0,r.kt)("inlineCode",{parentName:"p"},"^0.5.0"),"), to prevent accidental breaking changes. If you're not leveraging any experimental features, you can use a range (",(0,r.kt)("inlineCode",{parentName:"p"},"^0.5.0"),") to get the latest bugfixes and features."),(0,r.kt)("p",{parentName:"admonition"},"For Credo ",(0,r.kt)("inlineCode",{parentName:"p"},"0.5.x"),", ",(0,r.kt)("strong",{parentName:"p"},"the following features are experimental"),":"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"Using OpenID4VC from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/openid4vc")," module"),(0,r.kt)("li",{parentName:"ul"},"SD-JWT Verifiable Credentials"),(0,r.kt)("li",{parentName:"ul"},"Using multi-tenancy from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/tenants")," module"),(0,r.kt)("li",{parentName:"ul"},"Using BBS+ Signatures from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/bbs-signatures")," module"),(0,r.kt)("li",{parentName:"ul"},"Using the cheqd module from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/cheqd")," module"),(0,r.kt)("li",{parentName:"ul"},"Using DIF Presentation Exchange"),(0,r.kt)("li",{parentName:"ul"},"Using AnonCreds in the W3C Verifiable Credential format"))),(0,r.kt)("h3",{id:"installing-the-required-dependencies"},"Installing the required dependencies"),(0,r.kt)("p",null,"First we have to install the minimal amount of dependencies that are required for configuring an Credo agent."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/core@^0.5.3 @credo-ts/node@^0.5.3\n"))),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/core@^0.5.3 @credo-ts/react-native@^0.5.3 react-native-fs react-native-get-random-values\n")))),(0,r.kt)("h3",{id:"additional-setup"},"Additional setup"),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,r.kt)("p",null,"No additional setup is required for Node.js")),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("p",null,"Since ",(0,r.kt)("a",{parentName:"p",href:"https://reactnative.dev"},"React Native")," does not have an implementation\nfor\n",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues"},(0,r.kt)("inlineCode",{parentName:"a"},"crypto.getRandomValues()")),"\nwe have to setup a polyfill for this. We have to do this at the entrypoint of\nthe application. This could is most likely ",(0,r.kt)("inlineCode",{parentName:"p"},"index.(js|ts|jsx|tsx)")," at the root\nof your application."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-diff",metastring:'title="index.tsx" showLineNumbers',title:'"index.tsx"',showLineNumbers:!0},"+ import 'react-native-get-random-values'\n")),(0,r.kt)("p",null,"In addition you need add support for resolving modules with the ",(0,r.kt)("inlineCode",{parentName:"p"},".cjs")," extension, as this is used by some of Credo's dependencies and not automatically supported by React Native."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="metro.config.js" showLineNumbers',title:'"metro.config.js"',showLineNumbers:!0},"module.exports = {\n // ... other Metro config options ...\n resolver: {\n // make sure this includes `cjs` (and other extensions you need)\n sourceExts: ['js', 'json', 'ts', 'tsx', 'cjs'],\n },\n}\n")),(0,r.kt)("p",null,"Finally, if you're using ",(0,r.kt)("a",{parentName:"p",href:"https://expo.dev"},"Expo")," you need to add a custom resolution 'hack' that removes support for the legacy unimodules."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Yarn")),(0,r.kt)("p",null,"For yarn we can replace the ",(0,r.kt)("inlineCode",{parentName:"p"},"@unimodules/react-native-adapter")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"@unimodules/core")," dependencies with an empty directory. Make sure to create the ",(0,r.kt)("inlineCode",{parentName:"p"},"noop")," directory in the root of your project and create a ",(0,r.kt)("inlineCode",{parentName:"p"},".gitkeep")," file in the directory so that the directory is committed to your repository."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="package.json" showLineNumbers',title:'"package.json"',showLineNumbers:!0},'{\n // ... other package.json options ...\n "resolutions": {\n "@unimodules/react-native-adapter": "./noop",\n "@unimodules/core": "./noop"\n }\n}\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"NPM")),(0,r.kt)("p",null,"Not supported at the moment. NPM overrides work different than Yarn resolutions, and thus we can't use the same trick. If you're using NPM, feel free to open a PR with a working solution."))),(0,r.kt)("h3",{id:"setting-up-the-agent"},"Setting up the agent"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"this section does not assume any knowledge of the agent configuration.\nIn the ",(0,r.kt)("a",{parentName:"p",href:"../tutorials/agent-config"},"Agent Config")," tutorial we will discuss in-depth what every\nfield in the configuration does and when to set it.")),(0,r.kt)("p",null,"In order to use the agent in the application we have to configure and\ninitialize it. This following configuration is quite generic and possibly not\nenough for your specific use cases. Please refer to the\n",(0,r.kt)("a",{parentName:"p",href:"../tutorials"},"tutorials")," for a more use-case-specific agent setup."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up.ts section-1",showLineNumbers:!0,"set-up.ts":!0,"section-1":!0},""))),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-rn.ts section-1",showLineNumbers:!0,"set-up-rn.ts":!0,"section-1":!0},"")))),(0,r.kt)("h3",{id:"adding-a-wallet-and-storage-implementation"},"Adding a wallet and storage implementation"),(0,r.kt)("p",null,"After creating the ",(0,r.kt)("inlineCode",{parentName:"p"},"Agent")," instance, we need to provide the agent with a wallet and storage implementation. Credo provides one implementations out of the box, but you can also implement your own. Currently a Wallet and Storage implementation using Aries Askar is supported out of the box."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./set-up/aries-askar"},"Aries Askar"))),(0,r.kt)(s.Z,{items:[{type:"link",label:"Aries Askar",href:"./set-up/aries-askar",docId:"getting-started/set-up/aries-askar"}],mdxType:"DocCardList"}),(0,r.kt)("h3",{id:"setting-up-the-transports"},"Setting up the transports"),(0,r.kt)("p",null,"Finally, we have to set an outbound transport that\nwill handle traffic from the agent. It is also possible to set an inbound\ntransport in the same way as the outbound transport."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,r.kt)("p",null,"Sets up an WS outbound and HTTP inbound and outbound transport."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up.ts section-2",showLineNumbers:!0,"set-up.ts":!0,"section-2":!0},""))),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("p",null,"For mobile agents the WebSocket transport is often required. We will go into\nmore depth about the reasons for this in the ",(0,r.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation"},"mediation")," section."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-rn.ts section-2",showLineNumbers:!0,"set-up-rn.ts":!0,"section-2":!0},"")))),(0,r.kt)("h3",{id:"initializing-the-agent"},"Initializing the agent"),(0,r.kt)("p",null,"Finally, we can initialize the agent and it's ready for use."),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up.ts section-3",showLineNumbers:!0,"set-up.ts":!0,"section-3":!0},""))),(0,r.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-rn.ts section-3",showLineNumbers:!0,"set-up-rn.ts":!0,"section-3":!0},"")))),(0,r.kt)("h3",{id:"next-steps"},"Next Steps"),(0,r.kt)("p",null,"Now that you have your agent setup, it's time to start building your application. Head over to the tutorials page to get started."),(0,r.kt)(s.Z,{items:[{type:"link",label:"Tutorials",href:"../tutorials/index",docId:"tutorials/index"},{type:"link",label:"Create a Connection",href:"../tutorials/create-a-connection",docId:"tutorials/create-a-connection"}],mdxType:"DocCardList"}),(0,r.kt)("h3",{id:"useful-resources"},"Useful resources"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0004-agents/README.md"},"Hyperledger Aries RFC - 004:\nAgents"))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2fde4558.7e01700a.js b/assets/js/2fde4558.7e01700a.js new file mode 100644 index 0000000..9854061 --- /dev/null +++ b/assets/js/2fde4558.7e01700a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[1232],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>g});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(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 a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},d=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,s=e.originalType,l=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),c=u(n),h=i,g=c["".concat(l,".").concat(h)]||c[h]||p[h]||s;return n?r.createElement(g,a(a({ref:t},d),{},{components:n})):r.createElement(g,a({ref:t},d))}));function g(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var s=n.length,a=new Array(s);a[0]=h;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[c]="string"==typeof e?e:i,a[1]=o;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>u});var r=n(87462),i=(n(67294),n(3905));const s={},a="Issuing Credentials using the OpenID4VC Issuer Module",o={unversionedId:"tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module",id:"tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module",title:"Issuing Credentials using the OpenID4VC Issuer Module",description:"This tutorial will guide you through the process of issuing credentials using the OpenID4VC Issuer Module. Before starting this tutorial, make sure you have completed the OpenID4VC Issuer Module Setup.",source:"@site/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module.md",sourceDirName:"tutorials/openid4vc",slug:"/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module",permalink:"/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"OpenID for Verifiable Credentials Tutorials",permalink:"/guides/tutorials/openid4vc/"},next:{title:"Receiving and Proving Credentials using the OpenID4VC Holder Module",permalink:"/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module"}},l={},u=[{value:"Creating the issuer",id:"creating-the-issuer",level:2},{value:"Creating a credential offer",id:"creating-a-credential-offer",level:2},{value:"Implementing the credential mapper",id:"implementing-the-credential-mapper",level:2}],d={toc:u},c="wrapper";function p(e){let{components:t,...n}=e;return(0,i.kt)(c,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"issuing-credentials-using-the-openid4vc-issuer-module"},"Issuing Credentials using the OpenID4VC Issuer Module"),(0,i.kt)("p",null,"This tutorial will guide you through the process of issuing credentials using the OpenID4VC Issuer Module. Before starting this tutorial, make sure you have completed the ",(0,i.kt)("a",{parentName:"p",href:"/guides/getting-started/set-up/openid4vc"},"OpenID4VC Issuer Module Setup"),"."),(0,i.kt)("p",null,"This guides only covers the issuance of credentials using the OpenID4VC Issuer Module. Follow the ",(0,i.kt)("a",{parentName:"p",href:"/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module"},"Receiving and Proving Credentials using the OpenID4VC Holder Module")," guide to learn how to receive and prove credentials using the OpenID4VC Holder Module."),(0,i.kt)("h2",{id:"creating-the-issuer"},"Creating the issuer"),(0,i.kt)("p",null,"Once you have set-up your agent (under ",(0,i.kt)("inlineCode",{parentName:"p"},"issuer")," variable), we first need to configure your issuer and the credentials you want to issue."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers sd-jwt-vc-openid4vc.ts section-2",showLineNumbers:!0,"sd-jwt-vc-openid4vc.ts":!0,"section-2":!0},"")),(0,i.kt)("p",null,"If you want to update the display metadata or the credentials supported by the issuer, you can use the ",(0,i.kt)("inlineCode",{parentName:"p"},"issuer.modules.openId4VcIssuer.updateIssuer")," method."),(0,i.kt)("h2",{id:"creating-a-credential-offer"},"Creating a credential offer"),(0,i.kt)("p",null,"Once you have configured the issuer, you can create a credential offer. The credential offer method will generate a credential offer URI that you can share with a holder."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers sd-jwt-vc-openid4vc.ts section-3",showLineNumbers:!0,"sd-jwt-vc-openid4vc.ts":!0,"section-3":!0},"")),(0,i.kt)("p",null,"We have also added an event listener that listens for state changed events, this allows us to know when the issuance session is done."),(0,i.kt)("h2",{id:"implementing-the-credential-mapper"},"Implementing the credential mapper"),(0,i.kt)("p",null,"The OpenID4VC Issuer Module setup didn't cover the implementation of the ",(0,i.kt)("inlineCode",{parentName:"p"},"credentialRequestToCredentialMapper")," yet. When you create a credential offer with the OpenID4VC Issuer Module in Credo, you don't have to provide the credential data directly."),(0,i.kt)("p",null,"Instead, you provide a ",(0,i.kt)("inlineCode",{parentName:"p"},"credentialRequestToCredentialMapper")," function in the agent configuration, that will be called when the holder requests the credential."),(0,i.kt)("p",null,"This allows you to dynamically generate the credential data based on the holder's request, and means you also don't have to store any credential data in the agent."),(0,i.kt)("p",null,"Below is an example ",(0,i.kt)("inlineCode",{parentName:"p"},"credentialRequestToCredentialMapper")," function that generates a credential based on the holder's request. Make sure to register this function in the agent configuration ",(0,i.kt)("inlineCode",{parentName:"p"},"modules.openId4VcIssuer.endpoints.credential.credentialsRequestToCredentialMapper"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers sd-jwt-vc-openid4vc.ts section-4",showLineNumbers:!0,"sd-jwt-vc-openid4vc.ts":!0,"section-4":!0},"")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3209acdd.2245061a.js b/assets/js/3209acdd.2245061a.js new file mode 100644 index 0000000..e4eb9d4 --- /dev/null +++ b/assets/js/3209acdd.2245061a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7486],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>h});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var d=r.createContext({}),p=function(e){var t=r.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},l=function(e){var t=p(e.components);return r.createElement(d.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,d=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=p(n),f=i,h=u["".concat(d,".").concat(f)]||u[f]||c[f]||o;return n?r.createElement(h,a(a({ref:t},l),{},{components:n})):r.createElement(h,a({ref:t},l))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[0]=f;var s={};for(var d in t)hasOwnProperty.call(t,d)&&(s[d]=t[d]);s.originalType=e,s[u]="string"==typeof e?e:i,a[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(87462),i=(n(67294),n(3905));const o={},a="OpenID for Verifiable Credentials",s={unversionedId:"getting-started/set-up/openid4vc",id:"getting-started/set-up/openid4vc",title:"OpenID for Verifiable Credentials",description:"The OpenID4VC module provides support for the OpenID for Verifiable Credentials group of protocols defined under the OpenID Foundation. Currently this includes the OpenID for Verifiable Credential Issuance, Self-Issued OpenID Provider v2, and OpenID for Verifiable Presentations.",source:"@site/guides/getting-started/set-up/openid4vc.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/openid4vc",permalink:"/guides/getting-started/set-up/openid4vc",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"cheqd",permalink:"/guides/getting-started/set-up/cheqd/"},next:{title:"Concepts",permalink:"/guides/concepts/"}},d={},p=[{value:"Installing OpenID4VC Module",id:"installing-openid4vc-module",level:3},{value:"Adding OpenID4VC Modules to the Agent",id:"adding-openid4vc-modules-to-the-agent",level:3},{value:"Issuer and Verifier",id:"issuer-and-verifier",level:4},{value:"Holder",id:"holder",level:3}],l={toc:p},u="wrapper";function c(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"openid-for-verifiable-credentials"},"OpenID for Verifiable Credentials"),(0,i.kt)("p",null,"The OpenID4VC module provides support for the ",(0,i.kt)("a",{parentName:"p",href:"https://openid.net/sg/openid4vc/"},"OpenID for Verifiable Credentials group of protocols")," defined under the OpenID Foundation. Currently this includes the ",(0,i.kt)("a",{parentName:"p",href:"https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html"},"OpenID for Verifiable Credential Issuance"),", ",(0,i.kt)("a",{parentName:"p",href:"https://openid.net/specs/openid-connect-self-issued-v2-1_0.html"},"Self-Issued OpenID Provider v2"),", and ",(0,i.kt)("a",{parentName:"p",href:"https://openid.net/specs/openid-4-verifiable-presentations-1_0.html"},"OpenID for Verifiable Presentations"),"."),(0,i.kt)("p",null,"For the current supported versions for any of the OpenID4VC protocols, please refer to the ",(0,i.kt)("a",{parentName:"p",href:"/guides/features/openid4vc"},"OpenID4VC Feature")," page."),(0,i.kt)("p",null,"The OpenID4VC Module in Credo currently exposes three modules, one for each role in the triangle trust: ",(0,i.kt)("inlineCode",{parentName:"p"},"OpenId4VcIssuerModule"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"OpenId4VcHolderModule"),", and ",(0,i.kt)("inlineCode",{parentName:"p"},"OpenId4VcVerifierModule"),". The issuer and verifier modules are expected to run in a cloud environment, as they require several endpoints to be exposed to the public internet. The holder module can run in a cloud environment or on a mobile device."),(0,i.kt)("h3",{id:"installing-openid4vc-module"},"Installing OpenID4VC Module"),(0,i.kt)("p",null,"When using Credo with OpenID4VC you need to install the ",(0,i.kt)("inlineCode",{parentName:"p"},"@credo-ts/openid4vc")," module:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/openid4vc@0.5.3\n")),(0,i.kt)("h3",{id:"adding-openid4vc-modules-to-the-agent"},"Adding OpenID4VC Modules to the Agent"),(0,i.kt)("p",null,"After installing the dependencies, we can register the the different modules on the agent."),(0,i.kt)("h4",{id:"issuer-and-verifier"},"Issuer and Verifier"),(0,i.kt)("p",null,"If you want to issue or verify credentials using OpenID for Verifiable Credentials, you can add the ",(0,i.kt)("inlineCode",{parentName:"p"},"OpenId4VcIssuerModule")," and the ",(0,i.kt)("inlineCode",{parentName:"p"},"OpenId4VcVerifierModule"),". These modules can only run on the server, in Node.js and don't work in a React Native environment. These modules can be added separately, it's not required to use both modules. The set up for the issuer and verifier module can be combined with the set up for the holder module below to support issuance, holding, and verification OpenID4VC flows within the same agent."),(0,i.kt)("p",null,"In the example we haven't implemented the ",(0,i.kt)("inlineCode",{parentName:"p"},"credentialRequestToCredentialMapper")," method for the issuer module yet, this is covered in the ",(0,i.kt)("a",{parentName:"p",href:"/guides/tutorials/openid4vc"},"OpenID4VC Guides"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-openid4vc-issuer-verifier.ts section-1",showLineNumbers:!0,"set-up-openid4vc-issuer-verifier.ts":!0,"section-1":!0},"")),(0,i.kt)("h3",{id:"holder"},"Holder"),(0,i.kt)("p",null,"If you want to receive and present credentials using OpenID for Verifiable Credentials, you can add the ",(0,i.kt)("inlineCode",{parentName:"p"},"OpenId4VcHolderModule"),". This module can run in both Node.js and React Native."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-openid4vc-holder.ts section-1",showLineNumbers:!0,"set-up-openid4vc-holder.ts":!0,"section-1":!0},"")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/32456564.d0d0f92c.js b/assets/js/32456564.d0d0f92c.js deleted file mode 100644 index dd8cc62..0000000 --- a/assets/js/32456564.d0d0f92c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[8937],{3905:(t,e,a)=>{a.d(e,{Zo:()=>p,kt:()=>c});var n=a(67294);function i(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function r(t){for(var e=1;e=0||(i[a]=t[a]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(i[a]=t[a])}return i}var l=n.createContext({}),u=function(t){var e=n.useContext(l),a=e;return t&&(a="function"==typeof t?t(e):r(r({},e),t)),a},p=function(t){var e=u(t.components);return n.createElement(l.Provider,{value:e},t.children)},d="mdxType",g={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},h=n.forwardRef((function(t,e){var a=t.components,i=t.mdxType,o=t.originalType,l=t.parentName,p=s(t,["components","mdxType","originalType","parentName"]),d=u(a),h=i,c=d["".concat(l,".").concat(h)]||d[h]||g[h]||o;return a?n.createElement(c,r(r({ref:e},p),{},{components:a})):n.createElement(c,r({ref:e},p))}));function c(t,e){var a=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var o=a.length,r=new Array(o);r[0]=h;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[d]="string"==typeof t?t:i,r[1]=s;for(var u=2;u{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>r,default:()=>g,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=a(87462),i=(a(67294),a(3905));const o={},r="Update Assistant",s={unversionedId:"updating/update-assistant",id:"updating/update-assistant",title:"Update Assistant",description:"The Update Assistant helps you update the storage objects from Credo to newer versions. This documents describes the different ways you can leverage the Update Assistant from fully managed to more manual approaches.",source:"@site/guides/updating/update-assistant.md",sourceDirName:"updating",slug:"/updating/update-assistant",permalink:"/guides/updating/update-assistant",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Updating Credo",permalink:"/guides/updating/"},next:{title:"Migrating from an Indy SDK Wallet to Aries Askar",permalink:"/guides/updating/update-indy-sdk-to-askar"}},l={},u=[{value:"Update Strategies",id:"update-strategies",level:2},{value:"Manually instantiating the update assistant on agent startup",id:"manually-instantiating-the-update-assistant-on-agent-startup",level:3},{value:"Storing the agent storage version outside of the agent storage",id:"storing-the-agent-storage-version-outside-of-the-agent-storage",level:3},{value:"Automatically update on agent startup",id:"automatically-update-on-agent-startup",level:3},{value:"Backups",id:"backups",level:2},{value:"Disabling backups",id:"disabling-backups",level:3},{value:"Tenant Migration",id:"tenant-migration",level:2},{value:"Automatically update on tenant startup",id:"automatically-update-on-tenant-startup",level:3},{value:"Manually upgrading tenant storage",id:"manually-upgrading-tenant-storage",level:3}],p={toc:u},d="wrapper";function g(t){let{components:e,...a}=t;return(0,i.kt)(d,(0,n.Z)({},p,a,{components:e,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"update-assistant"},"Update Assistant"),(0,i.kt)("p",null,"The Update Assistant helps you update the storage objects from Credo to newer versions. This documents describes the different ways you can leverage the Update Assistant from fully managed to more manual approaches."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#update-strategies"},"Update Strategies"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#manually-instantiating-the-update-assistant-on-agent-startup"},"Manually instantiating the update assistant on agent startup")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#storing-the-agent-storage-version-outside-of-the-agent-storage"},"Storing the agent storage version outside of the agent storage")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#automatically-update-on-agent-startup"},"Automatically update on agent startup")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#backups"},"Backups"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#disabling-backups"},"Disabling backups")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#tenant-migration"},"Tenant Migration"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#automatically-update-on-tenant-startup"},"Automatically update on tenant startup")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#manually-upgrading-tenant-storage"},"Manually upgrading tenant storage"))))),(0,i.kt)("h2",{id:"update-strategies"},"Update Strategies"),(0,i.kt)("p",null,"There are three options on how to leverage the update assistant on agent startup:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#update-strategies"},"Update Strategies"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#manually-instantiating-the-update-assistant-on-agent-startup"},"Manually instantiating the update assistant on agent startup")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#storing-the-agent-storage-version-outside-of-the-agent-storage"},"Storing the agent storage version outside of the agent storage")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#automatically-update-on-agent-startup"},"Automatically update on agent startup")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#backups"},"Backups"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#disabling-backups"},"Disabling backups")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#tenant-migration"},"Tenant Migration"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#automatically-update-on-tenant-startup"},"Automatically update on tenant startup")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#manually-upgrading-tenant-storage"},"Manually upgrading tenant storage"))))),(0,i.kt)("p",null,"Note that the Update Assistant only supports updating the root wallet storage. If you are leveraging the tenants module, read ",(0,i.kt)("a",{parentName:"p",href:"#tenant-migration"},"Tenant Migration")," for more information on how to update storage for each tenant."),(0,i.kt)("p",null,"In addition, for all update methods you can configure whether a backup should be created before the update process starts. In the case the upgrade fails, the backup will be restored. In general we recommend to keep this option enabled (it is enabled by default), but there are a few important exceptions so make sure to read the section on ",(0,i.kt)("a",{parentName:"p",href:"#backups"},"backups")," carefully for more information."),(0,i.kt)("h3",{id:"manually-instantiating-the-update-assistant-on-agent-startup"},"Manually instantiating the update assistant on agent startup"),(0,i.kt)("p",null,"When the version of the storage is stored inside the agent storage, it means we need to check if the agent needs to be updated on every agent startup. We'll initialize the update assistant and check whether the storage is up to date. The advantage of this approach is that you don't have to store anything yourself, and have full control over the workflow."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { UpdateAssistant, Agent } from '@credo-ts/core'\n\n// or @credo-ts/node\nimport { agentDependencies } from '@credo-ts/react-native'\n\n// First create the agent\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n\n// Then initialize the update assistant with the update config\nconst updateAssistant = new UpdateAssistant(agent, {\n v0_1ToV0_2: {\n mediationRoleUpdateStrategy: 'allMediator',\n },\n})\n\n// Initialize the update assistant so we can read the current storage version\n// from the wallet. If you manually initialize the wallet you should do this _before_\n// calling initialize on the update assistant\n// await agent.wallet.initialize(walletConfig)\nawait updateAssistant.initialize()\n\n// Check if the agent is up to date, if not call update\nif (!(await updateAssistant.isUpToDate())) {\n await updateAssistant.update({\n // If you don't want to create a backup before the update process starts\n // (see )\n createBackupBeforeUpdate: false,\n })\n}\n\n// Once finished initialize the agent. You should do this on every launch of the agent\nawait agent.initialize()\n")),(0,i.kt)("h3",{id:"storing-the-agent-storage-version-outside-of-the-agent-storage"},"Storing the agent storage version outside of the agent storage"),(0,i.kt)("p",null,"When the version of the storage is stored outside of the agent storage, you don't have to initialize the ",(0,i.kt)("inlineCode",{parentName:"p"},"UpdateAssistant")," on every agent agent startup. You can just check if the storage version is up to date and instantiate the ",(0,i.kt)("inlineCode",{parentName:"p"},"UpdateAssistant")," if not. The advantage of this approach is that you don't have to instantiate the ",(0,i.kt)("inlineCode",{parentName:"p"},"UpdateAssistant")," on every agent startup, but this does mean that you have to store the storage version yourself."),(0,i.kt)("p",null,"When a wallet has been exported and later imported you don't always have the latest version available. If this is the case you can always rely on Method 1 or 2 for updating the wallet, and storing the version yourself afterwards. You can also get the current version by calling ",(0,i.kt)("inlineCode",{parentName:"p"},"await updateAssistant.getCurrentAgentStorageVersion()"),". Do note the ",(0,i.kt)("inlineCode",{parentName:"p"},"UpdateAssistant")," needs to be initialized before calling this method."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { UpdateAssistant, Agent } from '@credo-ts/core'\n\n// or @credo-ts/node\nimport { agentDependencies } from '@credo-ts/react-native'\n\n// The storage version will normally be stored in e.g. persistent storage on a mobile device\nlet currentStorageVersion: VersionString = '0.1'\n\n// First create the agent\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n\n// We only initialize the update assistant if our stored version is not equal\n// to the frameworkStorageVersion of the UpdateAssistant. The advantage of this\n// is that we don't have to initialize the UpdateAssistant to retrieve the current\n// storage version.\nif (currentStorageVersion !== UpdateAssistant.frameworkStorageVersion) {\n const updateAssistant = new UpdateAssistant(agent, {\n v0_1ToV0_2: {\n mediationRoleUpdateStrategy: 'recipientIfEndpoint',\n },\n })\n\n // Same as with the previous strategy, if you normally call agent.wallet.initialize() manually\n // you need to call this before calling updateAssistant.initialize()\n await updateAssistant.initialize()\n\n await updateAssistant.update()\n\n // Store the version so we can leverage it during the next agent startup and don't have\n // to initialize the update assistant again until a new version is released\n currentStorageVersion = UpdateAssistant.frameworkStorageVersion\n}\n\n// Once finished initialize the agent. You should do this on every launch of the agent\nawait agent.initialize()\n")),(0,i.kt)("h3",{id:"automatically-update-on-agent-startup"},"Automatically update on agent startup"),(0,i.kt)("p",null,"This is by far the easiest way to update the agent, but has the least amount of flexibility and is not configurable. This means you will have to use the default update options to update the agent storage. You can find the default update config in the respective version migration guides (e.g. in ",(0,i.kt)("a",{parentName:"p",href:"/guides/updating/versions/0.1-to-0.2"},"0.1-to-0.2"),")."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If you're using the ",(0,i.kt)("inlineCode",{parentName:"p"},"autoUpdateStorageOnStartup")," option and hosting multiple Credo instances that point to the same database, you need to make sure that they won't all try to update the storage on startup. Only one instance should try to update the storage, and thus in cases where multiple instances are hosted pointing to the same database, this approach is not recommended.")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { UpdateAssistant, Agent } from '@credo-ts/core'\n\n// or @credo-ts/node\nimport { agentDependencies } from '@credo-ts/react-native'\n\n// First create the agent, setting the autoUpdateStorageOnStartup option to true\nconst agent = new Agent({\n config: {\n ...config,\n autoUpdateStorageOnStartup: true,\n createBackupBeforeStorageUpdate: true,\n },\n dependencies: agentDependencies,\n})\n\n// Then we call initialize, which under the hood will call the update assistant if the storage is not update to date.\nawait agent.initialize()\n")),(0,i.kt)("h2",{id:"backups"},"Backups"),(0,i.kt)("p",null,"Before starting the update, the update assistant will automatically create a backup of the wallet. If the migration succeeds the backup won't be used. If the backup fails, another backup will be made of the migrated wallet, after which the backup will be restored."),(0,i.kt)("p",null,"The backups can be found at the following locations. The ",(0,i.kt)("inlineCode",{parentName:"p"},"backupIdentifier")," is generated at the start of the update process and generated based on the current timestamp."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Backup path: ",(0,i.kt)("inlineCode",{parentName:"li"},"${agent.config.fileSystem.basePath}/afj/migration/backup/${backupIdentifier}")),(0,i.kt)("li",{parentName:"ul"},"Migration backup: ",(0,i.kt)("inlineCode",{parentName:"li"},"${agent.config.fileSystem.basePath}/afj/migration/backup/${backupIdentifier}-error"))),(0,i.kt)("h3",{id:"disabling-backups"},"Disabling backups"),(0,i.kt)("p",null,"In general we recommend keeping backups before storage updates enabled. However, there are a few scenarios where you should disable backups in Credo before updating the storage:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"You are using Aries Askar with an SQLite database and multi-tenancy with ",(0,i.kt)("inlineCode",{parentName:"li"},"AskarMultiWalletDatabaseScheme.ProfilePerWallet")," as the database scheme. Credo supports creating backups of SQLite databases, however as as each tenant is stored as a profile in the same database, if a backup is restored it will overwrite the storage of the whole database, and thus for all tenants. In future versions we will add support for more granular control of the backup."),(0,i.kt)("li",{parentName:"ul"},"You are using Aries Askar with a Postgres database. We don't support creating backups for Postgres, and we advice you to create a backup of your database yourself before updating the storage.")),(0,i.kt)("h2",{id:"tenant-migration"},"Tenant Migration"),(0,i.kt)("p",null,"Migration of tenant storage is an additional process that needs to be performed when updating to a new breaking version of Credo. When you have migrated the storage of the root wallet, you can start up the agent and use it for the root wallet. But the tenant will still be using an older version of the storage."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Future versions of Credo are expected to work with the latest two major storage versions, writing using the latest format, but allowing to read also the previous storage format version. This allows to gradually upgrade your infrastructure to a new version, requiring as minimal downtime as possible.")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If you're using an Aries Askar with an SQLite database while also leveraging multi-tenancy and using ",(0,i.kt)("inlineCode",{parentName:"p"},"AskarMultiWalletDatabaseScheme.ProfilePerWallet")," as the database scheme, you need to make sure to disable ",(0,i.kt)("inlineCode",{parentName:"p"},"backupBeforeStorageUpdate")," in the ",(0,i.kt)("inlineCode",{parentName:"p"},"updateOptions")," when updating the storage of a tenant. See ",(0,i.kt)("a",{parentName:"p",href:"#disabling-backups"},"Disabling backups")," for more information.")),(0,i.kt)("h3",{id:"automatically-update-on-tenant-startup"},"Automatically update on tenant startup"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"autoUpdateStorageOnStartup")," also works for tenants within an agent, meaning that you can automatically update the storage of a tenant when the tenant is first opened after the upgrade. Compared to the root wallet, which is updated when the agent starts, a tenant will be automatically upgraded when the tenant is first opened."),(0,i.kt)("p",null,"The same rules apply as with the auto updating of storage on startup, so make sure to read section on ",(0,i.kt)("a",{parentName:"p",href:"#automatically-update-on-agent-startup"},"Automatically update on agent startup"),"."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If you're using a multi-instance setup with the same storage backend, you need to make sure that only one instance updates the storage of a tenant. This is tricky to do with auto updating, and therefore we recommend to use the manual approach.")),(0,i.kt)("h3",{id:"manually-upgrading-tenant-storage"},"Manually upgrading tenant storage"),(0,i.kt)("p",null,"If you want to manually upgrade the storage of a tenant, you can use the ",(0,i.kt)("inlineCode",{parentName:"p"},"getTenantsWithOutdatedStorage")," method to get a list of tenants that have outdated storage. Then you can use the ",(0,i.kt)("inlineCode",{parentName:"p"},"updateTenantStorage")," method to update the storage of a tenant. This method will return a promise that resolves when the storage has been updated. If the storage is already up to date, the promise will resolve immediately. If an error occurs during the updating, an error will be thrown, just like if you would use the Update Assistant."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const outdatedTenantsAfterUpdate = await agent.modules.tenants.getTenantsWithOutdatedStorage()\n\nfor (const tenant of outdatedTenantsAfterUpdate) {\n await agent.modules.tenants.updateTenantStorage({\n tenantId: tenant.id,\n updateOptions: {\n // NOTE: if you're using Askar with SQLite and AskarMultiWalletDatabaseScheme.ProfilePerWallet, OR you use Postgres, you should disable backups\n // by credo and create them manually beforehand.\n createBackupBeforeUpdate: true,\n },\n })\n}\n")),(0,i.kt)("p",null,"You can use the manual approach to update the storage of a tenant, even while ",(0,i.kt)("inlineCode",{parentName:"p"},"autoUpdateStorageOnStartup")," is enabled, but you need to make sure that the auto update won't be run for the tenant you are manually updating, so we recommend to disable ",(0,i.kt)("inlineCode",{parentName:"p"},"autoUpdateStorageOnStartup")," when manually updating the storage of a tenant."),(0,i.kt)("p",null,"After you've upgraded the storage of a tenant, you can use the tenant as usual."))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/32456564.ec5ca12c.js b/assets/js/32456564.ec5ca12c.js new file mode 100644 index 0000000..cc9b5af --- /dev/null +++ b/assets/js/32456564.ec5ca12c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[8937],{3905:(t,e,a)=>{a.d(e,{Zo:()=>p,kt:()=>c});var n=a(67294);function i(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function r(t){for(var e=1;e=0||(i[a]=t[a]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(i[a]=t[a])}return i}var l=n.createContext({}),u=function(t){var e=n.useContext(l),a=e;return t&&(a="function"==typeof t?t(e):r(r({},e),t)),a},p=function(t){var e=u(t.components);return n.createElement(l.Provider,{value:e},t.children)},d="mdxType",g={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},h=n.forwardRef((function(t,e){var a=t.components,i=t.mdxType,o=t.originalType,l=t.parentName,p=s(t,["components","mdxType","originalType","parentName"]),d=u(a),h=i,c=d["".concat(l,".").concat(h)]||d[h]||g[h]||o;return a?n.createElement(c,r(r({ref:e},p),{},{components:a})):n.createElement(c,r({ref:e},p))}));function c(t,e){var a=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var o=a.length,r=new Array(o);r[0]=h;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[d]="string"==typeof t?t:i,r[1]=s;for(var u=2;u{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>r,default:()=>g,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=a(87462),i=(a(67294),a(3905));const o={},r="Update Assistant",s={unversionedId:"updating/update-assistant",id:"updating/update-assistant",title:"Update Assistant",description:"The Update Assistant helps you update the storage objects from Credo to newer versions. This documents describes the different ways you can leverage the Update Assistant from fully managed to more manual approaches.",source:"@site/guides/updating/update-assistant.md",sourceDirName:"updating",slug:"/updating/update-assistant",permalink:"/guides/updating/update-assistant",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Updating Credo",permalink:"/guides/updating/"},next:{title:"Migrating from an Indy SDK Wallet to Aries Askar",permalink:"/guides/updating/update-indy-sdk-to-askar"}},l={},u=[{value:"Update Strategies",id:"update-strategies",level:2},{value:"Manually instantiating the update assistant on agent startup",id:"manually-instantiating-the-update-assistant-on-agent-startup",level:3},{value:"Storing the agent storage version outside of the agent storage",id:"storing-the-agent-storage-version-outside-of-the-agent-storage",level:3},{value:"Automatically update on agent startup",id:"automatically-update-on-agent-startup",level:3},{value:"Backups",id:"backups",level:2},{value:"Disabling backups",id:"disabling-backups",level:3},{value:"Tenant Migration",id:"tenant-migration",level:2},{value:"Automatically update on tenant startup",id:"automatically-update-on-tenant-startup",level:3},{value:"Manually upgrading tenant storage",id:"manually-upgrading-tenant-storage",level:3}],p={toc:u},d="wrapper";function g(t){let{components:e,...a}=t;return(0,i.kt)(d,(0,n.Z)({},p,a,{components:e,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"update-assistant"},"Update Assistant"),(0,i.kt)("p",null,"The Update Assistant helps you update the storage objects from Credo to newer versions. This documents describes the different ways you can leverage the Update Assistant from fully managed to more manual approaches."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#update-strategies"},"Update Strategies"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#manually-instantiating-the-update-assistant-on-agent-startup"},"Manually instantiating the update assistant on agent startup")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#storing-the-agent-storage-version-outside-of-the-agent-storage"},"Storing the agent storage version outside of the agent storage")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#automatically-update-on-agent-startup"},"Automatically update on agent startup")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#backups"},"Backups"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#disabling-backups"},"Disabling backups")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#tenant-migration"},"Tenant Migration"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#automatically-update-on-tenant-startup"},"Automatically update on tenant startup")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#manually-upgrading-tenant-storage"},"Manually upgrading tenant storage"))))),(0,i.kt)("h2",{id:"update-strategies"},"Update Strategies"),(0,i.kt)("p",null,"There are three options on how to leverage the update assistant on agent startup:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#update-strategies"},"Update Strategies"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#manually-instantiating-the-update-assistant-on-agent-startup"},"Manually instantiating the update assistant on agent startup")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#storing-the-agent-storage-version-outside-of-the-agent-storage"},"Storing the agent storage version outside of the agent storage")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#automatically-update-on-agent-startup"},"Automatically update on agent startup")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#backups"},"Backups"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#disabling-backups"},"Disabling backups")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#tenant-migration"},"Tenant Migration"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#automatically-update-on-tenant-startup"},"Automatically update on tenant startup")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#manually-upgrading-tenant-storage"},"Manually upgrading tenant storage"))))),(0,i.kt)("p",null,"Note that the Update Assistant only supports updating the root wallet storage. If you are leveraging the tenants module, read ",(0,i.kt)("a",{parentName:"p",href:"#tenant-migration"},"Tenant Migration")," for more information on how to update storage for each tenant."),(0,i.kt)("p",null,"In addition, for all update methods you can configure whether a backup should be created before the update process starts. In the case the upgrade fails, the backup will be restored. In general we recommend to keep this option enabled (it is enabled by default), but there are a few important exceptions so make sure to read the section on ",(0,i.kt)("a",{parentName:"p",href:"#backups"},"backups")," carefully for more information."),(0,i.kt)("h3",{id:"manually-instantiating-the-update-assistant-on-agent-startup"},"Manually instantiating the update assistant on agent startup"),(0,i.kt)("p",null,"When the version of the storage is stored inside the agent storage, it means we need to check if the agent needs to be updated on every agent startup. We'll initialize the update assistant and check whether the storage is up to date. The advantage of this approach is that you don't have to store anything yourself, and have full control over the workflow."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { UpdateAssistant, Agent } from '@credo-ts/core'\n\n// or @credo-ts/node\nimport { agentDependencies } from '@credo-ts/react-native'\n\n// First create the agent\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n\n// Then initialize the update assistant with the update config\nconst updateAssistant = new UpdateAssistant(agent, {\n v0_1ToV0_2: {\n mediationRoleUpdateStrategy: 'allMediator',\n },\n})\n\n// Initialize the update assistant so we can read the current storage version\n// from the wallet. If you manually initialize the wallet you should do this _before_\n// calling initialize on the update assistant\n// await agent.wallet.initialize(walletConfig)\nawait updateAssistant.initialize()\n\n// Check if the agent is up to date, if not call update\nif (!(await updateAssistant.isUpToDate())) {\n await updateAssistant.update({\n // If you don't want to create a backup before the update process starts\n // (see \"Disabling Backups\")\n createBackupBeforeUpdate: false,\n })\n}\n\n// Once finished initialize the agent. You should do this on every launch of the agent\nawait agent.initialize()\n")),(0,i.kt)("h3",{id:"storing-the-agent-storage-version-outside-of-the-agent-storage"},"Storing the agent storage version outside of the agent storage"),(0,i.kt)("p",null,"When the version of the storage is stored outside of the agent storage, you don't have to initialize the ",(0,i.kt)("inlineCode",{parentName:"p"},"UpdateAssistant")," on every agent agent startup. You can just check if the storage version is up to date and instantiate the ",(0,i.kt)("inlineCode",{parentName:"p"},"UpdateAssistant")," if not. The advantage of this approach is that you don't have to instantiate the ",(0,i.kt)("inlineCode",{parentName:"p"},"UpdateAssistant")," on every agent startup, but this does mean that you have to store the storage version yourself."),(0,i.kt)("p",null,"When a wallet has been exported and later imported you don't always have the latest version available. If this is the case you can always rely on Method 1 or 2 for updating the wallet, and storing the version yourself afterwards. You can also get the current version by calling ",(0,i.kt)("inlineCode",{parentName:"p"},"await updateAssistant.getCurrentAgentStorageVersion()"),". Do note the ",(0,i.kt)("inlineCode",{parentName:"p"},"UpdateAssistant")," needs to be initialized before calling this method."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { UpdateAssistant, Agent } from '@credo-ts/core'\n\n// or @credo-ts/node\nimport { agentDependencies } from '@credo-ts/react-native'\n\n// The storage version will normally be stored in e.g. persistent storage on a mobile device\nlet currentStorageVersion: VersionString = '0.1'\n\n// First create the agent\nconst agent = new Agent({\n config,\n dependencies: agentDependencies,\n})\n\n// We only initialize the update assistant if our stored version is not equal\n// to the frameworkStorageVersion of the UpdateAssistant. The advantage of this\n// is that we don't have to initialize the UpdateAssistant to retrieve the current\n// storage version.\nif (currentStorageVersion !== UpdateAssistant.frameworkStorageVersion) {\n const updateAssistant = new UpdateAssistant(agent, {\n v0_1ToV0_2: {\n mediationRoleUpdateStrategy: 'recipientIfEndpoint',\n },\n })\n\n // Same as with the previous strategy, if you normally call agent.wallet.initialize() manually\n // you need to call this before calling updateAssistant.initialize()\n await updateAssistant.initialize()\n\n await updateAssistant.update()\n\n // Store the version so we can leverage it during the next agent startup and don't have\n // to initialize the update assistant again until a new version is released\n currentStorageVersion = UpdateAssistant.frameworkStorageVersion\n}\n\n// Once finished initialize the agent. You should do this on every launch of the agent\nawait agent.initialize()\n")),(0,i.kt)("h3",{id:"automatically-update-on-agent-startup"},"Automatically update on agent startup"),(0,i.kt)("p",null,"This is by far the easiest way to update the agent, but has the least amount of flexibility and is not configurable. This means you will have to use the default update options to update the agent storage. You can find the default update config in the respective version migration guides (e.g. in ",(0,i.kt)("a",{parentName:"p",href:"/guides/updating/versions/0.1-to-0.2"},"0.1-to-0.2"),")."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If you're using the ",(0,i.kt)("inlineCode",{parentName:"p"},"autoUpdateStorageOnStartup")," option and hosting multiple Credo instances that point to the same database, you need to make sure that they won't all try to update the storage on startup. Only one instance should try to update the storage, and thus in cases where multiple instances are hosted pointing to the same database, this approach is not recommended.")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { UpdateAssistant, Agent } from '@credo-ts/core'\n\n// or @credo-ts/node\nimport { agentDependencies } from '@credo-ts/react-native'\n\n// First create the agent, setting the autoUpdateStorageOnStartup option to true\nconst agent = new Agent({\n config: {\n ...config,\n autoUpdateStorageOnStartup: true,\n createBackupBeforeStorageUpdate: true,\n },\n dependencies: agentDependencies,\n})\n\n// Then we call initialize, which under the hood will call the update assistant if the storage is not update to date.\nawait agent.initialize()\n")),(0,i.kt)("h2",{id:"backups"},"Backups"),(0,i.kt)("p",null,"Before starting the update, the update assistant will automatically create a backup of the wallet. If the migration succeeds the backup won't be used. If the backup fails, another backup will be made of the migrated wallet, after which the backup will be restored."),(0,i.kt)("p",null,"The backups can be found at the following locations. The ",(0,i.kt)("inlineCode",{parentName:"p"},"backupIdentifier")," is generated at the start of the update process and generated based on the current timestamp."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Backup path: ",(0,i.kt)("inlineCode",{parentName:"li"},"${agent.config.fileSystem.basePath}/afj/migration/backup/${backupIdentifier}")),(0,i.kt)("li",{parentName:"ul"},"Migration backup: ",(0,i.kt)("inlineCode",{parentName:"li"},"${agent.config.fileSystem.basePath}/afj/migration/backup/${backupIdentifier}-error"))),(0,i.kt)("h3",{id:"disabling-backups"},"Disabling backups"),(0,i.kt)("p",null,"In general we recommend keeping backups before storage updates enabled. However, there are a few scenarios where you should disable backups in Credo before updating the storage:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"You are using Aries Askar with an SQLite database and multi-tenancy with ",(0,i.kt)("inlineCode",{parentName:"li"},"AskarMultiWalletDatabaseScheme.ProfilePerWallet")," as the database scheme. Credo supports creating backups of SQLite databases, however as as each tenant is stored as a profile in the same database, if a backup is restored it will overwrite the storage of the whole database, and thus for all tenants. In future versions we will add support for more granular control of the backup."),(0,i.kt)("li",{parentName:"ul"},"You are using Aries Askar with a Postgres database. We don't support creating backups for Postgres, and we advice you to create a backup of your database yourself before updating the storage.")),(0,i.kt)("h2",{id:"tenant-migration"},"Tenant Migration"),(0,i.kt)("p",null,"Migration of tenant storage is an additional process that needs to be performed when updating to a new breaking version of Credo. When you have migrated the storage of the root wallet, you can start up the agent and use it for the root wallet. But the tenant will still be using an older version of the storage."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Future versions of Credo are expected to work with the latest two major storage versions, writing using the latest format, but allowing to read also the previous storage format version. This allows to gradually upgrade your infrastructure to a new version, requiring as minimal downtime as possible.")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If you're using an Aries Askar with an SQLite database while also leveraging multi-tenancy and using ",(0,i.kt)("inlineCode",{parentName:"p"},"AskarMultiWalletDatabaseScheme.ProfilePerWallet")," as the database scheme, you need to make sure to disable ",(0,i.kt)("inlineCode",{parentName:"p"},"backupBeforeStorageUpdate")," in the ",(0,i.kt)("inlineCode",{parentName:"p"},"updateOptions")," when updating the storage of a tenant. See ",(0,i.kt)("a",{parentName:"p",href:"#disabling-backups"},"Disabling backups")," for more information.")),(0,i.kt)("h3",{id:"automatically-update-on-tenant-startup"},"Automatically update on tenant startup"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"autoUpdateStorageOnStartup")," also works for tenants within an agent, meaning that you can automatically update the storage of a tenant when the tenant is first opened after the upgrade. Compared to the root wallet, which is updated when the agent starts, a tenant will be automatically upgraded when the tenant is first opened."),(0,i.kt)("p",null,"The same rules apply as with the auto updating of storage on startup, so make sure to read section on ",(0,i.kt)("a",{parentName:"p",href:"#automatically-update-on-agent-startup"},"Automatically update on agent startup"),"."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If you're using a multi-instance setup with the same storage backend, you need to make sure that only one instance updates the storage of a tenant. This is tricky to do with auto updating, and therefore we recommend to use the manual approach.")),(0,i.kt)("h3",{id:"manually-upgrading-tenant-storage"},"Manually upgrading tenant storage"),(0,i.kt)("p",null,"If you want to manually upgrade the storage of a tenant, you can use the ",(0,i.kt)("inlineCode",{parentName:"p"},"getTenantsWithOutdatedStorage")," method to get a list of tenants that have outdated storage. Then you can use the ",(0,i.kt)("inlineCode",{parentName:"p"},"updateTenantStorage")," method to update the storage of a tenant. This method will return a promise that resolves when the storage has been updated. If the storage is already up to date, the promise will resolve immediately. If an error occurs during the updating, an error will be thrown, just like if you would use the Update Assistant."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const outdatedTenantsAfterUpdate = await agent.modules.tenants.getTenantsWithOutdatedStorage()\n\nfor (const tenant of outdatedTenantsAfterUpdate) {\n await agent.modules.tenants.updateTenantStorage({\n tenantId: tenant.id,\n updateOptions: {\n // NOTE: if you're using Askar with SQLite and AskarMultiWalletDatabaseScheme.ProfilePerWallet, OR you use Postgres, you should disable backups\n // by credo and create them manually beforehand.\n createBackupBeforeUpdate: true,\n },\n })\n}\n")),(0,i.kt)("p",null,"You can use the manual approach to update the storage of a tenant, even while ",(0,i.kt)("inlineCode",{parentName:"p"},"autoUpdateStorageOnStartup")," is enabled, but you need to make sure that the auto update won't be run for the tenant you are manually updating, so we recommend to disable ",(0,i.kt)("inlineCode",{parentName:"p"},"autoUpdateStorageOnStartup")," when manually updating the storage of a tenant."),(0,i.kt)("p",null,"After you've upgraded the storage of a tenant, you can use the tenant as usual."))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/331e6edf.ed683824.js b/assets/js/331e6edf.ed683824.js deleted file mode 100644 index de513d7..0000000 --- a/assets/js/331e6edf.ed683824.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[9196],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=l(n),p=a,h=u["".concat(c,".").concat(p)]||u[p]||g[p]||i;return n?r.createElement(h,o(o({ref:t},d),{},{components:n})):r.createElement(h,o({ref:t},d))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,o[1]=s;for(var l=2;l{n.d(t,{Z:()=>f});var r=n(67294),a=n(86010),i=n(53438),o=n(39960),s=n(13919),c=n(95999);const l={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function d(e){let{href:t,children:n}=e;return r.createElement(o.Z,{href:t,className:(0,a.Z)("card padding--lg",l.cardContainer)},n)}function u(e){let{href:t,icon:n,title:i,description:o}=e;return r.createElement(d,{href:t},r.createElement("h2",{className:(0,a.Z)("text--truncate",l.cardTitle),title:i},n," ",i),o&&r.createElement("p",{className:(0,a.Z)("text--truncate",l.cardDescription),title:o},o))}function g(e){let{item:t}=e;const n=(0,i.Wl)(t);return n?r.createElement(u,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,c.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function p(e){let{item:t}=e;const n=(0,s.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,i.xz)(t.docId??void 0);return r.createElement(u,{href:t.href,icon:n,title:t.label,description:a?.description})}function h(e){let{item:t}=e;switch(t.type){case"link":return r.createElement(p,{item:t});case"category":return r.createElement(g,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function m(e){let{className:t}=e;const n=(0,i.jA)();return r.createElement(f,{items:n.items,className:t})}function f(e){const{items:t,className:n}=e;if(!t)return r.createElement(m,e);const o=(0,i.MN)(t);return r.createElement("section",{className:(0,a.Z)("row",n)},o.map(((e,t)=>r.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},r.createElement(h,{item:e})))))}},58856:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=n(87462),a=(n(67294),n(3905)),i=n(52991);const o={},s="Updating Credo",c={unversionedId:"updating/index",id:"updating/index",title:"Updating Credo",description:"This section will cover everything you need to know about updating Credo to a newer version.",source:"@site/guides/updating/index.md",sourceDirName:"updating",slug:"/updating/",permalink:"/guides/updating/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Mediation",permalink:"/guides/tutorials/mediation"},next:{title:"Update Assistant",permalink:"/guides/updating/update-assistant"}},l={},d=[{value:"Versioning",id:"versioning",level:2},{value:"Types of breaking changes",id:"types-of-breaking-changes",level:2},{value:"Breaking Code Changes",id:"breaking-code-changes",level:3},{value:"Breaking Storage Changes",id:"breaking-storage-changes",level:3},{value:"Migration Guides",id:"migration-guides",level:2}],u={toc:d},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"updating-credo"},"Updating Credo"),(0,a.kt)("p",null,"This section will cover everything you need to know about updating Credo to a newer version."),(0,a.kt)(i.Z,{mdxType:"DocCardList"}),(0,a.kt)("h2",{id:"versioning"},"Versioning"),(0,a.kt)("p",null,"Credo follows ",(0,a.kt)("a",{parentName:"p",href:"https://semver.org/"},"semantic versioning"),". This means that major version changes (",(0,a.kt)("strong",{parentName:"p"},"1"),".0.0) are considered breaking changes. When features are added this is a minor version change (0.",(0,a.kt)("strong",{parentName:"p"},"1"),".0). For bug fixes the patch version change is used (0.0.",(0,a.kt)("strong",{parentName:"p"},"1"),")."),(0,a.kt)("p",null,"While Credo is still in pre-1.0.0 version, the version change types are shifted to the right. This means a major version change is now a minor change (0.",(0,a.kt)("strong",{parentName:"p"},"1"),".0) and a minor change is now a patch change (0.0.",(0,a.kt)("strong",{parentName:"p"},"1"),"). This is done to keep the version below 1.0.0, indicating the framework is still in early development and users can expect more breaking changes that when the version has already reached 1.0.0."),(0,a.kt)("p",null,"This means if the second number in the version (0.",(0,a.kt)("strong",{parentName:"p"},"1"),".0) changes, you need to be careful with updating and always consult this page for update instructions. If only the third number changes (0.0.",(0,a.kt)("strong",{parentName:"p"},"1"),"), you can update without any issues."),(0,a.kt)("h2",{id:"types-of-breaking-changes"},"Types of breaking changes"),(0,a.kt)("p",null,"Updates to Credo bring new features and improvements to the framework. To better adapt the framework to new features we sometimes make breaking changes that will improve how Credo works. There's two parts to updates with breaking changes:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Breaking code changes"),(0,a.kt)("li",{parentName:"ol"},"Breaking storage changes")),(0,a.kt)("h3",{id:"breaking-code-changes"},"Breaking Code Changes"),(0,a.kt)("p",null,"Breaking changes to code means changes to how you interact with Credo. This includes methods being renamed, moved to another module or extended to better integrate with new features. We'll try to cover all breaking changes in migration guides, so you know exactly what is needed to update to a new version and keep the same functionality."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"If you encounter any breaking changes that aren't mentioned in the migration docs, please open an issue in the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts-docs/issues"},"Credo Docs")," repository, or directly create a PR describing the change.")),(0,a.kt)("h3",{id:"breaking-storage-changes"},"Breaking Storage Changes"),(0,a.kt)("p",null,"Breaking changes to storage are a bit more complex to deal with. While breaking changes to code only require you to update your code once, breaking changes to storage needs to be updated for every agent instance. Luckily, we've made the migration as easy as possible for you using the ",(0,a.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant"),". The Update Assistant will update all storage objects to the storage model that is expected by the newest version. If a version made changes to the storage, this will be explicitly mentioned in the migration guide. See the ",(0,a.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant")," documentation for detailed instructions on how to use the update assistant."),(0,a.kt)("h2",{id:"migration-guides"},"Migration Guides"),(0,a.kt)("p",null,"Currently the following migration guides are available:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/updating/versions/0.1-to-0.2"},"Migrating from Credo 0.1.0 to 0.2.x")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/updating/versions/0.2-to-0.3"},"Migrating from Credo 0.2.x to 0.3.x")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/updating/versions/0.3-to-0.4"},"Migrating from Credo 0.3.x to 0.4.x")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/updating/update-indy-sdk-to-askar"},"Migrating from an Indy SDK Wallet to Aries Askar"))))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/331e6edf.fd58e3de.js b/assets/js/331e6edf.fd58e3de.js new file mode 100644 index 0000000..f8f9e74 --- /dev/null +++ b/assets/js/331e6edf.fd58e3de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[9196],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=l(n),p=a,h=u["".concat(c,".").concat(p)]||u[p]||g[p]||i;return n?r.createElement(h,o(o({ref:t},d),{},{components:n})):r.createElement(h,o({ref:t},d))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,o[1]=s;for(var l=2;l{n.d(t,{Z:()=>f});var r=n(67294),a=n(86010),i=n(53438),o=n(39960),s=n(13919),c=n(95999);const l={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function d(e){let{href:t,children:n}=e;return r.createElement(o.Z,{href:t,className:(0,a.Z)("card padding--lg",l.cardContainer)},n)}function u(e){let{href:t,icon:n,title:i,description:o}=e;return r.createElement(d,{href:t},r.createElement("h2",{className:(0,a.Z)("text--truncate",l.cardTitle),title:i},n," ",i),o&&r.createElement("p",{className:(0,a.Z)("text--truncate",l.cardDescription),title:o},o))}function g(e){let{item:t}=e;const n=(0,i.Wl)(t);return n?r.createElement(u,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,c.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function p(e){let{item:t}=e;const n=(0,s.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,i.xz)(t.docId??void 0);return r.createElement(u,{href:t.href,icon:n,title:t.label,description:a?.description})}function h(e){let{item:t}=e;switch(t.type){case"link":return r.createElement(p,{item:t});case"category":return r.createElement(g,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function m(e){let{className:t}=e;const n=(0,i.jA)();return r.createElement(f,{items:n.items,className:t})}function f(e){const{items:t,className:n}=e;if(!t)return r.createElement(m,e);const o=(0,i.MN)(t);return r.createElement("section",{className:(0,a.Z)("row",n)},o.map(((e,t)=>r.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},r.createElement(h,{item:e})))))}},58856:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=n(87462),a=(n(67294),n(3905)),i=n(52991);const o={},s="Updating Credo",c={unversionedId:"updating/index",id:"updating/index",title:"Updating Credo",description:"This section will cover everything you need to know about updating Credo to a newer version.",source:"@site/guides/updating/index.md",sourceDirName:"updating",slug:"/updating/",permalink:"/guides/updating/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Verifying Credentials using the OpenID4VC Verifier Module",permalink:"/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module"},next:{title:"Update Assistant",permalink:"/guides/updating/update-assistant"}},l={},d=[{value:"Versioning",id:"versioning",level:2},{value:"Types of breaking changes",id:"types-of-breaking-changes",level:2},{value:"Breaking Code Changes",id:"breaking-code-changes",level:3},{value:"Breaking Storage Changes",id:"breaking-storage-changes",level:3},{value:"Migration Guides",id:"migration-guides",level:2}],u={toc:d},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"updating-credo"},"Updating Credo"),(0,a.kt)("p",null,"This section will cover everything you need to know about updating Credo to a newer version."),(0,a.kt)(i.Z,{mdxType:"DocCardList"}),(0,a.kt)("h2",{id:"versioning"},"Versioning"),(0,a.kt)("p",null,"Credo follows ",(0,a.kt)("a",{parentName:"p",href:"https://semver.org/"},"semantic versioning"),". This means that major version changes (",(0,a.kt)("strong",{parentName:"p"},"1"),".0.0) are considered breaking changes. When features are added this is a minor version change (0.",(0,a.kt)("strong",{parentName:"p"},"1"),".0). For bug fixes the patch version change is used (0.0.",(0,a.kt)("strong",{parentName:"p"},"1"),")."),(0,a.kt)("p",null,"While Credo is still in pre-1.0.0 version, the version change types are shifted to the right. This means a major version change is now a minor change (0.",(0,a.kt)("strong",{parentName:"p"},"1"),".0) and a minor change is now a patch change (0.0.",(0,a.kt)("strong",{parentName:"p"},"1"),"). This is done to keep the version below 1.0.0, indicating the framework is still in early development and users can expect more breaking changes that when the version has already reached 1.0.0."),(0,a.kt)("p",null,"This means if the second number in the version (0.",(0,a.kt)("strong",{parentName:"p"},"1"),".0) changes, you need to be careful with updating and always consult this page for update instructions. If only the third number changes (0.0.",(0,a.kt)("strong",{parentName:"p"},"1"),"), you can update without any issues."),(0,a.kt)("h2",{id:"types-of-breaking-changes"},"Types of breaking changes"),(0,a.kt)("p",null,"Updates to Credo bring new features and improvements to the framework. To better adapt the framework to new features we sometimes make breaking changes that will improve how Credo works. There's two parts to updates with breaking changes:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Breaking code changes"),(0,a.kt)("li",{parentName:"ol"},"Breaking storage changes")),(0,a.kt)("h3",{id:"breaking-code-changes"},"Breaking Code Changes"),(0,a.kt)("p",null,"Breaking changes to code means changes to how you interact with Credo. This includes methods being renamed, moved to another module or extended to better integrate with new features. We'll try to cover all breaking changes in migration guides, so you know exactly what is needed to update to a new version and keep the same functionality."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"If you encounter any breaking changes that aren't mentioned in the migration docs, please open an issue in the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts-docs/issues"},"Credo Docs")," repository, or directly create a PR describing the change.")),(0,a.kt)("h3",{id:"breaking-storage-changes"},"Breaking Storage Changes"),(0,a.kt)("p",null,"Breaking changes to storage are a bit more complex to deal with. While breaking changes to code only require you to update your code once, breaking changes to storage needs to be updated for every agent instance. Luckily, we've made the migration as easy as possible for you using the ",(0,a.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant"),". The Update Assistant will update all storage objects to the storage model that is expected by the newest version. If a version made changes to the storage, this will be explicitly mentioned in the migration guide. See the ",(0,a.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant")," documentation for detailed instructions on how to use the update assistant."),(0,a.kt)("h2",{id:"migration-guides"},"Migration Guides"),(0,a.kt)("p",null,"Currently the following migration guides are available:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/updating/versions/0.1-to-0.2"},"Migrating from Credo 0.1.0 to 0.2.x")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/updating/versions/0.2-to-0.3"},"Migrating from Credo 0.2.x to 0.3.x")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/updating/versions/0.3-to-0.4"},"Migrating from Credo 0.3.x to 0.4.x")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/guides/updating/update-indy-sdk-to-askar"},"Migrating from an Indy SDK Wallet to Aries Askar"))))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/365d3941.54891072.js b/assets/js/365d3941.54891072.js new file mode 100644 index 0000000..b1e94ee --- /dev/null +++ b/assets/js/365d3941.54891072.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[6347],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),d=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=d(n),m=o,g=c["".concat(l,".").concat(m)]||c[m]||p[m]||r;return n?a.createElement(g,s(s({ref:t},u),{},{components:n})):a.createElement(g,s({ref:t},u))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,s=new Array(r);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:o,s[1]=i;for(var d=2;d{n.d(t,{Z:()=>s});var a=n(67294),o=n(86010);const r={tabItem:"tabItem_Ymn6"};function s(e){let{children:t,hidden:n,className:s}=e;return a.createElement("div",{role:"tabpanel",className:(0,o.Z)(r.tabItem,s),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(87462),o=n(67294),r=n(86010),s=n(12466),i=n(16550),l=n(91980),d=n(67392),u=n(50012);function c(e){return function(e){return o.Children.map(e,(e=>{if((0,o.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:o}}=e;return{value:t,label:n,attributes:a,default:o}}))}function p(e){const{values:t,children:n}=e;return(0,o.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,d.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),r=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(r),(0,o.useCallback)((e=>{if(!r)return;const t=new URLSearchParams(a.location.search);t.set(r,e),a.replace({...a.location,search:t.toString()})}),[r,a])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,r=p(e),[s,i]=(0,o.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:r}))),[l,d]=g({queryString:n,groupId:a}),[c,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,r]=(0,u.Nk)(n);return[a,(0,o.useCallback)((e=>{n&&r.set(e)}),[n,r])]}({groupId:a}),f=(()=>{const e=l??c;return m({value:e,tabValues:r})?e:null})();(0,o.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:s,selectValue:(0,o.useCallback)((e=>{if(!m({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),h(e)}),[d,h,r]),tabValues:r}}var f=n(72389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:l,tabValues:d}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.o5)(),p=e=>{const t=e.currentTarget,n=u.indexOf(t),a=d[n].value;a!==i&&(c(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return o.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":n},t)},d.map((e=>{let{value:t,label:n,attributes:s}=e;return o.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:p},s,{className:(0,r.Z)("tabs__item",k.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:a}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===a));return e?(0,o.cloneElement)(e,{className:"margin-top--md"}):null}return o.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=h(e);return o.createElement("div",{className:(0,r.Z)("tabs-container",k.tabList)},o.createElement(y,(0,a.Z)({},e,t)),o.createElement(b,(0,a.Z)({},e,t)))}function w(e){const t=(0,f.Z)();return o.createElement(v,(0,a.Z)({key:String(t)},e))}},78412:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var a=n(87462),o=(n(67294),n(3905)),r=n(74866),s=n(85162);const i={},l="Migrating from Credo 0.2.x to 0.3.x",d={unversionedId:"updating/versions/0.2-to-0.3",id:"updating/versions/0.2-to-0.3",title:"Migrating from Credo 0.2.x to 0.3.x",description:"This document describes everything you need to know for updating Credo 0.2.x to 0.3.x. If you're not aware of how updating in Credo works make sure to first read the guide on Updating Credo.",source:"@site/guides/updating/versions/0.2-to-0.3.md",sourceDirName:"updating/versions",slug:"/updating/versions/0.2-to-0.3",permalink:"/guides/updating/versions/0.2-to-0.3",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Migrating from Credo 0.1.0 to 0.2.x",permalink:"/guides/updating/versions/0.1-to-0.2"},next:{title:"Migrating from Credo 0.3.x to 0.4.x",permalink:"/guides/updating/versions/0.3-to-0.4"}},u={},c=[{value:"React Native",id:"react-native",level:4},{value:"Node",id:"node",level:4},{value:"Breaking Code Changes",id:"breaking-code-changes",level:2},{value:"Agent creation",id:"agent-creation",level:3},{value:"0.2.x",id:"02x",level:5},{value:"0.3.x",id:"03x",level:5},{value:"did:key usage in protocols",id:"didkey-usage-in-protocols",level:3},{value:"Modules extracted from the core",id:"modules-extracted-from-the-core",level:3},{value:"0.2.x",id:"02x-1",level:5},{value:"0.3.x",id:"03x-1",level:5},{value:"Discover Features Module",id:"discover-features-module",level:3},{value:"0.2.x",id:"02x-2",level:5},{value:"0.3.x",id:"03x-2",level:5},{value:"0.2.x",id:"02x-3",level:5},{value:"0.3.x",id:"03x-3",level:5},{value:"Ledger Module",id:"ledger-module",level:3},{value:"Proofs Module",id:"proofs-module",level:3},{value:"Module API Updates",id:"module-api-updates",level:4},{value:"0.2.x",id:"02x-4",level:5},{value:"0.3.x",id:"03x-4",level:5},{value:"Messages Extracted from Proof Exchange Record",id:"messages-extracted-from-proof-exchange-record",level:4},{value:"0.2.x",id:"02x-5",level:5},{value:"0.3.x",id:"03x-5",level:5},{value:"Out Of Band Proofs and Credentials",id:"out-of-band-proofs-and-credentials",level:3},{value:"0.2.x",id:"02x-6",level:4},{value:"0.3.x",id:"03x-6",level:4},{value:"Updating Custom Modules to the new Plugin API",id:"updating-custom-modules-to-the-new-plugin-api",level:3},{value:"Renaming handler classes",id:"renaming-handler-classes",level:4},{value:"0.2.x",id:"02x-7",level:5},{value:"0.3.x",id:"03x-7",level:5},{value:"Using AgentContext",id:"using-agentcontext",level:4},{value:"0.2.x",id:"02x-8",level:4},{value:"0.3.x",id:"03x-8",level:4},{value:"Using OutboundMessageContext",id:"using-outboundmessagecontext",level:4},{value:"0.2.x",id:"02x-9",level:4},{value:"0.3.x",id:"03x-9",level:4},{value:"Updating module structure to register in new Plugin API",id:"updating-module-structure-to-register-in-new-plugin-api",level:4},{value:"Breaking Storage Changes",id:"breaking-storage-changes",level:2},{value:"Migrate Proof Record Properties",id:"migrate-proof-record-properties",level:3},{value:"0.2.x",id:"02x-10",level:4},{value:"0.3.x",id:"03x-10",level:4},{value:"Migrate Connection Record properties",id:"migrate-connection-record-properties",level:3},{value:"Migrate Did Record properties",id:"migrate-did-record-properties",level:3},{value:"0.2.x",id:"02x-11",level:4},{value:"0.3.x",id:"03x-11",level:4}],p={toc:c},m="wrapper";function g(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"migrating-from-credo-02x-to-03x"},"Migrating from Credo 0.2.x to 0.3.x"),(0,o.kt)("p",null,"This document describes everything you need to know for updating Credo 0.2.x to 0.3.x. If you're not aware of how updating in Credo works make sure to first read the guide on ",(0,o.kt)("a",{parentName:"p",href:"/guides/updating/"},"Updating Credo"),"."),(0,o.kt)("p",null,"First of all, update you dependencies to the 0.3.x versions. This will also update the needed peer depedencnies. ",(0,o.kt)("strong",{parentName:"p"},"Extension packages are not updated with this command"),". You need to update these manually, and make sure they're up to date with the latest version of Credo."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"React Native",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @aries-framework/react-native@^0.3.0 @aries-framework/core@^0.3.0 indy-sdk-react-native@^0.3.0\n\n# or NPM\nnpn install @aries-framework/react-native@^0.3.0 @aries-framework/core@^0.3.0 indy-sdk-react-native@^0.3.0\n"))),(0,o.kt)(s.Z,{label:"Node",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @aries-framework/node@^0.3.0 @aries-framework/core@^0.3.0\n\n# or NPM\nnpm install @aries-framework/node@^0.3.0 @aries-framework/core@^0.3.0\n")))),(0,o.kt)("h2",{id:"breaking-code-changes"},"Breaking Code Changes"),(0,o.kt)("p",null,"This section will list all breaking changes made to the public API of Credo between version 0.2.x and 0.3.0."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"If you have custom modules take into account there could be a lot more breaking changes that aren't documented here. We try to make sure that the biggest breaking changes to the internal API are also documented here (e.g. see ",(0,o.kt)("a",{parentName:"p",href:"#updating-custom-modules-to-the-new-plugin-api"},"Updating Custom Modules to the Plugin API"),"), but it is possible some breaking changes are not documented here (feel free to open PRs).")),(0,o.kt)("h3",{id:"agent-creation"},"Agent creation"),(0,o.kt)("p",null,"The agent constructor has been updated to a single ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentOptions")," object that contains the config and dependencies properties."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const agent = new Agent(agentConfig, agentDependencies)\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const agent = new Agent({ config: agentConfig, dependencies: agentDependencies })\n")))),(0,o.kt)("p",null,"This object contains:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"config: Agent's initial configuration"),(0,o.kt)("li",{parentName:"ul"},"dependencies: platform-specific Agent dependencies"),(0,o.kt)("li",{parentName:"ul"},"modules: optional field for internal module configuration and custom module registration")),(0,o.kt)("p",null,"For easy migration, you can simply construct ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentOptions")," by putting current InitConfig into ",(0,o.kt)("inlineCode",{parentName:"p"},"config")," key and agentDependencies into ",(0,o.kt)("inlineCode",{parentName:"p"},"dependencies")," key."),(0,o.kt)("p",null,"Note that, if you are defining ",(0,o.kt)("inlineCode",{parentName:"p"},"indyLedgers")," configuration, you should set the indyNamespace for every ledger, as explained in ",(0,o.kt)("a",{parentName:"p",href:"/guides/tutorials/agent-config/#indyledgers"},"Agent Config tutorial"),"."),(0,o.kt)("h3",{id:"didkey-usage-in-protocols"},"did:key usage in protocols"),(0,o.kt)("p",null,"In accordance with ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0360-use-did-key"},"Aries RFC 0360"),", since 0.2.5 there is a configuration parameter called ",(0,o.kt)("inlineCode",{parentName:"p"},"useDidKeyInProtocols")," which, when enabled, will encode keys in did:key instead of previous base58 format, unless the other party has started a protocol and is using base58."),(0,o.kt)("p",null,"This parameter was previously disabled by default and now it is enabled. If your agent only interacts with modern agents (e.g. Credo 0.2.5 and newer) this will not represent any issue. Otherwise it is safer to explicitly set it to ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),". However, keep in mind that we expect this setting to be deprecated in the future, so we encourage you to update all your agents to use did:key."),(0,o.kt)("h3",{id:"modules-extracted-from-the-core"},"Modules extracted from the core"),(0,o.kt)("p",null,"In this release two modules were extracted from the core and published as separate, optional packages:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"actionMenu has been moved to @aries-framework/action-menu"),(0,o.kt)("li",{parentName:"ul"},"questionAnswer has been moved to @aries-framework/question-answer")),(0,o.kt)("p",null,"If you want to use them, you can integrate in an Agent instance by injecting them in constructor, as follows:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { ActionMenuModule } from '@aries-framework/action-menu'\nimport { QuestionAnswerModule } from '@aries-framework/question-answer'\n\nconst agent = new Agent({\n config: {\n /* config */\n },\n dependencies: agentDependencies,\n modules: {\n actionMenu: new ActionMenuModule(),\n questionAnswer: new QuestionAnswerModule(),\n /* other custom modules */\n },\n})\n")),(0,o.kt)("p",null,"As they are now considered custom modules, their API can be accessed in ",(0,o.kt)("inlineCode",{parentName:"p"},"modules")," namespace, so you should add it to every call to them."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.questionAnswer.sendQuestion(connectionId, {\n question: 'Do you want to play?',\n validResponses: [{ text: 'Yes' }, { text: 'No' }],\n})\n\nawait agent.questionAnswer.sendAnswer(questionAnswerRecordId, 'Yes')\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.modules.questionAnswer.sendQuestion(connectionId, {\n question: 'Do you want to play?',\n validResponses: [{ text: 'Yes' }, { text: 'No' }],\n})\n\nawait agent.modules.questionAnswer.sendAnswer(questionAnswerRecordId, 'Yes')\n")))),(0,o.kt)("h3",{id:"discover-features-module"},"Discover Features Module"),(0,o.kt)("p",null,"This module now supports both Discover Features V1 and V2, and as it happened to other modules, ",(0,o.kt)("inlineCode",{parentName:"p"},"queryFeatures")," method parameters have been unified to a single object and requires to specify the version of Discover Features protocol to be used. Note that ",(0,o.kt)("inlineCode",{parentName:"p"},"query")," property has been replaced by the more general ",(0,o.kt)("inlineCode",{parentName:"p"},"queries")," which accepts multiple features to be search for. To convert a query to this new format you simply need to create a single-object array whose unique object whose ",(0,o.kt)("inlineCode",{parentName:"p"},"featureType")," field is 'protocol' and ",(0,o.kt)("inlineCode",{parentName:"p"},"match")," field is the query itself."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.discovery.queryFeatures(connectionId, {\n query: 'https://didcomm.org/messagepickup/2.0',\n comment: 'Detect if protocol is supported',\n})\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.discovery.queryFeatures({\n connectionId,\n protocolVersion: 'v1',\n queries: [{ featureType: 'protocol', match: 'https://didcomm.org/messagepickup/2.0' }],\n comment: 'Detect if protocol is supported',\n})\n")))),(0,o.kt)("p",null,"The convenience method ",(0,o.kt)("strong",{parentName:"p"},"isProtocolSupported")," has been replaced by the more general synchronous mode of queryFeatures, which works when awaitDisclosures in options is set. Instead of returning a boolean, it returns an object with matching features:"),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const isPickUpV2Supported = await agent.discovery.isProtocolSupported(connectionId, StatusRequestMessage)\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const discloseForPickupV2 = await agent.discovery.queryFeatures({\n connectionId: connectionId,\n protocolVersion: 'v1',\n queries: [{ featureType: 'protocol', match: StatusMessage.type.protocolUri }],\n awaitDisclosures: true,\n awaitDisclosuresTimeoutMs: 7000,\n})\n\nconst isPickUpV2Supported = discloseForPickupV2.features?.length === 1\n")))),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Discover Features module does not rely anymore on Agent ",(0,o.kt)("inlineCode",{parentName:"p"},"Dispatcher")," to determine protocol support. Instead, it uses the new Feature Registry, where any custom modules implementing protocols must register them."),(0,o.kt)("p",{parentName:"admonition"},"This procedure can be done in module's ",(0,o.kt)("inlineCode",{parentName:"p"},"register(dependencyManager, featureRegistry)"),".")),(0,o.kt)("h3",{id:"ledger-module"},"Ledger Module"),(0,o.kt)("p",null,"Apart from the aforementioned indyLedgers configuration, you should also ",(0,o.kt)("a",{parentName:"p",href:"/guides/tutorials/issue-an-anoncreds-credential-over-didcomm#side-notes"},"note a slight change")," in behaviour when attempting to register credential definitions that already exists on the ledger but not in the wallet."),(0,o.kt)("h3",{id:"proofs-module"},"Proofs Module"),(0,o.kt)("h4",{id:"module-api-updates"},"Module API Updates"),(0,o.kt)("p",null,"Much in the same way as in 0.2.0 release when ",(0,o.kt)("a",{parentName:"p",href:"/guides/updating/versions/0.1-to-0.2#module-api-updates"},"Issue Credential V2 protocol")," has been added, now that Present Proof V2 is supported, we introduced changes to proofs module."),(0,o.kt)("p",null,"Basically, for all methods in the proofs module you should take the following steps to update your code:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Move all function parameters into a single object. All module methods now take a single object that contain all properties."),(0,o.kt)("li",{parentName:"ol"},"For methods that initiate proposals, requests or presentations (",(0,o.kt)("inlineCode",{parentName:"li"},"proposeProof"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"acceptProposal"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"requestProof"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"acceptPresentation"),", etc.), you should pass ",(0,o.kt)("inlineCode",{parentName:"li"},"protocolVersion: 'v1'")," to indicate we should use the v1 protocol"),(0,o.kt)("li",{parentName:"ol"},"All indy specific attributes (e.g. Presentation Preview) should be passed in the ",(0,o.kt)("inlineCode",{parentName:"li"},"proofFormats.indy")," object."),(0,o.kt)("li",{parentName:"ol"},"Some indy objects, as the preview should now be passed only as their attributes (i.e. no need of creating the object instance) and provided in the ",(0,o.kt)("inlineCode",{parentName:"li"},"proofFormats.indy")," object.")),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.proofs.proposeProof(\n 'connectionId',\n new PresentationPreview({\n attributes: [new PresentationPreviewAttribute({ name: 'key', value: 'value' })],\n predicates: [\n new PresentationPreviewPredicate({\n name: 'age',\n credentialDefinitionId,\n predicate: PredicateType.GreaterThanOrEqualTo,\n threshold: 50,\n }),\n ],\n })\n)\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.proofs.proposeProof({\n connectionId: connection.id,\n protocolVersion: 'v1',\n proofFormats: {\n indy: {\n attributes: [{ name: 'key', value: 'value' }],\n predicates: [{name: 'age', credentialDefinitionId, predicate: PredicateType.GreaterThanOrEqualTo, threshold: 50, ]\n },\n },\n comment: 'Propose proof comment',\n})\n")))),(0,o.kt)("h4",{id:"messages-extracted-from-proof-exchange-record"},"Messages Extracted from Proof Exchange Record"),(0,o.kt)("p",null,"The DIDComm messages that were previously stored on the proof record, have been extracted to separate DIDComm message records. This makes it easier to work with multiple versions of the protocol internally, and keeps the proof exchange record agnostic of the protocol version. Instead of accessing the messages through the ",(0,o.kt)("inlineCode",{parentName:"p"},"proposalMessage"),", ",(0,o.kt)("inlineCode",{parentName:"p"},"requestMessage")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"presentationMessage")," parameters, we now expose dedicated methods on the proofs module to retrieve the message."),(0,o.kt)("p",null,"With the addition of the v2 messages, all v1 messages have been prefixed with ",(0,o.kt)("inlineCode",{parentName:"p"},"V1")," while v2 messages have been prefixed with ",(0,o.kt)("inlineCode",{parentName:"p"},"V2")," (",(0,o.kt)("inlineCode",{parentName:"p"},"V1RequestPresentationMessage")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"V2RequestPresentationMessage"),"). If you were using these messages classes throughout your codebase, update them to use the ",(0,o.kt)("inlineCode",{parentName:"p"},"V1")," prefix."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const proofRecord = await agent.proofs.getById('proofRecordId')\n\nconst proposalMessage = proofRecord.proposalMessage\nconst requestMessage = proofRecord.requestMessage\nconst presentationMessage = proofRecord.presentationMessage\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const proofRecord = await agent.proofs.getById('proofRecordId')\n\nconst proposalMessage = await agent.proofs.findProposalMessage('proofRecordId')\nconst requestMessage = await agent.proofs.findRequestMessage('proofRecordId')\nconst presentationMessage = await agent.proofs.findPresentationMessage('proofRecordId')\n")),(0,o.kt)("p",null,"Because Credo now also supports the present proof v2 protocol, the return type of this protocol has been changed to ",(0,o.kt)("inlineCode",{parentName:"p"},"V1XXXMessage | V2XXXMessage | null"),". Take this into account when working with the messages."),(0,o.kt)("p",null,"You can check if a message is a specific version by using the ",(0,o.kt)("inlineCode",{parentName:"p"},"instanceof")," operator:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"if (proposalMessage instanceof V1RequestPresentationMessage) {\n // do something\n}\n")))),(0,o.kt)("h3",{id:"out-of-band-proofs-and-credentials"},"Out Of Band Proofs and Credentials"),(0,o.kt)("p",null,"With the addition of the out of band module, the creation of connection-less messages has been split into two steps, allowing for better control and flexibility. The previous ",(0,o.kt)("inlineCode",{parentName:"p"},"agent.proofs.createOutOfBandRequest")," has been replaced by the ",(0,o.kt)("inlineCode",{parentName:"p"},"agent.proofs.createRequest")," method. This new method creates a proof request that is not tied to any connection."),(0,o.kt)("p",null,"What you can now do is call ",(0,o.kt)("inlineCode",{parentName:"p"},"agent.oob.createLegacyConnectionlessInvitation")," to attach the service decorator to the message and get a legacy connectionless message."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const { requestMessage, proofRecord } = await agent.proofs.createOutOfBandRequest({\n requestedAttributes: {\n group1: {\n name: 'dateOfBirth',\n restrictions: [{ schemaId: 'F72i3Y3Q4i466efjYJYCHM:2:aha_cert:4.1.1' }],\n },\n },\n})\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const { message, proofRecord } = await agent.proofs.createRequest({\n protocolVersion: 'v1',\n proofFormats: {\n indy: {\n requestedAttributes: {\n group1: {\n name: 'dateOfBirth',\n restrictions: [\n {\n schemaId: 'F72i3Y3Q4i466efjYJYCHM:2:aha_cert:4.1.1',\n },\n ],\n },\n },\n },\n },\n})\n\nconst { invitationUrl, message: messageWithServiceDecorator } = await agent.oob.createLegacyConnectionlessInvitation({\n recordId: proofRecord.id,\n domain: 'https://google.com',\n message,\n})\n")))),(0,o.kt)("p",null,"Out of band invitations are the new way to send messages out of band. You can use it for connection-less exchanges, but also for exchanges that you want to establish a connection for first. Here's an example on how to use the out of band module to create a connection-less invitation for a proof request:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const outOfBandRecord = await agent.oob.createInvitation({\n handshake: false, // set to true if you want to create a connection\n messages: [message],\n})\n\nconst invitationUrl = outOfBandRecord.outOfBandInvitation.toUrl({\n domain: 'https://Credo.com',\n})\n")),(0,o.kt)("p",null,"As you can see, there's now a lot more ways to use a message not tied to a connection. By splitting the creation of the message from the creation of the invitation, we can now create a message not bound to a connection (at time of creation) for multiple use cases."),(0,o.kt)("h3",{id:"updating-custom-modules-to-the-new-plugin-api"},"Updating Custom Modules to the new Plugin API"),(0,o.kt)("p",null,"Although this isn't a breaking change to the public API of the framework, it is something that you will need to take into account if you have custom modules and want to upgrade them to make compatible with Credo 0.3.0."),(0,o.kt)("h4",{id:"renaming-handler-classes"},"Renaming handler classes"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"Handler")," has been have been renamed to ",(0,o.kt)("inlineCode",{parentName:"p"},"MessageHandler")," to be be more descriptive, along with related types and methods. This means:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"Handler")," is now ",(0,o.kt)("inlineCode",{parentName:"li"},"MessageHandler")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"HandlerInboundMessage")," is now ",(0,o.kt)("inlineCode",{parentName:"li"},"MessageHandlerInboundMessage")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"Dispatcher.registerHandler")," is now ",(0,o.kt)("inlineCode",{parentName:"li"},"Dispatcher.registerMessageHandler")," and is marked as deprecated. The recommended way of registering handlers is by using the new ",(0,o.kt)("inlineCode",{parentName:"li"},"MessageHandlerRegistry")," object by calling ",(0,o.kt)("inlineCode",{parentName:"li"},"MessageHandlerRegistry.registerMessageHandler"),".")),(0,o.kt)("p",null,"If your custom module include message handlers, you must update them accordingly."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"export class MyHandler implements Handler {\n public supportedMessages = [MyMessage]\n\n public async handle(inboundMessage: HandlerInboundMessage) {\n ...\n }\n}\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"export class MyHandler implements MessageHandler {\n public supportedMessages = [MyMessage]\n\n public async handle(inboundMessage: MessageHandlerInboundMessage) {\n ...\n }\n}\n")))),(0,o.kt)("h4",{id:"using-agentcontext"},"Using AgentContext"),(0,o.kt)("p",null,"First of all, it's worth noting that now all services and repositories have been made stateless. A new ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentContext")," is introduced that holds the current context, which is passed to each method call. Therefore, you'll need to update every call to services, repositories and also eventEmitter methods to pass ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentContext")," object as first argument."),(0,o.kt)("p",null,"AgentContext can be obtained from either:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"MessageContext used by message handlers (accesed as messageContext.agentContext)"),(0,o.kt)("li",{parentName:"ul"},"Injected in your API constructor: you can store the instance and pass it to all your service and repository calls")),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"}," public async createRequest(options: CreateRequestOptions) {\n const message = new RequestMessage({\n parentThreadId: options.parentThreadId,\n })\n\n const record = new MyRecord({\n connectionId: options.connectionRecord.id,\n threadId: message.id,\n parentThreadId: options.parentThreadId,\n })\n\n await this.myRecordRepository.save(record)\n\n this.eventEmitter.emit({\n type: MyRecordEventTypes.StateChanged,\n payload: {\n myRecord: record,\n previousState: null,\n },\n })\n\n return { record, message }\n }\n\n public async processRequest(messageContext: HandlerInboundMessage) {\n const { message } = messageContext\n\n const record = new MyRecord({\n connectionId: connection.id,\n threadId: messageContext.message.id,\n parentThreadId: messageContext.message.thread?.parentThreadId,\n })\n\n await this.myRepository.save(record)\n\n return record\n }\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"}," public async createRequest(agentContext: AgentContext, options: CreateRequestOptions) {\n const message = new RequestMessage({\n parentThreadId: options.parentThreadId,\n })\n\n const record = new MyRecord({\n connectionId: options.connectionRecord.id,\n threadId: message.id,\n parentThreadId: options.parentThreadId,\n })\n\n await this.myRecordRepository.save(agentContext, record)\n\n this.eventEmitter.emit(agentContext, {\n type: MyRecordEventTypes.StateChanged,\n payload: {\n myRecord: record,\n previousState: null,\n },\n })\n\n return { record, message }\n }\n\n public async processRequest(messageContext: MessageHandlerInboundMessage) {\n const { message } = messageContext\n\n const record = new MyRecord({\n connectionId: connection.id,\n threadId: messageContext.message.id,\n parentThreadId: messageContext.message.thread?.parentThreadId,\n })\n\n await this.myRepository.save(messageContext.agentContext, record)\n\n return record\n }\n")))),(0,o.kt)("h4",{id:"using-outboundmessagecontext"},"Using OutboundMessageContext"),(0,o.kt)("p",null,"If your module implements a protocol that sends messages to other agents, you will notice that Agent's ",(0,o.kt)("inlineCode",{parentName:"p"},"MessageSender")," now receives the more generic ",(0,o.kt)("inlineCode",{parentName:"p"},"OutboundMessageContext")," class, which replaces previous helper method ",(0,o.kt)("inlineCode",{parentName:"p"},"createOutboundMessage"),"."),(0,o.kt)("p",null,"You can take advantage of this new mechanism to associate a record to the context, in order to do specific actions to it when outbound message state changes (e.g. a ",(0,o.kt)("inlineCode",{parentName:"p"},"MessageSendingError")," is thrown or ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentMessageSentEvent")," is emitted)."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { createOutboundMessage } from '@aries-framework/core'\n\nconst outboundMessage = createOutboundMessage(connection, message)\nawait this.messageSender.sendMessage(outboundMessage)\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { OutboundMessageContext } from '@aries-framework/core'\n\nconst outboundMessageContext = new OutboundMessageContext(message, {\n agentContext: this.agentContext,\n connection,\n // optional, if you want to link the message to a related record\n associatedRecord: record,\n})\n\nawait this.messageSender.sendMessage(outboundMessageContext)\n")))),(0,o.kt)("h4",{id:"updating-module-structure-to-register-in-new-plugin-api"},"Updating module structure to register in new Plugin API"),(0,o.kt)("p",null,"Existing modules can benefit from the new Plugin API mechanism by doing the following modifications:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Rename Module class (e.g. MyModule) to API class (MyApi) and add @injectable decorator. Inject AgentContext in order to pass it to any services or repositories it might call. For instance:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { injectable } from '@aries-framework/core'\n\n@injectable() // <-- Add this\nexport class MyApi {\n private messageSender: MessageSender\n private myService: MyService\n private connectionService: ConnectionService\n private agentContext: AgentContext // <-- Add this\n\n public constructor(\n messageHandlerRegistry: MessageHandlerRegistry, // <-- use this instead of Dispatcher\n messageSender: MessageSender,\n myService: MyService,\n connectionService: ConnectionService,\n agentContext: AgentContext // <-- Add this\n ) {\n this.messageSender = messageSender\n this.myService = myService\n this.connectionService = connectionService\n this.agentContext = agentContext // <-- Add this\n this.registerHandlers(messageHandlerRegistry) // <-- use messageHandlerRegistry instead of dispatcher\n }\n")),(0,o.kt)("ol",{start:2},(0,o.kt)("li",{parentName:"ol"},"Create a new Module class that implements Module interface and registers the dependencies and features. For instance:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import type { DependencyManager, FeatureRegistry, Module } from '@aries-framework/core'\n\nimport { Protocol } from '@aries-framework/core'\n\nexport class MyModule implements Module {\n public readonly api = MyApi // the one we've just renamed from MyModule\n\n public register(dependencyManager: DependencyManager, featureRegistry: FeatureRegistry) {\n // Api\n dependencyManager.registerContextScoped(MyApi)\n\n // Services\n dependencyManager.registerSingleton(MyService)\n\n // Repositories\n dependencyManager.registerSingleton(MyRepository)\n\n // Feature Registry: don't forget to register your protocols and other features your module may add\n featureRegistry.register(\n new Protocol({\n id: 'https://didcomm.org/my-protocol/1.0',\n roles: [MyRole.Sender, MyRole.Receiver],\n })\n )\n }\n")),(0,o.kt)("p",null,"After doing this, you can add your module to agent constructor like this:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const agent = new Agent({\n config: {\n /* config */\n },\n dependencies: agentDependencies,\n modules: {\n myModule: new MyModule(),\n /* other custom modules */\n },\n})\n\n// MyModule API can be accessed in agent.modules namespace\nawait agent.modules.myModule.doSomething()\n\nawait agent.modules.myModule.doAnotherThing()\n")),(0,o.kt)("h2",{id:"breaking-storage-changes"},"Breaking Storage Changes"),(0,o.kt)("p",null,"The 0.3.0 release introduces some breaking changes to the storage format, mainly related to Proof Exchanges."),(0,o.kt)("p",null,"Below all breaking storage changes are explained in as much detail as possible. The update assistant provides all tools to migrate without a hassle, but it is important to know what has changed. All examples only show the keys that have changed, unrelated keys in records have been omitted."),(0,o.kt)("p",null,"See the ",(0,o.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant")," documentation for a guide on how to use the update assistant."),(0,o.kt)("p",null,"There are no config parameters to be provided to the update assistant to migrate from 0.2.x to 0.3.x."),(0,o.kt)("h3",{id:"migrate-proof-record-properties"},"Migrate Proof Record Properties"),(0,o.kt)("p",null,"In 0.3.0 the v1 DIDComm messages have been moved out of the proof record into separate records using the DidCommMessageRepository. The migration scripts extracts all messages (proposalMessage, requestMessage, presentationMessage) and moves them into the DidCommMessageRepository. With the addition of support for different protocol versions the proof record now stores the protocol version."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "proposalMessage": { ... },\n "requestMessage": { ... },\n "presentationMessage": { ... },\n}\n'))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "protocolVersion": "v1"\n}\n')))),(0,o.kt)("h3",{id:"migrate-connection-record-properties"},"Migrate Connection Record properties"),(0,o.kt)("p",null,"The recently introduced ",(0,o.kt)("inlineCode",{parentName:"p"},"connectionType")," tag has been pluralized to reflect the fact that more than a single connection type can be defined for a given connection. Also, it is now available as a direct record property (e.g. can be queried and set by using ",(0,o.kt)("inlineCode",{parentName:"p"},"connectionRecord.connectionTypes"),") apart from the tag for efficient search."),(0,o.kt)("p",null,"The migration script renames ",(0,o.kt)("inlineCode",{parentName:"p"},"connectionType")," to ",(0,o.kt)("inlineCode",{parentName:"p"},"connectionTypes")," in all connections, and also searches for any mediation connection and adds ",(0,o.kt)("inlineCode",{parentName:"p"},"ConnectionType.Mediator")," as one of its types."),(0,o.kt)("h3",{id:"migrate-did-record-properties"},"Migrate Did Record properties"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"didRecord.id")," was previously the did itself. However to allow for connecting with self, where multiple did records are created for the same did, the id property is now an uuid and a separate did property is added."),(0,o.kt)("p",null,"The migration script generates a new ID for each did record and stores its did into didRecord.did property."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "id": "did"\n}\n'))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "id": "uuid",\n "did": "did"\n}\n')))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/365d3941.dc6461d3.js b/assets/js/365d3941.dc6461d3.js deleted file mode 100644 index 0260397..0000000 --- a/assets/js/365d3941.dc6461d3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[6347],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),d=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=d(n),m=o,g=c["".concat(l,".").concat(m)]||c[m]||p[m]||r;return n?a.createElement(g,s(s({ref:t},u),{},{components:n})):a.createElement(g,s({ref:t},u))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,s=new Array(r);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:o,s[1]=i;for(var d=2;d{n.d(t,{Z:()=>s});var a=n(67294),o=n(86010);const r={tabItem:"tabItem_Ymn6"};function s(e){let{children:t,hidden:n,className:s}=e;return a.createElement("div",{role:"tabpanel",className:(0,o.Z)(r.tabItem,s),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(87462),o=n(67294),r=n(86010),s=n(12466),i=n(16550),l=n(91980),d=n(67392),u=n(50012);function c(e){return function(e){return o.Children.map(e,(e=>{if((0,o.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:o}}=e;return{value:t,label:n,attributes:a,default:o}}))}function p(e){const{values:t,children:n}=e;return(0,o.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,d.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),r=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(r),(0,o.useCallback)((e=>{if(!r)return;const t=new URLSearchParams(a.location.search);t.set(r,e),a.replace({...a.location,search:t.toString()})}),[r,a])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,r=p(e),[s,i]=(0,o.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:r}))),[l,d]=g({queryString:n,groupId:a}),[c,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,r]=(0,u.Nk)(n);return[a,(0,o.useCallback)((e=>{n&&r.set(e)}),[n,r])]}({groupId:a}),f=(()=>{const e=l??c;return m({value:e,tabValues:r})?e:null})();(0,o.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:s,selectValue:(0,o.useCallback)((e=>{if(!m({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),h(e)}),[d,h,r]),tabValues:r}}var f=n(72389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:l,tabValues:d}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.o5)(),p=e=>{const t=e.currentTarget,n=u.indexOf(t),a=d[n].value;a!==i&&(c(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return o.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":n},t)},d.map((e=>{let{value:t,label:n,attributes:s}=e;return o.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:p},s,{className:(0,r.Z)("tabs__item",k.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:a}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===a));return e?(0,o.cloneElement)(e,{className:"margin-top--md"}):null}return o.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=h(e);return o.createElement("div",{className:(0,r.Z)("tabs-container",k.tabList)},o.createElement(y,(0,a.Z)({},e,t)),o.createElement(b,(0,a.Z)({},e,t)))}function w(e){const t=(0,f.Z)();return o.createElement(v,(0,a.Z)({key:String(t)},e))}},78412:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var a=n(87462),o=(n(67294),n(3905)),r=n(74866),s=n(85162);const i={},l="Migrating from Credo 0.2.x to 0.3.x",d={unversionedId:"updating/versions/0.2-to-0.3",id:"updating/versions/0.2-to-0.3",title:"Migrating from Credo 0.2.x to 0.3.x",description:"This document describes everything you need to know for updating Credo 0.2.x to 0.3.x. If you're not aware of how updating in Credo works make sure to first read the guide on Updating Credo.",source:"@site/guides/updating/versions/0.2-to-0.3.md",sourceDirName:"updating/versions",slug:"/updating/versions/0.2-to-0.3",permalink:"/guides/updating/versions/0.2-to-0.3",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Migrating from Credo 0.1.0 to 0.2.x",permalink:"/guides/updating/versions/0.1-to-0.2"},next:{title:"Migrating from Credo 0.3.x to 0.4.x",permalink:"/guides/updating/versions/0.3-to-0.4"}},u={},c=[{value:"React Native",id:"react-native",level:4},{value:"Node",id:"node",level:4},{value:"Breaking Code Changes",id:"breaking-code-changes",level:2},{value:"Agent creation",id:"agent-creation",level:3},{value:"0.2.x",id:"02x",level:5},{value:"0.3.x",id:"03x",level:5},{value:"did:key usage in protocols",id:"didkey-usage-in-protocols",level:3},{value:"Modules extracted from the core",id:"modules-extracted-from-the-core",level:3},{value:"0.2.x",id:"02x-1",level:5},{value:"0.3.x",id:"03x-1",level:5},{value:"Discover Features Module",id:"discover-features-module",level:3},{value:"0.2.x",id:"02x-2",level:5},{value:"0.3.x",id:"03x-2",level:5},{value:"0.2.x",id:"02x-3",level:5},{value:"0.3.x",id:"03x-3",level:5},{value:"Ledger Module",id:"ledger-module",level:3},{value:"Proofs Module",id:"proofs-module",level:3},{value:"Module API Updates",id:"module-api-updates",level:4},{value:"0.2.x",id:"02x-4",level:5},{value:"0.3.x",id:"03x-4",level:5},{value:"Messages Extracted from Proof Exchange Record",id:"messages-extracted-from-proof-exchange-record",level:4},{value:"0.2.x",id:"02x-5",level:5},{value:"0.3.x",id:"03x-5",level:5},{value:"Out Of Band Proofs and Credentials",id:"out-of-band-proofs-and-credentials",level:3},{value:"0.2.x",id:"02x-6",level:4},{value:"0.3.x",id:"03x-6",level:4},{value:"Updating Custom Modules to the new Plugin API",id:"updating-custom-modules-to-the-new-plugin-api",level:3},{value:"Renaming handler classes",id:"renaming-handler-classes",level:4},{value:"0.2.x",id:"02x-7",level:5},{value:"0.3.x",id:"03x-7",level:5},{value:"Using AgentContext",id:"using-agentcontext",level:4},{value:"0.2.x",id:"02x-8",level:4},{value:"0.3.x",id:"03x-8",level:4},{value:"Using OutboundMessageContext",id:"using-outboundmessagecontext",level:4},{value:"0.2.x",id:"02x-9",level:4},{value:"0.3.x",id:"03x-9",level:4},{value:"Updating module structure to register in new Plugin API",id:"updating-module-structure-to-register-in-new-plugin-api",level:4},{value:"Breaking Storage Changes",id:"breaking-storage-changes",level:2},{value:"Migrate Proof Record Properties",id:"migrate-proof-record-properties",level:3},{value:"0.2.x",id:"02x-10",level:4},{value:"0.3.x",id:"03x-10",level:4},{value:"Migrate Connection Record properties",id:"migrate-connection-record-properties",level:3},{value:"Migrate Did Record properties",id:"migrate-did-record-properties",level:3},{value:"0.2.x",id:"02x-11",level:4},{value:"0.3.x",id:"03x-11",level:4}],p={toc:c},m="wrapper";function g(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"migrating-from-credo-02x-to-03x"},"Migrating from Credo 0.2.x to 0.3.x"),(0,o.kt)("p",null,"This document describes everything you need to know for updating Credo 0.2.x to 0.3.x. If you're not aware of how updating in Credo works make sure to first read the guide on ",(0,o.kt)("a",{parentName:"p",href:"/guides/updating/"},"Updating Credo"),"."),(0,o.kt)("p",null,"First of all, update you dependencies to the 0.3.x versions. This will also update the needed peer depedencnies. ",(0,o.kt)("strong",{parentName:"p"},"Extension packages are not updated with this command"),". You need to update these manually, and make sure they're up to date with the latest version of Credo."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"React Native",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @aries-framework/react-native@^0.3.0 @aries-framework/core@^0.3.0 indy-sdk-react-native@^0.3.0\n\n# or NPM\nnpn install @aries-framework/react-native@^0.3.0 @aries-framework/core@^0.3.0 indy-sdk-react-native@^0.3.0\n"))),(0,o.kt)(s.Z,{label:"Node",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"yarn add @aries-framework/node@^0.3.0 @aries-framework/core@^0.3.0\n\n# or NPM\nnpm install @aries-framework/node@^0.3.0 @aries-framework/core@^0.3.0\n")))),(0,o.kt)("h2",{id:"breaking-code-changes"},"Breaking Code Changes"),(0,o.kt)("p",null,"This section will list all breaking changes made to the public API of Credo between version 0.2.x and 0.3.0."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"If you have custom modules take into account there could be a lot more breaking changes that aren't documented here. We try to make sure that the biggest breaking changes to the internal API are also documented here (e.g. see ",(0,o.kt)("a",{parentName:"p",href:"#updating-custom-modules-to-the-new-plugin-api"},"Updating Custom Modules to the Plugin API"),"), but it is possible some breaking changes are not documented here (feel free to open PRs).")),(0,o.kt)("h3",{id:"agent-creation"},"Agent creation"),(0,o.kt)("p",null,"The agent constructor has been updated to a single ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentOptions")," object that contains the config and dependencies properties."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const agent = new Agent(agentConfig, agentDependencies)\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const agent = new Agent({ config: agentConfig, dependencies: agentDependencies })\n")))),(0,o.kt)("p",null,"This object contains:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"config: Agent's initial configuration"),(0,o.kt)("li",{parentName:"ul"},"dependencies: platform-specific Agent dependencies"),(0,o.kt)("li",{parentName:"ul"},"modules: optional field for internal module configuration and custom module registration")),(0,o.kt)("p",null,"For easy migration, you can simply construct ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentOptions")," by putting current InitConfig into ",(0,o.kt)("inlineCode",{parentName:"p"},"config")," key and agentDependencies into ",(0,o.kt)("inlineCode",{parentName:"p"},"dependencies")," key."),(0,o.kt)("p",null,"Note that, if you are defining ",(0,o.kt)("inlineCode",{parentName:"p"},"indyLedgers")," configuration, you should set the indyNamespace for every ledger, as explained in ",(0,o.kt)("a",{parentName:"p",href:"/guides/tutorials/agent-config/#indyledgers"},"Agent Config tutorial"),"."),(0,o.kt)("h3",{id:"didkey-usage-in-protocols"},"did:key usage in protocols"),(0,o.kt)("p",null,"In accordance with ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0360-use-did-key"},"Aries RFC 0360"),", since 0.2.5 there is a configuration parameter called ",(0,o.kt)("inlineCode",{parentName:"p"},"useDidKeyInProtocols")," which, when enabled, will encode keys in did:key instead of previous base58 format, unless the other party has started a protocol and is using base58."),(0,o.kt)("p",null,"This parameter was previously disabled by default and now it is enabled. If your agent only interacts with modern agents (e.g. Credo 0.2.5 and newer) this will not represent any issue. Otherwise it is safer to explicitly set it to ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),". However, keep in mind that we expect this setting to be deprecated in the future, so we encourage you to update all your agents to use did:key."),(0,o.kt)("h3",{id:"modules-extracted-from-the-core"},"Modules extracted from the core"),(0,o.kt)("p",null,"In this release two modules were extracted from the core and published as separate, optional packages:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"actionMenu has been moved to @aries-framework/action-menu"),(0,o.kt)("li",{parentName:"ul"},"questionAnswer has been moved to @aries-framework/question-answer")),(0,o.kt)("p",null,"If you want to use them, you can integrate in an Agent instance by injecting them in constructor, as follows:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { ActionMenuModule } from '@aries-framework/action-menu'\nimport { QuestionAnswerModule } from '@aries-framework/question-answer'\n\nconst agent = new Agent({\n config: {\n /* config */\n },\n dependencies: agentDependencies,\n modules: {\n actionMenu: new ActionMenuModule(),\n questionAnswer: new QuestionAnswerModule(),\n /* other custom modules */\n },\n})\n")),(0,o.kt)("p",null,"As they are now considered custom modules, their API can be accessed in ",(0,o.kt)("inlineCode",{parentName:"p"},"modules")," namespace, so you should add it to every call to them."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.questionAnswer.sendQuestion(connectionId, {\n question: 'Do you want to play?',\n validResponses: [{ text: 'Yes' }, { text: 'No' }],\n})\n\nawait agent.questionAnswer.sendAnswer(questionAnswerRecordId, 'Yes')\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.modules.questionAnswer.sendQuestion(connectionId, {\n question: 'Do you want to play?',\n validResponses: [{ text: 'Yes' }, { text: 'No' }],\n})\n\nawait agent.modules.questionAnswer.sendAnswer(questionAnswerRecordId, 'Yes')\n")))),(0,o.kt)("h3",{id:"discover-features-module"},"Discover Features Module"),(0,o.kt)("p",null,"This module now supports both Discover Features V1 and V2, and as it happened to other modules, ",(0,o.kt)("inlineCode",{parentName:"p"},"queryFeatures")," method parameters have been unified to a single object and requires to specify the version of Discover Features protocol to be used. Note that ",(0,o.kt)("inlineCode",{parentName:"p"},"query")," property has been replaced by the more general ",(0,o.kt)("inlineCode",{parentName:"p"},"queries")," which accepts multiple features to be search for. To convert a query to this new format you simply need to create a single-object array whose unique object whose ",(0,o.kt)("inlineCode",{parentName:"p"},"featureType")," field is 'protocol' and ",(0,o.kt)("inlineCode",{parentName:"p"},"match")," field is the query itself."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.discovery.queryFeatures(connectionId, {\n query: 'https://didcomm.org/messagepickup/2.0',\n comment: 'Detect if protocol is supported',\n})\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.discovery.queryFeatures({\n connectionId,\n protocolVersion: 'v1',\n queries: [{ featureType: 'protocol', match: 'https://didcomm.org/messagepickup/2.0' }],\n comment: 'Detect if protocol is supported',\n})\n")))),(0,o.kt)("p",null,"The convenience method ",(0,o.kt)("strong",{parentName:"p"},"isProtocolSupported")," has been replaced by the more general synchronous mode of queryFeatures, which works when awaitDisclosures in options is set. Instead of returning a boolean, it returns an object with matching features:"),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const isPickUpV2Supported = await agent.discovery.isProtocolSupported(connectionId, StatusRequestMessage)\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const discloseForPickupV2 = await agent.discovery.queryFeatures({\n connectionId: connectionId,\n protocolVersion: 'v1',\n queries: [{ featureType: 'protocol', match: StatusMessage.type.protocolUri }],\n awaitDisclosures: true,\n awaitDisclosuresTimeoutMs: 7000,\n})\n\nconst isPickUpV2Supported = discloseForPickupV2.features?.length === 1\n")))),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Discover Features module does not rely anymore on Agent ",(0,o.kt)("inlineCode",{parentName:"p"},"Dispatcher")," to determine protocol support. Instead, it uses the new Feature Registry, where any custom modules implementing protocols must register them."),(0,o.kt)("p",{parentName:"admonition"},"This procedure can be done in module's ",(0,o.kt)("inlineCode",{parentName:"p"},"register(dependencyManager, featureRegistry)"),".")),(0,o.kt)("h3",{id:"ledger-module"},"Ledger Module"),(0,o.kt)("p",null,"Apart from the aforementioned indyLedgers configuration, you should also ",(0,o.kt)("a",{parentName:"p",href:"/guides/tutorials/issue-a-credential#side-notes"},"note a slight change")," in behaviour when attempting to register credential definitions that already exists on the ledger but not in the wallet."),(0,o.kt)("h3",{id:"proofs-module"},"Proofs Module"),(0,o.kt)("h4",{id:"module-api-updates"},"Module API Updates"),(0,o.kt)("p",null,"Much in the same way as in 0.2.0 release when ",(0,o.kt)("a",{parentName:"p",href:"/guides/updating/versions/0.1-to-0.2#module-api-updates"},"Issue Credential V2 protocol")," has been added, now that Present Proof V2 is supported, we introduced changes to proofs module."),(0,o.kt)("p",null,"Basically, for all methods in the proofs module you should take the following steps to update your code:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Move all function parameters into a single object. All module methods now take a single object that contain all properties."),(0,o.kt)("li",{parentName:"ol"},"For methods that initiate proposals, requests or presentations (",(0,o.kt)("inlineCode",{parentName:"li"},"proposeProof"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"acceptProposal"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"requestProof"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"acceptPresentation"),", etc.), you should pass ",(0,o.kt)("inlineCode",{parentName:"li"},"protocolVersion: 'v1'")," to indicate we should use the v1 protocol"),(0,o.kt)("li",{parentName:"ol"},"All indy specific attributes (e.g. Presentation Preview) should be passed in the ",(0,o.kt)("inlineCode",{parentName:"li"},"proofFormats.indy")," object."),(0,o.kt)("li",{parentName:"ol"},"Some indy objects, as the preview should now be passed only as their attributes (i.e. no need of creating the object instance) and provided in the ",(0,o.kt)("inlineCode",{parentName:"li"},"proofFormats.indy")," object.")),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.proofs.proposeProof(\n 'connectionId',\n new PresentationPreview({\n attributes: [new PresentationPreviewAttribute({ name: 'key', value: 'value' })],\n predicates: [\n new PresentationPreviewPredicate({\n name: 'age',\n credentialDefinitionId,\n predicate: PredicateType.GreaterThanOrEqualTo,\n threshold: 50,\n }),\n ],\n })\n)\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"await agent.proofs.proposeProof({\n connectionId: connection.id,\n protocolVersion: 'v1',\n proofFormats: {\n indy: {\n attributes: [{ name: 'key', value: 'value' }],\n predicates: [{name: 'age', credentialDefinitionId, predicate: PredicateType.GreaterThanOrEqualTo, threshold: 50, ]\n },\n },\n comment: 'Propose proof comment',\n})\n")))),(0,o.kt)("h4",{id:"messages-extracted-from-proof-exchange-record"},"Messages Extracted from Proof Exchange Record"),(0,o.kt)("p",null,"The DIDComm messages that were previously stored on the proof record, have been extracted to separate DIDComm message records. This makes it easier to work with multiple versions of the protocol internally, and keeps the proof exchange record agnostic of the protocol version. Instead of accessing the messages through the ",(0,o.kt)("inlineCode",{parentName:"p"},"proposalMessage"),", ",(0,o.kt)("inlineCode",{parentName:"p"},"requestMessage")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"presentationMessage")," parameters, we now expose dedicated methods on the proofs module to retrieve the message."),(0,o.kt)("p",null,"With the addition of the v2 messages, all v1 messages have been prefixed with ",(0,o.kt)("inlineCode",{parentName:"p"},"V1")," while v2 messages have been prefixed with ",(0,o.kt)("inlineCode",{parentName:"p"},"V2")," (",(0,o.kt)("inlineCode",{parentName:"p"},"V1RequestPresentationMessage")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"V2RequestPresentationMessage"),"). If you were using these messages classes throughout your codebase, update them to use the ",(0,o.kt)("inlineCode",{parentName:"p"},"V1")," prefix."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const proofRecord = await agent.proofs.getById('proofRecordId')\n\nconst proposalMessage = proofRecord.proposalMessage\nconst requestMessage = proofRecord.requestMessage\nconst presentationMessage = proofRecord.presentationMessage\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const proofRecord = await agent.proofs.getById('proofRecordId')\n\nconst proposalMessage = await agent.proofs.findProposalMessage('proofRecordId')\nconst requestMessage = await agent.proofs.findRequestMessage('proofRecordId')\nconst presentationMessage = await agent.proofs.findPresentationMessage('proofRecordId')\n")),(0,o.kt)("p",null,"Because Credo now also supports the present proof v2 protocol, the return type of this protocol has been changed to ",(0,o.kt)("inlineCode",{parentName:"p"},"V1XXXMessage | V2XXXMessage | null"),". Take this into account when working with the messages."),(0,o.kt)("p",null,"You can check if a message is a specific version by using the ",(0,o.kt)("inlineCode",{parentName:"p"},"instanceof")," operator:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"if (proposalMessage instanceof V1RequestPresentationMessage) {\n // do something\n}\n")))),(0,o.kt)("h3",{id:"out-of-band-proofs-and-credentials"},"Out Of Band Proofs and Credentials"),(0,o.kt)("p",null,"With the addition of the out of band module, the creation of connection-less messages has been split into two steps, allowing for better control and flexibility. The previous ",(0,o.kt)("inlineCode",{parentName:"p"},"agent.proofs.createOutOfBandRequest")," has been replaced by the ",(0,o.kt)("inlineCode",{parentName:"p"},"agent.proofs.createRequest")," method. This new method creates a proof request that is not tied to any connection."),(0,o.kt)("p",null,"What you can now do is call ",(0,o.kt)("inlineCode",{parentName:"p"},"agent.oob.createLegacyConnectionlessInvitation")," to attach the service decorator to the message and get a legacy connectionless message."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const { requestMessage, proofRecord } = await agent.proofs.createOutOfBandRequest({\n requestedAttributes: {\n group1: {\n name: 'dateOfBirth',\n restrictions: [{ schemaId: 'F72i3Y3Q4i466efjYJYCHM:2:aha_cert:4.1.1' }],\n },\n },\n})\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const { message, proofRecord } = await agent.proofs.createRequest({\n protocolVersion: 'v1',\n proofFormats: {\n indy: {\n requestedAttributes: {\n group1: {\n name: 'dateOfBirth',\n restrictions: [\n {\n schemaId: 'F72i3Y3Q4i466efjYJYCHM:2:aha_cert:4.1.1',\n },\n ],\n },\n },\n },\n },\n})\n\nconst { invitationUrl, message: messageWithServiceDecorator } = await agent.oob.createLegacyConnectionlessInvitation({\n recordId: proofRecord.id,\n domain: 'https://google.com',\n message,\n})\n")))),(0,o.kt)("p",null,"Out of band invitations are the new way to send messages out of band. You can use it for connection-less exchanges, but also for exchanges that you want to establish a connection for first. Here's an example on how to use the out of band module to create a connection-less invitation for a proof request:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const outOfBandRecord = await agent.oob.createInvitation({\n handshake: false, // set to true if you want to create a connection\n messages: [message],\n})\n\nconst invitationUrl = outOfBandRecord.outOfBandInvitation.toUrl({\n domain: 'https://Credo.com',\n})\n")),(0,o.kt)("p",null,"As you can see, there's now a lot more ways to use a message not tied to a connection. By splitting the creation of the message from the creation of the invitation, we can now create a message not bound to a connection (at time of creation) for multiple use cases."),(0,o.kt)("h3",{id:"updating-custom-modules-to-the-new-plugin-api"},"Updating Custom Modules to the new Plugin API"),(0,o.kt)("p",null,"Although this isn't a breaking change to the public API of the framework, it is something that you will need to take into account if you have custom modules and want to upgrade them to make compatible with Credo 0.3.0."),(0,o.kt)("h4",{id:"renaming-handler-classes"},"Renaming handler classes"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"Handler")," has been have been renamed to ",(0,o.kt)("inlineCode",{parentName:"p"},"MessageHandler")," to be be more descriptive, along with related types and methods. This means:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"Handler")," is now ",(0,o.kt)("inlineCode",{parentName:"li"},"MessageHandler")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"HandlerInboundMessage")," is now ",(0,o.kt)("inlineCode",{parentName:"li"},"MessageHandlerInboundMessage")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"Dispatcher.registerHandler")," is now ",(0,o.kt)("inlineCode",{parentName:"li"},"Dispatcher.registerMessageHandler")," and is marked as deprecated. The recommended way of registering handlers is by using the new ",(0,o.kt)("inlineCode",{parentName:"li"},"MessageHandlerRegistry")," object by calling ",(0,o.kt)("inlineCode",{parentName:"li"},"MessageHandlerRegistry.registerMessageHandler"),".")),(0,o.kt)("p",null,"If your custom module include message handlers, you must update them accordingly."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"export class MyHandler implements Handler {\n public supportedMessages = [MyMessage]\n\n public async handle(inboundMessage: HandlerInboundMessage) {\n ...\n }\n}\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"export class MyHandler implements MessageHandler {\n public supportedMessages = [MyMessage]\n\n public async handle(inboundMessage: MessageHandlerInboundMessage) {\n ...\n }\n}\n")))),(0,o.kt)("h4",{id:"using-agentcontext"},"Using AgentContext"),(0,o.kt)("p",null,"First of all, it's worth noting that now all services and repositories have been made stateless. A new ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentContext")," is introduced that holds the current context, which is passed to each method call. Therefore, you'll need to update every call to services, repositories and also eventEmitter methods to pass ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentContext")," object as first argument."),(0,o.kt)("p",null,"AgentContext can be obtained from either:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"MessageContext used by message handlers (accesed as messageContext.agentContext)"),(0,o.kt)("li",{parentName:"ul"},"Injected in your API constructor: you can store the instance and pass it to all your service and repository calls")),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"}," public async createRequest(options: CreateRequestOptions) {\n const message = new RequestMessage({\n parentThreadId: options.parentThreadId,\n })\n\n const record = new MyRecord({\n connectionId: options.connectionRecord.id,\n threadId: message.id,\n parentThreadId: options.parentThreadId,\n })\n\n await this.myRecordRepository.save(record)\n\n this.eventEmitter.emit({\n type: MyRecordEventTypes.StateChanged,\n payload: {\n myRecord: record,\n previousState: null,\n },\n })\n\n return { record, message }\n }\n\n public async processRequest(messageContext: HandlerInboundMessage) {\n const { message } = messageContext\n\n const record = new MyRecord({\n connectionId: connection.id,\n threadId: messageContext.message.id,\n parentThreadId: messageContext.message.thread?.parentThreadId,\n })\n\n await this.myRepository.save(record)\n\n return record\n }\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"}," public async createRequest(agentContext: AgentContext, options: CreateRequestOptions) {\n const message = new RequestMessage({\n parentThreadId: options.parentThreadId,\n })\n\n const record = new MyRecord({\n connectionId: options.connectionRecord.id,\n threadId: message.id,\n parentThreadId: options.parentThreadId,\n })\n\n await this.myRecordRepository.save(agentContext, record)\n\n this.eventEmitter.emit(agentContext, {\n type: MyRecordEventTypes.StateChanged,\n payload: {\n myRecord: record,\n previousState: null,\n },\n })\n\n return { record, message }\n }\n\n public async processRequest(messageContext: MessageHandlerInboundMessage) {\n const { message } = messageContext\n\n const record = new MyRecord({\n connectionId: connection.id,\n threadId: messageContext.message.id,\n parentThreadId: messageContext.message.thread?.parentThreadId,\n })\n\n await this.myRepository.save(messageContext.agentContext, record)\n\n return record\n }\n")))),(0,o.kt)("h4",{id:"using-outboundmessagecontext"},"Using OutboundMessageContext"),(0,o.kt)("p",null,"If your module implements a protocol that sends messages to other agents, you will notice that Agent's ",(0,o.kt)("inlineCode",{parentName:"p"},"MessageSender")," now receives the more generic ",(0,o.kt)("inlineCode",{parentName:"p"},"OutboundMessageContext")," class, which replaces previous helper method ",(0,o.kt)("inlineCode",{parentName:"p"},"createOutboundMessage"),"."),(0,o.kt)("p",null,"You can take advantage of this new mechanism to associate a record to the context, in order to do specific actions to it when outbound message state changes (e.g. a ",(0,o.kt)("inlineCode",{parentName:"p"},"MessageSendingError")," is thrown or ",(0,o.kt)("inlineCode",{parentName:"p"},"AgentMessageSentEvent")," is emitted)."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { createOutboundMessage } from '@aries-framework/core'\n\nconst outboundMessage = createOutboundMessage(connection, message)\nawait this.messageSender.sendMessage(outboundMessage)\n"))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { OutboundMessageContext } from '@aries-framework/core'\n\nconst outboundMessageContext = new OutboundMessageContext(message, {\n agentContext: this.agentContext,\n connection,\n // optional, if you want to link the message to a related record\n associatedRecord: record,\n})\n\nawait this.messageSender.sendMessage(outboundMessageContext)\n")))),(0,o.kt)("h4",{id:"updating-module-structure-to-register-in-new-plugin-api"},"Updating module structure to register in new Plugin API"),(0,o.kt)("p",null,"Existing modules can benefit from the new Plugin API mechanism by doing the following modifications:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Rename Module class (e.g. MyModule) to API class (MyApi) and add @injectable decorator. Inject AgentContext in order to pass it to any services or repositories it might call. For instance:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { injectable } from '@aries-framework/core'\n\n@injectable() // <-- Add this\nexport class MyApi {\n private messageSender: MessageSender\n private myService: MyService\n private connectionService: ConnectionService\n private agentContext: AgentContext // <-- Add this\n\n public constructor(\n messageHandlerRegistry: MessageHandlerRegistry, // <-- use this instead of Dispatcher\n messageSender: MessageSender,\n myService: MyService,\n connectionService: ConnectionService,\n agentContext: AgentContext // <-- Add this\n ) {\n this.messageSender = messageSender\n this.myService = myService\n this.connectionService = connectionService\n this.agentContext = agentContext // <-- Add this\n this.registerHandlers(messageHandlerRegistry) // <-- use messageHandlerRegistry instead of dispatcher\n }\n")),(0,o.kt)("ol",{start:2},(0,o.kt)("li",{parentName:"ol"},"Create a new Module class that implements Module interface and registers the dependencies and features. For instance:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import type { DependencyManager, FeatureRegistry, Module } from '@aries-framework/core'\n\nimport { Protocol } from '@aries-framework/core'\n\nexport class MyModule implements Module {\n public readonly api = MyApi // the one we've just renamed from MyModule\n\n public register(dependencyManager: DependencyManager, featureRegistry: FeatureRegistry) {\n // Api\n dependencyManager.registerContextScoped(MyApi)\n\n // Services\n dependencyManager.registerSingleton(MyService)\n\n // Repositories\n dependencyManager.registerSingleton(MyRepository)\n\n // Feature Registry: don't forget to register your protocols and other features your module may add\n featureRegistry.register(\n new Protocol({\n id: 'https://didcomm.org/my-protocol/1.0',\n roles: [MyRole.Sender, MyRole.Receiver],\n })\n )\n }\n")),(0,o.kt)("p",null,"After doing this, you can add your module to agent constructor like this:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const agent = new Agent({\n config: {\n /* config */\n },\n dependencies: agentDependencies,\n modules: {\n myModule: new MyModule(),\n /* other custom modules */\n },\n})\n\n// MyModule API can be accessed in agent.modules namespace\nawait agent.modules.myModule.doSomething()\n\nawait agent.modules.myModule.doAnotherThing()\n")),(0,o.kt)("h2",{id:"breaking-storage-changes"},"Breaking Storage Changes"),(0,o.kt)("p",null,"The 0.3.0 release introduces some breaking changes to the storage format, mainly related to Proof Exchanges."),(0,o.kt)("p",null,"Below all breaking storage changes are explained in as much detail as possible. The update assistant provides all tools to migrate without a hassle, but it is important to know what has changed. All examples only show the keys that have changed, unrelated keys in records have been omitted."),(0,o.kt)("p",null,"See the ",(0,o.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant")," documentation for a guide on how to use the update assistant."),(0,o.kt)("p",null,"There are no config parameters to be provided to the update assistant to migrate from 0.2.x to 0.3.x."),(0,o.kt)("h3",{id:"migrate-proof-record-properties"},"Migrate Proof Record Properties"),(0,o.kt)("p",null,"In 0.3.0 the v1 DIDComm messages have been moved out of the proof record into separate records using the DidCommMessageRepository. The migration scripts extracts all messages (proposalMessage, requestMessage, presentationMessage) and moves them into the DidCommMessageRepository. With the addition of support for different protocol versions the proof record now stores the protocol version."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "proposalMessage": { ... },\n "requestMessage": { ... },\n "presentationMessage": { ... },\n}\n'))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "protocolVersion": "v1"\n}\n')))),(0,o.kt)("h3",{id:"migrate-connection-record-properties"},"Migrate Connection Record properties"),(0,o.kt)("p",null,"The recently introduced ",(0,o.kt)("inlineCode",{parentName:"p"},"connectionType")," tag has been pluralized to reflect the fact that more than a single connection type can be defined for a given connection. Also, it is now available as a direct record property (e.g. can be queried and set by using ",(0,o.kt)("inlineCode",{parentName:"p"},"connectionRecord.connectionTypes"),") apart from the tag for efficient search."),(0,o.kt)("p",null,"The migration script renames ",(0,o.kt)("inlineCode",{parentName:"p"},"connectionType")," to ",(0,o.kt)("inlineCode",{parentName:"p"},"connectionTypes")," in all connections, and also searches for any mediation connection and adds ",(0,o.kt)("inlineCode",{parentName:"p"},"ConnectionType.Mediator")," as one of its types."),(0,o.kt)("h3",{id:"migrate-did-record-properties"},"Migrate Did Record properties"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"didRecord.id")," was previously the did itself. However to allow for connecting with self, where multiple did records are created for the same did, the id property is now an uuid and a separate did property is added."),(0,o.kt)("p",null,"The migration script generates a new ID for each did record and stores its did into didRecord.did property."),(0,o.kt)(r.Z,{mdxType:"Tabs"},(0,o.kt)(s.Z,{label:"0.2.x",value:"tab1",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "id": "did"\n}\n'))),(0,o.kt)(s.Z,{label:"0.3.x",value:"tab2",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "id": "uuid",\n "did": "did"\n}\n')))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/394d7bf2.8464d62e.js b/assets/js/394d7bf2.927182e7.js similarity index 98% rename from assets/js/394d7bf2.8464d62e.js rename to assets/js/394d7bf2.927182e7.js index e87c506..8801200 100644 --- a/assets/js/394d7bf2.8464d62e.js +++ b/assets/js/394d7bf2.927182e7.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[8368],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=d(n),m=a,h=u["".concat(l,".").concat(m)]||u[m]||p[m]||i;return n?r.createElement(h,o(o({ref:t},c),{},{components:n})):r.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,o[1]=s;for(var d=2;d{n.d(t,{Z:()=>o});var r=n(67294),a=n(86010);const i={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(i.tabItem,o),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(87462),a=n(67294),i=n(86010),o=n(12466),s=n(16550),l=n(91980),d=n(67392),c=n(50012);function u(e){return function(e){return a.Children.map(e,(e=>{if((0,a.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??u(n);return function(e){const t=(0,d.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const r=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(i),(0,a.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(r.location.search);t.set(i,e),r.replace({...r.location,search:t.toString()})}),[i,r])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,i=p(e),[o,s]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:i}))),[l,d]=h({queryString:n,groupId:r}),[u,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,i]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:r}),y=(()=>{const e=l??u;return m({value:e,tabValues:i})?e:null})();(0,a.useLayoutEffect)((()=>{y&&s(y)}),[y]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),d(e),g(e)}),[d,g,i]),tabValues:i}}var y=n(72389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:n,selectedValue:s,selectValue:l,tabValues:d}=e;const c=[],{blockElementScrollPositionUntilNextRender:u}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),r=d[n].value;r!==s&&(u(t),l(r))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},d.map((e=>{let{value:t,label:n,attributes:o}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},o,{className:(0,i.Z)("tabs__item",f.tabItem,o?.className,{"tabs__item--active":s===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:r}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function k(e){const t=g(e);return a.createElement("div",{className:(0,i.Z)("tabs-container",f.tabList)},a.createElement(v,(0,r.Z)({},e,t)),a.createElement(b,(0,r.Z)({},e,t)))}function N(e){const t=(0,y.Z)();return a.createElement(k,(0,r.Z)({key:String(t)},e))}},33172:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>d,toc:()=>u});var r=n(87462),a=(n(67294),n(3905)),i=n(74866),o=n(85162);const s={},l="Indy VDR",d={unversionedId:"getting-started/set-up/indy-vdr",id:"getting-started/set-up/indy-vdr",title:"Indy VDR",description:"Hyperledger Indy VDR, Verifiable Data Registry, can be used to connect to one or more Indy Node ledger pools given sets of genesis transactions. Methods are provided to construct ledger requests and send them to the validators, collecting the results and ensuring that there is a consensus between the nodes. In the context of Credo, we mainly leverage it to register, and resolve, schemas, credential definitions and DIDs.",source:"@site/guides/getting-started/set-up/indy-vdr.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/indy-vdr",permalink:"/guides/getting-started/set-up/indy-vdr",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"AnonCreds",permalink:"/guides/getting-started/set-up/anoncreds"},next:{title:"cheqd",permalink:"/guides/getting-started/set-up/cheqd/"}},c={},u=[{value:"Installing Indy VDR",id:"installing-indy-vdr",level:3},{value:"Adding Indy VDR to the agent",id:"adding-indy-vdr-to-the-agent",level:3},{value:"Configuration",id:"configuration",level:3},{value:"indyVdr",id:"indyvdr",level:4},{value:"networks",id:"networks",level:4},{value:"indyNamespace",id:"indynamespace",level:5},{value:"isProduction",id:"isproduction",level:5},{value:"genesisTransactions",id:"genesistransactions",level:5},{value:"connectOnStartup",id:"connectonstartup",level:5},{value:"transactionAuthorAgreement",id:"transactionauthoragreement",level:5},{value:"transactionAuthorAgreement.version",id:"transactionauthoragreementversion",level:5},{value:"transactionAuthorAgreement.acceptanceMechanism",id:"transactionauthoragreementacceptancemechanism",level:5}],p={toc:u},m="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"indy-vdr"},"Indy VDR"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-vdr"},"Hyperledger Indy VDR"),", Verifiable Data Registry, can be used to connect to one or more Indy Node ledger pools given sets of genesis transactions. Methods are provided to construct ledger requests and send them to the validators, collecting the results and ensuring that there is a consensus between the nodes. In the context of Credo, we mainly leverage it to register, and resolve, schemas, credential definitions and DIDs."),(0,a.kt)("h3",{id:"installing-indy-vdr"},"Installing Indy VDR"),(0,a.kt)("p",null,"When using Credo with Indy VDR, there are a few extra dependencies that need to be installed. We need to install the ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr"),", which contains all the functionality to register objects on an Hyperledger Indy VDR. Secondly, we need to add native bindings for the specific platform ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr-"),". Currently there are bindings for Node.JS, as ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr-nodejs"),", and React Native as ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperlegder/indy-vdr-react-native"),"."),(0,a.kt)(i.Z,{mdxType:"Tabs"},(0,a.kt)(o.Z,{label:"Node.JS",value:"tab1",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/indy-vdr@^0.5.3 @hyperledger/indy-vdr-nodejs@^0.2.2\n"))),(0,a.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/indy-vdr@^0.5.3 @hyperledger/indy-vdr-react-native@^0.2.2\n")))),(0,a.kt)("h3",{id:"adding-indy-vdr-to-the-agent"},"Adding Indy VDR to the agent"),(0,a.kt)("p",null,"After installing the dependencies, we can register the Indy VDR module on the agent."),(0,a.kt)(i.Z,{mdxType:"Tabs"},(0,a.kt)(o.Z,{label:"Node.JS",value:"tab1",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-indy-vdr.ts section-1",showLineNumbers:!0,"set-up-indy-vdr.ts":!0,"section-1":!0},""))),(0,a.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-indy-vdr-rn.ts section-1",showLineNumbers:!0,"set-up-indy-vdr-rn.ts":!0,"section-1":!0},"")))),(0,a.kt)("h3",{id:"configuration"},"Configuration"),(0,a.kt)("p",null,"As you can see below, the Indy VDR module takes the native bindings and a list of networks. This list of networks will be used to resolve and register objects on."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"typescript showLineNumbers set-up-indy-vdr-config.ts section-1",typescript:!0,showLineNumbers:!0,"set-up-indy-vdr-config.ts":!0,"section-1":!0},"")),(0,a.kt)("h4",{id:"indyvdr"},"indyVdr"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"IndyVdr")),(0,a.kt)("p",null,"the ",(0,a.kt)("inlineCode",{parentName:"p"},"indyVdr")," key takes a class that implements all the native bindings for Indy VDR. This can be imoprted from the ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr-nodejs")," package or the ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr-react-native")," package."),(0,a.kt)("h4",{id:"networks"},"networks"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"IndyVdrPoolConfig[]")),(0,a.kt)("p",null,"An array of indy networks to connect to. The list can contain the following object and it must ",(0,a.kt)("a",{parentName:"p",href:"#indyledgersgenesistransactions"},(0,a.kt)("inlineCode",{parentName:"a"},"genesisTransactions")),"."),(0,a.kt)("h5",{id:"indynamespace"},"indyNamespace"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("p",null,"The Indy namespace aka the name identifying the name of the network connecting to. See also ",(0,a.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/indy-did-method/#indy-did-method-identifiers"},"indy did method identifiers")),(0,a.kt)("h5",{id:"isproduction"},(0,a.kt)("inlineCode",{parentName:"h5"},"isProduction")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("p",null,"Whether the ledger is a production ledger. This is used for detecting which ledger to use in case of unqualified identifiers as production ledgers have priority."),(0,a.kt)("h5",{id:"genesistransactions"},(0,a.kt)("inlineCode",{parentName:"h5"},"genesisTransactions")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("p",null,"Stringified JSON object of the transaction."),(0,a.kt)("h5",{id:"connectonstartup"},(0,a.kt)("inlineCode",{parentName:"h5"},"connectOnStartup")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("p",null,"Whether to connect to the ledger on startup. Defaults to ",(0,a.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,a.kt)("h5",{id:"transactionauthoragreement"},(0,a.kt)("inlineCode",{parentName:"h5"},"transactionAuthorAgreement")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"TransactionAuthorAgreement")),(0,a.kt)("p",null,"JSON representation specifying the version and acceptance mechanism. The version is the unique version of the transaction author agreement acceptance mechanism list (AML). The acceptance mechanism refers to the acceptance mechanism label of the item in the AML. For more details you may consult the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-node/blob/master/docs/source/transactions.md#transaction_author_agreement_aml"},"indy-node docs on AML")),(0,a.kt)("h5",{id:"transactionauthoragreementversion"},(0,a.kt)("inlineCode",{parentName:"h5"},"transactionAuthorAgreement.version")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("p",null,"The version of the AML acceptance mechanism. This is a string representation of a version number e.g. '1' or '1.4'"),(0,a.kt)("h5",{id:"transactionauthoragreementacceptancemechanism"},(0,a.kt)("inlineCode",{parentName:"h5"},"transactionAuthorAgreement.acceptanceMechanism")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("p",null,"The acceptance mechanism to choose. This ",(0,a.kt)("em",{parentName:"p"},"must")," be ",(0,a.kt)("em",{parentName:"p"},"one")," of the available labels of the acceptance mechanisms key-value pairs in the AML e.g. 'EULA'."))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[8368],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=d(n),m=a,h=u["".concat(l,".").concat(m)]||u[m]||p[m]||i;return n?r.createElement(h,o(o({ref:t},c),{},{components:n})):r.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,o[1]=s;for(var d=2;d{n.d(t,{Z:()=>o});var r=n(67294),a=n(86010);const i={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(i.tabItem,o),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(87462),a=n(67294),i=n(86010),o=n(12466),s=n(16550),l=n(91980),d=n(67392),c=n(50012);function u(e){return function(e){return a.Children.map(e,(e=>{if((0,a.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??u(n);return function(e){const t=(0,d.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const r=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(i),(0,a.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(r.location.search);t.set(i,e),r.replace({...r.location,search:t.toString()})}),[i,r])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,i=p(e),[o,s]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:i}))),[l,d]=h({queryString:n,groupId:r}),[u,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,i]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:r}),y=(()=>{const e=l??u;return m({value:e,tabValues:i})?e:null})();(0,a.useLayoutEffect)((()=>{y&&s(y)}),[y]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),d(e),g(e)}),[d,g,i]),tabValues:i}}var y=n(72389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:n,selectedValue:s,selectValue:l,tabValues:d}=e;const c=[],{blockElementScrollPositionUntilNextRender:u}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),r=d[n].value;r!==s&&(u(t),l(r))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},d.map((e=>{let{value:t,label:n,attributes:o}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},o,{className:(0,i.Z)("tabs__item",f.tabItem,o?.className,{"tabs__item--active":s===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:r}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function k(e){const t=g(e);return a.createElement("div",{className:(0,i.Z)("tabs-container",f.tabList)},a.createElement(v,(0,r.Z)({},e,t)),a.createElement(b,(0,r.Z)({},e,t)))}function N(e){const t=(0,y.Z)();return a.createElement(k,(0,r.Z)({key:String(t)},e))}},33172:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>d,toc:()=>u});var r=n(87462),a=(n(67294),n(3905)),i=n(74866),o=n(85162);const s={},l="Indy VDR",d={unversionedId:"getting-started/set-up/indy-vdr",id:"getting-started/set-up/indy-vdr",title:"Indy VDR",description:"Hyperledger Indy VDR, Verifiable Data Registry, can be used to connect to one or more Indy Node ledger pools given sets of genesis transactions. Methods are provided to construct ledger requests and send them to the validators, collecting the results and ensuring that there is a consensus between the nodes. In the context of Credo, we mainly leverage it to register, and resolve, schemas, credential definitions and DIDs.",source:"@site/guides/getting-started/set-up/indy-vdr.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/indy-vdr",permalink:"/guides/getting-started/set-up/indy-vdr",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"AnonCreds",permalink:"/guides/getting-started/set-up/anoncreds"},next:{title:"cheqd",permalink:"/guides/getting-started/set-up/cheqd/"}},c={},u=[{value:"Installing Indy VDR",id:"installing-indy-vdr",level:3},{value:"Adding Indy VDR to the agent",id:"adding-indy-vdr-to-the-agent",level:3},{value:"Configuration",id:"configuration",level:3},{value:"indyVdr",id:"indyvdr",level:4},{value:"networks",id:"networks",level:4},{value:"indyNamespace",id:"indynamespace",level:5},{value:"isProduction",id:"isproduction",level:5},{value:"genesisTransactions",id:"genesistransactions",level:5},{value:"connectOnStartup",id:"connectonstartup",level:5},{value:"transactionAuthorAgreement",id:"transactionauthoragreement",level:5},{value:"transactionAuthorAgreement.version",id:"transactionauthoragreementversion",level:5},{value:"transactionAuthorAgreement.acceptanceMechanism",id:"transactionauthoragreementacceptancemechanism",level:5}],p={toc:u},m="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"indy-vdr"},"Indy VDR"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-vdr"},"Hyperledger Indy VDR"),", Verifiable Data Registry, can be used to connect to one or more Indy Node ledger pools given sets of genesis transactions. Methods are provided to construct ledger requests and send them to the validators, collecting the results and ensuring that there is a consensus between the nodes. In the context of Credo, we mainly leverage it to register, and resolve, schemas, credential definitions and DIDs."),(0,a.kt)("h3",{id:"installing-indy-vdr"},"Installing Indy VDR"),(0,a.kt)("p",null,"When using Credo with Indy VDR, there are a few extra dependencies that need to be installed. We need to install the ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr"),", which contains all the functionality to register objects on an Hyperledger Indy VDR. Secondly, we need to add native bindings for the specific platform ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr-"),". Currently there are bindings for Node.js, as ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr-nodejs"),", and React Native as ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperlegder/indy-vdr-react-native"),"."),(0,a.kt)(i.Z,{mdxType:"Tabs"},(0,a.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/indy-vdr@^0.5.3 @hyperledger/indy-vdr-nodejs@^0.2.2\n"))),(0,a.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/indy-vdr@^0.5.3 @hyperledger/indy-vdr-react-native@^0.2.2\n")))),(0,a.kt)("h3",{id:"adding-indy-vdr-to-the-agent"},"Adding Indy VDR to the agent"),(0,a.kt)("p",null,"After installing the dependencies, we can register the Indy VDR module on the agent."),(0,a.kt)(i.Z,{mdxType:"Tabs"},(0,a.kt)(o.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-indy-vdr.ts section-1",showLineNumbers:!0,"set-up-indy-vdr.ts":!0,"section-1":!0},""))),(0,a.kt)(o.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-indy-vdr-rn.ts section-1",showLineNumbers:!0,"set-up-indy-vdr-rn.ts":!0,"section-1":!0},"")))),(0,a.kt)("h3",{id:"configuration"},"Configuration"),(0,a.kt)("p",null,"As you can see below, the Indy VDR module takes the native bindings and a list of networks. This list of networks will be used to resolve and register objects on."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"typescript showLineNumbers set-up-indy-vdr-config.ts section-1",typescript:!0,showLineNumbers:!0,"set-up-indy-vdr-config.ts":!0,"section-1":!0},"")),(0,a.kt)("h4",{id:"indyvdr"},"indyVdr"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"IndyVdr")),(0,a.kt)("p",null,"the ",(0,a.kt)("inlineCode",{parentName:"p"},"indyVdr")," key takes a class that implements all the native bindings for Indy VDR. This can be imoprted from the ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr-nodejs")," package or the ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/indy-vdr-react-native")," package."),(0,a.kt)("h4",{id:"networks"},"networks"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"IndyVdrPoolConfig[]")),(0,a.kt)("p",null,"An array of indy networks to connect to. The list can contain the following object and it must ",(0,a.kt)("a",{parentName:"p",href:"#indyledgersgenesistransactions"},(0,a.kt)("inlineCode",{parentName:"a"},"genesisTransactions")),"."),(0,a.kt)("h5",{id:"indynamespace"},"indyNamespace"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("p",null,"The Indy namespace aka the name identifying the name of the network connecting to. See also ",(0,a.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/indy-did-method/#indy-did-method-identifiers"},"indy did method identifiers")),(0,a.kt)("h5",{id:"isproduction"},(0,a.kt)("inlineCode",{parentName:"h5"},"isProduction")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("p",null,"Whether the ledger is a production ledger. This is used for detecting which ledger to use in case of unqualified identifiers as production ledgers have priority."),(0,a.kt)("h5",{id:"genesistransactions"},(0,a.kt)("inlineCode",{parentName:"h5"},"genesisTransactions")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("p",null,"Stringified JSON object of the transaction."),(0,a.kt)("h5",{id:"connectonstartup"},(0,a.kt)("inlineCode",{parentName:"h5"},"connectOnStartup")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("p",null,"Whether to connect to the ledger on startup. Defaults to ",(0,a.kt)("inlineCode",{parentName:"p"},"false"),"."),(0,a.kt)("h5",{id:"transactionauthoragreement"},(0,a.kt)("inlineCode",{parentName:"h5"},"transactionAuthorAgreement")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"TransactionAuthorAgreement")),(0,a.kt)("p",null,"JSON representation specifying the version and acceptance mechanism. The version is the unique version of the transaction author agreement acceptance mechanism list (AML). The acceptance mechanism refers to the acceptance mechanism label of the item in the AML. For more details you may consult the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-node/blob/master/docs/source/transactions.md#transaction_author_agreement_aml"},"indy-node docs on AML")),(0,a.kt)("h5",{id:"transactionauthoragreementversion"},(0,a.kt)("inlineCode",{parentName:"h5"},"transactionAuthorAgreement.version")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("p",null,"The version of the AML acceptance mechanism. This is a string representation of a version number e.g. '1' or '1.4'"),(0,a.kt)("h5",{id:"transactionauthoragreementacceptancemechanism"},(0,a.kt)("inlineCode",{parentName:"h5"},"transactionAuthorAgreement.acceptanceMechanism")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Type"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("p",null,"The acceptance mechanism to choose. This ",(0,a.kt)("em",{parentName:"p"},"must")," be ",(0,a.kt)("em",{parentName:"p"},"one")," of the available labels of the acceptance mechanisms key-value pairs in the AML e.g. 'EULA'."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/466eb4b6.2c4c64d1.js b/assets/js/466eb4b6.2c4c64d1.js new file mode 100644 index 0000000..829437c --- /dev/null +++ b/assets/js/466eb4b6.2c4c64d1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[4354],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var i=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=i.createContext({}),l=function(e){var t=i.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=l(e.components);return i.createElement(d.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},m=i.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,d=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=l(n),m=r,g=p["".concat(d,".").concat(m)]||p[m]||u[m]||a;return n?i.createElement(g,s(s({ref:t},c),{},{components:n})):i.createElement(g,s({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,s=new Array(a);s[0]=m;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o[p]="string"==typeof e?e:r,s[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var i=n(87462),r=(n(67294),n(3905));const a={},s="Registering a schema and credential definition on an AnonCreds Registry",o={unversionedId:"tutorials/registering-schema-and-credential-definition",id:"tutorials/registering-schema-and-credential-definition",title:"Registering a schema and credential definition on an AnonCreds Registry",description:"In this tutorial we will register a schema and credential definition on an AnonCredsRegistry e.g. Hyperledger Indy ledger indy-vdr, cheqd.",source:"@site/guides/tutorials/registering-schema-and-credential-definition.md",sourceDirName:"tutorials",slug:"/tutorials/registering-schema-and-credential-definition",permalink:"/guides/tutorials/registering-schema-and-credential-definition",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Cheqd Did Module",permalink:"/guides/tutorials/cheqd/"},next:{title:"Issue an AnonCreds credential over DIDComm",permalink:"/guides/tutorials/issue-an-anoncreds-credential-over-didcomm"}},d={},l=[{value:"1. Setting up the agent",id:"1-setting-up-the-agent",level:3},{value:"2. Importing a DID (optional)",id:"2-importing-a-did-optional",level:3},{value:"3. Registering a schema",id:"3-registering-a-schema",level:3},{value:"3. Registering a credential definition",id:"3-registering-a-credential-definition",level:3},{value:"Using it",id:"using-it",level:3},{value:"Useful Resources",id:"useful-resources",level:3}],c={toc:l},p="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,i.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"registering-a-schema-and-credential-definition-on-an-anoncreds-registry"},"Registering a schema and credential definition on an AnonCreds Registry"),(0,r.kt)("p",null,"In this tutorial we will register a schema and credential definition on an AnonCredsRegistry e.g. Hyperledger Indy ledger ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-vdr"},"indy-vdr"),", ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/packages/cheqd"},"cheqd"),"."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This section assumes that"),(0,r.kt)("ol",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ol"},"You have ",(0,r.kt)("a",{parentName:"li",href:"../getting-started"},"set-up your development environment"),"."),(0,r.kt)("li",{parentName:"ol"},"You have basic knowledge of the required fields in the ",(0,r.kt)("a",{parentName:"li",href:"./agent-config"},"Agent Config")))),(0,r.kt)("h3",{id:"1-setting-up-the-agent"},"1. Setting up the agent"),(0,r.kt)("p",null,"First, an agent must be setup with a wallet and an indy-vdr or cheqd module. For these code examples, we will use a Node.js environment."),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers register-schema-and-cred-def.ts section-1",showLineNumbers:!0,"register-schema-and-cred-def.ts":!0,"section-1":!0},""))),(0,r.kt)("h3",{id:"2-importing-a-did-optional"},"2. Importing a DID (optional)"),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"There are many ledgers which can be used to register DIDs on for development."),(0,r.kt)("h4",{parentName:"admonition",id:"indy-vdr"},"Indy VDR"),(0,r.kt)("p",{parentName:"admonition"},"We recommend ",(0,r.kt)("a",{parentName:"p",href:"http://test.bcovrin.vonx.io/"},"BCovrin Testnet"),". This network allows very easily to register a DID from a seed which can then be used as the ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," in the snippet below. The seed is used as the private key for legacy compatibility with the Hyperledger Indy-SDK. The ",(0,r.kt)("a",{parentName:"p",href:"http://test.bcovrin.vonx.io/genesis"},"genesis transactions")," can also be retrieved for easy integration."),(0,r.kt)("h4",{parentName:"admonition",id:"cheqd"},"Cheqd"),(0,r.kt)("p",{parentName:"admonition"},"Follow the ",(0,r.kt)("a",{parentName:"p",href:"/guides/getting-started/set-up/cheqd/"},"cheqd setup")," and ",(0,r.kt)("a",{parentName:"p",href:"/guides/tutorials/cheqd/"},"cheqd DID module")," to setup the network and create a DID. Cheqd supports a mainnet for production and a testnet for development purposes.")),(0,r.kt)("p",null,"In order to register a schema and credential definition, a DID must be added to the agent first. This can be done by calling ",(0,r.kt)("inlineCode",{parentName:"p"},"agent.dids.create()"),", but this does require an endorser DID to be present as the ",(0,r.kt)("inlineCode",{parentName:"p"},"submitterDid"),". For this tutorial a DID will already be registered on the ledger, but it will be imported, with the associated private key, to be used later when registering the schema and credential definition."),(0,r.kt)("p",null,"This section can be omitted if your agent already has a DID in its wallet."),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers register-schema-and-cred-def.ts section-2",showLineNumbers:!0,"register-schema-and-cred-def.ts":!0,"section-2":!0},""))),(0,r.kt)("h3",{id:"3-registering-a-schema"},"3. Registering a schema"),(0,r.kt)("p",null,"When you have a registered DID on a network and in your wallet, you can register a schema. Registering a schema requires four fields: ",(0,r.kt)("inlineCode",{parentName:"p"},"issuerId"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"version")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"attrNames"),". It is important to note that the ",(0,r.kt)("inlineCode",{parentName:"p"},"issuerId")," must be the same as a DID in your wallet."),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers register-schema-and-cred-def.ts section-3",showLineNumbers:!0,"register-schema-and-cred-def.ts":!0,"section-3":!0},""))),(0,r.kt)("h3",{id:"3-registering-a-credential-definition"},"3. Registering a credential definition"),(0,r.kt)("p",null,"After registering a schema, a credential definition can be registered based on the schema. The credential definition, amongst more things, binds the schema to a specific issuer. Schemas can be reused between issuers, but a credential definition is specific to an issuer. In a credential definition revocation can also be specified. This section will not go in-depth about revocation."),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers register-schema-and-cred-def.ts section-4",showLineNumbers:!0,"register-schema-and-cred-def.ts":!0,"section-4":!0},""))),(0,r.kt)("h3",{id:"using-it"},"Using it"),(0,r.kt)("p",null,"After everything is registered on a AnonCredsRegistry, we can use it to issue credentials. The next tutorial is all about issuing an AnonCreds credential with this setup."),(0,r.kt)("h3",{id:"useful-resources"},"Useful Resources"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.cheqd.io/identity/guides/anoncreds"},"Cheqd AnonCreds Specification"))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/466eb4b6.8afdd5ed.js b/assets/js/466eb4b6.8afdd5ed.js deleted file mode 100644 index 02ef0ca..0000000 --- a/assets/js/466eb4b6.8afdd5ed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[4354],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var i=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=i.createContext({}),l=function(e){var t=i.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=l(e.components);return i.createElement(d.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},m=i.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,d=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=l(n),m=r,g=p["".concat(d,".").concat(m)]||p[m]||u[m]||a;return n?i.createElement(g,s(s({ref:t},c),{},{components:n})):i.createElement(g,s({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,s=new Array(a);s[0]=m;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o[p]="string"==typeof e?e:r,s[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var i=n(87462),r=(n(67294),n(3905));const a={},s="Registering a schema and credential definition on an AnonCreds Registry",o={unversionedId:"tutorials/registering-schema-and-credential-definition",id:"tutorials/registering-schema-and-credential-definition",title:"Registering a schema and credential definition on an AnonCreds Registry",description:"In this tutorial we will register a schema and credential definition on an AnonCredsRegistry e.g. Hyperledger Indy ledger indy-vdr, cheqd.",source:"@site/guides/tutorials/registering-schema-and-credential-definition.md",sourceDirName:"tutorials",slug:"/tutorials/registering-schema-and-credential-definition",permalink:"/guides/tutorials/registering-schema-and-credential-definition",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Cheqd Did Module",permalink:"/guides/tutorials/cheqd/"},next:{title:"Issue a credential",permalink:"/guides/tutorials/issue-a-credential"}},d={},l=[{value:"1. Setting up the agent",id:"1-setting-up-the-agent",level:3},{value:"2. Importing a DID (optional)",id:"2-importing-a-did-optional",level:3},{value:"3. Registering a schema",id:"3-registering-a-schema",level:3},{value:"3. Registering a credential definition",id:"3-registering-a-credential-definition",level:3},{value:"Using it",id:"using-it",level:3},{value:"Useful Resources",id:"useful-resources",level:3}],c={toc:l},p="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,i.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"registering-a-schema-and-credential-definition-on-an-anoncreds-registry"},"Registering a schema and credential definition on an AnonCreds Registry"),(0,r.kt)("p",null,"In this tutorial we will register a schema and credential definition on an AnonCredsRegistry e.g. Hyperledger Indy ledger ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-vdr"},"indy-vdr"),", ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/packages/cheqd"},"cheqd"),"."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This section assumes that"),(0,r.kt)("ol",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ol"},"You have ",(0,r.kt)("a",{parentName:"li",href:"../getting-started"},"set-up your development environment"),"."),(0,r.kt)("li",{parentName:"ol"},"You have basic knowledge of the required fields in the ",(0,r.kt)("a",{parentName:"li",href:"./agent-config"},"Agent Config")))),(0,r.kt)("h3",{id:"1-setting-up-the-agent"},"1. Setting up the agent"),(0,r.kt)("p",null,"First, an agent must be setup with a wallet and an indy-vdr or cheqd module. For these code examples, we will use a Node.js environment."),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers register-schema-and-cred-def.ts section-1",showLineNumbers:!0,"register-schema-and-cred-def.ts":!0,"section-1":!0},""))),(0,r.kt)("h3",{id:"2-importing-a-did-optional"},"2. Importing a DID (optional)"),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"There are many ledgers which can be used to register DIDs on for development."),(0,r.kt)("h4",{parentName:"admonition",id:"indy-vdr"},"Indy VDR"),(0,r.kt)("p",{parentName:"admonition"},"We recommend ",(0,r.kt)("a",{parentName:"p",href:"http://test.bcovrin.vonx.io/"},"BCovrin Testnet"),". This network allows very easily to register a DID from a seed which can then be used as the ",(0,r.kt)("inlineCode",{parentName:"p"},"privateKey")," in the snippet below. The seed is used as the private key for legacy compatibility with the Hyperledger Indy-SDK. The ",(0,r.kt)("a",{parentName:"p",href:"http://test.bcovrin.vonx.io/genesis"},"genesis transactions")," can also be retrieved for easy integration."),(0,r.kt)("h4",{parentName:"admonition",id:"cheqd"},"Cheqd"),(0,r.kt)("p",{parentName:"admonition"},"Follow the ",(0,r.kt)("a",{parentName:"p",href:"/guides/getting-started/set-up/cheqd/"},"cheqd setup")," and ",(0,r.kt)("a",{parentName:"p",href:"/guides/tutorials/cheqd/"},"cheqd DID module")," to setup the network and create a DID. Cheqd supports a mainnet for production and a testnet for development purposes.")),(0,r.kt)("p",null,"In order to register a schema and credential definition, a DID must be added to the agent first. This can be done by calling ",(0,r.kt)("inlineCode",{parentName:"p"},"agent.dids.create()"),", but this does require an endorser DID to be present as the ",(0,r.kt)("inlineCode",{parentName:"p"},"submitterDid"),". For this tutorial a DID will already be registered on the ledger, but it will be imported, with the associated private key, to be used later when registering the schema and credential definition."),(0,r.kt)("p",null,"This section can be omitted if your agent already has a DID in its wallet."),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers register-schema-and-cred-def.ts section-2",showLineNumbers:!0,"register-schema-and-cred-def.ts":!0,"section-2":!0},""))),(0,r.kt)("h3",{id:"3-registering-a-schema"},"3. Registering a schema"),(0,r.kt)("p",null,"When you have a registered DID on a network and in your wallet, you can register a schema. Registering a schema requires four fields: ",(0,r.kt)("inlineCode",{parentName:"p"},"issuerId"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"version")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"attrNames"),". It is important to note that the ",(0,r.kt)("inlineCode",{parentName:"p"},"issuerId")," must be the same as a DID in your wallet."),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers register-schema-and-cred-def.ts section-3",showLineNumbers:!0,"register-schema-and-cred-def.ts":!0,"section-3":!0},""))),(0,r.kt)("h3",{id:"3-registering-a-credential-definition"},"3. Registering a credential definition"),(0,r.kt)("p",null,"After registering a schema, a credential definition can be registered based on the schema. The credential definition, amongst more things, binds the schema to a specific issuer. Schemas can be reused between issuers, but a credential definition is specific to an issuer. In a credential definition revocation can also be specified. This section will not go in-depth about revocation."),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers register-schema-and-cred-def.ts section-4",showLineNumbers:!0,"register-schema-and-cred-def.ts":!0,"section-4":!0},""))),(0,r.kt)("h3",{id:"using-it"},"Using it"),(0,r.kt)("p",null,"After everything is registered on a AnonCredsRegistry, we can use it to issue credentials. The next tutorial is all about issuing an AnonCreds credential with this setup."),(0,r.kt)("h3",{id:"useful-resources"},"Useful Resources"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.cheqd.io/identity/guides/anoncreds"},"Cheqd AnonCreds Specification"))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/60053357.74683f43.js b/assets/js/60053357.74683f43.js new file mode 100644 index 0000000..a9f1292 --- /dev/null +++ b/assets/js/60053357.74683f43.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[6266],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>h});var i=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function r(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=i.createContext({}),d=function(e){var t=i.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},u=function(e){var t=d(e.components);return i.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},c=i.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=d(a),c=n,h=p["".concat(l,".").concat(c)]||p[c]||m[c]||o;return a?i.createElement(h,r(r({ref:t},u),{},{components:a})):i.createElement(h,r({ref:t},u))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,r=new Array(o);r[0]=c;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:n,r[1]=s;for(var d=2;d{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>d});var i=a(87462),n=(a(67294),a(3905));const o={},r="Mediation",s={unversionedId:"tutorials/mediation",id:"tutorials/mediation",title:"Mediation",description:"This section assumes that you have:",source:"@site/guides/tutorials/mediation.md",sourceDirName:"tutorials",slug:"/tutorials/mediation",permalink:"/guides/tutorials/mediation",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Issue an AnonCreds credential over DIDComm",permalink:"/guides/tutorials/issue-an-anoncreds-credential-over-didcomm"},next:{title:"OpenID for Verifiable Credentials Tutorials",permalink:"/guides/tutorials/openid4vc/"}},l={},d=[{value:"What is a mediator, and Why should I use one?",id:"what-is-a-mediator-and-why-should-i-use-one",level:3},{value:"1. Mediator setup",id:"1-mediator-setup",level:3},{value:"2. Recipient (Alice) setup",id:"2-recipient-alice-setup",level:3},{value:"3. Message exchange",id:"3-message-exchange",level:3},{value:"Useful resources",id:"useful-resources",level:3}],u={toc:d},p="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(p,(0,i.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"mediation"},"Mediation"),(0,n.kt)("blockquote",null,(0,n.kt)("p",{parentName:"blockquote"},"This section assumes that you have:"),(0,n.kt)("ol",{parentName:"blockquote"},(0,n.kt)("li",{parentName:"ol"},"Set up a ",(0,n.kt)("a",{parentName:"li",href:"../getting-started/installation"},"valid environment")," for development"),(0,n.kt)("li",{parentName:"ol"},"Basic knowledge of the required fields in the ",(0,n.kt)("a",{parentName:"li",href:"./agent-config"},"agent\nconfig"))),(0,n.kt)("p",{parentName:"blockquote"},"The agent setup varies depending on your target environment, React Native or Node.js.",(0,n.kt)("br",{parentName:"p"}),"\n","This tutorial assumes a Node.js environment for all agents (Alice, Bob, Meditator).")),(0,n.kt)("p",null,"This tutorial shows how to set up a mediator, how to configure an agent to use a mediator, and how agents exchange messages with a mediator in place.\nConcepts are explained in isolation:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/guides/tutorials/mediation#1-mediator-setup"},"First"),", it is shown how to set up a mediator."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/guides/tutorials/mediation#2-recipient-alice-setup"},"Second"),", it is demonstrated how to use a mediator."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/guides/tutorials/mediation#3-message-exchange"},"Third"),", the message exchange between agents with a mediator in place is explained.")),(0,n.kt)("h3",{id:"what-is-a-mediator-and-why-should-i-use-one"},"What is a mediator, and Why should I use one?"),(0,n.kt)("p",null,"A mediator is just a special type of agent."),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"\"When we describe agent-to-agent communication, it is convenient to think of an interaction only in terms of Alice and Bob and their agents. We say things like: \"Alice's agent sends a message to Bob's agent\" -- or perhaps \"Alice's edge agent sends a message to Bob's cloud agent, which forwards it to Bob's edge agent\"."),(0,n.kt)("p",{parentName:"admonition"},"Such statements adopt a useful level of abstraction--one that's highly recommended for most discussions. However, they make a number of simplifications. By modeling the roles of mediators and relays in routing, we can support routes that use multiple transports, routes that are not fully known (or knowable) to the sender, routes that pass through mix networks, and other advanced and powerful concepts.\"",(0,n.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0046-mediators-and-relays/README.md#aries-rfc-0046-mediators-and-relays"},"Aries RFC 0046: Mediators and Relays"))),(0,n.kt)("p",null,'A practical example where the use of mediators is beneficial can be found in a mobile environment. A mobile agent, aka. your mobile wallet, receives messages from other agents. Technically, sending HTTP messages to a mobile agent is impossible because the agent does not have a public IP. As you have probably seen in previous examples, a workaround for this scenario is to use ngrok. Another option is to use a mediator. When an agent is configured to use a mediator, messages to that agent are routed through the mediator and from there to its destination. Thus, a mobile agent can use a "public" mediator to receive messages on its behalf and poll them from time to time.'),(0,n.kt)("p",null,"This is just one example of how a mediator can be used. Further resources about mediators can be found ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#useful-resources"},"here"),"."),(0,n.kt)("admonition",{type:"tip"},(0,n.kt)("p",{parentName:"admonition"},"With mediators, WebSockets come in handy. In a production environment, it is recommendable to register a ",(0,n.kt)("inlineCode",{parentName:"p"},"WsInboundTransport()")," for Alice and a ",(0,n.kt)("inlineCode",{parentName:"p"},"WsOutboundTransport()")," for the mediator. These WebSocket transports allow the mediator to push messages to Alice instead of having Alice pull messages from the mediator repeatedly.")),(0,n.kt)("h3",{id:"1-mediator-setup"},"1. Mediator setup"),(0,n.kt)("p",null,"The first part shows how to set up a mediator agent. Generally, there are two ways to do that: deploying it from scratch or using a third-party mediator. This section focuses on the former approach, setting up the mediator from scratch."),(0,n.kt)("p",null,"The mediator is set up on port 3001 and creates an Out-of-Band invitation that allows multiple other agents to connect to the mediator. Configuring an agent as a mediator demands utilizing the ",(0,n.kt)("inlineCode",{parentName:"p"},"MediatorModule"),". In this example, the ",(0,n.kt)("inlineCode",{parentName:"p"},"autoAcceptMediationRequests")," flag is set to true to accept mediation requests automatically."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers mediator-setup.ts section-1",showLineNumbers:!0,"mediator-setup.ts":!0,"section-1":!0},"")),(0,n.kt)("h3",{id:"2-recipient-alice-setup"},"2. Recipient (Alice) setup"),(0,n.kt)("p",null,"The second part shows how to use a mediator. Becoming a recipient of a mediator requires using the ",(0,n.kt)("inlineCode",{parentName:"p"},"MediationRecipientModule"),". The setup is the same whether you use your own or a third-party mediator."),(0,n.kt)("p",null,"The easiest way to set everything up is by configuring the ",(0,n.kt)("inlineCode",{parentName:"p"},"MediationRecipientModule")," to connect to the mediator on agent startup. This can be done by constructing the module with the ",(0,n.kt)("inlineCode",{parentName:"p"},"mediatorInvitationUrl"),". You can get the mediatorInvitationUrl either from ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#1-mediator-setup"},"part one")," by running a mediator yourself or from a public mediator such as the Animo-mediator. The following snippet uses the latter approach."),(0,n.kt)("p",null,"The ",(0,n.kt)("inlineCode",{parentName:"p"},"ConnectionsModule")," used in this snippet serves the sole purpose of automatically accepting connections and thus simplifying setup."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers mediation-recipient.ts section-1",showLineNumbers:!0,"mediation-recipient.ts":!0,"section-1":!0},"")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"In case you are using a third-party mediator and cannot create an invitationUrl, it is common practice for mediators to provide an endpoint from which the invitationUrl can be fetched.")),(0,n.kt)("h3",{id:"3-message-exchange"},"3. Message exchange"),(0,n.kt)("p",null,"This section explains the message exchange between agents when a mediator is in place. The process is illustrated using the diagram below. Parts ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#1-mediator-setup"},"one")," and ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#2-recipient-alice-setup"},"two")," of this tutorial showed how to set up and use a mediator. If the ",(0,n.kt)("inlineCode",{parentName:"p"},"mediatorInvitationUrl")," is specified when constructing the ",(0,n.kt)("inlineCode",{parentName:"p"},"MediationRecipientModule")," (as in ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#2-recipient-alice-setup"},"Part two"),"), the mediation request and grant ",(0,n.kt)("em",{parentName:"p"},"(1-2)")," between Alice and the mediator will be performed automatically when Alice's agent is started."),(0,n.kt)("p",null,"If Alice establishes a connection with another fictional agent, say, Bob's agent, who is not using any mediators ",(0,n.kt)("em",{parentName:"p"},"(3-6)"),". (Connection establishment is no different when a mediator is involved). Then, messages from Alice to Bob ",(0,n.kt)("em",{parentName:"p"},"(7)")," are routed directly to Bob, while messages from Bob to Alice ",(0,n.kt)("em",{parentName:"p"},"(8-9)")," are routed through the intermediary."),(0,n.kt)("mermaid",{value:"sequenceDiagram\n autonumber\n participant Alice\n participant Mediator\n participant Bob\n Note over Mediator: Start\n Note over Alice: Start\n Alice->>Mediator: Request Mediation\n Mediator->>Alice: Grant Mediation\n Note over Bob: Start\n Alice->>Alice: CreateInvitation\n Alice --\x3e Bob: (Send Invitation to Bob)\n Bob->>Bob: RecieveInvitation\n Alice->>Bob: WaitForConnection\n Alice->>Bob: SendMessage Alice->Bob\n Bob->>Mediator: SendMessage Bob->Alice (Mediator)\n Mediator->>Alice: ForwardMessage Bob->Alice (Mediator)"}),(0,n.kt)("h3",{id:"useful-resources"},"Useful resources"),(0,n.kt)("p",null,"For more information about mediator refer to:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/tree/main/features/0211-route-coordination"},"Aries Mediator Coordination Protocol")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://indicio-tech.github.io/mediator"},"Indicio Public Mediator")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/animo/animo-mediator"},"Setup your own Credo Mediator")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0046-mediators-and-relays/README.md#aries-rfc-0046-mediators-and-relays"},"Aries RFC 0046: Mediators and Relays"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/60053357.e971694b.js b/assets/js/60053357.e971694b.js deleted file mode 100644 index 442bb47..0000000 --- a/assets/js/60053357.e971694b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[6266],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>h});var i=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function r(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=i.createContext({}),d=function(e){var t=i.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},u=function(e){var t=d(e.components);return i.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},c=i.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=d(a),c=n,h=p["".concat(l,".").concat(c)]||p[c]||m[c]||o;return a?i.createElement(h,r(r({ref:t},u),{},{components:a})):i.createElement(h,r({ref:t},u))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,r=new Array(o);r[0]=c;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:n,r[1]=s;for(var d=2;d{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>d});var i=a(87462),n=(a(67294),a(3905));const o={},r="Mediation",s={unversionedId:"tutorials/mediation",id:"tutorials/mediation",title:"Mediation",description:"This section assumes that you have:",source:"@site/guides/tutorials/mediation.md",sourceDirName:"tutorials",slug:"/tutorials/mediation",permalink:"/guides/tutorials/mediation",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Issue a credential",permalink:"/guides/tutorials/issue-a-credential"},next:{title:"Updating Credo",permalink:"/guides/updating/"}},l={},d=[{value:"What is a mediator, and Why should I use one?",id:"what-is-a-mediator-and-why-should-i-use-one",level:3},{value:"1. Mediator setup",id:"1-mediator-setup",level:3},{value:"2. Recipient (Alice) setup",id:"2-recipient-alice-setup",level:3},{value:"3. Message exchange",id:"3-message-exchange",level:3},{value:"Useful resources",id:"useful-resources",level:3}],u={toc:d},p="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(p,(0,i.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"mediation"},"Mediation"),(0,n.kt)("blockquote",null,(0,n.kt)("p",{parentName:"blockquote"},"This section assumes that you have:"),(0,n.kt)("ol",{parentName:"blockquote"},(0,n.kt)("li",{parentName:"ol"},"Set up a ",(0,n.kt)("a",{parentName:"li",href:"../getting-started/installation"},"valid environment")," for development"),(0,n.kt)("li",{parentName:"ol"},"Basic knowledge of the required fields in the ",(0,n.kt)("a",{parentName:"li",href:"./agent-config"},"agent\nconfig"))),(0,n.kt)("p",{parentName:"blockquote"},"The agent setup varies depending on your target environment, React Native or Node.js.",(0,n.kt)("br",{parentName:"p"}),"\n","This tutorial assumes a Node.js environment for all agents (Alice, Bob, Meditator).")),(0,n.kt)("p",null,"This tutorial shows how to set up a mediator, how to configure an agent to use a mediator, and how agents exchange messages with a mediator in place.\nConcepts are explained in isolation:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/guides/tutorials/mediation#1-mediator-setup"},"First"),", it is shown how to set up a mediator."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/guides/tutorials/mediation#2-recipient-alice-setup"},"Second"),", it is demonstrated how to use a mediator."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/guides/tutorials/mediation#3-message-exchange"},"Third"),", the message exchange between agents with a mediator in place is explained.")),(0,n.kt)("h3",{id:"what-is-a-mediator-and-why-should-i-use-one"},"What is a mediator, and Why should I use one?"),(0,n.kt)("p",null,"A mediator is just a special type of agent."),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"\"When we describe agent-to-agent communication, it is convenient to think of an interaction only in terms of Alice and Bob and their agents. We say things like: \"Alice's agent sends a message to Bob's agent\" -- or perhaps \"Alice's edge agent sends a message to Bob's cloud agent, which forwards it to Bob's edge agent\"."),(0,n.kt)("p",{parentName:"admonition"},"Such statements adopt a useful level of abstraction--one that's highly recommended for most discussions. However, they make a number of simplifications. By modeling the roles of mediators and relays in routing, we can support routes that use multiple transports, routes that are not fully known (or knowable) to the sender, routes that pass through mix networks, and other advanced and powerful concepts.\"",(0,n.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0046-mediators-and-relays/README.md#aries-rfc-0046-mediators-and-relays"},"Aries RFC 0046: Mediators and Relays"))),(0,n.kt)("p",null,'A practical example where the use of mediators is beneficial can be found in a mobile environment. A mobile agent, aka. your mobile wallet, receives messages from other agents. Technically, sending HTTP messages to a mobile agent is impossible because the agent does not have a public IP. As you have probably seen in previous examples, a workaround for this scenario is to use ngrok. Another option is to use a mediator. When an agent is configured to use a mediator, messages to that agent are routed through the mediator and from there to its destination. Thus, a mobile agent can use a "public" mediator to receive messages on its behalf and poll them from time to time.'),(0,n.kt)("p",null,"This is just one example of how a mediator can be used. Further resources about mediators can be found ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#useful-resources"},"here"),"."),(0,n.kt)("admonition",{type:"tip"},(0,n.kt)("p",{parentName:"admonition"},"With mediators, WebSockets come in handy. In a production environment, it is recommendable to register a ",(0,n.kt)("inlineCode",{parentName:"p"},"WsInboundTransport()")," for Alice and a ",(0,n.kt)("inlineCode",{parentName:"p"},"WsOutboundTransport()")," for the mediator. These WebSocket transports allow the mediator to push messages to Alice instead of having Alice pull messages from the mediator repeatedly.")),(0,n.kt)("h3",{id:"1-mediator-setup"},"1. Mediator setup"),(0,n.kt)("p",null,"The first part shows how to set up a mediator agent. Generally, there are two ways to do that: deploying it from scratch or using a third-party mediator. This section focuses on the former approach, setting up the mediator from scratch."),(0,n.kt)("p",null,"The mediator is set up on port 3001 and creates an Out-of-Band invitation that allows multiple other agents to connect to the mediator. Configuring an agent as a mediator demands utilizing the ",(0,n.kt)("inlineCode",{parentName:"p"},"MediatorModule"),". In this example, the ",(0,n.kt)("inlineCode",{parentName:"p"},"autoAcceptMediationRequests")," flag is set to true to accept mediation requests automatically."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers mediator-setup.ts section-1",showLineNumbers:!0,"mediator-setup.ts":!0,"section-1":!0},"")),(0,n.kt)("h3",{id:"2-recipient-alice-setup"},"2. Recipient (Alice) setup"),(0,n.kt)("p",null,"The second part shows how to use a mediator. Becoming a recipient of a mediator requires using the ",(0,n.kt)("inlineCode",{parentName:"p"},"MediationRecipientModule"),". The setup is the same whether you use your own or a third-party mediator."),(0,n.kt)("p",null,"The easiest way to set everything up is by configuring the ",(0,n.kt)("inlineCode",{parentName:"p"},"MediationRecipientModule")," to connect to the mediator on agent startup. This can be done by constructing the module with the ",(0,n.kt)("inlineCode",{parentName:"p"},"mediatorInvitationUrl"),". You can get the mediatorInvitationUrl either from ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#1-mediator-setup"},"part one")," by running a mediator yourself or from a public mediator such as the Animo-mediator. The following snippet uses the latter approach."),(0,n.kt)("p",null,"The ",(0,n.kt)("inlineCode",{parentName:"p"},"ConnectionsModule")," used in this snippet serves the sole purpose of automatically accepting connections and thus simplifying setup."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers mediation-recipient.ts section-1",showLineNumbers:!0,"mediation-recipient.ts":!0,"section-1":!0},"")),(0,n.kt)("admonition",{type:"info"},(0,n.kt)("p",{parentName:"admonition"},"In case you are using a third-party mediator and cannot create an invitationUrl, it is common practice for mediators to provide an endpoint from which the invitationUrl can be fetched.")),(0,n.kt)("h3",{id:"3-message-exchange"},"3. Message exchange"),(0,n.kt)("p",null,"This section explains the message exchange between agents when a mediator is in place. The process is illustrated using the diagram below. Parts ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#1-mediator-setup"},"one")," and ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#2-recipient-alice-setup"},"two")," of this tutorial showed how to set up and use a mediator. If the ",(0,n.kt)("inlineCode",{parentName:"p"},"mediatorInvitationUrl")," is specified when constructing the ",(0,n.kt)("inlineCode",{parentName:"p"},"MediationRecipientModule")," (as in ",(0,n.kt)("a",{parentName:"p",href:"/guides/tutorials/mediation#2-recipient-alice-setup"},"Part two"),"), the mediation request and grant ",(0,n.kt)("em",{parentName:"p"},"(1-2)")," between Alice and the mediator will be performed automatically when Alice's agent is started."),(0,n.kt)("p",null,"If Alice establishes a connection with another fictional agent, say, Bob's agent, who is not using any mediators ",(0,n.kt)("em",{parentName:"p"},"(3-6)"),". (Connection establishment is no different when a mediator is involved). Then, messages from Alice to Bob ",(0,n.kt)("em",{parentName:"p"},"(7)")," are routed directly to Bob, while messages from Bob to Alice ",(0,n.kt)("em",{parentName:"p"},"(8-9)")," are routed through the intermediary."),(0,n.kt)("mermaid",{value:"sequenceDiagram\n autonumber\n participant Alice\n participant Mediator\n participant Bob\n Note over Mediator: Start\n Note over Alice: Start\n Alice->>Mediator: Request Mediation\n Mediator->>Alice: Grant Mediation\n Note over Bob: Start\n Alice->>Alice: CreateInvitation\n Alice --\x3e Bob: (Send Invitation to Bob)\n Bob->>Bob: RecieveInvitation\n Alice->>Bob: WaitForConnection\n Alice->>Bob: SendMessage Alice->Bob\n Bob->>Mediator: SendMessage Bob->Alice (Mediator)\n Mediator->>Alice: ForwardMessage Bob->Alice (Mediator)"}),(0,n.kt)("h3",{id:"useful-resources"},"Useful resources"),(0,n.kt)("p",null,"For more information about mediator refer to:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/tree/main/features/0211-route-coordination"},"Aries Mediator Coordination Protocol")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://indicio-tech.github.io/mediator"},"Indicio Public Mediator")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/animo/animo-mediator"},"Setup your own Credo Mediator")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0046-mediators-and-relays/README.md#aries-rfc-0046-mediators-and-relays"},"Aries RFC 0046: Mediators and Relays"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/636a146f.1c0e4e15.js b/assets/js/636a146f.4590d4d9.js similarity index 98% rename from assets/js/636a146f.1c0e4e15.js rename to assets/js/636a146f.4590d4d9.js index 3da84bd..a6bbe55 100644 --- a/assets/js/636a146f.1c0e4e15.js +++ b/assets/js/636a146f.4590d4d9.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[5313],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>h});var r=o(67294);function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function a(e){for(var t=1;t=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var l=r.createContext({}),c=function(e){var t=r.useContext(l),o=t;return e&&(o="function"==typeof e?e(t):a(a({},t),e)),o},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var o=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(o),m=n,h=u["".concat(l,".").concat(m)]||u[m]||d[m]||i;return o?r.createElement(h,a(a({ref:t},p),{},{components:o})):r.createElement(h,a({ref:t},p))}));function h(e,t){var o=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=o.length,a=new Array(i);a[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:n,a[1]=s;for(var c=2;c{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=o(87462),n=(o(67294),o(3905));const i={},a="The Credo Ecosystem",s={unversionedId:"ecosystem/index",id:"ecosystem/index",title:"The Credo Ecosystem",description:"The Credo ecosystem includes various components that are spread across multiple repositories. In this section we'll go over what these components are and how the relate to one another.",source:"@site/guides/ecosystem/index.md",sourceDirName:"ecosystem",slug:"/ecosystem/",permalink:"/guides/ecosystem/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Migrating from Credo 0.3.x to 0.4.x",permalink:"/guides/updating/versions/0.3-to-0.4"},next:{title:"Extensions",permalink:"/guides/extensions/"}},l={},c=[{value:"Repositories",id:"repositories",level:2},{value:"Documentation",id:"documentation",level:2},{value:"Credo",id:"credo",level:3},{value:"Contributing in the Credo Ecosystem",id:"contributing-in-the-credo-ecosystem",level:2},{value:"Developer Contributions",id:"developer-contributions",level:3}],p={toc:c},u="wrapper";function d(e){let{components:t,...o}=e;return(0,n.kt)(u,(0,r.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"the-credo-ecosystem"},"The Credo Ecosystem"),(0,n.kt)("p",null,"The Credo ecosystem includes various components that are spread across multiple repositories. In this section we'll go over what these components are and how the relate to one another."),(0,n.kt)("h2",{id:"repositories"},"Repositories"),(0,n.kt)("p",null,"Currently, Credo is composed out of two separate repositories:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts"},"Credo")),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts-ext"},"Credo Extensions"))),(0,n.kt)("p",null,"In addition, there are several open-source applications and building blocks built on top of Credo. One example is ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-mobile-agent-react-native"},"Aries Mobile Agent React Native (Bifold)"),", which is a white-label mobile wallet you can use to bootstrap your own custom wallet."),(0,n.kt)("h2",{id:"documentation"},"Documentation"),(0,n.kt)("p",null,"You can find their documentation here:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("a",{parentName:"li",href:"https://credo.js.org/guides"},"Credo (core)")),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("a",{parentName:"li",href:"https://credo.js.org/guides/extensions"},"Credo Extensions"))),(0,n.kt)("h3",{id:"credo"},"Credo"),(0,n.kt)("p",null,"Credo (core) is at the core of the Credo ecosystem. Credo provides all the functionality related to cryptography, storage, messaging and more that is required"),(0,n.kt)("h2",{id:"contributing-in-the-credo-ecosystem"},"Contributing in the Credo Ecosystem"),(0,n.kt)("p",null,"Consider attending our weekly meetings to become aware of the current development cadence."),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts/wiki/Meeting-Information"},"Credo Working Group Meeting")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://wiki.hyperledger.org/display/ARIES/Aries+Working+Group"},"Aries Working Group Meeting"))),(0,n.kt)("h3",{id:"developer-contributions"},"Developer Contributions"),(0,n.kt)("p",null,"Each project maintains its own CONTRIBUTING guidance:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts/blob/main/CONTRIBUTING.md"},"Credo CONTRIBUTING.md")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts-ext/blob/main/CONTRIBUTING.md"},"Credo Extensions CONTRIBUTING.md"))),(0,n.kt)("p",null,"Each project has a significant set of developer conventions, checklists, templates, and actions to provide guidance and boundaries for a contribution.\nConsider looking at previous issues and their corresponding PRs to get a sense of the latest."))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[5313],{3905:(e,t,o)=>{o.d(t,{Zo:()=>p,kt:()=>h});var r=o(67294);function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function a(e){for(var t=1;t=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var l=r.createContext({}),c=function(e){var t=r.useContext(l),o=t;return e&&(o="function"==typeof e?e(t):a(a({},t),e)),o},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var o=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(o),m=n,h=u["".concat(l,".").concat(m)]||u[m]||d[m]||i;return o?r.createElement(h,a(a({ref:t},p),{},{components:o})):r.createElement(h,a({ref:t},p))}));function h(e,t){var o=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=o.length,a=new Array(i);a[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:n,a[1]=s;for(var c=2;c{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=o(87462),n=(o(67294),o(3905));const i={},a="The Credo Ecosystem",s={unversionedId:"ecosystem/index",id:"ecosystem/index",title:"The Credo Ecosystem",description:"The Credo ecosystem includes various components that are spread across multiple repositories. In this section we'll go over what these components are and how the relate to one another.",source:"@site/guides/ecosystem/index.md",sourceDirName:"ecosystem",slug:"/ecosystem/",permalink:"/guides/ecosystem/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Migrating from Credo 0.4.x to 0.5.x",permalink:"/guides/updating/versions/0.4-to-0.5"},next:{title:"Extensions",permalink:"/guides/extensions/"}},l={},c=[{value:"Repositories",id:"repositories",level:2},{value:"Documentation",id:"documentation",level:2},{value:"Credo",id:"credo",level:3},{value:"Contributing in the Credo Ecosystem",id:"contributing-in-the-credo-ecosystem",level:2},{value:"Developer Contributions",id:"developer-contributions",level:3}],p={toc:c},u="wrapper";function d(e){let{components:t,...o}=e;return(0,n.kt)(u,(0,r.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"the-credo-ecosystem"},"The Credo Ecosystem"),(0,n.kt)("p",null,"The Credo ecosystem includes various components that are spread across multiple repositories. In this section we'll go over what these components are and how the relate to one another."),(0,n.kt)("h2",{id:"repositories"},"Repositories"),(0,n.kt)("p",null,"Currently, Credo is composed out of two separate repositories:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts"},"Credo")),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts-ext"},"Credo Extensions"))),(0,n.kt)("p",null,"In addition, there are several open-source applications and building blocks built on top of Credo. One example is ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-mobile-agent-react-native"},"Aries Mobile Agent React Native (Bifold)"),", which is a white-label mobile wallet you can use to bootstrap your own custom wallet."),(0,n.kt)("h2",{id:"documentation"},"Documentation"),(0,n.kt)("p",null,"You can find their documentation here:"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("a",{parentName:"li",href:"https://credo.js.org/guides"},"Credo (core)")),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("a",{parentName:"li",href:"https://credo.js.org/guides/extensions"},"Credo Extensions"))),(0,n.kt)("h3",{id:"credo"},"Credo"),(0,n.kt)("p",null,"Credo (core) is at the core of the Credo ecosystem. Credo provides all the functionality related to cryptography, storage, messaging and more that is required"),(0,n.kt)("h2",{id:"contributing-in-the-credo-ecosystem"},"Contributing in the Credo Ecosystem"),(0,n.kt)("p",null,"Consider attending our weekly meetings to become aware of the current development cadence."),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts/wiki/Meeting-Information"},"Credo Working Group Meeting")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://wiki.hyperledger.org/display/ARIES/Aries+Working+Group"},"Aries Working Group Meeting"))),(0,n.kt)("h3",{id:"developer-contributions"},"Developer Contributions"),(0,n.kt)("p",null,"Each project maintains its own CONTRIBUTING guidance:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts/blob/main/CONTRIBUTING.md"},"Credo CONTRIBUTING.md")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://github.com/openwallet-foundation/credo-ts-ext/blob/main/CONTRIBUTING.md"},"Credo Extensions CONTRIBUTING.md"))),(0,n.kt)("p",null,"Each project has a significant set of developer conventions, checklists, templates, and actions to provide guidance and boundaries for a contribution.\nConsider looking at previous issues and their corresponding PRs to get a sense of the latest."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8eb39dbb.d017f6b5.js b/assets/js/8eb39dbb.d017f6b5.js new file mode 100644 index 0000000..f0efc2f --- /dev/null +++ b/assets/js/8eb39dbb.d017f6b5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7086],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(n),p=r,h=d["".concat(l,".").concat(p)]||d[p]||m[p]||i;return n?a.createElement(h,o(o({ref:t},c),{},{components:n})):a.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var u=2;u{n.d(t,{Z:()=>o});var a=n(67294),r=n(86010);const i={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(87462),r=n(67294),i=n(86010),o=n(12466),s=n(16550),l=n(91980),u=n(67392),c=n(50012);function d(e){return function(e){return r.Children.map(e,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function m(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function p(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=m(e),[o,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[l,u]=h({queryString:n,groupId:a}),[d,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),g=(()=>{const e=l??d;return p({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{g&&s(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),f(e)}),[u,f,i]),tabValues:i}}var g=n(72389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:s,selectValue:l,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==s&&(d(t),l(a))},p=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:p,onClick:m},o,{className:(0,i.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":s===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b.tabList)},r.createElement(k,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,g.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},96704:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>u,toc:()=>d});var a=n(87462),r=(n(67294),n(3905)),i=n(74866),o=n(85162);const s={},l="Issue an AnonCreds credential over DIDComm",u={unversionedId:"tutorials/issue-an-anoncreds-credential-over-didcomm",id:"tutorials/issue-an-anoncreds-credential-over-didcomm",title:"Issue an AnonCreds credential over DIDComm",description:"In this tutorial we will issue an AnonCreds credential from the Issuer to a Holder over DIDComm. We will start with setting up both their agents with the minimal configuration required to follow this tutorial. It is assumed that there is a connection between the Issuer and the Holder and the Issuer also has a registered schema and credential definition. After initializing the Issuer will send a credential to the holder, and will then accept this credential and automatically store it in their wallet.",source:"@site/guides/tutorials/issue-an-anoncreds-credential-over-didcomm.md",sourceDirName:"tutorials",slug:"/tutorials/issue-an-anoncreds-credential-over-didcomm",permalink:"/guides/tutorials/issue-an-anoncreds-credential-over-didcomm",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Registering a schema and credential definition on an AnonCreds Registry",permalink:"/guides/tutorials/registering-schema-and-credential-definition"},next:{title:"Mediation",permalink:"/guides/tutorials/mediation"}},c={},d=[{value:"1. Setting up the agents",id:"1-setting-up-the-agents",level:3},{value:"Issuer",id:"issuer",level:4},{value:"Holder",id:"holder",level:4},{value:"3. Listening for incoming credentials",id:"3-listening-for-incoming-credentials",level:3},{value:"4. Issuing a credential",id:"4-issuing-a-credential",level:3},{value:"Useful resources",id:"useful-resources",level:3}],m={toc:d},p="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"issue-an-anoncreds-credential-over-didcomm"},"Issue an AnonCreds credential over DIDComm"),(0,r.kt)("p",null,"In this tutorial we will issue an AnonCreds credential from the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," to a ",(0,r.kt)("em",{parentName:"p"},"Holder")," over DIDComm. We will start with setting up both their agents with the minimal configuration required to follow this tutorial. It is assumed that there is a connection between the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," and the ",(0,r.kt)("em",{parentName:"p"},"Holder")," and the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," also has a registered schema and credential definition. After initializing the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," will send a credential to the ",(0,r.kt)("em",{parentName:"p"},"holder"),", and will then accept this credential and automatically store it in their wallet."),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"Using ",(0,r.kt)("a",{parentName:"em",href:"https://anoncreds-wg.github.io/anoncreds-spec/"},"AnonCreds")," and the ",(0,r.kt)("a",{parentName:"em",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0453-issue-credential-v2/README.md"},"Issue Credential V2 Protocol")," or the ",(0,r.kt)("a",{parentName:"em",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0036-issue-credential/README.md"},"Issue Credential V1 Protocol"),".")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This section assumes that"),(0,r.kt)("ol",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ol"},"You have ",(0,r.kt)("a",{parentName:"li",href:"../getting-started"},"set-up your development environment"),"."),(0,r.kt)("li",{parentName:"ol"},"You have basic knowledge of the required fields in the ",(0,r.kt)("a",{parentName:"li",href:"./agent-config"},"Agent Config")),(0,r.kt)("li",{parentName:"ol"},"You have completed the ",(0,r.kt)("a",{parentName:"li",href:"./create-a-connection"},"Create a Connection tutorial")),(0,r.kt)("li",{parentName:"ol"},"You have a registered schema and credential definition. This can be done by following the ",(0,r.kt)("a",{parentName:"li",href:"./registering-schema-and-credential-definition"},"Registering on a AnonCreds Registry")))),(0,r.kt)("h3",{id:"1-setting-up-the-agents"},"1. Setting up the agents"),(0,r.kt)("p",null,"First for both agents we must setup and initialize an agent to work with. Depending on your target, ",(0,r.kt)("a",{parentName:"p",href:"../getting-started/installation/react-native"},"React Native")," or ",(0,r.kt)("a",{parentName:"p",href:"../getting-started/installation/react-native"},"Node.js"),", it might vary."),(0,r.kt)("p",null,"In this tutorial the ",(0,r.kt)("em",{parentName:"p"},"Holder")," will be in a ",(0,r.kt)("a",{parentName:"p",href:"../getting-started/installation/nodejs"},"Node.js environment")," and the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," also in a ",(0,r.kt)("a",{parentName:"p",href:"../getting-started/installation/nodejs"},"Node.js environment"),"."),(0,r.kt)("h4",{id:"issuer"},"Issuer"),(0,r.kt)("p",null,"For the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," the setup is commonly not the same as the ",(0,r.kt)("em",{parentName:"p"},"Holder"),". In the example they both live in a server environment, meaning they do not need a mediator. More commonly, the ",(0,r.kt)("em",{parentName:"p"},"Holder")," is in a mobile environment where a mediator is required for receiving DIDComm messages."),(0,r.kt)("p",null,"It is also very important for the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," to have a public DID, for the binding with a credential definition, amongst other things. For this demo we will use ",(0,r.kt)("a",{parentName:"p",href:"http://test.bcovrin.vonx.io"},"BCovrin Test"),". If you want to follow this tutorial, you have to register a public DID ",(0,r.kt)("a",{parentName:"p",href:"http://test.bcovrin.vonx.io"},"here")," via the Wallet seed field (this must be the same as the seed inside the config under the key ",(0,r.kt)("a",{parentName:"p",href:"./agent-config#publicdidseed"},(0,r.kt)("inlineCode",{parentName:"a"},"publicDidSeed")),")."),(0,r.kt)("p",null,"In order to reach the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," we have to add a list of ",(0,r.kt)("a",{parentName:"p",href:"./agent-config#endpoints"},(0,r.kt)("inlineCode",{parentName:"a"},"endpoints"))," of the agent that exposes the ",(0,r.kt)("inlineCode",{parentName:"p"},"inboundTransport")," to the public. In the example below we add an ",(0,r.kt)("inlineCode",{parentName:"p"},"inboundTransport")," and use port ",(0,r.kt)("inlineCode",{parentName:"p"},"3002"),". For development purposes it is recommended to use a tunneling service for this, like ",(0,r.kt)("a",{parentName:"p",href:"https://ngrok.com"},"Ngrok"),". Ngrok will allow you to reach your locally exposed endpoint from the public. If a tunneling service is used, make sure to use the ",(0,r.kt)("inlineCode",{parentName:"p"},"HTTPS")," variant as mobile environments, by default, do not accept ",(0,r.kt)("inlineCode",{parentName:"p"},"HTTP")," anymore."),(0,r.kt)("p",null,"To install ",(0,r.kt)("a",{parentName:"p",href:"https://ngrok.com"},"Ngrok")," and expose the port to the public the following commands can be used:"),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"yarn",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-console"},"yarn global add ngrok\n\nngrok http \n"))),(0,r.kt)(o.Z,{label:"npm",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-console"},"npm install --global ngrok\n\nngrok http \n")))),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-anoncreds-credential-didcomm.ts section-1",showLineNumbers:!0,"issue-anoncreds-credential-didcomm.ts":!0,"section-1":!0},""))),(0,r.kt)("h4",{id:"holder"},"Holder"),(0,r.kt)("p",null,"For the ",(0,r.kt)("em",{parentName:"p"},"Holder")," we need to setup a basic agent with a wallet, mediator, outbound transport and a ledger."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"If you want to follow this tutorial in a mobile environment:"),(0,r.kt)("ol",{parentName:"blockquote"},(0,r.kt)("li",{parentName:"ol"},"Use the ",(0,r.kt)("inlineCode",{parentName:"li"},"agentDependencies")," from ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/react-native")),(0,r.kt)("li",{parentName:"ol"},"It is very important to note that mobile agents do not support HTTP by default. It is recommended to do everything over HTTPS, but for development HTTP can be enabled for ",(0,r.kt)("a",{parentName:"li",href:"https://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-ios-9"},"iOS")," and ",(0,r.kt)("a",{parentName:"li",href:"https://stackoverflow.com/questions/51902629/how-to-allow-all-network-connection-types-http-and-https-in-android-9-pie"},"Android"),"."))),(0,r.kt)("admonition",{type:"holder"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-anoncreds-credential-didcomm.ts section-2",showLineNumbers:!0,"issue-anoncreds-credential-didcomm.ts":!0,"section-2":!0},""))),(0,r.kt)("h3",{id:"3-listening-for-incoming-credentials"},"3. Listening for incoming credentials"),(0,r.kt)("p",null,"When we want to accept a credential, we have to listen to incoming credentials and handle accordingly. In this example we do not have any user interaction, but is likely that your application would have a user-interface which would display the credential. When receiving a credential offer you can get the values from ",(0,r.kt)("inlineCode",{parentName:"p"},"credentialExchangeRecord.credentialAttributes"),"."),(0,r.kt)("admonition",{type:"holder"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-anoncreds-credential-didcomm.ts section-3",showLineNumbers:!0,"issue-anoncreds-credential-didcomm.ts":!0,"section-3":!0},""))),(0,r.kt)("h3",{id:"4-issuing-a-credential"},"4. Issuing a credential"),(0,r.kt)("p",null,"Now that everything is setup on both sides, the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," can now offer a credential to the ",(0,r.kt)("em",{parentName:"p"},"Holder"),"."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"In this example we do not instantiate a connection and assume that there is one. Please refer to this guide ",(0,r.kt)("a",{parentName:"p",href:"./create-a-connection"},"Create a connection")," to get a connection and connectionId.")),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Indy",value:"tab1",mdxType:"TabItem"},(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-anoncreds-credential-didcomm.ts section-4",showLineNumbers:!0,"issue-anoncreds-credential-didcomm.ts":!0,"section-4":!0},"")))),(0,r.kt)(o.Z,{label:"AnonCreds",value:"tab2",mdxType:"TabItem"},(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-anoncreds-credential-didcomm.ts section-5",showLineNumbers:!0,"issue-anoncreds-credential-didcomm.ts":!0,"section-5":!0},""))))),(0,r.kt)("h3",{id:"useful-resources"},"Useful resources"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://anoncreds-wg.github.io/anoncreds-spec/"},"AnonCreds")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0036-issue-credential/README.md"},"Issue Credential V1 Protocol")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0453-issue-credential-v2/README.md"},"Issue Credential V2 Protocol"))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.69b54ca8.js b/assets/js/935f2afb.69b54ca8.js deleted file mode 100644 index 6f31d20..0000000 --- a/assets/js/935f2afb.69b54ca8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"v0.5.x","banner":null,"badge":true,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Intro","href":"/guides/","docId":"index"},{"type":"category","label":"Getting started","items":[{"type":"link","label":"Prerequisites","href":"/guides/getting-started/prerequisites","docId":"getting-started/prerequisites"},{"type":"category","label":"Agent Setup","items":[{"type":"link","label":"Aries Askar","href":"/guides/getting-started/set-up/aries-askar","docId":"getting-started/set-up/aries-askar"},{"type":"link","label":"AnonCreds","href":"/guides/getting-started/set-up/anoncreds","docId":"getting-started/set-up/anoncreds"},{"type":"link","label":"Indy VDR","href":"/guides/getting-started/set-up/indy-vdr","docId":"getting-started/set-up/indy-vdr"},{"type":"link","label":"cheqd","href":"/guides/getting-started/set-up/cheqd/","docId":"getting-started/set-up/cheqd/index"}],"collapsed":true,"collapsible":true,"href":"/guides/getting-started/set-up/"}],"collapsed":true,"collapsible":true,"href":"/guides/getting-started/"},{"type":"category","label":"Concepts","items":[{"type":"link","label":"Agents","href":"/guides/concepts/agents","docId":"concepts/agents"},{"type":"link","label":"DIDs and DIDComm","href":"/guides/concepts/did-and-didcomm","docId":"concepts/did-and-didcomm"},{"type":"link","label":"Platform and Environment","href":"/guides/concepts/platform-and-environment","docId":"concepts/platform-and-environment"}],"collapsed":true,"collapsible":true,"href":"/guides/concepts/"},{"type":"category","label":"Features","items":[{"type":"link","label":"Hyperledger Aries and Aries Interop Profile","href":"/guides/features/aries","docId":"features/aries"},{"type":"link","label":"OpenID for Verifiable Credentials","href":"/guides/features/openid4vc","docId":"features/openid4vc"},{"type":"link","label":"Decentralized Identifiers","href":"/guides/features/dids","docId":"features/dids"},{"type":"link","label":"Verifiable Credentials","href":"/guides/features/credentials","docId":"features/credentials"}],"collapsed":true,"collapsible":true,"href":"/guides/features/"},{"type":"category","label":"Tutorials","items":[{"type":"category","label":"Agent Config","items":[{"type":"link","label":"Logging","href":"/guides/tutorials/agent-config/logging","docId":"tutorials/agent-config/logging"}],"collapsed":true,"collapsible":true,"href":"/guides/tutorials/agent-config/"},{"type":"link","label":"Create a connection","href":"/guides/tutorials/create-a-connection","docId":"tutorials/create-a-connection"},{"type":"link","label":"Cheqd Did Module","href":"/guides/tutorials/cheqd/","docId":"tutorials/cheqd/index"},{"type":"link","label":"Registering a schema and credential definition on an AnonCreds Registry","href":"/guides/tutorials/registering-schema-and-credential-definition","docId":"tutorials/registering-schema-and-credential-definition"},{"type":"link","label":"Issue a credential","href":"/guides/tutorials/issue-a-credential","docId":"tutorials/issue-a-credential"},{"type":"link","label":"Mediation","href":"/guides/tutorials/mediation","docId":"tutorials/mediation"}],"collapsed":true,"collapsible":true,"href":"/guides/tutorials/"},{"type":"category","label":"Updating","items":[{"type":"link","label":"Update Assistant","href":"/guides/updating/update-assistant","docId":"updating/update-assistant"},{"type":"link","label":"Migrating from an Indy SDK Wallet to Aries Askar","href":"/guides/updating/update-indy-sdk-to-askar","docId":"updating/update-indy-sdk-to-askar"},{"type":"link","label":"Migrating from Credo 0.1.0 to 0.2.x","href":"/guides/updating/versions/0.1-to-0.2","docId":"updating/versions/0.1-to-0.2"},{"type":"link","label":"Migrating from Credo 0.2.x to 0.3.x","href":"/guides/updating/versions/0.2-to-0.3","docId":"updating/versions/0.2-to-0.3"},{"type":"link","label":"Migrating from Credo 0.3.x to 0.4.x","href":"/guides/updating/versions/0.3-to-0.4","docId":"updating/versions/0.3-to-0.4"}],"collapsed":true,"collapsible":true,"href":"/guides/updating/"},{"type":"link","label":"The Credo Ecosystem","href":"/guides/ecosystem/","docId":"ecosystem/index"},{"type":"category","label":"Extensions","items":[{"type":"link","label":"REST API","href":"/guides/extensions/rest","docId":"extensions/rest"},{"type":"link","label":"React Hooks","href":"/guides/extensions/react-hooks","docId":"extensions/react-hooks"},{"type":"link","label":"Redux Store","href":"/guides/extensions/redux-store","docId":"extensions/redux-store"},{"type":"link","label":"Push Notifications","href":"/guides/extensions/push-notifications","docId":"extensions/push-notifications"}],"collapsed":true,"collapsible":true,"href":"/guides/extensions/"}]},"docs":{"concepts/agents":{"id":"concepts/agents","title":"Agents","description":"When working with any Credo implementation, you will interact with an Credo","sidebar":"tutorialSidebar"},"concepts/did-and-didcomm":{"id":"concepts/did-and-didcomm","title":"DIDs and DIDComm","description":"DIDs","sidebar":"tutorialSidebar"},"concepts/index":{"id":"concepts/index","title":"Concepts","description":"In this section we will discuss the general concepts that are used inside the","sidebar":"tutorialSidebar"},"concepts/platform-and-environment":{"id":"concepts/platform-and-environment","title":"Platform and Environment","description":"Credo is developed to support a Node.JS and React Native environment. With this it is entirely possible to build an entire SSI ecosystem with Credo. This would use Node.JS as an issuer as a verifier, and uses React Native as a holder.","sidebar":"tutorialSidebar"},"ecosystem/index":{"id":"ecosystem/index","title":"The Credo Ecosystem","description":"The Credo ecosystem includes various components that are spread across multiple repositories. In this section we\'ll go over what these components are and how the relate to one another.","sidebar":"tutorialSidebar"},"extensions/index":{"id":"extensions/index","title":"Extensions","description":"Credo Extensions is an extensions repository to Credo. It hosts libraries built on top of Credo that don\'t necessarily belong to the core of the project.","sidebar":"tutorialSidebar"},"extensions/push-notifications":{"id":"extensions/push-notifications","title":"Push Notifications","description":"The Push Notifications plugin package provides a way for you to register your APNs and Firebase push notification token at an agent, allowing you to use push notifications directly from Credo.","sidebar":"tutorialSidebar"},"extensions/react-hooks":{"id":"extensions/react-hooks","title":"React Hooks","description":"The React Hooks package exposes useful React hooks that allow you to easily interact with Credo from a React client application.","sidebar":"tutorialSidebar"},"extensions/redux-store":{"id":"extensions/redux-store","title":"Redux Store","description":"The Redux Store is an implementation of state management that can be used to build React & React Native SSI clients using Credo.","sidebar":"tutorialSidebar"},"extensions/rest":{"id":"extensions/rest","title":"REST API","description":"The Credo REST API provides simple RESTful endpoints for Credo methods, to allow you stand up an agent for communication over the internet instantly. You simply provide your agent configuration. The REST endpoints allow you to interact with your agent over HTTP and WebSockets.","sidebar":"tutorialSidebar"},"features/aries":{"id":"features/aries","title":"Hyperledger Aries and Aries Interop Profile","description":"Initially, Credo was built as an Hyperledger Aries framework, focusing on implementing the Aries RFCs and supporting the Aries Interop Profile.","sidebar":"tutorialSidebar"},"features/credentials":{"id":"features/credentials","title":"Verifiable Credentials","description":"One of the main features of Credo is the issuance and verification of Verifiable Credentials.","sidebar":"tutorialSidebar"},"features/dids":{"id":"features/dids","title":"Decentralized Identifiers","description":"Decentralized identifiers are a core components of Credo, and used everywhere in the framework.","sidebar":"tutorialSidebar"},"features/index":{"id":"features/index","title":"Supported Features","description":"This section tries to list all the standards and features that are supported by Credo.","sidebar":"tutorialSidebar"},"features/openid4vc":{"id":"features/openid4vc","title":"OpenID for Verifiable Credentials","description":"Since Credo 0.4, support was added to receive credentials using OpenID for Verifiable Credential Issuance, and since 0.5 support was added for all the other OpenID for Verifiable Credential flows.","sidebar":"tutorialSidebar"},"getting-started/index":{"id":"getting-started/index","title":"Getting started","description":"In this section we will go over everything you need to get started on a technical level. First there are some general prerequisites for Node.JS and React Native. Credo works for creating both server-side applications (commonly but not always for creating issuer and verifier agents) and mobile applications (commonly holder agents).","sidebar":"tutorialSidebar"},"getting-started/prerequisites":{"id":"getting-started/prerequisites","title":"Prerequisites","description":"To work with Credo we need to install some dependencies and set-up our Node.JS environment. Even when creating a mobile app in React Native, we need Node.JS installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!","sidebar":"tutorialSidebar"},"getting-started/set-up/anoncreds":{"id":"getting-started/set-up/anoncreds","title":"AnonCreds","description":"The AnonCreds module provides functionality for issuing and verifying AnonCreds credentials in Credo. The AnonCreds implementation is based on AnonCreds RS, a direct implementation of the AnonCreds V1.0 specification that provides functionality like; creating a schema object, creating a credential definition object, creating a credential, verifying a proof presentation and much more.","sidebar":"tutorialSidebar"},"getting-started/set-up/aries-askar":{"id":"getting-started/set-up/aries-askar","title":"Aries Askar","description":"Aries Askar provides secure, encrypted storage and cryptographic support for encrypting, decrypting, signing and verifying data. It also provides both the Wallet and StorageService implementations for the agent.","sidebar":"tutorialSidebar"},"getting-started/set-up/cheqd/index":{"id":"getting-started/set-up/cheqd/index","title":"cheqd","description":"cheqd is a blockchain network, built in the Cosmos ecosystem for Self-Sovereign Identity (SSI). The cheqd Network leverages the cheqd DID method and enables DID-Linked Resources to be written to the network, associated with a DID and controlled using the verification methods in the DID Document.","sidebar":"tutorialSidebar"},"getting-started/set-up/index":{"id":"getting-started/set-up/index","title":"Agent Setup","description":"This guide assumes you have followed the Prerequisites, and you have a valid","sidebar":"tutorialSidebar"},"getting-started/set-up/indy-vdr":{"id":"getting-started/set-up/indy-vdr","title":"Indy VDR","description":"Hyperledger Indy VDR, Verifiable Data Registry, can be used to connect to one or more Indy Node ledger pools given sets of genesis transactions. Methods are provided to construct ledger requests and send them to the validators, collecting the results and ensuring that there is a consensus between the nodes. In the context of Credo, we mainly leverage it to register, and resolve, schemas, credential definitions and DIDs.","sidebar":"tutorialSidebar"},"index":{"id":"index","title":"Intro","description":"Welcome, to the Credo community!","sidebar":"tutorialSidebar"},"tutorials/agent-config/index":{"id":"tutorials/agent-config/index","title":"Agent Config","description":"The Credo agent is very extensible. These are all the configuration options with a short description:","sidebar":"tutorialSidebar"},"tutorials/agent-config/logging":{"id":"tutorials/agent-config/logging","title":"Logging","description":"Using the Default ConsoleLogger","sidebar":"tutorialSidebar"},"tutorials/cheqd/index":{"id":"tutorials/cheqd/index","title":"Cheqd Did Module","description":"In this tutorial we will see how to use the cheqd modules in detail","sidebar":"tutorialSidebar"},"tutorials/create-a-connection":{"id":"tutorials/create-a-connection","title":"Create a connection","description":"In this tutorial we will create a connection as Acme Corp with Bob. We will","sidebar":"tutorialSidebar"},"tutorials/index":{"id":"tutorials/index","title":"Tutorials","description":"In this section we will explain some features that everyone will use. This","sidebar":"tutorialSidebar"},"tutorials/issue-a-credential":{"id":"tutorials/issue-a-credential","title":"Issue a credential","description":"In this tutorial we will issue a credential from the Issuer to a Holder. We will start with setting up both their agents with the minimal configuration required to follow this tutorial. It is assumed that there is a connection between the Issuer and the Holder and the Issuer also has a registered schema and credential definition. After initializing the Issuer will send a credential to the holder, and will then accept this credential and automatically store it in their wallet.","sidebar":"tutorialSidebar"},"tutorials/mediation":{"id":"tutorials/mediation","title":"Mediation","description":"This section assumes that you have:","sidebar":"tutorialSidebar"},"tutorials/registering-schema-and-credential-definition":{"id":"tutorials/registering-schema-and-credential-definition","title":"Registering a schema and credential definition on an AnonCreds Registry","description":"In this tutorial we will register a schema and credential definition on an AnonCredsRegistry e.g. Hyperledger Indy ledger indy-vdr, cheqd.","sidebar":"tutorialSidebar"},"updating/index":{"id":"updating/index","title":"Updating Credo","description":"This section will cover everything you need to know about updating Credo to a newer version.","sidebar":"tutorialSidebar"},"updating/update-assistant":{"id":"updating/update-assistant","title":"Update Assistant","description":"The Update Assistant helps you update the storage objects from Credo to newer versions. This documents describes the different ways you can leverage the Update Assistant from fully managed to more manual approaches.","sidebar":"tutorialSidebar"},"updating/update-indy-sdk-to-askar":{"id":"updating/update-indy-sdk-to-askar","title":"Migrating from an Indy SDK Wallet to Aries Askar","description":"This documentation explains the process of migrating your Indy SDK wallet to Aries Askar.","sidebar":"tutorialSidebar"},"updating/versions/0.1-to-0.2":{"id":"updating/versions/0.1-to-0.2","title":"Migrating from Credo 0.1.0 to 0.2.x","description":"This document describes everything you need to know for updating Credo 0.1.0 to 0.2.x. If you\'re not aware of how updating in Credo works make sure to first read the guide on Updating Credo.","sidebar":"tutorialSidebar"},"updating/versions/0.2-to-0.3":{"id":"updating/versions/0.2-to-0.3","title":"Migrating from Credo 0.2.x to 0.3.x","description":"This document describes everything you need to know for updating Credo 0.2.x to 0.3.x. If you\'re not aware of how updating in Credo works make sure to first read the guide on Updating Credo.","sidebar":"tutorialSidebar"},"updating/versions/0.3-to-0.4":{"id":"updating/versions/0.3-to-0.4","title":"Migrating from Credo 0.3.x to 0.4.x","description":"This document describes everything you need to know for updating Credo 0.3.x to 0.4.x. If you\'re not aware of how updating in Credo works make sure to first read the guide on Updating Credo.","sidebar":"tutorialSidebar"},"updating/versions/0.4-to-0.5":{"id":"updating/versions/0.4-to-0.5","title":"Migrating from Credo 0.4.x to 0.5.x","description":"This document describes everything you need to know for updating Credo 0.4.x to 0.5.x. If you\'re not aware of how updating in Credo works make sure to first read the guide on Updating Credo, and the Update Assistant. Starting from Credo 0.5, we now support migration of tenant storage in addition to the root wallet. If you\'re using the tenants module, make sure to read the guides carefully."}}}')}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.7abc293f.js b/assets/js/935f2afb.7abc293f.js new file mode 100644 index 0000000..b9140ae --- /dev/null +++ b/assets/js/935f2afb.7abc293f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"v0.5.x","banner":null,"badge":true,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Intro","href":"/guides/","docId":"index"},{"type":"category","label":"Getting started","items":[{"type":"link","label":"Prerequisites","href":"/guides/getting-started/prerequisites","docId":"getting-started/prerequisites"},{"type":"category","label":"Agent Setup","items":[{"type":"link","label":"Aries Askar","href":"/guides/getting-started/set-up/aries-askar","docId":"getting-started/set-up/aries-askar"},{"type":"link","label":"AnonCreds","href":"/guides/getting-started/set-up/anoncreds","docId":"getting-started/set-up/anoncreds"},{"type":"link","label":"Indy VDR","href":"/guides/getting-started/set-up/indy-vdr","docId":"getting-started/set-up/indy-vdr"},{"type":"link","label":"cheqd","href":"/guides/getting-started/set-up/cheqd/","docId":"getting-started/set-up/cheqd/index"},{"type":"link","label":"OpenID for Verifiable Credentials","href":"/guides/getting-started/set-up/openid4vc","docId":"getting-started/set-up/openid4vc"}],"collapsed":true,"collapsible":true,"href":"/guides/getting-started/set-up/"}],"collapsed":true,"collapsible":true,"href":"/guides/getting-started/"},{"type":"category","label":"Concepts","items":[{"type":"link","label":"Agents","href":"/guides/concepts/agents","docId":"concepts/agents"},{"type":"link","label":"DIDs and DIDComm","href":"/guides/concepts/did-and-didcomm","docId":"concepts/did-and-didcomm"},{"type":"link","label":"Platform and Environment","href":"/guides/concepts/platform-and-environment","docId":"concepts/platform-and-environment"}],"collapsed":true,"collapsible":true,"href":"/guides/concepts/"},{"type":"category","label":"Features","items":[{"type":"link","label":"Hyperledger Aries and Aries Interop Profile","href":"/guides/features/aries","docId":"features/aries"},{"type":"link","label":"OpenID for Verifiable Credentials","href":"/guides/features/openid4vc","docId":"features/openid4vc"},{"type":"link","label":"Decentralized Identifiers","href":"/guides/features/dids","docId":"features/dids"},{"type":"link","label":"Verifiable Credentials","href":"/guides/features/credentials","docId":"features/credentials"}],"collapsed":true,"collapsible":true,"href":"/guides/features/"},{"type":"category","label":"Tutorials","items":[{"type":"category","label":"Agent Config","items":[{"type":"link","label":"Logging","href":"/guides/tutorials/agent-config/logging","docId":"tutorials/agent-config/logging"}],"collapsed":true,"collapsible":true,"href":"/guides/tutorials/agent-config/"},{"type":"link","label":"Create a connection","href":"/guides/tutorials/create-a-connection","docId":"tutorials/create-a-connection"},{"type":"link","label":"Cheqd Did Module","href":"/guides/tutorials/cheqd/","docId":"tutorials/cheqd/index"},{"type":"link","label":"Registering a schema and credential definition on an AnonCreds Registry","href":"/guides/tutorials/registering-schema-and-credential-definition","docId":"tutorials/registering-schema-and-credential-definition"},{"type":"link","label":"Issue an AnonCreds credential over DIDComm","href":"/guides/tutorials/issue-an-anoncreds-credential-over-didcomm","docId":"tutorials/issue-an-anoncreds-credential-over-didcomm"},{"type":"link","label":"Mediation","href":"/guides/tutorials/mediation","docId":"tutorials/mediation"},{"type":"category","label":"OpenID for Verifiable Credentials","items":[{"type":"link","label":"Issuing Credentials using the OpenID4VC Issuer Module","href":"/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module","docId":"tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module"},{"type":"link","label":"Receiving and Proving Credentials using the OpenID4VC Holder Module","href":"/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module","docId":"tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module"},{"type":"link","label":"Verifying Credentials using the OpenID4VC Verifier Module","href":"/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module","docId":"tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module"}],"collapsed":true,"collapsible":true,"href":"/guides/tutorials/openid4vc/"}],"collapsed":true,"collapsible":true,"href":"/guides/tutorials/"},{"type":"category","label":"Updating","items":[{"type":"link","label":"Update Assistant","href":"/guides/updating/update-assistant","docId":"updating/update-assistant"},{"type":"link","label":"Migrating from an Indy SDK Wallet to Aries Askar","href":"/guides/updating/update-indy-sdk-to-askar","docId":"updating/update-indy-sdk-to-askar"},{"type":"link","label":"Migrating from Credo 0.1.0 to 0.2.x","href":"/guides/updating/versions/0.1-to-0.2","docId":"updating/versions/0.1-to-0.2"},{"type":"link","label":"Migrating from Credo 0.2.x to 0.3.x","href":"/guides/updating/versions/0.2-to-0.3","docId":"updating/versions/0.2-to-0.3"},{"type":"link","label":"Migrating from Credo 0.3.x to 0.4.x","href":"/guides/updating/versions/0.3-to-0.4","docId":"updating/versions/0.3-to-0.4"},{"type":"link","label":"Migrating from Credo 0.4.x to 0.5.x","href":"/guides/updating/versions/0.4-to-0.5","docId":"updating/versions/0.4-to-0.5"}],"collapsed":true,"collapsible":true,"href":"/guides/updating/"},{"type":"link","label":"The Credo Ecosystem","href":"/guides/ecosystem/","docId":"ecosystem/index"},{"type":"category","label":"Extensions","items":[{"type":"link","label":"REST API","href":"/guides/extensions/rest","docId":"extensions/rest"},{"type":"link","label":"React Hooks","href":"/guides/extensions/react-hooks","docId":"extensions/react-hooks"},{"type":"link","label":"Redux Store","href":"/guides/extensions/redux-store","docId":"extensions/redux-store"},{"type":"link","label":"Push Notifications","href":"/guides/extensions/push-notifications","docId":"extensions/push-notifications"}],"collapsed":true,"collapsible":true,"href":"/guides/extensions/"}]},"docs":{"concepts/agents":{"id":"concepts/agents","title":"Agents","description":"When working with any Credo implementation, you will interact with an Credo","sidebar":"tutorialSidebar"},"concepts/did-and-didcomm":{"id":"concepts/did-and-didcomm","title":"DIDs and DIDComm","description":"DIDs","sidebar":"tutorialSidebar"},"concepts/index":{"id":"concepts/index","title":"Concepts","description":"In this section we will discuss the general concepts that are used inside the","sidebar":"tutorialSidebar"},"concepts/platform-and-environment":{"id":"concepts/platform-and-environment","title":"Platform and Environment","description":"Credo is developed to support a Node.js and React Native environment. With this it is entirely possible to build an entire SSI ecosystem with Credo. This would use Node.js as an issuer as a verifier, and uses React Native as a holder.","sidebar":"tutorialSidebar"},"ecosystem/index":{"id":"ecosystem/index","title":"The Credo Ecosystem","description":"The Credo ecosystem includes various components that are spread across multiple repositories. In this section we\'ll go over what these components are and how the relate to one another.","sidebar":"tutorialSidebar"},"extensions/index":{"id":"extensions/index","title":"Extensions","description":"Credo Extensions is an extensions repository to Credo. It hosts libraries built on top of Credo that don\'t necessarily belong to the core of the project.","sidebar":"tutorialSidebar"},"extensions/push-notifications":{"id":"extensions/push-notifications","title":"Push Notifications","description":"The Push Notifications plugin package provides a way for you to register your APNs and Firebase push notification token at an agent, allowing you to use push notifications directly from Credo.","sidebar":"tutorialSidebar"},"extensions/react-hooks":{"id":"extensions/react-hooks","title":"React Hooks","description":"The React Hooks package exposes useful React hooks that allow you to easily interact with Credo from a React client application.","sidebar":"tutorialSidebar"},"extensions/redux-store":{"id":"extensions/redux-store","title":"Redux Store","description":"The Redux Store is an implementation of state management that can be used to build React & React Native SSI clients using Credo.","sidebar":"tutorialSidebar"},"extensions/rest":{"id":"extensions/rest","title":"REST API","description":"The Credo REST API provides simple RESTful endpoints for Credo methods, to allow you stand up an agent for communication over the internet instantly. You simply provide your agent configuration. The REST endpoints allow you to interact with your agent over HTTP and WebSockets.","sidebar":"tutorialSidebar"},"features/aries":{"id":"features/aries","title":"Hyperledger Aries and Aries Interop Profile","description":"Initially, Credo was built as an Hyperledger Aries framework, focusing on implementing the Aries RFCs and supporting the Aries Interop Profile.","sidebar":"tutorialSidebar"},"features/credentials":{"id":"features/credentials","title":"Verifiable Credentials","description":"One of the main features of Credo is the issuance and verification of Verifiable Credentials.","sidebar":"tutorialSidebar"},"features/dids":{"id":"features/dids","title":"Decentralized Identifiers","description":"Decentralized identifiers are a core components of Credo, and used everywhere in the framework.","sidebar":"tutorialSidebar"},"features/index":{"id":"features/index","title":"Supported Features","description":"This section tries to list all the standards and features that are supported by Credo.","sidebar":"tutorialSidebar"},"features/openid4vc":{"id":"features/openid4vc","title":"OpenID for Verifiable Credentials","description":"Since Credo 0.4, support was added to receive credentials using OpenID for Verifiable Credential Issuance, and since 0.5 support was added for all the other OpenID for Verifiable Credential flows.","sidebar":"tutorialSidebar"},"getting-started/index":{"id":"getting-started/index","title":"Getting started","description":"In this section we will go over everything you need to get started on a technical level. First there are some general prerequisites for Node.js and React Native. Credo works for creating both server-side applications (commonly but not always for creating issuer and verifier agents) and mobile applications (commonly holder agents).","sidebar":"tutorialSidebar"},"getting-started/prerequisites":{"id":"getting-started/prerequisites","title":"Prerequisites","description":"To work with Credo we need to install some dependencies and set-up our Node.js environment. Even when creating a mobile app in React Native, we need Node.js installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!","sidebar":"tutorialSidebar"},"getting-started/set-up/anoncreds":{"id":"getting-started/set-up/anoncreds","title":"AnonCreds","description":"The AnonCreds module provides functionality for issuing and verifying AnonCreds credentials in Credo. The AnonCreds implementation is based on AnonCreds RS, a direct implementation of the AnonCreds V1.0 specification that provides functionality like; creating a schema object, creating a credential definition object, creating a credential, verifying a proof presentation and much more.","sidebar":"tutorialSidebar"},"getting-started/set-up/aries-askar":{"id":"getting-started/set-up/aries-askar","title":"Aries Askar","description":"Aries Askar provides secure, encrypted storage and cryptographic support for encrypting, decrypting, signing and verifying data. It also provides both the Wallet and StorageService implementations for the agent.","sidebar":"tutorialSidebar"},"getting-started/set-up/cheqd/index":{"id":"getting-started/set-up/cheqd/index","title":"cheqd","description":"cheqd is a blockchain network, built in the Cosmos ecosystem for Self-Sovereign Identity (SSI). The cheqd Network leverages the cheqd DID method and enables DID-Linked Resources to be written to the network, associated with a DID and controlled using the verification methods in the DID Document.","sidebar":"tutorialSidebar"},"getting-started/set-up/index":{"id":"getting-started/set-up/index","title":"Agent Setup","description":"This guide assumes you have followed the Prerequisites, and you have a valid","sidebar":"tutorialSidebar"},"getting-started/set-up/indy-vdr":{"id":"getting-started/set-up/indy-vdr","title":"Indy VDR","description":"Hyperledger Indy VDR, Verifiable Data Registry, can be used to connect to one or more Indy Node ledger pools given sets of genesis transactions. Methods are provided to construct ledger requests and send them to the validators, collecting the results and ensuring that there is a consensus between the nodes. In the context of Credo, we mainly leverage it to register, and resolve, schemas, credential definitions and DIDs.","sidebar":"tutorialSidebar"},"getting-started/set-up/openid4vc":{"id":"getting-started/set-up/openid4vc","title":"OpenID for Verifiable Credentials","description":"The OpenID4VC module provides support for the OpenID for Verifiable Credentials group of protocols defined under the OpenID Foundation. Currently this includes the OpenID for Verifiable Credential Issuance, Self-Issued OpenID Provider v2, and OpenID for Verifiable Presentations.","sidebar":"tutorialSidebar"},"index":{"id":"index","title":"Intro","description":"Welcome, to the Credo community!","sidebar":"tutorialSidebar"},"tutorials/agent-config/index":{"id":"tutorials/agent-config/index","title":"Agent Config","description":"The Credo agent is very extensible. These are all the configuration options with a short description:","sidebar":"tutorialSidebar"},"tutorials/agent-config/logging":{"id":"tutorials/agent-config/logging","title":"Logging","description":"Using the Default ConsoleLogger","sidebar":"tutorialSidebar"},"tutorials/cheqd/index":{"id":"tutorials/cheqd/index","title":"Cheqd Did Module","description":"In this tutorial we will see how to use the cheqd modules in detail","sidebar":"tutorialSidebar"},"tutorials/create-a-connection":{"id":"tutorials/create-a-connection","title":"Create a connection","description":"In this tutorial we will create a connection as Acme Corp with Bob. We will","sidebar":"tutorialSidebar"},"tutorials/index":{"id":"tutorials/index","title":"Tutorials","description":"In this section we will explain some features that everyone will use. This","sidebar":"tutorialSidebar"},"tutorials/issue-an-anoncreds-credential-over-didcomm":{"id":"tutorials/issue-an-anoncreds-credential-over-didcomm","title":"Issue an AnonCreds credential over DIDComm","description":"In this tutorial we will issue an AnonCreds credential from the Issuer to a Holder over DIDComm. We will start with setting up both their agents with the minimal configuration required to follow this tutorial. It is assumed that there is a connection between the Issuer and the Holder and the Issuer also has a registered schema and credential definition. After initializing the Issuer will send a credential to the holder, and will then accept this credential and automatically store it in their wallet.","sidebar":"tutorialSidebar"},"tutorials/mediation":{"id":"tutorials/mediation","title":"Mediation","description":"This section assumes that you have:","sidebar":"tutorialSidebar"},"tutorials/openid4vc/index":{"id":"tutorials/openid4vc/index","title":"OpenID for Verifiable Credentials Tutorials","description":"This section covers all tutorials related to the OpenID for Verifiable Credentials module in Credo. Before you start, make sure you have configured the required OpenID4VC modules on your agent according to the OpenID4VC Setup Guide","sidebar":"tutorialSidebar"},"tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module":{"id":"tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module","title":"Issuing Credentials using the OpenID4VC Issuer Module","description":"This tutorial will guide you through the process of issuing credentials using the OpenID4VC Issuer Module. Before starting this tutorial, make sure you have completed the OpenID4VC Issuer Module Setup.","sidebar":"tutorialSidebar"},"tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module":{"id":"tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module","title":"Receiving and Proving Credentials using the OpenID4VC Holder Module","description":"This tutorial will guide you through the process of receiving and proving credentials using the OpenID4VC Holder Module. Before starting this tutorial, make sure you have completed the OpenID4VC Holder Module Setup.","sidebar":"tutorialSidebar"},"tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module":{"id":"tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module","title":"Verifying Credentials using the OpenID4VC Verifier Module","description":"This tutorial will guide you through the process of verifying credentials using the OpenID4VC Verifier Module. Before starting this tutorial, make sure you have completed the OpenID4VC Verifier Module Setup.","sidebar":"tutorialSidebar"},"tutorials/registering-schema-and-credential-definition":{"id":"tutorials/registering-schema-and-credential-definition","title":"Registering a schema and credential definition on an AnonCreds Registry","description":"In this tutorial we will register a schema and credential definition on an AnonCredsRegistry e.g. Hyperledger Indy ledger indy-vdr, cheqd.","sidebar":"tutorialSidebar"},"updating/index":{"id":"updating/index","title":"Updating Credo","description":"This section will cover everything you need to know about updating Credo to a newer version.","sidebar":"tutorialSidebar"},"updating/update-assistant":{"id":"updating/update-assistant","title":"Update Assistant","description":"The Update Assistant helps you update the storage objects from Credo to newer versions. This documents describes the different ways you can leverage the Update Assistant from fully managed to more manual approaches.","sidebar":"tutorialSidebar"},"updating/update-indy-sdk-to-askar":{"id":"updating/update-indy-sdk-to-askar","title":"Migrating from an Indy SDK Wallet to Aries Askar","description":"This documentation explains the process of migrating your Indy SDK wallet to Aries Askar.","sidebar":"tutorialSidebar"},"updating/versions/0.1-to-0.2":{"id":"updating/versions/0.1-to-0.2","title":"Migrating from Credo 0.1.0 to 0.2.x","description":"This document describes everything you need to know for updating Credo 0.1.0 to 0.2.x. If you\'re not aware of how updating in Credo works make sure to first read the guide on Updating Credo.","sidebar":"tutorialSidebar"},"updating/versions/0.2-to-0.3":{"id":"updating/versions/0.2-to-0.3","title":"Migrating from Credo 0.2.x to 0.3.x","description":"This document describes everything you need to know for updating Credo 0.2.x to 0.3.x. If you\'re not aware of how updating in Credo works make sure to first read the guide on Updating Credo.","sidebar":"tutorialSidebar"},"updating/versions/0.3-to-0.4":{"id":"updating/versions/0.3-to-0.4","title":"Migrating from Credo 0.3.x to 0.4.x","description":"This document describes everything you need to know for updating Credo 0.3.x to 0.4.x. If you\'re not aware of how updating in Credo works make sure to first read the guide on Updating Credo.","sidebar":"tutorialSidebar"},"updating/versions/0.4-to-0.5":{"id":"updating/versions/0.4-to-0.5","title":"Migrating from Credo 0.4.x to 0.5.x","description":"This document describes everything you need to know for updating Credo 0.4.x to 0.5.x. If you\'re not aware of how updating in Credo works make sure to first read the guide on Updating Credo, and the Update Assistant. Starting from Credo 0.5, we now support migration of tenant storage in addition to the root wallet. If you\'re using the tenants module, make sure to read the guides carefully.","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/996925d9.db810519.js b/assets/js/996925d9.bfec5505.js similarity index 79% rename from assets/js/996925d9.db810519.js rename to assets/js/996925d9.bfec5505.js index 5497026..898644a 100644 --- a/assets/js/996925d9.db810519.js +++ b/assets/js/996925d9.bfec5505.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[3901],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),m=a,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),o=n(86010),l=n(12466),i=n(16550),s=n(91980),u=n(67392),c=n(50012);function p(e){return function(e){return a.Children.map(e,(e=>{if((0,a.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function d(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=d(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[s,u]=f({queryString:n,groupId:r}),[p,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),b=(()=>{const e=s??p;return m({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),h(e)}),[u,h,o]),tabValues:o}}var b=n(72389);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function g(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(p(t),s(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},l,{className:(0,o.Z)("tabs__item",v.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:r}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function y(e){const t=h(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",v.tabList)},a.createElement(g,(0,r.Z)({},e,t)),a.createElement(k,(0,r.Z)({},e,t)))}function w(e){const t=(0,b.Z)();return a.createElement(y,(0,r.Z)({key:String(t)},e))}},1089:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>f,frontMatter:()=>i,metadata:()=>u,toc:()=>p});var r=n(87462),a=(n(67294),n(3905)),o=n(74866),l=n(85162);const i={},s="Prerequisites",u={unversionedId:"getting-started/prerequisites",id:"getting-started/prerequisites",title:"Prerequisites",description:"To work with Credo we need to install some dependencies and set-up our Node.JS environment. Even when creating a mobile app in React Native, we need Node.JS installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!",source:"@site/guides/getting-started/prerequisites.md",sourceDirName:"getting-started",slug:"/getting-started/prerequisites",permalink:"/guides/getting-started/prerequisites",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Getting started",permalink:"/guides/getting-started/"},next:{title:"Agent Setup",permalink:"/guides/getting-started/set-up/"}},c={},p=[{value:"Node.JS",id:"nodejs",level:3},{value:"Windows",id:"windows",level:4},{value:"macOS",id:"macos",level:4},{value:"Linux",id:"linux",level:4},{value:"Arch Linux",id:"arch-linux",level:5},{value:"Debian",id:"debian",level:5},{value:"Red Hat",id:"red-hat",level:5},{value:"NPM",id:"npm",level:3},{value:"Yarn",id:"yarn",level:3},{value:"Project Setup",id:"project-setup",level:3}],d={toc:p},m="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"To work with ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"Credo")," we need to install some dependencies and set-up our Node.JS environment. Even when creating a mobile app in React Native, we need Node.JS installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!"),(0,a.kt)("p",null,"The specific items that we set-up:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://nodejs.org"},"Node.JS")," - v16 or v18"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://classic.yarnpkg.com/lang/en/docs/install"},"yarn")," or ",(0,a.kt)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npm")),(0,a.kt)("li",{parentName:"ul"},"Node.JS or React Native project.")),(0,a.kt)("h3",{id:"nodejs"},"Node.JS"),(0,a.kt)("p",null,"NodeJS is the most popular JavaScript runtime environment excluding browsers. It can run on your desktop or even a server."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(l.Z,{label:"Windows",value:"tab1",mdxType:"TabItem"},(0,a.kt)("p",null,"You can download it from the ",(0,a.kt)("a",{parentName:"p",href:"https://nodejs.org/en/download/"},"Node.JS Website"))),(0,a.kt)(l.Z,{label:"macOS",value:"tab2",mdxType:"TabItem"},(0,a.kt)("p",null,"Make sure you have ",(0,a.kt)("a",{parentName:"p",href:"https://brew.sh/"},"Homebrew")," installed. If not you can install it with the following command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"\n')),(0,a.kt)("p",null,"Then install Node.JS with the following command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"brew install nodejs\n")),(0,a.kt)("p",null,"Alternatively, you can download it from the ",(0,a.kt)("a",{parentName:"p",href:"https://nodejs.org/en/download/"},"Node.JS Website"))),(0,a.kt)(l.Z,{label:"Linux",value:"tab3",mdxType:"TabItem"},(0,a.kt)("p",null,"Either follow one of the specific steps for installing Node.JS on linux below, or you can download it directly from the ",(0,a.kt)("a",{parentName:"p",href:"https://nodejs.org/en/download/"},"Node.JS Website")),(0,a.kt)("h5",{id:"arch-linux"},"Arch Linux"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"pacman -S nodejs npm\n")),(0,a.kt)("h5",{id:"debian"},"Debian"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"curl -fsSL https://deb.nodesource.com/setup_18.x | bash -\napt-get install -y nodejs\n")),(0,a.kt)("h5",{id:"red-hat"},"Red Hat"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"curl -sL https://rpm.nodesource.com/setup_18.x | bash -\nyum install nodejs\n")))),(0,a.kt)("h3",{id:"npm"},"NPM"),(0,a.kt)("p",null,"The Node Package Manager comes pre-bundled with the NodeJS installation from above."),(0,a.kt)("h3",{id:"yarn"},"Yarn"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Only required when not using npm")),(0,a.kt)("p",null,"For every platform, the installation of yarn is the same."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"npm install --global yarn\n")),(0,a.kt)("h3",{id:"project-setup"},"Project Setup"),(0,a.kt)("p",null,"Finally, you need to make sure you have a project set-up using Node.JS or React Native. If you're not familiar with setting up a project, we suggest following the ",(0,a.kt)("a",{parentName:"p",href:"https://nodejs.dev/en/learn/"},"Introduction to Node.JS")," or ",(0,a.kt)("a",{parentName:"p",href:"https://reactnative.dev/docs/environment-setup"},"React Native Quickstart")," guides."))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[3901],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(n),m=a,f=p["".concat(i,".").concat(m)]||p[m]||d[m]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:a,l[1]=s;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),o=n(86010),l=n(12466),s=n(16550),i=n(91980),u=n(67392),c=n(50012);function p(e){return function(e){return a.Children.map(e,(e=>{if((0,a.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function d(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,s.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=d(e),[l,s]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[i,u]=f({queryString:n,groupId:r}),[p,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),b=(()=>{const e=i??p;return m({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{b&&s(b)}),[b]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),h(e)}),[u,h,o]),tabValues:o}}var b=n(72389);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function g(e){let{className:t,block:n,selectedValue:s,selectValue:i,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==s&&(p(t),i(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},l,{className:(0,o.Z)("tabs__item",v.tabItem,l?.className,{"tabs__item--active":s===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:r}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function y(e){const t=h(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",v.tabList)},a.createElement(g,(0,r.Z)({},e,t)),a.createElement(k,(0,r.Z)({},e,t)))}function w(e){const t=(0,b.Z)();return a.createElement(y,(0,r.Z)({key:String(t)},e))}},1089:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>f,frontMatter:()=>s,metadata:()=>u,toc:()=>p});var r=n(87462),a=(n(67294),n(3905)),o=n(74866),l=n(85162);const s={},i="Prerequisites",u={unversionedId:"getting-started/prerequisites",id:"getting-started/prerequisites",title:"Prerequisites",description:"To work with Credo we need to install some dependencies and set-up our Node.js environment. Even when creating a mobile app in React Native, we need Node.js installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!",source:"@site/guides/getting-started/prerequisites.md",sourceDirName:"getting-started",slug:"/getting-started/prerequisites",permalink:"/guides/getting-started/prerequisites",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Getting started",permalink:"/guides/getting-started/"},next:{title:"Agent Setup",permalink:"/guides/getting-started/set-up/"}},c={},p=[{value:"Node.js",id:"nodejs",level:3},{value:"Windows",id:"windows",level:4},{value:"macOS",id:"macos",level:4},{value:"Linux",id:"linux",level:4},{value:"Arch Linux",id:"arch-linux",level:5},{value:"Debian",id:"debian",level:5},{value:"Red Hat",id:"red-hat",level:5},{value:"NPM",id:"npm",level:3},{value:"Yarn",id:"yarn",level:3},{value:"Project Setup",id:"project-setup",level:3}],d={toc:p},m="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"To work with ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"Credo")," we need to install some dependencies and set-up our Node.js environment. Even when creating a mobile app in React Native, we need Node.js installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!"),(0,a.kt)("p",null,"The specific items that we set-up:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://nodejs.org"},"Node.js")," - v16 or v18"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://classic.yarnpkg.com/lang/en/docs/install"},"yarn")," or ",(0,a.kt)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npm")),(0,a.kt)("li",{parentName:"ul"},"Node.js or React Native project.")),(0,a.kt)("h3",{id:"nodejs"},"Node.js"),(0,a.kt)("p",null,"NodeJS is the most popular JavaScript runtime environment excluding browsers. It can run on your desktop or even a server."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(l.Z,{label:"Windows",value:"tab1",mdxType:"TabItem"},(0,a.kt)("p",null,"You can download it from the ",(0,a.kt)("a",{parentName:"p",href:"https://nodejs.org/en/download/"},"Node.js Website"))),(0,a.kt)(l.Z,{label:"macOS",value:"tab2",mdxType:"TabItem"},(0,a.kt)("p",null,"Make sure you have ",(0,a.kt)("a",{parentName:"p",href:"https://brew.sh/"},"Homebrew")," installed. If not you can install it with the following command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"\n')),(0,a.kt)("p",null,"Then install Node.js with the following command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"brew install nodejs\n")),(0,a.kt)("p",null,"Alternatively, you can download it from the ",(0,a.kt)("a",{parentName:"p",href:"https://nodejs.org/en/download/"},"Node.js Website"))),(0,a.kt)(l.Z,{label:"Linux",value:"tab3",mdxType:"TabItem"},(0,a.kt)("p",null,"Either follow one of the specific steps for installing Node.js on linux below, or you can download it directly from the ",(0,a.kt)("a",{parentName:"p",href:"https://nodejs.org/en/download/"},"Node.js Website")),(0,a.kt)("h5",{id:"arch-linux"},"Arch Linux"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"pacman -S nodejs npm\n")),(0,a.kt)("h5",{id:"debian"},"Debian"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"curl -fsSL https://deb.nodesource.com/setup_18.x | bash -\napt-get install -y nodejs\n")),(0,a.kt)("h5",{id:"red-hat"},"Red Hat"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"curl -sL https://rpm.nodesource.com/setup_18.x | bash -\nyum install nodejs\n")))),(0,a.kt)("h3",{id:"npm"},"NPM"),(0,a.kt)("p",null,"The Node Package Manager comes pre-bundled with the NodeJS installation from above."),(0,a.kt)("h3",{id:"yarn"},"Yarn"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Only required when not using npm")),(0,a.kt)("p",null,"For every platform, the installation of yarn is the same."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"npm install --global yarn\n")),(0,a.kt)("h3",{id:"project-setup"},"Project Setup"),(0,a.kt)("p",null,"Finally, you need to make sure you have a project set-up using Node.js or React Native. If you're not familiar with setting up a project, we suggest following the ",(0,a.kt)("a",{parentName:"p",href:"https://nodejs.dev/en/learn/"},"Introduction to Node.js")," or ",(0,a.kt)("a",{parentName:"p",href:"https://reactnative.dev/docs/environment-setup"},"React Native Quickstart")," guides."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9d3b2a0c.e262e139.js b/assets/js/9d3b2a0c.e262e139.js new file mode 100644 index 0000000..0936dfc --- /dev/null +++ b/assets/js/9d3b2a0c.e262e139.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[526],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>v});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},d=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=u(n),g=i,v=c["".concat(l,".").concat(g)]||c[g]||p[g]||o;return n?r.createElement(v,a(a({ref:t},d),{},{components:n})):r.createElement(v,a({ref:t},d))}));function v(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:i,a[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var r=n(87462),i=(n(67294),n(3905));const o={},a="Receiving and Proving Credentials using the OpenID4VC Holder Module",s={unversionedId:"tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module",id:"tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module",title:"Receiving and Proving Credentials using the OpenID4VC Holder Module",description:"This tutorial will guide you through the process of receiving and proving credentials using the OpenID4VC Holder Module. Before starting this tutorial, make sure you have completed the OpenID4VC Holder Module Setup.",source:"@site/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module.md",sourceDirName:"tutorials/openid4vc",slug:"/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module",permalink:"/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Issuing Credentials using the OpenID4VC Issuer Module",permalink:"/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module"},next:{title:"Verifying Credentials using the OpenID4VC Verifier Module",permalink:"/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module"}},l={},u=[{value:"Resolving and accepting a credential offer",id:"resolving-and-accepting-a-credential-offer",level:2},{value:"Resolving and accepting an authorization request (presentation request)",id:"resolving-and-accepting-an-authorization-request-presentation-request",level:2}],d={toc:u},c="wrapper";function p(e){let{components:t,...n}=e;return(0,i.kt)(c,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"receiving-and-proving-credentials-using-the-openid4vc-holder-module"},"Receiving and Proving Credentials using the OpenID4VC Holder Module"),(0,i.kt)("p",null,"This tutorial will guide you through the process of receiving and proving credentials using the OpenID4VC Holder Module. Before starting this tutorial, make sure you have completed the ",(0,i.kt)("a",{parentName:"p",href:"/guides/getting-started/set-up/openid4vc"},"OpenID4VC Holder Module Setup"),"."),(0,i.kt)("p",null,"This guides only covers the receiving and proving of credentials using the OpenID4VC Holder Module. Follow the ",(0,i.kt)("a",{parentName:"p",href:"/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module"},"Issuing Credentials using the OpenID4VC Issuer Module")," and ",(0,i.kt)("a",{parentName:"p",href:"/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module"},"Verifying Credentials using the OpenID4VC Verifier Module")," guides to learn how to issue and verify credentials using the OpenID4VC Issuer and Verifier Modules."),(0,i.kt)("h2",{id:"resolving-and-accepting-a-credential-offer"},"Resolving and accepting a credential offer"),(0,i.kt)("p",null,"Once you have set-up your agent (under ",(0,i.kt)("inlineCode",{parentName:"p"},"holder")," variable), and have a credential offer (either created using the issuer module, or an external OpenID4VC issuer), we can resolve and accept the credential offer."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"credentialBindingResolver")," is a method you need to provide that configures how the credential should be bound to the wallet. The implemented binding resolver in this tutorial first checks if the issuer supports ",(0,i.kt)("inlineCode",{parentName:"p"},"did:key")," and will use that. Otherwise it will check if jwk is supported."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers sd-jwt-vc-openid4vc.ts section-6",showLineNumbers:!0,"sd-jwt-vc-openid4vc.ts":!0,"section-6":!0},"")),(0,i.kt)("p",null,"Finally the credentials are stored using the SD JWT VC and W3C modules. In a wallet application you could choose to first show the credential to the user before storing it in the wallet."),(0,i.kt)("h2",{id:"resolving-and-accepting-an-authorization-request-presentation-request"},"Resolving and accepting an authorization request (presentation request)"),(0,i.kt)("p",null,"Once you have a credential in your wallet, you can start presenting it based on a receive authorization request including an OpenID4VP presentation request (either created using the verifier module, or an external OpenID4VC verifier). First we resolve the authorization request, and then we accept it and present the credential in our wallet."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers sd-jwt-vc-openid4vc.ts section-9",showLineNumbers:!0,"sd-jwt-vc-openid4vc.ts":!0,"section-9":!0},"")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/bd5be9ae.1b4792bb.js b/assets/js/bd5be9ae.1b4792bb.js deleted file mode 100644 index 479ac48..0000000 --- a/assets/js/bd5be9ae.1b4792bb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[1993],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(n),m=r,h=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return n?a.createElement(h,o(o({ref:t},c),{},{components:n})):a.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var u=2;u{n.d(t,{Z:()=>o});var a=n(67294),r=n(86010);const i={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,o),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(87462),r=n(67294),i=n(86010),o=n(12466),s=n(16550),l=n(91980),u=n(67392),c=n(50012);function d(e){return function(e){return r.Children.map(e,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function p(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=p(e),[o,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[l,u]=h({queryString:n,groupId:a}),[d,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),g=(()=>{const e=l??d;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{g&&s(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),f(e)}),[u,f,i]),tabValues:i}}var g=n(72389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:s,selectValue:l,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),a=u[n].value;a!==s&&(d(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},o,{className:(0,i.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":s===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b.tabList)},r.createElement(k,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,g.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},42347:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>u,toc:()=>d});var a=n(87462),r=(n(67294),n(3905)),i=n(74866),o=n(85162);const s={},l="Issue a credential",u={unversionedId:"tutorials/issue-a-credential",id:"tutorials/issue-a-credential",title:"Issue a credential",description:"In this tutorial we will issue a credential from the Issuer to a Holder. We will start with setting up both their agents with the minimal configuration required to follow this tutorial. It is assumed that there is a connection between the Issuer and the Holder and the Issuer also has a registered schema and credential definition. After initializing the Issuer will send a credential to the holder, and will then accept this credential and automatically store it in their wallet.",source:"@site/guides/tutorials/issue-a-credential.md",sourceDirName:"tutorials",slug:"/tutorials/issue-a-credential",permalink:"/guides/tutorials/issue-a-credential",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Registering a schema and credential definition on an AnonCreds Registry",permalink:"/guides/tutorials/registering-schema-and-credential-definition"},next:{title:"Mediation",permalink:"/guides/tutorials/mediation"}},c={},d=[{value:"1. Setting up the agents",id:"1-setting-up-the-agents",level:3},{value:"Issuer",id:"issuer",level:4},{value:"Holder",id:"holder",level:4},{value:"3. Listening for incoming credentials",id:"3-listening-for-incoming-credentials",level:3},{value:"4. Issuing a credential",id:"4-issuing-a-credential",level:3},{value:"Useful resources",id:"useful-resources",level:3}],p={toc:d},m="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"issue-a-credential"},"Issue a credential"),(0,r.kt)("p",null,"In this tutorial we will issue a credential from the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," to a ",(0,r.kt)("em",{parentName:"p"},"Holder"),". We will start with setting up both their agents with the minimal configuration required to follow this tutorial. It is assumed that there is a connection between the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," and the ",(0,r.kt)("em",{parentName:"p"},"Holder")," and the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," also has a registered schema and credential definition. After initializing the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," will send a credential to the ",(0,r.kt)("em",{parentName:"p"},"holder"),", and will then accept this credential and automatically store it in their wallet."),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"Using ",(0,r.kt)("a",{parentName:"em",href:"https://anoncreds-wg.github.io/anoncreds-spec/"},"AnonCreds")," and the ",(0,r.kt)("a",{parentName:"em",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0453-issue-credential-v2/README.md"},"Issue Credential V2 Protocol")," or the ",(0,r.kt)("a",{parentName:"em",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0036-issue-credential/README.md"},"Issue Credential V1 Protocol"),".")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"This section assumes that"),(0,r.kt)("ol",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ol"},"You have ",(0,r.kt)("a",{parentName:"li",href:"../getting-started"},"set-up your develoment environment"),"."),(0,r.kt)("li",{parentName:"ol"},"You have basic knowledge of the required fields in the ",(0,r.kt)("a",{parentName:"li",href:"./agent-config"},"Agent Config")),(0,r.kt)("li",{parentName:"ol"},"You have completed the ",(0,r.kt)("a",{parentName:"li",href:"./create-a-connection"},"Create a Connection tutorial")),(0,r.kt)("li",{parentName:"ol"},"You have a registered schema and credential definition. This can be done by following the ",(0,r.kt)("a",{parentName:"li",href:"./registering-schema-and-credential-definition"},"Registering on a AnonCreds Registry")))),(0,r.kt)("h3",{id:"1-setting-up-the-agents"},"1. Setting up the agents"),(0,r.kt)("p",null,"First for both agents we must setup and initialize an agent to work with. Depending on your target, ",(0,r.kt)("a",{parentName:"p",href:"../getting-started/installation/react-native"},"React Native")," or ",(0,r.kt)("a",{parentName:"p",href:"../getting-started/installation/react-native"},"Node.js"),", it might vary."),(0,r.kt)("p",null,"In this tutorial the ",(0,r.kt)("em",{parentName:"p"},"Holder")," will be in a ",(0,r.kt)("a",{parentName:"p",href:"../getting-started/installation/nodejs"},"Node.js environment")," and the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," also in a ",(0,r.kt)("a",{parentName:"p",href:"../getting-started/installation/nodejs"},"Node.js environment"),"."),(0,r.kt)("h4",{id:"issuer"},"Issuer"),(0,r.kt)("p",null,"For the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," the setup is commonly not the same as the ",(0,r.kt)("em",{parentName:"p"},"Holder"),". In the example they both live in a server environment, meaning they do not need a mediator. More commonly, the ",(0,r.kt)("em",{parentName:"p"},"Holder")," is in a mobile environment where a mediator is required for receiving DIDComm messages."),(0,r.kt)("p",null,"It is also very important for the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," to have a public DID, for the binding with a credential definition, amongst other things. For this demo we will use ",(0,r.kt)("a",{parentName:"p",href:"http://test.bcovrin.vonx.io"},"BCovrin Test"),". If you want to follow this tutorial, you have to register a public DID ",(0,r.kt)("a",{parentName:"p",href:"http://test.bcovrin.vonx.io"},"here")," via the Wallet seed field (this must be the same as the seed inside the config under the key ",(0,r.kt)("a",{parentName:"p",href:"./agent-config#publicdidseed"},(0,r.kt)("inlineCode",{parentName:"a"},"publicDidSeed")),")."),(0,r.kt)("p",null,"In order to reach the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," we have to add a list of ",(0,r.kt)("a",{parentName:"p",href:"./agent-config#endpoints"},(0,r.kt)("inlineCode",{parentName:"a"},"endpoints"))," of the agent that exposes the ",(0,r.kt)("inlineCode",{parentName:"p"},"inboundTransport")," to the public. In the example below we add an ",(0,r.kt)("inlineCode",{parentName:"p"},"inboundTransport")," and use port ",(0,r.kt)("inlineCode",{parentName:"p"},"3002"),". For development purposes it is recommended to use a tunneling service for this, like ",(0,r.kt)("a",{parentName:"p",href:"https://ngrok.com"},"Ngrok"),". Ngrok will allow you to reach your locally exposed endpoint from the public. If a tunneling service is used, make sure to use the ",(0,r.kt)("inlineCode",{parentName:"p"},"HTTPS")," variant as mobile environments, by default, do not accept ",(0,r.kt)("inlineCode",{parentName:"p"},"HTTP")," anymore."),(0,r.kt)("p",null,"To install ",(0,r.kt)("a",{parentName:"p",href:"https://ngrok.com"},"Ngrok")," and expose the port to the public the following commands can be used:"),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"yarn",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-console"},"yarn global add ngrok\n\nngrok http \n"))),(0,r.kt)(o.Z,{label:"npm",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-console"},"npm install --global ngrok\n\nngrok http \n")))),(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-a-credential.ts section-1",showLineNumbers:!0,"issue-a-credential.ts":!0,"section-1":!0},""))),(0,r.kt)("h4",{id:"holder"},"Holder"),(0,r.kt)("p",null,"For the ",(0,r.kt)("em",{parentName:"p"},"Holder")," we need to setup a basic agent with a wallet, mediator, outbound transport and a ledger."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"If you want to follow this tutorial in a mobile environment:"),(0,r.kt)("ol",{parentName:"blockquote"},(0,r.kt)("li",{parentName:"ol"},"Use the ",(0,r.kt)("inlineCode",{parentName:"li"},"agentDependencies")," from ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/react-native")),(0,r.kt)("li",{parentName:"ol"},"It is very important to note that mobile agents do not support HTTP by default. It is recommended to do everything over HTTPS, but for development HTTP can be enabled for ",(0,r.kt)("a",{parentName:"li",href:"https://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-ios-9"},"iOS")," and ",(0,r.kt)("a",{parentName:"li",href:"https://stackoverflow.com/questions/51902629/how-to-allow-all-network-connection-types-http-and-https-in-android-9-pie"},"Android"),"."))),(0,r.kt)("admonition",{type:"holder"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-a-credential.ts section-2",showLineNumbers:!0,"issue-a-credential.ts":!0,"section-2":!0},""))),(0,r.kt)("h3",{id:"3-listening-for-incoming-credentials"},"3. Listening for incoming credentials"),(0,r.kt)("p",null,"When we want to accept a credential, we have to listen to incoming credentials and handle accordingly. In this example we do not have any user interaction, but is likely that your application would have a user-interface which would display the credential. When receiving a credential offer you can get the values from ",(0,r.kt)("inlineCode",{parentName:"p"},"credentialExchangeRecord.credentialAttributes"),"."),(0,r.kt)("admonition",{type:"holder"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-a-credential.ts section-3",showLineNumbers:!0,"issue-a-credential.ts":!0,"section-3":!0},""))),(0,r.kt)("h3",{id:"4-issuing-a-credential"},"4. Issuing a credential"),(0,r.kt)("p",null,"Now that everything is setup on both sides, the ",(0,r.kt)("em",{parentName:"p"},"Issuer")," can now offer a credential to the ",(0,r.kt)("em",{parentName:"p"},"Holder"),"."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"In this example we do not instantiate a connection and assume that there is one. Please refer to this guide ",(0,r.kt)("a",{parentName:"p",href:"./create-a-connection"},"Create a connection")," to get a connection and connectionId.")),(0,r.kt)(i.Z,{mdxType:"Tabs"},(0,r.kt)(o.Z,{label:"Indy",value:"tab1",mdxType:"TabItem"},(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-a-credential.ts section-4",showLineNumbers:!0,"issue-a-credential.ts":!0,"section-4":!0},"")))),(0,r.kt)(o.Z,{label:"AnonCreds",value:"tab2",mdxType:"TabItem"},(0,r.kt)("admonition",{type:"issuer"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers issue-a-credential.ts section-5",showLineNumbers:!0,"issue-a-credential.ts":!0,"section-5":!0},""))))),(0,r.kt)("h3",{id:"useful-resources"},"Useful resources"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://anoncreds-wg.github.io/anoncreds-spec/"},"AnonCreds")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0036-issue-credential/README.md"},"Issue Credential V1 Protocol")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/hyperledger/aries-rfcs/blob/main/features/0453-issue-credential-v2/README.md"},"Issue Credential V2 Protocol"))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/da788397.ba65699b.js b/assets/js/da788397.c5fdb12e.js similarity index 98% rename from assets/js/da788397.ba65699b.js rename to assets/js/da788397.c5fdb12e.js index a429735..85affcc 100644 --- a/assets/js/da788397.ba65699b.js +++ b/assets/js/da788397.c5fdb12e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[4281],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=u(n),m=a,f=d["".concat(l,".").concat(m)]||d[m]||p[m]||o;return n?r.createElement(f,s(s({ref:t},c),{},{components:n})):r.createElement(f,s({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:a,s[1]=i;for(var u=2;u{n.d(t,{Z:()=>s});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function s(e){let{children:t,hidden:n,className:s}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,s),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),o=n(86010),s=n(12466),i=n(16550),l=n(91980),u=n(67392),c=n(50012);function d(e){return function(e){return a.Children.map(e,(e=>{if((0,a.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=p(e),[s,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[l,u]=f({queryString:n,groupId:r}),[d,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),h=(()=>{const e=l??d;return m({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{h&&i(h)}),[h]);return{selectedValue:s,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),g(e)}),[u,g,o]),tabValues:o}}var h=n(72389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:l,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,s.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(d(t),l(r))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:s}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},s,{className:(0,o.Z)("tabs__item",b.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function k(e){const t=g(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",b.tabList)},a.createElement(y,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function w(e){const t=(0,h.Z)();return a.createElement(k,(0,r.Z)({key:String(t)},e))}},83423:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>f,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var r=n(87462),a=(n(67294),n(3905)),o=n(74866),s=n(85162);const i={},l="AnonCreds",u={unversionedId:"getting-started/set-up/anoncreds",id:"getting-started/set-up/anoncreds",title:"AnonCreds",description:"The AnonCreds module provides functionality for issuing and verifying AnonCreds credentials in Credo. The AnonCreds implementation is based on AnonCreds RS, a direct implementation of the AnonCreds V1.0 specification that provides functionality like; creating a schema object, creating a credential definition object, creating a credential, verifying a proof presentation and much more.",source:"@site/guides/getting-started/set-up/anoncreds.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/anoncreds",permalink:"/guides/getting-started/set-up/anoncreds",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Aries Askar",permalink:"/guides/getting-started/set-up/aries-askar"},next:{title:"Indy VDR",permalink:"/guides/getting-started/set-up/indy-vdr"}},c={},d=[{value:"Installing",id:"installing",level:3},{value:"Adding AnonCreds to the agent",id:"adding-anoncreds-to-the-agent",level:3},{value:"Configuration",id:"configuration",level:3}],p={toc:d},m="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"anoncreds"},"AnonCreds"),(0,a.kt)("p",null,"The AnonCreds module provides functionality for issuing and verifying ",(0,a.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-spec/"},"AnonCreds")," credentials in Credo. The AnonCreds implementation is based on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/anoncreds-rs"},"AnonCreds RS"),", a direct implementation of the ",(0,a.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-spec/"},"AnonCreds V1.0 specification")," that provides functionality like; creating a schema object, creating a credential definition object, creating a credential, verifying a proof presentation and much more."),(0,a.kt)("h3",{id:"installing"},"Installing"),(0,a.kt)("p",null,"When using Credo with AnonCreds, there are a few extra dependencies that need to be installed. We need to install ",(0,a.kt)("inlineCode",{parentName:"p"},"@credo-ts/anoncreds")," package, which contains the interfaces, and ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/anoncreds-")," package which is an implementation which depends on a wrapper of anoncreds-rs. Currently there are bindings for Node.JS, as ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/anoncreds-nodejs"),", and React Native as ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperlegder/anoncreds-react-native"),"."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(s.Z,{label:"Node.JS",value:"tab1",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/anoncreds@^0.5.3 @hyperledger/anoncreds-nodejs@^0.2.2\n"))),(0,a.kt)(s.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/anoncreds@^0.5.3 @hyperledger/anoncreds-react-native@^0.2.2\n")))),(0,a.kt)("h3",{id:"adding-anoncreds-to-the-agent"},"Adding AnonCreds to the agent"),(0,a.kt)("p",null,"After installing the dependencies, we should register the ",(0,a.kt)("inlineCode",{parentName:"p"},"AnonCredsModule")," on the agent."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(s.Z,{label:"Node.JS",value:"tab1",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-anoncreds.ts section-1",showLineNumbers:!0,"set-up-anoncreds.ts":!0,"section-1":!0},""))),(0,a.kt)(s.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-anoncreds-rn.ts section-1",showLineNumbers:!0,"set-up-anoncreds-rn.ts":!0,"section-1":!0},"")))),(0,a.kt)("h3",{id:"configuration"},"Configuration"),(0,a.kt)("p",null,"As you can see, the AnonCreds module takes a list of registry modules. These modules will be used to resolve the AnonCreds objects. ",(0,a.kt)("a",{parentName:"p",href:"./indy-vdr"},"Indy VDR")," can be used as an AnonCreds registry for Hyperledger Indy networks, and ",(0,a.kt)("a",{parentName:"p",href:"./cheqd"},"Cheqd")," can be used as an AnonCreds registry for Cheqd networks."))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[4281],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=u(n),m=a,f=d["".concat(l,".").concat(m)]||d[m]||p[m]||o;return n?r.createElement(f,s(s({ref:t},c),{},{components:n})):r.createElement(f,s({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:a,s[1]=i;for(var u=2;u{n.d(t,{Z:()=>s});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function s(e){let{children:t,hidden:n,className:s}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,s),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),o=n(86010),s=n(12466),i=n(16550),l=n(91980),u=n(67392),c=n(50012);function d(e){return function(e){return a.Children.map(e,(e=>{if((0,a.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!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 n??null}({queryString:t,groupId:n});return[(0,l._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=p(e),[s,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[l,u]=f({queryString:n,groupId:r}),[d,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),h=(()=>{const e=l??d;return m({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{h&&i(h)}),[h]);return{selectedValue:s,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),g(e)}),[u,g,o]),tabValues:o}}var h=n(72389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:n,selectedValue:i,selectValue:l,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,s.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(d(t),l(r))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:s}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},s,{className:(0,o.Z)("tabs__item",b.tabItem,s?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;if(n=Array.isArray(n)?n:[n],t){const e=n.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},n.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function k(e){const t=g(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",b.tabList)},a.createElement(y,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function w(e){const t=(0,h.Z)();return a.createElement(k,(0,r.Z)({key:String(t)},e))}},83423:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>f,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var r=n(87462),a=(n(67294),n(3905)),o=n(74866),s=n(85162);const i={},l="AnonCreds",u={unversionedId:"getting-started/set-up/anoncreds",id:"getting-started/set-up/anoncreds",title:"AnonCreds",description:"The AnonCreds module provides functionality for issuing and verifying AnonCreds credentials in Credo. The AnonCreds implementation is based on AnonCreds RS, a direct implementation of the AnonCreds V1.0 specification that provides functionality like; creating a schema object, creating a credential definition object, creating a credential, verifying a proof presentation and much more.",source:"@site/guides/getting-started/set-up/anoncreds.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/anoncreds",permalink:"/guides/getting-started/set-up/anoncreds",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Aries Askar",permalink:"/guides/getting-started/set-up/aries-askar"},next:{title:"Indy VDR",permalink:"/guides/getting-started/set-up/indy-vdr"}},c={},d=[{value:"Installing",id:"installing",level:3},{value:"Adding AnonCreds to the agent",id:"adding-anoncreds-to-the-agent",level:3},{value:"Configuration",id:"configuration",level:3}],p={toc:d},m="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"anoncreds"},"AnonCreds"),(0,a.kt)("p",null,"The AnonCreds module provides functionality for issuing and verifying ",(0,a.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-spec/"},"AnonCreds")," credentials in Credo. The AnonCreds implementation is based on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/anoncreds-rs"},"AnonCreds RS"),", a direct implementation of the ",(0,a.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/anoncreds-spec/"},"AnonCreds V1.0 specification")," that provides functionality like; creating a schema object, creating a credential definition object, creating a credential, verifying a proof presentation and much more."),(0,a.kt)("h3",{id:"installing"},"Installing"),(0,a.kt)("p",null,"When using Credo with AnonCreds, there are a few extra dependencies that need to be installed. We need to install ",(0,a.kt)("inlineCode",{parentName:"p"},"@credo-ts/anoncreds")," package, which contains the interfaces, and ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/anoncreds-")," package which is an implementation which depends on a wrapper of anoncreds-rs. Currently there are bindings for Node.js, as ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperledger/anoncreds-nodejs"),", and React Native as ",(0,a.kt)("inlineCode",{parentName:"p"},"@hyperlegder/anoncreds-react-native"),"."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(s.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/anoncreds@^0.5.3 @hyperledger/anoncreds-nodejs@^0.2.2\n"))),(0,a.kt)(s.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/anoncreds@^0.5.3 @hyperledger/anoncreds-react-native@^0.2.2\n")))),(0,a.kt)("h3",{id:"adding-anoncreds-to-the-agent"},"Adding AnonCreds to the agent"),(0,a.kt)("p",null,"After installing the dependencies, we should register the ",(0,a.kt)("inlineCode",{parentName:"p"},"AnonCredsModule")," on the agent."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(s.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-anoncreds.ts section-1",showLineNumbers:!0,"set-up-anoncreds.ts":!0,"section-1":!0},""))),(0,a.kt)(s.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-anoncreds-rn.ts section-1",showLineNumbers:!0,"set-up-anoncreds-rn.ts":!0,"section-1":!0},"")))),(0,a.kt)("h3",{id:"configuration"},"Configuration"),(0,a.kt)("p",null,"As you can see, the AnonCreds module takes a list of registry modules. These modules will be used to resolve the AnonCreds objects. ",(0,a.kt)("a",{parentName:"p",href:"./indy-vdr"},"Indy VDR")," can be used as an AnonCreds registry for Hyperledger Indy networks, and ",(0,a.kt)("a",{parentName:"p",href:"./cheqd"},"Cheqd")," can be used as an AnonCreds registry for Cheqd networks."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/dc62edf2.e31ee5e9.js b/assets/js/dc62edf2.5331c55c.js similarity index 98% rename from assets/js/dc62edf2.e31ee5e9.js rename to assets/js/dc62edf2.5331c55c.js index 105eb8a..40571dc 100644 --- a/assets/js/dc62edf2.e31ee5e9.js +++ b/assets/js/dc62edf2.5331c55c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[4827],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>g});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=c(r),m=a,g=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return r?n.createElement(g,o(o({ref:t},u),{},{components:r})):n.createElement(g,o({ref:t},u))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:a,o[1]=s;for(var c=2;c{r.d(t,{Z:()=>y});var n=r(67294),a=r(86010),i=r(53438),o=r(39960),s=r(13919),l=r(95999);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function u(e){let{href:t,children:r}=e;return n.createElement(o.Z,{href:t,className:(0,a.Z)("card padding--lg",c.cardContainer)},r)}function d(e){let{href:t,icon:r,title:i,description:o}=e;return n.createElement(u,{href:t},n.createElement("h2",{className:(0,a.Z)("text--truncate",c.cardTitle),title:i},r," ",i),o&&n.createElement("p",{className:(0,a.Z)("text--truncate",c.cardDescription),title:o},o))}function p(e){let{item:t}=e;const r=(0,i.Wl)(t);return r?n.createElement(d,{href:r,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,l.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const r=(0,s.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,i.xz)(t.docId??void 0);return n.createElement(d,{href:t.href,icon:r,title:t.label,description:a?.description})}function g(e){let{item:t}=e;switch(t.type){case"link":return n.createElement(m,{item:t});case"category":return n.createElement(p,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function f(e){let{className:t}=e;const r=(0,i.jA)();return n.createElement(y,{items:r.items,className:t})}function y(e){const{items:t,className:r}=e;if(!t)return n.createElement(f,e);const o=(0,i.MN)(t);return n.createElement("section",{className:(0,a.Z)("row",r)},o.map(((e,t)=>n.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},n.createElement(g,{item:e})))))}},10695:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var n=r(87462),a=(r(67294),r(3905)),i=r(52991);const o={},s="Getting started",l={unversionedId:"getting-started/index",id:"getting-started/index",title:"Getting started",description:"In this section we will go over everything you need to get started on a technical level. First there are some general prerequisites for Node.JS and React Native. Credo works for creating both server-side applications (commonly but not always for creating issuer and verifier agents) and mobile applications (commonly holder agents).",source:"@site/guides/getting-started/index.md",sourceDirName:"getting-started",slug:"/getting-started/",permalink:"/guides/getting-started/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Intro",permalink:"/guides/"},next:{title:"Prerequisites",permalink:"/guides/getting-started/prerequisites"}},c={},u=[],d={toc:u},p="wrapper";function m(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"getting-started"},"Getting started"),(0,a.kt)("p",null,"In this section we will go over everything you need to get started on a technical level. First there are some general prerequisites for Node.JS and React Native. Credo works for creating both server-side applications (commonly but not always for creating issuer and verifier agents) and mobile applications (commonly holder agents)."),(0,a.kt)("p",null,"Based on the platform you want to work on, the installation guides you should follow are the same, but some steps may differ."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Do you want to build a mobile app?")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/guides/getting-started/prerequisites"},"Prerequisites"),"."),(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/"},"Agent Setup")," guide.")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Do you want to build a server-side app?")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/guides/getting-started/prerequisites"},"Prerequisites"),"."),(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/"},"Agent Setup")," guide.")),(0,a.kt)(i.Z,{mdxType:"DocCardList"}))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[4827],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>g});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=c(r),m=a,g=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return r?n.createElement(g,o(o({ref:t},u),{},{components:r})):n.createElement(g,o({ref:t},u))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:a,o[1]=s;for(var c=2;c{r.d(t,{Z:()=>y});var n=r(67294),a=r(86010),i=r(53438),o=r(39960),s=r(13919),l=r(95999);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function u(e){let{href:t,children:r}=e;return n.createElement(o.Z,{href:t,className:(0,a.Z)("card padding--lg",c.cardContainer)},r)}function d(e){let{href:t,icon:r,title:i,description:o}=e;return n.createElement(u,{href:t},n.createElement("h2",{className:(0,a.Z)("text--truncate",c.cardTitle),title:i},r," ",i),o&&n.createElement("p",{className:(0,a.Z)("text--truncate",c.cardDescription),title:o},o))}function p(e){let{item:t}=e;const r=(0,i.Wl)(t);return r?n.createElement(d,{href:r,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,l.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function m(e){let{item:t}=e;const r=(0,s.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,i.xz)(t.docId??void 0);return n.createElement(d,{href:t.href,icon:r,title:t.label,description:a?.description})}function g(e){let{item:t}=e;switch(t.type){case"link":return n.createElement(m,{item:t});case"category":return n.createElement(p,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function f(e){let{className:t}=e;const r=(0,i.jA)();return n.createElement(y,{items:r.items,className:t})}function y(e){const{items:t,className:r}=e;if(!t)return n.createElement(f,e);const o=(0,i.MN)(t);return n.createElement("section",{className:(0,a.Z)("row",r)},o.map(((e,t)=>n.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},n.createElement(g,{item:e})))))}},10695:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var n=r(87462),a=(r(67294),r(3905)),i=r(52991);const o={},s="Getting started",l={unversionedId:"getting-started/index",id:"getting-started/index",title:"Getting started",description:"In this section we will go over everything you need to get started on a technical level. First there are some general prerequisites for Node.js and React Native. Credo works for creating both server-side applications (commonly but not always for creating issuer and verifier agents) and mobile applications (commonly holder agents).",source:"@site/guides/getting-started/index.md",sourceDirName:"getting-started",slug:"/getting-started/",permalink:"/guides/getting-started/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Intro",permalink:"/guides/"},next:{title:"Prerequisites",permalink:"/guides/getting-started/prerequisites"}},c={},u=[],d={toc:u},p="wrapper";function m(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"getting-started"},"Getting started"),(0,a.kt)("p",null,"In this section we will go over everything you need to get started on a technical level. First there are some general prerequisites for Node.js and React Native. Credo works for creating both server-side applications (commonly but not always for creating issuer and verifier agents) and mobile applications (commonly holder agents)."),(0,a.kt)("p",null,"Based on the platform you want to work on, the installation guides you should follow are the same, but some steps may differ."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Do you want to build a mobile app?")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/guides/getting-started/prerequisites"},"Prerequisites"),"."),(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/"},"Agent Setup")," guide.")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Do you want to build a server-side app?")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/guides/getting-started/prerequisites"},"Prerequisites"),"."),(0,a.kt)("li",{parentName:"ul"},"Follow the ",(0,a.kt)("a",{parentName:"li",href:"/guides/getting-started/set-up/"},"Agent Setup")," guide.")),(0,a.kt)(i.Z,{mdxType:"DocCardList"}))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e9cc1880.274cbc7b.js b/assets/js/e9cc1880.274cbc7b.js deleted file mode 100644 index da71cea..0000000 --- a/assets/js/e9cc1880.274cbc7b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7822],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>h});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),l=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=l(e.components);return a.createElement(s.Provider,{value:n},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),u=l(t),m=r,h=u["".concat(s,".").concat(m)]||u[m]||c[m]||o;return t?a.createElement(h,i(i({ref:n},p),{},{components:t})):a.createElement(h,i({ref:n},p))}));function h(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=m;var d={};for(var s in n)hasOwnProperty.call(n,s)&&(d[s]=n[s]);d.originalType=e,d[u]="string"==typeof e?e:r,i[1]=d;for(var l=2;l{t.d(n,{Z:()=>i});var a=t(67294),r=t(86010);const o={tabItem:"tabItem_Ymn6"};function i(e){let{children:n,hidden:t,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,i),hidden:t},n)}},74866:(e,n,t)=>{t.d(n,{Z:()=>w});var a=t(87462),r=t(67294),o=t(86010),i=t(12466),d=t(16550),s=t(91980),l=t(67392),p=t(50012);function u(e){return function(e){return r.Children.map(e,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:r}}=e;return{value:n,label:t,attributes:a,default:r}}))}function c(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??u(t);return function(e){const n=(0,l.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function m(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const a=(0,d.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!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 t??null}({queryString:n,groupId:t});return[(0,s._X)(o),(0,r.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(a.location.search);n.set(o,e),a.replace({...a.location,search:n.toString()})}),[o,a])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,o=c(e),[i,d]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:o}))),[s,l]=h({queryString:t,groupId:a}),[u,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,o]=(0,p.Nk)(t);return[a,(0,r.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:a}),k=(()=>{const e=s??u;return m({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{k&&d(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);d(e),l(e),f(e)}),[l,f,o]),tabValues:o}}var k=t(72389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:n,block:t,selectedValue:d,selectValue:s,tabValues:l}=e;const p=[],{blockElementScrollPositionUntilNextRender:u}=(0,i.o5)(),c=e=>{const n=e.currentTarget,t=p.indexOf(n),a=l[t].value;a!==d&&(u(n),s(a))},m=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=p.indexOf(e.currentTarget)+1;n=p[t]??p[0];break}case"ArrowLeft":{const t=p.indexOf(e.currentTarget)-1;n=p[t]??p[p.length-1];break}}n?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},l.map((e=>{let{value:n,label:t,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:d===n?0:-1,"aria-selected":d===n,key:n,ref:e=>p.push(e),onKeyDown:m,onClick:c},i,{className:(0,o.Z)("tabs__item",g.tabItem,i?.className,{"tabs__item--active":d===n})}),t??n)})))}function y(e){let{lazy:n,children:t,selectedValue:a}=e;if(t=Array.isArray(t)?t:[t],n){const e=t.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},t.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a}))))}function b(e){const n=f(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},r.createElement(v,(0,a.Z)({},e,n)),r.createElement(y,(0,a.Z)({},e,n)))}function w(e){const n=(0,k.Z)();return r.createElement(b,(0,a.Z)({key:String(n)},e))}},82268:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>h,frontMatter:()=>d,metadata:()=>l,toc:()=>u});var a=t(87462),r=(t(67294),t(3905)),o=t(74866),i=t(85162);const d={},s="Migrating from Credo 0.4.x to 0.5.x",l={unversionedId:"updating/versions/0.4-to-0.5",id:"updating/versions/0.4-to-0.5",title:"Migrating from Credo 0.4.x to 0.5.x",description:"This document describes everything you need to know for updating Credo 0.4.x to 0.5.x. If you're not aware of how updating in Credo works make sure to first read the guide on Updating Credo, and the Update Assistant. Starting from Credo 0.5, we now support migration of tenant storage in addition to the root wallet. If you're using the tenants module, make sure to read the guides carefully.",source:"@site/guides/updating/versions/0.4-to-0.5.md",sourceDirName:"updating/versions",slug:"/updating/versions/0.4-to-0.5",permalink:"/guides/updating/versions/0.4-to-0.5",draft:!1,tags:[],version:"current",frontMatter:{}},p={},u=[{value:"React Native",id:"react-native",level:4},{value:"Node",id:"node",level:4},{value:"Breaking Code Changes",id:"breaking-code-changes",level:2},{value:"Node 16 deprecated",id:"node-16-deprecated",level:3},{value:"Aries to Credo",id:"aries-to-credo",level:3},{value:"Label optional in OutOfBandInvitation",id:"label-optional-in-outofbandinvitation",level:3},{value:"Caching in DidResolver interface",id:"caching-in-didresolver-interface",level:3},{value:"Out Of Band Handshake Protocols enum updated to not include minor version",id:"out-of-band-handshake-protocols-enum-updated-to-not-include-minor-version",level:3},{value:"AnonCreds RS and AnonCreds package combined",id:"anoncreds-rs-and-anoncreds-package-combined",level:3},{value:"0.4.x",id:"04x",level:5},{value:"0.5.x",id:"05x",level:5},{value:"OpenId4VC Holder module",id:"openid4vc-holder-module",level:3},{value:"0.4.x",id:"04x-1",level:5},{value:"0.5.x",id:"05x-1",level:5},{value:"0.4.x",id:"04x-2",level:5},{value:"0.5.x",id:"05x-2",level:5},{value:"Message Pickup",id:"message-pickup",level:3},{value:"Askar short-lived sessions",id:"askar-short-lived-sessions",level:3},{value:"AnonCreds W3C format",id:"anoncreds-w3c-format",level:3}],c={toc:u},m="wrapper";function h(e){let{components:n,...t}=e;return(0,r.kt)(m,(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"migrating-from-credo-04x-to-05x"},"Migrating from Credo 0.4.x to 0.5.x"),(0,r.kt)("p",null,"This document describes everything you need to know for updating Credo 0.4.x to 0.5.x. If you're not aware of how updating in Credo works make sure to first read the guide on ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/"},"Updating Credo"),", and the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant"),". Starting from Credo 0.5, we now support migration of tenant storage in addition to the root wallet. If you're using the tenants module, make sure to read the guides carefully."),(0,r.kt)("p",null,"See ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/pull/1747"},"Pull Request 1747")," for more information.)."),(0,r.kt)("p",null,"First of all, update your dependencies to the 0.5.x versions. This will also update the needed peer dependencies. ",(0,r.kt)("strong",{parentName:"p"},"Extension packages are not updated with this command"),". You need to update these manually, and make sure they're up to date with the latest version of Credo."),(0,r.kt)("p",null,"Credo 0.5.0 is a major release, but there haven't been a lot of breaking changes to the stable API, most of the changes are related to OpenID4VC, SD-JWT VC and DIF Presentation Exchange. One notable change is that the Indy SDK has been fully deprecated and removed from Credo. This means that starting from 0.5, you cannot use Credo with the Indy SDK. If you need to migrate your storage from Indy SDK to Aries Askar, see the note below for instructions. Another notable change is the migration of all AnonCreds credential records to be stored as ",(0,r.kt)("inlineCode",{parentName:"p"},"W3cCredentialRecord")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord"),"."),(0,r.kt)("p",null,"Follow the mentioned steps in this document carefully to make the upgrade as smooth as possible."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The migration guide only covers how to migrate from 0.4.x to 0.5.x while keeping the same behavior and dependencies. Credo 0.4.0 added support for ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-askar"},"Aries Askar"),", ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-vdr"},"Indy VDR")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/anoncreds-rs"},"AnonCreds RS")," as a replacement for the Indy SDK."),(0,r.kt)("p",{parentName:"admonition"},"Migrating to these new components requires additional migration steps, which need to be closely followed to prevent loss of data. These can be found at the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-indy-sdk-to-askar"},"Update Indy SDK to Askar guide"),"."),(0,r.kt)("p",{parentName:"admonition"},"As noted in the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-indy-sdk-to-askar"},"Update Indy SDK to Askar guide"),", it is very important that the 0.3.x or 0.4x to 0.5.x update is started after migrating from the Indy SDK to Aries Askar."),(0,r.kt)("p",{parentName:"admonition"},"The rest of this guides will ",(0,r.kt)("strong",{parentName:"p"},"assume you have already migrated from the Indy SDK to Aries Askar, AnonCreds and Indy VDR"),".")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The following APIs, modules and features are experimental and therefore not covered by the semver versioning in Credo. If you're using any of these features, make sure to use an exact version of Credo (",(0,r.kt)("inlineCode",{parentName:"p"},"0.5.0"),") instead of a range (",(0,r.kt)("inlineCode",{parentName:"p"},"^0.5.0"),"):"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"Issuance of revocable AnonCreds credentials and revocation of AnonCreds credentials"),(0,r.kt)("li",{parentName:"ul"},"Using any of the OpenID4VC from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/openid4vc")," package"),(0,r.kt)("li",{parentName:"ul"},"SD-JWT Verifiable Credentials"),(0,r.kt)("li",{parentName:"ul"},"DIF Presentation Exchange"),(0,r.kt)("li",{parentName:"ul"},"Issuance and verification of AnonCreds in W3C Verifiable Credential format"))),(0,r.kt)("p",null,"First install the updated dependencies. For all dependencies you have in ",(0,r.kt)("inlineCode",{parentName:"p"},"package.json"),", update them to the following versions, for your platform. If you don't use a package, you don't have to add it here."),(0,r.kt)("p",null,"In the upgrade from 0.4 to 0.5, Aries Framework JavaScript has been renamed to Credo, and therefore the package scope has also changed. ",(0,r.kt)("strong",{parentName:"p"},"The scope for all packages starting with ",(0,r.kt)("inlineCode",{parentName:"strong"},"@aries-framework")," should be updated to ",(0,r.kt)("inlineCode",{parentName:"strong"},"@credo-ts")),". So ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/core")," becomes ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/core"),", etc.."),(0,r.kt)("p",null,"If you were using ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds-rs"),", these have been combined into ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/anoncreds"),". So ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"@aries-framework/anoncreds-rs")," can be removed from the dependencies"),"."),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{label:"React Native",value:"tab1",mdxType:"TabItem"},(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/*": "^0.5.3"')," - except for packages starting with ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts")," listed below."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/react-hooks": "^0.6.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/push-notifications": "^0.7.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/anoncreds-react-native": "^0.2.2"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/indy-vdr-react-native": "^0.2.2"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/aries-askar-react-native": "^0.2.1"'))),(0,r.kt)("p",null,"In addition, if you were using ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds-rs"),", these have been combined into ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/anoncreds"),". So ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"@aries-framework/anoncreds-rs")," can be removed from the dependencies"),".")),(0,r.kt)(i.Z,{label:"Node",value:"tab2",mdxType:"TabItem"},(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/*": "^0.5.3"')," - except for packages starting with ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts")," listed below."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/react-hooks": "^0.6.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/push-notifications": "^0.7.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/anoncreds-nodejs": "^0.2.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/indy-vdr-nodejs": "^0.2.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/aries-askar-nodejs": "^0.2.0"'))))),(0,r.kt)("h2",{id:"breaking-code-changes"},"Breaking Code Changes"),(0,r.kt)("p",null,"This section will list all breaking changes made to the public API of Credo between version 0.4.x and 0.5.x."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If you have custom modules take into account there could be a lot more breaking changes that aren't documented here. We try to make sure that the biggest breaking changes to the internal API are also documented here, but it is possible some breaking changes are not documented here (feel free to open a pull request).")),(0,r.kt)("h3",{id:"node-16-deprecated"},"Node 16 deprecated"),(0,r.kt)("p",null,"Starting from Credo 0.5, Node 16 has been deprecated and is no longer supported. The supported versions for Credo are Node 18 and 20. We aim to keep support for all LTS releases (the even version numbers) that are either Current, Active, or in Maintenance. Other versions may work, but are not part of our testing and release process."),(0,r.kt)("p",null,"See the ",(0,r.kt)("a",{parentName:"p",href:"https://nodejs.org/en/about/previous-releases#release-schedule"},"Release Schedule")," on the Node.JS website for information on past and upcoming Node.JS releases."),(0,r.kt)("h3",{id:"aries-to-credo"},"Aries to Credo"),(0,r.kt)("p",null,"With the move from Aries Framework JavaScript to Credo, several classes and imports have been renamed to match the new name. The following imports should be updated:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"AriesFrameworkError")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"CredoError"))),(0,r.kt)("h3",{id:"label-optional-in-outofbandinvitation"},"Label optional in ",(0,r.kt)("inlineCode",{parentName:"h3"},"OutOfBandInvitation")),(0,r.kt)("p",null,"A small change, but the ",(0,r.kt)("inlineCode",{parentName:"p"},"label")," property on an ",(0,r.kt)("inlineCode",{parentName:"p"},"OutOfBandInvitation")," is now optional."),(0,r.kt)("h3",{id:"caching-in-didresolver-interface"},"Caching in ",(0,r.kt)("inlineCode",{parentName:"h3"},"DidResolver")," interface"),(0,r.kt)("p",null,"Did resolving within Credo now support caching of resolved did documents. Especially in some flows where the did document is resolved several times, this can improve performance a lot."),(0,r.kt)("p",null,"If you haven't implemented a custom ",(0,r.kt)("inlineCode",{parentName:"p"},"DidResolver"),", you don't have to do anything to benefit from the new caching behavior, this is enabled by default. If you want to opt out of caching (and have the same behavior as 0.4), you can tweak it using the following properties in the did resolver options:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript"},"const didResult = await agent.dids.resolve('did:example:123', {\n // how long to cache the resolved did document in seconds\n cacheDurationInSeconds: 400,\n // whether to persist the resolved did document in the cache\n persistInCache: true,\n // whether to use the cache for resolving the did document\n useCache: true,\n})\n")),(0,r.kt)("p",null,"If you have implemented a custom did resolver, you need to set the ",(0,r.kt)("inlineCode",{parentName:"p"},"allowsCaching")," property to indicate whether the did resolver allows the documents it resolves to be cached. For example, for local resolvers it's often easier to resolve the document than to have it cached, so you can set ",(0,r.kt)("inlineCode",{parentName:"p"},"allowsCaching")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," (example are ",(0,r.kt)("inlineCode",{parentName:"p"},"did:key"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"did:jwk"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"did:peer"),"). For resolvers that resolve documents from a remote source, it's often better to cache the resolved document, so you can set ",(0,r.kt)("inlineCode",{parentName:"p"},"allowsCaching")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," (example are ",(0,r.kt)("inlineCode",{parentName:"p"},"did:web"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"did:cheqd"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"did:indy"),")."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript"},"export class ExampleDidResolver implements DidResolver {\n public readonly supportedMethods = ['example']\n\n // whether to allow caching\n public readonly allowsCaching = true\n\n public async resolve() {\n // ... resolver implementation\n }\n}\n")),(0,r.kt)("h3",{id:"out-of-band-handshake-protocols-enum-updated-to-not-include-minor-version"},"Out Of Band Handshake Protocols enum updated to not include minor version"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"HandshakeProtocol")," enum, which you can provide when creating out of band invitations, has been updated to not include the minor version in the values anymore. The minor version has instead been replaced by an ",(0,r.kt)("inlineCode",{parentName:"p"},"x"),", indicating it can be any value. If you were only using the enum, this should not cause issues. But if you were relying on the values within the enum to have a specific format, this could cause some issues."),(0,r.kt)("p",null,"For example the value for ",(0,r.kt)("inlineCode",{parentName:"p"},"HandshakeProtocol.DidExchange")," has been updated from ",(0,r.kt)("inlineCode",{parentName:"p"},"https://didcomm.org/didexchange/1.1")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"https://didcomm.org/didexchange/1.x"),"."),(0,r.kt)("h3",{id:"anoncreds-rs-and-anoncreds-package-combined"},"AnonCreds RS and AnonCreds package combined"),(0,r.kt)("p",null,"With the removal of the Indy SDK from Credo, we have made the setup for AnonCreds easier."),(0,r.kt)("p",null,"In 0.4 you had to provide both the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsModule")," (from ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds"),") as well as the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsRsModule")," (from ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds-rs"),"). In 0.5 these have been combined into a single ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsModule")," (from ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/anoncreds"),")."),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{label:"0.4.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\n// or import from @hyperledger/anoncreds-react-native in React Native\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst agent = new Agent({\n /* ... rest of agent setup */\n\n modules: {\n anoncreds: new AnonCredsModule({\n registries: [\n /* registries */\n ],\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n },\n})\n"))),(0,r.kt)(i.Z,{label:"0.5.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from 'credo-ts/core'\nimport { AnonCredsModule } from 'credo-ts/anoncreds'\n\n// or import from @hyperledger/anoncreds-react-native in React Native\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst agent = new Agent({\n /* ... rest of agent setup */\n\n modules: {\n anoncreds: new AnonCredsModule({\n registries: [\n /* registries */\n ],\n\n // anoncreds has been moved to AnonCredsModule\n anoncreds,\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"openid4vc-holder-module"},"OpenId4VC Holder module"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/openid4vc-client")," has been deprecated in favour of the new ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/openid4vc")," package."),(0,r.kt)("p",null,"The OpenID4VC Client from Credo/AFJ 0.4 only supported receiving credential using OpenID for Verifiable Credentials Issuance. The new package now also support issuance, proving and verification. This section covers how to update the existing functionality to Credo 0.5, but for a detailed guide on how to use the new OpenID4VC features in Credo, see ",(0,r.kt)("a",{parentName:"p",href:"/guides/oid4vc/index.md"},"OpenID4VC Guide"),"."),(0,r.kt)("p",null,"First update the import of ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/openid4vc-client")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/openid4vc"),", and change the module to the new ",(0,r.kt)("inlineCode",{parentName:"p"},"OpenId4VcHolderModule"),":"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{label:"0.4.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { OpenId4VcClientModule } from '@aries-framework/openid4vc-client'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n /* ... other modules */\n openId4VcClient: new OpenId4VcClientModule(),\n },\n})\n"))),(0,r.kt)(i.Z,{label:"0.5.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { OpenId4VcHolderModule } from '@aries-framework/openid4vc'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n /* ... other modules */\n openId4VcHolder: new OpenId4VcHolderModule(),\n },\n})\n")))),(0,r.kt)("p",null,"Next, update your credential receiving logic to first resolve the credential offer (using ",(0,r.kt)("inlineCode",{parentName:"p"},"agent.modules.openId4VcHolder.resolveCredentialOffer"),"), and then accept the credential offer (using ",(0,r.kt)("inlineCode",{parentName:"p"},"agent.modules.openId4VcHolder.acceptCredentialOfferUsingPreAuthorizedCode"),")."),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{label:"0.4.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { DidKey, KeyDidCreateOptions, JwaSignatureAlgorithm } from '@aries-framework/core'\nimport { OpenIdCredentialFormatProfile } from '@aries-framework/openid4vc-client'\n\n// Example uri\nconst data = 'openid-credential-offer://?credential_offer_uri=...'\n\nawait agent.modules.openId4VcClient.requestCredentialUsingPreAuthorizedCode({\n uri: data,\n proofOfPossessionVerificationMethodResolver: async ({ supportedDidMethods, keyType, supportsAllDidMethods }) => {\n if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) {\n const didResult = await agent.dids.create({\n method: 'key',\n options: {\n keyType,\n },\n })\n\n if (didResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n }\n\n const didKey = DidKey.fromDid(didResult.didState.did)\n\n return didResult.didState.didDocument.dereferenceKey(`${didKey.did}#${didKey.key.fingerprint}`)\n }\n\n throw new Error(`Unable to create a key binding`)\n },\n verifyCredentialStatus: false,\n allowedCredentialFormats: [OpenIdCredentialFormatProfile.JwtVcJson],\n allowedProofOfPossessionSignatureAlgorithms: [JwaSignatureAlgorithm.EdDSA, JwaSignatureAlgorithm.ES256],\n})\n"))),(0,r.kt)(i.Z,{label:"0.5.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { DidKey, KeyDidCreateOptions, JwaSignatureAlgorithm, getJwkFromKey } from '@credo-ts/core'\nimport { OpenId4VciCredentialFormatProfile } from '@credo-ts/openid4vc'\n\n// Example uri\nconst data = 'openid-credential-offer://?credential_offer_uri=...'\n\nconst resolvedCredentialOffer = await agent.modules.openId4VcHolder.resolveCredentialOffer(data)\n\nawait agent.modules.openId4VcHolder.acceptCredentialOfferUsingPreAuthorizedCode(\n // First parameter is now the resolved credential offer\n resolvedCredentialOffer,\n {\n // has been renamed from proofOfPossessionVerificationMethodResolver to credentialBindingResolver\n credentialBindingResolver: async ({\n supportedDidMethods,\n keyType,\n supportsAllDidMethods,\n // supportsJwk now also passed\n supportsJwk,\n credentialFormat,\n }) => {\n // NOTE: example implementation. Adjust based on your needs\n // Return the binding to the credential that should be used. Either did or jwk is supported\n\n if (supportsAllDidMethods || supportedDidMethods?.include('did:key')) {\n const didResult = await agent.dids.create({\n method: 'key',\n options: {\n keyType,\n },\n })\n\n if (didResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n }\n\n const didKey = DidKey.fromDid(didResult.didState.did)\n\n // you now need to return an object instead of VerificationMethod instance\n // and method 'did' or 'jwk'\n return {\n method: 'did',\n didUrl: `${didKey.did}#${didKey.key.fingerprint}`,\n }\n }\n\n // we also support plain jwk for sd-jwt only\n if (supportsJwk && credentialFormat === OpenId4VciCredentialFormatProfile.SdJwtVc) {\n const key = await agent.wallet.createKey({\n keyType,\n })\n\n // you now need to return an object instead of VerificationMethod instance\n // and method 'did' or 'jwk'\n return {\n method: 'jwk',\n jwk: getJwkFromKey(key),\n }\n }\n\n throw new Error('Unable to create a key binding')\n },\n\n verifyCredentialStatus: false,\n allowedProofOfPossessionSignatureAlgorithms: [JwaSignatureAlgorithm.EdDSA, JwaSignatureAlgorithm.ES256],\n }\n)\n")))),(0,r.kt)("h3",{id:"message-pickup"},"Message Pickup"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"TODO: write migration guide for message pickup\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/pull/1638"},"https://github.com/openwallet-foundation/credo-ts/pull/1638"))),(0,r.kt)("h3",{id:"askar-short-lived-sessions"},"Askar short-lived sessions"),(0,r.kt)("p",null,"This is an internal change, but Askar now only uses short-lived sessions. Before a session was created and kept alive until the agent was shutdown or the tenant session was closed (in case of multi-tenancy). Now a session is created for each read and write operation to your wallet."),(0,r.kt)("p",null,"Askar manages a connection pool internally and aligns more with how Askar is supposed to be used, and makes the multi-tenancy implementation more robust. This is also in preparation for some bigger wallet and storage API changes in future versions, where we want to support transactions (batching multiple read/writes operations), record locking (to prevent race condition updates), and more."),(0,r.kt)("p",null,"See ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/pull/1743"},"Pull Request 1743")," for more information."),(0,r.kt)("h3",{id:"anoncreds-w3c-format"},"AnonCreds W3C format"),(0,r.kt)("p",null,"AnonCreds credentials in Credo now support the W3c Verifiable Credential format. Using the new ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/aries-rfcs/latest/features/0809-w3c-data-integrity-credential-attachment/"},"Aries RFC 0809: W3C Verifiable Credential Data Integrity Attachment format")," you can issue AnonCreds credentials in W3C VC Data Integrity format, and verify them in W3C VC Data Integrity using ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/aries-rfcs/latest/aip2/0510-dif-pres-exch-attach/"},"Aries RFC 0510: Presentation-Exchange Attachment format"),"."),(0,r.kt)("p",null,"With the change, we've updated the storage of all AnonCreds credentials to be stored as ",(0,r.kt)("inlineCode",{parentName:"p"},"W3cCredentialRecord")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord"),". The ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord")," is still used for some legacy records which we were not able to migrate to the new format yes (because they rely on resolving objects from the ledger to properly migrate). However in future versions, also these records will be migrated and the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord")," will be removed from the codebase."),(0,r.kt)("p",null,"This means some AnonCreds credentials are stored in ",(0,r.kt)("inlineCode",{parentName:"p"},"W3cCredentialRecord")," format, and some in ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord")," format. Make sure to use the designated methods on the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsModule")," as well as on the ",(0,r.kt)("inlineCode",{parentName:"p"},"ProofsModule")," to find and query for AnonCreds records, to make sure all record types are returned."),(0,r.kt)("p",null,"See ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/pull/1744"},"Pull Request 1744")," for more information."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e9cc1880.a58dacd2.js b/assets/js/e9cc1880.a58dacd2.js new file mode 100644 index 0000000..c84a091 --- /dev/null +++ b/assets/js/e9cc1880.a58dacd2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7822],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>h});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),l=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=l(e.components);return a.createElement(s.Provider,{value:n},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),u=l(t),m=r,h=u["".concat(s,".").concat(m)]||u[m]||c[m]||o;return t?a.createElement(h,i(i({ref:n},p),{},{components:t})):a.createElement(h,i({ref:n},p))}));function h(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=m;var d={};for(var s in n)hasOwnProperty.call(n,s)&&(d[s]=n[s]);d.originalType=e,d[u]="string"==typeof e?e:r,i[1]=d;for(var l=2;l{t.d(n,{Z:()=>i});var a=t(67294),r=t(86010);const o={tabItem:"tabItem_Ymn6"};function i(e){let{children:n,hidden:t,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,i),hidden:t},n)}},74866:(e,n,t)=>{t.d(n,{Z:()=>w});var a=t(87462),r=t(67294),o=t(86010),i=t(12466),d=t(16550),s=t(91980),l=t(67392),p=t(50012);function u(e){return function(e){return r.Children.map(e,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:r}}=e;return{value:n,label:t,attributes:a,default:r}}))}function c(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??u(t);return function(e){const n=(0,l.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function m(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const a=(0,d.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!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 t??null}({queryString:n,groupId:t});return[(0,s._X)(o),(0,r.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(a.location.search);n.set(o,e),a.replace({...a.location,search:n.toString()})}),[o,a])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,o=c(e),[i,d]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:o}))),[s,l]=h({queryString:t,groupId:a}),[u,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,o]=(0,p.Nk)(t);return[a,(0,r.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:a}),k=(()=>{const e=s??u;return m({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{k&&d(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);d(e),l(e),f(e)}),[l,f,o]),tabValues:o}}var k=t(72389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:n,block:t,selectedValue:d,selectValue:s,tabValues:l}=e;const p=[],{blockElementScrollPositionUntilNextRender:u}=(0,i.o5)(),c=e=>{const n=e.currentTarget,t=p.indexOf(n),a=l[t].value;a!==d&&(u(n),s(a))},m=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=p.indexOf(e.currentTarget)+1;n=p[t]??p[0];break}case"ArrowLeft":{const t=p.indexOf(e.currentTarget)-1;n=p[t]??p[p.length-1];break}}n?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},l.map((e=>{let{value:n,label:t,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:d===n?0:-1,"aria-selected":d===n,key:n,ref:e=>p.push(e),onKeyDown:m,onClick:c},i,{className:(0,o.Z)("tabs__item",g.tabItem,i?.className,{"tabs__item--active":d===n})}),t??n)})))}function y(e){let{lazy:n,children:t,selectedValue:a}=e;if(t=Array.isArray(t)?t:[t],n){const e=t.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},t.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a}))))}function b(e){const n=f(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},r.createElement(v,(0,a.Z)({},e,n)),r.createElement(y,(0,a.Z)({},e,n)))}function w(e){const n=(0,k.Z)();return r.createElement(b,(0,a.Z)({key:String(n)},e))}},82268:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>h,frontMatter:()=>d,metadata:()=>l,toc:()=>u});var a=t(87462),r=(t(67294),t(3905)),o=t(74866),i=t(85162);const d={},s="Migrating from Credo 0.4.x to 0.5.x",l={unversionedId:"updating/versions/0.4-to-0.5",id:"updating/versions/0.4-to-0.5",title:"Migrating from Credo 0.4.x to 0.5.x",description:"This document describes everything you need to know for updating Credo 0.4.x to 0.5.x. If you're not aware of how updating in Credo works make sure to first read the guide on Updating Credo, and the Update Assistant. Starting from Credo 0.5, we now support migration of tenant storage in addition to the root wallet. If you're using the tenants module, make sure to read the guides carefully.",source:"@site/guides/updating/versions/0.4-to-0.5.md",sourceDirName:"updating/versions",slug:"/updating/versions/0.4-to-0.5",permalink:"/guides/updating/versions/0.4-to-0.5",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Migrating from Credo 0.3.x to 0.4.x",permalink:"/guides/updating/versions/0.3-to-0.4"},next:{title:"The Credo Ecosystem",permalink:"/guides/ecosystem/"}},p={},u=[{value:"React Native",id:"react-native",level:4},{value:"Node",id:"node",level:4},{value:"Breaking Code Changes",id:"breaking-code-changes",level:2},{value:"Node 16 deprecated",id:"node-16-deprecated",level:3},{value:"Aries to Credo",id:"aries-to-credo",level:3},{value:"Label optional in OutOfBandInvitation",id:"label-optional-in-outofbandinvitation",level:3},{value:"Caching in DidResolver interface",id:"caching-in-didresolver-interface",level:3},{value:"Out Of Band Handshake Protocols enum updated to not include minor version",id:"out-of-band-handshake-protocols-enum-updated-to-not-include-minor-version",level:3},{value:"AnonCreds RS and AnonCreds package combined",id:"anoncreds-rs-and-anoncreds-package-combined",level:3},{value:"0.4.x",id:"04x",level:5},{value:"0.5.x",id:"05x",level:5},{value:"OpenId4VC Holder module",id:"openid4vc-holder-module",level:3},{value:"0.4.x",id:"04x-1",level:5},{value:"0.5.x",id:"05x-1",level:5},{value:"0.4.x",id:"04x-2",level:5},{value:"0.5.x",id:"05x-2",level:5},{value:"Message Pickup",id:"message-pickup",level:3},{value:"Askar short-lived sessions",id:"askar-short-lived-sessions",level:3},{value:"AnonCreds W3C format",id:"anoncreds-w3c-format",level:3}],c={toc:u},m="wrapper";function h(e){let{components:n,...t}=e;return(0,r.kt)(m,(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"migrating-from-credo-04x-to-05x"},"Migrating from Credo 0.4.x to 0.5.x"),(0,r.kt)("p",null,"This document describes everything you need to know for updating Credo 0.4.x to 0.5.x. If you're not aware of how updating in Credo works make sure to first read the guide on ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/"},"Updating Credo"),", and the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-assistant"},"Update Assistant"),". Starting from Credo 0.5, we now support migration of tenant storage in addition to the root wallet. If you're using the tenants module, make sure to read the guides carefully."),(0,r.kt)("p",null,"See ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/pull/1747"},"Pull Request 1747")," for more information.)."),(0,r.kt)("p",null,"First of all, update your dependencies to the 0.5.x versions. This will also update the needed peer dependencies. ",(0,r.kt)("strong",{parentName:"p"},"Extension packages are not updated with this command"),". You need to update these manually, and make sure they're up to date with the latest version of Credo."),(0,r.kt)("p",null,"Credo 0.5.0 is a major release, but there haven't been a lot of breaking changes to the stable API, most of the changes are related to OpenID4VC, SD-JWT VC and DIF Presentation Exchange. One notable change is that the Indy SDK has been fully deprecated and removed from Credo. This means that starting from 0.5, you cannot use Credo with the Indy SDK. If you need to migrate your storage from Indy SDK to Aries Askar, see the note below for instructions. Another notable change is the migration of all AnonCreds credential records to be stored as ",(0,r.kt)("inlineCode",{parentName:"p"},"W3cCredentialRecord")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord"),"."),(0,r.kt)("p",null,"Follow the mentioned steps in this document carefully to make the upgrade as smooth as possible."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The migration guide only covers how to migrate from 0.4.x to 0.5.x while keeping the same behavior and dependencies. Credo 0.4.0 added support for ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-askar"},"Aries Askar"),", ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/indy-vdr"},"Indy VDR")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/anoncreds-rs"},"AnonCreds RS")," as a replacement for the Indy SDK."),(0,r.kt)("p",{parentName:"admonition"},"Migrating to these new components requires additional migration steps, which need to be closely followed to prevent loss of data. These can be found at the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-indy-sdk-to-askar"},"Update Indy SDK to Askar guide"),"."),(0,r.kt)("p",{parentName:"admonition"},"As noted in the ",(0,r.kt)("a",{parentName:"p",href:"/guides/updating/update-indy-sdk-to-askar"},"Update Indy SDK to Askar guide"),", it is very important that the 0.3.x or 0.4x to 0.5.x update is started after migrating from the Indy SDK to Aries Askar."),(0,r.kt)("p",{parentName:"admonition"},"The rest of this guides will ",(0,r.kt)("strong",{parentName:"p"},"assume you have already migrated from the Indy SDK to Aries Askar, AnonCreds and Indy VDR"),".")),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"The following APIs, modules and features are experimental and therefore not covered by the semver versioning in Credo. If you're using any of these features, make sure to use an exact version of Credo (",(0,r.kt)("inlineCode",{parentName:"p"},"0.5.0"),") instead of a range (",(0,r.kt)("inlineCode",{parentName:"p"},"^0.5.0"),"):"),(0,r.kt)("ul",{parentName:"admonition"},(0,r.kt)("li",{parentName:"ul"},"Issuance of revocable AnonCreds credentials and revocation of AnonCreds credentials"),(0,r.kt)("li",{parentName:"ul"},"Using any of the OpenID4VC from the ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts/openid4vc")," package"),(0,r.kt)("li",{parentName:"ul"},"SD-JWT Verifiable Credentials"),(0,r.kt)("li",{parentName:"ul"},"DIF Presentation Exchange"),(0,r.kt)("li",{parentName:"ul"},"Issuance and verification of AnonCreds in W3C Verifiable Credential format"))),(0,r.kt)("p",null,"First install the updated dependencies. For all dependencies you have in ",(0,r.kt)("inlineCode",{parentName:"p"},"package.json"),", update them to the following versions, for your platform. If you don't use a package, you don't have to add it here."),(0,r.kt)("p",null,"In the upgrade from 0.4 to 0.5, Aries Framework JavaScript has been renamed to Credo, and therefore the package scope has also changed. ",(0,r.kt)("strong",{parentName:"p"},"The scope for all packages starting with ",(0,r.kt)("inlineCode",{parentName:"strong"},"@aries-framework")," should be updated to ",(0,r.kt)("inlineCode",{parentName:"strong"},"@credo-ts")),". So ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/core")," becomes ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/core"),", etc.."),(0,r.kt)("p",null,"If you were using ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds-rs"),", these have been combined into ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/anoncreds"),". So ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"@aries-framework/anoncreds-rs")," can be removed from the dependencies"),"."),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{label:"React Native",value:"tab1",mdxType:"TabItem"},(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/*": "^0.5.3"')," - except for packages starting with ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts")," listed below."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/react-hooks": "^0.6.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/push-notifications": "^0.7.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/anoncreds-react-native": "^0.2.2"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/indy-vdr-react-native": "^0.2.2"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/aries-askar-react-native": "^0.2.1"'))),(0,r.kt)("p",null,"In addition, if you were using ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds-rs"),", these have been combined into ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/anoncreds"),". So ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"@aries-framework/anoncreds-rs")," can be removed from the dependencies"),".")),(0,r.kt)(i.Z,{label:"Node",value:"tab2",mdxType:"TabItem"},(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/*": "^0.5.3"')," - except for packages starting with ",(0,r.kt)("inlineCode",{parentName:"li"},"@credo-ts")," listed below."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/react-hooks": "^0.6.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@credo-ts/push-notifications": "^0.7.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/anoncreds-nodejs": "^0.2.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/indy-vdr-nodejs": "^0.2.1"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"@hyperledger/aries-askar-nodejs": "^0.2.0"'))))),(0,r.kt)("h2",{id:"breaking-code-changes"},"Breaking Code Changes"),(0,r.kt)("p",null,"This section will list all breaking changes made to the public API of Credo between version 0.4.x and 0.5.x."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If you have custom modules take into account there could be a lot more breaking changes that aren't documented here. We try to make sure that the biggest breaking changes to the internal API are also documented here, but it is possible some breaking changes are not documented here (feel free to open a pull request).")),(0,r.kt)("h3",{id:"node-16-deprecated"},"Node 16 deprecated"),(0,r.kt)("p",null,"Starting from Credo 0.5, Node 16 has been deprecated and is no longer supported. The supported versions for Credo are Node 18 and 20. We aim to keep support for all LTS releases (the even version numbers) that are either Current, Active, or in Maintenance. Other versions may work, but are not part of our testing and release process."),(0,r.kt)("p",null,"See the ",(0,r.kt)("a",{parentName:"p",href:"https://nodejs.org/en/about/previous-releases#release-schedule"},"Release Schedule")," on the Node.js website for information on past and upcoming Node.js releases."),(0,r.kt)("h3",{id:"aries-to-credo"},"Aries to Credo"),(0,r.kt)("p",null,"With the move from Aries Framework JavaScript to Credo, several classes and imports have been renamed to match the new name. The following imports should be updated:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"AriesFrameworkError")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"CredoError"))),(0,r.kt)("h3",{id:"label-optional-in-outofbandinvitation"},"Label optional in ",(0,r.kt)("inlineCode",{parentName:"h3"},"OutOfBandInvitation")),(0,r.kt)("p",null,"A small change, but the ",(0,r.kt)("inlineCode",{parentName:"p"},"label")," property on an ",(0,r.kt)("inlineCode",{parentName:"p"},"OutOfBandInvitation")," is now optional."),(0,r.kt)("h3",{id:"caching-in-didresolver-interface"},"Caching in ",(0,r.kt)("inlineCode",{parentName:"h3"},"DidResolver")," interface"),(0,r.kt)("p",null,"Did resolving within Credo now support caching of resolved did documents. Especially in some flows where the did document is resolved several times, this can improve performance a lot."),(0,r.kt)("p",null,"If you haven't implemented a custom ",(0,r.kt)("inlineCode",{parentName:"p"},"DidResolver"),", you don't have to do anything to benefit from the new caching behavior, this is enabled by default. If you want to opt out of caching (and have the same behavior as 0.4), you can tweak it using the following properties in the did resolver options:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript"},"const didResult = await agent.dids.resolve('did:example:123', {\n // how long to cache the resolved did document in seconds\n cacheDurationInSeconds: 400,\n // whether to persist the resolved did document in the cache\n persistInCache: true,\n // whether to use the cache for resolving the did document\n useCache: true,\n})\n")),(0,r.kt)("p",null,"If you have implemented a custom did resolver, you need to set the ",(0,r.kt)("inlineCode",{parentName:"p"},"allowsCaching")," property to indicate whether the did resolver allows the documents it resolves to be cached. For example, for local resolvers it's often easier to resolve the document than to have it cached, so you can set ",(0,r.kt)("inlineCode",{parentName:"p"},"allowsCaching")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," (example are ",(0,r.kt)("inlineCode",{parentName:"p"},"did:key"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"did:jwk"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"did:peer"),"). For resolvers that resolve documents from a remote source, it's often better to cache the resolved document, so you can set ",(0,r.kt)("inlineCode",{parentName:"p"},"allowsCaching")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," (example are ",(0,r.kt)("inlineCode",{parentName:"p"},"did:web"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"did:cheqd"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"did:indy"),")."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-typescript"},"export class ExampleDidResolver implements DidResolver {\n public readonly supportedMethods = ['example']\n\n // whether to allow caching\n public readonly allowsCaching = true\n\n public async resolve() {\n // ... resolver implementation\n }\n}\n")),(0,r.kt)("h3",{id:"out-of-band-handshake-protocols-enum-updated-to-not-include-minor-version"},"Out Of Band Handshake Protocols enum updated to not include minor version"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"HandshakeProtocol")," enum, which you can provide when creating out of band invitations, has been updated to not include the minor version in the values anymore. The minor version has instead been replaced by an ",(0,r.kt)("inlineCode",{parentName:"p"},"x"),", indicating it can be any value. If you were only using the enum, this should not cause issues. But if you were relying on the values within the enum to have a specific format, this could cause some issues."),(0,r.kt)("p",null,"For example the value for ",(0,r.kt)("inlineCode",{parentName:"p"},"HandshakeProtocol.DidExchange")," has been updated from ",(0,r.kt)("inlineCode",{parentName:"p"},"https://didcomm.org/didexchange/1.1")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"https://didcomm.org/didexchange/1.x"),"."),(0,r.kt)("h3",{id:"anoncreds-rs-and-anoncreds-package-combined"},"AnonCreds RS and AnonCreds package combined"),(0,r.kt)("p",null,"With the removal of the Indy SDK from Credo, we have made the setup for AnonCreds easier."),(0,r.kt)("p",null,"In 0.4 you had to provide both the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsModule")," (from ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds"),") as well as the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsRsModule")," (from ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/anoncreds-rs"),"). In 0.5 these have been combined into a single ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsModule")," (from ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/anoncreds"),")."),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{label:"0.4.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { AnonCredsModule } from '@aries-framework/anoncreds'\n\n// or import from @hyperledger/anoncreds-react-native in React Native\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst agent = new Agent({\n /* ... rest of agent setup */\n\n modules: {\n anoncreds: new AnonCredsModule({\n registries: [\n /* registries */\n ],\n }),\n anoncredsRs: new AnonCredsRsModule({\n anoncreds,\n }),\n },\n})\n"))),(0,r.kt)(i.Z,{label:"0.5.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from 'credo-ts/core'\nimport { AnonCredsModule } from 'credo-ts/anoncreds'\n\n// or import from @hyperledger/anoncreds-react-native in React Native\nimport { anoncreds } from '@hyperledger/anoncreds-nodejs'\n\nconst agent = new Agent({\n /* ... rest of agent setup */\n\n modules: {\n anoncreds: new AnonCredsModule({\n registries: [\n /* registries */\n ],\n\n // anoncreds has been moved to AnonCredsModule\n anoncreds,\n }),\n },\n})\n")))),(0,r.kt)("h3",{id:"openid4vc-holder-module"},"OpenId4VC Holder module"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/openid4vc-client")," has been deprecated in favour of the new ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/openid4vc")," package."),(0,r.kt)("p",null,"The OpenID4VC Client from Credo/AFJ 0.4 only supported receiving credential using OpenID for Verifiable Credentials Issuance. The new package now also support issuance, proving and verification. This section covers how to update the existing functionality to Credo 0.5, but for a detailed guide on how to use the new OpenID4VC features in Credo, see ",(0,r.kt)("a",{parentName:"p",href:"/guides/oid4vc/index.md"},"OpenID4VC Guide"),"."),(0,r.kt)("p",null,"First update the import of ",(0,r.kt)("inlineCode",{parentName:"p"},"@aries-framework/openid4vc-client")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"@credo-ts/openid4vc"),", and change the module to the new ",(0,r.kt)("inlineCode",{parentName:"p"},"OpenId4VcHolderModule"),":"),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{label:"0.4.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { OpenId4VcClientModule } from '@aries-framework/openid4vc-client'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n /* ... other modules */\n openId4VcClient: new OpenId4VcClientModule(),\n },\n})\n"))),(0,r.kt)(i.Z,{label:"0.5.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { Agent } from '@aries-framework/core'\nimport { OpenId4VcHolderModule } from '@aries-framework/openid4vc'\n\n// Import from @aries-framework/react-native in React Native\nimport { agentDependencies } from '@aries-framework/node'\n\nconst agent = new Agent({\n config: {\n /* ... */\n },\n dependencies: agentDependencies,\n modules: {\n /* ... other modules */\n openId4VcHolder: new OpenId4VcHolderModule(),\n },\n})\n")))),(0,r.kt)("p",null,"Next, update your credential receiving logic to first resolve the credential offer (using ",(0,r.kt)("inlineCode",{parentName:"p"},"agent.modules.openId4VcHolder.resolveCredentialOffer"),"), and then accept the credential offer (using ",(0,r.kt)("inlineCode",{parentName:"p"},"agent.modules.openId4VcHolder.acceptCredentialOfferUsingPreAuthorizedCode"),")."),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{label:"0.4.x",value:"tab1",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { DidKey, KeyDidCreateOptions, JwaSignatureAlgorithm } from '@aries-framework/core'\nimport { OpenIdCredentialFormatProfile } from '@aries-framework/openid4vc-client'\n\n// Example uri\nconst data = 'openid-credential-offer://?credential_offer_uri=...'\n\nawait agent.modules.openId4VcClient.requestCredentialUsingPreAuthorizedCode({\n uri: data,\n proofOfPossessionVerificationMethodResolver: async ({ supportedDidMethods, keyType, supportsAllDidMethods }) => {\n if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) {\n const didResult = await agent.dids.create({\n method: 'key',\n options: {\n keyType,\n },\n })\n\n if (didResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n }\n\n const didKey = DidKey.fromDid(didResult.didState.did)\n\n return didResult.didState.didDocument.dereferenceKey(`${didKey.did}#${didKey.key.fingerprint}`)\n }\n\n throw new Error(`Unable to create a key binding`)\n },\n verifyCredentialStatus: false,\n allowedCredentialFormats: [OpenIdCredentialFormatProfile.JwtVcJson],\n allowedProofOfPossessionSignatureAlgorithms: [JwaSignatureAlgorithm.EdDSA, JwaSignatureAlgorithm.ES256],\n})\n"))),(0,r.kt)(i.Z,{label:"0.5.x",value:"tab2",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { DidKey, KeyDidCreateOptions, JwaSignatureAlgorithm, getJwkFromKey } from '@credo-ts/core'\nimport { OpenId4VciCredentialFormatProfile } from '@credo-ts/openid4vc'\n\n// Example uri\nconst data = 'openid-credential-offer://?credential_offer_uri=...'\n\nconst resolvedCredentialOffer = await agent.modules.openId4VcHolder.resolveCredentialOffer(data)\n\nawait agent.modules.openId4VcHolder.acceptCredentialOfferUsingPreAuthorizedCode(\n // First parameter is now the resolved credential offer\n resolvedCredentialOffer,\n {\n // has been renamed from proofOfPossessionVerificationMethodResolver to credentialBindingResolver\n credentialBindingResolver: async ({\n supportedDidMethods,\n keyType,\n supportsAllDidMethods,\n // supportsJwk now also passed\n supportsJwk,\n credentialFormat,\n }) => {\n // NOTE: example implementation. Adjust based on your needs\n // Return the binding to the credential that should be used. Either did or jwk is supported\n\n if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) {\n const didResult = await agent.dids.create({\n method: 'key',\n options: {\n keyType,\n },\n })\n\n if (didResult.didState.state !== 'finished') {\n throw new Error('DID creation failed.')\n }\n\n const didKey = DidKey.fromDid(didResult.didState.did)\n\n // you now need to return an object instead of VerificationMethod instance\n // and method 'did' or 'jwk'\n return {\n method: 'did',\n didUrl: `${didKey.did}#${didKey.key.fingerprint}`,\n }\n }\n\n // we also support plain jwk for sd-jwt only\n if (supportsJwk && credentialFormat === OpenId4VciCredentialFormatProfile.SdJwtVc) {\n const key = await agent.wallet.createKey({\n keyType,\n })\n\n // you now need to return an object instead of VerificationMethod instance\n // and method 'did' or 'jwk'\n return {\n method: 'jwk',\n jwk: getJwkFromKey(key),\n }\n }\n\n throw new Error('Unable to create a key binding')\n },\n\n verifyCredentialStatus: false,\n allowedProofOfPossessionSignatureAlgorithms: [JwaSignatureAlgorithm.EdDSA, JwaSignatureAlgorithm.ES256],\n }\n)\n")))),(0,r.kt)("h3",{id:"message-pickup"},"Message Pickup"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"TODO: write migration guide for message pickup\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/pull/1638"},"https://github.com/openwallet-foundation/credo-ts/pull/1638"))),(0,r.kt)("h3",{id:"askar-short-lived-sessions"},"Askar short-lived sessions"),(0,r.kt)("p",null,"This is an internal change, but Askar now only uses short-lived sessions. Before a session was created and kept alive until the agent was shutdown or the tenant session was closed (in case of multi-tenancy). Now a session is created for each read and write operation to your wallet."),(0,r.kt)("p",null,"Askar manages a connection pool internally and aligns more with how Askar is supposed to be used, and makes the multi-tenancy implementation more robust. This is also in preparation for some bigger wallet and storage API changes in future versions, where we want to support transactions (batching multiple read/writes operations), record locking (to prevent race condition updates), and more."),(0,r.kt)("p",null,"See ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/pull/1743"},"Pull Request 1743")," for more information."),(0,r.kt)("h3",{id:"anoncreds-w3c-format"},"AnonCreds W3C format"),(0,r.kt)("p",null,"AnonCreds credentials in Credo now support the W3c Verifiable Credential format. Using the new ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/aries-rfcs/latest/features/0809-w3c-data-integrity-credential-attachment/"},"Aries RFC 0809: W3C Verifiable Credential Data Integrity Attachment format")," you can issue AnonCreds credentials in W3C VC Data Integrity format, and verify them in W3C VC Data Integrity using ",(0,r.kt)("a",{parentName:"p",href:"https://hyperledger.github.io/aries-rfcs/latest/aip2/0510-dif-pres-exch-attach/"},"Aries RFC 0510: Presentation-Exchange Attachment format"),"."),(0,r.kt)("p",null,"With the change, we've updated the storage of all AnonCreds credentials to be stored as ",(0,r.kt)("inlineCode",{parentName:"p"},"W3cCredentialRecord")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord"),". The ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord")," is still used for some legacy records which we were not able to migrate to the new format yes (because they rely on resolving objects from the ledger to properly migrate). However in future versions, also these records will be migrated and the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord")," will be removed from the codebase."),(0,r.kt)("p",null,"This means some AnonCreds credentials are stored in ",(0,r.kt)("inlineCode",{parentName:"p"},"W3cCredentialRecord")," format, and some in ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsCredentialRecord")," format. Make sure to use the designated methods on the ",(0,r.kt)("inlineCode",{parentName:"p"},"AnonCredsModule")," as well as on the ",(0,r.kt)("inlineCode",{parentName:"p"},"ProofsModule")," to find and query for AnonCreds records, to make sure all record types are returned."),(0,r.kt)("p",null,"See ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts/pull/1744"},"Pull Request 1744")," for more information."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ee5afc97.f33e19a8.js b/assets/js/ee5afc97.f33e19a8.js new file mode 100644 index 0000000..cf93246 --- /dev/null +++ b/assets/js/ee5afc97.f33e19a8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[6927],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>v});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},c=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,u=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=l(r),g=i,v=d["".concat(u,".").concat(g)]||d[g]||p[g]||o;return r?n.createElement(v,a(a({ref:t},c),{},{components:r})):n.createElement(v,a({ref:t},c))}));function v(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=g;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s[d]="string"==typeof e?e:i,a[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var n=r(87462),i=(r(67294),r(3905));const o={},a="Verifying Credentials using the OpenID4VC Verifier Module",s={unversionedId:"tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module",id:"tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module",title:"Verifying Credentials using the OpenID4VC Verifier Module",description:"This tutorial will guide you through the process of verifying credentials using the OpenID4VC Verifier Module. Before starting this tutorial, make sure you have completed the OpenID4VC Verifier Module Setup.",source:"@site/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module.md",sourceDirName:"tutorials/openid4vc",slug:"/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module",permalink:"/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Receiving and Proving Credentials using the OpenID4VC Holder Module",permalink:"/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module"},next:{title:"Updating Credo",permalink:"/guides/updating/"}},u={},l=[{value:"Creating the verifier",id:"creating-the-verifier",level:2},{value:"Creating an authorization request",id:"creating-an-authorization-request",level:2}],c={toc:l},d="wrapper";function p(e){let{components:t,...r}=e;return(0,i.kt)(d,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"verifying-credentials-using-the-openid4vc-verifier-module"},"Verifying Credentials using the OpenID4VC Verifier Module"),(0,i.kt)("p",null,"This tutorial will guide you through the process of verifying credentials using the OpenID4VC Verifier Module. Before starting this tutorial, make sure you have completed the ",(0,i.kt)("a",{parentName:"p",href:"/guides/getting-started/set-up/openid4vc"},"OpenID4VC Verifier Module Setup"),"."),(0,i.kt)("p",null,"This guides only covers the verification of credentials using the OpenID4VC Verifier Module. Follow the ",(0,i.kt)("a",{parentName:"p",href:"/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module"},"Issuing Credentials using the OpenID4VC Issuer Module")," and ",(0,i.kt)("a",{parentName:"p",href:"/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module"},"Receiving and Proving Credentials using the OpenID4VC Holder Module")," guide to learn how to issuer, receive and prove credentials using the OpenID4VC Issuer and Holder Modules."),(0,i.kt)("h2",{id:"creating-the-verifier"},"Creating the verifier"),(0,i.kt)("p",null,"Once you have set-up your agent (under ",(0,i.kt)("inlineCode",{parentName:"p"},"verifier")," variable), we first need to configure your verifier."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers sd-jwt-vc-openid4vc.ts section-7",showLineNumbers:!0,"sd-jwt-vc-openid4vc.ts":!0,"section-7":!0},"")),(0,i.kt)("h2",{id:"creating-an-authorization-request"},"Creating an authorization request"),(0,i.kt)("p",null,"Once you have configured the verifier, you can create an authorization request including an OpenID4VP presentation request based on ",(0,i.kt)("a",{parentName:"p",href:"https://identity.foundation/presentation-exchange/spec/v2.0.0/"},"DIF Presentation Exchange V2"),". The authorization request method will generate an authorization request URI that you can share with a holder."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers sd-jwt-vc-openid4vc.ts section-8",showLineNumbers:!0,"sd-jwt-vc-openid4vc.ts":!0,"section-8":!0},"")),(0,i.kt)("p",null,"We have also added an event listener that listens for state changed events, this allows us to know when the verification session is done."))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/eeecf87c.d993db09.js b/assets/js/eeecf87c.ef0bd3f4.js similarity index 93% rename from assets/js/eeecf87c.d993db09.js rename to assets/js/eeecf87c.ef0bd3f4.js index d247a79..cb739d3 100644 --- a/assets/js/eeecf87c.d993db09.js +++ b/assets/js/eeecf87c.ef0bd3f4.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7547],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),p=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},l=function(e){var t=p(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=p(r),m=o,f=d["".concat(c,".").concat(m)]||d[m]||u[m]||a;return r?n.createElement(f,i(i({ref:t},l),{},{components:r})):n.createElement(f,i({ref:t},l))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:o,i[1]=s;for(var p=2;p{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));const a={},i="Platform and Environment",s={unversionedId:"concepts/platform-and-environment",id:"concepts/platform-and-environment",title:"Platform and Environment",description:"Credo is developed to support a Node.JS and React Native environment. With this it is entirely possible to build an entire SSI ecosystem with Credo. This would use Node.JS as an issuer as a verifier, and uses React Native as a holder.",source:"@site/guides/concepts/platform-and-environment.md",sourceDirName:"concepts",slug:"/concepts/platform-and-environment",permalink:"/guides/concepts/platform-and-environment",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"DIDs and DIDComm",permalink:"/guides/concepts/did-and-didcomm"},next:{title:"Supported Features",permalink:"/guides/features/"}},c={},p=[],l={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"platform-and-environment"},"Platform and Environment"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"Credo")," is developed to support a ",(0,o.kt)("a",{parentName:"p",href:"https://nodejs.org"},"Node.JS")," and ",(0,o.kt)("a",{parentName:"p",href:"https://reactnative.dev"},"React Native")," environment. With this it is entirely possible to build an entire SSI ecosystem with Credo. This would use Node.JS as an issuer as a verifier, and uses React Native as a holder."))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[7547],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),p=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},l=function(e){var t=p(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=p(r),m=o,f=d["".concat(c,".").concat(m)]||d[m]||u[m]||a;return r?n.createElement(f,i(i({ref:t},l),{},{components:r})):n.createElement(f,i({ref:t},l))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:o,i[1]=s;for(var p=2;p{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));const a={},i="Platform and Environment",s={unversionedId:"concepts/platform-and-environment",id:"concepts/platform-and-environment",title:"Platform and Environment",description:"Credo is developed to support a Node.js and React Native environment. With this it is entirely possible to build an entire SSI ecosystem with Credo. This would use Node.js as an issuer as a verifier, and uses React Native as a holder.",source:"@site/guides/concepts/platform-and-environment.md",sourceDirName:"concepts",slug:"/concepts/platform-and-environment",permalink:"/guides/concepts/platform-and-environment",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"DIDs and DIDComm",permalink:"/guides/concepts/did-and-didcomm"},next:{title:"Supported Features",permalink:"/guides/features/"}},c={},p=[],l={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"platform-and-environment"},"Platform and Environment"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/openwallet-foundation/credo-ts"},"Credo")," is developed to support a ",(0,o.kt)("a",{parentName:"p",href:"https://nodejs.org"},"Node.js")," and ",(0,o.kt)("a",{parentName:"p",href:"https://reactnative.dev"},"React Native")," environment. With this it is entirely possible to build an entire SSI ecosystem with Credo. This would use Node.js as an issuer as a verifier, and uses React Native as a holder."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f800d23c.0551f5cc.js b/assets/js/f800d23c.3e9220c0.js similarity index 98% rename from assets/js/f800d23c.0551f5cc.js rename to assets/js/f800d23c.3e9220c0.js index fb78cfb..6747d55 100644 --- a/assets/js/f800d23c.0551f5cc.js +++ b/assets/js/f800d23c.3e9220c0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[8251],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>g});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),u=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,s=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=u(r),m=n,g=d["".concat(l,".").concat(m)]||d[m]||p[m]||s;return r?a.createElement(g,i(i({ref:t},c),{},{components:r})):a.createElement(g,i({ref:t},c))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=r.length,i=new Array(s);i[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:n,i[1]=o;for(var u=2;u{r.d(t,{Z:()=>i});var a=r(67294),n=r(86010);const s={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:r,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(s.tabItem,i),hidden:r},t)}},74866:(e,t,r)=>{r.d(t,{Z:()=>w});var a=r(87462),n=r(67294),s=r(86010),i=r(12466),o=r(16550),l=r(91980),u=r(67392),c=r(50012);function d(e){return function(e){return n.Children.map(e,(e=>{if((0,n.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}function p(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??d(r);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:r}=e;const a=(0,o.k6)(),s=function(e){let{queryString:t=!1,groupId:r}=e;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 r??null}({queryString:t,groupId:r});return[(0,l._X)(s),(0,n.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(a.location.search);t.set(s,e),a.replace({...a.location,search:t.toString()})}),[s,a])]}function f(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,s=p(e),[i,o]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({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((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:s}))),[l,u]=g({queryString:r,groupId:a}),[d,f]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,s]=(0,c.Nk)(r);return[a,(0,n.useCallback)((e=>{r&&s.set(e)}),[r,s])]}({groupId:a}),b=(()=>{const e=l??d;return m({value:e,tabValues:s})?e:null})();(0,n.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,s]),tabValues:s}}var b=r(72389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:r,selectedValue:o,selectValue:l,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,i.o5)(),p=e=>{const t=e.currentTarget,r=c.indexOf(t),a=u[r].value;a!==o&&(d(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const r=c.indexOf(e.currentTarget)+1;t=c[r]??c[0];break}case"ArrowLeft":{const r=c.indexOf(e.currentTarget)-1;t=c[r]??c[c.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":r},t)},u.map((e=>{let{value:t,label:r,attributes:i}=e;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},i,{className:(0,s.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),r??t)})))}function y(e){let{lazy:t,children:r,selectedValue:a}=e;if(r=Array.isArray(r)?r:[r],t){const e=r.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},r.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=f(e);return n.createElement("div",{className:(0,s.Z)("tabs-container",h.tabList)},n.createElement(k,(0,a.Z)({},e,t)),n.createElement(y,(0,a.Z)({},e,t)))}function w(e){const t=(0,b.Z)();return n.createElement(v,(0,a.Z)({key:String(t)},e))}},50440:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>g,frontMatter:()=>o,metadata:()=>u,toc:()=>d});var a=r(87462),n=(r(67294),r(3905)),s=r(74866),i=r(85162);const o={},l="Aries Askar",u={unversionedId:"getting-started/set-up/aries-askar",id:"getting-started/set-up/aries-askar",title:"Aries Askar",description:"Aries Askar provides secure, encrypted storage and cryptographic support for encrypting, decrypting, signing and verifying data. It also provides both the Wallet and StorageService implementations for the agent.",source:"@site/guides/getting-started/set-up/aries-askar.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/aries-askar",permalink:"/guides/getting-started/set-up/aries-askar",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Agent Setup",permalink:"/guides/getting-started/set-up/"},next:{title:"AnonCreds",permalink:"/guides/getting-started/set-up/anoncreds"}},c={},d=[{value:"Installing Aries Askar",id:"installing-aries-askar",level:3},{value:"Adding Aries Askar to the Agent",id:"adding-aries-askar-to-the-agent",level:3}],p={toc:d},m="wrapper";function g(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"aries-askar"},"Aries Askar"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-askar"},"Aries Askar")," provides secure, encrypted storage and cryptographic support for encrypting, decrypting, signing and verifying data. It also provides both the ",(0,n.kt)("inlineCode",{parentName:"p"},"Wallet")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"StorageService")," implementations for the agent."),(0,n.kt)("admonition",{type:"tip"},(0,n.kt)("p",{parentName:"admonition"},"If you're upgrading from the Indy SDK to Aries Askar, see ",(0,n.kt)("a",{parentName:"p",href:"../updating/update-indy-sdk-to-askar"},"Migrating from an Indy SDK Wallet to Aries Askar"))),(0,n.kt)("h3",{id:"installing-aries-askar"},"Installing Aries Askar"),(0,n.kt)("p",null,"When using Credo with Aries Askar, there are a few extra dependencies that need to be installed. We need to install the ",(0,n.kt)("inlineCode",{parentName:"p"},"@credo-ts/askar")," package, which implements the needed interfaces for the agent. Secondly, we need to add native bindings for the specific platform ",(0,n.kt)("inlineCode",{parentName:"p"},"@hyperledger/aries-askar-"),". Currently there are bindings for Node.JS, as ",(0,n.kt)("inlineCode",{parentName:"p"},"@hyperledger/aries-askar-nodejs"),", and React Native as ",(0,n.kt)("inlineCode",{parentName:"p"},"@hyperlegder/aries-askar-react-native"),"."),(0,n.kt)(s.Z,{mdxType:"Tabs"},(0,n.kt)(i.Z,{label:"Node.JS",value:"tab1",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/askar@^0.5.3 @hyperledger/aries-askar-nodejs@^0.2.1\n"))),(0,n.kt)(i.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/askar@^0.5.3 @hyperledger/aries-askar-react-native@^0.2.1\n")))),(0,n.kt)("h3",{id:"adding-aries-askar-to-the-agent"},"Adding Aries Askar to the Agent"),(0,n.kt)("p",null,"After installing the dependencies, we can register the Askar Module on the agent."),(0,n.kt)(s.Z,{mdxType:"Tabs"},(0,n.kt)(i.Z,{label:"Node.JS",value:"tab1",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-askar.ts section-1",showLineNumbers:!0,"set-up-askar.ts":!0,"section-1":!0},""))),(0,n.kt)(i.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-askar-rn.ts section-1",showLineNumbers:!0,"set-up-askar-rn.ts":!0,"section-1":!0},"")))))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[8251],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>g});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),u=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,s=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),d=u(r),m=n,g=d["".concat(l,".").concat(m)]||d[m]||p[m]||s;return r?a.createElement(g,i(i({ref:t},c),{},{components:r})):a.createElement(g,i({ref:t},c))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=r.length,i=new Array(s);i[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:n,i[1]=o;for(var u=2;u{r.d(t,{Z:()=>i});var a=r(67294),n=r(86010);const s={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:r,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(s.tabItem,i),hidden:r},t)}},74866:(e,t,r)=>{r.d(t,{Z:()=>w});var a=r(87462),n=r(67294),s=r(86010),i=r(12466),o=r(16550),l=r(91980),u=r(67392),c=r(50012);function d(e){return function(e){return n.Children.map(e,(e=>{if((0,n.isValidElement)(e)&&"value"in e.props)return e;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.`)}))}(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}function p(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??d(r);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:r}=e;const a=(0,o.k6)(),s=function(e){let{queryString:t=!1,groupId:r}=e;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 r??null}({queryString:t,groupId:r});return[(0,l._X)(s),(0,n.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(a.location.search);t.set(s,e),a.replace({...a.location,search:t.toString()})}),[s,a])]}function f(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,s=p(e),[i,o]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({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((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:s}))),[l,u]=g({queryString:r,groupId:a}),[d,f]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,s]=(0,c.Nk)(r);return[a,(0,n.useCallback)((e=>{r&&s.set(e)}),[r,s])]}({groupId:a}),b=(()=>{const e=l??d;return m({value:e,tabValues:s})?e:null})();(0,n.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),f(e)}),[u,f,s]),tabValues:s}}var b=r(72389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:r,selectedValue:o,selectValue:l,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,i.o5)(),p=e=>{const t=e.currentTarget,r=c.indexOf(t),a=u[r].value;a!==o&&(d(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const r=c.indexOf(e.currentTarget)+1;t=c[r]??c[0];break}case"ArrowLeft":{const r=c.indexOf(e.currentTarget)-1;t=c[r]??c[c.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":r},t)},u.map((e=>{let{value:t,label:r,attributes:i}=e;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},i,{className:(0,s.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),r??t)})))}function y(e){let{lazy:t,children:r,selectedValue:a}=e;if(r=Array.isArray(r)?r:[r],t){const e=r.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},r.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=f(e);return n.createElement("div",{className:(0,s.Z)("tabs-container",h.tabList)},n.createElement(k,(0,a.Z)({},e,t)),n.createElement(y,(0,a.Z)({},e,t)))}function w(e){const t=(0,b.Z)();return n.createElement(v,(0,a.Z)({key:String(t)},e))}},50440:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>g,frontMatter:()=>o,metadata:()=>u,toc:()=>d});var a=r(87462),n=(r(67294),r(3905)),s=r(74866),i=r(85162);const o={},l="Aries Askar",u={unversionedId:"getting-started/set-up/aries-askar",id:"getting-started/set-up/aries-askar",title:"Aries Askar",description:"Aries Askar provides secure, encrypted storage and cryptographic support for encrypting, decrypting, signing and verifying data. It also provides both the Wallet and StorageService implementations for the agent.",source:"@site/guides/getting-started/set-up/aries-askar.md",sourceDirName:"getting-started/set-up",slug:"/getting-started/set-up/aries-askar",permalink:"/guides/getting-started/set-up/aries-askar",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Agent Setup",permalink:"/guides/getting-started/set-up/"},next:{title:"AnonCreds",permalink:"/guides/getting-started/set-up/anoncreds"}},c={},d=[{value:"Installing Aries Askar",id:"installing-aries-askar",level:3},{value:"Adding Aries Askar to the Agent",id:"adding-aries-askar-to-the-agent",level:3}],p={toc:d},m="wrapper";function g(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"aries-askar"},"Aries Askar"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/hyperledger/aries-askar"},"Aries Askar")," provides secure, encrypted storage and cryptographic support for encrypting, decrypting, signing and verifying data. It also provides both the ",(0,n.kt)("inlineCode",{parentName:"p"},"Wallet")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"StorageService")," implementations for the agent."),(0,n.kt)("admonition",{type:"tip"},(0,n.kt)("p",{parentName:"admonition"},"If you're upgrading from the Indy SDK to Aries Askar, see ",(0,n.kt)("a",{parentName:"p",href:"../updating/update-indy-sdk-to-askar"},"Migrating from an Indy SDK Wallet to Aries Askar"))),(0,n.kt)("h3",{id:"installing-aries-askar"},"Installing Aries Askar"),(0,n.kt)("p",null,"When using Credo with Aries Askar, there are a few extra dependencies that need to be installed. We need to install the ",(0,n.kt)("inlineCode",{parentName:"p"},"@credo-ts/askar")," package, which implements the needed interfaces for the agent. Secondly, we need to add native bindings for the specific platform ",(0,n.kt)("inlineCode",{parentName:"p"},"@hyperledger/aries-askar-"),". Currently there are bindings for Node.js, as ",(0,n.kt)("inlineCode",{parentName:"p"},"@hyperledger/aries-askar-nodejs"),", and React Native as ",(0,n.kt)("inlineCode",{parentName:"p"},"@hyperlegder/aries-askar-react-native"),"."),(0,n.kt)(s.Z,{mdxType:"Tabs"},(0,n.kt)(i.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/askar@^0.5.3 @hyperledger/aries-askar-nodejs@^0.2.1\n"))),(0,n.kt)(i.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-console"},"yarn add @credo-ts/askar@^0.5.3 @hyperledger/aries-askar-react-native@^0.2.1\n")))),(0,n.kt)("h3",{id:"adding-aries-askar-to-the-agent"},"Adding Aries Askar to the Agent"),(0,n.kt)("p",null,"After installing the dependencies, we can register the Askar Module on the agent."),(0,n.kt)(s.Z,{mdxType:"Tabs"},(0,n.kt)(i.Z,{label:"Node.js",value:"tab1",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-askar.ts section-1",showLineNumbers:!0,"set-up-askar.ts":!0,"section-1":!0},""))),(0,n.kt)(i.Z,{label:"React Native",value:"tab2",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript",metastring:"showLineNumbers set-up-askar-rn.ts section-1",showLineNumbers:!0,"set-up-askar-rn.ts":!0,"section-1":!0},"")))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.3bcc4867.js b/assets/js/main.3bcc4867.js new file mode 100644 index 0000000..c923697 --- /dev/null +++ b/assets/js/main.3bcc4867.js @@ -0,0 +1,2 @@ +/*! For license information please see main.3bcc4867.js.LICENSE.txt */ +(self.webpackChunkcredo_ts_docs=self.webpackChunkcredo_ts_docs||[]).push([[179],{723:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(67294),i=n(87462),a=n(68356),o=n.n(a),s=n(16887);const l={"042faa40":[()=>Promise.all([n.e(532),n.e(4664)]).then(n.bind(n,64453)),"@site/guides/tutorials/openid4vc/index.md",64453],"05113313":[()=>n.e(5062).then(n.t.bind(n,96524,19)),"~docs/default/version-0-3-metadata-prop-dd4.json",96524],"07ca6c5c":[()=>n.e(35).then(n.bind(n,96141)),"@site/versioned_docs/version-0.3/tutorials/postgres-database-nodejs/linux.md",96141],"08ca7335":[()=>Promise.all([n.e(532),n.e(7303)]).then(n.bind(n,10929)),"@site/versioned_docs/version-0.3/tutorials/issue-a-credential.md",10929],"09958099":[()=>n.e(2743).then(n.bind(n,22588)),"@site/versioned_docs/version-0.4/tutorials/cheqd/index.md",22588],"0a88801c":[()=>Promise.all([n.e(532),n.e(2215)]).then(n.bind(n,91824)),"@site/versioned_docs/version-0.4/getting-started/set-up/indy-sdk/index.md",91824],"0c824aea":[()=>Promise.all([n.e(532),n.e(1350)]).then(n.bind(n,77114)),"@site/guides/getting-started/set-up/cheqd/index.md",77114],"0d8c2653":[()=>n.e(4105).then(n.bind(n,23141)),"@site/versioned_docs/version-0.4/tutorials/indy-sdk-postgres-database-nodejs/windows.md",23141],"0e983491":[()=>n.e(8026).then(n.bind(n,85075)),"@site/versioned_docs/version-0.3/getting-started/installation/react-native/android.md",85075],"0ecb752f":[()=>n.e(7824).then(n.bind(n,47057)),"@site/guides/updating/update-indy-sdk-to-askar.md",47057],"0f95bd9e":[()=>n.e(7885).then(n.bind(n,26449)),"@site/guides/concepts/agents.md",26449],12357581:[()=>n.e(6657).then(n.bind(n,16511)),"@site/versioned_docs/version-0.3/concepts/did-and-didcomm.md",16511],"14973ffc":[()=>Promise.all([n.e(532),n.e(5554)]).then(n.bind(n,24814)),"@site/versioned_docs/version-0.4/extensions/redux-store.md",24814],"14e53ecf":[()=>Promise.all([n.e(532),n.e(1904)]).then(n.bind(n,43635)),"@site/guides/updating/versions/0.3-to-0.4.md",43635],17896441:[()=>Promise.all([n.e(532),n.e(2120),n.e(903),n.e(7918)]).then(n.bind(n,10903)),"@theme/DocItem",10903],"17b50570":[()=>n.e(9593).then(n.t.bind(n,86514,19)),"~docs/default/version-0-4-metadata-prop-a32.json",86514],"1bb97b5b":[()=>n.e(5252).then(n.bind(n,26907)),"@site/versioned_docs/version-0.3/extensions/rest/setup.md",26907],"1be78505":[()=>Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,19963)),"@theme/DocPage",19963],"1c0f7eb0":[()=>Promise.all([n.e(532),n.e(6614)]).then(n.bind(n,23018)),"@site/versioned_docs/version-0.4/getting-started/set-up/index.md",23018],"1cc62cef":[()=>n.e(9626).then(n.bind(n,55627)),"@site/versioned_docs/version-0.4/ecosystem/index.md",55627],"1df93b7f":[()=>Promise.all([n.e(532),n.e(3237)]).then(n.bind(n,78391)),"@site/src/pages/index.tsx",78391],"1f391b9e":[()=>Promise.all([n.e(532),n.e(2120),n.e(3085)]).then(n.bind(n,14247)),"@theme/MDXPage",14247],"2003ac23":[()=>Promise.all([n.e(532),n.e(7529)]).then(n.bind(n,56314)),"@site/guides/concepts/index.md",56314],"207a1e16":[()=>n.e(6407).then(n.bind(n,34590)),"@site/versioned_docs/version-0.4/extensions/rest.md",34590],"224ce49c":[()=>n.e(8135).then(n.bind(n,57563)),"@site/versioned_docs/version-0.4/getting-started/set-up/indy-sdk/macos-intel.md",57563],"232d48ef":[()=>Promise.all([n.e(532),n.e(2959)]).then(n.bind(n,30189)),"@site/versioned_docs/version-0.4/updating/index.md",30189],"2332f431":[()=>Promise.all([n.e(532),n.e(82)]).then(n.bind(n,75920)),"@site/guides/getting-started/set-up/index.md",75920],"27320d50":[()=>Promise.all([n.e(532),n.e(8377)]).then(n.bind(n,67665)),"@site/versioned_docs/version-0.3/extensions/index.md",67665],"29b62a39":[()=>n.e(1498).then(n.bind(n,20740)),"@site/guides/index.md",20740],"2bf743db":[()=>n.e(5880).then(n.bind(n,64275)),"@site/versioned_docs/version-0.4/getting-started/set-up/indy-sdk/windows.md",64275],"2e77271a":[()=>Promise.all([n.e(532),n.e(7024)]).then(n.bind(n,7079)),"@site/versioned_docs/version-0.4/updating/versions/0.2-to-0.3.md",7079],"2fde4558":[()=>n.e(1232).then(n.bind(n,36517)),"@site/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module.md",36517],"30ebf81b":[()=>Promise.all([n.e(532),n.e(1912)]).then(n.bind(n,52286)),"@site/versioned_docs/version-0.4/getting-started/prerequisites.md",52286],"3209acdd":[()=>n.e(7486).then(n.bind(n,85512)),"@site/guides/getting-started/set-up/openid4vc.md",85512],32456564:[()=>n.e(8937).then(n.bind(n,34462)),"@site/guides/updating/update-assistant.md",34462],"331e6edf":[()=>Promise.all([n.e(532),n.e(9196)]).then(n.bind(n,58856)),"@site/guides/updating/index.md",58856],"334d54c0":[()=>Promise.all([n.e(532),n.e(37)]).then(n.bind(n,31251)),"@site/versioned_docs/version-0.3/concepts/index.md",31251],"3483c478":[()=>n.e(3338).then(n.bind(n,36329)),"@site/versioned_docs/version-0.3/getting-started/installation/nodejs/index.md",36329],"34eb4307":[()=>n.e(7314).then(n.bind(n,80684)),"@site/versioned_docs/version-0.4/index.md",80684],"365d3941":[()=>Promise.all([n.e(532),n.e(6347)]).then(n.bind(n,78412)),"@site/guides/updating/versions/0.2-to-0.3.md",78412],"369c14e0":[()=>n.e(2913).then(n.bind(n,46998)),"@site/guides/features/openid4vc.md",46998],"36fa027f":[()=>n.e(241).then(n.bind(n,23844)),"@site/versioned_docs/version-0.3/getting-started/installation/index.md",23844],"393be207":[()=>n.e(7414).then(n.bind(n,53123)),"@site/src/pages/markdown-page.md",53123],"394d7bf2":[()=>Promise.all([n.e(532),n.e(8368)]).then(n.bind(n,33172)),"@site/guides/getting-started/set-up/indy-vdr.md",33172],"41c1fec5":[()=>n.e(8796).then(n.bind(n,25669)),"@site/guides/features/dids.md",25669],"4359f0b8":[()=>n.e(3143).then(n.bind(n,10480)),"@site/versioned_docs/version-0.3/getting-started/installation/nodejs/apple-intel.md",10480],"43e7938e":[()=>Promise.all([n.e(532),n.e(5846)]).then(n.bind(n,76230)),"@site/versioned_docs/version-0.4/tutorials/issue-a-credential.md",76230],"466eb4b6":[()=>n.e(4354).then(n.bind(n,16225)),"@site/guides/tutorials/registering-schema-and-credential-definition.md",16225],"470c56a2":[()=>Promise.all([n.e(532),n.e(9474)]).then(n.bind(n,78354)),"@site/versioned_docs/version-0.3/updating/versions/0.2-to-0.3.md",78354],"4a99cab5":[()=>Promise.all([n.e(532),n.e(4378)]).then(n.bind(n,62655)),"@site/versioned_docs/version-0.4/getting-started/set-up/cheqd/index.md",62655],"4e1c6ae4":[()=>n.e(7873).then(n.bind(n,23865)),"@site/versioned_docs/version-0.3/tutorials/agent-config/index.md",23865],"4ee9ed1d":[()=>n.e(9567).then(n.bind(n,75175)),"@site/versioned_docs/version-0.3/getting-started/installation/react-native/index.md",75175],"514aaf1d":[()=>n.e(2050).then(n.bind(n,29138)),"@site/guides/features/aries.md",29138],"52db191f":[()=>n.e(6059).then(n.bind(n,37242)),"@site/versioned_docs/version-0.4/tutorials/agent-config/index.md",37242],"58e9d200":[()=>n.e(6974).then(n.bind(n,78463)),"@site/versioned_docs/version-0.4/updating/update-indy-sdk-to-askar.md",78463],"5a512b94":[()=>Promise.all([n.e(532),n.e(4602)]).then(n.bind(n,71548)),"@site/versioned_docs/version-0.4/getting-started/set-up/aries-askar.md",71548],"5d1c397c":[()=>n.e(6840).then(n.bind(n,6770)),"@site/guides/tutorials/agent-config/logging.md",6770],"5d8cec60":[()=>Promise.all([n.e(532),n.e(6751)]).then(n.bind(n,61156)),"@site/guides/extensions/index.md",61156],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,36809)),"@generated/docusaurus.config",36809],60053357:[()=>n.e(6266).then(n.bind(n,37147)),"@site/guides/tutorials/mediation.md",37147],"636a146f":[()=>n.e(5313).then(n.bind(n,43097)),"@site/guides/ecosystem/index.md",43097],"6414033c":[()=>Promise.all([n.e(532),n.e(4226)]).then(n.bind(n,27574)),"@site/guides/features/index.md",27574],"655fc6f5":[()=>n.e(2562).then(n.bind(n,57731)),"@site/versioned_docs/version-0.3/getting-started/installation/nodejs/windows.md",57731],"65c86d7b":[()=>Promise.all([n.e(532),n.e(6295)]).then(n.bind(n,69234)),"@site/guides/updating/versions/0.1-to-0.2.md",69234],"67da112e":[()=>n.e(5666).then(n.bind(n,37625)),"@site/guides/tutorials/agent-config/index.md",37625],"69f8e48e":[()=>n.e(9047).then(n.bind(n,73474)),"@site/versioned_docs/version-0.3/extensions/react-hooks/index.md",73474],"6c6797b5":[()=>n.e(1229).then(n.bind(n,80749)),"@site/versioned_docs/version-0.4/concepts/did-and-didcomm.md",80749],"6d44cf95":[()=>Promise.all([n.e(532),n.e(7798)]).then(n.bind(n,90160)),"@site/versioned_docs/version-0.4/tutorials/index.md",90160],"6d708c3d":[()=>Promise.all([n.e(532),n.e(3666)]).then(n.bind(n,77342)),"@site/versioned_docs/version-0.4/getting-started/index.md",77342],"6df87a7d":[()=>Promise.all([n.e(532),n.e(7844)]).then(n.bind(n,74766)),"@site/versioned_docs/version-0.3/getting-started/index.md",74766],"6e4808e6":[()=>Promise.all([n.e(532),n.e(1271)]).then(n.bind(n,41752)),"@site/guides/extensions/react-hooks.md",41752],"70f061b3":[()=>n.e(3531).then(n.t.bind(n,15745,19)),"/home/runner/work/credo-ts-docs/credo-ts-docs/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",15745],"7138c4a2":[()=>n.e(6718).then(n.bind(n,8937)),"@site/versioned_docs/version-0.3/extensions/rest/index.md",8937],"74ce5ee1":[()=>n.e(1454).then(n.bind(n,54474)),"@site/versioned_docs/version-0.3/concepts/agents.md",54474],"7697e6e6":[()=>n.e(7867).then(n.bind(n,55064)),"@site/guides/features/credentials.md",55064],"76f8726c":[()=>n.e(8440).then(n.bind(n,50708)),"@site/guides/tutorials/cheqd/index.md",50708],"7852f2cc":[()=>n.e(9910).then(n.bind(n,94813)),"@site/versioned_docs/version-0.4/tutorials/indy-sdk-postgres-database-nodejs/macos.md",94813],"7bb6402a":[()=>n.e(8980).then(n.bind(n,19050)),"@site/versioned_docs/version-0.3/tutorials/agent-config/logging.md",19050],"7d0a541a":[()=>Promise.all([n.e(532),n.e(397)]).then(n.bind(n,44689)),"@site/versioned_docs/version-0.4/concepts/index.md",44689],"7d25e484":[()=>Promise.all([n.e(532),n.e(6696)]).then(n.bind(n,88505)),"@site/versioned_docs/version-0.3/extensions/push-notifications/setup.md",88505],"862058fd":[()=>n.e(8709).then(n.bind(n,48286)),"@site/versioned_docs/version-0.4/tutorials/mediation.md",48286],"8b37bb4b":[()=>Promise.all([n.e(532),n.e(4565)]).then(n.bind(n,13624)),"@site/versioned_docs/version-0.4/getting-started/set-up/indy-vdr.md",13624],"8b5bb00b":[()=>Promise.all([n.e(532),n.e(8417)]).then(n.bind(n,48610)),"@site/versioned_docs/version-0.4/updating/versions/0.1-to-0.2.md",48610],"8c506fba":[()=>n.e(8866).then(n.bind(n,57709)),"@site/versioned_docs/version-0.3/getting-started/prerequisites/index.md",57709],"8eb39dbb":[()=>Promise.all([n.e(532),n.e(7086)]).then(n.bind(n,96704)),"@site/guides/tutorials/issue-an-anoncreds-credential-over-didcomm.md",96704],"91053f61":[()=>n.e(4809).then(n.bind(n,94634)),"@site/versioned_docs/version-0.3/index.md",94634],92188087:[()=>n.e(537).then(n.bind(n,84228)),"@site/guides/extensions/rest.md",84228],"926eb7a7":[()=>n.e(792).then(n.bind(n,51026)),"@site/versioned_docs/version-0.3/tutorials/postgres-database-nodejs/index.md",51026],"93020ce9":[()=>n.e(3859).then(n.bind(n,78658)),"@site/versioned_docs/version-0.3/extensions/redux-store/index.md",78658],"935f2afb":[()=>n.e(53).then(n.t.bind(n,1109,19)),"~docs/default/version-current-metadata-prop-751.json",1109],"9436892d":[()=>n.e(5260).then(n.bind(n,81593)),"@site/versioned_docs/version-0.3/extensions/push-notifications/index.md",81593],95261082:[()=>Promise.all([n.e(532),n.e(2086)]).then(n.bind(n,13418)),"@site/guides/extensions/push-notifications.md",13418],"96bb78d2":[()=>Promise.all([n.e(532),n.e(7988)]).then(n.bind(n,61131)),"@site/versioned_docs/version-0.3/extensions/redux-store/setup.md",61131],"996925d9":[()=>Promise.all([n.e(532),n.e(3901)]).then(n.bind(n,1089)),"@site/guides/getting-started/prerequisites.md",1089],"997e3d85":[()=>Promise.all([n.e(532),n.e(2680)]).then(n.bind(n,13583)),"@site/versioned_docs/version-0.4/extensions/index.md",13583],"9cd8fd3e":[()=>n.e(8399).then(n.bind(n,7438)),"@site/versioned_docs/version-0.3/getting-started/installation/nodejs/apple-arm.md",7438],"9d3b2a0c":[()=>n.e(526).then(n.bind(n,85151)),"@site/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module.md",85151],"9edc454f":[()=>n.e(7854).then(n.bind(n,84797)),"@site/versioned_docs/version-0.4/getting-started/set-up/indy-sdk/react-native.md",84797],a1dc5557:[()=>n.e(8230).then(n.bind(n,4087)),"@site/versioned_docs/version-0.4/tutorials/indy-sdk-postgres-database-nodejs/index.md",4087],a2a3716e:[()=>Promise.all([n.e(532),n.e(644)]).then(n.bind(n,74789)),"@site/guides/tutorials/index.md",74789],a690f229:[()=>n.e(9841).then(n.bind(n,8211)),"@site/versioned_docs/version-0.4/updating/update-assistant.md",8211],a69e7b9a:[()=>Promise.all([n.e(532),n.e(4365)]).then(n.bind(n,56935)),"@site/guides/extensions/redux-store.md",56935],a9c79318:[()=>Promise.all([n.e(532),n.e(6625)]).then(n.bind(n,30534)),"@site/versioned_docs/version-0.3/getting-started/set-up/index.md",30534],acdd3ecd:[()=>n.e(1317).then(n.bind(n,18693)),"@site/versioned_docs/version-0.3/ecosystem/index.md",18693],b1d5f389:[()=>Promise.all([n.e(532),n.e(9843)]).then(n.bind(n,6457)),"@site/versioned_docs/version-0.4/extensions/react-hooks.md",6457],b56c3f57:[()=>Promise.all([n.e(532),n.e(7610)]).then(n.bind(n,69387)),"@site/versioned_docs/version-0.3/tutorials/index.md",69387],bcace162:[()=>Promise.all([n.e(532),n.e(752)]).then(n.bind(n,18150)),"@site/versioned_docs/version-0.4/extensions/push-notifications.md",18150],bd127040:[()=>Promise.all([n.e(532),n.e(6142)]).then(n.bind(n,51e3)),"@site/versioned_docs/version-0.3/getting-started/installation/nodejs/linux.md",51e3],bf52c953:[()=>n.e(4220).then(n.bind(n,59083)),"@site/versioned_docs/version-0.3/concepts/platform-and-environment.md",59083],c2afb9af:[()=>Promise.all([n.e(532),n.e(1389)]).then(n.bind(n,5331)),"@site/versioned_docs/version-0.3/extensions/react-hooks/setup.md",5331],c5cd793e:[()=>n.e(8925).then(n.bind(n,42290)),"@site/versioned_docs/version-0.4/tutorials/registering-schema-and-credential-definition.md",42290],c970593d:[()=>Promise.all([n.e(532),n.e(703)]).then(n.bind(n,4933)),"@site/versioned_docs/version-0.3/updating/index.md",4933],ca99fa15:[()=>n.e(3080).then(n.bind(n,98626)),"@site/guides/concepts/did-and-didcomm.md",98626],d1089d1d:[()=>n.e(1270).then(n.bind(n,73147)),"@site/versioned_docs/version-0.3/tutorials/postgres-database-nodejs/macos.md",73147],d26e5579:[()=>Promise.all([n.e(532),n.e(9080)]).then(n.bind(n,69533)),"@site/versioned_docs/version-0.4/getting-started/set-up/indy-sdk/linux.md",69533],d42e1e6c:[()=>Promise.all([n.e(532),n.e(2226)]).then(n.bind(n,77529)),"@site/versioned_docs/version-0.3/tutorials/create-a-connection.md",77529],d68982b8:[()=>n.e(7608).then(n.bind(n,18161)),"@site/versioned_docs/version-0.3/getting-started/installation/react-native/ios.md",18161],da788397:[()=>Promise.all([n.e(532),n.e(4281)]).then(n.bind(n,83423)),"@site/guides/getting-started/set-up/anoncreds.md",83423],daf4660b:[()=>Promise.all([n.e(532),n.e(8692)]).then(n.bind(n,61618)),"@site/versioned_docs/version-0.3/updating/versions/0.1-to-0.2.md",61618],dc62edf2:[()=>Promise.all([n.e(532),n.e(4827)]).then(n.bind(n,10695)),"@site/guides/getting-started/index.md",10695],debd89ec:[()=>n.e(4767).then(n.bind(n,70281)),"@site/versioned_docs/version-0.4/tutorials/agent-config/logging.md",70281],e38b62c8:[()=>n.e(7162).then(n.bind(n,31289)),"@site/versioned_docs/version-0.4/concepts/platform-and-environment.md",31289],e4252094:[()=>n.e(1776).then(n.t.bind(n,83769,19)),"/home/runner/work/credo-ts-docs/credo-ts-docs/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",83769],e5a09f30:[()=>Promise.all([n.e(532),n.e(2254)]).then(n.bind(n,73570)),"@site/versioned_docs/version-0.4/getting-started/set-up/anoncreds-rs.md",73570],e5f12b68:[()=>n.e(4656).then(n.bind(n,11971)),"@site/versioned_docs/version-0.3/updating/update-assistant.md",11971],e9cc1880:[()=>Promise.all([n.e(532),n.e(7822)]).then(n.bind(n,82268)),"@site/guides/updating/versions/0.4-to-0.5.md",82268],ece13197:[()=>n.e(9852).then(n.bind(n,11920)),"@site/versioned_docs/version-0.4/concepts/agents.md",11920],ee5afc97:[()=>n.e(6927).then(n.bind(n,46744)),"@site/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module.md",46744],ee7869b6:[()=>n.e(7240).then(n.bind(n,23944)),"@site/versioned_docs/version-0.4/getting-started/set-up/indy-sdk/macos-arm.md",23944],ee898636:[()=>Promise.all([n.e(532),n.e(9233)]).then(n.bind(n,52757)),"@site/versioned_docs/version-0.4/tutorials/create-a-connection.md",52757],eeecf87c:[()=>n.e(7547).then(n.bind(n,53076)),"@site/guides/concepts/platform-and-environment.md",53076],ef7acecf:[()=>Promise.all([n.e(532),n.e(2925)]).then(n.bind(n,62960)),"@site/guides/tutorials/create-a-connection.md",62960],f30d32a5:[()=>n.e(2637).then(n.bind(n,72736)),"@site/versioned_docs/version-0.4/tutorials/indy-sdk-postgres-database-nodejs/linux.md",72736],f3933b6b:[()=>n.e(911).then(n.bind(n,71033)),"@site/versioned_docs/version-0.3/tutorials/postgres-database-nodejs/windows.md",71033],f800d23c:[()=>Promise.all([n.e(532),n.e(8251)]).then(n.bind(n,50440)),"@site/guides/getting-started/set-up/aries-askar.md",50440],fd1a8f62:[()=>Promise.all([n.e(532),n.e(77)]).then(n.bind(n,29522)),"@site/versioned_docs/version-0.4/updating/versions/0.3-to-0.4.md",29522]};function u(e){let{error:t,retry:n,pastDelay:i}=e;return t?r.createElement("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%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):i?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("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"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var c=n(99670),d=n(30226);function p(e,t){if("*"===e)return o()({loading:u,loader:()=>n.e(4972).then(n.bind(n,4972)),modules:["@theme/NotFound"],webpack:()=>[4972],render(e,t){const n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});const a=s[`${e}-${t}`],p={},f=[],m=[],g=(0,c.Z)(a);return Object.entries(g).forEach((e=>{let[t,n]=e;const r=l[n];r&&(p[t]=r[0],f.push(r[1]),m.push(r[2]))})),o().Map({loading:u,loader:p,modules:f,webpack:()=>m,render(t,n){const o=JSON.parse(JSON.stringify(a));Object.entries(t).forEach((t=>{let[n,r]=t;const i=r.default;if(!i)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 i&&"function"!=typeof i||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{i[e]=r[e]}));let a=o;const s=n.split(".");s.slice(0,-1).forEach((e=>{a=a[e]})),a[s[s.length-1]]=i}));const s=o.__comp;delete o.__comp;const l=o.__context;return delete o.__context,r.createElement(d.z,{value:l},r.createElement(s,(0,i.Z)({},o,n)))}})}const f=[{path:"/markdown-page",component:p("/markdown-page","ff5"),exact:!0},{path:"/guides/0.3",component:p("/guides/0.3","769"),routes:[{path:"/guides/0.3",component:p("/guides/0.3","c55"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/concepts",component:p("/guides/0.3/concepts","8ed"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/concepts/agents",component:p("/guides/0.3/concepts/agents","26a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/concepts/did-and-didcomm",component:p("/guides/0.3/concepts/did-and-didcomm","cae"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/concepts/platform-and-environment",component:p("/guides/0.3/concepts/platform-and-environment","c83"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/ecosystem",component:p("/guides/0.3/ecosystem","6e2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions",component:p("/guides/0.3/extensions","89d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions/push-notifications",component:p("/guides/0.3/extensions/push-notifications","83d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions/push-notifications/setup",component:p("/guides/0.3/extensions/push-notifications/setup","4e7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions/react-hooks",component:p("/guides/0.3/extensions/react-hooks","27a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions/react-hooks/setup",component:p("/guides/0.3/extensions/react-hooks/setup","042"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions/redux-store",component:p("/guides/0.3/extensions/redux-store","17e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions/redux-store/setup",component:p("/guides/0.3/extensions/redux-store/setup","e20"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions/rest",component:p("/guides/0.3/extensions/rest","f47"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/extensions/rest/setup",component:p("/guides/0.3/extensions/rest/setup","856"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started",component:p("/guides/0.3/getting-started","09e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation",component:p("/guides/0.3/getting-started/installation","210"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation/nodejs",component:p("/guides/0.3/getting-started/installation/nodejs","d46"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation/nodejs/apple-arm",component:p("/guides/0.3/getting-started/installation/nodejs/apple-arm","fbf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation/nodejs/apple-intel",component:p("/guides/0.3/getting-started/installation/nodejs/apple-intel","c05"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation/nodejs/linux",component:p("/guides/0.3/getting-started/installation/nodejs/linux","d0a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation/nodejs/windows",component:p("/guides/0.3/getting-started/installation/nodejs/windows","834"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation/react-native",component:p("/guides/0.3/getting-started/installation/react-native","839"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation/react-native/android",component:p("/guides/0.3/getting-started/installation/react-native/android","550"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/installation/react-native/ios",component:p("/guides/0.3/getting-started/installation/react-native/ios","655"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/getting-started/prerequisites",component:p("/guides/0.3/getting-started/prerequisites","840"),exact:!0},{path:"/guides/0.3/getting-started/set-up",component:p("/guides/0.3/getting-started/set-up","662"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials",component:p("/guides/0.3/tutorials","8f3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials/agent-config",component:p("/guides/0.3/tutorials/agent-config","16e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials/agent-config/logging",component:p("/guides/0.3/tutorials/agent-config/logging","c89"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials/create-a-connection",component:p("/guides/0.3/tutorials/create-a-connection","14a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials/issue-a-credential",component:p("/guides/0.3/tutorials/issue-a-credential","b7f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials/postgres-database-nodejs",component:p("/guides/0.3/tutorials/postgres-database-nodejs","7e2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials/postgres-database-nodejs/linux",component:p("/guides/0.3/tutorials/postgres-database-nodejs/linux","33b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials/postgres-database-nodejs/macos",component:p("/guides/0.3/tutorials/postgres-database-nodejs/macos","af5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/tutorials/postgres-database-nodejs/windows",component:p("/guides/0.3/tutorials/postgres-database-nodejs/windows","b05"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/updating",component:p("/guides/0.3/updating","4bd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/updating/update-assistant",component:p("/guides/0.3/updating/update-assistant","33c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/updating/versions/0.1-to-0.2",component:p("/guides/0.3/updating/versions/0.1-to-0.2","714"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.3/updating/versions/0.2-to-0.3",component:p("/guides/0.3/updating/versions/0.2-to-0.3","0d2"),exact:!0,sidebar:"tutorialSidebar"}]},{path:"/guides/0.4",component:p("/guides/0.4","f07"),routes:[{path:"/guides/0.4",component:p("/guides/0.4","80d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/concepts",component:p("/guides/0.4/concepts","b21"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/concepts/agents",component:p("/guides/0.4/concepts/agents","58e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/concepts/did-and-didcomm",component:p("/guides/0.4/concepts/did-and-didcomm","596"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/concepts/platform-and-environment",component:p("/guides/0.4/concepts/platform-and-environment","8a6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/ecosystem",component:p("/guides/0.4/ecosystem","05b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/extensions",component:p("/guides/0.4/extensions","53e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/extensions/push-notifications",component:p("/guides/0.4/extensions/push-notifications","7c6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/extensions/react-hooks",component:p("/guides/0.4/extensions/react-hooks","24a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/extensions/redux-store",component:p("/guides/0.4/extensions/redux-store","808"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/extensions/rest",component:p("/guides/0.4/extensions/rest","df4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started",component:p("/guides/0.4/getting-started","d5f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/prerequisites",component:p("/guides/0.4/getting-started/prerequisites","508"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up",component:p("/guides/0.4/getting-started/set-up","46e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/anoncreds-rs",component:p("/guides/0.4/getting-started/set-up/anoncreds-rs","4df"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/aries-askar",component:p("/guides/0.4/getting-started/set-up/aries-askar","0ab"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/cheqd",component:p("/guides/0.4/getting-started/set-up/cheqd","615"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/indy-sdk",component:p("/guides/0.4/getting-started/set-up/indy-sdk","65a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/indy-sdk/linux",component:p("/guides/0.4/getting-started/set-up/indy-sdk/linux","cda"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/indy-sdk/macos-arm",component:p("/guides/0.4/getting-started/set-up/indy-sdk/macos-arm","219"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/indy-sdk/macos-intel",component:p("/guides/0.4/getting-started/set-up/indy-sdk/macos-intel","5bd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/indy-sdk/react-native",component:p("/guides/0.4/getting-started/set-up/indy-sdk/react-native","f6c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/indy-sdk/windows",component:p("/guides/0.4/getting-started/set-up/indy-sdk/windows","714"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/getting-started/set-up/indy-vdr",component:p("/guides/0.4/getting-started/set-up/indy-vdr","670"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials",component:p("/guides/0.4/tutorials","c36"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/agent-config",component:p("/guides/0.4/tutorials/agent-config","dfd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/agent-config/logging",component:p("/guides/0.4/tutorials/agent-config/logging","854"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/cheqd",component:p("/guides/0.4/tutorials/cheqd","8e1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/create-a-connection",component:p("/guides/0.4/tutorials/create-a-connection","238"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs",component:p("/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs","8ea"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/linux",component:p("/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/linux","d2c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/macos",component:p("/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/macos","349"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/windows",component:p("/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/windows","4aa"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/issue-a-credential",component:p("/guides/0.4/tutorials/issue-a-credential","445"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/mediation",component:p("/guides/0.4/tutorials/mediation","0b4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/tutorials/registering-schema-and-credential-definition",component:p("/guides/0.4/tutorials/registering-schema-and-credential-definition","ab0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/updating",component:p("/guides/0.4/updating","3fa"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/updating/update-assistant",component:p("/guides/0.4/updating/update-assistant","6d2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/updating/update-indy-sdk-to-askar",component:p("/guides/0.4/updating/update-indy-sdk-to-askar","92c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/updating/versions/0.1-to-0.2",component:p("/guides/0.4/updating/versions/0.1-to-0.2","df9"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/updating/versions/0.2-to-0.3",component:p("/guides/0.4/updating/versions/0.2-to-0.3","e1b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/0.4/updating/versions/0.3-to-0.4",component:p("/guides/0.4/updating/versions/0.3-to-0.4","c5b"),exact:!0,sidebar:"tutorialSidebar"}]},{path:"/guides",component:p("/guides","d9d"),routes:[{path:"/guides",component:p("/guides","192"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/concepts",component:p("/guides/concepts","7cf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/concepts/agents",component:p("/guides/concepts/agents","904"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/concepts/did-and-didcomm",component:p("/guides/concepts/did-and-didcomm","325"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/concepts/platform-and-environment",component:p("/guides/concepts/platform-and-environment","a71"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/ecosystem",component:p("/guides/ecosystem","390"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/extensions",component:p("/guides/extensions","09d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/extensions/push-notifications",component:p("/guides/extensions/push-notifications","cbe"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/extensions/react-hooks",component:p("/guides/extensions/react-hooks","5db"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/extensions/redux-store",component:p("/guides/extensions/redux-store","33c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/extensions/rest",component:p("/guides/extensions/rest","bcd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/features",component:p("/guides/features","d70"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/features/aries",component:p("/guides/features/aries","685"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/features/credentials",component:p("/guides/features/credentials","e84"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/features/dids",component:p("/guides/features/dids","447"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/features/openid4vc",component:p("/guides/features/openid4vc","4d5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/getting-started",component:p("/guides/getting-started","fa6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/getting-started/prerequisites",component:p("/guides/getting-started/prerequisites","3d8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/getting-started/set-up",component:p("/guides/getting-started/set-up","514"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/getting-started/set-up/anoncreds",component:p("/guides/getting-started/set-up/anoncreds","255"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/getting-started/set-up/aries-askar",component:p("/guides/getting-started/set-up/aries-askar","d82"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/getting-started/set-up/cheqd",component:p("/guides/getting-started/set-up/cheqd","371"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/getting-started/set-up/indy-vdr",component:p("/guides/getting-started/set-up/indy-vdr","f29"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/getting-started/set-up/openid4vc",component:p("/guides/getting-started/set-up/openid4vc","420"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials",component:p("/guides/tutorials","036"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/agent-config",component:p("/guides/tutorials/agent-config","709"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/agent-config/logging",component:p("/guides/tutorials/agent-config/logging","d7b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/cheqd",component:p("/guides/tutorials/cheqd","b11"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/create-a-connection",component:p("/guides/tutorials/create-a-connection","3a9"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/issue-an-anoncreds-credential-over-didcomm",component:p("/guides/tutorials/issue-an-anoncreds-credential-over-didcomm","694"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/mediation",component:p("/guides/tutorials/mediation","308"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/openid4vc",component:p("/guides/tutorials/openid4vc","e58"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module",component:p("/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module","f61"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module",component:p("/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module","c45"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module",component:p("/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module","72c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/tutorials/registering-schema-and-credential-definition",component:p("/guides/tutorials/registering-schema-and-credential-definition","97e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/updating",component:p("/guides/updating","a7f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/updating/update-assistant",component:p("/guides/updating/update-assistant","5e1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/updating/update-indy-sdk-to-askar",component:p("/guides/updating/update-indy-sdk-to-askar","0a8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/updating/versions/0.1-to-0.2",component:p("/guides/updating/versions/0.1-to-0.2","6c5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/updating/versions/0.2-to-0.3",component:p("/guides/updating/versions/0.2-to-0.3","4ae"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/updating/versions/0.3-to-0.4",component:p("/guides/updating/versions/0.3-to-0.4","cf6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/guides/updating/versions/0.4-to-0.5",component:p("/guides/updating/versions/0.4-to-0.5","0b9"),exact:!0,sidebar:"tutorialSidebar"}]},{path:"/",component:p("/","3b7"),exact:!0},{path:"*",component:p("*")}]},68965:(e,t,n)=>{var r,i;!function(){var a,o,s,l,u,c,d,p,f,m,g,h,v,b,y,w,k,S,E,x,_,O,P,C,T,I,A,L,R,N,j=function(e){var t=new j.Builder;return t.pipeline.add(j.trimmer,j.stopWordFilter,j.stemmer),t.searchPipeline.add(j.stemmer),e.call(t,t),t.build()};j.version="2.3.9",j.utils={},j.utils.warn=(a=this,function(e){a.console&&console.warn&&console.warn(e)}),j.utils.asString=function(e){return null==e?"":e.toString()},j.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var l=j.utils.clone(t)||{};l.position=[o,s],l.index=i.length,i.push(new j.Token(n.slice(o,a),l))}o=a+1}}return i},j.tokenizer.separator=/[\s\-]+/,j.Pipeline=function(){this._stack=[]},j.Pipeline.registeredFunctions=Object.create(null),j.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&j.utils.warn("Overwriting existing registered function: "+t),e.label=t,j.Pipeline.registeredFunctions[e.label]=e},j.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||j.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},j.Pipeline.load=function(e){var t=new j.Pipeline;return e.forEach((function(e){var n=j.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},j.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){j.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},j.Pipeline.prototype.after=function(e,t){j.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)},j.Pipeline.prototype.before=function(e,t){j.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},j.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},j.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(ae&&(n=i),a!=e);)r=n-t,i=t+Math.floor(r/2),a=this.elements[2*i];return a==e||a>e?2*i:as?u+=2:o==s&&(t+=n[l+1]*r[u+1],l+=2,u+=2);return t},j.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},j.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var a,o=i.str.charAt(0);o in i.node.edges?a=i.node.edges[o]:(a=new j.TokenSet,i.node.edges[o]=a),1==i.str.length&&(a.final=!0),r.push({node:a,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var s=i.node.edges["*"];else{s=new j.TokenSet;i.node.edges["*"]=s}if(0==i.str.length&&(s.final=!0),r.push({node:s,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&r.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var l=i.node.edges["*"];else{l=new j.TokenSet;i.node.edges["*"]=l}1==i.str.length&&(l.final=!0),r.push({node:l,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var u,c=i.str.charAt(0),d=i.str.charAt(1);d in i.node.edges?u=i.node.edges[d]:(u=new j.TokenSet,i.node.edges[d]=u),1==i.str.length&&(u.final=!0),r.push({node:u,editsRemaining:i.editsRemaining-1,str:c+i.str.slice(2)})}}}return n},j.TokenSet.fromString=function(e){for(var t=new j.TokenSet,n=t,r=0,i=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()}},j.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},j.Index.prototype.search=function(e){return this.query((function(t){new j.QueryParser(e,t).parse()}))},j.Index.prototype.query=function(e){for(var t=new j.Query(this.fields),n=Object.create(null),r=Object.create(null),i=Object.create(null),a=Object.create(null),o=Object.create(null),s=0;s1?1:e},j.Builder.prototype.k1=function(e){this._k1=e},j.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 i=0;i=this.length)return j.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},j.QueryLexer.prototype.width=function(){return this.pos-this.start},j.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},j.QueryLexer.prototype.backup=function(){this.pos-=1},j.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=j.QueryLexer.EOS&&this.backup()},j.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(j.QueryLexer.TERM)),e.ignore(),e.more())return j.QueryLexer.lexText},j.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(j.QueryLexer.EDIT_DISTANCE),j.QueryLexer.lexText},j.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(j.QueryLexer.BOOST),j.QueryLexer.lexText},j.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(j.QueryLexer.TERM)},j.QueryLexer.termSeparator=j.tokenizer.separator,j.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==j.QueryLexer.EOS)return j.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return j.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(j.QueryLexer.TERM),j.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(j.QueryLexer.TERM),j.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(j.QueryLexer.PRESENCE),j.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(j.QueryLexer.PRESENCE),j.QueryLexer.lexText;if(t.match(j.QueryLexer.termSeparator))return j.QueryLexer.lexTerm}else e.escapeCharacter()}},j.QueryParser=function(e,t){this.lexer=new j.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},j.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=j.QueryParser.parseClause;e;)e=e(this);return this.query},j.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},j.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},j.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},j.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case j.QueryLexer.PRESENCE:return j.QueryParser.parsePresence;case j.QueryLexer.FIELD:return j.QueryParser.parseField;case j.QueryLexer.TERM:return j.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 j.QueryParseError(n,t.start,t.end)}},j.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=j.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=j.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new j.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new j.QueryParseError(n,t.start,t.end)}switch(r.type){case j.QueryLexer.FIELD:return j.QueryParser.parseField;case j.QueryLexer.TERM:return j.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new j.QueryParseError(n,r.start,r.end)}}},j.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 j.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i){r="expecting term, found nothing";throw new j.QueryParseError(r,t.start,t.end)}if(i.type===j.QueryLexer.TERM)return j.QueryParser.parseTerm;r="expecting term, found '"+i.type+"'";throw new j.QueryParseError(r,i.start,i.end)}},j.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 j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new j.QueryParseError(r,n.start,n.end)}else e.nextClause()}},j.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new j.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var i=e.peekLexeme();if(null!=i)switch(i.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+i.type+"'";throw new j.QueryParseError(r,i.start,i.end)}else e.nextClause()}},j.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new j.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var i=e.peekLexeme();if(null!=i)switch(i.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+i.type+"'";throw new j.QueryParseError(r,i.start,i.end)}else e.nextClause()}},void 0===(i="function"==typeof(r=function(){return j})?r.call(t,n,t,e):r)||(e.exports=i)}()},98934:(e,t,n)=>{"use strict";n.d(t,{_:()=>i,t:()=>a});var r=n(67294);const i=r.createContext(!1);function a(e){let{children:t}=e;const[n,a]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{a(!0)}),[]),r.createElement(i.Provider,{value:n},t)}},49383:(e,t,n)=>{"use strict";var r=n(67294),i=n(73935),a=n(73727),o=n(70405),s=n(10412);const l=[n(32497),n(3310),n(18320),n(52295)];var u=n(723),c=n(16550),d=n(18790);function p(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)}var f=n(87462),m=n(35742),g=n(52263),h=n(44996),v=n(86668),b=n(1944),y=n(94711),w=n(19727),k=n(43320),S=n(90197);function E(){const{i18n:{defaultLocale:e,localeConfigs:t}}=(0,g.Z)(),n=(0,y.l)();return r.createElement(m.Z,null,Object.entries(t).map((e=>{let[t,{htmlLang:i}]=e;return r.createElement("link",{key:t,rel:"alternate",href:n.createUrl({locale:t,fullyQualified:!0}),hrefLang:i})})),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function x(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.Z)(),i=function(){const{siteConfig:{url:e}}=(0,g.Z)(),{pathname:t}=(0,c.TH)();return e+(0,h.Z)(t)}(),a=t?`${n}${t}`:i;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:a}),r.createElement("link",{rel:"canonical",href:a}))}function _(){const{i18n:{currentLocale:e}}=(0,g.Z)(),{metadata:t,image:n}=(0,v.L)();return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:w.h})),n&&r.createElement(b.d,{image:n}),r.createElement(x,null),r.createElement(E,null),r.createElement(S.Z,{tag:k.HX,locale:e}),r.createElement(m.Z,null,t.map(((e,t)=>r.createElement("meta",(0,f.Z)({key:t},e))))))}const O=new Map;function P(e){if(O.has(e.pathname))return{...e,pathname:O.get(e.pathname)};if((0,d.f)(u.Z,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return O.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return O.set(e.pathname,t),{...e,pathname:t}}var C=n(98934),T=n(58940);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>i.forEach((e=>e?.()))}const A=function(e){let{children:t,location:n,previousLocation:i}=e;return(0,r.useLayoutEffect)((()=>{i!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,i=t.hash===n.hash,a=t.search===n.search;if(r&&i&&!a)return;const{hash:o}=t;if(o){const e=decodeURIComponent(o.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:i}),I("onRouteDidUpdate",{previousLocation:i,location:n}))}),[i,n]),t};function L(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.f)(u.Z,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class R extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.Z.canUseDOM?I("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=I("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),L(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return r.createElement(A,{previousLocation:this.previousLocation,location:t},r.createElement(c.AW,{location:t,render:()=>e}))}}const N=R,j="docusaurus-base-url-issue-banner-container",D="docusaurus-base-url-issue-banner",M="docusaurus-base-url-issue-banner-suggestion-container",F="__DOCUSAURUS_INSERT_BASEURL_BANNER";function B(e){return`\nwindow['${F}'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['${F}'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('${j}');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\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(/{window[F]=!1}),[]),r.createElement(r.Fragment,null,!s.Z.canUseDOM&&r.createElement(m.Z,null,r.createElement("script",null,B(e))),r.createElement("div",{id:j}))}function U(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,g.Z)(),{pathname:n}=(0,c.TH)();return t&&n===e?r.createElement(z,null):null}function q(){const{siteConfig:{favicon:e,title:t,noIndex:n},i18n:{currentLocale:i,localeConfigs:a}}=(0,g.Z)(),o=(0,h.Z)(e),{htmlLang:s,direction:l}=a[i];return r.createElement(m.Z,null,r.createElement("html",{lang:s,dir:l}),r.createElement("title",null,t),r.createElement("meta",{property:"og:title",content:t}),r.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),n&&r.createElement("meta",{name:"robots",content:"noindex, nofollow"}),e&&r.createElement("link",{rel:"icon",href:o}))}var $=n(44763);function H(){const e=(0,d.H)(u.Z),t=(0,c.TH)();return r.createElement($.Z,null,r.createElement(T.M,null,r.createElement(C.t,null,r.createElement(p,null,r.createElement(q,null),r.createElement(_,null),r.createElement(U,null),r.createElement(N,{location:P(t)},e)))))}var G=n(16887);const Q=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const i=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;i?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var V=n(99670);const Z=new Set,W=new Set,K=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,Y={prefetch(e){if(!(e=>!K()&&!W.has(e)&&!Z.has(e))(e))return!1;Z.add(e);const t=(0,d.f)(u.Z,e).flatMap((e=>{return t=e.route.path,Object.entries(G).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,V.Z)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Q(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!K()&&!W.has(e))(e)&&(W.add(e),L(e))},X=Object.freeze(Y);if(s.Z.canUseDOM){window.docusaurus=X;const e=i.hydrate;L(window.location.pathname).then((()=>{e(r.createElement(o.B6,null,r.createElement(a.VK,null,r.createElement(H,null))),document.getElementById("__docusaurus"))}))}},58940:(e,t,n)=>{"use strict";n.d(t,{_:()=>c,M:()=>d});var r=n(67294),i=n(36809);const a=JSON.parse('{"@cmfcmf/docusaurus-search-local":{"default":{"titleBoost":10,"contentBoost":1,"parentCategoriesBoost":2,"indexDocSidebarParentCategories":3}},"docusaurus-plugin-content-docs":{"default":{"path":"/guides","versions":[{"name":"current","label":"v0.5.x","isLast":true,"path":"/guides","mainDocId":"index","docs":[{"id":"concepts/agents","path":"/guides/concepts/agents","sidebar":"tutorialSidebar"},{"id":"concepts/did-and-didcomm","path":"/guides/concepts/did-and-didcomm","sidebar":"tutorialSidebar"},{"id":"concepts/index","path":"/guides/concepts/","sidebar":"tutorialSidebar"},{"id":"concepts/platform-and-environment","path":"/guides/concepts/platform-and-environment","sidebar":"tutorialSidebar"},{"id":"ecosystem/index","path":"/guides/ecosystem/","sidebar":"tutorialSidebar"},{"id":"extensions/index","path":"/guides/extensions/","sidebar":"tutorialSidebar"},{"id":"extensions/push-notifications","path":"/guides/extensions/push-notifications","sidebar":"tutorialSidebar"},{"id":"extensions/react-hooks","path":"/guides/extensions/react-hooks","sidebar":"tutorialSidebar"},{"id":"extensions/redux-store","path":"/guides/extensions/redux-store","sidebar":"tutorialSidebar"},{"id":"extensions/rest","path":"/guides/extensions/rest","sidebar":"tutorialSidebar"},{"id":"features/aries","path":"/guides/features/aries","sidebar":"tutorialSidebar"},{"id":"features/credentials","path":"/guides/features/credentials","sidebar":"tutorialSidebar"},{"id":"features/dids","path":"/guides/features/dids","sidebar":"tutorialSidebar"},{"id":"features/index","path":"/guides/features/","sidebar":"tutorialSidebar"},{"id":"features/openid4vc","path":"/guides/features/openid4vc","sidebar":"tutorialSidebar"},{"id":"getting-started/index","path":"/guides/getting-started/","sidebar":"tutorialSidebar"},{"id":"getting-started/prerequisites","path":"/guides/getting-started/prerequisites","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/anoncreds","path":"/guides/getting-started/set-up/anoncreds","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/aries-askar","path":"/guides/getting-started/set-up/aries-askar","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/cheqd/index","path":"/guides/getting-started/set-up/cheqd/","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/index","path":"/guides/getting-started/set-up/","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/indy-vdr","path":"/guides/getting-started/set-up/indy-vdr","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/openid4vc","path":"/guides/getting-started/set-up/openid4vc","sidebar":"tutorialSidebar"},{"id":"index","path":"/guides/","sidebar":"tutorialSidebar"},{"id":"tutorials/agent-config/index","path":"/guides/tutorials/agent-config/","sidebar":"tutorialSidebar"},{"id":"tutorials/agent-config/logging","path":"/guides/tutorials/agent-config/logging","sidebar":"tutorialSidebar"},{"id":"tutorials/cheqd/index","path":"/guides/tutorials/cheqd/","sidebar":"tutorialSidebar"},{"id":"tutorials/create-a-connection","path":"/guides/tutorials/create-a-connection","sidebar":"tutorialSidebar"},{"id":"tutorials/index","path":"/guides/tutorials/","sidebar":"tutorialSidebar"},{"id":"tutorials/issue-an-anoncreds-credential-over-didcomm","path":"/guides/tutorials/issue-an-anoncreds-credential-over-didcomm","sidebar":"tutorialSidebar"},{"id":"tutorials/mediation","path":"/guides/tutorials/mediation","sidebar":"tutorialSidebar"},{"id":"tutorials/openid4vc/index","path":"/guides/tutorials/openid4vc/","sidebar":"tutorialSidebar"},{"id":"tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module","path":"/guides/tutorials/openid4vc/issuing-credentials-using-openid4vc-issuer-module","sidebar":"tutorialSidebar"},{"id":"tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module","path":"/guides/tutorials/openid4vc/receiving-and-proving-credentials-using-openid4vc-holder-module","sidebar":"tutorialSidebar"},{"id":"tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module","path":"/guides/tutorials/openid4vc/verifying-credentials-using-openid4vc-verifier-module","sidebar":"tutorialSidebar"},{"id":"tutorials/registering-schema-and-credential-definition","path":"/guides/tutorials/registering-schema-and-credential-definition","sidebar":"tutorialSidebar"},{"id":"updating/index","path":"/guides/updating/","sidebar":"tutorialSidebar"},{"id":"updating/update-assistant","path":"/guides/updating/update-assistant","sidebar":"tutorialSidebar"},{"id":"updating/update-indy-sdk-to-askar","path":"/guides/updating/update-indy-sdk-to-askar","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.1-to-0.2","path":"/guides/updating/versions/0.1-to-0.2","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.2-to-0.3","path":"/guides/updating/versions/0.2-to-0.3","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.3-to-0.4","path":"/guides/updating/versions/0.3-to-0.4","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.4-to-0.5","path":"/guides/updating/versions/0.4-to-0.5","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/guides/","label":"index"}}}},{"name":"0.4","label":"v0.4.x","isLast":false,"path":"/guides/0.4","mainDocId":"index","docs":[{"id":"concepts/agents","path":"/guides/0.4/concepts/agents","sidebar":"tutorialSidebar"},{"id":"concepts/did-and-didcomm","path":"/guides/0.4/concepts/did-and-didcomm","sidebar":"tutorialSidebar"},{"id":"concepts/index","path":"/guides/0.4/concepts/","sidebar":"tutorialSidebar"},{"id":"concepts/platform-and-environment","path":"/guides/0.4/concepts/platform-and-environment","sidebar":"tutorialSidebar"},{"id":"ecosystem/index","path":"/guides/0.4/ecosystem/","sidebar":"tutorialSidebar"},{"id":"extensions/index","path":"/guides/0.4/extensions/","sidebar":"tutorialSidebar"},{"id":"extensions/push-notifications","path":"/guides/0.4/extensions/push-notifications","sidebar":"tutorialSidebar"},{"id":"extensions/react-hooks","path":"/guides/0.4/extensions/react-hooks","sidebar":"tutorialSidebar"},{"id":"extensions/redux-store","path":"/guides/0.4/extensions/redux-store","sidebar":"tutorialSidebar"},{"id":"extensions/rest","path":"/guides/0.4/extensions/rest","sidebar":"tutorialSidebar"},{"id":"getting-started/index","path":"/guides/0.4/getting-started/","sidebar":"tutorialSidebar"},{"id":"getting-started/prerequisites","path":"/guides/0.4/getting-started/prerequisites","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/anoncreds-rs","path":"/guides/0.4/getting-started/set-up/anoncreds-rs","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/aries-askar","path":"/guides/0.4/getting-started/set-up/aries-askar","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/cheqd/index","path":"/guides/0.4/getting-started/set-up/cheqd/","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/index","path":"/guides/0.4/getting-started/set-up/","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/indy-sdk/index","path":"/guides/0.4/getting-started/set-up/indy-sdk/","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/indy-sdk/linux","path":"/guides/0.4/getting-started/set-up/indy-sdk/linux","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/indy-sdk/macos-arm","path":"/guides/0.4/getting-started/set-up/indy-sdk/macos-arm","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/indy-sdk/macos-intel","path":"/guides/0.4/getting-started/set-up/indy-sdk/macos-intel","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/indy-sdk/react-native","path":"/guides/0.4/getting-started/set-up/indy-sdk/react-native","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/indy-sdk/windows","path":"/guides/0.4/getting-started/set-up/indy-sdk/windows","sidebar":"tutorialSidebar"},{"id":"getting-started/set-up/indy-vdr","path":"/guides/0.4/getting-started/set-up/indy-vdr","sidebar":"tutorialSidebar"},{"id":"index","path":"/guides/0.4/","sidebar":"tutorialSidebar"},{"id":"tutorials/agent-config/index","path":"/guides/0.4/tutorials/agent-config/","sidebar":"tutorialSidebar"},{"id":"tutorials/agent-config/logging","path":"/guides/0.4/tutorials/agent-config/logging","sidebar":"tutorialSidebar"},{"id":"tutorials/cheqd/index","path":"/guides/0.4/tutorials/cheqd/","sidebar":"tutorialSidebar"},{"id":"tutorials/create-a-connection","path":"/guides/0.4/tutorials/create-a-connection","sidebar":"tutorialSidebar"},{"id":"tutorials/index","path":"/guides/0.4/tutorials/","sidebar":"tutorialSidebar"},{"id":"tutorials/indy-sdk-postgres-database-nodejs/index","path":"/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/","sidebar":"tutorialSidebar"},{"id":"tutorials/indy-sdk-postgres-database-nodejs/linux","path":"/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/linux","sidebar":"tutorialSidebar"},{"id":"tutorials/indy-sdk-postgres-database-nodejs/macos","path":"/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/macos","sidebar":"tutorialSidebar"},{"id":"tutorials/indy-sdk-postgres-database-nodejs/windows","path":"/guides/0.4/tutorials/indy-sdk-postgres-database-nodejs/windows","sidebar":"tutorialSidebar"},{"id":"tutorials/issue-a-credential","path":"/guides/0.4/tutorials/issue-a-credential","sidebar":"tutorialSidebar"},{"id":"tutorials/mediation","path":"/guides/0.4/tutorials/mediation","sidebar":"tutorialSidebar"},{"id":"tutorials/registering-schema-and-credential-definition","path":"/guides/0.4/tutorials/registering-schema-and-credential-definition","sidebar":"tutorialSidebar"},{"id":"updating/index","path":"/guides/0.4/updating/","sidebar":"tutorialSidebar"},{"id":"updating/update-assistant","path":"/guides/0.4/updating/update-assistant","sidebar":"tutorialSidebar"},{"id":"updating/update-indy-sdk-to-askar","path":"/guides/0.4/updating/update-indy-sdk-to-askar","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.1-to-0.2","path":"/guides/0.4/updating/versions/0.1-to-0.2","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.2-to-0.3","path":"/guides/0.4/updating/versions/0.2-to-0.3","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.3-to-0.4","path":"/guides/0.4/updating/versions/0.3-to-0.4","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/guides/0.4/","label":"index"}}}},{"name":"0.3","label":"v0.3.x","isLast":false,"path":"/guides/0.3","mainDocId":"index","docs":[{"id":"concepts/agents","path":"/guides/0.3/concepts/agents","sidebar":"tutorialSidebar"},{"id":"concepts/did-and-didcomm","path":"/guides/0.3/concepts/did-and-didcomm","sidebar":"tutorialSidebar"},{"id":"concepts/index","path":"/guides/0.3/concepts/","sidebar":"tutorialSidebar"},{"id":"concepts/platform-and-environment","path":"/guides/0.3/concepts/platform-and-environment","sidebar":"tutorialSidebar"},{"id":"ecosystem/index","path":"/guides/0.3/ecosystem/","sidebar":"tutorialSidebar"},{"id":"extensions/index","path":"/guides/0.3/extensions/","sidebar":"tutorialSidebar"},{"id":"extensions/push-notifications/index","path":"/guides/0.3/extensions/push-notifications/","sidebar":"tutorialSidebar"},{"id":"extensions/push-notifications/setup","path":"/guides/0.3/extensions/push-notifications/setup","sidebar":"tutorialSidebar"},{"id":"extensions/react-hooks/index","path":"/guides/0.3/extensions/react-hooks/","sidebar":"tutorialSidebar"},{"id":"extensions/react-hooks/setup","path":"/guides/0.3/extensions/react-hooks/setup","sidebar":"tutorialSidebar"},{"id":"extensions/redux-store/index","path":"/guides/0.3/extensions/redux-store/","sidebar":"tutorialSidebar"},{"id":"extensions/redux-store/setup","path":"/guides/0.3/extensions/redux-store/setup","sidebar":"tutorialSidebar"},{"id":"extensions/rest/index","path":"/guides/0.3/extensions/rest/","sidebar":"tutorialSidebar"},{"id":"extensions/rest/setup","path":"/guides/0.3/extensions/rest/setup","sidebar":"tutorialSidebar"},{"id":"getting-started/index","path":"/guides/0.3/getting-started/","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/index","path":"/guides/0.3/getting-started/installation/","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/nodejs/apple-arm","path":"/guides/0.3/getting-started/installation/nodejs/apple-arm","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/nodejs/apple-intel","path":"/guides/0.3/getting-started/installation/nodejs/apple-intel","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/nodejs/index","path":"/guides/0.3/getting-started/installation/nodejs/","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/nodejs/linux","path":"/guides/0.3/getting-started/installation/nodejs/linux","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/nodejs/windows","path":"/guides/0.3/getting-started/installation/nodejs/windows","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/react-native/android","path":"/guides/0.3/getting-started/installation/react-native/android","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/react-native/index","path":"/guides/0.3/getting-started/installation/react-native/","sidebar":"tutorialSidebar"},{"id":"getting-started/installation/react-native/ios","path":"/guides/0.3/getting-started/installation/react-native/ios","sidebar":"tutorialSidebar"},{"id":"getting-started/prerequisites/index","path":"/guides/0.3/getting-started/prerequisites/"},{"id":"getting-started/set-up/index","path":"/guides/0.3/getting-started/set-up/","sidebar":"tutorialSidebar"},{"id":"index","path":"/guides/0.3/","sidebar":"tutorialSidebar"},{"id":"tutorials/agent-config/index","path":"/guides/0.3/tutorials/agent-config/","sidebar":"tutorialSidebar"},{"id":"tutorials/agent-config/logging","path":"/guides/0.3/tutorials/agent-config/logging","sidebar":"tutorialSidebar"},{"id":"tutorials/create-a-connection","path":"/guides/0.3/tutorials/create-a-connection","sidebar":"tutorialSidebar"},{"id":"tutorials/index","path":"/guides/0.3/tutorials/","sidebar":"tutorialSidebar"},{"id":"tutorials/issue-a-credential","path":"/guides/0.3/tutorials/issue-a-credential","sidebar":"tutorialSidebar"},{"id":"tutorials/postgres-database-nodejs/index","path":"/guides/0.3/tutorials/postgres-database-nodejs/","sidebar":"tutorialSidebar"},{"id":"tutorials/postgres-database-nodejs/linux","path":"/guides/0.3/tutorials/postgres-database-nodejs/linux","sidebar":"tutorialSidebar"},{"id":"tutorials/postgres-database-nodejs/macos","path":"/guides/0.3/tutorials/postgres-database-nodejs/macos","sidebar":"tutorialSidebar"},{"id":"tutorials/postgres-database-nodejs/windows","path":"/guides/0.3/tutorials/postgres-database-nodejs/windows","sidebar":"tutorialSidebar"},{"id":"updating/index","path":"/guides/0.3/updating/","sidebar":"tutorialSidebar"},{"id":"updating/update-assistant","path":"/guides/0.3/updating/update-assistant","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.1-to-0.2","path":"/guides/0.3/updating/versions/0.1-to-0.2","sidebar":"tutorialSidebar"},{"id":"updating/versions/0.2-to-0.3","path":"/guides/0.3/updating/versions/0.2-to-0.3","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/guides/0.3/","label":"index"}}}}],"breadcrumbs":true}}}'),o=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(57529);const l=JSON.parse('{"docusaurusVersion":"2.3.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.3.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.3.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.3.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.3.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.3.1"},"@cmfcmf/docusaurus-search-local":{"type":"package","name":"@cmfcmf/docusaurus-search-local","version":"0.10.0"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"2.3.1"}}}'),u={siteConfig:i.default,siteMetadata:l,globalData:a,i18n:o,codeTranslations:s},c=r.createContext(u);function d(e){let{children:t}=e;return r.createElement(c.Provider,{value:u},t)}},44763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(67294),i=n(10412),a=n(35742),o=n(67003);function s(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"50vh",width:"100%",fontSize:"20px"}},r.createElement("h1",null,"This page crashed."),r.createElement("p",null,t.message),r.createElement("button",{type:"button",onClick:n},"Try again"))}function l(e){let{error:t,tryAgain:n}=e;return r.createElement(c,{fallback:()=>r.createElement(s,{error:t,tryAgain:n})},r.createElement(a.Z,null,r.createElement("title",null,"Page Error")),r.createElement(o.Z,null,r.createElement(s,{error:t,tryAgain:n})))}const u=e=>r.createElement(l,e);class c extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){i.Z.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??u)(e)}return e??null}}},10412:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,i={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},35742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(67294),i=n(70405);function a(e){return r.createElement(i.ql,e)}},39960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(87462),i=n(67294),a=n(73727),o=n(18780),s=n(52263),l=n(13919),u=n(10412);const c=i.createContext({collectLink:()=>{}});var d=n(44996);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:m,isActive:g,"data-noBrokenLinkCheck":h,autoAddBaseUrl:v=!0,...b}=e;const{siteConfig:{trailingSlash:y,baseUrl:w}}=(0,s.Z)(),{withBaseUrl:k}=(0,d.C)(),S=(0,i.useContext)(c),E=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,(()=>E.current));const x=p||f;const _=(0,l.Z)(x),O=x?.replace("pathname://","");let P=void 0!==O?(C=O,v&&(e=>e.startsWith("/"))(C)?k(C):C):void 0;var C;P&&_&&(P=(0,o.applyTrailingSlash)(P,{trailingSlash:y,baseUrl:w}));const T=(0,i.useRef)(!1),I=n?a.OL:a.rU,A=u.Z.canUseIntersectionObserver,L=(0,i.useRef)(),R=()=>{T.current||null==P||(window.docusaurus.preload(P),T.current=!0)};(0,i.useEffect)((()=>(!A&&_&&null!=P&&window.docusaurus.prefetch(P),()=>{A&&L.current&&L.current.disconnect()})),[L,P,A,_]);const N=P?.startsWith("#")??!1,j=!P||!_||N;return j||h||S.collectLink(P),j?i.createElement("a",(0,r.Z)({ref:E,href:P},x&&!_&&{target:"_blank",rel:"noopener noreferrer"},b)):i.createElement(I,(0,r.Z)({},b,{onMouseEnter:R,onTouchStart:R,innerRef:e=>{E.current=e,A&&e&&_&&(L.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(L.current.unobserve(e),L.current.disconnect(),null!=P&&window.docusaurus.prefetch(P))}))})),L.current.observe(e))},to:P},n&&{isActive:g,activeClassName:m}))}const f=i.forwardRef(p)},95999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l,I:()=>s});var r=n(67294);function i(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var a=n(57529);function o(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return a[t??n]??n??t}function s(e,t){let{message:n,id:r}=e;return i(o({message:n,id:r}),t)}function l(e){let{children:t,id:n,values:a}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const s=o({message:t,id:n});return r.createElement(r.Fragment,null,i(s,a))}},29935:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});const r="default"},13919:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function i(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>i,b:()=>r})},44996:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,Z:()=>s});var r=n(67294),i=n(52263),a=n(13919);function o(){const{siteConfig:{baseUrl:e,url:t}}=(0,i.Z)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:i=!1,absolute:o=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(i)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const s=n.startsWith(t)?n:t+n.replace(/^\//,"");return o?e+s:s}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=o();return n(e,t)}},52263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(67294),i=n(58940);function a(){return(0,r.useContext)(i._)}},28084:(e,t,n)=>{"use strict";n.d(t,{OD:()=>a,eZ:()=>o});var r=n(52263),i=n(29935);function a(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,r.Z)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}function o(e,t,n){void 0===t&&(t=i.m),void 0===n&&(n={});const r=a(e),o=r?.[t];if(!o&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return o}},72389:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(67294),i=n(98934);function a(){return(0,r.useContext)(i._)}},99670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function i(e){const t={};return function e(n,i){Object.entries(n).forEach((n=>{let[a,o]=n;const s=i?`${i}.${a}`:a;r(o)?e(o,s):t[s]=o}))}(e),t}},30226:(e,t,n)=>{"use strict";n.d(t,{_:()=>i,z:()=>a});var r=n(67294);const i=r.createContext(null);function a(e){let{children:t,value:n}=e;const a=r.useContext(i),o=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;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}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:a,value:n})),[a,n]);return r.createElement(i.Provider,{value:o},t)}},94104:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>g,gA:()=>d,WS:()=>p,_r:()=>u,Jo:()=>h,zh:()=>c,yW:()=>m,gB:()=>f});var r=n(16550),i=n(28084);const a=e=>e.versions.find((e=>e.isLast));function o(e,t){const n=a(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}function s(e,t){const n=o(e,t),i=n?.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:i,alternateDocVersions:i?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(i.id):{}}}const l={},u=()=>(0,i.OD)("docusaurus-plugin-content-docs")??l,c=e=>(0,i.eZ)("docusaurus-plugin-content-docs",e,{failfast:!0});function d(e){void 0===e&&(e={});const t=u(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const i=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),a=i?{pluginId:i[0],pluginData:i[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((e=>e.path)).join(", ")}`);return a}(t,n,e)}function p(e){void 0===e&&(e={});const t=d(e),{pathname:n}=(0,r.TH)();if(!t)return;return{activePlugin:t,activeVersion:o(t.pluginData,n)}}function f(e){return c(e).versions}function m(e){const t=c(e);return a(t)}function g(e){const t=c(e),{pathname:n}=(0,r.TH)();return s(t,n)}function h(e){const t=c(e),{pathname:n}=(0,r.TH)();return function(e,t){const n=a(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},18320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(74865),i=n.n(r);i().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{i().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){i().done()}}},3310:(e,t,n)=>{"use strict";n.r(t);var r=n(87410),i=n(36809);!function(e){const{themeConfig:{prism:t}}=i.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{n(6726)(`./prism-${e}`)})),delete globalThis.Prism}(r.Z)},39471:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(67294);const i={iconExternalLink:"iconExternalLink_nPIU"};function a(e){let{width:t=13.5,height:n=13.5}=e;return r.createElement("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:i.iconExternalLink},r.createElement("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"}))}},67003:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ua});var r=n(67294),i=n(86010),a=n(44763),o=n(1944),s=n(87462),l=n(16550),u=n(95999),c=n(85936);const d="docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,l.k6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,c.S)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const m=(0,u.I)({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 g(e){const t=e.children??m,{containerRef:n,onClick:i}=f();return r.createElement("div",{ref:n,role:"region","aria-label":m},r.createElement("a",(0,s.Z)({},e,{href:`#${d}`,onClick:i}),t))}var h=n(35281),v=n(19727);const b={skipToContent:"skipToContent_fXgn"};function y(){return r.createElement(g,{className:b.skipToContent})}var w=n(86668),k=n(59689);function S(e){let{width:t=21,height:n=21,color:i="currentColor",strokeWidth:a=1.2,className:o,...l}=e;return r.createElement("svg",(0,s.Z)({viewBox:"0 0 15 15",width:t,height:n},l),r.createElement("g",{stroke:i,strokeWidth:a},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const E={closeButton:"closeButton_CVFx"};function x(e){return r.createElement("button",(0,s.Z)({type:"button","aria-label":(0,u.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,i.Z)("clean-btn close",E.closeButton,e.className)}),r.createElement(S,{width:14,height:14,strokeWidth:3.1}))}const _={content:"content_knG7"};function O(e){const{announcementBar:t}=(0,w.L)(),{content:n}=t;return r.createElement("div",(0,s.Z)({},e,{className:(0,i.Z)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}}))}const P={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function C(){const{announcementBar:e}=(0,w.L)(),{isActive:t,close:n}=(0,k.nT)();if(!t)return null;const{backgroundColor:i,textColor:a,isCloseable:o}=e;return r.createElement("div",{className:P.announcementBar,style:{backgroundColor:i,color:a},role:"banner"},o&&r.createElement("div",{className:P.announcementBarPlaceholder}),r.createElement(O,{className:P.announcementBarContent}),o&&r.createElement(x,{onClick:n,className:P.announcementBarClose}))}var T=n(93163),I=n(12466);var A=n(902),L=n(13102);const R=r.createContext(null);function N(e){let{children:t}=e;const n=function(){const e=(0,T.e)(),t=(0,L.HY)(),[n,i]=(0,r.useState)(!1),a=null!==t.component,o=(0,A.D9)(a);return(0,r.useEffect)((()=>{a&&!o&&i(!0)}),[a,o]),(0,r.useEffect)((()=>{a?e.shown||i(!0):i(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,i]),[n])}();return r.createElement(R.Provider,{value:n},t)}function j(e){if(e.component){const t=e.component;return r.createElement(t,e.props)}}function D(){const e=(0,r.useContext)(R);if(!e)throw new A.i6("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,i=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,L.HY)();return(0,r.useMemo)((()=>({shown:t,hide:i,content:j(a)})),[i,a,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:a}=e;const{shown:o}=D();return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,i.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},a)))}var F=n(92949),B=n(72389);function z(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("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 U(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("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_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function $(e){let{className:t,value:n,onChange:a}=e;const o=(0,B.Z)(),s=(0,u.I)({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"===n?(0,u.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,u.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,i.Z)(q.toggle,t)},r.createElement("button",{className:(0,i.Z)("clean-btn",q.toggleButton,!o&&q.toggleButtonDisabled),type:"button",onClick:()=>a("dark"===n?"light":"dark"),disabled:!o,title:s,"aria-label":s,"aria-live":"polite"},r.createElement(z,{className:(0,i.Z)(q.toggleIcon,q.lightToggleIcon)}),r.createElement(U,{className:(0,i.Z)(q.toggleIcon,q.darkToggleIcon)})))}const H=r.memo($);function G(e){let{className:t}=e;const n=(0,w.L)().colorMode.disableSwitch,{colorMode:i,setColorMode:a}=(0,F.I)();return n?null:r.createElement(H,{className:t,value:i,onChange:a})}var Q=n(21327);function V(){return r.createElement(Q.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Z(){const e=(0,T.e)();return r.createElement("button",{type:"button","aria-label":(0,u.I)({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:()=>e.toggle()},r.createElement(S,{color:"var(--ifm-color-emphasis-600)"}))}function W(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(V,null),r.createElement(G,{className:"margin-right--md"}),r.createElement(Z,null))}var K=n(39960),Y=n(44996),X=n(13919);function J(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var ee=n(39471);function te(e){let{activeBasePath:t,activeBaseRegex:n,to:i,href:a,label:o,html:l,isDropdownLink:u,prependBaseUrlToHref:c,...d}=e;const p=(0,Y.Z)(i),f=(0,Y.Z)(t),m=(0,Y.Z)(a,{forcePrependBaseUrl:!0}),g=o&&a&&!(0,X.Z)(a),h=l?{dangerouslySetInnerHTML:{__html:l}}:{children:r.createElement(r.Fragment,null,o,g&&r.createElement(ee.Z,u&&{width:12,height:12}))};return a?r.createElement(K.Z,(0,s.Z)({href:c?m:a},d,h)):r.createElement(K.Z,(0,s.Z)({to:p,isNavLink:!0},(t||n)&&{isActive:(e,t)=>n?J(n,t.pathname):t.pathname.startsWith(f)},d,h))}function ne(e){let{className:t,isDropdownItem:n=!1,...a}=e;const o=r.createElement(te,(0,s.Z)({className:(0,i.Z)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n},a));return n?r.createElement("li",null,o):o}function re(e){let{className:t,isDropdownItem:n,...a}=e;return r.createElement("li",{className:"menu__list-item"},r.createElement(te,(0,s.Z)({className:(0,i.Z)("menu__link",t)},a)))}function ie(e){let{mobile:t=!1,position:n,...i}=e;const a=t?re:ne;return r.createElement(a,(0,s.Z)({},i,{activeClassName:i.activeClassName??(t?"menu__link--active":"navbar__link--active")}))}var ae=n(86043),oe=n(48596),se=n(52263);function le(e,t){return e.some((e=>function(e,t){return!!(0,oe.Mg)(e.to,t)||!!J(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function ue(e){let{items:t,position:n,className:a,onClick:o,...l}=e;const u=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{u.current&&!u.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[u]),r.createElement("div",{ref:u,className:(0,i.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c})},r.createElement(te,(0,s.Z)({"aria-haspopup":"true","aria-expanded":c,role:"button",href:l.to?void 0:"#",className:(0,i.Z)("navbar__link",a)},l,{onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))}}),l.children??l.label),r.createElement("ul",{className:"dropdown__menu"},t.map(((e,n)=>r.createElement(Pi,(0,s.Z)({isDropdownItem:!0,onKeyDown:e=>{if(n===t.length-1&&"Tab"===e.key){e.preventDefault(),d(!1);const t=u.current.nextElementSibling;if(t){(t instanceof HTMLAnchorElement?t:t.querySelector("a")).focus()}}},activeClassName:"dropdown__link--active"},e,{key:n}))))))}function ce(e){let{items:t,className:n,position:a,onClick:o,...u}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,se.Z)(),{pathname:t}=(0,l.TH)();return t.replace(e,"/")}(),d=le(t,c),{collapsed:p,toggleCollapsed:f,setCollapsed:m}=(0,ae.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),r.createElement("li",{className:(0,i.Z)("menu__list-item",{"menu__list-item--collapsed":p})},r.createElement(te,(0,s.Z)({role:"button",className:(0,i.Z)("menu__link menu__link--sublist menu__link--sublist-caret",n)},u,{onClick:e=>{e.preventDefault(),f()}}),u.children??u.label),r.createElement(ae.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:p},t.map(((e,t)=>r.createElement(Pi,(0,s.Z)({mobile:!0,isDropdownItem:!0,onClick:o,activeClassName:"menu__link--active"},e,{key:t}))))))}function de(e){let{mobile:t=!1,...n}=e;const i=t?ce:ue;return r.createElement(i,n)}var pe=n(94711);function fe(e){let{width:t=20,height:n=20,...i}=e;return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0},i),r.createElement("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 me="iconLanguage_nlXk";var ge=n(73935);function he(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 ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function be(e,t,n){var r,i=t.initialState;return{getState:function(){return i},dispatch:function(r,a){var o=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:_e(),plugins:i,initialState:Re({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),i.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),i.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),i.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(Ie(i.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:Oe,onResolve:Oe};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=Ce(Ce({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return ye(e)})).then((function(e){return e.map((function(e){return Re(Re({},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:Re({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 De(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 Me(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var st,lt,ut,ct=null,dt=(st=-1,lt=-1,ut=void 0,function(e){var t=++st;return Promise.resolve(e).then((function(e){return ut&&t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var bt=/((gt|sm)-|galaxy nexus)|samsung[- ]/i;var yt=["props","refresh","store"],wt=["inputElement","formElement","panelElement"],kt=["inputElement"],St=["inputElement","maxLength"],Et=["sourceIndex"],xt=["sourceIndex"],_t=["item","source","sourceIndex"];function Ot(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 Pt(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function It(e){var t=e.props,n=e.refresh,r=e.store,i=Tt(e,yt),a=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var n=e.inputElement,i=e.formElement,a=e.panelElement;function o(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[i,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 Pt({onTouchStart:o,onMouseDown:o,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},Tt(e,wt))},getRootProps:function(e){return Pt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return Pt({action:"",noValidate:!0,role:"search",onSubmit:function(a){var o;a.preventDefault(),t.onSubmit(Pt({event:a,refresh:n,state:r.getState()},i)),r.dispatch("submit",null),null===(o=e.inputElement)||void 0===o||o.blur()},onReset:function(a){var o;a.preventDefault(),t.onReset(Pt({event:a,refresh:n,state:r.getState()},i)),r.dispatch("reset",null),null===(o=e.inputElement)||void 0===o||o.focus()}},Tt(e,kt))},getLabelProps:function(e){var n=e||{},r=n.sourceIndex,i=Tt(n,Et);return Pt({htmlFor:"".concat(a(t.id,r),"-input"),id:"".concat(a(t.id,r),"-label")},i)},getInputProps:function(e){var a;function o(e){(t.openOnFocus||Boolean(r.getState().query))&&pt(Pt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},i)),r.dispatch("focus",null)}var s=e||{},l=(s.inputElement,s.maxLength),u=void 0===l?512:l,c=Tt(s,St),d=tt(r.getState()),p=function(e){return Boolean(e&&e.match(bt))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),f=null!=d&&d.itemUrl&&!p?"go":"search";return Pt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:f,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(e){pt(Pt({event:e,props:t,query:e.currentTarget.value.slice(0,u),refresh:n,store:r},i))},onKeyDown:function(e){!function(e){var t=e.event,n=e.props,r=e.refresh,i=e.store,a=vt(e,ft);if("ArrowUp"===t.key||"ArrowDown"===t.key){var o=function(){var e=n.environment.document.getElementById("".concat(n.id,"-item-").concat(i.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},s=function(){var e=tt(i.getState());if(null!==i.getState().activeItemId&&e){var n=e.item,o=e.itemInputValue,s=e.itemUrl,l=e.source;l.onActive(gt({event:t,item:n,itemInputValue:o,itemUrl:s,refresh:r,source:l,state:i.getState()},a))}};t.preventDefault(),!1===i.getState().isOpen&&(n.openOnFocus||Boolean(i.getState().query))?pt(gt({event:t,props:n,query:i.getState().query,refresh:r,store:i},a)).then((function(){i.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(o,0)})):(i.dispatch(t.key,{}),s(),o())}else if("Escape"===t.key)t.preventDefault(),i.dispatch(t.key,null),i.pendingRequests.cancelAll();else if("Tab"===t.key)i.dispatch("blur",null),i.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===i.getState().activeItemId||i.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||i.pendingRequests.cancelAll());t.preventDefault();var l=tt(i.getState()),u=l.item,c=l.itemInputValue,d=l.itemUrl,p=l.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(gt({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:p,state:i.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:u,state:i.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(gt({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:p,state:i.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:u,state:i.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(gt({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:p,state:i.getState()},a)),void n.navigator.navigate({itemUrl:d,item:u,state:i.getState()});pt(gt({event:t,nextState:{isOpen:!1},props:n,query:c,refresh:r,store:i},a)).then((function(){p.onSelect(gt({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:p,state:i.getState()},a))}))}}}(Pt({event:e,props:t,refresh:n,store:r},i))},onFocus:o,onBlur:Oe,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||o(n)}},c)},getPanelProps:function(e){return Pt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.sourceIndex,i=Tt(n,xt);return Pt({role:"listbox","aria-labelledby":"".concat(a(t.id,r),"-label"),id:"".concat(a(t.id,r),"-list")},i)},getItemProps:function(e){var o=e.item,s=e.source,l=e.sourceIndex,u=Tt(e,_t);return Pt({id:"".concat(a(t.id,l),"-item-").concat(o.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===o.__autocomplete_id,onMouseMove:function(e){if(o.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",o.__autocomplete_id);var t=tt(r.getState());if(null!==r.getState().activeItemId&&t){var a=t.item,s=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(Pt({event:e,item:a,itemInputValue:s,itemUrl:l,refresh:n,source:u,state:r.getState()},i))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var a=s.getItemInputValue({item:o,state:r.getState()}),l=s.getItemUrl({item:o,state:r.getState()});(l?Promise.resolve():pt(Pt({event:e,nextState:{isOpen:!1},props:t,query:a,refresh:n,store:r},i))).then((function(){s.onSelect(Pt({event:e,item:o,itemInputValue:a,itemUrl:l,refresh:n,source:s,state:r.getState()},i))}))}},u)}}}var At="1.8.3",Lt=[{segment:"autocomplete-core",version:At}];function Rt(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 Nt(e){for(var t=1;t=n?null===r?null:0:i}function Bt(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 zt(e){for(var t=1;t=5&&((i||!e&&5===r)&&(o.push(r,0,i,n),r=6),e&&(o.push(r,e,0,n),r=6)),i=""},l=0;l"===t?(r=1,i=""):i=t+i[0]:a?t===a?a="":i+=t:'"'===t||"'"===t?a=t:">"===t?(s(),r=1):r&&("="===t?(r=5,n=i,i=""):"/"===t&&(r<5||">"===e[l][u+1])?(s(),3===r&&(o=o[0]),r=o,(o=o[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),r=2):i+=t),3===r&&"!--"===i&&(r=4,o=o[0])}return s(),o}(e)),t),arguments,[])).length>1?t:t[0]}var Xt=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},Jt=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},en=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},tn=["ontouchstart","ontouchend","ontouchmove","ontouchcancel"];function nn(e,t,n){e[t]=null===n?"":"number"!=typeof n?n:n+"px"}function rn(e){this._listeners[e.type](e)}function an(e,t,n){var r,i,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]||nn(e.style,t,n[t]);else"o"===t[0]&&"n"===t[1]?(r=t!==(t=t.replace(/Capture$/,"")),((i=t.toLowerCase())in e||tn.includes(i))&&(t=i),t=t.slice(2),e._listeners||(e._listeners={}),e._listeners[t]=n,n?a||e.addEventListener(t,rn,r):e.removeEventListener(t,rn,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 on(e){return"onChange"===e?"onInput":e}function sn(e,t){for(var n in t)an(e,on(n),t[n])}function ln(e,t){for(var n in t)"o"===n[0]&&"n"===n[1]||an(e,on(n),t[n])}var un=["children"];function cn(e){return function(e){if(Array.isArray(e))return dn(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 dn(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 dn(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 dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fn(e){return function(t,n){var r=n.children,i=void 0===r?[]:r,a=pn(n,un),o=e.document.createElement(t);return sn(o,a),o.append.apply(o,cn(i)),o}}var mn=["autocompleteScopeApi","environment","classNames","getInputProps","getInputPropsCore","isDetached","state"];function gn(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 hn(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var yn=function(e){var t=e.autocompleteScopeApi,n=e.environment,r=(e.classNames,e.getInputProps),i=e.getInputPropsCore,a=e.isDetached,o=e.state,s=bn(e,mn),l=fn(n)("input",s),u=r(hn({state:o,props:i({inputElement:l}),inputElement:l},t));return sn(l,hn(hn({},u),{},{onKeyDown:function(e){a&&"Tab"===e.key||u.onKeyDown(e)}})),l};function wn(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 kn(e){for(var t=1;t2&&(o.children=arguments.length>3?En.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===o[a]&&(o[a]=e.defaultProps[a]);return Dn(e,o,r,i,null)}function Dn(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++_n:i};return null==i&&null!=xn.vnode&&xn.vnode(a),a}function Mn(e){return e.children}function Fn(e,t){this.props=e,this.context=t}function Bn(e,t){if(null==t)return e.__?Bn(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&On.sort(Tn));qn.__r=0}function $n(e,t,n,r,i,a,o,s,l,u){var c,d,p,f,m,g,h,v=r&&r.__k||An,b=v.length;for(n.__k=[],c=0;c0?Dn(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(p=v[c])||p&&f.key==p.key&&f.type===p.type)v[c]=void 0;else for(d=0;d=0;t--)if((n=e.__k[t])&&(r=Qn(n)))return r;return null}function Vn(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Ln.test(t)?n:n+"px"}function Zn(e,t,n,r,i){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Vn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Vn(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?Kn:Wn,a):e.removeEventListener(t,a?Kn:Wn,a);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Wn(e){return this.l[e.type+!1](xn.event?xn.event(e):e)}function Kn(e){return this.l[e.type+!0](xn.event?xn.event(e):e)}function Yn(e,t,n,r,i,a,o,s,l){var u,c,d,p,f,m,g,h,v,b,y,w,k,S,E,x=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,a=[s]),(u=xn.__b)&&u(t);try{e:if("function"==typeof x){if(h=t.props,v=(u=x.contextType)&&r[u.__c],b=u?v?v.props.value:u.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:("prototype"in x&&x.prototype.render?t.__c=c=new x(h,b):(t.__c=c=new Fn(h,b),c.constructor=x,c.render=nr),v&&v.sub(c),c.props=h,c.state||(c.state={}),c.context=b,c.__n=r,d=c.__d=!0,c.__h=[],c._sb=[]),null==c.__s&&(c.__s=c.state),null!=x.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=Rn({},c.__s)),Rn(c.__s,x.getDerivedStateFromProps(h,c.__s))),p=c.props,f=c.state,c.__v=t,d)null==x.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==x.getDerivedStateFromProps&&h!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(h,b),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(h,c.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(c.props=h,c.state=c.__s,c.__d=!1),c.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),y=0;y0&&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(or);r.add({value:t[0],isHighlighted:!0}),""!==t[1]&&r.add({value:t[1],isHighlighted:!1})})),r.get()}function lr(e){return function(e){if(Array.isArray(e))return ur(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 ur(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 ur(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 ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""":'"',"'":"'"},fr=new RegExp(/\w/i),mr=/&(amp|quot|lt|gt|#39);/g,gr=RegExp(mr.source);function hr(e,t){var n,r,i,a=e[t],o=(null===(n=e[t+1])||void 0===n?void 0:n.isHighlighted)||!0,s=(null===(r=e[t-1])||void 0===r?void 0:r.isHighlighted)||!0;return fr.test((i=a.value)&&gr.test(i)?i.replace(mr,(function(e){return pr[e]})):i)||s!==o?a.isHighlighted:s}function vr(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 br(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Nr={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"},jr=function(e,t){var n=e.children;(0,e.render)(n,t)},Dr={createElement:jn,Fragment:Mn,render:rr};function Mr(e){var t=e.panelPlacement,n=e.container,r=e.form,i=e.environment,a=n.getBoundingClientRect(),o=(i.pageYOffset||i.document.documentElement.scrollTop||i.document.body.scrollTop||0)+a.top+a.height;switch(t){case"start":return{top:o,left:a.left};case"end":return{top:o,right:i.document.documentElement.clientWidth-(a.left+a.width)};case"full-width":return{top:o,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":var s=r.getBoundingClientRect();return{top:o,left:s.left,right:i.document.documentElement.clientWidth-(s.left+s.width),width:"unset",maxWidth:"unset"};default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(t)," is not valid."))}}function Fr(){return Fr=Object.assign||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||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ti(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 ni(e){for(var t=1;t0;if(!p.value.core.openOnFocus&&!t.query)return n;var r=Boolean(u.current||p.value.renderer.renderNoResults);return!n&&r||n},__autocomplete_metadata:{userAgents:qr,options:e}}))})),g=Vt(ni({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},p.value.core.initialState)),h={getEnvironmentProps:p.value.renderer.getEnvironmentProps,getFormProps:p.value.renderer.getFormProps,getInputProps:p.value.renderer.getInputProps,getItemProps:p.value.renderer.getItemProps,getLabelProps:p.value.renderer.getLabelProps,getListProps:p.value.renderer.getListProps,getPanelProps:p.value.renderer.getPanelProps,getRootProps:p.value.renderer.getRootProps},v={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},b=s((function(){return Yt.bind(p.value.renderer.renderer.createElement)})),y=s((function(){return function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.classNames,i=e.environment,a=e.isDetached,o=e.placeholder,s=void 0===o?"Search":o,l=e.propGetters,u=e.setIsModalOpen,c=e.state,d=e.translations,p=fn(i),f=l.getRootProps(kn({state:c,props:t.getRootProps({})},n)),m=p("div",kn({class:r.root},f)),g=p("div",{class:r.detachedContainer,onMouseDown:function(e){e.stopPropagation()}}),h=p("div",{class:r.detachedOverlay,children:[g],onMouseDown:function(){u(!1),t.setIsOpen(!1)}}),v=l.getLabelProps(kn({state:c,props:t.getLabelProps({})},n)),b=p("button",{class:r.submitButton,type:"submit",title:d.submitButtonTitle,children:[Xt({environment:i})]}),y=p("label",kn({class:r.label,children:[b]},v)),w=p("button",{class:r.clearButton,type:"reset",title:d.clearButtonTitle,children:[Jt({environment:i})]}),k=p("div",{class:r.loadingIndicator,children:[en({environment:i})]}),S=yn({class:r.input,environment:i,state:c,getInputProps:l.getInputProps,getInputPropsCore:t.getInputProps,autocompleteScopeApi:n,isDetached:a}),E=p("div",{class:r.inputWrapperPrefix,children:[y,k]}),x=p("div",{class:r.inputWrapperSuffix,children:[w]}),_=p("div",{class:r.inputWrapper,children:[S]}),O=l.getFormProps(kn({state:c,props:t.getFormProps({inputElement:S})},n)),P=p("form",kn({class:r.form,children:[E,_,x]},O)),C=l.getPanelProps(kn({state:c,props:t.getPanelProps({})},n)),T=p("div",kn({class:r.panel},C)),I=p("div",{class:r.detachedSearchButtonQuery,textContent:c.query}),A=p("div",{class:r.detachedSearchButtonPlaceholder,hidden:Boolean(c.query),textContent:s});if(a){var L=p("div",{class:r.detachedSearchButtonIcon,children:[Xt({environment:i})]}),R=p("button",{type:"button",class:r.detachedSearchButton,onClick:function(){u(!0)},children:[L,A,I]}),N=p("button",{type:"button",class:r.detachedCancelButton,textContent:d.detachedCancelButtonText,onTouchStart:function(e){e.stopPropagation()},onClick:function(){t.setIsOpen(!1),u(!1)}}),j=p("div",{class:r.detachedFormContainer,children:[P,N]});g.appendChild(j),m.appendChild(R)}else m.appendChild(P);return{detachedContainer:g,detachedOverlay:h,detachedSearchButtonQuery:I,detachedSearchButtonPlaceholder:A,inputWrapper:_,input:S,root:m,form:P,label:y,submitButton:b,clearButton:w,loadingIndicator:k,panel:T}}({autocomplete:m.value,autocompleteScopeApi:v,classNames:p.value.renderer.classNames,environment:p.value.core.environment,isDetached:f.value,placeholder:p.value.core.placeholder,propGetters:h,setIsModalOpen:E,state:g.current,translations:p.value.renderer.translations})}));function w(){sn(y.value.panel,{style:f.value?{}:Mr({panelPlacement:p.value.renderer.panelPlacement,container:y.value.root,form:y.value.form,environment:p.value.core.environment})})}function k(e){g.current=e;var t={autocomplete:m.value,autocompleteScopeApi:v,classNames:p.value.renderer.classNames,components:p.value.renderer.components,container:p.value.renderer.container,html:b.value,dom:y.value,panelContainer:f.value?y.value.detachedContainer:p.value.renderer.panelContainer,propGetters:h,state:g.current,renderer:p.value.renderer.renderer},n=!Ee(e)&&!u.current&&p.value.renderer.renderNoResults||p.value.renderer.render;!function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.dom,i=e.propGetters,a=e.state;ln(r.root,i.getRootProps(zr({state:a,props:t.getRootProps({})},n))),ln(r.input,i.getInputProps(zr({state:a,props:t.getInputProps({inputElement:r.input}),inputElement:r.input},n))),sn(r.label,{hidden:"stalled"===a.status}),sn(r.loadingIndicator,{hidden:"stalled"!==a.status}),sn(r.clearButton,{hidden:!a.query}),sn(r.detachedSearchButtonQuery,{textContent:a.query}),sn(r.detachedSearchButtonPlaceholder,{hidden:Boolean(a.query)})}(t),function(e,t){var n=t.autocomplete,r=t.autocompleteScopeApi,i=t.classNames,a=t.html,o=t.dom,s=t.panelContainer,l=t.propGetters,u=t.state,c=t.components,d=t.renderer;if(u.isOpen){s.contains(o.panel)||"loading"===u.status||s.appendChild(o.panel),o.panel.classList.toggle("aa-Panel--stalled","stalled"===u.status);var p=u.collections.filter((function(e){var t=e.source,n=e.items;return t.templates.noResults||n.length>0})).map((function(e,t){var o=e.source,s=e.items;return d.createElement("section",{key:t,className:i.source,"data-autocomplete-source-id":o.sourceId},o.templates.header&&d.createElement("div",{className:i.sourceHeader},o.templates.header({components:c,createElement:d.createElement,Fragment:d.Fragment,items:s,source:o,state:u,html:a})),o.templates.noResults&&0===s.length?d.createElement("div",{className:i.sourceNoResults},o.templates.noResults({components:c,createElement:d.createElement,Fragment:d.Fragment,source:o,state:u,html:a})):d.createElement("ul",Fr({className:i.list},l.getListProps(zr({state:u,props:n.getListProps({sourceIndex:t})},r))),s.map((function(e){var s=n.getItemProps({item:e,source:o,sourceIndex:t});return d.createElement("li",Fr({key:s.id,className:i.item},l.getItemProps(zr({state:u,props:s},r))),o.templates.item({components:c,createElement:d.createElement,Fragment:d.Fragment,item:e,state:u,html:a}))}))),o.templates.footer&&d.createElement("div",{className:i.sourceFooter},o.templates.footer({components:c,createElement:d.createElement,Fragment:d.Fragment,items:s,source:o,state:u,html:a})))})),f=d.createElement(d.Fragment,null,d.createElement("div",{className:i.panelLayout},p),d.createElement("div",{className:"aa-GradientBottom"})),m=p.reduce((function(e,t){return e[t.props["data-autocomplete-source-id"]]=t,e}),{});e(zr(zr({children:f,state:u,sections:p,elements:m},d),{},{components:c,html:a},r),o.panel)}else s.contains(o.panel)&&s.removeChild(o.panel)}(n,t)}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i();var t,n,r=p.value.renderer,o=r.components,s=ei(r,Jr);c.current=Vr(s,p.value.core,{components:(t=o,n=function(e){return!e.value.hasOwnProperty("__autocomplete_componentName")},Object.entries(t).reduce((function(e,t){var r=Yr(t,2),i=r[0],a=r[1];return n({key:i,value:a})?Wr(Wr({},e),{},Kr({},i,a)):e}),{})),initialState:g.current},e),l(),a(),m.value.refresh().then((function(){k(g.current)}))}function E(e){requestAnimationFrame((function(){var t=p.value.core.environment.document.body.contains(y.value.detachedOverlay);e!==t&&(e?(p.value.core.environment.document.body.appendChild(y.value.detachedOverlay),p.value.core.environment.document.body.classList.add("aa-Detached"),y.value.input.focus()):(p.value.core.environment.document.body.removeChild(y.value.detachedOverlay),p.value.core.environment.document.body.classList.remove("aa-Detached")))}))}return r((function(){var e=m.value.getEnvironmentProps({formElement:y.value.form,panelElement:y.value.panel,inputElement:y.value.input});return sn(p.value.core.environment,e),function(){sn(p.value.core.environment,Object.keys(e).reduce((function(e,t){return ni(ni({},e),{},ri({},t,void 0))}),{}))}})),r((function(){var e=f.value?p.value.core.environment.document.body:p.value.renderer.panelContainer,t=f.value?y.value.detachedOverlay:y.value.panel;return f.value&&g.current.isOpen&&E(!0),k(g.current),function(){e.contains(t)&&e.removeChild(t)}})),r((function(){var e=p.value.renderer.container;return e.appendChild(y.value.root),function(){e.removeChild(y.value.root)}})),r((function(){var e=Zt((function(e){k(e.state)}),0);return d.current=function(t){var n=t.state,r=t.prevState;(f.value&&r.isOpen!==n.isOpen&&E(n.isOpen),f.value||!n.isOpen||r.isOpen||w(),n.query!==r.query)&&p.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=Zt((function(){var e=f.value;f.value=p.value.core.environment.matchMedia(p.value.renderer.detachedMediaQuery).matches,e!==f.value?S({}):requestAnimationFrame(w)}),20);return p.value.core.environment.addEventListener("resize",e),function(){p.value.core.environment.removeEventListener("resize",e)}})),r((function(){if(!f.value)return function(){};function e(e){y.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",e)}function t(t){e(t.matches)}var n=p.value.core.environment.matchMedia(getComputedStyle(p.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(){}})),ni(ni({},v),{},{update:S,destroy:function(){i()}})}var ai=n(35742);n(89414);const oi=n(68965);oi.tokenizer.separator=/[\s\-]+/;const si=oi,li=(n(68965),e=>oi.tokenizer(e).map((e=>e.str))),ui=si;var ci=n(813),di=n.n(ci);function pi(){const e=(0,l.TH)(),t=(0,l.k6)(),{siteConfig:{baseUrl:n}}=(0,se.Z)(),[i,a]=(0,r.useState)({terms:[],isDocsOrBlog:!1});return(0,r.useEffect)((()=>{if(!e.state?.cmfcmfhighlight||0===e.state.cmfcmfhighlight.terms.length)return;a(e.state.cmfcmfhighlight);const{cmfcmfhighlight:n,...r}=e.state;t.replace({...e,state:r})}),[e.state?.cmfcmfhighlight,t,e]),(0,r.useEffect)((()=>{if(0===i.terms.length)return;const e=i.isDocsOrBlog?document.getElementsByTagName("article")[0]:document.getElementsByTagName("main")[0];if(!e)return;const t=new(di())(e),n={ignoreJoiners:!0};return t.mark(i.terms,n),()=>t.unmark(n)}),[i,n]),null}var fi=n(28084),mi=n(43320);const gi=!0;function hi(e){let{document:t}=e;const[n,r]=t.sectionRoute.split("#");let i=n;return r&&(i+="#"+r),i}const vi={documents:[],index:ui((function(){this.ref("id"),this.field("title"),this.field("content")}))};const bi=()=>{const e=(0,B.Z)(),[t,n]=(0,r.useState)((()=>!!e&&"dark"===document.documentElement.getAttribute("data-theme")));(0,r.useEffect)((()=>{const e=new MutationObserver((()=>{n("dark"===document.documentElement.getAttribute("data-theme"))}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>e.disconnect()}),[]);const{siteConfig:{baseUrl:i}}=(0,se.Z)(),{titleBoost:a,contentBoost:o,parentCategoriesBoost:s,indexDocSidebarParentCategories:c}=(0,fi.eZ)("@cmfcmf/docusaurus-search-local"),d=(0,l.k6)(),{tags:p}=(0,mi._q)(),f=(0,r.useRef)(p);(0,r.useEffect)((()=>{f.current=p}),[p]);const m=(0,r.useRef)({}),g=async e=>{const t=m.current[e];switch(t?.state){case"ready":return t;case void 0:{const t=[];m.current[e]={state:"loading",callbacks:t};const n=await async function(e,t){if(gi){let r;try{const n=await fetch(`${e}search-index-${t}.json`);if(!n.ok)return vi;r=await n.json()}catch(n){return vi}return{documents:r.documents,index:ui.Index.load(r.index)}}return Promise.resolve(vi)}(i,e);return t.forEach((e=>e(n))),m.current[e]={state:"ready",...n}}case"loading":return new Promise((e=>{t.callbacks.push(e)}))}},h=(0,u.I)({message:"cmfcmf/d-s-l.searchBar.placeholder",description:"Placeholder shown in the searchbar"}),v=(0,r.useRef)(null),b=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(v.current)return b.current=ii({container:v.current,placeholder:h,renderer:{createElement:r.createElement,Fragment:r.Fragment},render(e,t){let{children:n}=e;(0,ge.render)(n,t)},navigator:{navigate(e){let{item:t,itemUrl:n}=e;d.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},detachedMediaQuery:"",defaultActiveItemId:0,translations:{clearButtonTitle:(0,u.I)({message:"cmfcmf/d-s-l.searchBar.clearButtonTitle",description:"Title of the button to clear the current search input"}),detachedCancelButtonText:(0,u.I)({message:"cmfcmf/d-s-l.searchBar.detachedCancelButtonText",description:"Text of the button to close the detached search window"}),submitButtonTitle:(0,u.I)({message:"cmfcmf/d-s-l.searchBar.submitButtonTitle",description:"Title of the button to submit a new search"})},getSources(e){let{query:t}=e;return[{sourceId:"search-results",templates:{item(e){let{item:t}=e;const n=hi(t);return r.createElement("a",{href:n,className:"aa-ItemLink",onClick:e=>{e.preventDefault(),d.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:()=>r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},gi?(0,u.I)({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(e){let{item:t}=e;return hi(t)},async getItems(){const e=f.current,n=await Promise.all(e.map((e=>g(e)))),r=li(t);return n.flatMap((e=>{let{index:t,documents:n}=e;return t.query((e=>{e.term(r,{fields:["title"],boost:a}),e.term(r,{fields:["title"],boost:a,wildcard:ui.Query.wildcard.TRAILING}),e.term(r,{fields:["content"],boost:o}),e.term(r,{fields:["content"],boost:o,wildcard:ui.Query.wildcard.TRAILING}),c&&(e.term(r,{fields:["sidebarParentCategories"],boost:s}),e.term(r,{fields:["sidebarParentCategories"],boost:s,wildcard:ui.Query.wildcard.TRAILING}))})).slice(0,8).map((e=>({document:n.find((t=>t.id.toString()===e.ref)),score:e.score,terms:r})))})).sort(((e,t)=>t.score-e.score)).slice(0,8)}}]}}),()=>b.current?.destroy()}),[]),r.createElement(r.Fragment,null,r.createElement(ai.Z,null,r.createElement("body",{"data-theme":t?"dark":"light"})),r.createElement(pi,null),r.createElement("div",{className:"dsla-search-wrapper"},r.createElement("div",{className:"dsla-search-field",ref:v,"data-tags":p.join(",")})))},yi={searchBox:"searchBox_ZlJk"};function wi(e){let{children:t,className:n}=e;return r.createElement("div",{className:(0,i.Z)(n,yi.searchBox)},t)}var ki=n(94104),Si=n(53438);var Ei=n(60373);const xi=e=>e.docs.find((t=>t.id===e.mainDocId));const _i={default:ie,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:i,...a}=e;const{i18n:{currentLocale:o,locales:c,localeConfigs:d}}=(0,se.Z)(),p=(0,pe.l)(),{search:f,hash:m}=(0,l.TH)(),g=[...n,...c.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${m}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===o?t?"menu__link--active":"dropdown__link--active":""}})),...i],h=t?(0,u.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[o].label;return r.createElement(de,(0,s.Z)({},a,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(fe,{className:me}),h),items:g}))},search:function(e){let{mobile:t,className:n}=e;return t?null:r.createElement(wi,{className:n},r.createElement(bi,null))},dropdown:de,html:function(e){let{value:t,className:n,mobile:a=!1,isDropdownItem:o=!1}=e;const s=o?"li":"div";return r.createElement(s,{className:(0,i.Z)({navbar__item:!a&&!o,"menu__list-item":a},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:i,...a}=e;const{activeDoc:o}=(0,ki.Iw)(i),l=(0,Si.vY)(t,i);return null===l?null:r.createElement(ie,(0,s.Z)({exact:!0},a,{isActive:()=>o?.path===l.path||!!o?.sidebar&&o.sidebar===l.sidebar,label:n??l.id,to:l.path}))},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:i,...a}=e;const{activeDoc:o}=(0,ki.Iw)(i),l=(0,Si.oz)(t,i).link;if(!l)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return r.createElement(ie,(0,s.Z)({exact:!0},a,{isActive:()=>o?.sidebar===t,label:n??l.label,to:l.path}))},docsVersion:function(e){let{label:t,to:n,docsPluginId:i,...a}=e;const o=(0,Si.lO)(i)[0],l=t??o.label,u=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(o).path;return r.createElement(ie,(0,s.Z)({},a,{label:l,to:u}))},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:i,dropdownItemsBefore:a,dropdownItemsAfter:o,...c}=e;const{search:d,hash:p}=(0,l.TH)(),f=(0,ki.Iw)(n),m=(0,ki.gB)(n),{savePreferredVersionName:g}=(0,Ei.J)(n),h=m.map((e=>{const t=f.alternateDocVersions[e.name]??xi(e);return{label:e.label,to:`${t.path}${d}${p}`,isActive:()=>e===f.activeVersion,onClick:()=>g(e.name)}})),v=[...a,...h,...o],b=(0,Si.lO)(n)[0],y=t&&v.length>1?(0,u.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):b.label,w=t&&v.length>1?void 0:xi(b).path;return v.length<=1?r.createElement(ie,(0,s.Z)({},c,{mobile:t,label:y,to:w,isActive:i?()=>!1:void 0})):r.createElement(de,(0,s.Z)({},c,{mobile:t,label:y,to:w,items:v,isActive:i?()=>!1:void 0}))}},Oi=_i;function Pi(e){let{type:t,...n}=e;const i=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Oi[i];if(!a)throw new Error(`No NavbarItem component found for type "${t}".`);return r.createElement(a,n)}function Ci(){const e=(0,T.e)(),t=(0,w.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map(((t,n)=>r.createElement(Pi,(0,s.Z)({mobile:!0},t,{onClick:()=>e.toggle(),key:n})))))}function Ti(e){return r.createElement("button",(0,s.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(u.Z,{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)"},"\u2190 Back to main menu"))}function Ii(){const e=0===(0,w.L)().navbar.items.length,t=D();return r.createElement(r.Fragment,null,!e&&r.createElement(Ti,{onClick:()=>t.hide()}),t.content)}function Ai(){const e=(0,T.e)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?r.createElement(M,{header:r.createElement(W,null),primaryMenu:r.createElement(Ci,null),secondaryMenu:r.createElement(Ii,null)}):null}const Li={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Ri(e){return r.createElement("div",(0,s.Z)({role:"presentation"},e,{className:(0,i.Z)("navbar-sidebar__backdrop",e.className)}))}function Ni(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,w.L)(),o=(0,T.e)(),{navbarRef:s,isNavbarVisible:l}=function(e){const[t,n]=(0,r.useState)(e),i=(0,r.useRef)(!1),a=(0,r.useRef)(0),o=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,I.RF)(((t,r)=>{let{scrollY:o}=t;if(!e)return;if(o=s?n(!1):o+u{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return i.current=!0,void n(!1);n(!0)})),{navbarRef:o,isNavbarVisible:t}}(n);return r.createElement("nav",{ref:s,"aria-label":(0,u.I)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,i.Z)("navbar","navbar--fixed-top",n&&[Li.navbarHideable,!l&&Li.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":o.shown})},t,r.createElement(Ri,{onClick:o.toggle}),r.createElement(Ai,null))}const ji="right";function Di(e){let{width:t=30,height:n=30,className:i,...a}=e;return r.createElement("svg",(0,s.Z)({className:i,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true"},a),r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}function Mi(){const{toggle:e,shown:t}=(0,T.e)();return r.createElement("button",{onClick:e,"aria-label":(0,u.I)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button"},r.createElement(Di,null))}const Fi={colorModeToggle:"colorModeToggle_DEke"};function Bi(e){let{items:t}=e;return r.createElement(r.Fragment,null,t.map(((e,t)=>r.createElement(Pi,(0,s.Z)({},e,{key:t})))))}function zi(e){let{left:t,right:n}=e;return r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},t),r.createElement("div",{className:"navbar__items navbar__items--right"},n))}function Ui(){const e=(0,T.e)(),t=(0,w.L)().navbar.items,[n,i]=function(e){function t(e){return"left"===(e.position??ji)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),a=t.find((e=>"search"===e.type));return r.createElement(zi,{left:r.createElement(r.Fragment,null,!e.disabled&&r.createElement(Mi,null),r.createElement(V,null),r.createElement(Bi,{items:n})),right:r.createElement(r.Fragment,null,r.createElement(Bi,{items:i}),r.createElement(G,{className:Fi.colorModeToggle}),!a&&r.createElement(wi,null,r.createElement(bi,null)))})}function qi(){return r.createElement(Ni,null,r.createElement(Ui,null))}function $i(e){let{item:t}=e;const{to:n,href:i,label:a,prependBaseUrlToHref:o,...l}=t,u=(0,Y.Z)(n),c=(0,Y.Z)(i,{forcePrependBaseUrl:!0});return r.createElement(K.Z,(0,s.Z)({className:"footer__link-item"},i?{href:o?c:i}:{to:u},l),a,i&&!(0,X.Z)(i)&&r.createElement(ee.Z,null))}function Hi(e){let{item:t}=e;return t.html?r.createElement("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement("li",{key:t.href??t.to,className:"footer__item"},r.createElement($i,{item:t}))}function Gi(e){let{column:t}=e;return r.createElement("div",{className:"col footer__col"},r.createElement("div",{className:"footer__title"},t.title),r.createElement("ul",{className:"footer__items clean-list"},t.items.map(((e,t)=>r.createElement(Hi,{key:t,item:e})))))}function Qi(e){let{columns:t}=e;return r.createElement("div",{className:"row footer__links"},t.map(((e,t)=>r.createElement(Gi,{key:t,column:e}))))}function Vi(){return r.createElement("span",{className:"footer__link-separator"},"\xb7")}function Zi(e){let{item:t}=e;return t.html?r.createElement("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement($i,{item:t})}function Wi(e){let{links:t}=e;return r.createElement("div",{className:"footer__links text--center"},r.createElement("div",{className:"footer__links"},t.map(((e,n)=>r.createElement(r.Fragment,{key:n},r.createElement(Zi,{item:e}),t.length!==n+1&&r.createElement(Vi,null))))))}function Ki(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?r.createElement(Qi,{columns:t}):r.createElement(Wi,{links:t})}var Yi=n(50941);const Xi={footerLogoLink:"footerLogoLink_BH7S"};function Ji(e){let{logo:t}=e;const{withBaseUrl:n}=(0,Y.C)(),a={light:n(t.src),dark:n(t.srcDark??t.src)};return r.createElement(Yi.Z,{className:(0,i.Z)("footer__logo",t.className),alt:t.alt,sources:a,width:t.width,height:t.height,style:t.style})}function ea(e){let{logo:t}=e;return t.href?r.createElement(K.Z,{href:t.href,className:Xi.footerLogoLink,target:t.target},r.createElement(Ji,{logo:t})):r.createElement(Ji,{logo:t})}function ta(e){let{copyright:t}=e;return r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function na(e){let{style:t,links:n,logo:a,copyright:o}=e;return r.createElement("footer",{className:(0,i.Z)("footer",{"footer--dark":"dark"===t})},r.createElement("div",{className:"container container-fluid"},n,(a||o)&&r.createElement("div",{className:"footer__bottom text--center"},a&&r.createElement("div",{className:"margin-bottom--sm"},a),o)))}function ra(){const{footer:e}=(0,w.L)();if(!e)return null;const{copyright:t,links:n,logo:i,style:a}=e;return r.createElement(na,{style:a,links:n&&n.length>0&&r.createElement(Ki,{links:n}),logo:i&&r.createElement(ea,{logo:i}),copyright:t&&r.createElement(ta,{copyright:t})})}const ia=r.memo(ra),aa=(0,A.Qc)([F.S,k.pl,I.OC,Ei.L5,o.VC,function(e){let{children:t}=e;return r.createElement(L.n2,null,r.createElement(T.M,null,r.createElement(N,null,t)))}]);function oa(e){let{children:t}=e;return r.createElement(aa,null,t)}function sa(e){let{error:t,tryAgain:n}=e;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(u.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(u.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}const la={mainWrapper:"mainWrapper_z2l0"};function ua(e){const{children:t,noFooter:n,wrapperClassName:s,title:l,description:u}=e;return(0,v.t)(),r.createElement(oa,null,r.createElement(o.d,{title:l,description:u}),r.createElement(y,null),r.createElement(C,null),r.createElement(qi,null),r.createElement("div",{id:d,className:(0,i.Z)(h.k.wrapper.main,la.mainWrapper,s)},r.createElement(a.Z,{fallback:e=>r.createElement(sa,e)},t)),!n&&r.createElement(ia,null))}},21327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(87462),i=n(67294),a=n(39960),o=n(44996),s=n(52263),l=n(86668),u=n(50941);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.Z)(t.src),dark:(0,o.Z)(t.srcDark||t.src)},s=i.createElement(u.Z,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?i.createElement("div",{className:r},s):s}function d(e){const{siteConfig:{title:t}}=(0,s.Z)(),{navbar:{title:n,logo:u}}=(0,l.L)(),{imageClassName:d,titleClassName:p,...f}=e,m=(0,o.Z)(u?.href||"/"),g=n?"":t,h=u?.alt??g;return i.createElement(a.Z,(0,r.Z)({to:m},f,u?.target&&{target:u.target}),u&&i.createElement(c,{logo:u,alt:h,imageClassName:d}),null!=n&&i.createElement("b",{className:p},n))}},90197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(67294),i=n(35742);function a(e){let{locale:t,version:n,tag:a}=e;const o=t;return r.createElement(i.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),a&&r.createElement("meta",{name:"docusaurus_tag",content:a}),o&&r.createElement("meta",{name:"docsearch:language",content:o}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),a&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:a}))}},50941:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(87462),i=n(67294),a=n(86010),o=n(72389),s=n(92949);const l={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"};function u(e){const t=(0,o.Z)(),{colorMode:n}=(0,s.I)(),{sources:u,className:c,alt:d,...p}=e,f=t?"dark"===n?["dark"]:["light"]:["light","dark"];return i.createElement(i.Fragment,null,f.map((e=>i.createElement("img",(0,r.Z)({key:e,src:u[e],alt:d,className:(0,a.Z)(l.themedImage,l[`themedImage--${e}`],c)},p)))))}},86043:(e,t,n)=>{"use strict";n.d(t,{u:()=>s,z:()=>g});var r=n(87462),i=n(67294),a=n(10412);const o="ease-in-out";function s(e){let{initialState:t}=e;const[n,r]=(0,i.useState)(t??!1),a=(0,i.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:a}}const l={display:"none",overflow:"hidden",height:"0px"},u={display:"block",overflow:"visible",height:"auto"};function c(e,t){const n=t?l:u;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function d(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const a=(0,i.useRef)(!1);(0,i.useEffect)((()=>{const e=t.current;function i(){const t=e.scrollHeight,n=r?.duration??function(e){const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${r?.easing??o}`,height:`${t}px`}}function s(){const t=i();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return c(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=l.height,e.style.overflow=l.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function p(e){if(!a.Z.canUseDOM)return e?l:u}function f(e){let{as:t="div",collapsed:n,children:r,animation:a,onCollapseTransitionEnd:o,className:s,disableSSRStyle:l}=e;const u=(0,i.useRef)(null);return d({collapsibleRef:u,collapsed:n,animation:a}),i.createElement(t,{ref:u,style:l?void 0:p(n),onTransitionEnd:e=>{"height"===e.propertyName&&(c(u.current,n),o?.(n))},className:s},r)}function m(e){let{collapsed:t,...n}=e;const[a,o]=(0,i.useState)(!t),[s,l]=(0,i.useState)(t);return(0,i.useLayoutEffect)((()=>{t||o(!0)}),[t]),(0,i.useLayoutEffect)((()=>{a&&l(t)}),[a,t]),a?i.createElement(f,(0,r.Z)({},n,{collapsed:s})):null}function g(e){let{lazy:t,...n}=e;const r=t?m:f;return i.createElement(r,n)}},59689:(e,t,n)=>{"use strict";n.d(t,{nT:()=>m,pl:()=>f});var r=n(67294),i=n(72389),a=n(50012),o=n(902),s=n(86668);const l=(0,a.WA)("docusaurus.announcement.dismiss"),u=(0,a.WA)("docusaurus.announcement.id"),c=()=>"true"===l.get(),d=e=>l.set(String(e)),p=r.createContext(null);function f(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.L)(),t=(0,i.Z)(),[n,a]=(0,r.useState)((()=>!!t&&c()));(0,r.useEffect)((()=>{a(c())}),[]);const o=(0,r.useCallback)((()=>{d(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&d(!1),!r&&c()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:o})),[e,n,o])}();return r.createElement(p.Provider,{value:n},t)}function m(){const e=(0,r.useContext)(p);if(!e)throw new o.i6("AnnouncementBarProvider");return e}},92949:(e,t,n)=>{"use strict";n.d(t,{I:()=>h,S:()=>g});var r=n(67294),i=n(10412),a=n(902),o=n(50012),s=n(86668);const l=r.createContext(void 0),u="theme",c=(0,o.WA)(u),d={light:"light",dark:"dark"},p=e=>e===d.dark?d.dark:d.light,f=e=>i.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),m=e=>{c.set(p(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.L)(),[i,a]=(0,r.useState)(f(e));(0,r.useEffect)((()=>{t&&c.del()}),[t]);const o=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:i=!0}=r;t?(a(t),i&&m(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?d.dark:d.light:e),c.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(i))}),[i]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=c.get();null!==t&&o(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,o]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:o(null)};return e.addListener(r),()=>e.removeListener(r)}),[o,t,n]),(0,r.useMemo)((()=>({colorMode:i,setColorMode:o,get isDarkTheme(){return i===d.dark},setLightTheme(){o(d.light)},setDarkTheme(){o(d.dark)}})),[i,o])}();return r.createElement(l.Provider,{value:n},t)}function h(){const e=(0,r.useContext)(l);if(null==e)throw new a.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},60373:(e,t,n)=>{"use strict";n.d(t,{J:()=>b,L5:()=>h,Oh:()=>y});var r=n(67294),i=n(94104),a=n(29935),o=n(86668),s=n(53438),l=n(902),u=n(50012);const c=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,u.WA)(c(e),{persistence:t}).set(n)},read:(e,t)=>(0,u.WA)(c(e),{persistence:t}).get(),clear:(e,t)=>{(0,u.WA)(c(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const f=r.createContext(null);function m(){const e=(0,i._r)(),t=(0,o.L)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,s]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function i(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,i(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function g(e){let{children:t}=e;const n=m();return r.createElement(f.Provider,{value:n},t)}function h(e){let{children:t}=e;return s.cE?r.createElement(g,null,t):r.createElement(r.Fragment,null,t)}function v(){const e=(0,r.useContext)(f);if(!e)throw new l.i6("DocsPreferredVersionContextProvider");return e}function b(e){void 0===e&&(e=a.m);const t=(0,i.zh)(e),[n,o]=v(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{o.savePreferredVersion(e,t)}),[o,e])}}function y(){const e=(0,i._r)(),[t]=v();function n(n){const r=e[n],{preferredVersionName:i}=t[n];return r.versions.find((e=>e.name===i))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},1116:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,b:()=>s});var r=n(67294),i=n(902);const a=Symbol("EmptyContext"),o=r.createContext(a);function s(e){let{children:t,name:n,items:i}=e;const a=(0,r.useMemo)((()=>n&&i?{name:n,items:i}:null),[n,i]);return r.createElement(o.Provider,{value:a},t)}function l(){const e=(0,r.useContext)(o);if(e===a)throw new i.i6("DocsSidebarProvider");return e}},74477:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,q:()=>o});var r=n(67294),i=n(902);const a=r.createContext(null);function o(e){let{children:t,version:n}=e;return r.createElement(a.Provider,{value:n},t)}function s(){const e=(0,r.useContext)(a);if(null===e)throw new i.i6("DocsVersionProvider");return e}},93163:(e,t,n)=>{"use strict";n.d(t,{M:()=>d,e:()=>p});var r=n(67294),i=n(13102),a=n(87524),o=n(91980),s=n(86668),l=n(902);const u=r.createContext(void 0);function c(){const e=function(){const e=(0,i.HY)(),{items:t}=(0,s.L)().navbar;return 0===t.length&&!e.component}(),t=(0,a.i)(),n=!e&&"mobile"===t,[l,u]=(0,r.useState)(!1);(0,o.Rb)((()=>{if(l)return u(!1),!1}));const c=(0,r.useCallback)((()=>{u((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&u(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:c,shown:l})),[e,n,c,l])}function d(e){let{children:t}=e;const n=c();return r.createElement(u.Provider,{value:n},t)}function p(){const e=r.useContext(u);if(void 0===e)throw new l.i6("NavbarMobileSidebarProvider");return e}},13102:(e,t,n)=>{"use strict";n.d(t,{HY:()=>s,Zo:()=>l,n2:()=>o});var r=n(67294),i=n(902);const a=r.createContext(null);function o(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return r.createElement(a.Provider,{value:n},t)}function s(){const e=(0,r.useContext)(a);if(!e)throw new i.i6("NavbarSecondaryMenuContentProvider");return e[0]}function l(e){let{component:t,props:n}=e;const o=(0,r.useContext)(a);if(!o)throw new i.i6("NavbarSecondaryMenuContentProvider");const[,s]=o,l=(0,i.Ql)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},19727:(e,t,n)=>{"use strict";n.d(t,{h:()=>i,t:()=>a});var r=n(67294);const i="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(i),"mousedown"===e.type&&document.body.classList.remove(i)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(i),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},87524:(e,t,n)=>{"use strict";n.d(t,{i:()=>u});var r=n(67294),i=n(10412);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},o=996;function s(){return i.Z.canUseDOM?window.innerWidth>o?a.desktop:a.mobile:a.ssr}const l=!1;function u(){const[e,t]=(0,r.useState)((()=>l?"ssr":s()));return(0,r.useEffect)((()=>{function e(){t(s())}const n=l?window.setTimeout(e,1e3):void 0;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(n)}}),[]),e}},35281:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const 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",admonitionType:e=>`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:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},53438:(e,t,n)=>{"use strict";n.d(t,{MN:()=>_,Wl:()=>m,_F:()=>b,cE:()=>p,hI:()=>x,jA:()=>g,lO:()=>k,oz:()=>S,s1:()=>w,vY:()=>E,xz:()=>f});var r=n(67294),i=n(16550),a=n(18790),o=n(94104),s=n(60373),l=n(74477),u=n(1116),c=n(67392),d=n(48596);const p=!!o._r;function f(e){const t=(0,l.E)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function m(e){if(e.href)return e.href;for(const t of e.items){if("link"===t.type)return t.href;if("category"===t.type){const e=m(t);if(e)return e}}}function g(){const{pathname:e}=(0,i.TH)(),t=(0,u.V)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=y({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const h=(e,t)=>void 0!==e&&(0,d.Mg)(e,t),v=(e,t)=>e.some((e=>b(e,t)));function b(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||v(e.items,t))}function y(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const i=[];return function e(t){for(const a of t)if("category"===a.type&&((0,d.Mg)(a.href,n)||e(a.items))||"link"===a.type&&(0,d.Mg)(a.href,n)){return r&&"category"!==a.type||i.unshift(a),!0}return!1}(t),i}function w(){const e=(0,u.V)(),{pathname:t}=(0,i.TH)(),n=(0,o.gA)()?.pluginData.breadcrumbs;return!1!==n&&e?y({sidebarItems:e.items,pathname:t}):null}function k(e){const{activeVersion:t}=(0,o.Iw)(e),{preferredVersion:n}=(0,s.J)(e),i=(0,o.yW)(e);return(0,r.useMemo)((()=>(0,c.j)([t,n,i].filter(Boolean))),[t,n,i])}function S(e,t){const n=k(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\n Available sidebar ids are:\n - ${Object.keys(t).join("\n- ")}`);return r[1]}),[e,n])}function E(e,t){const n=k(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`DocNavbarItem: couldn't find any doc with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,c.j)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function x(e){let{route:t,versionMetadata:n}=e;const r=(0,i.TH)(),o=t.routes,s=o.find((e=>(0,i.LX)(r.pathname,e)));if(!s)return null;const l=s.sidebar,u=l?n.docsSidebars[l]:void 0;return{docElement:(0,a.H)(o),sidebarName:l,sidebarItems:u}}function _(e){return e.filter((e=>"category"!==e.type||!!m(e)))}},91980:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>s,_X:()=>l});var r=n(67294),i=n(16550),a=n(61688),o=n(902);function s(e){!function(e){const t=(0,i.k6)(),n=(0,o.zX)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function l(e){return function(e){const t=(0,i.k6)();return(0,a.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}},67392:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function i(e){return Array.from(new Set(e))}n.d(t,{j:()=>i,l:()=>r})},1944:(e,t,n)=>{"use strict";n.d(t,{FG:()=>p,d:()=>c,VC:()=>f});var r=n(67294),i=n(86010),a=n(35742),o=n(30226);function s(){const e=r.useContext(o._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(44996),u=n(52263);function c(e){let{title:t,description:n,keywords:i,image:o,children:s}=e;const c=function(e){const{siteConfig:t}=(0,u.Z)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,l.C)(),p=o?d(o,{absolute:!0}):void 0;return r.createElement(a.Z,null,t&&r.createElement("title",null,c),t&&r.createElement("meta",{property:"og:title",content:c}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),i&&r.createElement("meta",{name:"keywords",content:Array.isArray(i)?i.join(","):i}),p&&r.createElement("meta",{property:"og:image",content:p}),p&&r.createElement("meta",{name:"twitter:image",content:p}),s)}const d=r.createContext(void 0);function p(e){let{className:t,children:n}=e;const o=r.useContext(d),s=(0,i.Z)(o,t);return r.createElement(d.Provider,{value:s},r.createElement(a.Z,null,r.createElement("html",{className:s})),n)}function f(e){let{children:t}=e;const n=s(),a=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const o=`plugin-id-${n.plugin.id}`;return r.createElement(p,{className:(0,i.Z)(a,o)},t)}},902:(e,t,n)=>{"use strict";n.d(t,{D9:()=>o,Qc:()=>u,Ql:()=>l,i6:()=>s,zX:()=>a});var r=n(67294);const i=n(10412).Z.canUseDOM?r.useLayoutEffect:r.useEffect;function a(e){const t=(0,r.useRef)(e);return i((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function o(e){const t=(0,r.useRef)();return i((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function l(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return r.createElement(r.Fragment,null,e.reduceRight(((e,t)=>r.createElement(t,null,e)),n))}}},48596:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>o,Ns:()=>s});var r=n(67294),i=n(723),a=n(52263);function o(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,a.Z)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function i(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(i).flatMap((e=>e.routes??[])))}(n)}({routes:i.Z,baseUrl:e})),[e])}},12466:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>l,RF:()=>d,o5:()=>p});var r=n(67294),i=n(10412),a=n(72389),o=n(902);const s=r.createContext(void 0);function l(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return r.createElement(s.Provider,{value:n},t)}function u(){const e=(0,r.useContext)(s);if(null==e)throw new o.i6("ScrollControllerProvider");return e}const c=()=>i.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function d(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=u(),i=(0,r.useRef)(c()),a=(0,o.zX)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=c();a(e,i.current),i.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function p(){const e=u(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),i=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,r.useLayoutEffect)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:i}}function f(){const e=(0,r.useRef)(null),t=(0,a.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const i=document.documentElement.scrollTop;(n&&i>e||!n&&it&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},43320:(e,t,n)=>{"use strict";n.d(t,{HX:()=>o,_q:()=>l,os:()=>s});var r=n(94104),i=n(52263),a=n(60373);const o="default";function s(e,t){return`docs-${e}-${t}`}function l(){const{i18n:e}=(0,i.Z)(),t=(0,r._r)(),n=(0,r.WS)(),l=(0,a.Oh)();const u=[o,...Object.keys(t).map((function(e){const r=n?.activePlugin.pluginId===e?n.activeVersion:void 0,i=l[e],a=t[e].versions.find((e=>e.isLast));return s(e,(r??i??a).name)}))];return{locale:e.currentLocale,tags:u}}},50012:(e,t,n)=>{"use strict";n.d(t,{Nk:()=>d,WA:()=>c});var r=n(67294),i=n(61688);const a="localStorage";function o(e){let{key:t,oldValue:n,newValue:r,storage:i}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,i),window.dispatchEvent(a)}function s(e){if(void 0===e&&(e=a),"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}let l=!1;const u={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function c(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);const n=s(t?.persistence);return null===n?u:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),o({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),o({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}function d(e,t){const n=(0,r.useRef)((()=>null===e?u:c(e,t))).current(),a=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,i.useSyncExternalStore)(a,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},94711:(e,t,n)=>{"use strict";n.d(t,{l:()=>a});var r=n(52263),i=n(16550);function a(){const{siteConfig:{baseUrl:e,url:t},i18n:{defaultLocale:n,currentLocale:a}}=(0,r.Z)(),{pathname:o}=(0,i.TH)(),s=a===n?e:e.replace(`/${a}/`,"/"),l=o.replace(e,"");return{createUrl:function(e){let{locale:r,fullyQualified:i}=e;return`${i?t:""}${function(e){return e===n?`${s}`:`${s}${e}/`}(r)}${l}`}}}},85936:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var r=n(67294),i=n(16550),a=n(902);function o(e){const t=(0,i.TH)(),n=(0,a.D9)(t),o=(0,a.zX)(e);(0,r.useEffect)((()=>{n&&t!==n&&o({location:t,previousLocation:n})}),[o,t,n])}},86668:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});var r=n(52263);function i(){return(0,r.Z)().siteConfig.themeConfig}},8802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),a="/"===i||i===r?i:(o=i,n?function(e){return e.endsWith("/")?e:`${e}/`}(o):function(e){return e.endsWith("/")?e.slice(0,-1):e}(o));var o;return e.replace(i,a)}},18780: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.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="post-content";var i=n(8802);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(i).default}})},86010:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ti});const i=function(){for(var e,t,n=0,i="";n{"use strict";n.d(t,{lX:()=>w,q_:()=>O,ob:()=>f,PP:()=>C,Ep:()=>p});var r=n(87462);function i(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,i=e.length;r=0;p--){var f=o[p];"."===f?a(o,p):".."===f?(a(o,p),d++):d&&(a(o,p),d--)}if(!u)for(;d--;d)o.unshift("..");!u||""===o[0]||o[0]&&i(o[0])||o.unshift("");var m=o.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(38776);function l(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 p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function f(e,t,n,i){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));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.Z)({},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(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=o(a.pathname,i.pathname)):a.pathname=i.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,i){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,i):i(!0):i(!1!==a)}else i(!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,i):n.push(i),d({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=f(e,t,g(),w.location);c.confirmTransitionTo(i,r,n,(function(e){e&&(w.entries[w.index]=i,d({action:r,location:i}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(59864),i={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},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var i=f(n);i&&i!==m&&e(t,i,r)}var o=c(n);d&&(o=o.concat(d(n)));for(var s=l(t),g=l(n),h=0;h{"use strict";e.exports=function(e,t,n,r,i,a,o,s){if(!e){var l;if(void 0===t)l=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,i,a,o,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},813: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],i=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=i,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 i=e.contentWindow;if(r=i.document,!i||!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,i=!1,a=null,o=function o(){if(!i){i=!0,clearTimeout(a);try{r.isIframeBlank(e)||(e.removeEventListener("load",o),r.getIframeContents(e,t,n))}catch(s){n()}}};e.addEventListener("load",o),a=setTimeout(o,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 i=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=t.querySelectorAll("iframe"),s=o.length,l=0;o=Array.prototype.slice.call(o);var u=function(){--s<=0&&a(l)};s||u(),o.forEach((function(t){e.matches(t,i.exclude)?u():i.onIframeReady(t,(function(e){n(t)&&(l++,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 i=!1,a=!1;return r.forEach((function(e,t){e.val===n&&(i=t,a=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==i||a?!1===i||a||(r[i].handled=!0):r.push({val:n,handled:!0}),!0):(!1===i&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var i=this;e.forEach((function(e){e.handled||i.getIframeContents(e.val,(function(e){i.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,i){for(var a=this,o=this.createIterator(t,e,r),s=[],l=[],u=void 0,c=void 0,d=function(){var e=a.getIteratorNode(o);return c=e.prevNode,u=e.node};d();)this.iframes&&this.forEachIframe(t,(function(e){return a.checkIframeFilter(u,c,e,s)}),(function(t){a.createInstanceOnIframe(t).forEachNode(e,(function(e){return l.push(e)}),r)})),l.push(u);l.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(s,e,n,r),i()}},{key:"forEachNode",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=this.getContexts(),o=a.length;o||i(),a.forEach((function(a){var s=function(){r.iterateThroughNodes(e,a,t,n,(function(){--o<=0&&i()}))};r.iframes?r.waitForIframes(a,s):s()}))}}],[{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 i=!1;return n.every((function(t){return!r.call(e,t)||(i=!0,!1)})),i}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 i in t)if(t.hasOwnProperty(i)){var a=t[i],o="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(a):this.escapeStr(a);""!==o&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(o)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynomyms(o)+"|"+this.processSynomyms(s)+")"+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(i){n.every((function(n){if(-1!==n.indexOf(i)){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,i="string"==typeof r?r:r.value,a="string"==typeof r?[]:r.limiters,o="";switch(a.forEach((function(e){o+="|"+t.escapeStr(e)})),i){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(o="\\s"+(o||this.escapeStr(n)))+"]*"+e+"[^"+o+"]*)";case"exactly":return"(^|\\s"+o+")("+e+")(?=$|\\s"+o+")"}}},{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 i=t.callNoMatchOnInvalidRanges(e,r),a=i.start,o=i.end;i.valid&&(e.start=a,e.length=o-a,n.push(e),r=o)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,i=!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?i=!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:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,i=!0,a=n.length,o=t-a,s=parseInt(e.start,10)-o;return(r=(s=s>a?a:s)+parseInt(e.length,10))>a&&(r=a,this.log("End range automatically set to the max value of "+a)),s<0||r-s<0||s>a||r>a?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:i}}},{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 i.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",i=e.splitText(t),a=i.splitText(n-t),o=document.createElement(r);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=i.textContent,i.parentNode.replaceChild(o,i),a}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,i){var a=this;e.nodes.every((function(o,s){var l=e.nodes[s+1];if(void 0===l||l.start>t){if(!r(o.node))return!1;var u=t-o.start,c=(n>o.end?o.end:n)-o.start,d=e.value.substr(0,o.start),p=e.value.substr(c+o.start);if(o.node=a.wrapRangeInTextNode(o.node,u,c),e.value=d+p,e.nodes.forEach((function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=c),e.nodes[n].end-=c)})),n-=c,i(o.node.previousSibling,o.start),!(n>o.end))return!1;t=o.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,i){var a=this,o=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[o];)if(n(i[o],t)){var s=i.index;if(0!==o)for(var l=1;l{"use strict";n.r(t)},32497:(e,t,n)=>{"use strict";n.r(t)},52295:(e,t,n)=>{"use strict";n.r(t)},74865:function(e,t,n){var r,i;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 i(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function o(e,t,n){var i;return(i="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,i}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=i(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,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(u,o(e,c,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){l(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)*i(Math.random()*t,.1,.95)),t=i(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 i,o=t.querySelector(r.barSelector),s=e?"-100":a(n.status||0),u=document.querySelector(r.parent);return l(o,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(i=t.querySelector(r.spinnerSelector))&&f(i),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&&f(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 s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=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,i=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((r=e[i]+a)in n)return r;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n,r,i=arguments;if(2==i.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,i[1],i[2])}}();function u(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=p(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(i="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=i)},27418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{"use strict";n.d(t,{Z:()=>a});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);E+=S.value.length,S=S.next){var x=S.value;if(t.length>e.length)return;if(!(x instanceof i)){var _,O=1;if(b){if(!(_=a(k,E,e,v))||_.index>=e.length)break;var P=_.index,C=_.index+_[0].length,T=E;for(T+=S.value.length;P>=T;)T+=(S=S.next).value.length;if(E=T-=S.value.length,S.value instanceof i)continue;for(var I=S;I!==t.tail&&(Td.reach&&(d.reach=N);var j=S.prev;if(L&&(j=l(t,j,L),E+=L.length),u(t,j,O),S=l(t,j,new i(p,h?r.tokenize(A,h):A,y,A)),R&&l(t,S,R),O>1){var D={cause:p+","+m,reach:N};o(e,t,n,S.prev,E,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i"+a.content+""},r}(),i=r;r.default=r,i.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.languages.markup.doctype.inside["internal-subset"].inside=i.languages.markup,i.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},i.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(i.languages.markup.tag,"addAttribute",{value:function(e,t){i.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:i.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.xml=i.languages.extend("markup",{}),i.languages.ssml=i.languages.xml,i.languages.atom=i.languages.xml,i.languages.rss=i.languages.xml,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+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},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|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|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|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 i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},i.languages.c=i.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),i.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),i.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},i.languages.c.string],char:i.languages.c.char,comment:i.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:i.languages.c}}}}),i.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete i.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(i),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(i),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(i),i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:i.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),i.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),i.languages.markup&&(i.languages.markup.tag.addInlined("script","javascript"),i.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),i.languages.js=i.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(i),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+i+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(i),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(i),i.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:i.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},i.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var s=p(/^\{$/,/^\}$/);if(-1===s)continue;for(var l=n;l=0&&f(u,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],a=r.pattern.source;function o(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function l(t,n,r){var i={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(i.code,i.grammar),e.hooks.run("after-tokenize",i),i.tokens}function u(t){var n={};n["interpolation-punctuation"]=i;var a=e.tokenize(t,n);if(3===a.length){var o=[1,1];o.push.apply(o,l(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,o)}return new e.Token("interpolation",a,r.alias,t)}function c(t,n,r){var i=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),o=0,c={},d=l(i.map((function(e){if("string"==typeof e)return e;for(var n,i=e.content;-1!==t.indexOf(n=s(o++,r)););return c[n]=i,n})).join(""),n,r),p=Object.keys(c);return o=0,function e(t){for(var n=0;n=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var i=p[o],a="string"==typeof r?r:r.content,s=a.indexOf(i);if(-1!==s){++o;var l=a.substring(0,s),d=u(c[i]),f=a.substring(s+i.length),m=[];if(l&&m.push(l),m.push(d),f){var g=[f];e(g),m.push.apply(m,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,i=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(i),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function a(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return i})),RegExp(e,t)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(o).join(""):""},s=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===o(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:o(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var l=o(i);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=o(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}i.content&&"string"!=typeof i.content&&s(i.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(i),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(i),i.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},i.languages.go=i.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),i.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete i.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,a){if(n.language===r){var o=n.tokenStack=[];n.code=n.code.replace(i,(function(e){if("function"==typeof a&&!a(e))return e;for(var i,s=o.length;-1!==n.code.indexOf(i=t(r,s));)++s;return o[s]=e,i})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var i=0,a=Object.keys(n.tokenStack);!function o(s){for(var l=0;l=a.length);l++){var u=s[l];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=a[i],d=n.tokenStack[c],p="string"==typeof u?u:u.content,f=t(r,c),m=p.indexOf(f);if(m>-1){++i;var g=p.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),v=p.substring(m+f.length),b=[];g&&b.push.apply(b,o([g])),b.push(h),v&&b.push.apply(b,o([v])),"string"==typeof u?s.splice.apply(s,[l,1].concat(b)):u.content=b}}else u.content&&o(u.content)}return s}(n.tokens)}}}})}(i),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(i),i.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},i.languages.webmanifest=i.languages.json,i.languages.less=i.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),i.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),i.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},i.languages.objectivec=i.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete i.languages.objectivec["class-name"],i.languages.objc=i.languages.objectivec,i.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},i.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},i.languages.python["string-interpolation"].inside.interpolation.inside.rest=i.languages.python,i.languages.py=i.languages.python,i.languages.reason=i.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),i.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete i.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(i),i.languages.scss=i.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),i.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),i.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),i.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),i.languages.scss.atrule.inside.rest=i.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(i),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(i),i.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const a=i},29901:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},2885:(e,t,n)=>{const r=n(29901),i=n(39642),a=new Set;function o(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...a,...Object.keys(Prism.languages)];i(r,e,t).load((e=>{if(!(e in r.languages))return void(o.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(16500).resolve(t)],delete Prism.languages[e],n(16500)(t),a.add(e)}))}o.silent=!1,e.exports=o},6726:(e,t,n)=>{var r={"./":2885};function i(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]}i.keys=function(){return Object.keys(r)},i.resolve=a,e.exports=i,i.id=6726},16500:(e,t,n)=>{var r={"./":2885};function i(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]}i.keys=function(){return Object.keys(r)},i.resolve=a,e.exports=i,i.id=16500},39642:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var s={},l=e[r];if(l){function u(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in s))for(var o in i(t,a),s[t]=!0,n[t])s[o]=!0}t(l.require,u),t(l.optional,u),t(l.modify,u)}n[r]=s,a.pop()}}return function(e){var t=n[e];return t||(i(e,r),t=n[e]),t}}function i(e){for(var t in e)return!0;return!1}return function(a,o,s){var l=function(e){var t={};for(var n in e){var r=e[n];for(var i in r)if("meta"!=i){var a=r[i];t[i]="string"==typeof a?{title:a}:a}}return t}(a),u=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var i in n={},e){var a=e[i];t(a&&a.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+i+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+i+" because it is a component.");n[t]=i}))}return n[r]||r}}(l);o=o.map(u),s=(s||[]).map(u);var c=n(o),d=n(s);o.forEach((function e(n){var r=l[n];t(r&&r.require,(function(t){t in d||(c[t]=!0,e(t))}))}));for(var p,f=r(l),m=c;i(m);){for(var g in p={},m){var h=l[g];t(h&&h.modify,(function(e){e in d&&(p[e]=!0)}))}for(var v in d)if(!(v in c))for(var b in f(v))if(b in c){p[v]=!0;break}for(var y in m=p)c[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,i){var a=i?i.series:void 0,o=i?i.parallel:e,s={},l={};function u(e){if(e in s)return s[e];l[e]=!0;var i,c=[];for(var d in t(e))d in n&&c.push(d);if(0===c.length)i=r(e);else{var p=o(c.map((function(e){var t=u(e);return delete l[e],t})));a?i=a(p,(function(){return r(e)})):r(e)}return s[e]=i}for(var c in n)u(c);var d=[];for(var p in l)d.push(s[p]);return o(d)}(f,c,t,n)}};return w}}();e.exports=t},92703:(e,t,n)=>{"use strict";var r=n(50414);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=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 s.name="Invariant Violation",s}}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:i};return n.PropTypes=n,n}},45697:(e,t,n)=>{e.exports=n(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},64448:(e,t,n)=>{"use strict";var r=n(67294),i=n(27418),a=n(63840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n