Retrieve the field code of an object in a slot and, optionally, some other information


  • Locate the object pointed to by the specified slot_no
  • Determine its sf field code and return this, or some other information (see below) if flags are used


int64_t slot_type (
  	uint32_t slot_no,
  	uint32_t flags


uint8_t txn_id[32];
int64_t bytes_written = 
    slot_id(txn_id, 32, 1); // assumes a txn is slotted into slot=1


slot_nouint32_tThe slot number
flagsuin32_tFor normal operation this should be 0.

To determine whether or not an STI_AMOUNT type contains a native (XRP) amount or a floating point (IOU) amount set to 1.

Return Code

int64_tIf flags is 0 then:
The sf field code of the slotted object

If flags is 1 then:
1 if and only if the slotted object is an STI_AMOUNT and the type of the amount is XRP.

If negative, an error:
- the specified slot_no does not contain an object.

- flags was set to 1 but the slotted object is not an STI_AMOUNT object