@medialane/sdk 0.167.0 → 0.169.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/{chunk-TPONHUAU.cjs → chunk-4SZV7J2R.cjs} +56 -9
- package/dist/chunk-4SZV7J2R.cjs.map +1 -0
- package/dist/{chunk-H7I6TEOA.cjs → chunk-VJVBWHAD.cjs} +5 -4
- package/dist/chunk-VJVBWHAD.cjs.map +1 -0
- package/dist/{chunk-PBJLHXDB.js → chunk-WYKCGQPN.js} +5 -4
- package/dist/chunk-WYKCGQPN.js.map +1 -0
- package/dist/{chunk-USFXQO4T.js → chunk-X5RNNPDU.js} +51 -6
- package/dist/chunk-X5RNNPDU.js.map +1 -0
- package/dist/{errors-DRiTDrwm.d.ts → errors-D6S2d0Oy.d.ts} +131 -12
- package/dist/{errors-GcSzVvZL.d.cts → errors-GfSlToOh.d.cts} +131 -12
- package/dist/evm/index.cjs +3 -3
- package/dist/evm/index.d.cts +1 -1
- package/dist/evm/index.d.ts +1 -1
- package/dist/evm/index.js +1 -1
- package/dist/index.cjs +90 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -8
- package/dist/index.d.ts +16 -8
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/solana/index.cjs +2 -2
- package/dist/solana/index.d.cts +1 -1
- package/dist/solana/index.d.ts +1 -1
- package/dist/solana/index.js +1 -1
- package/dist/starknet/index.cjs +1134 -415
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +790 -402
- package/dist/starknet/index.d.ts +790 -402
- package/dist/starknet/index.js +1051 -341
- package/dist/starknet/index.js.map +1 -1
- package/dist/stellar/index.cjs +2 -2
- package/dist/stellar/index.d.cts +1 -1
- package/dist/stellar/index.d.ts +1 -1
- package/dist/stellar/index.js +1 -1
- package/dist/{types-PPshMWr7.d.cts → types-BTNjkUst.d.cts} +4 -1
- package/dist/{types-PPshMWr7.d.ts → types-BTNjkUst.d.ts} +4 -1
- package/package.json +1 -1
- package/dist/chunk-H7I6TEOA.cjs.map +0 -1
- package/dist/chunk-PBJLHXDB.js.map +0 -1
- package/dist/chunk-TPONHUAU.cjs.map +0 -1
- package/dist/chunk-USFXQO4T.js.map +0 -1
package/dist/starknet/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk4SZV7J2R_cjs = require('../chunk-4SZV7J2R.cjs');
|
|
4
|
+
var chunkVJVBWHAD_cjs = require('../chunk-VJVBWHAD.cjs');
|
|
5
5
|
var starknet = require('starknet');
|
|
6
6
|
var hkdf_js = require('@noble/hashes/hkdf.js');
|
|
7
7
|
var sha2_js = require('@noble/hashes/sha2.js');
|
|
@@ -33,7 +33,7 @@ function getChainId(config) {
|
|
|
33
33
|
return starknet.constants.StarknetChainId.SN_MAIN;
|
|
34
34
|
}
|
|
35
35
|
function resolveToken(currency) {
|
|
36
|
-
const token =
|
|
36
|
+
const token = chunk4SZV7J2R_cjs.SUPPORTED_TOKENS.find(
|
|
37
37
|
(t) => t.symbol === currency.toUpperCase() || t.address.toLowerCase() === currency.toLowerCase()
|
|
38
38
|
);
|
|
39
39
|
if (!token) throw new MedialaneError(`Unsupported currency: ${currency}`, "INVALID_PARAMS");
|
|
@@ -44,7 +44,7 @@ function getProvider(config) {
|
|
|
44
44
|
let p = _providerCache.get(config);
|
|
45
45
|
if (!p) {
|
|
46
46
|
const urls = [config.rpcUrl];
|
|
47
|
-
p = new starknet.RpcProvider({ nodeUrl: urls[0], baseFetch:
|
|
47
|
+
p = new starknet.RpcProvider({ nodeUrl: urls[0], baseFetch: chunk4SZV7J2R_cjs.createFailoverFetch(urls) });
|
|
48
48
|
_providerCache.set(config, p);
|
|
49
49
|
}
|
|
50
50
|
return p;
|
|
@@ -1358,260 +1358,907 @@ var POPFactoryABI = [
|
|
|
1358
1358
|
// src/starknet/abis/dropCollection.ts
|
|
1359
1359
|
var DropCollectionABI = [
|
|
1360
1360
|
{
|
|
1361
|
-
type: "
|
|
1362
|
-
name: "
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1361
|
+
"type": "impl",
|
|
1362
|
+
"name": "ERC721MetadataImpl",
|
|
1363
|
+
"interface_name": "openzeppelin_interfaces::token::erc721::IERC721Metadata"
|
|
1364
|
+
},
|
|
1365
|
+
{
|
|
1366
|
+
"type": "struct",
|
|
1367
|
+
"name": "core::byte_array::ByteArray",
|
|
1368
|
+
"members": [
|
|
1369
|
+
{
|
|
1370
|
+
"name": "data",
|
|
1371
|
+
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
"name": "pending_word",
|
|
1375
|
+
"type": "core::felt252"
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
"name": "pending_word_len",
|
|
1379
|
+
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
1380
|
+
}
|
|
1381
|
+
]
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
"type": "struct",
|
|
1385
|
+
"name": "core::integer::u256",
|
|
1386
|
+
"members": [
|
|
1387
|
+
{
|
|
1388
|
+
"name": "low",
|
|
1389
|
+
"type": "core::integer::u128"
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
"name": "high",
|
|
1393
|
+
"type": "core::integer::u128"
|
|
1394
|
+
}
|
|
1395
|
+
]
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
"type": "interface",
|
|
1399
|
+
"name": "openzeppelin_interfaces::token::erc721::IERC721Metadata",
|
|
1400
|
+
"items": [
|
|
1401
|
+
{
|
|
1402
|
+
"type": "function",
|
|
1403
|
+
"name": "name",
|
|
1404
|
+
"inputs": [],
|
|
1405
|
+
"outputs": [
|
|
1406
|
+
{
|
|
1407
|
+
"type": "core::byte_array::ByteArray"
|
|
1408
|
+
}
|
|
1409
|
+
],
|
|
1410
|
+
"state_mutability": "view"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"type": "function",
|
|
1414
|
+
"name": "symbol",
|
|
1415
|
+
"inputs": [],
|
|
1416
|
+
"outputs": [
|
|
1417
|
+
{
|
|
1418
|
+
"type": "core::byte_array::ByteArray"
|
|
1419
|
+
}
|
|
1420
|
+
],
|
|
1421
|
+
"state_mutability": "view"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"type": "function",
|
|
1425
|
+
"name": "token_uri",
|
|
1426
|
+
"inputs": [
|
|
1427
|
+
{
|
|
1428
|
+
"name": "token_id",
|
|
1429
|
+
"type": "core::integer::u256"
|
|
1430
|
+
}
|
|
1431
|
+
],
|
|
1432
|
+
"outputs": [
|
|
1433
|
+
{
|
|
1434
|
+
"type": "core::byte_array::ByteArray"
|
|
1435
|
+
}
|
|
1436
|
+
],
|
|
1437
|
+
"state_mutability": "view"
|
|
1438
|
+
}
|
|
1439
|
+
]
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"type": "impl",
|
|
1443
|
+
"name": "DropCollectionImpl",
|
|
1444
|
+
"interface_name": "collection_drop::interfaces::IDropCollection"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
"type": "struct",
|
|
1448
|
+
"name": "core::array::Span::<core::felt252>",
|
|
1449
|
+
"members": [
|
|
1450
|
+
{
|
|
1451
|
+
"name": "snapshot",
|
|
1452
|
+
"type": "@core::array::Array::<core::felt252>"
|
|
1453
|
+
}
|
|
1454
|
+
]
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
"type": "struct",
|
|
1458
|
+
"name": "collection_drop::types::SaleTerms",
|
|
1459
|
+
"members": [
|
|
1460
|
+
{
|
|
1461
|
+
"name": "start_time",
|
|
1462
|
+
"type": "core::integer::u64"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"name": "end_time",
|
|
1466
|
+
"type": "core::integer::u64"
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"name": "price",
|
|
1470
|
+
"type": "core::integer::u256"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"name": "payment_token",
|
|
1474
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
"name": "max_per_wallet",
|
|
1478
|
+
"type": "core::integer::u256"
|
|
1479
|
+
}
|
|
1480
|
+
]
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"type": "interface",
|
|
1484
|
+
"name": "collection_drop::interfaces::IDropCollection",
|
|
1485
|
+
"items": [
|
|
1486
|
+
{
|
|
1487
|
+
"type": "function",
|
|
1488
|
+
"name": "claim",
|
|
1489
|
+
"inputs": [
|
|
1490
|
+
{
|
|
1491
|
+
"name": "quantity",
|
|
1492
|
+
"type": "core::integer::u256"
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
"name": "proof",
|
|
1496
|
+
"type": "core::array::Span::<core::felt252>"
|
|
1497
|
+
}
|
|
1498
|
+
],
|
|
1499
|
+
"outputs": [],
|
|
1500
|
+
"state_mutability": "external"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"type": "function",
|
|
1504
|
+
"name": "issue",
|
|
1505
|
+
"inputs": [
|
|
1506
|
+
{
|
|
1507
|
+
"name": "recipient",
|
|
1508
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"name": "quantity",
|
|
1512
|
+
"type": "core::integer::u256"
|
|
1513
|
+
}
|
|
1514
|
+
],
|
|
1515
|
+
"outputs": [],
|
|
1516
|
+
"state_mutability": "external"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
"type": "function",
|
|
1520
|
+
"name": "set_allowlist_root",
|
|
1521
|
+
"inputs": [
|
|
1522
|
+
{
|
|
1523
|
+
"name": "root",
|
|
1524
|
+
"type": "core::felt252"
|
|
1525
|
+
}
|
|
1526
|
+
],
|
|
1527
|
+
"outputs": [],
|
|
1528
|
+
"state_mutability": "external"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"type": "function",
|
|
1532
|
+
"name": "organizer",
|
|
1533
|
+
"inputs": [],
|
|
1534
|
+
"outputs": [
|
|
1535
|
+
{
|
|
1536
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1537
|
+
}
|
|
1538
|
+
],
|
|
1539
|
+
"state_mutability": "view"
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
"type": "function",
|
|
1543
|
+
"name": "terms",
|
|
1544
|
+
"inputs": [],
|
|
1545
|
+
"outputs": [
|
|
1546
|
+
{
|
|
1547
|
+
"type": "collection_drop::types::SaleTerms"
|
|
1548
|
+
}
|
|
1549
|
+
],
|
|
1550
|
+
"state_mutability": "view"
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
"type": "function",
|
|
1554
|
+
"name": "allowlist_root",
|
|
1555
|
+
"inputs": [],
|
|
1556
|
+
"outputs": [
|
|
1557
|
+
{
|
|
1558
|
+
"type": "core::felt252"
|
|
1559
|
+
}
|
|
1560
|
+
],
|
|
1561
|
+
"state_mutability": "view"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"type": "function",
|
|
1565
|
+
"name": "max_supply",
|
|
1566
|
+
"inputs": [],
|
|
1567
|
+
"outputs": [
|
|
1568
|
+
{
|
|
1569
|
+
"type": "core::integer::u256"
|
|
1570
|
+
}
|
|
1571
|
+
],
|
|
1572
|
+
"state_mutability": "view"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"type": "function",
|
|
1576
|
+
"name": "total_minted",
|
|
1577
|
+
"inputs": [],
|
|
1578
|
+
"outputs": [
|
|
1579
|
+
{
|
|
1580
|
+
"type": "core::integer::u256"
|
|
1581
|
+
}
|
|
1582
|
+
],
|
|
1583
|
+
"state_mutability": "view"
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"type": "function",
|
|
1587
|
+
"name": "claimed_by",
|
|
1588
|
+
"inputs": [
|
|
1589
|
+
{
|
|
1590
|
+
"name": "wallet",
|
|
1591
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1592
|
+
}
|
|
1593
|
+
],
|
|
1594
|
+
"outputs": [
|
|
1595
|
+
{
|
|
1596
|
+
"type": "core::integer::u256"
|
|
1597
|
+
}
|
|
1598
|
+
],
|
|
1599
|
+
"state_mutability": "view"
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
"type": "function",
|
|
1603
|
+
"name": "version",
|
|
1604
|
+
"inputs": [],
|
|
1605
|
+
"outputs": [
|
|
1606
|
+
{
|
|
1607
|
+
"type": "core::felt252"
|
|
1608
|
+
}
|
|
1609
|
+
],
|
|
1610
|
+
"state_mutability": "view"
|
|
1611
|
+
}
|
|
1367
1612
|
]
|
|
1368
1613
|
},
|
|
1369
1614
|
{
|
|
1370
|
-
type: "
|
|
1371
|
-
name: "
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1615
|
+
"type": "impl",
|
|
1616
|
+
"name": "ERC721Impl",
|
|
1617
|
+
"interface_name": "openzeppelin_interfaces::token::erc721::IERC721"
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"type": "enum",
|
|
1621
|
+
"name": "core::bool",
|
|
1622
|
+
"variants": [
|
|
1623
|
+
{
|
|
1624
|
+
"name": "False",
|
|
1625
|
+
"type": "()"
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
"name": "True",
|
|
1629
|
+
"type": "()"
|
|
1630
|
+
}
|
|
1631
|
+
]
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
"type": "interface",
|
|
1635
|
+
"name": "openzeppelin_interfaces::token::erc721::IERC721",
|
|
1636
|
+
"items": [
|
|
1637
|
+
{
|
|
1638
|
+
"type": "function",
|
|
1639
|
+
"name": "balance_of",
|
|
1640
|
+
"inputs": [
|
|
1641
|
+
{
|
|
1642
|
+
"name": "account",
|
|
1643
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1644
|
+
}
|
|
1645
|
+
],
|
|
1646
|
+
"outputs": [
|
|
1647
|
+
{
|
|
1648
|
+
"type": "core::integer::u256"
|
|
1649
|
+
}
|
|
1650
|
+
],
|
|
1651
|
+
"state_mutability": "view"
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
"type": "function",
|
|
1655
|
+
"name": "owner_of",
|
|
1656
|
+
"inputs": [
|
|
1657
|
+
{
|
|
1658
|
+
"name": "token_id",
|
|
1659
|
+
"type": "core::integer::u256"
|
|
1660
|
+
}
|
|
1661
|
+
],
|
|
1662
|
+
"outputs": [
|
|
1663
|
+
{
|
|
1664
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1665
|
+
}
|
|
1666
|
+
],
|
|
1667
|
+
"state_mutability": "view"
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
"type": "function",
|
|
1671
|
+
"name": "safe_transfer_from",
|
|
1672
|
+
"inputs": [
|
|
1673
|
+
{
|
|
1674
|
+
"name": "from",
|
|
1675
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
"name": "to",
|
|
1679
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
"name": "token_id",
|
|
1683
|
+
"type": "core::integer::u256"
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
"name": "data",
|
|
1687
|
+
"type": "core::array::Span::<core::felt252>"
|
|
1688
|
+
}
|
|
1689
|
+
],
|
|
1690
|
+
"outputs": [],
|
|
1691
|
+
"state_mutability": "external"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"type": "function",
|
|
1695
|
+
"name": "transfer_from",
|
|
1696
|
+
"inputs": [
|
|
1697
|
+
{
|
|
1698
|
+
"name": "from",
|
|
1699
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
"name": "to",
|
|
1703
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
"name": "token_id",
|
|
1707
|
+
"type": "core::integer::u256"
|
|
1708
|
+
}
|
|
1709
|
+
],
|
|
1710
|
+
"outputs": [],
|
|
1711
|
+
"state_mutability": "external"
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"type": "function",
|
|
1715
|
+
"name": "approve",
|
|
1716
|
+
"inputs": [
|
|
1717
|
+
{
|
|
1718
|
+
"name": "to",
|
|
1719
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"name": "token_id",
|
|
1723
|
+
"type": "core::integer::u256"
|
|
1724
|
+
}
|
|
1725
|
+
],
|
|
1726
|
+
"outputs": [],
|
|
1727
|
+
"state_mutability": "external"
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
"type": "function",
|
|
1731
|
+
"name": "set_approval_for_all",
|
|
1732
|
+
"inputs": [
|
|
1733
|
+
{
|
|
1734
|
+
"name": "operator",
|
|
1735
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
"name": "approved",
|
|
1739
|
+
"type": "core::bool"
|
|
1740
|
+
}
|
|
1741
|
+
],
|
|
1742
|
+
"outputs": [],
|
|
1743
|
+
"state_mutability": "external"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"type": "function",
|
|
1747
|
+
"name": "get_approved",
|
|
1748
|
+
"inputs": [
|
|
1749
|
+
{
|
|
1750
|
+
"name": "token_id",
|
|
1751
|
+
"type": "core::integer::u256"
|
|
1752
|
+
}
|
|
1753
|
+
],
|
|
1754
|
+
"outputs": [
|
|
1755
|
+
{
|
|
1756
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1757
|
+
}
|
|
1758
|
+
],
|
|
1759
|
+
"state_mutability": "view"
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"type": "function",
|
|
1763
|
+
"name": "is_approved_for_all",
|
|
1764
|
+
"inputs": [
|
|
1765
|
+
{
|
|
1766
|
+
"name": "owner",
|
|
1767
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
"name": "operator",
|
|
1771
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1772
|
+
}
|
|
1773
|
+
],
|
|
1774
|
+
"outputs": [
|
|
1775
|
+
{
|
|
1776
|
+
"type": "core::bool"
|
|
1777
|
+
}
|
|
1778
|
+
],
|
|
1779
|
+
"state_mutability": "view"
|
|
1780
|
+
}
|
|
1378
1781
|
]
|
|
1379
1782
|
},
|
|
1380
1783
|
{
|
|
1381
|
-
type: "
|
|
1382
|
-
name: "
|
|
1383
|
-
|
|
1384
|
-
outputs: [],
|
|
1385
|
-
state_mutability: "external"
|
|
1386
|
-
},
|
|
1387
|
-
{
|
|
1388
|
-
type: "function",
|
|
1389
|
-
name: "admin_mint",
|
|
1390
|
-
inputs: [
|
|
1391
|
-
{ name: "recipient", type: "core::starknet::contract_address::ContractAddress" },
|
|
1392
|
-
{ name: "quantity", type: "core::integer::u256" },
|
|
1393
|
-
{ name: "custom_uri", type: "core::byte_array::ByteArray" }
|
|
1394
|
-
],
|
|
1395
|
-
outputs: [],
|
|
1396
|
-
state_mutability: "external"
|
|
1397
|
-
},
|
|
1398
|
-
{
|
|
1399
|
-
type: "function",
|
|
1400
|
-
name: "set_claim_conditions",
|
|
1401
|
-
inputs: [{ name: "conditions", type: "collection_drop::types::ClaimConditions" }],
|
|
1402
|
-
outputs: [],
|
|
1403
|
-
state_mutability: "external"
|
|
1404
|
-
},
|
|
1405
|
-
{
|
|
1406
|
-
type: "function",
|
|
1407
|
-
name: "get_claim_conditions",
|
|
1408
|
-
inputs: [],
|
|
1409
|
-
outputs: [{ type: "collection_drop::types::ClaimConditions" }],
|
|
1410
|
-
state_mutability: "view"
|
|
1411
|
-
},
|
|
1412
|
-
{
|
|
1413
|
-
type: "function",
|
|
1414
|
-
name: "set_allowlist_enabled",
|
|
1415
|
-
inputs: [{ name: "enabled", type: "core::bool" }],
|
|
1416
|
-
outputs: [],
|
|
1417
|
-
state_mutability: "external"
|
|
1418
|
-
},
|
|
1419
|
-
{
|
|
1420
|
-
type: "function",
|
|
1421
|
-
name: "is_allowlist_enabled",
|
|
1422
|
-
inputs: [],
|
|
1423
|
-
outputs: [{ type: "core::bool" }],
|
|
1424
|
-
state_mutability: "view"
|
|
1425
|
-
},
|
|
1426
|
-
{
|
|
1427
|
-
type: "function",
|
|
1428
|
-
name: "add_to_allowlist",
|
|
1429
|
-
inputs: [{ name: "address", type: "core::starknet::contract_address::ContractAddress" }],
|
|
1430
|
-
outputs: [],
|
|
1431
|
-
state_mutability: "external"
|
|
1432
|
-
},
|
|
1433
|
-
{
|
|
1434
|
-
type: "function",
|
|
1435
|
-
name: "batch_add_to_allowlist",
|
|
1436
|
-
inputs: [{ name: "addresses", type: "core::array::Array::<core::starknet::contract_address::ContractAddress>" }],
|
|
1437
|
-
outputs: [],
|
|
1438
|
-
state_mutability: "external"
|
|
1439
|
-
},
|
|
1440
|
-
{
|
|
1441
|
-
type: "function",
|
|
1442
|
-
name: "remove_from_allowlist",
|
|
1443
|
-
inputs: [{ name: "address", type: "core::starknet::contract_address::ContractAddress" }],
|
|
1444
|
-
outputs: [],
|
|
1445
|
-
state_mutability: "external"
|
|
1784
|
+
"type": "impl",
|
|
1785
|
+
"name": "SRC5Impl",
|
|
1786
|
+
"interface_name": "openzeppelin_interfaces::introspection::ISRC5"
|
|
1446
1787
|
},
|
|
1447
1788
|
{
|
|
1448
|
-
type: "
|
|
1449
|
-
name: "
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1789
|
+
"type": "interface",
|
|
1790
|
+
"name": "openzeppelin_interfaces::introspection::ISRC5",
|
|
1791
|
+
"items": [
|
|
1792
|
+
{
|
|
1793
|
+
"type": "function",
|
|
1794
|
+
"name": "supports_interface",
|
|
1795
|
+
"inputs": [
|
|
1796
|
+
{
|
|
1797
|
+
"name": "interface_id",
|
|
1798
|
+
"type": "core::felt252"
|
|
1799
|
+
}
|
|
1800
|
+
],
|
|
1801
|
+
"outputs": [
|
|
1802
|
+
{
|
|
1803
|
+
"type": "core::bool"
|
|
1804
|
+
}
|
|
1805
|
+
],
|
|
1806
|
+
"state_mutability": "view"
|
|
1807
|
+
}
|
|
1808
|
+
]
|
|
1453
1809
|
},
|
|
1454
1810
|
{
|
|
1455
|
-
type: "
|
|
1456
|
-
name: "
|
|
1457
|
-
inputs: [
|
|
1458
|
-
|
|
1459
|
-
|
|
1811
|
+
"type": "constructor",
|
|
1812
|
+
"name": "constructor",
|
|
1813
|
+
"inputs": [
|
|
1814
|
+
{
|
|
1815
|
+
"name": "name",
|
|
1816
|
+
"type": "core::byte_array::ByteArray"
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"name": "symbol",
|
|
1820
|
+
"type": "core::byte_array::ByteArray"
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"name": "base_uri",
|
|
1824
|
+
"type": "core::byte_array::ByteArray"
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
"name": "organizer",
|
|
1828
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
"name": "max_supply",
|
|
1832
|
+
"type": "core::integer::u256"
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
"name": "terms",
|
|
1836
|
+
"type": "collection_drop::types::SaleTerms"
|
|
1837
|
+
},
|
|
1838
|
+
{
|
|
1839
|
+
"name": "allowlist_root",
|
|
1840
|
+
"type": "core::felt252"
|
|
1841
|
+
}
|
|
1842
|
+
]
|
|
1460
1843
|
},
|
|
1461
1844
|
{
|
|
1462
|
-
type: "
|
|
1463
|
-
name: "
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
{
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1845
|
+
"type": "event",
|
|
1846
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
1847
|
+
"kind": "struct",
|
|
1848
|
+
"members": [
|
|
1849
|
+
{
|
|
1850
|
+
"name": "from",
|
|
1851
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
1852
|
+
"kind": "key"
|
|
1853
|
+
},
|
|
1854
|
+
{
|
|
1855
|
+
"name": "to",
|
|
1856
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
1857
|
+
"kind": "key"
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
"name": "token_id",
|
|
1861
|
+
"type": "core::integer::u256",
|
|
1862
|
+
"kind": "key"
|
|
1863
|
+
}
|
|
1864
|
+
]
|
|
1470
1865
|
},
|
|
1471
1866
|
{
|
|
1472
|
-
type: "
|
|
1473
|
-
name: "
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1867
|
+
"type": "event",
|
|
1868
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
1869
|
+
"kind": "struct",
|
|
1870
|
+
"members": [
|
|
1871
|
+
{
|
|
1872
|
+
"name": "owner",
|
|
1873
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
1874
|
+
"kind": "key"
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
"name": "approved",
|
|
1878
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
1879
|
+
"kind": "key"
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
"name": "token_id",
|
|
1883
|
+
"type": "core::integer::u256",
|
|
1884
|
+
"kind": "key"
|
|
1885
|
+
}
|
|
1886
|
+
]
|
|
1477
1887
|
},
|
|
1478
1888
|
{
|
|
1479
|
-
type: "
|
|
1480
|
-
name: "
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1889
|
+
"type": "event",
|
|
1890
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
1891
|
+
"kind": "struct",
|
|
1892
|
+
"members": [
|
|
1893
|
+
{
|
|
1894
|
+
"name": "owner",
|
|
1895
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
1896
|
+
"kind": "key"
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
"name": "operator",
|
|
1900
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
1901
|
+
"kind": "key"
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
"name": "approved",
|
|
1905
|
+
"type": "core::bool",
|
|
1906
|
+
"kind": "data"
|
|
1907
|
+
}
|
|
1908
|
+
]
|
|
1484
1909
|
},
|
|
1485
1910
|
{
|
|
1486
|
-
type: "
|
|
1487
|
-
name: "
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1911
|
+
"type": "event",
|
|
1912
|
+
"name": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
1913
|
+
"kind": "enum",
|
|
1914
|
+
"variants": [
|
|
1915
|
+
{
|
|
1916
|
+
"name": "Transfer",
|
|
1917
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer",
|
|
1918
|
+
"kind": "nested"
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
"name": "Approval",
|
|
1922
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval",
|
|
1923
|
+
"kind": "nested"
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
"name": "ApprovalForAll",
|
|
1927
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll",
|
|
1928
|
+
"kind": "nested"
|
|
1929
|
+
}
|
|
1930
|
+
]
|
|
1491
1931
|
},
|
|
1492
1932
|
{
|
|
1493
|
-
type: "
|
|
1494
|
-
name: "
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
state_mutability: "view"
|
|
1933
|
+
"type": "event",
|
|
1934
|
+
"name": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
1935
|
+
"kind": "enum",
|
|
1936
|
+
"variants": []
|
|
1498
1937
|
},
|
|
1499
1938
|
{
|
|
1500
|
-
type: "
|
|
1501
|
-
name: "
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1939
|
+
"type": "event",
|
|
1940
|
+
"name": "collection_drop::events::Claimed",
|
|
1941
|
+
"kind": "struct",
|
|
1942
|
+
"members": [
|
|
1943
|
+
{
|
|
1944
|
+
"name": "claimer",
|
|
1945
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
1946
|
+
"kind": "key"
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
"name": "quantity",
|
|
1950
|
+
"type": "core::integer::u256",
|
|
1951
|
+
"kind": "data"
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
"name": "first_token_id",
|
|
1955
|
+
"type": "core::integer::u256",
|
|
1956
|
+
"kind": "data"
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
"name": "total_paid",
|
|
1960
|
+
"type": "core::integer::u256",
|
|
1961
|
+
"kind": "data"
|
|
1962
|
+
}
|
|
1963
|
+
]
|
|
1505
1964
|
},
|
|
1506
1965
|
{
|
|
1507
|
-
type: "
|
|
1508
|
-
name: "
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1966
|
+
"type": "event",
|
|
1967
|
+
"name": "collection_drop::events::Issued",
|
|
1968
|
+
"kind": "struct",
|
|
1969
|
+
"members": [
|
|
1970
|
+
{
|
|
1971
|
+
"name": "recipient",
|
|
1972
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
1973
|
+
"kind": "key"
|
|
1974
|
+
},
|
|
1975
|
+
{
|
|
1976
|
+
"name": "quantity",
|
|
1977
|
+
"type": "core::integer::u256",
|
|
1978
|
+
"kind": "data"
|
|
1979
|
+
},
|
|
1980
|
+
{
|
|
1981
|
+
"name": "first_token_id",
|
|
1982
|
+
"type": "core::integer::u256",
|
|
1983
|
+
"kind": "data"
|
|
1984
|
+
}
|
|
1985
|
+
]
|
|
1512
1986
|
},
|
|
1513
1987
|
{
|
|
1514
|
-
type: "
|
|
1515
|
-
name: "
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1988
|
+
"type": "event",
|
|
1989
|
+
"name": "collection_drop::events::AllowlistRootSet",
|
|
1990
|
+
"kind": "struct",
|
|
1991
|
+
"members": [
|
|
1992
|
+
{
|
|
1993
|
+
"name": "root",
|
|
1994
|
+
"type": "core::felt252",
|
|
1995
|
+
"kind": "data"
|
|
1996
|
+
}
|
|
1997
|
+
]
|
|
1519
1998
|
},
|
|
1520
1999
|
{
|
|
1521
|
-
type: "
|
|
1522
|
-
name: "
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
2000
|
+
"type": "event",
|
|
2001
|
+
"name": "collection_drop::drop_collection::DropCollection::Event",
|
|
2002
|
+
"kind": "enum",
|
|
2003
|
+
"variants": [
|
|
2004
|
+
{
|
|
2005
|
+
"name": "ERC721Event",
|
|
2006
|
+
"type": "openzeppelin_token::erc721::erc721::ERC721Component::Event",
|
|
2007
|
+
"kind": "flat"
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
"name": "SRC5Event",
|
|
2011
|
+
"type": "openzeppelin_introspection::src5::SRC5Component::Event",
|
|
2012
|
+
"kind": "flat"
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
"name": "Claimed",
|
|
2016
|
+
"type": "collection_drop::events::Claimed",
|
|
2017
|
+
"kind": "nested"
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
"name": "Issued",
|
|
2021
|
+
"type": "collection_drop::events::Issued",
|
|
2022
|
+
"kind": "nested"
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
"name": "AllowlistRootSet",
|
|
2026
|
+
"type": "collection_drop::events::AllowlistRootSet",
|
|
2027
|
+
"kind": "nested"
|
|
2028
|
+
}
|
|
2029
|
+
]
|
|
1526
2030
|
}
|
|
1527
2031
|
];
|
|
1528
2032
|
|
|
1529
2033
|
// src/starknet/abis/dropFactory.ts
|
|
1530
2034
|
var DropFactoryABI = [
|
|
1531
2035
|
{
|
|
1532
|
-
type: "
|
|
1533
|
-
name: "
|
|
1534
|
-
|
|
1535
|
-
{ name: "data", type: "core::array::Array::<core::felt252>" },
|
|
1536
|
-
{ name: "pending_word", type: "core::felt252" },
|
|
1537
|
-
{ name: "pending_word_len", type: "core::integer::u32" }
|
|
1538
|
-
]
|
|
1539
|
-
},
|
|
1540
|
-
{
|
|
1541
|
-
type: "struct",
|
|
1542
|
-
name: "collection_drop::types::ClaimConditions",
|
|
1543
|
-
members: [
|
|
1544
|
-
{ name: "start_time", type: "core::integer::u64" },
|
|
1545
|
-
{ name: "end_time", type: "core::integer::u64" },
|
|
1546
|
-
{ name: "price", type: "core::integer::u256" },
|
|
1547
|
-
{ name: "payment_token", type: "core::starknet::contract_address::ContractAddress" },
|
|
1548
|
-
{ name: "max_quantity_per_wallet", type: "core::integer::u256" }
|
|
1549
|
-
]
|
|
1550
|
-
},
|
|
1551
|
-
{
|
|
1552
|
-
type: "function",
|
|
1553
|
-
name: "register_organizer",
|
|
1554
|
-
inputs: [
|
|
1555
|
-
{ name: "organizer", type: "core::starknet::contract_address::ContractAddress" },
|
|
1556
|
-
{ name: "name", type: "core::byte_array::ByteArray" }
|
|
1557
|
-
],
|
|
1558
|
-
outputs: [],
|
|
1559
|
-
state_mutability: "external"
|
|
2036
|
+
"type": "impl",
|
|
2037
|
+
"name": "DropFactoryImpl",
|
|
2038
|
+
"interface_name": "collection_drop::interfaces::IDropFactory"
|
|
1560
2039
|
},
|
|
1561
2040
|
{
|
|
1562
|
-
type: "
|
|
1563
|
-
name: "
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
2041
|
+
"type": "struct",
|
|
2042
|
+
"name": "core::byte_array::ByteArray",
|
|
2043
|
+
"members": [
|
|
2044
|
+
{
|
|
2045
|
+
"name": "data",
|
|
2046
|
+
"type": "core::array::Array::<core::bytes_31::bytes31>"
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
"name": "pending_word",
|
|
2050
|
+
"type": "core::felt252"
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
"name": "pending_word_len",
|
|
2054
|
+
"type": "core::internal::bounded_int::BoundedInt::<0, 30>"
|
|
2055
|
+
}
|
|
2056
|
+
]
|
|
1567
2057
|
},
|
|
1568
2058
|
{
|
|
1569
|
-
type: "
|
|
1570
|
-
name: "
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
2059
|
+
"type": "struct",
|
|
2060
|
+
"name": "core::integer::u256",
|
|
2061
|
+
"members": [
|
|
2062
|
+
{
|
|
2063
|
+
"name": "low",
|
|
2064
|
+
"type": "core::integer::u128"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"name": "high",
|
|
2068
|
+
"type": "core::integer::u128"
|
|
2069
|
+
}
|
|
2070
|
+
]
|
|
1574
2071
|
},
|
|
1575
2072
|
{
|
|
1576
|
-
type: "
|
|
1577
|
-
name: "
|
|
1578
|
-
|
|
1579
|
-
{
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
{
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
2073
|
+
"type": "struct",
|
|
2074
|
+
"name": "collection_drop::types::SaleTerms",
|
|
2075
|
+
"members": [
|
|
2076
|
+
{
|
|
2077
|
+
"name": "start_time",
|
|
2078
|
+
"type": "core::integer::u64"
|
|
2079
|
+
},
|
|
2080
|
+
{
|
|
2081
|
+
"name": "end_time",
|
|
2082
|
+
"type": "core::integer::u64"
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
"name": "price",
|
|
2086
|
+
"type": "core::integer::u256"
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
"name": "payment_token",
|
|
2090
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
"name": "max_per_wallet",
|
|
2094
|
+
"type": "core::integer::u256"
|
|
2095
|
+
}
|
|
2096
|
+
]
|
|
1587
2097
|
},
|
|
1588
2098
|
{
|
|
1589
|
-
type: "
|
|
1590
|
-
name: "
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
2099
|
+
"type": "interface",
|
|
2100
|
+
"name": "collection_drop::interfaces::IDropFactory",
|
|
2101
|
+
"items": [
|
|
2102
|
+
{
|
|
2103
|
+
"type": "function",
|
|
2104
|
+
"name": "create_drop",
|
|
2105
|
+
"inputs": [
|
|
2106
|
+
{
|
|
2107
|
+
"name": "name",
|
|
2108
|
+
"type": "core::byte_array::ByteArray"
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
"name": "symbol",
|
|
2112
|
+
"type": "core::byte_array::ByteArray"
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"name": "base_uri",
|
|
2116
|
+
"type": "core::byte_array::ByteArray"
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
"name": "max_supply",
|
|
2120
|
+
"type": "core::integer::u256"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
"name": "terms",
|
|
2124
|
+
"type": "collection_drop::types::SaleTerms"
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
"name": "allowlist_root",
|
|
2128
|
+
"type": "core::felt252"
|
|
2129
|
+
}
|
|
2130
|
+
],
|
|
2131
|
+
"outputs": [
|
|
2132
|
+
{
|
|
2133
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
2134
|
+
}
|
|
2135
|
+
],
|
|
2136
|
+
"state_mutability": "external"
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
"type": "function",
|
|
2140
|
+
"name": "get_drop_address",
|
|
2141
|
+
"inputs": [
|
|
2142
|
+
{
|
|
2143
|
+
"name": "drop_id",
|
|
2144
|
+
"type": "core::integer::u256"
|
|
2145
|
+
}
|
|
2146
|
+
],
|
|
2147
|
+
"outputs": [
|
|
2148
|
+
{
|
|
2149
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
2150
|
+
}
|
|
2151
|
+
],
|
|
2152
|
+
"state_mutability": "view"
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
"type": "function",
|
|
2156
|
+
"name": "get_last_drop_id",
|
|
2157
|
+
"inputs": [],
|
|
2158
|
+
"outputs": [
|
|
2159
|
+
{
|
|
2160
|
+
"type": "core::integer::u256"
|
|
2161
|
+
}
|
|
2162
|
+
],
|
|
2163
|
+
"state_mutability": "view"
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
"type": "function",
|
|
2167
|
+
"name": "get_collection_class_hash",
|
|
2168
|
+
"inputs": [],
|
|
2169
|
+
"outputs": [
|
|
2170
|
+
{
|
|
2171
|
+
"type": "core::starknet::class_hash::ClassHash"
|
|
2172
|
+
}
|
|
2173
|
+
],
|
|
2174
|
+
"state_mutability": "view"
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
"type": "function",
|
|
2178
|
+
"name": "version",
|
|
2179
|
+
"inputs": [],
|
|
2180
|
+
"outputs": [
|
|
2181
|
+
{
|
|
2182
|
+
"type": "core::felt252"
|
|
2183
|
+
}
|
|
2184
|
+
],
|
|
2185
|
+
"state_mutability": "view"
|
|
2186
|
+
}
|
|
2187
|
+
]
|
|
1594
2188
|
},
|
|
1595
2189
|
{
|
|
1596
|
-
type: "
|
|
1597
|
-
name: "
|
|
1598
|
-
inputs: [
|
|
1599
|
-
|
|
1600
|
-
|
|
2190
|
+
"type": "constructor",
|
|
2191
|
+
"name": "constructor",
|
|
2192
|
+
"inputs": [
|
|
2193
|
+
{
|
|
2194
|
+
"name": "collection_class_hash",
|
|
2195
|
+
"type": "core::starknet::class_hash::ClassHash"
|
|
2196
|
+
}
|
|
2197
|
+
]
|
|
1601
2198
|
},
|
|
1602
2199
|
{
|
|
1603
|
-
type: "
|
|
1604
|
-
name: "
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
2200
|
+
"type": "event",
|
|
2201
|
+
"name": "collection_drop::events::DropCreated",
|
|
2202
|
+
"kind": "struct",
|
|
2203
|
+
"members": [
|
|
2204
|
+
{
|
|
2205
|
+
"name": "drop_id",
|
|
2206
|
+
"type": "core::integer::u256",
|
|
2207
|
+
"kind": "key"
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
"name": "organizer",
|
|
2211
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
2212
|
+
"kind": "key"
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
"name": "collection_address",
|
|
2216
|
+
"type": "core::starknet::contract_address::ContractAddress",
|
|
2217
|
+
"kind": "data"
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"name": "name",
|
|
2221
|
+
"type": "core::byte_array::ByteArray",
|
|
2222
|
+
"kind": "data"
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
"name": "symbol",
|
|
2226
|
+
"type": "core::byte_array::ByteArray",
|
|
2227
|
+
"kind": "data"
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
"name": "base_uri",
|
|
2231
|
+
"type": "core::byte_array::ByteArray",
|
|
2232
|
+
"kind": "data"
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
"name": "max_supply",
|
|
2236
|
+
"type": "core::integer::u256",
|
|
2237
|
+
"kind": "data"
|
|
2238
|
+
},
|
|
2239
|
+
{
|
|
2240
|
+
"name": "terms",
|
|
2241
|
+
"type": "collection_drop::types::SaleTerms",
|
|
2242
|
+
"kind": "data"
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
"name": "allowlist_root",
|
|
2246
|
+
"type": "core::felt252",
|
|
2247
|
+
"kind": "data"
|
|
2248
|
+
}
|
|
2249
|
+
]
|
|
1608
2250
|
},
|
|
1609
2251
|
{
|
|
1610
|
-
type: "
|
|
1611
|
-
name: "
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
2252
|
+
"type": "event",
|
|
2253
|
+
"name": "collection_drop::drop_factory::DropFactory::Event",
|
|
2254
|
+
"kind": "enum",
|
|
2255
|
+
"variants": [
|
|
2256
|
+
{
|
|
2257
|
+
"name": "DropCreated",
|
|
2258
|
+
"type": "collection_drop::events::DropCreated",
|
|
2259
|
+
"kind": "nested"
|
|
2260
|
+
}
|
|
2261
|
+
]
|
|
1615
2262
|
}
|
|
1616
2263
|
];
|
|
1617
2264
|
|
|
@@ -9768,7 +10415,7 @@ function merkleTree(leafHashes) {
|
|
|
9768
10415
|
};
|
|
9769
10416
|
}
|
|
9770
10417
|
function buildPopAllowlist(addresses) {
|
|
9771
|
-
const unique = [...new Set(addresses.map((a) =>
|
|
10418
|
+
const unique = [...new Set(addresses.map((a) => chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", a)))];
|
|
9772
10419
|
if (unique.length === 0) throw new Error("An allowlist needs at least one address");
|
|
9773
10420
|
const leaves = unique.map((address) => ({ address, leaf: popLeafHash(address) }));
|
|
9774
10421
|
const tree = merkleTree(leaves.map((l) => l.leaf));
|
|
@@ -9794,7 +10441,7 @@ function decodePopClaimFragment(fragment) {
|
|
|
9794
10441
|
|
|
9795
10442
|
// src/starknet/pop-claim.ts
|
|
9796
10443
|
function popClaimLinks(origin, collection, list) {
|
|
9797
|
-
const base = `${origin}${
|
|
10444
|
+
const base = `${origin}${chunk4SZV7J2R_cjs.collectionHref("STARKNET", collection)}`;
|
|
9798
10445
|
return Object.entries(list.proofs).map(([address, proof]) => ({
|
|
9799
10446
|
address,
|
|
9800
10447
|
url: `${base}${encodePopClaimFragment(proof)}`
|
|
@@ -9804,7 +10451,7 @@ function popClaimLinksCsv(links) {
|
|
|
9804
10451
|
return ["address,claim_link", ...links.map((l) => `${l.address},${l.url}`)].join("\n");
|
|
9805
10452
|
}
|
|
9806
10453
|
async function popClaimInfo(provider, collection) {
|
|
9807
|
-
const contractAddress =
|
|
10454
|
+
const contractAddress = chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", collection);
|
|
9808
10455
|
const [root, end] = await Promise.all([
|
|
9809
10456
|
provider.callContract({ contractAddress, entrypoint: "allowlist_root", calldata: [] }),
|
|
9810
10457
|
provider.callContract({ contractAddress, entrypoint: "claim_end_time", calldata: [] })
|
|
@@ -9821,7 +10468,7 @@ function popClaimState(input) {
|
|
|
9821
10468
|
if (!wallet || !verifyPopProof(info.root, wallet, proof)) return "wrong-wallet";
|
|
9822
10469
|
return "ready";
|
|
9823
10470
|
}
|
|
9824
|
-
var addr = (a) =>
|
|
10471
|
+
var addr = (a) => chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", a);
|
|
9825
10472
|
var byteArrayFelts = (s) => starknet.CallData.compile([starknet.byteArray.byteArrayFromString(s)]);
|
|
9826
10473
|
var popCalls = {
|
|
9827
10474
|
claim(collection, proof) {
|
|
@@ -9844,7 +10491,7 @@ var popCalls = {
|
|
|
9844
10491
|
// src/starknet/services/pop.ts
|
|
9845
10492
|
var PopService = class {
|
|
9846
10493
|
constructor(config) {
|
|
9847
|
-
this.factoryAddress =
|
|
10494
|
+
this.factoryAddress = chunkVJVBWHAD_cjs.getStarknetCoordinates(config.chain).popFactory;
|
|
9848
10495
|
}
|
|
9849
10496
|
async createCollection(account, params) {
|
|
9850
10497
|
const factory = newContract(POPFactoryABI, this.factoryAddress, account);
|
|
@@ -9876,17 +10523,21 @@ var PopService = class {
|
|
|
9876
10523
|
};
|
|
9877
10524
|
async function popHasClaimed(provider, collection, address) {
|
|
9878
10525
|
const res = await provider.callContract({
|
|
9879
|
-
contractAddress:
|
|
10526
|
+
contractAddress: chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", collection),
|
|
9880
10527
|
entrypoint: "has_claimed",
|
|
9881
|
-
calldata: [
|
|
10528
|
+
calldata: [chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address)]
|
|
9882
10529
|
});
|
|
9883
10530
|
return BigInt(res[0] ?? "0x0") !== 0n;
|
|
9884
10531
|
}
|
|
10532
|
+
function feeBps(surface, cfg) {
|
|
10533
|
+
if (!cfg.enabled || !cfg.fundAddress) return 0;
|
|
10534
|
+
return surface === "marketplace" ? cfg.marketplaceBps : surface === "launchpad" ? cfg.launchpadBps : cfg.sponsorshipBps;
|
|
10535
|
+
}
|
|
10536
|
+
function feeAmount(grossAmount, bps) {
|
|
10537
|
+
return bps <= 0 ? 0n : grossAmount * BigInt(bps) / 10000n;
|
|
10538
|
+
}
|
|
9885
10539
|
function buildFeeCall(p, cfg) {
|
|
9886
|
-
|
|
9887
|
-
const bps = p.surface === "marketplace" ? cfg.marketplaceBps : p.surface === "launchpad" ? cfg.launchpadBps : cfg.sponsorshipBps;
|
|
9888
|
-
if (bps <= 0) return null;
|
|
9889
|
-
const fee = p.grossAmount * BigInt(bps) / 10000n;
|
|
10540
|
+
const fee = feeAmount(p.grossAmount, feeBps(p.surface, cfg));
|
|
9890
10541
|
if (fee <= 0n) return null;
|
|
9891
10542
|
const u = starknet.cairo.uint256(fee.toString());
|
|
9892
10543
|
return {
|
|
@@ -9895,96 +10546,169 @@ function buildFeeCall(p, cfg) {
|
|
|
9895
10546
|
calldata: [cfg.fundAddress, u.low.toString(), u.high.toString()]
|
|
9896
10547
|
};
|
|
9897
10548
|
}
|
|
10549
|
+
var addr2 = (a) => chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", a);
|
|
10550
|
+
var factoryData = new starknet.CallData(DropFactoryABI);
|
|
10551
|
+
var collectionData = new starknet.CallData(DropCollectionABI);
|
|
10552
|
+
function toContractTerms(t) {
|
|
10553
|
+
const price = BigInt(t.price);
|
|
10554
|
+
return {
|
|
10555
|
+
start_time: t.startTime,
|
|
10556
|
+
end_time: t.endTime,
|
|
10557
|
+
price: starknet.cairo.uint256(price),
|
|
10558
|
+
payment_token: price === 0n ? "0x0" : addr2(t.paymentToken),
|
|
10559
|
+
max_per_wallet: starknet.cairo.uint256(BigInt(t.maxPerWallet))
|
|
10560
|
+
};
|
|
10561
|
+
}
|
|
10562
|
+
var dropCalls = {
|
|
10563
|
+
create(factory, p) {
|
|
10564
|
+
return {
|
|
10565
|
+
contractAddress: addr2(factory),
|
|
10566
|
+
entrypoint: "create_drop",
|
|
10567
|
+
calldata: factoryData.compile("create_drop", {
|
|
10568
|
+
name: p.name,
|
|
10569
|
+
symbol: p.symbol,
|
|
10570
|
+
base_uri: p.baseUri,
|
|
10571
|
+
max_supply: starknet.cairo.uint256(BigInt(p.maxSupply)),
|
|
10572
|
+
terms: toContractTerms(p.terms),
|
|
10573
|
+
allowlist_root: p.allowlistRoot ?? "0x0"
|
|
10574
|
+
})
|
|
10575
|
+
};
|
|
10576
|
+
},
|
|
10577
|
+
/** Approve (paid drops) and claim. The platform fee call is added by the caller. */
|
|
10578
|
+
claim(collection, p) {
|
|
10579
|
+
const quantity = BigInt(p.quantity);
|
|
10580
|
+
const total = BigInt(p.price) * quantity;
|
|
10581
|
+
const calls = [];
|
|
10582
|
+
if (total > 0n) {
|
|
10583
|
+
calls.push({
|
|
10584
|
+
contractAddress: addr2(p.paymentToken),
|
|
10585
|
+
entrypoint: "approve",
|
|
10586
|
+
calldata: starknet.CallData.compile([addr2(collection), starknet.cairo.uint256(total)])
|
|
10587
|
+
});
|
|
10588
|
+
}
|
|
10589
|
+
calls.push({
|
|
10590
|
+
contractAddress: addr2(collection),
|
|
10591
|
+
entrypoint: "claim",
|
|
10592
|
+
calldata: collectionData.compile("claim", { quantity: starknet.cairo.uint256(quantity), proof: p.proof ?? [] })
|
|
10593
|
+
});
|
|
10594
|
+
return calls;
|
|
10595
|
+
},
|
|
10596
|
+
/** Organizer only: free mint within the supply cap. */
|
|
10597
|
+
issue(collection, recipient, quantity) {
|
|
10598
|
+
return {
|
|
10599
|
+
contractAddress: addr2(collection),
|
|
10600
|
+
entrypoint: "issue",
|
|
10601
|
+
calldata: collectionData.compile("issue", { recipient: addr2(recipient), quantity: starknet.cairo.uint256(BigInt(quantity)) })
|
|
10602
|
+
};
|
|
10603
|
+
},
|
|
10604
|
+
/** Organizer only. 0 opens the drop to everyone. */
|
|
10605
|
+
setAllowlistRoot(collection, root) {
|
|
10606
|
+
return { contractAddress: addr2(collection), entrypoint: "set_allowlist_root", calldata: collectionData.compile("set_allowlist_root", { root }) };
|
|
10607
|
+
}
|
|
10608
|
+
};
|
|
10609
|
+
function dropMintCost(price, quantity, cfg) {
|
|
10610
|
+
const subtotal = BigInt(price) * BigInt(quantity);
|
|
10611
|
+
const fee = feeAmount(subtotal, feeBps("launchpad", cfg));
|
|
10612
|
+
return { subtotal, fee, total: subtotal + fee };
|
|
10613
|
+
}
|
|
9898
10614
|
|
|
9899
|
-
// src/starknet/
|
|
9900
|
-
|
|
10615
|
+
// src/starknet/drop-state.ts
|
|
10616
|
+
var hex = (v) => chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", v ?? "0x0");
|
|
10617
|
+
var u256 = (low, high) => BigInt(low ?? "0x0") + (BigInt(high ?? "0x0") << 128n);
|
|
10618
|
+
async function readDrop(provider, collection) {
|
|
10619
|
+
const contractAddress = hex(collection);
|
|
10620
|
+
const read = (entrypoint) => provider.callContract({ contractAddress, entrypoint, calldata: [] });
|
|
10621
|
+
const [organizer, terms, root, max, minted] = await Promise.all([
|
|
10622
|
+
read("organizer"),
|
|
10623
|
+
read("terms"),
|
|
10624
|
+
read("allowlist_root"),
|
|
10625
|
+
read("max_supply"),
|
|
10626
|
+
read("total_minted")
|
|
10627
|
+
]);
|
|
9901
10628
|
return {
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
10629
|
+
organizer: hex(organizer[0]),
|
|
10630
|
+
startTime: Number(BigInt(terms[0] ?? "0x0")),
|
|
10631
|
+
endTime: Number(BigInt(terms[1] ?? "0x0")),
|
|
10632
|
+
price: u256(terms[2], terms[3]),
|
|
10633
|
+
paymentToken: hex(terms[4]),
|
|
10634
|
+
maxPerWallet: u256(terms[5], terms[6]),
|
|
10635
|
+
allowlistRoot: root[0] ?? "0x0",
|
|
10636
|
+
maxSupply: u256(max[0], max[1]),
|
|
10637
|
+
totalMinted: u256(minted[0], minted[1])
|
|
9907
10638
|
};
|
|
9908
10639
|
}
|
|
10640
|
+
async function dropClaimedBy(provider, collection, wallet) {
|
|
10641
|
+
const res = await provider.callContract({ contractAddress: hex(collection), entrypoint: "claimed_by", calldata: [hex(wallet)] });
|
|
10642
|
+
return u256(res[0], res[1]);
|
|
10643
|
+
}
|
|
10644
|
+
var DROP_MAX_CLAIM_QUANTITY = 50n;
|
|
10645
|
+
function dropMintState(input) {
|
|
10646
|
+
const none = (state) => ({ state, maxQuantity: 0n });
|
|
10647
|
+
const { drop, wallet, claimed, proof, balance, now } = input;
|
|
10648
|
+
if (!drop) return none("loading");
|
|
10649
|
+
if (drop.startTime !== 0 && now < drop.startTime) return none("upcoming");
|
|
10650
|
+
if (drop.endTime !== 0 && now > drop.endTime) return none("ended");
|
|
10651
|
+
const supplyLeft = drop.maxSupply === 0n ? null : drop.maxSupply - drop.totalMinted;
|
|
10652
|
+
if (supplyLeft !== null && supplyLeft <= 0n) return none("sold-out");
|
|
10653
|
+
if (!wallet) return none("no-wallet");
|
|
10654
|
+
if (BigInt(drop.allowlistRoot) !== 0n) {
|
|
10655
|
+
if (proof === null) return none("no-link");
|
|
10656
|
+
if (!verifyPopProof(drop.allowlistRoot, wallet, proof)) return none("not-on-list");
|
|
10657
|
+
}
|
|
10658
|
+
if (claimed === null) return none("loading");
|
|
10659
|
+
const walletLeft = drop.maxPerWallet === 0n ? null : drop.maxPerWallet - claimed;
|
|
10660
|
+
if (walletLeft !== null && walletLeft <= 0n) return none("limit-reached");
|
|
10661
|
+
let max = DROP_MAX_CLAIM_QUANTITY;
|
|
10662
|
+
if (supplyLeft !== null && supplyLeft < max) max = supplyLeft;
|
|
10663
|
+
if (walletLeft !== null && walletLeft < max) max = walletLeft;
|
|
10664
|
+
if (drop.price > 0n) {
|
|
10665
|
+
if (balance === null) return none("loading");
|
|
10666
|
+
while (max > 0n && dropMintCost(drop.price, max, input.feeConfig).total > balance) max--;
|
|
10667
|
+
if (max === 0n) return none("insufficient-balance");
|
|
10668
|
+
}
|
|
10669
|
+
return { state: "ready", maxQuantity: max };
|
|
10670
|
+
}
|
|
10671
|
+
function dropClaimLinks(origin, collection, list) {
|
|
10672
|
+
const base = `${origin}${chunk4SZV7J2R_cjs.dropHref(collection)}`;
|
|
10673
|
+
return Object.entries(list.proofs).map(([address, proof]) => ({
|
|
10674
|
+
address,
|
|
10675
|
+
url: `${base}${encodePopClaimFragment(proof)}`
|
|
10676
|
+
}));
|
|
10677
|
+
}
|
|
10678
|
+
|
|
10679
|
+
// src/starknet/services/drop.ts
|
|
9909
10680
|
var DropService = class {
|
|
9910
|
-
constructor(config) {
|
|
9911
|
-
this.factoryAddress =
|
|
10681
|
+
constructor(config, reader) {
|
|
10682
|
+
this.factoryAddress = chunkVJVBWHAD_cjs.getStarknetCoordinates(config.chain).dropFactory;
|
|
9912
10683
|
this.config = config;
|
|
10684
|
+
this.reader = reader ?? new starknet.RpcProvider({ nodeUrl: config.rpcUrl });
|
|
9913
10685
|
}
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
}
|
|
9917
|
-
async claim(account, collectionAddress, quantity = 1) {
|
|
9918
|
-
const collection = this._collection(collectionAddress, account);
|
|
9919
|
-
const qty = BigInt(quantity);
|
|
9920
|
-
const claimCall = collection.populate("claim", [qty]);
|
|
9921
|
-
const conditions = await collection.get_claim_conditions();
|
|
9922
|
-
const price = BigInt(conditions.price);
|
|
9923
|
-
const paymentToken = typeof conditions.payment_token === "bigint" ? "0x" + conditions.payment_token.toString(16) : conditions.payment_token;
|
|
9924
|
-
const feeCall = price > 0n ? buildFeeCall(
|
|
9925
|
-
{ surface: "launchpad", token: paymentToken, grossAmount: price * qty },
|
|
9926
|
-
this.config.feeConfig
|
|
9927
|
-
) : null;
|
|
9928
|
-
const calls = feeCall ? [claimCall, feeCall] : [claimCall];
|
|
9929
|
-
const res = await account.execute(calls);
|
|
9930
|
-
return { txHash: res.transaction_hash };
|
|
9931
|
-
}
|
|
9932
|
-
async adminMint(account, params) {
|
|
9933
|
-
const call = this._collection(params.collection, account).populate("admin_mint", [
|
|
9934
|
-
params.recipient,
|
|
9935
|
-
BigInt(params.quantity ?? 1),
|
|
9936
|
-
params.customUri ?? ""
|
|
9937
|
-
]);
|
|
9938
|
-
const res = await account.execute([call]);
|
|
9939
|
-
return { txHash: res.transaction_hash };
|
|
9940
|
-
}
|
|
9941
|
-
async setClaimConditions(account, params) {
|
|
9942
|
-
const call = this._collection(params.collection, account).populate("set_claim_conditions", [
|
|
9943
|
-
toContractConditions(params.conditions)
|
|
9944
|
-
]);
|
|
9945
|
-
const res = await account.execute([call]);
|
|
9946
|
-
return { txHash: res.transaction_hash };
|
|
9947
|
-
}
|
|
9948
|
-
async setAllowlistEnabled(account, params) {
|
|
9949
|
-
const call = this._collection(params.collection, account).populate("set_allowlist_enabled", [params.enabled]);
|
|
9950
|
-
const res = await account.execute([call]);
|
|
9951
|
-
return { txHash: res.transaction_hash };
|
|
9952
|
-
}
|
|
9953
|
-
async addToAllowlist(account, params) {
|
|
9954
|
-
const call = this._collection(params.collection, account).populate("add_to_allowlist", [params.address]);
|
|
9955
|
-
const res = await account.execute([call]);
|
|
9956
|
-
return { txHash: res.transaction_hash };
|
|
9957
|
-
}
|
|
9958
|
-
async batchAddToAllowlist(account, params) {
|
|
9959
|
-
const collection = this._collection(params.collection, account);
|
|
9960
|
-
const CHUNK = 200;
|
|
9961
|
-
const calls = [];
|
|
9962
|
-
for (let i = 0; i < params.addresses.length; i += CHUNK) {
|
|
9963
|
-
calls.push(collection.populate("batch_add_to_allowlist", [params.addresses.slice(i, i + CHUNK)]));
|
|
9964
|
-
}
|
|
9965
|
-
const res = await account.execute(calls);
|
|
10686
|
+
async createDrop(account, params) {
|
|
10687
|
+
const res = await account.execute([dropCalls.create(this.factoryAddress, params)]);
|
|
9966
10688
|
return { txHash: res.transaction_hash };
|
|
9967
10689
|
}
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
const
|
|
10690
|
+
/** Mints `quantity` to the account, paying the drop's price and the platform fee. */
|
|
10691
|
+
async claim(account, params) {
|
|
10692
|
+
const drop = await readDrop(this.reader, params.collection);
|
|
10693
|
+
const calls = dropCalls.claim(params.collection, {
|
|
10694
|
+
quantity: params.quantity,
|
|
10695
|
+
proof: params.proof,
|
|
10696
|
+
price: drop.price,
|
|
10697
|
+
paymentToken: drop.paymentToken
|
|
10698
|
+
});
|
|
10699
|
+
const fee = drop.price > 0n ? buildFeeCall(
|
|
10700
|
+
{ surface: "launchpad", token: drop.paymentToken, grossAmount: drop.price * BigInt(params.quantity) },
|
|
10701
|
+
this.config.feeConfig
|
|
10702
|
+
) : null;
|
|
10703
|
+
const res = await account.execute(fee ? [...calls, fee] : calls);
|
|
9971
10704
|
return { txHash: res.transaction_hash };
|
|
9972
10705
|
}
|
|
9973
|
-
async
|
|
9974
|
-
const
|
|
9975
|
-
const res = await account.execute([call]);
|
|
10706
|
+
async issue(account, params) {
|
|
10707
|
+
const res = await account.execute([dropCalls.issue(params.collection, params.recipient, params.quantity)]);
|
|
9976
10708
|
return { txHash: res.transaction_hash };
|
|
9977
10709
|
}
|
|
9978
|
-
async
|
|
9979
|
-
const
|
|
9980
|
-
const call = factory.populate("create_drop", [
|
|
9981
|
-
params.name,
|
|
9982
|
-
params.symbol,
|
|
9983
|
-
params.baseUri,
|
|
9984
|
-
BigInt(params.maxSupply),
|
|
9985
|
-
toContractConditions(params.initialConditions)
|
|
9986
|
-
]);
|
|
9987
|
-
const res = await account.execute([call]);
|
|
10710
|
+
async setAllowlistRoot(account, params) {
|
|
10711
|
+
const res = await account.execute([dropCalls.setAllowlistRoot(params.collection, params.root)]);
|
|
9988
10712
|
return { txHash: res.transaction_hash };
|
|
9989
10713
|
}
|
|
9990
10714
|
};
|
|
@@ -9992,19 +10716,19 @@ var DropService = class {
|
|
|
9992
10716
|
// src/starknet/services/erc1155collection.ts
|
|
9993
10717
|
var ERC1155CollectionService = class {
|
|
9994
10718
|
constructor(config) {
|
|
9995
|
-
this.factoryAddress = config.collection1155Contract ??
|
|
10719
|
+
this.factoryAddress = config.collection1155Contract ?? chunkVJVBWHAD_cjs.getStarknetCoordinates(config.chain).collection1155;
|
|
9996
10720
|
}
|
|
9997
10721
|
_factory(account) {
|
|
9998
10722
|
return newContract(
|
|
9999
10723
|
IPCollection1155FactoryABI,
|
|
10000
|
-
|
|
10724
|
+
chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", this.factoryAddress),
|
|
10001
10725
|
account
|
|
10002
10726
|
);
|
|
10003
10727
|
}
|
|
10004
10728
|
_collection(address, account) {
|
|
10005
10729
|
return newContract(
|
|
10006
10730
|
IPCollection1155ABI,
|
|
10007
|
-
|
|
10731
|
+
chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address),
|
|
10008
10732
|
account
|
|
10009
10733
|
);
|
|
10010
10734
|
}
|
|
@@ -10152,7 +10876,7 @@ function validatePrice(quoteDecimals, price) {
|
|
|
10152
10876
|
}
|
|
10153
10877
|
var MAX_TEAM_ALLOCATION_PERCENT = 10;
|
|
10154
10878
|
var MAX_HOLDERS_AT_LAUNCH = 10;
|
|
10155
|
-
function
|
|
10879
|
+
function u2562(parts, offset = 0) {
|
|
10156
10880
|
return BigInt(parts[offset] ?? "0x0") + (BigInt(parts[offset + 1] ?? "0x0") << 128n);
|
|
10157
10881
|
}
|
|
10158
10882
|
async function getCreatorCoinGuarantees(coinAddress, provider) {
|
|
@@ -10168,8 +10892,8 @@ async function getCreatorCoinGuarantees(coinAddress, provider) {
|
|
|
10168
10892
|
call("liquidity_type").catch(() => null)
|
|
10169
10893
|
]);
|
|
10170
10894
|
const isLaunched = BigInt(launchedRes[0] ?? "0x0") !== 0n;
|
|
10171
|
-
const totalSupply =
|
|
10172
|
-
const teamAllocation =
|
|
10895
|
+
const totalSupply = u2562(supplyRes);
|
|
10896
|
+
const teamAllocation = u2562(allocRes);
|
|
10173
10897
|
const teamAllocationPercent = totalSupply > 0n ? Number(teamAllocation * 10000n / totalSupply) / 100 : null;
|
|
10174
10898
|
const launchedAtBlock = isLaunched && blockRes?.[0] != null ? Number(BigInt(blockRes[0])) : null;
|
|
10175
10899
|
const liquidityPositionId = liquidityRes && BigInt(liquidityRes[0] ?? "0x1") === 0n && liquidityRes[2] != null ? BigInt(liquidityRes[2]).toString() : null;
|
|
@@ -10187,7 +10911,7 @@ function factoryContract() {
|
|
|
10187
10911
|
if (!_factoryContract) {
|
|
10188
10912
|
_factoryContract = newContract(
|
|
10189
10913
|
CreatorCoinFactoryABI,
|
|
10190
|
-
|
|
10914
|
+
chunkVJVBWHAD_cjs.getStarknetCoordinates("STARKNET").creatorCoinFactory
|
|
10191
10915
|
);
|
|
10192
10916
|
}
|
|
10193
10917
|
return _factoryContract;
|
|
@@ -10224,7 +10948,7 @@ function buildLaunchOnEkuboCalls(params) {
|
|
|
10224
10948
|
calls.push({
|
|
10225
10949
|
contractAddress: params.quoteToken,
|
|
10226
10950
|
entrypoint: "transfer",
|
|
10227
|
-
calldata: [
|
|
10951
|
+
calldata: [chunkVJVBWHAD_cjs.getStarknetCoordinates("STARKNET").creatorCoinFactory, amt.low, amt.high]
|
|
10228
10952
|
});
|
|
10229
10953
|
}
|
|
10230
10954
|
calls.push(factoryContract().populate("launch_on_ekubo", [launchParameters, ekuboParameters]));
|
|
@@ -10232,26 +10956,26 @@ function buildLaunchOnEkuboCalls(params) {
|
|
|
10232
10956
|
}
|
|
10233
10957
|
var CREATOR_COIN_CREATED_SELECTOR = starknet.hash.getSelectorFromName("CreatorCoinCreated");
|
|
10234
10958
|
function parseCreatorCoinCreated(receipt) {
|
|
10235
|
-
const factory =
|
|
10959
|
+
const factory = chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", chunkVJVBWHAD_cjs.getStarknetCoordinates("STARKNET").creatorCoinFactory);
|
|
10236
10960
|
for (const ev of receipt?.events ?? []) {
|
|
10237
10961
|
let from;
|
|
10238
10962
|
try {
|
|
10239
|
-
from =
|
|
10963
|
+
from = chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", ev.from_address ?? "");
|
|
10240
10964
|
} catch {
|
|
10241
10965
|
continue;
|
|
10242
10966
|
}
|
|
10243
10967
|
if (from !== factory) continue;
|
|
10244
10968
|
const k0 = ev.keys?.[0];
|
|
10245
|
-
if (!k0 ||
|
|
10969
|
+
if (!k0 || chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", k0) !== chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", CREATOR_COIN_CREATED_SELECTOR)) continue;
|
|
10246
10970
|
const data = ev.data ?? [];
|
|
10247
10971
|
if (data.length < 1) continue;
|
|
10248
|
-
return
|
|
10972
|
+
return chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", data[data.length - 1]);
|
|
10249
10973
|
}
|
|
10250
10974
|
throw new Error("Coin deployed but the coin address could not be read from the receipt");
|
|
10251
10975
|
}
|
|
10252
10976
|
var CreatorCoinService = class {
|
|
10253
10977
|
constructor(config) {
|
|
10254
|
-
this.factoryAddress =
|
|
10978
|
+
this.factoryAddress = chunkVJVBWHAD_cjs.getStarknetCoordinates(config.chain).creatorCoinFactory;
|
|
10255
10979
|
this.config = config;
|
|
10256
10980
|
}
|
|
10257
10981
|
_factory(account) {
|
|
@@ -10276,19 +11000,19 @@ var CreatorCoinService = class {
|
|
|
10276
11000
|
var TicketService = class {
|
|
10277
11001
|
constructor(config) {
|
|
10278
11002
|
this.config = config;
|
|
10279
|
-
this.factoryAddress =
|
|
11003
|
+
this.factoryAddress = chunkVJVBWHAD_cjs.getStarknetCoordinates(config.chain).ipTicketsFactory;
|
|
10280
11004
|
}
|
|
10281
11005
|
_factory(account, factoryAddress) {
|
|
10282
11006
|
const address = factoryAddress ?? this.factoryAddress;
|
|
10283
11007
|
if (!address) throw new Error("IP-Tickets factory address not configured for this chain");
|
|
10284
|
-
return newContract(IPTicketCollectionFactoryABI,
|
|
11008
|
+
return newContract(IPTicketCollectionFactoryABI, chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address), account);
|
|
10285
11009
|
}
|
|
10286
11010
|
_collection(address, account) {
|
|
10287
|
-
return newContract(IPTicketCollectionABI,
|
|
11011
|
+
return newContract(IPTicketCollectionABI, chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address), account);
|
|
10288
11012
|
}
|
|
10289
11013
|
_collectionRead(address) {
|
|
10290
11014
|
const provider = new starknet.RpcProvider({ nodeUrl: this.config.rpcUrl });
|
|
10291
|
-
return newContract(IPTicketCollectionABI,
|
|
11015
|
+
return newContract(IPTicketCollectionABI, chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address), provider);
|
|
10292
11016
|
}
|
|
10293
11017
|
async deployCollection(account, params) {
|
|
10294
11018
|
const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [
|
|
@@ -10349,19 +11073,19 @@ var TicketService = class {
|
|
|
10349
11073
|
var ClubService = class {
|
|
10350
11074
|
constructor(config) {
|
|
10351
11075
|
this.config = config;
|
|
10352
|
-
this.factoryAddress =
|
|
11076
|
+
this.factoryAddress = chunkVJVBWHAD_cjs.getStarknetCoordinates(config.chain).ipClubFactory;
|
|
10353
11077
|
}
|
|
10354
11078
|
_factory(account, factoryAddress) {
|
|
10355
11079
|
const address = factoryAddress ?? this.factoryAddress;
|
|
10356
11080
|
if (!address) throw new Error("IP-Club factory address not configured for this chain");
|
|
10357
|
-
return newContract(IPClubFactoryABI,
|
|
11081
|
+
return newContract(IPClubFactoryABI, chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address), account);
|
|
10358
11082
|
}
|
|
10359
11083
|
_collection(address, account) {
|
|
10360
|
-
return newContract(IPClubCollectionABI,
|
|
11084
|
+
return newContract(IPClubCollectionABI, chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address), account);
|
|
10361
11085
|
}
|
|
10362
11086
|
_collectionRead(address) {
|
|
10363
11087
|
const provider = new starknet.RpcProvider({ nodeUrl: this.config.rpcUrl });
|
|
10364
|
-
return newContract(IPClubCollectionABI,
|
|
11088
|
+
return newContract(IPClubCollectionABI, chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address), provider);
|
|
10365
11089
|
}
|
|
10366
11090
|
async deployCollection(account, params) {
|
|
10367
11091
|
const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [
|
|
@@ -10424,14 +11148,14 @@ var ClubService = class {
|
|
|
10424
11148
|
var SponsorshipService = class {
|
|
10425
11149
|
constructor(config) {
|
|
10426
11150
|
this.config = config;
|
|
10427
|
-
this.sponsorshipAddress =
|
|
11151
|
+
this.sponsorshipAddress = chunkVJVBWHAD_cjs.getStarknetCoordinates(config.chain).ipSponsorship;
|
|
10428
11152
|
}
|
|
10429
11153
|
_contract(account, address) {
|
|
10430
11154
|
const resolved = address ?? this.sponsorshipAddress;
|
|
10431
11155
|
if (!resolved) {
|
|
10432
11156
|
throw new Error("IP-Sponsorship address not configured for this chain");
|
|
10433
11157
|
}
|
|
10434
|
-
return newContract(IPSponsorshipABI,
|
|
11158
|
+
return newContract(IPSponsorshipABI, chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", resolved), account);
|
|
10435
11159
|
}
|
|
10436
11160
|
_contractRead(address) {
|
|
10437
11161
|
const resolved = address ?? this.sponsorshipAddress;
|
|
@@ -10439,7 +11163,7 @@ var SponsorshipService = class {
|
|
|
10439
11163
|
throw new Error("IP-Sponsorship address not configured for this chain");
|
|
10440
11164
|
}
|
|
10441
11165
|
const provider = new starknet.RpcProvider({ nodeUrl: this.config.rpcUrl });
|
|
10442
|
-
return newContract(IPSponsorshipABI,
|
|
11166
|
+
return newContract(IPSponsorshipABI, chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", resolved), provider);
|
|
10443
11167
|
}
|
|
10444
11168
|
async createOffer(account, params) {
|
|
10445
11169
|
const specificSponsor = params.specificSponsor ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.specificSponsor) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
|
|
@@ -10474,7 +11198,7 @@ var SponsorshipService = class {
|
|
|
10474
11198
|
const approveCall = {
|
|
10475
11199
|
contractAddress: params.paymentToken,
|
|
10476
11200
|
entrypoint: "approve",
|
|
10477
|
-
calldata: [
|
|
11201
|
+
calldata: [chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", sponsorshipAddress), amount.low.toString(), amount.high.toString()]
|
|
10478
11202
|
};
|
|
10479
11203
|
const bidCall = this._contract(account, sponsorshipAddress).populate("place_bid", [
|
|
10480
11204
|
starknet.cairo.uint256(params.offerId),
|
|
@@ -10601,7 +11325,7 @@ var SponsorshipService = class {
|
|
|
10601
11325
|
// src/starknet/client.ts
|
|
10602
11326
|
var MedialaneClient = class {
|
|
10603
11327
|
constructor(rawConfig = {}) {
|
|
10604
|
-
this.config =
|
|
11328
|
+
this.config = chunk4SZV7J2R_cjs.resolveConfig(rawConfig);
|
|
10605
11329
|
this.services = {
|
|
10606
11330
|
pop: new PopService(this.config),
|
|
10607
11331
|
drop: new DropService(this.config),
|
|
@@ -10612,9 +11336,9 @@ var MedialaneClient = class {
|
|
|
10612
11336
|
sponsorship: new SponsorshipService(this.config)
|
|
10613
11337
|
};
|
|
10614
11338
|
if (!this.config.backendUrl) {
|
|
10615
|
-
const sentinel = new
|
|
11339
|
+
const sentinel = new chunk4SZV7J2R_cjs.ApiClient("https://medialane-sdk-no-backend.invalid", this.config.apiKey);
|
|
10616
11340
|
const apiMethodNames = new Set(
|
|
10617
|
-
Object.getOwnPropertyNames(
|
|
11341
|
+
Object.getOwnPropertyNames(chunk4SZV7J2R_cjs.ApiClient.prototype).filter(
|
|
10618
11342
|
(k) => k !== "constructor" && typeof sentinel[k] === "function"
|
|
10619
11343
|
)
|
|
10620
11344
|
);
|
|
@@ -10631,7 +11355,7 @@ var MedialaneClient = class {
|
|
|
10631
11355
|
}
|
|
10632
11356
|
});
|
|
10633
11357
|
} else {
|
|
10634
|
-
this.api = new
|
|
11358
|
+
this.api = new chunk4SZV7J2R_cjs.ApiClient(this.config.backendUrl, this.config.apiKey, this.config.retryOptions, this.config.chain);
|
|
10635
11359
|
}
|
|
10636
11360
|
}
|
|
10637
11361
|
get chain() {
|
|
@@ -10803,7 +11527,7 @@ function buildListingOrder(i, cfg) {
|
|
|
10803
11527
|
salt: i.salt,
|
|
10804
11528
|
counter: i.counter
|
|
10805
11529
|
};
|
|
10806
|
-
const typedData =
|
|
11530
|
+
const typedData = chunk4SZV7J2R_cjs.stringifyBigInts(buildOrderTypedData(orderParams, getChainId(cfg)));
|
|
10807
11531
|
return { orderParams, typedData };
|
|
10808
11532
|
}
|
|
10809
11533
|
function buildOfferOrder(i, cfg) {
|
|
@@ -10824,11 +11548,11 @@ function buildOfferOrder(i, cfg) {
|
|
|
10824
11548
|
salt: i.salt,
|
|
10825
11549
|
counter: i.counter
|
|
10826
11550
|
};
|
|
10827
|
-
const typedData =
|
|
11551
|
+
const typedData = chunk4SZV7J2R_cjs.stringifyBigInts(buildOrderTypedData(orderParams, getChainId(cfg)));
|
|
10828
11552
|
return { orderParams, typedData };
|
|
10829
11553
|
}
|
|
10830
11554
|
function registerPayload(orderParams, signature) {
|
|
10831
|
-
return
|
|
11555
|
+
return chunk4SZV7J2R_cjs.stringifyBigInts({
|
|
10832
11556
|
parameters: {
|
|
10833
11557
|
...orderParams,
|
|
10834
11558
|
offer: { ...orderParams.offer, item_type: starknet.shortString.encodeShortString(orderParams.offer.item_type) },
|
|
@@ -10859,14 +11583,14 @@ function buildFulfillCalls(a, cfg) {
|
|
|
10859
11583
|
return fee ? [approve, fulfill, fee] : [approve, fulfill];
|
|
10860
11584
|
}
|
|
10861
11585
|
function buildCancelCalls(a, cfg) {
|
|
10862
|
-
const cancelRequest =
|
|
11586
|
+
const cancelRequest = chunk4SZV7J2R_cjs.stringifyBigInts({
|
|
10863
11587
|
cancelation: { order_hash: a.orderHash, offerer: a.offerer },
|
|
10864
11588
|
signature: a.signature
|
|
10865
11589
|
});
|
|
10866
11590
|
return [contractFor(cfg).populate("cancel_order", [cancelRequest])];
|
|
10867
11591
|
}
|
|
10868
11592
|
function buildCancelTypedData(orderHash, offerer, cfg) {
|
|
10869
|
-
return
|
|
11593
|
+
return chunk4SZV7J2R_cjs.stringifyBigInts(buildCancellationTypedData({ order_hash: orderHash, offerer }, getChainId(cfg)));
|
|
10870
11594
|
}
|
|
10871
11595
|
function contractFor2(cfg) {
|
|
10872
11596
|
return newContract(Medialane1155ABI, cfg.marketplace1155Contract, getProvider(cfg));
|
|
@@ -10889,7 +11613,7 @@ function buildListing1155Order(i, cfg) {
|
|
|
10889
11613
|
salt: i.salt,
|
|
10890
11614
|
counter: i.counter
|
|
10891
11615
|
};
|
|
10892
|
-
const typedData =
|
|
11616
|
+
const typedData = chunk4SZV7J2R_cjs.stringifyBigInts(
|
|
10893
11617
|
build1155OrderTypedData(orderParams, getChainId(cfg))
|
|
10894
11618
|
);
|
|
10895
11619
|
return { orderParams, typedData };
|
|
@@ -10912,13 +11636,13 @@ function buildOffer1155Order(i, cfg) {
|
|
|
10912
11636
|
salt: i.salt,
|
|
10913
11637
|
counter: i.counter
|
|
10914
11638
|
};
|
|
10915
|
-
const typedData =
|
|
11639
|
+
const typedData = chunk4SZV7J2R_cjs.stringifyBigInts(
|
|
10916
11640
|
build1155OrderTypedData(orderParams, getChainId(cfg))
|
|
10917
11641
|
);
|
|
10918
11642
|
return { orderParams, typedData };
|
|
10919
11643
|
}
|
|
10920
11644
|
function registerPayload2(orderParams, signature) {
|
|
10921
|
-
return
|
|
11645
|
+
return chunk4SZV7J2R_cjs.stringifyBigInts({
|
|
10922
11646
|
parameters: {
|
|
10923
11647
|
...orderParams,
|
|
10924
11648
|
offer: { ...orderParams.offer, item_type: starknet.shortString.encodeShortString(orderParams.offer.item_type) },
|
|
@@ -10949,14 +11673,14 @@ function buildFulfill1155Calls(a, cfg) {
|
|
|
10949
11673
|
return fee ? [approve, fulfill, fee] : [approve, fulfill];
|
|
10950
11674
|
}
|
|
10951
11675
|
function buildCancel1155Calls(a, cfg) {
|
|
10952
|
-
const cancelPayload =
|
|
11676
|
+
const cancelPayload = chunk4SZV7J2R_cjs.stringifyBigInts({
|
|
10953
11677
|
cancelation: { order_hash: a.orderHash, offerer: a.offerer },
|
|
10954
11678
|
signature: a.signature
|
|
10955
11679
|
});
|
|
10956
11680
|
return [contractFor2(cfg).populate("cancel_order", [cancelPayload])];
|
|
10957
11681
|
}
|
|
10958
11682
|
function buildCancel1155TypedData(orderHash, offerer, cfg) {
|
|
10959
|
-
return
|
|
11683
|
+
return chunk4SZV7J2R_cjs.stringifyBigInts(
|
|
10960
11684
|
build1155CancellationTypedData({ order_hash: orderHash, offerer }, getChainId(cfg))
|
|
10961
11685
|
);
|
|
10962
11686
|
}
|
|
@@ -11300,14 +12024,14 @@ async function assertTransactionSucceeded(provider, txHash, retryDelaysMs = RECE
|
|
|
11300
12024
|
const receipt = await provider.getTransactionReceipt(txHash);
|
|
11301
12025
|
const status = receipt.execution_status ?? receipt.status;
|
|
11302
12026
|
if (status === "REVERTED" || status === "REJECTED") {
|
|
11303
|
-
throw new
|
|
12027
|
+
throw new chunk4SZV7J2R_cjs.UserFacingError("Transaction was submitted but reverted onchain. Please check your balance and try again.");
|
|
11304
12028
|
}
|
|
11305
12029
|
if (status) return receipt;
|
|
11306
12030
|
} catch (err) {
|
|
11307
12031
|
if (err instanceof Error && err.message.includes("reverted onchain")) throw err;
|
|
11308
12032
|
}
|
|
11309
12033
|
}
|
|
11310
|
-
throw new
|
|
12034
|
+
throw new chunk4SZV7J2R_cjs.UserFacingError("Verification timed out. Check your account for the transaction status.");
|
|
11311
12035
|
}
|
|
11312
12036
|
async function executeIntent(provider, signer, client, intent, opts = {}) {
|
|
11313
12037
|
let calls;
|
|
@@ -11318,7 +12042,7 @@ async function executeIntent(provider, signer, client, intent, opts = {}) {
|
|
|
11318
12042
|
} else {
|
|
11319
12043
|
calls = intent.calls;
|
|
11320
12044
|
}
|
|
11321
|
-
const { txHash } = await signer.execute(calls);
|
|
12045
|
+
const { txHash } = await signer.execute(calls, { intentIds: [intent.id] });
|
|
11322
12046
|
const receipt = await assertTransactionSucceeded(provider, txHash);
|
|
11323
12047
|
await Promise.all([
|
|
11324
12048
|
syncTransactionBestEffort(client, txHash),
|
|
@@ -11331,7 +12055,7 @@ async function executeIntents(provider, signer, client, intents, opts = {}) {
|
|
|
11331
12055
|
throw new Error("Expected prebuilt intents (requiresSignature=false)");
|
|
11332
12056
|
}
|
|
11333
12057
|
const calls = intents.flatMap((i) => i.calls);
|
|
11334
|
-
const { txHash } = await signer.execute(calls);
|
|
12058
|
+
const { txHash } = await signer.execute(calls, { intentIds: intents.map((i) => i.id) });
|
|
11335
12059
|
const receipt = await assertTransactionSucceeded(provider, txHash);
|
|
11336
12060
|
await Promise.all([
|
|
11337
12061
|
syncTransactionBestEffort(client, txHash),
|
|
@@ -11356,18 +12080,18 @@ function sameFelt(a, b) {
|
|
|
11356
12080
|
return false;
|
|
11357
12081
|
}
|
|
11358
12082
|
}
|
|
11359
|
-
function
|
|
12083
|
+
function u2563(low, high) {
|
|
11360
12084
|
return (BigInt(low ?? 0) + (BigInt(high ?? 0) << 128n)).toString();
|
|
11361
12085
|
}
|
|
11362
12086
|
function deployedCollectionFromReceipt(receipt, service) {
|
|
11363
|
-
const factory =
|
|
12087
|
+
const factory = chunk4SZV7J2R_cjs.getService(service)?.onchain?.STARKNET?.factoryAddress;
|
|
11364
12088
|
const { event, address } = DEPLOY_EVENTS[service];
|
|
11365
12089
|
const selector = BigInt(starknet.hash.getSelectorFromName(event));
|
|
11366
12090
|
for (const e of receipt.events ?? []) {
|
|
11367
12091
|
if (factory && !sameFelt(e.from_address, factory)) continue;
|
|
11368
12092
|
if (!sameFelt(e.keys?.[0], selector)) continue;
|
|
11369
12093
|
const value = address(e);
|
|
11370
|
-
if (value) return
|
|
12094
|
+
if (value) return chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", value);
|
|
11371
12095
|
}
|
|
11372
12096
|
return null;
|
|
11373
12097
|
}
|
|
@@ -11375,8 +12099,8 @@ function mintedTokenIdFromReceipt(receipt, contract) {
|
|
|
11375
12099
|
for (const e of receipt.events ?? []) {
|
|
11376
12100
|
if (!sameFelt(e.from_address, contract)) continue;
|
|
11377
12101
|
const keys = e.keys ?? [];
|
|
11378
|
-
if (sameFelt(keys[0], IP_MINTED_SELECTOR) && keys.length >= 3) return
|
|
11379
|
-
if (sameFelt(keys[0], TRANSFER_SELECTOR) && keys.length === 5 && sameFelt(keys[1], 0n)) return
|
|
12102
|
+
if (sameFelt(keys[0], IP_MINTED_SELECTOR) && keys.length >= 3) return u2563(keys[1], keys[2]);
|
|
12103
|
+
if (sameFelt(keys[0], TRANSFER_SELECTOR) && keys.length === 5 && sameFelt(keys[1], 0n)) return u2563(keys[3], keys[4]);
|
|
11380
12104
|
}
|
|
11381
12105
|
return null;
|
|
11382
12106
|
}
|
|
@@ -11393,14 +12117,14 @@ async function failureOf(res, fallback) {
|
|
|
11393
12117
|
const body = await res.json().catch(() => null);
|
|
11394
12118
|
return { reason: body?.error || fallback, code: typeof body?.code === "string" ? body.code : void 0 };
|
|
11395
12119
|
}
|
|
11396
|
-
async function executeSponsored(config, signer, calls) {
|
|
12120
|
+
async function executeSponsored(config, signer, calls, intentIds) {
|
|
11397
12121
|
const doFetch = config.fetchImpl ?? fetch;
|
|
11398
12122
|
const base = config.proxyUrl.replace(/\/$/, "");
|
|
11399
|
-
const headers = { "Content-Type": "application/json" };
|
|
12123
|
+
const headers = { "Content-Type": "application/json", ...config.headers };
|
|
11400
12124
|
const buildRes = await doFetch(`${base}/build`, {
|
|
11401
12125
|
method: "POST",
|
|
11402
12126
|
headers,
|
|
11403
|
-
body: JSON.stringify({ userAddress: signer.address, calls })
|
|
12127
|
+
body: JSON.stringify(intentIds ? { intentIds } : { userAddress: signer.address, calls })
|
|
11404
12128
|
});
|
|
11405
12129
|
if (!buildRes.ok) {
|
|
11406
12130
|
const { reason, code } = await failureOf(buildRes, "We couldn't prepare this transaction.");
|
|
@@ -11412,7 +12136,7 @@ async function executeSponsored(config, signer, calls) {
|
|
|
11412
12136
|
const executeRes = await doFetch(`${base}/execute`, {
|
|
11413
12137
|
method: "POST",
|
|
11414
12138
|
headers,
|
|
11415
|
-
body: JSON.stringify({ userAddress: signer.address, typedData, signature, calls })
|
|
12139
|
+
body: JSON.stringify(intentIds ? { intentIds, typedData, signature } : { userAddress: signer.address, typedData, signature, calls })
|
|
11416
12140
|
});
|
|
11417
12141
|
if (!executeRes.ok) {
|
|
11418
12142
|
const { reason, code } = await failureOf(executeRes, "We couldn't submit this transaction.");
|
|
@@ -11488,13 +12212,13 @@ function buildRemoveOwnerByGuidCall(accountAddress, ownerGuid) {
|
|
|
11488
12212
|
}
|
|
11489
12213
|
function buildDeployAccountParams(ownerPubkey, salt = 0) {
|
|
11490
12214
|
return {
|
|
11491
|
-
classHash:
|
|
11492
|
-
constructorCalldata:
|
|
12215
|
+
classHash: chunk4SZV7J2R_cjs.STARKNET_MEDIAWALLET_CLASS_HASH,
|
|
12216
|
+
constructorCalldata: chunk4SZV7J2R_cjs.ownerConstructorCalldata(ownerPubkey),
|
|
11493
12217
|
addressSalt: starknet.num.toHex(salt),
|
|
11494
|
-
contractAddress:
|
|
12218
|
+
contractAddress: chunk4SZV7J2R_cjs.computeAccountAddress(ownerPubkey, salt)
|
|
11495
12219
|
};
|
|
11496
12220
|
}
|
|
11497
|
-
var norm = (address) =>
|
|
12221
|
+
var norm = (address) => chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address);
|
|
11498
12222
|
var SIGNER_TYPE_NAMES = ["Starknet", "Secp256k1", "Secp256r1"];
|
|
11499
12223
|
function encodeFeltArray(items) {
|
|
11500
12224
|
return [starknet.num.toHex(items.length), ...items];
|
|
@@ -11691,7 +12415,7 @@ var InvalidRecoveryKeyError = class extends Error {
|
|
|
11691
12415
|
var canonicalAddress = (address) => `0x${BigInt(address).toString(16).padStart(64, "0")}`;
|
|
11692
12416
|
function keyPair(privateKey) {
|
|
11693
12417
|
try {
|
|
11694
|
-
return
|
|
12418
|
+
return chunk4SZV7J2R_cjs.starkKeyPairFromPrivateKey(privateKey);
|
|
11695
12419
|
} catch {
|
|
11696
12420
|
throw new InvalidRecoveryKeyError();
|
|
11697
12421
|
}
|
|
@@ -11704,7 +12428,7 @@ function parseRecoveryKey(input) {
|
|
|
11704
12428
|
const trimmed = input.trim();
|
|
11705
12429
|
if (!trimmed.startsWith(PREFIX)) {
|
|
11706
12430
|
const { privateKeyHex, publicKeyHex } = keyPair(trimmed);
|
|
11707
|
-
return { walletAddress:
|
|
12431
|
+
return { walletAddress: chunk4SZV7J2R_cjs.computeAccountAddress(publicKeyHex, 0), privateKey: privateKeyHex };
|
|
11708
12432
|
}
|
|
11709
12433
|
const parts = trimmed.slice(PREFIX.length).split(":");
|
|
11710
12434
|
const [walletAddress, privateKey] = parts;
|
|
@@ -11726,7 +12450,7 @@ function describeRecoveryAction(escape) {
|
|
|
11726
12450
|
return "none";
|
|
11727
12451
|
}
|
|
11728
12452
|
function normalizeWalletAddress(address) {
|
|
11729
|
-
return
|
|
12453
|
+
return chunk4SZV7J2R_cjs.normalizeAddress("STARKNET", address);
|
|
11730
12454
|
}
|
|
11731
12455
|
function isValidStarknetAddress(address) {
|
|
11732
12456
|
try {
|
|
@@ -11771,7 +12495,7 @@ async function estimateSelfFundedFee(provider, address, calls) {
|
|
|
11771
12495
|
return { feeRaw: estimate.overall_fee, unit: estimate.unit, balanceRaw };
|
|
11772
12496
|
}
|
|
11773
12497
|
async function feeTokenBalance(provider, address, unit) {
|
|
11774
|
-
const token =
|
|
12498
|
+
const token = chunk4SZV7J2R_cjs.getTokenBySymbol(unit === "FRI" ? "STRK" : "ETH");
|
|
11775
12499
|
if (!token) throw new Error(`No fee token for unit ${unit}`);
|
|
11776
12500
|
const [low = "0x0", high = "0x0"] = await provider.callContract({
|
|
11777
12501
|
contractAddress: token.address,
|
|
@@ -11793,14 +12517,15 @@ function sponsoredExecutor(deps) {
|
|
|
11793
12517
|
const fallback = deps.fallback ?? selfFundedExecutor(deps);
|
|
11794
12518
|
return {
|
|
11795
12519
|
async execute(input) {
|
|
11796
|
-
const { userAddress, privateKeyHex, calls } = input;
|
|
12520
|
+
const { userAddress, privateKeyHex, calls, intentIds } = input;
|
|
11797
12521
|
const result = await executeSponsored(
|
|
11798
12522
|
{ proxyUrl: deps.proxyUrl, fetchImpl: deps.fetchImpl },
|
|
11799
12523
|
{
|
|
11800
12524
|
address: userAddress,
|
|
11801
|
-
signTypedData: async (data) =>
|
|
12525
|
+
signTypedData: async (data) => chunk4SZV7J2R_cjs.signWithPrivateKey(privateKeyHex, starknet.typedData.getMessageHash(data, userAddress))
|
|
11802
12526
|
},
|
|
11803
|
-
calls
|
|
12527
|
+
calls,
|
|
12528
|
+
intentIds
|
|
11804
12529
|
);
|
|
11805
12530
|
if (result.status === "sponsored") return { transactionHash: result.transactionHash };
|
|
11806
12531
|
const consented = await deps.consent.request({ address: userAddress, calls });
|
|
@@ -11848,7 +12573,7 @@ async function deploySponsored(input) {
|
|
|
11848
12573
|
return { transactionHash };
|
|
11849
12574
|
}
|
|
11850
12575
|
async function deploySelfFunded(input) {
|
|
11851
|
-
const classHash =
|
|
12576
|
+
const classHash = chunkVJVBWHAD_cjs.getCoordinates("STARKNET").mediaWalletClassHash;
|
|
11852
12577
|
if (!classHash) throw new Error("Media Wallet class hash is not configured");
|
|
11853
12578
|
const account = new starknet.Account({
|
|
11854
12579
|
provider: input.provider,
|
|
@@ -11858,7 +12583,7 @@ async function deploySelfFunded(input) {
|
|
|
11858
12583
|
});
|
|
11859
12584
|
const { transaction_hash } = await account.deployAccount({
|
|
11860
12585
|
classHash,
|
|
11861
|
-
constructorCalldata:
|
|
12586
|
+
constructorCalldata: chunk4SZV7J2R_cjs.ownerConstructorCalldata(input.ownerPubKey),
|
|
11862
12587
|
addressSalt: 0,
|
|
11863
12588
|
contractAddress: input.ownerAddress
|
|
11864
12589
|
});
|
|
@@ -11926,7 +12651,7 @@ async function completeDeployment(deps, onStep, options = {}) {
|
|
|
11926
12651
|
backendUrl: deps.backendUrl,
|
|
11927
12652
|
walletAddress: address,
|
|
11928
12653
|
signer: {
|
|
11929
|
-
signMessage: async (td) =>
|
|
12654
|
+
signMessage: async (td) => chunk4SZV7J2R_cjs.signWithPrivateKey(privateKeyHex, starknet.typedData.getMessageHash(td, address))
|
|
11930
12655
|
}
|
|
11931
12656
|
});
|
|
11932
12657
|
deps.store.notifyChange();
|
|
@@ -12014,14 +12739,25 @@ function createMediaWallet(config) {
|
|
|
12014
12739
|
unlockCache.set(sealed.address, { promise, timer });
|
|
12015
12740
|
return promise;
|
|
12016
12741
|
};
|
|
12017
|
-
const run = async (sealed, calls, userAddress) => {
|
|
12742
|
+
const run = async (sealed, calls, userAddress, intentIds) => {
|
|
12018
12743
|
const privateKeyHex = await unlockOnce(sealed);
|
|
12019
12744
|
return config.executor.execute({
|
|
12020
12745
|
userAddress: userAddress ?? sealed.address,
|
|
12021
12746
|
privateKeyHex,
|
|
12022
|
-
calls
|
|
12747
|
+
calls,
|
|
12748
|
+
intentIds
|
|
12023
12749
|
});
|
|
12024
12750
|
};
|
|
12751
|
+
const walletIntents = config.walletIntents ?? (async (params) => {
|
|
12752
|
+
if (!config.backendUrl) throw new Error("This wallet has no backend url configured");
|
|
12753
|
+
const created = await new chunk4SZV7J2R_cjs.ApiClient(config.backendUrl).createWalletManageIntent(params);
|
|
12754
|
+
return created.data;
|
|
12755
|
+
});
|
|
12756
|
+
const manage = async (sealed, params) => {
|
|
12757
|
+
const intent = await walletIntents(params);
|
|
12758
|
+
const { transactionHash } = await run(sealed, intent.calls, params.owner, [intent.id]);
|
|
12759
|
+
return transactionHash;
|
|
12760
|
+
};
|
|
12025
12761
|
return {
|
|
12026
12762
|
store: config.store,
|
|
12027
12763
|
passkey: config.passkey,
|
|
@@ -12031,10 +12767,10 @@ function createMediaWallet(config) {
|
|
|
12031
12767
|
address: sealed.address,
|
|
12032
12768
|
signTypedData: async (data) => {
|
|
12033
12769
|
const privateKeyHex = await unlockOnce(sealed);
|
|
12034
|
-
return
|
|
12770
|
+
return chunk4SZV7J2R_cjs.signWithPrivateKey(privateKeyHex, starknet.typedData.getMessageHash(data, sealed.address));
|
|
12035
12771
|
},
|
|
12036
|
-
execute: async (calls) => {
|
|
12037
|
-
const { transactionHash } = await run(sealed, calls);
|
|
12772
|
+
execute: async (calls, opts) => {
|
|
12773
|
+
const { transactionHash } = await run(sealed, calls, void 0, opts?.intentIds);
|
|
12038
12774
|
return { txHash: transactionHash };
|
|
12039
12775
|
}
|
|
12040
12776
|
};
|
|
@@ -12049,38 +12785,12 @@ function createMediaWallet(config) {
|
|
|
12049
12785
|
const guid = BigInt(computeOwnerGuid(devicePubkey));
|
|
12050
12786
|
return owners.some((owner) => BigInt(owner.guid) === guid);
|
|
12051
12787
|
},
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
},
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
guardianSealed,
|
|
12059
|
-
[buildTriggerEscapeOwnerCall(targetAddress, newOwnerPubkey)],
|
|
12060
|
-
normalizeWalletAddress(targetAddress)
|
|
12061
|
-
);
|
|
12062
|
-
return transactionHash;
|
|
12063
|
-
},
|
|
12064
|
-
async completeEscapeOwner(guardianSealed, targetAddress) {
|
|
12065
|
-
const { transactionHash } = await run(
|
|
12066
|
-
guardianSealed,
|
|
12067
|
-
[buildCompleteEscapeOwnerCall(targetAddress)],
|
|
12068
|
-
normalizeWalletAddress(targetAddress)
|
|
12069
|
-
);
|
|
12070
|
-
return transactionHash;
|
|
12071
|
-
},
|
|
12072
|
-
async cancelEscape(sealed) {
|
|
12073
|
-
const { transactionHash } = await run(sealed, [buildCancelEscapeCall(sealed.address)]);
|
|
12074
|
-
return transactionHash;
|
|
12075
|
-
},
|
|
12076
|
-
async addDevice(sealed, devicePubkey) {
|
|
12077
|
-
const { transactionHash } = await run(sealed, [buildAddOwnerCall(sealed.address, devicePubkey)]);
|
|
12078
|
-
return transactionHash;
|
|
12079
|
-
},
|
|
12080
|
-
async removeDevice(sealed, ownerGuid) {
|
|
12081
|
-
const { transactionHash } = await run(sealed, [buildRemoveOwnerByGuidCall(sealed.address, ownerGuid)]);
|
|
12082
|
-
return transactionHash;
|
|
12083
|
-
},
|
|
12788
|
+
setFirstGuardian: (sealed, guardianPubkey) => manage(sealed, { owner: sealed.address, action: "set_first_guardian", pubkey: guardianPubkey }),
|
|
12789
|
+
triggerEscapeOwner: (guardianSealed, targetAddress, newOwnerPubkey) => manage(guardianSealed, { owner: normalizeWalletAddress(targetAddress), action: "trigger_escape", newOwnerPubkey }),
|
|
12790
|
+
completeEscapeOwner: (guardianSealed, targetAddress) => manage(guardianSealed, { owner: normalizeWalletAddress(targetAddress), action: "complete_escape" }),
|
|
12791
|
+
cancelEscape: (sealed) => manage(sealed, { owner: sealed.address, action: "cancel_escape" }),
|
|
12792
|
+
addDevice: (sealed, devicePubkey) => manage(sealed, { owner: sealed.address, action: "add_owner", pubkey: devicePubkey }),
|
|
12793
|
+
removeDevice: (sealed, ownerGuid) => manage(sealed, { owner: sealed.address, action: "remove_owner", ownerGuid }),
|
|
12084
12794
|
completeDeployment: (onStep, options) => deployments.run(onStep, options),
|
|
12085
12795
|
isDeploying: () => deployments.isDeploying()
|
|
12086
12796
|
};
|
|
@@ -12098,61 +12808,62 @@ async function claimSessionWallet(api, walletAddress, deps) {
|
|
|
12098
12808
|
|
|
12099
12809
|
Object.defineProperty(exports, "InvalidStarkPrivateKeyError", {
|
|
12100
12810
|
enumerable: true,
|
|
12101
|
-
get: function () { return
|
|
12811
|
+
get: function () { return chunk4SZV7J2R_cjs.InvalidStarkPrivateKeyError; }
|
|
12102
12812
|
});
|
|
12103
12813
|
Object.defineProperty(exports, "PasskeyCancelledError", {
|
|
12104
12814
|
enumerable: true,
|
|
12105
|
-
get: function () { return
|
|
12815
|
+
get: function () { return chunk4SZV7J2R_cjs.PasskeyCancelledError; }
|
|
12106
12816
|
});
|
|
12107
12817
|
Object.defineProperty(exports, "PasskeyUnsupportedError", {
|
|
12108
12818
|
enumerable: true,
|
|
12109
|
-
get: function () { return
|
|
12819
|
+
get: function () { return chunk4SZV7J2R_cjs.PasskeyUnsupportedError; }
|
|
12110
12820
|
});
|
|
12111
12821
|
Object.defineProperty(exports, "UserFacingError", {
|
|
12112
12822
|
enumerable: true,
|
|
12113
|
-
get: function () { return
|
|
12823
|
+
get: function () { return chunk4SZV7J2R_cjs.UserFacingError; }
|
|
12114
12824
|
});
|
|
12115
12825
|
Object.defineProperty(exports, "computeAccountAddress", {
|
|
12116
12826
|
enumerable: true,
|
|
12117
|
-
get: function () { return
|
|
12827
|
+
get: function () { return chunk4SZV7J2R_cjs.computeAccountAddress; }
|
|
12118
12828
|
});
|
|
12119
12829
|
Object.defineProperty(exports, "createPasskeyOwner", {
|
|
12120
12830
|
enumerable: true,
|
|
12121
|
-
get: function () { return
|
|
12831
|
+
get: function () { return chunk4SZV7J2R_cjs.createPasskeyOwner; }
|
|
12122
12832
|
});
|
|
12123
12833
|
Object.defineProperty(exports, "deriveAesKey", {
|
|
12124
12834
|
enumerable: true,
|
|
12125
|
-
get: function () { return
|
|
12835
|
+
get: function () { return chunk4SZV7J2R_cjs.deriveAesKey; }
|
|
12126
12836
|
});
|
|
12127
12837
|
Object.defineProperty(exports, "generateStarkKeyPair", {
|
|
12128
12838
|
enumerable: true,
|
|
12129
|
-
get: function () { return
|
|
12839
|
+
get: function () { return chunk4SZV7J2R_cjs.generateStarkKeyPair; }
|
|
12130
12840
|
});
|
|
12131
12841
|
Object.defineProperty(exports, "ownerConstructorCalldata", {
|
|
12132
12842
|
enumerable: true,
|
|
12133
|
-
get: function () { return
|
|
12843
|
+
get: function () { return chunk4SZV7J2R_cjs.ownerConstructorCalldata; }
|
|
12134
12844
|
});
|
|
12135
12845
|
Object.defineProperty(exports, "sealPrivateKey", {
|
|
12136
12846
|
enumerable: true,
|
|
12137
|
-
get: function () { return
|
|
12847
|
+
get: function () { return chunk4SZV7J2R_cjs.sealPrivateKey; }
|
|
12138
12848
|
});
|
|
12139
12849
|
Object.defineProperty(exports, "signWithPrivateKey", {
|
|
12140
12850
|
enumerable: true,
|
|
12141
|
-
get: function () { return
|
|
12851
|
+
get: function () { return chunk4SZV7J2R_cjs.signWithPrivateKey; }
|
|
12142
12852
|
});
|
|
12143
12853
|
Object.defineProperty(exports, "starkKeyPairFromPrivateKey", {
|
|
12144
12854
|
enumerable: true,
|
|
12145
|
-
get: function () { return
|
|
12855
|
+
get: function () { return chunk4SZV7J2R_cjs.starkKeyPairFromPrivateKey; }
|
|
12146
12856
|
});
|
|
12147
12857
|
Object.defineProperty(exports, "unsealPrivateKey", {
|
|
12148
12858
|
enumerable: true,
|
|
12149
|
-
get: function () { return
|
|
12859
|
+
get: function () { return chunk4SZV7J2R_cjs.unsealPrivateKey; }
|
|
12150
12860
|
});
|
|
12151
12861
|
exports.COIN_MAX_SUPPLY = MAX_SUPPLY;
|
|
12152
12862
|
exports.COIN_MIN_SUPPLY = MIN_SUPPLY;
|
|
12153
12863
|
exports.ClubService = ClubService;
|
|
12154
12864
|
exports.CreatorCoinFactoryABI = CreatorCoinFactoryABI;
|
|
12155
12865
|
exports.CreatorCoinService = CreatorCoinService;
|
|
12866
|
+
exports.DROP_MAX_CLAIM_QUANTITY = DROP_MAX_CLAIM_QUANTITY;
|
|
12156
12867
|
exports.DropCollectionABI = DropCollectionABI;
|
|
12157
12868
|
exports.DropFactoryABI = DropFactoryABI;
|
|
12158
12869
|
exports.DropService = DropService;
|
|
@@ -12226,6 +12937,11 @@ exports.deriveOwnerKeyPair = deriveOwnerKeyPair;
|
|
|
12226
12937
|
exports.describeDevices = describeDevices;
|
|
12227
12938
|
exports.describeGuardianStatus = describeGuardianStatus;
|
|
12228
12939
|
exports.describeRecoveryAction = describeRecoveryAction;
|
|
12940
|
+
exports.dropCalls = dropCalls;
|
|
12941
|
+
exports.dropClaimLinks = dropClaimLinks;
|
|
12942
|
+
exports.dropClaimedBy = dropClaimedBy;
|
|
12943
|
+
exports.dropMintCost = dropMintCost;
|
|
12944
|
+
exports.dropMintState = dropMintState;
|
|
12229
12945
|
exports.encodeByteArray = encodeByteArray;
|
|
12230
12946
|
exports.encodePairingPayload = encodePairingPayload;
|
|
12231
12947
|
exports.encodePopClaimFragment = encodePopClaimFragment;
|
|
@@ -12235,6 +12951,8 @@ exports.executeIntent = executeIntent;
|
|
|
12235
12951
|
exports.executeIntents = executeIntents;
|
|
12236
12952
|
exports.executeSponsored = executeSponsored;
|
|
12237
12953
|
exports.fdvHuman = fdvHuman;
|
|
12954
|
+
exports.feeAmount = feeAmount;
|
|
12955
|
+
exports.feeBps = feeBps;
|
|
12238
12956
|
exports.fundWithChainTransfer = fundWithChainTransfer;
|
|
12239
12957
|
exports.fundingApiFor = fundingApiFor;
|
|
12240
12958
|
exports.getCounter = getCounter;
|
|
@@ -12265,13 +12983,14 @@ exports.popClaimLinksCsv = popClaimLinksCsv;
|
|
|
12265
12983
|
exports.popClaimState = popClaimState;
|
|
12266
12984
|
exports.popHasClaimed = popHasClaimed;
|
|
12267
12985
|
exports.priceToEkuboParams = priceToEkuboParams;
|
|
12986
|
+
exports.readDrop = readDrop;
|
|
12268
12987
|
exports.requestSiwsToken = requestSiwsToken;
|
|
12269
12988
|
exports.selfFundedExecutor = selfFundedExecutor;
|
|
12270
12989
|
exports.sponsoredExecutor = sponsoredExecutor;
|
|
12271
12990
|
exports.storeSiwsToken = storeSiwsToken;
|
|
12272
12991
|
exports.syncTransactionBestEffort = syncTransactionBestEffort;
|
|
12273
12992
|
exports.teamCoinsRaw = teamCoinsRaw;
|
|
12274
|
-
exports.
|
|
12993
|
+
exports.toDropContractTerms = toContractTerms;
|
|
12275
12994
|
exports.validateCoinName = validateName;
|
|
12276
12995
|
exports.validateCoinSupply = validateSupply;
|
|
12277
12996
|
exports.validateCoinSymbol = validateSymbol;
|