chore: Merge newest dev to get most recent changes
This commit is contained in:
commit
a6571e43af
1769 changed files with 398681 additions and 20 deletions
|
|
@ -1,15 +1,13 @@
|
|||
use std::{str::Bytes, string};
|
||||
|
||||
use crate::utils::poly::{self, block_2_number, get_coefficients};
|
||||
use crate::utils::poly::{b64_2_num, get_coefficients};
|
||||
use anyhow::Result;
|
||||
use base64::prelude::*;
|
||||
use serde_json::Value;
|
||||
|
||||
pub fn block2poly(val: &Value) -> Result<Vec<u8>> {
|
||||
// Convert JSON data in to a u128
|
||||
// TODO: Transfer decoding into own function?
|
||||
let string: String = serde_json::from_value(val["block"].clone())?;
|
||||
let number: u128 = block_2_number(string)?;
|
||||
|
||||
let number = b64_2_num(&string)?;
|
||||
|
||||
let coefficients: Vec<u8> = get_coefficients(number);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue