1 line
7.1 KiB
JavaScript
1 line
7.1 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[157],{537:function(t,e,r){"use strict";r.r(e);var s=r(46),_=Object(s.a)({},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("p",[r("em",[r("strong",[t._v("name")])]),t._v(": UInt")]),t._v(" "),r("p",[r("em",[r("strong",[t._v("description")])]),t._v(": A generic unsigned integer codec. For Substrate all numbers are LE encoded, this handles the encoding and decoding of those numbers. Upon construction the bitLength is provided and any additional use keeps the number to this length. This extends "),r("code",[t._v("BN")]),t._v(", so all methods available on a normal "),r("code",[t._v("BN")]),t._v(" object is available here.")]),t._v(" "),r("h1",{attrs:{id:"hierarchy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hierarchy","aria-hidden":"true"}},[t._v("#")]),t._v(" Hierarchy")]),t._v(" "),r("p",[r("code",[t._v("AbstractInt")])]),t._v(" "),r("p",[r("strong",[t._v("↳ UInt")])]),t._v(" "),r("p",[t._v("↳ "),r("router-link",{attrs:{to:"/types/classes/_primitive_u32_.u32.html"}},[t._v("U32")])],1),t._v(" "),r("p",[t._v("↳ "),r("router-link",{attrs:{to:"/types/classes/_primitive_u16_.u16.html"}},[t._v("U16")])],1),t._v(" "),r("p",[t._v("↳ "),r("router-link",{attrs:{to:"/types/classes/_primitive_u8_.u8.html"}},[t._v("U8")])],1),t._v(" "),r("p",[t._v("↳ "),r("router-link",{attrs:{to:"/types/classes/_primitive_u64_.u64.html"}},[t._v("U64")])],1),t._v(" "),r("p",[t._v("↳ "),r("router-link",{attrs:{to:"/types/classes/_primitive_u128_.u128.html"}},[t._v("U128")])],1),t._v(" "),r("p",[t._v("↳ "),r("router-link",{attrs:{to:"/types/classes/_primitive_u256_.u256.html"}},[t._v("U256")])],1),t._v(" "),r("h1",{attrs:{id:"implements"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#implements","aria-hidden":"true"}},[t._v("#")]),t._v(" Implements")]),t._v(" "),r("ul",[r("li",[r("router-link",{attrs:{to:"/types/interfaces/_types_.codec.html"}},[t._v("Codec")])],1)]),t._v(" "),r("h1",{attrs:{id:"constructors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#constructors","aria-hidden":"true"}},[t._v("#")]),t._v(" Constructors")]),t._v(" "),r("p",[r("a",{attrs:{id:"constructor"}})]),t._v(" "),r("h2",{attrs:{id:"constructor"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#constructor","aria-hidden":"true"}},[t._v("#")]),t._v(" constructor")]),t._v(" "),r("p",[t._v("⊕ "),r("strong",[t._v("new UInt")]),t._v("(value?: "),r("em",[r("router-link",{attrs:{to:"/types/modules/_types_.html#anynumber"}},[t._v("AnyNumber")])],1),t._v(", bitLength?: "),r("em",[r("router-link",{attrs:{to:"/types/modules/_codec_abstractint_.html#uintbitlength"}},[t._v("UIntBitLength")])],1),t._v(", isHexJson?: "),r("em",[r("code",[t._v("boolean")])]),t._v("): "),r("router-link",{attrs:{to:"/types/classes/_codec_uint_.uint.html"}},[t._v("UInt")])],1),t._v(" "),r("p",[r("em",[t._v("Overrides AbstractInt.__constructor")])]),t._v(" "),r("p",[r("em",[t._v("Defined in "),r("a",{attrs:{href:"https://github.com/polkadot-js/api/blob/73a5ea1/packages/types/src/codec/UInt.ts#L21",target:"_blank",rel:"noopener noreferrer"}},[t._v("codec/UInt.ts:21"),r("OutboundLink")],1)])]),t._v(" "),r("p",[r("strong",[t._v("Parameters:")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Name")]),t._v(" "),r("th",[t._v("Type")]),t._v(" "),r("th",[t._v("Default value")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[r("code",[t._v("Default value")]),t._v(" value")]),t._v(" "),r("td",[r("router-link",{attrs:{to:"/types/modules/_types_.html#anynumber"}},[t._v("AnyNumber")])],1),t._v(" "),r("td",[t._v("0")])]),t._v(" "),r("tr",[r("td",[r("code",[t._v("Default value")]),t._v(" bitLength")]),t._v(" "),r("td",[r("router-link",{attrs:{to:"/types/modules/_codec_abstractint_.html#uintbitlength"}},[t._v("UIntBitLength")])],1),t._v(" "),r("td",[t._v("DEFAULT_UINT_BITS")])]),t._v(" "),r("tr",[r("td",[r("code",[t._v("Default value")]),t._v(" isHexJson")]),t._v(" "),r("td",[r("code",[t._v("boolean")])]),t._v(" "),r("td",[t._v("false")])])])]),t._v(" "),r("p",[r("strong",[t._v("Returns:")]),t._v(" "),r("router-link",{attrs:{to:"/types/classes/_codec_uint_.uint.html"}},[t._v("UInt")])],1),t._v(" "),r("hr"),t._v(" "),r("h1",{attrs:{id:"methods"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#methods","aria-hidden":"true"}},[t._v("#")]),t._v(" Methods")]),t._v(" "),r("p",[r("a",{attrs:{id:"tohex"}})]),t._v(" "),r("h2",{attrs:{id:"tohex"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#tohex","aria-hidden":"true"}},[t._v("#")]),t._v(" toHex")]),t._v(" "),r("p",[t._v("▸ "),r("strong",[t._v("toHex")]),t._v("(): "),r("code",[t._v("string")])]),t._v(" "),r("p",[r("em",[t._v("Implementation of "),r("router-link",{attrs:{to:"/types/interfaces/_types_.codec.html"}},[t._v("Codec")]),t._v("."),r("router-link",{attrs:{to:"/types/interfaces/_types_.codec.html#tohex"}},[t._v("toHex")])],1)]),t._v(" "),r("p",[r("em",[t._v("Overrides AbstractInt.toHex")])]),t._v(" "),r("p",[r("em",[t._v("Defined in "),r("a",{attrs:{href:"https://github.com/polkadot-js/api/blob/73a5ea1/packages/types/src/codec/UInt.ts#L36",target:"_blank",rel:"noopener noreferrer"}},[t._v("codec/UInt.ts:36"),r("OutboundLink")],1)])]),t._v(" "),r("p",[r("em",[r("strong",[t._v("description")])]),t._v(": Returns a hex string representation of the value")]),t._v(" "),r("p",[r("strong",[t._v("Returns:")]),t._v(" "),r("code",[t._v("string")])]),t._v(" "),r("hr"),t._v(" "),r("p",[r("a",{attrs:{id:"tou8a"}})]),t._v(" "),r("h2",{attrs:{id:"tou8a"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#tou8a","aria-hidden":"true"}},[t._v("#")]),t._v(" toU8a")]),t._v(" "),r("p",[t._v("▸ "),r("strong",[t._v("toU8a")]),t._v("(isBare?: "),r("em",[r("code",[t._v("undefined")]),t._v(" | "),r("code",[t._v("false")]),t._v(" | "),r("code",[t._v("true")])]),t._v("): "),r("code",[t._v("Uint8Array")])]),t._v(" "),r("p",[r("em",[t._v("Implementation of "),r("router-link",{attrs:{to:"/types/interfaces/_types_.codec.html"}},[t._v("Codec")]),t._v("."),r("router-link",{attrs:{to:"/types/interfaces/_types_.codec.html#tou8a"}},[t._v("toU8a")])],1)]),t._v(" "),r("p",[r("em",[t._v("Overrides AbstractInt.toU8a")])]),t._v(" "),r("p",[r("em",[t._v("Defined in "),r("a",{attrs:{href:"https://github.com/polkadot-js/api/blob/73a5ea1/packages/types/src/codec/UInt.ts#L48",target:"_blank",rel:"noopener noreferrer"}},[t._v("codec/UInt.ts:48"),r("OutboundLink")],1)])]),t._v(" "),r("p",[r("em",[r("strong",[t._v("description")])]),t._v(": Encodes the value as a Uint8Array as per the parity-codec specifications")]),t._v(" "),r("p",[r("strong",[t._v("Parameters:")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Name")]),t._v(" "),r("th",[t._v("Type")]),t._v(" "),r("th",[t._v("Description")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[r("code",[t._v("Optional")]),t._v(" isBare")]),t._v(" "),r("td",[r("code",[t._v("undefined")]),t._v(" | "),r("code",[t._v("false")]),t._v(" | "),r("code",[t._v("true")])]),t._v(" "),r("td",[t._v("true when the value has none of the type-specific prefixes (internal)")])])])]),t._v(" "),r("p",[r("strong",[t._v("Returns:")]),t._v(" "),r("code",[t._v("Uint8Array")])]),t._v(" "),r("hr")])},[],!1,null,null,null);e.default=_.exports}}]); |