parent
5301c03607
commit
3d50bb5ed8
@ -0,0 +1,44 @@
|
||||
{
|
||||
"coin_name": "Peercoin",
|
||||
"coin_shortcut": "PPC",
|
||||
"coin_label": "Peercoin",
|
||||
"website": "https://peercoin.net",
|
||||
"github": "https://github.com/peercoin/peercoin",
|
||||
"maintainer": "backpacker69 <backpacker69@protonmail.com>",
|
||||
"curve_name": "secp256k1",
|
||||
"divisibility": 6,
|
||||
"address_type": 55,
|
||||
"address_type_p2sh": 117,
|
||||
"maxfee_kb": 2000000,
|
||||
"minfee_kb": 10000,
|
||||
"signed_message_header": "Peercoin Signed Message:\n",
|
||||
"hash_genesis_block": "0000000032fe677166d54963b62a4677d8957e87c508eaa4fd7eb1c880cd27e3",
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "pc",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 6,
|
||||
"segwit": true,
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
"dust_limit": 10000,
|
||||
"blocktime_seconds": 600,
|
||||
"uri_prefix": "peercoin",
|
||||
"min_address_length": 27,
|
||||
"max_address_length": 34,
|
||||
"bitcore": [],
|
||||
"blockbook": [
|
||||
"https://blockbook.peercoin.net"
|
||||
],
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"confidential_assets": null
|
||||
}
|
After Width: | Height: | Size: 7.7 KiB |
@ -0,0 +1,44 @@
|
||||
{
|
||||
"coin_name": "Peercoin Testnet",
|
||||
"coin_shortcut": "tPPC",
|
||||
"coin_label": "Peercoin Testnet",
|
||||
"website": "https://peercoin.net",
|
||||
"github": "https://github.com/peercoin/peercoin",
|
||||
"maintainer": "backpacker69 <backpacker69@protonmail.com>",
|
||||
"curve_name": "secp256k1",
|
||||
"divisibility": 6,
|
||||
"address_type": 111,
|
||||
"address_type_p2sh": 196,
|
||||
"maxfee_kb": 2000000,
|
||||
"minfee_kb": 10000,
|
||||
"signed_message_header": "Peercoin Signed Message:\n",
|
||||
"hash_genesis_block": "00000001f757bb737f6596503e17cd17b0658ce630cc727c0cca81aec47c9f06",
|
||||
"xprv_magic": 70615956,
|
||||
"xpub_magic": 70617039,
|
||||
"xpub_magic_segwit_p2sh": 71979618,
|
||||
"xpub_magic_segwit_native": 73342198,
|
||||
"bech32_prefix": "tpc",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 1,
|
||||
"segwit": true,
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 10
|
||||
},
|
||||
"dust_limit": 10000,
|
||||
"blocktime_seconds": 600,
|
||||
"uri_prefix": "peercoin",
|
||||
"min_address_length": 27,
|
||||
"max_address_length": 34,
|
||||
"bitcore": [],
|
||||
"blockbook": [
|
||||
"https://tblockbook.peercoin.net"
|
||||
],
|
||||
"negative_fee": false,
|
||||
"cooldown": 100,
|
||||
"consensus_branch_id": null,
|
||||
"confidential_assets": null
|
||||
}
|
After Width: | Height: | Size: 5.2 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,58 @@
|
||||
# This file is part of the Trezor project.
|
||||
#
|
||||
# Copyright (C) 2012-2019 SatoshiLabs and contributors
|
||||
#
|
||||
# This library is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License version 3
|
||||
# as published by the Free Software Foundation.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the License along with this library.
|
||||
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
|
||||
|
||||
import pytest
|
||||
|
||||
from trezorlib import btc, messages
|
||||
from trezorlib.tools import parse_path
|
||||
|
||||
from ..tx_cache import tx_cache
|
||||
|
||||
TXHASH_41b29a = bytes.fromhex(
|
||||
"41b29ad615d8eea40a4654a052d18bb10cd08f203c351f4d241f88b031357d3d"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.altcoin
|
||||
@pytest.mark.peercoin
|
||||
def test_timestamp_included(client):
|
||||
# tx: 41b29ad615d8eea40a4654a052d18bb10cd08f203c351f4d241f88b031357d3d
|
||||
# input 0: 0.1 PPC
|
||||
|
||||
inp1 = messages.TxInputType(
|
||||
address_n=parse_path("m/44'/6'/0'/0/0"), prev_hash=TXHASH_41b29a, prev_index=0
|
||||
)
|
||||
|
||||
out1 = messages.TxOutputType(
|
||||
address="PXtfyTjzgXSgTwK5AbszdHQSSxyQN3BLM5",
|
||||
amount=100000 - 10000,
|
||||
script_type=messages.OutputScriptType.PAYTOADDRESS,
|
||||
)
|
||||
|
||||
with client:
|
||||
details = messages.SignTx(version=1, timestamp=0x5DC5448A)
|
||||
_, timestamp_tx = btc.sign_tx(
|
||||
client,
|
||||
"Peercoin",
|
||||
[inp1],
|
||||
[out1],
|
||||
details=details,
|
||||
prev_txes=tx_cache("Peercoin", allow_fetch=False),
|
||||
)
|
||||
|
||||
# Accepted by network https://explorer.peercoin.net/api/getrawtransaction?txid=f7e3624c143b6a170cc44f9337d0fa8ea8564a211de9c077c6889d8c78f80909&decrypt=1
|
||||
accepted_txhex = "010000008a44c55d013d7d3531b0881f244d1f353c208fd00cb18bd152a054460aa4eed815d69ab241000000006a473044022025c0ea702390c702c7ae8b5ea469820bea8d942c8c16439f8f0ba2e91e699efc02200db9b0a48fa2861695fa91df4831a4c7306587e5d2dc85419647f462717bc8f001210274cb0ee652d9457fbb0f3872d43155a6bc16f77bd5749d8826b53db443b1b278ffffffff01905f0100000000001976a914ff9a05654150fdc92b1655f49d7f2a8aaf6a3a2a88ac00000000"
|
||||
assert timestamp_tx.hex() == accepted_txhex
|
@ -0,0 +1,45 @@
|
||||
{
|
||||
"txid": "41b29ad615d8eea40a4654a052d18bb10cd08f203c351f4d241f88b031357d3d",
|
||||
"version": 1,
|
||||
"time": 1573209046,
|
||||
"locktime": 0,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "67abe6288fdec766e106a46125727eb7c608266950746fc10d1d1c69645f68af",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"asm": "3044022052748f479c41b432352772ef7aa4b090e4f8df8d589aaea5cfc3dbef237a3935022012f53265e223c3cce6348306d7085b0538b68a52dbd99b0035a01b5bb2a8e50a[ALL] 038fa1b058febedda1a414ccb39f55ac09dd832e5c2e5af9b14ff49ea9d520b9fe",
|
||||
"hex": "473044022052748f479c41b432352772ef7aa4b090e4f8df8d589aaea5cfc3dbef237a3935022012f53265e223c3cce6348306d7085b0538b68a52dbd99b0035a01b5bb2a8e50a0121038fa1b058febedda1a414ccb39f55ac09dd832e5c2e5af9b14ff49ea9d520b9fe"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.100000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"asm": "OP_DUP OP_HASH160 d68a96304b1fb73aadfea0f44c17061f5e353e1b OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a914d68a96304b1fb73aadfea0f44c17061f5e353e1b88ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": [
|
||||
"PU9ZnCJsFwz39F1ndzx4FdN41DWg3mDjYo"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.695400,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"asm": "OP_DUP OP_HASH160 60223495a70ca30abcee5b93687d5fa88fa5d4ec OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a91460223495a70ca30abcee5b93687d5fa88fa5d4ec88ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": [
|
||||
"PHMV12FFYucgf3mybnmF8qYJwtV6sx89ji"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in new issue