the amount for the new bill
pointer to the pubkey
length of the public key
timestamp as the number of hnsecs since midnight, January 1st, 1 A.D. for the current time.
pointer to the bill buffer that is returned
length of the returned bill buffer
ErrorCode
ApiWallet wallet; wallet.createWallet("wowo", "1234"); const double amount = 213.2f; const pkey = wallet.getCurrentPubkey; const time = currentTime; uint8_t* bill_buf; size_t bill_buf_len; int rt = tagion_wallet_create_bill(amount, &pkey[0], pkey.length, cast(const(int64_t)) time, &bill_buf, &bill_buf_len); assert(rt == ErrorCode.none); const read_bill = TagionBill(Document(bill_buf[0..bill_buf_len].idup)); assert(read_bill.value == TagionCurrency(amount)); assert(read_bill.time == time); assert(read_bill.owner == wallet.getCurrentPubkey);
Create bill from wallet information