cardano-wallet-js
Version:
javascript/typescript client for the official cardano-wallet api
19 lines (15 loc) • 395 B
text/typescript
import { ApiAddress, ApiAddressStateEnum } from "../models";
export class AddressWallet implements ApiAddress {
id: string;
state: ApiAddressStateEnum;
constructor(address: string, state: ApiAddressStateEnum = ApiAddressStateEnum.Unused) {
this.id = address;
this.state = state;
}
get address() {
return this.id;
}
used() {
return this.state === ApiAddressStateEnum.Used;
}
}