Functions
Const createLocationTxn
- createLocationTxn(__namedParameters: { dataOnly?: boolean; elevation?: number; gain?: number; gateway: string; hotspot?: null | Asset | HotspotData; isFree?: boolean; maker: string; nextLocation: string; owner: string; ownerKeypairRaw?: SodiumKeyPair; updatingLocation: boolean }): Promise<AssertLocationV2>
-
Parameters
-
__namedParameters: { dataOnly?: boolean; elevation?: number; gain?: number; gateway: string; hotspot?: null | Asset | HotspotData; isFree?: boolean; maker: string; nextLocation: string; owner: string; ownerKeypairRaw?: SodiumKeyPair; updatingLocation: boolean }
-
Optional dataOnly?: boolean
-
Optional elevation?: number
-
Optional gain?: number
-
gateway: string
-
Optional hotspot?: null | Asset | HotspotData
-
Optional isFree?: boolean
-
maker: string
-
nextLocation: string
-
owner: string
-
Optional ownerKeypairRaw?: SodiumKeyPair
-
updatingLocation: boolean
Const getH3Location
- getH3Location(lat: number, lng: number, res?: number): string
-
Parameters
-
lat: number
-
lng: number
-
res: number = ...
Returns string
Const getStakingFee
- getStakingFee(__namedParameters: { dataOnly?: boolean; updatingLocation?: boolean }): 0 | 500000 | 1000000
-
Parameters
-
__namedParameters: { dataOnly?: boolean; updatingLocation?: boolean }
-
Optional dataOnly?: boolean
-
Optional updatingLocation?: boolean
Returns 0 | 500000 | 1000000
Const signAssert
-
Parameters
-
__namedParameters: { assertLocationTxn: AssertLocationV2; owner: string; ownerKeypairRaw: SodiumKeyPair; payer: string }
-
-
owner: string
-
-
payer: string
Const signAssertTxn
- signAssertTxn(__namedParameters: { assertLocationTxn: string; owner: string; ownerKeypairRaw: SodiumKeyPair; payer: string }): Promise<AssertLocationV2>
-
Parameters
-
__namedParameters: { assertLocationTxn: string; owner: string; ownerKeypairRaw: SodiumKeyPair; payer: string }
-
assertLocationTxn: string
-
owner: string
-
-
payer: string
The following high level steps need to be taken to update hotspot location
Use this module to assist asserting gateway locations on the Helium Network. You will be able to both change the location of the hotspot, and update its antenna gain and elevation.
For example creating and signing an assert location transaction with {@link assertLocationTxn} and calculating its fees with {@link calculateAssertLocFee}.
Import the module
Create the Assert Location Transaction
Calculate Assert Location Fees
There are two fees associated with asserting hotspot location. These fees are paid by either the maker, or the hotspot owner depending on how many free asserts the maker provides. If the payer account has no DC, HNT will be implicitly burned to cover the transaction fees.
There are currently two fees that occur, if changing hotspot location a staking fee of 1,000,000 DC ($10) is added to the base transaction fee of 55,000 DC ($0.55).
You can use the {@link calculateAssertLocFee} function to determine what fees the transaction will charge. The nonce should be provided from the hotspot's nonce.
You can read more about transaction fees on the Helium Docs.