Documentation
Class: DetherJS
On detherJS, there are three main types of functions.
- Functions for the zoning system: they represent all the functions needed for zone management.
- Functions for tellers: they represent all the functions needed for adding, removing and updating your teller.
- Functions for shops: they represent all the functions needed for adding, removing, and managing your shop.
Methods for the zoning system
- createZone
- bidZone
- claimFreeZone
- setShopLicencePrice
- collectShopTaxes
- deleteUserShop
- processState
- releaseZone
- topUpZone
- withdrawAuctionsRaw
- withdrawZoneAuctionBid
- withdrawZoneAuctionBidAddress
- withdrawZoneAuctionsBid
- withdrawZoneAuctionsBidAddress
- withdrawZoneOwnerDth
- withdrawZoneOwnerDthAddress
- getOpenBid
- getZoneByAddress
- getZoneByGeohash
- getZonesStatus
- isBidderOnthisAuction
- isZoneOpened
- isZoneOwned
- isZoneOwner
Methods for tellers
All functions for managing a teller’s lifecycle. You need to own the zone where you want to add a teller. When you add a teller, ~15% of what you stake in DTH will be taken out annually as taxes (based on the Harberger tax principle).
Methods for shops
All functions for managing a shop’s lifecycle are presented here. If you add a shop on a zone which is already owned by someone, you'll pay the zone owner 1/42th of what you staked in DTH daily.
- addShop
- removeShop
- topUpShop
- getShopByAddress
- getShopByPosition
- getShopsInZone
- getShopsInZones
- shopExistsByAddress
- getLicencePriceInZone
Other methods
Method for the zoning system
createZone
This represents the function you need to call before being able to add a teller on a zone. You must stake DTH tokens to own a zone. ~15% of what you stake in DTH will be taken out annually as taxes (based on the Harberger taxes principles).
▸ createZone(password
: string, country
: string, geohash6
: string, amount
: number, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:589
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
country | string | ISO 2 country code (https://www.iban.com/country-codes) |
geohash6 | string | 6 character geohash of the zone you want to create |
amount | number | Amount of DTH you want to stake on the zone (minimum 100 DTH), the address doing the transaction must have the DTH on its address |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
See example on addTellersAndShops.js
bidZone
If a zone is already owned by someone and you want to operate on it as a teller, you must first become the zone owner. As a result, you need to bid more than the current owner. Once you’ve bid, a 48 hour auction will open and the current zone owner or any other participant will be able to bid to win the auction and become the new zone owner. The participant that bids the highest amount of DTH at the end of the 48 hour auction will become the zone owner.
▸ bidZone(password
: string, geohash6
: string, bidAmount
: number, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:627
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 character geohash of the zone you want to bid |
bidAmount | number | Amount of DTH you want to bid. Must be superior than the current amount of DTH staked on the zone |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
See example in dether.spec.ts
claimFreeZone
A zone that was previously owned by someone but that is not anymore is now considered as a 'free zone'. Execute this function to own it: you will need to stake at least 100 DTH to own it. ~15% of what you stake in DTH will be taken out annually as taxes (based on the Harberger taxes principles).
▸ claimFreeZone(password
: string, geohash6
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:610
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 character geohash of the zone you want to claim |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
See example in dether.spec.ts
setShopLicencePrice
When you own a zone, you can collect fees in DTH from shops located on your zone. By default, shops must stake 42 DTH to add their shop. You can collect 1/42th of that amount on a daily basis. As the zone owner, you also have the ability to increase this minimum staking price of 42 DTH to whatever amount of DTH you want. This new licence price will only apply to new shops registering on your zone.
▸ setShopLicencePrice(password
: string, geohash6
: string, newPrice
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:466
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 characters geohash of your zone |
newPrice | string | New price in DTH for shops willing to add their shop on your zone (minimum 42) |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
collectShopTaxes
Function to execute when you want to collect the fees from the shops located on your zone. To call this function, you need to know how many shops are located on you zone. You will need to call detherJS.getShopsInZones() in order to do so.
▸ collectShopTaxes(password
: string, geohash6
: string, start
: number, end
: number, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:501
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 characters geohash of your zone |
start | number | O (or bigger amount if there are too many shops on your zone for gas transaction) |
end | number | Amount of shops present on you zone - 1 (or less number if there are too many shops on your zone for gas transaction) |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
deleteUserShop
As a zone owner, you have the ability to delete a shop located on your zone.
▸ deleteUserShop(password
: string, geohash6
: string, shopAddress
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:521
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 characters geohash of your zone |
shopAddress | string | Ethereum address of the shop owner |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
processState
processState is a smart contract function that updates the zone contract state (owner, current bid, Harberger taxes, etc ...). It automatically executes on each action on the zone (bid, create, delete, collectShopTaxes...), but you may have other reasons to call it on your own.
▸ processState(password
: string, zoneAddress
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:785
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
zoneAddress | string | |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
releaseZone
Execute this function if you want to get rid of the ownership of the zone you own. You'll get your staked DTH back, minus the fees paid for the Harberger taxes.
▸ releaseZone(password
: string, geohash6
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:665
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 characters geohash of your zone |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
topUpZone
As a zone owner you'll pay annually around ~15% of what you stake in DTH to the protocol as taxes (based on the Harberger tax principles). If the amount of staked DTH on your zone reaches zero, your zone becomes a free zone that anyone can claim. Thus, you need top up your zone in DTH before then in order to avoid losing your ownership on the zone.
▸ topUpZone(password
: string, geohash6
: string, topUpAmount
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:646
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 characters geohash of your zone |
topUpAmount | string | amount of DTH you want to top up |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
withdrawAuctionsRaw
After participating in a zone auction and losing the auction, you'll need to manually withdraw the DTH you have staked to bid for that zone. This function will withdraw all DTH tokens you have bid on this zone.
▸ withdrawAuctionsRaw(password
: string, zoneAddress
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:745
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
zoneAddress | string | Ethereum address of the zone you want to withdraw on |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
withdrawZoneAuctionBid
After participating in a zone auction and losing the auction, you'll need to manually withdraw the DTH you have staked when bidding for that zone. This function will withdraw the DTH on the auction ID that you'll pass as arguments.
▸ withdrawZoneAuctionBid(password
: string, geohash6
: string, auctionId
: number, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:676
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 characters geohash of your zone |
auctionId | number | Id of the auction you want to withdraw on |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
withdrawZoneAuctionBidAddress
After participating in a zone auction and losing the auction, you'll need to manually withdraw the DTH you have staked when bidding for that zone. This function will withdraw DTH on the auction ID that you'll pass as arguments.
▸ withdrawZoneAuctionBidAddress(password
: string, zoneAddress
: string, auctionId
: number, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:728
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
zoneAddress | string | Ethereum address of the zone you want to withdraw on |
auctionId | number | Id of the auction you want to withdraw on |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
withdrawZoneAuctionsBid
After participating in a zone auction and losing the auction, you'll need to manually withdraw the DTH you have staked when bidding for that zone. This function will withdraw DTH on the auction ID's that you'll pass as arguments.
▸ withdrawZoneAuctionsBid(password
: string, geohash6
: string, auctionIds
: number[], txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:694
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 characters geohash of your zone |
auctionIds | number[] | Array of Id's of the auction you want to withdraw on |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
withdrawZoneAuctionsBidAddress
After participating in a zone auction and losing the auction, you'll need to manually withdraw the DTH you have staked when bidding for that zone. This function will withdraw DTH on the auction ID's you'll pass as arguments.
▸ withdrawZoneAuctionsBidAddress(password
: string, zoneAddress
: string, auctionIds
: number[], txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:757
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
zoneAddress | string | Ethereum address of the zone you want to withdraw on |
auctionIds | number[] | Array of Id's of the auction you want to withdraw on |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
withdrawZoneOwnerDth
Execute this function when you lose an auction as a zone owner in order to get your DTH tokens back.
▸ withdrawZoneOwnerDth(password
: string, geohash6
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:712
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
geohash6 | string | 6 characters geohash of your zone |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
withdrawZoneOwnerDthAddress
Execute this function when you lose an auction as a zone owner in order to get your DTH tokens back.
▸ withdrawZoneOwnerDthAddress(password
: string, zoneAddress
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:774
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
zoneAddress | string | Ethereum address of the zone you want to withdraw on |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
getOpenBid
Get current opened bids on the zone
▸ getOpenBid(address
: string): Promise‹any›
Defined in dether.ts:806
Parameters:
Name | Type |
---|---|
address | string |
Returns: Promise‹any›
getZoneByAddress
Get the zone
▸ getZoneByAddress(address
: string): Promise‹[IZone](../interfaces/_types.izone.md)›_
Defined in dether.ts:561
Parameters:
Name | Type |
---|---|
address | string |
Returns: Promise‹[IZone](../interfaces/_types.izone.md)›_
See example on getTellersAndShops.js
getZoneByGeohash
Get the zone
▸ getZoneByGeohash(geohash6
: string): Promise‹[IZone](../interfaces/_types.izone.md)›_
Defined in dether.ts:552
Parameters:
Name | Type |
---|---|
geohash6 | string |
Returns: Promise‹[IZone](../interfaces/_types.izone.md)›_
See example on getTellersAndShops.js
getZonesStatus
Get multiple zones
▸ getZonesStatus(geohash6List
: string[]): Promise‹any[]›
Defined in dether.ts:566
Parameters:
Name | Type |
---|---|
geohash6List | string[] |
Returns: Promise‹any[]›
isBidderOnthisAuction
Does this Ethereum address have any bid on this auction?
▸ isBidderOnthisAuction(zoneAddress
: string, ethAddress
: string, auctionID
: number): Promise‹number›
Defined in dether.ts:575
Parameters:
Name | Type |
---|---|
zoneAddress | string |
ethAddress | string |
auctionID | number |
Returns: Promise‹number›
isZoneOpened
Is this zone already opened (is owned, or was already owned once)?
▸ isZoneOpened(geohash6
: string, country
: string): Promise‹Boolean›
Defined in dether.ts:796
Parameters:
Name | Type |
---|---|
geohash6 | string |
country | string |
Returns: Promise‹Boolean›
isZoneOwned
Is this zone is owned?
▸ isZoneOwned(geohash6
: string): Promise‹Boolean›
Defined in dether.ts:547
Parameters:
Name | Type |
---|---|
geohash6 | string |
Returns: Promise‹Boolean›
isZoneOwner
Is this Ethereum address a zone owner?
▸ isZoneOwner(address
: string): Promise‹any›
Defined in dether.ts:801
Parameters:
Name | Type |
---|---|
address | string |
Returns: Promise‹any›
Method for tellers
addTeller
Add a teller on a zone. Prerequisite: you must own the zone where you want to add the teller.
▸ addTeller(password
: string, tellerData
: ITellerArgs, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:337
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
tellerData | ITellerArgs | Arguments of the teller you want to add |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
See example on addTellersAndShops.js
addTellerComment
Add on-chain comments about the teller. You must only enter the hash of the comment which must be stored on IPFS. NOTE: You must do the IPFS task on your own. This library does not support it for now.
▸ addTellerComment(password
: string, zoneGeohash
: string, ipfsHash
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:385
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
zoneGeohash | string | Zone's teller where you want to let your comments ont |
ipfsHash | string | Ipfs hash, where is stored the comments |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
removeTeller
Execute this function if you want to remove your teller from a zone.
▸ removeTeller(password
: string, zoneGeohash
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:353
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
zoneGeohash | string | Zone's teller |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
updateTeller
Execute this function if you want to update your teller’s information. You must pass an entire ITellerArgs object as arguments.
▸ updateTeller(password
: string, tellerData
: ITellerArgs, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:369
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
tellerData | ITellerArgs | New teller value |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
getTeller
Get a teller by its address
▸ getTeller(address
: string): Promise‹any›
Defined in dether.ts:313
Parameters:
Name | Type |
---|---|
address | string |
Returns: Promise‹any›
See example on getTellersAndShops.js
getTellerInZone
Get teller by its zone address.
▸ getTellerInZone(geohash6
: string): Promise‹any›
Defined in dether.ts:318
Parameters:
Name | Type |
---|---|
geohash6 | string |
Returns: Promise‹any›
See example on getTellersAndShops.js
getTellersInZones
Get tellers from multiple zones.
▸ getTellersInZones(geohash6List
: string[]): Promise‹any[]›
Defined in dether.ts:327
Parameters:
Name | Type |
---|---|
geohash6List | string[] |
Returns: Promise‹any[]›
isTeller
Discover if an Ethereum address is a teller in detherContract.
▸ isTeller(address
: string): Promise‹any›
Defined in dether.ts:308
Parameters:
Name | Type |
---|---|
address | string |
Returns: Promise‹any›
Method for shops
addShop
Add a shop.
▸ addShop(password
: string, shopData
: IShopArgs, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:438
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
shopData | IShopArgs | params of the shop you want to add |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
See example on addTellersAndShops.js
removeShop
Remove your shop. You will get your DTH back, minus what you have potentially paid as fees to the potential zone owner.
▸ removeShop(password
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:456
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
txOptions | ITxOptions | Transaction options args. By defaults (constants.DEFAULT_TX_OPTIONS) |
Returns: Promise‹ContractTransaction›
topUpShop
If there is a zone owner, you'll need to pay taxes in DTH on a daily basis to the zone owner. Everyday, you will pay 1/42th of what you staked in DTH. If the amount DTH you have staked reaches zero, your shop could be deleted.
▸ topUpShop(password
: string, topUpAmount
: string, txOptions
: ITxOptions): Promise‹ContractTransaction›
Defined in dether.ts:484
Parameters:
Name | Type | Value |
---|---|---|
password | string | Password of your wallet |
topUpAmount | string | Amount of DTH you want to add on your shop |
txOptions | ITxOptions | constants.DEFAULT_TX_OPTIONS |
Returns: Promise‹ContractTransaction›
getShopByAddress
Get shop.
▸ getShopByAddress(shopAddress
: string): Promise‹[IShop](../interfaces/_types.ishop.md)›_
Defined in dether.ts:412
Parameters:
Name | Type |
---|---|
shopAddress | string |
Returns: Promise‹[IShop](../interfaces/_types.ishop.md)›_
See example on getTellersAndShops.js
getShopByPosition
Get shop.
▸ getShopByPosition(geohash12
: string): Promise‹[IShop](../interfaces/_types.ishop.md)›_
Defined in dether.ts:417
Parameters:
Name | Type |
---|---|
geohash12 | string |
Returns: Promise‹[IShop](../interfaces/_types.ishop.md)›_
getShopsInZone
Get all shops located on a zone.
▸ getShopsInZone(geohash6
: string): Promise‹[IShop](../interfaces/_types.ishop.md)[]›_
Defined in dether.ts:422
Parameters:
Name | Type |
---|---|
geohash6 | string |
Returns: Promise‹[IShop](../interfaces/_types.ishop.md)[]›_
getShopsInZones
Get all shops located on multiple zones.
▸ getShopsInZones(geohash6List
: string[]): Promise‹[IShop](../interfaces/_types.ishop.md)[][]›_
Defined in dether.ts:428
Parameters:
Name | Type |
---|---|
geohash6List | string[] |
Returns: Promise‹[IShop](../interfaces/_types.ishop.md)[][]›_
shopExistsByAddress
Does this address own a shop?
▸ shopExistsByAddress(shopAddress
: string): Promise‹boolean›
Defined in dether.ts:407
Parameters:
Name | Type |
---|---|
shopAddress | string |
Returns: Promise‹boolean›
getLicencePriceInZone
Get the amount of DTH to stake to add a shop on that zone. If the zone is owned by someone, and if you add a shop on this zone, you'll pay a daily fee of 1/42th of what you staked in DTH to the zone owner.
▸ getLicencePriceInZone(geohash6
: string): Promise‹string›
Defined in dether.ts:433
Parameters:
Name | Type |
---|---|
geohash6 | string |
Returns: Promise‹string›
other methods
init
▸ init(connectOptions?
: IEthersOptions): Promise‹void›
Defined in dether.ts:49
Parameters:
Name | Type |
---|---|
connectOptions? | IEthersOptions |
Returns: Promise‹void›
initProvider
▸ initProvider(connectOptions?
: IEthersOptions): Promise‹void›
Defined in dether.ts:91
Parameters:
Name | Type |
---|---|
connectOptions? | IEthersOptions |
Returns: Promise‹void›
isBidderOnthisAuction
▸ isBidderOnthisAuction(zoneAddress
: string, ethAddress
: string, auctionID
: number): Promise‹number›
Defined in dether.ts:575
Parameters:
Name | Type |
---|---|
zoneAddress | string |
ethAddress | string |
auctionID | number |
Returns: Promise‹number›
isZoneOpened
▸ isZoneOpened(geohash6
: string, country
: string): Promise‹Boolean›
Defined in dether.ts:796
Parameters:
Name | Type |
---|---|
geohash6 | string |
country | string |
Returns: Promise‹Boolean›
isZoneOwned
▸ isZoneOwned(geohash6
: string): Promise‹Boolean›
Defined in dether.ts:547
Parameters:
Name | Type |
---|---|
geohash6 | string |
Returns: Promise‹Boolean›
isZoneOwner
▸ isZoneOwner(address
: string): Promise‹any›
Defined in dether.ts:801
Parameters:
Name | Type |
---|---|
address | string |
Returns: Promise‹any›
loadUser
▸ loadUser(encryptedWallet
: string): void
Defined in dether.ts:98
Parameters:
Name | Type |
---|---|
encryptedWallet | string |
Returns: void
Private
loadWallet
▸ loadWallet(password?
: string): Promise‹Wallet›
Defined in dether.ts:106
Parameters:
Name | Type |
---|---|
password? | string |
Returns: Promise‹Wallet›
Interface
ITeller
Object representing a teller with all its information
Defined in types.ts:35
• buyRate: number
• currencyId: number
• isBuyer: boolean
• isSeller: boolean
• sellRate: number
• tellerAddress: string
• tellerContractAddress: string
• tellerGeohash: string
• zoneAddress: string
• zoneGeohash: string
• ticker? : string
• messenger? : string
• refFees? : number
• referrer? : string
• buyUp? : string
• sellUp? : string
ITellerArgs
Object to add as a parameter for adding a teller on the map.
Defined in types.ts:54
• buyRate? : number
• currencyId? : number
• description? : string
• isBuyer: boolean
• isSeller: boolean
• messenger? : string
• position: string
• refFees? : number
• referrer? : string
• sellRate? : number
ITxOptions
Defined in types.ts:292
• gasLimit? : number
• gasPrice? : number
• nonce? : number
• value? : any
IZone
Defined in types.ts:86
• address? : string (ethereum contract address of the zone)
• auction? : [IZoneAuction](_types.izoneauction.md)_
• geohash: string |Geohash of the zone|
• owner? : [IZoneOwner](_types.izoneowner.md)_ (Owner of the zone)
• status: [ZoneStatus](../enums/_types.zonestatus.md)_ (Status of the zone) Defined in types.ts:93
IZoneOwner
Defined in types.ts:86
• address: string (Ethereum contract address of the zone)
• auctionId: number (current highest auction ID on the zone)
• balance: number (current balance of DTH staked on the zone)
• lastTaxTime: number (timestamp where the zone was taxed last time)
• staked: number (DTH staked at first when owner get the zone)
• startTime: number (time when zone was created)
IZoneAuction
Object representing an auction
Defined in types.ts:69
• endTime: number
• highestBid: number
• highestBidder: string
• id: number
• startTime: number
• state: [ZoneAuctionState](../enums/_types.zoneauctionstate.md)_ *Defined in types.ts:62
IShopArgs
Defined in types.ts:257
• category? : string |See the enum below|
• country: string |Iso 2 code country https://www.iban.com/country-codes|
• description? : string |Short description of the shop, must be < 32 char|
• name? : string |Short description of the shop, must be < 16 char|
• opening? : string |See the formatage below|
• position: string |12 characters Geohash, representing where you want to locate your shop|
• staking: string |How much do you want to stake for this shop (minimum 42 DTH)? If there is a zone owner, you will pay the zone owner 1/42th of the DTH you have staked on a daily basis.|
Properties
Defined in dether.ts:38
• dthContract: Contract
• encryptedWallet: string
• geoRegistryContract: Contract
• network: any
• provider: any
• shopsContract: Contract
• usingMetamask: boolean
• zoneFactoryContract: Contract