@medialane/sdk 0.65.0 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/evm/index.cjs +7 -6
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +1 -1
- package/dist/evm/index.d.ts +1 -1
- package/dist/evm/index.js +7 -6
- package/dist/evm/index.js.map +1 -1
- package/dist/{index-DMNv-Oj0.d.ts → index-C2EaTkzk.d.cts} +60 -67
- package/dist/{index-_q2B0g3M.d.cts → index-DjJ4k6p_.d.ts} +60 -67
- package/dist/index.cjs +85 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -7
- package/dist/index.d.ts +16 -7
- package/dist/index.js +85 -85
- package/dist/index.js.map +1 -1
- package/dist/solana/index.cjs +7 -6
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +1 -1
- package/dist/solana/index.d.ts +1 -1
- package/dist/solana/index.js +7 -6
- package/dist/solana/index.js.map +1 -1
- package/dist/starknet/index.cjs +74 -81
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +2 -2
- package/dist/starknet/index.d.ts +2 -2
- package/dist/starknet/index.js +74 -81
- package/dist/starknet/index.js.map +1 -1
- package/dist/stellar/index.cjs +7 -6
- package/dist/stellar/index.cjs.map +1 -1
- package/dist/stellar/index.d.cts +1 -1
- package/dist/stellar/index.d.ts +1 -1
- package/dist/stellar/index.js +7 -6
- package/dist/stellar/index.js.map +1 -1
- package/dist/{types-Bx3ax9lW.d.cts → types-CIR6H6ul.d.cts} +1 -0
- package/dist/{types-Bx3ax9lW.d.ts → types-CIR6H6ul.d.ts} +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -37,16 +37,17 @@ var COORDINATES = {
|
|
|
37
37
|
creatorCoinFactoryClassHash: "0x51765926b1344c9a20b8cd4b5abe7b7d47375ae97cf6804db3ea5d4b05a9b55",
|
|
38
38
|
creatorCoinStartBlock: 10474544,
|
|
39
39
|
ekuboCore: "0x00000005dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
|
|
40
|
-
ipTicketsFactory: "
|
|
41
|
-
ipTicketCollectionClassHash: "
|
|
42
|
-
|
|
40
|
+
ipTicketsFactory: "0x059802639b41e9c6449c3d557703e610ef639a91866dc1dd44216f9f37111ac5",
|
|
41
|
+
ipTicketCollectionClassHash: "0x047bd108881457c4f4db6c64671c1dd402f4d8c79fd9182f03a2dd841335a34b",
|
|
42
|
+
ipTicketsFactoryClassHash: "0x04a739ac3a673ebd0db96bb24475600797c3ed34827e79517f9b2b1640276e6a",
|
|
43
|
+
ipTicketsStartBlock: 11836622,
|
|
43
44
|
ipClubRegistry: "0x00e189c619b6bb07d78973a149641c59c37eb0716f8584d7520bce12d303eede",
|
|
44
45
|
ipClubNftClassHash: "0x02bc9b20cca21b04245e9215bf7121f4d7295b195890e449b472b573017fb889",
|
|
45
46
|
ipClubStartBlock: 11404776,
|
|
46
|
-
ipClubFactory: "
|
|
47
|
+
ipClubFactory: "0x05519705345ce225db666253a21cf89d1c675658f16cc6ae4320cefd1a1219a3",
|
|
47
48
|
ipClubFactoryClassHash: "0x07197062578375d962b2d42d3e91560770b11b1c97a9defb74c706a2c5299473",
|
|
48
|
-
ipClubCollectionClassHash: "
|
|
49
|
-
ipClubFactoryStartBlock:
|
|
49
|
+
ipClubCollectionClassHash: "0x35b8836a2269523ae9176077ec525451cce1053b2acd9fae3b05354aa4eded3",
|
|
50
|
+
ipClubFactoryStartBlock: 11884796,
|
|
50
51
|
ipSponsorship: "0x044d9b9c3bb29b94685b0a3fe27a5e2dfa30a3637ab55979c718ebcd3268bc2f",
|
|
51
52
|
ipSponsorshipStartBlock: 11405085,
|
|
52
53
|
// Dedicated ip-erc721/MIP instance for sponsorship receipts (class hash
|
|
@@ -1041,13 +1042,20 @@ var SERVICES = {
|
|
|
1041
1042
|
"ip-tickets": {
|
|
1042
1043
|
id: "ip-tickets",
|
|
1043
1044
|
displayName: "IP Tickets",
|
|
1044
|
-
description: "
|
|
1045
|
-
standard: "
|
|
1045
|
+
description: "Create verifiable on-chain tickets \u2014 mint to attendees, trade like any collection.",
|
|
1046
|
+
standard: "ERC1155",
|
|
1046
1047
|
provenance: "MEDIALANE",
|
|
1048
|
+
onchain: {
|
|
1049
|
+
STARKNET: {
|
|
1050
|
+
factoryAddress: SN2.ipTicketsFactory,
|
|
1051
|
+
classHash: SN2.ipTicketCollectionClassHash
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1047
1054
|
uiVariant: "ticket",
|
|
1048
|
-
capabilities: ["mint", "redeem", "transfer"],
|
|
1055
|
+
capabilities: ["mint", "redeem", "list", "buy", "make_offer", "cancel", "transfer"],
|
|
1049
1056
|
events: [
|
|
1050
|
-
{ name: "CollectionDeployed", emittedBy: "factory" }
|
|
1057
|
+
{ name: "CollectionDeployed", emittedBy: "factory" },
|
|
1058
|
+
{ name: "TicketCreated", emittedBy: "instance" }
|
|
1051
1059
|
],
|
|
1052
1060
|
metadataSchema: { licenseDefault: "CC BY-SA" }
|
|
1053
1061
|
},
|
|
@@ -5839,12 +5847,8 @@ var IPTicketCollectionABI = [
|
|
|
5839
5847
|
},
|
|
5840
5848
|
{
|
|
5841
5849
|
"type": "struct",
|
|
5842
|
-
"name": "ip_ticket::types::
|
|
5850
|
+
"name": "ip_ticket::types::Ticket",
|
|
5843
5851
|
"members": [
|
|
5844
|
-
{
|
|
5845
|
-
"name": "creator",
|
|
5846
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
5847
|
-
},
|
|
5848
5852
|
{
|
|
5849
5853
|
"name": "max_supply",
|
|
5850
5854
|
"type": "core::integer::u256"
|
|
@@ -5868,10 +5872,6 @@ var IPTicketCollectionABI = [
|
|
|
5868
5872
|
{
|
|
5869
5873
|
"name": "metadata_uri",
|
|
5870
5874
|
"type": "core::byte_array::ByteArray"
|
|
5871
|
-
},
|
|
5872
|
-
{
|
|
5873
|
-
"name": "active",
|
|
5874
|
-
"type": "core::bool"
|
|
5875
5875
|
}
|
|
5876
5876
|
]
|
|
5877
5877
|
},
|
|
@@ -5881,7 +5881,7 @@ var IPTicketCollectionABI = [
|
|
|
5881
5881
|
"items": [
|
|
5882
5882
|
{
|
|
5883
5883
|
"type": "function",
|
|
5884
|
-
"name": "
|
|
5884
|
+
"name": "create_ticket",
|
|
5885
5885
|
"inputs": [
|
|
5886
5886
|
{
|
|
5887
5887
|
"name": "max_supply",
|
|
@@ -5933,52 +5933,69 @@ var IPTicketCollectionABI = [
|
|
|
5933
5933
|
},
|
|
5934
5934
|
{
|
|
5935
5935
|
"type": "function",
|
|
5936
|
-
"name": "
|
|
5936
|
+
"name": "is_valid",
|
|
5937
5937
|
"inputs": [
|
|
5938
5938
|
{
|
|
5939
5939
|
"name": "token_id",
|
|
5940
5940
|
"type": "core::integer::u256"
|
|
5941
5941
|
},
|
|
5942
5942
|
{
|
|
5943
|
-
"name": "
|
|
5943
|
+
"name": "holder",
|
|
5944
|
+
"type": "core::starknet::contract_address::ContractAddress"
|
|
5945
|
+
}
|
|
5946
|
+
],
|
|
5947
|
+
"outputs": [
|
|
5948
|
+
{
|
|
5944
5949
|
"type": "core::bool"
|
|
5945
5950
|
}
|
|
5946
5951
|
],
|
|
5947
|
-
"
|
|
5948
|
-
"state_mutability": "external"
|
|
5952
|
+
"state_mutability": "view"
|
|
5949
5953
|
},
|
|
5950
5954
|
{
|
|
5951
5955
|
"type": "function",
|
|
5952
|
-
"name": "
|
|
5956
|
+
"name": "get_ticket",
|
|
5953
5957
|
"inputs": [
|
|
5954
5958
|
{
|
|
5955
5959
|
"name": "token_id",
|
|
5956
5960
|
"type": "core::integer::u256"
|
|
5957
|
-
}
|
|
5961
|
+
}
|
|
5962
|
+
],
|
|
5963
|
+
"outputs": [
|
|
5958
5964
|
{
|
|
5959
|
-
"
|
|
5960
|
-
"type": "core::starknet::contract_address::ContractAddress"
|
|
5965
|
+
"type": "ip_ticket::types::Ticket"
|
|
5961
5966
|
}
|
|
5962
5967
|
],
|
|
5968
|
+
"state_mutability": "view"
|
|
5969
|
+
},
|
|
5970
|
+
{
|
|
5971
|
+
"type": "function",
|
|
5972
|
+
"name": "name",
|
|
5973
|
+
"inputs": [],
|
|
5963
5974
|
"outputs": [
|
|
5964
5975
|
{
|
|
5965
|
-
"type": "core::
|
|
5976
|
+
"type": "core::byte_array::ByteArray"
|
|
5966
5977
|
}
|
|
5967
5978
|
],
|
|
5968
5979
|
"state_mutability": "view"
|
|
5969
5980
|
},
|
|
5970
5981
|
{
|
|
5971
5982
|
"type": "function",
|
|
5972
|
-
"name": "
|
|
5973
|
-
"inputs": [
|
|
5983
|
+
"name": "symbol",
|
|
5984
|
+
"inputs": [],
|
|
5985
|
+
"outputs": [
|
|
5974
5986
|
{
|
|
5975
|
-
"
|
|
5976
|
-
"type": "core::integer::u256"
|
|
5987
|
+
"type": "core::byte_array::ByteArray"
|
|
5977
5988
|
}
|
|
5978
5989
|
],
|
|
5990
|
+
"state_mutability": "view"
|
|
5991
|
+
},
|
|
5992
|
+
{
|
|
5993
|
+
"type": "function",
|
|
5994
|
+
"name": "base_uri",
|
|
5995
|
+
"inputs": [],
|
|
5979
5996
|
"outputs": [
|
|
5980
5997
|
{
|
|
5981
|
-
"type": "
|
|
5998
|
+
"type": "core::byte_array::ByteArray"
|
|
5982
5999
|
}
|
|
5983
6000
|
],
|
|
5984
6001
|
"state_mutability": "view"
|
|
@@ -6451,6 +6468,10 @@ var IPTicketCollectionABI = [
|
|
|
6451
6468
|
"name": "symbol",
|
|
6452
6469
|
"type": "core::byte_array::ByteArray"
|
|
6453
6470
|
},
|
|
6471
|
+
{
|
|
6472
|
+
"name": "base_uri",
|
|
6473
|
+
"type": "core::byte_array::ByteArray"
|
|
6474
|
+
},
|
|
6454
6475
|
{
|
|
6455
6476
|
"name": "owner",
|
|
6456
6477
|
"type": "core::starknet::contract_address::ContractAddress"
|
|
@@ -6646,7 +6667,7 @@ var IPTicketCollectionABI = [
|
|
|
6646
6667
|
},
|
|
6647
6668
|
{
|
|
6648
6669
|
"type": "event",
|
|
6649
|
-
"name": "ip_ticket::IPTicketCollection::IPTicketCollection::
|
|
6670
|
+
"name": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketCreated",
|
|
6650
6671
|
"kind": "struct",
|
|
6651
6672
|
"members": [
|
|
6652
6673
|
{
|
|
@@ -6681,23 +6702,6 @@ var IPTicketCollectionABI = [
|
|
|
6681
6702
|
}
|
|
6682
6703
|
]
|
|
6683
6704
|
},
|
|
6684
|
-
{
|
|
6685
|
-
"type": "event",
|
|
6686
|
-
"name": "ip_ticket::IPTicketCollection::IPTicketCollection::EventPaused",
|
|
6687
|
-
"kind": "struct",
|
|
6688
|
-
"members": [
|
|
6689
|
-
{
|
|
6690
|
-
"name": "token_id",
|
|
6691
|
-
"type": "core::integer::u256",
|
|
6692
|
-
"kind": "key"
|
|
6693
|
-
},
|
|
6694
|
-
{
|
|
6695
|
-
"name": "active",
|
|
6696
|
-
"type": "core::bool",
|
|
6697
|
-
"kind": "data"
|
|
6698
|
-
}
|
|
6699
|
-
]
|
|
6700
|
-
},
|
|
6701
6705
|
{
|
|
6702
6706
|
"type": "event",
|
|
6703
6707
|
"name": "ip_ticket::IPTicketCollection::IPTicketCollection::Event",
|
|
@@ -6719,13 +6723,8 @@ var IPTicketCollectionABI = [
|
|
|
6719
6723
|
"kind": "flat"
|
|
6720
6724
|
},
|
|
6721
6725
|
{
|
|
6722
|
-
"name": "
|
|
6723
|
-
"type": "ip_ticket::IPTicketCollection::IPTicketCollection::
|
|
6724
|
-
"kind": "nested"
|
|
6725
|
-
},
|
|
6726
|
-
{
|
|
6727
|
-
"name": "EventPaused",
|
|
6728
|
-
"type": "ip_ticket::IPTicketCollection::IPTicketCollection::EventPaused",
|
|
6726
|
+
"name": "TicketCreated",
|
|
6727
|
+
"type": "ip_ticket::IPTicketCollection::IPTicketCollection::TicketCreated",
|
|
6729
6728
|
"kind": "nested"
|
|
6730
6729
|
}
|
|
6731
6730
|
]
|
|
@@ -6794,6 +6793,10 @@ var IPTicketCollectionFactoryABI = [
|
|
|
6794
6793
|
{
|
|
6795
6794
|
"name": "symbol",
|
|
6796
6795
|
"type": "core::byte_array::ByteArray"
|
|
6796
|
+
},
|
|
6797
|
+
{
|
|
6798
|
+
"name": "base_uri",
|
|
6799
|
+
"type": "core::byte_array::ByteArray"
|
|
6797
6800
|
}
|
|
6798
6801
|
],
|
|
6799
6802
|
"outputs": [
|
|
@@ -11816,17 +11819,25 @@ var TicketService = class {
|
|
|
11816
11819
|
const provider = new starknet.RpcProvider({ nodeUrl: this.config.rpcUrl });
|
|
11817
11820
|
return newContract(IPTicketCollectionABI, normalizeAddress("STARKNET", address), provider);
|
|
11818
11821
|
}
|
|
11819
|
-
/**
|
|
11822
|
+
/**
|
|
11823
|
+
* Deploys a new IPTicketCollection via the factory. Caller becomes owner.
|
|
11824
|
+
* `baseUri` is the collection-level metadata URI, embedded on-chain in the
|
|
11825
|
+
* deploy transaction.
|
|
11826
|
+
*/
|
|
11820
11827
|
async deployCollection(account, params) {
|
|
11821
|
-
const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [
|
|
11828
|
+
const call = this._factory(account, params.factoryAddress).populate("deploy_collection", [
|
|
11829
|
+
params.name,
|
|
11830
|
+
params.symbol,
|
|
11831
|
+
params.baseUri
|
|
11832
|
+
]);
|
|
11822
11833
|
const res = await account.execute([call]);
|
|
11823
11834
|
return { txHash: res.transaction_hash };
|
|
11824
11835
|
}
|
|
11825
|
-
/** Owner-only. Creates a new
|
|
11826
|
-
async
|
|
11836
|
+
/** Owner-only. Creates a new ticket inside the caller's deployed collection. */
|
|
11837
|
+
async createTicket(account, params) {
|
|
11827
11838
|
const startTime = params.startTime != null ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.startTime) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
|
|
11828
11839
|
const endTime = params.endTime != null ? new starknet.CairoOption(starknet.CairoOptionVariant.Some, params.endTime) : new starknet.CairoOption(starknet.CairoOptionVariant.None);
|
|
11829
|
-
const call = this._collection(params.collection, account).populate("
|
|
11840
|
+
const call = this._collection(params.collection, account).populate("create_ticket", [
|
|
11830
11841
|
starknet.cairo.uint256(params.maxSupply),
|
|
11831
11842
|
startTime,
|
|
11832
11843
|
endTime,
|
|
@@ -11846,16 +11857,7 @@ var TicketService = class {
|
|
|
11846
11857
|
const res = await account.execute([call]);
|
|
11847
11858
|
return { txHash: res.transaction_hash };
|
|
11848
11859
|
}
|
|
11849
|
-
/**
|
|
11850
|
-
async pauseEvent(account, params) {
|
|
11851
|
-
const call = this._collection(params.collection, account).populate("pause_event", [
|
|
11852
|
-
starknet.cairo.uint256(params.tokenId),
|
|
11853
|
-
params.active
|
|
11854
|
-
]);
|
|
11855
|
-
const res = await account.execute([call]);
|
|
11856
|
-
return { txHash: res.transaction_hash };
|
|
11857
|
-
}
|
|
11858
|
-
/** Read — true if holder has balance > 0 and current time is within the event window. */
|
|
11860
|
+
/** Read — true if holder has balance > 0 and current time is within the ticket window. */
|
|
11859
11861
|
async isValid(params) {
|
|
11860
11862
|
const result = await this._collectionRead(params.collection).call("is_valid", [
|
|
11861
11863
|
starknet.cairo.uint256(params.tokenId),
|
|
@@ -11863,20 +11865,18 @@ var TicketService = class {
|
|
|
11863
11865
|
]);
|
|
11864
11866
|
return Boolean(result);
|
|
11865
11867
|
}
|
|
11866
|
-
/** Read — returns the
|
|
11867
|
-
async
|
|
11868
|
-
const
|
|
11868
|
+
/** Read — returns the Ticket record for a token ID. */
|
|
11869
|
+
async getTicket(params) {
|
|
11870
|
+
const t = await this._collectionRead(params.collection).call("get_ticket", [
|
|
11869
11871
|
starknet.cairo.uint256(params.tokenId)
|
|
11870
11872
|
]);
|
|
11871
11873
|
return {
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
metadataUri: ev.metadata_uri,
|
|
11879
|
-
active: Boolean(ev.active)
|
|
11874
|
+
maxSupply: BigInt(t.max_supply),
|
|
11875
|
+
minted: BigInt(t.minted),
|
|
11876
|
+
startTime: t.start_time?.variant === "Some" ? Number(t.start_time.values[0] ?? t.start_time.value) : null,
|
|
11877
|
+
endTime: t.end_time?.variant === "Some" ? Number(t.end_time.values[0] ?? t.end_time.value) : null,
|
|
11878
|
+
royaltyBps: Number(t.royalty_bps),
|
|
11879
|
+
metadataUri: t.metadata_uri
|
|
11880
11880
|
};
|
|
11881
11881
|
}
|
|
11882
11882
|
};
|