@solana/spl-governance
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -8,6 +8,8 @@ import { ChatMessageBody } from './accounts'; | ||
body: ChatMessageBody; | ||
isReply: boolean; | ||
constructor(args: { | ||
body: ChatMessageBody; | ||
isReply: boolean; | ||
}); | ||
} | ||
//# sourceMappingURL=instructions.d.ts.map |
@@ -12,2 +12,3 @@ "use strict"; | ||
this.body = args.body; | ||
this.isReply = args.isReply; | ||
} | ||
@@ -14,0 +15,0 @@ } |
@@ -1,3 +0,1 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="@solana/web3.js" /> | ||
import { GovernanceChatAccountClass } from './accounts'; | ||
@@ -4,0 +2,0 @@ export declare const GOVERNANCE_CHAT_SCHEMA: Map<any, any>; |
@@ -40,2 +40,3 @@ "use strict"; | ||
['body', accounts_1.ChatMessageBody], | ||
['isReply', 'u8'], | ||
], | ||
@@ -42,0 +43,0 @@ }, |
@@ -23,2 +23,3 @@ "use strict"; | ||
body, | ||
isReply: false, | ||
}); | ||
@@ -25,0 +26,0 @@ const data = Buffer.from((0, borsh_1.serialize)(serialisation_1.GOVERNANCE_CHAT_SCHEMA, args)); |
@@ -35,3 +35,3 @@ import { PublicKey } from '@solana/web3.js'; | ||
export declare function getAccountTypes(accountClass: GovernanceAccountClass): GovernanceAccountType[]; | ||
export declare function getAccountProgramVersion(accountType: GovernanceAccountType): 1 | 2; | ||
export declare function getAccountProgramVersion(accountType: GovernanceAccountType): 2 | 1; | ||
export declare enum VoteThresholdPercentageType { | ||
@@ -38,0 +38,0 @@ YesVote = 0, |
@@ -81,7 +81,8 @@ "use strict"; | ||
const accountTypes = (0, accounts_1.getAccountTypes)(accountClass); | ||
if (accountTypes.length === 1) { | ||
return (0, api_1.getBorshProgramAccounts)(connection, programId, at => (0, serialisation_1.getGovernanceSchemaForAccount)(at), accountClass, filters, accountTypes[0]); | ||
let all = []; | ||
for (const accountType of accountTypes) { | ||
let accounts = yield (0, api_1.getBorshProgramAccounts)(connection, programId, at => (0, serialisation_1.getGovernanceSchemaForAccount)(at), accountClass, filters, accountType); | ||
all.push(...accounts); | ||
} | ||
const all = yield Promise.all(accountTypes.map(at => (0, api_1.getBorshProgramAccounts)(connection, programId, at => (0, serialisation_1.getGovernanceSchemaForAccount)(at), accountClass, filters, at))); | ||
return all.flatMap(a => a); | ||
return all; | ||
}); | ||
@@ -88,0 +89,0 @@ } |
@@ -22,3 +22,3 @@ export * from './accounts'; | ||
export * from './withDepositGoverningTokens'; | ||
export * from './withExecuteTransaction'; | ||
export * from './withExecuteInstruction'; | ||
export * from './withFinalizeVote'; | ||
@@ -25,0 +25,0 @@ export * from './withFlagTransactionError'; |
@@ -34,3 +34,3 @@ "use strict"; | ||
__exportStar(require("./withDepositGoverningTokens"), exports); | ||
__exportStar(require("./withExecuteTransaction"), exports); | ||
__exportStar(require("./withExecuteInstruction"), exports); | ||
__exportStar(require("./withFinalizeVote"), exports); | ||
@@ -37,0 +37,0 @@ __exportStar(require("./withFlagTransactionError"), exports); |
{ | ||
"name": "@solana/spl-governance", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "SPL Governance Client API", | ||
@@ -5,0 +5,0 @@ "author": "Solana Maintainers <maintainers@solana.foundation>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
861294
450
12492