@aromedia/contracts-sdk 0.2.0 → 1.0.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.
Files changed (42) hide show
  1. package/dist/chains.d.cts +10 -0
  2. package/dist/chains.d.ts +10 -0
  3. package/dist/{chunk-7I5N3BGV.js → chunk-BENMJNYO.js} +3 -3
  4. package/dist/chunk-BENMJNYO.js.map +1 -0
  5. package/dist/{chunk-TZQHQLNY.js → chunk-EGUPIYHR.js} +2242 -199
  6. package/dist/chunk-EGUPIYHR.js.map +1 -0
  7. package/dist/{chunk-BYPGUFYV.js → chunk-VUYKYCOD.js} +1 -1
  8. package/dist/chunk-VUYKYCOD.js.map +1 -0
  9. package/dist/{chunk-FWZ7XKFC.js → chunk-WUHQC3GY.js} +22 -12
  10. package/dist/chunk-WUHQC3GY.js.map +1 -0
  11. package/dist/generated/abis.cjs +2245 -200
  12. package/dist/generated/abis.cjs.map +1 -1
  13. package/dist/generated/abis.d.cts +6046 -2916
  14. package/dist/generated/abis.d.ts +6046 -2916
  15. package/dist/generated/abis.js +7 -3
  16. package/dist/generated/addresses.cjs +21 -11
  17. package/dist/generated/addresses.cjs.map +1 -1
  18. package/dist/generated/addresses.js +1 -1
  19. package/dist/hooks/index.cjs +307 -27
  20. package/dist/hooks/index.cjs.map +1 -1
  21. package/dist/hooks/index.d.cts +46 -5
  22. package/dist/hooks/index.d.ts +46 -5
  23. package/dist/hooks/index.js +7 -3
  24. package/dist/hooks/index.js.map +1 -1
  25. package/dist/index.cjs +2421 -313
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +132 -14
  28. package/dist/index.d.ts +132 -14
  29. package/dist/index.js +60 -7
  30. package/dist/index.js.map +1 -1
  31. package/dist/{onboarding-DxL_LpM3.d.ts → onboarding-BD_g7Len.d.ts} +64 -9
  32. package/dist/{onboarding-BHpAJaNW.d.cts → onboarding-DDKwXy8O.d.cts} +64 -9
  33. package/dist/workflows/index.cjs +282 -17
  34. package/dist/workflows/index.cjs.map +1 -1
  35. package/dist/workflows/index.d.cts +1 -1
  36. package/dist/workflows/index.d.ts +1 -1
  37. package/dist/workflows/index.js +3 -3
  38. package/package.json +1 -1
  39. package/dist/chunk-7I5N3BGV.js.map +0 -1
  40. package/dist/chunk-BYPGUFYV.js.map +0 -1
  41. package/dist/chunk-FWZ7XKFC.js.map +0 -1
  42. package/dist/chunk-TZQHQLNY.js.map +0 -1
@@ -2,7 +2,15 @@ import { PublicClient, WalletClient, GetContractReturnType, Chain, Transport, Ac
2
2
  import { AroChainId } from './generated/addresses.js';
3
3
  import { AroMediaAccessManager_ABI, AroMediaAssetsRegistry_ABI, ForcedTransferManager_ABI, AroMediaIncMultiSig_ABI, AroNomination_ABI, AroMediaRWA_ABI, AroSBT_ABI } from './generated/abis.js';
4
4
 
5
- /** Mirrors AroSBT.Tier. */
5
+ /**
6
+ * Conventional default tier labels for AroSBT membership.
7
+ *
8
+ * On-chain, the SBT's `tier` is now an opaque `uint256` whose semantics
9
+ * are defined off-chain by the admin backend (no on-chain logic branches
10
+ * on it). These enum values are the conventional defaults the dapp
11
+ * displays when no off-chain override is available; new tier ids can be
12
+ * introduced server-side without a contract upgrade or SDK release.
13
+ */
6
14
  declare enum AroTier {
7
15
  STANDARD = 0,
8
16
  VERIFIED = 1,
@@ -10,13 +18,19 @@ declare enum AroTier {
10
18
  FOUNDING = 3
11
19
  }
12
20
  declare const AroTierLabels: Record<AroTier, string>;
13
- /** Mirrors AroNomination.NominationStatus. */
21
+ /**
22
+ * @deprecated Mirrors AroNomination.NominationStatus. The on-chain
23
+ * nomination flow is being retired in favor of an admin-portal backend
24
+ * flow (see the AroNomination_ABI deprecation). New consumers should
25
+ * read status from the admin portal API instead.
26
+ */
14
27
  declare enum NominationStatus {
15
28
  NONE = 0,
16
29
  PENDING = 1,
17
30
  APPROVED = 2,
18
31
  CLEARED = 3
19
32
  }
33
+ /** @deprecated See NominationStatus. */
20
34
  declare const NominationStatusLabels: Record<NominationStatus, string>;
21
35
  /** Mirrors ForcedTransferManager.ForcedTransferStatus. */
22
36
  declare enum ForcedTransferStatus {
@@ -187,11 +201,22 @@ declare function createAroSdk(opts: CreateAroSdkOpts): AroSdk;
187
201
  declare function addressesFor(chainId: AroChainId): Record<keyof AroAddressOverrides, `0x${string}`>;
188
202
 
189
203
  /**
190
- * Onboarding workflow helpers. These wrap multi-call sequences from the
191
- * ARO KYC/AML/CFT Policy §6 so the dapp does not have to re-implement the
192
- * choreography in three different places.
204
+ * Onboarding workflow helpers.
205
+ *
206
+ * STATUS: The on-chain nomination + admin-mint helpers below are
207
+ * @deprecated and slated for removal in a future major release. The
208
+ * nomination flow has moved to the admin backend (see the admin portal's
209
+ * /access-control + onboarding API), and SBT minting is now
210
+ * candidate-triggered against an EIP-712 voucher
211
+ * (`AroSBT.mintWithApproval`; see `../utils/mintApproval.ts` and
212
+ * `../hooks/useAroSBT.ts::useMintWithApproval`). The on-chain
213
+ * `AroNomination` contract is retained on Sepolia for compatibility but
214
+ * is no longer deployed to new networks.
215
+ *
216
+ * Status-read helpers (`checkMembershipStatus`, `describeOnboardingState`)
217
+ * remain useful regardless of the underlying flow and are NOT deprecated.
193
218
  *
194
- * Mental model (per Policy §6.3):
219
+ * Original mental model (kept for reference; pre-migration):
195
220
  *
196
221
  * 1. Existing member calls `nominateCandidate(candidate)`.
197
222
  * The nominator's vouch counts as the first vouch automatically.
@@ -216,7 +241,12 @@ declare function addressesFor(chainId: AroChainId): Record<keyof AroAddressOverr
216
241
  */
217
242
  interface MembershipStatus {
218
243
  hasSBT: boolean;
219
- tier?: AroTier;
244
+ /**
245
+ * Opaque tier id (uint256) as returned by AroSBT.getMemberData. Compare
246
+ * with `tierLabel`, `tierAtLeast`, or the AroTier enum values for the
247
+ * conventional defaults; semantics live off-chain in the admin backend.
248
+ */
249
+ tier?: bigint;
220
250
  tokenId?: bigint;
221
251
  memberId?: bigint;
222
252
  issuanceDate?: bigint;
@@ -246,9 +276,16 @@ interface NominationSnapshot {
246
276
  /**
247
277
  * Snapshot of the candidate's progress through the vouch flow. The dapp
248
278
  * shows this as "you need N more vouches" in the onboarding UI.
279
+ *
280
+ * @deprecated On-chain nomination is retired. Read this status from the
281
+ * admin portal's onboarding API instead. Removal planned in a future
282
+ * major release.
249
283
  */
250
284
  declare function getNominationSnapshot(sdk: AroSdk, candidate: `0x${string}`): Promise<NominationSnapshot>;
251
285
  /**
286
+ * @deprecated On-chain nomination is retired. Use the admin portal's
287
+ * onboarding API instead. Removal planned in a future major release.
288
+ *
252
289
  * Send `nominate(candidate)` from the connected wallet. The contract
253
290
  * gates this behind "caller must already be an SBT holder"; we surface
254
291
  * the right user-facing message via `AroContractError`.
@@ -256,10 +293,17 @@ declare function getNominationSnapshot(sdk: AroSdk, candidate: `0x${string}`): P
256
293
  declare function nominateCandidate(sdk: AroSdk, candidate: `0x${string}`, opts?: {
257
294
  account?: Account | `0x${string}`;
258
295
  }): Promise<Hex>;
296
+ /**
297
+ * @deprecated On-chain vouching is retired. Use the admin portal's
298
+ * onboarding API instead. Removal planned in a future major release.
299
+ */
259
300
  declare function vouchForCandidate(sdk: AroSdk, candidate: `0x${string}`, opts?: {
260
301
  account?: Account | `0x${string}`;
261
302
  }): Promise<Hex>;
262
303
  /**
304
+ * @deprecated On-chain nomination is retired. The admin portal handles
305
+ * rejections in its backend. Removal planned in a future major release.
306
+ *
263
307
  * Admin path: clear (reject) a nomination. Restricted to authorized roles
264
308
  * via AccessManager; will revert with AccessManagedUnauthorized if the
265
309
  * caller lacks the role.
@@ -273,11 +317,22 @@ interface MintSBTOpts {
273
317
  kycHash: `0x${string}`;
274
318
  /** Off-chain profile metadata URI (ipfs://... or https://...). */
275
319
  metadataURI: string;
276
- /** Initial tier (defaults to STANDARD per Policy §6.1). */
277
- tier?: AroTier;
320
+ /**
321
+ * Initial tier id (opaque uint256; defaults to 0 / "Standard"). Accepts
322
+ * AroTier enum values for the conventional defaults, or any bigint id
323
+ * defined off-chain by the admin backend.
324
+ */
325
+ tier?: bigint | AroTier;
278
326
  account?: Account | `0x${string}`;
279
327
  }
280
328
  /**
329
+ * @deprecated SBT minting is now candidate-triggered against an EIP-712
330
+ * voucher (`AroSBT.mintWithApproval`). The admin backend issues vouchers
331
+ * via `signMintApproval` in `../utils/mintApproval`, and the candidate
332
+ * submits via the `useMintWithApproval` hook in `../hooks/useAroSBT`.
333
+ * The direct admin mint below remains gated by ROLE_MINTER but is the
334
+ * legacy path; removal planned in a future major release.
335
+ *
281
336
  * Admin-only: mint the SBT for an approved candidate. The contract gates
282
337
  * this behind ROLE_MINTER via AccessManager (per AroMediaAccessManager).
283
338
  *
@@ -2,7 +2,15 @@ import { PublicClient, WalletClient, GetContractReturnType, Chain, Transport, Ac
2
2
  import { AroChainId } from './generated/addresses.cjs';
3
3
  import { AroMediaAccessManager_ABI, AroMediaAssetsRegistry_ABI, ForcedTransferManager_ABI, AroMediaIncMultiSig_ABI, AroNomination_ABI, AroMediaRWA_ABI, AroSBT_ABI } from './generated/abis.cjs';
4
4
 
5
- /** Mirrors AroSBT.Tier. */
5
+ /**
6
+ * Conventional default tier labels for AroSBT membership.
7
+ *
8
+ * On-chain, the SBT's `tier` is now an opaque `uint256` whose semantics
9
+ * are defined off-chain by the admin backend (no on-chain logic branches
10
+ * on it). These enum values are the conventional defaults the dapp
11
+ * displays when no off-chain override is available; new tier ids can be
12
+ * introduced server-side without a contract upgrade or SDK release.
13
+ */
6
14
  declare enum AroTier {
7
15
  STANDARD = 0,
8
16
  VERIFIED = 1,
@@ -10,13 +18,19 @@ declare enum AroTier {
10
18
  FOUNDING = 3
11
19
  }
12
20
  declare const AroTierLabels: Record<AroTier, string>;
13
- /** Mirrors AroNomination.NominationStatus. */
21
+ /**
22
+ * @deprecated Mirrors AroNomination.NominationStatus. The on-chain
23
+ * nomination flow is being retired in favor of an admin-portal backend
24
+ * flow (see the AroNomination_ABI deprecation). New consumers should
25
+ * read status from the admin portal API instead.
26
+ */
14
27
  declare enum NominationStatus {
15
28
  NONE = 0,
16
29
  PENDING = 1,
17
30
  APPROVED = 2,
18
31
  CLEARED = 3
19
32
  }
33
+ /** @deprecated See NominationStatus. */
20
34
  declare const NominationStatusLabels: Record<NominationStatus, string>;
21
35
  /** Mirrors ForcedTransferManager.ForcedTransferStatus. */
22
36
  declare enum ForcedTransferStatus {
@@ -187,11 +201,22 @@ declare function createAroSdk(opts: CreateAroSdkOpts): AroSdk;
187
201
  declare function addressesFor(chainId: AroChainId): Record<keyof AroAddressOverrides, `0x${string}`>;
188
202
 
189
203
  /**
190
- * Onboarding workflow helpers. These wrap multi-call sequences from the
191
- * ARO KYC/AML/CFT Policy §6 so the dapp does not have to re-implement the
192
- * choreography in three different places.
204
+ * Onboarding workflow helpers.
205
+ *
206
+ * STATUS: The on-chain nomination + admin-mint helpers below are
207
+ * @deprecated and slated for removal in a future major release. The
208
+ * nomination flow has moved to the admin backend (see the admin portal's
209
+ * /access-control + onboarding API), and SBT minting is now
210
+ * candidate-triggered against an EIP-712 voucher
211
+ * (`AroSBT.mintWithApproval`; see `../utils/mintApproval.ts` and
212
+ * `../hooks/useAroSBT.ts::useMintWithApproval`). The on-chain
213
+ * `AroNomination` contract is retained on Sepolia for compatibility but
214
+ * is no longer deployed to new networks.
215
+ *
216
+ * Status-read helpers (`checkMembershipStatus`, `describeOnboardingState`)
217
+ * remain useful regardless of the underlying flow and are NOT deprecated.
193
218
  *
194
- * Mental model (per Policy §6.3):
219
+ * Original mental model (kept for reference; pre-migration):
195
220
  *
196
221
  * 1. Existing member calls `nominateCandidate(candidate)`.
197
222
  * The nominator's vouch counts as the first vouch automatically.
@@ -216,7 +241,12 @@ declare function addressesFor(chainId: AroChainId): Record<keyof AroAddressOverr
216
241
  */
217
242
  interface MembershipStatus {
218
243
  hasSBT: boolean;
219
- tier?: AroTier;
244
+ /**
245
+ * Opaque tier id (uint256) as returned by AroSBT.getMemberData. Compare
246
+ * with `tierLabel`, `tierAtLeast`, or the AroTier enum values for the
247
+ * conventional defaults; semantics live off-chain in the admin backend.
248
+ */
249
+ tier?: bigint;
220
250
  tokenId?: bigint;
221
251
  memberId?: bigint;
222
252
  issuanceDate?: bigint;
@@ -246,9 +276,16 @@ interface NominationSnapshot {
246
276
  /**
247
277
  * Snapshot of the candidate's progress through the vouch flow. The dapp
248
278
  * shows this as "you need N more vouches" in the onboarding UI.
279
+ *
280
+ * @deprecated On-chain nomination is retired. Read this status from the
281
+ * admin portal's onboarding API instead. Removal planned in a future
282
+ * major release.
249
283
  */
250
284
  declare function getNominationSnapshot(sdk: AroSdk, candidate: `0x${string}`): Promise<NominationSnapshot>;
251
285
  /**
286
+ * @deprecated On-chain nomination is retired. Use the admin portal's
287
+ * onboarding API instead. Removal planned in a future major release.
288
+ *
252
289
  * Send `nominate(candidate)` from the connected wallet. The contract
253
290
  * gates this behind "caller must already be an SBT holder"; we surface
254
291
  * the right user-facing message via `AroContractError`.
@@ -256,10 +293,17 @@ declare function getNominationSnapshot(sdk: AroSdk, candidate: `0x${string}`): P
256
293
  declare function nominateCandidate(sdk: AroSdk, candidate: `0x${string}`, opts?: {
257
294
  account?: Account | `0x${string}`;
258
295
  }): Promise<Hex>;
296
+ /**
297
+ * @deprecated On-chain vouching is retired. Use the admin portal's
298
+ * onboarding API instead. Removal planned in a future major release.
299
+ */
259
300
  declare function vouchForCandidate(sdk: AroSdk, candidate: `0x${string}`, opts?: {
260
301
  account?: Account | `0x${string}`;
261
302
  }): Promise<Hex>;
262
303
  /**
304
+ * @deprecated On-chain nomination is retired. The admin portal handles
305
+ * rejections in its backend. Removal planned in a future major release.
306
+ *
263
307
  * Admin path: clear (reject) a nomination. Restricted to authorized roles
264
308
  * via AccessManager; will revert with AccessManagedUnauthorized if the
265
309
  * caller lacks the role.
@@ -273,11 +317,22 @@ interface MintSBTOpts {
273
317
  kycHash: `0x${string}`;
274
318
  /** Off-chain profile metadata URI (ipfs://... or https://...). */
275
319
  metadataURI: string;
276
- /** Initial tier (defaults to STANDARD per Policy §6.1). */
277
- tier?: AroTier;
320
+ /**
321
+ * Initial tier id (opaque uint256; defaults to 0 / "Standard"). Accepts
322
+ * AroTier enum values for the conventional defaults, or any bigint id
323
+ * defined off-chain by the admin backend.
324
+ */
325
+ tier?: bigint | AroTier;
278
326
  account?: Account | `0x${string}`;
279
327
  }
280
328
  /**
329
+ * @deprecated SBT minting is now candidate-triggered against an EIP-712
330
+ * voucher (`AroSBT.mintWithApproval`). The admin backend issues vouchers
331
+ * via `signMintApproval` in `../utils/mintApproval`, and the candidate
332
+ * submits via the `useMintWithApproval` hook in `../hooks/useAroSBT`.
333
+ * The direct admin mint below remains gated by ROLE_MINTER but is the
334
+ * legacy path; removal planned in a future major release.
335
+ *
281
336
  * Admin-only: mint the SBT for an approved candidate. The contract gates
282
337
  * this behind ROLE_MINTER via AccessManager (per AroMediaAccessManager).
283
338
  *
@@ -94,6 +94,82 @@ var AroSBT_ABI = [
94
94
  "name": "AlreadyHasSBT",
95
95
  "type": "error"
96
96
  },
97
+ {
98
+ "inputs": [
99
+ {
100
+ "internalType": "bytes32",
101
+ "name": "approvalDigest",
102
+ "type": "bytes32"
103
+ }
104
+ ],
105
+ "name": "ApprovalAlreadyUsed",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "inputs": [
110
+ {
111
+ "internalType": "address",
112
+ "name": "expected",
113
+ "type": "address"
114
+ },
115
+ {
116
+ "internalType": "address",
117
+ "name": "caller",
118
+ "type": "address"
119
+ }
120
+ ],
121
+ "name": "ApprovalCandidateMismatch",
122
+ "type": "error"
123
+ },
124
+ {
125
+ "inputs": [
126
+ {
127
+ "internalType": "uint64",
128
+ "name": "deadline",
129
+ "type": "uint64"
130
+ }
131
+ ],
132
+ "name": "ApprovalExpired",
133
+ "type": "error"
134
+ },
135
+ {
136
+ "inputs": [
137
+ {
138
+ "internalType": "address",
139
+ "name": "signer",
140
+ "type": "address"
141
+ }
142
+ ],
143
+ "name": "ApprovalSignerNotApprover",
144
+ "type": "error"
145
+ },
146
+ {
147
+ "inputs": [],
148
+ "name": "ECDSAInvalidSignature",
149
+ "type": "error"
150
+ },
151
+ {
152
+ "inputs": [
153
+ {
154
+ "internalType": "uint256",
155
+ "name": "length",
156
+ "type": "uint256"
157
+ }
158
+ ],
159
+ "name": "ECDSAInvalidSignatureLength",
160
+ "type": "error"
161
+ },
162
+ {
163
+ "inputs": [
164
+ {
165
+ "internalType": "bytes32",
166
+ "name": "s",
167
+ "type": "bytes32"
168
+ }
169
+ ],
170
+ "name": "ECDSAInvalidSignatureS",
171
+ "type": "error"
172
+ },
97
173
  {
98
174
  "inputs": [],
99
175
  "name": "ERC721EnumerableForbiddenBatchMint",
@@ -228,6 +304,11 @@ var AroSBT_ABI = [
228
304
  "name": "ExpectedPause",
229
305
  "type": "error"
230
306
  },
307
+ {
308
+ "inputs": [],
309
+ "name": "InvalidShortString",
310
+ "type": "error"
311
+ },
231
312
  {
232
313
  "inputs": [
233
314
  {
@@ -244,6 +325,17 @@ var AroSBT_ABI = [
244
325
  "name": "SoulboundTransferBlocked",
245
326
  "type": "error"
246
327
  },
328
+ {
329
+ "inputs": [
330
+ {
331
+ "internalType": "string",
332
+ "name": "str",
333
+ "type": "string"
334
+ }
335
+ ],
336
+ "name": "StringTooLong",
337
+ "type": "error"
338
+ },
247
339
  {
248
340
  "anonymous": false,
249
341
  "inputs": [
@@ -326,6 +418,12 @@ var AroSBT_ABI = [
326
418
  "name": "BatchMetadataUpdate",
327
419
  "type": "event"
328
420
  },
421
+ {
422
+ "anonymous": false,
423
+ "inputs": [],
424
+ "name": "EIP712DomainChanged",
425
+ "type": "event"
426
+ },
329
427
  {
330
428
  "anonymous": false,
331
429
  "inputs": [
@@ -362,9 +460,9 @@ var AroSBT_ABI = [
362
460
  },
363
461
  {
364
462
  "indexed": false,
365
- "internalType": "enum AroSBT.Tier",
463
+ "internalType": "uint256",
366
464
  "name": "tier",
367
- "type": "uint8"
465
+ "type": "uint256"
368
466
  },
369
467
  {
370
468
  "indexed": false,
@@ -414,6 +512,37 @@ var AroSBT_ABI = [
414
512
  "name": "MetadataUpdate",
415
513
  "type": "event"
416
514
  },
515
+ {
516
+ "anonymous": false,
517
+ "inputs": [
518
+ {
519
+ "indexed": true,
520
+ "internalType": "address",
521
+ "name": "candidate",
522
+ "type": "address"
523
+ },
524
+ {
525
+ "indexed": true,
526
+ "internalType": "bytes32",
527
+ "name": "approvalDigest",
528
+ "type": "bytes32"
529
+ },
530
+ {
531
+ "indexed": true,
532
+ "internalType": "address",
533
+ "name": "approver",
534
+ "type": "address"
535
+ },
536
+ {
537
+ "indexed": false,
538
+ "internalType": "bytes32",
539
+ "name": "nominationId",
540
+ "type": "bytes32"
541
+ }
542
+ ],
543
+ "name": "MintApprovalConsumed",
544
+ "type": "event"
545
+ },
417
546
  {
418
547
  "anonymous": false,
419
548
  "inputs": [
@@ -444,15 +573,15 @@ var AroSBT_ABI = [
444
573
  },
445
574
  {
446
575
  "indexed": false,
447
- "internalType": "enum AroSBT.Tier",
576
+ "internalType": "uint256",
448
577
  "name": "oldTier",
449
- "type": "uint8"
578
+ "type": "uint256"
450
579
  },
451
580
  {
452
581
  "indexed": false,
453
- "internalType": "enum AroSBT.Tier",
582
+ "internalType": "uint256",
454
583
  "name": "newTier",
455
- "type": "uint8"
584
+ "type": "uint256"
456
585
  }
457
586
  ],
458
587
  "name": "TierUpdated",
@@ -509,6 +638,19 @@ var AroSBT_ABI = [
509
638
  "name": "Unpaused",
510
639
  "type": "event"
511
640
  },
641
+ {
642
+ "inputs": [],
643
+ "name": "APPROVER_ROLE",
644
+ "outputs": [
645
+ {
646
+ "internalType": "uint64",
647
+ "name": "",
648
+ "type": "uint64"
649
+ }
650
+ ],
651
+ "stateMutability": "view",
652
+ "type": "function"
653
+ },
512
654
  {
513
655
  "inputs": [
514
656
  {
@@ -559,6 +701,49 @@ var AroSBT_ABI = [
559
701
  "stateMutability": "view",
560
702
  "type": "function"
561
703
  },
704
+ {
705
+ "inputs": [],
706
+ "name": "eip712Domain",
707
+ "outputs": [
708
+ {
709
+ "internalType": "bytes1",
710
+ "name": "fields",
711
+ "type": "bytes1"
712
+ },
713
+ {
714
+ "internalType": "string",
715
+ "name": "name",
716
+ "type": "string"
717
+ },
718
+ {
719
+ "internalType": "string",
720
+ "name": "version",
721
+ "type": "string"
722
+ },
723
+ {
724
+ "internalType": "uint256",
725
+ "name": "chainId",
726
+ "type": "uint256"
727
+ },
728
+ {
729
+ "internalType": "address",
730
+ "name": "verifyingContract",
731
+ "type": "address"
732
+ },
733
+ {
734
+ "internalType": "bytes32",
735
+ "name": "salt",
736
+ "type": "bytes32"
737
+ },
738
+ {
739
+ "internalType": "uint256[]",
740
+ "name": "extensions",
741
+ "type": "uint256[]"
742
+ }
743
+ ],
744
+ "stateMutability": "view",
745
+ "type": "function"
746
+ },
562
747
  {
563
748
  "inputs": [
564
749
  {
@@ -601,9 +786,9 @@ var AroSBT_ABI = [
601
786
  "type": "uint256"
602
787
  },
603
788
  {
604
- "internalType": "enum AroSBT.Tier",
789
+ "internalType": "uint256",
605
790
  "name": "tier",
606
- "type": "uint8"
791
+ "type": "uint256"
607
792
  },
608
793
  {
609
794
  "internalType": "bytes32",
@@ -642,9 +827,9 @@ var AroSBT_ABI = [
642
827
  "type": "uint256"
643
828
  },
644
829
  {
645
- "internalType": "enum AroSBT.Tier",
830
+ "internalType": "uint256",
646
831
  "name": "tier",
647
- "type": "uint8"
832
+ "type": "uint256"
648
833
  },
649
834
  {
650
835
  "internalType": "bytes32",
@@ -751,6 +936,11 @@ var AroSBT_ABI = [
751
936
  "internalType": "string",
752
937
  "name": "metadataURI",
753
938
  "type": "string"
939
+ },
940
+ {
941
+ "internalType": "uint256",
942
+ "name": "tier",
943
+ "type": "uint256"
754
944
  }
755
945
  ],
756
946
  "name": "mint",
@@ -780,14 +970,70 @@ var AroSBT_ABI = [
780
970
  "internalType": "string",
781
971
  "name": "metadataURI",
782
972
  "type": "string"
973
+ }
974
+ ],
975
+ "name": "mint",
976
+ "outputs": [
977
+ {
978
+ "internalType": "uint256",
979
+ "name": "",
980
+ "type": "uint256"
981
+ }
982
+ ],
983
+ "stateMutability": "nonpayable",
984
+ "type": "function"
985
+ },
986
+ {
987
+ "inputs": [
988
+ {
989
+ "components": [
990
+ {
991
+ "internalType": "address",
992
+ "name": "candidate",
993
+ "type": "address"
994
+ },
995
+ {
996
+ "internalType": "uint256",
997
+ "name": "tier",
998
+ "type": "uint256"
999
+ },
1000
+ {
1001
+ "internalType": "bytes32",
1002
+ "name": "kycHash",
1003
+ "type": "bytes32"
1004
+ },
1005
+ {
1006
+ "internalType": "bytes32",
1007
+ "name": "nominationId",
1008
+ "type": "bytes32"
1009
+ },
1010
+ {
1011
+ "internalType": "string",
1012
+ "name": "metadataURI",
1013
+ "type": "string"
1014
+ },
1015
+ {
1016
+ "internalType": "uint64",
1017
+ "name": "deadline",
1018
+ "type": "uint64"
1019
+ },
1020
+ {
1021
+ "internalType": "bytes32",
1022
+ "name": "nonce",
1023
+ "type": "bytes32"
1024
+ }
1025
+ ],
1026
+ "internalType": "struct AroSBT.MintApproval",
1027
+ "name": "approval",
1028
+ "type": "tuple"
783
1029
  },
784
1030
  {
785
- "internalType": "enum AroSBT.Tier",
786
- "name": "tier",
787
- "type": "uint8"
1031
+ "internalType": "bytes",
1032
+ "name": "signature",
1033
+ "type": "bytes"
788
1034
  }
789
1035
  ],
790
- "name": "mint",
1036
+ "name": "mintWithApproval",
791
1037
  "outputs": [
792
1038
  {
793
1039
  "internalType": "uint256",
@@ -953,9 +1199,9 @@ var AroSBT_ABI = [
953
1199
  "type": "uint256"
954
1200
  },
955
1201
  {
956
- "internalType": "enum AroSBT.Tier",
1202
+ "internalType": "uint256",
957
1203
  "name": "newTier",
958
- "type": "uint8"
1204
+ "type": "uint256"
959
1205
  }
960
1206
  ],
961
1207
  "name": "setTier",
@@ -1149,6 +1395,25 @@ var AroSBT_ABI = [
1149
1395
  "outputs": [],
1150
1396
  "stateMutability": "nonpayable",
1151
1397
  "type": "function"
1398
+ },
1399
+ {
1400
+ "inputs": [
1401
+ {
1402
+ "internalType": "bytes32",
1403
+ "name": "",
1404
+ "type": "bytes32"
1405
+ }
1406
+ ],
1407
+ "name": "usedApprovals",
1408
+ "outputs": [
1409
+ {
1410
+ "internalType": "bool",
1411
+ "name": "",
1412
+ "type": "bool"
1413
+ }
1414
+ ],
1415
+ "stateMutability": "view",
1416
+ "type": "function"
1152
1417
  }
1153
1418
  ];
1154
1419
  var AroNomination_ABI = [
@@ -1890,7 +2155,7 @@ async function mintSBTForApproved(sdk, opts) {
1890
2155
  throw new Error("mintSBTForApproved requires a walletClient on the SDK");
1891
2156
  }
1892
2157
  const wallet = sdk.walletClient;
1893
- const tier = opts.tier ?? 0 /* STANDARD */;
2158
+ const tier = opts.tier === void 0 ? 0n : typeof opts.tier === "bigint" ? opts.tier : BigInt(opts.tier);
1894
2159
  try {
1895
2160
  return await wallet.writeContract({
1896
2161
  account: pickAccount(wallet, opts.account),