Cow
Composite 79 v393Cow
About This Type
Structured type: Cow.
A struct-like type where each field is encoded in declaration order.
Encoding: Fields encoded consecutively in declaration order, no field names or separators.
Fields (1)
| # | Name | Type |
|---|---|---|
| 0 | (unnamed) | str |
SCALE Encoding
- Rule
- 1 field encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 1 field = ?: str
0x<field0>field 0 field0: strCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Cow
const value = registry.createType("Cow", {
field: 0
});
console.log("Hex:", value.toHex());Type Parameters
T = str
Referenced By (6)
Type Information
- Type ID
- 79
- Kind
- Composite
- Path
- Cow
- Runtime
- v393