name: Proposal
description: A proposal in the system. It just extends Method (Proposal = Call in Rust)
Type parameters
S : ConstructorDef
T : object
V : object
E : object
Hierarchy
↳ Method
↳ Proposal
Implements
Constructors
constructor
⊕ new Proposal(value: any, meta?: FunctionMetadata): Proposal
Inherited from Method.constructor
Overrides Struct.constructor
Defined in Method.ts:70
Parameters:
| Name | Type |
|---|---|
| value | any |
Optional meta |
FunctionMetadata |
Returns: Proposal
Accessors
Type
getType(): E
Defined in codec/Struct.ts:142
description: Returns the Type description to sthe structure
Returns: E
args
getargs(): Array<Codec>
Defined in Method.ts:192
description: The arguments for the function call
Returns: Array<Codec>
argsDef
getargsDef(): ArgsDef
Defined in Method.ts:200
description: Thge argument defintions
Returns: ArgsDef
callIndex
getcallIndex(): Uint8Array
Inherited from Method.callIndex
Defined in Method.ts:207
description: The encoded [sectionIndex, methodIndex] identifier
Returns: Uint8Array
data
getdata(): Uint8Array
Defined in Method.ts:214
description: The encoded data
Returns: Uint8Array
encodedLength
getencodedLength(): number
Inherited from Struct.encodedLength
Defined in codec/Struct.ts:149
description: The length of the value when encoded as a Uint8Array
Returns: number
hasOrigin
gethasOrigin(): boolean
Inherited from Method.hasOrigin
Defined in Method.ts:221
description: true if the Origin type is on the method (extrinsic method)
Returns: boolean
meta
getmeta(): FunctionMetadata
Defined in Method.ts:230
description: The FunctionMetadata
Returns: FunctionMetadata
Methods
get
▸ get(name: keyof S): Codec | undefined
Overrides Map.get
Defined in codec/Struct.ts:159
description: Returns a specific names entry in the structure
Parameters:
| Name | Type | Description |
|---|---|---|
| name | keyof S |
The name of the entry to retrieve |
Returns: Codec | undefined
getAtIndex
▸ getAtIndex(index: number): Codec
Inherited from Struct.getAtIndex
Defined in codec/Struct.ts:166
description: Returns the values of a member at a specific index (Rather use get(name) for performance)
Parameters:
| Name | Type |
|---|---|
| index | number |
Returns: Codec
toArray
▸ toArray(): Array<Codec>
Defined in codec/Struct.ts:173
description: Converts the Object to an standard JavaScript Array
Returns: Array<Codec>
toHex
▸ toHex(): string
Defined in codec/Struct.ts:180
description: Returns a hex string representation of the value
Returns: string
toJSON
▸ toJSON(): any
Implementation of Codec.toJSON
Defined in codec/Struct.ts:187
description: Converts the Object to JSON, typically used for RPC transfers
Returns: any
toString
▸ toString(): string
Implementation of Codec.toString
Inherited from Struct.toString
Defined in codec/Struct.ts:201
description: Returns the string representation of the value
Returns: string
toU8a
▸ toU8a(isBare?: undefined | false | true): Uint8Array
Defined in codec/Struct.ts:209
description: Encodes the value as a Uint8Array as per the parity-codec specifications
Parameters:
| Name | Type | Description | ||
|---|---|---|---|---|
Optional isBare |
undefined |
false |
true |
true when the value has none of the type-specific prefixes (internal) |
Returns: Uint8Array
<Static> filterOrigin
▸ filterOrigin(meta?: FunctionMetadata): Array<FunctionArgumentMetadata>
Inherited from Method.filterOrigin
Defined in Method.ts:140
Parameters:
| Name | Type |
|---|---|
Optional meta |
FunctionMetadata |
Returns: Array<FunctionArgumentMetadata>
<Static> findFunction
▸ findFunction(callIndex: Uint8Array): MethodFunction
Inherited from Method.findFunction
Defined in Method.ts:156
Parameters:
| Name | Type |
|---|---|
| callIndex | Uint8Array |
Returns: MethodFunction
<Static> injectMethods
▸ injectMethods(moduleMethods: ModulesWithMethods): void
Inherited from Method.injectMethods
Defined in Method.ts:181
Parameters:
| Name | Type |
|---|---|
| moduleMethods | ModulesWithMethods |
Returns: void
<Static> with
▸ with<S>(Types: S): Constructor<Struct<S>>
Defined in codec/Struct.ts:122
Type parameters:
S : ConstructorDef
Parameters:
| Name | Type |
|---|---|
| Types | S |
Returns: Constructor<Struct<S>>