Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 598ef85

Browse files
authored
Merge pull request #121 from phaazon/misc/idl-docs
First pass of fixing and documenting the IDL files.
2 parents a2abf8c + 5485d5d commit 598ef85

20 files changed

+633
-579
lines changed

core/idl/bitcoin/addresses.djinni

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
1-
1+
# Strategy used to compute the amount of fees of transactions.
2+
#
3+
# This basically gives the unit in which the fee amount will be expressed.
24
BitcoinLikeFeePolicy = enum {
35
PER_BYTE;
46
PER_KBYTE;
57
}
68

9+
# Bitcoin network parameters.
710
BitcoinLikeNetworkParameters = record {
11+
# Name of the network.
812
Identifier: string;
13+
# Version of the Pay To Public Hash standard.
914
P2PKHVersion: binary;
15+
# Version of the Pay To Script Hash standard.
1016
P2SHVersion: binary;
17+
# Version of the Extended Public Key standard.
1118
XPUBVersion: binary;
19+
# Policy to use when expressing fee amount.
1220
FeePolicy: BitcoinLikeFeePolicy;
21+
# Minimal amount a UTXO should have before being considered BTC dust.
1322
DustAmount: i64;
23+
# Constant prefix to prepend all signature messages.
1424
MessagePrefix: string;
25+
# Are transactions encoded with timestamp?
1526
UsesTimestampedTransaction: bool;
27+
# Delay applied to all timestamps. Used to debounce transactions.
1628
TimestampDelay: i64;
29+
# Bitcoin signature flag indicating what part of a transaction a signature signs.
1730
SigHash: binary;
31+
# Addition BIPs enabled for this network.
1832
AdditionalBIPs: list<string>;
1933
}
2034

@@ -43,10 +57,16 @@ BitcoinLikeAddress = interface +c {
4357
isP2PKH(): bool;
4458
}
4559

60+
# The xPUB definition for Bitcoin.
4661
BitcoinLikeExtendedPublicKey = interface +c {
62+
# Derive an address from an xPUB and a path.
4763
derive(path: string): BitcoinLikeAddress;
64+
# Derive a public key from an xPUB and a path.
4865
derivePublicKey(path: string): binary;
66+
# Derive a shorten version of a public key (SHA256 + RIPEMD160) from an xPUB and a path.
4967
deriveHash160(path: string): binary;
68+
# Get the xPUB in base 58.
5069
toBase58(): string;
70+
# Get the root path of the xPUB.
5171
getRootPath(): string;
52-
}
72+
}

0 commit comments

Comments
 (0)