-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUID_transaction.h
More file actions
33 lines (24 loc) · 1.04 KB
/
UID_transaction.h
File metadata and controls
33 lines (24 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Copyright (c) 2016-2018. Uniquid Inc. or its affiliates. All Rights Reserved.
*
* License is in the "LICENSE" file accompanying this file.
* See the License for the specific language governing permissions and limitations under the License.
*/
/**
* @file UID_transaction.h
*
* @date 12/dec/2016
* @author M. Palumbi
*/
#ifndef __UID_TRANSACTION_H
#define __UID_TRANSACTION_H
#include <stdint.h>
#include <stdlib.h>
#include "UID_identity.h"
#define UID_CONTRACT_MAX_IN 3
typedef uint8_t UID_ScriptSig[1 /*len*/ + 1 /*OP_PUSH*/ + 72 /*maxDER*/ + 1 /*hash type*/ + 1 /*OP_PUSH*/ + 33 /*pub key*/];
int UID_digestRawTx(uint8_t *rawtx, size_t len, unsigned in, uint8_t address[20], uint8_t hash[32]);
int UID_buildSignedHex(uint8_t *rawtx, size_t len, UID_ScriptSig *scriptsig, char *hextx, size_t olen);
int UID_buildScriptSig(uint8_t *rawtx, size_t rawtx_len, UID_Bip32Path *path, int n_inputs, UID_ScriptSig *scriptsig, int n_script);
void UID_signAndSendContract(char *param, char *result, size_t size);
#endif // __UID_TRANSACTION_H