@metaplex-foundation/mpl-token-auth-rules
Advanced tools
Comparing version 3.0.0-alpha.5 to 3.0.0-alpha.6
@@ -5,3 +5,3 @@ import { Context, Signer, TransactionBuilderGroup } from '@metaplex-foundation/umi'; | ||
export type CreateOrUpdateWithBufferV1Input = { | ||
/** Payer and creator of the RuleSet */ | ||
/** Payer and creator of the RuleSet. */ | ||
payer?: Signer; | ||
@@ -8,0 +8,0 @@ /** The name of the RuleSet account. */ |
@@ -7,2 +7,3 @@ "use strict"; | ||
const revisions_1 = require("./revisions"); | ||
const writeRuleSetToBufferV1_1 = require("./writeRuleSetToBufferV1"); | ||
exports.PUFF_CHUNK_SIZE = 10000; | ||
@@ -19,13 +20,7 @@ const createOrUpdateWithBufferV1 = (context, input) => { | ||
// Write instructions. | ||
const bufferSize = serializedRevision.length; | ||
const numberOfWrites = Math.ceil(bufferSize / chunkSize); | ||
const writeInstructions = Array.from({ length: numberOfWrites }, (_, index) => { | ||
const slice = serializedRevision.slice(index * chunkSize, Math.min((index + 1) * chunkSize, serializedRevision.length)); | ||
return (0, generated_1.writeToBufferV1)(context, { | ||
payer, | ||
bufferPda, | ||
data: slice, | ||
overwrite: index === 0, | ||
}); | ||
}); | ||
const writeInstructions = (0, writeRuleSetToBufferV1_1.writeRuleSetToBufferV1)(context, { | ||
payer, | ||
ruleSetRevision: input.ruleSetRevision, | ||
chunkSize, | ||
}).merge(); | ||
// Puff instructions. | ||
@@ -32,0 +27,0 @@ const puffSize = serializedRevision.length; |
@@ -6,1 +6,2 @@ export * from './createOrUpdateWithBufferV1'; | ||
export * from './revisions'; | ||
export * from './writeRuleSetToBufferV1'; |
@@ -22,2 +22,3 @@ "use strict"; | ||
__exportStar(require("./revisions"), exports); | ||
__exportStar(require("./writeRuleSetToBufferV1"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@metaplex-foundation/mpl-token-auth-rules", | ||
"version": "3.0.0-alpha.5", | ||
"version": "3.0.0-alpha.6", | ||
"description": "Javascript SDK for MPL Token Authorization Rules. MPL Token Authorization Rules can be used to restrict common token operations", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
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
265275
230
3978