phantasma-sdk-ts 0.2.0-rc.2 → 0.2.0-rc.4

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.
@@ -1,5 +1,5 @@
1
1
  import { TokenSchemas } from '../TokenSchemas';
2
2
  export declare class NftRomBuilder {
3
- static BuildAndSerialize(phantasmaNftId: bigint, name: string, description: string, imageURL: string, infoURL: string, royalties: number, rom: Uint8Array, tokenSchemas?: TokenSchemas): Uint8Array;
3
+ static buildAndSerialize(phantasmaNftId: bigint, name: string, description: string, imageURL: string, infoURL: string, royalties: number, rom: Uint8Array, tokenSchemas?: TokenSchemas): Uint8Array;
4
4
  }
5
5
  //# sourceMappingURL=NftRomBuilder.d.ts.map
@@ -6,10 +6,10 @@ const Vm_1 = require("../../Vm");
6
6
  const StandardMeta_1 = require("../StandardMeta");
7
7
  const TokenSchemasBuilder_1 = require("./TokenSchemasBuilder");
8
8
  class NftRomBuilder {
9
- static BuildAndSerialize(phantasmaNftId, name, description, imageURL, infoURL, royalties, rom, tokenSchemas) {
10
- tokenSchemas = tokenSchemas || TokenSchemasBuilder_1.TokenSchemasBuilder.PrepareStandardTokenSchemas();
9
+ static buildAndSerialize(phantasmaNftId, name, description, imageURL, infoURL, royalties, rom, tokenSchemas) {
10
+ tokenSchemas = tokenSchemas || TokenSchemasBuilder_1.TokenSchemasBuilder.prepareStandardTokenSchemas();
11
11
  const wRom = new CarbonSerialization_1.CarbonBinaryWriter();
12
- let vmDynamicStruct = new Vm_1.VmDynamicStruct();
12
+ const vmDynamicStruct = new Vm_1.VmDynamicStruct();
13
13
  vmDynamicStruct.fields = [
14
14
  Vm_1.VmNamedDynamicVariable.from(StandardMeta_1.StandardMeta.id, Vm_1.VmType.Int256, phantasmaNftId),
15
15
  Vm_1.VmNamedDynamicVariable.from('name', Vm_1.VmType.String, name),
@@ -1,6 +1,6 @@
1
1
  import { Bytes32 } from '../../../Bytes32';
2
2
  import { SeriesInfo } from '../SeriesInfo';
3
3
  export declare class SeriesInfoBuilder {
4
- static Build(phantasmaSeriesId: bigint, maxMint: number, maxSupply: number, ownerPublicKey: Bytes32, sharedRom: Uint8Array, metadata?: Uint8Array): SeriesInfo;
4
+ static build(phantasmaSeriesId: bigint, maxMint: number, maxSupply: number, ownerPublicKey: Bytes32, sharedRom: Uint8Array, metadata?: Uint8Array): SeriesInfo;
5
5
  }
6
6
  //# sourceMappingURL=SeriesInfoBuilder.d.ts.map
@@ -5,9 +5,9 @@ const Vm_1 = require("../../Vm");
5
5
  const SeriesInfo_1 = require("../SeriesInfo");
6
6
  const TokenSeriesMetadataBuilder_1 = require("./TokenSeriesMetadataBuilder");
7
7
  class SeriesInfoBuilder {
8
- static Build(phantasmaSeriesId, maxMint, maxSupply, ownerPublicKey, sharedRom, metadata) {
8
+ static build(phantasmaSeriesId, maxMint, maxSupply, ownerPublicKey, sharedRom, metadata) {
9
9
  metadata =
10
- metadata || TokenSeriesMetadataBuilder_1.TokenSeriesMetadataBuilder.BuildAndSerialize(phantasmaSeriesId, sharedRom, null);
10
+ metadata || TokenSeriesMetadataBuilder_1.TokenSeriesMetadataBuilder.buildAndSerialize(phantasmaSeriesId, sharedRom, null);
11
11
  return new SeriesInfo_1.SeriesInfo({
12
12
  maxMint: maxMint,
13
13
  maxSupply: maxSupply,
@@ -14,7 +14,7 @@ class TokenInfoBuilder {
14
14
  tokenInfo.owner = creatorPublicKey;
15
15
  tokenInfo.symbol = new SmallString_1.SmallString(symbol);
16
16
  tokenInfo.metadata = metadata;
17
- tokenInfo.tokenSchemas = tokenSchemas || TokenSchemasBuilder_1.TokenSchemasBuilder.BuildAndSerialize();
17
+ tokenInfo.tokenSchemas = tokenSchemas || TokenSchemasBuilder_1.TokenSchemasBuilder.buildAndSerialize();
18
18
  return tokenInfo;
19
19
  }
20
20
  }
@@ -1,7 +1,7 @@
1
1
  import { TokenSchemas } from '../TokenSchemas';
2
2
  export declare class TokenSchemasBuilder {
3
- static PrepareStandardTokenSchemas(): TokenSchemas;
4
- static BuildAndSerialize(tokenSchemas?: TokenSchemas): Uint8Array;
5
- static BuildAndSerializeHex(tokenSchemas?: TokenSchemas): string;
3
+ static prepareStandardTokenSchemas(): TokenSchemas;
4
+ static buildAndSerialize(tokenSchemas?: TokenSchemas): Uint8Array;
5
+ static buildAndSerializeHex(tokenSchemas?: TokenSchemas): string;
6
6
  }
7
7
  //# sourceMappingURL=TokenSchemasBuilder.d.ts.map
@@ -9,7 +9,7 @@ const VmType_1 = require("../../Vm/VmType");
9
9
  const StandardMeta_1 = require("../StandardMeta");
10
10
  const TokenSchemas_1 = require("../TokenSchemas");
11
11
  class TokenSchemasBuilder {
12
- static PrepareStandardTokenSchemas() {
12
+ static prepareStandardTokenSchemas() {
13
13
  // Serie metadata schema
14
14
  const seriesSchema = new VmStructSchema_1.VmStructSchema();
15
15
  seriesSchema.fields = [];
@@ -38,15 +38,15 @@ class TokenSchemasBuilder {
38
38
  tokenSchemas.ram = ramSchema;
39
39
  return tokenSchemas;
40
40
  }
41
- static BuildAndSerialize(tokenSchemas) {
42
- tokenSchemas = tokenSchemas || this.PrepareStandardTokenSchemas();
41
+ static buildAndSerialize(tokenSchemas) {
42
+ tokenSchemas = tokenSchemas || this.prepareStandardTokenSchemas();
43
43
  const schemaBuf = new CarbonSerialization_1.CarbonBinaryWriter();
44
44
  tokenSchemas.write(schemaBuf);
45
45
  return schemaBuf.toUint8Array();
46
46
  }
47
- static BuildAndSerializeHex(tokenSchemas) {
48
- tokenSchemas = tokenSchemas || this.PrepareStandardTokenSchemas();
49
- return (0, utils_1.bytesToHex)(this.BuildAndSerialize(tokenSchemas));
47
+ static buildAndSerializeHex(tokenSchemas) {
48
+ tokenSchemas = tokenSchemas || this.prepareStandardTokenSchemas();
49
+ return (0, utils_1.bytesToHex)(this.buildAndSerialize(tokenSchemas));
50
50
  }
51
51
  }
52
52
  exports.TokenSchemasBuilder = TokenSchemasBuilder;
@@ -1,5 +1,5 @@
1
1
  import { TokenSchemas } from '../TokenSchemas';
2
2
  export declare class TokenSeriesMetadataBuilder {
3
- static BuildAndSerialize(newPhantasmaSeriesId: bigint, sharedRom: Uint8Array, tokenSchemas?: TokenSchemas): Uint8Array;
3
+ static buildAndSerialize(newPhantasmaSeriesId: bigint, sharedRom: Uint8Array, tokenSchemas?: TokenSchemas): Uint8Array;
4
4
  }
5
5
  //# sourceMappingURL=TokenSeriesMetadataBuilder.d.ts.map
@@ -6,8 +6,8 @@ const Vm_1 = require("../../Vm");
6
6
  const StandardMeta_1 = require("../StandardMeta");
7
7
  const TokenSchemasBuilder_1 = require("./TokenSchemasBuilder");
8
8
  class TokenSeriesMetadataBuilder {
9
- static BuildAndSerialize(newPhantasmaSeriesId, sharedRom, tokenSchemas) {
10
- tokenSchemas = tokenSchemas || TokenSchemasBuilder_1.TokenSchemasBuilder.PrepareStandardTokenSchemas();
9
+ static buildAndSerialize(newPhantasmaSeriesId, sharedRom, tokenSchemas) {
10
+ tokenSchemas = tokenSchemas || TokenSchemasBuilder_1.TokenSchemasBuilder.prepareStandardTokenSchemas();
11
11
  const wMetadata = new CarbonSerialization_1.CarbonBinaryWriter();
12
12
  let vmDynamicStruct = new Vm_1.VmDynamicStruct();
13
13
  vmDynamicStruct.fields = [
@@ -21,7 +21,7 @@ class MintNonFungibleTxHelper {
21
21
  msg.maxData = maxData;
22
22
  msg.gasFrom = senderPublicKey;
23
23
  msg.payload = SmallString_1.SmallString.empty;
24
- let mint = new TxMsgMintNonFungible_1.TxMsgMintNonFungible();
24
+ const mint = new TxMsgMintNonFungible_1.TxMsgMintNonFungible();
25
25
  mint.tokenId = carbonTokenId;
26
26
  mint.seriesId = carbonSeriesId;
27
27
  mint.to = receiverPublicKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phantasma-sdk-ts",
3
- "version": "0.2.0-rc.2",
3
+ "version": "0.2.0-rc.4",
4
4
  "description": "Javascript SDK for interacting with the Phantasma Chain",
5
5
  "author": "Phantasma Team",
6
6
  "main": "dist/index.js",