@story-protocol/core-sdk 0.0.1-beta-test.1 → 0.0.1-beta-rc.3
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/README.md +0 -15
- package/dist/declarations/src/client.d.ts +22 -38
- package/dist/declarations/src/client.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts +11 -12
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/dispute.d.ts +835 -0
- package/dist/declarations/src/resources/dispute.d.ts.map +1 -0
- package/dist/declarations/src/resources/ipAsset.d.ts +145 -12
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/resources/license.d.ts +1014 -0
- package/dist/declarations/src/resources/license.d.ts.map +1 -0
- package/dist/declarations/src/resources/permission.d.ts +1478 -8
- package/dist/declarations/src/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/resources/policy.d.ts +1063 -0
- package/dist/declarations/src/resources/policy.d.ts.map +1 -0
- package/dist/declarations/src/resources/tagging.d.ts +711 -4
- package/dist/declarations/src/resources/tagging.d.ts.map +1 -1
- package/dist/declarations/src/types/config.d.ts +8 -9
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/declarations/src/types/options.d.ts +0 -6
- package/dist/declarations/src/types/options.d.ts.map +1 -1
- 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/ipAsset.d.ts +11 -126
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/license.d.ts +23 -0
- package/dist/declarations/src/types/resources/license.d.ts.map +1 -0
- package/dist/declarations/src/types/resources/permission.d.ts +5 -26
- package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/policy.d.ts +35 -0
- package/dist/declarations/src/types/resources/policy.d.ts.map +1 -0
- package/dist/declarations/src/types/resources/tagging.d.ts +1 -13
- package/dist/declarations/src/types/resources/tagging.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +2492 -1617
- package/dist/story-protocol-core-sdk.cjs.prod.js +2492 -1617
- package/dist/story-protocol-core-sdk.esm.js +2490 -1612
- package/package.json +5 -5
- package/dist/declarations/src/enums/ActionType.d.ts +0 -11
- package/dist/declarations/src/enums/ActionType.d.ts.map +0 -1
- package/dist/declarations/src/enums/ResourceType.d.ts +0 -15
- package/dist/declarations/src/enums/ResourceType.d.ts.map +0 -1
- package/dist/declarations/src/resources/ipAssetReadOnly.d.ts +0 -26
- package/dist/declarations/src/resources/ipAssetReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/moduleReadOnly.d.ts +0 -25
- package/dist/declarations/src/resources/moduleReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/permissionReadOnly.d.ts +0 -25
- package/dist/declarations/src/resources/permissionReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/taggingReadOnly.d.ts +0 -24
- package/dist/declarations/src/resources/taggingReadOnly.d.ts.map +0 -1
- package/dist/declarations/src/resources/transaction.d.ts +0 -11
- 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 -23
- package/dist/declarations/src/types/client.d.ts.map +0 -1
- package/dist/declarations/src/types/resources/module.d.ts +0 -43
- package/dist/declarations/src/types/resources/module.d.ts.map +0 -1
- package/dist/declarations/src/types/resources/transaction.d.ts +0 -52
- package/dist/declarations/src/types/resources/transaction.d.ts.map +0 -1
package/README.md
CHANGED
@@ -68,18 +68,3 @@ const signer = new ethers.Wallet(<YOUR PRIVATE KEY>, provider)
|
|
68
68
|
const client = StoryClient.newClient({ signer })
|
69
69
|
|
70
70
|
```
|
71
|
-
|
72
|
-
## Use SDK client
|
73
|
-
|
74
|
-
```typescript
|
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
|
-
});
|
82
|
-
|
83
|
-
// List franchises
|
84
|
-
const { data: franchise } = await client.franchise.list();
|
85
|
-
```
|
@@ -1,63 +1,54 @@
|
|
1
|
-
import { StoryConfig
|
2
|
-
import { TransactionClient } from "./resources/transaction.js";
|
3
|
-
import { TransactionReadOnlyClient } from "./resources/transactionReadOnly.js";
|
4
|
-
import { Client, ReadOnlyClient } from "./types/client.js";
|
5
|
-
import { PlatformClient } from "./utils/platform.js";
|
6
|
-
import { ModuleReadOnlyClient } from "./resources/moduleReadOnly.js";
|
1
|
+
import { StoryConfig } from "./types/config.js";
|
7
2
|
import { TaggingClient } from "./resources/tagging.js";
|
8
|
-
import { TaggingReadOnlyClient } from "./resources/taggingReadOnly.js";
|
9
3
|
import { IPAssetClient } from "./resources/ipAsset.js";
|
10
|
-
import { IPAssetReadOnlyClient } from "./resources/ipAssetReadOnly.js";
|
11
4
|
import { PermissionClient } from "./resources/permission.js";
|
12
|
-
import {
|
5
|
+
import { LicenseClient } from "./resources/license.js";
|
6
|
+
import { PolicyClient } from "./resources/policy.js";
|
7
|
+
import { DisputeClient } from "./resources/dispute.js";
|
8
|
+
import { PlatformClient } from "./utils/platform.js";
|
13
9
|
/**
|
14
10
|
* The StoryClient is the main entry point for the SDK.
|
15
11
|
*/
|
16
12
|
export declare class StoryClient {
|
17
13
|
private readonly config;
|
18
|
-
private readonly httpClient;
|
19
|
-
private readonly isReadOnly;
|
20
14
|
private readonly rpcClient;
|
21
|
-
private readonly wallet
|
15
|
+
private readonly wallet;
|
16
|
+
private readonly httpClient;
|
22
17
|
private _ipAccount;
|
23
18
|
private _permission;
|
24
|
-
private
|
19
|
+
private _license;
|
20
|
+
private _policy;
|
25
21
|
private _platform;
|
26
|
-
private _module;
|
27
22
|
private _tagging;
|
23
|
+
private _dispute;
|
28
24
|
/**
|
29
25
|
* @param config - the configuration for the SDK client
|
30
|
-
* @param isReadOnly
|
31
26
|
*/
|
32
27
|
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
28
|
/**
|
40
29
|
* Factory method for creating a SDK client with a signer.
|
41
30
|
*
|
42
|
-
* @param config - the configuration for a new
|
31
|
+
* @param config - the configuration for a new SDK client
|
43
32
|
*/
|
44
|
-
static newClient(config: StoryConfig):
|
45
|
-
get ipAsset(): IPAssetClient
|
46
|
-
get permission(): PermissionClient
|
33
|
+
static newClient(config: StoryConfig): StoryClient;
|
34
|
+
get ipAsset(): IPAssetClient;
|
35
|
+
get permission(): PermissionClient;
|
36
|
+
get license(): LicenseClient;
|
37
|
+
get policy(): PolicyClient;
|
47
38
|
/**
|
48
|
-
* Getter for the
|
39
|
+
* Getter for the tagging client. The client is lazily created when
|
49
40
|
* this method is called.
|
50
41
|
*
|
51
|
-
* @returns the
|
42
|
+
* @returns the TaggingClient instance
|
52
43
|
*/
|
53
|
-
get
|
44
|
+
get tagging(): TaggingClient;
|
54
45
|
/**
|
55
|
-
* Getter for the
|
46
|
+
* Getter for the dispute client. The client is lazily created when
|
56
47
|
* this method is called.
|
57
48
|
*
|
58
|
-
* @returns the
|
49
|
+
* @returns the DisputeClient instance
|
59
50
|
*/
|
60
|
-
get
|
51
|
+
get dispute(): DisputeClient;
|
61
52
|
/**
|
62
53
|
* Getter for the platform client. The client is lazily created when
|
63
54
|
* this method is called.
|
@@ -65,12 +56,5 @@ export declare class StoryClient {
|
|
65
56
|
* @returns the PlatformClient instance
|
66
57
|
*/
|
67
58
|
get platform(): PlatformClient;
|
68
|
-
/**
|
69
|
-
* Getter for the module client. The client is lazily created when
|
70
|
-
* this method is called.
|
71
|
-
*
|
72
|
-
* @returns the Module instance
|
73
|
-
*/
|
74
|
-
get module(): ModuleReadOnlyClient;
|
75
59
|
}
|
76
60
|
//# 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":"AAIA,OAAO,EAAE,WAAW,EAAE,0BAAuB;AAC7C,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,gBAAgB,EAAE,kCAA+B;AAC1D,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,YAAY,EAAE,8BAA2B;AAClD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AAEpD,OAAO,EAAE,cAAc,EAAE,4BAAyB;AAKlD;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgB;IAE3C,OAAO,CAAC,UAAU,CAA8B;IAChD,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,QAAQ,CAA8B;IAE9C;;OAEG;IACH,OAAO;IAkCP;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAIlD,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED,IAAW,UAAU,IAAI,gBAAgB,CAMxC;IAED,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED,IAAW,MAAM,IAAI,YAAY,CAMhC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;;;OAKG;IACH,IAAW,QAAQ,IAAI,cAAc,CAMpC;CACF"}
|
@@ -1,19 +1,18 @@
|
|
1
1
|
export { StoryClient } from "./client.js";
|
2
|
-
export { ResourceType } from "./enums/ResourceType.js";
|
3
|
-
export { ActionType } from "./enums/ActionType.js";
|
4
|
-
export { TransactionClient } from "./resources/transaction.js";
|
5
2
|
export { PlatformClient } from "./utils/platform.js";
|
6
3
|
export { AddressZero, HashZero } from "./constants/common.js";
|
7
|
-
export { TaggingReadOnlyClient } from "./resources/taggingReadOnly.js";
|
8
|
-
export { ModuleReadOnlyClient } from "./resources/moduleReadOnly.js";
|
9
4
|
export { IPAssetClient } from "./resources/ipAsset.js";
|
10
|
-
export { IPAssetReadOnlyClient } from "./resources/ipAssetReadOnly.js";
|
11
5
|
export { PermissionClient } from "./resources/permission.js";
|
12
|
-
export {
|
13
|
-
export
|
14
|
-
export
|
6
|
+
export { LicenseClient } from "./resources/license.js";
|
7
|
+
export { PolicyClient } from "./resources/policy.js";
|
8
|
+
export { TaggingClient } from "./resources/tagging.js";
|
9
|
+
export { DisputeClient } from "./resources/dispute.js";
|
10
|
+
export type { StoryConfig } from "./types/config.js";
|
15
11
|
export type { Hex, TypedData } from "./types/common.js";
|
16
|
-
export type {
|
17
|
-
export type {
|
18
|
-
export type {
|
12
|
+
export type { RegisterRootIpRequest, RegisterRootIpResponse, RegisterDerivativeIpRequest, RegisterDerivativeIpResponse, } from "./types/resources/ipAsset.js";
|
13
|
+
export type { MintLicenseRequest, MintLicenseResponse, LinkIpToParentRequest, LinkIpToParentResponse, } from "./types/resources/license.js";
|
14
|
+
export type { RegisterPILPolicyRequest, RegisterPILPolicyResponse, AddPolicyToIpRequest, AddPolicyToIpResponse, } from "./types/resources/policy.js";
|
15
|
+
export type { setPermissionsRequest, setPermissionsResponse } from "./types/resources/permission.js";
|
16
|
+
export type { SetTagRequest, SetTagResponse, RemoveTagRequest, RemoveTagResponse, } from "./types/resources/tagging.js";
|
17
|
+
export type { Dispute, RaiseDisputeRequest, RaiseDisputeResponse, SetDisputeJudgementRequest, SetDisputeJudgementResponse, CancelDisputeRequest, CancelDisputeResponse, ResolveDisputeRequest, ResolveDisputeResponse, } from "./types/resources/dispute.js";
|
19
18
|
//# 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,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAiB;AACvC,OAAO,EAAE,cAAc,EAAE,4BAAyB;AAClD,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,YAAY,EAAE,8BAA2B;AAClD,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,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,GAC7B,qCAAkC;AAEnC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GACvB,qCAAkC;AAEnC,YAAY,EACV,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,GACtB,oCAAiC;AAElC,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,wCAAqC;AAElG,YAAY,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,iBAAiB,GAClB,qCAAkC;AAEnC,YAAY,EACV,OAAO,EACP,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,GACvB,qCAAkC"}
|