Skip to main content

Segment

See https://docs.sablier.com/concepts/lockup/segments

type Segment {
id: String!
amount: BigInt!
endAmount: BigInt!
endTime: BigInt!
exponent: BigInt!
milestone: BigInt!
position: BigInt!
startAmount: BigInt!
startTime: BigInt!
stream: Stream!
}

Fields

Segment.id ● String! non-null scalar

Unique identifier: {streamId}-{position}

Segment.amount ● BigInt! non-null scalar

Amount distributed by this segment.

Segment.endAmount ● BigInt! non-null scalar

Total amount distributed at endTime. This is the sum of this segment's amount and all previous segments' amounts.

Segment.endTime ● BigInt! non-null scalar

Alias for the milestone field.

Segment.exponent ● BigInt! non-null scalar

Exponent used for the streamed amount calculations. See https://github.com/sablier-labs/lockup/blob/v2.0/src/types/DataTypes.sol#L279-L288

Segment.milestone ● BigInt! non-null scalar

Unix timestamp indicating the end of the segment.

Segment.position ● BigInt! non-null scalar

Position of the segment inside the array.

Segment.startAmount ● BigInt! non-null scalar

Total amount distributed by the stream at startTime. This is the sum of all previous segments' amounts.

Segment.startTime ● BigInt! non-null scalar

Unix timestamp indicating the start of the segment. This is also the end time of the previous segment or, if this is the first segment, it is the start time of the stream.

Segment.stream ● Stream! non-null object

The stream in which this segment was created.