Installation
pnpm i @w3bstream/geolocation
Guide
import { GeolocationSDK } from "@w3bstream/geolocation";
import ethers from 'ethers';
const signer = new ethers.Wallet(YourPrivateKey);
const sdk = new GeolocationSDK({
mode: "dev",
signer,
});
const proof = await sdk.pol.getProof({
locations: [
{
from: 1676879793,
to: 1676015793,
scaled_latitude: 30400000,
scaled_longitude: 120520000,
distance: 1000,
},
],
});
const proof = await sdk.pol.getMockProof({
locations: [
{
imei: "123456789012345",
from: 1676879793,
to: 1676015793,
scaled_latitude: 30400000,
scaled_longitude: 120520000,
distance: 1000,
},
],
});