@reflectmoney/stable.ts 3.0.0 → 3.0.1
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.
|
@@ -51,6 +51,12 @@ export declare class ReflectKeeper {
|
|
|
51
51
|
* - devnet=false, mock=false → production mainnet program
|
|
52
52
|
*/
|
|
53
53
|
get programAddress(): Address;
|
|
54
|
+
/**
|
|
55
|
+
* Fetches the permission account for the admin.
|
|
56
|
+
*
|
|
57
|
+
* @returns The permission account if it exists, or a MaybeAccount with exists=false
|
|
58
|
+
*/
|
|
59
|
+
getPermissionAccount(): Promise<import("@solana/kit").MaybeAccount<import("../generated/reflect_main").UserPermissions, string>>;
|
|
54
60
|
/**
|
|
55
61
|
* Creates the main program account. This is the initial step of protocol setup.
|
|
56
62
|
*
|
|
@@ -63,6 +63,18 @@ class ReflectKeeper {
|
|
|
63
63
|
get programAddress() {
|
|
64
64
|
return (0, getProgramAddress_1.getProgramAddress)({ devnet: this.devnet, mock: this.mock });
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Fetches the permission account for the admin.
|
|
68
|
+
*
|
|
69
|
+
* @returns The permission account if it exists, or a MaybeAccount with exists=false
|
|
70
|
+
*/
|
|
71
|
+
getPermissionAccount() {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const permissions = yield PdaClient_1.PdaClient.derivePermissions(this.admin, this.devnet, this.mock);
|
|
74
|
+
const permissionsAccount = yield (0, reflect_main_1.fetchMaybeUserPermissions)(this.rpc, permissions);
|
|
75
|
+
return permissionsAccount;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
66
78
|
/**
|
|
67
79
|
* Creates the main program account. This is the initial step of protocol setup.
|
|
68
80
|
*
|