@exponent-labs/exponent-admin-pda 0.0.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [0.0.3](https://github.com/exponent-finance/exponent-core/compare/@exponent-labs/exponent-admin-pda@0.0.2...@exponent-labs/exponent-admin-pda@0.0.3) (2025-03-03)
7
+
8
+ **Note:** Version bump only for package @exponent-labs/exponent-admin-pda
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.0.2](https://github.com/exponent-finance/exponent-core/compare/@exponent-labs/exponent-admin-pda@0.0.1...@exponent-labs/exponent-admin-pda@0.0.2) (2025-03-03)
15
+
16
+ **Note:** Version bump only for package @exponent-labs/exponent-admin-pda
@@ -0,0 +1,12 @@
1
+ import { web3 } from "@coral-xyz/anchor";
2
+ export declare class ExponentAdminPda {
3
+ programId: web3.PublicKey;
4
+ constructor(programId: web3.PublicKey);
5
+ private findProgramAddressSync;
6
+ /**
7
+ * Return the SY emission tracker account
8
+ * `bank` is the address of the Marginfi Bank
9
+ */
10
+ exponentAdmin(): web3.PublicKey;
11
+ }
12
+ export declare const EXPONENT_ADMIN_PROGRAM_ID: web3.PublicKey;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EXPONENT_ADMIN_PROGRAM_ID = exports.ExponentAdminPda = void 0;
4
+ const anchor_1 = require("@coral-xyz/anchor");
5
+ class ExponentAdminPda {
6
+ programId;
7
+ constructor(programId) {
8
+ this.programId = programId;
9
+ }
10
+ findProgramAddressSync(seeds) {
11
+ return anchor_1.web3.PublicKey.findProgramAddressSync(seeds, this.programId)[0];
12
+ }
13
+ /**
14
+ * Return the SY emission tracker account
15
+ * `bank` is the address of the Marginfi Bank
16
+ */
17
+ exponentAdmin() {
18
+ return this.findProgramAddressSync([Buffer.from("admin")]);
19
+ }
20
+ }
21
+ exports.ExponentAdminPda = ExponentAdminPda;
22
+ exports.EXPONENT_ADMIN_PROGRAM_ID = new anchor_1.web3.PublicKey("3D6ojc8vBfDteLBDTTRznZbZRh7bkEGQaYqNkudoTCBQ");
23
+ //# sourceMappingURL=exponentAdminPda.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exponentAdminPda.js","sourceRoot":"","sources":["../src/exponentAdminPda.ts"],"names":[],"mappings":";;;AAAA,8CAAwC;AAExC,MAAa,gBAAgB;IACR;IAAnB,YAAmB,SAAyB;QAAzB,cAAS,GAAT,SAAS,CAAgB;IAAG,CAAC;IAExC,sBAAsB,CAAC,KAAe;QAC5C,OAAO,aAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;IACxE,CAAC;IAED;;;OAGG;IACH,aAAa;QACX,OAAO,IAAI,CAAC,sBAAsB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC5D,CAAC;CACF;AAdD,4CAcC;AAEY,QAAA,yBAAyB,GAAG,IAAI,aAAI,CAAC,SAAS,CAAC,8CAA8C,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export * from "./exponentAdminPda";
package/build/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./exponentAdminPda"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC"}
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@exponent-labs/exponent-admin-pda",
3
+ "version": "0.0.3",
4
+ "main": "build/index.js",
5
+ "types": "build/index.d.ts",
6
+ "license": "AGPL-3.0",
7
+ "scripts": {
8
+ "build": "tsc --build"
9
+ },
10
+ "dependencies": {
11
+ "@coral-xyz/anchor": "0.30.0"
12
+ },
13
+ "devDependencies": {
14
+ "typescript": "5.4.5"
15
+ },
16
+ "gitHead": "209b8847e9a0fadb5b5ec96b9b47f0ace4a3bf9d"
17
+ }
@@ -0,0 +1,19 @@
1
+ import { web3 } from "@coral-xyz/anchor"
2
+
3
+ export class ExponentAdminPda {
4
+ constructor(public programId: web3.PublicKey) {}
5
+
6
+ private findProgramAddressSync(seeds: Buffer[]) {
7
+ return web3.PublicKey.findProgramAddressSync(seeds, this.programId)[0]
8
+ }
9
+
10
+ /**
11
+ * Return the SY emission tracker account
12
+ * `bank` is the address of the Marginfi Bank
13
+ */
14
+ exponentAdmin() {
15
+ return this.findProgramAddressSync([Buffer.from("admin")])
16
+ }
17
+ }
18
+
19
+ export const EXPONENT_ADMIN_PROGRAM_ID = new web3.PublicKey("3D6ojc8vBfDteLBDTTRznZbZRh7bkEGQaYqNkudoTCBQ")
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./exponentAdminPda"
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "rootDir": "src",
4
+ "sourceMap": true,
5
+ "incremental": true /* Save .tsbuildinfo files to allow for incremental compilation of projects. */,
6
+ "composite": true /* Enable constraints that allow a TypeScript project to be used with project references. */,
7
+ "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
8
+ "module": "CommonJS" /* Specify what module code is generated. */,
9
+ "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
10
+ "outDir": "./build" /* Specify an output folder for all emitted files. */,
11
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
12
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
13
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
14
+ },
15
+ "include": ["src"],
16
+ "exclude": ["build"],
17
+ "references": []
18
+ }