@story-protocol/core-sdk 1.0.0-rc.17 → 1.0.0-rc.18

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -51,7 +51,7 @@ The preceding code created the `account` object for creating the SDK client.
51
51
 
52
52
  To set up the SDK client, import `StoryClient` and `StoryConfig` from `@story-protocol/core-sdk`. Write the following code, utilizing the `account` we created previously.
53
53
 
54
- > :information-source: Make sure to have RPC_PROVIDER_URL for your desired chain set up in your .env file. We recommend using the Sepolia network with `RPC_PROVIDER_URL=https://rpc.ankr.com/eth_sepolia`.
54
+ > :information-source: Make sure to have RPC_PROVIDER_URL for your desired chain set up in your .env file. We recommend using the Iliad network with `RPC_PROVIDER_URL=https://rpc.partner.testnet.storyprotocol.net`.
55
55
 
56
56
  ```typescript index.ts
57
57
  import { StoryClient, StoryConfig } from "@story-protocol/core-sdk";
@@ -98,15 +98,16 @@ In your testing environment:
98
98
 
99
99
  - Run `yalc update` to pull the latest changes.
100
100
 
101
- ## Steps to pull and compile latest smart contract ABIs (Currently pulls from the protocol-contracts `dev` branch)
101
+ ## Steps to pull and compile latest Protocol Core & Periphery v1 Smart Contract ABIs (Currently pulls from the protocol-core-v1 and protocol-periphery-v1 `release-v1.x.x` branch)
102
102
 
103
103
  - run `cd packages/wagmi-generator && npm run generate`
104
104
 
105
105
  ## Release
106
106
 
107
- | Package | Description |
108
- | :------------------------------ | :--------------------------------------------- |
109
- | [core-sdk](./packages/core-sdk) | The core sdk for interacting with the protocol |
107
+ | Package | Description |
108
+ | :-------------------------------- | :---------------------------------------------- |
109
+ | [core-sdk](./packages/core-sdk) | The core sdk for interacting with the protocol |
110
+ | [react-sdk](./packages/react-sdk) | The react sdk for interacting with the protocol |
110
111
 
111
112
  ## Contributing
112
113
 
@@ -17943,6 +17943,22 @@ export declare const spgAbi: readonly [{
17943
17943
  readonly type: "error";
17944
17944
  readonly inputs: readonly [];
17945
17945
  readonly name: "NotInitializing";
17946
+ }, {
17947
+ readonly type: "error";
17948
+ readonly inputs: readonly [{
17949
+ readonly name: "tokenId";
17950
+ readonly internalType: "uint256";
17951
+ readonly type: "uint256";
17952
+ }, {
17953
+ readonly name: "caller";
17954
+ readonly internalType: "address";
17955
+ readonly type: "address";
17956
+ }, {
17957
+ readonly name: "actualTokenOwner";
17958
+ readonly internalType: "address";
17959
+ readonly type: "address";
17960
+ }];
17961
+ readonly name: "SPG__CallerAndNotTokenOwner";
17946
17962
  }, {
17947
17963
  readonly type: "error";
17948
17964
  readonly inputs: readonly [];
@@ -18256,7 +18272,7 @@ export declare const spgAbi: readonly [{
18256
18272
  readonly internalType: "address";
18257
18273
  readonly type: "address";
18258
18274
  }, {
18259
- readonly name: "mintingFee";
18275
+ readonly name: "defaultMintingFee";
18260
18276
  readonly internalType: "uint256";
18261
18277
  readonly type: "uint256";
18262
18278
  }, {
@@ -18284,7 +18300,7 @@ export declare const spgAbi: readonly [{
18284
18300
  readonly internalType: "uint32";
18285
18301
  readonly type: "uint32";
18286
18302
  }, {
18287
- readonly name: "commercialRevCelling";
18303
+ readonly name: "commercialRevCeiling";
18288
18304
  readonly internalType: "uint256";
18289
18305
  readonly type: "uint256";
18290
18306
  }, {
@@ -18304,7 +18320,7 @@ export declare const spgAbi: readonly [{
18304
18320
  readonly internalType: "bool";
18305
18321
  readonly type: "bool";
18306
18322
  }, {
18307
- readonly name: "derivativeRevCelling";
18323
+ readonly name: "derivativeRevCeiling";
18308
18324
  readonly internalType: "uint256";
18309
18325
  readonly type: "uint256";
18310
18326
  }, {
@@ -18447,6 +18463,32 @@ export declare const spgAbi: readonly [{
18447
18463
  readonly type: "uint256";
18448
18464
  }];
18449
18465
  readonly stateMutability: "nonpayable";
18466
+ }, {
18467
+ readonly type: "function";
18468
+ readonly inputs: readonly [{
18469
+ readonly name: "";
18470
+ readonly internalType: "address";
18471
+ readonly type: "address";
18472
+ }, {
18473
+ readonly name: "";
18474
+ readonly internalType: "address";
18475
+ readonly type: "address";
18476
+ }, {
18477
+ readonly name: "";
18478
+ readonly internalType: "uint256";
18479
+ readonly type: "uint256";
18480
+ }, {
18481
+ readonly name: "";
18482
+ readonly internalType: "bytes";
18483
+ readonly type: "bytes";
18484
+ }];
18485
+ readonly name: "onERC721Received";
18486
+ readonly outputs: readonly [{
18487
+ readonly name: "";
18488
+ readonly internalType: "bytes4";
18489
+ readonly type: "bytes4";
18490
+ }];
18491
+ readonly stateMutability: "nonpayable";
18450
18492
  }, {
18451
18493
  readonly type: "function";
18452
18494
  readonly inputs: readonly [];
@@ -18549,7 +18591,7 @@ export declare const spgAbi: readonly [{
18549
18591
  readonly internalType: "address";
18550
18592
  readonly type: "address";
18551
18593
  }, {
18552
- readonly name: "mintingFee";
18594
+ readonly name: "defaultMintingFee";
18553
18595
  readonly internalType: "uint256";
18554
18596
  readonly type: "uint256";
18555
18597
  }, {
@@ -18577,7 +18619,7 @@ export declare const spgAbi: readonly [{
18577
18619
  readonly internalType: "uint32";
18578
18620
  readonly type: "uint32";
18579
18621
  }, {
18580
- readonly name: "commercialRevCelling";
18622
+ readonly name: "commercialRevCeiling";
18581
18623
  readonly internalType: "uint256";
18582
18624
  readonly type: "uint256";
18583
18625
  }, {
@@ -18597,7 +18639,7 @@ export declare const spgAbi: readonly [{
18597
18639
  readonly internalType: "bool";
18598
18640
  readonly type: "bool";
18599
18641
  }, {
18600
- readonly name: "derivativeRevCelling";
18642
+ readonly name: "derivativeRevCeiling";
18601
18643
  readonly internalType: "uint256";
18602
18644
  readonly type: "uint256";
18603
18645
  }, {
@@ -18841,7 +18883,7 @@ export declare const spgAbi: readonly [{
18841
18883
  readonly internalType: "address";
18842
18884
  readonly type: "address";
18843
18885
  }, {
18844
- readonly name: "mintingFee";
18886
+ readonly name: "defaultMintingFee";
18845
18887
  readonly internalType: "uint256";
18846
18888
  readonly type: "uint256";
18847
18889
  }, {
@@ -18869,7 +18911,7 @@ export declare const spgAbi: readonly [{
18869
18911
  readonly internalType: "uint32";
18870
18912
  readonly type: "uint32";
18871
18913
  }, {
18872
- readonly name: "commercialRevCelling";
18914
+ readonly name: "commercialRevCeiling";
18873
18915
  readonly internalType: "uint256";
18874
18916
  readonly type: "uint256";
18875
18917
  }, {
@@ -18889,7 +18931,7 @@ export declare const spgAbi: readonly [{
18889
18931
  readonly internalType: "bool";
18890
18932
  readonly type: "bool";
18891
18933
  }, {
18892
- readonly name: "derivativeRevCelling";
18934
+ readonly name: "derivativeRevCeiling";
18893
18935
  readonly internalType: "uint256";
18894
18936
  readonly type: "uint256";
18895
18937
  }, {
@@ -19071,6 +19113,22 @@ export declare const spgConfig: {
19071
19113
  readonly type: "error";
19072
19114
  readonly inputs: readonly [];
19073
19115
  readonly name: "NotInitializing";
19116
+ }, {
19117
+ readonly type: "error";
19118
+ readonly inputs: readonly [{
19119
+ readonly name: "tokenId";
19120
+ readonly internalType: "uint256";
19121
+ readonly type: "uint256";
19122
+ }, {
19123
+ readonly name: "caller";
19124
+ readonly internalType: "address";
19125
+ readonly type: "address";
19126
+ }, {
19127
+ readonly name: "actualTokenOwner";
19128
+ readonly internalType: "address";
19129
+ readonly type: "address";
19130
+ }];
19131
+ readonly name: "SPG__CallerAndNotTokenOwner";
19074
19132
  }, {
19075
19133
  readonly type: "error";
19076
19134
  readonly inputs: readonly [];
@@ -19384,7 +19442,7 @@ export declare const spgConfig: {
19384
19442
  readonly internalType: "address";
19385
19443
  readonly type: "address";
19386
19444
  }, {
19387
- readonly name: "mintingFee";
19445
+ readonly name: "defaultMintingFee";
19388
19446
  readonly internalType: "uint256";
19389
19447
  readonly type: "uint256";
19390
19448
  }, {
@@ -19412,7 +19470,7 @@ export declare const spgConfig: {
19412
19470
  readonly internalType: "uint32";
19413
19471
  readonly type: "uint32";
19414
19472
  }, {
19415
- readonly name: "commercialRevCelling";
19473
+ readonly name: "commercialRevCeiling";
19416
19474
  readonly internalType: "uint256";
19417
19475
  readonly type: "uint256";
19418
19476
  }, {
@@ -19432,7 +19490,7 @@ export declare const spgConfig: {
19432
19490
  readonly internalType: "bool";
19433
19491
  readonly type: "bool";
19434
19492
  }, {
19435
- readonly name: "derivativeRevCelling";
19493
+ readonly name: "derivativeRevCeiling";
19436
19494
  readonly internalType: "uint256";
19437
19495
  readonly type: "uint256";
19438
19496
  }, {
@@ -19575,6 +19633,32 @@ export declare const spgConfig: {
19575
19633
  readonly type: "uint256";
19576
19634
  }];
19577
19635
  readonly stateMutability: "nonpayable";
19636
+ }, {
19637
+ readonly type: "function";
19638
+ readonly inputs: readonly [{
19639
+ readonly name: "";
19640
+ readonly internalType: "address";
19641
+ readonly type: "address";
19642
+ }, {
19643
+ readonly name: "";
19644
+ readonly internalType: "address";
19645
+ readonly type: "address";
19646
+ }, {
19647
+ readonly name: "";
19648
+ readonly internalType: "uint256";
19649
+ readonly type: "uint256";
19650
+ }, {
19651
+ readonly name: "";
19652
+ readonly internalType: "bytes";
19653
+ readonly type: "bytes";
19654
+ }];
19655
+ readonly name: "onERC721Received";
19656
+ readonly outputs: readonly [{
19657
+ readonly name: "";
19658
+ readonly internalType: "bytes4";
19659
+ readonly type: "bytes4";
19660
+ }];
19661
+ readonly stateMutability: "nonpayable";
19578
19662
  }, {
19579
19663
  readonly type: "function";
19580
19664
  readonly inputs: readonly [];
@@ -19677,7 +19761,7 @@ export declare const spgConfig: {
19677
19761
  readonly internalType: "address";
19678
19762
  readonly type: "address";
19679
19763
  }, {
19680
- readonly name: "mintingFee";
19764
+ readonly name: "defaultMintingFee";
19681
19765
  readonly internalType: "uint256";
19682
19766
  readonly type: "uint256";
19683
19767
  }, {
@@ -19705,7 +19789,7 @@ export declare const spgConfig: {
19705
19789
  readonly internalType: "uint32";
19706
19790
  readonly type: "uint32";
19707
19791
  }, {
19708
- readonly name: "commercialRevCelling";
19792
+ readonly name: "commercialRevCeiling";
19709
19793
  readonly internalType: "uint256";
19710
19794
  readonly type: "uint256";
19711
19795
  }, {
@@ -19725,7 +19809,7 @@ export declare const spgConfig: {
19725
19809
  readonly internalType: "bool";
19726
19810
  readonly type: "bool";
19727
19811
  }, {
19728
- readonly name: "derivativeRevCelling";
19812
+ readonly name: "derivativeRevCeiling";
19729
19813
  readonly internalType: "uint256";
19730
19814
  readonly type: "uint256";
19731
19815
  }, {
@@ -19969,7 +20053,7 @@ export declare const spgConfig: {
19969
20053
  readonly internalType: "address";
19970
20054
  readonly type: "address";
19971
20055
  }, {
19972
- readonly name: "mintingFee";
20056
+ readonly name: "defaultMintingFee";
19973
20057
  readonly internalType: "uint256";
19974
20058
  readonly type: "uint256";
19975
20059
  }, {
@@ -19997,7 +20081,7 @@ export declare const spgConfig: {
19997
20081
  readonly internalType: "uint32";
19998
20082
  readonly type: "uint32";
19999
20083
  }, {
20000
- readonly name: "commercialRevCelling";
20084
+ readonly name: "commercialRevCeiling";
20001
20085
  readonly internalType: "uint256";
20002
20086
  readonly type: "uint256";
20003
20087
  }, {
@@ -20017,7 +20101,7 @@ export declare const spgConfig: {
20017
20101
  readonly internalType: "bool";
20018
20102
  readonly type: "bool";
20019
20103
  }, {
20020
- readonly name: "derivativeRevCelling";
20104
+ readonly name: "derivativeRevCeiling";
20021
20105
  readonly internalType: "uint256";
20022
20106
  readonly type: "uint256";
20023
20107
  }, {
@@ -24659,19 +24743,19 @@ export type SpgMintAndRegisterIpAndAttachPilTermsRequest = {
24659
24743
  terms: {
24660
24744
  transferable: boolean;
24661
24745
  royaltyPolicy: Address;
24662
- mintingFee: bigint;
24746
+ defaultMintingFee: bigint;
24663
24747
  expiration: bigint;
24664
24748
  commercialUse: boolean;
24665
24749
  commercialAttribution: boolean;
24666
24750
  commercializerChecker: Address;
24667
24751
  commercializerCheckerData: Hex;
24668
24752
  commercialRevShare: number;
24669
- commercialRevCelling: bigint;
24753
+ commercialRevCeiling: bigint;
24670
24754
  derivativesAllowed: boolean;
24671
24755
  derivativesAttribution: boolean;
24672
24756
  derivativesApproval: boolean;
24673
24757
  derivativesReciprocal: boolean;
24674
- derivativeRevCelling: bigint;
24758
+ derivativeRevCeiling: bigint;
24675
24759
  currency: Address;
24676
24760
  uri: string;
24677
24761
  };
@@ -24766,19 +24850,19 @@ export type SpgRegisterIpAndAttachPilTermsRequest = {
24766
24850
  terms: {
24767
24851
  transferable: boolean;
24768
24852
  royaltyPolicy: Address;
24769
- mintingFee: bigint;
24853
+ defaultMintingFee: bigint;
24770
24854
  expiration: bigint;
24771
24855
  commercialUse: boolean;
24772
24856
  commercialAttribution: boolean;
24773
24857
  commercializerChecker: Address;
24774
24858
  commercializerCheckerData: Hex;
24775
24859
  commercialRevShare: number;
24776
- commercialRevCelling: bigint;
24860
+ commercialRevCeiling: bigint;
24777
24861
  derivativesAllowed: boolean;
24778
24862
  derivativesAttribution: boolean;
24779
24863
  derivativesApproval: boolean;
24780
24864
  derivativesReciprocal: boolean;
24781
- derivativeRevCelling: bigint;
24865
+ derivativeRevCeiling: bigint;
24782
24866
  currency: Address;
24783
24867
  uri: string;
24784
24868
  };
@@ -24871,19 +24955,19 @@ export type SpgRegisterPilTermsAndAttachRequest = {
24871
24955
  terms: {
24872
24956
  transferable: boolean;
24873
24957
  royaltyPolicy: Address;
24874
- mintingFee: bigint;
24958
+ defaultMintingFee: bigint;
24875
24959
  expiration: bigint;
24876
24960
  commercialUse: boolean;
24877
24961
  commercialAttribution: boolean;
24878
24962
  commercializerChecker: Address;
24879
24963
  commercializerCheckerData: Hex;
24880
24964
  commercialRevShare: number;
24881
- commercialRevCelling: bigint;
24965
+ commercialRevCeiling: bigint;
24882
24966
  derivativesAllowed: boolean;
24883
24967
  derivativesAttribution: boolean;
24884
24968
  derivativesApproval: boolean;
24885
24969
  derivativesReciprocal: boolean;
24886
- derivativeRevCelling: bigint;
24970
+ derivativeRevCeiling: bigint;
24887
24971
  currency: Address;
24888
24972
  uri: string;
24889
24973
  };
@@ -25051,6 +25135,135 @@ export declare class SpgClient extends SpgEventClient {
25051
25135
  */
25052
25136
  registerPilTermsAndAttachEncode(request: SpgRegisterPilTermsAndAttachRequest): EncodedTxData;
25053
25137
  }
25138
+ /**
25139
+ * SpgnftBeaconOwnershipTransferredEvent
25140
+ *
25141
+ * @param previousOwner address
25142
+ * @param newOwner address
25143
+ */
25144
+ export type SpgnftBeaconOwnershipTransferredEvent = {
25145
+ previousOwner: Address;
25146
+ newOwner: Address;
25147
+ };
25148
+ /**
25149
+ * SpgnftBeaconUpgradedEvent
25150
+ *
25151
+ * @param implementation address
25152
+ */
25153
+ export type SpgnftBeaconUpgradedEvent = {
25154
+ implementation: Address;
25155
+ };
25156
+ export type SpgnftBeaconImplementationResponse = Address;
25157
+ export type SpgnftBeaconOwnerResponse = Address;
25158
+ /**
25159
+ * SpgnftBeaconTransferOwnershipRequest
25160
+ *
25161
+ * @param newOwner address
25162
+ */
25163
+ export type SpgnftBeaconTransferOwnershipRequest = {
25164
+ newOwner: Address;
25165
+ };
25166
+ /**
25167
+ * SpgnftBeaconUpgradeToRequest
25168
+ *
25169
+ * @param newImplementation address
25170
+ */
25171
+ export type SpgnftBeaconUpgradeToRequest = {
25172
+ newImplementation: Address;
25173
+ };
25174
+ /**
25175
+ * contract SPGNFTBeacon event
25176
+ */
25177
+ export declare class SpgnftBeaconEventClient {
25178
+ protected readonly rpcClient: PublicClient;
25179
+ readonly address: Address;
25180
+ constructor(rpcClient: PublicClient, address?: Address);
25181
+ /**
25182
+ * event OwnershipTransferred for contract SPGNFTBeacon
25183
+ */
25184
+ watchOwnershipTransferredEvent(onLogs: (txHash: Hex, ev: Partial<SpgnftBeaconOwnershipTransferredEvent>) => void): WatchContractEventReturnType;
25185
+ /**
25186
+ * parse tx receipt event OwnershipTransferred for contract SPGNFTBeacon
25187
+ */
25188
+ parseTxOwnershipTransferredEvent(txReceipt: TransactionReceipt): Array<SpgnftBeaconOwnershipTransferredEvent>;
25189
+ /**
25190
+ * event Upgraded for contract SPGNFTBeacon
25191
+ */
25192
+ watchUpgradedEvent(onLogs: (txHash: Hex, ev: Partial<SpgnftBeaconUpgradedEvent>) => void): WatchContractEventReturnType;
25193
+ /**
25194
+ * parse tx receipt event Upgraded for contract SPGNFTBeacon
25195
+ */
25196
+ parseTxUpgradedEvent(txReceipt: TransactionReceipt): Array<SpgnftBeaconUpgradedEvent>;
25197
+ }
25198
+ /**
25199
+ * contract SPGNFTBeacon readonly method
25200
+ */
25201
+ export declare class SpgnftBeaconReadOnlyClient extends SpgnftBeaconEventClient {
25202
+ constructor(rpcClient: PublicClient, address?: Address);
25203
+ /**
25204
+ * method implementation for contract SPGNFTBeacon
25205
+ *
25206
+ * @param request SpgnftBeaconImplementationRequest
25207
+ * @return Promise<SpgnftBeaconImplementationResponse>
25208
+ */
25209
+ implementation(): Promise<SpgnftBeaconImplementationResponse>;
25210
+ /**
25211
+ * method owner for contract SPGNFTBeacon
25212
+ *
25213
+ * @param request SpgnftBeaconOwnerRequest
25214
+ * @return Promise<SpgnftBeaconOwnerResponse>
25215
+ */
25216
+ owner(): Promise<SpgnftBeaconOwnerResponse>;
25217
+ }
25218
+ /**
25219
+ * contract SPGNFTBeacon write method
25220
+ */
25221
+ export declare class SpgnftBeaconClient extends SpgnftBeaconReadOnlyClient {
25222
+ protected readonly wallet: SimpleWalletClient;
25223
+ constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address);
25224
+ /**
25225
+ * method renounceOwnership for contract SPGNFTBeacon
25226
+ *
25227
+ * @param request SpgnftBeaconRenounceOwnershipRequest
25228
+ * @return Promise<WriteContractReturnType>
25229
+ */
25230
+ renounceOwnership(): Promise<WriteContractReturnType>;
25231
+ /**
25232
+ * method renounceOwnership for contract SPGNFTBeacon with only encode
25233
+ *
25234
+ * @param request SpgnftBeaconRenounceOwnershipRequest
25235
+ * @return EncodedTxData
25236
+ */
25237
+ renounceOwnershipEncode(): EncodedTxData;
25238
+ /**
25239
+ * method transferOwnership for contract SPGNFTBeacon
25240
+ *
25241
+ * @param request SpgnftBeaconTransferOwnershipRequest
25242
+ * @return Promise<WriteContractReturnType>
25243
+ */
25244
+ transferOwnership(request: SpgnftBeaconTransferOwnershipRequest): Promise<WriteContractReturnType>;
25245
+ /**
25246
+ * method transferOwnership for contract SPGNFTBeacon with only encode
25247
+ *
25248
+ * @param request SpgnftBeaconTransferOwnershipRequest
25249
+ * @return EncodedTxData
25250
+ */
25251
+ transferOwnershipEncode(request: SpgnftBeaconTransferOwnershipRequest): EncodedTxData;
25252
+ /**
25253
+ * method upgradeTo for contract SPGNFTBeacon
25254
+ *
25255
+ * @param request SpgnftBeaconUpgradeToRequest
25256
+ * @return Promise<WriteContractReturnType>
25257
+ */
25258
+ upgradeTo(request: SpgnftBeaconUpgradeToRequest): Promise<WriteContractReturnType>;
25259
+ /**
25260
+ * method upgradeTo for contract SPGNFTBeacon with only encode
25261
+ *
25262
+ * @param request SpgnftBeaconUpgradeToRequest
25263
+ * @return EncodedTxData
25264
+ */
25265
+ upgradeToEncode(request: SpgnftBeaconUpgradeToRequest): EncodedTxData;
25266
+ }
25054
25267
  /**
25055
25268
  * SpgnftImplApprovalEvent
25056
25269
  *