Files
api/docs/assets/js/142.24ecaa19.js
T
2019-02-27 15:39:51 +00:00

1 line
3.7 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{519:function(t,e,a){"use strict";a.r(e);var r=a(46),n=Object(r.a)({},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"index"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index","aria-hidden":"true"}},[t._v("#")]),t._v(" Index")]),t._v(" "),a("h3",{attrs:{id:"interfaces"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#interfaces","aria-hidden":"true"}},[t._v("#")]),t._v(" Interfaces")]),t._v(" "),a("ul",[a("li",[a("router-link",{attrs:{to:"/type-storage/interfaces/_utils_createfunction_.createitemoptions.html"}},[t._v("CreateItemOptions")])],1)]),t._v(" "),a("h3",{attrs:{id:"functions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#functions","aria-hidden":"true"}},[t._v("#")]),t._v(" Functions")]),t._v(" "),a("ul",[a("li",[a("router-link",{attrs:{to:"/type-storage/modules/_utils_createfunction_.html#createfunction"}},[t._v("createFunction")])],1)]),t._v(" "),a("hr"),t._v(" "),a("h1",{attrs:{id:"functions-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#functions-2","aria-hidden":"true"}},[t._v("#")]),t._v(" Functions")]),t._v(" "),a("p",[a("a",{attrs:{id:"createfunction"}})]),t._v(" "),a("h2",{attrs:{id:"createfunction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#createfunction","aria-hidden":"true"}},[t._v("#")]),t._v(" createFunction")]),t._v(" "),a("p",[t._v("▸ "),a("strong",[t._v("createFunction")]),t._v("(section: "),a("em",[a("code",[t._v("Text")]),t._v(" | "),a("code",[t._v("string")])]),t._v(", method: "),a("em",[a("code",[t._v("Text")]),t._v(" | "),a("code",[t._v("string")])]),t._v(", meta: "),a("em",[a("code",[t._v("StorageFunctionMetadata")])]),t._v(", options?: "),a("em",[a("router-link",{attrs:{to:"/type-storage/interfaces/_utils_createfunction_.createitemoptions.html"}},[t._v("CreateItemOptions")])],1),t._v("): "),a("code",[t._v("StorageFunction")])]),t._v(" "),a("p",[a("em",[t._v("Defined in "),a("a",{attrs:{href:"https://github.com/polkadot-js/api/blob/255b495/packages/type-storage/src/utils/createFunction.ts#L26",target:"_blank",rel:"noopener noreferrer"}},[t._v("utils/createFunction.ts:26"),a("OutboundLink")],1)])]),t._v(" "),a("p",[t._v("From the schema of a function in the module's storage, generate the function that will return the correct storage key.")]),t._v(" "),a("p",[a("strong",[t._v("Parameters:")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Default value")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("section")]),t._v(" "),a("td",[a("code",[t._v("Text")]),t._v(" | "),a("code",[t._v("string")])]),t._v(" "),a("td",[t._v("-")]),t._v(" "),a("td")]),t._v(" "),a("tr",[a("td",[t._v("method")]),t._v(" "),a("td",[a("code",[t._v("Text")]),t._v(" | "),a("code",[t._v("string")])]),t._v(" "),a("td",[t._v("-")]),t._v(" "),a("td")]),t._v(" "),a("tr",[a("td",[t._v("meta")]),t._v(" "),a("td",[a("code",[t._v("StorageFunctionMetadata")])]),t._v(" "),a("td",[t._v("-")]),t._v(" "),a("td")]),t._v(" "),a("tr",[a("td",[a("code",[t._v("Default value")]),t._v(" options")]),t._v(" "),a("td",[a("router-link",{attrs:{to:"/type-storage/interfaces/_utils_createfunction_.createitemoptions.html"}},[t._v("CreateItemOptions")])],1),t._v(" "),a("td",[t._v("{}")]),t._v(" "),a("td",[t._v("Additional options when creating the function. These options are not known at runtime (from state_getMetadata), they need to be supplied by us manually at compile time.")])])])]),t._v(" "),a("p",[a("strong",[t._v("Returns:")]),t._v(" "),a("code",[t._v("StorageFunction")])]),t._v(" "),a("hr")])},[],!1,null,null,null);e.default=n.exports}}]);