@medialane/sdk 0.65.0 → 0.67.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.
@@ -1,4 +1,4 @@
1
- export { A as ADMIN_HEADERS, b as ADMIN_SCOPE, d as AddSupplyParams, e as AdminGrant, f as AdminRequest, g as AdminRequestSig, h as AdminSession, i as AdminSessionTypedDataInput, af as BatchMintEditionParams, ag as BuildFeeCallParams, ah as COIN_MAX_SUPPLY, ai as COIN_MIN_SUPPLY, am as ClubService, av as CreateCreatorCoinParams, ay as CreateGrantOpts, aF as CreatorCoinFactoryABI, aG as CreatorCoinPrice, aH as CreatorCoinReceiptLike, aI as CreatorCoinService, aK as DeployCollectionParams, aL as DropCollectionABI, aM as DropFactoryABI, aO as DropService, aP as ERC1155CollectionService, aQ as EkuboLaunchParams, aR as EkuboPoolParams, aV as FeeSurface, aX as IPClubABI, aY as IPClubCollectionABI, aZ as IPClubFactoryABI, a_ as IPClubNFTABI, a$ as IPCollection1155ABI, b0 as IPCollection1155FactoryABI, b1 as IPCollectionABI, b2 as IPGenesisABI, b3 as IPMarketplaceABI, b4 as IPNftABI, b5 as IPSponsorshipABI, b6 as IPSponsorshipLicenseABI, b7 as IPTicketCollectionABI, b8 as IPTicketCollectionFactoryABI, bf as LAUNCH_PRICE_QUOTE_PER_COIN, bh as Medialane1155ABI, bj as MedialaneClient, bl as MedialaneError, bn as MintEditionParams, bw as POPCollectionABI, bx as POPFactoryABI, by as ParsedAdminHeaders, bC as PopService, bE as RequestSiwsTokenArgs, bH as ResolvedOrder, bK as SiwsSigner, bM as SponsorshipService, bN as StarknetVenue, bO as StarknetVenueDeps, bP as StarknetVenueSigner, bR as TicketService, bT as VALIDATED_EKUBO_PARAMS, bW as adminRequestDigest, bX as build1155CancellationTypedData, bY as build1155OrderTypedData, bZ as buildAdminSessionTypedData, b_ as buildCancellationTypedData, b$ as buildCreateCreatorCoinCall, c0 as buildFeeCall, c1 as buildLaunchOnEkuboCalls, c2 as buildOrderTypedData, c3 as buybackQuoteRaw, c4 as coinToRaw, c5 as createAdminSessionGrant, c6 as encodeAdminHeaders, c7 as encodeByteArray, c8 as fdvHuman, c9 as getCounter, ca as getCounter1155, cb as getCreatorCoinPrice, cc as getOrderDetails, cd as getOrderDetails1155, ce as getSiwsStorageKey, cf as getStoredSiwsToken, cg as isSiwsTokenValid, ch as normalizeSiwsSignature, ci as parseAdminHeaders, cj as parseCreatorCoinCreated, ck as randomNonce, cl as requestSiwsToken, co as sessionKeyHashOf, cp as signAdminRequest, cq as storeSiwsToken, cr as teamCoinsRaw, cs as validateCoinName, ct as validateCoinSupply, cu as validateCoinSymbol, cv as verifyAdminRequestSig } from '../index-_q2B0g3M.cjs';
2
- export { h as VenueSigner } from '../types-Bx3ax9lW.cjs';
1
+ export { A as ADMIN_HEADERS, b as ADMIN_SCOPE, d as AddSupplyParams, e as AdminGrant, f as AdminRequest, g as AdminRequestSig, h as AdminSession, i as AdminSessionTypedDataInput, af as BatchMintEditionParams, ag as BuildFeeCallParams, ah as COIN_MAX_SUPPLY, ai as COIN_MIN_SUPPLY, am as ClubService, av as CreateCreatorCoinParams, ax as CreateGrantOpts, aF as CreatorCoinFactoryABI, aG as CreatorCoinPrice, aH as CreatorCoinReceiptLike, aI as CreatorCoinService, aK as DeployCollectionParams, aL as DropCollectionABI, aM as DropFactoryABI, aO as DropService, aP as ERC1155CollectionService, aQ as EkuboLaunchParams, aR as EkuboPoolParams, aV as FeeSurface, aX as IPClubABI, aY as IPClubCollectionABI, aZ as IPClubFactoryABI, a_ as IPClubNFTABI, a$ as IPCollection1155ABI, b0 as IPCollection1155FactoryABI, b1 as IPCollectionABI, b2 as IPGenesisABI, b3 as IPMarketplaceABI, b4 as IPNftABI, b5 as IPSponsorshipABI, b6 as IPSponsorshipLicenseABI, b7 as IPTicketCollectionABI, b8 as IPTicketCollectionFactoryABI, bf as LAUNCH_PRICE_QUOTE_PER_COIN, bh as Medialane1155ABI, bj as MedialaneClient, bl as MedialaneError, bn as MintEditionParams, bw as POPCollectionABI, bx as POPFactoryABI, by as ParsedAdminHeaders, bC as PopService, bE as RequestSiwsTokenArgs, bH as ResolvedOrder, bK as SiwsSigner, bM as SponsorshipService, bN as StarknetVenue, bO as StarknetVenueDeps, bP as StarknetVenueSigner, bR as TicketService, bT as VALIDATED_EKUBO_PARAMS, bW as adminRequestDigest, bX as build1155CancellationTypedData, bY as build1155OrderTypedData, bZ as buildAdminSessionTypedData, b_ as buildCancellationTypedData, b$ as buildCreateCreatorCoinCall, c0 as buildFeeCall, c1 as buildLaunchOnEkuboCalls, c2 as buildOrderTypedData, c3 as buybackQuoteRaw, c4 as coinToRaw, c5 as createAdminSessionGrant, c6 as encodeAdminHeaders, c7 as encodeByteArray, c8 as fdvHuman, c9 as getCounter, ca as getCounter1155, cb as getCreatorCoinPrice, cc as getOrderDetails, cd as getOrderDetails1155, ce as getSiwsStorageKey, cf as getStoredSiwsToken, cg as isSiwsTokenValid, ch as normalizeSiwsSignature, ci as parseAdminHeaders, cj as parseCreatorCoinCreated, ck as randomNonce, cl as requestSiwsToken, co as sessionKeyHashOf, cp as signAdminRequest, cq as storeSiwsToken, cr as teamCoinsRaw, cs as validateCoinName, ct as validateCoinSupply, cu as validateCoinSymbol, cv as verifyAdminRequestSig } from '../index-C2EaTkzk.cjs';
2
+ export { h as VenueSigner } from '../types-CIR6H6ul.cjs';
3
3
  import 'starknet';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- export { A as ADMIN_HEADERS, b as ADMIN_SCOPE, d as AddSupplyParams, e as AdminGrant, f as AdminRequest, g as AdminRequestSig, h as AdminSession, i as AdminSessionTypedDataInput, af as BatchMintEditionParams, ag as BuildFeeCallParams, ah as COIN_MAX_SUPPLY, ai as COIN_MIN_SUPPLY, am as ClubService, av as CreateCreatorCoinParams, ay as CreateGrantOpts, aF as CreatorCoinFactoryABI, aG as CreatorCoinPrice, aH as CreatorCoinReceiptLike, aI as CreatorCoinService, aK as DeployCollectionParams, aL as DropCollectionABI, aM as DropFactoryABI, aO as DropService, aP as ERC1155CollectionService, aQ as EkuboLaunchParams, aR as EkuboPoolParams, aV as FeeSurface, aX as IPClubABI, aY as IPClubCollectionABI, aZ as IPClubFactoryABI, a_ as IPClubNFTABI, a$ as IPCollection1155ABI, b0 as IPCollection1155FactoryABI, b1 as IPCollectionABI, b2 as IPGenesisABI, b3 as IPMarketplaceABI, b4 as IPNftABI, b5 as IPSponsorshipABI, b6 as IPSponsorshipLicenseABI, b7 as IPTicketCollectionABI, b8 as IPTicketCollectionFactoryABI, bf as LAUNCH_PRICE_QUOTE_PER_COIN, bh as Medialane1155ABI, bj as MedialaneClient, bl as MedialaneError, bn as MintEditionParams, bw as POPCollectionABI, bx as POPFactoryABI, by as ParsedAdminHeaders, bC as PopService, bE as RequestSiwsTokenArgs, bH as ResolvedOrder, bK as SiwsSigner, bM as SponsorshipService, bN as StarknetVenue, bO as StarknetVenueDeps, bP as StarknetVenueSigner, bR as TicketService, bT as VALIDATED_EKUBO_PARAMS, bW as adminRequestDigest, bX as build1155CancellationTypedData, bY as build1155OrderTypedData, bZ as buildAdminSessionTypedData, b_ as buildCancellationTypedData, b$ as buildCreateCreatorCoinCall, c0 as buildFeeCall, c1 as buildLaunchOnEkuboCalls, c2 as buildOrderTypedData, c3 as buybackQuoteRaw, c4 as coinToRaw, c5 as createAdminSessionGrant, c6 as encodeAdminHeaders, c7 as encodeByteArray, c8 as fdvHuman, c9 as getCounter, ca as getCounter1155, cb as getCreatorCoinPrice, cc as getOrderDetails, cd as getOrderDetails1155, ce as getSiwsStorageKey, cf as getStoredSiwsToken, cg as isSiwsTokenValid, ch as normalizeSiwsSignature, ci as parseAdminHeaders, cj as parseCreatorCoinCreated, ck as randomNonce, cl as requestSiwsToken, co as sessionKeyHashOf, cp as signAdminRequest, cq as storeSiwsToken, cr as teamCoinsRaw, cs as validateCoinName, ct as validateCoinSupply, cu as validateCoinSymbol, cv as verifyAdminRequestSig } from '../index-DMNv-Oj0.js';
2
- export { h as VenueSigner } from '../types-Bx3ax9lW.js';
1
+ export { A as ADMIN_HEADERS, b as ADMIN_SCOPE, d as AddSupplyParams, e as AdminGrant, f as AdminRequest, g as AdminRequestSig, h as AdminSession, i as AdminSessionTypedDataInput, af as BatchMintEditionParams, ag as BuildFeeCallParams, ah as COIN_MAX_SUPPLY, ai as COIN_MIN_SUPPLY, am as ClubService, av as CreateCreatorCoinParams, ax as CreateGrantOpts, aF as CreatorCoinFactoryABI, aG as CreatorCoinPrice, aH as CreatorCoinReceiptLike, aI as CreatorCoinService, aK as DeployCollectionParams, aL as DropCollectionABI, aM as DropFactoryABI, aO as DropService, aP as ERC1155CollectionService, aQ as EkuboLaunchParams, aR as EkuboPoolParams, aV as FeeSurface, aX as IPClubABI, aY as IPClubCollectionABI, aZ as IPClubFactoryABI, a_ as IPClubNFTABI, a$ as IPCollection1155ABI, b0 as IPCollection1155FactoryABI, b1 as IPCollectionABI, b2 as IPGenesisABI, b3 as IPMarketplaceABI, b4 as IPNftABI, b5 as IPSponsorshipABI, b6 as IPSponsorshipLicenseABI, b7 as IPTicketCollectionABI, b8 as IPTicketCollectionFactoryABI, bf as LAUNCH_PRICE_QUOTE_PER_COIN, bh as Medialane1155ABI, bj as MedialaneClient, bl as MedialaneError, bn as MintEditionParams, bw as POPCollectionABI, bx as POPFactoryABI, by as ParsedAdminHeaders, bC as PopService, bE as RequestSiwsTokenArgs, bH as ResolvedOrder, bK as SiwsSigner, bM as SponsorshipService, bN as StarknetVenue, bO as StarknetVenueDeps, bP as StarknetVenueSigner, bR as TicketService, bT as VALIDATED_EKUBO_PARAMS, bW as adminRequestDigest, bX as build1155CancellationTypedData, bY as build1155OrderTypedData, bZ as buildAdminSessionTypedData, b_ as buildCancellationTypedData, b$ as buildCreateCreatorCoinCall, c0 as buildFeeCall, c1 as buildLaunchOnEkuboCalls, c2 as buildOrderTypedData, c3 as buybackQuoteRaw, c4 as coinToRaw, c5 as createAdminSessionGrant, c6 as encodeAdminHeaders, c7 as encodeByteArray, c8 as fdvHuman, c9 as getCounter, ca as getCounter1155, cb as getCreatorCoinPrice, cc as getOrderDetails, cd as getOrderDetails1155, ce as getSiwsStorageKey, cf as getStoredSiwsToken, cg as isSiwsTokenValid, ch as normalizeSiwsSignature, ci as parseAdminHeaders, cj as parseCreatorCoinCreated, ck as randomNonce, cl as requestSiwsToken, co as sessionKeyHashOf, cp as signAdminRequest, cq as storeSiwsToken, cr as teamCoinsRaw, cs as validateCoinName, ct as validateCoinSupply, cu as validateCoinSymbol, cv as verifyAdminRequestSig } from '../index-DjJ4k6p_.js';
2
+ export { h as VenueSigner } from '../types-CIR6H6ul.js';
3
3
  import 'starknet';
4
4
  import 'zod';
@@ -35,16 +35,17 @@ var COORDINATES = {
35
35
  creatorCoinFactoryClassHash: "0x51765926b1344c9a20b8cd4b5abe7b7d47375ae97cf6804db3ea5d4b05a9b55",
36
36
  creatorCoinStartBlock: 10474544,
37
37
  ekuboCore: "0x00000005dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
38
- ipTicketsFactory: "0x03ffef4162fe2c44e17d6be2aad3553cab0ac2274cd0b1bb3fafb12fd66695c1",
39
- ipTicketCollectionClassHash: "0x036393fb4241ed55bd12d8b328ed877d08100fadf9150a650e2b84cbab95e1d4",
40
- ipTicketsStartBlock: 11689800,
38
+ ipTicketsFactory: "0x059802639b41e9c6449c3d557703e610ef639a91866dc1dd44216f9f37111ac5",
39
+ ipTicketCollectionClassHash: "0x047bd108881457c4f4db6c64671c1dd402f4d8c79fd9182f03a2dd841335a34b",
40
+ ipTicketsFactoryClassHash: "0x04a739ac3a673ebd0db96bb24475600797c3ed34827e79517f9b2b1640276e6a",
41
+ ipTicketsStartBlock: 11836622,
41
42
  ipClubRegistry: "0x00e189c619b6bb07d78973a149641c59c37eb0716f8584d7520bce12d303eede",
42
43
  ipClubNftClassHash: "0x02bc9b20cca21b04245e9215bf7121f4d7295b195890e449b472b573017fb889",
43
44
  ipClubStartBlock: 11404776,
44
- ipClubFactory: "0x010726346c264d1832a7303afaf5692dbd2b05446fecc6da30d958d0227c36d0",
45
+ ipClubFactory: "0x05519705345ce225db666253a21cf89d1c675658f16cc6ae4320cefd1a1219a3",
45
46
  ipClubFactoryClassHash: "0x07197062578375d962b2d42d3e91560770b11b1c97a9defb74c706a2c5299473",
46
- ipClubCollectionClassHash: "0x049dc5e5ff00e67d5d457c6991ee70822f36a979b76cefd1b617aeccd7051d4b",
47
- ipClubFactoryStartBlock: 11652766,
47
+ ipClubCollectionClassHash: "0x35b8836a2269523ae9176077ec525451cce1053b2acd9fae3b05354aa4eded3",
48
+ ipClubFactoryStartBlock: 11884796,
48
49
  ipSponsorship: "0x044d9b9c3bb29b94685b0a3fe27a5e2dfa30a3637ab55979c718ebcd3268bc2f",
49
50
  ipSponsorshipStartBlock: 11405085,
50
51
  // Dedicated ip-erc721/MIP instance for sponsorship receipts (class hash
@@ -5517,12 +5518,8 @@ var IPTicketCollectionABI = [
5517
5518
  },
5518
5519
  {
5519
5520
  "type": "struct",
5520
- "name": "ip_ticket::types::EventRecord",
5521
+ "name": "ip_ticket::types::Ticket",
5521
5522
  "members": [
5522
- {
5523
- "name": "creator",
5524
- "type": "core::starknet::contract_address::ContractAddress"
5525
- },
5526
5523
  {
5527
5524
  "name": "max_supply",
5528
5525
  "type": "core::integer::u256"
@@ -5546,10 +5543,6 @@ var IPTicketCollectionABI = [
5546
5543
  {
5547
5544
  "name": "metadata_uri",
5548
5545
  "type": "core::byte_array::ByteArray"
5549
- },
5550
- {
5551
- "name": "active",
5552
- "type": "core::bool"
5553
5546
  }
5554
5547
  ]
5555
5548
  },
@@ -5559,7 +5552,7 @@ var IPTicketCollectionABI = [
5559
5552
  "items": [
5560
5553
  {
5561
5554
  "type": "function",
5562
- "name": "create_event",
5555
+ "name": "create_ticket",
5563
5556
  "inputs": [
5564
5557
  {
5565
5558
  "name": "max_supply",
@@ -5611,52 +5604,69 @@ var IPTicketCollectionABI = [
5611
5604
  },
5612
5605
  {
5613
5606
  "type": "function",
5614
- "name": "pause_event",
5607
+ "name": "is_valid",
5615
5608
  "inputs": [
5616
5609
  {
5617
5610
  "name": "token_id",
5618
5611
  "type": "core::integer::u256"
5619
5612
  },
5620
5613
  {
5621
- "name": "active",
5614
+ "name": "holder",
5615
+ "type": "core::starknet::contract_address::ContractAddress"
5616
+ }
5617
+ ],
5618
+ "outputs": [
5619
+ {
5622
5620
  "type": "core::bool"
5623
5621
  }
5624
5622
  ],
5625
- "outputs": [],
5626
- "state_mutability": "external"
5623
+ "state_mutability": "view"
5627
5624
  },
5628
5625
  {
5629
5626
  "type": "function",
5630
- "name": "is_valid",
5627
+ "name": "get_ticket",
5631
5628
  "inputs": [
5632
5629
  {
5633
5630
  "name": "token_id",
5634
5631
  "type": "core::integer::u256"
5635
- },
5632
+ }
5633
+ ],
5634
+ "outputs": [
5636
5635
  {
5637
- "name": "holder",
5638
- "type": "core::starknet::contract_address::ContractAddress"
5636
+ "type": "ip_ticket::types::Ticket"
5639
5637
  }
5640
5638
  ],
5639
+ "state_mutability": "view"
5640
+ },
5641
+ {
5642
+ "type": "function",
5643
+ "name": "name",
5644
+ "inputs": [],
5641
5645
  "outputs": [
5642
5646
  {
5643
- "type": "core::bool"
5647
+ "type": "core::byte_array::ByteArray"
5644
5648
  }
5645
5649
  ],
5646
5650
  "state_mutability": "view"
5647
5651
  },
5648
5652
  {
5649
5653
  "type": "function",
5650
- "name": "get_event",
5651
- "inputs": [
5654
+ "name": "symbol",
5655
+ "inputs": [],
5656
+ "outputs": [
5652
5657
  {
5653
- "name": "token_id",
5654
- "type": "core::integer::u256"
5658
+ "type": "core::byte_array::ByteArray"
5655
5659
  }
5656
5660
  ],
5661
+ "state_mutability": "view"
5662
+ },
5663
+ {
5664
+ "type": "function",
5665
+ "name": "base_uri",
5666
+ "inputs": [],
5657
5667
  "outputs": [
5658
5668
  {
5659
- "type": "ip_ticket::types::EventRecord"
5669
+ "type": "core::byte_array::ByteArray"
5660
5670
  }
5661
5671
  ],
5662
5672
  "state_mutability": "view"
@@ -6129,6 +6139,10 @@ var IPTicketCollectionABI = [
6129
6139
  "name": "symbol",
6130
6140
  "type": "core::byte_array::ByteArray"
6131
6141
  },
6142
+ {
6143
+ "name": "base_uri",
6144
+ "type": "core::byte_array::ByteArray"
6145
+ },
6132
6146
  {
6133
6147
  "name": "owner",
6134
6148
  "type": "core::starknet::contract_address::ContractAddress"
@@ -6324,7 +6338,7 @@ var IPTicketCollectionABI = [
6324
6338
  },
6325
6339
  {
6326
6340
  "type": "event",
6327
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::EventCreated",
6341
+ "name": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketCreated",
6328
6342
  "kind": "struct",
6329
6343
  "members": [
6330
6344
  {
@@ -6359,23 +6373,6 @@ var IPTicketCollectionABI = [
6359
6373
  }
6360
6374
  ]
6361
6375
  },
6362
- {
6363
- "type": "event",
6364
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::EventPaused",
6365
- "kind": "struct",
6366
- "members": [
6367
- {
6368
- "name": "token_id",
6369
- "type": "core::integer::u256",
6370
- "kind": "key"
6371
- },
6372
- {
6373
- "name": "active",
6374
- "type": "core::bool",
6375
- "kind": "data"
6376
- }
6377
- ]
6378
- },
6379
6376
  {
6380
6377
  "type": "event",
6381
6378
  "name": "ip_ticket::IPTicketCollection::IPTicketCollection::Event",
@@ -6397,13 +6394,8 @@ var IPTicketCollectionABI = [
6397
6394
  "kind": "flat"
6398
6395
  },
6399
6396
  {
6400
- "name": "EventCreated",
6401
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::EventCreated",
6402
- "kind": "nested"
6403
- },
6404
- {
6405
- "name": "EventPaused",
6406
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::EventPaused",
6397
+ "name": "TicketCreated",
6398
+ "type": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketCreated",
6407
6399
  "kind": "nested"
6408
6400
  }
6409
6401
  ]
@@ -6472,6 +6464,10 @@ var IPTicketCollectionFactoryABI = [
6472
6464
  {
6473
6465
  "name": "symbol",
6474
6466
  "type": "core::byte_array::ByteArray"
6467
+ },
6468
+ {
6469
+ "name": "base_uri",
6470
+ "type": "core::byte_array::ByteArray"
6475
6471
  }
6476
6472
  ],
6477
6473
  "outputs": [
@@ -11502,17 +11498,25 @@ var TicketService = class {
11502
11498
  const provider = new RpcProvider({ nodeUrl: this.config.rpcUrl });
11503
11499
  return newContract(IPTicketCollectionABI, normalizeAddress("STARKNET", address), provider);
11504
11500
  }
11505
- /** Deploys a new IPTicketCollection via the factory. Caller becomes owner. */
11501
+ /**
11502
+ * Deploys a new IPTicketCollection via the factory. Caller becomes owner.
11503
+ * `baseUri` is the collection-level metadata URI, embedded on-chain in the
11504
+ * deploy transaction.
11505
+ */
11506
11506
  async deployCollection(account, params) {
11507
- const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [params.name, params.symbol]);
11507
+ const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [
11508
+ params.name,
11509
+ params.symbol,
11510
+ params.baseUri
11511
+ ]);
11508
11512
  const res = await account.execute([call]);
11509
11513
  return { txHash: res.transaction_hash };
11510
11514
  }
11511
- /** Owner-only. Creates a new event inside the caller's deployed collection. */
11512
- async createEvent(account, params) {
11515
+ /** Owner-only. Creates a new ticket inside the caller's deployed collection. */
11516
+ async createTicket(account, params) {
11513
11517
  const startTime = params.startTime != null ? new CairoOption(CairoOptionVariant.Some, params.startTime) : new CairoOption(CairoOptionVariant.None);
11514
11518
  const endTime = params.endTime != null ? new CairoOption(CairoOptionVariant.Some, params.endTime) : new CairoOption(CairoOptionVariant.None);
11515
- const call = this._collection(params.collection, account).populate("create_event", [
11519
+ const call = this._collection(params.collection, account).populate("create_ticket", [
11516
11520
  cairo.uint256(params.maxSupply),
11517
11521
  startTime,
11518
11522
  endTime,
@@ -11532,16 +11536,7 @@ var TicketService = class {
11532
11536
  const res = await account.execute([call]);
11533
11537
  return { txHash: res.transaction_hash };
11534
11538
  }
11535
- /** Owner-only. Pauses or resumes minting for one event. */
11536
- async pauseEvent(account, params) {
11537
- const call = this._collection(params.collection, account).populate("pause_event", [
11538
- cairo.uint256(params.tokenId),
11539
- params.active
11540
- ]);
11541
- const res = await account.execute([call]);
11542
- return { txHash: res.transaction_hash };
11543
- }
11544
- /** Read — true if holder has balance > 0 and current time is within the event window. */
11539
+ /** Read true if holder has balance > 0 and current time is within the ticket window. */
11545
11540
  async isValid(params) {
11546
11541
  const result = await this._collectionRead(params.collection).call("is_valid", [
11547
11542
  cairo.uint256(params.tokenId),
@@ -11549,20 +11544,18 @@ var TicketService = class {
11549
11544
  ]);
11550
11545
  return Boolean(result);
11551
11546
  }
11552
- /** Read — returns the EventRecord for a token ID. */
11553
- async getEvent(params) {
11554
- const ev = await this._collectionRead(params.collection).call("get_event", [
11547
+ /** Read — returns the Ticket record for a token ID. */
11548
+ async getTicket(params) {
11549
+ const t = await this._collectionRead(params.collection).call("get_ticket", [
11555
11550
  cairo.uint256(params.tokenId)
11556
11551
  ]);
11557
11552
  return {
11558
- creator: ev.creator,
11559
- maxSupply: BigInt(ev.max_supply),
11560
- minted: BigInt(ev.minted),
11561
- startTime: ev.start_time?.variant === "Some" ? Number(ev.start_time.values[0] ?? ev.start_time.value) : null,
11562
- endTime: ev.end_time?.variant === "Some" ? Number(ev.end_time.values[0] ?? ev.end_time.value) : null,
11563
- royaltyBps: Number(ev.royalty_bps),
11564
- metadataUri: ev.metadata_uri,
11565
- active: Boolean(ev.active)
11553
+ maxSupply: BigInt(t.max_supply),
11554
+ minted: BigInt(t.minted),
11555
+ startTime: t.start_time?.variant === "Some" ? Number(t.start_time.values[0] ?? t.start_time.value) : null,
11556
+ endTime: t.end_time?.variant === "Some" ? Number(t.end_time.values[0] ?? t.end_time.value) : null,
11557
+ royaltyBps: Number(t.royalty_bps),
11558
+ metadataUri: t.metadata_uri
11566
11559
  };
11567
11560
  }
11568
11561
  };