Retrieve the field code of an object in a slot and, optionally, some other information
Behaviour
- Locate the object pointed to by the specified slot_no
- Determine its sffield code and return this, or some other information (see below) ifflagsare used
Definition
int64_t slot_type (
  	uint32_t slot_no,
  	uint32_t flags
);
Example
uint8_t txn_id[32];
int64_t bytes_written = 
    slot_id(txn_id, 32, 1); // assumes a txn is slotted into slot=1
Parameters
| Name | Type | Description | 
|---|---|---|
| slot_no | uint32_t | The slot number | 
| flags | uin32_t | For normal operation this should be 0.To determine whether or not an STI_AMOUNTtype contains a native (XRP) amount or a floating point (IOU) amount set to1. | 
Return Code
| Type | Description | 
|---|---|
| int64_t | If flagsis0then:The sffield code of the slotted objectIf flagsis1then:1if and only if the slotted object is anSTI_AMOUNTand the type of the amount is XRP.If negative, an error: DOESNT_EXIST- the specified slot_nodoes not contain an object.NOT_AN_AMOUNT- flagswas set to1but the slotted object is not anSTI_AMOUNTobject |