@story-protocol/core-sdk 1.3.0-beta.2 → 1.3.0-rc.1

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.
Files changed (58) hide show
  1. package/dist/declarations/src/abi/generated.d.ts +4327 -3815
  2. package/dist/declarations/src/abi/generated.d.ts.map +1 -1
  3. package/dist/declarations/src/client.d.ts +1 -0
  4. package/dist/declarations/src/client.d.ts.map +1 -1
  5. package/dist/declarations/src/index.d.ts +10 -5
  6. package/dist/declarations/src/index.d.ts.map +1 -1
  7. package/dist/declarations/src/resources/dispute.d.ts +33 -20
  8. package/dist/declarations/src/resources/dispute.d.ts.map +1 -1
  9. package/dist/declarations/src/resources/group.d.ts +11 -100
  10. package/dist/declarations/src/resources/group.d.ts.map +1 -1
  11. package/dist/declarations/src/resources/ipAccount.d.ts +9 -3
  12. package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -1
  13. package/dist/declarations/src/resources/ipAsset.d.ts +36 -364
  14. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  15. package/dist/declarations/src/resources/license.d.ts +4 -21
  16. package/dist/declarations/src/resources/license.d.ts.map +1 -1
  17. package/dist/declarations/src/resources/nftClient.d.ts +9 -1
  18. package/dist/declarations/src/resources/nftClient.d.ts.map +1 -1
  19. package/dist/declarations/src/resources/permission.d.ts +2 -2
  20. package/dist/declarations/src/resources/permission.d.ts.map +1 -1
  21. package/dist/declarations/src/resources/royalty.d.ts +22 -13
  22. package/dist/declarations/src/resources/royalty.d.ts.map +1 -1
  23. package/dist/declarations/src/resources/wip.d.ts +15 -9
  24. package/dist/declarations/src/resources/wip.d.ts.map +1 -1
  25. package/dist/declarations/src/types/common.d.ts +20 -2
  26. package/dist/declarations/src/types/common.d.ts.map +1 -1
  27. package/dist/declarations/src/types/config.d.ts +2 -1
  28. package/dist/declarations/src/types/config.d.ts.map +1 -1
  29. package/dist/declarations/src/types/options.d.ts +67 -1
  30. package/dist/declarations/src/types/options.d.ts.map +1 -1
  31. package/dist/declarations/src/types/resources/dispute.d.ts +56 -4
  32. package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -1
  33. package/dist/declarations/src/types/resources/group.d.ts +30 -5
  34. package/dist/declarations/src/types/resources/group.d.ts.map +1 -1
  35. package/dist/declarations/src/types/resources/ipAccount.d.ts +10 -2
  36. package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -1
  37. package/dist/declarations/src/types/resources/ipAsset.d.ts +118 -117
  38. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  39. package/dist/declarations/src/types/resources/ipMetadata.d.ts +274 -0
  40. package/dist/declarations/src/types/resources/ipMetadata.d.ts.map +1 -0
  41. package/dist/declarations/src/types/resources/license.d.ts +6 -8
  42. package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
  43. package/dist/declarations/src/types/resources/royalty.d.ts +40 -119
  44. package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
  45. package/dist/declarations/src/types/resources/wip.d.ts +7 -0
  46. package/dist/declarations/src/types/resources/wip.d.ts.map +1 -1
  47. package/dist/declarations/src/utils/chain.d.ts +33 -1
  48. package/dist/declarations/src/utils/chain.d.ts.map +1 -1
  49. package/dist/declarations/src/utils/getIpMetadataForWorkflow.d.ts +4 -0
  50. package/dist/declarations/src/utils/getIpMetadataForWorkflow.d.ts.map +1 -1
  51. package/dist/story-protocol-core-sdk.cjs.dev.js +2932 -2467
  52. package/dist/story-protocol-core-sdk.cjs.prod.js +2932 -2467
  53. package/dist/story-protocol-core-sdk.esm.js +2928 -2470
  54. package/package.json +1 -1
  55. package/dist/declarations/src/types/utils/txOptions.d.ts +0 -13
  56. package/dist/declarations/src/types/utils/txOptions.d.ts.map +0 -1
  57. package/dist/declarations/src/types/utils/wip.d.ts +0 -87
  58. package/dist/declarations/src/types/utils/wip.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@story-protocol/core-sdk",
3
- "version": "1.3.0-beta.2",
3
+ "version": "1.3.0-rc.1",
4
4
  "description": "Story Protocol Core SDK",
5
5
  "main": "dist/story-protocol-core-sdk.cjs.js",
6
6
  "module": "dist/story-protocol-core-sdk.esm.js",
@@ -1,13 +0,0 @@
1
- import { Hex, PublicClient, TransactionReceipt } from "viem";
2
- import { TxOptions } from "../options.js";
3
- export type HandleTxOptionsParams = {
4
- txHash: Hex;
5
- txOptions?: TxOptions;
6
- rpcClient: PublicClient;
7
- };
8
- export type HandleTxOptionsResponse = {
9
- txHash: Hex;
10
- /** Transaction receipt, only available if waitForTransaction is set to true */
11
- receipt?: TransactionReceipt;
12
- };
13
- //# sourceMappingURL=txOptions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"txOptions.d.ts","sourceRoot":"../../../../../src/types/utils","sources":["txOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,YAAY,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,GAAG,CAAC;IAEZ,+EAA+E;IAC/E,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B,CAAC"}
@@ -1,87 +0,0 @@
1
- import { Address, Hash, PublicClient } from "viem";
2
- import { Multicall3Aggregate3Request, Multicall3Client, Erc20TokenClient, EncodedTxData, SimpleWalletClient, PiLicenseTemplateClient, LicensingModuleClient } from "../../abi/generated.js";
3
- import { TxOptions } from "../options.js";
4
- /**
5
- * Options to override the default behavior of the auto wrapping IP
6
- * and auto approve logic.
7
- */
8
- export type WithWipOptions = {
9
- /** options to configure WIP behavior */
10
- wipOptions?: {
11
- /**
12
- * Use multicall to batch the WIP calls into one transaction when possible.
13
- *
14
- * @default true
15
- */
16
- useMulticallWhenPossible?: boolean;
17
- /**
18
- * By default IP is converted to WIP if the current WIP
19
- * balance does not cover the fees.
20
- * Set this to `false` to disable this behavior.
21
- *
22
- * @default true
23
- */
24
- enableAutoWrapIp?: boolean;
25
- /**
26
- * Automatically approve WIP usage when WIP is needed but current allowance
27
- * is not sufficient.
28
- * Set this to `false` to disable this behavior.
29
- *
30
- * @default true
31
- */
32
- enableAutoApprove?: boolean;
33
- };
34
- };
35
- export type Multicall3ValueCall = Multicall3Aggregate3Request["calls"][0] & {
36
- value: bigint;
37
- };
38
- export type WipSpender = {
39
- address: Address;
40
- /**
41
- * Amount that the address will spend in WIP.
42
- * If not provided, then unlimited amount is assumed.
43
- */
44
- amount?: bigint;
45
- };
46
- export type WipApprovalCall = {
47
- spenders: WipSpender[];
48
- client: Erc20TokenClient;
49
- rpcClient: PublicClient;
50
- /** owner is the address calling the approval */
51
- owner: Address;
52
- /** when true, will return an array of {@link Multicall3ValueCall} */
53
- useMultiCall: boolean;
54
- };
55
- export type ContractCallWithWipFees = WithWipOptions & {
56
- totalFees: bigint;
57
- multicall3Client: Multicall3Client;
58
- wipClient: Erc20TokenClient;
59
- /** all possible spenders of the wip */
60
- wipSpenders: WipSpender[];
61
- contractCall: () => Promise<Hash>;
62
- encodedTxs: EncodedTxData[];
63
- rpcClient: PublicClient;
64
- wallet: SimpleWalletClient;
65
- sender: Address;
66
- txOptions?: TxOptions;
67
- };
68
- export type MulticallWithWrapIp = WithWipOptions & {
69
- calls: Multicall3ValueCall[];
70
- ipAmountToWrap: bigint;
71
- contractCall: () => Promise<Hash>;
72
- wipSpenders: WipSpender[];
73
- multicall3Client: Multicall3Client;
74
- wipClient: Erc20TokenClient;
75
- rpcClient: PublicClient;
76
- wallet: SimpleWalletClient;
77
- };
78
- export type CalculateDerivativeMintFeeParams = {
79
- multicall3Client: Multicall3Client;
80
- licenseTemplateClient: PiLicenseTemplateClient;
81
- licensingModuleClient: LicensingModuleClient;
82
- parentIpId: Address;
83
- licenseTermsId: bigint;
84
- receiver: Address;
85
- amount: bigint;
86
- };
87
- //# sourceMappingURL=wip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wip.d.ts","sourceRoot":"../../../../../src/types/utils","sources":["wip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEnD,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACtB,+BAA4B;AAC7B,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,wCAAwC;IACxC,UAAU,CAAC,EAAE;QACX;;;;WAIG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;QAEnC;;;;;;WAMG;QACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAE3B;;;;;;WAMG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,2BAA2B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9F,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,MAAM,EAAE,gBAAgB,CAAC;IACzB,SAAS,EAAE,YAAY,CAAC;IACxB,gDAAgD;IAChD,KAAK,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,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