tagion_wallet_create_wallet

Create new wallet. Note requires post save of Account, RecoverGenerator and DevicePIN

version(none)
extern (C)
int
tagion_wallet_create_wallet
(,
const char* passphrase
,
const size_t passphrase_len
,
const char* pincode
,
const size_t pincode_len
)

Parameters

wallet_instance const(WalletT*)

instance to the wallet

passphrase char*

pointer to the passphrase

passphrase_len size_t

length of the passphrase

pincode char*

pointer to the pincode

pincode_len size_t

length of the pincode

Return Value

Type: int

ErrorCode

Examples

WalletT w;
int rt = tagion_wallet_create_instance(&w);
assert(rt == ErrorCode.none);

string passphrase = "some_passphrase";
string pincode = "some_pincode";

rt = tagion_wallet_create_wallet(&w, &passphrase[0], passphrase.length, &pincode[0], pincode.length);
assert(rt == ErrorCode.none);