Ejemplo n.º 1
0
 def __init__(self):
     super(GetTransactionsToApproveResponseFilter, self).__init__({
         'branchTransaction':
         f.ByteString(encoding='ascii') | Trytes(TransactionHash),
         'trunkTransaction':
         f.ByteString(encoding='ascii') | Trytes(TransactionHash),
     })
Ejemplo n.º 2
0
    def __init__(self):
        super(GetNodeInfoResponseFilter, self).__init__({
            'latestMilestone':
                f.ByteString(encoding='ascii') | Trytes(TransactionHash),

            'latestSolidSubtangleMilestone':
                f.ByteString(encoding='ascii') | Trytes(TransactionHash),
        })
Ejemplo n.º 3
0
    def __init__(self):
        super(AttachToTangleRequestFilter, self).__init__({
            'branchTransaction':
            f.Required | Trytes(TransactionHash),
            'trunkTransaction':
            f.Required | Trytes(TransactionHash),
            'trytes':
            f.Required | f.Array | f.FilterRepeater(
                f.Required | Trytes(result_type=TransactionTrytes), ),

            # Loosely-validated; testnet nodes require a different value
            # than mainnet.
            'minWeightMagnitude':
            f.Required | f.Type(int) | f.Min(1),
        })
Ejemplo n.º 4
0
    def __init__(self):
        super(GetBalancesResponseFilter, self).__init__({
            'balances': f.Array | f.FilterRepeater(f.Int),

            'milestone':
                f.ByteString(encoding='ascii') | Trytes(Address),
        })
Ejemplo n.º 5
0
 def __init__(self):
     super(BroadcastTransactionsRequestFilter, self).__init__({
         'trytes':
         f.Required | f.Array | f.FilterRepeater(
             f.Required | Trytes(TransactionTrytes)
             | f.Unicode(encoding='ascii', normalize=False), ),
     })
Ejemplo n.º 6
0
 def __init__(self):
     super(FindTransactionsResponseFilter, self).__init__({
         'hashes':
             f.FilterRepeater(
                 f.ByteString(encoding='ascii') |
                 Trytes(TransactionHash)
             ) |
             f.Optional(default=[]),
     })
    def __init__(self):
        super(PromoteTransactionRequestFilter, self).__init__({
            'depth': f.Required | f.Type(int) | f.Min(1),
            'transaction': f.Required | Trytes(TransactionHash),

            # Loosely-validated; testnet nodes require a different value
            # than mainnet.
            'minWeightMagnitude': f.Required | f.Type(int) | f.Min(1),
        })
Ejemplo n.º 8
0
 def __init__(self):
     super(GetTransactionsToApproveRequestFilter, self).__init__(
         {
             'depth': f.Required | f.Type(int) | f.Min(1),
             'reference': Trytes(result_type=TransactionHash),
         },
         allow_missing_keys={
             'reference',
         })
Ejemplo n.º 9
0
    def __init__(self):
        super(SendTrytesRequestFilter, self).__init__(
            {
                'depth':
                f.Required | f.Type(int) | f.Min(1),
                'trytes':
                f.Required | f.Array
                | f.FilterRepeater(f.Required | Trytes(TransactionTrytes), ),

                # Loosely-validated; testnet nodes require a different value
                # than mainnet.
                'minWeightMagnitude':
                f.Required | f.Type(int) | f.Min(1),
                'reference':
                Trytes(TransactionHash),
            },
            allow_missing_keys={
                'reference',
            })
    def __init__(self):
        super(GetInclusionStatesRequestFilter, self).__init__(
            {
                # Required parameters.
                'transactions':
                f.Required | f.Array | f.FilterRepeater(
                    f.Required | Trytes(TransactionHash)
                    | f.Unicode(encoding='ascii', normalize=False), ),

                # Optional parameters.
                'tips':
                f.Array | f.FilterRepeater(
                    f.Required | Trytes(TransactionHash)
                    | f.Unicode(encoding='ascii', normalize=False), )
                | f.Optional(default=[]),
            },
            allow_missing_keys={
                'tips',
            },
        )
Ejemplo n.º 11
0
 def __init__(self):
     super(IsReattachableRequestFilter, self).__init__(
         {
             'addresses':
                 f.Required | f.Array | f.FilterRepeater(
                     f.Required |
                     Trytes(Address) |
                     f.Unicode(encoding='ascii', normalize=False),
                 ),
         },
     )
Ejemplo n.º 12
0
    def __init__(self):
        super(FindTransactionsRequestFilter, self).__init__(
            {
                'addresses':
                    f.Array | f.FilterRepeater(
                        f.Required |
                        AddressNoChecksum() |
                        f.Unicode(encoding='ascii', normalize=False),
                    ),

                'approvees':
                    f.Array | f.FilterRepeater(
                        f.Required |
                        Trytes(TransactionHash) |
                        f.Unicode(encoding='ascii', normalize=False),
                    ),

                'bundles':
                    f.Array | f.FilterRepeater(
                        f.Required |
                        Trytes(BundleHash) |
                        f.Unicode(encoding='ascii', normalize=False),
                    ),

                'tags':
                    f.Array | f.FilterRepeater(
                        f.Required |
                        Trytes(Tag) |
                        f.Unicode(encoding='ascii', normalize=False),
                    ),
            },

            # Technically, all of the parameters for this command are
            # optional, so long as at least one of them is present and
            # not empty.
            allow_missing_keys=True,
        )
Ejemplo n.º 13
0
    def __init__(self):
        super(GetAccountDataRequestFilter, self).__init__(
            {
                # Required parameters.
                'seed': f.Required | Trytes(Seed),

                # Optional parameters.
                'stop': f.Type(int) | f.Min(0),
                'start': f.Type(int) | f.Min(0) | f.Optional(0),
                'inclusionStates': f.Type(bool) | f.Optional(False),
                'security_level': SecurityLevel
            },
            allow_missing_keys={
                'stop', 'start', 'inclusionStates', 'security_level'
            },
        )
Ejemplo n.º 14
0
    def __init__(self):
        super(GetTransfersRequestFilter, self).__init__(
            {
                # Required parameters.
                'seed': f.Required | Trytes(Seed),

                # Optional parameters.
                'stop': f.Type(int) | f.Min(0),
                'start': f.Type(int) | f.Min(0) | f.Optional(0),
                'inclusionStates': f.Type(bool) | f.Optional(False),
            },
            allow_missing_keys={
                'stop',
                'inclusionStates',
                'start',
            },
        )
Ejemplo n.º 15
0
    def __init__(self):
        super(GetDigestsRequestFilter, self).__init__(
            {
                # Optional Parameters
                'count': f.Type(int) | f.Min(1) | f.Optional(default=1),
                'index': f.Type(int) | f.Min(0) | f.Optional(default=0),
                'securityLevel': SecurityLevel,

                # Required Parameters
                'seed': f.Required | Trytes(Seed),
            },
            allow_missing_keys={
                'count',
                'index',
                'securityLevel',
            },
        )
Ejemplo n.º 16
0
    def __init__(self):
        super(GetNewAddressesRequestFilter, self).__init__(
            {
                # Everything except ``seed`` is optional.
                'checksum': f.Type(bool) | f.Optional(default=False),
                'count': f.Type(int) | f.Min(1),
                'index': f.Type(int) | f.Min(0) | f.Optional(default=0),
                'securityLevel': SecurityLevel,

                'seed': f.Required | Trytes(Seed),
            },

            allow_missing_keys={
                'checksum',
                'count',
                'index',
                'securityLevel',
            },
        )
Ejemplo n.º 17
0
    def __init__(self):
        super(GetInputsRequestFilter, self).__init__(
            {
                # These arguments are optional.
                'stop': f.Type(int) | f.Min(0),
                'start': f.Type(int) | f.Min(0) | f.Optional(0),
                'threshold': f.Type(int) | f.Min(0),

                'securityLevel': SecurityLevel,

                # These arguments are required.
                'seed': f.Required | Trytes(Seed),
            },

            allow_missing_keys={
                'stop',
                'start',
                'threshold',
                'securityLevel',
            }
        )
 def __init__(self):
     super(CreateMultisigAddressRequestFilter, self).__init__({
         'digests':
         f.Required | f.Array
         | f.FilterRepeater(f.Required | Trytes(Digest), ),
     })
Ejemplo n.º 19
0
 def __init__(self):
     super(GetBundlesRequestFilter, self).__init__({
         'transaction':
         f.Required | Trytes(TransactionHash),
     })
 def __init__(self):
     super(GetLatestInclusionRequestFilter, self).__init__({
         'hashes':
         f.Required | f.Array
         | f.FilterRepeater(f.Required | Trytes(TransactionHash), ),
     })
Ejemplo n.º 21
0
 def __init__(self):
     super(AttachToTangleResponseFilter, self).__init__({
         'trytes':
         f.FilterRepeater(
             f.ByteString(encoding='ascii') | Trytes(TransactionTrytes), ),
     })
Ejemplo n.º 22
0
 def __init__(self):
     super(CheckConsistencyRequestFilter, self).__init__({
         'tails':
         f.Required | f.Array
         | f.FilterRepeater(f.Required | Trytes(TransactionHash)),
     })