import { includeDSON , includeJSON , RadixAddress , RadixParticle , RadixSerializer , RRI } from '..' ; import { createNonce } from '../primitives/Nonce' ; @ RadixSerializer . registerClass ( 'radix.particles.unique' ) export class RadixUniqueParticle extends RadixParticle { @ includeDSON @ includeJSON public name : string ; @ includeDSON @ includeJSON public address : RadixAddress ; @ includeDSON @ includeJSON public nonce : number ; constructor ( address , unique , nonce = createNonce ( ) ) { super ( ) ; this . address = address ; this . name = unique ; this . nonce = nonce ; } public getAddresses ( ) { return [ this . address ] ; } public getRRI ( ) { return new RRI ( this . address , this . name ) ; } }