@exponent-labs/fragmetric-idl 0.1.7 → 0.1.8
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/build/index.d.ts +5 -0
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/package.json +5 -2
- package/src/index.ts +8 -0
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { BorshCoder } from "@coral-xyz/anchor";
|
|
1
4
|
export declare const IDL: {
|
|
2
5
|
address: string;
|
|
3
6
|
metadata: {
|
|
@@ -2086,3 +2089,5 @@ export declare const IDL: {
|
|
|
2086
2089
|
})[];
|
|
2087
2090
|
};
|
|
2088
2091
|
export declare const PROGRAM_ID: string;
|
|
2092
|
+
export declare const FRAGMETRIC_CODER: BorshCoder<string, string>;
|
|
2093
|
+
export declare const decodeFundAccount: (data: Buffer) => any;
|
package/build/index.js
CHANGED
|
@@ -23,8 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.PROGRAM_ID = exports.IDL = void 0;
|
|
26
|
+
exports.decodeFundAccount = exports.FRAGMETRIC_CODER = exports.PROGRAM_ID = exports.IDL = void 0;
|
|
27
27
|
const idl = __importStar(require("./fragmetric.json"));
|
|
28
|
+
const anchor_1 = require("@coral-xyz/anchor");
|
|
28
29
|
exports.IDL = idl;
|
|
29
30
|
exports.PROGRAM_ID = idl.address;
|
|
31
|
+
exports.FRAGMETRIC_CODER = new anchor_1.BorshCoder(exports.IDL);
|
|
32
|
+
const decodeFundAccount = (data) => {
|
|
33
|
+
return exports.FRAGMETRIC_CODER.accounts.decode("FundAccount", data);
|
|
34
|
+
};
|
|
35
|
+
exports.decodeFundAccount = decodeFundAccount;
|
|
30
36
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,8CAAmD;AAEtC,QAAA,GAAG,GAAG,GAAG,CAAA;AACT,QAAA,UAAU,GAAW,GAAG,CAAC,OAAO,CAAA;AAEhC,QAAA,gBAAgB,GAAG,IAAI,mBAAU,CAAC,WAAU,CAAC,CAAA;AAEnD,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IAChD,OAAO,wBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;AAC9D,CAAC,CAAA;AAFY,QAAA,iBAAiB,qBAE7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exponent-labs/fragmetric-idl",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -10,5 +10,8 @@
|
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.4.5"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "209b8847e9a0fadb5b5ec96b9b47f0ace4a3bf9d"
|
|
13
|
+
"gitHead": "209b8847e9a0fadb5b5ec96b9b47f0ace4a3bf9d",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@coral-xyz/anchor": "0.30.0"
|
|
16
|
+
}
|
|
14
17
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import * as idl from "./fragmetric.json"
|
|
2
|
+
import { BorshCoder, Idl } from "@coral-xyz/anchor"
|
|
3
|
+
|
|
2
4
|
export const IDL = idl
|
|
3
5
|
export const PROGRAM_ID: string = idl.address
|
|
6
|
+
|
|
7
|
+
export const FRAGMETRIC_CODER = new BorshCoder(IDL as Idl)
|
|
8
|
+
|
|
9
|
+
export const decodeFundAccount = (data: Buffer) => {
|
|
10
|
+
return FRAGMETRIC_CODER.accounts.decode("FundAccount", data)
|
|
11
|
+
}
|