@medialane/sdk 0.61.0 → 0.63.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.
package/dist/index.cjs CHANGED
@@ -37,9 +37,9 @@ var COORDINATES = {
37
37
  creatorCoinFactoryClassHash: "0x51765926b1344c9a20b8cd4b5abe7b7d47375ae97cf6804db3ea5d4b05a9b55",
38
38
  creatorCoinStartBlock: 10474544,
39
39
  ekuboCore: "0x00000005dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
40
- ipTicketsFactory: "0x0664c2d6a4da9ee3ff053ceeba7579c01f2fedfd9d2b57b4c07af3734bd4acab",
41
- ipTicketCollectionClassHash: "0x086f59c416e365e2bee4ceff9f1dcb96198f2342d50ba4621f60b831863adb6",
42
- ipTicketsStartBlock: 11404656,
40
+ ipTicketsFactory: "0x03ffef4162fe2c44e17d6be2aad3553cab0ac2274cd0b1bb3fafb12fd66695c1",
41
+ ipTicketCollectionClassHash: "0x036393fb4241ed55bd12d8b328ed877d08100fadf9150a650e2b84cbab95e1d4",
42
+ ipTicketsStartBlock: 11689800,
43
43
  ipClubRegistry: "0x00e189c619b6bb07d78973a149641c59c37eb0716f8584d7520bce12d303eede",
44
44
  ipClubNftClassHash: "0x02bc9b20cca21b04245e9215bf7121f4d7295b195890e449b472b573017fb889",
45
45
  ipClubStartBlock: 11404776,
@@ -5821,26 +5821,8 @@ var CreatorCoinFactoryABI = [{ "type": "impl", "name": "FactoryImpl", "interface
5821
5821
  var IPTicketCollectionABI = [
5822
5822
  {
5823
5823
  "type": "impl",
5824
- "name": "ERC721MetadataImpl",
5825
- "interface_name": "openzeppelin_token::erc721::interface::IERC721Metadata"
5826
- },
5827
- {
5828
- "type": "struct",
5829
- "name": "core::byte_array::ByteArray",
5830
- "members": [
5831
- {
5832
- "name": "data",
5833
- "type": "core::array::Array::<core::bytes_31::bytes31>"
5834
- },
5835
- {
5836
- "name": "pending_word",
5837
- "type": "core::felt252"
5838
- },
5839
- {
5840
- "name": "pending_word_len",
5841
- "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
5842
- }
5843
- ]
5824
+ "name": "ERC1155MetadataURIImpl",
5825
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155MetadataURI"
5844
5826
  },
5845
5827
  {
5846
5828
  "type": "struct",
@@ -5857,64 +5839,33 @@ var IPTicketCollectionABI = [
5857
5839
  ]
5858
5840
  },
5859
5841
  {
5860
- "type": "interface",
5861
- "name": "openzeppelin_token::erc721::interface::IERC721Metadata",
5862
- "items": [
5842
+ "type": "struct",
5843
+ "name": "core::byte_array::ByteArray",
5844
+ "members": [
5863
5845
  {
5864
- "type": "function",
5865
- "name": "name",
5866
- "inputs": [],
5867
- "outputs": [
5868
- {
5869
- "type": "core::byte_array::ByteArray"
5870
- }
5871
- ],
5872
- "state_mutability": "view"
5846
+ "name": "data",
5847
+ "type": "core::array::Array::<core::bytes_31::bytes31>"
5873
5848
  },
5874
5849
  {
5875
- "type": "function",
5876
- "name": "symbol",
5877
- "inputs": [],
5878
- "outputs": [
5879
- {
5880
- "type": "core::byte_array::ByteArray"
5881
- }
5882
- ],
5883
- "state_mutability": "view"
5850
+ "name": "pending_word",
5851
+ "type": "core::felt252"
5884
5852
  },
5885
5853
  {
5886
- "type": "function",
5887
- "name": "token_uri",
5888
- "inputs": [
5889
- {
5890
- "name": "token_id",
5891
- "type": "core::integer::u256"
5892
- }
5893
- ],
5894
- "outputs": [
5895
- {
5896
- "type": "core::byte_array::ByteArray"
5897
- }
5898
- ],
5899
- "state_mutability": "view"
5854
+ "name": "pending_word_len",
5855
+ "type": "core::internal::bounded_int::BoundedInt::<0, 30>"
5900
5856
  }
5901
5857
  ]
5902
5858
  },
5903
- {
5904
- "type": "impl",
5905
- "name": "ERC721MetadataCamelOnlyImpl",
5906
- "interface_name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly"
5907
- },
5908
5859
  {
5909
5860
  "type": "interface",
5910
- "name": "openzeppelin_token::erc721::interface::IERC721MetadataCamelOnly",
5861
+ "name": "openzeppelin_token::erc1155::interface::IERC1155MetadataURI",
5911
5862
  "items": [
5912
5863
  {
5913
5864
  "type": "function",
5914
- "name": "tokenURI",
5865
+ "name": "uri",
5915
5866
  "inputs": [
5916
5867
  {
5917
- "name": "tokenId",
5868
+ "name": "token_id",
5918
5869
  "type": "core::integer::u256"
5919
5870
  }
5920
5871
  ],
@@ -5929,16 +5880,16 @@ var IPTicketCollectionABI = [
5929
5880
  },
5930
5881
  {
5931
5882
  "type": "impl",
5932
- "name": "IPTicketImpl",
5883
+ "name": "IPTicketCollectionImpl",
5933
5884
  "interface_name": "ip_ticket::interface::IIPTicketCollection"
5934
5885
  },
5935
5886
  {
5936
5887
  "type": "enum",
5937
- "name": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
5888
+ "name": "core::option::Option::<core::integer::u64>",
5938
5889
  "variants": [
5939
5890
  {
5940
5891
  "name": "Some",
5941
- "type": "core::starknet::contract_address::ContractAddress"
5892
+ "type": "core::integer::u64"
5942
5893
  },
5943
5894
  {
5944
5895
  "name": "None",
@@ -5962,16 +5913,12 @@ var IPTicketCollectionABI = [
5962
5913
  },
5963
5914
  {
5964
5915
  "type": "struct",
5965
- "name": "ip_ticket::types::TicketCollection",
5916
+ "name": "ip_ticket::types::EventRecord",
5966
5917
  "members": [
5967
5918
  {
5968
5919
  "name": "creator",
5969
5920
  "type": "core::starknet::contract_address::ContractAddress"
5970
5921
  },
5971
- {
5972
- "name": "price",
5973
- "type": "core::integer::u256"
5974
- },
5975
5922
  {
5976
5923
  "name": "max_supply",
5977
5924
  "type": "core::integer::u256"
@@ -5981,16 +5928,16 @@ var IPTicketCollectionABI = [
5981
5928
  "type": "core::integer::u256"
5982
5929
  },
5983
5930
  {
5984
- "name": "expiration",
5985
- "type": "core::integer::u64"
5931
+ "name": "start_time",
5932
+ "type": "core::option::Option::<core::integer::u64>"
5986
5933
  },
5987
5934
  {
5988
- "name": "royalty_bps",
5989
- "type": "core::integer::u256"
5935
+ "name": "end_time",
5936
+ "type": "core::option::Option::<core::integer::u64>"
5990
5937
  },
5991
5938
  {
5992
- "name": "payment_token",
5993
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
5939
+ "name": "royalty_bps",
5940
+ "type": "core::integer::u16"
5994
5941
  },
5995
5942
  {
5996
5943
  "name": "metadata_uri",
@@ -6002,71 +5949,29 @@ var IPTicketCollectionABI = [
6002
5949
  }
6003
5950
  ]
6004
5951
  },
6005
- {
6006
- "type": "struct",
6007
- "name": "ip_ticket::types::TicketData",
6008
- "members": [
6009
- {
6010
- "name": "token_id",
6011
- "type": "core::integer::u256"
6012
- },
6013
- {
6014
- "name": "owner",
6015
- "type": "core::starknet::contract_address::ContractAddress"
6016
- },
6017
- {
6018
- "name": "collection_id",
6019
- "type": "core::integer::u256"
6020
- },
6021
- {
6022
- "name": "creator",
6023
- "type": "core::starknet::contract_address::ContractAddress"
6024
- },
6025
- {
6026
- "name": "metadata_uri",
6027
- "type": "core::byte_array::ByteArray"
6028
- },
6029
- {
6030
- "name": "expiration",
6031
- "type": "core::integer::u64"
6032
- },
6033
- {
6034
- "name": "redeemed",
6035
- "type": "core::bool"
6036
- },
6037
- {
6038
- "name": "valid",
6039
- "type": "core::bool"
6040
- }
6041
- ]
6042
- },
6043
5952
  {
6044
5953
  "type": "interface",
6045
5954
  "name": "ip_ticket::interface::IIPTicketCollection",
6046
5955
  "items": [
6047
5956
  {
6048
5957
  "type": "function",
6049
- "name": "create_ticket_collection",
5958
+ "name": "create_event",
6050
5959
  "inputs": [
6051
- {
6052
- "name": "price",
6053
- "type": "core::integer::u256"
6054
- },
6055
5960
  {
6056
5961
  "name": "max_supply",
6057
5962
  "type": "core::integer::u256"
6058
5963
  },
6059
5964
  {
6060
- "name": "expiration",
6061
- "type": "core::integer::u64"
5965
+ "name": "start_time",
5966
+ "type": "core::option::Option::<core::integer::u64>"
6062
5967
  },
6063
5968
  {
6064
- "name": "royalty_bps",
6065
- "type": "core::integer::u256"
5969
+ "name": "end_time",
5970
+ "type": "core::option::Option::<core::integer::u64>"
6066
5971
  },
6067
5972
  {
6068
- "name": "payment_token",
6069
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>"
5973
+ "name": "royalty_bps",
5974
+ "type": "core::integer::u16"
6070
5975
  },
6071
5976
  {
6072
5977
  "name": "metadata_uri",
@@ -6082,43 +5987,35 @@ var IPTicketCollectionABI = [
6082
5987
  },
6083
5988
  {
6084
5989
  "type": "function",
6085
- "name": "set_collection_active",
5990
+ "name": "mint",
6086
5991
  "inputs": [
6087
5992
  {
6088
- "name": "collection_id",
6089
- "type": "core::integer::u256"
5993
+ "name": "to",
5994
+ "type": "core::starknet::contract_address::ContractAddress"
6090
5995
  },
6091
5996
  {
6092
- "name": "active",
6093
- "type": "core::bool"
6094
- }
6095
- ],
6096
- "outputs": [],
6097
- "state_mutability": "external"
6098
- },
6099
- {
6100
- "type": "function",
6101
- "name": "mint_ticket",
6102
- "inputs": [
6103
- {
6104
- "name": "collection_id",
5997
+ "name": "token_id",
6105
5998
  "type": "core::integer::u256"
6106
- }
6107
- ],
6108
- "outputs": [
5999
+ },
6109
6000
  {
6001
+ "name": "amount",
6110
6002
  "type": "core::integer::u256"
6111
6003
  }
6112
6004
  ],
6005
+ "outputs": [],
6113
6006
  "state_mutability": "external"
6114
6007
  },
6115
6008
  {
6116
6009
  "type": "function",
6117
- "name": "redeem_ticket",
6010
+ "name": "pause_event",
6118
6011
  "inputs": [
6119
6012
  {
6120
6013
  "name": "token_id",
6121
6014
  "type": "core::integer::u256"
6015
+ },
6016
+ {
6017
+ "name": "active",
6018
+ "type": "core::bool"
6122
6019
  }
6123
6020
  ],
6124
6021
  "outputs": [],
@@ -6126,15 +6023,15 @@ var IPTicketCollectionABI = [
6126
6023
  },
6127
6024
  {
6128
6025
  "type": "function",
6129
- "name": "has_valid_ticket",
6026
+ "name": "is_valid",
6130
6027
  "inputs": [
6131
6028
  {
6132
- "name": "user",
6133
- "type": "core::starknet::contract_address::ContractAddress"
6029
+ "name": "token_id",
6030
+ "type": "core::integer::u256"
6134
6031
  },
6135
6032
  {
6136
- "name": "collection_id",
6137
- "type": "core::integer::u256"
6033
+ "name": "holder",
6034
+ "type": "core::starknet::contract_address::ContractAddress"
6138
6035
  }
6139
6036
  ],
6140
6037
  "outputs": [
@@ -6146,23 +6043,7 @@ var IPTicketCollectionABI = [
6146
6043
  },
6147
6044
  {
6148
6045
  "type": "function",
6149
- "name": "get_ticket_collection",
6150
- "inputs": [
6151
- {
6152
- "name": "collection_id",
6153
- "type": "core::integer::u256"
6154
- }
6155
- ],
6156
- "outputs": [
6157
- {
6158
- "type": "ip_ticket::types::TicketCollection"
6159
- }
6160
- ],
6161
- "state_mutability": "view"
6162
- },
6163
- {
6164
- "type": "function",
6165
- "name": "get_ticket_data",
6046
+ "name": "get_event",
6166
6047
  "inputs": [
6167
6048
  {
6168
6049
  "name": "token_id",
@@ -6171,72 +6052,34 @@ var IPTicketCollectionABI = [
6171
6052
  ],
6172
6053
  "outputs": [
6173
6054
  {
6174
- "type": "ip_ticket::types::TicketData"
6055
+ "type": "ip_ticket::types::EventRecord"
6175
6056
  }
6176
6057
  ],
6177
6058
  "state_mutability": "view"
6178
6059
  },
6179
6060
  {
6180
6061
  "type": "function",
6181
- "name": "get_ticket_collection_id",
6062
+ "name": "royalty_info",
6182
6063
  "inputs": [
6183
6064
  {
6184
6065
  "name": "token_id",
6185
6066
  "type": "core::integer::u256"
6186
- }
6187
- ],
6188
- "outputs": [
6189
- {
6190
- "type": "core::integer::u256"
6191
- }
6192
- ],
6193
- "state_mutability": "view"
6194
- },
6195
- {
6196
- "type": "function",
6197
- "name": "get_active_ticket_balance",
6198
- "inputs": [
6199
- {
6200
- "name": "user",
6201
- "type": "core::starknet::contract_address::ContractAddress"
6202
6067
  },
6203
6068
  {
6204
- "name": "collection_id",
6205
- "type": "core::integer::u256"
6206
- }
6207
- ],
6208
- "outputs": [
6209
- {
6210
- "type": "core::integer::u256"
6211
- }
6212
- ],
6213
- "state_mutability": "view"
6214
- },
6215
- {
6216
- "type": "function",
6217
- "name": "get_last_collection_id",
6218
- "inputs": [],
6219
- "outputs": [
6220
- {
6069
+ "name": "sale_price",
6221
6070
  "type": "core::integer::u256"
6222
6071
  }
6223
6072
  ],
6224
- "state_mutability": "view"
6225
- },
6226
- {
6227
- "type": "function",
6228
- "name": "total_supply",
6229
- "inputs": [],
6230
6073
  "outputs": [
6231
6074
  {
6232
- "type": "core::integer::u256"
6075
+ "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
6233
6076
  }
6234
6077
  ],
6235
6078
  "state_mutability": "view"
6236
6079
  },
6237
6080
  {
6238
6081
  "type": "function",
6239
- "name": "royalty_info",
6082
+ "name": "royaltyInfo",
6240
6083
  "inputs": [
6241
6084
  {
6242
6085
  "name": "token_id",
@@ -6256,20 +6099,11 @@ var IPTicketCollectionABI = [
6256
6099
  },
6257
6100
  {
6258
6101
  "type": "function",
6259
- "name": "royaltyInfo",
6260
- "inputs": [
6261
- {
6262
- "name": "token_id",
6263
- "type": "core::integer::u256"
6264
- },
6265
- {
6266
- "name": "sale_price",
6267
- "type": "core::integer::u256"
6268
- }
6269
- ],
6102
+ "name": "version",
6103
+ "inputs": [],
6270
6104
  "outputs": [
6271
6105
  {
6272
- "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
6106
+ "type": "core::byte_array::ByteArray"
6273
6107
  }
6274
6108
  ],
6275
6109
  "state_mutability": "view"
@@ -6278,8 +6112,28 @@ var IPTicketCollectionABI = [
6278
6112
  },
6279
6113
  {
6280
6114
  "type": "impl",
6281
- "name": "ERC721Impl",
6282
- "interface_name": "openzeppelin_token::erc721::interface::IERC721"
6115
+ "name": "ERC1155Impl",
6116
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155"
6117
+ },
6118
+ {
6119
+ "type": "struct",
6120
+ "name": "core::array::Span::<core::starknet::contract_address::ContractAddress>",
6121
+ "members": [
6122
+ {
6123
+ "name": "snapshot",
6124
+ "type": "@core::array::Array::<core::starknet::contract_address::ContractAddress>"
6125
+ }
6126
+ ]
6127
+ },
6128
+ {
6129
+ "type": "struct",
6130
+ "name": "core::array::Span::<core::integer::u256>",
6131
+ "members": [
6132
+ {
6133
+ "name": "snapshot",
6134
+ "type": "@core::array::Array::<core::integer::u256>"
6135
+ }
6136
+ ]
6283
6137
  },
6284
6138
  {
6285
6139
  "type": "struct",
@@ -6293,7 +6147,7 @@ var IPTicketCollectionABI = [
6293
6147
  },
6294
6148
  {
6295
6149
  "type": "interface",
6296
- "name": "openzeppelin_token::erc721::interface::IERC721",
6150
+ "name": "openzeppelin_token::erc1155::interface::IERC1155",
6297
6151
  "items": [
6298
6152
  {
6299
6153
  "type": "function",
@@ -6302,6 +6156,10 @@ var IPTicketCollectionABI = [
6302
6156
  {
6303
6157
  "name": "account",
6304
6158
  "type": "core::starknet::contract_address::ContractAddress"
6159
+ },
6160
+ {
6161
+ "name": "token_id",
6162
+ "type": "core::integer::u256"
6305
6163
  }
6306
6164
  ],
6307
6165
  "outputs": [
@@ -6313,16 +6171,20 @@ var IPTicketCollectionABI = [
6313
6171
  },
6314
6172
  {
6315
6173
  "type": "function",
6316
- "name": "owner_of",
6174
+ "name": "balance_of_batch",
6317
6175
  "inputs": [
6318
6176
  {
6319
- "name": "token_id",
6320
- "type": "core::integer::u256"
6177
+ "name": "accounts",
6178
+ "type": "core::array::Span::<core::starknet::contract_address::ContractAddress>"
6179
+ },
6180
+ {
6181
+ "name": "token_ids",
6182
+ "type": "core::array::Span::<core::integer::u256>"
6321
6183
  }
6322
6184
  ],
6323
6185
  "outputs": [
6324
6186
  {
6325
- "type": "core::starknet::contract_address::ContractAddress"
6187
+ "type": "core::array::Span::<core::integer::u256>"
6326
6188
  }
6327
6189
  ],
6328
6190
  "state_mutability": "view"
@@ -6343,6 +6205,10 @@ var IPTicketCollectionABI = [
6343
6205
  "name": "token_id",
6344
6206
  "type": "core::integer::u256"
6345
6207
  },
6208
+ {
6209
+ "name": "value",
6210
+ "type": "core::integer::u256"
6211
+ },
6346
6212
  {
6347
6213
  "name": "data",
6348
6214
  "type": "core::array::Span::<core::felt252>"
@@ -6353,7 +6219,7 @@ var IPTicketCollectionABI = [
6353
6219
  },
6354
6220
  {
6355
6221
  "type": "function",
6356
- "name": "transfer_from",
6222
+ "name": "safe_batch_transfer_from",
6357
6223
  "inputs": [
6358
6224
  {
6359
6225
  "name": "from",
@@ -6364,24 +6230,16 @@ var IPTicketCollectionABI = [
6364
6230
  "type": "core::starknet::contract_address::ContractAddress"
6365
6231
  },
6366
6232
  {
6367
- "name": "token_id",
6368
- "type": "core::integer::u256"
6369
- }
6370
- ],
6371
- "outputs": [],
6372
- "state_mutability": "external"
6373
- },
6374
- {
6375
- "type": "function",
6376
- "name": "approve",
6377
- "inputs": [
6233
+ "name": "token_ids",
6234
+ "type": "core::array::Span::<core::integer::u256>"
6235
+ },
6378
6236
  {
6379
- "name": "to",
6380
- "type": "core::starknet::contract_address::ContractAddress"
6237
+ "name": "values",
6238
+ "type": "core::array::Span::<core::integer::u256>"
6381
6239
  },
6382
6240
  {
6383
- "name": "token_id",
6384
- "type": "core::integer::u256"
6241
+ "name": "data",
6242
+ "type": "core::array::Span::<core::felt252>"
6385
6243
  }
6386
6244
  ],
6387
6245
  "outputs": [],
@@ -6389,66 +6247,50 @@ var IPTicketCollectionABI = [
6389
6247
  },
6390
6248
  {
6391
6249
  "type": "function",
6392
- "name": "set_approval_for_all",
6250
+ "name": "is_approved_for_all",
6393
6251
  "inputs": [
6394
6252
  {
6395
- "name": "operator",
6253
+ "name": "owner",
6396
6254
  "type": "core::starknet::contract_address::ContractAddress"
6397
6255
  },
6398
6256
  {
6399
- "name": "approved",
6400
- "type": "core::bool"
6401
- }
6402
- ],
6403
- "outputs": [],
6404
- "state_mutability": "external"
6405
- },
6406
- {
6407
- "type": "function",
6408
- "name": "get_approved",
6409
- "inputs": [
6410
- {
6411
- "name": "token_id",
6412
- "type": "core::integer::u256"
6257
+ "name": "operator",
6258
+ "type": "core::starknet::contract_address::ContractAddress"
6413
6259
  }
6414
6260
  ],
6415
6261
  "outputs": [
6416
6262
  {
6417
- "type": "core::starknet::contract_address::ContractAddress"
6263
+ "type": "core::bool"
6418
6264
  }
6419
6265
  ],
6420
6266
  "state_mutability": "view"
6421
6267
  },
6422
6268
  {
6423
6269
  "type": "function",
6424
- "name": "is_approved_for_all",
6270
+ "name": "set_approval_for_all",
6425
6271
  "inputs": [
6426
- {
6427
- "name": "owner",
6428
- "type": "core::starknet::contract_address::ContractAddress"
6429
- },
6430
6272
  {
6431
6273
  "name": "operator",
6432
6274
  "type": "core::starknet::contract_address::ContractAddress"
6433
- }
6434
- ],
6435
- "outputs": [
6275
+ },
6436
6276
  {
6277
+ "name": "approved",
6437
6278
  "type": "core::bool"
6438
6279
  }
6439
6280
  ],
6440
- "state_mutability": "view"
6281
+ "outputs": [],
6282
+ "state_mutability": "external"
6441
6283
  }
6442
6284
  ]
6443
6285
  },
6444
6286
  {
6445
6287
  "type": "impl",
6446
- "name": "ERC721CamelOnly",
6447
- "interface_name": "openzeppelin_token::erc721::interface::IERC721CamelOnly"
6288
+ "name": "ERC1155CamelImpl",
6289
+ "interface_name": "openzeppelin_token::erc1155::interface::IERC1155Camel"
6448
6290
  },
6449
6291
  {
6450
6292
  "type": "interface",
6451
- "name": "openzeppelin_token::erc721::interface::IERC721CamelOnly",
6293
+ "name": "openzeppelin_token::erc1155::interface::IERC1155Camel",
6452
6294
  "items": [
6453
6295
  {
6454
6296
  "type": "function",
@@ -6457,6 +6299,10 @@ var IPTicketCollectionABI = [
6457
6299
  {
6458
6300
  "name": "account",
6459
6301
  "type": "core::starknet::contract_address::ContractAddress"
6302
+ },
6303
+ {
6304
+ "name": "tokenId",
6305
+ "type": "core::integer::u256"
6460
6306
  }
6461
6307
  ],
6462
6308
  "outputs": [
@@ -6468,16 +6314,20 @@ var IPTicketCollectionABI = [
6468
6314
  },
6469
6315
  {
6470
6316
  "type": "function",
6471
- "name": "ownerOf",
6317
+ "name": "balanceOfBatch",
6472
6318
  "inputs": [
6473
6319
  {
6474
- "name": "tokenId",
6475
- "type": "core::integer::u256"
6320
+ "name": "accounts",
6321
+ "type": "core::array::Span::<core::starknet::contract_address::ContractAddress>"
6322
+ },
6323
+ {
6324
+ "name": "tokenIds",
6325
+ "type": "core::array::Span::<core::integer::u256>"
6476
6326
  }
6477
6327
  ],
6478
6328
  "outputs": [
6479
6329
  {
6480
- "type": "core::starknet::contract_address::ContractAddress"
6330
+ "type": "core::array::Span::<core::integer::u256>"
6481
6331
  }
6482
6332
  ],
6483
6333
  "state_mutability": "view"
@@ -6498,6 +6348,10 @@ var IPTicketCollectionABI = [
6498
6348
  "name": "tokenId",
6499
6349
  "type": "core::integer::u256"
6500
6350
  },
6351
+ {
6352
+ "name": "value",
6353
+ "type": "core::integer::u256"
6354
+ },
6501
6355
  {
6502
6356
  "name": "data",
6503
6357
  "type": "core::array::Span::<core::felt252>"
@@ -6508,7 +6362,7 @@ var IPTicketCollectionABI = [
6508
6362
  },
6509
6363
  {
6510
6364
  "type": "function",
6511
- "name": "transferFrom",
6365
+ "name": "safeBatchTransferFrom",
6512
6366
  "inputs": [
6513
6367
  {
6514
6368
  "name": "from",
@@ -6519,24 +6373,16 @@ var IPTicketCollectionABI = [
6519
6373
  "type": "core::starknet::contract_address::ContractAddress"
6520
6374
  },
6521
6375
  {
6522
- "name": "tokenId",
6523
- "type": "core::integer::u256"
6524
- }
6525
- ],
6526
- "outputs": [],
6527
- "state_mutability": "external"
6528
- },
6529
- {
6530
- "type": "function",
6531
- "name": "setApprovalForAll",
6532
- "inputs": [
6376
+ "name": "tokenIds",
6377
+ "type": "core::array::Span::<core::integer::u256>"
6378
+ },
6533
6379
  {
6534
- "name": "operator",
6535
- "type": "core::starknet::contract_address::ContractAddress"
6380
+ "name": "values",
6381
+ "type": "core::array::Span::<core::integer::u256>"
6536
6382
  },
6537
6383
  {
6538
- "name": "approved",
6539
- "type": "core::bool"
6384
+ "name": "data",
6385
+ "type": "core::array::Span::<core::felt252>"
6540
6386
  }
6541
6387
  ],
6542
6388
  "outputs": [],
@@ -6544,39 +6390,39 @@ var IPTicketCollectionABI = [
6544
6390
  },
6545
6391
  {
6546
6392
  "type": "function",
6547
- "name": "getApproved",
6393
+ "name": "isApprovedForAll",
6548
6394
  "inputs": [
6549
6395
  {
6550
- "name": "tokenId",
6551
- "type": "core::integer::u256"
6396
+ "name": "owner",
6397
+ "type": "core::starknet::contract_address::ContractAddress"
6398
+ },
6399
+ {
6400
+ "name": "operator",
6401
+ "type": "core::starknet::contract_address::ContractAddress"
6552
6402
  }
6553
6403
  ],
6554
6404
  "outputs": [
6555
6405
  {
6556
- "type": "core::starknet::contract_address::ContractAddress"
6406
+ "type": "core::bool"
6557
6407
  }
6558
6408
  ],
6559
6409
  "state_mutability": "view"
6560
6410
  },
6561
6411
  {
6562
6412
  "type": "function",
6563
- "name": "isApprovedForAll",
6413
+ "name": "setApprovalForAll",
6564
6414
  "inputs": [
6565
- {
6566
- "name": "owner",
6567
- "type": "core::starknet::contract_address::ContractAddress"
6568
- },
6569
6415
  {
6570
6416
  "name": "operator",
6571
6417
  "type": "core::starknet::contract_address::ContractAddress"
6572
- }
6573
- ],
6574
- "outputs": [
6418
+ },
6575
6419
  {
6420
+ "name": "approved",
6576
6421
  "type": "core::bool"
6577
6422
  }
6578
6423
  ],
6579
- "state_mutability": "view"
6424
+ "outputs": [],
6425
+ "state_mutability": "external"
6580
6426
  }
6581
6427
  ]
6582
6428
  },
@@ -6687,9 +6533,14 @@ var IPTicketCollectionABI = [
6687
6533
  },
6688
6534
  {
6689
6535
  "type": "event",
6690
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
6536
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferSingle",
6691
6537
  "kind": "struct",
6692
6538
  "members": [
6539
+ {
6540
+ "name": "operator",
6541
+ "type": "core::starknet::contract_address::ContractAddress",
6542
+ "kind": "key"
6543
+ },
6693
6544
  {
6694
6545
  "name": "from",
6695
6546
  "type": "core::starknet::contract_address::ContractAddress",
@@ -6701,37 +6552,52 @@ var IPTicketCollectionABI = [
6701
6552
  "kind": "key"
6702
6553
  },
6703
6554
  {
6704
- "name": "token_id",
6555
+ "name": "id",
6705
6556
  "type": "core::integer::u256",
6706
- "kind": "key"
6557
+ "kind": "data"
6558
+ },
6559
+ {
6560
+ "name": "value",
6561
+ "type": "core::integer::u256",
6562
+ "kind": "data"
6707
6563
  }
6708
6564
  ]
6709
6565
  },
6710
6566
  {
6711
6567
  "type": "event",
6712
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
6568
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferBatch",
6713
6569
  "kind": "struct",
6714
6570
  "members": [
6715
6571
  {
6716
- "name": "owner",
6572
+ "name": "operator",
6717
6573
  "type": "core::starknet::contract_address::ContractAddress",
6718
6574
  "kind": "key"
6719
6575
  },
6720
6576
  {
6721
- "name": "approved",
6577
+ "name": "from",
6722
6578
  "type": "core::starknet::contract_address::ContractAddress",
6723
6579
  "kind": "key"
6724
6580
  },
6725
6581
  {
6726
- "name": "token_id",
6727
- "type": "core::integer::u256",
6582
+ "name": "to",
6583
+ "type": "core::starknet::contract_address::ContractAddress",
6728
6584
  "kind": "key"
6585
+ },
6586
+ {
6587
+ "name": "ids",
6588
+ "type": "core::array::Span::<core::integer::u256>",
6589
+ "kind": "data"
6590
+ },
6591
+ {
6592
+ "name": "values",
6593
+ "type": "core::array::Span::<core::integer::u256>",
6594
+ "kind": "data"
6729
6595
  }
6730
6596
  ]
6731
6597
  },
6732
6598
  {
6733
6599
  "type": "event",
6734
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
6600
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::ApprovalForAll",
6735
6601
  "kind": "struct",
6736
6602
  "members": [
6737
6603
  {
@@ -6753,22 +6619,44 @@ var IPTicketCollectionABI = [
6753
6619
  },
6754
6620
  {
6755
6621
  "type": "event",
6756
- "name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
6622
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::URI",
6623
+ "kind": "struct",
6624
+ "members": [
6625
+ {
6626
+ "name": "value",
6627
+ "type": "core::byte_array::ByteArray",
6628
+ "kind": "data"
6629
+ },
6630
+ {
6631
+ "name": "id",
6632
+ "type": "core::integer::u256",
6633
+ "kind": "key"
6634
+ }
6635
+ ]
6636
+ },
6637
+ {
6638
+ "type": "event",
6639
+ "name": "openzeppelin_token::erc1155::erc1155::ERC1155Component::Event",
6757
6640
  "kind": "enum",
6758
6641
  "variants": [
6759
6642
  {
6760
- "name": "Transfer",
6761
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
6643
+ "name": "TransferSingle",
6644
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferSingle",
6762
6645
  "kind": "nested"
6763
6646
  },
6764
6647
  {
6765
- "name": "Approval",
6766
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
6648
+ "name": "TransferBatch",
6649
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::TransferBatch",
6767
6650
  "kind": "nested"
6768
6651
  },
6769
6652
  {
6770
6653
  "name": "ApprovalForAll",
6771
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
6654
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::ApprovalForAll",
6655
+ "kind": "nested"
6656
+ },
6657
+ {
6658
+ "name": "URI",
6659
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::URI",
6772
6660
  "kind": "nested"
6773
6661
  }
6774
6662
  ]
@@ -6832,42 +6720,27 @@ var IPTicketCollectionABI = [
6832
6720
  },
6833
6721
  {
6834
6722
  "type": "event",
6835
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketCollectionCreated",
6723
+ "name": "ip_ticket::IPTicketCollection::IPTicketCollection::EventCreated",
6836
6724
  "kind": "struct",
6837
6725
  "members": [
6838
6726
  {
6839
- "name": "collection_id",
6727
+ "name": "token_id",
6840
6728
  "type": "core::integer::u256",
6841
6729
  "kind": "key"
6842
6730
  },
6843
- {
6844
- "name": "creator",
6845
- "type": "core::starknet::contract_address::ContractAddress",
6846
- "kind": "key"
6847
- },
6848
- {
6849
- "name": "price",
6850
- "type": "core::integer::u256",
6851
- "kind": "data"
6852
- },
6853
6731
  {
6854
6732
  "name": "max_supply",
6855
6733
  "type": "core::integer::u256",
6856
6734
  "kind": "data"
6857
6735
  },
6858
6736
  {
6859
- "name": "expiration",
6860
- "type": "core::integer::u64",
6861
- "kind": "data"
6862
- },
6863
- {
6864
- "name": "royalty_bps",
6865
- "type": "core::integer::u256",
6737
+ "name": "start_time",
6738
+ "type": "core::option::Option::<core::integer::u64>",
6866
6739
  "kind": "data"
6867
6740
  },
6868
6741
  {
6869
- "name": "payment_token",
6870
- "type": "core::option::Option::<core::starknet::contract_address::ContractAddress>",
6742
+ "name": "end_time",
6743
+ "type": "core::option::Option::<core::integer::u64>",
6871
6744
  "kind": "data"
6872
6745
  },
6873
6746
  {
@@ -6884,11 +6757,11 @@ var IPTicketCollectionABI = [
6884
6757
  },
6885
6758
  {
6886
6759
  "type": "event",
6887
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::CollectionStatusUpdated",
6760
+ "name": "ip_ticket::IPTicketCollection::IPTicketCollection::EventPaused",
6888
6761
  "kind": "struct",
6889
6762
  "members": [
6890
6763
  {
6891
- "name": "collection_id",
6764
+ "name": "token_id",
6892
6765
  "type": "core::integer::u256",
6893
6766
  "kind": "key"
6894
6767
  },
@@ -6896,65 +6769,6 @@ var IPTicketCollectionABI = [
6896
6769
  "name": "active",
6897
6770
  "type": "core::bool",
6898
6771
  "kind": "data"
6899
- },
6900
- {
6901
- "name": "updated_at",
6902
- "type": "core::integer::u64",
6903
- "kind": "data"
6904
- }
6905
- ]
6906
- },
6907
- {
6908
- "type": "event",
6909
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketMinted",
6910
- "kind": "struct",
6911
- "members": [
6912
- {
6913
- "name": "token_id",
6914
- "type": "core::integer::u256",
6915
- "kind": "key"
6916
- },
6917
- {
6918
- "name": "collection_id",
6919
- "type": "core::integer::u256",
6920
- "kind": "key"
6921
- },
6922
- {
6923
- "name": "owner",
6924
- "type": "core::starknet::contract_address::ContractAddress",
6925
- "kind": "key"
6926
- },
6927
- {
6928
- "name": "minted_at",
6929
- "type": "core::integer::u64",
6930
- "kind": "data"
6931
- }
6932
- ]
6933
- },
6934
- {
6935
- "type": "event",
6936
- "name": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketRedeemed",
6937
- "kind": "struct",
6938
- "members": [
6939
- {
6940
- "name": "token_id",
6941
- "type": "core::integer::u256",
6942
- "kind": "key"
6943
- },
6944
- {
6945
- "name": "collection_id",
6946
- "type": "core::integer::u256",
6947
- "kind": "key"
6948
- },
6949
- {
6950
- "name": "owner",
6951
- "type": "core::starknet::contract_address::ContractAddress",
6952
- "kind": "key"
6953
- },
6954
- {
6955
- "name": "redeemed_at",
6956
- "type": "core::integer::u64",
6957
- "kind": "data"
6958
6772
  }
6959
6773
  ]
6960
6774
  },
@@ -6964,8 +6778,8 @@ var IPTicketCollectionABI = [
6964
6778
  "kind": "enum",
6965
6779
  "variants": [
6966
6780
  {
6967
- "name": "ERC721Event",
6968
- "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
6781
+ "name": "ERC1155Event",
6782
+ "type": "openzeppelin_token::erc1155::erc1155::ERC1155Component::Event",
6969
6783
  "kind": "flat"
6970
6784
  },
6971
6785
  {
@@ -6979,23 +6793,13 @@ var IPTicketCollectionABI = [
6979
6793
  "kind": "flat"
6980
6794
  },
6981
6795
  {
6982
- "name": "TicketCollectionCreated",
6983
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketCollectionCreated",
6984
- "kind": "nested"
6985
- },
6986
- {
6987
- "name": "CollectionStatusUpdated",
6988
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::CollectionStatusUpdated",
6989
- "kind": "nested"
6990
- },
6991
- {
6992
- "name": "TicketMinted",
6993
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketMinted",
6796
+ "name": "EventCreated",
6797
+ "type": "ip_ticket::IPTicketCollection::IPTicketCollection::EventCreated",
6994
6798
  "kind": "nested"
6995
6799
  },
6996
6800
  {
6997
- "name": "TicketRedeemed",
6998
- "type": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketRedeemed",
6801
+ "name": "EventPaused",
6802
+ "type": "ip_ticket::IPTicketCollection::IPTicketCollection::EventPaused",
6999
6803
  "kind": "nested"
7000
6804
  }
7001
6805
  ]
@@ -7055,7 +6859,7 @@ var IPTicketCollectionFactoryABI = [
7055
6859
  },
7056
6860
  {
7057
6861
  "type": "function",
7058
- "name": "deploy_ticket_collection",
6862
+ "name": "deploy_collection",
7059
6863
  "inputs": [
7060
6864
  {
7061
6865
  "name": "name",
@@ -7075,6 +6879,47 @@ var IPTicketCollectionFactoryABI = [
7075
6879
  }
7076
6880
  ]
7077
6881
  },
6882
+ {
6883
+ "type": "impl",
6884
+ "name": "SRC5Impl",
6885
+ "interface_name": "openzeppelin_introspection::interface::ISRC5"
6886
+ },
6887
+ {
6888
+ "type": "enum",
6889
+ "name": "core::bool",
6890
+ "variants": [
6891
+ {
6892
+ "name": "False",
6893
+ "type": "()"
6894
+ },
6895
+ {
6896
+ "name": "True",
6897
+ "type": "()"
6898
+ }
6899
+ ]
6900
+ },
6901
+ {
6902
+ "type": "interface",
6903
+ "name": "openzeppelin_introspection::interface::ISRC5",
6904
+ "items": [
6905
+ {
6906
+ "type": "function",
6907
+ "name": "supports_interface",
6908
+ "inputs": [
6909
+ {
6910
+ "name": "interface_id",
6911
+ "type": "core::felt252"
6912
+ }
6913
+ ],
6914
+ "outputs": [
6915
+ {
6916
+ "type": "core::bool"
6917
+ }
6918
+ ],
6919
+ "state_mutability": "view"
6920
+ }
6921
+ ]
6922
+ },
7078
6923
  {
7079
6924
  "type": "constructor",
7080
6925
  "name": "constructor",
@@ -7085,6 +6930,12 @@ var IPTicketCollectionFactoryABI = [
7085
6930
  }
7086
6931
  ]
7087
6932
  },
6933
+ {
6934
+ "type": "event",
6935
+ "name": "openzeppelin_introspection::src5::SRC5Component::Event",
6936
+ "kind": "enum",
6937
+ "variants": []
6938
+ },
7088
6939
  {
7089
6940
  "type": "event",
7090
6941
  "name": "ip_ticket::IPTicketCollectionFactory::IPTicketCollectionFactory::CollectionDeployed",
@@ -7117,6 +6968,11 @@ var IPTicketCollectionFactoryABI = [
7117
6968
  "name": "ip_ticket::IPTicketCollectionFactory::IPTicketCollectionFactory::Event",
7118
6969
  "kind": "enum",
7119
6970
  "variants": [
6971
+ {
6972
+ "name": "SRC5Event",
6973
+ "type": "openzeppelin_introspection::src5::SRC5Component::Event",
6974
+ "kind": "flat"
6975
+ },
7120
6976
  {
7121
6977
  "name": "CollectionDeployed",
7122
6978
  "type": "ip_ticket::IPTicketCollectionFactory::IPTicketCollectionFactory::CollectionDeployed",
@@ -12813,66 +12669,84 @@ var CreatorCoinService = class {
12813
12669
  };
12814
12670
  var TicketService = class {
12815
12671
  constructor(config) {
12672
+ this.config = config;
12816
12673
  this.factoryAddress = getStarknetCoordinates(config.chain).ipTicketsFactory;
12817
12674
  }
12675
+ _factory(account, factoryAddress) {
12676
+ const address = factoryAddress ?? this.factoryAddress;
12677
+ if (!address) throw new Error("IP-Tickets factory address not configured for this chain");
12678
+ return new starknet.Contract(IPTicketCollectionFactoryABI, normalizeAddress("STARKNET", address), account);
12679
+ }
12818
12680
  _collection(address, account) {
12819
12681
  return new starknet.Contract(IPTicketCollectionABI, normalizeAddress("STARKNET", address), account);
12820
12682
  }
12821
- /** Deploys a new IPTicketCollection via the factory. Caller becomes its owner. */
12822
- async deployTicketCollection(account, params) {
12823
- const factoryAddress = params.factoryAddress ?? this.factoryAddress;
12824
- if (!factoryAddress) {
12825
- throw new Error("IP-Tickets factory address not configured for this chain");
12826
- }
12827
- const factory = new starknet.Contract(IPTicketCollectionFactoryABI, factoryAddress, account);
12828
- const call = factory.populate("deploy_ticket_collection", [params.name, params.symbol]);
12683
+ _collectionRead(address) {
12684
+ const provider = new starknet.RpcProvider({ nodeUrl: this.config.rpcUrl });
12685
+ return new starknet.Contract(IPTicketCollectionABI, normalizeAddress("STARKNET", address), provider);
12686
+ }
12687
+ /** Deploys a new IPTicketCollection via the factory. Caller becomes owner. */
12688
+ async deployCollection(account, params) {
12689
+ const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [params.name, params.symbol]);
12829
12690
  const res = await account.execute([call]);
12830
12691
  return { txHash: res.transaction_hash };
12831
12692
  }
12832
- /** Owner-only. Creates a new ticket collection (event/tier) inside the caller's deployed IPTicketCollection. */
12833
- async createTicketCollection(account, params) {
12834
- const paymentToken = params.paymentToken ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.paymentToken) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
12835
- const call = this._collection(params.collection, account).populate("create_ticket_collection", [
12836
- starknet.cairo.uint256(params.price),
12693
+ /** Owner-only. Creates a new event inside the caller's deployed collection. */
12694
+ async createEvent(account, params) {
12695
+ const startTime = params.startTime != null ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.startTime) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
12696
+ const endTime = params.endTime != null ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.endTime) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
12697
+ const call = this._collection(params.collection, account).populate("create_event", [
12837
12698
  starknet.cairo.uint256(params.maxSupply),
12838
- params.expiration,
12699
+ startTime,
12700
+ endTime,
12839
12701
  params.royaltyBps,
12840
- paymentToken,
12841
12702
  params.metadataUri
12842
12703
  ]);
12843
12704
  const res = await account.execute([call]);
12844
12705
  return { txHash: res.transaction_hash };
12845
12706
  }
12846
- /** Owner-only. Gates minting only existing tickets keep access/transfer/redeem. */
12847
- async setCollectionActive(account, params) {
12848
- const call = this._collection(params.collection, account).populate("set_collection_active", [
12849
- starknet.cairo.uint256(params.collectionId),
12850
- params.active
12707
+ /** Owner-only. Mints `amount` of `tokenId` to `to`. */
12708
+ async mint(account, params) {
12709
+ const call = this._collection(params.collection, account).populate("mint", [
12710
+ params.to,
12711
+ starknet.cairo.uint256(params.tokenId),
12712
+ starknet.cairo.uint256(params.amount)
12851
12713
  ]);
12852
12714
  const res = await account.execute([call]);
12853
12715
  return { txHash: res.transaction_hash };
12854
12716
  }
12855
- /** Mints a ticket. Prepends an ERC-20 approve when the collection is paid. */
12856
- async mintTicket(account, params) {
12857
- const calls = [];
12858
- if (params.paymentToken && params.price && BigInt(params.price) > 0n) {
12859
- const amount = starknet.cairo.uint256(params.price);
12860
- calls.push({
12861
- contractAddress: params.paymentToken,
12862
- entrypoint: "approve",
12863
- calldata: [normalizeAddress("STARKNET", params.collection), amount.low.toString(), amount.high.toString()]
12864
- });
12865
- }
12866
- calls.push(this._collection(params.collection, account).populate("mint_ticket", [starknet.cairo.uint256(params.collectionId)]));
12867
- const res = await account.execute(calls);
12868
- return { txHash: res.transaction_hash };
12869
- }
12870
- /** Only the current token owner may redeem. */
12871
- async redeemTicket(account, params) {
12872
- const call = this._collection(params.collection, account).populate("redeem_ticket", [starknet.cairo.uint256(params.tokenId)]);
12717
+ /** Owner-only. Pauses or resumes minting for one event. */
12718
+ async pauseEvent(account, params) {
12719
+ const call = this._collection(params.collection, account).populate("pause_event", [
12720
+ starknet.cairo.uint256(params.tokenId),
12721
+ params.active
12722
+ ]);
12873
12723
  const res = await account.execute([call]);
12874
12724
  return { txHash: res.transaction_hash };
12875
12725
  }
12726
+ /** Read — true if holder has balance > 0 and current time is within the event window. */
12727
+ async isValid(params) {
12728
+ const result = await this._collectionRead(params.collection).call("is_valid", [
12729
+ starknet.cairo.uint256(params.tokenId),
12730
+ params.holder
12731
+ ]);
12732
+ return Boolean(result);
12733
+ }
12734
+ /** Read — returns the EventRecord for a token ID. */
12735
+ async getEvent(params) {
12736
+ const ev = await this._collectionRead(params.collection).call("get_event", [
12737
+ starknet.cairo.uint256(params.tokenId)
12738
+ ]);
12739
+ return {
12740
+ creator: ev.creator,
12741
+ maxSupply: BigInt(ev.max_supply),
12742
+ minted: BigInt(ev.minted),
12743
+ startTime: ev.start_time?.variant === "Some" ? Number(ev.start_time.values[0] ?? ev.start_time.value) : null,
12744
+ endTime: ev.end_time?.variant === "Some" ? Number(ev.end_time.values[0] ?? ev.end_time.value) : null,
12745
+ royaltyBps: Number(ev.royalty_bps),
12746
+ metadataUri: ev.metadata_uri,
12747
+ active: Boolean(ev.active)
12748
+ };
12749
+ }
12876
12750
  };
12877
12751
  var ClubService = class {
12878
12752
  constructor(config) {