Skip to main content

CreateWalletV0

Struct CreateWalletV0 

Source
pub struct CreateWalletV0 {
Show 13 fields pub security_img: Vec<u8>, pub security_txt: String, pub pin: [u8; 4], pub pazzle_length: u8, pub send_bootstrap: bool, pub send_wallet: bool, pub result_with_wallet_file: bool, pub local_save: bool, pub core_bootstrap: BootstrapContentV0, pub core_registration: Option<[u8; 32]>, pub additional_bootstrap: Option<BootstrapContentV0>, pub pdf: bool, pub device_name: String,
}
Expand description

Create Wallet Version 0, used by the API create_wallet_v0 as a list of arguments

Fields§

§security_img: Vec<u8>

a vector containing the binary content of an image file that will be used at every login, displayed (on devices that can) to the user so they can check the wallet is theirs and that entering their pazzle and PIN is safe and there is no phishing attack. an attacker would redirect the user to a clone of the wallet opener app, and would try to steal what the user enters but this attacker would not possess the security_img of the user as it is only present locally in the wallet file. the image should be bigger than 150x150px. There is no need to provide more than 400x400px as it will be scaled down anyway. We accept several formats like JPEG, PNG, GIF, WEBP and more. The image should be unique to the user. But it should not be too personal neither. Do not upload face picture, this is not a profile pic. The best would be any picture that the user recognizes as unique. Please be aware that other users who are sharing the same device, will be able to see this image.

§security_txt: String

A string of characters of minimum length 10. This phrase will be presented to the user every time they are about to enter their pazzle and PIN in order to unlock their wallet. It should be something the user will remember, but not something too personal. Do not enter full name, nor address, nor phone number. Instead, the user can enter a quote, a small phrase that they like, or something meaningless to others, but unique to them. Please be aware that other users who are sharing the same device, will be able to see this phrase.

§pin: [u8; 4]

chose a PIN code. We recommend the user to choose a PIN code they already know very well (unlock phone, credit card). The PIN and the rest of the Wallet will never be sent to NextGraph or any other third party (check the source code if you don’t believe us). It cannot be a series like 1234 or 8765. The same digit cannot repeat more than once. By example 4484 is invalid. Try to avoid birth date, last digits of phone number, or zip code for privacy concern

§pazzle_length: u8

For now, only 9 is supported. 12 and 15 are planned. A value of 0 will deactivate the pazzle mechanism on this Wallet, and only the mnemonic could be used to open it.

§send_bootstrap: bool

Not implemented yet. Will send the bootstrap to our cloud servers, if needed

§send_wallet: bool

Not implemented yet. Will send an encrypted Wallet file to our cloud servers, if needed. (and no, it does not contain the user’s pazzle nor PIN)

§result_with_wallet_file: bool

Do you want a binary file containing the whole Wallet ?

§local_save: bool

Should the wallet be saved locally on disk, by the LocalBroker. It will not work on a in-memory LocalBroker, obviously.

§core_bootstrap: BootstrapContentV0

What Broker Server to contact when there is internet and we want to sync.

§core_registration: Option<[u8; 32]>

What is the registration code at that Broker Server. Only useful the first time you connect to the Server. Can be None the rest of the time, or if your server does not need an Invitation.

§additional_bootstrap: Option<BootstrapContentV0>

Bootstrap of another server that you might use in order to connect to NextGraph network. It can be another interface on the same core server.

§pdf: bool

Should generate a recovery PDF containing all the information of the wallet in plain text.

§device_name: String

short name of the device

Implementations§

Source§

impl CreateWalletV0

Source

pub fn new( security_img: Vec<u8>, security_txt: String, pin: [u8; 4], pazzle_length: u8, send_bootstrap: bool, send_wallet: bool, core_bootstrap: BootstrapContentV0, core_registration: Option<[u8; 32]>, additional_bootstrap: Option<BootstrapContentV0>, pdf: bool, device_name: String, ) -> CreateWalletV0

Trait Implementations§

Source§

impl Clone for CreateWalletV0

Source§

fn clone(&self) -> CreateWalletV0

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CreateWalletV0

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CreateWalletV0

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<CreateWalletV0, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Drop for CreateWalletV0

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics #130494)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Serialize for CreateWalletV0

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Zeroize for CreateWalletV0

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,