Describes a single argument of an RPC method for validation and help text.
Declared in <rpc/util.h>
struct RPCArg;
| Name | Description |
|---|---|
Default | Default constant value |
DefaultHint | Hint for default value |
Fallback | The argument's default: an optionality marker, a default hint, or a default value. |
| Name | Description |
|---|---|
Optional | Whether an argument is required or may be omitted. |
Type | The JSON type expected for the argument. |
| Name | Description |
|---|---|
RPCArg [constructor] | Constructors |
GetFirstName | Return the first of all aliases |
GetName | Return the name, throws when there are aliases |
IsOptional | Report whether the argument may be omitted. |
MatchesType | Check whether the request JSON type matches. Returns true if type matches, or object describing error(s) if not. |
ToDescriptionString | Return the description string, including the argument type and whether the argument is required. |
ToString | Return the type string of the argument. Set oneline to allow it to be overridden by a custom oneline type string (m_opts.oneline_description). |
ToStringObj | Return the type string of the argument when it is in an object (dict). Set oneline to get the oneline representation (less whitespace) |
| Name | Description |
|---|---|
m_description | Human-readable description of the argument. |
m_fallback | Default value or optionality of the argument. |
m_inner | Only used for arrays or dicts |
m_names | The name of the arg (can be empty for inner args, can contain multiple aliases separated by | for named request arguments) |
m_opts | Additional options controlling validation and rendering. |
m_type | The JSON type expected for the argument. |