forked from LBRYCommunity/lbry-sdk
fix imports: schema.schema -> schema.legacy_schema_v1
This commit is contained in:
parent
5404d26f2f
commit
9b64ee33dc
16 changed files with 35 additions and 35 deletions
|
@ -6,7 +6,7 @@ from binascii import unhexlify
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from lbrynet.schema.schema import SECP256k1
|
from lbrynet.schema.legacy_schema_v1 import SECP256k1
|
||||||
from torba.client.basemanager import BaseWalletManager
|
from torba.client.basemanager import BaseWalletManager
|
||||||
from torba.rpc.jsonrpc import CodeMessageError
|
from torba.rpc.jsonrpc import CodeMessageError
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import lbrynet.schema
|
||||||
from lbrynet.schema.base import b58encode, b58decode, validate_b58_checksum
|
from lbrynet.schema.base import b58encode, b58decode, validate_b58_checksum
|
||||||
from lbrynet.schema.hashing import double_sha256, hash160
|
from lbrynet.schema.hashing import double_sha256, hash160
|
||||||
from lbrynet.schema.error import InvalidAddress
|
from lbrynet.schema.error import InvalidAddress
|
||||||
from lbrynet.schema.schema import ADDRESS_LENGTH, ADDRESS_PREFIXES, PUBKEY_ADDRESS, SCRIPT_ADDRESS
|
from lbrynet.schema.legacy_schema_v1 import ADDRESS_LENGTH, ADDRESS_PREFIXES, PUBKEY_ADDRESS, SCRIPT_ADDRESS
|
||||||
|
|
||||||
|
|
||||||
def validate_address_length(addr_bytes):
|
def validate_address_length(addr_bytes):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from lbrynet.schema.schema import ADDRESS_CHECKSUM_LENGTH
|
from lbrynet.schema.legacy_schema_v1 import ADDRESS_CHECKSUM_LENGTH
|
||||||
from lbrynet.schema.hashing import double_sha256
|
from lbrynet.schema.hashing import double_sha256
|
||||||
from lbrynet.schema.error import InvalidAddress
|
from lbrynet.schema.error import InvalidAddress
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@ from google.protobuf.message import DecodeError as DecodeError_pb # pylint: dis
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from lbrynet.schema.schema.claim import Claim
|
|
||||||
from lbrynet.schema.proto2 import claim_pb2
|
from lbrynet.schema.proto2 import claim_pb2
|
||||||
from lbrynet.schema.signature import Signature
|
from lbrynet.schema.signature import Signature
|
||||||
from lbrynet.schema.validator import get_validator
|
from lbrynet.schema.validator import get_validator
|
||||||
from lbrynet.schema.signer import get_signer
|
from lbrynet.schema.signer import get_signer
|
||||||
from lbrynet.schema.schema import CURVE_NAMES, CLAIM_TYPE_NAMES, SECP256k1
|
from lbrynet.schema.legacy_schema_v1.claim import Claim
|
||||||
|
from lbrynet.schema.legacy_schema_v1 import CURVE_NAMES, CLAIM_TYPE_NAMES, SECP256k1
|
||||||
from lbrynet.schema.encoding import decode_fields, decode_b64_fields, encode_fields
|
from lbrynet.schema.encoding import decode_fields, decode_b64_fields, encode_fields
|
||||||
from lbrynet.schema.error import DecodeError
|
from lbrynet.schema.error import DecodeError
|
||||||
from lbrynet.schema.fee import Fee
|
from lbrynet.schema.fee import Fee
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import base64, binascii
|
import base64, binascii
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from lbrynet.schema.address import decode_address, encode_address
|
from lbrynet.schema.address import decode_address, encode_address
|
||||||
from lbrynet.schema.schema import CLAIM_TYPES, CLAIM_TYPE, STREAM_TYPE, CERTIFICATE_TYPE
|
from lbrynet.schema.legacy_schema_v1 import CLAIM_TYPES, CLAIM_TYPE, STREAM_TYPE, CERTIFICATE_TYPE
|
||||||
from lbrynet.schema.schema import SIGNATURE
|
from lbrynet.schema.legacy_schema_v1 import SIGNATURE
|
||||||
from lbrynet.schema.error import DecodeError, InvalidAddress
|
from lbrynet.schema.error import DecodeError, InvalidAddress
|
||||||
from lbrynet.schema.signature import Signature
|
from lbrynet.schema.signature import Signature
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from lbrynet.schema.address import encode_address, decode_address
|
from lbrynet.schema.address import encode_address, decode_address
|
||||||
from lbrynet.schema.schema import CURRENCY_NAMES, CURRENCY_MAP
|
from lbrynet.schema.legacy_schema_v1 import CURRENCY_NAMES, CURRENCY_MAP
|
||||||
from lbrynet.schema.schema.fee import Fee as FeeHelper
|
from lbrynet.schema.legacy_schema_v1.fee import Fee as FeeHelper
|
||||||
from lbrynet.schema.proto2 import fee_pb2
|
from lbrynet.schema.proto2 import fee_pb2
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from lbrynet.schema.proto2 import certificate_pb2 as cert_pb
|
from lbrynet.schema.proto2 import certificate_pb2 as cert_pb
|
||||||
from lbrynet.schema.schema.schema import Schema
|
from lbrynet.schema.legacy_schema_v1.schema import Schema
|
||||||
from lbrynet.schema.schema import VERSION_MAP, V_0_0_1, ECDSA_CURVES, CURVE_NAMES
|
from lbrynet.schema.legacy_schema_v1 import VERSION_MAP, V_0_0_1, ECDSA_CURVES, CURVE_NAMES
|
||||||
from lbrynet.schema.validator import get_key_type_from_dem
|
from lbrynet.schema.validator import get_key_type_from_dem
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from lbrynet.schema.proto2 import claim_pb2 as claim_pb
|
from lbrynet.schema.proto2 import claim_pb2 as claim_pb
|
||||||
from lbrynet.schema.schema import VERSION_MAP
|
from lbrynet.schema.legacy_schema_v1 import VERSION_MAP
|
||||||
from lbrynet.schema.schema.signature import Signature
|
from lbrynet.schema.legacy_schema_v1.signature import Signature
|
||||||
from lbrynet.schema.schema.certificate import Certificate
|
from lbrynet.schema.legacy_schema_v1.certificate import Certificate
|
||||||
from lbrynet.schema.schema.schema import Schema
|
from lbrynet.schema.legacy_schema_v1.schema import Schema
|
||||||
from lbrynet.schema.schema.stream import Stream
|
from lbrynet.schema.legacy_schema_v1.stream import Stream
|
||||||
|
|
||||||
|
|
||||||
class Claim(Schema):
|
class Claim(Schema):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from lbrynet.schema.schema.schema import Schema
|
|
||||||
from lbrynet.schema.proto2 import fee_pb2 as fee_pb
|
from lbrynet.schema.proto2 import fee_pb2 as fee_pb
|
||||||
from lbrynet.schema.schema import VERSION_MAP, CURRENCY_MAP
|
from lbrynet.schema.legacy_schema_v1.schema import Schema
|
||||||
|
from lbrynet.schema.legacy_schema_v1 import VERSION_MAP, CURRENCY_MAP
|
||||||
|
|
||||||
|
|
||||||
class Fee(Schema):
|
class Fee(Schema):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from lbrynet.schema.proto2 import metadata_pb2 as metadata_pb
|
from lbrynet.schema.proto2 import metadata_pb2 as metadata_pb
|
||||||
from lbrynet.schema.schema.fee import Fee
|
from lbrynet.schema.legacy_schema_v1.fee import Fee
|
||||||
from lbrynet.schema.schema.schema import Schema
|
from lbrynet.schema.legacy_schema_v1.schema import Schema
|
||||||
from lbrynet.schema.schema import VERSION_MAP
|
from lbrynet.schema.legacy_schema_v1 import VERSION_MAP
|
||||||
|
|
||||||
|
|
||||||
class Metadata(Schema):
|
class Metadata(Schema):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from lbrynet.schema.proto2 import signature_pb2 as signature_pb
|
from lbrynet.schema.proto2 import signature_pb2 as signature_pb
|
||||||
from lbrynet.schema.schema import VERSION_MAP, ECDSA_CURVES
|
from lbrynet.schema.legacy_schema_v1 import VERSION_MAP, ECDSA_CURVES
|
||||||
from lbrynet.schema.schema.schema import Schema
|
from lbrynet.schema.legacy_schema_v1.schema import Schema
|
||||||
|
|
||||||
|
|
||||||
class Signature(Schema):
|
class Signature(Schema):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from lbrynet.schema.proto2 import source_pb2 as source_pb
|
from lbrynet.schema.proto2 import source_pb2 as source_pb
|
||||||
from lbrynet.schema.schema import SOURCE_TYPES, LBRY_SD_HASH_LENGTH, VERSION_MAP
|
from lbrynet.schema.legacy_schema_v1 import SOURCE_TYPES, LBRY_SD_HASH_LENGTH, VERSION_MAP
|
||||||
from lbrynet.schema.schema.schema import Schema
|
from lbrynet.schema.legacy_schema_v1.schema import Schema
|
||||||
from lbrynet.schema.error import InvalidSourceHashLength
|
from lbrynet.schema.error import InvalidSourceHashLength
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from lbrynet.schema.schema.source import Source
|
|
||||||
from lbrynet.schema.proto2 import stream_pb2 as stream_pb
|
from lbrynet.schema.proto2 import stream_pb2 as stream_pb
|
||||||
from lbrynet.schema.schema import VERSION_MAP
|
from lbrynet.schema.legacy_schema_v1.source import Source
|
||||||
from lbrynet.schema.schema.metadata import Metadata
|
from lbrynet.schema.legacy_schema_v1 import VERSION_MAP
|
||||||
from lbrynet.schema.schema.schema import Schema
|
from lbrynet.schema.legacy_schema_v1.metadata import Metadata
|
||||||
|
from lbrynet.schema.legacy_schema_v1.schema import Schema
|
||||||
|
|
||||||
|
|
||||||
class Stream(Schema):
|
class Stream(Schema):
|
||||||
|
|
|
@ -3,12 +3,12 @@ import hashlib
|
||||||
import binascii
|
import binascii
|
||||||
from lbrynet.schema.address import decode_address
|
from lbrynet.schema.address import decode_address
|
||||||
from lbrynet.schema.encoding import decode_b64_fields
|
from lbrynet.schema.encoding import decode_b64_fields
|
||||||
from lbrynet.schema.schema.certificate import Certificate
|
|
||||||
from lbrynet.schema.schema.claim import Claim
|
|
||||||
from lbrynet.schema.signature import Signature, NAMED_SECP256K1
|
from lbrynet.schema.signature import Signature, NAMED_SECP256K1
|
||||||
from lbrynet.schema.validator import validate_claim_id
|
from lbrynet.schema.validator import validate_claim_id
|
||||||
from lbrynet.schema.schema import V_0_0_1, CLAIM_TYPE, CLAIM_TYPES, CERTIFICATE_TYPE, VERSION
|
from lbrynet.schema.legacy_schema_v1.certificate import Certificate
|
||||||
from lbrynet.schema.schema import NIST256p, NIST384p, SECP256k1, SHA256, SHA384
|
from lbrynet.schema.legacy_schema_v1.claim import Claim
|
||||||
|
from lbrynet.schema.legacy_schema_v1 import V_0_0_1, CLAIM_TYPE, CLAIM_TYPES, CERTIFICATE_TYPE, VERSION
|
||||||
|
from lbrynet.schema.legacy_schema_v1 import NIST256p, NIST384p, SECP256k1, SHA256, SHA384
|
||||||
|
|
||||||
|
|
||||||
class NIST_ECDSASigner(object):
|
class NIST_ECDSASigner(object):
|
||||||
|
|
|
@ -13,7 +13,7 @@ from cryptography.exceptions import InvalidSignature
|
||||||
from ecdsa.util import sigencode_der
|
from ecdsa.util import sigencode_der
|
||||||
|
|
||||||
from lbrynet.schema.address import decode_address
|
from lbrynet.schema.address import decode_address
|
||||||
from lbrynet.schema.schema import NIST256p, NIST384p, SECP256k1, ECDSA_CURVES, CURVE_NAMES
|
from lbrynet.schema.legacy_schema_v1 import NIST256p, NIST384p, SECP256k1, ECDSA_CURVES, CURVE_NAMES
|
||||||
|
|
||||||
|
|
||||||
def validate_claim_id(claim_id):
|
def validate_claim_id(claim_id):
|
||||||
|
|
|
@ -16,7 +16,7 @@ from .test_data import secp256k1_private_key, claim_010_signed_secp256k1, secp25
|
||||||
from .test_data import hex_encoded_003, decoded_hex_encoded_003, malformed_secp256k1_cert
|
from .test_data import hex_encoded_003, decoded_hex_encoded_003, malformed_secp256k1_cert
|
||||||
from lbrynet import schema
|
from lbrynet import schema
|
||||||
from lbrynet.schema.claim import ClaimDict
|
from lbrynet.schema.claim import ClaimDict
|
||||||
from lbrynet.schema.schema import NIST256p, NIST384p, SECP256k1
|
from lbrynet.schema.legacy_schema_v1 import NIST256p, NIST384p, SECP256k1
|
||||||
from lbrynet.schema.legacy.migrate import migrate
|
from lbrynet.schema.legacy.migrate import migrate
|
||||||
from lbrynet.schema.signer import get_signer
|
from lbrynet.schema.signer import get_signer
|
||||||
from lbrynet.schema.uri import URI, URIParseError
|
from lbrynet.schema.uri import URI, URIParseError
|
||||||
|
|
Loading…
Reference in a new issue