XSC-0004: Wrapped Token
XSC-0004 is the wrapped-token standard for representing assets from another chain on Xian. It extends the fungible token model with controlled minting and burning so a bridge or custody system can issue Xian-side balances for locked external assets and destroy them when users unwrap.
Required Concepts
- standard fungible-token transfers, approvals, and balances
- collection-level token metadata such as name, symbol, logo, website, and operator
- a
minterrole that can issue wrapped supply - a
burnfunction that destroys caller-owned supply for unwrapping
Core Functions
python
@export
def change_metadata(key: str, value: Any):
...
@export
def transfer(amount: float, to: str):
...
@export
def approve(amount: float, to: str):
...
@export
def transfer_from(amount: float, to: str, main_account: str):
...
@export
def balance_of(address: str):
...
@export
def change_minter(new_minter: str):
...
@export
def mint(amount: float, to: str):
...
@export
def burn(amount: float):
...Expected Semantics
- only the current minter can call
mint mintincreases both recipient balance and total supplyburnreduces caller balance and total supplytransfer_fromrelies on explicit allowances stored separately from balances- bridges should treat mint and burn events as the chain-local accounting signals for wrapping and unwrapping
The canonical proposal and reference implementation live in xian-xips/XSC004_wrapped_token.