VestingResource
Access via urblock.vesting.
Deploy and manage VestingWallet contracts with cliff and linear release.
Methods
create(params)
Deploy a new vesting schedule.
const vesting = await urblock.vesting.create({
token_id: "tok_abc123",
beneficiary: "0x...",
total_amount: "1000000000000000000000",
start_timestamp: 1704067200,
duration_seconds: 31536000,
cliff_seconds: 7776000,
network: "polygon_amoy",
idempotency_key: "vesting-001",
});
Returns: VestingResponse
list(params?)
List vesting schedules.
const schedules = await urblock.vesting.list({ limit: 10 });
Returns: ListResponse<VestingListItem>
retrieve(id)
Get a vesting schedule by ID.
const vesting = await urblock.vesting.retrieve("vst_abc123");
Returns: VestingResponse
getVestedAmount(id, params?)
Get the vested amount at a specific timestamp.
const amount = await urblock.vesting.getVestedAmount("vst_abc123", {
timestamp: 1735689600,
});
Returns: VestedAmountResponse
release(id, params?)
Release vested tokens to the beneficiary.
const tx = await urblock.vesting.release("vst_abc123", {
idempotency_key: "release-001",
});
Returns: TransactionShortResponse