@secondlayer/stacks 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,6 +102,50 @@ interface AbiContract {
102
102
  implemented_traits?: ReadonlyArray<string>;
103
103
  defined_traits?: ReadonlyArray<AbiTraitDefinition>;
104
104
  }
105
+ /** A validated Stacks principal (standard or contract). Branded so downstream
106
+ * code can require "already validated" without re-checking. */
107
+ type Principal = string & {
108
+ readonly __principal: unique symbol
109
+ };
110
+ /**
111
+ * `<contract>::<asset-name>` — the shape a fungible/non-fungible asset filter
112
+ * takes, expressed so the compiler can check it.
113
+ *
114
+ * The most common mistake in this API is passing a CONTRACT ID
115
+ * (`SP….sbtc-token`) where an asset identifier (`SP….sbtc-token::sbtc-token`)
116
+ * belongs, and the failure mode is a query that quietly returns zero rows. The
117
+ * two differ structurally by `::`, so a template-literal type catches it at the
118
+ * call site — no brand, no cast, literals just work.
119
+ *
120
+ * A value that is only known at runtime (config, env) is not narrow enough on
121
+ * purpose; run it through {@link assetId} once, which validates and narrows.
122
+ *
123
+ * Wildcard patterns (Subscriptions/Subgraphs-only) are admitted by the second arm — they
124
+ * are legitimately not full identifiers (`SPB.*`), and the runtime validator
125
+ * short-circuits on them for the same reason.
126
+ */
127
+ type AssetIdentifier = `${string}::${string}` | `${string}*${string}`;
128
+ /**
129
+ * Narrow a runtime string to an {@link AssetIdentifier}, validating it.
130
+ *
131
+ * The escape hatch for config-driven values: `assetId(process.env.ASSET!)`
132
+ * throws on a contract id instead of letting it through to a zero-row query.
133
+ */
134
+ declare function assetId(value: string): AssetIdentifier;
135
+ /** `true` for a standard (`SP…`/`ST…`) or contract (`SP….name`) principal. */
136
+ declare function isPrincipal(value: string): value is Principal;
137
+ /** Subscriptions and Subgraph sources match `*` wildcards in
138
+ * principal/identifier patterns; every
139
+ * other surface treats the value literally. */
140
+ declare function hasWildcard(value: string): boolean;
141
+ /** Throw unless `value` is a principal or a wildcard pattern. The factories
142
+ * call this so a swapped argument (asset id where a sender belongs, typo'd
143
+ * address) fails at construction — not as a silent zero-row query. */
144
+ declare function assertPrincipalish(field: string, value: string): void;
145
+ /** Throw unless `value` looks like `SP….contract::asset` (or a wildcard). */
146
+ declare function assertAssetIdentifier(field: string, value: string): void;
147
+ /** Throw unless `value` is a contract id `SP….name` (or a wildcard). */
148
+ declare function assertContractId(field: string, value: string): void;
105
149
  /** Scalar print field types (structural mirror of the subgraphs `ColumnType`). */
106
150
  type PrintScalarType = "uint" | "int" | "text" | "principal" | "boolean" | "timestamp" | "jsonb";
107
151
  /**
@@ -150,37 +194,37 @@ type TraitScope = {
150
194
  };
151
195
  interface FtTransferSpec extends TraitScope {
152
196
  type: "ft_transfer";
153
- assetIdentifier?: string;
197
+ assetIdentifier?: AssetIdentifier;
154
198
  sender?: string;
155
199
  recipient?: string;
156
200
  minAmount?: bigint;
157
201
  }
158
202
  interface FtMintSpec extends TraitScope {
159
203
  type: "ft_mint";
160
- assetIdentifier?: string;
204
+ assetIdentifier?: AssetIdentifier;
161
205
  recipient?: string;
162
206
  minAmount?: bigint;
163
207
  }
164
208
  interface FtBurnSpec extends TraitScope {
165
209
  type: "ft_burn";
166
- assetIdentifier?: string;
210
+ assetIdentifier?: AssetIdentifier;
167
211
  sender?: string;
168
212
  minAmount?: bigint;
169
213
  }
170
214
  interface NftTransferSpec extends TraitScope {
171
215
  type: "nft_transfer";
172
- assetIdentifier?: string;
216
+ assetIdentifier?: AssetIdentifier;
173
217
  sender?: string;
174
218
  recipient?: string;
175
219
  }
176
220
  interface NftMintSpec extends TraitScope {
177
221
  type: "nft_mint";
178
- assetIdentifier?: string;
222
+ assetIdentifier?: AssetIdentifier;
179
223
  recipient?: string;
180
224
  }
181
225
  interface NftBurnSpec extends TraitScope {
182
226
  type: "nft_burn";
183
- assetIdentifier?: string;
227
+ assetIdentifier?: AssetIdentifier;
184
228
  sender?: string;
185
229
  }
186
230
  interface ContractCallSpec extends TraitScope {
@@ -262,26 +306,30 @@ type ChainTriggerShape = ChainTriggerOf<ChainEventFilterSpec>;
262
306
  /** Params fragment for `index.events.*` (spread into list/walk/consume). */
263
307
  type IndexEventsParamsShape = {
264
308
  eventType: DecodedEventType
265
- contractId?: string
266
- assetIdentifier?: string
309
+ /** A spec's contract set passes through verbatim (the API takes up to 20). */
310
+ contractId?: string | readonly string[]
311
+ assetIdentifier?: AssetIdentifier
267
312
  sender?: string
268
313
  recipient?: string
269
314
  trait?: string
270
315
  };
271
316
  /** Params fragment for `index.contractCalls.*`. */
272
317
  type ContractCallsParamsShape = {
273
- contractId?: string
318
+ /** A spec's contract set passes through verbatim (the API takes up to 20). */
319
+ contractId?: string | readonly string[]
274
320
  functionName?: string
321
+ /** Populated from the spec's `caller` — the endpoint filters by tx sender,
322
+ * which is the caller. */
275
323
  sender?: string
276
324
  trait?: string
277
325
  };
278
326
  /** Params fragment for `streams.events.*`. */
279
327
  type StreamsParamsShape = {
280
328
  types: readonly DecodedEventType[]
281
- contractId?: string
329
+ contractId?: string | readonly string[]
282
330
  sender?: string
283
331
  recipient?: string
284
- assetIdentifier?: string
332
+ assetIdentifier?: AssetIdentifier
285
333
  };
286
334
  type DecodedMember = "stx_transfer" | "stx_mint" | "stx_burn" | "stx_lock" | "ft_transfer" | "ft_mint" | "ft_burn" | "nft_transfer" | "nft_mint" | "nft_burn" | "print_event";
287
335
  type ProjectionsFor<
@@ -397,22 +445,4 @@ interface OnNamespace {
397
445
  * zero-row or over-wide match.
398
446
  */
399
447
  declare const on: OnNamespace;
400
- /** A validated Stacks principal (standard or contract). Branded so downstream
401
- * code can require "already validated" without re-checking. */
402
- type Principal = string & {
403
- readonly __principal: unique symbol
404
- };
405
- /** `true` for a standard (`SP…`/`ST…`) or contract (`SP….name`) principal. */
406
- declare function isPrincipal(value: string): value is Principal;
407
- /** Subscriptions match `*` wildcards in principal/identifier patterns; every
408
- * other surface treats the value literally. */
409
- declare function hasWildcard(value: string): boolean;
410
- /** Throw unless `value` is a principal or a wildcard pattern. The factories
411
- * call this so a swapped argument (asset id where a sender belongs, typo'd
412
- * address) fails at construction — not as a silent zero-row query. */
413
- declare function assertPrincipalish(field: string, value: string): void;
414
- /** Throw unless `value` looks like `SP….contract::asset` (or a wildcard). */
415
- declare function assertAssetIdentifier(field: string, value: string): void;
416
- /** Throw unless `value` is a contract id `SP….name` (or a wildcard). */
417
- declare function assertContractId(field: string, value: string): void;
418
- export { on, makeChainEventFilter, isPrincipal, hasWildcard, fromSubgraphSource, assertPrincipalish, assertContractId, assertAssetIdentifier, SubgraphSourceSpec, SubgraphMemberType, StxTransferSpec, StxMintSpec, StxLockSpec, StxBurnSpec, StreamsParamsShape, SpecFor, SbtcWithdrawalSweptConfirmedSpec, SbtcWithdrawalRejectSpec, SbtcWithdrawalCreateSpec, SbtcWithdrawalAcceptSpec, SbtcDepositSpec, PrintScalarType, PrintFieldType, PrintEventSpec, Principal, NftTransferSpec, NftMintSpec, NftBurnSpec, IndexEventsParamsShape, FtTransferSpec, FtMintSpec, FtBurnSpec, DecodedEventType, DECODED_EVENT_TYPES, ContractDeploySpec, ContractCallsParamsShape, ContractCallSpec, ChainTriggerShape, ChainTriggerOf, ChainEventFilterType, ChainEventFilterSpec, ChainEventFilter, CHAIN_EVENT_FILTER_TYPES };
448
+ export { on, makeChainEventFilter, isPrincipal, hasWildcard, fromSubgraphSource, assetId, assertPrincipalish, assertContractId, assertAssetIdentifier, SubgraphSourceSpec, SubgraphMemberType, StxTransferSpec, StxMintSpec, StxLockSpec, StxBurnSpec, StreamsParamsShape, SpecFor, SbtcWithdrawalSweptConfirmedSpec, SbtcWithdrawalRejectSpec, SbtcWithdrawalCreateSpec, SbtcWithdrawalAcceptSpec, SbtcDepositSpec, PrintScalarType, PrintFieldType, PrintEventSpec, Principal, NftTransferSpec, NftMintSpec, NftBurnSpec, IndexEventsParamsShape, FtTransferSpec, FtMintSpec, FtBurnSpec, DecodedEventType, DECODED_EVENT_TYPES, ContractDeploySpec, ContractCallsParamsShape, ContractCallSpec, ChainTriggerShape, ChainTriggerOf, ChainEventFilterType, ChainEventFilterSpec, ChainEventFilter, CHAIN_EVENT_FILTER_TYPES, AssetIdentifier };
@@ -4,12 +4,13 @@ import {
4
4
  assertAssetIdentifier,
5
5
  assertContractId,
6
6
  assertPrincipalish,
7
+ assetId,
7
8
  fromSubgraphSource,
8
9
  hasWildcard,
9
10
  isPrincipal,
10
11
  makeChainEventFilter,
11
12
  on
12
- } from "../../shared/stacks-tqrws7kd.js";
13
+ } from "../../shared/stacks-0j16z8ev.js";
13
14
  import"../../shared/stacks-azp00pve.js";
14
15
  import"../../shared/stacks-qs5fzts5.js";
15
16
  export {
@@ -18,6 +19,7 @@ export {
18
19
  isPrincipal,
19
20
  hasWildcard,
20
21
  fromSubgraphSource,
22
+ assetId,
21
23
  assertPrincipalish,
22
24
  assertContractId,
23
25
  assertAssetIdentifier,
@@ -25,5 +27,5 @@ export {
25
27
  CHAIN_EVENT_FILTER_TYPES
26
28
  };
27
29
 
28
- //# debugId=0BF4319B462244F964756E2164756E21
30
+ //# debugId=FBE00090F020672E64756E2164756E21
29
31
  //# sourceMappingURL=index.js.map
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "0BF4319B462244F964756E2164756E21",
7
+ "debugId": "FBE00090F020672E64756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -116,6 +116,24 @@ interface AbiContract {
116
116
  implemented_traits?: ReadonlyArray<string>;
117
117
  defined_traits?: ReadonlyArray<AbiTraitDefinition>;
118
118
  }
119
+ /**
120
+ * `<contract>::<asset-name>` — the shape a fungible/non-fungible asset filter
121
+ * takes, expressed so the compiler can check it.
122
+ *
123
+ * The most common mistake in this API is passing a CONTRACT ID
124
+ * (`SP….sbtc-token`) where an asset identifier (`SP….sbtc-token::sbtc-token`)
125
+ * belongs, and the failure mode is a query that quietly returns zero rows. The
126
+ * two differ structurally by `::`, so a template-literal type catches it at the
127
+ * call site — no brand, no cast, literals just work.
128
+ *
129
+ * A value that is only known at runtime (config, env) is not narrow enough on
130
+ * purpose; run it through {@link assetId} once, which validates and narrows.
131
+ *
132
+ * Wildcard patterns (Subscriptions/Subgraphs-only) are admitted by the second arm — they
133
+ * are legitimately not full identifiers (`SPB.*`), and the runtime validator
134
+ * short-circuits on them for the same reason.
135
+ */
136
+ type AssetIdentifier = `${string}::${string}` | `${string}*${string}`;
119
137
  /** Scalar print field types (structural mirror of the subgraphs `ColumnType`). */
120
138
  type PrintScalarType = "uint" | "int" | "text" | "principal" | "boolean" | "timestamp" | "jsonb";
121
139
  /**
@@ -164,37 +182,37 @@ type TraitScope = {
164
182
  };
165
183
  interface FtTransferSpec extends TraitScope {
166
184
  type: "ft_transfer";
167
- assetIdentifier?: string;
185
+ assetIdentifier?: AssetIdentifier;
168
186
  sender?: string;
169
187
  recipient?: string;
170
188
  minAmount?: bigint;
171
189
  }
172
190
  interface FtMintSpec extends TraitScope {
173
191
  type: "ft_mint";
174
- assetIdentifier?: string;
192
+ assetIdentifier?: AssetIdentifier;
175
193
  recipient?: string;
176
194
  minAmount?: bigint;
177
195
  }
178
196
  interface FtBurnSpec extends TraitScope {
179
197
  type: "ft_burn";
180
- assetIdentifier?: string;
198
+ assetIdentifier?: AssetIdentifier;
181
199
  sender?: string;
182
200
  minAmount?: bigint;
183
201
  }
184
202
  interface NftTransferSpec extends TraitScope {
185
203
  type: "nft_transfer";
186
- assetIdentifier?: string;
204
+ assetIdentifier?: AssetIdentifier;
187
205
  sender?: string;
188
206
  recipient?: string;
189
207
  }
190
208
  interface NftMintSpec extends TraitScope {
191
209
  type: "nft_mint";
192
- assetIdentifier?: string;
210
+ assetIdentifier?: AssetIdentifier;
193
211
  recipient?: string;
194
212
  }
195
213
  interface NftBurnSpec extends TraitScope {
196
214
  type: "nft_burn";
197
- assetIdentifier?: string;
215
+ assetIdentifier?: AssetIdentifier;
198
216
  sender?: string;
199
217
  }
200
218
  interface ContractCallSpec extends TraitScope {
@@ -263,26 +281,30 @@ type ChainTriggerOf<S> = { [K in keyof Omit<S, "abi" | "prints">] : Exclude<S[K]
263
281
  /** Params fragment for `index.events.*` (spread into list/walk/consume). */
264
282
  type IndexEventsParamsShape = {
265
283
  eventType: DecodedEventType
266
- contractId?: string
267
- assetIdentifier?: string
284
+ /** A spec's contract set passes through verbatim (the API takes up to 20). */
285
+ contractId?: string | readonly string[]
286
+ assetIdentifier?: AssetIdentifier
268
287
  sender?: string
269
288
  recipient?: string
270
289
  trait?: string
271
290
  };
272
291
  /** Params fragment for `index.contractCalls.*`. */
273
292
  type ContractCallsParamsShape = {
274
- contractId?: string
293
+ /** A spec's contract set passes through verbatim (the API takes up to 20). */
294
+ contractId?: string | readonly string[]
275
295
  functionName?: string
296
+ /** Populated from the spec's `caller` — the endpoint filters by tx sender,
297
+ * which is the caller. */
276
298
  sender?: string
277
299
  trait?: string
278
300
  };
279
301
  /** Params fragment for `streams.events.*`. */
280
302
  type StreamsParamsShape = {
281
303
  types: readonly DecodedEventType[]
282
- contractId?: string
304
+ contractId?: string | readonly string[]
283
305
  sender?: string
284
306
  recipient?: string
285
- assetIdentifier?: string
307
+ assetIdentifier?: AssetIdentifier
286
308
  };
287
309
  type DecodedMember = "stx_transfer" | "stx_mint" | "stx_burn" | "stx_lock" | "ft_transfer" | "ft_mint" | "ft_burn" | "nft_transfer" | "nft_mint" | "nft_burn" | "print_event";
288
310
  type ProjectionsFor<
@@ -116,6 +116,24 @@ interface AbiContract {
116
116
  implemented_traits?: ReadonlyArray<string>;
117
117
  defined_traits?: ReadonlyArray<AbiTraitDefinition>;
118
118
  }
119
+ /**
120
+ * `<contract>::<asset-name>` — the shape a fungible/non-fungible asset filter
121
+ * takes, expressed so the compiler can check it.
122
+ *
123
+ * The most common mistake in this API is passing a CONTRACT ID
124
+ * (`SP….sbtc-token`) where an asset identifier (`SP….sbtc-token::sbtc-token`)
125
+ * belongs, and the failure mode is a query that quietly returns zero rows. The
126
+ * two differ structurally by `::`, so a template-literal type catches it at the
127
+ * call site — no brand, no cast, literals just work.
128
+ *
129
+ * A value that is only known at runtime (config, env) is not narrow enough on
130
+ * purpose; run it through {@link assetId} once, which validates and narrows.
131
+ *
132
+ * Wildcard patterns (Subscriptions/Subgraphs-only) are admitted by the second arm — they
133
+ * are legitimately not full identifiers (`SPB.*`), and the runtime validator
134
+ * short-circuits on them for the same reason.
135
+ */
136
+ type AssetIdentifier = `${string}::${string}` | `${string}*${string}`;
119
137
  /** Scalar print field types (structural mirror of the subgraphs `ColumnType`). */
120
138
  type PrintScalarType = "uint" | "int" | "text" | "principal" | "boolean" | "timestamp" | "jsonb";
121
139
  /**
@@ -164,37 +182,37 @@ type TraitScope = {
164
182
  };
165
183
  interface FtTransferSpec extends TraitScope {
166
184
  type: "ft_transfer";
167
- assetIdentifier?: string;
185
+ assetIdentifier?: AssetIdentifier;
168
186
  sender?: string;
169
187
  recipient?: string;
170
188
  minAmount?: bigint;
171
189
  }
172
190
  interface FtMintSpec extends TraitScope {
173
191
  type: "ft_mint";
174
- assetIdentifier?: string;
192
+ assetIdentifier?: AssetIdentifier;
175
193
  recipient?: string;
176
194
  minAmount?: bigint;
177
195
  }
178
196
  interface FtBurnSpec extends TraitScope {
179
197
  type: "ft_burn";
180
- assetIdentifier?: string;
198
+ assetIdentifier?: AssetIdentifier;
181
199
  sender?: string;
182
200
  minAmount?: bigint;
183
201
  }
184
202
  interface NftTransferSpec extends TraitScope {
185
203
  type: "nft_transfer";
186
- assetIdentifier?: string;
204
+ assetIdentifier?: AssetIdentifier;
187
205
  sender?: string;
188
206
  recipient?: string;
189
207
  }
190
208
  interface NftMintSpec extends TraitScope {
191
209
  type: "nft_mint";
192
- assetIdentifier?: string;
210
+ assetIdentifier?: AssetIdentifier;
193
211
  recipient?: string;
194
212
  }
195
213
  interface NftBurnSpec extends TraitScope {
196
214
  type: "nft_burn";
197
- assetIdentifier?: string;
215
+ assetIdentifier?: AssetIdentifier;
198
216
  sender?: string;
199
217
  }
200
218
  interface ContractCallSpec extends TraitScope {
@@ -263,26 +281,30 @@ type ChainTriggerOf<S> = { [K in keyof Omit<S, "abi" | "prints">] : Exclude<S[K]
263
281
  /** Params fragment for `index.events.*` (spread into list/walk/consume). */
264
282
  type IndexEventsParamsShape = {
265
283
  eventType: DecodedEventType
266
- contractId?: string
267
- assetIdentifier?: string
284
+ /** A spec's contract set passes through verbatim (the API takes up to 20). */
285
+ contractId?: string | readonly string[]
286
+ assetIdentifier?: AssetIdentifier
268
287
  sender?: string
269
288
  recipient?: string
270
289
  trait?: string
271
290
  };
272
291
  /** Params fragment for `index.contractCalls.*`. */
273
292
  type ContractCallsParamsShape = {
274
- contractId?: string
293
+ /** A spec's contract set passes through verbatim (the API takes up to 20). */
294
+ contractId?: string | readonly string[]
275
295
  functionName?: string
296
+ /** Populated from the spec's `caller` — the endpoint filters by tx sender,
297
+ * which is the caller. */
276
298
  sender?: string
277
299
  trait?: string
278
300
  };
279
301
  /** Params fragment for `streams.events.*`. */
280
302
  type StreamsParamsShape = {
281
303
  types: readonly DecodedEventType[]
282
- contractId?: string
304
+ contractId?: string | readonly string[]
283
305
  sender?: string
284
306
  recipient?: string
285
- assetIdentifier?: string
307
+ assetIdentifier?: AssetIdentifier
286
308
  };
287
309
  type DecodedMember = "stx_transfer" | "stx_mint" | "stx_burn" | "stx_lock" | "ft_transfer" | "ft_mint" | "ft_burn" | "nft_transfer" | "nft_mint" | "nft_burn" | "print_event";
288
310
  type ProjectionsFor<
package/dist/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  on
3
- } from "../shared/stacks-tqrws7kd.js";
3
+ } from "../shared/stacks-0j16z8ev.js";
4
4
  import {
5
5
  providerToAccount
6
6
  } from "../shared/stacks-qcae5852.js";
@@ -8,18 +8,13 @@ __export(exports_pox, {
8
8
  burnHeightToRewardCycle: () => burnHeightToRewardCycle,
9
9
  POX_CONTRACTS: () => POX_CONTRACTS,
10
10
  POX_ADDRESS_VERSION: () => POX_ADDRESS_VERSION,
11
+ POX_ABI: () => POX_ABI,
11
12
  MIN_LOCK_PERIOD: () => MIN_LOCK_PERIOD,
12
13
  MAX_LOCK_PERIOD: () => MAX_LOCK_PERIOD
13
14
  });
14
15
  module.exports = __toCommonJS(exports_pox);
15
16
 
16
17
  // src/pox/abi.ts
17
- var poxAddressTuple = {
18
- tuple: [
19
- { name: "version", type: { buff: { length: 1 } } },
20
- { name: "hashbytes", type: { buff: { length: 32 } } }
21
- ]
22
- };
23
18
  var POX_ABI = {
24
19
  functions: [
25
20
  {
@@ -49,7 +44,15 @@ var POX_ABI = {
49
44
  outputs: {
50
45
  optional: {
51
46
  tuple: [
52
- { name: "pox-addr", type: poxAddressTuple },
47
+ {
48
+ name: "pox-addr",
49
+ type: {
50
+ tuple: [
51
+ { name: "version", type: { buff: { length: 1 } } },
52
+ { name: "hashbytes", type: { buff: { length: 32 } } }
53
+ ]
54
+ }
55
+ },
53
56
  { name: "lock-period", type: "uint128" },
54
57
  { name: "first-reward-cycle", type: "uint128" },
55
58
  {
@@ -71,7 +74,17 @@ var POX_ABI = {
71
74
  { name: "amount-ustx", type: "uint128" },
72
75
  { name: "delegated-to", type: "principal" },
73
76
  { name: "until-burn-ht", type: { optional: "uint128" } },
74
- { name: "pox-addr", type: { optional: poxAddressTuple } }
77
+ {
78
+ name: "pox-addr",
79
+ type: {
80
+ optional: {
81
+ tuple: [
82
+ { name: "version", type: { buff: { length: 1 } } },
83
+ { name: "hashbytes", type: { buff: { length: 32 } } }
84
+ ]
85
+ }
86
+ }
87
+ }
75
88
  ]
76
89
  }
77
90
  }
@@ -80,7 +93,15 @@ var POX_ABI = {
80
93
  name: "can-stack-stx",
81
94
  access: "read-only",
82
95
  args: [
83
- { name: "pox-addr", type: poxAddressTuple },
96
+ {
97
+ name: "pox-addr",
98
+ type: {
99
+ tuple: [
100
+ { name: "version", type: { buff: { length: 1 } } },
101
+ { name: "hashbytes", type: { buff: { length: 32 } } }
102
+ ]
103
+ }
104
+ },
84
105
  { name: "amount-ustx", type: "uint128" },
85
106
  { name: "first-reward-cycle", type: "uint128" },
86
107
  { name: "num-cycles", type: "uint128" }
@@ -92,7 +113,15 @@ var POX_ABI = {
92
113
  access: "public",
93
114
  args: [
94
115
  { name: "amount-ustx", type: "uint128" },
95
- { name: "pox-addr", type: poxAddressTuple },
116
+ {
117
+ name: "pox-addr",
118
+ type: {
119
+ tuple: [
120
+ { name: "version", type: { buff: { length: 1 } } },
121
+ { name: "hashbytes", type: { buff: { length: 32 } } }
122
+ ]
123
+ }
124
+ },
96
125
  { name: "start-burn-ht", type: "uint128" },
97
126
  { name: "lock-period", type: "uint128" },
98
127
  {
@@ -124,7 +153,17 @@ var POX_ABI = {
124
153
  { name: "amount-ustx", type: "uint128" },
125
154
  { name: "delegate-to", type: "principal" },
126
155
  { name: "until-burn-ht", type: { optional: "uint128" } },
127
- { name: "pox-addr", type: { optional: poxAddressTuple } }
156
+ {
157
+ name: "pox-addr",
158
+ type: {
159
+ optional: {
160
+ tuple: [
161
+ { name: "version", type: { buff: { length: 1 } } },
162
+ { name: "hashbytes", type: { buff: { length: 32 } } }
163
+ ]
164
+ }
165
+ }
166
+ }
128
167
  ],
129
168
  outputs: { response: { ok: "bool", error: "int128" } }
130
169
  },
@@ -140,7 +179,17 @@ var POX_ABI = {
140
179
  { name: "amount-ustx", type: "uint128" },
141
180
  { name: "delegated-to", type: "principal" },
142
181
  { name: "until-burn-ht", type: { optional: "uint128" } },
143
- { name: "pox-addr", type: { optional: poxAddressTuple } }
182
+ {
183
+ name: "pox-addr",
184
+ type: {
185
+ optional: {
186
+ tuple: [
187
+ { name: "version", type: { buff: { length: 1 } } },
188
+ { name: "hashbytes", type: { buff: { length: 32 } } }
189
+ ]
190
+ }
191
+ }
192
+ }
144
193
  ]
145
194
  }
146
195
  },
@@ -153,7 +202,15 @@ var POX_ABI = {
153
202
  access: "public",
154
203
  args: [
155
204
  { name: "extend-count", type: "uint128" },
156
- { name: "pox-addr", type: poxAddressTuple },
205
+ {
206
+ name: "pox-addr",
207
+ type: {
208
+ tuple: [
209
+ { name: "version", type: { buff: { length: 1 } } },
210
+ { name: "hashbytes", type: { buff: { length: 32 } } }
211
+ ]
212
+ }
213
+ },
157
214
  {
158
215
  name: "signer-sig",
159
216
  type: { optional: { buff: { length: 65 } } }
@@ -447,5 +504,5 @@ function pox() {
447
504
  });
448
505
  }
449
506
 
450
- //# debugId=690246EFCDC2A66B64756E2164756E21
507
+ //# debugId=6A5F5DD3CC1B75FC64756E2164756E21
451
508
  //# sourceMappingURL=index.cjs.map