TrexResource
Access via urblock.trex.
Manage T-REX (ERC-3643) security token operations: freeze, force transfer, recovery, and compliance bindings.
Methods
freeze(tokenId, params)
Freeze an address (blocks all transfers).
const tx = await urblock.trex.freeze("tok_abc123", {
address: "0x...",
idempotency_key: "freeze-001",
});
Returns: TransactionShortResponse
unfreeze(tokenId, params)
Unfreeze an address.
const tx = await urblock.trex.unfreeze("tok_abc123", {
address: "0x...",
idempotency_key: "unfreeze-001",
});
Returns: TransactionShortResponse
freezePartial(tokenId, params)
Freeze a partial amount of tokens for an address.
const tx = await urblock.trex.freezePartial("tok_abc123", {
address: "0x...",
amount: "1000000000000000000",
idempotency_key: "freeze-partial-001",
});
Returns: TransactionShortResponse
unfreezePartial(tokenId, params)
Unfreeze a partial amount of tokens for an address.
const tx = await urblock.trex.unfreezePartial("tok_abc123", {
address: "0x...",
amount: "1000000000000000000",
idempotency_key: "unfreeze-partial-001",
});
Returns: TransactionShortResponse
forceTransfer(tokenId, params)
Force transfer tokens between addresses (agent-only).
const tx = await urblock.trex.forceTransfer("tok_abc123", {
from: "0x...",
to: "0x...",
amount: "500000000000000000",
idempotency_key: "force-transfer-001",
});
Returns: TransactionShortResponse
recover(tokenId, params)
Recover tokens from a lost wallet (agent-only).
const tx = await urblock.trex.recover("tok_abc123", {
lost_address: "0x...",
new_address: "0x...",
investor_onchain_id: "0x...",
idempotency_key: "recover-001",
});
Returns: TransactionShortResponse
listFrozen(tokenId, params?)
List frozen addresses for a T-REX token.
const frozen = await urblock.trex.listFrozen("tok_abc123");
Returns: ListResponse<FrozenAddressItem>
getFrozenTokens(tokenId, params)
Get the frozen token amount for a specific address.
const frozen = await urblock.trex.getFrozenTokens("tok_abc123", {
address: "0x...",
});
Returns: FrozenTokensResponse
setIdentityRegistry(tokenId, params)
Set the identity registry address for a T-REX token.
const tx = await urblock.trex.setIdentityRegistry("tok_abc123", {
address: "0x...",
idempotency_key: "set-registry-001",
});
Returns: TransactionShortResponse
setCompliance(tokenId, params)
Set the compliance module address for a T-REX token.
const tx = await urblock.trex.setCompliance("tok_abc123", {
address: "0x...",
idempotency_key: "set-compliance-001",
});
Returns: TransactionShortResponse
getIdentityRegistry(tokenId)
Get the identity registry address.
const registry = await urblock.trex.getIdentityRegistry("tok_abc123");
Returns: IdentityRegistryInfoResponse
getComplianceInfo(tokenId)
Get the compliance module address.
const compliance = await urblock.trex.getComplianceInfo("tok_abc123");
Returns: ComplianceInfoResponse