@story-protocol/core-sdk 0.1.0-rc.7 → 1.0.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +94 -55
- package/dist/declarations/src/client.d.ts +33 -52
- package/dist/declarations/src/client.d.ts.map +1 -1
- package/dist/declarations/src/clients/storyAPI.d.ts +9 -0
- package/dist/declarations/src/clients/storyAPI.d.ts.map +1 -0
- package/dist/declarations/src/constants/common.d.ts +4 -0
- package/dist/declarations/src/constants/common.d.ts.map +1 -0
- package/dist/declarations/src/index.d.ts +13 -10
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/dispute.d.ts +1128 -0
- package/dist/declarations/src/resources/dispute.d.ts.map +1 -0
- package/dist/declarations/src/resources/ipAccount.d.ts +1028 -0
- package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -0
- package/dist/declarations/src/resources/ipAsset.d.ts +2360 -20
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/resources/license.d.ts +4356 -18
- package/dist/declarations/src/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/resources/permission.d.ts +2077 -0
- package/dist/declarations/src/resources/permission.d.ts.map +1 -0
- package/dist/declarations/src/resources/royalty.d.ts +3019 -0
- package/dist/declarations/src/resources/royalty.d.ts.map +1 -0
- package/dist/declarations/src/types/common.d.ts +6 -0
- package/dist/declarations/src/types/common.d.ts.map +1 -0
- package/dist/declarations/src/types/config.d.ts +15 -11
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/declarations/src/types/options.d.ts +6 -0
- package/dist/declarations/src/types/options.d.ts.map +1 -0
- package/dist/declarations/src/types/resources/dispute.d.ts +50 -0
- package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -0
- package/dist/declarations/src/types/resources/ipAccount.d.ts +25 -0
- package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -0
- package/dist/declarations/src/types/resources/ipAsset.d.ts +23 -63
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/license.d.ts +56 -68
- package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/permission.d.ts +14 -0
- package/dist/declarations/src/types/resources/permission.d.ts.map +1 -0
- package/dist/declarations/src/types/resources/royalty.d.ts +58 -0
- package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -0
- package/dist/story-protocol-core-sdk.cjs.d.ts +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +3329 -1565
- package/dist/story-protocol-core-sdk.cjs.prod.js +3329 -1565
- package/dist/story-protocol-core-sdk.esm.js +3385 -1624
- package/package.json +16 -13
- package/dist/declarations/src/abi/generated/CollectModule.d.ts +0 -80
- package/dist/declarations/src/abi/generated/CollectModule.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/FranchiseRegistry.d.ts +0 -78
- package/dist/declarations/src/abi/generated/FranchiseRegistry.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/IpAssetRegistry.d.ts +0 -94
- package/dist/declarations/src/abi/generated/IpAssetRegistry.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/LicensingModule.d.ts +0 -97
- package/dist/declarations/src/abi/generated/LicensingModule.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/RelationshipModule.d.ts +0 -116
- package/dist/declarations/src/abi/generated/RelationshipModule.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/common.d.ts +0 -22
- package/dist/declarations/src/abi/generated/common.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/factories/CollectModule__factory.d.ts +0 -52
- package/dist/declarations/src/abi/generated/factories/CollectModule__factory.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/factories/FranchiseRegistry__factory.d.ts +0 -58
- package/dist/declarations/src/abi/generated/factories/FranchiseRegistry__factory.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/factories/IpAssetRegistry__factory.d.ts +0 -112
- package/dist/declarations/src/abi/generated/factories/IpAssetRegistry__factory.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/factories/LicensingModule__factory.d.ts +0 -88
- package/dist/declarations/src/abi/generated/factories/LicensingModule__factory.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/factories/RelationshipModule__factory.d.ts +0 -175
- package/dist/declarations/src/abi/generated/factories/RelationshipModule__factory.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/factories/index.d.ts +0 -6
- package/dist/declarations/src/abi/generated/factories/index.d.ts.map +0 -1
- package/dist/declarations/src/abi/generated/index.d.ts +0 -12
- package/dist/declarations/src/abi/generated/index.d.ts.map +0 -1
- package/dist/declarations/src/enums/Environment.d.ts +0 -8
- package/dist/declarations/src/enums/Environment.d.ts.map +0 -1
- package/dist/declarations/src/enums/IPAssetType.d.ts +0 -12
- package/dist/declarations/src/enums/IPAssetType.d.ts.map +0 -1
- package/dist/declarations/src/enums/ResourceType.d.ts +0 -11
- package/dist/declarations/src/enums/ResourceType.d.ts.map +0 -1
- package/dist/declarations/src/resources/collect.d.ts +0 -17
- package/dist/declarations/src/resources/collect.d.ts.map +0 -1
- package/dist/declarations/src/resources/collectReadOnly.d.ts +0 -15
- package/dist/declarations/src/resources/collectReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/franchise.d.ts +0 -26
- package/dist/declarations/src/resources/franchise.d.ts.map +0 -1
- package/dist/declarations/src/resources/franchiseReadOnly.d.ts +0 -27
- package/dist/declarations/src/resources/franchiseReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/ipAssetReadOnly.d.ts +0 -25
- package/dist/declarations/src/resources/ipAssetReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/licenseReadOnly.d.ts +0 -27
- package/dist/declarations/src/resources/licenseReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/relationship.d.ts +0 -47
- package/dist/declarations/src/resources/relationship.d.ts.map +0 -1
- package/dist/declarations/src/resources/relationshipReadOnly.d.ts +0 -16
- package/dist/declarations/src/resources/relationshipReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/transaction.d.ts +0 -10
- package/dist/declarations/src/resources/transaction.d.ts.map +0 -1
- package/dist/declarations/src/resources/transactionReadOnly.d.ts +0 -25
- package/dist/declarations/src/resources/transactionReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/types/client.d.ts +0 -29
- package/dist/declarations/src/types/client.d.ts.map +0 -1
- package/dist/declarations/src/types/resources/collect.d.ts +0 -45
- package/dist/declarations/src/types/resources/collect.d.ts.map +0 -1
- package/dist/declarations/src/types/resources/franchise.d.ts +0 -71
- package/dist/declarations/src/types/resources/franchise.d.ts.map +0 -1
- package/dist/declarations/src/types/resources/relationship.d.ts +0 -83
- package/dist/declarations/src/types/resources/relationship.d.ts.map +0 -1
- package/dist/declarations/src/types/resources/transaction.d.ts +0 -40
- package/dist/declarations/src/types/resources/transaction.d.ts.map +0 -1
- package/dist/story-protocol-core-sdk.cjs.d.ts.map +0 -1
package/README.md
CHANGED
@@ -1,85 +1,124 @@
|
|
1
|
-
|
1
|
+
# Story Protocol SDK
|
2
2
|
|
3
|
-
|
3
|
+
Welcome to the documents for Story Protocol SDK. The SDK provides the APIs for developers to build applications with Story Protocol. By using the SDK, developers can create the resources like IP assets and perform actions to interact with the resource.
|
4
4
|
|
5
|
-
|
5
|
+
## How to use Story Protocol SDK in Your Project
|
6
6
|
|
7
|
-
|
7
|
+
### Install Story Protocol core SDK
|
8
8
|
|
9
|
-
|
10
|
-
npm i @story-protocol/core-sdk ethers@^5.7.2
|
11
|
-
```
|
9
|
+
Suppose you already have a node project or created a new node project. First, you need to install `@story-protocol/core-sdk` in your project. You can use one of the following command to install the package:
|
12
10
|
|
13
|
-
|
11
|
+
Use `npm`:
|
14
12
|
|
15
|
-
```
|
16
|
-
|
13
|
+
```
|
14
|
+
npm install --save @story-protocol/core-sdk viem@1.21.4
|
17
15
|
```
|
18
16
|
|
19
|
-
|
17
|
+
Use `pnpm`:
|
20
18
|
|
21
|
-
```
|
22
|
-
|
19
|
+
```
|
20
|
+
pnpm install @story-protocol/core-sdk viem@1.21.4
|
23
21
|
```
|
24
22
|
|
25
|
-
|
26
|
-
|
27
|
-
(Ask the team to provide the values)
|
23
|
+
Use `yarn`:
|
28
24
|
|
29
25
|
```
|
30
|
-
|
31
|
-
NEXT_PUBLIC_FRANCHISE_REGISTRY_CONTRACT =
|
32
|
-
NEXT_PUBLIC_RELATIONSHIP_MODULE_CONTRACT =
|
33
|
-
NEXT_PUBLIC_COLLECT_MODULE_CONTRACT =
|
34
|
-
NEXT_PUBLIC_LICENSING_MODULE_CONTRACT =
|
26
|
+
yarn add @story-protocol/core-sdk viem@1.21.4
|
35
27
|
```
|
36
28
|
|
37
|
-
|
29
|
+
Besides the Story Protocol SDK package `@story-protocol/core-sdk`, we also require the package `viem` (https://www.npmjs.com/package/viem) to access the DeFi wallet accounts.
|
38
30
|
|
39
|
-
|
31
|
+
# Initiate SDK Client
|
40
32
|
|
41
|
-
|
42
|
-
import { StoryClient } from "@story-protocol/core-sdk";
|
43
|
-
import ethers from "ethers";
|
33
|
+
Next we can initiate the SDK Client by first setting up our wallet and then the client itself.
|
44
34
|
|
45
|
-
|
46
|
-
const provider = new ethers.providers.Web3Provider(window.ethereum);
|
47
|
-
await provider.send("eth_requestAccounts", []);
|
48
|
-
const signer = await provider.getSigner();
|
35
|
+
## Set up your wallet
|
49
36
|
|
50
|
-
|
51
|
-
const client = StoryClient.newReadOnlyClient({ provider });
|
37
|
+
The SDK supports using `viem` for initiating SDK client. Create a typescript file and write the following code to initiate the client with a private key:
|
52
38
|
|
53
|
-
|
54
|
-
|
39
|
+
> :information-source: Make sure to have WALLET_PRIVATE_KEY set up in your .env file.
|
40
|
+
|
41
|
+
```typescript index.ts
|
42
|
+
import { privateKeyToAccount } from "viem/accounts";
|
43
|
+
|
44
|
+
const WALLET_PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY || "0x";
|
45
|
+
const account = privateKeyToAccount(WALLET_PRIVATE_KEY as `0x${string}`);
|
55
46
|
```
|
56
47
|
|
57
|
-
|
48
|
+
The preceding code created the `account` object for creating the SDK client.
|
49
|
+
|
50
|
+
## Set up SDK client
|
58
51
|
|
59
|
-
|
60
|
-
import { StoryClient } from "@story-protocol/core-sdk"
|
61
|
-
import ethers from "ethers"
|
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.
|
62
53
|
|
63
|
-
|
64
|
-
const provider = new ethers.providers.JsonRpcProvider(<YOUR RPC URL>)
|
65
|
-
const signer = new ethers.Wallet(<YOUR PRIVATE KEY>, provider)
|
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`.
|
66
55
|
|
67
|
-
|
68
|
-
|
56
|
+
```typescript index.ts
|
57
|
+
import { StoryClient, StoryConfig } from "@story-protocol/core-sdk";
|
69
58
|
|
59
|
+
const config: StoryConfig = {
|
60
|
+
transport: http(process.env.RPC_PROVIDER_URL),
|
61
|
+
account: account,
|
62
|
+
};
|
63
|
+
const client = StoryClient.newClient(config);
|
70
64
|
```
|
71
65
|
|
72
|
-
##
|
66
|
+
## How To Build and Test Story Protocol SDK for local testing
|
73
67
|
|
74
|
-
|
75
|
-
// Create a new franchise
|
76
|
-
const response = await client.franchise.create({
|
77
|
-
franchiseName: "Alice in Wonderland",
|
78
|
-
franchiseSymbol: "Wonderland",
|
79
|
-
franchiseDescription:
|
80
|
-
"Fantastical journey, curious girl, whimsical characters, dreamlike adventures.",
|
81
|
-
});
|
68
|
+
This section provides the instructions on how to build Story Protocol SDK from source code.
|
82
69
|
|
83
|
-
|
84
|
-
|
85
|
-
|
70
|
+
### Prerequisite
|
71
|
+
|
72
|
+
- Install PNPM: Execute `npm install -g pnpm`
|
73
|
+
- Install TypeScript: Run `pnpm add typescript -D`
|
74
|
+
- Install Yalc: Use `npm install -g yalc`
|
75
|
+
|
76
|
+
### Steps for Using Yalc for Local Testing of Core-SDK
|
77
|
+
|
78
|
+
For manual testing of the core-sdk, set up a separate web project. The guide below uses `yalc` to link the `core-sdk` locally, enabling its installation and import for testing.
|
79
|
+
|
80
|
+
Under the `typescript-sdk/packages/core-sdk` directory:
|
81
|
+
|
82
|
+
- Navigate to the `core-sdk` directory.
|
83
|
+
- Execute `npm run build` to build your latest code.
|
84
|
+
- Run `yalc publish`. You should see a message like `@story-protocol/core-sdk@<version> published in store.` (Note: The version number may vary).
|
85
|
+
|
86
|
+
To set up your testing environment (e.g., a new Next.js project), use `yalc add @story-protocol/core-sdk@<version>` (ensure the version number is updated accordingly).
|
87
|
+
|
88
|
+
- Run `pnpm install`. This installs `@story-protocol/core-sdk@<version>` with your local changes.
|
89
|
+
|
90
|
+
### Steps to Refresh the Changes
|
91
|
+
|
92
|
+
Under the `typescript-sdk/packages/core-sdk` directory:
|
93
|
+
|
94
|
+
- Execute `npm run build` to build your latest code.
|
95
|
+
- Run `yalc push`.
|
96
|
+
|
97
|
+
In your testing environment:
|
98
|
+
|
99
|
+
- Run `yalc update` to pull the latest changes.
|
100
|
+
|
101
|
+
## Steps to pull and compile latest smart contract ABIs (Currently pulls from the protocol-contracts `dev` branch)
|
102
|
+
|
103
|
+
Must have `solc` installed (https://docs.soliditylang.org/en/v0.8.9/installing-solidity.html)
|
104
|
+
|
105
|
+
- run `make compile_contracts`
|
106
|
+
|
107
|
+
## Release
|
108
|
+
|
109
|
+
| Package | Description |
|
110
|
+
| :------------------------------ | :--------------------------------------------- |
|
111
|
+
| [core-sdk](./packages/core-sdk) | The core sdk for interacting with the protocol |
|
112
|
+
|
113
|
+
## Contributing
|
114
|
+
|
115
|
+
Pull requests are welcome. For major changes, please open an issue first
|
116
|
+
to discuss what you would like to change. Details see: [CONTRIBUTING](/CONTRIBUTING.md)
|
117
|
+
|
118
|
+
Please make sure to update tests as appropriate.
|
119
|
+
|
120
|
+
## License
|
121
|
+
|
122
|
+
[MIT License](/LICENSE.md)
|
123
|
+
|
124
|
+
## Contact Us
|
@@ -1,94 +1,75 @@
|
|
1
|
-
import { StoryConfig
|
2
|
-
import { FranchiseClient } from "./resources/franchise.js";
|
3
|
-
import { FranchiseReadOnlyClient } from "./resources/franchiseReadOnly.js";
|
4
|
-
import { RelationshipClient } from "./resources/relationship.js";
|
5
|
-
import { RelationshipReadOnlyClient } from "./resources/relationshipReadOnly.js";
|
1
|
+
import { StoryConfig } from "./types/config.js";
|
6
2
|
import { IPAssetClient } from "./resources/ipAsset.js";
|
7
|
-
import {
|
3
|
+
import { PermissionClient } from "./resources/permission.js";
|
8
4
|
import { LicenseClient } from "./resources/license.js";
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import { CollectClient } from "./resources/collect.js";
|
13
|
-
import { CollectReadOnlyClient } from "./resources/collectReadOnly.js";
|
14
|
-
import { ReadOnlyClient, Client } from "./types/client.js";
|
5
|
+
import { DisputeClient } from "./resources/dispute.js";
|
6
|
+
import { IPAccountClient } from "./resources/ipAccount.js";
|
7
|
+
import { RoyaltyClient } from "./resources/royalty.js";
|
15
8
|
/**
|
16
9
|
* The StoryClient is the main entry point for the SDK.
|
17
10
|
*/
|
18
11
|
export declare class StoryClient {
|
19
12
|
private readonly config;
|
20
|
-
private readonly
|
21
|
-
private readonly
|
22
|
-
private readonly
|
23
|
-
private _franchise;
|
24
|
-
private _license;
|
25
|
-
private _transaction;
|
13
|
+
private readonly rpcClient;
|
14
|
+
private readonly wallet;
|
15
|
+
private readonly storyClient;
|
26
16
|
private _ipAsset;
|
27
|
-
private
|
28
|
-
private
|
17
|
+
private _permission;
|
18
|
+
private _license;
|
19
|
+
private _dispute;
|
20
|
+
private _ipAccount;
|
21
|
+
private _royalty;
|
29
22
|
/**
|
30
23
|
* @param config - the configuration for the SDK client
|
31
24
|
*/
|
32
25
|
private constructor();
|
33
|
-
/**
|
34
|
-
* Factory method for creating a read only SDK client.
|
35
|
-
*
|
36
|
-
* @param config - the configuration for a read only SDK client
|
37
|
-
*/
|
38
|
-
static newReadOnlyClient(config: StoryReadOnlyConfig): ReadOnlyClient;
|
39
26
|
/**
|
40
27
|
* Factory method for creating a SDK client with a signer.
|
41
28
|
*
|
42
|
-
* @param config - the configuration for a new
|
29
|
+
* @param config - the configuration for a new SDK client
|
43
30
|
*/
|
44
|
-
static newClient(config: StoryConfig):
|
45
|
-
private initFranchise;
|
46
|
-
private initRelationship;
|
47
|
-
private initIpAsset;
|
48
|
-
private initLicense;
|
49
|
-
private initTransaction;
|
50
|
-
private initCollect;
|
31
|
+
static newClient(config: StoryConfig): StoryClient;
|
51
32
|
/**
|
52
|
-
* Getter for the
|
33
|
+
* Getter for the ip asset client. The client is lazily created when
|
53
34
|
* this method is called.
|
54
35
|
*
|
55
|
-
* @returns the
|
36
|
+
* @returns the IPAssetClient instance
|
56
37
|
*/
|
57
|
-
get
|
38
|
+
get ipAsset(): IPAssetClient;
|
58
39
|
/**
|
59
|
-
* Getter for the
|
40
|
+
* Getter for the permission client. The client is lazily created when
|
60
41
|
* this method is called.
|
61
42
|
*
|
62
|
-
* @returns the
|
43
|
+
* @returns the PermissionClient instance
|
63
44
|
*/
|
64
|
-
get
|
45
|
+
get permission(): PermissionClient;
|
65
46
|
/**
|
66
|
-
* Getter for the
|
47
|
+
* Getter for the license client. The client is lazily created when
|
67
48
|
* this method is called.
|
68
49
|
*
|
69
|
-
* @returns the
|
50
|
+
* @returns the LicenseClient instance
|
70
51
|
*/
|
71
|
-
get
|
52
|
+
get license(): LicenseClient;
|
72
53
|
/**
|
73
|
-
* Getter for the
|
54
|
+
* Getter for the dispute client. The client is lazily created when
|
74
55
|
* this method is called.
|
75
56
|
*
|
76
|
-
* @returns the
|
57
|
+
* @returns the DisputeClient instance
|
77
58
|
*/
|
78
|
-
get
|
59
|
+
get dispute(): DisputeClient;
|
79
60
|
/**
|
80
|
-
* Getter for the
|
61
|
+
* Getter for the ip account client. The client is lazily created when
|
81
62
|
* this method is called.
|
82
63
|
*
|
83
|
-
* @returns the
|
64
|
+
* @returns the IPAccountClient instance
|
84
65
|
*/
|
85
|
-
get
|
66
|
+
get ipAccount(): IPAccountClient;
|
86
67
|
/**
|
87
|
-
* Getter for the
|
68
|
+
* Getter for the royalty client. The client is lazily created when
|
88
69
|
* this method is called.
|
89
70
|
*
|
90
|
-
* @returns the
|
71
|
+
* @returns the RoyaltyClient instance
|
91
72
|
*/
|
92
|
-
get
|
73
|
+
get royalty(): RoyaltyClient;
|
93
74
|
}
|
94
75
|
//# sourceMappingURL=client.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"../../../src","sources":["client.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"../../../src","sources":["client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAqB,0BAAuB;AAChE,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,gBAAgB,EAAE,kCAA+B;AAC1D,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,eAAe,EAAE,iCAA8B;AAGxD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AAKpD;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+C;IACtE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAC7C,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,QAAQ,CAA8B;IAC9C;;OAEG;IACH,OAAO;IAgCP;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAIlD;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;;;OAKG;IACH,IAAW,UAAU,IAAI,gBAAgB,CAMxC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAWlC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;;;OAKG;IACH,IAAW,SAAS,IAAI,eAAe,CAMtC;IACD;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;CACF"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { RoyaltyPolicy } from "../types/resources/royalty.js";
|
2
|
+
import { License } from "../types/resources/license.js";
|
3
|
+
export declare class StoryAPIClient {
|
4
|
+
private readonly httpClient;
|
5
|
+
constructor();
|
6
|
+
getRoyaltyPolicy(ipId: string): Promise<RoyaltyPolicy>;
|
7
|
+
getLicense(licenseId: string): Promise<License>;
|
8
|
+
}
|
9
|
+
//# sourceMappingURL=storyAPI.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"storyAPI.d.ts","sourceRoot":"../../../../src/clients","sources":["storyAPI.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAA4B,sCAAmC;AACrF,OAAO,EAAE,OAAO,EAAsB,sCAAmC;AAEzE,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgB;;IAY9B,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAKtD,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAI7D"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export declare const AddressZero = "0x0000000000000000000000000000000000000000";
|
2
|
+
export declare const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
3
|
+
export declare const SepoliaChainId = "11155111";
|
4
|
+
//# sourceMappingURL=common.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"../../../../src/constants","sources":["common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,+CAA+C,CAAC;AAExE,eAAO,MAAM,QAAQ,uEAAuE,CAAC;AAE7F,eAAO,MAAM,cAAc,aAAa,CAAC"}
|
@@ -1,12 +1,15 @@
|
|
1
1
|
export { StoryClient } from "./client.js";
|
2
|
-
export {
|
3
|
-
export {
|
4
|
-
export {
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export type {
|
8
|
-
export type {
|
9
|
-
export type {
|
10
|
-
export type {
|
11
|
-
export type {
|
2
|
+
export { AddressZero, HashZero } from "./constants/common.js";
|
3
|
+
export { IPAssetClient } from "./resources/ipAsset.js";
|
4
|
+
export { PermissionClient } from "./resources/permission.js";
|
5
|
+
export { LicenseClient } from "./resources/license.js";
|
6
|
+
export { DisputeClient } from "./resources/dispute.js";
|
7
|
+
export type { StoryConfig } from "./types/config.js";
|
8
|
+
export type { Hex, TypedData } from "./types/common.js";
|
9
|
+
export type { RegisterIpResponse, RegisterRequest, RegisterDerivativeResponse, RegisterDerivativeRequest, RegisterDerivativeWithLicenseTokensRequest, RegisterDerivativeWithLicenseTokensResponse, } from "./types/resources/ipAsset.js";
|
10
|
+
export type { MintLicenseTokensResponse, MintLicenseTokensRequest, RegisterCommercialUsePILRequest, RegisterLicenseTermsResponse, RegisterCommercialRemixPILRequest, AttachLicenseTermsRequest, LicenseTermsIdResponse, } from "./types/resources/license.js";
|
11
|
+
export type { CollectRoyaltyTokensRequest, CollectRoyaltyTokensResponse, PayRoyaltyOnBehalfRequest, PayRoyaltyOnBehalfResponse, } from "./types/resources/royalty.js";
|
12
|
+
export type { SetPermissionsRequest, SetPermissionsResponse } from "./types/resources/permission.js";
|
13
|
+
export type { Dispute, RaiseDisputeRequest, RaiseDisputeResponse, SetDisputeJudgementRequest, SetDisputeJudgementResponse, CancelDisputeRequest, CancelDisputeResponse, ResolveDisputeRequest, ResolveDisputeResponse, } from "./types/resources/dispute.js";
|
14
|
+
export type { IPAccountExecuteRequest, IPAccountExecuteResponse, IPAccountExecuteWithSigRequest, IPAccountExecuteWithSigResponse, } from "./types/resources/ipAccount.js";
|
12
15
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAiB;AACvC,OAAO,EAAE,WAAW,EAAE,+BAA4B;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAiB;AACvC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,8BAA2B;AAE3D,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,gBAAgB,EAAE,kCAA+B;AAC1D,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AAEpD,YAAY,EAAE,WAAW,EAAE,0BAAuB;AAClD,YAAY,EAAE,GAAG,EAAE,SAAS,EAAE,0BAAuB;AAErD,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,yBAAyB,EACzB,0CAA0C,EAC1C,2CAA2C,GAC5C,qCAAkC;AAEnC,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,+BAA+B,EAC/B,4BAA4B,EAC5B,iCAAiC,EACjC,yBAAyB,EACzB,sBAAsB,GACvB,qCAAkC;AAEnC,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,GAC3B,qCAAkC;AAEnC,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,wCAAqC;AAElG,YAAY,EACV,OAAO,EACP,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,GACvB,qCAAkC;AAEnC,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,GAChC,uCAAoC"}
|