@mycelium-ip/core-sdk 0.1.0-alpha.1 → 0.1.0-alpha.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.
@@ -565,6 +565,12 @@
565
565
  "discriminator": [253, 7, 14, 233, 255, 71, 109, 47]
566
566
  }
567
567
  ],
568
+ "events": [
569
+ {
570
+ "name": "IPRegistered",
571
+ "discriminator": [83, 229, 161, 150, 13, 135, 162, 211]
572
+ }
573
+ ],
568
574
  "errors": [
569
575
  {
570
576
  "code": 6000,
@@ -717,6 +723,30 @@
717
723
  ]
718
724
  }
719
725
  },
726
+ {
727
+ "name": "IPRegistered",
728
+ "type": {
729
+ "kind": "struct",
730
+ "fields": [
731
+ {
732
+ "name": "entity",
733
+ "type": "pubkey"
734
+ },
735
+ {
736
+ "name": "ip_asset",
737
+ "type": "pubkey"
738
+ },
739
+ {
740
+ "name": "ip_index",
741
+ "type": "u64"
742
+ },
743
+ {
744
+ "name": "creator",
745
+ "type": "pubkey"
746
+ }
747
+ ]
748
+ }
749
+ },
720
750
  {
721
751
  "name": "IPRegistry",
722
752
  "type": {
@@ -536,6 +536,10 @@
536
536
  {
537
537
  "name": "authority",
538
538
  "type": "pubkey"
539
+ },
540
+ {
541
+ "name": "metadata",
542
+ "type": "pubkey"
539
543
  }
540
544
  ]
541
545
  }
@@ -597,6 +601,10 @@
597
601
  {
598
602
  "name": "authority",
599
603
  "type": "pubkey"
604
+ },
605
+ {
606
+ "name": "metadata",
607
+ "type": "pubkey"
600
608
  }
601
609
  ]
602
610
  }
@@ -75,7 +75,7 @@ export declare class IpcoreNamespace {
75
75
  program: Program<Ipcore>;
76
76
  metadataProgram: Program<import("../../types").Metadata>;
77
77
  payer: PublicKey;
78
- entityIndex: number;
78
+ entityPda: PublicKey;
79
79
  registrationFee: number;
80
80
  metadataUri: string;
81
81
  controllers: PublicKey[];
@@ -6,7 +6,7 @@ export declare function createRegisterIpAssetTransaction(params: {
6
6
  program: Program<Ipcore>;
7
7
  metadataProgram: Program<Metadata>;
8
8
  payer: PublicKey;
9
- entityIndex: number;
9
+ entityPda: PublicKey;
10
10
  registrationFee: number;
11
11
  metadataUri: string;
12
12
  controllers: PublicKey[];
@@ -1,12 +1,10 @@
1
1
  import { LAMPORTS_PER_SOL, Transaction } from "@solana/web3.js";
2
2
  import { buildCreateIpMetadataIx, buildRegisterRootIpInstruction, } from "../../instructions";
3
- import { deriveEntityPda, deriveIPAssetPda, deriveIpCounterPda, deriveRegistryConfigPda, deriveRegistryConfigTreasuryPda, deriveSchemaPda, } from "../../pda";
3
+ import { deriveIPAssetPda, deriveIpCounterPda, deriveRegistryConfigPda, deriveRegistryConfigTreasuryPda, deriveSchemaPda, } from "../../pda";
4
4
  import * as anchor from "@coral-xyz/anchor";
5
5
  export async function createRegisterIpAssetTransaction(params) {
6
- const { program, metadataProgram, payer, metadataUri, registrationFee, controllers, entityIndex, } = params;
6
+ const { program, metadataProgram, payer, metadataUri, registrationFee, controllers, entityPda, } = params;
7
7
  let currentIpCounterIndex = new anchor.BN(0);
8
- const entityIndexBN = new anchor.BN(entityIndex);
9
- const [entityPda] = deriveEntityPda(payer, entityIndexBN);
10
8
  const [ipCounterPda] = deriveIpCounterPda();
11
9
  const [registryConfigPda] = deriveRegistryConfigPda();
12
10
  const [registryConfigTreasuryPda] = deriveRegistryConfigTreasuryPda();
@@ -657,6 +657,12 @@ export type Ipcore = {
657
657
  discriminator: [253, 7, 14, 233, 255, 71, 109, 47];
658
658
  }
659
659
  ];
660
+ events: [
661
+ {
662
+ name: "ipRegistered";
663
+ discriminator: [83, 229, 161, 150, 13, 135, 162, 211];
664
+ }
665
+ ];
660
666
  errors: [
661
667
  {
662
668
  code: 6000;
@@ -809,6 +815,30 @@ export type Ipcore = {
809
815
  ];
810
816
  };
811
817
  },
818
+ {
819
+ name: "ipRegistered";
820
+ type: {
821
+ kind: "struct";
822
+ fields: [
823
+ {
824
+ name: "entity";
825
+ type: "pubkey";
826
+ },
827
+ {
828
+ name: "ipAsset";
829
+ type: "pubkey";
830
+ },
831
+ {
832
+ name: "ipIndex";
833
+ type: "u64";
834
+ },
835
+ {
836
+ name: "creator";
837
+ type: "pubkey";
838
+ }
839
+ ];
840
+ };
841
+ },
812
842
  {
813
843
  name: "ipRegistry";
814
844
  type: {
@@ -568,6 +568,10 @@ export type Metadata = {
568
568
  {
569
569
  name: "authority";
570
570
  type: "pubkey";
571
+ },
572
+ {
573
+ name: "metadata";
574
+ type: "pubkey";
571
575
  }
572
576
  ];
573
577
  };
@@ -629,6 +633,10 @@ export type Metadata = {
629
633
  {
630
634
  name: "authority";
631
635
  type: "pubkey";
636
+ },
637
+ {
638
+ name: "metadata";
639
+ type: "pubkey";
632
640
  }
633
641
  ];
634
642
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycelium-ip/core-sdk",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Typescript Core SDK for Mycelium IP protocol in Solana",
@@ -23,8 +23,7 @@
23
23
  "build": "tsc -p tsconfig.build.json",
24
24
  "lint": "eslint .",
25
25
  "test": "vitest",
26
- "typecheck": "tsc --noEmit",
27
- "clean": "rm -rf dist"
26
+ "typecheck": "tsc --noEmit"
28
27
  },
29
28
  "keywords": [],
30
29
  "author": "mycelium-dev",