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!
position: BigInt!
startAmount: BigInt!
startTime: BigInt!
stream: LockupStream!
}

Fields​

Segment.id ● String! non-null scalar​

Unique identifier: segment-{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​

Unix timestamp indicating the end of the segment.

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.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 ● LockupStream! non-null object​

The stream in which this segment was created.