-
Notifications
You must be signed in to change notification settings - Fork 302
Expand file tree
/
Copy pathiface.ts
More file actions
107 lines (96 loc) · 1.92 KB
/
iface.ts
File metadata and controls
107 lines (96 loc) · 1.92 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
* Interfaces for Proton (XPR Network)
*/
import { TransactionExplanation as BaseTransactionExplanation, TransactionType } from '@bitgo/sdk-core';
/**
* Authorization for an EOSIO action
*/
export interface Authorization {
actor: string;
permission: string;
}
/**
* Transfer action data
*/
export interface TransferActionData {
from: string;
to: string;
quantity: string;
memo: string;
}
/**
* EOSIO action
*/
export interface Action {
account: string;
name: string;
authorization: Authorization[];
data: TransferActionData | Record<string, unknown>;
}
/**
* Transaction headers from the blockchain
*/
export interface TransactionHeaders {
expiration: string;
refBlockNum: number;
refBlockPrefix: number;
}
/**
* Transaction data structure
*/
export interface TxData {
id?: string;
type?: TransactionType;
sender: string;
expiration: string;
refBlockNum: number;
refBlockPrefix: number;
actions: Action[];
signatures: string[];
}
/**
* Transaction JSON representation for serialization
*/
export interface TransactionJson {
expiration: string;
ref_block_num: number;
ref_block_prefix: number;
max_net_usage_words: number;
max_cpu_usage_ms: number;
delay_sec: number;
context_free_actions: Action[];
actions: Action[];
transaction_extensions: unknown[];
}
/**
* Broadcast format for Proton transactions
*/
export interface BroadcastFormat {
signatures: string[];
compression: string;
packed_context_free_data: string;
packed_trx: string;
}
/**
* Transaction output (recipient)
*/
export interface TransactionOutput {
address: string;
amount: string;
memo?: string;
}
/**
* Transaction input (sender)
*/
export interface TransactionInput {
address: string;
amount: string;
}
/**
* Extended transaction explanation for Proton
*/
export interface TransactionExplanation extends BaseTransactionExplanation {
type: string;
sender?: string;
memo?: string;
}