@medialane/sdk 0.38.0 → 0.39.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
@@ -18,10 +18,10 @@ var COORDINATES = {
18
18
  marketplace1155: "0x040cd7b3e73bb3c892166e34bdc01d1797f97ecbc356c23f1cf38033cacf0077",
19
19
  marketplace1155ClassHash: "0x02600bb720908f119afe482309d36c39d087587f0df9576454acfb6363e78cd8",
20
20
  marketplace1155StartBlock: 10350855,
21
- collection721: "0x0322cb7119955e01ac778d40976eb3ba50540bb0899f812d612f9c7e63e49fd2",
22
- collection721StartBlock: 10046166,
23
- ipNftClassHash: "0x27ee4ded786d51bced1e94afec3034d6ffce71c032c45ee1ff283ccfa9db12e",
24
- ipCollectionClassHash: "0x287ccdff8b6655a2248cfe170d82eae3a35303cd00ef3e751b25ddca26d9095",
21
+ collection721: "0x0558c9b6ea4d403df6d765fb77be55702c572f0a811f037c6c4209fe1e5aeef2",
22
+ collection721StartBlock: 11002817,
23
+ ipNftClassHash: "0x040551f0d009a6d665ddff980a375dfccc71a8928c8bfcc9ab56244bc4464fab",
24
+ ipCollectionClassHash: "0x063d4ac4ae317fd155216bf1b8a4d3a63172ff72965b9ac48dd5add0c2d32b70",
25
25
  collection1155: "0x0083543c3ee15040a419fc539fa6889f5b956e7d071bcfa97842cb0ae42ad6cc",
26
26
  collection1155FactoryClassHash: "0x331a69da8655a882ba1fbcb55188b8fa09116521db901bbbaafc9fead0689f8",
27
27
  collection1155ClassHash: "0x4e110b59af240ae6c7742999964c4eae13fb2ed935c47fe97653ec017ebea34",
@@ -2998,7 +2998,7 @@ var IPCollectionABI = [
2998
2998
  "type": "core::integer::u256"
2999
2999
  },
3000
3000
  {
3001
- "name": "total_transfers",
3001
+ "name": "protocol_routed_transfers",
3002
3002
  "type": "core::integer::u256"
3003
3003
  },
3004
3004
  {
@@ -3088,6 +3088,10 @@ var IPCollectionABI = [
3088
3088
  {
3089
3089
  "name": "token_uri",
3090
3090
  "type": "core::byte_array::ByteArray"
3091
+ },
3092
+ {
3093
+ "name": "royalty_bps",
3094
+ "type": "core::integer::u128"
3091
3095
  }
3092
3096
  ],
3093
3097
  "outputs": [
@@ -3112,6 +3116,10 @@ var IPCollectionABI = [
3112
3116
  {
3113
3117
  "name": "token_uris",
3114
3118
  "type": "core::array::Array::<core::byte_array::ByteArray>"
3119
+ },
3120
+ {
3121
+ "name": "royalty_bps",
3122
+ "type": "core::array::Array::<core::integer::u128>"
3115
3123
  }
3116
3124
  ],
3117
3125
  "outputs": [
@@ -3142,8 +3150,12 @@ var IPCollectionABI = [
3142
3150
  "name": "archive",
3143
3151
  "inputs": [
3144
3152
  {
3145
- "name": "token",
3146
- "type": "core::byte_array::ByteArray"
3153
+ "name": "collection_id",
3154
+ "type": "core::integer::u256"
3155
+ },
3156
+ {
3157
+ "name": "token_id",
3158
+ "type": "core::integer::u256"
3147
3159
  }
3148
3160
  ],
3149
3161
  "outputs": [],
@@ -3154,8 +3166,12 @@ var IPCollectionABI = [
3154
3166
  "name": "batch_archive",
3155
3167
  "inputs": [
3156
3168
  {
3157
- "name": "tokens",
3158
- "type": "core::array::Array::<core::byte_array::ByteArray>"
3169
+ "name": "collection_ids",
3170
+ "type": "core::array::Array::<core::integer::u256>"
3171
+ },
3172
+ {
3173
+ "name": "token_ids",
3174
+ "type": "core::array::Array::<core::integer::u256>"
3159
3175
  }
3160
3176
  ],
3161
3177
  "outputs": [],
@@ -3166,16 +3182,16 @@ var IPCollectionABI = [
3166
3182
  "name": "transfer_token",
3167
3183
  "inputs": [
3168
3184
  {
3169
- "name": "from",
3185
+ "name": "to",
3170
3186
  "type": "core::starknet::contract_address::ContractAddress"
3171
3187
  },
3172
3188
  {
3173
- "name": "to",
3174
- "type": "core::starknet::contract_address::ContractAddress"
3189
+ "name": "collection_id",
3190
+ "type": "core::integer::u256"
3175
3191
  },
3176
3192
  {
3177
- "name": "token",
3178
- "type": "core::byte_array::ByteArray"
3193
+ "name": "token_id",
3194
+ "type": "core::integer::u256"
3179
3195
  }
3180
3196
  ],
3181
3197
  "outputs": [],
@@ -3194,8 +3210,12 @@ var IPCollectionABI = [
3194
3210
  "type": "core::starknet::contract_address::ContractAddress"
3195
3211
  },
3196
3212
  {
3197
- "name": "tokens",
3198
- "type": "core::array::Array::<core::byte_array::ByteArray>"
3213
+ "name": "collection_ids",
3214
+ "type": "core::array::Array::<core::integer::u256>"
3215
+ },
3216
+ {
3217
+ "name": "token_ids",
3218
+ "type": "core::array::Array::<core::integer::u256>"
3199
3219
  }
3200
3220
  ],
3201
3221
  "outputs": [],
@@ -3264,6 +3284,17 @@ var IPCollectionABI = [
3264
3284
  ],
3265
3285
  "state_mutability": "view"
3266
3286
  },
3287
+ {
3288
+ "type": "function",
3289
+ "name": "version",
3290
+ "inputs": [],
3291
+ "outputs": [
3292
+ {
3293
+ "type": "core::byte_array::ByteArray"
3294
+ }
3295
+ ],
3296
+ "state_mutability": "view"
3297
+ },
3267
3298
  {
3268
3299
  "type": "function",
3269
3300
  "name": "is_valid_collection",
@@ -3321,8 +3352,12 @@ var IPCollectionABI = [
3321
3352
  "name": "get_token",
3322
3353
  "inputs": [
3323
3354
  {
3324
- "name": "token",
3325
- "type": "core::byte_array::ByteArray"
3355
+ "name": "collection_id",
3356
+ "type": "core::integer::u256"
3357
+ },
3358
+ {
3359
+ "name": "token_id",
3360
+ "type": "core::integer::u256"
3326
3361
  }
3327
3362
  ],
3328
3363
  "outputs": [
@@ -3337,8 +3372,12 @@ var IPCollectionABI = [
3337
3372
  "name": "is_valid_token",
3338
3373
  "inputs": [
3339
3374
  {
3340
- "name": "token",
3341
- "type": "core::byte_array::ByteArray"
3375
+ "name": "collection_id",
3376
+ "type": "core::integer::u256"
3377
+ },
3378
+ {
3379
+ "name": "token_id",
3380
+ "type": "core::integer::u256"
3342
3381
  }
3343
3382
  ],
3344
3383
  "outputs": [
@@ -3353,8 +3392,12 @@ var IPCollectionABI = [
3353
3392
  "name": "is_transferable_token",
3354
3393
  "inputs": [
3355
3394
  {
3356
- "name": "token",
3357
- "type": "core::byte_array::ByteArray"
3395
+ "name": "collection_id",
3396
+ "type": "core::integer::u256"
3397
+ },
3398
+ {
3399
+ "name": "token_id",
3400
+ "type": "core::integer::u256"
3358
3401
  }
3359
3402
  ],
3360
3403
  "outputs": [
@@ -3459,6 +3502,11 @@ var IPCollectionABI = [
3459
3502
  "name": "metadata_uri",
3460
3503
  "type": "core::byte_array::ByteArray",
3461
3504
  "kind": "data"
3505
+ },
3506
+ {
3507
+ "name": "royalty_bps",
3508
+ "type": "core::integer::u128",
3509
+ "kind": "data"
3462
3510
  }
3463
3511
  ]
3464
3512
  },
@@ -3482,6 +3530,11 @@ var IPCollectionABI = [
3482
3530
  "type": "core::array::Array::<core::starknet::contract_address::ContractAddress>",
3483
3531
  "kind": "data"
3484
3532
  },
3533
+ {
3534
+ "name": "metadata_uris",
3535
+ "type": "core::array::Array::<core::byte_array::ByteArray>",
3536
+ "kind": "data"
3537
+ },
3485
3538
  {
3486
3539
  "name": "operator",
3487
3540
  "type": "core::starknet::contract_address::ContractAddress",
@@ -3527,8 +3580,13 @@ var IPCollectionABI = [
3527
3580
  "kind": "struct",
3528
3581
  "members": [
3529
3582
  {
3530
- "name": "tokens",
3531
- "type": "core::array::Array::<core::byte_array::ByteArray>",
3583
+ "name": "collection_ids",
3584
+ "type": "core::array::Span::<core::integer::u256>",
3585
+ "kind": "data"
3586
+ },
3587
+ {
3588
+ "name": "token_ids",
3589
+ "type": "core::array::Span::<core::integer::u256>",
3532
3590
  "kind": "data"
3533
3591
  },
3534
3592
  {
@@ -3596,8 +3654,13 @@ var IPCollectionABI = [
3596
3654
  "kind": "data"
3597
3655
  },
3598
3656
  {
3599
- "name": "tokens",
3600
- "type": "core::array::Array::<core::byte_array::ByteArray>",
3657
+ "name": "collection_ids",
3658
+ "type": "core::array::Span::<core::integer::u256>",
3659
+ "kind": "data"
3660
+ },
3661
+ {
3662
+ "name": "token_ids",
3663
+ "type": "core::array::Span::<core::integer::u256>",
3601
3664
  "kind": "data"
3602
3665
  },
3603
3666
  {
@@ -3823,6 +3886,10 @@ var IPNftABI = [
3823
3886
  {
3824
3887
  "name": "creator",
3825
3888
  "type": "core::starknet::contract_address::ContractAddress"
3889
+ },
3890
+ {
3891
+ "name": "royalty_bps",
3892
+ "type": "core::integer::u128"
3826
3893
  }
3827
3894
  ],
3828
3895
  "outputs": [],
@@ -3878,6 +3945,17 @@ var IPNftABI = [
3878
3945
  ],
3879
3946
  "state_mutability": "view"
3880
3947
  },
3948
+ {
3949
+ "type": "function",
3950
+ "name": "version",
3951
+ "inputs": [],
3952
+ "outputs": [
3953
+ {
3954
+ "type": "core::byte_array::ByteArray"
3955
+ }
3956
+ ],
3957
+ "state_mutability": "view"
3958
+ },
3881
3959
  {
3882
3960
  "type": "function",
3883
3961
  "name": "base_uri",
@@ -4360,6 +4438,75 @@ var IPNftABI = [
4360
4438
  }
4361
4439
  ]
4362
4440
  },
4441
+ {
4442
+ "type": "impl",
4443
+ "name": "ERC2981Impl",
4444
+ "interface_name": "openzeppelin_token::common::erc2981::interface::IERC2981"
4445
+ },
4446
+ {
4447
+ "type": "interface",
4448
+ "name": "openzeppelin_token::common::erc2981::interface::IERC2981",
4449
+ "items": [
4450
+ {
4451
+ "type": "function",
4452
+ "name": "royalty_info",
4453
+ "inputs": [
4454
+ {
4455
+ "name": "token_id",
4456
+ "type": "core::integer::u256"
4457
+ },
4458
+ {
4459
+ "name": "sale_price",
4460
+ "type": "core::integer::u256"
4461
+ }
4462
+ ],
4463
+ "outputs": [
4464
+ {
4465
+ "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)"
4466
+ }
4467
+ ],
4468
+ "state_mutability": "view"
4469
+ }
4470
+ ]
4471
+ },
4472
+ {
4473
+ "type": "impl",
4474
+ "name": "ERC2981InfoImpl",
4475
+ "interface_name": "openzeppelin_token::common::erc2981::interface::IERC2981Info"
4476
+ },
4477
+ {
4478
+ "type": "interface",
4479
+ "name": "openzeppelin_token::common::erc2981::interface::IERC2981Info",
4480
+ "items": [
4481
+ {
4482
+ "type": "function",
4483
+ "name": "default_royalty",
4484
+ "inputs": [],
4485
+ "outputs": [
4486
+ {
4487
+ "type": "(core::starknet::contract_address::ContractAddress, core::integer::u128, core::integer::u128)"
4488
+ }
4489
+ ],
4490
+ "state_mutability": "view"
4491
+ },
4492
+ {
4493
+ "type": "function",
4494
+ "name": "token_royalty",
4495
+ "inputs": [
4496
+ {
4497
+ "name": "token_id",
4498
+ "type": "core::integer::u256"
4499
+ }
4500
+ ],
4501
+ "outputs": [
4502
+ {
4503
+ "type": "(core::starknet::contract_address::ContractAddress, core::integer::u128, core::integer::u128)"
4504
+ }
4505
+ ],
4506
+ "state_mutability": "view"
4507
+ }
4508
+ ]
4509
+ },
4363
4510
  {
4364
4511
  "type": "constructor",
4365
4512
  "name": "constructor",
@@ -4486,6 +4633,12 @@ var IPNftABI = [
4486
4633
  "kind": "enum",
4487
4634
  "variants": []
4488
4635
  },
4636
+ {
4637
+ "type": "event",
4638
+ "name": "openzeppelin_token::common::erc2981::erc2981::ERC2981Component::Event",
4639
+ "kind": "enum",
4640
+ "variants": []
4641
+ },
4489
4642
  {
4490
4643
  "type": "event",
4491
4644
  "name": "ip_collection_erc_721::IPNft::IPNft::Event",
@@ -4505,6 +4658,11 @@ var IPNftABI = [
4505
4658
  "name": "ERC721EnumerableEvent",
4506
4659
  "type": "openzeppelin_token::erc721::extensions::erc721_enumerable::erc721_enumerable::ERC721EnumerableComponent::Event",
4507
4660
  "kind": "flat"
4661
+ },
4662
+ {
4663
+ "name": "ERC2981Event",
4664
+ "type": "openzeppelin_token::common::erc2981::erc2981::ERC2981Component::Event",
4665
+ "kind": "flat"
4508
4666
  }
4509
4667
  ]
4510
4668
  }
@@ -4958,11 +5116,17 @@ async function cancelOrder(account, params, config) {
4958
5116
  }
4959
5117
  }
4960
5118
  async function mint(account, params, config) {
4961
- const { collectionId, recipient, tokenUri, collectionContract } = params;
5119
+ const { collectionId, recipient, tokenUri, royaltyBps, collectionContract } = params;
4962
5120
  const provider = getProvider(config);
4963
5121
  const contractAddress = collectionContract ?? config.collectionContract;
4964
5122
  const id = starknet.cairo.uint256(collectionId);
4965
- const calldata = [id.low.toString(), id.high.toString(), recipient, ...encodeByteArray(tokenUri)];
5123
+ const calldata = [
5124
+ id.low.toString(),
5125
+ id.high.toString(),
5126
+ recipient,
5127
+ ...encodeByteArray(tokenUri),
5128
+ royaltyBps.toString()
5129
+ ];
4966
5130
  try {
4967
5131
  const tx = await account.execute([{ contractAddress, entrypoint: "mint", calldata }]);
4968
5132
  await provider.waitForTransaction(tx.transaction_hash);