Module: subscription
Subscription
Infernet Coordinator subscription representation
Public methods
Public attributes
serialized (dict[str, Any]): Serialized subscription data. owner (str): Subscription owner + recipient
Private attributes
_active_at (int): Timestamp when subscription is first active _period (int): Time, in seconds, between each subscription interval _frequency (int): Number of times a subscription is processed _redundancy (int): Number of unique nodes that can fulfill each interval _containers_hash (str): Hash of container IDs, this is keccack256 hash of comma-separated container IDs _lazy (bool): Lazy flag _verifier (str): Verifier address _payment_amount (int): Payment amount _payment_token (str): Payment token address _wallet (str): Wallet address of the subscription owner, where payments are made from
Source code in src/infernet_client/chain/subscription.py
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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
|
serialized: dict[str, Any]
property
Returns serialized subscription data.
Returns:
Type | Description |
---|---|
dict[str, Any]
|
dict[str, Any]: Serialized subscription data |
__init__(owner, active_at, period, frequency, redundancy, containers, lazy, verifier, payment_amount, payment_token, wallet)
Initializes new Subscription
Parameters:
Name | Type | Description | Default |
---|---|---|---|
owner |
str
|
Subscription owner + recipient |
required |
active_at |
int
|
Timestamp when subscription is first active |
required |
period |
int
|
Time, in seconds, between each subscription interval |
required |
frequency |
int
|
Number of times a subscription is processed |
required |
redundancy |
int
|
Number of unique nodes that can fulfill each interval |
required |
containers |
List[str]
|
List of container IDs |
required |
lazy |
bool
|
Lazy flag |
required |
verifier |
str
|
Verifier address |
required |
payment_amount |
int
|
Payment amount |
required |
payment_token |
str
|
Payment token address |
required |
wallet |
str
|
Wallet address of the subscription owner |
required |
Source code in src/infernet_client/chain/subscription.py
get_delegate_subscription_typed_data(nonce, expiry, chain_id, verifying_contract)
Generates EIP-712 typed data to sign for DelegateeSubscription
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nonce |
int
|
Delegatee signer nonce (relative to owner contract) |
required |
expiry |
int
|
Signature expiry |
required |
chain_id |
int
|
Contract chain ID (non-replayable across chains) |
required |
verifying_contract |
ChecksumAddress
|
EIP-712 signature verifying contract |
required |
Returns:
Name | Type | Description |
---|---|---|
SignableMessage |
SignableMessage
|
Typed, signable DelegateSubscription message |