References
summary | ||
public |
F async castProxyVote(request: *, svConfig: *): * |
|
public |
F genRange3VoteData(votesArray: array): string Prepares voteData for a Range3 ballot from an array of votes |
|
public |
Creates a packed copy of start and end times with submissionBits |
|
public |
F mkSignedBallotForProxy(ballotId: string, sequence: number, voteData: string, extra: string, privateKey: string, opts: object): object Take the arguments and produce web3 data fitting the |
|
public |
F mkSubmissionBits(toCombine: number[]): number This combines flags into a finished submissionBits. |
|
public |
F async prepareWeb3BBVoteTx(txInfo: object, svNetwork: object): object Prepares a transaction for sending with the users web3 browser |
|
public |
F verifySignedBallotForProxy(proxyVote: ProxyVote, opts: *): {verified: bool, address: EthAddress} Verify a signed vote to be submitted via proxy as generated by |
|
public |
F getNetwork(networkId: *, chainId: *): * |
|
public |
F networkName(networkId: *): string |
|
public |
F ethSignHash(messageHash: *, privateKey: *): {messageHash: string, r: string, s: string, v: string} Sign a message such that it can be verified with |
|
public |
F ethVerifySig(messageHash: string, v, r, s: string[]): {verified: bool, address: EthAddress} Operates |
|
public |
F hashMsgRaw(data: *): * Like web3.eth.accounts.hashMessage without the envelope. |
|
public |
F checkBallotHashBSpec(rawBallotSpecString: *, expectedSpecHash: *): boolean Verify a BallotSpec's hash |
|
public |
F checkBallotHashGBallot(ballotObject: *): * |
|
public |
F async checkIfAddressIsEditor(objectPattern: {"svNetwork": *}, objectPattern1: {"userAddress": *, "democHash": *}): * |
|
public |
F createEd25519DelegationTransaction(svNetwork: *, dlgtRequest: *, pubKey: *, signature: *, privKey: *): to: string, value: number, gas: number, data: string Create a tx object for an ed25519 delegation |
|
public |
F ed25519DelegationIsValid(dlgtRequest: *, pubKey: *, signature: *): boolean Verify an ed25519 self-delegation |
|
public |
F async getBackendAddress(objectPattern: {"index": *}): * |
|
public |
F async getBallotObjectFromIpfs(ballotSpecHash: *): * |
|
public |
F async getBallotObjectFromS3(archiveUrl: *, ballotSpecHash: *): * |
|
public |
F async getBallotSpec(archiveUrl: *, ballotSpecHash: *): * |
|
public |
F async getCommunityBallotPrice(objectPattern: {"payments": *}, democHash: *): * |
|
public |
F async getContractAddresses(objectPattern: {"svNetwork": *}): {"indexAddress": *, "backendAddress": *, "auxAddress": *, "lookupAddress": *, "resolverAddress": *, "communityAuctionAddress": *, "delegationAddress": *, "paymentsAddress": *} Takes in the svNetwork object and returns all relevant addresses |
|
public |
F async getCurrentGasPrice(): {"safeLow": *, "average": *, "fast": *, "fastest": *} |
|
public |
F async getDemocBallots(objectPattern: {"svNetwork": *, "democHash": *}): * |
|
public |
F async getDemocInfo(objectPattern: {"backend": *, "democHash": *}): * |
|
public |
F async getDemocNthBallot(objectPattern: {"svNetwork": *}, democBallotInfo: *): * |
|
public |
F getSingularCleanAbi(requestedAbiName: *, methodName: *): * |
|
public |
F async getUnsafeEd25519Delegations(pubKey: *, svNetwork: *): * |
|
public |
F async initializeSvLight(svConfig: *): {"svConfig": *, "web3": *, "resolver": *, "index": *, "backend": *, "aux": *, "payments": *} |
|
public |
F prepareEd25519Delegation(address: *, nonce: *): Bytes32 Generate a packed Ed25519Delegation instruction for use with the smart contract or API |
|
public |
F async resolveEnsAddress(objectPattern: {"resolver": *}, ensName: *): * |
|
public |
F stellarPkToHex(pubKey: *): * |
|
public |
F async weiToCents(objectPattern: {"payments": *}, wei: *): * |
|
public |
F 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. |
|
public |
This compares ethereum addresses (taking into account case, etc) |
|
public |
F hexToBase32(hex: string): string This will convert a hex string to Base32 in the bech32 format WITHOUT a checksum. |
|
public |
F hexToUint8Array(hex: string): Uint8Array Turn a hexstring (with or without prefix) to a Uint8Array |
|
public |
V flags: {"USE_ETH": *, "USE_SIGNED": *, "USE_NO_ENC": *, "USE_ENC": *, "IS_BINDING": *, "IS_OFFICIAL": *, "USE_TESTING": *} This object tracks the flags used for SV ballot boxes. |
|
public |
|
|
public |
V networkVars: * |
|
public |
|
|
public |
|
|
public |
V Bytes32: * |
|
public |
V Bytes64: * |
|
public |
V HexString: * |