@medialane/sdk 0.37.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/README.md +18 -6
- package/dist/index.cjs +206 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +187 -25
- package/dist/index.d.ts +187 -25
- package/dist/index.js +206 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,8 +64,8 @@ yarn add @medialane/sdk starknet
|
|
|
64
64
|
import { MedialaneClient } from "@medialane/sdk";
|
|
65
65
|
|
|
66
66
|
const client = new MedialaneClient({
|
|
67
|
-
|
|
68
|
-
rpcUrl: "https://rpc.starknet.lava.build", // optional; defaults to
|
|
67
|
+
chain: "STARKNET", // chain-scoped (default "STARKNET"); replaces `network` (v0.37.0)
|
|
68
|
+
rpcUrl: "https://rpc.starknet.lava.build", // optional; defaults to the chain's registry rpcUrl
|
|
69
69
|
backendUrl: "https://medialane-backend-production.up.railway.app", // required for .api methods
|
|
70
70
|
apiKey: "ml_live_...", // from Medialane Portal
|
|
71
71
|
});
|
|
@@ -412,8 +412,11 @@ const token = getTokenByAddress("0x033068...");
|
|
|
412
412
|
|
|
413
413
|
```typescript
|
|
414
414
|
import {
|
|
415
|
-
normalizeAddress, //
|
|
416
|
-
shortenAddress, // → "0x1234...5678"
|
|
415
|
+
normalizeAddress, // (chain, address) → canonical form per chain (Starknet pad / EVM EIP-55 / Solana base58)
|
|
416
|
+
shortenAddress, // (chain, address) → "0x1234...5678"
|
|
417
|
+
getCoordinates, // (chain) → that chain's service coordinates from the registry
|
|
418
|
+
CHAINS, // readonly ["STARKNET","ETHEREUM","SOLANA","BASE","BITCOIN"]
|
|
419
|
+
type Chain,
|
|
417
420
|
parseAmount, // Human-readable → smallest unit BigInt ("1.5", 6) → 1500000n
|
|
418
421
|
formatAmount, // Smallest unit → human-readable ("1500000", 6) → "1.5"
|
|
419
422
|
stringifyBigInts, // Recursively convert BigInt → string (for JSON)
|
|
@@ -454,8 +457,8 @@ try {
|
|
|
454
457
|
|
|
455
458
|
| Option | Type | Default | Description |
|
|
456
459
|
|---|---|---|---|
|
|
457
|
-
| `
|
|
458
|
-
| `rpcUrl` | `string` |
|
|
460
|
+
| `chain` | `Chain` (`"STARKNET" \| "ETHEREUM" \| "SOLANA" \| "BASE" \| "BITCOIN"`) | `"STARKNET"` | The chain this client is scoped to. Coordinates resolve from the `coordinates[chain]` registry (`chains.ts`). Replaces `network` (v0.37.0). |
|
|
461
|
+
| `rpcUrl` | `string` | the chain's registry `rpcUrl` | JSON-RPC URL override |
|
|
459
462
|
| `backendUrl` | `string` | — | Medialane API base URL (required for `.api.*`) |
|
|
460
463
|
| `apiKey` | `string` | — | API key from [Medialane Portal](https://medialane.xyz) |
|
|
461
464
|
| `marketplace721Contract` | `string` | Mainnet default | ERC-721 marketplace protocol override |
|
|
@@ -503,6 +506,15 @@ Built with:
|
|
|
503
506
|
|
|
504
507
|
## Changelog
|
|
505
508
|
|
|
509
|
+
> Full history in [CHANGELOG.md](./CHANGELOG.md). Highlights below.
|
|
510
|
+
|
|
511
|
+
### v0.37.0 — multichain readiness (BREAKING)
|
|
512
|
+
- **Chain is a first-class axis.** New `chains.ts` `coordinates[chain]` registry is the single source of per-chain service coordinates (`CHAINS`, `getCoordinates`, `DEFAULT_CHAIN`, `Chain`, `ChainCoordinates`); the flat `*_MAINNET` constants derive from it.
|
|
513
|
+
- **`MedialaneConfig.chain` replaces `network`** — the client is chain-scoped; `client.network` getter → `client.chain`.
|
|
514
|
+
- **`ServiceDefinition.onchain` is per-chain** — `Partial<Record<Chain, …>>`; read `service.onchain?.STARKNET?.factoryAddress`.
|
|
515
|
+
- **`normalizeAddress(chain, address)`** — per-chain codec (Starknet pad / EVM EIP-55 / Solana base58; Bitcoin not yet implemented).
|
|
516
|
+
- **Removed** `SUPPORTED_NETWORKS`, `DEFAULT_RPC_URL`, `Network` (mainnet-only — coordinates key by chain alone). `getChainId(config)` throws for non-Starknet.
|
|
517
|
+
|
|
506
518
|
### v0.6.7
|
|
507
519
|
- **`CollectionRegistryABI`** exported from `@medialane/sdk` — minimal ABI covering `list_user_collections` and `get_collection` on the collection registry contract. Eliminates duplicated inline ABI definitions in consuming apps.
|
|
508
520
|
|
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: "
|
|
22
|
-
collection721StartBlock:
|
|
23
|
-
ipNftClassHash: "
|
|
24
|
-
ipCollectionClassHash: "
|
|
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": "
|
|
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": "
|
|
3146
|
-
"type": "core::
|
|
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": "
|
|
3158
|
-
"type": "core::array::Array::<core::
|
|
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": "
|
|
3185
|
+
"name": "to",
|
|
3170
3186
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
3171
3187
|
},
|
|
3172
3188
|
{
|
|
3173
|
-
"name": "
|
|
3174
|
-
"type": "core::
|
|
3189
|
+
"name": "collection_id",
|
|
3190
|
+
"type": "core::integer::u256"
|
|
3175
3191
|
},
|
|
3176
3192
|
{
|
|
3177
|
-
"name": "
|
|
3178
|
-
"type": "core::
|
|
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": "
|
|
3198
|
-
"type": "core::array::Array::<core::
|
|
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": "
|
|
3325
|
-
"type": "core::
|
|
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": "
|
|
3341
|
-
"type": "core::
|
|
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": "
|
|
3357
|
-
"type": "core::
|
|
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": "
|
|
3531
|
-
"type": "core::array::
|
|
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": "
|
|
3600
|
-
"type": "core::array::
|
|
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 = [
|
|
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);
|
|
@@ -6083,6 +6247,20 @@ var ApiClient = class {
|
|
|
6083
6247
|
);
|
|
6084
6248
|
return res.data;
|
|
6085
6249
|
}
|
|
6250
|
+
// ─── Coins (fungible — ERC-20 etc.) ───────────────────────────────────────────
|
|
6251
|
+
// Coins are a separate model from Collections (spec 2026-06-14). Price/liquidity
|
|
6252
|
+
// is read live from Ekubo (CreatorCoinService.getPrice), never from these.
|
|
6253
|
+
getCoins(opts = {}) {
|
|
6254
|
+
const params = new URLSearchParams();
|
|
6255
|
+
if (opts.page) params.set("page", String(opts.page));
|
|
6256
|
+
if (opts.limit) params.set("limit", String(opts.limit));
|
|
6257
|
+
if (opts.service) params.set("service", opts.service);
|
|
6258
|
+
const qs = params.toString();
|
|
6259
|
+
return this.get(`/v1/coins${qs ? `?${qs}` : ""}`);
|
|
6260
|
+
}
|
|
6261
|
+
getCoin(contract) {
|
|
6262
|
+
return this.get(`/v1/coins/${this.addr(contract)}`);
|
|
6263
|
+
}
|
|
6086
6264
|
// ─── Collection Drop ────────────────────────────────────────────────────────
|
|
6087
6265
|
getDropCollections(opts = {}) {
|
|
6088
6266
|
return this.getCollections(opts.page ?? 1, opts.limit ?? 20, void 0, opts.sort, "COLLECTION_DROP");
|