@story-protocol/core-sdk 0.1.0-rc.7 → 1.0.0-rc.2
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 +94 -55
- package/dist/declarations/src/abi/generated.d.ts +14196 -0
- package/dist/declarations/src/abi/generated.d.ts.map +1 -0
- package/dist/declarations/src/client.d.ts +42 -49
- 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 +49 -0
- package/dist/declarations/src/resources/dispute.d.ts.map +1 -0
- package/dist/declarations/src/resources/ipAccount.d.ts +28 -0
- package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -0
- package/dist/declarations/src/resources/ipAsset.d.ts +44 -20
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/resources/license.d.ts +83 -18
- package/dist/declarations/src/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/resources/permission.d.ts +30 -0
- package/dist/declarations/src/resources/permission.d.ts.map +1 -0
- package/dist/declarations/src/resources/royalty.d.ts +34 -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 +27 -12
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/declarations/src/types/options.d.ts +10 -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 +10649 -1617
- package/dist/story-protocol-core-sdk.cjs.prod.js +10649 -1617
- package/dist/story-protocol-core-sdk.esm.js +10645 -1616
- 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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PublicClient } from "viem";
|
|
2
|
+
import { SetPermissionsRequest, SetPermissionsResponse } from "../types/resources/permission.js";
|
|
3
|
+
import { SimpleWalletClient } from "../abi/generated.js";
|
|
4
|
+
export declare class PermissionClient {
|
|
5
|
+
private readonly wallet;
|
|
6
|
+
private readonly rpcClient;
|
|
7
|
+
private accessControllerClient;
|
|
8
|
+
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
|
|
9
|
+
/**
|
|
10
|
+
* Sets the permission for a specific function call
|
|
11
|
+
* Each policy is represented as a mapping from an IP account address to a signer address to a recipient
|
|
12
|
+
* address to a function selector to a permission level. The permission level can be 0 (ABSTAIN), 1 (ALLOW), or
|
|
13
|
+
* 2 (DENY).
|
|
14
|
+
* By default, all policies are set to 0 (ABSTAIN), which means that the permission is not set.
|
|
15
|
+
* The owner of ipAccount by default has all permission.
|
|
16
|
+
* address(0) => wildcard
|
|
17
|
+
* bytes4(0) => wildcard
|
|
18
|
+
* Specific permission overrides wildcard permission.
|
|
19
|
+
* @param request The request object containing necessary data to set permissions.
|
|
20
|
+
* @param request.ipAsset The address of the IP account that grants the permission for `signer`
|
|
21
|
+
* @param request.signer The address that can call `to` on behalf of the `ipAccount`
|
|
22
|
+
* @param request.to The address that can be called by the `signer` (currently only modules can be `to`)
|
|
23
|
+
* @param request.func Optional. The function selector string of `to` that can be called by the `signer` on behalf of the `ipAccount`. Be default, it allows all functions.
|
|
24
|
+
* @param request.permission The new permission level
|
|
25
|
+
* @returns A Promise that resolves to an object containing the transaction hash
|
|
26
|
+
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
|
27
|
+
*/
|
|
28
|
+
setPermission(request: SetPermissionsRequest): Promise<SetPermissionsResponse>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=permission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"../../../../src/resources","sources":["permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuC,MAAM,MAAM,CAAC;AAGzE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,yCAAsC;AAE9F,OAAO,EAIL,kBAAkB,EACnB,4BAAyB;AAE1B,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAM/D;;;;;;;;;;;;;;;;;;OAkBG;IACU,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAkC5F"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PublicClient } from "viem";
|
|
2
|
+
import { CollectRoyaltyTokensRequest, CollectRoyaltyTokensResponse, PayRoyaltyOnBehalfRequest, PayRoyaltyOnBehalfResponse } from "../types/resources/royalty.js";
|
|
3
|
+
import { IpRoyaltyVaultImplClient, RoyaltyModuleClient, RoyaltyPolicyLapClient, SimpleWalletClient } from "../abi/generated.js";
|
|
4
|
+
export declare class RoyaltyClient {
|
|
5
|
+
private readonly wallet;
|
|
6
|
+
private readonly rpcClient;
|
|
7
|
+
royaltyVaultImplClient: IpRoyaltyVaultImplClient;
|
|
8
|
+
royaltyPolicyLAPClient: RoyaltyPolicyLapClient;
|
|
9
|
+
royaltyModuleClient: RoyaltyModuleClient;
|
|
10
|
+
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
|
|
11
|
+
/**
|
|
12
|
+
* Allows ancestors to claim the royalty tokens and any accrued revenue tokens
|
|
13
|
+
* @param request - the licensing parameters for the Programmable IP License v1 (PIL) standard.
|
|
14
|
+
* @param request.ancestorIpId The ip id of the ancestor to whom the royalty tokens belong to.
|
|
15
|
+
* @param request.txOptions [Optional] The transaction options.
|
|
16
|
+
* @returns Tx hash for the transaction.
|
|
17
|
+
* @emits RoyaltyTokensCollected (ancestorIpId, ancestorsRoyalty)
|
|
18
|
+
*/
|
|
19
|
+
collectRoyaltyTokens(request: CollectRoyaltyTokensRequest): Promise<CollectRoyaltyTokensResponse>;
|
|
20
|
+
private getProxyAddress;
|
|
21
|
+
/**
|
|
22
|
+
* Allows the function caller to pay royalties to the receiver IP asset on behalf of the payer IP asset.
|
|
23
|
+
* @param request - The request object that contains all data needed to pay royalty on behalf.
|
|
24
|
+
* @param request.receiverIpId The ipId that receives the royalties.
|
|
25
|
+
* @param request.payerIpId The ID of the IP asset that pays the royalties.
|
|
26
|
+
* @param request.token The token to use to pay the royalties.
|
|
27
|
+
* @param request.amount The amount to pay.
|
|
28
|
+
* @param request.txOptions [Optional] The transaction options.
|
|
29
|
+
* @returns A Promise that resolves to an object containing the transaction hash.
|
|
30
|
+
* @emits RoyaltyPaid (receiverIpId, payerIpId, msg.sender, token, amount)
|
|
31
|
+
*/
|
|
32
|
+
payRoyaltyOnBehalf(request: PayRoyaltyOnBehalfRequest): Promise<PayRoyaltyOnBehalfResponse>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=royalty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"royalty.d.ts","sourceRoot":"../../../../src/resources","sources":["royalty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,YAAY,EAAE,MAAM,MAAM,CAAC;AAGzC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC3B,sCAAmC;AACpC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EACnB,4BAAyB;AAE1B,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IAClC,sBAAsB,EAAE,wBAAwB,CAAC;IACjD,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,mBAAmB,EAAE,mBAAmB,CAAC;gBAEpC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAQ/D;;;;;;;OAOG;IACU,oBAAoB,CAC/B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,4BAA4B,CAAC;YAe1B,eAAe;IAS7B;;;;;;;;;;OAUG;IACU,kBAAkB,CAC7B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;CAgBvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"../../../../src/types","sources":["common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,EAAE,CAAC;AAEhC,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB,CAAC"}
|
|
@@ -1,18 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { Account, Transport, Address } from "viem";
|
|
2
|
+
import { SimpleWalletClient } from "../abi/generated.js";
|
|
3
|
+
/**
|
|
4
|
+
* Supported chains. For convenience, both name or chain ID are supported.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type SupportedChainIds = "11155111" | "sepolia" | "1513" | "storyTestnet";
|
|
4
9
|
/**
|
|
5
10
|
* Configuration for the SDK Client.
|
|
6
11
|
*
|
|
7
12
|
* @public
|
|
8
13
|
*/
|
|
9
|
-
export
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly
|
|
17
|
-
|
|
14
|
+
export type UseAccountStoryConfig = {
|
|
15
|
+
readonly account: Account | Address;
|
|
16
|
+
readonly chainId?: SupportedChainIds;
|
|
17
|
+
readonly transport: Transport;
|
|
18
|
+
};
|
|
19
|
+
export type UseWalletStoryConfig = {
|
|
20
|
+
readonly chainId?: SupportedChainIds;
|
|
21
|
+
readonly transport: Transport;
|
|
22
|
+
readonly wallet: SimpleWalletClient;
|
|
23
|
+
};
|
|
24
|
+
export type StoryConfig = {
|
|
25
|
+
readonly chainId?: SupportedChainIds;
|
|
26
|
+
readonly transport: Transport;
|
|
27
|
+
readonly wallet?: SimpleWalletClient;
|
|
28
|
+
readonly account?: Account | Address;
|
|
29
|
+
};
|
|
30
|
+
export type ContractAddress = {
|
|
31
|
+
[key in SupportedChainIds]: Record<string, string>;
|
|
32
|
+
};
|
|
18
33
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"../../../../src/types","sources":["config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"../../../../src/types","sources":["config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,4BAAyB;AAEtD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,cAAc,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"../../../../src/types","sources":["options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { TxOptions } from "../options.js";
|
|
2
|
+
export type Dispute = {
|
|
3
|
+
targetIpId: `0x${string}`;
|
|
4
|
+
disputeInitiator: `0x${string}`;
|
|
5
|
+
arbitrationPolicy: `0x${string}`;
|
|
6
|
+
linkToDisputeEvidence: string;
|
|
7
|
+
targetTag: string;
|
|
8
|
+
currentTag: string;
|
|
9
|
+
};
|
|
10
|
+
export type RaiseDisputeRequest = {
|
|
11
|
+
targetIpId: `0x${string}`;
|
|
12
|
+
arbitrationPolicy: `0x${string}`;
|
|
13
|
+
linkToDisputeEvidence: string;
|
|
14
|
+
targetTag: string;
|
|
15
|
+
calldata?: `0x${string}`;
|
|
16
|
+
txOptions?: TxOptions;
|
|
17
|
+
};
|
|
18
|
+
export type RaiseDisputeResponse = {
|
|
19
|
+
txHash: string;
|
|
20
|
+
disputeId?: `0x${string}`;
|
|
21
|
+
arbitrationPolicy?: `0x${string}`;
|
|
22
|
+
};
|
|
23
|
+
export type SetDisputeJudgementRequest = {
|
|
24
|
+
disputeId: number;
|
|
25
|
+
decision: boolean;
|
|
26
|
+
calldata?: `0x${string}`;
|
|
27
|
+
txOptions?: TxOptions;
|
|
28
|
+
};
|
|
29
|
+
export type SetDisputeJudgementResponse = {
|
|
30
|
+
txHash: string;
|
|
31
|
+
disputeId?: bigint;
|
|
32
|
+
decision?: boolean;
|
|
33
|
+
data?: `0x${string}`;
|
|
34
|
+
};
|
|
35
|
+
export type CancelDisputeRequest = {
|
|
36
|
+
disputeId: number | string | bigint;
|
|
37
|
+
calldata?: `0x${string}`;
|
|
38
|
+
txOptions?: TxOptions;
|
|
39
|
+
};
|
|
40
|
+
export type CancelDisputeResponse = {
|
|
41
|
+
txHash: string;
|
|
42
|
+
};
|
|
43
|
+
export type ResolveDisputeRequest = {
|
|
44
|
+
disputeId: number | string | bigint;
|
|
45
|
+
txOptions?: TxOptions;
|
|
46
|
+
};
|
|
47
|
+
export type ResolveDisputeResponse = {
|
|
48
|
+
txHash: string;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=dispute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispute.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["dispute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,OAAO,GAAG;IACpB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,iBAAiB,EAAE,KAAK,MAAM,EAAE,CAAC;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;IAC1B,iBAAiB,EAAE,KAAK,MAAM,EAAE,CAAC;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IAC1B,iBAAiB,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TxOptions } from "../options.js";
|
|
2
|
+
export type IPAccountExecuteRequest = {
|
|
3
|
+
accountAddress: `0x${string}`;
|
|
4
|
+
to: `0x${string}`;
|
|
5
|
+
value: number;
|
|
6
|
+
data: `0x${string}`;
|
|
7
|
+
txOptions?: TxOptions;
|
|
8
|
+
};
|
|
9
|
+
export type IPAccountExecuteResponse = {
|
|
10
|
+
txHash: string;
|
|
11
|
+
};
|
|
12
|
+
export type IPAccountExecuteWithSigRequest = {
|
|
13
|
+
accountAddress: `0x${string}`;
|
|
14
|
+
to: `0x${string}`;
|
|
15
|
+
value: number;
|
|
16
|
+
data: `0x${string}`;
|
|
17
|
+
signer: `0x${string}`;
|
|
18
|
+
deadline: number;
|
|
19
|
+
signature: `0x${string}`;
|
|
20
|
+
txOptions?: TxOptions;
|
|
21
|
+
};
|
|
22
|
+
export type IPAccountExecuteWithSigResponse = {
|
|
23
|
+
txHash: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=ipAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ipAccount.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,uBAAuB,GAAG;IACpC,cAAc,EAAE,KAAK,MAAM,EAAE,CAAC;IAC9B,EAAE,EAAE,KAAK,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,cAAc,EAAE,KAAK,MAAM,EAAE,CAAC;IAC9B,EAAE,EAAE,KAAK,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,KAAK,MAAM,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,71 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
export type IPAsset = {
|
|
8
|
-
ipAssetId: string;
|
|
9
|
-
franchiseId: string;
|
|
10
|
-
ipAssetName: string;
|
|
11
|
-
ipAssetType: IPAssetType;
|
|
12
|
-
ownerAddress: string;
|
|
13
|
-
tokenUri: string;
|
|
14
|
-
txHash: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Request type for ipAsset.get method.
|
|
18
|
-
*
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export type GetIpAssetRequest = {
|
|
22
|
-
ipAssetId: string;
|
|
23
|
-
franchiseId: string;
|
|
1
|
+
import { Hex } from "viem";
|
|
2
|
+
import { TxOptions } from "../options.js";
|
|
3
|
+
export type RegisterIpResponse = {
|
|
4
|
+
txHash?: string;
|
|
5
|
+
ipId?: Hex;
|
|
24
6
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
export type GetIpAssetResponse = {
|
|
31
|
-
data: IPAsset;
|
|
7
|
+
export type RegisterRequest = {
|
|
8
|
+
tokenContract: Hex;
|
|
9
|
+
tokenId: string;
|
|
10
|
+
txOptions?: TxOptions;
|
|
32
11
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*/
|
|
38
|
-
export type CreateIpAssetRequest = {
|
|
39
|
-
franchiseId: string;
|
|
40
|
-
ipAssetType: IPAssetType;
|
|
41
|
-
ipAssetName: string;
|
|
42
|
-
description: string;
|
|
43
|
-
mediaUrl: string;
|
|
44
|
-
to: string;
|
|
45
|
-
parentIpAssetId: string;
|
|
12
|
+
export type RegisterDerivativeWithLicenseTokensRequest = {
|
|
13
|
+
childIpId: Hex;
|
|
14
|
+
licenseTokenIds: string[];
|
|
15
|
+
txOptions?: TxOptions;
|
|
46
16
|
};
|
|
47
|
-
|
|
48
|
-
* Response type for ipAsset.create method.
|
|
49
|
-
*
|
|
50
|
-
* @public
|
|
51
|
-
*/
|
|
52
|
-
export type CreateIpAssetResponse = {
|
|
17
|
+
export type RegisterDerivativeWithLicenseTokensResponse = {
|
|
53
18
|
txHash: string;
|
|
54
19
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
franchiseId: string;
|
|
20
|
+
export type RegisterDerivativeRequest = {
|
|
21
|
+
childIpId: Hex;
|
|
22
|
+
parentIpIds: Hex[];
|
|
23
|
+
licenseTermsIds: string[];
|
|
24
|
+
licenseTemplate?: Hex;
|
|
25
|
+
txOptions?: TxOptions;
|
|
62
26
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
* @public
|
|
67
|
-
*/
|
|
68
|
-
export type ListIpAssetResponse = {
|
|
69
|
-
data: IPAsset[];
|
|
27
|
+
export type RegisterDerivativeResponse = {
|
|
28
|
+
txHash?: string;
|
|
29
|
+
childIpId?: Hex;
|
|
70
30
|
};
|
|
71
31
|
//# sourceMappingURL=ipAsset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,GAAG,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG;IACvD,SAAS,EAAE,GAAG,CAAC;IACf,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,2CAA2C,GAAG;IACxD,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,GAAG,CAAC;IACf,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC"}
|
|
@@ -1,78 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
1
|
+
import { Hex } from "viem";
|
|
2
|
+
import { TxOptions } from "../options.js";
|
|
3
|
+
export type LicenseApiResponse = {
|
|
4
|
+
data: License;
|
|
5
|
+
};
|
|
7
6
|
export type License = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
ownerAddress: string;
|
|
12
|
-
uri: string;
|
|
13
|
-
txHash: string;
|
|
7
|
+
id: string;
|
|
8
|
+
policyId: string;
|
|
9
|
+
licensorIpId: Hex;
|
|
14
10
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
export type GetLicenseRequest = {
|
|
21
|
-
licenseId: string;
|
|
11
|
+
export type RegisterLicenseTermsRequest = {
|
|
12
|
+
txOptions?: TxOptions;
|
|
22
13
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
export type LicenseTerms = {
|
|
15
|
+
mintingFee: bigint;
|
|
16
|
+
expiration: bigint;
|
|
17
|
+
commercialRevCelling: bigint;
|
|
18
|
+
derivativeRevCelling: bigint;
|
|
19
|
+
commercializerCheckerData: Hex;
|
|
20
|
+
transferable: boolean;
|
|
21
|
+
royaltyPolicy: Hex;
|
|
22
|
+
commercialUse: boolean;
|
|
23
|
+
commercialAttribution: boolean;
|
|
24
|
+
commercializerChecker: Hex;
|
|
25
|
+
commercialRevShare: number;
|
|
26
|
+
derivativesAllowed: boolean;
|
|
27
|
+
derivativesAttribution: boolean;
|
|
28
|
+
derivativesApproval: boolean;
|
|
29
|
+
derivativesReciprocal: boolean;
|
|
30
|
+
currency: Hex;
|
|
31
|
+
};
|
|
32
|
+
export type LicenseTermsIdResponse = number;
|
|
33
|
+
export type RegisterLicenseTermsResponse = {
|
|
34
|
+
licenseTermsId?: string;
|
|
35
|
+
txHash?: string;
|
|
30
36
|
};
|
|
31
|
-
export type
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
export type RegisterCommercialUsePILRequest = {
|
|
38
|
+
mintingFee: string;
|
|
39
|
+
currency: Hex;
|
|
40
|
+
txOptions?: TxOptions;
|
|
34
41
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export type ListLicenseResponse = {
|
|
41
|
-
data: License[];
|
|
42
|
+
export type RegisterCommercialRemixPILRequest = {
|
|
43
|
+
mintingFee: string;
|
|
44
|
+
commercialRevShare: number;
|
|
45
|
+
currency: Hex;
|
|
46
|
+
txOptions?: TxOptions;
|
|
42
47
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export type CreateLicenseRequestOptions = {
|
|
49
|
-
parentLicenseId?: string;
|
|
50
|
-
ownerAddress?: string;
|
|
51
|
-
revoker?: string;
|
|
52
|
-
isCommercial?: boolean;
|
|
53
|
-
isSublicensable?: boolean;
|
|
54
|
-
terms?: {
|
|
55
|
-
processor: string;
|
|
56
|
-
data: BytesLike | string;
|
|
57
|
-
};
|
|
48
|
+
export type AttachLicenseTermsRequest = {
|
|
49
|
+
ipId: Hex;
|
|
50
|
+
licenseTermsId: string;
|
|
51
|
+
licenseTemplate?: Hex;
|
|
52
|
+
txOptions?: TxOptions;
|
|
58
53
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
ipAssetId: string;
|
|
67
|
-
licenseURI: string;
|
|
68
|
-
options?: CreateLicenseRequestOptions;
|
|
54
|
+
export type MintLicenseTokensRequest = {
|
|
55
|
+
licensorIpId: Hex;
|
|
56
|
+
licenseTermsId: string;
|
|
57
|
+
licenseTemplate?: Hex;
|
|
58
|
+
amount?: number;
|
|
59
|
+
receiver?: Hex;
|
|
60
|
+
txOptions?: TxOptions;
|
|
69
61
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
* @public
|
|
74
|
-
*/
|
|
75
|
-
export type CreateLicenseResponse = {
|
|
76
|
-
txHash: string;
|
|
62
|
+
export type MintLicenseTokensResponse = {
|
|
63
|
+
licenseTokenId?: string;
|
|
64
|
+
txHash?: string;
|
|
77
65
|
};
|
|
78
66
|
//# sourceMappingURL=license.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"license.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,GAAG,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,GAAG,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,GAAG,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,GAAG,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;IAChC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,GAAG,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,GAAG,CAAC;IACV,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TxOptions } from "../options.js";
|
|
2
|
+
export type SetPermissionsRequest = {
|
|
3
|
+
ipId: `0x${string}`;
|
|
4
|
+
signer: `0x${string}`;
|
|
5
|
+
to: `0x${string}`;
|
|
6
|
+
func?: string;
|
|
7
|
+
permission: number;
|
|
8
|
+
txOptions?: TxOptions;
|
|
9
|
+
};
|
|
10
|
+
export type SetPermissionsResponse = {
|
|
11
|
+
txHash: string;
|
|
12
|
+
success?: boolean;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=permission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,EAAE,EAAE,KAAK,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Hex } from "viem";
|
|
2
|
+
import { TxOptions } from "../options.js";
|
|
3
|
+
export type RoyaltyPolicyApiResponse = {
|
|
4
|
+
data: RoyaltyPolicy;
|
|
5
|
+
};
|
|
6
|
+
export type RoyaltyPolicy = {
|
|
7
|
+
id: `0x${string}`;
|
|
8
|
+
targetAncestors: string[];
|
|
9
|
+
targetRoyaltyAmount: string[];
|
|
10
|
+
};
|
|
11
|
+
export type RoyaltyContext = {
|
|
12
|
+
targetAncestors: string[];
|
|
13
|
+
targetRoyaltyAmount: number[];
|
|
14
|
+
parentAncestors1: string[];
|
|
15
|
+
parentAncestors2: string[];
|
|
16
|
+
parentAncestorsRoyalties1: number[];
|
|
17
|
+
parentAncestorsRoyalties2: number[];
|
|
18
|
+
};
|
|
19
|
+
export type CollectRoyaltyTokensRequest = {
|
|
20
|
+
ancestorIpId: Hex;
|
|
21
|
+
derivativeId: Hex;
|
|
22
|
+
txOptions?: TxOptions;
|
|
23
|
+
};
|
|
24
|
+
export type CollectRoyaltyTokensResponse = {
|
|
25
|
+
txHash: string;
|
|
26
|
+
};
|
|
27
|
+
export type RoyaltyData = [
|
|
28
|
+
isUnlinkableToParents: boolean,
|
|
29
|
+
ipRoyaltyVault: Hex,
|
|
30
|
+
royaltyStack: bigint,
|
|
31
|
+
ancestorsAddresses: Hex,
|
|
32
|
+
ancestorsRoyalties: bigint[]
|
|
33
|
+
];
|
|
34
|
+
export type ClaimableRevenueRequest = {
|
|
35
|
+
account: Hex;
|
|
36
|
+
snapshotId: bigint;
|
|
37
|
+
token: Hex;
|
|
38
|
+
txOptions?: TxOptions;
|
|
39
|
+
};
|
|
40
|
+
export type ClaimableRevenueResponse = {
|
|
41
|
+
claimableRevenueAmount: bigint;
|
|
42
|
+
txHash: string;
|
|
43
|
+
};
|
|
44
|
+
export type PayRoyaltyOnBehalfRequest = {
|
|
45
|
+
receiverIpId: Hex;
|
|
46
|
+
payerIpId: Hex;
|
|
47
|
+
token: Hex;
|
|
48
|
+
amount: bigint;
|
|
49
|
+
txOptions?: TxOptions;
|
|
50
|
+
};
|
|
51
|
+
export type PayRoyaltyOnBehalfResponse = {
|
|
52
|
+
txHash: string;
|
|
53
|
+
};
|
|
54
|
+
export type ApproveResponse = {
|
|
55
|
+
txHash: string;
|
|
56
|
+
success: boolean;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=royalty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"royalty.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["royalty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,KAAK,MAAM,EAAE,CAAC;IAClB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yBAAyB,EAAE,MAAM,EAAE,CAAC;IACpC,yBAAyB,EAAE,MAAM,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,qBAAqB,EAAE,OAAO;IAC9B,cAAc,EAAE,GAAG;IACnB,YAAY,EAAE,MAAM;IACpB,kBAAkB,EAAE,GAAG;IACvB,kBAAkB,EAAE,MAAM,EAAE;CAC7B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./declarations/src/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcnktcHJvdG9jb2wtY29yZS1zZGsuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|