Options
All
  • Public
  • Public/Protected
  • All
Menu

sv-lib

Index

Classes

Type aliases

Variables

Functions

Object literals

Type aliases

BallotSpecV2

BallotSpecV2: object

Type declaration

  • ballotInner: object
    • ballotTitle: string
    • Optional discussionLink?: string
    • Optional encyptionPK?: string
    • longDesc: string
    • shortDesc: string
    • Optional subGroup?: any
  • ballotVersion: number
  • Optional optionsInner?: object
    • Optional aux?: any
    • Optional options?: any
  • optionsVersion: number
  • Optional subgroupInner?: object
    • delegationSc: string
    • networkId: [number, number]
    • proposerPk: string
    • sigType: string
    • signature: string
    • tokenId: string
  • subgroupVersion: number

Bytes32

Bytes32: t.TypeOf<RefinementType>

Bytes64

Bytes64: t.TypeOf<RefinementType>

Ed25519DelegationResp

Ed25519DelegationResp: object

Type declaration

EthAddress

EthAddress: t.TypeOf<RefinementType>

EthNetConf

EthNetConf: object

Type declaration

  • archivePushUrl: string
  • archiveUrl: string
  • auxContract: string
  • delegationEnsName: string
  • ens: string
  • ensResolver: string
  • etherscanLink: string
  • httpProvider: string
  • indexEnsName: string
  • lookupAddress: string
  • name: string
  • svApiUrl: string
  • unsafeEd25519DelegationAddr: string
  • webSocketsProvider: string

EthTx

EthTx: object

Type declaration

  • data: string
  • gas: number | HexString
  • to: string
  • value: number

GetDemocNthBallot

GetDemocNthBallot: t.TypeOf<InterfaceType>

GlobalBallot

GlobalBallot: object

Type declaration

  • ballotId: string
  • ballotOwner: string
  • bbFarmAddress: string
  • data: BallotSpecV2
  • deprecated: boolean
  • endTime: string
  • extraData: string
  • hasVoted: boolean
  • nVotesCast: string
  • rawBallotSpecString: string
  • secKey: string
  • specHash: string
  • startTime: string
  • submissionBits: string

HexString

HexString: t.TypeOf<RefinementType>

InitSvLightOptsPartial

InitSvLightOptsPartial: object

Type declaration

  • Optional httpProvider?: string
  • Optional useWebsockets?: boolean
  • Optional webSocketsProvider?: string

NetworkName

NetworkName: t.TypeOf<RefinementType>

ProxyProposalRequest

ProxyProposalRequest: t.TypeOf<InterfaceType>

ProxyVote

ProxyVote: object

Type declaration

  • extra: string
  • proxyReq: [string, string, string, string, string]

StellarAddress

StellarAddress: t.TypeOf<RefinementType>

SvNetwork

SvNetwork: object

Type declaration

  • aux: any
  • backend: any
  • events: object
    • getBlockPeriodic: any
  • index: any
  • netConf: EthNetConf
  • payments: any
  • resolver: any
  • web3: any

Timestamp

Timestamp: t.TypeOf<RefinementType>

WindowWeb3Init

WindowWeb3Init: object

Type declaration

  • detected: boolean
  • loaded: boolean
  • Optional networkStatus?: object
    • hasIndex: boolean
    • id: number
    • type: string
  • Optional web3?: any

Variables

Const AuctionAbi

AuctionAbi: any = require('./smart_contracts/CommAuctionIface.abi.json')

Const AuxAbi

AuxAbi: any = require('./smart_contracts/AuxAbi.abi.json')

Const B32_ALPHA

B32_ALPHA: "qpzry9x8gf2tvdw0s3jn54khce6mua7l" = "qpzry9x8gf2tvdw0s3jn54khce6mua7l"

Const BBFarmAbi

BBFarmAbi: any = require('./smart_contracts/BBFarm.abi.json')

Const BN

BN: any = require('bn.js')

Const BackendAbi

BackendAbi: any = require('./smart_contracts/SVLightIndexBackend.abi.json')

Const Bytes32RT

Bytes32RT: RefinementType<RefinementType<StringType, string, string, string | number | true | false | symbol | void | object | object>, string, string, string | number | true | false | symbol | void | object | object> = t.refinement(HexStringRT, v => v.length === 32 * 2 + 2, 'Bytes32')

Const Bytes64RT

Bytes64RT: RefinementType<RefinementType<StringType, string, string, string | number | true | false | symbol | void | object | object>, string, string, string | number | true | false | symbol | void | object | object> = t.refinement(HexStringRT, v => v.length === 64 * 2 + 2, 'Bytes64')

Const ERC20Abi

ERC20Abi: any = require('./smart_contracts/ERC20.abi.json')

Const Ed25519DelegatePrefix

Ed25519DelegatePrefix: "SV-ED-ETH" = "SV-ED-ETH"

Const EthAddressRT

EthAddressRT: RefinementType<StringType, string, string, string | number | true | false | symbol | void | object | object> = t.refinement(t.string, a => isAddress(a), 'Ethereum Address')

Const GetDemocNthBallotRT

GetDemocNthBallotRT: InterfaceType<object, object, object, string | number | true | false | symbol | void | object | object> = t.type({democHash: Bytes32RT,nthBallot: t.Integer,userEthAddress: EthAddressRT})

Const HexStringRT

HexStringRT: RefinementType<StringType, string, string, string | number | true | false | symbol | void | object | object> = t.refinement(t.string,v => v.slice(0, 2) === '0x' && v.slice(2).replace(/[0-9a-fA-F]*/, '').length === 0 && v.length % 2 === 0,'HexString')

Const IndexAbi

IndexAbi: any = require('./smart_contracts/SVLightIndex.abi.json')

Const NetworkNameRT

NetworkNameRT: RefinementType<StringType, string, string, string | number | true | false | symbol | void | object | object> = t.refinement(t.string, s => validNetworkNames.includes(s), 'NetworkName')

Const PaymentsAbi

PaymentsAbi: any = require('./smart_contracts/SVPayments.abi.json')

Const ProxyProposalInputRT

ProxyProposalInputRT: InterfaceType<object, object, object, string | number | true | false | symbol | void | object | object> = t.type({ballotSpec: t.string,democHash: Bytes32RT,startTime: TimestampRT,endTime: TimestampRT,networkName: NetworkNameRT})

Const ResolverAbi

ResolverAbi: any = require('./smart_contracts/SV_ENS_Resolver.abi.json')

Const StellarAddressRT

StellarAddressRT: RefinementType<StringType, string, string, string | number | true | false | symbol | void | object | object> = t.refinement(t.string, () => true, "Stellar Address")

Const TimestampRT

TimestampRT: RefinementType<RefinementType<NumberType, number, number, string | number | true | false | symbol | void | object | object>, number, number, string | number | true | false | symbol | void | object | object> = t.refinement(t.Integer, i => 1500000000 <= i && i <= 2 ** 40, 'Timestamp')

Const UnsafeEd25519DelegationAbi

UnsafeEd25519DelegationAbi: any = require('./smart_contracts/UnsafeEd25519Delegation.abi.json')

Const Web3

Web3: any = require('web3')

Const btoa

btoa: any = require('btoa')

Const detectNetwork

detectNetwork: any = require('web3-detect-network')

Const networkVars

networkVars: object = new Proxy(_raw_networkVars, {get: (obj, prop: string) => {console.warn('Warning: const.networkVars is deprecated; please use const.getNetwork(..)')return obj[prop]}})

Type declaration

Const sha256

sha256: any = require('sha256')

Const validNetworkNames

validNetworkNames: string[] = ["mainnet", "testnet"]

Const zeroAddr

zeroAddr: "0x0000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000"

Const zeroHash

zeroHash: "0x0000000000000000000000000000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000000000000000000000000000"

Functions

Const _getBallotObjectFromIpfs

  • _getBallotObjectFromIpfs(ballotSpecHash: Bytes32): Promise<string>
  • Attempts to retrieve a ballotSpec from ipfs

    Parameters

    • ballotSpecHash: Bytes32

      the hash of the ballot spec

    Returns Promise<string>

    the raw string of the ballot spec

Const _getBallotObjectFromS3

  • _getBallotObjectFromS3(archiveUrl: string, ballotSpecHash: Bytes32): Promise<string>
  • Attempts to retrieve a ballotSpec from S3

    Parameters

    • archiveUrl: string

      the url for the http archive

    • ballotSpecHash: Bytes32

      the hash of the ballot spec

    Returns Promise<string>

    the raw string of the ballot spec

Const _getForeignBallotInfo

Const castProxyVote

  • castProxyVote(request: any, netConf: EthNetConf): Promise<any>

Const checkBallotHashBSpec

  • checkBallotHashBSpec(rawBallotSpecString: any, expectedSpecHash: any): boolean
  • Verify a BallotSpec's hash

    Parameters

    • rawBallotSpecString: any

      The raw string/bytes before JSON.parse

    • expectedSpecHash: any

      The expected hash as Eth Hex

    Returns boolean

    Whether the ballotSpec matched the expected hash

Const checkBallotHashGBallot

  • checkBallotHashGBallot(ballotObject: any): boolean
  • Parameters

    • ballotObject: any

    Returns boolean

Const checkDecode

  • checkDecode<S, E>(validationRes: t.Validation<S>, mkErr?: function): void
  • Type parameters

    • S

    • E: Error

    Parameters

    • validationRes: t.Validation<S>
    • Optional mkErr: function
        • (s: string): E
        • Parameters

          • s: string

          Returns E

    Returns void

Const checkIfAddressIsEditor

  • checkIfAddressIsEditor(__namedParameters: object, __namedParameters: object): Promise<any>
  • Parameters

    • __namedParameters: object
      • svNetwork: any
    • __namedParameters: object
      • democHash: any
      • userAddress: any

    Returns Promise<any>

Const cleanEthHex

  • cleanEthHex(hex: string): string
  • This will take an Ethereum hex string (or a normal hex string) and output a normal hex string (no '0x' header) or throw an error on a bad hex string.

    Parameters

    • hex: string

    Returns string

    the hex string.

Const createEd25519DelegationTransaction

  • createEd25519DelegationTransaction(svNetwork: any, dlgtRequest: string, pubKey: string, signature: string, privKey: string): object
  • Create a tx object for an ed25519 delegation

    Parameters

    • svNetwork: any
    • dlgtRequest: string
    • pubKey: string
    • signature: string
    • privKey: string

    Returns object

    • data: any
    • gas: number
    • to: any
    • value: number

Const debugLog

  • debugLog(funcName: string, msg: string | Error | number | any): void
  • Parameters

    • funcName: string
    • msg: string | Error | number | any

    Returns void

Const deployBallotSpec

  • deployBallotSpec(archivePushUrl: string, rawBallotSpecString: string): Promise<string>
  • Attempts to deploy the a raw ballot spec to IPFS and the ballot archive

    Parameters

    • archivePushUrl: string

      Url for the ballot to be deployed to

    • rawBallotSpecString: string

      the stringified ballot spec

    Returns Promise<string>

    if successful, will return the ballot hash as a string

Const deployProxyBallot

Const doesNetHaveIndex

  • doesNetHaveIndex(networkId: any, chainId: any): boolean
  • Return bool based on whether a network has an index contract

    Parameters

    • networkId: any
    • chainId: any

    Returns boolean

Const ed25519DelegationIsValid

  • ed25519DelegationIsValid(dlgtRequest: string, pubKey: string, signature: string): any
  • Verify an ed25519 self-delegation

    Parameters

    • dlgtRequest: string

      eth hex string of the dlgt request

    • pubKey: string

      stellar pubkey

    • signature: string

      64 byte signature as eth hex

    Returns any

    This function has been deprecated in favour of more general ed25519SignatureIsValid function in /crypto

Const ed25519SignatureIsValid

  • ed25519SignatureIsValid(signedData: string, pubKey: string, signature: string): any
  • Verify a ed25519 signature

    Parameters

    • signedData: string

      eth hex string of the dlgt request

    • pubKey: string

      stellar pubkey

    • signature: string

      64 byte signature as eth hex

    Returns any

Const ethAddrEq

  • ethAddrEq(addr1: string, addr2: string): boolean
  • This compares ethereum addresses (taking into account case, etc)

    Parameters

    • addr1: string
    • addr2: string

    Returns boolean

Const ethSignHash

  • ethSignHash(messageHash: string, privateKey: string): object
  • Sign a message such that it can be verified with ecrecover. Similar to web3.eth.accounts.sign except that we sign the hash directly.

    Parameters

    • messageHash: string

      Hash of a message, as returned by web3.utils.soliditySha3 or similar.

    • privateKey: string

      Privkey to sign with.

    Returns object

    • messageHash: string
    • r: any
    • s: any
    • signature: any
    • v: any

Const ethVerifySig

  • ethVerifySig(messageHash: string, __namedParameters: [string, string, string]): object
  • Parameters

    • messageHash: string
    • __namedParameters: [string, string, string]

    Returns object

    • address: any
    • verified: boolean

Const explodeForeignNetDetails

  • explodeForeignNetDetails(networkDetails: Bytes32): object
  • Takes the network details string returned by the BBFarm contract and returns network specific values

    Parameters

    • networkDetails: Bytes32

      [32b chainId][32b networkId][160b bbFarm addr on foreign network]

    Returns object

    containing the chainId, networkId and address of the remote BBFarm

    • chainId: number
    • networkId: number
    • remoteBBFarmAddress: string

Const extractData

  • extractData<T>(req: AxiosResponse<T>): T
  • Type parameters

    • T

    Parameters

    • req: AxiosResponse<T>

    Returns T

Const genRandomHex

  • Generate a random hexstring with the requested number of bytes (note: this works around a bug in web3-utils in-browser, so these are not considered cryptographically secure; there might be some bias in the distribution of bytes - particularly a statistical lack of 0s)

    Parameters

    • nBytes: number

      number of bytes to generate; returned hexString will be nBytes*2+2 in length

    Returns HexString

Const genRange3VoteData

  • genRange3VoteData(votesArray: number[]): any
  • Prepares voteData for a Range3 ballot from an array of votes

    Parameters

    • votesArray: number[]

      Takes an array of numbers which represent the votes to be transformed Format: [1, 2, -1]

    Returns any

    Returns an eth hex string of the vote data

Const getBallotSpec

  • getBallotSpec(archiveUrl: string, ballotSpecHash: Bytes64): Promise<string>
  • Attempts to retrieve a ballotSpec from ipfs and falls back to archive

    Parameters

    • archiveUrl: string

      the http archive url

    • ballotSpecHash: Bytes64

      the hash of the url

    Returns Promise<string>

    the raw string of the ballot spec

Const getCommunityBallotPrice

  • getCommunityBallotPrice(__namedParameters: object, democHash: any): Promise<any>
  • Parameters

    • __namedParameters: object
      • payments: any
    • democHash: any

    Returns Promise<any>

Const getContractAddresses

  • getContractAddresses(__namedParameters: object): Promise<object>
  • Takes in the svNetwork object and returns all relevant addresses

    Parameters

    • __namedParameters: object
      • svNetwork: any

    Returns Promise<object>

Const getCurrentGasPrice

  • getCurrentGasPrice(): Promise<object>

Const getDemocBallots

  • Returns an array of all ballots from a democracy

    Parameters

    Returns Promise<GlobalBallot[]>

    -------- todo --------------

Const getDemocNthBallot

  • Attempts to retrieve a ballotSpec from ipfs and falls back to archive

    Parameters

    Returns Promise<GlobalBallot>

    global ballot object containing all required ballot information

Const getFilterDemocBallots

  • Parameters

    • svNetwork: SvNetwork
    • democHash: Bytes32

      of the democracy we want to get the ballots from

    • tokenId: string

      the id of the token subgroup we want to retrieve

    • userEthAddress: EthAddress

      the user's address

    Returns Promise<GlobalBallot[]>

    ---------- todo --------------

Const getNetwork

  • getNetwork(networkId: number, chainId: number): EthNetConf

Const getProxySequenceNumber

  • Retrieves the sequence number for a proxy voting address on a particular ballot

    Parameters

    Returns Promise<number>

    the sequence number for the voter to use

Const getSingularCleanAbi

  • getSingularCleanAbi(requestedAbiName: any, methodName: any): any
  • Parameters

    • requestedAbiName: any
    • methodName: any

    Returns any

Const getTxReciept

Const getUnsafeEd25519Delegations

  • getUnsafeEd25519Delegations(stellarPK: string, svNetwork: any): Promise<any>
  • Get all ed25519 self delegations from a network.

    Parameters

    • stellarPK: string
    • svNetwork: any

    Returns Promise<any>

Const hashMsgRaw

  • hashMsgRaw(data: string | number[]): string
  • Like web3.eth.accounts.hashMessage without the envelope.

    Parameters

    • data: string | number[]

      A message to hash - if it is hex it'll be UTF8 decoded.

    Returns string

    The hashed message (using keccak256)

Const hexToBase32

  • hexToBase32(hex: string): string
  • This will convert a hex string to Base32 in the bech32 format WITHOUT a checksum.

    Parameters

    • hex: string

      The hex string to convert to Base32 - can be an EthHex or plain hex string.

    Returns string

    The Base32 version of the hex string.

Const hexToUint8Array

  • hexToUint8Array(hex: string): Uint8Array
  • Turn a hexstring (with or without prefix) to a Uint8Array

    Parameters

    • hex: string

    Returns Uint8Array

Const initializeSvLight

  • Return contract instances and web3 needed for SvLight usage

    Parameters

    Returns Promise<SvNetwork>

    The SvNetwork object based on netConf

Const initializeWindowWeb3

  • Initialise a Web3 instance based on the window's web3.currentProvider

    Returns Promise<WindowWeb3Init>

    Object containing the web3 instance and metadata

Const isEd25519SignedBallotValid

  • isEd25519SignedBallotValid(rawBallotSpecString: string): boolean
  • Check if a raw ballotSpec contains a valid signature for a subgroup

    Parameters

    • rawBallotSpecString: string

      raw string of the ballot spec retrieved from ipfs

    Returns boolean

    boolean value representing if the signature valid

Const mkPacked

  • mkPacked(start: any, end: any, submissionBits: any): any
  • Creates a packed copy of start and end times with submissionBits

    Parameters

    • start: any

      Start time in seconds since epoch

    • end: any

      End time in seconds since epoch

    • submissionBits: any

      Submission bits - can be created using mkSubmissionBits

    Returns any

    Returns a bn.js BigNum of the packed values. Format: [submissionBits(16)][startTime(64)][endTime(64)]

Const mkSignedBallotForProxy

  • mkSignedBallotForProxy(ballotId: any, sequence: any, voteData: any, extra: any, privateKey: any, opts?: any): ProxyVote
  • Take the arguments and produce web3 data fitting the submitProxyVote method.

    Parameters

    • ballotId: any

      a BN.js or Hex ballotId

    • sequence: any

      the sequence number to use (0 < sequence < 2^32)

    • voteData: any

      the vote data to use, should be 32 bytes hex encoded

    • extra: any

      any extra data included with the vote (such as curve25519 pubkeys)

    • privateKey: any

      the privkey used to sign

    • Default value opts: any = {}

      options:

      • skipSequenceSizeCheck: boolean (will not throw if sequence is >= 2^32)

    Returns ProxyVote

    { proxyReq (bytes32[5]), extra (bytes) } in the required format for submitProxyVote

Const mkSubmissionBits

  • mkSubmissionBits(...toCombine: any[]): any
  • This combines flags into a finished submissionBits. It also does some validation.

    Parameters

    • Rest ...toCombine: any[]

      Array of all submission flags to combine. See SV.ballotBox.flags for flag options. All flags must be a power of 2 (which indicates they occupy a single bit in the number when combining).

    Returns any

    A 16 bit integer of combined flags.

Const networkName

  • networkName(networkId: any): "Kovan" | "Mainnet" | "Ropsten" | "Morden" | "Rinkeby" | "Unknown"
  • Parameters

    • networkId: any

    Returns "Kovan" | "Mainnet" | "Ropsten" | "Morden" | "Rinkeby" | "Unknown"

Const now

  • now(): number

Const postEd25519Delegation

Const prepareEd25519Delegation

  • prepareEd25519Delegation(address: string, nonce?: string): Bytes32
  • Generate a packed Ed25519Delegation instruction for use with the smart contract or API

    Parameters

    • address: string

      An ethereum address to delegate to

    • Optional nonce: string

      A nonce in hex that is 3 bytes (6 characters as hex)

    Returns Bytes32

    The hex string (with 0x prefix) of the delegation instruction

Const prepareWeb3BBVoteTx

  • prepareWeb3BBVoteTx(__namedParameters: object, __namedParameters: object): Promise<object>
  • Prepares a transaction for sending with the users web3 browser

    Parameters

    • __namedParameters: object
      • txInfo: any
    • __namedParameters: object
      • svNetwork: any

    Returns Promise<object>

    Returns an object with all fields required to cast the transaction

Const processApiError

  • processApiError(err: AxiosError): never
  • Parameters

    • err: AxiosError

    Returns never

Const publishSignedTx

  • publishSignedTx(web3: any, rawTx: string): Promise<string>
  • Parameters

    • web3: any
    • rawTx: string

    Returns Promise<string>

Const resolveEnsAddress

  • resolveEnsAddress(__namedParameters: object, ensName: any): Promise<string>
  • Resolve an ENS name to an address

    Parameters

    • __namedParameters: object
      • resolver: any
    • ensName: any

    Returns Promise<string>

Const sha256HashString

  • sha256HashString(stringToHash: string): Bytes64

Const signTx

  • signTx(web3: any, txData: string, privKey: Bytes64): Promise<any>
  • Parameters

    • web3: any
    • txData: string
    • privKey: Bytes64

    Returns Promise<any>

Const stellarPkToHex

  • stellarPkToHex(pubKey: string): string
  • Parameters

    • pubKey: string

    Returns string

Const submitEd25519Delegation

  • submitEd25519Delegation(ethNetConf: EthNetConf, dlgtRequest: Bytes32, stellarPK: string, _signature: HexString, networkName: string, opts?: any): Promise<object>

Const submitEd25519DelegationUrl

  • submitEd25519DelegationUrl(netConf: EthNetConf): string
  • Generate the submitEd25519Delegation API URL

    Parameters

    Returns string

    The URL for this method

Const toAlphabet

  • toAlphabet(arr: number[]): string
  • Parameters

    • arr: number[]

    Returns string

Const toEthHex

  • toEthHex(hex: string): string
  • Parameters

    • hex: string

    Returns string

Const verifySignedBallotForProxy

  • verifySignedBallotForProxy(proxyVote: ProxyVote, opts?: any): object
  • Verify a signed vote to be submitted via proxy as generated by mkSignedBallotForProxy

    Parameters

    • proxyVote: ProxyVote

      The ProxyVote object

    • Default value opts: any = {}

    Returns object

    • address: any
    • verified: boolean

Const weiToCents

  • weiToCents(__namedParameters: object, wei: any): Promise<any>
  • Parameters

    • __namedParameters: object
      • payments: any
    • wei: any

    Returns Promise<any>

Object literals

Const _raw_networkVars

_raw_networkVars: object

classic

classic: object

archivePushUrl

archivePushUrl: string = "https://archive.push.secure.vote/"

archiveUrl

archiveUrl: string = "https://archive.secure.vote/"

auxContract

auxContract: string = ""

delegationEnsName

delegationEnsName: string = ""

ens

ens: string = ""

ensResolver

ensResolver: string = ""

etherscanLink

etherscanLink: string = "https://gastracker.io/"

httpProvider

httpProvider: string = "https://classic.eth.secure.vote/sv-lib"

indexEnsName

indexEnsName: string = ""

lookupAddress

lookupAddress: string = ""

name

name: string = "Classic"

svApiUrl

svApiUrl: string = ""

unsafeEd25519DelegationAddr

unsafeEd25519DelegationAddr: string = ""

webSocketsProvider

webSocketsProvider: string = "wss://classic.eth.secure.vote:8546/sv-lib"

kovan

kovan: object

archivePushUrl

archivePushUrl: string = "https://archive.test.push.secure.vote/"

archiveUrl

archiveUrl: string = "https://archive.test.secure.vote/"

auxContract

auxContract: string = "0x8d9d49f602e1e95b8dca42af1766963c3e4f7565"

delegationEnsName

delegationEnsName: string = "delegation-2018-06-19.kov.sv"

ens

ens: string = "0xd6F4f22eeC158c434b17d01f62f5dF33b108Ae93"

ensResolver

ensResolver: string = "0xc8c73829348cb15da4b0785a110017464fb8af51"

etherscanLink

etherscanLink: string = "https://kovan.etherscan.io/"

httpProvider

httpProvider: string = "https://kovan.eth.secure.vote/sv-lib"

indexEnsName

indexEnsName: string = "index.kov.sv"

lookupAddress

lookupAddress: string = "0x216265865e46D4c6FE506877EfAAE7dd7Ae2faCE"

name

name: string = "Kovan"

svApiUrl

svApiUrl: string = "https://dev.api.secure.vote"

unsafeEd25519DelegationAddr

unsafeEd25519DelegationAddr: string = "0x005645072d7c244476e3099619a6089245b6a958"

webSocketsProvider

webSocketsProvider: string = "wss://kovan.eth.secure.vote:8546/sv-lib"

mainnet

mainnet: object

archivePushUrl

archivePushUrl: string = "https://archive.push.secure.vote/"

archiveUrl

archiveUrl: string = "https://archive.secure.vote/"

auxContract

auxContract: string = "0x91f34190ffcd934115bb2bd04c29e89362989121"

delegationEnsName

delegationEnsName: string = "delegate.secvote.eth"

ens

ens: string = "0x314159265dd8dbb310642f98f50c066173c1259b"

ensResolver

ensResolver: string = "0x5FfC014343cd971B7eb70732021E26C35B744cc4"

etherscanLink

etherscanLink: string = "https://etherscan.io/"

httpProvider

httpProvider: string = "https://mainnet.eth.secure.vote/sv-lib"

indexEnsName

indexEnsName: string = "index.tokenvote.eth"

lookupAddress

lookupAddress: string = "0x216265865e46D4c6FE506877EfAAE7dd7Ae2faCE"

name

name: string = "Mainnet"

svApiUrl

svApiUrl: string = ""

unsafeEd25519DelegationAddr

unsafeEd25519DelegationAddr: string = ""

webSocketsProvider

webSocketsProvider: string = "wss://mainnet.eth.secure.vote:8546/sv-lib"

ropsten

ropsten: object

archivePushUrl

archivePushUrl: string = "https://archive.test.push.secure.vote/"

archiveUrl

archiveUrl: string = "https://archive.test.secure.vote/"

auxContract

auxContract: string = ""

delegationEnsName

delegationEnsName: string = ""

ens

ens: string = ""

ensResolver

ensResolver: string = ""

etherscanLink

etherscanLink: string = "https://ropsten.etherscan.io/"

httpProvider

httpProvider: string = "https://ropsten.eth.secure.vote/sv-lib"

indexEnsName

indexEnsName: string = ""

lookupAddress

lookupAddress: string = ""

name

name: string = "Ropsten"

svApiUrl

svApiUrl: string = ""

unsafeEd25519DelegationAddr

unsafeEd25519DelegationAddr: string = ""

webSocketsProvider

webSocketsProvider: string = "wss://ropsten.eth.secure.vote:8546/sv-lib"

Const flags

flags: object

This object tracks the flags used for SV ballot boxes. They determine the submission methods and whether ballots are tracked as binding, official, or testing.

For more info see docs.secure.vote

IS_BINDING

IS_BINDING: number = 2 ** 13

IS_OFFICIAL

IS_OFFICIAL: number = 2 ** 14

USE_ENC

USE_ENC: number = 2 ** 3

USE_ETH

USE_ETH: number = 2 ** 0

USE_NO_ENC

USE_NO_ENC: number = 2 ** 2

USE_SIGNED

USE_SIGNED: number = 2 ** 1

USE_TESTING

USE_TESTING: number = 2 ** 15

Generated using TypeDoc