Preparing search index...
The search index is not available
Documentation
Documentation
@divviup/field
Field64
Class Field64
Hierarchy (
View Summary
)
Field
Field64
Index
Constructors
constructor
Properties
encoded
Size
generator
gen
Order
modulus
Methods
add
additive
Secret
Share
decode
encode
eval
Poly
exp
fill
Random
interpolate
mul
mul
Polys
random
Element
sub
sum
vec
Add
vec
Sub
Constructors
constructor
new
Field64
()
:
Field64
Returns
Field64
Properties
Readonly
encoded
Size
encodedSize
:
number
Readonly
generator
generator
:
bigint
Readonly
gen
Order
genOrder
:
bigint
Readonly
modulus
modulus
:
bigint
Methods
add
add
(
a
:
bigint
,
b
:
bigint
)
:
bigint
Parameters
a
:
bigint
b
:
bigint
Returns
bigint
additive
Secret
Share
additiveSecretShare
(
input
:
bigint
[]
,
numShares
:
number
)
:
bigint
[]
[]
Parameters
input
:
bigint
[]
numShares
:
number
Returns
bigint
[]
[]
decode
decode
(
encoded
:
Uint8Array
)
:
bigint
[]
Parameters
encoded
:
Uint8Array
Returns
bigint
[]
encode
encode
(
data
:
bigint
[]
)
:
Uint8Array
Parameters
data
:
bigint
[]
Returns
Uint8Array
eval
Poly
evalPoly
(
p
:
bigint
[]
,
x
:
bigint
)
:
bigint
Parameters
p
:
bigint
[]
x
:
bigint
Returns
bigint
exp
exp
(
b
:
bigint
,
exp
:
bigint
)
:
bigint
Parameters
b
:
bigint
exp
:
bigint
Returns
bigint
fill
Random
fillRandom
(
length
:
number
)
:
bigint
[]
Parameters
length
:
number
Returns
bigint
[]
interpolate
interpolate
(
rootsOfUnity
:
bigint
[]
,
ys
:
bigint
[]
)
:
bigint
[]
Parameters
rootsOfUnity
:
bigint
[]
ys
:
bigint
[]
Returns
bigint
[]
mul
mul
(
a
:
bigint
,
b
:
bigint
)
:
bigint
Parameters
a
:
bigint
b
:
bigint
Returns
bigint
mul
Polys
mulPolys
(
a
:
bigint
[]
,
b
:
bigint
[]
)
:
bigint
[]
Parameters
a
:
bigint
[]
b
:
bigint
[]
Returns
bigint
[]
random
Element
randomElement
()
:
bigint
Returns
bigint
sub
sub
(
x
:
bigint
,
y
:
bigint
)
:
bigint
Parameters
x
:
bigint
y
:
bigint
Returns
bigint
sum
sum
<
T
>
(
arr
:
T
[]
,
mapper
:
(
value
:
T
,
index
:
number
)
=>
bigint
)
:
bigint
Type Parameters
T
Parameters
arr
:
T
[]
mapper
:
(
value
:
T
,
index
:
number
)
=>
bigint
Returns
bigint
vec
Add
vecAdd
(
a
:
bigint
[]
,
b
:
bigint
[]
)
:
bigint
[]
Parameters
a
:
bigint
[]
b
:
bigint
[]
Returns
bigint
[]
vec
Sub
vecSub
(
a
:
bigint
[]
,
b
:
bigint
[]
)
:
bigint
[]
Parameters
a
:
bigint
[]
b
:
bigint
[]
Returns
bigint
[]
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
encoded
Size
generator
gen
Order
modulus
Methods
add
additive
Secret
Share
decode
encode
eval
Poly
exp
fill
Random
interpolate
mul
mul
Polys
random
Element
sub
sum
vec
Add
vec
Sub
Documentation
Loading...