@helium/helium-entity-manager-sdk 0.0.8 → 0.0.10

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.
@@ -3,19 +3,20 @@ import { HeliumEntityManager } from "@helium/idls/lib/types/helium_entity_manage
3
3
  import { Asset, AssetProof } from "@helium/spl-utils";
4
4
  import { BN, Program } from "@project-serum/anchor";
5
5
  import { PublicKey } from "@solana/web3.js";
6
- export declare function changeMetadata({ program, hotspotConfig, assetId, location, elevation, gain, getAssetFn, getAssetProofFn, }: {
6
+ export declare function updateMetadata({ program, hotspotConfig, assetId, location, elevation, gain, assetEndpoint, getAssetFn, getAssetProofFn, }: {
7
7
  program: Program<HeliumEntityManager>;
8
8
  location: BN | null;
9
9
  elevation: number | null;
10
10
  gain: number | null;
11
11
  assetId: PublicKey;
12
12
  hotspotConfig: PublicKey;
13
+ assetEndpoint?: string;
13
14
  getAssetFn?: (url: string, assetId: PublicKey) => Promise<Asset | undefined>;
14
15
  getAssetProofFn?: (url: string, assetId: PublicKey) => Promise<AssetProof | undefined>;
15
16
  }): Promise<import("@project-serum/anchor").MethodsBuilder<HeliumEntityManager, {
16
- name: "changeMetadataV0";
17
+ name: "updateIotInfoV0";
17
18
  accounts: [{
18
- name: "storage";
19
+ name: "info";
19
20
  isMut: true;
20
21
  isSigner: false;
21
22
  }, {
@@ -109,10 +110,10 @@ export declare function changeMetadata({ program, hotspotConfig, assetId, locati
109
110
  args: [{
110
111
  name: "args";
111
112
  type: {
112
- defined: "ChangeMetadataArgsV0";
113
+ defined: "UpdateIotInfoArgsV0";
113
114
  };
114
115
  }];
115
116
  } & {
116
- name: "changeMetadataV0";
117
+ name: "updateIotInfoV0";
117
118
  }>>;
118
119
  //# sourceMappingURL=changeMetadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"changeMetadata.d.ts","sourceRoot":"","sources":["../../../../src/functions/changeMetadata.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAA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EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,wBAAsB,cAAc,CAAC,EACnC,OAAO,EACP,aAAa,EACb,OAAO,EACP,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,aAAa,EACb,UAAqB,EACrB,eAA+B,GAChC,EAAE;IACD,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACtC,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa,EAAE,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC7E,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,SAAS,KACf,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6CA"}
@@ -0,0 +1,119 @@
1
+ /// <reference types="bn.js" />
2
+ import { HeliumEntityManager } from "@helium/idls/lib/types/helium_entity_manager";
3
+ import { Asset, AssetProof } from "@helium/spl-utils";
4
+ import { BN, Program } from "@project-serum/anchor";
5
+ import { PublicKey } from "@solana/web3.js";
6
+ export declare function updateMetadata({ program, hotspotConfig, assetId, location, elevation, gain, assetEndpoint, getAssetFn, getAssetProofFn, }: {
7
+ program: Program<HeliumEntityManager>;
8
+ location: BN | null;
9
+ elevation: number | null;
10
+ gain: number | null;
11
+ assetId: PublicKey;
12
+ hotspotConfig: PublicKey;
13
+ assetEndpoint?: string;
14
+ getAssetFn?: (url: string, assetId: PublicKey) => Promise<Asset | undefined>;
15
+ getAssetProofFn?: (url: string, assetId: PublicKey) => Promise<AssetProof | undefined>;
16
+ }): Promise<import("@project-serum/anchor").MethodsBuilder<HeliumEntityManager, {
17
+ name: "updateIotInfoV0";
18
+ accounts: [{
19
+ name: "info";
20
+ isMut: true;
21
+ isSigner: false;
22
+ }, {
23
+ name: "hotspotOwner";
24
+ isMut: true;
25
+ isSigner: true;
26
+ }, {
27
+ name: "merkleTree";
28
+ isMut: false;
29
+ isSigner: false;
30
+ }, {
31
+ name: "treeAuthority";
32
+ isMut: false;
33
+ isSigner: false;
34
+ pda: {
35
+ seeds: [{
36
+ kind: "account";
37
+ type: "publicKey";
38
+ path: "merkle_tree";
39
+ }];
40
+ programId: {
41
+ kind: "account";
42
+ type: "publicKey";
43
+ path: "bubblegum_program";
44
+ };
45
+ };
46
+ }, {
47
+ name: "ownerDcAta";
48
+ isMut: true;
49
+ isSigner: false;
50
+ }, {
51
+ name: "hotspotConfig";
52
+ isMut: false;
53
+ isSigner: false;
54
+ relations: ["dc_mint", "merkle_tree"];
55
+ }, {
56
+ name: "dcMint";
57
+ isMut: true;
58
+ isSigner: false;
59
+ }, {
60
+ name: "dc";
61
+ isMut: false;
62
+ isSigner: false;
63
+ pda: {
64
+ seeds: [{
65
+ kind: "const";
66
+ type: "string";
67
+ value: "dc";
68
+ }, {
69
+ kind: "account";
70
+ type: "publicKey";
71
+ account: "Mint";
72
+ path: "dc_mint";
73
+ }];
74
+ programId: {
75
+ kind: "account";
76
+ type: "publicKey";
77
+ path: "data_credits_program";
78
+ };
79
+ };
80
+ relations: ["dc_mint"];
81
+ }, {
82
+ name: "bubblegumProgram";
83
+ isMut: false;
84
+ isSigner: false;
85
+ }, {
86
+ name: "compressionProgram";
87
+ isMut: false;
88
+ isSigner: false;
89
+ }, {
90
+ name: "dataCreditsProgram";
91
+ isMut: false;
92
+ isSigner: false;
93
+ }, {
94
+ name: "tokenProgram";
95
+ isMut: false;
96
+ isSigner: false;
97
+ }, {
98
+ name: "associatedTokenProgram";
99
+ isMut: false;
100
+ isSigner: false;
101
+ }, {
102
+ name: "rent";
103
+ isMut: false;
104
+ isSigner: false;
105
+ }, {
106
+ name: "systemProgram";
107
+ isMut: false;
108
+ isSigner: false;
109
+ }];
110
+ args: [{
111
+ name: "args";
112
+ type: {
113
+ defined: "UpdateIotInfoArgsV0";
114
+ };
115
+ }];
116
+ } & {
117
+ name: "updateIotInfoV0";
118
+ }>>;
119
+ //# sourceMappingURL=updateMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateMetadata.d.ts","sourceRoot":"","sources":["../../../../src/functions/updateMetadata.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,KAAK,EAA2B,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,EAAE,EAAO,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,wBAAsB,cAAc,CAAC,EACnC,OAAO,EACP,aAAa,EACb,OAAO,EACP,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,aAAa,EACb,UAAqB,EACrB,eAA+B,GAChC,EAAE;IACD,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACtC,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa,EAAE,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC7E,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,SAAS,KACf,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6CA"}
@@ -4,6 +4,6 @@ import { HeliumEntityManager } from "@helium/idls/lib/types/helium_entity_manage
4
4
  export * from "./pdas";
5
5
  export * from "./resolvers";
6
6
  export * from "./constants";
7
- export { changeMetadata } from "./functions/changeMetadata";
7
+ export { updateMetadata } from "./functions/updateMetadata";
8
8
  export declare const init: (provider: AnchorProvider, programId?: PublicKey, idl?: Idl | null) => Promise<Program<HeliumEntityManager>>;
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -2,6 +2,6 @@ import { PublicKey } from "@solana/web3.js";
2
2
  export declare const hotspotConfigKey: (subDao: PublicKey, symbol: string, programId?: PublicKey) => [PublicKey, number];
3
3
  export declare const hotspotCollectionKey: (subDao: PublicKey, symbol: string, programId?: PublicKey) => [PublicKey, number];
4
4
  export declare const hotspotIssuerKey: (hotspotConfig: PublicKey, maker: PublicKey, programId?: PublicKey) => [PublicKey, number];
5
- export declare const hotspotStorageKey: (hotspotConfig: PublicKey, hotspotKey: string, programId?: PublicKey) => [PublicKey, number];
5
+ export declare const iotInfoKey: (hotspotConfig: PublicKey, hotspotKey: string, programId?: PublicKey) => [PublicKey, number];
6
6
  export declare const collectionMetadataKey: (collection: PublicKey, programId?: PublicKey) => [PublicKey, number];
7
7
  //# sourceMappingURL=pdas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pdas.d.ts","sourceRoot":"","sources":["../../../src/pdas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,eAAO,MAAM,gBAAgB,WACnB,SAAS,UACT,MAAM,cACH,SAAS,wBASnB,CAAC;AAEJ,eAAO,MAAM,oBAAoB,WACvB,SAAS,UACT,MAAM,cACH,SAAS,wBAKnB,CAAC;AAEJ,eAAO,MAAM,gBAAgB,kBACZ,SAAS,SACjB,SAAS,cACL,SAAS,wBASnB,CAAC;AAEJ,eAAO,MAAM,iBAAiB,kBACb,SAAS,cACZ,MAAM,cACP,SAAS,wBAYrB,CAAC;AAEF,eAAO,MAAM,qBAAqB,eACpB,SAAS,cACV,SAAS,wBASnB,CAAC"}
1
+ {"version":3,"file":"pdas.d.ts","sourceRoot":"","sources":["../../../src/pdas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,eAAO,MAAM,gBAAgB,WACnB,SAAS,UACT,MAAM,cACH,SAAS,wBASnB,CAAC;AAEJ,eAAO,MAAM,oBAAoB,WACvB,SAAS,UACT,MAAM,cACH,SAAS,wBAKnB,CAAC;AAEJ,eAAO,MAAM,gBAAgB,kBACZ,SAAS,SACjB,SAAS,cACL,SAAS,wBASnB,CAAC;AAEJ,eAAO,MAAM,UAAU,kBACN,SAAS,cACZ,MAAM,cACP,SAAS,wBAYrB,CAAC;AAEF,eAAO,MAAM,qBAAqB,eACpB,SAAS,cACV,SAAS,wBASnB,CAAC"}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
7
7
  "license": "Apache-2.0",
8
- "version": "0.0.8",
8
+ "version": "0.0.10",
9
9
  "description": "Interface to the helium-entity-manager smart contract",
10
10
  "repository": {
11
11
  "type": "git",
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@helium/address": "^4.6.2",
35
- "@helium/helium-sub-daos-sdk": "^0.0.8",
36
- "@helium/idls": "^0.0.8",
37
- "@helium/spl-utils": "^0.0.8",
35
+ "@helium/helium-sub-daos-sdk": "^0.0.10",
36
+ "@helium/idls": "^0.0.10",
37
+ "@helium/spl-utils": "^0.0.10",
38
38
  "@metaplex-foundation/mpl-token-metadata": "^2.2.3",
39
39
  "@project-serum/anchor": "0.24.2",
40
40
  "@solana/spl-token": "0.3.5",
@@ -48,5 +48,5 @@
48
48
  "typescript": "^4.3.4",
49
49
  "yarn": "^1.22.18"
50
50
  },
51
- "gitHead": "608867d62fd0735a0298a110fd80484c5d8867da"
51
+ "gitHead": "fede087053d338a16cf5d4d74881af6b1248b37b"
52
52
  }