Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate all existing API calls #1540

Merged
merged 1 commit into from
Jan 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions nano/lib/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,51 @@ typedef unsigned char * xrb_uint512; // 64byte array for signatures
typedef void * xrb_transaction;

// Convert amount bytes 'source' to a 40 byte null-terminated decimal string 'destination'
[[deprecated]]
void xrb_uint128_to_dec (const xrb_uint128 source, char * destination);
// Convert public/private key bytes 'source' to a 65 byte null-terminated hex string 'destination'
[[deprecated]]
void xrb_uint256_to_string (const xrb_uint256 source, char * destination);
// Convert public key bytes 'source' to a 66 byte non-null-terminated account string 'destination'
[[deprecated]]
void xrb_uint256_to_address (xrb_uint256 source, char * destination);
// Convert public/private key bytes 'source' to a 129 byte null-terminated hex string 'destination'
[[deprecated]]
void xrb_uint512_to_string (const xrb_uint512 source, char * destination);

// Convert 39 byte decimal string 'source' to a byte array 'destination'
// Return 0 on success, nonzero on error
[[deprecated]]
int xrb_uint128_from_dec (const char * source, xrb_uint128 destination);
// Convert 64 byte hex string 'source' to a byte array 'destination'
// Return 0 on success, nonzero on error
[[deprecated]]
int xrb_uint256_from_string (const char * source, xrb_uint256 destination);
// Convert 128 byte hex string 'source' to a byte array 'destination'
// Return 0 on success, nonzero on error
[[deprecated]]
int xrb_uint512_from_string (const char * source, xrb_uint512 destination);

// Check if the null-terminated string 'account' is a valid xrb account number
// Return 0 on correct, nonzero on invalid
[[deprecated]]
int xrb_valid_address (const char * account);

// Create a new random number in to 'destination'
[[deprecated]]
void xrb_generate_random (xrb_uint256 destination);
// Retrieve the deterministic private key for 'seed' at 'index'
[[deprecated]]
void xrb_seed_key (const xrb_uint256 seed, int index, xrb_uint256);
// Derive the public key 'pub' from 'key'
[[deprecated]]
void xrb_key_account (xrb_uint256 key, xrb_uint256 pub);

// Sign 'transaction' using 'private_key' and write to 'signature'
[[deprecated]]
char * xrb_sign_transaction (const char * transaction, const xrb_uint256 private_key);
// Generate work for 'transaction'
[[deprecated]]
char * xrb_work_transaction (const char * transaction);

#if __cplusplus
Expand Down